diff options
819 files changed, 34925 insertions, 10317 deletions
diff --git a/Documentation/arm/pxa/mfp.txt b/Documentation/arm/pxa/mfp.txt new file mode 100644 index 000000000000..a179e5bc02c9 --- /dev/null +++ b/Documentation/arm/pxa/mfp.txt | |||
@@ -0,0 +1,286 @@ | |||
1 | MFP Configuration for PXA2xx/PXA3xx Processors | ||
2 | |||
3 | Eric Miao <eric.miao@marvell.com> | ||
4 | |||
5 | MFP stands for Multi-Function Pin, which is the pin-mux logic on PXA3xx and | ||
6 | later PXA series processors. This document describes the existing MFP API, | ||
7 | and how board/platform driver authors could make use of it. | ||
8 | |||
9 | Basic Concept | ||
10 | =============== | ||
11 | |||
12 | Unlike the GPIO alternate function settings on PXA25x and PXA27x, a new MFP | ||
13 | mechanism is introduced from PXA3xx to completely move the pin-mux functions | ||
14 | out of the GPIO controller. In addition to pin-mux configurations, the MFP | ||
15 | also controls the low power state, driving strength, pull-up/down and event | ||
16 | detection of each pin. Below is a diagram of internal connections between | ||
17 | the MFP logic and the remaining SoC peripherals: | ||
18 | |||
19 | +--------+ | ||
20 | | |--(GPIO19)--+ | ||
21 | | GPIO | | | ||
22 | | |--(GPIO...) | | ||
23 | +--------+ | | ||
24 | | +---------+ | ||
25 | +--------+ +------>| | | ||
26 | | PWM2 |--(PWM_OUT)-------->| MFP | | ||
27 | +--------+ +------>| |-------> to external PAD | ||
28 | | +---->| | | ||
29 | +--------+ | | +-->| | | ||
30 | | SSP2 |---(TXD)----+ | | +---------+ | ||
31 | +--------+ | | | ||
32 | | | | ||
33 | +--------+ | | | ||
34 | | Keypad |--(MKOUT4)----+ | | ||
35 | +--------+ | | ||
36 | | | ||
37 | +--------+ | | ||
38 | | UART2 |---(TXD)--------+ | ||
39 | +--------+ | ||
40 | |||
41 | NOTE: the external pad is named as MFP_PIN_GPIO19, it doesn't necessarily | ||
42 | mean it's dedicated for GPIO19, only as a hint that internally this pin | ||
43 | can be routed from GPIO19 of the GPIO controller. | ||
44 | |||
45 | To better understand the change from PXA25x/PXA27x GPIO alternate function | ||
46 | to this new MFP mechanism, here are several key points: | ||
47 | |||
48 | 1. GPIO controller on PXA3xx is now a dedicated controller, same as other | ||
49 | internal controllers like PWM, SSP and UART, with 128 internal signals | ||
50 | which can be routed to external through one or more MFPs (e.g. GPIO<0> | ||
51 | can be routed through either MFP_PIN_GPIO0 as well as MFP_PIN_GPIO0_2, | ||
52 | see arch/arm/mach-pxa/mach/include/mfp-pxa300.h) | ||
53 | |||
54 | 2. Alternate function configuration is removed from this GPIO controller, | ||
55 | the remaining functions are pure GPIO-specific, i.e. | ||
56 | |||
57 | - GPIO signal level control | ||
58 | - GPIO direction control | ||
59 | - GPIO level change detection | ||
60 | |||
61 | 3. Low power state for each pin is now controlled by MFP, this means the | ||
62 | PGSRx registers on PXA2xx are now useless on PXA3xx | ||
63 | |||
64 | 4. Wakeup detection is now controlled by MFP, PWER does not control the | ||
65 | wakeup from GPIO(s) any more, depending on the sleeping state, ADxER | ||
66 | (as defined in pxa3xx-regs.h) controls the wakeup from MFP | ||
67 | |||
68 | NOTE: with such a clear separation of MFP and GPIO, by GPIO<xx> we normally | ||
69 | mean it is a GPIO signal, and by MFP<xxx> or pin xxx, we mean a physical | ||
70 | pad (or ball). | ||
71 | |||
72 | MFP API Usage | ||
73 | =============== | ||
74 | |||
75 | For board code writers, here are some guidelines: | ||
76 | |||
77 | 1. include ONE of the following header files in your <board>.c: | ||
78 | |||
79 | - #include <mach/mfp-pxa25x.h> | ||
80 | - #include <mach/mfp-pxa27x.h> | ||
81 | - #include <mach/mfp-pxa300.h> | ||
82 | - #include <mach/mfp-pxa320.h> | ||
83 | - #include <mach/mfp-pxa930.h> | ||
84 | |||
85 | NOTE: only one file in your <board>.c, depending on the processors used, | ||
86 | because pin configuration definitions may conflict in these file (i.e. | ||
87 | same name, different meaning and settings on different processors). E.g. | ||
88 | for zylonite platform, which support both PXA300/PXA310 and PXA320, two | ||
89 | separate files are introduced: zylonite_pxa300.c and zylonite_pxa320.c | ||
90 | (in addition to handle MFP configuration differences, they also handle | ||
91 | the other differences between the two combinations). | ||
92 | |||
93 | NOTE: PXA300 and PXA310 are almost identical in pin configurations (with | ||
94 | PXA310 supporting some additional ones), thus the difference is actually | ||
95 | covered in a single mfp-pxa300.h. | ||
96 | |||
97 | 2. prepare an array for the initial pin configurations, e.g.: | ||
98 | |||
99 | static unsigned long mainstone_pin_config[] __initdata = { | ||
100 | /* Chip Select */ | ||
101 | GPIO15_nCS_1, | ||
102 | |||
103 | /* LCD - 16bpp Active TFT */ | ||
104 | GPIOxx_TFT_LCD_16BPP, | ||
105 | GPIO16_PWM0_OUT, /* Backlight */ | ||
106 | |||
107 | /* MMC */ | ||
108 | GPIO32_MMC_CLK, | ||
109 | GPIO112_MMC_CMD, | ||
110 | GPIO92_MMC_DAT_0, | ||
111 | GPIO109_MMC_DAT_1, | ||
112 | GPIO110_MMC_DAT_2, | ||
113 | GPIO111_MMC_DAT_3, | ||
114 | |||
115 | ... | ||
116 | |||
117 | /* GPIO */ | ||
118 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, | ||
119 | }; | ||
120 | |||
121 | a) once the pin configurations are passed to pxa{2xx,3xx}_mfp_config(), | ||
122 | and written to the actual registers, they are useless and may discard, | ||
123 | adding '__initdata' will help save some additional bytes here. | ||
124 | |||
125 | b) when there is only one possible pin configurations for a component, | ||
126 | some simplified definitions can be used, e.g. GPIOxx_TFT_LCD_16BPP on | ||
127 | PXA25x and PXA27x processors | ||
128 | |||
129 | c) if by board design, a pin can be configured to wake up the system | ||
130 | from low power state, it can be 'OR'ed with any of: | ||
131 | |||
132 | WAKEUP_ON_EDGE_BOTH | ||
133 | WAKEUP_ON_EDGE_RISE | ||
134 | WAKEUP_ON_EDGE_FALL | ||
135 | WAKEUP_ON_LEVEL_HIGH - specifically for enabling of keypad GPIOs, | ||
136 | |||
137 | to indicate that this pin has the capability of wake-up the system, | ||
138 | and on which edge(s). This, however, doesn't necessarily mean the | ||
139 | pin _will_ wakeup the system, it will only when set_irq_wake() is | ||
140 | invoked with the corresponding GPIO IRQ (GPIO_IRQ(xx) or gpio_to_irq()) | ||
141 | and eventually calls gpio_set_wake() for the actual register setting. | ||
142 | |||
143 | d) although PXA3xx MFP supports edge detection on each pin, the | ||
144 | internal logic will only wakeup the system when those specific bits | ||
145 | in ADxER registers are set, which can be well mapped to the | ||
146 | corresponding peripheral, thus set_irq_wake() can be called with | ||
147 | the peripheral IRQ to enable the wakeup. | ||
148 | |||
149 | |||
150 | MFP on PXA3xx | ||
151 | =============== | ||
152 | |||
153 | Every external I/O pad on PXA3xx (excluding those for special purpose) has | ||
154 | one MFP logic associated, and is controlled by one MFP register (MFPR). | ||
155 | |||
156 | The MFPR has the following bit definitions (for PXA300/PXA310/PXA320): | ||
157 | |||
158 | 31 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 | ||
159 | +-------------------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ||
160 | | RESERVED |PS|PU|PD| DRIVE |SS|SD|SO|EC|EF|ER|--| AF_SEL | | ||
161 | +-------------------------+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ||
162 | |||
163 | Bit 3: RESERVED | ||
164 | Bit 4: EDGE_RISE_EN - enable detection of rising edge on this pin | ||
165 | Bit 5: EDGE_FALL_EN - enable detection of falling edge on this pin | ||
166 | Bit 6: EDGE_CLEAR - disable edge detection on this pin | ||
167 | Bit 7: SLEEP_OE_N - enable outputs during low power modes | ||
168 | Bit 8: SLEEP_DATA - output data on the pin during low power modes | ||
169 | Bit 9: SLEEP_SEL - selection control for low power modes signals | ||
170 | Bit 13: PULLDOWN_EN - enable the internal pull-down resistor on this pin | ||
171 | Bit 14: PULLUP_EN - enable the internal pull-up resistor on this pin | ||
172 | Bit 15: PULL_SEL - pull state controlled by selected alternate function | ||
173 | (0) or by PULL{UP,DOWN}_EN bits (1) | ||
174 | |||
175 | Bit 0 - 2: AF_SEL - alternate function selection, 8 possibilities, from 0-7 | ||
176 | Bit 10-12: DRIVE - drive strength and slew rate | ||
177 | 0b000 - fast 1mA | ||
178 | 0b001 - fast 2mA | ||
179 | 0b002 - fast 3mA | ||
180 | 0b003 - fast 4mA | ||
181 | 0b004 - slow 6mA | ||
182 | 0b005 - fast 6mA | ||
183 | 0b006 - slow 10mA | ||
184 | 0b007 - fast 10mA | ||
185 | |||
186 | MFP Design for PXA2xx/PXA3xx | ||
187 | ============================== | ||
188 | |||
189 | Due to the difference of pin-mux handling between PXA2xx and PXA3xx, a unified | ||
190 | MFP API is introduced to cover both series of processors. | ||
191 | |||
192 | The basic idea of this design is to introduce definitions for all possible pin | ||
193 | configurations, these definitions are processor and platform independent, and | ||
194 | the actual API invoked to convert these definitions into register settings and | ||
195 | make them effective there-after. | ||
196 | |||
197 | Files Involved | ||
198 | -------------- | ||
199 | |||
200 | - arch/arm/mach-pxa/include/mach/mfp.h | ||
201 | |||
202 | for | ||
203 | 1. Unified pin definitions - enum constants for all configurable pins | ||
204 | 2. processor-neutral bit definitions for a possible MFP configuration | ||
205 | |||
206 | - arch/arm/mach-pxa/include/mach/mfp-pxa3xx.h | ||
207 | |||
208 | for PXA3xx specific MFPR register bit definitions and PXA3xx common pin | ||
209 | configurations | ||
210 | |||
211 | - arch/arm/mach-pxa/include/mach/mfp-pxa2xx.h | ||
212 | |||
213 | for PXA2xx specific definitions and PXA25x/PXA27x common pin configurations | ||
214 | |||
215 | - arch/arm/mach-pxa/include/mach/mfp-pxa25x.h | ||
216 | arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | ||
217 | arch/arm/mach-pxa/include/mach/mfp-pxa300.h | ||
218 | arch/arm/mach-pxa/include/mach/mfp-pxa320.h | ||
219 | arch/arm/mach-pxa/include/mach/mfp-pxa930.h | ||
220 | |||
221 | for processor specific definitions | ||
222 | |||
223 | - arch/arm/mach-pxa/mfp-pxa3xx.c | ||
224 | - arch/arm/mach-pxa/mfp-pxa2xx.c | ||
225 | |||
226 | for implementation of the pin configuration to take effect for the actual | ||
227 | processor. | ||
228 | |||
229 | Pin Configuration | ||
230 | ----------------- | ||
231 | |||
232 | The following comments are copied from mfp.h (see the actual source code | ||
233 | for most updated info) | ||
234 | |||
235 | /* | ||
236 | * a possible MFP configuration is represented by a 32-bit integer | ||
237 | * | ||
238 | * bit 0.. 9 - MFP Pin Number (1024 Pins Maximum) | ||
239 | * bit 10..12 - Alternate Function Selection | ||
240 | * bit 13..15 - Drive Strength | ||
241 | * bit 16..18 - Low Power Mode State | ||
242 | * bit 19..20 - Low Power Mode Edge Detection | ||
243 | * bit 21..22 - Run Mode Pull State | ||
244 | * | ||
245 | * to facilitate the definition, the following macros are provided | ||
246 | * | ||
247 | * MFP_CFG_DEFAULT - default MFP configuration value, with | ||
248 | * alternate function = 0, | ||
249 | * drive strength = fast 3mA (MFP_DS03X) | ||
250 | * low power mode = default | ||
251 | * edge detection = none | ||
252 | * | ||
253 | * MFP_CFG - default MFPR value with alternate function | ||
254 | * MFP_CFG_DRV - default MFPR value with alternate function and | ||
255 | * pin drive strength | ||
256 | * MFP_CFG_LPM - default MFPR value with alternate function and | ||
257 | * low power mode | ||
258 | * MFP_CFG_X - default MFPR value with alternate function, | ||
259 | * pin drive strength and low power mode | ||
260 | */ | ||
261 | |||
262 | Examples of pin configurations are: | ||
263 | |||
264 | #define GPIO94_SSP3_RXD MFP_CFG_X(GPIO94, AF1, DS08X, FLOAT) | ||
265 | |||
266 | which reads GPIO94 can be configured as SSP3_RXD, with alternate function | ||
267 | selection of 1, driving strength of 0b101, and a float state in low power | ||
268 | modes. | ||
269 | |||
270 | NOTE: this is the default setting of this pin being configured as SSP3_RXD | ||
271 | which can be modified a bit in board code, though it is not recommended to | ||
272 | do so, simply because this default setting is usually carefully encoded, | ||
273 | and is supposed to work in most cases. | ||
274 | |||
275 | Register Settings | ||
276 | ----------------- | ||
277 | |||
278 | Register settings on PXA3xx for a pin configuration is actually very | ||
279 | straight-forward, most bits can be converted directly into MFPR value | ||
280 | in a easier way. Two sets of MFPR values are calculated: the run-time | ||
281 | ones and the low power mode ones, to allow different settings. | ||
282 | |||
283 | The conversion from a generic pin configuration to the actual register | ||
284 | settings on PXA2xx is a bit complicated: many registers are involved, | ||
285 | including GAFRx, GPDRx, PGSRx, PWER, PKWR, PFER and PRER. Please see | ||
286 | mfp-pxa2xx.c for how the conversion is made. | ||
diff --git a/Documentation/fb/pxafb.txt b/Documentation/fb/pxafb.txt index db9b8500b43b..d143a0a749f9 100644 --- a/Documentation/fb/pxafb.txt +++ b/Documentation/fb/pxafb.txt | |||
@@ -5,9 +5,13 @@ The driver supports the following options, either via | |||
5 | options=<OPTIONS> when modular or video=pxafb:<OPTIONS> when built in. | 5 | options=<OPTIONS> when modular or video=pxafb:<OPTIONS> when built in. |
6 | 6 | ||
7 | For example: | 7 | For example: |
8 | modprobe pxafb options=mode:640x480-8,passive | 8 | modprobe pxafb options=vmem:2M,mode:640x480-8,passive |
9 | or on the kernel command line | 9 | or on the kernel command line |
10 | video=pxafb:mode:640x480-8,passive | 10 | video=pxafb:vmem:2M,mode:640x480-8,passive |
11 | |||
12 | vmem: VIDEO_MEM_SIZE | ||
13 | Amount of video memory to allocate (can be suffixed with K or M | ||
14 | for kilobytes or megabytes) | ||
11 | 15 | ||
12 | mode:XRESxYRES[-BPP] | 16 | mode:XRESxYRES[-BPP] |
13 | XRES == LCCR1_PPL + 1 | 17 | XRES == LCCR1_PPL + 1 |
@@ -52,3 +56,87 @@ outputen:POLARITY | |||
52 | pixclockpol:POLARITY | 56 | pixclockpol:POLARITY |
53 | pixel clock polarity | 57 | pixel clock polarity |
54 | 0 => falling edge, 1 => rising edge | 58 | 0 => falling edge, 1 => rising edge |
59 | |||
60 | |||
61 | Overlay Support for PXA27x and later LCD controllers | ||
62 | ==================================================== | ||
63 | |||
64 | PXA27x and later processors support overlay1 and overlay2 on-top of the | ||
65 | base framebuffer (although under-neath the base is also possible). They | ||
66 | support palette and no-palette RGB formats, as well as YUV formats (only | ||
67 | available on overlay2). These overlays have dedicated DMA channels and | ||
68 | behave in a similar way as a framebuffer. | ||
69 | |||
70 | However, there are some differences between these overlay framebuffers | ||
71 | and normal framebuffers, as listed below: | ||
72 | |||
73 | 1. overlay can start at a 32-bit word aligned position within the base | ||
74 | framebuffer, which means they have a start (x, y). This information | ||
75 | is encoded into var->nonstd (no, var->xoffset and var->yoffset are | ||
76 | not for such purpose). | ||
77 | |||
78 | 2. overlay framebuffer is allocated dynamically according to specified | ||
79 | 'struct fb_var_screeninfo', the amount is decided by: | ||
80 | |||
81 | var->xres_virtual * var->yres_virtual * bpp | ||
82 | |||
83 | bpp = 16 -- for RGB565 or RGBT555 | ||
84 | = 24 -- for YUV444 packed | ||
85 | = 24 -- for YUV444 planar | ||
86 | = 16 -- for YUV422 planar (1 pixel = 1 Y + 1/2 Cb + 1/2 Cr) | ||
87 | = 12 -- for YUV420 planar (1 pixel = 1 Y + 1/4 Cb + 1/4 Cr) | ||
88 | |||
89 | NOTE: | ||
90 | |||
91 | a. overlay does not support panning in x-direction, thus | ||
92 | var->xres_virtual will always be equal to var->xres | ||
93 | |||
94 | b. line length of overlay(s) must be on a 32-bit word boundary, | ||
95 | for YUV planar modes, it is a requirement for the component | ||
96 | with minimum bits per pixel, e.g. for YUV420, Cr component | ||
97 | for one pixel is actually 2-bits, it means the line length | ||
98 | should be a multiple of 16-pixels | ||
99 | |||
100 | c. starting horizontal position (XPOS) should start on a 32-bit | ||
101 | word boundary, otherwise the fb_check_var() will just fail. | ||
102 | |||
103 | d. the rectangle of the overlay should be within the base plane, | ||
104 | otherwise fail | ||
105 | |||
106 | Applications should follow the sequence below to operate an overlay | ||
107 | framebuffer: | ||
108 | |||
109 | a. open("/dev/fb[1-2]", ...) | ||
110 | b. ioctl(fd, FBIOGET_VSCREENINFO, ...) | ||
111 | c. modify 'var' with desired parameters: | ||
112 | 1) var->xres and var->yres | ||
113 | 2) larger var->yres_virtual if more memory is required, | ||
114 | usually for double-buffering | ||
115 | 3) var->nonstd for starting (x, y) and color format | ||
116 | 4) var->{red, green, blue, transp} if RGB mode is to be used | ||
117 | d. ioctl(fd, FBIOPUT_VSCREENINFO, ...) | ||
118 | e. ioctl(fd, FBIOGET_FSCREENINFO, ...) | ||
119 | f. mmap | ||
120 | g. ... | ||
121 | |||
122 | 3. for YUV planar formats, these are actually not supported within the | ||
123 | framebuffer framework, application has to take care of the offsets | ||
124 | and lengths of each component within the framebuffer. | ||
125 | |||
126 | 4. var->nonstd is used to pass starting (x, y) position and color format, | ||
127 | the detailed bit fields are shown below: | ||
128 | |||
129 | 31 23 20 10 0 | ||
130 | +-----------------+---+----------+----------+ | ||
131 | | ... unused ... |FOR| XPOS | YPOS | | ||
132 | +-----------------+---+----------+----------+ | ||
133 | |||
134 | FOR - color format, as defined by OVERLAY_FORMAT_* in pxafb.h | ||
135 | 0 - RGB | ||
136 | 1 - YUV444 PACKED | ||
137 | 2 - YUV444 PLANAR | ||
138 | 3 - YUV422 PLANAR | ||
139 | 4 - YUR420 PLANAR | ||
140 | |||
141 | XPOS - starting horizontal position | ||
142 | YPOS - starting vertical position | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 08d0ab7fa161..ceb32ee51f9d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1755,6 +1755,13 @@ L: linuxppc-dev@ozlabs.org | |||
1755 | L: linux-i2c@vger.kernel.org | 1755 | L: linux-i2c@vger.kernel.org |
1756 | S: Maintained | 1756 | S: Maintained |
1757 | 1757 | ||
1758 | FREESCALE IMX / MXC FRAMEBUFFER DRIVER | ||
1759 | P: Sascha Hauer | ||
1760 | M: kernel@pengutronix.de | ||
1761 | L: linux-fbdev-devel@lists.sourceforge.net (moderated for non-subscribers) | ||
1762 | L: linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only) | ||
1763 | S: Maintained | ||
1764 | |||
1758 | FREESCALE SOC FS_ENET DRIVER | 1765 | FREESCALE SOC FS_ENET DRIVER |
1759 | P: Pantelis Antoniou | 1766 | P: Pantelis Antoniou |
1760 | M: pantelis.antoniou@gmail.com | 1767 | M: pantelis.antoniou@gmail.com |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 9722f8bb506c..d6ebe39934b5 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -156,7 +156,6 @@ config ARCH_MTD_XIP | |||
156 | bool | 156 | bool |
157 | 157 | ||
158 | config GENERIC_HARDIRQS_NO__DO_IRQ | 158 | config GENERIC_HARDIRQS_NO__DO_IRQ |
159 | bool | ||
160 | def_bool y | 159 | def_bool y |
161 | 160 | ||
162 | if OPROFILE | 161 | if OPROFILE |
@@ -201,6 +200,7 @@ choice | |||
201 | 200 | ||
202 | config ARCH_AAEC2000 | 201 | config ARCH_AAEC2000 |
203 | bool "Agilent AAEC-2000 based" | 202 | bool "Agilent AAEC-2000 based" |
203 | select CPU_ARM920T | ||
204 | select ARM_AMBA | 204 | select ARM_AMBA |
205 | select HAVE_CLK | 205 | select HAVE_CLK |
206 | help | 206 | help |
@@ -210,6 +210,7 @@ config ARCH_INTEGRATOR | |||
210 | bool "ARM Ltd. Integrator family" | 210 | bool "ARM Ltd. Integrator family" |
211 | select ARM_AMBA | 211 | select ARM_AMBA |
212 | select HAVE_CLK | 212 | select HAVE_CLK |
213 | select COMMON_CLKDEV | ||
213 | select ICST525 | 214 | select ICST525 |
214 | help | 215 | help |
215 | Support for ARM's Integrator platform. | 216 | Support for ARM's Integrator platform. |
@@ -218,6 +219,7 @@ config ARCH_REALVIEW | |||
218 | bool "ARM Ltd. RealView family" | 219 | bool "ARM Ltd. RealView family" |
219 | select ARM_AMBA | 220 | select ARM_AMBA |
220 | select HAVE_CLK | 221 | select HAVE_CLK |
222 | select COMMON_CLKDEV | ||
221 | select ICST307 | 223 | select ICST307 |
222 | select GENERIC_TIME | 224 | select GENERIC_TIME |
223 | select GENERIC_CLOCKEVENTS | 225 | select GENERIC_CLOCKEVENTS |
@@ -229,6 +231,7 @@ config ARCH_VERSATILE | |||
229 | select ARM_AMBA | 231 | select ARM_AMBA |
230 | select ARM_VIC | 232 | select ARM_VIC |
231 | select HAVE_CLK | 233 | select HAVE_CLK |
234 | select COMMON_CLKDEV | ||
232 | select ICST307 | 235 | select ICST307 |
233 | select GENERIC_TIME | 236 | select GENERIC_TIME |
234 | select GENERIC_CLOCKEVENTS | 237 | select GENERIC_CLOCKEVENTS |
@@ -243,22 +246,15 @@ config ARCH_AT91 | |||
243 | This enables support for systems based on the Atmel AT91RM9200, | 246 | This enables support for systems based on the Atmel AT91RM9200, |
244 | AT91SAM9 and AT91CAP9 processors. | 247 | AT91SAM9 and AT91CAP9 processors. |
245 | 248 | ||
246 | config ARCH_CLPS7500 | ||
247 | bool "Cirrus CL-PS7500FE" | ||
248 | select TIMER_ACORN | ||
249 | select ISA | ||
250 | select NO_IOPORT | ||
251 | select ARCH_SPARSEMEM_ENABLE | ||
252 | help | ||
253 | Support for the Cirrus Logic PS7500FE system-on-a-chip. | ||
254 | |||
255 | config ARCH_CLPS711X | 249 | config ARCH_CLPS711X |
256 | bool "Cirrus Logic CLPS711x/EP721x-based" | 250 | bool "Cirrus Logic CLPS711x/EP721x-based" |
251 | select CPU_ARM720T | ||
257 | help | 252 | help |
258 | Support for Cirrus Logic 711x/721x based boards. | 253 | Support for Cirrus Logic 711x/721x based boards. |
259 | 254 | ||
260 | config ARCH_EBSA110 | 255 | config ARCH_EBSA110 |
261 | bool "EBSA-110" | 256 | bool "EBSA-110" |
257 | select CPU_SA110 | ||
262 | select ISA | 258 | select ISA |
263 | select NO_IOPORT | 259 | select NO_IOPORT |
264 | help | 260 | help |
@@ -269,16 +265,19 @@ config ARCH_EBSA110 | |||
269 | 265 | ||
270 | config ARCH_EP93XX | 266 | config ARCH_EP93XX |
271 | bool "EP93xx-based" | 267 | bool "EP93xx-based" |
268 | select CPU_ARM920T | ||
272 | select ARM_AMBA | 269 | select ARM_AMBA |
273 | select ARM_VIC | 270 | select ARM_VIC |
274 | select GENERIC_GPIO | 271 | select GENERIC_GPIO |
275 | select HAVE_CLK | 272 | select HAVE_CLK |
273 | select COMMON_CLKDEV | ||
276 | select ARCH_REQUIRE_GPIOLIB | 274 | select ARCH_REQUIRE_GPIOLIB |
277 | help | 275 | help |
278 | This enables support for the Cirrus EP93xx series of CPUs. | 276 | This enables support for the Cirrus EP93xx series of CPUs. |
279 | 277 | ||
280 | config ARCH_FOOTBRIDGE | 278 | config ARCH_FOOTBRIDGE |
281 | bool "FootBridge" | 279 | bool "FootBridge" |
280 | select CPU_SA110 | ||
282 | select FOOTBRIDGE | 281 | select FOOTBRIDGE |
283 | help | 282 | help |
284 | Support for systems based on the DC21285 companion chip | 283 | Support for systems based on the DC21285 companion chip |
@@ -286,18 +285,23 @@ config ARCH_FOOTBRIDGE | |||
286 | 285 | ||
287 | config ARCH_NETX | 286 | config ARCH_NETX |
288 | bool "Hilscher NetX based" | 287 | bool "Hilscher NetX based" |
288 | select CPU_ARM926T | ||
289 | select ARM_VIC | 289 | select ARM_VIC |
290 | select GENERIC_CLOCKEVENTS | ||
291 | select GENERIC_TIME | ||
290 | help | 292 | help |
291 | This enables support for systems based on the Hilscher NetX Soc | 293 | This enables support for systems based on the Hilscher NetX Soc |
292 | 294 | ||
293 | config ARCH_H720X | 295 | config ARCH_H720X |
294 | bool "Hynix HMS720x-based" | 296 | bool "Hynix HMS720x-based" |
297 | select CPU_ARM720T | ||
295 | select ISA_DMA_API | 298 | select ISA_DMA_API |
296 | help | 299 | help |
297 | This enables support for systems based on the Hynix HMS720x | 300 | This enables support for systems based on the Hynix HMS720x |
298 | 301 | ||
299 | config ARCH_IMX | 302 | config ARCH_IMX |
300 | bool "IMX" | 303 | bool "IMX" |
304 | select CPU_ARM920T | ||
301 | select GENERIC_GPIO | 305 | select GENERIC_GPIO |
302 | select GENERIC_TIME | 306 | select GENERIC_TIME |
303 | select GENERIC_CLOCKEVENTS | 307 | select GENERIC_CLOCKEVENTS |
@@ -307,6 +311,7 @@ config ARCH_IMX | |||
307 | config ARCH_IOP13XX | 311 | config ARCH_IOP13XX |
308 | bool "IOP13xx-based" | 312 | bool "IOP13xx-based" |
309 | depends on MMU | 313 | depends on MMU |
314 | select CPU_XSC3 | ||
310 | select PLAT_IOP | 315 | select PLAT_IOP |
311 | select PCI | 316 | select PCI |
312 | select ARCH_SUPPORTS_MSI | 317 | select ARCH_SUPPORTS_MSI |
@@ -317,6 +322,7 @@ config ARCH_IOP13XX | |||
317 | config ARCH_IOP32X | 322 | config ARCH_IOP32X |
318 | bool "IOP32x-based" | 323 | bool "IOP32x-based" |
319 | depends on MMU | 324 | depends on MMU |
325 | select CPU_XSCALE | ||
320 | select PLAT_IOP | 326 | select PLAT_IOP |
321 | select PCI | 327 | select PCI |
322 | select GENERIC_GPIO | 328 | select GENERIC_GPIO |
@@ -328,6 +334,7 @@ config ARCH_IOP32X | |||
328 | config ARCH_IOP33X | 334 | config ARCH_IOP33X |
329 | bool "IOP33x-based" | 335 | bool "IOP33x-based" |
330 | depends on MMU | 336 | depends on MMU |
337 | select CPU_XSCALE | ||
331 | select PLAT_IOP | 338 | select PLAT_IOP |
332 | select PCI | 339 | select PCI |
333 | select GENERIC_GPIO | 340 | select GENERIC_GPIO |
@@ -338,6 +345,7 @@ config ARCH_IOP33X | |||
338 | config ARCH_IXP23XX | 345 | config ARCH_IXP23XX |
339 | bool "IXP23XX-based" | 346 | bool "IXP23XX-based" |
340 | depends on MMU | 347 | depends on MMU |
348 | select CPU_XSC3 | ||
341 | select PCI | 349 | select PCI |
342 | help | 350 | help |
343 | Support for Intel's IXP23xx (XScale) family of processors. | 351 | Support for Intel's IXP23xx (XScale) family of processors. |
@@ -345,6 +353,7 @@ config ARCH_IXP23XX | |||
345 | config ARCH_IXP2000 | 353 | config ARCH_IXP2000 |
346 | bool "IXP2400/2800-based" | 354 | bool "IXP2400/2800-based" |
347 | depends on MMU | 355 | depends on MMU |
356 | select CPU_XSCALE | ||
348 | select PCI | 357 | select PCI |
349 | help | 358 | help |
350 | Support for Intel's IXP2400/2800 (XScale) family of processors. | 359 | Support for Intel's IXP2400/2800 (XScale) family of processors. |
@@ -352,6 +361,7 @@ config ARCH_IXP2000 | |||
352 | config ARCH_IXP4XX | 361 | config ARCH_IXP4XX |
353 | bool "IXP4xx-based" | 362 | bool "IXP4xx-based" |
354 | depends on MMU | 363 | depends on MMU |
364 | select CPU_XSCALE | ||
355 | select GENERIC_GPIO | 365 | select GENERIC_GPIO |
356 | select GENERIC_TIME | 366 | select GENERIC_TIME |
357 | select GENERIC_CLOCKEVENTS | 367 | select GENERIC_CLOCKEVENTS |
@@ -361,6 +371,7 @@ config ARCH_IXP4XX | |||
361 | 371 | ||
362 | config ARCH_L7200 | 372 | config ARCH_L7200 |
363 | bool "LinkUp-L7200" | 373 | bool "LinkUp-L7200" |
374 | select CPU_ARM720T | ||
364 | select FIQ | 375 | select FIQ |
365 | help | 376 | help |
366 | Say Y here if you intend to run this kernel on a LinkUp Systems | 377 | Say Y here if you intend to run this kernel on a LinkUp Systems |
@@ -374,7 +385,9 @@ config ARCH_L7200 | |||
374 | 385 | ||
375 | config ARCH_KIRKWOOD | 386 | config ARCH_KIRKWOOD |
376 | bool "Marvell Kirkwood" | 387 | bool "Marvell Kirkwood" |
388 | select CPU_FEROCEON | ||
377 | select PCI | 389 | select PCI |
390 | select GENERIC_GPIO | ||
378 | select GENERIC_TIME | 391 | select GENERIC_TIME |
379 | select GENERIC_CLOCKEVENTS | 392 | select GENERIC_CLOCKEVENTS |
380 | select PLAT_ORION | 393 | select PLAT_ORION |
@@ -384,13 +397,16 @@ config ARCH_KIRKWOOD | |||
384 | 397 | ||
385 | config ARCH_KS8695 | 398 | config ARCH_KS8695 |
386 | bool "Micrel/Kendin KS8695" | 399 | bool "Micrel/Kendin KS8695" |
400 | select CPU_ARM922T | ||
387 | select GENERIC_GPIO | 401 | select GENERIC_GPIO |
402 | select ARCH_REQUIRE_GPIOLIB | ||
388 | help | 403 | help |
389 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based | 404 | Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based |
390 | System-on-Chip devices. | 405 | System-on-Chip devices. |
391 | 406 | ||
392 | config ARCH_NS9XXX | 407 | config ARCH_NS9XXX |
393 | bool "NetSilicon NS9xxx" | 408 | bool "NetSilicon NS9xxx" |
409 | select CPU_ARM926T | ||
394 | select GENERIC_GPIO | 410 | select GENERIC_GPIO |
395 | select GENERIC_TIME | 411 | select GENERIC_TIME |
396 | select GENERIC_CLOCKEVENTS | 412 | select GENERIC_CLOCKEVENTS |
@@ -403,6 +419,7 @@ config ARCH_NS9XXX | |||
403 | 419 | ||
404 | config ARCH_LOKI | 420 | config ARCH_LOKI |
405 | bool "Marvell Loki (88RC8480)" | 421 | bool "Marvell Loki (88RC8480)" |
422 | select CPU_FEROCEON | ||
406 | select GENERIC_TIME | 423 | select GENERIC_TIME |
407 | select GENERIC_CLOCKEVENTS | 424 | select GENERIC_CLOCKEVENTS |
408 | select PLAT_ORION | 425 | select PLAT_ORION |
@@ -411,7 +428,9 @@ config ARCH_LOKI | |||
411 | 428 | ||
412 | config ARCH_MV78XX0 | 429 | config ARCH_MV78XX0 |
413 | bool "Marvell MV78xx0" | 430 | bool "Marvell MV78xx0" |
431 | select CPU_FEROCEON | ||
414 | select PCI | 432 | select PCI |
433 | select GENERIC_GPIO | ||
415 | select GENERIC_TIME | 434 | select GENERIC_TIME |
416 | select GENERIC_CLOCKEVENTS | 435 | select GENERIC_CLOCKEVENTS |
417 | select PLAT_ORION | 436 | select PLAT_ORION |
@@ -432,6 +451,7 @@ config ARCH_MXC | |||
432 | config ARCH_ORION5X | 451 | config ARCH_ORION5X |
433 | bool "Marvell Orion" | 452 | bool "Marvell Orion" |
434 | depends on MMU | 453 | depends on MMU |
454 | select CPU_FEROCEON | ||
435 | select PCI | 455 | select PCI |
436 | select GENERIC_GPIO | 456 | select GENERIC_GPIO |
437 | select GENERIC_TIME | 457 | select GENERIC_TIME |
@@ -444,6 +464,7 @@ config ARCH_ORION5X | |||
444 | 464 | ||
445 | config ARCH_PNX4008 | 465 | config ARCH_PNX4008 |
446 | bool "Philips Nexperia PNX4008 Mobile" | 466 | bool "Philips Nexperia PNX4008 Mobile" |
467 | select CPU_ARM926T | ||
447 | select HAVE_CLK | 468 | select HAVE_CLK |
448 | help | 469 | help |
449 | This enables support for Philips PNX4008 mobile platform. | 470 | This enables support for Philips PNX4008 mobile platform. |
@@ -454,6 +475,7 @@ config ARCH_PXA | |||
454 | select ARCH_MTD_XIP | 475 | select ARCH_MTD_XIP |
455 | select GENERIC_GPIO | 476 | select GENERIC_GPIO |
456 | select HAVE_CLK | 477 | select HAVE_CLK |
478 | select COMMON_CLKDEV | ||
457 | select ARCH_REQUIRE_GPIOLIB | 479 | select ARCH_REQUIRE_GPIOLIB |
458 | select GENERIC_TIME | 480 | select GENERIC_TIME |
459 | select GENERIC_CLOCKEVENTS | 481 | select GENERIC_CLOCKEVENTS |
@@ -477,6 +499,7 @@ config ARCH_RPC | |||
477 | 499 | ||
478 | config ARCH_SA1100 | 500 | config ARCH_SA1100 |
479 | bool "SA1100-based" | 501 | bool "SA1100-based" |
502 | select CPU_SA1100 | ||
480 | select ISA | 503 | select ISA |
481 | select ARCH_SPARSEMEM_ENABLE | 504 | select ARCH_SPARSEMEM_ENABLE |
482 | select ARCH_MTD_XIP | 505 | select ARCH_MTD_XIP |
@@ -498,8 +521,16 @@ config ARCH_S3C2410 | |||
498 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or | 521 | BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or |
499 | the Samsung SMDK2410 development board (and derivatives). | 522 | the Samsung SMDK2410 development board (and derivatives). |
500 | 523 | ||
524 | config ARCH_S3C64XX | ||
525 | bool "Samsung S3C64XX" | ||
526 | select GENERIC_GPIO | ||
527 | select HAVE_CLK | ||
528 | help | ||
529 | Samsung S3C64XX series based systems | ||
530 | |||
501 | config ARCH_SHARK | 531 | config ARCH_SHARK |
502 | bool "Shark" | 532 | bool "Shark" |
533 | select CPU_SA110 | ||
503 | select ISA | 534 | select ISA |
504 | select ISA_DMA | 535 | select ISA_DMA |
505 | select ZONE_DMA | 536 | select ZONE_DMA |
@@ -510,6 +541,7 @@ config ARCH_SHARK | |||
510 | 541 | ||
511 | config ARCH_LH7A40X | 542 | config ARCH_LH7A40X |
512 | bool "Sharp LH7A40X" | 543 | bool "Sharp LH7A40X" |
544 | select CPU_ARM922T | ||
513 | select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM | 545 | select ARCH_DISCONTIGMEM_ENABLE if !LH7A40X_CONTIGMEM |
514 | select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM | 546 | select ARCH_SPARSEMEM_ENABLE if !LH7A40X_CONTIGMEM |
515 | help | 547 | help |
@@ -520,6 +552,7 @@ config ARCH_LH7A40X | |||
520 | 552 | ||
521 | config ARCH_DAVINCI | 553 | config ARCH_DAVINCI |
522 | bool "TI DaVinci" | 554 | bool "TI DaVinci" |
555 | select CPU_ARM926T | ||
523 | select GENERIC_TIME | 556 | select GENERIC_TIME |
524 | select GENERIC_CLOCKEVENTS | 557 | select GENERIC_CLOCKEVENTS |
525 | select GENERIC_GPIO | 558 | select GENERIC_GPIO |
@@ -541,6 +574,7 @@ config ARCH_OMAP | |||
541 | 574 | ||
542 | config ARCH_MSM | 575 | config ARCH_MSM |
543 | bool "Qualcomm MSM" | 576 | bool "Qualcomm MSM" |
577 | select CPU_V6 | ||
544 | select GENERIC_TIME | 578 | select GENERIC_TIME |
545 | select GENERIC_CLOCKEVENTS | 579 | select GENERIC_CLOCKEVENTS |
546 | help | 580 | help |
@@ -549,6 +583,13 @@ config ARCH_MSM | |||
549 | interface to the ARM9 modem processor which runs the baseband stack | 583 | interface to the ARM9 modem processor which runs the baseband stack |
550 | and controls some vital subsystems (clock and power control, etc). | 584 | and controls some vital subsystems (clock and power control, etc). |
551 | 585 | ||
586 | config ARCH_W90X900 | ||
587 | bool "Nuvoton W90X900 CPU" | ||
588 | select CPU_ARM926T | ||
589 | help | ||
590 | Support for Nuvoton (Winbond logic dept.) ARM9 processor,You | ||
591 | can login www.mcuos.com or www.nuvoton.com to know more. | ||
592 | |||
552 | endchoice | 593 | endchoice |
553 | 594 | ||
554 | source "arch/arm/mach-clps711x/Kconfig" | 595 | source "arch/arm/mach-clps711x/Kconfig" |
@@ -590,6 +631,7 @@ source "arch/arm/mach-orion5x/Kconfig" | |||
590 | source "arch/arm/mach-kirkwood/Kconfig" | 631 | source "arch/arm/mach-kirkwood/Kconfig" |
591 | 632 | ||
592 | source "arch/arm/plat-s3c24xx/Kconfig" | 633 | source "arch/arm/plat-s3c24xx/Kconfig" |
634 | source "arch/arm/plat-s3c64xx/Kconfig" | ||
593 | source "arch/arm/plat-s3c/Kconfig" | 635 | source "arch/arm/plat-s3c/Kconfig" |
594 | 636 | ||
595 | if ARCH_S3C2410 | 637 | if ARCH_S3C2410 |
@@ -601,6 +643,11 @@ source "arch/arm/mach-s3c2442/Kconfig" | |||
601 | source "arch/arm/mach-s3c2443/Kconfig" | 643 | source "arch/arm/mach-s3c2443/Kconfig" |
602 | endif | 644 | endif |
603 | 645 | ||
646 | if ARCH_S3C64XX | ||
647 | source "arch/arm/mach-s3c6400/Kconfig" | ||
648 | source "arch/arm/mach-s3c6410/Kconfig" | ||
649 | endif | ||
650 | |||
604 | source "arch/arm/mach-lh7a40x/Kconfig" | 651 | source "arch/arm/mach-lh7a40x/Kconfig" |
605 | 652 | ||
606 | source "arch/arm/mach-imx/Kconfig" | 653 | source "arch/arm/mach-imx/Kconfig" |
@@ -627,6 +674,8 @@ source "arch/arm/mach-ks8695/Kconfig" | |||
627 | 674 | ||
628 | source "arch/arm/mach-msm/Kconfig" | 675 | source "arch/arm/mach-msm/Kconfig" |
629 | 676 | ||
677 | source "arch/arm/mach-w90x900/Kconfig" | ||
678 | |||
630 | # Definitions to make life easier | 679 | # Definitions to make life easier |
631 | config ARCH_ACORN | 680 | config ARCH_ACORN |
632 | bool | 681 | bool |
@@ -781,7 +830,7 @@ config HOTPLUG_CPU | |||
781 | 830 | ||
782 | config LOCAL_TIMERS | 831 | config LOCAL_TIMERS |
783 | bool "Use local timer interrupts" | 832 | bool "Use local timer interrupts" |
784 | depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP) | 833 | depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || REALVIEW_EB_A9MP) |
785 | default y | 834 | default y |
786 | help | 835 | help |
787 | Enable support for local timers on SMP platforms, rather then the | 836 | Enable support for local timers on SMP platforms, rather then the |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index bd6e28115ebb..24e0f0187697 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -76,6 +76,7 @@ tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 | |||
76 | tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 | 76 | tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 |
77 | tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale | 77 | tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale |
78 | tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale | 78 | tune-$(CONFIG_CPU_XSC3) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale |
79 | tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) | ||
79 | tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) | 80 | tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) |
80 | 81 | ||
81 | ifeq ($(CONFIG_AEABI),y) | 82 | ifeq ($(CONFIG_AEABI),y) |
@@ -96,7 +97,6 @@ textofs-y := 0x00008000 | |||
96 | 97 | ||
97 | machine-$(CONFIG_ARCH_RPC) := rpc | 98 | machine-$(CONFIG_ARCH_RPC) := rpc |
98 | machine-$(CONFIG_ARCH_EBSA110) := ebsa110 | 99 | machine-$(CONFIG_ARCH_EBSA110) := ebsa110 |
99 | machine-$(CONFIG_ARCH_CLPS7500) := clps7500 | ||
100 | machine-$(CONFIG_FOOTBRIDGE) := footbridge | 100 | machine-$(CONFIG_FOOTBRIDGE) := footbridge |
101 | machine-$(CONFIG_ARCH_SHARK) := shark | 101 | machine-$(CONFIG_ARCH_SHARK) := shark |
102 | machine-$(CONFIG_ARCH_SA1100) := sa1100 | 102 | machine-$(CONFIG_ARCH_SA1100) := sa1100 |
@@ -121,7 +121,10 @@ endif | |||
121 | machine-$(CONFIG_ARCH_OMAP3) := omap2 | 121 | machine-$(CONFIG_ARCH_OMAP3) := omap2 |
122 | plat-$(CONFIG_ARCH_OMAP) := omap | 122 | plat-$(CONFIG_ARCH_OMAP) := omap |
123 | machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2440 s3c2442 s3c2443 | 123 | machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2400 s3c2412 s3c2440 s3c2442 s3c2443 |
124 | machine-$(CONFIG_ARCH_S3C24A0) := s3c24a0 | ||
124 | plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx s3c | 125 | plat-$(CONFIG_PLAT_S3C24XX) := s3c24xx s3c |
126 | machine-$(CONFIG_ARCH_S3C64XX) := s3c6400 s3c6410 | ||
127 | plat-$(CONFIG_PLAT_S3C64XX) := s3c64xx s3c | ||
125 | machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x | 128 | machine-$(CONFIG_ARCH_LH7A40X) := lh7a40x |
126 | machine-$(CONFIG_ARCH_VERSATILE) := versatile | 129 | machine-$(CONFIG_ARCH_VERSATILE) := versatile |
127 | machine-$(CONFIG_ARCH_IMX) := imx | 130 | machine-$(CONFIG_ARCH_IMX) := imx |
@@ -139,11 +142,13 @@ endif | |||
139 | plat-$(CONFIG_ARCH_MXC) := mxc | 142 | plat-$(CONFIG_ARCH_MXC) := mxc |
140 | machine-$(CONFIG_ARCH_MX2) := mx2 | 143 | machine-$(CONFIG_ARCH_MX2) := mx2 |
141 | machine-$(CONFIG_ARCH_MX3) := mx3 | 144 | machine-$(CONFIG_ARCH_MX3) := mx3 |
145 | machine-$(CONFIG_ARCH_MX1) := mx1 | ||
142 | machine-$(CONFIG_ARCH_ORION5X) := orion5x | 146 | machine-$(CONFIG_ARCH_ORION5X) := orion5x |
143 | plat-$(CONFIG_PLAT_ORION) := orion | 147 | plat-$(CONFIG_PLAT_ORION) := orion |
144 | machine-$(CONFIG_ARCH_MSM) := msm | 148 | machine-$(CONFIG_ARCH_MSM) := msm |
145 | machine-$(CONFIG_ARCH_LOKI) := loki | 149 | machine-$(CONFIG_ARCH_LOKI) := loki |
146 | machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 | 150 | machine-$(CONFIG_ARCH_MV78XX0) := mv78xx0 |
151 | machine-$(CONFIG_ARCH_W90X900) := w90x900 | ||
147 | 152 | ||
148 | ifeq ($(CONFIG_ARCH_EBSA110),y) | 153 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
149 | # This is what happens if you forget the IOCS16 line. | 154 | # This is what happens if you forget the IOCS16 line. |
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index c47f2a3f8f8f..fbe5eef1f6c9 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -23,10 +23,6 @@ ifeq ($(CONFIG_ARCH_L7200),y) | |||
23 | OBJS += head-l7200.o | 23 | OBJS += head-l7200.o |
24 | endif | 24 | endif |
25 | 25 | ||
26 | ifeq ($(CONFIG_ARCH_CLPS7500),y) | ||
27 | HEAD = head-clps7500.o | ||
28 | endif | ||
29 | |||
30 | ifeq ($(CONFIG_ARCH_P720T),y) | 26 | ifeq ($(CONFIG_ARCH_P720T),y) |
31 | # Borrow this code from SA1100 | 27 | # Borrow this code from SA1100 |
32 | OBJS += head-sa1100.o | 28 | OBJS += head-sa1100.o |
diff --git a/arch/arm/boot/compressed/head-clps7500.S b/arch/arm/boot/compressed/head-clps7500.S deleted file mode 100644 index 4f3c78ac30a0..000000000000 --- a/arch/arm/boot/compressed/head-clps7500.S +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/boot/compressed/head-clps7500.S | ||
3 | * | ||
4 | * Copyright (C) 1999, 2000, 2001 Nexus Electronics Ltd | ||
5 | */ | ||
6 | |||
7 | |||
8 | /* There are three different ways the kernel can be | ||
9 | booted on a 7500 system: from Angel (loaded in RAM), from | ||
10 | 16-bit ROM or from 32-bit Flash. Luckily, a single kernel | ||
11 | image does for them all. */ | ||
12 | /* This branch is taken if the CPU memory width matches the | ||
13 | actual device in use. The default at power on is 16 bits | ||
14 | so we must be prepared for a mismatch. */ | ||
15 | .section ".start", "ax" | ||
16 | 2: | ||
17 | b 1f | ||
18 | .word 0xffff | ||
19 | .word 0xb632 @ mov r11, #0x03200000 | ||
20 | .word 0xe3a0 | ||
21 | .word 0x0000 @ mov r0, #0 | ||
22 | .word 0xe3a0 | ||
23 | .word 0x0080 @ strb r0, [r11, #0x80] | ||
24 | .word 0xe5cb | ||
25 | .word 0xf000 @ mov pc, #0 | ||
26 | .word 0xe3a0 | ||
27 | 1: | ||
28 | adr r1, 2b | ||
29 | teq r1, #0 | ||
30 | bne .Langel | ||
31 | /* This is a direct-from-ROM boot. Copy the kernel into | ||
32 | RAM and run it there. */ | ||
33 | mov r0, #0x30 | ||
34 | mcr p15, 0, r0, c1, c0, 0 | ||
35 | mov r0, #0x13 | ||
36 | msr cpsr_cxsf, r0 | ||
37 | mov r12, #0x03000000 @ point to LEDs | ||
38 | orr r12, r12, #0x00020000 | ||
39 | orr r12, r12, #0xba00 | ||
40 | mov r0, #0x5500 | ||
41 | str r0, [r12] | ||
42 | mov r0, #0x10000000 | ||
43 | orr r0, r0, #0x8000 | ||
44 | mov r4, r0 | ||
45 | ldr r2, =_end | ||
46 | 2: | ||
47 | ldr r3, [r1], #4 | ||
48 | str r3, [r0], #4 | ||
49 | teq r0, r2 | ||
50 | bne 2b | ||
51 | mov r0, #0xff00 | ||
52 | str r0, [r12] | ||
53 | 1: | ||
54 | mov r12, #0x03000000 @ point to LEDs | ||
55 | orr r12, r12, #0x00020000 | ||
56 | orr r12, r12, #0xba00 | ||
57 | mov r0, #0xfe00 | ||
58 | str r0, [r12] | ||
59 | |||
60 | adr lr, 1f | ||
61 | mov r0, #0 | ||
62 | mov r1, #14 /* MACH_TYPE_CLPS7500 */ | ||
63 | mov pc, lr | ||
64 | .Langel: | ||
65 | #ifdef CONFIG_ANGELBOOT | ||
66 | /* Call Angel to switch into SVC mode. */ | ||
67 | mov r0, #0x17 | ||
68 | swi 0x123456 | ||
69 | #endif | ||
70 | /* Ensure all interrupts are off and MMU disabled */ | ||
71 | mrs r0, cpsr | ||
72 | orr r0, r0, #0xc0 | ||
73 | msr cpsr_cxsf, r0 | ||
74 | |||
75 | adr lr, 1b | ||
76 | orr lr, lr, #0x10000000 | ||
77 | mov r0, #0x30 @ MMU off | ||
78 | mcr p15, 0, r0, c1, c0, 0 | ||
79 | mov r0, r0 | ||
80 | mov pc, lr | ||
81 | |||
82 | .ltorg | ||
83 | |||
84 | 1: | ||
85 | /* And the rest */ | ||
86 | #include "head.S" | ||
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 84a1e0496a3c..77d614232d81 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -624,6 +624,12 @@ proc_types: | |||
624 | b __armv4_mmu_cache_off | 624 | b __armv4_mmu_cache_off |
625 | b __armv4_mmu_cache_flush | 625 | b __armv4_mmu_cache_flush |
626 | 626 | ||
627 | .word 0x56056930 | ||
628 | .word 0xff0ffff0 @ PXA935 | ||
629 | b __armv4_mmu_cache_on | ||
630 | b __armv4_mmu_cache_off | ||
631 | b __armv4_mmu_cache_flush | ||
632 | |||
627 | .word 0x56050000 @ Feroceon | 633 | .word 0x56050000 @ Feroceon |
628 | .word 0xff0f0000 | 634 | .word 0xff0f0000 |
629 | b __armv4_mmu_cache_on | 635 | b __armv4_mmu_cache_on |
@@ -717,6 +723,9 @@ __armv7_mmu_cache_off: | |||
717 | bl __armv7_mmu_cache_flush | 723 | bl __armv7_mmu_cache_flush |
718 | mov r0, #0 | 724 | mov r0, #0 |
719 | mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB | 725 | mcr p15, 0, r0, c8, c7, 0 @ invalidate whole TLB |
726 | mcr p15, 0, r0, c7, c5, 6 @ invalidate BTC | ||
727 | mcr p15, 0, r0, c7, c10, 4 @ DSB | ||
728 | mcr p15, 0, r0, c7, c5, 4 @ ISB | ||
720 | mov pc, r12 | 729 | mov pc, r12 |
721 | 730 | ||
722 | __arm6_mmu_cache_off: | 731 | __arm6_mmu_cache_off: |
@@ -778,12 +787,13 @@ __armv6_mmu_cache_flush: | |||
778 | __armv7_mmu_cache_flush: | 787 | __armv7_mmu_cache_flush: |
779 | mrc p15, 0, r10, c0, c1, 5 @ read ID_MMFR1 | 788 | mrc p15, 0, r10, c0, c1, 5 @ read ID_MMFR1 |
780 | tst r10, #0xf << 16 @ hierarchical cache (ARMv7) | 789 | tst r10, #0xf << 16 @ hierarchical cache (ARMv7) |
781 | beq hierarchical | ||
782 | mov r10, #0 | 790 | mov r10, #0 |
791 | beq hierarchical | ||
783 | mcr p15, 0, r10, c7, c14, 0 @ clean+invalidate D | 792 | mcr p15, 0, r10, c7, c14, 0 @ clean+invalidate D |
784 | b iflush | 793 | b iflush |
785 | hierarchical: | 794 | hierarchical: |
786 | stmfd sp!, {r0-r5, r7, r9-r11} | 795 | mcr p15, 0, r10, c7, c10, 5 @ DMB |
796 | stmfd sp!, {r0-r5, r7, r9, r11} | ||
787 | mrc p15, 1, r0, c0, c0, 1 @ read clidr | 797 | mrc p15, 1, r0, c0, c0, 1 @ read clidr |
788 | ands r3, r0, #0x7000000 @ extract loc from clidr | 798 | ands r3, r0, #0x7000000 @ extract loc from clidr |
789 | mov r3, r3, lsr #23 @ left align loc bit field | 799 | mov r3, r3, lsr #23 @ left align loc bit field |
@@ -820,12 +830,14 @@ skip: | |||
820 | cmp r3, r10 | 830 | cmp r3, r10 |
821 | bgt loop1 | 831 | bgt loop1 |
822 | finished: | 832 | finished: |
833 | ldmfd sp!, {r0-r5, r7, r9, r11} | ||
823 | mov r10, #0 @ swith back to cache level 0 | 834 | mov r10, #0 @ swith back to cache level 0 |
824 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | 835 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr |
825 | ldmfd sp!, {r0-r5, r7, r9-r11} | ||
826 | iflush: | 836 | iflush: |
837 | mcr p15, 0, r10, c7, c10, 4 @ DSB | ||
827 | mcr p15, 0, r10, c7, c5, 0 @ invalidate I+BTB | 838 | mcr p15, 0, r10, c7, c5, 0 @ invalidate I+BTB |
828 | mcr p15, 0, r10, c7, c10, 4 @ drain WB | 839 | mcr p15, 0, r10, c7, c10, 4 @ DSB |
840 | mcr p15, 0, r10, c7, c5, 4 @ ISB | ||
829 | mov pc, lr | 841 | mov pc, lr |
830 | 842 | ||
831 | __armv5tej_mmu_cache_flush: | 843 | __armv5tej_mmu_cache_flush: |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 65ce8fff29db..3fc08413fff0 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -86,6 +86,8 @@ static void putstr(const char *ptr) | |||
86 | 86 | ||
87 | #define __ptr_t void * | 87 | #define __ptr_t void * |
88 | 88 | ||
89 | #define memzero(s,n) __memzero(s,n) | ||
90 | |||
89 | /* | 91 | /* |
90 | * Optimised C version of memzero for the ARM. | 92 | * Optimised C version of memzero for the ARM. |
91 | */ | 93 | */ |
diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig index 86b5e6982660..a2cd9beaf37d 100644 --- a/arch/arm/common/Kconfig +++ b/arch/arm/common/Kconfig | |||
@@ -33,3 +33,6 @@ config SHARPSL_PM | |||
33 | 33 | ||
34 | config SHARP_SCOOP | 34 | config SHARP_SCOOP |
35 | bool | 35 | bool |
36 | |||
37 | config COMMON_CLKDEV | ||
38 | bool | ||
diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile index 325e4b6a6afb..7cb7961d81cb 100644 --- a/arch/arm/common/Makefile +++ b/arch/arm/common/Makefile | |||
@@ -17,3 +17,4 @@ obj-$(CONFIG_SHARP_SCOOP) += scoop.o | |||
17 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o | 17 | obj-$(CONFIG_ARCH_IXP2000) += uengine.o |
18 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o | 18 | obj-$(CONFIG_ARCH_IXP23XX) += uengine.o |
19 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o | 19 | obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o |
20 | obj-$(CONFIG_COMMON_CLKDEV) += clkdev.o | ||
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c new file mode 100644 index 000000000000..17a17b49a45b --- /dev/null +++ b/arch/arm/common/clkdev.c | |||
@@ -0,0 +1,128 @@ | |||
1 | /* | ||
2 | * arch/arm/common/clkdev.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Russell King. | ||
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 | * Helper for the clk API to assist looking up a struct clk. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/device.h> | ||
15 | #include <linux/list.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/mutex.h> | ||
20 | |||
21 | #include <asm/clkdev.h> | ||
22 | #include <mach/clkdev.h> | ||
23 | |||
24 | static LIST_HEAD(clocks); | ||
25 | static DEFINE_MUTEX(clocks_mutex); | ||
26 | |||
27 | static struct clk *clk_find(const char *dev_id, const char *con_id) | ||
28 | { | ||
29 | struct clk_lookup *p; | ||
30 | struct clk *clk = NULL; | ||
31 | int match, best = 0; | ||
32 | |||
33 | list_for_each_entry(p, &clocks, node) { | ||
34 | if ((p->dev_id && !dev_id) || (p->con_id && !con_id)) | ||
35 | continue; | ||
36 | match = 0; | ||
37 | if (p->dev_id) | ||
38 | match += 2 * (strcmp(p->dev_id, dev_id) == 0); | ||
39 | if (p->con_id) | ||
40 | match += 1 * (strcmp(p->con_id, con_id) == 0); | ||
41 | if (match == 0) | ||
42 | continue; | ||
43 | |||
44 | if (match > best) { | ||
45 | clk = p->clk; | ||
46 | best = match; | ||
47 | } | ||
48 | } | ||
49 | return clk; | ||
50 | } | ||
51 | |||
52 | struct clk *clk_get(struct device *dev, const char *con_id) | ||
53 | { | ||
54 | const char *dev_id = dev ? dev_name(dev) : NULL; | ||
55 | struct clk *clk; | ||
56 | |||
57 | mutex_lock(&clocks_mutex); | ||
58 | clk = clk_find(dev_id, con_id); | ||
59 | if (clk && !__clk_get(clk)) | ||
60 | clk = NULL; | ||
61 | mutex_unlock(&clocks_mutex); | ||
62 | |||
63 | return clk ? clk : ERR_PTR(-ENOENT); | ||
64 | } | ||
65 | EXPORT_SYMBOL(clk_get); | ||
66 | |||
67 | void clk_put(struct clk *clk) | ||
68 | { | ||
69 | __clk_put(clk); | ||
70 | } | ||
71 | EXPORT_SYMBOL(clk_put); | ||
72 | |||
73 | void clkdev_add(struct clk_lookup *cl) | ||
74 | { | ||
75 | mutex_lock(&clocks_mutex); | ||
76 | list_add_tail(&cl->node, &clocks); | ||
77 | mutex_unlock(&clocks_mutex); | ||
78 | } | ||
79 | EXPORT_SYMBOL(clkdev_add); | ||
80 | |||
81 | #define MAX_DEV_ID 20 | ||
82 | #define MAX_CON_ID 16 | ||
83 | |||
84 | struct clk_lookup_alloc { | ||
85 | struct clk_lookup cl; | ||
86 | char dev_id[MAX_DEV_ID]; | ||
87 | char con_id[MAX_CON_ID]; | ||
88 | }; | ||
89 | |||
90 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | ||
91 | const char *dev_fmt, ...) | ||
92 | { | ||
93 | struct clk_lookup_alloc *cla; | ||
94 | |||
95 | cla = kzalloc(sizeof(*cla), GFP_KERNEL); | ||
96 | if (!cla) | ||
97 | return NULL; | ||
98 | |||
99 | cla->cl.clk = clk; | ||
100 | if (con_id) { | ||
101 | strlcpy(cla->con_id, con_id, sizeof(cla->con_id)); | ||
102 | cla->cl.con_id = cla->con_id; | ||
103 | } | ||
104 | |||
105 | if (dev_fmt) { | ||
106 | va_list ap; | ||
107 | |||
108 | va_start(ap, dev_fmt); | ||
109 | vscnprintf(cla->dev_id, sizeof(cla->dev_id), dev_fmt, ap); | ||
110 | cla->cl.dev_id = cla->dev_id; | ||
111 | va_end(ap); | ||
112 | } | ||
113 | |||
114 | return &cla->cl; | ||
115 | } | ||
116 | EXPORT_SYMBOL(clkdev_alloc); | ||
117 | |||
118 | /* | ||
119 | * clkdev_drop - remove a clock dynamically allocated | ||
120 | */ | ||
121 | void clkdev_drop(struct clk_lookup *cl) | ||
122 | { | ||
123 | mutex_lock(&clocks_mutex); | ||
124 | list_del(&cl->node); | ||
125 | mutex_unlock(&clocks_mutex); | ||
126 | kfree(cl); | ||
127 | } | ||
128 | EXPORT_SYMBOL(clkdev_drop); | ||
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 7c6b4b99a2df..2293f0ce061e 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -1108,6 +1108,7 @@ void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf) | |||
1108 | locomo_writel(bpwf | LOCOMO_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); | 1108 | locomo_writel(bpwf | LOCOMO_ALC_EN, lchip->base + LOCOMO_FRONTLIGHT + LOCOMO_ALS); |
1109 | spin_unlock_irqrestore(&lchip->lock, flags); | 1109 | spin_unlock_irqrestore(&lchip->lock, flags); |
1110 | } | 1110 | } |
1111 | EXPORT_SYMBOL(locomo_frontlight_set); | ||
1111 | 1112 | ||
1112 | /* | 1113 | /* |
1113 | * LoCoMo "Register Access Bus." | 1114 | * LoCoMo "Register Access Bus." |
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c index f1e4b8f60cab..ecf0bfbab107 100644 --- a/arch/arm/common/vic.c +++ b/arch/arm/common/vic.c | |||
@@ -69,12 +69,12 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
69 | /* | 69 | /* |
70 | * Make sure we clear all existing interrupts | 70 | * Make sure we clear all existing interrupts |
71 | */ | 71 | */ |
72 | writel(0, base + VIC_VECT_ADDR); | 72 | writel(0, base + VIC_PL190_VECT_ADDR); |
73 | for (i = 0; i < 19; i++) { | 73 | for (i = 0; i < 19; i++) { |
74 | unsigned int value; | 74 | unsigned int value; |
75 | 75 | ||
76 | value = readl(base + VIC_VECT_ADDR); | 76 | value = readl(base + VIC_PL190_VECT_ADDR); |
77 | writel(value, base + VIC_VECT_ADDR); | 77 | writel(value, base + VIC_PL190_VECT_ADDR); |
78 | } | 78 | } |
79 | 79 | ||
80 | for (i = 0; i < 16; i++) { | 80 | for (i = 0; i < 16; i++) { |
@@ -82,7 +82,7 @@ void __init vic_init(void __iomem *base, unsigned int irq_start, | |||
82 | writel(VIC_VECT_CNTL_ENABLE | i, reg); | 82 | writel(VIC_VECT_CNTL_ENABLE | i, reg); |
83 | } | 83 | } |
84 | 84 | ||
85 | writel(32, base + VIC_DEF_VECT_ADDR); | 85 | writel(32, base + VIC_PL190_DEF_VECT_ADDR); |
86 | 86 | ||
87 | for (i = 0; i < 32; i++) { | 87 | for (i = 0; i < 32; i++) { |
88 | unsigned int irq = irq_start + i; | 88 | unsigned int irq = irq_start + i; |
diff --git a/arch/arm/configs/eseries_pxa_defconfig b/arch/arm/configs/eseries_pxa_defconfig index 2307587a38a9..b6c5cbbf4c85 100644 --- a/arch/arm/configs/eseries_pxa_defconfig +++ b/arch/arm/configs/eseries_pxa_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26 | 3 | # Linux kernel version: 2.6.28-rc8 |
4 | # Sat Jul 26 22:28:46 2008 | 4 | # Wed Dec 24 23:35:45 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
@@ -22,8 +22,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
23 | CONFIG_GENERIC_HWEIGHT=y | 23 | CONFIG_GENERIC_HWEIGHT=y |
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 24 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
25 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
26 | CONFIG_ZONE_DMA=y | ||
27 | CONFIG_ARCH_MTD_XIP=y | 25 | CONFIG_ARCH_MTD_XIP=y |
28 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 26 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
29 | CONFIG_VECTORS_BASE=0xffff0000 | 27 | CONFIG_VECTORS_BASE=0xffff0000 |
@@ -48,8 +46,7 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
48 | CONFIG_LOG_BUF_SHIFT=14 | 46 | CONFIG_LOG_BUF_SHIFT=14 |
49 | # CONFIG_CGROUPS is not set | 47 | # CONFIG_CGROUPS is not set |
50 | # CONFIG_GROUP_SCHED is not set | 48 | # CONFIG_GROUP_SCHED is not set |
51 | CONFIG_SYSFS_DEPRECATED=y | 49 | # CONFIG_SYSFS_DEPRECATED_V2 is not set |
52 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
53 | # CONFIG_RELAY is not set | 50 | # CONFIG_RELAY is not set |
54 | # CONFIG_NAMESPACES is not set | 51 | # CONFIG_NAMESPACES is not set |
55 | # CONFIG_BLK_DEV_INITRD is not set | 52 | # CONFIG_BLK_DEV_INITRD is not set |
@@ -58,13 +55,12 @@ CONFIG_SYSCTL=y | |||
58 | CONFIG_EMBEDDED=y | 55 | CONFIG_EMBEDDED=y |
59 | CONFIG_UID16=y | 56 | CONFIG_UID16=y |
60 | CONFIG_SYSCTL_SYSCALL=y | 57 | CONFIG_SYSCTL_SYSCALL=y |
61 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
62 | # CONFIG_KALLSYMS is not set | 58 | # CONFIG_KALLSYMS is not set |
63 | CONFIG_HOTPLUG=y | 59 | CONFIG_HOTPLUG=y |
64 | CONFIG_PRINTK=y | 60 | CONFIG_PRINTK=y |
65 | CONFIG_BUG=y | 61 | CONFIG_BUG=y |
66 | CONFIG_ELF_CORE=y | 62 | CONFIG_ELF_CORE=y |
67 | CONFIG_COMPAT_BRK=y | 63 | # CONFIG_COMPAT_BRK is not set |
68 | CONFIG_BASE_FULL=y | 64 | CONFIG_BASE_FULL=y |
69 | CONFIG_FUTEX=y | 65 | CONFIG_FUTEX=y |
70 | CONFIG_ANON_INODES=y | 66 | CONFIG_ANON_INODES=y |
@@ -73,6 +69,7 @@ CONFIG_SIGNALFD=y | |||
73 | CONFIG_TIMERFD=y | 69 | CONFIG_TIMERFD=y |
74 | CONFIG_EVENTFD=y | 70 | CONFIG_EVENTFD=y |
75 | CONFIG_SHMEM=y | 71 | CONFIG_SHMEM=y |
72 | CONFIG_AIO=y | ||
76 | CONFIG_VM_EVENT_COUNTERS=y | 73 | CONFIG_VM_EVENT_COUNTERS=y |
77 | CONFIG_SLAB=y | 74 | CONFIG_SLAB=y |
78 | # CONFIG_SLUB is not set | 75 | # CONFIG_SLUB is not set |
@@ -80,15 +77,10 @@ CONFIG_SLAB=y | |||
80 | # CONFIG_PROFILING is not set | 77 | # CONFIG_PROFILING is not set |
81 | # CONFIG_MARKERS is not set | 78 | # CONFIG_MARKERS is not set |
82 | CONFIG_HAVE_OPROFILE=y | 79 | CONFIG_HAVE_OPROFILE=y |
83 | # CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set | ||
84 | # CONFIG_HAVE_IOREMAP_PROT is not set | ||
85 | CONFIG_HAVE_KPROBES=y | 80 | CONFIG_HAVE_KPROBES=y |
86 | CONFIG_HAVE_KRETPROBES=y | 81 | CONFIG_HAVE_KRETPROBES=y |
87 | # CONFIG_HAVE_ARCH_TRACEHOOK is not set | ||
88 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
89 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | ||
90 | CONFIG_HAVE_CLK=y | 82 | CONFIG_HAVE_CLK=y |
91 | CONFIG_PROC_PAGE_MONITOR=y | 83 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y |
92 | CONFIG_SLABINFO=y | 84 | CONFIG_SLABINFO=y |
93 | CONFIG_RT_MUTEXES=y | 85 | CONFIG_RT_MUTEXES=y |
94 | # CONFIG_TINY_SHMEM is not set | 86 | # CONFIG_TINY_SHMEM is not set |
@@ -112,14 +104,15 @@ CONFIG_BLOCK=y | |||
112 | # | 104 | # |
113 | CONFIG_IOSCHED_NOOP=y | 105 | CONFIG_IOSCHED_NOOP=y |
114 | CONFIG_IOSCHED_AS=y | 106 | CONFIG_IOSCHED_AS=y |
115 | CONFIG_IOSCHED_DEADLINE=y | 107 | # CONFIG_IOSCHED_DEADLINE is not set |
116 | CONFIG_IOSCHED_CFQ=y | 108 | # CONFIG_IOSCHED_CFQ is not set |
117 | CONFIG_DEFAULT_AS=y | 109 | CONFIG_DEFAULT_AS=y |
118 | # CONFIG_DEFAULT_DEADLINE is not set | 110 | # CONFIG_DEFAULT_DEADLINE is not set |
119 | # CONFIG_DEFAULT_CFQ is not set | 111 | # CONFIG_DEFAULT_CFQ is not set |
120 | # CONFIG_DEFAULT_NOOP is not set | 112 | # CONFIG_DEFAULT_NOOP is not set |
121 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 113 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
122 | CONFIG_CLASSIC_RCU=y | 114 | CONFIG_CLASSIC_RCU=y |
115 | CONFIG_FREEZER=y | ||
123 | 116 | ||
124 | # | 117 | # |
125 | # System Type | 118 | # System Type |
@@ -129,7 +122,6 @@ CONFIG_CLASSIC_RCU=y | |||
129 | # CONFIG_ARCH_REALVIEW is not set | 122 | # CONFIG_ARCH_REALVIEW is not set |
130 | # CONFIG_ARCH_VERSATILE is not set | 123 | # CONFIG_ARCH_VERSATILE is not set |
131 | # CONFIG_ARCH_AT91 is not set | 124 | # CONFIG_ARCH_AT91 is not set |
132 | # CONFIG_ARCH_CLPS7500 is not set | ||
133 | # CONFIG_ARCH_CLPS711X is not set | 125 | # CONFIG_ARCH_CLPS711X is not set |
134 | # CONFIG_ARCH_EBSA110 is not set | 126 | # CONFIG_ARCH_EBSA110 is not set |
135 | # CONFIG_ARCH_EP93XX is not set | 127 | # CONFIG_ARCH_EP93XX is not set |
@@ -160,7 +152,8 @@ CONFIG_ARCH_PXA=y | |||
160 | # CONFIG_ARCH_LH7A40X is not set | 152 | # CONFIG_ARCH_LH7A40X is not set |
161 | # CONFIG_ARCH_DAVINCI is not set | 153 | # CONFIG_ARCH_DAVINCI is not set |
162 | # CONFIG_ARCH_OMAP is not set | 154 | # CONFIG_ARCH_OMAP is not set |
163 | # CONFIG_ARCH_MSM7X00A is not set | 155 | # CONFIG_ARCH_MSM is not set |
156 | # CONFIG_ARCH_W90X900 is not set | ||
164 | 157 | ||
165 | # | 158 | # |
166 | # Intel PXA2xx/PXA3xx Implementations | 159 | # Intel PXA2xx/PXA3xx Implementations |
@@ -169,8 +162,10 @@ CONFIG_ARCH_PXA=y | |||
169 | # CONFIG_ARCH_LUBBOCK is not set | 162 | # CONFIG_ARCH_LUBBOCK is not set |
170 | # CONFIG_MACH_LOGICPD_PXA270 is not set | 163 | # CONFIG_MACH_LOGICPD_PXA270 is not set |
171 | # CONFIG_MACH_MAINSTONE is not set | 164 | # CONFIG_MACH_MAINSTONE is not set |
165 | # CONFIG_MACH_MP900C is not set | ||
172 | # CONFIG_ARCH_PXA_IDP is not set | 166 | # CONFIG_ARCH_PXA_IDP is not set |
173 | # CONFIG_PXA_SHARPSL is not set | 167 | # CONFIG_PXA_SHARPSL is not set |
168 | # CONFIG_ARCH_VIPER is not set | ||
174 | CONFIG_ARCH_PXA_ESERIES=y | 169 | CONFIG_ARCH_PXA_ESERIES=y |
175 | CONFIG_MACH_E330=y | 170 | CONFIG_MACH_E330=y |
176 | CONFIG_MACH_E350=y | 171 | CONFIG_MACH_E350=y |
@@ -178,7 +173,8 @@ CONFIG_MACH_E740=y | |||
178 | CONFIG_MACH_E750=y | 173 | CONFIG_MACH_E750=y |
179 | CONFIG_MACH_E400=y | 174 | CONFIG_MACH_E400=y |
180 | CONFIG_MACH_E800=y | 175 | CONFIG_MACH_E800=y |
181 | # CONFIG_MACH_TRIZEPS4 is not set | 176 | # CONFIG_TRIZEPS_PXA is not set |
177 | # CONFIG_MACH_H5000 is not set | ||
182 | # CONFIG_MACH_EM_X270 is not set | 178 | # CONFIG_MACH_EM_X270 is not set |
183 | # CONFIG_MACH_COLIBRI is not set | 179 | # CONFIG_MACH_COLIBRI is not set |
184 | # CONFIG_MACH_ZYLONITE is not set | 180 | # CONFIG_MACH_ZYLONITE is not set |
@@ -186,12 +182,15 @@ CONFIG_MACH_E800=y | |||
186 | # CONFIG_MACH_TAVOREVB is not set | 182 | # CONFIG_MACH_TAVOREVB is not set |
187 | # CONFIG_MACH_SAAR is not set | 183 | # CONFIG_MACH_SAAR is not set |
188 | # CONFIG_MACH_ARMCORE is not set | 184 | # CONFIG_MACH_ARMCORE is not set |
185 | # CONFIG_MACH_CM_X300 is not set | ||
189 | # CONFIG_MACH_MAGICIAN is not set | 186 | # CONFIG_MACH_MAGICIAN is not set |
187 | # CONFIG_MACH_MIOA701 is not set | ||
190 | # CONFIG_MACH_PCM027 is not set | 188 | # CONFIG_MACH_PCM027 is not set |
191 | # CONFIG_ARCH_PXA_PALM is not set | 189 | # CONFIG_ARCH_PXA_PALM is not set |
192 | # CONFIG_PXA_EZX is not set | 190 | # CONFIG_PXA_EZX is not set |
193 | CONFIG_PXA25x=y | 191 | CONFIG_PXA25x=y |
194 | # CONFIG_PXA_PWM is not set | 192 | # CONFIG_PXA_PWM is not set |
193 | CONFIG_PXA_HAVE_BOARD_IRQS=y | ||
195 | 194 | ||
196 | # | 195 | # |
197 | # Boot options | 196 | # Boot options |
@@ -222,6 +221,7 @@ CONFIG_CPU_CP15_MMU=y | |||
222 | # CONFIG_OUTER_CACHE is not set | 221 | # CONFIG_OUTER_CACHE is not set |
223 | CONFIG_IWMMXT=y | 222 | CONFIG_IWMMXT=y |
224 | CONFIG_XSCALE_PMU=y | 223 | CONFIG_XSCALE_PMU=y |
224 | CONFIG_COMMON_CLKDEV=y | ||
225 | 225 | ||
226 | # | 226 | # |
227 | # Bus support | 227 | # Bus support |
@@ -237,6 +237,7 @@ CONFIG_PCMCIA_IOCTL=y | |||
237 | # | 237 | # |
238 | # PC-card bridges | 238 | # PC-card bridges |
239 | # | 239 | # |
240 | CONFIG_PCMCIA_PXA2XX=m | ||
240 | 241 | ||
241 | # | 242 | # |
242 | # Kernel Features | 243 | # Kernel Features |
@@ -245,25 +246,30 @@ CONFIG_TICK_ONESHOT=y | |||
245 | # CONFIG_NO_HZ is not set | 246 | # CONFIG_NO_HZ is not set |
246 | # CONFIG_HIGH_RES_TIMERS is not set | 247 | # CONFIG_HIGH_RES_TIMERS is not set |
247 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | 248 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y |
249 | CONFIG_VMSPLIT_3G=y | ||
250 | # CONFIG_VMSPLIT_2G is not set | ||
251 | # CONFIG_VMSPLIT_1G is not set | ||
252 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
248 | # CONFIG_PREEMPT is not set | 253 | # CONFIG_PREEMPT is not set |
249 | CONFIG_HZ=100 | 254 | CONFIG_HZ=100 |
250 | CONFIG_AEABI=y | 255 | CONFIG_AEABI=y |
251 | CONFIG_OABI_COMPAT=y | 256 | CONFIG_OABI_COMPAT=y |
252 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 257 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y |
258 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
259 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
253 | CONFIG_SELECT_MEMORY_MODEL=y | 260 | CONFIG_SELECT_MEMORY_MODEL=y |
254 | CONFIG_FLATMEM_MANUAL=y | 261 | CONFIG_FLATMEM_MANUAL=y |
255 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 262 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
256 | # CONFIG_SPARSEMEM_MANUAL is not set | 263 | # CONFIG_SPARSEMEM_MANUAL is not set |
257 | CONFIG_FLATMEM=y | 264 | CONFIG_FLATMEM=y |
258 | CONFIG_FLAT_NODE_MEM_MAP=y | 265 | CONFIG_FLAT_NODE_MEM_MAP=y |
259 | # CONFIG_SPARSEMEM_STATIC is not set | ||
260 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
261 | CONFIG_PAGEFLAGS_EXTENDED=y | 266 | CONFIG_PAGEFLAGS_EXTENDED=y |
262 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 267 | CONFIG_SPLIT_PTLOCK_CPUS=4096 |
263 | # CONFIG_RESOURCES_64BIT is not set | 268 | # CONFIG_RESOURCES_64BIT is not set |
264 | CONFIG_ZONE_DMA_FLAG=1 | 269 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
265 | CONFIG_BOUNCE=y | 270 | CONFIG_ZONE_DMA_FLAG=0 |
266 | CONFIG_VIRT_TO_BUS=y | 271 | CONFIG_VIRT_TO_BUS=y |
272 | CONFIG_UNEVICTABLE_LRU=y | ||
267 | CONFIG_ALIGNMENT_TRAP=y | 273 | CONFIG_ALIGNMENT_TRAP=y |
268 | 274 | ||
269 | # | 275 | # |
@@ -277,9 +283,10 @@ CONFIG_KEXEC=y | |||
277 | CONFIG_ATAGS_PROC=y | 283 | CONFIG_ATAGS_PROC=y |
278 | 284 | ||
279 | # | 285 | # |
280 | # CPU Frequency scaling | 286 | # CPU Power Management |
281 | # | 287 | # |
282 | # CONFIG_CPU_FREQ is not set | 288 | # CONFIG_CPU_FREQ is not set |
289 | # CONFIG_CPU_IDLE is not set | ||
283 | 290 | ||
284 | # | 291 | # |
285 | # Floating point emulation | 292 | # Floating point emulation |
@@ -296,6 +303,8 @@ CONFIG_FPE_NWFPE=y | |||
296 | # Userspace binary formats | 303 | # Userspace binary formats |
297 | # | 304 | # |
298 | CONFIG_BINFMT_ELF=y | 305 | CONFIG_BINFMT_ELF=y |
306 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
307 | CONFIG_HAVE_AOUT=y | ||
299 | # CONFIG_BINFMT_AOUT is not set | 308 | # CONFIG_BINFMT_AOUT is not set |
300 | CONFIG_BINFMT_MISC=y | 309 | CONFIG_BINFMT_MISC=y |
301 | 310 | ||
@@ -309,10 +318,6 @@ CONFIG_SUSPEND=y | |||
309 | CONFIG_SUSPEND_FREEZER=y | 318 | CONFIG_SUSPEND_FREEZER=y |
310 | # CONFIG_APM_EMULATION is not set | 319 | # CONFIG_APM_EMULATION is not set |
311 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | 320 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
312 | |||
313 | # | ||
314 | # Networking | ||
315 | # | ||
316 | CONFIG_NET=y | 321 | CONFIG_NET=y |
317 | 322 | ||
318 | # | 323 | # |
@@ -339,7 +344,7 @@ CONFIG_IP_FIB_HASH=y | |||
339 | # CONFIG_INET_ESP is not set | 344 | # CONFIG_INET_ESP is not set |
340 | # CONFIG_INET_IPCOMP is not set | 345 | # CONFIG_INET_IPCOMP is not set |
341 | # CONFIG_INET_XFRM_TUNNEL is not set | 346 | # CONFIG_INET_XFRM_TUNNEL is not set |
342 | CONFIG_INET_TUNNEL=y | 347 | # CONFIG_INET_TUNNEL is not set |
343 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 348 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
344 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 349 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
345 | CONFIG_INET_XFRM_MODE_BEET=y | 350 | CONFIG_INET_XFRM_MODE_BEET=y |
@@ -350,25 +355,7 @@ CONFIG_INET_TCP_DIAG=y | |||
350 | CONFIG_TCP_CONG_CUBIC=y | 355 | CONFIG_TCP_CONG_CUBIC=y |
351 | CONFIG_DEFAULT_TCP_CONG="cubic" | 356 | CONFIG_DEFAULT_TCP_CONG="cubic" |
352 | # CONFIG_TCP_MD5SIG is not set | 357 | # CONFIG_TCP_MD5SIG is not set |
353 | CONFIG_IPV6=y | 358 | # CONFIG_IPV6 is not set |
354 | # CONFIG_IPV6_PRIVACY is not set | ||
355 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
356 | # CONFIG_IPV6_OPTIMISTIC_DAD is not set | ||
357 | # CONFIG_INET6_AH is not set | ||
358 | # CONFIG_INET6_ESP is not set | ||
359 | # CONFIG_INET6_IPCOMP is not set | ||
360 | # CONFIG_IPV6_MIP6 is not set | ||
361 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
362 | # CONFIG_INET6_TUNNEL is not set | ||
363 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y | ||
364 | CONFIG_INET6_XFRM_MODE_TUNNEL=y | ||
365 | CONFIG_INET6_XFRM_MODE_BEET=y | ||
366 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | ||
367 | CONFIG_IPV6_SIT=y | ||
368 | CONFIG_IPV6_NDISC_NODETYPE=y | ||
369 | # CONFIG_IPV6_TUNNEL is not set | ||
370 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | ||
371 | # CONFIG_IPV6_MROUTE is not set | ||
372 | # CONFIG_NETWORK_SECMARK is not set | 359 | # CONFIG_NETWORK_SECMARK is not set |
373 | # CONFIG_NETFILTER is not set | 360 | # CONFIG_NETFILTER is not set |
374 | # CONFIG_IP_DCCP is not set | 361 | # CONFIG_IP_DCCP is not set |
@@ -376,6 +363,7 @@ CONFIG_IPV6_NDISC_NODETYPE=y | |||
376 | # CONFIG_TIPC is not set | 363 | # CONFIG_TIPC is not set |
377 | # CONFIG_ATM is not set | 364 | # CONFIG_ATM is not set |
378 | # CONFIG_BRIDGE is not set | 365 | # CONFIG_BRIDGE is not set |
366 | # CONFIG_NET_DSA is not set | ||
379 | # CONFIG_VLAN_8021Q is not set | 367 | # CONFIG_VLAN_8021Q is not set |
380 | # CONFIG_DECNET is not set | 368 | # CONFIG_DECNET is not set |
381 | # CONFIG_LLC2 is not set | 369 | # CONFIG_LLC2 is not set |
@@ -421,25 +409,18 @@ CONFIG_IRDA_FAST_RR=y | |||
421 | # | 409 | # |
422 | # Dongle support | 410 | # Dongle support |
423 | # | 411 | # |
424 | # CONFIG_KINGSUN_DONGLE is not set | ||
425 | # CONFIG_KSDAZZLE_DONGLE is not set | ||
426 | # CONFIG_KS959_DONGLE is not set | ||
427 | 412 | ||
428 | # | 413 | # |
429 | # FIR device drivers | 414 | # FIR device drivers |
430 | # | 415 | # |
431 | # CONFIG_USB_IRDA is not set | ||
432 | # CONFIG_SIGMATEL_FIR is not set | ||
433 | CONFIG_PXA_FICP=y | 416 | CONFIG_PXA_FICP=y |
434 | # CONFIG_MCS_FIR is not set | ||
435 | # CONFIG_BT is not set | 417 | # CONFIG_BT is not set |
436 | # CONFIG_AF_RXRPC is not set | 418 | # CONFIG_AF_RXRPC is not set |
437 | 419 | # CONFIG_PHONET is not set | |
438 | # | 420 | CONFIG_WIRELESS=y |
439 | # Wireless | ||
440 | # | ||
441 | CONFIG_CFG80211=m | 421 | CONFIG_CFG80211=m |
442 | CONFIG_NL80211=y | 422 | CONFIG_NL80211=y |
423 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
443 | CONFIG_WIRELESS_EXT=y | 424 | CONFIG_WIRELESS_EXT=y |
444 | CONFIG_WIRELESS_EXT_SYSFS=y | 425 | CONFIG_WIRELESS_EXT_SYSFS=y |
445 | CONFIG_MAC80211=m | 426 | CONFIG_MAC80211=m |
@@ -448,7 +429,9 @@ CONFIG_MAC80211=m | |||
448 | # Rate control algorithm selection | 429 | # Rate control algorithm selection |
449 | # | 430 | # |
450 | CONFIG_MAC80211_RC_PID=y | 431 | CONFIG_MAC80211_RC_PID=y |
432 | # CONFIG_MAC80211_RC_MINSTREL is not set | ||
451 | CONFIG_MAC80211_RC_DEFAULT_PID=y | 433 | CONFIG_MAC80211_RC_DEFAULT_PID=y |
434 | # CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set | ||
452 | CONFIG_MAC80211_RC_DEFAULT="pid" | 435 | CONFIG_MAC80211_RC_DEFAULT="pid" |
453 | # CONFIG_MAC80211_MESH is not set | 436 | # CONFIG_MAC80211_MESH is not set |
454 | # CONFIG_MAC80211_LEDS is not set | 437 | # CONFIG_MAC80211_LEDS is not set |
@@ -539,11 +522,12 @@ CONFIG_MTD_NAND=m | |||
539 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | 522 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set |
540 | # CONFIG_MTD_NAND_ECC_SMC is not set | 523 | # CONFIG_MTD_NAND_ECC_SMC is not set |
541 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | 524 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set |
525 | # CONFIG_MTD_NAND_GPIO is not set | ||
542 | CONFIG_MTD_NAND_IDS=m | 526 | CONFIG_MTD_NAND_IDS=m |
543 | # CONFIG_MTD_NAND_DISKONCHIP is not set | 527 | # CONFIG_MTD_NAND_DISKONCHIP is not set |
544 | # CONFIG_MTD_NAND_SHARPSL is not set | 528 | # CONFIG_MTD_NAND_SHARPSL is not set |
529 | CONFIG_MTD_NAND_TMIO=m | ||
545 | # CONFIG_MTD_NAND_PLATFORM is not set | 530 | # CONFIG_MTD_NAND_PLATFORM is not set |
546 | # CONFIG_MTD_ALAUDA is not set | ||
547 | # CONFIG_MTD_ONENAND is not set | 531 | # CONFIG_MTD_ONENAND is not set |
548 | 532 | ||
549 | # | 533 | # |
@@ -556,13 +540,13 @@ CONFIG_BLK_DEV=y | |||
556 | CONFIG_BLK_DEV_LOOP=m | 540 | CONFIG_BLK_DEV_LOOP=m |
557 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 541 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
558 | # CONFIG_BLK_DEV_NBD is not set | 542 | # CONFIG_BLK_DEV_NBD is not set |
559 | # CONFIG_BLK_DEV_UB is not set | ||
560 | # CONFIG_BLK_DEV_RAM is not set | 543 | # CONFIG_BLK_DEV_RAM is not set |
561 | # CONFIG_CDROM_PKTCDVD is not set | 544 | # CONFIG_CDROM_PKTCDVD is not set |
562 | # CONFIG_ATA_OVER_ETH is not set | 545 | # CONFIG_ATA_OVER_ETH is not set |
563 | CONFIG_MISC_DEVICES=y | 546 | CONFIG_MISC_DEVICES=y |
564 | # CONFIG_EEPROM_93CX6 is not set | 547 | # CONFIG_EEPROM_93CX6 is not set |
565 | # CONFIG_ENCLOSURE_SERVICES is not set | 548 | # CONFIG_ENCLOSURE_SERVICES is not set |
549 | # CONFIG_C2PORT is not set | ||
566 | CONFIG_HAVE_IDE=y | 550 | CONFIG_HAVE_IDE=y |
567 | # CONFIG_IDE is not set | 551 | # CONFIG_IDE is not set |
568 | 552 | ||
@@ -632,37 +616,25 @@ CONFIG_NETDEVICES=y | |||
632 | CONFIG_WLAN_80211=y | 616 | CONFIG_WLAN_80211=y |
633 | # CONFIG_PCMCIA_RAYCS is not set | 617 | # CONFIG_PCMCIA_RAYCS is not set |
634 | # CONFIG_LIBERTAS is not set | 618 | # CONFIG_LIBERTAS is not set |
619 | # CONFIG_LIBERTAS_THINFIRM is not set | ||
635 | CONFIG_HERMES=m | 620 | CONFIG_HERMES=m |
636 | CONFIG_PCMCIA_HERMES=m | 621 | CONFIG_PCMCIA_HERMES=m |
637 | # CONFIG_PCMCIA_SPECTRUM is not set | 622 | # CONFIG_PCMCIA_SPECTRUM is not set |
638 | # CONFIG_ATMEL is not set | 623 | # CONFIG_ATMEL is not set |
639 | # CONFIG_AIRO_CS is not set | 624 | # CONFIG_AIRO_CS is not set |
640 | # CONFIG_PCMCIA_WL3501 is not set | 625 | # CONFIG_PCMCIA_WL3501 is not set |
641 | # CONFIG_USB_ZD1201 is not set | ||
642 | # CONFIG_USB_NET_RNDIS_WLAN is not set | ||
643 | # CONFIG_RTL8187 is not set | ||
644 | # CONFIG_MAC80211_HWSIM is not set | 626 | # CONFIG_MAC80211_HWSIM is not set |
645 | # CONFIG_P54_COMMON is not set | 627 | # CONFIG_P54_COMMON is not set |
646 | # CONFIG_IWLWIFI_LEDS is not set | 628 | # CONFIG_IWLWIFI_LEDS is not set |
647 | # CONFIG_HOSTAP is not set | 629 | # CONFIG_HOSTAP is not set |
648 | # CONFIG_B43 is not set | 630 | # CONFIG_B43 is not set |
649 | # CONFIG_B43LEGACY is not set | 631 | # CONFIG_B43LEGACY is not set |
650 | # CONFIG_ZD1211RW is not set | ||
651 | # CONFIG_RT2X00 is not set | 632 | # CONFIG_RT2X00 is not set |
652 | |||
653 | # | ||
654 | # USB Network Adapters | ||
655 | # | ||
656 | # CONFIG_USB_CATC is not set | ||
657 | # CONFIG_USB_KAWETH is not set | ||
658 | # CONFIG_USB_PEGASUS is not set | ||
659 | # CONFIG_USB_RTL8150 is not set | ||
660 | # CONFIG_USB_USBNET is not set | ||
661 | CONFIG_NET_PCMCIA=y | 633 | CONFIG_NET_PCMCIA=y |
662 | # CONFIG_PCMCIA_3C589 is not set | 634 | # CONFIG_PCMCIA_3C589 is not set |
663 | # CONFIG_PCMCIA_3C574 is not set | 635 | # CONFIG_PCMCIA_3C574 is not set |
664 | # CONFIG_PCMCIA_FMVJ18X is not set | 636 | # CONFIG_PCMCIA_FMVJ18X is not set |
665 | CONFIG_PCMCIA_PCNET=m | 637 | # CONFIG_PCMCIA_PCNET is not set |
666 | # CONFIG_PCMCIA_NMCLAN is not set | 638 | # CONFIG_PCMCIA_NMCLAN is not set |
667 | # CONFIG_PCMCIA_SMC91C92 is not set | 639 | # CONFIG_PCMCIA_SMC91C92 is not set |
668 | # CONFIG_PCMCIA_XIRC2PS is not set | 640 | # CONFIG_PCMCIA_XIRC2PS is not set |
@@ -714,13 +686,11 @@ CONFIG_INPUT_TOUCHSCREEN=y | |||
714 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | 686 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set |
715 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | 687 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set |
716 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | 688 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set |
717 | # CONFIG_TOUCHSCREEN_UCB1400 is not set | ||
718 | CONFIG_TOUCHSCREEN_WM97XX=m | 689 | CONFIG_TOUCHSCREEN_WM97XX=m |
719 | CONFIG_TOUCHSCREEN_WM9705=y | 690 | CONFIG_TOUCHSCREEN_WM9705=y |
720 | CONFIG_TOUCHSCREEN_WM9712=y | 691 | CONFIG_TOUCHSCREEN_WM9712=y |
721 | CONFIG_TOUCHSCREEN_WM9713=y | 692 | CONFIG_TOUCHSCREEN_WM9713=y |
722 | # CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE is not set | 693 | # CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE is not set |
723 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | ||
724 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | 694 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set |
725 | # CONFIG_INPUT_MISC is not set | 695 | # CONFIG_INPUT_MISC is not set |
726 | 696 | ||
@@ -749,11 +719,13 @@ CONFIG_DEVKMEM=y | |||
749 | # | 719 | # |
750 | # Non-8250 serial port support | 720 | # Non-8250 serial port support |
751 | # | 721 | # |
752 | # CONFIG_SERIAL_PXA is not set | 722 | CONFIG_SERIAL_PXA=y |
723 | # CONFIG_SERIAL_PXA_CONSOLE is not set | ||
724 | CONFIG_SERIAL_CORE=y | ||
753 | CONFIG_UNIX98_PTYS=y | 725 | CONFIG_UNIX98_PTYS=y |
754 | # CONFIG_LEGACY_PTYS is not set | 726 | # CONFIG_LEGACY_PTYS is not set |
755 | # CONFIG_IPMI_HANDLER is not set | 727 | # CONFIG_IPMI_HANDLER is not set |
756 | CONFIG_HW_RANDOM=m | 728 | # CONFIG_HW_RANDOM is not set |
757 | # CONFIG_NVRAM is not set | 729 | # CONFIG_NVRAM is not set |
758 | # CONFIG_R3964 is not set | 730 | # CONFIG_R3964 is not set |
759 | 731 | ||
@@ -773,6 +745,10 @@ CONFIG_GPIOLIB=y | |||
773 | # CONFIG_GPIO_SYSFS is not set | 745 | # CONFIG_GPIO_SYSFS is not set |
774 | 746 | ||
775 | # | 747 | # |
748 | # Memory mapped GPIO expanders: | ||
749 | # | ||
750 | |||
751 | # | ||
776 | # I2C GPIO expanders: | 752 | # I2C GPIO expanders: |
777 | # | 753 | # |
778 | 754 | ||
@@ -786,12 +762,14 @@ CONFIG_GPIOLIB=y | |||
786 | # CONFIG_W1 is not set | 762 | # CONFIG_W1 is not set |
787 | # CONFIG_POWER_SUPPLY is not set | 763 | # CONFIG_POWER_SUPPLY is not set |
788 | # CONFIG_HWMON is not set | 764 | # CONFIG_HWMON is not set |
765 | # CONFIG_THERMAL is not set | ||
766 | # CONFIG_THERMAL_HWMON is not set | ||
789 | # CONFIG_WATCHDOG is not set | 767 | # CONFIG_WATCHDOG is not set |
768 | CONFIG_SSB_POSSIBLE=y | ||
790 | 769 | ||
791 | # | 770 | # |
792 | # Sonics Silicon Backplane | 771 | # Sonics Silicon Backplane |
793 | # | 772 | # |
794 | CONFIG_SSB_POSSIBLE=y | ||
795 | # CONFIG_SSB is not set | 773 | # CONFIG_SSB is not set |
796 | 774 | ||
797 | # | 775 | # |
@@ -799,8 +777,13 @@ CONFIG_SSB_POSSIBLE=y | |||
799 | # | 777 | # |
800 | CONFIG_MFD_CORE=y | 778 | CONFIG_MFD_CORE=y |
801 | # CONFIG_MFD_SM501 is not set | 779 | # CONFIG_MFD_SM501 is not set |
780 | # CONFIG_MFD_ASIC3 is not set | ||
802 | # CONFIG_HTC_EGPIO is not set | 781 | # CONFIG_HTC_EGPIO is not set |
803 | # CONFIG_HTC_PASIC3 is not set | 782 | # CONFIG_HTC_PASIC3 is not set |
783 | # CONFIG_UCB1400_CORE is not set | ||
784 | CONFIG_MFD_TMIO=y | ||
785 | CONFIG_MFD_T7L66XB=y | ||
786 | CONFIG_MFD_TC6387XB=y | ||
804 | CONFIG_MFD_TC6393XB=y | 787 | CONFIG_MFD_TC6393XB=y |
805 | 788 | ||
806 | # | 789 | # |
@@ -827,6 +810,7 @@ CONFIG_MFD_TC6393XB=y | |||
827 | CONFIG_FB=y | 810 | CONFIG_FB=y |
828 | # CONFIG_FIRMWARE_EDID is not set | 811 | # CONFIG_FIRMWARE_EDID is not set |
829 | # CONFIG_FB_DDC is not set | 812 | # CONFIG_FB_DDC is not set |
813 | # CONFIG_FB_BOOT_VESA_SUPPORT is not set | ||
830 | CONFIG_FB_CFB_FILLRECT=y | 814 | CONFIG_FB_CFB_FILLRECT=y |
831 | CONFIG_FB_CFB_COPYAREA=y | 815 | CONFIG_FB_CFB_COPYAREA=y |
832 | CONFIG_FB_CFB_IMAGEBLIT=y | 816 | CONFIG_FB_CFB_IMAGEBLIT=y |
@@ -851,8 +835,10 @@ CONFIG_FB_PXA=y | |||
851 | # CONFIG_FB_PXA_PARAMETERS is not set | 835 | # CONFIG_FB_PXA_PARAMETERS is not set |
852 | # CONFIG_FB_MBX is not set | 836 | # CONFIG_FB_MBX is not set |
853 | CONFIG_FB_W100=y | 837 | CONFIG_FB_W100=y |
854 | # CONFIG_FB_AM200EPD is not set | 838 | # CONFIG_FB_TMIO is not set |
855 | # CONFIG_FB_VIRTUAL is not set | 839 | # CONFIG_FB_VIRTUAL is not set |
840 | # CONFIG_FB_METRONOME is not set | ||
841 | # CONFIG_FB_MB862XX is not set | ||
856 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 842 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
857 | CONFIG_LCD_CLASS_DEVICE=y | 843 | CONFIG_LCD_CLASS_DEVICE=y |
858 | # CONFIG_LCD_ILI9320 is not set | 844 | # CONFIG_LCD_ILI9320 is not set |
@@ -886,6 +872,7 @@ CONFIG_FONT_MINI_4x6=y | |||
886 | # CONFIG_FONT_10x18 is not set | 872 | # CONFIG_FONT_10x18 is not set |
887 | # CONFIG_LOGO is not set | 873 | # CONFIG_LOGO is not set |
888 | CONFIG_SOUND=y | 874 | CONFIG_SOUND=y |
875 | CONFIG_SOUND_OSS_CORE=y | ||
889 | CONFIG_SND=m | 876 | CONFIG_SND=m |
890 | CONFIG_SND_TIMER=m | 877 | CONFIG_SND_TIMER=m |
891 | CONFIG_SND_PCM=m | 878 | CONFIG_SND_PCM=m |
@@ -899,14 +886,18 @@ CONFIG_SND_SUPPORT_OLD_API=y | |||
899 | CONFIG_SND_VERBOSE_PROCFS=y | 886 | CONFIG_SND_VERBOSE_PROCFS=y |
900 | CONFIG_SND_VERBOSE_PRINTK=y | 887 | CONFIG_SND_VERBOSE_PRINTK=y |
901 | # CONFIG_SND_DEBUG is not set | 888 | # CONFIG_SND_DEBUG is not set |
889 | CONFIG_SND_VMASTER=y | ||
890 | CONFIG_SND_AC97_CODEC=m | ||
902 | CONFIG_SND_DRIVERS=y | 891 | CONFIG_SND_DRIVERS=y |
903 | # CONFIG_SND_DUMMY is not set | 892 | # CONFIG_SND_DUMMY is not set |
904 | # CONFIG_SND_MTPAV is not set | 893 | # CONFIG_SND_MTPAV is not set |
905 | # CONFIG_SND_SERIAL_U16550 is not set | 894 | # CONFIG_SND_SERIAL_U16550 is not set |
906 | # CONFIG_SND_MPU401 is not set | 895 | # CONFIG_SND_MPU401 is not set |
896 | # CONFIG_SND_AC97_POWER_SAVE is not set | ||
907 | CONFIG_SND_ARM=y | 897 | CONFIG_SND_ARM=y |
898 | CONFIG_SND_PXA2XX_LIB=m | ||
899 | CONFIG_SND_PXA2XX_LIB_AC97=y | ||
908 | # CONFIG_SND_PXA2XX_AC97 is not set | 900 | # CONFIG_SND_PXA2XX_AC97 is not set |
909 | # CONFIG_SND_USB is not set | ||
910 | # CONFIG_SND_PCMCIA is not set | 901 | # CONFIG_SND_PCMCIA is not set |
911 | CONFIG_SND_SOC=m | 902 | CONFIG_SND_SOC=m |
912 | CONFIG_SND_SOC_AC97_BUS=y | 903 | CONFIG_SND_SOC_AC97_BUS=y |
@@ -920,133 +911,19 @@ CONFIG_HID_SUPPORT=y | |||
920 | CONFIG_HID=y | 911 | CONFIG_HID=y |
921 | # CONFIG_HID_DEBUG is not set | 912 | # CONFIG_HID_DEBUG is not set |
922 | # CONFIG_HIDRAW is not set | 913 | # CONFIG_HIDRAW is not set |
914 | # CONFIG_HID_PID is not set | ||
923 | 915 | ||
924 | # | 916 | # |
925 | # USB Input Devices | 917 | # Special HID drivers |
926 | # | 918 | # |
927 | CONFIG_USB_HID=m | 919 | CONFIG_HID_COMPAT=y |
928 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | 920 | # CONFIG_USB_SUPPORT is not set |
929 | # CONFIG_HID_FF is not set | ||
930 | # CONFIG_USB_HIDDEV is not set | ||
931 | |||
932 | # | ||
933 | # USB HID Boot Protocol drivers | ||
934 | # | ||
935 | # CONFIG_USB_KBD is not set | ||
936 | # CONFIG_USB_MOUSE is not set | ||
937 | CONFIG_USB_SUPPORT=y | ||
938 | CONFIG_USB_ARCH_HAS_HCD=y | ||
939 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
940 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
941 | CONFIG_USB=m | ||
942 | # CONFIG_USB_DEBUG is not set | ||
943 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
944 | |||
945 | # | ||
946 | # Miscellaneous USB options | ||
947 | # | ||
948 | # CONFIG_USB_DEVICEFS is not set | ||
949 | CONFIG_USB_DEVICE_CLASS=y | ||
950 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
951 | # CONFIG_USB_SUSPEND is not set | ||
952 | # CONFIG_USB_OTG is not set | ||
953 | # CONFIG_USB_OTG_WHITELIST is not set | ||
954 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
955 | |||
956 | # | ||
957 | # USB Host Controller Drivers | ||
958 | # | ||
959 | # CONFIG_USB_C67X00_HCD is not set | ||
960 | # CONFIG_USB_ISP116X_HCD is not set | ||
961 | # CONFIG_USB_ISP1760_HCD is not set | ||
962 | # CONFIG_USB_SL811_HCD is not set | ||
963 | # CONFIG_USB_R8A66597_HCD is not set | ||
964 | |||
965 | # | ||
966 | # USB Device Class drivers | ||
967 | # | ||
968 | # CONFIG_USB_ACM is not set | ||
969 | # CONFIG_USB_PRINTER is not set | ||
970 | # CONFIG_USB_WDM is not set | ||
971 | |||
972 | # | ||
973 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
974 | # | ||
975 | |||
976 | # | ||
977 | # may also be needed; see USB_STORAGE Help for more information | ||
978 | # | ||
979 | # CONFIG_USB_STORAGE is not set | ||
980 | # CONFIG_USB_LIBUSUAL is not set | ||
981 | |||
982 | # | ||
983 | # USB Imaging devices | ||
984 | # | ||
985 | # CONFIG_USB_MDC800 is not set | ||
986 | # CONFIG_USB_MICROTEK is not set | ||
987 | CONFIG_USB_MON=y | ||
988 | |||
989 | # | ||
990 | # USB port drivers | ||
991 | # | ||
992 | # CONFIG_USB_SERIAL is not set | ||
993 | |||
994 | # | ||
995 | # USB Miscellaneous drivers | ||
996 | # | ||
997 | # CONFIG_USB_EMI62 is not set | ||
998 | # CONFIG_USB_EMI26 is not set | ||
999 | # CONFIG_USB_ADUTUX is not set | ||
1000 | # CONFIG_USB_AUERSWALD is not set | ||
1001 | # CONFIG_USB_RIO500 is not set | ||
1002 | # CONFIG_USB_LEGOTOWER is not set | ||
1003 | # CONFIG_USB_LCD is not set | ||
1004 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1005 | # CONFIG_USB_LED is not set | ||
1006 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
1007 | # CONFIG_USB_CYTHERM is not set | ||
1008 | # CONFIG_USB_PHIDGET is not set | ||
1009 | # CONFIG_USB_IDMOUSE is not set | ||
1010 | # CONFIG_USB_FTDI_ELAN is not set | ||
1011 | # CONFIG_USB_APPLEDISPLAY is not set | ||
1012 | # CONFIG_USB_LD is not set | ||
1013 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1014 | # CONFIG_USB_IOWARRIOR is not set | ||
1015 | # CONFIG_USB_ISIGHTFW is not set | ||
1016 | CONFIG_USB_GADGET=y | ||
1017 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
1018 | CONFIG_USB_GADGET_SELECTED=y | ||
1019 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
1020 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
1021 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
1022 | # CONFIG_USB_GADGET_NET2280 is not set | ||
1023 | CONFIG_USB_GADGET_PXA25X=y | ||
1024 | CONFIG_USB_PXA25X=y | ||
1025 | CONFIG_USB_PXA25X_SMALL=y | ||
1026 | # CONFIG_USB_GADGET_M66592 is not set | ||
1027 | # CONFIG_USB_GADGET_PXA27X is not set | ||
1028 | # CONFIG_USB_GADGET_GOKU is not set | ||
1029 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
1030 | # CONFIG_USB_GADGET_OMAP is not set | ||
1031 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
1032 | # CONFIG_USB_GADGET_AT91 is not set | ||
1033 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
1034 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
1035 | # CONFIG_USB_ZERO is not set | ||
1036 | CONFIG_USB_ETH=m | ||
1037 | # CONFIG_USB_ETH_RNDIS is not set | ||
1038 | # CONFIG_USB_GADGETFS is not set | ||
1039 | # CONFIG_USB_FILE_STORAGE is not set | ||
1040 | # CONFIG_USB_G_SERIAL is not set | ||
1041 | # CONFIG_USB_MIDI_GADGET is not set | ||
1042 | # CONFIG_USB_G_PRINTER is not set | ||
1043 | # CONFIG_USB_CDC_COMPOSITE is not set | ||
1044 | CONFIG_MMC=y | 921 | CONFIG_MMC=y |
1045 | # CONFIG_MMC_DEBUG is not set | 922 | # CONFIG_MMC_DEBUG is not set |
1046 | CONFIG_MMC_UNSAFE_RESUME=y | 923 | CONFIG_MMC_UNSAFE_RESUME=y |
1047 | 924 | ||
1048 | # | 925 | # |
1049 | # MMC/SD Card Drivers | 926 | # MMC/SD/SDIO Card Drivers |
1050 | # | 927 | # |
1051 | CONFIG_MMC_BLOCK=y | 928 | CONFIG_MMC_BLOCK=y |
1052 | CONFIG_MMC_BLOCK_BOUNCE=y | 929 | CONFIG_MMC_BLOCK_BOUNCE=y |
@@ -1054,14 +931,18 @@ CONFIG_MMC_BLOCK_BOUNCE=y | |||
1054 | # CONFIG_MMC_TEST is not set | 931 | # CONFIG_MMC_TEST is not set |
1055 | 932 | ||
1056 | # | 933 | # |
1057 | # MMC/SD Host Controller Drivers | 934 | # MMC/SD/SDIO Host Controller Drivers |
1058 | # | 935 | # |
1059 | # CONFIG_MMC_PXA is not set | 936 | # CONFIG_MMC_PXA is not set |
1060 | # CONFIG_MMC_SDHCI is not set | 937 | # CONFIG_MMC_SDHCI is not set |
938 | CONFIG_MMC_TMIO=y | ||
939 | # CONFIG_MEMSTICK is not set | ||
940 | # CONFIG_ACCESSIBILITY is not set | ||
1061 | # CONFIG_NEW_LEDS is not set | 941 | # CONFIG_NEW_LEDS is not set |
1062 | CONFIG_RTC_LIB=y | 942 | CONFIG_RTC_LIB=y |
1063 | # CONFIG_RTC_CLASS is not set | 943 | # CONFIG_RTC_CLASS is not set |
1064 | # CONFIG_DMADEVICES is not set | 944 | # CONFIG_DMADEVICES is not set |
945 | # CONFIG_REGULATOR is not set | ||
1065 | # CONFIG_UIO is not set | 946 | # CONFIG_UIO is not set |
1066 | 947 | ||
1067 | # | 948 | # |
@@ -1070,11 +951,17 @@ CONFIG_RTC_LIB=y | |||
1070 | CONFIG_EXT2_FS=y | 951 | CONFIG_EXT2_FS=y |
1071 | # CONFIG_EXT2_FS_XATTR is not set | 952 | # CONFIG_EXT2_FS_XATTR is not set |
1072 | # CONFIG_EXT2_FS_XIP is not set | 953 | # CONFIG_EXT2_FS_XIP is not set |
1073 | # CONFIG_EXT3_FS is not set | 954 | CONFIG_EXT3_FS=m |
1074 | # CONFIG_EXT4DEV_FS is not set | 955 | CONFIG_EXT3_FS_XATTR=y |
956 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
957 | # CONFIG_EXT3_FS_SECURITY is not set | ||
958 | # CONFIG_EXT4_FS is not set | ||
959 | CONFIG_JBD=m | ||
960 | CONFIG_FS_MBCACHE=m | ||
1075 | # CONFIG_REISERFS_FS is not set | 961 | # CONFIG_REISERFS_FS is not set |
1076 | # CONFIG_JFS_FS is not set | 962 | # CONFIG_JFS_FS is not set |
1077 | # CONFIG_FS_POSIX_ACL is not set | 963 | # CONFIG_FS_POSIX_ACL is not set |
964 | CONFIG_FILE_LOCKING=y | ||
1078 | # CONFIG_XFS_FS is not set | 965 | # CONFIG_XFS_FS is not set |
1079 | # CONFIG_OCFS2_FS is not set | 966 | # CONFIG_OCFS2_FS is not set |
1080 | CONFIG_DNOTIFY=y | 967 | CONFIG_DNOTIFY=y |
@@ -1106,6 +993,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
1106 | # | 993 | # |
1107 | CONFIG_PROC_FS=y | 994 | CONFIG_PROC_FS=y |
1108 | CONFIG_PROC_SYSCTL=y | 995 | CONFIG_PROC_SYSCTL=y |
996 | CONFIG_PROC_PAGE_MONITOR=y | ||
1109 | CONFIG_SYSFS=y | 997 | CONFIG_SYSFS=y |
1110 | CONFIG_TMPFS=y | 998 | CONFIG_TMPFS=y |
1111 | # CONFIG_TMPFS_POSIX_ACL is not set | 999 | # CONFIG_TMPFS_POSIX_ACL is not set |
@@ -1142,6 +1030,7 @@ CONFIG_LOCKD=y | |||
1142 | CONFIG_LOCKD_V4=y | 1030 | CONFIG_LOCKD_V4=y |
1143 | CONFIG_NFS_COMMON=y | 1031 | CONFIG_NFS_COMMON=y |
1144 | CONFIG_SUNRPC=y | 1032 | CONFIG_SUNRPC=y |
1033 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
1145 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 1034 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
1146 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1035 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1147 | # CONFIG_SMB_FS is not set | 1036 | # CONFIG_SMB_FS is not set |
@@ -1228,13 +1117,15 @@ CONFIG_FRAME_WARN=1024 | |||
1228 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1117 | # CONFIG_DEBUG_BUGVERBOSE is not set |
1229 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1118 | # CONFIG_DEBUG_MEMORY_INIT is not set |
1230 | CONFIG_FRAME_POINTER=y | 1119 | CONFIG_FRAME_POINTER=y |
1120 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1231 | # CONFIG_LATENCYTOP is not set | 1121 | # CONFIG_LATENCYTOP is not set |
1232 | CONFIG_HAVE_FTRACE=y | 1122 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
1233 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 1123 | CONFIG_HAVE_FUNCTION_TRACER=y |
1234 | # CONFIG_FTRACE is not set | 1124 | |
1235 | # CONFIG_IRQSOFF_TRACER is not set | 1125 | # |
1236 | # CONFIG_SCHED_TRACER is not set | 1126 | # Tracers |
1237 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1127 | # |
1128 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
1238 | # CONFIG_SAMPLES is not set | 1129 | # CONFIG_SAMPLES is not set |
1239 | CONFIG_HAVE_ARCH_KGDB=y | 1130 | CONFIG_HAVE_ARCH_KGDB=y |
1240 | # CONFIG_DEBUG_USER is not set | 1131 | # CONFIG_DEBUG_USER is not set |
@@ -1244,15 +1135,23 @@ CONFIG_HAVE_ARCH_KGDB=y | |||
1244 | # | 1135 | # |
1245 | # CONFIG_KEYS is not set | 1136 | # CONFIG_KEYS is not set |
1246 | # CONFIG_SECURITY is not set | 1137 | # CONFIG_SECURITY is not set |
1138 | # CONFIG_SECURITYFS is not set | ||
1247 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1139 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1248 | CONFIG_CRYPTO=y | 1140 | CONFIG_CRYPTO=y |
1249 | 1141 | ||
1250 | # | 1142 | # |
1251 | # Crypto core or helper | 1143 | # Crypto core or helper |
1252 | # | 1144 | # |
1145 | # CONFIG_CRYPTO_FIPS is not set | ||
1253 | CONFIG_CRYPTO_ALGAPI=m | 1146 | CONFIG_CRYPTO_ALGAPI=m |
1147 | CONFIG_CRYPTO_ALGAPI2=m | ||
1148 | CONFIG_CRYPTO_AEAD2=m | ||
1254 | CONFIG_CRYPTO_BLKCIPHER=m | 1149 | CONFIG_CRYPTO_BLKCIPHER=m |
1150 | CONFIG_CRYPTO_BLKCIPHER2=m | ||
1151 | CONFIG_CRYPTO_HASH2=m | ||
1152 | CONFIG_CRYPTO_RNG2=m | ||
1255 | CONFIG_CRYPTO_MANAGER=m | 1153 | CONFIG_CRYPTO_MANAGER=m |
1154 | CONFIG_CRYPTO_MANAGER2=m | ||
1256 | # CONFIG_CRYPTO_GF128MUL is not set | 1155 | # CONFIG_CRYPTO_GF128MUL is not set |
1257 | # CONFIG_CRYPTO_NULL is not set | 1156 | # CONFIG_CRYPTO_NULL is not set |
1258 | # CONFIG_CRYPTO_CRYPTD is not set | 1157 | # CONFIG_CRYPTO_CRYPTD is not set |
@@ -1324,14 +1223,17 @@ CONFIG_CRYPTO_ARC4=m | |||
1324 | # | 1223 | # |
1325 | # CONFIG_CRYPTO_DEFLATE is not set | 1224 | # CONFIG_CRYPTO_DEFLATE is not set |
1326 | # CONFIG_CRYPTO_LZO is not set | 1225 | # CONFIG_CRYPTO_LZO is not set |
1226 | |||
1227 | # | ||
1228 | # Random Number Generation | ||
1229 | # | ||
1230 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1327 | CONFIG_CRYPTO_HW=y | 1231 | CONFIG_CRYPTO_HW=y |
1328 | 1232 | ||
1329 | # | 1233 | # |
1330 | # Library routines | 1234 | # Library routines |
1331 | # | 1235 | # |
1332 | CONFIG_BITREVERSE=y | 1236 | CONFIG_BITREVERSE=y |
1333 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1334 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
1335 | CONFIG_CRC_CCITT=y | 1237 | CONFIG_CRC_CCITT=y |
1336 | # CONFIG_CRC16 is not set | 1238 | # CONFIG_CRC16 is not set |
1337 | # CONFIG_CRC_T10DIF is not set | 1239 | # CONFIG_CRC_T10DIF is not set |
diff --git a/arch/arm/configs/h5000_defconfig b/arch/arm/configs/h5000_defconfig new file mode 100644 index 000000000000..649baa370495 --- /dev/null +++ b/arch/arm/configs/h5000_defconfig | |||
@@ -0,0 +1,996 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.27-rc6 | ||
4 | # Tue Sep 16 16:13:48 2008 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_MMU=y | ||
12 | # CONFIG_NO_IOPORT is not set | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
25 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
26 | CONFIG_ZONE_DMA=y | ||
27 | CONFIG_ARCH_MTD_XIP=y | ||
28 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
29 | CONFIG_VECTORS_BASE=0xffff0000 | ||
30 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
31 | |||
32 | # | ||
33 | # General setup | ||
34 | # | ||
35 | CONFIG_EXPERIMENTAL=y | ||
36 | CONFIG_BROKEN_ON_SMP=y | ||
37 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
38 | CONFIG_LOCALVERSION="" | ||
39 | CONFIG_LOCALVERSION_AUTO=y | ||
40 | CONFIG_SWAP=y | ||
41 | CONFIG_SYSVIPC=y | ||
42 | CONFIG_SYSVIPC_SYSCTL=y | ||
43 | # CONFIG_POSIX_MQUEUE is not set | ||
44 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
45 | # CONFIG_TASKSTATS is not set | ||
46 | # CONFIG_AUDIT is not set | ||
47 | CONFIG_IKCONFIG=y | ||
48 | CONFIG_IKCONFIG_PROC=y | ||
49 | CONFIG_LOG_BUF_SHIFT=16 | ||
50 | # CONFIG_CGROUPS is not set | ||
51 | CONFIG_GROUP_SCHED=y | ||
52 | CONFIG_FAIR_GROUP_SCHED=y | ||
53 | # CONFIG_RT_GROUP_SCHED is not set | ||
54 | CONFIG_USER_SCHED=y | ||
55 | # CONFIG_CGROUP_SCHED is not set | ||
56 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
57 | # CONFIG_RELAY is not set | ||
58 | # CONFIG_NAMESPACES is not set | ||
59 | # CONFIG_BLK_DEV_INITRD is not set | ||
60 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
61 | CONFIG_SYSCTL=y | ||
62 | CONFIG_EMBEDDED=y | ||
63 | # CONFIG_UID16 is not set | ||
64 | CONFIG_SYSCTL_SYSCALL=y | ||
65 | CONFIG_KALLSYMS=y | ||
66 | # CONFIG_KALLSYMS_ALL is not set | ||
67 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
68 | CONFIG_HOTPLUG=y | ||
69 | CONFIG_PRINTK=y | ||
70 | CONFIG_BUG=y | ||
71 | CONFIG_ELF_CORE=y | ||
72 | CONFIG_COMPAT_BRK=y | ||
73 | CONFIG_BASE_FULL=y | ||
74 | CONFIG_FUTEX=y | ||
75 | CONFIG_ANON_INODES=y | ||
76 | CONFIG_EPOLL=y | ||
77 | CONFIG_SIGNALFD=y | ||
78 | CONFIG_TIMERFD=y | ||
79 | CONFIG_EVENTFD=y | ||
80 | CONFIG_SHMEM=y | ||
81 | CONFIG_VM_EVENT_COUNTERS=y | ||
82 | CONFIG_SLAB=y | ||
83 | # CONFIG_SLUB is not set | ||
84 | # CONFIG_SLOB is not set | ||
85 | # CONFIG_PROFILING is not set | ||
86 | # CONFIG_MARKERS is not set | ||
87 | CONFIG_HAVE_OPROFILE=y | ||
88 | # CONFIG_KPROBES is not set | ||
89 | # CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set | ||
90 | # CONFIG_HAVE_IOREMAP_PROT is not set | ||
91 | CONFIG_HAVE_KPROBES=y | ||
92 | CONFIG_HAVE_KRETPROBES=y | ||
93 | # CONFIG_HAVE_ARCH_TRACEHOOK is not set | ||
94 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
95 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | ||
96 | CONFIG_HAVE_CLK=y | ||
97 | # CONFIG_PROC_PAGE_MONITOR is not set | ||
98 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
99 | CONFIG_SLABINFO=y | ||
100 | CONFIG_RT_MUTEXES=y | ||
101 | # CONFIG_TINY_SHMEM is not set | ||
102 | CONFIG_BASE_SMALL=0 | ||
103 | CONFIG_MODULES=y | ||
104 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
105 | CONFIG_MODULE_UNLOAD=y | ||
106 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
107 | # CONFIG_MODVERSIONS is not set | ||
108 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
109 | CONFIG_KMOD=y | ||
110 | CONFIG_BLOCK=y | ||
111 | # CONFIG_LBD is not set | ||
112 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
113 | # CONFIG_LSF is not set | ||
114 | # CONFIG_BLK_DEV_BSG is not set | ||
115 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
116 | |||
117 | # | ||
118 | # IO Schedulers | ||
119 | # | ||
120 | CONFIG_IOSCHED_NOOP=y | ||
121 | CONFIG_IOSCHED_AS=y | ||
122 | CONFIG_IOSCHED_DEADLINE=y | ||
123 | # CONFIG_IOSCHED_CFQ is not set | ||
124 | CONFIG_DEFAULT_AS=y | ||
125 | # CONFIG_DEFAULT_DEADLINE is not set | ||
126 | # CONFIG_DEFAULT_CFQ is not set | ||
127 | # CONFIG_DEFAULT_NOOP is not set | ||
128 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
129 | CONFIG_CLASSIC_RCU=y | ||
130 | |||
131 | # | ||
132 | # System Type | ||
133 | # | ||
134 | # CONFIG_ARCH_AAEC2000 is not set | ||
135 | # CONFIG_ARCH_INTEGRATOR is not set | ||
136 | # CONFIG_ARCH_REALVIEW is not set | ||
137 | # CONFIG_ARCH_VERSATILE is not set | ||
138 | # CONFIG_ARCH_AT91 is not set | ||
139 | # CONFIG_ARCH_CLPS7500 is not set | ||
140 | # CONFIG_ARCH_CLPS711X is not set | ||
141 | # CONFIG_ARCH_EBSA110 is not set | ||
142 | # CONFIG_ARCH_EP93XX is not set | ||
143 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
144 | # CONFIG_ARCH_NETX is not set | ||
145 | # CONFIG_ARCH_H720X is not set | ||
146 | # CONFIG_ARCH_IMX is not set | ||
147 | # CONFIG_ARCH_IOP13XX is not set | ||
148 | # CONFIG_ARCH_IOP32X is not set | ||
149 | # CONFIG_ARCH_IOP33X is not set | ||
150 | # CONFIG_ARCH_IXP23XX is not set | ||
151 | # CONFIG_ARCH_IXP2000 is not set | ||
152 | # CONFIG_ARCH_IXP4XX is not set | ||
153 | # CONFIG_ARCH_L7200 is not set | ||
154 | # CONFIG_ARCH_KIRKWOOD is not set | ||
155 | # CONFIG_ARCH_KS8695 is not set | ||
156 | # CONFIG_ARCH_NS9XXX is not set | ||
157 | # CONFIG_ARCH_LOKI is not set | ||
158 | # CONFIG_ARCH_MV78XX0 is not set | ||
159 | # CONFIG_ARCH_MXC is not set | ||
160 | # CONFIG_ARCH_ORION5X is not set | ||
161 | # CONFIG_ARCH_PNX4008 is not set | ||
162 | CONFIG_ARCH_PXA=y | ||
163 | # CONFIG_ARCH_RPC is not set | ||
164 | # CONFIG_ARCH_SA1100 is not set | ||
165 | # CONFIG_ARCH_S3C2410 is not set | ||
166 | # CONFIG_ARCH_SHARK is not set | ||
167 | # CONFIG_ARCH_LH7A40X is not set | ||
168 | # CONFIG_ARCH_DAVINCI is not set | ||
169 | # CONFIG_ARCH_OMAP is not set | ||
170 | # CONFIG_ARCH_MSM7X00A is not set | ||
171 | |||
172 | # | ||
173 | # Intel PXA2xx/PXA3xx Implementations | ||
174 | # | ||
175 | # CONFIG_ARCH_GUMSTIX is not set | ||
176 | # CONFIG_ARCH_LUBBOCK is not set | ||
177 | # CONFIG_MACH_LOGICPD_PXA270 is not set | ||
178 | # CONFIG_MACH_MAINSTONE is not set | ||
179 | # CONFIG_ARCH_PXA_IDP is not set | ||
180 | # CONFIG_PXA_SHARPSL is not set | ||
181 | # CONFIG_ARCH_PXA_ESERIES is not set | ||
182 | CONFIG_MACH_H5000=y | ||
183 | # CONFIG_MACH_TRIZEPS4 is not set | ||
184 | # CONFIG_MACH_EM_X270 is not set | ||
185 | # CONFIG_MACH_COLIBRI is not set | ||
186 | # CONFIG_MACH_ZYLONITE is not set | ||
187 | # CONFIG_MACH_LITTLETON is not set | ||
188 | # CONFIG_MACH_TAVOREVB is not set | ||
189 | # CONFIG_MACH_SAAR is not set | ||
190 | # CONFIG_MACH_ARMCORE is not set | ||
191 | # CONFIG_MACH_MAGICIAN is not set | ||
192 | # CONFIG_MACH_PCM027 is not set | ||
193 | # CONFIG_ARCH_PXA_PALM is not set | ||
194 | # CONFIG_PXA_EZX is not set | ||
195 | CONFIG_PXA25x=y | ||
196 | # CONFIG_PXA_PWM is not set | ||
197 | |||
198 | # | ||
199 | # Boot options | ||
200 | # | ||
201 | |||
202 | # | ||
203 | # Power management | ||
204 | # | ||
205 | |||
206 | # | ||
207 | # Processor Type | ||
208 | # | ||
209 | CONFIG_CPU_32=y | ||
210 | CONFIG_CPU_XSCALE=y | ||
211 | CONFIG_CPU_32v5=y | ||
212 | CONFIG_CPU_ABRT_EV5T=y | ||
213 | CONFIG_CPU_PABRT_NOIFAR=y | ||
214 | CONFIG_CPU_CACHE_VIVT=y | ||
215 | CONFIG_CPU_TLB_V4WBI=y | ||
216 | CONFIG_CPU_CP15=y | ||
217 | CONFIG_CPU_CP15_MMU=y | ||
218 | |||
219 | # | ||
220 | # Processor Features | ||
221 | # | ||
222 | CONFIG_ARM_THUMB=y | ||
223 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
224 | # CONFIG_OUTER_CACHE is not set | ||
225 | # CONFIG_IWMMXT is not set | ||
226 | CONFIG_XSCALE_PMU=y | ||
227 | |||
228 | # | ||
229 | # Bus support | ||
230 | # | ||
231 | # CONFIG_PCI_SYSCALL is not set | ||
232 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
233 | # CONFIG_PCCARD is not set | ||
234 | |||
235 | # | ||
236 | # Kernel Features | ||
237 | # | ||
238 | CONFIG_TICK_ONESHOT=y | ||
239 | # CONFIG_NO_HZ is not set | ||
240 | # CONFIG_HIGH_RES_TIMERS is not set | ||
241 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
242 | # CONFIG_PREEMPT is not set | ||
243 | CONFIG_HZ=100 | ||
244 | CONFIG_AEABI=y | ||
245 | CONFIG_OABI_COMPAT=y | ||
246 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
247 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
248 | CONFIG_SELECT_MEMORY_MODEL=y | ||
249 | CONFIG_FLATMEM_MANUAL=y | ||
250 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
251 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
252 | CONFIG_FLATMEM=y | ||
253 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
254 | # CONFIG_SPARSEMEM_STATIC is not set | ||
255 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
256 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
257 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
258 | # CONFIG_RESOURCES_64BIT is not set | ||
259 | CONFIG_ZONE_DMA_FLAG=1 | ||
260 | CONFIG_BOUNCE=y | ||
261 | CONFIG_VIRT_TO_BUS=y | ||
262 | CONFIG_ALIGNMENT_TRAP=y | ||
263 | |||
264 | # | ||
265 | # Boot options | ||
266 | # | ||
267 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
268 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
269 | CONFIG_CMDLINE="keepinitrd" | ||
270 | # CONFIG_XIP_KERNEL is not set | ||
271 | CONFIG_KEXEC=y | ||
272 | CONFIG_ATAGS_PROC=y | ||
273 | |||
274 | # | ||
275 | # CPU Frequency scaling | ||
276 | # | ||
277 | # CONFIG_CPU_FREQ is not set | ||
278 | |||
279 | # | ||
280 | # Floating point emulation | ||
281 | # | ||
282 | |||
283 | # | ||
284 | # At least one emulation must be selected | ||
285 | # | ||
286 | CONFIG_FPE_NWFPE=y | ||
287 | # CONFIG_FPE_NWFPE_XP is not set | ||
288 | # CONFIG_FPE_FASTFPE is not set | ||
289 | |||
290 | # | ||
291 | # Userspace binary formats | ||
292 | # | ||
293 | CONFIG_BINFMT_ELF=y | ||
294 | # CONFIG_BINFMT_AOUT is not set | ||
295 | # CONFIG_BINFMT_MISC is not set | ||
296 | |||
297 | # | ||
298 | # Power management options | ||
299 | # | ||
300 | CONFIG_PM=y | ||
301 | # CONFIG_PM_DEBUG is not set | ||
302 | CONFIG_PM_SLEEP=y | ||
303 | CONFIG_SUSPEND=y | ||
304 | CONFIG_SUSPEND_FREEZER=y | ||
305 | CONFIG_APM_EMULATION=y | ||
306 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
307 | CONFIG_NET=y | ||
308 | |||
309 | # | ||
310 | # Networking options | ||
311 | # | ||
312 | CONFIG_PACKET=y | ||
313 | CONFIG_PACKET_MMAP=y | ||
314 | CONFIG_UNIX=y | ||
315 | # CONFIG_NET_KEY is not set | ||
316 | CONFIG_INET=y | ||
317 | CONFIG_IP_MULTICAST=y | ||
318 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
319 | CONFIG_IP_FIB_HASH=y | ||
320 | CONFIG_IP_PNP=y | ||
321 | # CONFIG_IP_PNP_DHCP is not set | ||
322 | # CONFIG_IP_PNP_BOOTP is not set | ||
323 | # CONFIG_IP_PNP_RARP is not set | ||
324 | # CONFIG_NET_IPIP is not set | ||
325 | # CONFIG_NET_IPGRE is not set | ||
326 | # CONFIG_IP_MROUTE is not set | ||
327 | # CONFIG_ARPD is not set | ||
328 | # CONFIG_SYN_COOKIES is not set | ||
329 | # CONFIG_INET_AH is not set | ||
330 | # CONFIG_INET_ESP is not set | ||
331 | # CONFIG_INET_IPCOMP is not set | ||
332 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
333 | # CONFIG_INET_TUNNEL is not set | ||
334 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
335 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
336 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
337 | # CONFIG_INET_LRO is not set | ||
338 | # CONFIG_INET_DIAG is not set | ||
339 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
340 | CONFIG_TCP_CONG_CUBIC=y | ||
341 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
342 | # CONFIG_TCP_MD5SIG is not set | ||
343 | # CONFIG_IPV6 is not set | ||
344 | # CONFIG_NETWORK_SECMARK is not set | ||
345 | # CONFIG_NETFILTER is not set | ||
346 | # CONFIG_IP_DCCP is not set | ||
347 | # CONFIG_IP_SCTP is not set | ||
348 | # CONFIG_TIPC is not set | ||
349 | # CONFIG_ATM is not set | ||
350 | # CONFIG_BRIDGE is not set | ||
351 | # CONFIG_VLAN_8021Q is not set | ||
352 | # CONFIG_DECNET is not set | ||
353 | # CONFIG_LLC2 is not set | ||
354 | # CONFIG_IPX is not set | ||
355 | # CONFIG_ATALK is not set | ||
356 | # CONFIG_X25 is not set | ||
357 | # CONFIG_LAPB is not set | ||
358 | # CONFIG_ECONET is not set | ||
359 | # CONFIG_WAN_ROUTER is not set | ||
360 | # CONFIG_NET_SCHED is not set | ||
361 | |||
362 | # | ||
363 | # Network testing | ||
364 | # | ||
365 | # CONFIG_NET_PKTGEN is not set | ||
366 | # CONFIG_HAMRADIO is not set | ||
367 | # CONFIG_CAN is not set | ||
368 | # CONFIG_IRDA is not set | ||
369 | # CONFIG_BT is not set | ||
370 | # CONFIG_AF_RXRPC is not set | ||
371 | |||
372 | # | ||
373 | # Wireless | ||
374 | # | ||
375 | # CONFIG_CFG80211 is not set | ||
376 | # CONFIG_WIRELESS_EXT is not set | ||
377 | # CONFIG_MAC80211 is not set | ||
378 | # CONFIG_IEEE80211 is not set | ||
379 | # CONFIG_RFKILL is not set | ||
380 | # CONFIG_NET_9P is not set | ||
381 | |||
382 | # | ||
383 | # Device Drivers | ||
384 | # | ||
385 | |||
386 | # | ||
387 | # Generic Driver Options | ||
388 | # | ||
389 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
390 | CONFIG_STANDALONE=y | ||
391 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
392 | CONFIG_FW_LOADER=y | ||
393 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
394 | CONFIG_EXTRA_FIRMWARE="" | ||
395 | # CONFIG_DEBUG_DRIVER is not set | ||
396 | # CONFIG_DEBUG_DEVRES is not set | ||
397 | # CONFIG_SYS_HYPERVISOR is not set | ||
398 | # CONFIG_CONNECTOR is not set | ||
399 | CONFIG_MTD=y | ||
400 | # CONFIG_MTD_DEBUG is not set | ||
401 | # CONFIG_MTD_CONCAT is not set | ||
402 | CONFIG_MTD_PARTITIONS=y | ||
403 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
404 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
405 | # CONFIG_MTD_AFS_PARTS is not set | ||
406 | # CONFIG_MTD_AR7_PARTS is not set | ||
407 | |||
408 | # | ||
409 | # User Modules And Translation Layers | ||
410 | # | ||
411 | # CONFIG_MTD_CHAR is not set | ||
412 | CONFIG_MTD_BLKDEVS=y | ||
413 | CONFIG_MTD_BLOCK=y | ||
414 | # CONFIG_FTL is not set | ||
415 | # CONFIG_NFTL is not set | ||
416 | # CONFIG_INFTL is not set | ||
417 | # CONFIG_RFD_FTL is not set | ||
418 | # CONFIG_SSFDC is not set | ||
419 | # CONFIG_MTD_OOPS is not set | ||
420 | |||
421 | # | ||
422 | # RAM/ROM/Flash chip drivers | ||
423 | # | ||
424 | CONFIG_MTD_CFI=y | ||
425 | # CONFIG_MTD_JEDECPROBE is not set | ||
426 | CONFIG_MTD_GEN_PROBE=y | ||
427 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
428 | CONFIG_MTD_CFI_NOSWAP=y | ||
429 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
430 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
431 | CONFIG_MTD_CFI_GEOMETRY=y | ||
432 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
433 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
434 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
435 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
436 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
437 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
438 | CONFIG_MTD_CFI_I1=y | ||
439 | CONFIG_MTD_CFI_I2=y | ||
440 | # CONFIG_MTD_CFI_I4 is not set | ||
441 | # CONFIG_MTD_CFI_I8 is not set | ||
442 | # CONFIG_MTD_OTP is not set | ||
443 | CONFIG_MTD_CFI_INTELEXT=y | ||
444 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
445 | # CONFIG_MTD_CFI_STAA is not set | ||
446 | CONFIG_MTD_CFI_UTIL=y | ||
447 | # CONFIG_MTD_RAM is not set | ||
448 | # CONFIG_MTD_ROM is not set | ||
449 | # CONFIG_MTD_ABSENT is not set | ||
450 | # CONFIG_MTD_XIP is not set | ||
451 | |||
452 | # | ||
453 | # Mapping drivers for chip access | ||
454 | # | ||
455 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
456 | CONFIG_MTD_PHYSMAP=y | ||
457 | CONFIG_MTD_PHYSMAP_START=0x8000000 | ||
458 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
459 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
460 | # CONFIG_MTD_PXA2XX is not set | ||
461 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
462 | # CONFIG_MTD_SHARP_SL is not set | ||
463 | # CONFIG_MTD_PLATRAM is not set | ||
464 | |||
465 | # | ||
466 | # Self-contained MTD device drivers | ||
467 | # | ||
468 | # CONFIG_MTD_SLRAM is not set | ||
469 | # CONFIG_MTD_PHRAM is not set | ||
470 | # CONFIG_MTD_MTDRAM is not set | ||
471 | # CONFIG_MTD_BLOCK2MTD is not set | ||
472 | |||
473 | # | ||
474 | # Disk-On-Chip Device Drivers | ||
475 | # | ||
476 | # CONFIG_MTD_DOC2000 is not set | ||
477 | # CONFIG_MTD_DOC2001 is not set | ||
478 | # CONFIG_MTD_DOC2001PLUS is not set | ||
479 | # CONFIG_MTD_NAND is not set | ||
480 | # CONFIG_MTD_ONENAND is not set | ||
481 | |||
482 | # | ||
483 | # UBI - Unsorted block images | ||
484 | # | ||
485 | # CONFIG_MTD_UBI is not set | ||
486 | # CONFIG_PARPORT is not set | ||
487 | CONFIG_BLK_DEV=y | ||
488 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
489 | # CONFIG_BLK_DEV_LOOP is not set | ||
490 | # CONFIG_BLK_DEV_NBD is not set | ||
491 | # CONFIG_BLK_DEV_RAM is not set | ||
492 | # CONFIG_CDROM_PKTCDVD is not set | ||
493 | # CONFIG_ATA_OVER_ETH is not set | ||
494 | CONFIG_MISC_DEVICES=y | ||
495 | # CONFIG_EEPROM_93CX6 is not set | ||
496 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
497 | CONFIG_HAVE_IDE=y | ||
498 | # CONFIG_IDE is not set | ||
499 | |||
500 | # | ||
501 | # SCSI device support | ||
502 | # | ||
503 | # CONFIG_RAID_ATTRS is not set | ||
504 | # CONFIG_SCSI is not set | ||
505 | # CONFIG_SCSI_DMA is not set | ||
506 | # CONFIG_SCSI_NETLINK is not set | ||
507 | # CONFIG_ATA is not set | ||
508 | # CONFIG_MD is not set | ||
509 | # CONFIG_NETDEVICES is not set | ||
510 | # CONFIG_ISDN is not set | ||
511 | |||
512 | # | ||
513 | # Input device support | ||
514 | # | ||
515 | CONFIG_INPUT=y | ||
516 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
517 | # CONFIG_INPUT_POLLDEV is not set | ||
518 | |||
519 | # | ||
520 | # Userland interfaces | ||
521 | # | ||
522 | # CONFIG_INPUT_MOUSEDEV is not set | ||
523 | # CONFIG_INPUT_JOYDEV is not set | ||
524 | # CONFIG_INPUT_EVDEV is not set | ||
525 | # CONFIG_INPUT_EVBUG is not set | ||
526 | # CONFIG_INPUT_APMPOWER is not set | ||
527 | |||
528 | # | ||
529 | # Input Device Drivers | ||
530 | # | ||
531 | # CONFIG_INPUT_KEYBOARD is not set | ||
532 | # CONFIG_INPUT_MOUSE is not set | ||
533 | # CONFIG_INPUT_JOYSTICK is not set | ||
534 | # CONFIG_INPUT_TABLET is not set | ||
535 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
536 | # CONFIG_INPUT_MISC is not set | ||
537 | |||
538 | # | ||
539 | # Hardware I/O ports | ||
540 | # | ||
541 | # CONFIG_SERIO is not set | ||
542 | # CONFIG_GAMEPORT is not set | ||
543 | |||
544 | # | ||
545 | # Character devices | ||
546 | # | ||
547 | CONFIG_VT=y | ||
548 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
549 | CONFIG_VT_CONSOLE=y | ||
550 | CONFIG_HW_CONSOLE=y | ||
551 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
552 | CONFIG_DEVKMEM=y | ||
553 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
554 | |||
555 | # | ||
556 | # Serial drivers | ||
557 | # | ||
558 | # CONFIG_SERIAL_8250 is not set | ||
559 | |||
560 | # | ||
561 | # Non-8250 serial port support | ||
562 | # | ||
563 | CONFIG_SERIAL_PXA=y | ||
564 | CONFIG_SERIAL_PXA_CONSOLE=y | ||
565 | CONFIG_SERIAL_CORE=y | ||
566 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
567 | CONFIG_UNIX98_PTYS=y | ||
568 | CONFIG_LEGACY_PTYS=y | ||
569 | CONFIG_LEGACY_PTY_COUNT=32 | ||
570 | # CONFIG_IPMI_HANDLER is not set | ||
571 | # CONFIG_HW_RANDOM is not set | ||
572 | # CONFIG_NVRAM is not set | ||
573 | # CONFIG_R3964 is not set | ||
574 | # CONFIG_RAW_DRIVER is not set | ||
575 | # CONFIG_TCG_TPM is not set | ||
576 | # CONFIG_I2C is not set | ||
577 | # CONFIG_SPI is not set | ||
578 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
579 | CONFIG_GPIOLIB=y | ||
580 | # CONFIG_DEBUG_GPIO is not set | ||
581 | # CONFIG_GPIO_SYSFS is not set | ||
582 | |||
583 | # | ||
584 | # I2C GPIO expanders: | ||
585 | # | ||
586 | |||
587 | # | ||
588 | # PCI GPIO expanders: | ||
589 | # | ||
590 | |||
591 | # | ||
592 | # SPI GPIO expanders: | ||
593 | # | ||
594 | # CONFIG_W1 is not set | ||
595 | # CONFIG_POWER_SUPPLY is not set | ||
596 | # CONFIG_HWMON is not set | ||
597 | # CONFIG_WATCHDOG is not set | ||
598 | |||
599 | # | ||
600 | # Sonics Silicon Backplane | ||
601 | # | ||
602 | CONFIG_SSB_POSSIBLE=y | ||
603 | # CONFIG_SSB is not set | ||
604 | |||
605 | # | ||
606 | # Multifunction device drivers | ||
607 | # | ||
608 | # CONFIG_MFD_CORE is not set | ||
609 | # CONFIG_MFD_SM501 is not set | ||
610 | # CONFIG_HTC_EGPIO is not set | ||
611 | # CONFIG_HTC_PASIC3 is not set | ||
612 | # CONFIG_MFD_TMIO is not set | ||
613 | # CONFIG_MFD_T7L66XB is not set | ||
614 | # CONFIG_MFD_TC6387XB is not set | ||
615 | # CONFIG_MFD_TC6393XB is not set | ||
616 | |||
617 | # | ||
618 | # Multimedia devices | ||
619 | # | ||
620 | |||
621 | # | ||
622 | # Multimedia core support | ||
623 | # | ||
624 | # CONFIG_VIDEO_DEV is not set | ||
625 | # CONFIG_DVB_CORE is not set | ||
626 | # CONFIG_VIDEO_MEDIA is not set | ||
627 | |||
628 | # | ||
629 | # Multimedia drivers | ||
630 | # | ||
631 | # CONFIG_DAB is not set | ||
632 | |||
633 | # | ||
634 | # Graphics support | ||
635 | # | ||
636 | # CONFIG_VGASTATE is not set | ||
637 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
638 | # CONFIG_FB is not set | ||
639 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
640 | |||
641 | # | ||
642 | # Display device support | ||
643 | # | ||
644 | # CONFIG_DISPLAY_SUPPORT is not set | ||
645 | |||
646 | # | ||
647 | # Console display driver support | ||
648 | # | ||
649 | # CONFIG_VGA_CONSOLE is not set | ||
650 | CONFIG_DUMMY_CONSOLE=y | ||
651 | # CONFIG_SOUND is not set | ||
652 | # CONFIG_HID_SUPPORT is not set | ||
653 | CONFIG_USB_SUPPORT=y | ||
654 | CONFIG_USB_ARCH_HAS_HCD=y | ||
655 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
656 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
657 | # CONFIG_USB is not set | ||
658 | # CONFIG_USB_OTG_WHITELIST is not set | ||
659 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
660 | # CONFIG_USB_MUSB_HDRC is not set | ||
661 | # CONFIG_USB_GADGET_MUSB_HDRC is not set | ||
662 | |||
663 | # | ||
664 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
665 | # | ||
666 | CONFIG_USB_GADGET=y | ||
667 | # CONFIG_USB_GADGET_DEBUG is not set | ||
668 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
669 | CONFIG_USB_GADGET_SELECTED=y | ||
670 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
671 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
672 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
673 | # CONFIG_USB_GADGET_NET2280 is not set | ||
674 | CONFIG_USB_GADGET_PXA25X=y | ||
675 | CONFIG_USB_PXA25X=y | ||
676 | CONFIG_USB_PXA25X_SMALL=y | ||
677 | # CONFIG_USB_GADGET_M66592 is not set | ||
678 | # CONFIG_USB_GADGET_PXA27X is not set | ||
679 | # CONFIG_USB_GADGET_GOKU is not set | ||
680 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
681 | # CONFIG_USB_GADGET_OMAP is not set | ||
682 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
683 | # CONFIG_USB_GADGET_AT91 is not set | ||
684 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
685 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
686 | # CONFIG_USB_ZERO is not set | ||
687 | CONFIG_USB_ETH=y | ||
688 | # CONFIG_USB_ETH_RNDIS is not set | ||
689 | # CONFIG_USB_GADGETFS is not set | ||
690 | # CONFIG_USB_FILE_STORAGE is not set | ||
691 | # CONFIG_USB_G_SERIAL is not set | ||
692 | # CONFIG_USB_MIDI_GADGET is not set | ||
693 | # CONFIG_USB_G_PRINTER is not set | ||
694 | # CONFIG_USB_CDC_COMPOSITE is not set | ||
695 | # CONFIG_MMC is not set | ||
696 | # CONFIG_NEW_LEDS is not set | ||
697 | CONFIG_RTC_LIB=y | ||
698 | CONFIG_RTC_CLASS=y | ||
699 | CONFIG_RTC_HCTOSYS=y | ||
700 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
701 | # CONFIG_RTC_DEBUG is not set | ||
702 | |||
703 | # | ||
704 | # RTC interfaces | ||
705 | # | ||
706 | CONFIG_RTC_INTF_SYSFS=y | ||
707 | CONFIG_RTC_INTF_PROC=y | ||
708 | CONFIG_RTC_INTF_DEV=y | ||
709 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
710 | # CONFIG_RTC_DRV_TEST is not set | ||
711 | |||
712 | # | ||
713 | # SPI RTC drivers | ||
714 | # | ||
715 | |||
716 | # | ||
717 | # Platform RTC drivers | ||
718 | # | ||
719 | # CONFIG_RTC_DRV_CMOS is not set | ||
720 | # CONFIG_RTC_DRV_DS1511 is not set | ||
721 | # CONFIG_RTC_DRV_DS1553 is not set | ||
722 | # CONFIG_RTC_DRV_DS1742 is not set | ||
723 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
724 | # CONFIG_RTC_DRV_M48T86 is not set | ||
725 | # CONFIG_RTC_DRV_M48T59 is not set | ||
726 | # CONFIG_RTC_DRV_V3020 is not set | ||
727 | |||
728 | # | ||
729 | # on-CPU RTC drivers | ||
730 | # | ||
731 | CONFIG_RTC_DRV_SA1100=y | ||
732 | # CONFIG_DMADEVICES is not set | ||
733 | |||
734 | # | ||
735 | # Voltage and Current regulators | ||
736 | # | ||
737 | # CONFIG_REGULATOR is not set | ||
738 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set | ||
739 | # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set | ||
740 | # CONFIG_REGULATOR_BQ24022 is not set | ||
741 | # CONFIG_UIO is not set | ||
742 | |||
743 | # | ||
744 | # File systems | ||
745 | # | ||
746 | CONFIG_EXT2_FS=y | ||
747 | # CONFIG_EXT2_FS_XATTR is not set | ||
748 | # CONFIG_EXT2_FS_XIP is not set | ||
749 | # CONFIG_EXT3_FS is not set | ||
750 | # CONFIG_EXT4DEV_FS is not set | ||
751 | # CONFIG_REISERFS_FS is not set | ||
752 | # CONFIG_JFS_FS is not set | ||
753 | # CONFIG_FS_POSIX_ACL is not set | ||
754 | # CONFIG_XFS_FS is not set | ||
755 | # CONFIG_OCFS2_FS is not set | ||
756 | CONFIG_DNOTIFY=y | ||
757 | CONFIG_INOTIFY=y | ||
758 | CONFIG_INOTIFY_USER=y | ||
759 | # CONFIG_QUOTA is not set | ||
760 | # CONFIG_AUTOFS_FS is not set | ||
761 | # CONFIG_AUTOFS4_FS is not set | ||
762 | # CONFIG_FUSE_FS is not set | ||
763 | |||
764 | # | ||
765 | # CD-ROM/DVD Filesystems | ||
766 | # | ||
767 | # CONFIG_ISO9660_FS is not set | ||
768 | # CONFIG_UDF_FS is not set | ||
769 | |||
770 | # | ||
771 | # DOS/FAT/NT Filesystems | ||
772 | # | ||
773 | # CONFIG_MSDOS_FS is not set | ||
774 | # CONFIG_VFAT_FS is not set | ||
775 | # CONFIG_NTFS_FS is not set | ||
776 | |||
777 | # | ||
778 | # Pseudo filesystems | ||
779 | # | ||
780 | CONFIG_PROC_FS=y | ||
781 | CONFIG_PROC_SYSCTL=y | ||
782 | CONFIG_SYSFS=y | ||
783 | CONFIG_TMPFS=y | ||
784 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
785 | # CONFIG_HUGETLB_PAGE is not set | ||
786 | # CONFIG_CONFIGFS_FS is not set | ||
787 | |||
788 | # | ||
789 | # Miscellaneous filesystems | ||
790 | # | ||
791 | # CONFIG_ADFS_FS is not set | ||
792 | # CONFIG_AFFS_FS is not set | ||
793 | # CONFIG_HFS_FS is not set | ||
794 | # CONFIG_HFSPLUS_FS is not set | ||
795 | # CONFIG_BEFS_FS is not set | ||
796 | # CONFIG_BFS_FS is not set | ||
797 | # CONFIG_EFS_FS is not set | ||
798 | CONFIG_JFFS2_FS=y | ||
799 | CONFIG_JFFS2_FS_DEBUG=0 | ||
800 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
801 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
802 | # CONFIG_JFFS2_SUMMARY is not set | ||
803 | # CONFIG_JFFS2_FS_XATTR is not set | ||
804 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y | ||
805 | CONFIG_JFFS2_ZLIB=y | ||
806 | # CONFIG_JFFS2_LZO is not set | ||
807 | CONFIG_JFFS2_RTIME=y | ||
808 | # CONFIG_JFFS2_RUBIN is not set | ||
809 | # CONFIG_JFFS2_CMODE_NONE is not set | ||
810 | CONFIG_JFFS2_CMODE_PRIORITY=y | ||
811 | # CONFIG_JFFS2_CMODE_SIZE is not set | ||
812 | # CONFIG_JFFS2_CMODE_FAVOURLZO is not set | ||
813 | # CONFIG_CRAMFS is not set | ||
814 | # CONFIG_VXFS_FS is not set | ||
815 | # CONFIG_MINIX_FS is not set | ||
816 | # CONFIG_OMFS_FS is not set | ||
817 | # CONFIG_HPFS_FS is not set | ||
818 | # CONFIG_QNX4FS_FS is not set | ||
819 | # CONFIG_ROMFS_FS is not set | ||
820 | # CONFIG_SYSV_FS is not set | ||
821 | # CONFIG_UFS_FS is not set | ||
822 | # CONFIG_NETWORK_FILESYSTEMS is not set | ||
823 | |||
824 | # | ||
825 | # Partition Types | ||
826 | # | ||
827 | # CONFIG_PARTITION_ADVANCED is not set | ||
828 | CONFIG_MSDOS_PARTITION=y | ||
829 | # CONFIG_NLS is not set | ||
830 | # CONFIG_DLM is not set | ||
831 | |||
832 | # | ||
833 | # Kernel hacking | ||
834 | # | ||
835 | CONFIG_PRINTK_TIME=y | ||
836 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
837 | CONFIG_ENABLE_MUST_CHECK=y | ||
838 | CONFIG_FRAME_WARN=1024 | ||
839 | # CONFIG_MAGIC_SYSRQ is not set | ||
840 | # CONFIG_UNUSED_SYMBOLS is not set | ||
841 | # CONFIG_DEBUG_FS is not set | ||
842 | # CONFIG_HEADERS_CHECK is not set | ||
843 | CONFIG_DEBUG_KERNEL=y | ||
844 | # CONFIG_DEBUG_SHIRQ is not set | ||
845 | CONFIG_DETECT_SOFTLOCKUP=y | ||
846 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
847 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
848 | # CONFIG_SCHED_DEBUG is not set | ||
849 | # CONFIG_SCHEDSTATS is not set | ||
850 | # CONFIG_TIMER_STATS is not set | ||
851 | # CONFIG_DEBUG_OBJECTS is not set | ||
852 | # CONFIG_DEBUG_SLAB is not set | ||
853 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
854 | # CONFIG_RT_MUTEX_TESTER is not set | ||
855 | # CONFIG_DEBUG_SPINLOCK is not set | ||
856 | # CONFIG_DEBUG_MUTEXES is not set | ||
857 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
858 | # CONFIG_PROVE_LOCKING is not set | ||
859 | # CONFIG_LOCK_STAT is not set | ||
860 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
861 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
862 | # CONFIG_DEBUG_KOBJECT is not set | ||
863 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
864 | # CONFIG_DEBUG_INFO is not set | ||
865 | # CONFIG_DEBUG_VM is not set | ||
866 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
867 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
868 | # CONFIG_DEBUG_LIST is not set | ||
869 | # CONFIG_DEBUG_SG is not set | ||
870 | CONFIG_FRAME_POINTER=y | ||
871 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
872 | # CONFIG_RCU_TORTURE_TEST is not set | ||
873 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
874 | # CONFIG_FAULT_INJECTION is not set | ||
875 | # CONFIG_LATENCYTOP is not set | ||
876 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
877 | CONFIG_HAVE_FTRACE=y | ||
878 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
879 | # CONFIG_FTRACE is not set | ||
880 | # CONFIG_IRQSOFF_TRACER is not set | ||
881 | # CONFIG_SCHED_TRACER is not set | ||
882 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
883 | # CONFIG_SAMPLES is not set | ||
884 | CONFIG_HAVE_ARCH_KGDB=y | ||
885 | # CONFIG_KGDB is not set | ||
886 | # CONFIG_DEBUG_USER is not set | ||
887 | # CONFIG_DEBUG_ERRORS is not set | ||
888 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
889 | # CONFIG_DEBUG_LL is not set | ||
890 | |||
891 | # | ||
892 | # Security options | ||
893 | # | ||
894 | # CONFIG_KEYS is not set | ||
895 | # CONFIG_SECURITY is not set | ||
896 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
897 | CONFIG_CRYPTO=y | ||
898 | |||
899 | # | ||
900 | # Crypto core or helper | ||
901 | # | ||
902 | CONFIG_CRYPTO_ALGAPI=y | ||
903 | CONFIG_CRYPTO_HASH=y | ||
904 | CONFIG_CRYPTO_MANAGER=y | ||
905 | # CONFIG_CRYPTO_GF128MUL is not set | ||
906 | # CONFIG_CRYPTO_NULL is not set | ||
907 | # CONFIG_CRYPTO_CRYPTD is not set | ||
908 | # CONFIG_CRYPTO_AUTHENC is not set | ||
909 | # CONFIG_CRYPTO_TEST is not set | ||
910 | |||
911 | # | ||
912 | # Authenticated Encryption with Associated Data | ||
913 | # | ||
914 | # CONFIG_CRYPTO_CCM is not set | ||
915 | # CONFIG_CRYPTO_GCM is not set | ||
916 | # CONFIG_CRYPTO_SEQIV is not set | ||
917 | |||
918 | # | ||
919 | # Block modes | ||
920 | # | ||
921 | # CONFIG_CRYPTO_CBC is not set | ||
922 | # CONFIG_CRYPTO_CTR is not set | ||
923 | # CONFIG_CRYPTO_CTS is not set | ||
924 | # CONFIG_CRYPTO_ECB is not set | ||
925 | # CONFIG_CRYPTO_LRW is not set | ||
926 | # CONFIG_CRYPTO_PCBC is not set | ||
927 | # CONFIG_CRYPTO_XTS is not set | ||
928 | |||
929 | # | ||
930 | # Hash modes | ||
931 | # | ||
932 | CONFIG_CRYPTO_HMAC=y | ||
933 | # CONFIG_CRYPTO_XCBC is not set | ||
934 | |||
935 | # | ||
936 | # Digest | ||
937 | # | ||
938 | # CONFIG_CRYPTO_CRC32C is not set | ||
939 | # CONFIG_CRYPTO_MD4 is not set | ||
940 | CONFIG_CRYPTO_MD5=y | ||
941 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
942 | # CONFIG_CRYPTO_RMD128 is not set | ||
943 | # CONFIG_CRYPTO_RMD160 is not set | ||
944 | # CONFIG_CRYPTO_RMD256 is not set | ||
945 | # CONFIG_CRYPTO_RMD320 is not set | ||
946 | CONFIG_CRYPTO_SHA1=y | ||
947 | # CONFIG_CRYPTO_SHA256 is not set | ||
948 | # CONFIG_CRYPTO_SHA512 is not set | ||
949 | # CONFIG_CRYPTO_TGR192 is not set | ||
950 | # CONFIG_CRYPTO_WP512 is not set | ||
951 | |||
952 | # | ||
953 | # Ciphers | ||
954 | # | ||
955 | # CONFIG_CRYPTO_AES is not set | ||
956 | # CONFIG_CRYPTO_ANUBIS is not set | ||
957 | # CONFIG_CRYPTO_ARC4 is not set | ||
958 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
959 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
960 | # CONFIG_CRYPTO_CAST5 is not set | ||
961 | # CONFIG_CRYPTO_CAST6 is not set | ||
962 | CONFIG_CRYPTO_DES=y | ||
963 | # CONFIG_CRYPTO_FCRYPT is not set | ||
964 | # CONFIG_CRYPTO_KHAZAD is not set | ||
965 | # CONFIG_CRYPTO_SALSA20 is not set | ||
966 | # CONFIG_CRYPTO_SEED is not set | ||
967 | # CONFIG_CRYPTO_SERPENT is not set | ||
968 | # CONFIG_CRYPTO_TEA is not set | ||
969 | # CONFIG_CRYPTO_TWOFISH is not set | ||
970 | |||
971 | # | ||
972 | # Compression | ||
973 | # | ||
974 | CONFIG_CRYPTO_DEFLATE=y | ||
975 | # CONFIG_CRYPTO_LZO is not set | ||
976 | # CONFIG_CRYPTO_HW is not set | ||
977 | |||
978 | # | ||
979 | # Library routines | ||
980 | # | ||
981 | CONFIG_BITREVERSE=y | ||
982 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
983 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
984 | CONFIG_CRC_CCITT=y | ||
985 | # CONFIG_CRC16 is not set | ||
986 | # CONFIG_CRC_T10DIF is not set | ||
987 | # CONFIG_CRC_ITU_T is not set | ||
988 | CONFIG_CRC32=y | ||
989 | # CONFIG_CRC7 is not set | ||
990 | # CONFIG_LIBCRC32C is not set | ||
991 | CONFIG_ZLIB_INFLATE=y | ||
992 | CONFIG_ZLIB_DEFLATE=y | ||
993 | CONFIG_PLIST=y | ||
994 | CONFIG_HAS_IOMEM=y | ||
995 | CONFIG_HAS_IOPORT=y | ||
996 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig index e3357ba10f1f..ab8b1e0d0dac 100644 --- a/arch/arm/configs/kirkwood_defconfig +++ b/arch/arm/configs/kirkwood_defconfig | |||
@@ -1,11 +1,11 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc5 | 3 | # Linux kernel version: 2.6.28-rc7 |
4 | # Sun Jun 22 15:51:25 2008 | 4 | # Thu Dec 4 15:27:39 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
8 | CONFIG_GENERIC_GPIO=y | 8 | # CONFIG_GENERIC_GPIO is not set |
9 | CONFIG_GENERIC_TIME=y | 9 | CONFIG_GENERIC_TIME=y |
10 | CONFIG_GENERIC_CLOCKEVENTS=y | 10 | CONFIG_GENERIC_CLOCKEVENTS=y |
11 | CONFIG_MMU=y | 11 | CONFIG_MMU=y |
@@ -22,8 +22,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
23 | CONFIG_GENERIC_HWEIGHT=y | 23 | CONFIG_GENERIC_HWEIGHT=y |
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 24 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
25 | CONFIG_ARCH_SUPPORTS_AOUT=y | 25 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
26 | CONFIG_ZONE_DMA=y | ||
27 | CONFIG_VECTORS_BASE=0xffff0000 | 26 | CONFIG_VECTORS_BASE=0xffff0000 |
28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
29 | 28 | ||
@@ -49,14 +48,17 @@ CONFIG_LOG_BUF_SHIFT=14 | |||
49 | # CONFIG_GROUP_SCHED is not set | 48 | # CONFIG_GROUP_SCHED is not set |
50 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | 49 | # CONFIG_SYSFS_DEPRECATED_V2 is not set |
51 | # CONFIG_RELAY is not set | 50 | # CONFIG_RELAY is not set |
52 | # CONFIG_NAMESPACES is not set | 51 | CONFIG_NAMESPACES=y |
52 | # CONFIG_UTS_NS is not set | ||
53 | # CONFIG_IPC_NS is not set | ||
54 | # CONFIG_USER_NS is not set | ||
55 | # CONFIG_PID_NS is not set | ||
53 | # CONFIG_BLK_DEV_INITRD is not set | 56 | # CONFIG_BLK_DEV_INITRD is not set |
54 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 57 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
55 | CONFIG_SYSCTL=y | 58 | CONFIG_SYSCTL=y |
56 | CONFIG_EMBEDDED=y | 59 | # CONFIG_EMBEDDED is not set |
57 | CONFIG_UID16=y | 60 | CONFIG_UID16=y |
58 | CONFIG_SYSCTL_SYSCALL=y | 61 | CONFIG_SYSCTL_SYSCALL=y |
59 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
60 | CONFIG_KALLSYMS=y | 62 | CONFIG_KALLSYMS=y |
61 | # CONFIG_KALLSYMS_ALL is not set | 63 | # CONFIG_KALLSYMS_ALL is not set |
62 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 64 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -73,9 +75,12 @@ CONFIG_SIGNALFD=y | |||
73 | CONFIG_TIMERFD=y | 75 | CONFIG_TIMERFD=y |
74 | CONFIG_EVENTFD=y | 76 | CONFIG_EVENTFD=y |
75 | CONFIG_SHMEM=y | 77 | CONFIG_SHMEM=y |
78 | CONFIG_AIO=y | ||
76 | CONFIG_VM_EVENT_COUNTERS=y | 79 | CONFIG_VM_EVENT_COUNTERS=y |
77 | CONFIG_SLAB=y | 80 | CONFIG_PCI_QUIRKS=y |
78 | # CONFIG_SLUB is not set | 81 | CONFIG_SLUB_DEBUG=y |
82 | # CONFIG_SLAB is not set | ||
83 | CONFIG_SLUB=y | ||
79 | # CONFIG_SLOB is not set | 84 | # CONFIG_SLOB is not set |
80 | CONFIG_PROFILING=y | 85 | CONFIG_PROFILING=y |
81 | # CONFIG_MARKERS is not set | 86 | # CONFIG_MARKERS is not set |
@@ -85,8 +90,7 @@ CONFIG_KPROBES=y | |||
85 | CONFIG_KRETPROBES=y | 90 | CONFIG_KRETPROBES=y |
86 | CONFIG_HAVE_KPROBES=y | 91 | CONFIG_HAVE_KPROBES=y |
87 | CONFIG_HAVE_KRETPROBES=y | 92 | CONFIG_HAVE_KRETPROBES=y |
88 | # CONFIG_HAVE_DMA_ATTRS is not set | 93 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y |
89 | CONFIG_PROC_PAGE_MONITOR=y | ||
90 | CONFIG_SLABINFO=y | 94 | CONFIG_SLABINFO=y |
91 | CONFIG_RT_MUTEXES=y | 95 | CONFIG_RT_MUTEXES=y |
92 | # CONFIG_TINY_SHMEM is not set | 96 | # CONFIG_TINY_SHMEM is not set |
@@ -97,12 +101,13 @@ CONFIG_MODULE_UNLOAD=y | |||
97 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 101 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
98 | # CONFIG_MODVERSIONS is not set | 102 | # CONFIG_MODVERSIONS is not set |
99 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 103 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
100 | # CONFIG_KMOD is not set | 104 | CONFIG_KMOD=y |
101 | CONFIG_BLOCK=y | 105 | CONFIG_BLOCK=y |
102 | # CONFIG_LBD is not set | 106 | # CONFIG_LBD is not set |
103 | # CONFIG_BLK_DEV_IO_TRACE is not set | 107 | # CONFIG_BLK_DEV_IO_TRACE is not set |
104 | # CONFIG_LSF is not set | 108 | # CONFIG_LSF is not set |
105 | # CONFIG_BLK_DEV_BSG is not set | 109 | # CONFIG_BLK_DEV_BSG is not set |
110 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
106 | 111 | ||
107 | # | 112 | # |
108 | # IO Schedulers | 113 | # IO Schedulers |
@@ -117,6 +122,7 @@ CONFIG_DEFAULT_CFQ=y | |||
117 | # CONFIG_DEFAULT_NOOP is not set | 122 | # CONFIG_DEFAULT_NOOP is not set |
118 | CONFIG_DEFAULT_IOSCHED="cfq" | 123 | CONFIG_DEFAULT_IOSCHED="cfq" |
119 | CONFIG_CLASSIC_RCU=y | 124 | CONFIG_CLASSIC_RCU=y |
125 | # CONFIG_FREEZER is not set | ||
120 | 126 | ||
121 | # | 127 | # |
122 | # System Type | 128 | # System Type |
@@ -128,7 +134,6 @@ CONFIG_CLASSIC_RCU=y | |||
128 | # CONFIG_ARCH_AT91 is not set | 134 | # CONFIG_ARCH_AT91 is not set |
129 | # CONFIG_ARCH_CLPS7500 is not set | 135 | # CONFIG_ARCH_CLPS7500 is not set |
130 | # CONFIG_ARCH_CLPS711X is not set | 136 | # CONFIG_ARCH_CLPS711X is not set |
131 | # CONFIG_ARCH_CO285 is not set | ||
132 | # CONFIG_ARCH_EBSA110 is not set | 137 | # CONFIG_ARCH_EBSA110 is not set |
133 | # CONFIG_ARCH_EP93XX is not set | 138 | # CONFIG_ARCH_EP93XX is not set |
134 | # CONFIG_ARCH_FOOTBRIDGE is not set | 139 | # CONFIG_ARCH_FOOTBRIDGE is not set |
@@ -158,7 +163,7 @@ CONFIG_ARCH_KIRKWOOD=y | |||
158 | # CONFIG_ARCH_LH7A40X is not set | 163 | # CONFIG_ARCH_LH7A40X is not set |
159 | # CONFIG_ARCH_DAVINCI is not set | 164 | # CONFIG_ARCH_DAVINCI is not set |
160 | # CONFIG_ARCH_OMAP is not set | 165 | # CONFIG_ARCH_OMAP is not set |
161 | # CONFIG_ARCH_MSM7X00A is not set | 166 | # CONFIG_ARCH_MSM is not set |
162 | 167 | ||
163 | # | 168 | # |
164 | # Marvell Kirkwood Implementations | 169 | # Marvell Kirkwood Implementations |
@@ -199,6 +204,7 @@ CONFIG_ARM_THUMB=y | |||
199 | # CONFIG_CPU_DCACHE_DISABLE is not set | 204 | # CONFIG_CPU_DCACHE_DISABLE is not set |
200 | CONFIG_OUTER_CACHE=y | 205 | CONFIG_OUTER_CACHE=y |
201 | CONFIG_CACHE_FEROCEON_L2=y | 206 | CONFIG_CACHE_FEROCEON_L2=y |
207 | # CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set | ||
202 | 208 | ||
203 | # | 209 | # |
204 | # Bus support | 210 | # Bus support |
@@ -217,25 +223,30 @@ CONFIG_TICK_ONESHOT=y | |||
217 | CONFIG_NO_HZ=y | 223 | CONFIG_NO_HZ=y |
218 | CONFIG_HIGH_RES_TIMERS=y | 224 | CONFIG_HIGH_RES_TIMERS=y |
219 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | 225 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y |
226 | CONFIG_VMSPLIT_3G=y | ||
227 | # CONFIG_VMSPLIT_2G is not set | ||
228 | # CONFIG_VMSPLIT_1G is not set | ||
229 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
220 | CONFIG_PREEMPT=y | 230 | CONFIG_PREEMPT=y |
221 | CONFIG_HZ=100 | 231 | CONFIG_HZ=100 |
222 | CONFIG_AEABI=y | 232 | CONFIG_AEABI=y |
223 | # CONFIG_OABI_COMPAT is not set | 233 | # CONFIG_OABI_COMPAT is not set |
224 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 234 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y |
235 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
236 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
225 | CONFIG_SELECT_MEMORY_MODEL=y | 237 | CONFIG_SELECT_MEMORY_MODEL=y |
226 | CONFIG_FLATMEM_MANUAL=y | 238 | CONFIG_FLATMEM_MANUAL=y |
227 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 239 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
228 | # CONFIG_SPARSEMEM_MANUAL is not set | 240 | # CONFIG_SPARSEMEM_MANUAL is not set |
229 | CONFIG_FLATMEM=y | 241 | CONFIG_FLATMEM=y |
230 | CONFIG_FLAT_NODE_MEM_MAP=y | 242 | CONFIG_FLAT_NODE_MEM_MAP=y |
231 | # CONFIG_SPARSEMEM_STATIC is not set | ||
232 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
233 | CONFIG_PAGEFLAGS_EXTENDED=y | 243 | CONFIG_PAGEFLAGS_EXTENDED=y |
234 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 244 | CONFIG_SPLIT_PTLOCK_CPUS=4096 |
235 | # CONFIG_RESOURCES_64BIT is not set | 245 | # CONFIG_RESOURCES_64BIT is not set |
236 | CONFIG_ZONE_DMA_FLAG=1 | 246 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
237 | CONFIG_BOUNCE=y | 247 | CONFIG_ZONE_DMA_FLAG=0 |
238 | CONFIG_VIRT_TO_BUS=y | 248 | CONFIG_VIRT_TO_BUS=y |
249 | CONFIG_UNEVICTABLE_LRU=y | ||
239 | CONFIG_ALIGNMENT_TRAP=y | 250 | CONFIG_ALIGNMENT_TRAP=y |
240 | 251 | ||
241 | # | 252 | # |
@@ -248,6 +259,11 @@ CONFIG_CMDLINE="" | |||
248 | # CONFIG_KEXEC is not set | 259 | # CONFIG_KEXEC is not set |
249 | 260 | ||
250 | # | 261 | # |
262 | # CPU Power Management | ||
263 | # | ||
264 | # CONFIG_CPU_IDLE is not set | ||
265 | |||
266 | # | ||
251 | # Floating point emulation | 267 | # Floating point emulation |
252 | # | 268 | # |
253 | 269 | ||
@@ -260,6 +276,8 @@ CONFIG_CMDLINE="" | |||
260 | # Userspace binary formats | 276 | # Userspace binary formats |
261 | # | 277 | # |
262 | CONFIG_BINFMT_ELF=y | 278 | CONFIG_BINFMT_ELF=y |
279 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
280 | CONFIG_HAVE_AOUT=y | ||
263 | # CONFIG_BINFMT_AOUT is not set | 281 | # CONFIG_BINFMT_AOUT is not set |
264 | # CONFIG_BINFMT_MISC is not set | 282 | # CONFIG_BINFMT_MISC is not set |
265 | 283 | ||
@@ -268,10 +286,6 @@ CONFIG_BINFMT_ELF=y | |||
268 | # | 286 | # |
269 | # CONFIG_PM is not set | 287 | # CONFIG_PM is not set |
270 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | 288 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
271 | |||
272 | # | ||
273 | # Networking | ||
274 | # | ||
275 | CONFIG_NET=y | 289 | CONFIG_NET=y |
276 | 290 | ||
277 | # | 291 | # |
@@ -322,6 +336,15 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
322 | # CONFIG_TIPC is not set | 336 | # CONFIG_TIPC is not set |
323 | # CONFIG_ATM is not set | 337 | # CONFIG_ATM is not set |
324 | # CONFIG_BRIDGE is not set | 338 | # CONFIG_BRIDGE is not set |
339 | CONFIG_NET_DSA=y | ||
340 | # CONFIG_NET_DSA_TAG_DSA is not set | ||
341 | CONFIG_NET_DSA_TAG_EDSA=y | ||
342 | # CONFIG_NET_DSA_TAG_TRAILER is not set | ||
343 | CONFIG_NET_DSA_MV88E6XXX=y | ||
344 | # CONFIG_NET_DSA_MV88E6060 is not set | ||
345 | # CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set | ||
346 | # CONFIG_NET_DSA_MV88E6131 is not set | ||
347 | CONFIG_NET_DSA_MV88E6123_61_65=y | ||
325 | # CONFIG_VLAN_8021Q is not set | 348 | # CONFIG_VLAN_8021Q is not set |
326 | # CONFIG_DECNET is not set | 349 | # CONFIG_DECNET is not set |
327 | # CONFIG_LLC2 is not set | 350 | # CONFIG_LLC2 is not set |
@@ -343,12 +366,12 @@ CONFIG_NET_PKTGEN=m | |||
343 | # CONFIG_IRDA is not set | 366 | # CONFIG_IRDA is not set |
344 | # CONFIG_BT is not set | 367 | # CONFIG_BT is not set |
345 | # CONFIG_AF_RXRPC is not set | 368 | # CONFIG_AF_RXRPC is not set |
346 | 369 | # CONFIG_PHONET is not set | |
347 | # | 370 | CONFIG_WIRELESS=y |
348 | # Wireless | ||
349 | # | ||
350 | # CONFIG_CFG80211 is not set | 371 | # CONFIG_CFG80211 is not set |
372 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
351 | CONFIG_WIRELESS_EXT=y | 373 | CONFIG_WIRELESS_EXT=y |
374 | CONFIG_WIRELESS_EXT_SYSFS=y | ||
352 | # CONFIG_MAC80211 is not set | 375 | # CONFIG_MAC80211 is not set |
353 | # CONFIG_IEEE80211 is not set | 376 | # CONFIG_IEEE80211 is not set |
354 | # CONFIG_RFKILL is not set | 377 | # CONFIG_RFKILL is not set |
@@ -365,6 +388,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
365 | CONFIG_STANDALONE=y | 388 | CONFIG_STANDALONE=y |
366 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 389 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
367 | CONFIG_FW_LOADER=y | 390 | CONFIG_FW_LOADER=y |
391 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
392 | CONFIG_EXTRA_FIRMWARE="" | ||
368 | # CONFIG_DEBUG_DRIVER is not set | 393 | # CONFIG_DEBUG_DRIVER is not set |
369 | # CONFIG_DEBUG_DEVRES is not set | 394 | # CONFIG_DEBUG_DEVRES is not set |
370 | # CONFIG_SYS_HYPERVISOR is not set | 395 | # CONFIG_SYS_HYPERVISOR is not set |
@@ -453,7 +478,7 @@ CONFIG_M25PXX_USE_FAST_READ=y | |||
453 | # CONFIG_MTD_DOC2001 is not set | 478 | # CONFIG_MTD_DOC2001 is not set |
454 | # CONFIG_MTD_DOC2001PLUS is not set | 479 | # CONFIG_MTD_DOC2001PLUS is not set |
455 | CONFIG_MTD_NAND=y | 480 | CONFIG_MTD_NAND=y |
456 | CONFIG_MTD_NAND_VERIFY_WRITE=y | 481 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set |
457 | # CONFIG_MTD_NAND_ECC_SMC is not set | 482 | # CONFIG_MTD_NAND_ECC_SMC is not set |
458 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | 483 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set |
459 | CONFIG_MTD_NAND_IDS=y | 484 | CONFIG_MTD_NAND_IDS=y |
@@ -561,6 +586,7 @@ CONFIG_SCSI_LOWLEVEL=y | |||
561 | # CONFIG_SCSI_NSP32 is not set | 586 | # CONFIG_SCSI_NSP32 is not set |
562 | # CONFIG_SCSI_DEBUG is not set | 587 | # CONFIG_SCSI_DEBUG is not set |
563 | # CONFIG_SCSI_SRP is not set | 588 | # CONFIG_SCSI_SRP is not set |
589 | # CONFIG_SCSI_DH is not set | ||
564 | CONFIG_ATA=y | 590 | CONFIG_ATA=y |
565 | # CONFIG_ATA_NONSTANDARD is not set | 591 | # CONFIG_ATA_NONSTANDARD is not set |
566 | CONFIG_SATA_PMP=y | 592 | CONFIG_SATA_PMP=y |
@@ -619,7 +645,6 @@ CONFIG_SATA_MV=y | |||
619 | # CONFIG_PATA_SIS is not set | 645 | # CONFIG_PATA_SIS is not set |
620 | # CONFIG_PATA_VIA is not set | 646 | # CONFIG_PATA_VIA is not set |
621 | # CONFIG_PATA_WINBOND is not set | 647 | # CONFIG_PATA_WINBOND is not set |
622 | # CONFIG_PATA_PLATFORM is not set | ||
623 | # CONFIG_PATA_SCH is not set | 648 | # CONFIG_PATA_SCH is not set |
624 | # CONFIG_MD is not set | 649 | # CONFIG_MD is not set |
625 | # CONFIG_FUSION is not set | 650 | # CONFIG_FUSION is not set |
@@ -627,11 +652,14 @@ CONFIG_SATA_MV=y | |||
627 | # | 652 | # |
628 | # IEEE 1394 (FireWire) support | 653 | # IEEE 1394 (FireWire) support |
629 | # | 654 | # |
655 | |||
656 | # | ||
657 | # Enable only one of the two stacks, unless you know what you are doing | ||
658 | # | ||
630 | # CONFIG_FIREWIRE is not set | 659 | # CONFIG_FIREWIRE is not set |
631 | # CONFIG_IEEE1394 is not set | 660 | # CONFIG_IEEE1394 is not set |
632 | # CONFIG_I2O is not set | 661 | # CONFIG_I2O is not set |
633 | CONFIG_NETDEVICES=y | 662 | CONFIG_NETDEVICES=y |
634 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
635 | # CONFIG_DUMMY is not set | 663 | # CONFIG_DUMMY is not set |
636 | # CONFIG_BONDING is not set | 664 | # CONFIG_BONDING is not set |
637 | # CONFIG_MACVLAN is not set | 665 | # CONFIG_MACVLAN is not set |
@@ -639,7 +667,23 @@ CONFIG_NETDEVICES=y | |||
639 | # CONFIG_TUN is not set | 667 | # CONFIG_TUN is not set |
640 | # CONFIG_VETH is not set | 668 | # CONFIG_VETH is not set |
641 | # CONFIG_ARCNET is not set | 669 | # CONFIG_ARCNET is not set |
642 | # CONFIG_PHYLIB is not set | 670 | CONFIG_PHYLIB=y |
671 | |||
672 | # | ||
673 | # MII PHY device drivers | ||
674 | # | ||
675 | CONFIG_MARVELL_PHY=y | ||
676 | # CONFIG_DAVICOM_PHY is not set | ||
677 | # CONFIG_QSEMI_PHY is not set | ||
678 | # CONFIG_LXT_PHY is not set | ||
679 | # CONFIG_CICADA_PHY is not set | ||
680 | # CONFIG_VITESSE_PHY is not set | ||
681 | # CONFIG_SMSC_PHY is not set | ||
682 | # CONFIG_BROADCOM_PHY is not set | ||
683 | # CONFIG_ICPLUS_PHY is not set | ||
684 | # CONFIG_REALTEK_PHY is not set | ||
685 | # CONFIG_FIXED_PHY is not set | ||
686 | # CONFIG_MDIO_BITBANG is not set | ||
643 | CONFIG_NET_ETHERNET=y | 687 | CONFIG_NET_ETHERNET=y |
644 | CONFIG_MII=y | 688 | CONFIG_MII=y |
645 | # CONFIG_AX88796 is not set | 689 | # CONFIG_AX88796 is not set |
@@ -650,12 +694,16 @@ CONFIG_MII=y | |||
650 | # CONFIG_SMC91X is not set | 694 | # CONFIG_SMC91X is not set |
651 | # CONFIG_DM9000 is not set | 695 | # CONFIG_DM9000 is not set |
652 | # CONFIG_ENC28J60 is not set | 696 | # CONFIG_ENC28J60 is not set |
697 | # CONFIG_SMC911X is not set | ||
653 | # CONFIG_NET_TULIP is not set | 698 | # CONFIG_NET_TULIP is not set |
654 | # CONFIG_HP100 is not set | 699 | # CONFIG_HP100 is not set |
655 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 700 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
656 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 701 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
657 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 702 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
658 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 703 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
704 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
705 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
706 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
659 | CONFIG_NET_PCI=y | 707 | CONFIG_NET_PCI=y |
660 | # CONFIG_PCNET32 is not set | 708 | # CONFIG_PCNET32 is not set |
661 | # CONFIG_AMD8111_ETH is not set | 709 | # CONFIG_AMD8111_ETH is not set |
@@ -676,14 +724,12 @@ CONFIG_NET_PCI=y | |||
676 | # CONFIG_TLAN is not set | 724 | # CONFIG_TLAN is not set |
677 | # CONFIG_VIA_RHINE is not set | 725 | # CONFIG_VIA_RHINE is not set |
678 | # CONFIG_SC92031 is not set | 726 | # CONFIG_SC92031 is not set |
727 | # CONFIG_ATL2 is not set | ||
679 | CONFIG_NETDEV_1000=y | 728 | CONFIG_NETDEV_1000=y |
680 | # CONFIG_ACENIC is not set | 729 | # CONFIG_ACENIC is not set |
681 | # CONFIG_DL2K is not set | 730 | # CONFIG_DL2K is not set |
682 | CONFIG_E1000=y | 731 | # CONFIG_E1000 is not set |
683 | CONFIG_E1000_NAPI=y | ||
684 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set | ||
685 | # CONFIG_E1000E is not set | 732 | # CONFIG_E1000E is not set |
686 | # CONFIG_E1000E_ENABLED is not set | ||
687 | # CONFIG_IP1000 is not set | 733 | # CONFIG_IP1000 is not set |
688 | # CONFIG_IGB is not set | 734 | # CONFIG_IGB is not set |
689 | # CONFIG_NS83820 is not set | 735 | # CONFIG_NS83820 is not set |
@@ -699,6 +745,8 @@ CONFIG_E1000_NAPI=y | |||
699 | CONFIG_MV643XX_ETH=y | 745 | CONFIG_MV643XX_ETH=y |
700 | # CONFIG_QLA3XXX is not set | 746 | # CONFIG_QLA3XXX is not set |
701 | # CONFIG_ATL1 is not set | 747 | # CONFIG_ATL1 is not set |
748 | # CONFIG_ATL1E is not set | ||
749 | # CONFIG_JME is not set | ||
702 | # CONFIG_NETDEV_10000 is not set | 750 | # CONFIG_NETDEV_10000 is not set |
703 | # CONFIG_TR is not set | 751 | # CONFIG_TR is not set |
704 | 752 | ||
@@ -765,7 +813,11 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
765 | # | 813 | # |
766 | # Character devices | 814 | # Character devices |
767 | # | 815 | # |
768 | # CONFIG_VT is not set | 816 | CONFIG_VT=y |
817 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
818 | CONFIG_VT_CONSOLE=y | ||
819 | CONFIG_HW_CONSOLE=y | ||
820 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
769 | # CONFIG_DEVKMEM is not set | 821 | # CONFIG_DEVKMEM is not set |
770 | # CONFIG_SERIAL_NONSTANDARD is not set | 822 | # CONFIG_SERIAL_NONSTANDARD is not set |
771 | # CONFIG_NOZOMI is not set | 823 | # CONFIG_NOZOMI is not set |
@@ -775,7 +827,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
775 | # | 827 | # |
776 | CONFIG_SERIAL_8250=y | 828 | CONFIG_SERIAL_8250=y |
777 | CONFIG_SERIAL_8250_CONSOLE=y | 829 | CONFIG_SERIAL_8250_CONSOLE=y |
778 | # CONFIG_SERIAL_8250_PCI is not set | 830 | CONFIG_SERIAL_8250_PCI=y |
779 | CONFIG_SERIAL_8250_NR_UARTS=4 | 831 | CONFIG_SERIAL_8250_NR_UARTS=4 |
780 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 | 832 | CONFIG_SERIAL_8250_RUNTIME_UARTS=2 |
781 | # CONFIG_SERIAL_8250_EXTENDED is not set | 833 | # CONFIG_SERIAL_8250_EXTENDED is not set |
@@ -800,44 +852,64 @@ CONFIG_DEVPORT=y | |||
800 | CONFIG_I2C=y | 852 | CONFIG_I2C=y |
801 | CONFIG_I2C_BOARDINFO=y | 853 | CONFIG_I2C_BOARDINFO=y |
802 | CONFIG_I2C_CHARDEV=y | 854 | CONFIG_I2C_CHARDEV=y |
855 | CONFIG_I2C_HELPER_AUTO=y | ||
803 | 856 | ||
804 | # | 857 | # |
805 | # I2C Hardware Bus support | 858 | # I2C Hardware Bus support |
806 | # | 859 | # |
860 | |||
861 | # | ||
862 | # PC SMBus host controller drivers | ||
863 | # | ||
807 | # CONFIG_I2C_ALI1535 is not set | 864 | # CONFIG_I2C_ALI1535 is not set |
808 | # CONFIG_I2C_ALI1563 is not set | 865 | # CONFIG_I2C_ALI1563 is not set |
809 | # CONFIG_I2C_ALI15X3 is not set | 866 | # CONFIG_I2C_ALI15X3 is not set |
810 | # CONFIG_I2C_AMD756 is not set | 867 | # CONFIG_I2C_AMD756 is not set |
811 | # CONFIG_I2C_AMD8111 is not set | 868 | # CONFIG_I2C_AMD8111 is not set |
812 | # CONFIG_I2C_GPIO is not set | ||
813 | # CONFIG_I2C_I801 is not set | 869 | # CONFIG_I2C_I801 is not set |
814 | # CONFIG_I2C_I810 is not set | 870 | # CONFIG_I2C_ISCH is not set |
815 | # CONFIG_I2C_PIIX4 is not set | 871 | # CONFIG_I2C_PIIX4 is not set |
816 | # CONFIG_I2C_NFORCE2 is not set | 872 | # CONFIG_I2C_NFORCE2 is not set |
817 | # CONFIG_I2C_OCORES is not set | ||
818 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
819 | # CONFIG_I2C_PROSAVAGE is not set | ||
820 | # CONFIG_I2C_SAVAGE4 is not set | ||
821 | # CONFIG_I2C_SIMTEC is not set | ||
822 | # CONFIG_I2C_SIS5595 is not set | 873 | # CONFIG_I2C_SIS5595 is not set |
823 | # CONFIG_I2C_SIS630 is not set | 874 | # CONFIG_I2C_SIS630 is not set |
824 | # CONFIG_I2C_SIS96X is not set | 875 | # CONFIG_I2C_SIS96X is not set |
825 | # CONFIG_I2C_TAOS_EVM is not set | ||
826 | # CONFIG_I2C_STUB is not set | ||
827 | # CONFIG_I2C_TINY_USB is not set | ||
828 | # CONFIG_I2C_VIA is not set | 876 | # CONFIG_I2C_VIA is not set |
829 | # CONFIG_I2C_VIAPRO is not set | 877 | # CONFIG_I2C_VIAPRO is not set |
878 | |||
879 | # | ||
880 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
881 | # | ||
882 | CONFIG_I2C_MV64XXX=y | ||
883 | # CONFIG_I2C_OCORES is not set | ||
884 | # CONFIG_I2C_SIMTEC is not set | ||
885 | |||
886 | # | ||
887 | # External I2C/SMBus adapter drivers | ||
888 | # | ||
889 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
890 | # CONFIG_I2C_TAOS_EVM is not set | ||
891 | # CONFIG_I2C_TINY_USB is not set | ||
892 | |||
893 | # | ||
894 | # Graphics adapter I2C/DDC channel drivers | ||
895 | # | ||
830 | # CONFIG_I2C_VOODOO3 is not set | 896 | # CONFIG_I2C_VOODOO3 is not set |
897 | |||
898 | # | ||
899 | # Other I2C/SMBus bus drivers | ||
900 | # | ||
831 | # CONFIG_I2C_PCA_PLATFORM is not set | 901 | # CONFIG_I2C_PCA_PLATFORM is not set |
832 | CONFIG_I2C_MV64XXX=y | 902 | # CONFIG_I2C_STUB is not set |
833 | 903 | ||
834 | # | 904 | # |
835 | # Miscellaneous I2C Chip support | 905 | # Miscellaneous I2C Chip support |
836 | # | 906 | # |
837 | # CONFIG_DS1682 is not set | 907 | # CONFIG_DS1682 is not set |
908 | # CONFIG_AT24 is not set | ||
838 | # CONFIG_SENSORS_EEPROM is not set | 909 | # CONFIG_SENSORS_EEPROM is not set |
839 | # CONFIG_SENSORS_PCF8574 is not set | 910 | # CONFIG_SENSORS_PCF8574 is not set |
840 | # CONFIG_PCF8575 is not set | 911 | # CONFIG_PCF8575 is not set |
912 | # CONFIG_SENSORS_PCA9539 is not set | ||
841 | # CONFIG_SENSORS_PCF8591 is not set | 913 | # CONFIG_SENSORS_PCF8591 is not set |
842 | # CONFIG_SENSORS_MAX6875 is not set | 914 | # CONFIG_SENSORS_MAX6875 is not set |
843 | # CONFIG_SENSORS_TSL2550 is not set | 915 | # CONFIG_SENSORS_TSL2550 is not set |
@@ -864,20 +936,26 @@ CONFIG_SPI_ORION=y | |||
864 | # CONFIG_W1 is not set | 936 | # CONFIG_W1 is not set |
865 | # CONFIG_POWER_SUPPLY is not set | 937 | # CONFIG_POWER_SUPPLY is not set |
866 | # CONFIG_HWMON is not set | 938 | # CONFIG_HWMON is not set |
939 | # CONFIG_THERMAL is not set | ||
940 | # CONFIG_THERMAL_HWMON is not set | ||
867 | # CONFIG_WATCHDOG is not set | 941 | # CONFIG_WATCHDOG is not set |
942 | CONFIG_SSB_POSSIBLE=y | ||
868 | 943 | ||
869 | # | 944 | # |
870 | # Sonics Silicon Backplane | 945 | # Sonics Silicon Backplane |
871 | # | 946 | # |
872 | CONFIG_SSB_POSSIBLE=y | ||
873 | # CONFIG_SSB is not set | 947 | # CONFIG_SSB is not set |
874 | 948 | ||
875 | # | 949 | # |
876 | # Multifunction device drivers | 950 | # Multifunction device drivers |
877 | # | 951 | # |
952 | # CONFIG_MFD_CORE is not set | ||
878 | # CONFIG_MFD_SM501 is not set | 953 | # CONFIG_MFD_SM501 is not set |
879 | # CONFIG_MFD_ASIC3 is not set | ||
880 | # CONFIG_HTC_PASIC3 is not set | 954 | # CONFIG_HTC_PASIC3 is not set |
955 | # CONFIG_MFD_TMIO is not set | ||
956 | # CONFIG_PMIC_DA903X is not set | ||
957 | # CONFIG_MFD_WM8400 is not set | ||
958 | # CONFIG_MFD_WM8350_I2C is not set | ||
881 | 959 | ||
882 | # | 960 | # |
883 | # Multimedia devices | 961 | # Multimedia devices |
@@ -910,8 +988,10 @@ CONFIG_SSB_POSSIBLE=y | |||
910 | # CONFIG_DISPLAY_SUPPORT is not set | 988 | # CONFIG_DISPLAY_SUPPORT is not set |
911 | 989 | ||
912 | # | 990 | # |
913 | # Sound | 991 | # Console display driver support |
914 | # | 992 | # |
993 | # CONFIG_VGA_CONSOLE is not set | ||
994 | CONFIG_DUMMY_CONSOLE=y | ||
915 | # CONFIG_SOUND is not set | 995 | # CONFIG_SOUND is not set |
916 | CONFIG_HID_SUPPORT=y | 996 | CONFIG_HID_SUPPORT=y |
917 | CONFIG_HID=y | 997 | CONFIG_HID=y |
@@ -922,9 +1002,36 @@ CONFIG_HID=y | |||
922 | # USB Input Devices | 1002 | # USB Input Devices |
923 | # | 1003 | # |
924 | CONFIG_USB_HID=y | 1004 | CONFIG_USB_HID=y |
925 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | 1005 | # CONFIG_HID_PID is not set |
926 | # CONFIG_HID_FF is not set | ||
927 | # CONFIG_USB_HIDDEV is not set | 1006 | # CONFIG_USB_HIDDEV is not set |
1007 | |||
1008 | # | ||
1009 | # Special HID drivers | ||
1010 | # | ||
1011 | CONFIG_HID_COMPAT=y | ||
1012 | CONFIG_HID_A4TECH=y | ||
1013 | CONFIG_HID_APPLE=y | ||
1014 | CONFIG_HID_BELKIN=y | ||
1015 | CONFIG_HID_BRIGHT=y | ||
1016 | CONFIG_HID_CHERRY=y | ||
1017 | CONFIG_HID_CHICONY=y | ||
1018 | CONFIG_HID_CYPRESS=y | ||
1019 | CONFIG_HID_DELL=y | ||
1020 | CONFIG_HID_EZKEY=y | ||
1021 | CONFIG_HID_GYRATION=y | ||
1022 | CONFIG_HID_LOGITECH=y | ||
1023 | # CONFIG_LOGITECH_FF is not set | ||
1024 | # CONFIG_LOGIRUMBLEPAD2_FF is not set | ||
1025 | CONFIG_HID_MICROSOFT=y | ||
1026 | CONFIG_HID_MONTEREY=y | ||
1027 | CONFIG_HID_PANTHERLORD=y | ||
1028 | # CONFIG_PANTHERLORD_FF is not set | ||
1029 | CONFIG_HID_PETALYNX=y | ||
1030 | CONFIG_HID_SAMSUNG=y | ||
1031 | CONFIG_HID_SONY=y | ||
1032 | CONFIG_HID_SUNPLUS=y | ||
1033 | # CONFIG_THRUSTMASTER_FF is not set | ||
1034 | # CONFIG_ZEROPLUS_FF is not set | ||
928 | CONFIG_USB_SUPPORT=y | 1035 | CONFIG_USB_SUPPORT=y |
929 | CONFIG_USB_ARCH_HAS_HCD=y | 1036 | CONFIG_USB_ARCH_HAS_HCD=y |
930 | CONFIG_USB_ARCH_HAS_OHCI=y | 1037 | CONFIG_USB_ARCH_HAS_OHCI=y |
@@ -940,8 +1047,9 @@ CONFIG_USB_DEVICEFS=y | |||
940 | CONFIG_USB_DEVICE_CLASS=y | 1047 | CONFIG_USB_DEVICE_CLASS=y |
941 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1048 | # CONFIG_USB_DYNAMIC_MINORS is not set |
942 | # CONFIG_USB_OTG is not set | 1049 | # CONFIG_USB_OTG is not set |
943 | # CONFIG_USB_OTG_WHITELIST is not set | 1050 | # CONFIG_USB_MON is not set |
944 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | 1051 | # CONFIG_USB_WUSB is not set |
1052 | # CONFIG_USB_WUSB_CBAF is not set | ||
945 | 1053 | ||
946 | # | 1054 | # |
947 | # USB Host Controller Drivers | 1055 | # USB Host Controller Drivers |
@@ -956,20 +1064,23 @@ CONFIG_USB_EHCI_TT_NEWSCHED=y | |||
956 | # CONFIG_USB_UHCI_HCD is not set | 1064 | # CONFIG_USB_UHCI_HCD is not set |
957 | # CONFIG_USB_SL811_HCD is not set | 1065 | # CONFIG_USB_SL811_HCD is not set |
958 | # CONFIG_USB_R8A66597_HCD is not set | 1066 | # CONFIG_USB_R8A66597_HCD is not set |
1067 | # CONFIG_USB_WHCI_HCD is not set | ||
1068 | # CONFIG_USB_HWA_HCD is not set | ||
959 | 1069 | ||
960 | # | 1070 | # |
961 | # USB Device Class drivers | 1071 | # USB Device Class drivers |
962 | # | 1072 | # |
963 | # CONFIG_USB_ACM is not set | 1073 | # CONFIG_USB_ACM is not set |
964 | CONFIG_USB_PRINTER=y | 1074 | CONFIG_USB_PRINTER=m |
965 | # CONFIG_USB_WDM is not set | 1075 | # CONFIG_USB_WDM is not set |
1076 | # CONFIG_USB_TMC is not set | ||
966 | 1077 | ||
967 | # | 1078 | # |
968 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1079 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
969 | # | 1080 | # |
970 | 1081 | ||
971 | # | 1082 | # |
972 | # may also be needed; see USB_STORAGE Help for more information | 1083 | # see USB_STORAGE Help for more information |
973 | # | 1084 | # |
974 | CONFIG_USB_STORAGE=y | 1085 | CONFIG_USB_STORAGE=y |
975 | # CONFIG_USB_STORAGE_DEBUG is not set | 1086 | # CONFIG_USB_STORAGE_DEBUG is not set |
@@ -992,7 +1103,6 @@ CONFIG_USB_STORAGE_JUMPSHOT=y | |||
992 | # | 1103 | # |
993 | # CONFIG_USB_MDC800 is not set | 1104 | # CONFIG_USB_MDC800 is not set |
994 | # CONFIG_USB_MICROTEK is not set | 1105 | # CONFIG_USB_MICROTEK is not set |
995 | # CONFIG_USB_MON is not set | ||
996 | 1106 | ||
997 | # | 1107 | # |
998 | # USB port drivers | 1108 | # USB port drivers |
@@ -1005,7 +1115,7 @@ CONFIG_USB_STORAGE_JUMPSHOT=y | |||
1005 | # CONFIG_USB_EMI62 is not set | 1115 | # CONFIG_USB_EMI62 is not set |
1006 | # CONFIG_USB_EMI26 is not set | 1116 | # CONFIG_USB_EMI26 is not set |
1007 | # CONFIG_USB_ADUTUX is not set | 1117 | # CONFIG_USB_ADUTUX is not set |
1008 | # CONFIG_USB_AUERSWALD is not set | 1118 | # CONFIG_USB_SEVSEG is not set |
1009 | # CONFIG_USB_RIO500 is not set | 1119 | # CONFIG_USB_RIO500 is not set |
1010 | # CONFIG_USB_LEGOTOWER is not set | 1120 | # CONFIG_USB_LEGOTOWER is not set |
1011 | # CONFIG_USB_LCD is not set | 1121 | # CONFIG_USB_LCD is not set |
@@ -1023,8 +1133,12 @@ CONFIG_USB_STORAGE_JUMPSHOT=y | |||
1023 | # CONFIG_USB_IOWARRIOR is not set | 1133 | # CONFIG_USB_IOWARRIOR is not set |
1024 | # CONFIG_USB_TEST is not set | 1134 | # CONFIG_USB_TEST is not set |
1025 | # CONFIG_USB_ISIGHTFW is not set | 1135 | # CONFIG_USB_ISIGHTFW is not set |
1136 | # CONFIG_USB_VST is not set | ||
1026 | # CONFIG_USB_GADGET is not set | 1137 | # CONFIG_USB_GADGET is not set |
1138 | # CONFIG_UWB is not set | ||
1027 | # CONFIG_MMC is not set | 1139 | # CONFIG_MMC is not set |
1140 | # CONFIG_MEMSTICK is not set | ||
1141 | # CONFIG_ACCESSIBILITY is not set | ||
1028 | CONFIG_NEW_LEDS=y | 1142 | CONFIG_NEW_LEDS=y |
1029 | # CONFIG_LEDS_CLASS is not set | 1143 | # CONFIG_LEDS_CLASS is not set |
1030 | 1144 | ||
@@ -1038,6 +1152,8 @@ CONFIG_NEW_LEDS=y | |||
1038 | # CONFIG_LEDS_TRIGGERS is not set | 1152 | # CONFIG_LEDS_TRIGGERS is not set |
1039 | CONFIG_RTC_LIB=y | 1153 | CONFIG_RTC_LIB=y |
1040 | CONFIG_RTC_CLASS=y | 1154 | CONFIG_RTC_CLASS=y |
1155 | CONFIG_RTC_HCTOSYS=y | ||
1156 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
1041 | # CONFIG_RTC_DEBUG is not set | 1157 | # CONFIG_RTC_DEBUG is not set |
1042 | 1158 | ||
1043 | # | 1159 | # |
@@ -1056,7 +1172,6 @@ CONFIG_RTC_INTF_DEV=y | |||
1056 | # CONFIG_RTC_DRV_DS1374 is not set | 1172 | # CONFIG_RTC_DRV_DS1374 is not set |
1057 | # CONFIG_RTC_DRV_DS1672 is not set | 1173 | # CONFIG_RTC_DRV_DS1672 is not set |
1058 | # CONFIG_RTC_DRV_MAX6900 is not set | 1174 | # CONFIG_RTC_DRV_MAX6900 is not set |
1059 | CONFIG_RTC_DRV_MV=y | ||
1060 | # CONFIG_RTC_DRV_RS5C372 is not set | 1175 | # CONFIG_RTC_DRV_RS5C372 is not set |
1061 | # CONFIG_RTC_DRV_ISL1208 is not set | 1176 | # CONFIG_RTC_DRV_ISL1208 is not set |
1062 | # CONFIG_RTC_DRV_X1205 is not set | 1177 | # CONFIG_RTC_DRV_X1205 is not set |
@@ -1064,29 +1179,39 @@ CONFIG_RTC_DRV_MV=y | |||
1064 | # CONFIG_RTC_DRV_PCF8583 is not set | 1179 | # CONFIG_RTC_DRV_PCF8583 is not set |
1065 | # CONFIG_RTC_DRV_M41T80 is not set | 1180 | # CONFIG_RTC_DRV_M41T80 is not set |
1066 | # CONFIG_RTC_DRV_S35390A is not set | 1181 | # CONFIG_RTC_DRV_S35390A is not set |
1182 | # CONFIG_RTC_DRV_FM3130 is not set | ||
1183 | # CONFIG_RTC_DRV_RX8581 is not set | ||
1067 | 1184 | ||
1068 | # | 1185 | # |
1069 | # SPI RTC drivers | 1186 | # SPI RTC drivers |
1070 | # | 1187 | # |
1188 | # CONFIG_RTC_DRV_M41T94 is not set | ||
1189 | # CONFIG_RTC_DRV_DS1305 is not set | ||
1190 | # CONFIG_RTC_DRV_DS1390 is not set | ||
1071 | # CONFIG_RTC_DRV_MAX6902 is not set | 1191 | # CONFIG_RTC_DRV_MAX6902 is not set |
1072 | # CONFIG_RTC_DRV_R9701 is not set | 1192 | # CONFIG_RTC_DRV_R9701 is not set |
1073 | # CONFIG_RTC_DRV_RS5C348 is not set | 1193 | # CONFIG_RTC_DRV_RS5C348 is not set |
1194 | # CONFIG_RTC_DRV_DS3234 is not set | ||
1074 | 1195 | ||
1075 | # | 1196 | # |
1076 | # Platform RTC drivers | 1197 | # Platform RTC drivers |
1077 | # | 1198 | # |
1078 | # CONFIG_RTC_DRV_CMOS is not set | 1199 | # CONFIG_RTC_DRV_CMOS is not set |
1200 | # CONFIG_RTC_DRV_DS1286 is not set | ||
1079 | # CONFIG_RTC_DRV_DS1511 is not set | 1201 | # CONFIG_RTC_DRV_DS1511 is not set |
1080 | # CONFIG_RTC_DRV_DS1553 is not set | 1202 | # CONFIG_RTC_DRV_DS1553 is not set |
1081 | # CONFIG_RTC_DRV_DS1742 is not set | 1203 | # CONFIG_RTC_DRV_DS1742 is not set |
1082 | # CONFIG_RTC_DRV_STK17TA8 is not set | 1204 | # CONFIG_RTC_DRV_STK17TA8 is not set |
1083 | # CONFIG_RTC_DRV_M48T86 is not set | 1205 | # CONFIG_RTC_DRV_M48T86 is not set |
1206 | # CONFIG_RTC_DRV_M48T35 is not set | ||
1084 | # CONFIG_RTC_DRV_M48T59 is not set | 1207 | # CONFIG_RTC_DRV_M48T59 is not set |
1208 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
1085 | # CONFIG_RTC_DRV_V3020 is not set | 1209 | # CONFIG_RTC_DRV_V3020 is not set |
1086 | 1210 | ||
1087 | # | 1211 | # |
1088 | # on-CPU RTC drivers | 1212 | # on-CPU RTC drivers |
1089 | # | 1213 | # |
1214 | CONFIG_RTC_DRV_MV=y | ||
1090 | CONFIG_DMADEVICES=y | 1215 | CONFIG_DMADEVICES=y |
1091 | 1216 | ||
1092 | # | 1217 | # |
@@ -1099,6 +1224,8 @@ CONFIG_DMA_ENGINE=y | |||
1099 | # DMA Clients | 1224 | # DMA Clients |
1100 | # | 1225 | # |
1101 | # CONFIG_NET_DMA is not set | 1226 | # CONFIG_NET_DMA is not set |
1227 | # CONFIG_DMATEST is not set | ||
1228 | # CONFIG_REGULATOR is not set | ||
1102 | # CONFIG_UIO is not set | 1229 | # CONFIG_UIO is not set |
1103 | 1230 | ||
1104 | # | 1231 | # |
@@ -1109,11 +1236,12 @@ CONFIG_EXT2_FS=y | |||
1109 | # CONFIG_EXT2_FS_XIP is not set | 1236 | # CONFIG_EXT2_FS_XIP is not set |
1110 | CONFIG_EXT3_FS=y | 1237 | CONFIG_EXT3_FS=y |
1111 | # CONFIG_EXT3_FS_XATTR is not set | 1238 | # CONFIG_EXT3_FS_XATTR is not set |
1112 | # CONFIG_EXT4DEV_FS is not set | 1239 | # CONFIG_EXT4_FS is not set |
1113 | CONFIG_JBD=y | 1240 | CONFIG_JBD=y |
1114 | # CONFIG_REISERFS_FS is not set | 1241 | # CONFIG_REISERFS_FS is not set |
1115 | # CONFIG_JFS_FS is not set | 1242 | # CONFIG_JFS_FS is not set |
1116 | # CONFIG_FS_POSIX_ACL is not set | 1243 | # CONFIG_FS_POSIX_ACL is not set |
1244 | CONFIG_FILE_LOCKING=y | ||
1117 | CONFIG_XFS_FS=y | 1245 | CONFIG_XFS_FS=y |
1118 | # CONFIG_XFS_QUOTA is not set | 1246 | # CONFIG_XFS_QUOTA is not set |
1119 | # CONFIG_XFS_POSIX_ACL is not set | 1247 | # CONFIG_XFS_POSIX_ACL is not set |
@@ -1131,7 +1259,7 @@ CONFIG_INOTIFY_USER=y | |||
1131 | # | 1259 | # |
1132 | # CD-ROM/DVD Filesystems | 1260 | # CD-ROM/DVD Filesystems |
1133 | # | 1261 | # |
1134 | CONFIG_ISO9660_FS=y | 1262 | CONFIG_ISO9660_FS=m |
1135 | CONFIG_JOLIET=y | 1263 | CONFIG_JOLIET=y |
1136 | # CONFIG_ZISOFS is not set | 1264 | # CONFIG_ZISOFS is not set |
1137 | CONFIG_UDF_FS=m | 1265 | CONFIG_UDF_FS=m |
@@ -1140,9 +1268,9 @@ CONFIG_UDF_NLS=y | |||
1140 | # | 1268 | # |
1141 | # DOS/FAT/NT Filesystems | 1269 | # DOS/FAT/NT Filesystems |
1142 | # | 1270 | # |
1143 | CONFIG_FAT_FS=y | 1271 | CONFIG_FAT_FS=m |
1144 | CONFIG_MSDOS_FS=y | 1272 | CONFIG_MSDOS_FS=m |
1145 | CONFIG_VFAT_FS=y | 1273 | CONFIG_VFAT_FS=m |
1146 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | 1274 | CONFIG_FAT_DEFAULT_CODEPAGE=437 |
1147 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | 1275 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" |
1148 | # CONFIG_NTFS_FS is not set | 1276 | # CONFIG_NTFS_FS is not set |
@@ -1152,6 +1280,7 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
1152 | # | 1280 | # |
1153 | CONFIG_PROC_FS=y | 1281 | CONFIG_PROC_FS=y |
1154 | CONFIG_PROC_SYSCTL=y | 1282 | CONFIG_PROC_SYSCTL=y |
1283 | CONFIG_PROC_PAGE_MONITOR=y | ||
1155 | CONFIG_SYSFS=y | 1284 | CONFIG_SYSFS=y |
1156 | CONFIG_TMPFS=y | 1285 | CONFIG_TMPFS=y |
1157 | # CONFIG_TMPFS_POSIX_ACL is not set | 1286 | # CONFIG_TMPFS_POSIX_ACL is not set |
@@ -1182,6 +1311,7 @@ CONFIG_JFFS2_RTIME=y | |||
1182 | CONFIG_CRAMFS=y | 1311 | CONFIG_CRAMFS=y |
1183 | # CONFIG_VXFS_FS is not set | 1312 | # CONFIG_VXFS_FS is not set |
1184 | # CONFIG_MINIX_FS is not set | 1313 | # CONFIG_MINIX_FS is not set |
1314 | # CONFIG_OMFS_FS is not set | ||
1185 | # CONFIG_HPFS_FS is not set | 1315 | # CONFIG_HPFS_FS is not set |
1186 | # CONFIG_QNX4FS_FS is not set | 1316 | # CONFIG_QNX4FS_FS is not set |
1187 | # CONFIG_ROMFS_FS is not set | 1317 | # CONFIG_ROMFS_FS is not set |
@@ -1192,13 +1322,13 @@ CONFIG_NFS_FS=y | |||
1192 | CONFIG_NFS_V3=y | 1322 | CONFIG_NFS_V3=y |
1193 | # CONFIG_NFS_V3_ACL is not set | 1323 | # CONFIG_NFS_V3_ACL is not set |
1194 | # CONFIG_NFS_V4 is not set | 1324 | # CONFIG_NFS_V4 is not set |
1195 | # CONFIG_NFSD is not set | ||
1196 | CONFIG_ROOT_NFS=y | 1325 | CONFIG_ROOT_NFS=y |
1326 | # CONFIG_NFSD is not set | ||
1197 | CONFIG_LOCKD=y | 1327 | CONFIG_LOCKD=y |
1198 | CONFIG_LOCKD_V4=y | 1328 | CONFIG_LOCKD_V4=y |
1199 | CONFIG_NFS_COMMON=y | 1329 | CONFIG_NFS_COMMON=y |
1200 | CONFIG_SUNRPC=y | 1330 | CONFIG_SUNRPC=y |
1201 | # CONFIG_SUNRPC_BIND34 is not set | 1331 | # CONFIG_SUNRPC_REGISTER_V4 is not set |
1202 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 1332 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
1203 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1333 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1204 | # CONFIG_SMB_FS is not set | 1334 | # CONFIG_SMB_FS is not set |
@@ -1210,24 +1340,8 @@ CONFIG_SUNRPC=y | |||
1210 | # | 1340 | # |
1211 | # Partition Types | 1341 | # Partition Types |
1212 | # | 1342 | # |
1213 | CONFIG_PARTITION_ADVANCED=y | 1343 | # CONFIG_PARTITION_ADVANCED is not set |
1214 | # CONFIG_ACORN_PARTITION is not set | ||
1215 | # CONFIG_OSF_PARTITION is not set | ||
1216 | # CONFIG_AMIGA_PARTITION is not set | ||
1217 | # CONFIG_ATARI_PARTITION is not set | ||
1218 | # CONFIG_MAC_PARTITION is not set | ||
1219 | CONFIG_MSDOS_PARTITION=y | 1344 | CONFIG_MSDOS_PARTITION=y |
1220 | # CONFIG_BSD_DISKLABEL is not set | ||
1221 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1222 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1223 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1224 | # CONFIG_LDM_PARTITION is not set | ||
1225 | # CONFIG_SGI_PARTITION is not set | ||
1226 | # CONFIG_ULTRIX_PARTITION is not set | ||
1227 | # CONFIG_SUN_PARTITION is not set | ||
1228 | # CONFIG_KARMA_PARTITION is not set | ||
1229 | # CONFIG_EFI_PARTITION is not set | ||
1230 | # CONFIG_SYSV68_PARTITION is not set | ||
1231 | CONFIG_NLS=y | 1345 | CONFIG_NLS=y |
1232 | CONFIG_NLS_DEFAULT="iso8859-1" | 1346 | CONFIG_NLS_DEFAULT="iso8859-1" |
1233 | CONFIG_NLS_CODEPAGE_437=y | 1347 | CONFIG_NLS_CODEPAGE_437=y |
@@ -1284,11 +1398,14 @@ CONFIG_MAGIC_SYSRQ=y | |||
1284 | CONFIG_DEBUG_KERNEL=y | 1398 | CONFIG_DEBUG_KERNEL=y |
1285 | # CONFIG_DEBUG_SHIRQ is not set | 1399 | # CONFIG_DEBUG_SHIRQ is not set |
1286 | CONFIG_DETECT_SOFTLOCKUP=y | 1400 | CONFIG_DETECT_SOFTLOCKUP=y |
1401 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
1402 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
1287 | # CONFIG_SCHED_DEBUG is not set | 1403 | # CONFIG_SCHED_DEBUG is not set |
1288 | # CONFIG_SCHEDSTATS is not set | 1404 | # CONFIG_SCHEDSTATS is not set |
1289 | # CONFIG_TIMER_STATS is not set | 1405 | # CONFIG_TIMER_STATS is not set |
1290 | # CONFIG_DEBUG_OBJECTS is not set | 1406 | # CONFIG_DEBUG_OBJECTS is not set |
1291 | # CONFIG_DEBUG_SLAB is not set | 1407 | # CONFIG_SLUB_DEBUG_ON is not set |
1408 | # CONFIG_SLUB_STATS is not set | ||
1292 | # CONFIG_DEBUG_PREEMPT is not set | 1409 | # CONFIG_DEBUG_PREEMPT is not set |
1293 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1410 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1294 | # CONFIG_RT_MUTEX_TESTER is not set | 1411 | # CONFIG_RT_MUTEX_TESTER is not set |
@@ -1300,21 +1417,40 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1300 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1417 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1301 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1418 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1302 | # CONFIG_DEBUG_KOBJECT is not set | 1419 | # CONFIG_DEBUG_KOBJECT is not set |
1303 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1420 | CONFIG_DEBUG_BUGVERBOSE=y |
1304 | CONFIG_DEBUG_INFO=y | 1421 | CONFIG_DEBUG_INFO=y |
1305 | # CONFIG_DEBUG_VM is not set | 1422 | # CONFIG_DEBUG_VM is not set |
1306 | # CONFIG_DEBUG_WRITECOUNT is not set | 1423 | # CONFIG_DEBUG_WRITECOUNT is not set |
1424 | CONFIG_DEBUG_MEMORY_INIT=y | ||
1307 | # CONFIG_DEBUG_LIST is not set | 1425 | # CONFIG_DEBUG_LIST is not set |
1308 | # CONFIG_DEBUG_SG is not set | 1426 | # CONFIG_DEBUG_SG is not set |
1309 | CONFIG_FRAME_POINTER=y | 1427 | CONFIG_FRAME_POINTER=y |
1310 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1428 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1311 | # CONFIG_RCU_TORTURE_TEST is not set | 1429 | # CONFIG_RCU_TORTURE_TEST is not set |
1430 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1312 | # CONFIG_KPROBES_SANITY_TEST is not set | 1431 | # CONFIG_KPROBES_SANITY_TEST is not set |
1313 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1432 | # CONFIG_BACKTRACE_SELF_TEST is not set |
1433 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
1314 | # CONFIG_LKDTM is not set | 1434 | # CONFIG_LKDTM is not set |
1315 | # CONFIG_FAULT_INJECTION is not set | 1435 | # CONFIG_FAULT_INJECTION is not set |
1316 | # CONFIG_LATENCYTOP is not set | 1436 | # CONFIG_LATENCYTOP is not set |
1437 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
1438 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1439 | |||
1440 | # | ||
1441 | # Tracers | ||
1442 | # | ||
1443 | # CONFIG_FUNCTION_TRACER is not set | ||
1444 | # CONFIG_IRQSOFF_TRACER is not set | ||
1445 | # CONFIG_PREEMPT_TRACER is not set | ||
1446 | # CONFIG_SCHED_TRACER is not set | ||
1447 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
1448 | # CONFIG_BOOT_TRACER is not set | ||
1449 | # CONFIG_STACK_TRACER is not set | ||
1450 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
1317 | # CONFIG_SAMPLES is not set | 1451 | # CONFIG_SAMPLES is not set |
1452 | CONFIG_HAVE_ARCH_KGDB=y | ||
1453 | # CONFIG_KGDB is not set | ||
1318 | CONFIG_DEBUG_USER=y | 1454 | CONFIG_DEBUG_USER=y |
1319 | CONFIG_DEBUG_ERRORS=y | 1455 | CONFIG_DEBUG_ERRORS=y |
1320 | # CONFIG_DEBUG_STACK_USAGE is not set | 1456 | # CONFIG_DEBUG_STACK_USAGE is not set |
@@ -1326,6 +1462,7 @@ CONFIG_DEBUG_LL=y | |||
1326 | # | 1462 | # |
1327 | # CONFIG_KEYS is not set | 1463 | # CONFIG_KEYS is not set |
1328 | # CONFIG_SECURITY is not set | 1464 | # CONFIG_SECURITY is not set |
1465 | # CONFIG_SECURITYFS is not set | ||
1329 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1466 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1330 | CONFIG_ASYNC_CORE=y | 1467 | CONFIG_ASYNC_CORE=y |
1331 | CONFIG_CRYPTO=y | 1468 | CONFIG_CRYPTO=y |
@@ -1333,8 +1470,12 @@ CONFIG_CRYPTO=y | |||
1333 | # | 1470 | # |
1334 | # Crypto core or helper | 1471 | # Crypto core or helper |
1335 | # | 1472 | # |
1473 | # CONFIG_CRYPTO_FIPS is not set | ||
1336 | CONFIG_CRYPTO_ALGAPI=m | 1474 | CONFIG_CRYPTO_ALGAPI=m |
1475 | CONFIG_CRYPTO_AEAD=m | ||
1337 | CONFIG_CRYPTO_BLKCIPHER=m | 1476 | CONFIG_CRYPTO_BLKCIPHER=m |
1477 | CONFIG_CRYPTO_HASH=m | ||
1478 | CONFIG_CRYPTO_RNG=m | ||
1338 | CONFIG_CRYPTO_MANAGER=m | 1479 | CONFIG_CRYPTO_MANAGER=m |
1339 | # CONFIG_CRYPTO_GF128MUL is not set | 1480 | # CONFIG_CRYPTO_GF128MUL is not set |
1340 | # CONFIG_CRYPTO_NULL is not set | 1481 | # CONFIG_CRYPTO_NULL is not set |
@@ -1373,6 +1514,10 @@ CONFIG_CRYPTO_PCBC=m | |||
1373 | # CONFIG_CRYPTO_MD4 is not set | 1514 | # CONFIG_CRYPTO_MD4 is not set |
1374 | # CONFIG_CRYPTO_MD5 is not set | 1515 | # CONFIG_CRYPTO_MD5 is not set |
1375 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 1516 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
1517 | # CONFIG_CRYPTO_RMD128 is not set | ||
1518 | # CONFIG_CRYPTO_RMD160 is not set | ||
1519 | # CONFIG_CRYPTO_RMD256 is not set | ||
1520 | # CONFIG_CRYPTO_RMD320 is not set | ||
1376 | # CONFIG_CRYPTO_SHA1 is not set | 1521 | # CONFIG_CRYPTO_SHA1 is not set |
1377 | # CONFIG_CRYPTO_SHA256 is not set | 1522 | # CONFIG_CRYPTO_SHA256 is not set |
1378 | # CONFIG_CRYPTO_SHA512 is not set | 1523 | # CONFIG_CRYPTO_SHA512 is not set |
@@ -1403,6 +1548,11 @@ CONFIG_CRYPTO_PCBC=m | |||
1403 | # | 1548 | # |
1404 | # CONFIG_CRYPTO_DEFLATE is not set | 1549 | # CONFIG_CRYPTO_DEFLATE is not set |
1405 | # CONFIG_CRYPTO_LZO is not set | 1550 | # CONFIG_CRYPTO_LZO is not set |
1551 | |||
1552 | # | ||
1553 | # Random Number Generation | ||
1554 | # | ||
1555 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1406 | CONFIG_CRYPTO_HW=y | 1556 | CONFIG_CRYPTO_HW=y |
1407 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | 1557 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set |
1408 | 1558 | ||
@@ -1410,10 +1560,9 @@ CONFIG_CRYPTO_HW=y | |||
1410 | # Library routines | 1560 | # Library routines |
1411 | # | 1561 | # |
1412 | CONFIG_BITREVERSE=y | 1562 | CONFIG_BITREVERSE=y |
1413 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1414 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
1415 | CONFIG_CRC_CCITT=y | 1563 | CONFIG_CRC_CCITT=y |
1416 | CONFIG_CRC16=y | 1564 | CONFIG_CRC16=y |
1565 | # CONFIG_CRC_T10DIF is not set | ||
1417 | CONFIG_CRC_ITU_T=m | 1566 | CONFIG_CRC_ITU_T=m |
1418 | CONFIG_CRC32=y | 1567 | CONFIG_CRC32=y |
1419 | # CONFIG_CRC7 is not set | 1568 | # CONFIG_CRC7 is not set |
diff --git a/arch/arm/configs/ks8695_defconfig b/arch/arm/configs/ks8695_defconfig index 6077f2cb88e4..d25c41bab06c 100644 --- a/arch/arm/configs/ks8695_defconfig +++ b/arch/arm/configs/ks8695_defconfig | |||
@@ -1,39 +1,67 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.17-rc4 | 3 | # Linux kernel version: 2.6.27-simtec-micrel1 |
4 | # Thu May 25 15:42:51 2006 | 4 | # Fri Dec 5 10:30:27 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | # CONFIG_GENERIC_TIME is not set | ||
10 | # CONFIG_GENERIC_CLOCKEVENTS is not set | ||
7 | CONFIG_MMU=y | 11 | CONFIG_MMU=y |
12 | # CONFIG_NO_IOPORT is not set | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
8 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
9 | CONFIG_GENERIC_HWEIGHT=y | 23 | CONFIG_GENERIC_HWEIGHT=y |
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 24 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
25 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
26 | CONFIG_ZONE_DMA=y | ||
27 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
11 | CONFIG_VECTORS_BASE=0xffff0000 | 28 | CONFIG_VECTORS_BASE=0xffff0000 |
29 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
12 | 30 | ||
13 | # | 31 | # |
14 | # Code maturity level options | 32 | # General setup |
15 | # | 33 | # |
16 | CONFIG_EXPERIMENTAL=y | 34 | CONFIG_EXPERIMENTAL=y |
17 | CONFIG_BROKEN_ON_SMP=y | 35 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 36 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
19 | |||
20 | # | ||
21 | # General setup | ||
22 | # | ||
23 | CONFIG_LOCALVERSION="" | 37 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | 38 | CONFIG_LOCALVERSION_AUTO=y |
25 | # CONFIG_SWAP is not set | 39 | # CONFIG_SWAP is not set |
26 | CONFIG_SYSVIPC=y | 40 | CONFIG_SYSVIPC=y |
41 | CONFIG_SYSVIPC_SYSCTL=y | ||
27 | # CONFIG_POSIX_MQUEUE is not set | 42 | # CONFIG_POSIX_MQUEUE is not set |
28 | # CONFIG_BSD_PROCESS_ACCT is not set | 43 | # CONFIG_BSD_PROCESS_ACCT is not set |
29 | CONFIG_SYSCTL=y | 44 | # CONFIG_TASKSTATS is not set |
30 | # CONFIG_AUDIT is not set | 45 | # CONFIG_AUDIT is not set |
31 | # CONFIG_IKCONFIG is not set | 46 | # CONFIG_IKCONFIG is not set |
47 | CONFIG_LOG_BUF_SHIFT=14 | ||
48 | # CONFIG_CGROUPS is not set | ||
49 | # CONFIG_GROUP_SCHED is not set | ||
50 | CONFIG_SYSFS_DEPRECATED=y | ||
51 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
32 | # CONFIG_RELAY is not set | 52 | # CONFIG_RELAY is not set |
53 | CONFIG_NAMESPACES=y | ||
54 | # CONFIG_UTS_NS is not set | ||
55 | # CONFIG_IPC_NS is not set | ||
56 | # CONFIG_USER_NS is not set | ||
57 | # CONFIG_PID_NS is not set | ||
58 | CONFIG_BLK_DEV_INITRD=y | ||
33 | CONFIG_INITRAMFS_SOURCE="" | 59 | CONFIG_INITRAMFS_SOURCE="" |
34 | CONFIG_UID16=y | ||
35 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 60 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
61 | CONFIG_SYSCTL=y | ||
36 | # CONFIG_EMBEDDED is not set | 62 | # CONFIG_EMBEDDED is not set |
63 | CONFIG_UID16=y | ||
64 | CONFIG_SYSCTL_SYSCALL=y | ||
37 | CONFIG_KALLSYMS=y | 65 | CONFIG_KALLSYMS=y |
38 | # CONFIG_KALLSYMS_ALL is not set | 66 | # CONFIG_KALLSYMS_ALL is not set |
39 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 67 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
@@ -41,30 +69,50 @@ CONFIG_HOTPLUG=y | |||
41 | CONFIG_PRINTK=y | 69 | CONFIG_PRINTK=y |
42 | CONFIG_BUG=y | 70 | CONFIG_BUG=y |
43 | CONFIG_ELF_CORE=y | 71 | CONFIG_ELF_CORE=y |
72 | CONFIG_COMPAT_BRK=y | ||
44 | CONFIG_BASE_FULL=y | 73 | CONFIG_BASE_FULL=y |
45 | CONFIG_FUTEX=y | 74 | CONFIG_FUTEX=y |
75 | CONFIG_ANON_INODES=y | ||
46 | CONFIG_EPOLL=y | 76 | CONFIG_EPOLL=y |
77 | CONFIG_SIGNALFD=y | ||
78 | CONFIG_TIMERFD=y | ||
79 | CONFIG_EVENTFD=y | ||
47 | CONFIG_SHMEM=y | 80 | CONFIG_SHMEM=y |
81 | CONFIG_VM_EVENT_COUNTERS=y | ||
48 | CONFIG_SLAB=y | 82 | CONFIG_SLAB=y |
83 | # CONFIG_SLUB is not set | ||
84 | # CONFIG_SLOB is not set | ||
85 | # CONFIG_PROFILING is not set | ||
86 | # CONFIG_MARKERS is not set | ||
87 | CONFIG_HAVE_OPROFILE=y | ||
88 | # CONFIG_KPROBES is not set | ||
89 | # CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set | ||
90 | # CONFIG_HAVE_IOREMAP_PROT is not set | ||
91 | CONFIG_HAVE_KPROBES=y | ||
92 | CONFIG_HAVE_KRETPROBES=y | ||
93 | # CONFIG_HAVE_ARCH_TRACEHOOK is not set | ||
94 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
95 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | ||
96 | # CONFIG_HAVE_CLK is not set | ||
97 | CONFIG_PROC_PAGE_MONITOR=y | ||
98 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
99 | CONFIG_SLABINFO=y | ||
100 | CONFIG_RT_MUTEXES=y | ||
49 | # CONFIG_TINY_SHMEM is not set | 101 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | 102 | CONFIG_BASE_SMALL=0 |
51 | # CONFIG_SLOB is not set | ||
52 | CONFIG_OBSOLETE_INTERMODULE=y | ||
53 | |||
54 | # | ||
55 | # Loadable module support | ||
56 | # | ||
57 | CONFIG_MODULES=y | 103 | CONFIG_MODULES=y |
104 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
58 | CONFIG_MODULE_UNLOAD=y | 105 | CONFIG_MODULE_UNLOAD=y |
59 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 106 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
60 | # CONFIG_MODVERSIONS is not set | 107 | # CONFIG_MODVERSIONS is not set |
61 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 108 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
62 | CONFIG_KMOD=y | 109 | CONFIG_KMOD=y |
63 | 110 | CONFIG_BLOCK=y | |
64 | # | 111 | # CONFIG_LBD is not set |
65 | # Block layer | ||
66 | # | ||
67 | # CONFIG_BLK_DEV_IO_TRACE is not set | 112 | # CONFIG_BLK_DEV_IO_TRACE is not set |
113 | # CONFIG_LSF is not set | ||
114 | # CONFIG_BLK_DEV_BSG is not set | ||
115 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
68 | 116 | ||
69 | # | 117 | # |
70 | # IO Schedulers | 118 | # IO Schedulers |
@@ -78,60 +126,77 @@ CONFIG_DEFAULT_AS=y | |||
78 | # CONFIG_DEFAULT_CFQ is not set | 126 | # CONFIG_DEFAULT_CFQ is not set |
79 | # CONFIG_DEFAULT_NOOP is not set | 127 | # CONFIG_DEFAULT_NOOP is not set |
80 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 128 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
129 | CONFIG_CLASSIC_RCU=y | ||
81 | 130 | ||
82 | # | 131 | # |
83 | # System Type | 132 | # System Type |
84 | # | 133 | # |
134 | # CONFIG_ARCH_AAEC2000 is not set | ||
135 | # CONFIG_ARCH_INTEGRATOR is not set | ||
136 | # CONFIG_ARCH_REALVIEW is not set | ||
137 | # CONFIG_ARCH_VERSATILE is not set | ||
138 | # CONFIG_ARCH_AT91 is not set | ||
85 | # CONFIG_ARCH_CLPS7500 is not set | 139 | # CONFIG_ARCH_CLPS7500 is not set |
86 | # CONFIG_ARCH_CLPS711X is not set | 140 | # CONFIG_ARCH_CLPS711X is not set |
87 | # CONFIG_ARCH_CO285 is not set | ||
88 | # CONFIG_ARCH_EBSA110 is not set | 141 | # CONFIG_ARCH_EBSA110 is not set |
89 | # CONFIG_ARCH_EP93XX is not set | 142 | # CONFIG_ARCH_EP93XX is not set |
90 | # CONFIG_ARCH_FOOTBRIDGE is not set | 143 | # CONFIG_ARCH_FOOTBRIDGE is not set |
91 | # CONFIG_ARCH_INTEGRATOR is not set | 144 | # CONFIG_ARCH_NETX is not set |
92 | # CONFIG_ARCH_IOP3XX is not set | 145 | # CONFIG_ARCH_H720X is not set |
93 | # CONFIG_ARCH_IXP4XX is not set | 146 | # CONFIG_ARCH_IMX is not set |
94 | # CONFIG_ARCH_IXP2000 is not set | 147 | # CONFIG_ARCH_IOP13XX is not set |
148 | # CONFIG_ARCH_IOP32X is not set | ||
149 | # CONFIG_ARCH_IOP33X is not set | ||
95 | # CONFIG_ARCH_IXP23XX is not set | 150 | # CONFIG_ARCH_IXP23XX is not set |
151 | # CONFIG_ARCH_IXP2000 is not set | ||
152 | # CONFIG_ARCH_IXP4XX is not set | ||
96 | # CONFIG_ARCH_L7200 is not set | 153 | # CONFIG_ARCH_L7200 is not set |
154 | # CONFIG_ARCH_KIRKWOOD is not set | ||
155 | CONFIG_ARCH_KS8695=y | ||
156 | # CONFIG_ARCH_NS9XXX is not set | ||
157 | # CONFIG_ARCH_LOKI is not set | ||
158 | # CONFIG_ARCH_MV78XX0 is not set | ||
159 | # CONFIG_ARCH_MXC is not set | ||
160 | # CONFIG_ARCH_ORION5X is not set | ||
161 | # CONFIG_ARCH_PNX4008 is not set | ||
97 | # CONFIG_ARCH_PXA is not set | 162 | # CONFIG_ARCH_PXA is not set |
98 | # CONFIG_ARCH_RPC is not set | 163 | # CONFIG_ARCH_RPC is not set |
99 | # CONFIG_ARCH_SA1100 is not set | 164 | # CONFIG_ARCH_SA1100 is not set |
100 | # CONFIG_ARCH_S3C2410 is not set | 165 | # CONFIG_ARCH_S3C2410 is not set |
101 | # CONFIG_ARCH_SHARK is not set | 166 | # CONFIG_ARCH_SHARK is not set |
102 | # CONFIG_ARCH_LH7A40X is not set | 167 | # CONFIG_ARCH_LH7A40X is not set |
168 | # CONFIG_ARCH_DAVINCI is not set | ||
103 | # CONFIG_ARCH_OMAP is not set | 169 | # CONFIG_ARCH_OMAP is not set |
104 | # CONFIG_ARCH_VERSATILE is not set | 170 | # CONFIG_ARCH_MSM7X00A is not set |
105 | # CONFIG_ARCH_REALVIEW is not set | 171 | |
106 | # CONFIG_ARCH_IMX is not set | 172 | # |
107 | # CONFIG_ARCH_H720X is not set | 173 | # Boot options |
108 | # CONFIG_ARCH_AAEC2000 is not set | 174 | # |
109 | # CONFIG_ARCH_AT91 is not set | 175 | |
110 | CONFIG_ARCH_KS8695=y | 176 | # |
177 | # Power management | ||
178 | # | ||
111 | 179 | ||
112 | # | 180 | # |
113 | # Kendin/Micrel KS8695 Implementations | 181 | # Kendin/Micrel KS8695 Implementations |
114 | # | 182 | # |
115 | CONFIG_MACH_KS8695=y | 183 | CONFIG_MACH_KS8695=y |
116 | # CONFIG_MACH_DSM320 is not set | 184 | CONFIG_MACH_DSM320=y |
117 | # CONFIG_MACH_CM4002 is not set | ||
118 | # CONFIG_MACH_CM4008 is not set | ||
119 | # CONFIG_MACH_CM40xx is not set | ||
120 | # CONFIG_MACH_LITE300 is not set | ||
121 | # CONFIG_MACH_SE4200 is not set | ||
122 | # CONFIG_MACH_MANGA_KS8695 is not set | ||
123 | 185 | ||
124 | # | 186 | # |
125 | # Processor Type | 187 | # Processor Type |
126 | # | 188 | # |
127 | CONFIG_CPU_32=y | 189 | CONFIG_CPU_32=y |
128 | CONFIG_CPU_ARM922T=y | 190 | CONFIG_CPU_ARM922T=y |
129 | CONFIG_CPU_32v4=y | 191 | CONFIG_CPU_32v4T=y |
130 | CONFIG_CPU_ABRT_EV4T=y | 192 | CONFIG_CPU_ABRT_EV4T=y |
193 | CONFIG_CPU_PABRT_NOIFAR=y | ||
131 | CONFIG_CPU_CACHE_V4WT=y | 194 | CONFIG_CPU_CACHE_V4WT=y |
132 | CONFIG_CPU_CACHE_VIVT=y | 195 | CONFIG_CPU_CACHE_VIVT=y |
133 | CONFIG_CPU_COPY_V4WB=y | 196 | CONFIG_CPU_COPY_V4WB=y |
134 | CONFIG_CPU_TLB_V4WBI=y | 197 | CONFIG_CPU_TLB_V4WBI=y |
198 | CONFIG_CPU_CP15=y | ||
199 | CONFIG_CPU_CP15_MMU=y | ||
135 | 200 | ||
136 | # | 201 | # |
137 | # Processor Features | 202 | # Processor Features |
@@ -140,16 +205,16 @@ CONFIG_CPU_TLB_V4WBI=y | |||
140 | # CONFIG_CPU_ICACHE_DISABLE is not set | 205 | # CONFIG_CPU_ICACHE_DISABLE is not set |
141 | # CONFIG_CPU_DCACHE_DISABLE is not set | 206 | # CONFIG_CPU_DCACHE_DISABLE is not set |
142 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | 207 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set |
208 | # CONFIG_OUTER_CACHE is not set | ||
143 | 209 | ||
144 | # | 210 | # |
145 | # Bus support | 211 | # Bus support |
146 | # | 212 | # |
147 | CONFIG_PCI=y | 213 | CONFIG_PCI=y |
214 | CONFIG_PCI_SYSCALL=y | ||
215 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
216 | CONFIG_PCI_LEGACY=y | ||
148 | CONFIG_PCI_DEBUG=y | 217 | CONFIG_PCI_DEBUG=y |
149 | |||
150 | # | ||
151 | # PCCARD (PCMCIA/CardBus) support | ||
152 | # | ||
153 | CONFIG_PCCARD=y | 218 | CONFIG_PCCARD=y |
154 | # CONFIG_PCMCIA_DEBUG is not set | 219 | # CONFIG_PCMCIA_DEBUG is not set |
155 | CONFIG_PCMCIA=y | 220 | CONFIG_PCMCIA=y |
@@ -173,9 +238,12 @@ CONFIG_PCCARD_NONSTATIC=y | |||
173 | # | 238 | # |
174 | # Kernel Features | 239 | # Kernel Features |
175 | # | 240 | # |
241 | # CONFIG_TICK_ONESHOT is not set | ||
176 | # CONFIG_PREEMPT is not set | 242 | # CONFIG_PREEMPT is not set |
177 | CONFIG_HZ=100 | 243 | CONFIG_HZ=100 |
178 | # CONFIG_AEABI is not set | 244 | CONFIG_AEABI=y |
245 | CONFIG_OABI_COMPAT=y | ||
246 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
179 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 247 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set |
180 | CONFIG_SELECT_MEMORY_MODEL=y | 248 | CONFIG_SELECT_MEMORY_MODEL=y |
181 | CONFIG_FLATMEM_MANUAL=y | 249 | CONFIG_FLATMEM_MANUAL=y |
@@ -184,7 +252,14 @@ CONFIG_FLATMEM_MANUAL=y | |||
184 | CONFIG_FLATMEM=y | 252 | CONFIG_FLATMEM=y |
185 | CONFIG_FLAT_NODE_MEM_MAP=y | 253 | CONFIG_FLAT_NODE_MEM_MAP=y |
186 | # CONFIG_SPARSEMEM_STATIC is not set | 254 | # CONFIG_SPARSEMEM_STATIC is not set |
255 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
256 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
187 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | 257 | CONFIG_SPLIT_PTLOCK_CPUS=4096 |
258 | # CONFIG_RESOURCES_64BIT is not set | ||
259 | CONFIG_ZONE_DMA_FLAG=1 | ||
260 | CONFIG_BOUNCE=y | ||
261 | CONFIG_VIRT_TO_BUS=y | ||
262 | # CONFIG_LEDS is not set | ||
188 | CONFIG_ALIGNMENT_TRAP=y | 263 | CONFIG_ALIGNMENT_TRAP=y |
189 | 264 | ||
190 | # | 265 | # |
@@ -194,6 +269,7 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 | |||
194 | CONFIG_ZBOOT_ROM_BSS=0x0 | 269 | CONFIG_ZBOOT_ROM_BSS=0x0 |
195 | CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev/ram0 rw" | 270 | CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev/ram0 rw" |
196 | # CONFIG_XIP_KERNEL is not set | 271 | # CONFIG_XIP_KERNEL is not set |
272 | # CONFIG_KEXEC is not set | ||
197 | 273 | ||
198 | # | 274 | # |
199 | # Floating point emulation | 275 | # Floating point emulation |
@@ -202,8 +278,7 @@ CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20410000,3145728 root=/dev | |||
202 | # | 278 | # |
203 | # At least one emulation must be selected | 279 | # At least one emulation must be selected |
204 | # | 280 | # |
205 | CONFIG_FPE_NWFPE=y | 281 | # CONFIG_FPE_NWFPE is not set |
206 | # CONFIG_FPE_NWFPE_XP is not set | ||
207 | # CONFIG_FPE_FASTFPE is not set | 282 | # CONFIG_FPE_FASTFPE is not set |
208 | 283 | ||
209 | # | 284 | # |
@@ -212,34 +287,33 @@ CONFIG_FPE_NWFPE=y | |||
212 | CONFIG_BINFMT_ELF=y | 287 | CONFIG_BINFMT_ELF=y |
213 | # CONFIG_BINFMT_AOUT is not set | 288 | # CONFIG_BINFMT_AOUT is not set |
214 | # CONFIG_BINFMT_MISC is not set | 289 | # CONFIG_BINFMT_MISC is not set |
215 | # CONFIG_ARTHUR is not set | ||
216 | 290 | ||
217 | # | 291 | # |
218 | # Power management options | 292 | # Power management options |
219 | # | 293 | # |
220 | # CONFIG_PM is not set | 294 | # CONFIG_PM is not set |
221 | # CONFIG_APM is not set | 295 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
222 | |||
223 | # | ||
224 | # Networking | ||
225 | # | ||
226 | CONFIG_NET=y | 296 | CONFIG_NET=y |
227 | 297 | ||
228 | # | 298 | # |
229 | # Networking options | 299 | # Networking options |
230 | # | 300 | # |
231 | # CONFIG_NETDEBUG is not set | ||
232 | CONFIG_PACKET=y | 301 | CONFIG_PACKET=y |
233 | # CONFIG_PACKET_MMAP is not set | 302 | # CONFIG_PACKET_MMAP is not set |
234 | CONFIG_UNIX=y | 303 | CONFIG_UNIX=y |
304 | CONFIG_XFRM=y | ||
305 | # CONFIG_XFRM_USER is not set | ||
306 | # CONFIG_XFRM_SUB_POLICY is not set | ||
307 | # CONFIG_XFRM_MIGRATE is not set | ||
308 | # CONFIG_XFRM_STATISTICS is not set | ||
235 | # CONFIG_NET_KEY is not set | 309 | # CONFIG_NET_KEY is not set |
236 | CONFIG_INET=y | 310 | CONFIG_INET=y |
237 | # CONFIG_IP_MULTICAST is not set | 311 | # CONFIG_IP_MULTICAST is not set |
238 | # CONFIG_IP_ADVANCED_ROUTER is not set | 312 | # CONFIG_IP_ADVANCED_ROUTER is not set |
239 | CONFIG_IP_FIB_HASH=y | 313 | CONFIG_IP_FIB_HASH=y |
240 | CONFIG_IP_PNP=y | 314 | CONFIG_IP_PNP=y |
241 | # CONFIG_IP_PNP_DHCP is not set | 315 | CONFIG_IP_PNP_DHCP=y |
242 | CONFIG_IP_PNP_BOOTP=y | 316 | # CONFIG_IP_PNP_BOOTP is not set |
243 | # CONFIG_IP_PNP_RARP is not set | 317 | # CONFIG_IP_PNP_RARP is not set |
244 | # CONFIG_NET_IPIP is not set | 318 | # CONFIG_NET_IPIP is not set |
245 | # CONFIG_NET_IPGRE is not set | 319 | # CONFIG_NET_IPGRE is not set |
@@ -250,28 +324,21 @@ CONFIG_IP_PNP_BOOTP=y | |||
250 | # CONFIG_INET_IPCOMP is not set | 324 | # CONFIG_INET_IPCOMP is not set |
251 | # CONFIG_INET_XFRM_TUNNEL is not set | 325 | # CONFIG_INET_XFRM_TUNNEL is not set |
252 | # CONFIG_INET_TUNNEL is not set | 326 | # CONFIG_INET_TUNNEL is not set |
327 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
328 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
329 | CONFIG_INET_XFRM_MODE_BEET=y | ||
330 | # CONFIG_INET_LRO is not set | ||
253 | CONFIG_INET_DIAG=y | 331 | CONFIG_INET_DIAG=y |
254 | CONFIG_INET_TCP_DIAG=y | 332 | CONFIG_INET_TCP_DIAG=y |
255 | # CONFIG_TCP_CONG_ADVANCED is not set | 333 | # CONFIG_TCP_CONG_ADVANCED is not set |
256 | CONFIG_TCP_CONG_BIC=y | 334 | CONFIG_TCP_CONG_CUBIC=y |
335 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
336 | # CONFIG_TCP_MD5SIG is not set | ||
257 | # CONFIG_IPV6 is not set | 337 | # CONFIG_IPV6 is not set |
258 | # CONFIG_INET6_XFRM_TUNNEL is not set | 338 | # CONFIG_NETWORK_SECMARK is not set |
259 | # CONFIG_INET6_TUNNEL is not set | ||
260 | # CONFIG_NETFILTER is not set | 339 | # CONFIG_NETFILTER is not set |
261 | |||
262 | # | ||
263 | # DCCP Configuration (EXPERIMENTAL) | ||
264 | # | ||
265 | # CONFIG_IP_DCCP is not set | 340 | # CONFIG_IP_DCCP is not set |
266 | |||
267 | # | ||
268 | # SCTP Configuration (EXPERIMENTAL) | ||
269 | # | ||
270 | # CONFIG_IP_SCTP is not set | 341 | # CONFIG_IP_SCTP is not set |
271 | |||
272 | # | ||
273 | # TIPC Configuration (EXPERIMENTAL) | ||
274 | # | ||
275 | # CONFIG_TIPC is not set | 342 | # CONFIG_TIPC is not set |
276 | # CONFIG_ATM is not set | 343 | # CONFIG_ATM is not set |
277 | # CONFIG_BRIDGE is not set | 344 | # CONFIG_BRIDGE is not set |
@@ -282,13 +349,8 @@ CONFIG_TCP_CONG_BIC=y | |||
282 | # CONFIG_ATALK is not set | 349 | # CONFIG_ATALK is not set |
283 | # CONFIG_X25 is not set | 350 | # CONFIG_X25 is not set |
284 | # CONFIG_LAPB is not set | 351 | # CONFIG_LAPB is not set |
285 | # CONFIG_NET_DIVERT is not set | ||
286 | # CONFIG_ECONET is not set | 352 | # CONFIG_ECONET is not set |
287 | # CONFIG_WAN_ROUTER is not set | 353 | # CONFIG_WAN_ROUTER is not set |
288 | |||
289 | # | ||
290 | # QoS and/or fair queueing | ||
291 | # | ||
292 | # CONFIG_NET_SCHED is not set | 354 | # CONFIG_NET_SCHED is not set |
293 | 355 | ||
294 | # | 356 | # |
@@ -296,9 +358,21 @@ CONFIG_TCP_CONG_BIC=y | |||
296 | # | 358 | # |
297 | # CONFIG_NET_PKTGEN is not set | 359 | # CONFIG_NET_PKTGEN is not set |
298 | # CONFIG_HAMRADIO is not set | 360 | # CONFIG_HAMRADIO is not set |
361 | # CONFIG_CAN is not set | ||
299 | # CONFIG_IRDA is not set | 362 | # CONFIG_IRDA is not set |
300 | # CONFIG_BT is not set | 363 | # CONFIG_BT is not set |
364 | # CONFIG_AF_RXRPC is not set | ||
365 | |||
366 | # | ||
367 | # Wireless | ||
368 | # | ||
369 | # CONFIG_CFG80211 is not set | ||
370 | CONFIG_WIRELESS_EXT=y | ||
371 | CONFIG_WIRELESS_EXT_SYSFS=y | ||
372 | # CONFIG_MAC80211 is not set | ||
301 | # CONFIG_IEEE80211 is not set | 373 | # CONFIG_IEEE80211 is not set |
374 | # CONFIG_RFKILL is not set | ||
375 | # CONFIG_NET_9P is not set | ||
302 | 376 | ||
303 | # | 377 | # |
304 | # Device Drivers | 378 | # Device Drivers |
@@ -307,36 +381,40 @@ CONFIG_TCP_CONG_BIC=y | |||
307 | # | 381 | # |
308 | # Generic Driver Options | 382 | # Generic Driver Options |
309 | # | 383 | # |
384 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
310 | CONFIG_STANDALONE=y | 385 | CONFIG_STANDALONE=y |
311 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 386 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
312 | CONFIG_FW_LOADER=y | 387 | CONFIG_FW_LOADER=y |
388 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
389 | CONFIG_EXTRA_FIRMWARE="" | ||
313 | # CONFIG_DEBUG_DRIVER is not set | 390 | # CONFIG_DEBUG_DRIVER is not set |
314 | 391 | # CONFIG_DEBUG_DEVRES is not set | |
315 | # | 392 | # CONFIG_SYS_HYPERVISOR is not set |
316 | # Connector - unified userspace <-> kernelspace linker | ||
317 | # | ||
318 | # CONFIG_CONNECTOR is not set | 393 | # CONFIG_CONNECTOR is not set |
319 | |||
320 | # | ||
321 | # Memory Technology Devices (MTD) | ||
322 | # | ||
323 | CONFIG_MTD=y | 394 | CONFIG_MTD=y |
324 | # CONFIG_MTD_DEBUG is not set | 395 | # CONFIG_MTD_DEBUG is not set |
325 | # CONFIG_MTD_CONCAT is not set | 396 | # CONFIG_MTD_CONCAT is not set |
326 | CONFIG_MTD_PARTITIONS=y | 397 | CONFIG_MTD_PARTITIONS=y |
327 | # CONFIG_MTD_REDBOOT_PARTS is not set | 398 | CONFIG_MTD_REDBOOT_PARTS=y |
399 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
400 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
401 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
328 | CONFIG_MTD_CMDLINE_PARTS=y | 402 | CONFIG_MTD_CMDLINE_PARTS=y |
329 | # CONFIG_MTD_AFS_PARTS is not set | 403 | # CONFIG_MTD_AFS_PARTS is not set |
404 | # CONFIG_MTD_AR7_PARTS is not set | ||
330 | 405 | ||
331 | # | 406 | # |
332 | # User Modules And Translation Layers | 407 | # User Modules And Translation Layers |
333 | # | 408 | # |
334 | CONFIG_MTD_CHAR=y | 409 | CONFIG_MTD_CHAR=y |
410 | CONFIG_MTD_BLKDEVS=y | ||
335 | CONFIG_MTD_BLOCK=y | 411 | CONFIG_MTD_BLOCK=y |
336 | # CONFIG_FTL is not set | 412 | # CONFIG_FTL is not set |
337 | # CONFIG_NFTL is not set | 413 | # CONFIG_NFTL is not set |
338 | # CONFIG_INFTL is not set | 414 | # CONFIG_INFTL is not set |
339 | # CONFIG_RFD_FTL is not set | 415 | # CONFIG_RFD_FTL is not set |
416 | # CONFIG_SSFDC is not set | ||
417 | # CONFIG_MTD_OOPS is not set | ||
340 | 418 | ||
341 | # | 419 | # |
342 | # RAM/ROM/Flash chip drivers | 420 | # RAM/ROM/Flash chip drivers |
@@ -355,22 +433,25 @@ CONFIG_MTD_CFI_I1=y | |||
355 | CONFIG_MTD_CFI_I2=y | 433 | CONFIG_MTD_CFI_I2=y |
356 | # CONFIG_MTD_CFI_I4 is not set | 434 | # CONFIG_MTD_CFI_I4 is not set |
357 | # CONFIG_MTD_CFI_I8 is not set | 435 | # CONFIG_MTD_CFI_I8 is not set |
358 | # CONFIG_MTD_CFI_INTELEXT is not set | 436 | CONFIG_MTD_CFI_INTELEXT=y |
359 | CONFIG_MTD_CFI_AMDSTD=y | 437 | # CONFIG_MTD_CFI_AMDSTD is not set |
360 | # CONFIG_MTD_CFI_STAA is not set | 438 | # CONFIG_MTD_CFI_STAA is not set |
361 | CONFIG_MTD_CFI_UTIL=y | 439 | CONFIG_MTD_CFI_UTIL=y |
362 | # CONFIG_MTD_RAM is not set | 440 | # CONFIG_MTD_RAM is not set |
363 | # CONFIG_MTD_ROM is not set | 441 | # CONFIG_MTD_ROM is not set |
364 | # CONFIG_MTD_ABSENT is not set | 442 | # CONFIG_MTD_ABSENT is not set |
365 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
366 | 443 | ||
367 | # | 444 | # |
368 | # Mapping drivers for chip access | 445 | # Mapping drivers for chip access |
369 | # | 446 | # |
370 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 447 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
371 | # CONFIG_MTD_PHYSMAP is not set | 448 | CONFIG_MTD_PHYSMAP=y |
449 | CONFIG_MTD_PHYSMAP_START=0x8000000 | ||
450 | CONFIG_MTD_PHYSMAP_LEN=0 | ||
451 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | ||
372 | # CONFIG_MTD_ARM_INTEGRATOR is not set | 452 | # CONFIG_MTD_ARM_INTEGRATOR is not set |
373 | # CONFIG_MTD_IMPA7 is not set | 453 | # CONFIG_MTD_IMPA7 is not set |
454 | # CONFIG_MTD_INTEL_VR_NOR is not set | ||
374 | # CONFIG_MTD_PLATRAM is not set | 455 | # CONFIG_MTD_PLATRAM is not set |
375 | 456 | ||
376 | # | 457 | # |
@@ -388,29 +469,15 @@ CONFIG_MTD_CFI_UTIL=y | |||
388 | # CONFIG_MTD_DOC2000 is not set | 469 | # CONFIG_MTD_DOC2000 is not set |
389 | # CONFIG_MTD_DOC2001 is not set | 470 | # CONFIG_MTD_DOC2001 is not set |
390 | # CONFIG_MTD_DOC2001PLUS is not set | 471 | # CONFIG_MTD_DOC2001PLUS is not set |
391 | |||
392 | # | ||
393 | # NAND Flash Device Drivers | ||
394 | # | ||
395 | # CONFIG_MTD_NAND is not set | 472 | # CONFIG_MTD_NAND is not set |
396 | |||
397 | # | ||
398 | # OneNAND Flash Device Drivers | ||
399 | # | ||
400 | # CONFIG_MTD_ONENAND is not set | 473 | # CONFIG_MTD_ONENAND is not set |
401 | 474 | ||
402 | # | 475 | # |
403 | # Parallel port support | 476 | # UBI - Unsorted block images |
404 | # | 477 | # |
478 | # CONFIG_MTD_UBI is not set | ||
405 | # CONFIG_PARPORT is not set | 479 | # CONFIG_PARPORT is not set |
406 | 480 | CONFIG_BLK_DEV=y | |
407 | # | ||
408 | # Plug and Play support | ||
409 | # | ||
410 | |||
411 | # | ||
412 | # Block devices | ||
413 | # | ||
414 | # CONFIG_BLK_CPQ_DA is not set | 481 | # CONFIG_BLK_CPQ_DA is not set |
415 | # CONFIG_BLK_CPQ_CISS_DA is not set | 482 | # CONFIG_BLK_CPQ_CISS_DA is not set |
416 | # CONFIG_BLK_DEV_DAC960 is not set | 483 | # CONFIG_BLK_DEV_DAC960 is not set |
@@ -422,13 +489,17 @@ CONFIG_MTD_CFI_UTIL=y | |||
422 | CONFIG_BLK_DEV_RAM=y | 489 | CONFIG_BLK_DEV_RAM=y |
423 | CONFIG_BLK_DEV_RAM_COUNT=16 | 490 | CONFIG_BLK_DEV_RAM_COUNT=16 |
424 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 491 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
425 | CONFIG_BLK_DEV_INITRD=y | 492 | # CONFIG_BLK_DEV_XIP is not set |
426 | # CONFIG_CDROM_PKTCDVD is not set | 493 | # CONFIG_CDROM_PKTCDVD is not set |
427 | # CONFIG_ATA_OVER_ETH is not set | 494 | # CONFIG_ATA_OVER_ETH is not set |
428 | 495 | CONFIG_MISC_DEVICES=y | |
429 | # | 496 | # CONFIG_PHANTOM is not set |
430 | # ATA/ATAPI/MFM/RLL support | 497 | # CONFIG_EEPROM_93CX6 is not set |
431 | # | 498 | # CONFIG_SGI_IOC4 is not set |
499 | # CONFIG_TIFM_CORE is not set | ||
500 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
501 | # CONFIG_HP_ILO is not set | ||
502 | CONFIG_HAVE_IDE=y | ||
432 | # CONFIG_IDE is not set | 503 | # CONFIG_IDE is not set |
433 | 504 | ||
434 | # | 505 | # |
@@ -436,127 +507,85 @@ CONFIG_BLK_DEV_INITRD=y | |||
436 | # | 507 | # |
437 | # CONFIG_RAID_ATTRS is not set | 508 | # CONFIG_RAID_ATTRS is not set |
438 | # CONFIG_SCSI is not set | 509 | # CONFIG_SCSI is not set |
439 | 510 | # CONFIG_SCSI_DMA is not set | |
440 | # | 511 | # CONFIG_SCSI_NETLINK is not set |
441 | # Multi-device support (RAID and LVM) | 512 | # CONFIG_ATA is not set |
442 | # | ||
443 | # CONFIG_MD is not set | 513 | # CONFIG_MD is not set |
444 | |||
445 | # | ||
446 | # Fusion MPT device support | ||
447 | # | ||
448 | # CONFIG_FUSION is not set | 514 | # CONFIG_FUSION is not set |
449 | 515 | ||
450 | # | 516 | # |
451 | # IEEE 1394 (FireWire) support | 517 | # IEEE 1394 (FireWire) support |
452 | # | 518 | # |
453 | # CONFIG_IEEE1394 is not set | ||
454 | 519 | ||
455 | # | 520 | # |
456 | # I2O device support | 521 | # Enable only one of the two stacks, unless you know what you are doing |
457 | # | 522 | # |
523 | # CONFIG_FIREWIRE is not set | ||
524 | # CONFIG_IEEE1394 is not set | ||
458 | # CONFIG_I2O is not set | 525 | # CONFIG_I2O is not set |
459 | |||
460 | # | ||
461 | # Network device support | ||
462 | # | ||
463 | CONFIG_NETDEVICES=y | 526 | CONFIG_NETDEVICES=y |
464 | # CONFIG_DUMMY is not set | 527 | # CONFIG_DUMMY is not set |
465 | # CONFIG_BONDING is not set | 528 | # CONFIG_BONDING is not set |
529 | # CONFIG_MACVLAN is not set | ||
466 | # CONFIG_EQUALIZER is not set | 530 | # CONFIG_EQUALIZER is not set |
467 | # CONFIG_TUN is not set | 531 | # CONFIG_TUN is not set |
468 | 532 | # CONFIG_VETH is not set | |
469 | # | ||
470 | # ARCnet devices | ||
471 | # | ||
472 | # CONFIG_ARCNET is not set | 533 | # CONFIG_ARCNET is not set |
473 | |||
474 | # | ||
475 | # PHY device support | ||
476 | # | ||
477 | # CONFIG_PHYLIB is not set | 534 | # CONFIG_PHYLIB is not set |
478 | |||
479 | # | ||
480 | # Ethernet (10 or 100Mbit) | ||
481 | # | ||
482 | CONFIG_NET_ETHERNET=y | 535 | CONFIG_NET_ETHERNET=y |
483 | # CONFIG_MII is not set | 536 | CONFIG_MII=y |
484 | CONFIG_ARM_KS8695_ETHER=y | 537 | # CONFIG_AX88796 is not set |
485 | # CONFIG_HAPPYMEAL is not set | 538 | # CONFIG_HAPPYMEAL is not set |
486 | # CONFIG_SUNGEM is not set | 539 | # CONFIG_SUNGEM is not set |
487 | # CONFIG_CASSINI is not set | 540 | # CONFIG_CASSINI is not set |
488 | # CONFIG_NET_VENDOR_3COM is not set | 541 | # CONFIG_NET_VENDOR_3COM is not set |
489 | # CONFIG_SMC91X is not set | 542 | # CONFIG_SMC91X is not set |
490 | # CONFIG_DM9000 is not set | 543 | # CONFIG_DM9000 is not set |
491 | |||
492 | # | ||
493 | # Tulip family network device support | ||
494 | # | ||
495 | # CONFIG_NET_TULIP is not set | 544 | # CONFIG_NET_TULIP is not set |
496 | # CONFIG_HP100 is not set | 545 | # CONFIG_HP100 is not set |
546 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
547 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
548 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
549 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
497 | # CONFIG_NET_PCI is not set | 550 | # CONFIG_NET_PCI is not set |
498 | 551 | # CONFIG_B44 is not set | |
499 | # | 552 | # CONFIG_NETDEV_1000 is not set |
500 | # Ethernet (1000 Mbit) | 553 | # CONFIG_NETDEV_10000 is not set |
501 | # | ||
502 | # CONFIG_ACENIC is not set | ||
503 | # CONFIG_DL2K is not set | ||
504 | # CONFIG_E1000 is not set | ||
505 | # CONFIG_NS83820 is not set | ||
506 | # CONFIG_HAMACHI is not set | ||
507 | # CONFIG_YELLOWFIN is not set | ||
508 | # CONFIG_R8169 is not set | ||
509 | # CONFIG_SIS190 is not set | ||
510 | # CONFIG_SKGE is not set | ||
511 | # CONFIG_SKY2 is not set | ||
512 | # CONFIG_SK98LIN is not set | ||
513 | # CONFIG_TIGON3 is not set | ||
514 | # CONFIG_BNX2 is not set | ||
515 | |||
516 | # | ||
517 | # Ethernet (10000 Mbit) | ||
518 | # | ||
519 | # CONFIG_CHELSIO_T1 is not set | ||
520 | # CONFIG_IXGB is not set | ||
521 | # CONFIG_S2IO is not set | ||
522 | |||
523 | # | ||
524 | # Token Ring devices | ||
525 | # | ||
526 | # CONFIG_TR is not set | 554 | # CONFIG_TR is not set |
527 | 555 | ||
528 | # | 556 | # |
529 | # Wireless LAN (non-hamradio) | 557 | # Wireless LAN |
530 | # | 558 | # |
531 | # CONFIG_NET_RADIO is not set | 559 | # CONFIG_WLAN_PRE80211 is not set |
532 | 560 | CONFIG_WLAN_80211=y | |
533 | # | 561 | # CONFIG_PCMCIA_RAYCS is not set |
534 | # PCMCIA network device support | 562 | # CONFIG_IPW2100 is not set |
535 | # | 563 | # CONFIG_IPW2200 is not set |
564 | # CONFIG_LIBERTAS is not set | ||
565 | # CONFIG_HERMES is not set | ||
566 | # CONFIG_ATMEL is not set | ||
567 | # CONFIG_AIRO_CS is not set | ||
568 | # CONFIG_PCMCIA_WL3501 is not set | ||
569 | CONFIG_PRISM54=m | ||
570 | # CONFIG_IWLWIFI_LEDS is not set | ||
571 | # CONFIG_HOSTAP is not set | ||
536 | # CONFIG_NET_PCMCIA is not set | 572 | # CONFIG_NET_PCMCIA is not set |
537 | |||
538 | # | ||
539 | # Wan interfaces | ||
540 | # | ||
541 | # CONFIG_WAN is not set | 573 | # CONFIG_WAN is not set |
542 | # CONFIG_FDDI is not set | 574 | # CONFIG_FDDI is not set |
543 | # CONFIG_HIPPI is not set | 575 | # CONFIG_HIPPI is not set |
544 | # CONFIG_PPP is not set | 576 | # CONFIG_PPP is not set |
545 | # CONFIG_SLIP is not set | 577 | # CONFIG_SLIP is not set |
546 | # CONFIG_SHAPER is not set | ||
547 | # CONFIG_NETCONSOLE is not set | 578 | # CONFIG_NETCONSOLE is not set |
548 | # CONFIG_NETPOLL is not set | 579 | # CONFIG_NETPOLL is not set |
549 | # CONFIG_NET_POLL_CONTROLLER is not set | 580 | # CONFIG_NET_POLL_CONTROLLER is not set |
550 | |||
551 | # | ||
552 | # ISDN subsystem | ||
553 | # | ||
554 | # CONFIG_ISDN is not set | 581 | # CONFIG_ISDN is not set |
555 | 582 | ||
556 | # | 583 | # |
557 | # Input device support | 584 | # Input device support |
558 | # | 585 | # |
559 | CONFIG_INPUT=y | 586 | CONFIG_INPUT=y |
587 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
588 | # CONFIG_INPUT_POLLDEV is not set | ||
560 | 589 | ||
561 | # | 590 | # |
562 | # Userland interfaces | 591 | # Userland interfaces |
@@ -566,7 +595,6 @@ CONFIG_INPUT_MOUSEDEV=y | |||
566 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | 595 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 |
567 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | 596 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 |
568 | # CONFIG_INPUT_JOYDEV is not set | 597 | # CONFIG_INPUT_JOYDEV is not set |
569 | # CONFIG_INPUT_TSDEV is not set | ||
570 | # CONFIG_INPUT_EVDEV is not set | 598 | # CONFIG_INPUT_EVDEV is not set |
571 | # CONFIG_INPUT_EVBUG is not set | 599 | # CONFIG_INPUT_EVBUG is not set |
572 | 600 | ||
@@ -576,6 +604,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
576 | # CONFIG_INPUT_KEYBOARD is not set | 604 | # CONFIG_INPUT_KEYBOARD is not set |
577 | # CONFIG_INPUT_MOUSE is not set | 605 | # CONFIG_INPUT_MOUSE is not set |
578 | # CONFIG_INPUT_JOYSTICK is not set | 606 | # CONFIG_INPUT_JOYSTICK is not set |
607 | # CONFIG_INPUT_TABLET is not set | ||
579 | # CONFIG_INPUT_TOUCHSCREEN is not set | 608 | # CONFIG_INPUT_TOUCHSCREEN is not set |
580 | # CONFIG_INPUT_MISC is not set | 609 | # CONFIG_INPUT_MISC is not set |
581 | 610 | ||
@@ -589,9 +618,13 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
589 | # Character devices | 618 | # Character devices |
590 | # | 619 | # |
591 | CONFIG_VT=y | 620 | CONFIG_VT=y |
621 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
592 | CONFIG_VT_CONSOLE=y | 622 | CONFIG_VT_CONSOLE=y |
593 | CONFIG_HW_CONSOLE=y | 623 | CONFIG_HW_CONSOLE=y |
624 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
625 | CONFIG_DEVKMEM=y | ||
594 | # CONFIG_SERIAL_NONSTANDARD is not set | 626 | # CONFIG_SERIAL_NONSTANDARD is not set |
627 | # CONFIG_NOZOMI is not set | ||
595 | 628 | ||
596 | # | 629 | # |
597 | # Serial drivers | 630 | # Serial drivers |
@@ -609,132 +642,113 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
609 | CONFIG_UNIX98_PTYS=y | 642 | CONFIG_UNIX98_PTYS=y |
610 | CONFIG_LEGACY_PTYS=y | 643 | CONFIG_LEGACY_PTYS=y |
611 | CONFIG_LEGACY_PTY_COUNT=256 | 644 | CONFIG_LEGACY_PTY_COUNT=256 |
612 | |||
613 | # | ||
614 | # IPMI | ||
615 | # | ||
616 | # CONFIG_IPMI_HANDLER is not set | 645 | # CONFIG_IPMI_HANDLER is not set |
617 | 646 | CONFIG_HW_RANDOM=m | |
618 | # | ||
619 | # Watchdog Cards | ||
620 | # | ||
621 | # CONFIG_WATCHDOG is not set | ||
622 | # CONFIG_NVRAM is not set | 647 | # CONFIG_NVRAM is not set |
623 | # CONFIG_DTLK is not set | ||
624 | # CONFIG_R3964 is not set | 648 | # CONFIG_R3964 is not set |
625 | # CONFIG_APPLICOM is not set | 649 | # CONFIG_APPLICOM is not set |
626 | 650 | ||
627 | # | 651 | # |
628 | # Ftape, the floppy tape device driver | ||
629 | # | ||
630 | # CONFIG_DRM is not set | ||
631 | |||
632 | # | ||
633 | # PCMCIA character devices | 652 | # PCMCIA character devices |
634 | # | 653 | # |
635 | # CONFIG_SYNCLINK_CS is not set | 654 | # CONFIG_SYNCLINK_CS is not set |
636 | # CONFIG_CARDMAN_4000 is not set | 655 | # CONFIG_CARDMAN_4000 is not set |
637 | # CONFIG_CARDMAN_4040 is not set | 656 | # CONFIG_CARDMAN_4040 is not set |
657 | # CONFIG_IPWIRELESS is not set | ||
638 | # CONFIG_RAW_DRIVER is not set | 658 | # CONFIG_RAW_DRIVER is not set |
639 | |||
640 | # | ||
641 | # TPM devices | ||
642 | # | ||
643 | # CONFIG_TCG_TPM is not set | 659 | # CONFIG_TCG_TPM is not set |
644 | # CONFIG_TELCLOCK is not set | 660 | CONFIG_DEVPORT=y |
645 | |||
646 | # | ||
647 | # I2C support | ||
648 | # | ||
649 | # CONFIG_I2C is not set | 661 | # CONFIG_I2C is not set |
650 | |||
651 | # | ||
652 | # SPI support | ||
653 | # | ||
654 | # CONFIG_SPI is not set | 662 | # CONFIG_SPI is not set |
655 | # CONFIG_SPI_MASTER is not set | ||
656 | |||
657 | # | ||
658 | # Dallas's 1-wire bus | ||
659 | # | ||
660 | # CONFIG_W1 is not set | 663 | # CONFIG_W1 is not set |
661 | 664 | # CONFIG_POWER_SUPPLY is not set | |
662 | # | ||
663 | # Hardware Monitoring support | ||
664 | # | ||
665 | # CONFIG_HWMON is not set | 665 | # CONFIG_HWMON is not set |
666 | # CONFIG_HWMON_VID is not set | 666 | # CONFIG_WATCHDOG is not set |
667 | |||
668 | # | ||
669 | # Misc devices | ||
670 | # | ||
671 | 667 | ||
672 | # | 668 | # |
673 | # LED devices | 669 | # Sonics Silicon Backplane |
674 | # | 670 | # |
675 | # CONFIG_NEW_LEDS is not set | 671 | CONFIG_SSB_POSSIBLE=y |
672 | # CONFIG_SSB is not set | ||
676 | 673 | ||
677 | # | 674 | # |
678 | # LED drivers | 675 | # Multifunction device drivers |
679 | # | 676 | # |
677 | # CONFIG_MFD_CORE is not set | ||
678 | # CONFIG_MFD_SM501 is not set | ||
679 | # CONFIG_HTC_PASIC3 is not set | ||
680 | # CONFIG_MFD_TMIO is not set | ||
681 | # CONFIG_MFD_T7L66XB is not set | ||
682 | # CONFIG_MFD_TC6387XB is not set | ||
680 | 683 | ||
681 | # | 684 | # |
682 | # LED Triggers | 685 | # Multimedia devices |
683 | # | 686 | # |
684 | 687 | ||
685 | # | 688 | # |
686 | # Multimedia devices | 689 | # Multimedia core support |
687 | # | 690 | # |
688 | # CONFIG_VIDEO_DEV is not set | 691 | # CONFIG_VIDEO_DEV is not set |
692 | # CONFIG_DVB_CORE is not set | ||
693 | # CONFIG_VIDEO_MEDIA is not set | ||
689 | 694 | ||
690 | # | 695 | # |
691 | # Digital Video Broadcasting Devices | 696 | # Multimedia drivers |
692 | # | 697 | # |
693 | # CONFIG_DVB is not set | 698 | # CONFIG_DAB is not set |
694 | 699 | ||
695 | # | 700 | # |
696 | # Graphics support | 701 | # Graphics support |
697 | # | 702 | # |
703 | # CONFIG_DRM is not set | ||
704 | # CONFIG_VGASTATE is not set | ||
705 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
698 | # CONFIG_FB is not set | 706 | # CONFIG_FB is not set |
707 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
699 | 708 | ||
700 | # | 709 | # |
701 | # Console display driver support | 710 | # Display device support |
702 | # | 711 | # |
703 | # CONFIG_VGA_CONSOLE is not set | 712 | # CONFIG_DISPLAY_SUPPORT is not set |
704 | CONFIG_DUMMY_CONSOLE=y | ||
705 | 713 | ||
706 | # | 714 | # |
707 | # Sound | 715 | # Console display driver support |
708 | # | 716 | # |
717 | # CONFIG_VGA_CONSOLE is not set | ||
718 | CONFIG_DUMMY_CONSOLE=y | ||
709 | # CONFIG_SOUND is not set | 719 | # CONFIG_SOUND is not set |
710 | 720 | CONFIG_HID_SUPPORT=y | |
711 | # | 721 | CONFIG_HID=y |
712 | # USB support | 722 | CONFIG_HID_DEBUG=y |
713 | # | 723 | # CONFIG_HIDRAW is not set |
724 | CONFIG_USB_SUPPORT=y | ||
714 | CONFIG_USB_ARCH_HAS_HCD=y | 725 | CONFIG_USB_ARCH_HAS_HCD=y |
715 | CONFIG_USB_ARCH_HAS_OHCI=y | 726 | CONFIG_USB_ARCH_HAS_OHCI=y |
716 | CONFIG_USB_ARCH_HAS_EHCI=y | 727 | CONFIG_USB_ARCH_HAS_EHCI=y |
717 | # CONFIG_USB is not set | 728 | # CONFIG_USB is not set |
718 | 729 | ||
719 | # | 730 | # |
720 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 731 | # Enable Host or Gadget support to see Inventra options |
721 | # | 732 | # |
722 | 733 | ||
723 | # | 734 | # |
724 | # USB Gadget Support | 735 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
725 | # | 736 | # |
726 | # CONFIG_USB_GADGET is not set | 737 | # CONFIG_USB_GADGET is not set |
727 | |||
728 | # | ||
729 | # MMC/SD Card support | ||
730 | # | ||
731 | # CONFIG_MMC is not set | 738 | # CONFIG_MMC is not set |
739 | # CONFIG_NEW_LEDS is not set | ||
740 | CONFIG_RTC_LIB=y | ||
741 | # CONFIG_RTC_CLASS is not set | ||
742 | # CONFIG_DMADEVICES is not set | ||
732 | 743 | ||
733 | # | 744 | # |
734 | # Real Time Clock | 745 | # Voltage and Current regulators |
735 | # | 746 | # |
736 | CONFIG_RTC_LIB=y | 747 | # CONFIG_REGULATOR is not set |
737 | # CONFIG_RTC_CLASS is not set | 748 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set |
749 | # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set | ||
750 | # CONFIG_REGULATOR_BQ24022 is not set | ||
751 | # CONFIG_UIO is not set | ||
738 | 752 | ||
739 | # | 753 | # |
740 | # File systems | 754 | # File systems |
@@ -743,16 +757,16 @@ CONFIG_EXT2_FS=y | |||
743 | # CONFIG_EXT2_FS_XATTR is not set | 757 | # CONFIG_EXT2_FS_XATTR is not set |
744 | # CONFIG_EXT2_FS_XIP is not set | 758 | # CONFIG_EXT2_FS_XIP is not set |
745 | # CONFIG_EXT3_FS is not set | 759 | # CONFIG_EXT3_FS is not set |
760 | # CONFIG_EXT4DEV_FS is not set | ||
746 | # CONFIG_REISERFS_FS is not set | 761 | # CONFIG_REISERFS_FS is not set |
747 | # CONFIG_JFS_FS is not set | 762 | # CONFIG_JFS_FS is not set |
748 | # CONFIG_FS_POSIX_ACL is not set | 763 | # CONFIG_FS_POSIX_ACL is not set |
749 | # CONFIG_XFS_FS is not set | 764 | # CONFIG_XFS_FS is not set |
750 | # CONFIG_OCFS2_FS is not set | 765 | # CONFIG_OCFS2_FS is not set |
751 | # CONFIG_MINIX_FS is not set | 766 | CONFIG_DNOTIFY=y |
752 | # CONFIG_ROMFS_FS is not set | ||
753 | CONFIG_INOTIFY=y | 767 | CONFIG_INOTIFY=y |
768 | CONFIG_INOTIFY_USER=y | ||
754 | # CONFIG_QUOTA is not set | 769 | # CONFIG_QUOTA is not set |
755 | CONFIG_DNOTIFY=y | ||
756 | # CONFIG_AUTOFS_FS is not set | 770 | # CONFIG_AUTOFS_FS is not set |
757 | # CONFIG_AUTOFS4_FS is not set | 771 | # CONFIG_AUTOFS4_FS is not set |
758 | # CONFIG_FUSE_FS is not set | 772 | # CONFIG_FUSE_FS is not set |
@@ -774,10 +788,11 @@ CONFIG_DNOTIFY=y | |||
774 | # Pseudo filesystems | 788 | # Pseudo filesystems |
775 | # | 789 | # |
776 | CONFIG_PROC_FS=y | 790 | CONFIG_PROC_FS=y |
791 | CONFIG_PROC_SYSCTL=y | ||
777 | CONFIG_SYSFS=y | 792 | CONFIG_SYSFS=y |
778 | CONFIG_TMPFS=y | 793 | CONFIG_TMPFS=y |
794 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
779 | # CONFIG_HUGETLB_PAGE is not set | 795 | # CONFIG_HUGETLB_PAGE is not set |
780 | CONFIG_RAMFS=y | ||
781 | # CONFIG_CONFIGFS_FS is not set | 796 | # CONFIG_CONFIGFS_FS is not set |
782 | 797 | ||
783 | # | 798 | # |
@@ -790,67 +805,113 @@ CONFIG_RAMFS=y | |||
790 | # CONFIG_BEFS_FS is not set | 805 | # CONFIG_BEFS_FS is not set |
791 | # CONFIG_BFS_FS is not set | 806 | # CONFIG_BFS_FS is not set |
792 | # CONFIG_EFS_FS is not set | 807 | # CONFIG_EFS_FS is not set |
793 | # CONFIG_JFFS_FS is not set | 808 | CONFIG_JFFS2_FS=y |
794 | # CONFIG_JFFS2_FS is not set | 809 | CONFIG_JFFS2_FS_DEBUG=0 |
810 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
811 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
812 | CONFIG_JFFS2_SUMMARY=y | ||
813 | # CONFIG_JFFS2_FS_XATTR is not set | ||
814 | CONFIG_JFFS2_COMPRESSION_OPTIONS=y | ||
815 | CONFIG_JFFS2_ZLIB=y | ||
816 | # CONFIG_JFFS2_LZO is not set | ||
817 | CONFIG_JFFS2_RTIME=y | ||
818 | CONFIG_JFFS2_RUBIN=y | ||
819 | # CONFIG_JFFS2_CMODE_NONE is not set | ||
820 | CONFIG_JFFS2_CMODE_PRIORITY=y | ||
821 | # CONFIG_JFFS2_CMODE_SIZE is not set | ||
822 | # CONFIG_JFFS2_CMODE_FAVOURLZO is not set | ||
795 | CONFIG_CRAMFS=y | 823 | CONFIG_CRAMFS=y |
796 | # CONFIG_VXFS_FS is not set | 824 | # CONFIG_VXFS_FS is not set |
825 | # CONFIG_MINIX_FS is not set | ||
826 | # CONFIG_OMFS_FS is not set | ||
797 | # CONFIG_HPFS_FS is not set | 827 | # CONFIG_HPFS_FS is not set |
798 | # CONFIG_QNX4FS_FS is not set | 828 | # CONFIG_QNX4FS_FS is not set |
829 | # CONFIG_ROMFS_FS is not set | ||
799 | # CONFIG_SYSV_FS is not set | 830 | # CONFIG_SYSV_FS is not set |
800 | # CONFIG_UFS_FS is not set | 831 | # CONFIG_UFS_FS is not set |
801 | 832 | CONFIG_NETWORK_FILESYSTEMS=y | |
802 | # | 833 | CONFIG_NFS_FS=y |
803 | # Network File Systems | 834 | CONFIG_NFS_V3=y |
804 | # | 835 | # CONFIG_NFS_V3_ACL is not set |
805 | # CONFIG_NFS_FS is not set | 836 | # CONFIG_NFS_V4 is not set |
837 | CONFIG_ROOT_NFS=y | ||
806 | # CONFIG_NFSD is not set | 838 | # CONFIG_NFSD is not set |
839 | CONFIG_LOCKD=y | ||
840 | CONFIG_LOCKD_V4=y | ||
841 | CONFIG_NFS_COMMON=y | ||
842 | CONFIG_SUNRPC=y | ||
843 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
844 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
807 | # CONFIG_SMB_FS is not set | 845 | # CONFIG_SMB_FS is not set |
808 | # CONFIG_CIFS is not set | 846 | # CONFIG_CIFS is not set |
809 | # CONFIG_NCP_FS is not set | 847 | # CONFIG_NCP_FS is not set |
810 | # CONFIG_CODA_FS is not set | 848 | # CONFIG_CODA_FS is not set |
811 | # CONFIG_AFS_FS is not set | 849 | # CONFIG_AFS_FS is not set |
812 | # CONFIG_9P_FS is not set | ||
813 | 850 | ||
814 | # | 851 | # |
815 | # Partition Types | 852 | # Partition Types |
816 | # | 853 | # |
817 | # CONFIG_PARTITION_ADVANCED is not set | 854 | # CONFIG_PARTITION_ADVANCED is not set |
818 | CONFIG_MSDOS_PARTITION=y | 855 | CONFIG_MSDOS_PARTITION=y |
819 | |||
820 | # | ||
821 | # Native Language Support | ||
822 | # | ||
823 | # CONFIG_NLS is not set | 856 | # CONFIG_NLS is not set |
824 | 857 | # CONFIG_DLM is not set | |
825 | # | ||
826 | # Profiling support | ||
827 | # | ||
828 | # CONFIG_PROFILING is not set | ||
829 | 858 | ||
830 | # | 859 | # |
831 | # Kernel hacking | 860 | # Kernel hacking |
832 | # | 861 | # |
833 | # CONFIG_PRINTK_TIME is not set | 862 | # CONFIG_PRINTK_TIME is not set |
863 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
864 | CONFIG_ENABLE_MUST_CHECK=y | ||
865 | CONFIG_FRAME_WARN=1024 | ||
834 | # CONFIG_MAGIC_SYSRQ is not set | 866 | # CONFIG_MAGIC_SYSRQ is not set |
867 | # CONFIG_UNUSED_SYMBOLS is not set | ||
868 | # CONFIG_DEBUG_FS is not set | ||
869 | # CONFIG_HEADERS_CHECK is not set | ||
835 | CONFIG_DEBUG_KERNEL=y | 870 | CONFIG_DEBUG_KERNEL=y |
836 | CONFIG_LOG_BUF_SHIFT=14 | 871 | # CONFIG_DEBUG_SHIRQ is not set |
837 | CONFIG_DETECT_SOFTLOCKUP=y | 872 | CONFIG_DETECT_SOFTLOCKUP=y |
873 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
874 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
875 | CONFIG_SCHED_DEBUG=y | ||
838 | # CONFIG_SCHEDSTATS is not set | 876 | # CONFIG_SCHEDSTATS is not set |
877 | # CONFIG_TIMER_STATS is not set | ||
878 | # CONFIG_DEBUG_OBJECTS is not set | ||
839 | # CONFIG_DEBUG_SLAB is not set | 879 | # CONFIG_DEBUG_SLAB is not set |
840 | CONFIG_DEBUG_MUTEXES=y | 880 | # CONFIG_DEBUG_RT_MUTEXES is not set |
881 | # CONFIG_RT_MUTEX_TESTER is not set | ||
841 | # CONFIG_DEBUG_SPINLOCK is not set | 882 | # CONFIG_DEBUG_SPINLOCK is not set |
883 | CONFIG_DEBUG_MUTEXES=y | ||
884 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
885 | # CONFIG_PROVE_LOCKING is not set | ||
886 | # CONFIG_LOCK_STAT is not set | ||
842 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 887 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
888 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
843 | # CONFIG_DEBUG_KOBJECT is not set | 889 | # CONFIG_DEBUG_KOBJECT is not set |
844 | CONFIG_DEBUG_BUGVERBOSE=y | 890 | CONFIG_DEBUG_BUGVERBOSE=y |
845 | # CONFIG_DEBUG_INFO is not set | 891 | # CONFIG_DEBUG_INFO is not set |
846 | # CONFIG_DEBUG_FS is not set | ||
847 | # CONFIG_DEBUG_VM is not set | 892 | # CONFIG_DEBUG_VM is not set |
893 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
894 | CONFIG_DEBUG_MEMORY_INIT=y | ||
895 | # CONFIG_DEBUG_LIST is not set | ||
896 | # CONFIG_DEBUG_SG is not set | ||
848 | CONFIG_FRAME_POINTER=y | 897 | CONFIG_FRAME_POINTER=y |
849 | # CONFIG_UNWIND_INFO is not set | 898 | # CONFIG_BOOT_PRINTK_DELAY is not set |
850 | CONFIG_FORCED_INLINING=y | ||
851 | # CONFIG_RCU_TORTURE_TEST is not set | 899 | # CONFIG_RCU_TORTURE_TEST is not set |
900 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
901 | # CONFIG_FAULT_INJECTION is not set | ||
902 | # CONFIG_LATENCYTOP is not set | ||
903 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
904 | CONFIG_HAVE_FTRACE=y | ||
905 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
906 | # CONFIG_FTRACE is not set | ||
907 | # CONFIG_SCHED_TRACER is not set | ||
908 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
909 | # CONFIG_SAMPLES is not set | ||
910 | CONFIG_HAVE_ARCH_KGDB=y | ||
911 | # CONFIG_KGDB is not set | ||
852 | CONFIG_DEBUG_USER=y | 912 | CONFIG_DEBUG_USER=y |
853 | # CONFIG_DEBUG_ERRORS is not set | 913 | # CONFIG_DEBUG_ERRORS is not set |
914 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
854 | CONFIG_DEBUG_LL=y | 915 | CONFIG_DEBUG_LL=y |
855 | # CONFIG_DEBUG_ICEDCC is not set | 916 | # CONFIG_DEBUG_ICEDCC is not set |
856 | 917 | ||
@@ -859,21 +920,103 @@ CONFIG_DEBUG_LL=y | |||
859 | # | 920 | # |
860 | # CONFIG_KEYS is not set | 921 | # CONFIG_KEYS is not set |
861 | # CONFIG_SECURITY is not set | 922 | # CONFIG_SECURITY is not set |
923 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
924 | CONFIG_CRYPTO=y | ||
925 | |||
926 | # | ||
927 | # Crypto core or helper | ||
928 | # | ||
929 | # CONFIG_CRYPTO_MANAGER is not set | ||
930 | # CONFIG_CRYPTO_GF128MUL is not set | ||
931 | # CONFIG_CRYPTO_NULL is not set | ||
932 | # CONFIG_CRYPTO_CRYPTD is not set | ||
933 | # CONFIG_CRYPTO_AUTHENC is not set | ||
934 | # CONFIG_CRYPTO_TEST is not set | ||
935 | |||
936 | # | ||
937 | # Authenticated Encryption with Associated Data | ||
938 | # | ||
939 | # CONFIG_CRYPTO_CCM is not set | ||
940 | # CONFIG_CRYPTO_GCM is not set | ||
941 | # CONFIG_CRYPTO_SEQIV is not set | ||
942 | |||
943 | # | ||
944 | # Block modes | ||
945 | # | ||
946 | # CONFIG_CRYPTO_CBC is not set | ||
947 | # CONFIG_CRYPTO_CTR is not set | ||
948 | # CONFIG_CRYPTO_CTS is not set | ||
949 | # CONFIG_CRYPTO_ECB is not set | ||
950 | # CONFIG_CRYPTO_LRW is not set | ||
951 | # CONFIG_CRYPTO_PCBC is not set | ||
952 | # CONFIG_CRYPTO_XTS is not set | ||
953 | |||
954 | # | ||
955 | # Hash modes | ||
956 | # | ||
957 | # CONFIG_CRYPTO_HMAC is not set | ||
958 | # CONFIG_CRYPTO_XCBC is not set | ||
959 | |||
960 | # | ||
961 | # Digest | ||
962 | # | ||
963 | # CONFIG_CRYPTO_CRC32C is not set | ||
964 | # CONFIG_CRYPTO_MD4 is not set | ||
965 | # CONFIG_CRYPTO_MD5 is not set | ||
966 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
967 | # CONFIG_CRYPTO_RMD128 is not set | ||
968 | # CONFIG_CRYPTO_RMD160 is not set | ||
969 | # CONFIG_CRYPTO_RMD256 is not set | ||
970 | # CONFIG_CRYPTO_RMD320 is not set | ||
971 | # CONFIG_CRYPTO_SHA1 is not set | ||
972 | # CONFIG_CRYPTO_SHA256 is not set | ||
973 | # CONFIG_CRYPTO_SHA512 is not set | ||
974 | # CONFIG_CRYPTO_TGR192 is not set | ||
975 | # CONFIG_CRYPTO_WP512 is not set | ||
862 | 976 | ||
863 | # | 977 | # |
864 | # Cryptographic options | 978 | # Ciphers |
865 | # | 979 | # |
866 | # CONFIG_CRYPTO is not set | 980 | # CONFIG_CRYPTO_AES is not set |
981 | # CONFIG_CRYPTO_ANUBIS is not set | ||
982 | # CONFIG_CRYPTO_ARC4 is not set | ||
983 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
984 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
985 | # CONFIG_CRYPTO_CAST5 is not set | ||
986 | # CONFIG_CRYPTO_CAST6 is not set | ||
987 | # CONFIG_CRYPTO_DES is not set | ||
988 | # CONFIG_CRYPTO_FCRYPT is not set | ||
989 | # CONFIG_CRYPTO_KHAZAD is not set | ||
990 | # CONFIG_CRYPTO_SALSA20 is not set | ||
991 | # CONFIG_CRYPTO_SEED is not set | ||
992 | # CONFIG_CRYPTO_SERPENT is not set | ||
993 | # CONFIG_CRYPTO_TEA is not set | ||
994 | # CONFIG_CRYPTO_TWOFISH is not set | ||
867 | 995 | ||
868 | # | 996 | # |
869 | # Hardware crypto devices | 997 | # Compression |
870 | # | 998 | # |
999 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1000 | # CONFIG_CRYPTO_LZO is not set | ||
1001 | CONFIG_CRYPTO_HW=y | ||
1002 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | ||
871 | 1003 | ||
872 | # | 1004 | # |
873 | # Library routines | 1005 | # Library routines |
874 | # | 1006 | # |
1007 | CONFIG_BITREVERSE=y | ||
1008 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1009 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
875 | # CONFIG_CRC_CCITT is not set | 1010 | # CONFIG_CRC_CCITT is not set |
876 | # CONFIG_CRC16 is not set | 1011 | # CONFIG_CRC16 is not set |
1012 | # CONFIG_CRC_T10DIF is not set | ||
1013 | # CONFIG_CRC_ITU_T is not set | ||
877 | CONFIG_CRC32=y | 1014 | CONFIG_CRC32=y |
1015 | # CONFIG_CRC7 is not set | ||
878 | # CONFIG_LIBCRC32C is not set | 1016 | # CONFIG_LIBCRC32C is not set |
879 | CONFIG_ZLIB_INFLATE=y | 1017 | CONFIG_ZLIB_INFLATE=y |
1018 | CONFIG_ZLIB_DEFLATE=y | ||
1019 | CONFIG_PLIST=y | ||
1020 | CONFIG_HAS_IOMEM=y | ||
1021 | CONFIG_HAS_IOPORT=y | ||
1022 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/mx31moboard_defconfig b/arch/arm/configs/mx31moboard_defconfig new file mode 100644 index 000000000000..e90f86d6deef --- /dev/null +++ b/arch/arm/configs/mx31moboard_defconfig | |||
@@ -0,0 +1,790 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.27-rc5 | ||
4 | # Fri Oct 24 11:41:22 2008 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_MMU=y | ||
12 | # CONFIG_NO_IOPORT is not set | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
25 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
26 | CONFIG_ZONE_DMA=y | ||
27 | CONFIG_ARCH_MTD_XIP=y | ||
28 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
29 | CONFIG_VECTORS_BASE=0xffff0000 | ||
30 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
31 | |||
32 | # | ||
33 | # General setup | ||
34 | # | ||
35 | CONFIG_EXPERIMENTAL=y | ||
36 | CONFIG_BROKEN_ON_SMP=y | ||
37 | CONFIG_LOCK_KERNEL=y | ||
38 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
39 | CONFIG_LOCALVERSION="" | ||
40 | CONFIG_LOCALVERSION_AUTO=y | ||
41 | CONFIG_SWAP=y | ||
42 | CONFIG_SYSVIPC=y | ||
43 | CONFIG_SYSVIPC_SYSCTL=y | ||
44 | # CONFIG_POSIX_MQUEUE is not set | ||
45 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
46 | # CONFIG_TASKSTATS is not set | ||
47 | # CONFIG_AUDIT is not set | ||
48 | CONFIG_IKCONFIG=y | ||
49 | CONFIG_IKCONFIG_PROC=y | ||
50 | CONFIG_LOG_BUF_SHIFT=14 | ||
51 | # CONFIG_CGROUPS is not set | ||
52 | CONFIG_GROUP_SCHED=y | ||
53 | CONFIG_FAIR_GROUP_SCHED=y | ||
54 | # CONFIG_RT_GROUP_SCHED is not set | ||
55 | CONFIG_USER_SCHED=y | ||
56 | # CONFIG_CGROUP_SCHED is not set | ||
57 | CONFIG_SYSFS_DEPRECATED=y | ||
58 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
59 | # CONFIG_RELAY is not set | ||
60 | # CONFIG_NAMESPACES is not set | ||
61 | # CONFIG_BLK_DEV_INITRD is not set | ||
62 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
63 | CONFIG_SYSCTL=y | ||
64 | CONFIG_EMBEDDED=y | ||
65 | CONFIG_UID16=y | ||
66 | CONFIG_SYSCTL_SYSCALL=y | ||
67 | CONFIG_KALLSYMS=y | ||
68 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
69 | CONFIG_HOTPLUG=y | ||
70 | CONFIG_PRINTK=y | ||
71 | CONFIG_BUG=y | ||
72 | CONFIG_ELF_CORE=y | ||
73 | CONFIG_COMPAT_BRK=y | ||
74 | CONFIG_BASE_FULL=y | ||
75 | CONFIG_FUTEX=y | ||
76 | CONFIG_ANON_INODES=y | ||
77 | CONFIG_EPOLL=y | ||
78 | CONFIG_SIGNALFD=y | ||
79 | CONFIG_TIMERFD=y | ||
80 | CONFIG_EVENTFD=y | ||
81 | CONFIG_SHMEM=y | ||
82 | CONFIG_VM_EVENT_COUNTERS=y | ||
83 | CONFIG_SLAB=y | ||
84 | # CONFIG_SLUB is not set | ||
85 | # CONFIG_SLOB is not set | ||
86 | # CONFIG_PROFILING is not set | ||
87 | # CONFIG_MARKERS is not set | ||
88 | CONFIG_HAVE_OPROFILE=y | ||
89 | # CONFIG_KPROBES is not set | ||
90 | # CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set | ||
91 | # CONFIG_HAVE_IOREMAP_PROT is not set | ||
92 | CONFIG_HAVE_KPROBES=y | ||
93 | CONFIG_HAVE_KRETPROBES=y | ||
94 | # CONFIG_HAVE_ARCH_TRACEHOOK is not set | ||
95 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
96 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | ||
97 | # CONFIG_HAVE_CLK is not set | ||
98 | CONFIG_PROC_PAGE_MONITOR=y | ||
99 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
100 | CONFIG_SLABINFO=y | ||
101 | CONFIG_RT_MUTEXES=y | ||
102 | # CONFIG_TINY_SHMEM is not set | ||
103 | CONFIG_BASE_SMALL=0 | ||
104 | CONFIG_MODULES=y | ||
105 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
106 | CONFIG_MODULE_UNLOAD=y | ||
107 | CONFIG_MODULE_FORCE_UNLOAD=y | ||
108 | CONFIG_MODVERSIONS=y | ||
109 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
110 | CONFIG_KMOD=y | ||
111 | CONFIG_BLOCK=y | ||
112 | # CONFIG_LBD is not set | ||
113 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
114 | # CONFIG_LSF is not set | ||
115 | # CONFIG_BLK_DEV_BSG is not set | ||
116 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
117 | |||
118 | # | ||
119 | # IO Schedulers | ||
120 | # | ||
121 | CONFIG_IOSCHED_NOOP=y | ||
122 | CONFIG_IOSCHED_AS=y | ||
123 | CONFIG_IOSCHED_DEADLINE=y | ||
124 | CONFIG_IOSCHED_CFQ=y | ||
125 | # CONFIG_DEFAULT_AS is not set | ||
126 | # CONFIG_DEFAULT_DEADLINE is not set | ||
127 | CONFIG_DEFAULT_CFQ=y | ||
128 | # CONFIG_DEFAULT_NOOP is not set | ||
129 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
130 | CONFIG_CLASSIC_RCU=y | ||
131 | |||
132 | # | ||
133 | # System Type | ||
134 | # | ||
135 | # CONFIG_ARCH_AAEC2000 is not set | ||
136 | # CONFIG_ARCH_INTEGRATOR is not set | ||
137 | # CONFIG_ARCH_REALVIEW is not set | ||
138 | # CONFIG_ARCH_VERSATILE is not set | ||
139 | # CONFIG_ARCH_AT91 is not set | ||
140 | # CONFIG_ARCH_CLPS7500 is not set | ||
141 | # CONFIG_ARCH_CLPS711X is not set | ||
142 | # CONFIG_ARCH_EBSA110 is not set | ||
143 | # CONFIG_ARCH_EP93XX is not set | ||
144 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
145 | # CONFIG_ARCH_NETX is not set | ||
146 | # CONFIG_ARCH_H720X is not set | ||
147 | # CONFIG_ARCH_IMX is not set | ||
148 | # CONFIG_ARCH_IOP13XX is not set | ||
149 | # CONFIG_ARCH_IOP32X is not set | ||
150 | # CONFIG_ARCH_IOP33X is not set | ||
151 | # CONFIG_ARCH_IXP23XX is not set | ||
152 | # CONFIG_ARCH_IXP2000 is not set | ||
153 | # CONFIG_ARCH_IXP4XX is not set | ||
154 | # CONFIG_ARCH_L7200 is not set | ||
155 | # CONFIG_ARCH_KIRKWOOD is not set | ||
156 | # CONFIG_ARCH_KS8695 is not set | ||
157 | # CONFIG_ARCH_NS9XXX is not set | ||
158 | # CONFIG_ARCH_LOKI is not set | ||
159 | # CONFIG_ARCH_MV78XX0 is not set | ||
160 | CONFIG_ARCH_MXC=y | ||
161 | # CONFIG_ARCH_ORION5X is not set | ||
162 | # CONFIG_ARCH_PNX4008 is not set | ||
163 | # CONFIG_ARCH_PXA is not set | ||
164 | # CONFIG_ARCH_RPC is not set | ||
165 | # CONFIG_ARCH_SA1100 is not set | ||
166 | # CONFIG_ARCH_S3C2410 is not set | ||
167 | # CONFIG_ARCH_SHARK is not set | ||
168 | # CONFIG_ARCH_LH7A40X is not set | ||
169 | # CONFIG_ARCH_DAVINCI is not set | ||
170 | # CONFIG_ARCH_OMAP is not set | ||
171 | # CONFIG_ARCH_MSM7X00A is not set | ||
172 | |||
173 | # | ||
174 | # Boot options | ||
175 | # | ||
176 | |||
177 | # | ||
178 | # Power management | ||
179 | # | ||
180 | |||
181 | # | ||
182 | # Freescale MXC Implementations | ||
183 | # | ||
184 | # CONFIG_ARCH_MX2 is not set | ||
185 | CONFIG_ARCH_MX3=y | ||
186 | |||
187 | # | ||
188 | # MX3 Options | ||
189 | # | ||
190 | # CONFIG_MACH_MX31ADS is not set | ||
191 | # CONFIG_MACH_PCM037 is not set | ||
192 | # CONFIG_MACH_MX31LITE is not set | ||
193 | CONFIG_MACH_MX31MOBOARD=y | ||
194 | # CONFIG_MXC_IRQ_PRIOR is not set | ||
195 | |||
196 | # | ||
197 | # Processor Type | ||
198 | # | ||
199 | CONFIG_CPU_32=y | ||
200 | CONFIG_CPU_V6=y | ||
201 | # CONFIG_CPU_32v6K is not set | ||
202 | CONFIG_CPU_32v6=y | ||
203 | CONFIG_CPU_ABRT_EV6=y | ||
204 | CONFIG_CPU_PABRT_NOIFAR=y | ||
205 | CONFIG_CPU_CACHE_V6=y | ||
206 | CONFIG_CPU_CACHE_VIPT=y | ||
207 | CONFIG_CPU_COPY_V6=y | ||
208 | CONFIG_CPU_TLB_V6=y | ||
209 | CONFIG_CPU_HAS_ASID=y | ||
210 | CONFIG_CPU_CP15=y | ||
211 | CONFIG_CPU_CP15_MMU=y | ||
212 | |||
213 | # | ||
214 | # Processor Features | ||
215 | # | ||
216 | CONFIG_ARM_THUMB=y | ||
217 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
218 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
219 | # CONFIG_CPU_BPREDICT_DISABLE is not set | ||
220 | # CONFIG_OUTER_CACHE is not set | ||
221 | |||
222 | # | ||
223 | # Bus support | ||
224 | # | ||
225 | # CONFIG_PCI_SYSCALL is not set | ||
226 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
227 | # CONFIG_PCCARD is not set | ||
228 | |||
229 | # | ||
230 | # Kernel Features | ||
231 | # | ||
232 | CONFIG_TICK_ONESHOT=y | ||
233 | CONFIG_NO_HZ=y | ||
234 | CONFIG_HIGH_RES_TIMERS=y | ||
235 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
236 | CONFIG_PREEMPT=y | ||
237 | CONFIG_HZ=100 | ||
238 | CONFIG_AEABI=y | ||
239 | # CONFIG_OABI_COMPAT is not set | ||
240 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
241 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
242 | CONFIG_SELECT_MEMORY_MODEL=y | ||
243 | CONFIG_FLATMEM_MANUAL=y | ||
244 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
245 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
246 | CONFIG_FLATMEM=y | ||
247 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
248 | # CONFIG_SPARSEMEM_STATIC is not set | ||
249 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
250 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
251 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
252 | # CONFIG_RESOURCES_64BIT is not set | ||
253 | CONFIG_ZONE_DMA_FLAG=1 | ||
254 | CONFIG_BOUNCE=y | ||
255 | CONFIG_VIRT_TO_BUS=y | ||
256 | CONFIG_ALIGNMENT_TRAP=y | ||
257 | |||
258 | # | ||
259 | # Boot options | ||
260 | # | ||
261 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
262 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
263 | CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw ip=off" | ||
264 | # CONFIG_XIP_KERNEL is not set | ||
265 | # CONFIG_KEXEC is not set | ||
266 | |||
267 | # | ||
268 | # Floating point emulation | ||
269 | # | ||
270 | |||
271 | # | ||
272 | # At least one emulation must be selected | ||
273 | # | ||
274 | CONFIG_VFP=y | ||
275 | |||
276 | # | ||
277 | # Userspace binary formats | ||
278 | # | ||
279 | CONFIG_BINFMT_ELF=y | ||
280 | # CONFIG_BINFMT_AOUT is not set | ||
281 | # CONFIG_BINFMT_MISC is not set | ||
282 | |||
283 | # | ||
284 | # Power management options | ||
285 | # | ||
286 | # CONFIG_PM is not set | ||
287 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
288 | CONFIG_NET=y | ||
289 | |||
290 | # | ||
291 | # Networking options | ||
292 | # | ||
293 | CONFIG_PACKET=y | ||
294 | # CONFIG_PACKET_MMAP is not set | ||
295 | CONFIG_UNIX=y | ||
296 | # CONFIG_NET_KEY is not set | ||
297 | CONFIG_INET=y | ||
298 | # CONFIG_IP_MULTICAST is not set | ||
299 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
300 | CONFIG_IP_FIB_HASH=y | ||
301 | CONFIG_IP_PNP=y | ||
302 | CONFIG_IP_PNP_DHCP=y | ||
303 | # CONFIG_IP_PNP_BOOTP is not set | ||
304 | # CONFIG_IP_PNP_RARP is not set | ||
305 | # CONFIG_NET_IPIP is not set | ||
306 | # CONFIG_NET_IPGRE is not set | ||
307 | # CONFIG_ARPD is not set | ||
308 | # CONFIG_SYN_COOKIES is not set | ||
309 | # CONFIG_INET_AH is not set | ||
310 | # CONFIG_INET_ESP is not set | ||
311 | # CONFIG_INET_IPCOMP is not set | ||
312 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
313 | # CONFIG_INET_TUNNEL is not set | ||
314 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
315 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
316 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
317 | # CONFIG_INET_LRO is not set | ||
318 | # CONFIG_INET_DIAG is not set | ||
319 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
320 | CONFIG_TCP_CONG_CUBIC=y | ||
321 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
322 | # CONFIG_TCP_MD5SIG is not set | ||
323 | # CONFIG_IPV6 is not set | ||
324 | # CONFIG_NETWORK_SECMARK is not set | ||
325 | # CONFIG_NETFILTER is not set | ||
326 | # CONFIG_IP_DCCP is not set | ||
327 | # CONFIG_IP_SCTP is not set | ||
328 | # CONFIG_TIPC is not set | ||
329 | # CONFIG_ATM is not set | ||
330 | # CONFIG_BRIDGE is not set | ||
331 | # CONFIG_VLAN_8021Q is not set | ||
332 | # CONFIG_DECNET is not set | ||
333 | # CONFIG_LLC2 is not set | ||
334 | # CONFIG_IPX is not set | ||
335 | # CONFIG_ATALK is not set | ||
336 | # CONFIG_X25 is not set | ||
337 | # CONFIG_LAPB is not set | ||
338 | # CONFIG_ECONET is not set | ||
339 | # CONFIG_WAN_ROUTER is not set | ||
340 | # CONFIG_NET_SCHED is not set | ||
341 | |||
342 | # | ||
343 | # Network testing | ||
344 | # | ||
345 | # CONFIG_NET_PKTGEN is not set | ||
346 | # CONFIG_HAMRADIO is not set | ||
347 | # CONFIG_CAN is not set | ||
348 | # CONFIG_IRDA is not set | ||
349 | # CONFIG_BT is not set | ||
350 | # CONFIG_AF_RXRPC is not set | ||
351 | |||
352 | # | ||
353 | # Wireless | ||
354 | # | ||
355 | # CONFIG_CFG80211 is not set | ||
356 | # CONFIG_WIRELESS_EXT is not set | ||
357 | # CONFIG_MAC80211 is not set | ||
358 | # CONFIG_IEEE80211 is not set | ||
359 | # CONFIG_RFKILL is not set | ||
360 | # CONFIG_NET_9P is not set | ||
361 | |||
362 | # | ||
363 | # Device Drivers | ||
364 | # | ||
365 | |||
366 | # | ||
367 | # Generic Driver Options | ||
368 | # | ||
369 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
370 | CONFIG_STANDALONE=y | ||
371 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
372 | CONFIG_FW_LOADER=m | ||
373 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
374 | CONFIG_EXTRA_FIRMWARE="" | ||
375 | # CONFIG_SYS_HYPERVISOR is not set | ||
376 | # CONFIG_CONNECTOR is not set | ||
377 | CONFIG_MTD=y | ||
378 | # CONFIG_MTD_DEBUG is not set | ||
379 | # CONFIG_MTD_CONCAT is not set | ||
380 | CONFIG_MTD_PARTITIONS=y | ||
381 | CONFIG_MTD_REDBOOT_PARTS=y | ||
382 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
383 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
384 | CONFIG_MTD_REDBOOT_PARTS_READONLY=y | ||
385 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
386 | # CONFIG_MTD_AFS_PARTS is not set | ||
387 | # CONFIG_MTD_AR7_PARTS is not set | ||
388 | |||
389 | # | ||
390 | # User Modules And Translation Layers | ||
391 | # | ||
392 | CONFIG_MTD_CHAR=y | ||
393 | CONFIG_MTD_BLKDEVS=y | ||
394 | CONFIG_MTD_BLOCK=y | ||
395 | # CONFIG_FTL is not set | ||
396 | # CONFIG_NFTL is not set | ||
397 | # CONFIG_INFTL is not set | ||
398 | # CONFIG_RFD_FTL is not set | ||
399 | # CONFIG_SSFDC is not set | ||
400 | # CONFIG_MTD_OOPS is not set | ||
401 | |||
402 | # | ||
403 | # RAM/ROM/Flash chip drivers | ||
404 | # | ||
405 | CONFIG_MTD_CFI=y | ||
406 | # CONFIG_MTD_JEDECPROBE is not set | ||
407 | CONFIG_MTD_GEN_PROBE=y | ||
408 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
409 | CONFIG_MTD_CFI_NOSWAP=y | ||
410 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
411 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
412 | CONFIG_MTD_CFI_GEOMETRY=y | ||
413 | # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set | ||
414 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
415 | # CONFIG_MTD_MAP_BANK_WIDTH_4 is not set | ||
416 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
417 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
418 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
419 | CONFIG_MTD_CFI_I1=y | ||
420 | # CONFIG_MTD_CFI_I2 is not set | ||
421 | # CONFIG_MTD_CFI_I4 is not set | ||
422 | # CONFIG_MTD_CFI_I8 is not set | ||
423 | # CONFIG_MTD_OTP is not set | ||
424 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
425 | CONFIG_MTD_CFI_AMDSTD=y | ||
426 | # CONFIG_MTD_CFI_STAA is not set | ||
427 | CONFIG_MTD_CFI_UTIL=y | ||
428 | # CONFIG_MTD_RAM is not set | ||
429 | # CONFIG_MTD_ROM is not set | ||
430 | # CONFIG_MTD_ABSENT is not set | ||
431 | # CONFIG_MTD_XIP is not set | ||
432 | |||
433 | # | ||
434 | # Mapping drivers for chip access | ||
435 | # | ||
436 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
437 | CONFIG_MTD_PHYSMAP=y | ||
438 | CONFIG_MTD_PHYSMAP_START=0x0 | ||
439 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
440 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
441 | # CONFIG_MTD_ARM_INTEGRATOR is not set | ||
442 | # CONFIG_MTD_PLATRAM is not set | ||
443 | |||
444 | # | ||
445 | # Self-contained MTD device drivers | ||
446 | # | ||
447 | # CONFIG_MTD_SLRAM is not set | ||
448 | # CONFIG_MTD_PHRAM is not set | ||
449 | # CONFIG_MTD_MTDRAM is not set | ||
450 | # CONFIG_MTD_BLOCK2MTD is not set | ||
451 | |||
452 | # | ||
453 | # Disk-On-Chip Device Drivers | ||
454 | # | ||
455 | # CONFIG_MTD_DOC2000 is not set | ||
456 | # CONFIG_MTD_DOC2001 is not set | ||
457 | # CONFIG_MTD_DOC2001PLUS is not set | ||
458 | # CONFIG_MTD_NAND is not set | ||
459 | # CONFIG_MTD_ONENAND is not set | ||
460 | |||
461 | # | ||
462 | # UBI - Unsorted block images | ||
463 | # | ||
464 | # CONFIG_MTD_UBI is not set | ||
465 | # CONFIG_PARPORT is not set | ||
466 | # CONFIG_BLK_DEV is not set | ||
467 | # CONFIG_MISC_DEVICES is not set | ||
468 | CONFIG_HAVE_IDE=y | ||
469 | # CONFIG_IDE is not set | ||
470 | |||
471 | # | ||
472 | # SCSI device support | ||
473 | # | ||
474 | # CONFIG_RAID_ATTRS is not set | ||
475 | # CONFIG_SCSI is not set | ||
476 | # CONFIG_SCSI_DMA is not set | ||
477 | # CONFIG_SCSI_NETLINK is not set | ||
478 | # CONFIG_ATA is not set | ||
479 | # CONFIG_MD is not set | ||
480 | CONFIG_NETDEVICES=y | ||
481 | # CONFIG_DUMMY is not set | ||
482 | # CONFIG_BONDING is not set | ||
483 | # CONFIG_MACVLAN is not set | ||
484 | # CONFIG_EQUALIZER is not set | ||
485 | # CONFIG_TUN is not set | ||
486 | # CONFIG_VETH is not set | ||
487 | # CONFIG_PHYLIB is not set | ||
488 | CONFIG_NET_ETHERNET=y | ||
489 | CONFIG_MII=y | ||
490 | # CONFIG_AX88796 is not set | ||
491 | CONFIG_SMC91X=y | ||
492 | # CONFIG_DM9000 is not set | ||
493 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
494 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
495 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
496 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
497 | # CONFIG_B44 is not set | ||
498 | # CONFIG_NETDEV_1000 is not set | ||
499 | # CONFIG_NETDEV_10000 is not set | ||
500 | |||
501 | # | ||
502 | # Wireless LAN | ||
503 | # | ||
504 | # CONFIG_WLAN_PRE80211 is not set | ||
505 | # CONFIG_WLAN_80211 is not set | ||
506 | # CONFIG_IWLWIFI_LEDS is not set | ||
507 | # CONFIG_WAN is not set | ||
508 | # CONFIG_PPP is not set | ||
509 | # CONFIG_SLIP is not set | ||
510 | # CONFIG_NETCONSOLE is not set | ||
511 | # CONFIG_NETPOLL is not set | ||
512 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
513 | # CONFIG_ISDN is not set | ||
514 | |||
515 | # | ||
516 | # Input device support | ||
517 | # | ||
518 | # CONFIG_INPUT is not set | ||
519 | |||
520 | # | ||
521 | # Hardware I/O ports | ||
522 | # | ||
523 | # CONFIG_SERIO is not set | ||
524 | # CONFIG_GAMEPORT is not set | ||
525 | |||
526 | # | ||
527 | # Character devices | ||
528 | # | ||
529 | # CONFIG_VT is not set | ||
530 | CONFIG_DEVKMEM=y | ||
531 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
532 | |||
533 | # | ||
534 | # Serial drivers | ||
535 | # | ||
536 | # CONFIG_SERIAL_8250 is not set | ||
537 | |||
538 | # | ||
539 | # Non-8250 serial port support | ||
540 | # | ||
541 | CONFIG_SERIAL_IMX=y | ||
542 | CONFIG_SERIAL_IMX_CONSOLE=y | ||
543 | CONFIG_SERIAL_CORE=y | ||
544 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
545 | CONFIG_UNIX98_PTYS=y | ||
546 | # CONFIG_LEGACY_PTYS is not set | ||
547 | # CONFIG_IPMI_HANDLER is not set | ||
548 | # CONFIG_HW_RANDOM is not set | ||
549 | # CONFIG_NVRAM is not set | ||
550 | # CONFIG_R3964 is not set | ||
551 | # CONFIG_RAW_DRIVER is not set | ||
552 | # CONFIG_TCG_TPM is not set | ||
553 | # CONFIG_I2C is not set | ||
554 | # CONFIG_SPI is not set | ||
555 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
556 | CONFIG_GPIOLIB=y | ||
557 | # CONFIG_GPIO_SYSFS is not set | ||
558 | |||
559 | # | ||
560 | # I2C GPIO expanders: | ||
561 | # | ||
562 | |||
563 | # | ||
564 | # PCI GPIO expanders: | ||
565 | # | ||
566 | |||
567 | # | ||
568 | # SPI GPIO expanders: | ||
569 | # | ||
570 | # CONFIG_W1 is not set | ||
571 | # CONFIG_POWER_SUPPLY is not set | ||
572 | # CONFIG_HWMON is not set | ||
573 | # CONFIG_WATCHDOG is not set | ||
574 | |||
575 | # | ||
576 | # Sonics Silicon Backplane | ||
577 | # | ||
578 | CONFIG_SSB_POSSIBLE=y | ||
579 | # CONFIG_SSB is not set | ||
580 | |||
581 | # | ||
582 | # Multifunction device drivers | ||
583 | # | ||
584 | # CONFIG_MFD_CORE is not set | ||
585 | # CONFIG_MFD_SM501 is not set | ||
586 | # CONFIG_HTC_EGPIO is not set | ||
587 | # CONFIG_HTC_PASIC3 is not set | ||
588 | # CONFIG_MFD_TMIO is not set | ||
589 | # CONFIG_MFD_T7L66XB is not set | ||
590 | # CONFIG_MFD_TC6387XB is not set | ||
591 | # CONFIG_MFD_TC6393XB is not set | ||
592 | |||
593 | # | ||
594 | # Multimedia devices | ||
595 | # | ||
596 | |||
597 | # | ||
598 | # Multimedia core support | ||
599 | # | ||
600 | # CONFIG_VIDEO_DEV is not set | ||
601 | # CONFIG_DVB_CORE is not set | ||
602 | # CONFIG_VIDEO_MEDIA is not set | ||
603 | |||
604 | # | ||
605 | # Multimedia drivers | ||
606 | # | ||
607 | # CONFIG_DAB is not set | ||
608 | |||
609 | # | ||
610 | # Graphics support | ||
611 | # | ||
612 | # CONFIG_VGASTATE is not set | ||
613 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
614 | # CONFIG_FB is not set | ||
615 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
616 | |||
617 | # | ||
618 | # Display device support | ||
619 | # | ||
620 | # CONFIG_DISPLAY_SUPPORT is not set | ||
621 | # CONFIG_SOUND is not set | ||
622 | # CONFIG_USB_SUPPORT is not set | ||
623 | # CONFIG_MMC is not set | ||
624 | # CONFIG_NEW_LEDS is not set | ||
625 | CONFIG_RTC_LIB=y | ||
626 | # CONFIG_RTC_CLASS is not set | ||
627 | # CONFIG_DMADEVICES is not set | ||
628 | |||
629 | # | ||
630 | # Voltage and Current regulators | ||
631 | # | ||
632 | # CONFIG_REGULATOR is not set | ||
633 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set | ||
634 | # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set | ||
635 | # CONFIG_REGULATOR_BQ24022 is not set | ||
636 | # CONFIG_UIO is not set | ||
637 | |||
638 | # | ||
639 | # File systems | ||
640 | # | ||
641 | # CONFIG_EXT2_FS is not set | ||
642 | # CONFIG_EXT3_FS is not set | ||
643 | # CONFIG_EXT4DEV_FS is not set | ||
644 | # CONFIG_REISERFS_FS is not set | ||
645 | # CONFIG_JFS_FS is not set | ||
646 | # CONFIG_FS_POSIX_ACL is not set | ||
647 | # CONFIG_XFS_FS is not set | ||
648 | # CONFIG_OCFS2_FS is not set | ||
649 | # CONFIG_DNOTIFY is not set | ||
650 | CONFIG_INOTIFY=y | ||
651 | CONFIG_INOTIFY_USER=y | ||
652 | # CONFIG_QUOTA is not set | ||
653 | # CONFIG_AUTOFS_FS is not set | ||
654 | # CONFIG_AUTOFS4_FS is not set | ||
655 | # CONFIG_FUSE_FS is not set | ||
656 | |||
657 | # | ||
658 | # CD-ROM/DVD Filesystems | ||
659 | # | ||
660 | # CONFIG_ISO9660_FS is not set | ||
661 | # CONFIG_UDF_FS is not set | ||
662 | |||
663 | # | ||
664 | # DOS/FAT/NT Filesystems | ||
665 | # | ||
666 | # CONFIG_MSDOS_FS is not set | ||
667 | # CONFIG_VFAT_FS is not set | ||
668 | # CONFIG_NTFS_FS is not set | ||
669 | |||
670 | # | ||
671 | # Pseudo filesystems | ||
672 | # | ||
673 | CONFIG_PROC_FS=y | ||
674 | CONFIG_PROC_SYSCTL=y | ||
675 | CONFIG_SYSFS=y | ||
676 | CONFIG_TMPFS=y | ||
677 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
678 | # CONFIG_HUGETLB_PAGE is not set | ||
679 | # CONFIG_CONFIGFS_FS is not set | ||
680 | |||
681 | # | ||
682 | # Miscellaneous filesystems | ||
683 | # | ||
684 | # CONFIG_ADFS_FS is not set | ||
685 | # CONFIG_AFFS_FS is not set | ||
686 | # CONFIG_HFS_FS is not set | ||
687 | # CONFIG_HFSPLUS_FS is not set | ||
688 | # CONFIG_BEFS_FS is not set | ||
689 | # CONFIG_BFS_FS is not set | ||
690 | # CONFIG_EFS_FS is not set | ||
691 | CONFIG_JFFS2_FS=y | ||
692 | CONFIG_JFFS2_FS_DEBUG=0 | ||
693 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
694 | # CONFIG_JFFS2_FS_WBUF_VERIFY is not set | ||
695 | # CONFIG_JFFS2_SUMMARY is not set | ||
696 | # CONFIG_JFFS2_FS_XATTR is not set | ||
697 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
698 | CONFIG_JFFS2_ZLIB=y | ||
699 | # CONFIG_JFFS2_LZO is not set | ||
700 | CONFIG_JFFS2_RTIME=y | ||
701 | # CONFIG_JFFS2_RUBIN is not set | ||
702 | # CONFIG_CRAMFS is not set | ||
703 | # CONFIG_VXFS_FS is not set | ||
704 | # CONFIG_MINIX_FS is not set | ||
705 | # CONFIG_OMFS_FS is not set | ||
706 | # CONFIG_HPFS_FS is not set | ||
707 | # CONFIG_QNX4FS_FS is not set | ||
708 | # CONFIG_ROMFS_FS is not set | ||
709 | # CONFIG_SYSV_FS is not set | ||
710 | # CONFIG_UFS_FS is not set | ||
711 | CONFIG_NETWORK_FILESYSTEMS=y | ||
712 | CONFIG_NFS_FS=y | ||
713 | # CONFIG_NFS_V3 is not set | ||
714 | # CONFIG_NFS_V4 is not set | ||
715 | CONFIG_ROOT_NFS=y | ||
716 | # CONFIG_NFSD is not set | ||
717 | CONFIG_LOCKD=y | ||
718 | CONFIG_NFS_COMMON=y | ||
719 | CONFIG_SUNRPC=y | ||
720 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
721 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
722 | # CONFIG_SMB_FS is not set | ||
723 | # CONFIG_CIFS is not set | ||
724 | # CONFIG_NCP_FS is not set | ||
725 | # CONFIG_CODA_FS is not set | ||
726 | # CONFIG_AFS_FS is not set | ||
727 | |||
728 | # | ||
729 | # Partition Types | ||
730 | # | ||
731 | # CONFIG_PARTITION_ADVANCED is not set | ||
732 | CONFIG_MSDOS_PARTITION=y | ||
733 | # CONFIG_NLS is not set | ||
734 | # CONFIG_DLM is not set | ||
735 | |||
736 | # | ||
737 | # Kernel hacking | ||
738 | # | ||
739 | # CONFIG_PRINTK_TIME is not set | ||
740 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
741 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
742 | CONFIG_FRAME_WARN=1024 | ||
743 | # CONFIG_MAGIC_SYSRQ is not set | ||
744 | # CONFIG_UNUSED_SYMBOLS is not set | ||
745 | # CONFIG_DEBUG_FS is not set | ||
746 | # CONFIG_HEADERS_CHECK is not set | ||
747 | # CONFIG_DEBUG_KERNEL is not set | ||
748 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
749 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
750 | CONFIG_FRAME_POINTER=y | ||
751 | # CONFIG_LATENCYTOP is not set | ||
752 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
753 | CONFIG_HAVE_FTRACE=y | ||
754 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
755 | # CONFIG_FTRACE is not set | ||
756 | # CONFIG_IRQSOFF_TRACER is not set | ||
757 | # CONFIG_PREEMPT_TRACER is not set | ||
758 | # CONFIG_SCHED_TRACER is not set | ||
759 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
760 | # CONFIG_SAMPLES is not set | ||
761 | CONFIG_HAVE_ARCH_KGDB=y | ||
762 | # CONFIG_DEBUG_USER is not set | ||
763 | |||
764 | # | ||
765 | # Security options | ||
766 | # | ||
767 | # CONFIG_KEYS is not set | ||
768 | # CONFIG_SECURITY is not set | ||
769 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
770 | # CONFIG_CRYPTO is not set | ||
771 | |||
772 | # | ||
773 | # Library routines | ||
774 | # | ||
775 | CONFIG_BITREVERSE=y | ||
776 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
777 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
778 | # CONFIG_CRC_CCITT is not set | ||
779 | # CONFIG_CRC16 is not set | ||
780 | # CONFIG_CRC_T10DIF is not set | ||
781 | # CONFIG_CRC_ITU_T is not set | ||
782 | CONFIG_CRC32=y | ||
783 | # CONFIG_CRC7 is not set | ||
784 | # CONFIG_LIBCRC32C is not set | ||
785 | CONFIG_ZLIB_INFLATE=y | ||
786 | CONFIG_ZLIB_DEFLATE=y | ||
787 | CONFIG_PLIST=y | ||
788 | CONFIG_HAS_IOMEM=y | ||
789 | CONFIG_HAS_IOPORT=y | ||
790 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/mx31pdk_defconfig b/arch/arm/configs/mx31pdk_defconfig new file mode 100644 index 000000000000..95ffc0db95a0 --- /dev/null +++ b/arch/arm/configs/mx31pdk_defconfig | |||
@@ -0,0 +1,773 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.28-rc2 | ||
4 | # Sun Oct 26 15:55:29 2008 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_MMU=y | ||
12 | # CONFIG_NO_IOPORT is not set | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
25 | CONFIG_ARCH_MTD_XIP=y | ||
26 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
27 | CONFIG_VECTORS_BASE=0xffff0000 | ||
28 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
29 | |||
30 | # | ||
31 | # General setup | ||
32 | # | ||
33 | # CONFIG_EXPERIMENTAL is not set | ||
34 | CONFIG_BROKEN_ON_SMP=y | ||
35 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
36 | CONFIG_LOCALVERSION="" | ||
37 | # CONFIG_LOCALVERSION_AUTO is not set | ||
38 | # CONFIG_SWAP is not set | ||
39 | # CONFIG_SYSVIPC is not set | ||
40 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
41 | # CONFIG_TASKSTATS is not set | ||
42 | # CONFIG_AUDIT is not set | ||
43 | # CONFIG_IKCONFIG is not set | ||
44 | CONFIG_LOG_BUF_SHIFT=17 | ||
45 | # CONFIG_CGROUPS is not set | ||
46 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
47 | # CONFIG_RELAY is not set | ||
48 | CONFIG_NAMESPACES=y | ||
49 | # CONFIG_UTS_NS is not set | ||
50 | # CONFIG_BLK_DEV_INITRD is not set | ||
51 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
52 | CONFIG_SYSCTL=y | ||
53 | # CONFIG_EMBEDDED is not set | ||
54 | CONFIG_UID16=y | ||
55 | CONFIG_SYSCTL_SYSCALL=y | ||
56 | CONFIG_KALLSYMS=y | ||
57 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
58 | CONFIG_HOTPLUG=y | ||
59 | CONFIG_PRINTK=y | ||
60 | CONFIG_BUG=y | ||
61 | CONFIG_ELF_CORE=y | ||
62 | # CONFIG_COMPAT_BRK is not set | ||
63 | CONFIG_BASE_FULL=y | ||
64 | CONFIG_FUTEX=y | ||
65 | CONFIG_ANON_INODES=y | ||
66 | CONFIG_EPOLL=y | ||
67 | CONFIG_SIGNALFD=y | ||
68 | CONFIG_TIMERFD=y | ||
69 | CONFIG_EVENTFD=y | ||
70 | CONFIG_SHMEM=y | ||
71 | CONFIG_AIO=y | ||
72 | CONFIG_VM_EVENT_COUNTERS=y | ||
73 | CONFIG_SLUB_DEBUG=y | ||
74 | # CONFIG_SLAB is not set | ||
75 | CONFIG_SLUB=y | ||
76 | # CONFIG_SLOB is not set | ||
77 | # CONFIG_PROFILING is not set | ||
78 | # CONFIG_MARKERS is not set | ||
79 | CONFIG_HAVE_OPROFILE=y | ||
80 | CONFIG_HAVE_KPROBES=y | ||
81 | CONFIG_HAVE_KRETPROBES=y | ||
82 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
83 | CONFIG_SLABINFO=y | ||
84 | CONFIG_RT_MUTEXES=y | ||
85 | # CONFIG_TINY_SHMEM is not set | ||
86 | CONFIG_BASE_SMALL=0 | ||
87 | # CONFIG_MODULES is not set | ||
88 | CONFIG_BLOCK=y | ||
89 | # CONFIG_LBD is not set | ||
90 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
91 | # CONFIG_LSF is not set | ||
92 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
93 | |||
94 | # | ||
95 | # IO Schedulers | ||
96 | # | ||
97 | CONFIG_IOSCHED_NOOP=y | ||
98 | # CONFIG_IOSCHED_AS is not set | ||
99 | # CONFIG_IOSCHED_DEADLINE is not set | ||
100 | # CONFIG_IOSCHED_CFQ is not set | ||
101 | # CONFIG_DEFAULT_AS is not set | ||
102 | # CONFIG_DEFAULT_DEADLINE is not set | ||
103 | # CONFIG_DEFAULT_CFQ is not set | ||
104 | CONFIG_DEFAULT_NOOP=y | ||
105 | CONFIG_DEFAULT_IOSCHED="noop" | ||
106 | CONFIG_CLASSIC_RCU=y | ||
107 | # CONFIG_FREEZER is not set | ||
108 | |||
109 | # | ||
110 | # System Type | ||
111 | # | ||
112 | # CONFIG_ARCH_AAEC2000 is not set | ||
113 | # CONFIG_ARCH_INTEGRATOR is not set | ||
114 | # CONFIG_ARCH_REALVIEW is not set | ||
115 | # CONFIG_ARCH_VERSATILE is not set | ||
116 | # CONFIG_ARCH_AT91 is not set | ||
117 | # CONFIG_ARCH_CLPS7500 is not set | ||
118 | # CONFIG_ARCH_CLPS711X is not set | ||
119 | # CONFIG_ARCH_EBSA110 is not set | ||
120 | # CONFIG_ARCH_EP93XX is not set | ||
121 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
122 | # CONFIG_ARCH_NETX is not set | ||
123 | # CONFIG_ARCH_H720X is not set | ||
124 | # CONFIG_ARCH_IMX is not set | ||
125 | # CONFIG_ARCH_IOP13XX is not set | ||
126 | # CONFIG_ARCH_IOP32X is not set | ||
127 | # CONFIG_ARCH_IOP33X is not set | ||
128 | # CONFIG_ARCH_IXP23XX is not set | ||
129 | # CONFIG_ARCH_IXP2000 is not set | ||
130 | # CONFIG_ARCH_IXP4XX is not set | ||
131 | # CONFIG_ARCH_L7200 is not set | ||
132 | # CONFIG_ARCH_KIRKWOOD is not set | ||
133 | # CONFIG_ARCH_KS8695 is not set | ||
134 | # CONFIG_ARCH_NS9XXX is not set | ||
135 | # CONFIG_ARCH_LOKI is not set | ||
136 | # CONFIG_ARCH_MV78XX0 is not set | ||
137 | CONFIG_ARCH_MXC=y | ||
138 | # CONFIG_ARCH_ORION5X is not set | ||
139 | # CONFIG_ARCH_PNX4008 is not set | ||
140 | # CONFIG_ARCH_PXA is not set | ||
141 | # CONFIG_ARCH_RPC is not set | ||
142 | # CONFIG_ARCH_SA1100 is not set | ||
143 | # CONFIG_ARCH_S3C2410 is not set | ||
144 | # CONFIG_ARCH_SHARK is not set | ||
145 | # CONFIG_ARCH_LH7A40X is not set | ||
146 | # CONFIG_ARCH_DAVINCI is not set | ||
147 | # CONFIG_ARCH_OMAP is not set | ||
148 | # CONFIG_ARCH_MSM is not set | ||
149 | |||
150 | # | ||
151 | # Boot options | ||
152 | # | ||
153 | |||
154 | # | ||
155 | # Power management | ||
156 | # | ||
157 | |||
158 | # | ||
159 | # Freescale MXC Implementations | ||
160 | # | ||
161 | # CONFIG_ARCH_MX2 is not set | ||
162 | CONFIG_ARCH_MX3=y | ||
163 | |||
164 | # | ||
165 | # MX3 Options | ||
166 | # | ||
167 | # CONFIG_MACH_MX31ADS is not set | ||
168 | # CONFIG_MACH_PCM037 is not set | ||
169 | # CONFIG_MACH_MX31LITE is not set | ||
170 | CONFIG_MACH_MX31_3DS=y | ||
171 | # CONFIG_MXC_IRQ_PRIOR is not set | ||
172 | |||
173 | # | ||
174 | # Processor Type | ||
175 | # | ||
176 | CONFIG_CPU_32=y | ||
177 | CONFIG_CPU_V6=y | ||
178 | # CONFIG_CPU_32v6K is not set | ||
179 | CONFIG_CPU_32v6=y | ||
180 | CONFIG_CPU_ABRT_EV6=y | ||
181 | CONFIG_CPU_PABRT_NOIFAR=y | ||
182 | CONFIG_CPU_CACHE_V6=y | ||
183 | CONFIG_CPU_CACHE_VIPT=y | ||
184 | CONFIG_CPU_COPY_V6=y | ||
185 | CONFIG_CPU_TLB_V6=y | ||
186 | CONFIG_CPU_HAS_ASID=y | ||
187 | CONFIG_CPU_CP15=y | ||
188 | CONFIG_CPU_CP15_MMU=y | ||
189 | |||
190 | # | ||
191 | # Processor Features | ||
192 | # | ||
193 | CONFIG_ARM_THUMB=y | ||
194 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
195 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
196 | # CONFIG_CPU_BPREDICT_DISABLE is not set | ||
197 | # CONFIG_OUTER_CACHE is not set | ||
198 | |||
199 | # | ||
200 | # Bus support | ||
201 | # | ||
202 | # CONFIG_PCI_SYSCALL is not set | ||
203 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
204 | # CONFIG_PCCARD is not set | ||
205 | |||
206 | # | ||
207 | # Kernel Features | ||
208 | # | ||
209 | # CONFIG_NO_HZ is not set | ||
210 | # CONFIG_HIGH_RES_TIMERS is not set | ||
211 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
212 | CONFIG_VMSPLIT_3G=y | ||
213 | # CONFIG_VMSPLIT_2G is not set | ||
214 | # CONFIG_VMSPLIT_1G is not set | ||
215 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
216 | CONFIG_HZ=100 | ||
217 | CONFIG_AEABI=y | ||
218 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
219 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
220 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
221 | CONFIG_FLATMEM=y | ||
222 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
223 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
224 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
225 | # CONFIG_RESOURCES_64BIT is not set | ||
226 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
227 | CONFIG_ZONE_DMA_FLAG=0 | ||
228 | CONFIG_VIRT_TO_BUS=y | ||
229 | # CONFIG_UNEVICTABLE_LRU is not set | ||
230 | CONFIG_ALIGNMENT_TRAP=y | ||
231 | |||
232 | # | ||
233 | # Boot options | ||
234 | # | ||
235 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
236 | CONFIG_ZBOOT_ROM_BSS=0 | ||
237 | CONFIG_CMDLINE="" | ||
238 | # CONFIG_XIP_KERNEL is not set | ||
239 | |||
240 | # | ||
241 | # CPU Power Management | ||
242 | # | ||
243 | # CONFIG_CPU_IDLE is not set | ||
244 | |||
245 | # | ||
246 | # Floating point emulation | ||
247 | # | ||
248 | |||
249 | # | ||
250 | # At least one emulation must be selected | ||
251 | # | ||
252 | # CONFIG_VFP is not set | ||
253 | |||
254 | # | ||
255 | # Userspace binary formats | ||
256 | # | ||
257 | CONFIG_BINFMT_ELF=y | ||
258 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
259 | CONFIG_HAVE_AOUT=y | ||
260 | # CONFIG_BINFMT_AOUT is not set | ||
261 | # CONFIG_BINFMT_MISC is not set | ||
262 | |||
263 | # | ||
264 | # Power management options | ||
265 | # | ||
266 | # CONFIG_PM is not set | ||
267 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
268 | CONFIG_NET=y | ||
269 | |||
270 | # | ||
271 | # Networking options | ||
272 | # | ||
273 | CONFIG_PACKET=y | ||
274 | # CONFIG_PACKET_MMAP is not set | ||
275 | CONFIG_UNIX=y | ||
276 | CONFIG_XFRM=y | ||
277 | # CONFIG_XFRM_USER is not set | ||
278 | CONFIG_NET_KEY=y | ||
279 | CONFIG_INET=y | ||
280 | # CONFIG_IP_MULTICAST is not set | ||
281 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
282 | CONFIG_IP_FIB_HASH=y | ||
283 | CONFIG_IP_PNP=y | ||
284 | CONFIG_IP_PNP_DHCP=y | ||
285 | # CONFIG_IP_PNP_BOOTP is not set | ||
286 | # CONFIG_IP_PNP_RARP is not set | ||
287 | # CONFIG_NET_IPIP is not set | ||
288 | # CONFIG_NET_IPGRE is not set | ||
289 | # CONFIG_SYN_COOKIES is not set | ||
290 | # CONFIG_INET_AH is not set | ||
291 | # CONFIG_INET_ESP is not set | ||
292 | # CONFIG_INET_IPCOMP is not set | ||
293 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
294 | CONFIG_INET_TUNNEL=y | ||
295 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
296 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
297 | CONFIG_INET_XFRM_MODE_BEET=y | ||
298 | # CONFIG_INET_LRO is not set | ||
299 | CONFIG_INET_DIAG=y | ||
300 | CONFIG_INET_TCP_DIAG=y | ||
301 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
302 | CONFIG_TCP_CONG_CUBIC=y | ||
303 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
304 | CONFIG_IPV6=y | ||
305 | # CONFIG_IPV6_PRIVACY is not set | ||
306 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
307 | # CONFIG_INET6_AH is not set | ||
308 | # CONFIG_INET6_ESP is not set | ||
309 | # CONFIG_INET6_IPCOMP is not set | ||
310 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
311 | # CONFIG_INET6_TUNNEL is not set | ||
312 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y | ||
313 | CONFIG_INET6_XFRM_MODE_TUNNEL=y | ||
314 | CONFIG_INET6_XFRM_MODE_BEET=y | ||
315 | CONFIG_IPV6_SIT=y | ||
316 | CONFIG_IPV6_NDISC_NODETYPE=y | ||
317 | # CONFIG_IPV6_TUNNEL is not set | ||
318 | # CONFIG_NETWORK_SECMARK is not set | ||
319 | # CONFIG_NETFILTER is not set | ||
320 | # CONFIG_ATM is not set | ||
321 | # CONFIG_BRIDGE is not set | ||
322 | # CONFIG_VLAN_8021Q is not set | ||
323 | # CONFIG_DECNET is not set | ||
324 | # CONFIG_LLC2 is not set | ||
325 | # CONFIG_IPX is not set | ||
326 | # CONFIG_ATALK is not set | ||
327 | # CONFIG_NET_SCHED is not set | ||
328 | |||
329 | # | ||
330 | # Network testing | ||
331 | # | ||
332 | # CONFIG_NET_PKTGEN is not set | ||
333 | # CONFIG_HAMRADIO is not set | ||
334 | # CONFIG_CAN is not set | ||
335 | # CONFIG_IRDA is not set | ||
336 | # CONFIG_BT is not set | ||
337 | # CONFIG_PHONET is not set | ||
338 | CONFIG_WIRELESS=y | ||
339 | # CONFIG_CFG80211 is not set | ||
340 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
341 | # CONFIG_WIRELESS_EXT is not set | ||
342 | # CONFIG_MAC80211 is not set | ||
343 | # CONFIG_IEEE80211 is not set | ||
344 | # CONFIG_RFKILL is not set | ||
345 | |||
346 | # | ||
347 | # Device Drivers | ||
348 | # | ||
349 | |||
350 | # | ||
351 | # Generic Driver Options | ||
352 | # | ||
353 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
354 | CONFIG_STANDALONE=y | ||
355 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
356 | CONFIG_FW_LOADER=y | ||
357 | # CONFIG_FIRMWARE_IN_KERNEL is not set | ||
358 | CONFIG_EXTRA_FIRMWARE="" | ||
359 | # CONFIG_SYS_HYPERVISOR is not set | ||
360 | # CONFIG_CONNECTOR is not set | ||
361 | # CONFIG_MTD is not set | ||
362 | # CONFIG_PARPORT is not set | ||
363 | # CONFIG_BLK_DEV is not set | ||
364 | # CONFIG_MISC_DEVICES is not set | ||
365 | CONFIG_HAVE_IDE=y | ||
366 | # CONFIG_IDE is not set | ||
367 | |||
368 | # | ||
369 | # SCSI device support | ||
370 | # | ||
371 | # CONFIG_RAID_ATTRS is not set | ||
372 | # CONFIG_SCSI is not set | ||
373 | # CONFIG_SCSI_DMA is not set | ||
374 | # CONFIG_SCSI_NETLINK is not set | ||
375 | # CONFIG_ATA is not set | ||
376 | # CONFIG_MD is not set | ||
377 | CONFIG_NETDEVICES=y | ||
378 | # CONFIG_DUMMY is not set | ||
379 | # CONFIG_BONDING is not set | ||
380 | # CONFIG_EQUALIZER is not set | ||
381 | # CONFIG_TUN is not set | ||
382 | # CONFIG_VETH is not set | ||
383 | # CONFIG_PHYLIB is not set | ||
384 | CONFIG_NET_ETHERNET=y | ||
385 | # CONFIG_MII is not set | ||
386 | # CONFIG_AX88796 is not set | ||
387 | # CONFIG_SMC91X is not set | ||
388 | # CONFIG_DM9000 is not set | ||
389 | # CONFIG_SMC911X is not set | ||
390 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
391 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
392 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
393 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
394 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
395 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
396 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
397 | # CONFIG_B44 is not set | ||
398 | CONFIG_NETDEV_1000=y | ||
399 | CONFIG_NETDEV_10000=y | ||
400 | |||
401 | # | ||
402 | # Wireless LAN | ||
403 | # | ||
404 | # CONFIG_WLAN_PRE80211 is not set | ||
405 | # CONFIG_WLAN_80211 is not set | ||
406 | # CONFIG_IWLWIFI_LEDS is not set | ||
407 | # CONFIG_WAN is not set | ||
408 | # CONFIG_PPP is not set | ||
409 | # CONFIG_SLIP is not set | ||
410 | # CONFIG_NETPOLL is not set | ||
411 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
412 | # CONFIG_ISDN is not set | ||
413 | |||
414 | # | ||
415 | # Input device support | ||
416 | # | ||
417 | CONFIG_INPUT=y | ||
418 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
419 | # CONFIG_INPUT_POLLDEV is not set | ||
420 | |||
421 | # | ||
422 | # Userland interfaces | ||
423 | # | ||
424 | CONFIG_INPUT_MOUSEDEV=y | ||
425 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
426 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
427 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
428 | # CONFIG_INPUT_JOYDEV is not set | ||
429 | # CONFIG_INPUT_EVDEV is not set | ||
430 | # CONFIG_INPUT_EVBUG is not set | ||
431 | |||
432 | # | ||
433 | # Input Device Drivers | ||
434 | # | ||
435 | # CONFIG_INPUT_KEYBOARD is not set | ||
436 | # CONFIG_INPUT_MOUSE is not set | ||
437 | # CONFIG_INPUT_JOYSTICK is not set | ||
438 | # CONFIG_INPUT_TABLET is not set | ||
439 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
440 | # CONFIG_INPUT_MISC is not set | ||
441 | |||
442 | # | ||
443 | # Hardware I/O ports | ||
444 | # | ||
445 | # CONFIG_SERIO is not set | ||
446 | # CONFIG_GAMEPORT is not set | ||
447 | |||
448 | # | ||
449 | # Character devices | ||
450 | # | ||
451 | CONFIG_VT=y | ||
452 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
453 | CONFIG_VT_CONSOLE=y | ||
454 | CONFIG_HW_CONSOLE=y | ||
455 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
456 | # CONFIG_DEVKMEM is not set | ||
457 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
458 | |||
459 | # | ||
460 | # Serial drivers | ||
461 | # | ||
462 | # CONFIG_SERIAL_8250 is not set | ||
463 | |||
464 | # | ||
465 | # Non-8250 serial port support | ||
466 | # | ||
467 | CONFIG_SERIAL_IMX=y | ||
468 | CONFIG_SERIAL_IMX_CONSOLE=y | ||
469 | CONFIG_SERIAL_CORE=y | ||
470 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
471 | CONFIG_UNIX98_PTYS=y | ||
472 | # CONFIG_LEGACY_PTYS is not set | ||
473 | # CONFIG_IPMI_HANDLER is not set | ||
474 | # CONFIG_HW_RANDOM is not set | ||
475 | # CONFIG_NVRAM is not set | ||
476 | # CONFIG_R3964 is not set | ||
477 | # CONFIG_RAW_DRIVER is not set | ||
478 | # CONFIG_I2C is not set | ||
479 | # CONFIG_SPI is not set | ||
480 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
481 | CONFIG_GPIOLIB=y | ||
482 | |||
483 | # | ||
484 | # I2C GPIO expanders: | ||
485 | # | ||
486 | |||
487 | # | ||
488 | # PCI GPIO expanders: | ||
489 | # | ||
490 | |||
491 | # | ||
492 | # SPI GPIO expanders: | ||
493 | # | ||
494 | # CONFIG_W1 is not set | ||
495 | # CONFIG_POWER_SUPPLY is not set | ||
496 | # CONFIG_HWMON is not set | ||
497 | # CONFIG_THERMAL is not set | ||
498 | # CONFIG_THERMAL_HWMON is not set | ||
499 | # CONFIG_WATCHDOG is not set | ||
500 | |||
501 | # | ||
502 | # Sonics Silicon Backplane | ||
503 | # | ||
504 | CONFIG_SSB_POSSIBLE=y | ||
505 | # CONFIG_SSB is not set | ||
506 | |||
507 | # | ||
508 | # Multifunction device drivers | ||
509 | # | ||
510 | # CONFIG_MFD_CORE is not set | ||
511 | # CONFIG_MFD_SM501 is not set | ||
512 | # CONFIG_MFD_ASIC3 is not set | ||
513 | # CONFIG_HTC_EGPIO is not set | ||
514 | # CONFIG_HTC_PASIC3 is not set | ||
515 | # CONFIG_MFD_TMIO is not set | ||
516 | # CONFIG_MFD_T7L66XB is not set | ||
517 | # CONFIG_MFD_TC6387XB is not set | ||
518 | # CONFIG_MFD_TC6393XB is not set | ||
519 | # CONFIG_MFD_WM8400 is not set | ||
520 | |||
521 | # | ||
522 | # Multimedia devices | ||
523 | # | ||
524 | |||
525 | # | ||
526 | # Multimedia core support | ||
527 | # | ||
528 | # CONFIG_VIDEO_DEV is not set | ||
529 | # CONFIG_DVB_CORE is not set | ||
530 | # CONFIG_VIDEO_MEDIA is not set | ||
531 | |||
532 | # | ||
533 | # Multimedia drivers | ||
534 | # | ||
535 | # CONFIG_DAB is not set | ||
536 | |||
537 | # | ||
538 | # Graphics support | ||
539 | # | ||
540 | # CONFIG_VGASTATE is not set | ||
541 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
542 | # CONFIG_FB is not set | ||
543 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
544 | |||
545 | # | ||
546 | # Display device support | ||
547 | # | ||
548 | # CONFIG_DISPLAY_SUPPORT is not set | ||
549 | |||
550 | # | ||
551 | # Console display driver support | ||
552 | # | ||
553 | # CONFIG_VGA_CONSOLE is not set | ||
554 | CONFIG_DUMMY_CONSOLE=y | ||
555 | # CONFIG_SOUND is not set | ||
556 | # CONFIG_HID_SUPPORT is not set | ||
557 | # CONFIG_USB_SUPPORT is not set | ||
558 | # CONFIG_MMC is not set | ||
559 | # CONFIG_MEMSTICK is not set | ||
560 | # CONFIG_ACCESSIBILITY is not set | ||
561 | # CONFIG_NEW_LEDS is not set | ||
562 | CONFIG_RTC_LIB=y | ||
563 | # CONFIG_RTC_CLASS is not set | ||
564 | # CONFIG_DMADEVICES is not set | ||
565 | |||
566 | # | ||
567 | # Voltage and Current regulators | ||
568 | # | ||
569 | # CONFIG_REGULATOR is not set | ||
570 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set | ||
571 | # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set | ||
572 | # CONFIG_REGULATOR_BQ24022 is not set | ||
573 | # CONFIG_UIO is not set | ||
574 | |||
575 | # | ||
576 | # File systems | ||
577 | # | ||
578 | # CONFIG_EXT2_FS is not set | ||
579 | # CONFIG_EXT3_FS is not set | ||
580 | # CONFIG_EXT4_FS is not set | ||
581 | # CONFIG_REISERFS_FS is not set | ||
582 | # CONFIG_JFS_FS is not set | ||
583 | # CONFIG_FS_POSIX_ACL is not set | ||
584 | CONFIG_FILE_LOCKING=y | ||
585 | # CONFIG_XFS_FS is not set | ||
586 | # CONFIG_OCFS2_FS is not set | ||
587 | # CONFIG_DNOTIFY is not set | ||
588 | # CONFIG_INOTIFY is not set | ||
589 | # CONFIG_QUOTA is not set | ||
590 | # CONFIG_AUTOFS_FS is not set | ||
591 | # CONFIG_AUTOFS4_FS is not set | ||
592 | # CONFIG_FUSE_FS is not set | ||
593 | |||
594 | # | ||
595 | # CD-ROM/DVD Filesystems | ||
596 | # | ||
597 | # CONFIG_ISO9660_FS is not set | ||
598 | # CONFIG_UDF_FS is not set | ||
599 | |||
600 | # | ||
601 | # DOS/FAT/NT Filesystems | ||
602 | # | ||
603 | # CONFIG_MSDOS_FS is not set | ||
604 | # CONFIG_VFAT_FS is not set | ||
605 | # CONFIG_NTFS_FS is not set | ||
606 | |||
607 | # | ||
608 | # Pseudo filesystems | ||
609 | # | ||
610 | CONFIG_PROC_FS=y | ||
611 | CONFIG_PROC_SYSCTL=y | ||
612 | CONFIG_PROC_PAGE_MONITOR=y | ||
613 | CONFIG_SYSFS=y | ||
614 | # CONFIG_TMPFS is not set | ||
615 | # CONFIG_HUGETLB_PAGE is not set | ||
616 | # CONFIG_CONFIGFS_FS is not set | ||
617 | |||
618 | # | ||
619 | # Miscellaneous filesystems | ||
620 | # | ||
621 | # CONFIG_HFSPLUS_FS is not set | ||
622 | # CONFIG_CRAMFS is not set | ||
623 | # CONFIG_VXFS_FS is not set | ||
624 | # CONFIG_MINIX_FS is not set | ||
625 | # CONFIG_OMFS_FS is not set | ||
626 | # CONFIG_HPFS_FS is not set | ||
627 | # CONFIG_QNX4FS_FS is not set | ||
628 | # CONFIG_ROMFS_FS is not set | ||
629 | # CONFIG_SYSV_FS is not set | ||
630 | # CONFIG_UFS_FS is not set | ||
631 | CONFIG_NETWORK_FILESYSTEMS=y | ||
632 | # CONFIG_NFS_FS is not set | ||
633 | # CONFIG_NFSD is not set | ||
634 | # CONFIG_SMB_FS is not set | ||
635 | # CONFIG_CIFS is not set | ||
636 | # CONFIG_NCP_FS is not set | ||
637 | # CONFIG_CODA_FS is not set | ||
638 | |||
639 | # | ||
640 | # Partition Types | ||
641 | # | ||
642 | # CONFIG_PARTITION_ADVANCED is not set | ||
643 | CONFIG_MSDOS_PARTITION=y | ||
644 | # CONFIG_NLS is not set | ||
645 | |||
646 | # | ||
647 | # Kernel hacking | ||
648 | # | ||
649 | # CONFIG_PRINTK_TIME is not set | ||
650 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
651 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
652 | CONFIG_FRAME_WARN=1024 | ||
653 | # CONFIG_MAGIC_SYSRQ is not set | ||
654 | # CONFIG_UNUSED_SYMBOLS is not set | ||
655 | # CONFIG_DEBUG_FS is not set | ||
656 | # CONFIG_HEADERS_CHECK is not set | ||
657 | # CONFIG_DEBUG_KERNEL is not set | ||
658 | # CONFIG_SLUB_DEBUG_ON is not set | ||
659 | # CONFIG_SLUB_STATS is not set | ||
660 | CONFIG_DEBUG_BUGVERBOSE=y | ||
661 | CONFIG_DEBUG_MEMORY_INIT=y | ||
662 | CONFIG_FRAME_POINTER=y | ||
663 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
664 | # CONFIG_LATENCYTOP is not set | ||
665 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
666 | CONFIG_NOP_TRACER=y | ||
667 | CONFIG_HAVE_FTRACE=y | ||
668 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
669 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
670 | # CONFIG_SAMPLES is not set | ||
671 | CONFIG_HAVE_ARCH_KGDB=y | ||
672 | # CONFIG_DEBUG_USER is not set | ||
673 | |||
674 | # | ||
675 | # Security options | ||
676 | # | ||
677 | # CONFIG_KEYS is not set | ||
678 | # CONFIG_SECURITY is not set | ||
679 | # CONFIG_SECURITYFS is not set | ||
680 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
681 | CONFIG_CRYPTO=y | ||
682 | |||
683 | # | ||
684 | # Crypto core or helper | ||
685 | # | ||
686 | # CONFIG_CRYPTO_FIPS is not set | ||
687 | # CONFIG_CRYPTO_MANAGER is not set | ||
688 | # CONFIG_CRYPTO_NULL is not set | ||
689 | # CONFIG_CRYPTO_CRYPTD is not set | ||
690 | # CONFIG_CRYPTO_AUTHENC is not set | ||
691 | |||
692 | # | ||
693 | # Authenticated Encryption with Associated Data | ||
694 | # | ||
695 | # CONFIG_CRYPTO_CCM is not set | ||
696 | # CONFIG_CRYPTO_GCM is not set | ||
697 | # CONFIG_CRYPTO_SEQIV is not set | ||
698 | |||
699 | # | ||
700 | # Block modes | ||
701 | # | ||
702 | # CONFIG_CRYPTO_CBC is not set | ||
703 | # CONFIG_CRYPTO_CTR is not set | ||
704 | # CONFIG_CRYPTO_CTS is not set | ||
705 | # CONFIG_CRYPTO_ECB is not set | ||
706 | # CONFIG_CRYPTO_PCBC is not set | ||
707 | |||
708 | # | ||
709 | # Hash modes | ||
710 | # | ||
711 | # CONFIG_CRYPTO_HMAC is not set | ||
712 | |||
713 | # | ||
714 | # Digest | ||
715 | # | ||
716 | # CONFIG_CRYPTO_CRC32C is not set | ||
717 | # CONFIG_CRYPTO_MD4 is not set | ||
718 | # CONFIG_CRYPTO_MD5 is not set | ||
719 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
720 | # CONFIG_CRYPTO_RMD128 is not set | ||
721 | # CONFIG_CRYPTO_RMD160 is not set | ||
722 | # CONFIG_CRYPTO_RMD256 is not set | ||
723 | # CONFIG_CRYPTO_RMD320 is not set | ||
724 | # CONFIG_CRYPTO_SHA1 is not set | ||
725 | # CONFIG_CRYPTO_SHA256 is not set | ||
726 | # CONFIG_CRYPTO_SHA512 is not set | ||
727 | # CONFIG_CRYPTO_TGR192 is not set | ||
728 | # CONFIG_CRYPTO_WP512 is not set | ||
729 | |||
730 | # | ||
731 | # Ciphers | ||
732 | # | ||
733 | # CONFIG_CRYPTO_AES is not set | ||
734 | # CONFIG_CRYPTO_ANUBIS is not set | ||
735 | # CONFIG_CRYPTO_ARC4 is not set | ||
736 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
737 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
738 | # CONFIG_CRYPTO_CAST5 is not set | ||
739 | # CONFIG_CRYPTO_CAST6 is not set | ||
740 | # CONFIG_CRYPTO_DES is not set | ||
741 | # CONFIG_CRYPTO_FCRYPT is not set | ||
742 | # CONFIG_CRYPTO_KHAZAD is not set | ||
743 | # CONFIG_CRYPTO_SEED is not set | ||
744 | # CONFIG_CRYPTO_SERPENT is not set | ||
745 | # CONFIG_CRYPTO_TEA is not set | ||
746 | # CONFIG_CRYPTO_TWOFISH is not set | ||
747 | |||
748 | # | ||
749 | # Compression | ||
750 | # | ||
751 | # CONFIG_CRYPTO_DEFLATE is not set | ||
752 | # CONFIG_CRYPTO_LZO is not set | ||
753 | |||
754 | # | ||
755 | # Random Number Generation | ||
756 | # | ||
757 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
758 | CONFIG_CRYPTO_HW=y | ||
759 | |||
760 | # | ||
761 | # Library routines | ||
762 | # | ||
763 | # CONFIG_CRC_CCITT is not set | ||
764 | # CONFIG_CRC16 is not set | ||
765 | # CONFIG_CRC_T10DIF is not set | ||
766 | # CONFIG_CRC_ITU_T is not set | ||
767 | # CONFIG_CRC32 is not set | ||
768 | # CONFIG_CRC7 is not set | ||
769 | # CONFIG_LIBCRC32C is not set | ||
770 | CONFIG_PLIST=y | ||
771 | CONFIG_HAS_IOMEM=y | ||
772 | CONFIG_HAS_IOPORT=y | ||
773 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/neocore926_defconfig b/arch/arm/configs/neocore926_defconfig new file mode 100644 index 000000000000..325f1e105f69 --- /dev/null +++ b/arch/arm/configs/neocore926_defconfig | |||
@@ -0,0 +1,1302 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.27-rc1 | ||
4 | # Tue Jul 29 10:46:54 2008 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_MMU=y | ||
12 | # CONFIG_NO_IOPORT is not set | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
25 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
26 | CONFIG_ZONE_DMA=y | ||
27 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
28 | CONFIG_VECTORS_BASE=0xffff0000 | ||
29 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
30 | |||
31 | # | ||
32 | # General setup | ||
33 | # | ||
34 | CONFIG_EXPERIMENTAL=y | ||
35 | CONFIG_BROKEN_ON_SMP=y | ||
36 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
37 | CONFIG_LOCALVERSION="" | ||
38 | # CONFIG_LOCALVERSION_AUTO is not set | ||
39 | # CONFIG_SWAP is not set | ||
40 | CONFIG_SYSVIPC=y | ||
41 | CONFIG_SYSVIPC_SYSCTL=y | ||
42 | # CONFIG_POSIX_MQUEUE is not set | ||
43 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
44 | # CONFIG_TASKSTATS is not set | ||
45 | # CONFIG_AUDIT is not set | ||
46 | # CONFIG_IKCONFIG is not set | ||
47 | CONFIG_LOG_BUF_SHIFT=17 | ||
48 | # CONFIG_CGROUPS is not set | ||
49 | # CONFIG_GROUP_SCHED is not set | ||
50 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
51 | # CONFIG_RELAY is not set | ||
52 | CONFIG_NAMESPACES=y | ||
53 | # CONFIG_UTS_NS is not set | ||
54 | # CONFIG_IPC_NS is not set | ||
55 | # CONFIG_USER_NS is not set | ||
56 | # CONFIG_PID_NS is not set | ||
57 | CONFIG_BLK_DEV_INITRD=y | ||
58 | CONFIG_INITRAMFS_SOURCE="" | ||
59 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
60 | CONFIG_SYSCTL=y | ||
61 | # CONFIG_EMBEDDED is not set | ||
62 | CONFIG_UID16=y | ||
63 | CONFIG_SYSCTL_SYSCALL=y | ||
64 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
65 | CONFIG_KALLSYMS=y | ||
66 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
67 | CONFIG_HOTPLUG=y | ||
68 | CONFIG_PRINTK=y | ||
69 | CONFIG_BUG=y | ||
70 | CONFIG_ELF_CORE=y | ||
71 | # CONFIG_COMPAT_BRK is not set | ||
72 | CONFIG_BASE_FULL=y | ||
73 | CONFIG_FUTEX=y | ||
74 | CONFIG_ANON_INODES=y | ||
75 | CONFIG_EPOLL=y | ||
76 | CONFIG_SIGNALFD=y | ||
77 | CONFIG_TIMERFD=y | ||
78 | CONFIG_EVENTFD=y | ||
79 | CONFIG_SHMEM=y | ||
80 | CONFIG_VM_EVENT_COUNTERS=y | ||
81 | CONFIG_SLUB_DEBUG=y | ||
82 | # CONFIG_SLAB is not set | ||
83 | CONFIG_SLUB=y | ||
84 | # CONFIG_SLOB is not set | ||
85 | # CONFIG_PROFILING is not set | ||
86 | # CONFIG_MARKERS is not set | ||
87 | CONFIG_HAVE_OPROFILE=y | ||
88 | # CONFIG_KPROBES is not set | ||
89 | # CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set | ||
90 | # CONFIG_HAVE_IOREMAP_PROT is not set | ||
91 | CONFIG_HAVE_KPROBES=y | ||
92 | CONFIG_HAVE_KRETPROBES=y | ||
93 | # CONFIG_HAVE_ARCH_TRACEHOOK is not set | ||
94 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
95 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | ||
96 | CONFIG_HAVE_CLK=y | ||
97 | CONFIG_PROC_PAGE_MONITOR=y | ||
98 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
99 | CONFIG_SLABINFO=y | ||
100 | CONFIG_RT_MUTEXES=y | ||
101 | # CONFIG_TINY_SHMEM is not set | ||
102 | CONFIG_BASE_SMALL=0 | ||
103 | CONFIG_MODULES=y | ||
104 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
105 | CONFIG_MODULE_UNLOAD=y | ||
106 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
107 | # CONFIG_MODVERSIONS is not set | ||
108 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
109 | CONFIG_KMOD=y | ||
110 | CONFIG_BLOCK=y | ||
111 | # CONFIG_LBD is not set | ||
112 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
113 | # CONFIG_LSF is not set | ||
114 | # CONFIG_BLK_DEV_BSG is not set | ||
115 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
116 | |||
117 | # | ||
118 | # IO Schedulers | ||
119 | # | ||
120 | CONFIG_IOSCHED_NOOP=y | ||
121 | # CONFIG_IOSCHED_AS is not set | ||
122 | # CONFIG_IOSCHED_DEADLINE is not set | ||
123 | # CONFIG_IOSCHED_CFQ is not set | ||
124 | # CONFIG_DEFAULT_AS is not set | ||
125 | # CONFIG_DEFAULT_DEADLINE is not set | ||
126 | # CONFIG_DEFAULT_CFQ is not set | ||
127 | CONFIG_DEFAULT_NOOP=y | ||
128 | CONFIG_DEFAULT_IOSCHED="noop" | ||
129 | CONFIG_CLASSIC_RCU=y | ||
130 | |||
131 | # | ||
132 | # System Type | ||
133 | # | ||
134 | # CONFIG_ARCH_AAEC2000 is not set | ||
135 | # CONFIG_ARCH_INTEGRATOR is not set | ||
136 | # CONFIG_ARCH_REALVIEW is not set | ||
137 | # CONFIG_ARCH_VERSATILE is not set | ||
138 | CONFIG_ARCH_AT91=y | ||
139 | # CONFIG_ARCH_CLPS7500 is not set | ||
140 | # CONFIG_ARCH_CLPS711X is not set | ||
141 | # CONFIG_ARCH_EBSA110 is not set | ||
142 | # CONFIG_ARCH_EP93XX is not set | ||
143 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
144 | # CONFIG_ARCH_NETX is not set | ||
145 | # CONFIG_ARCH_H720X is not set | ||
146 | # CONFIG_ARCH_IMX is not set | ||
147 | # CONFIG_ARCH_IOP13XX is not set | ||
148 | # CONFIG_ARCH_IOP32X is not set | ||
149 | # CONFIG_ARCH_IOP33X is not set | ||
150 | # CONFIG_ARCH_IXP23XX is not set | ||
151 | # CONFIG_ARCH_IXP2000 is not set | ||
152 | # CONFIG_ARCH_IXP4XX is not set | ||
153 | # CONFIG_ARCH_L7200 is not set | ||
154 | # CONFIG_ARCH_KIRKWOOD is not set | ||
155 | # CONFIG_ARCH_KS8695 is not set | ||
156 | # CONFIG_ARCH_NS9XXX is not set | ||
157 | # CONFIG_ARCH_LOKI is not set | ||
158 | # CONFIG_ARCH_MV78XX0 is not set | ||
159 | # CONFIG_ARCH_MXC is not set | ||
160 | # CONFIG_ARCH_ORION5X is not set | ||
161 | # CONFIG_ARCH_PNX4008 is not set | ||
162 | # CONFIG_ARCH_PXA is not set | ||
163 | # CONFIG_ARCH_RPC is not set | ||
164 | # CONFIG_ARCH_SA1100 is not set | ||
165 | # CONFIG_ARCH_S3C2410 is not set | ||
166 | # CONFIG_ARCH_SHARK is not set | ||
167 | # CONFIG_ARCH_LH7A40X is not set | ||
168 | # CONFIG_ARCH_DAVINCI is not set | ||
169 | # CONFIG_ARCH_OMAP is not set | ||
170 | # CONFIG_ARCH_MSM7X00A is not set | ||
171 | |||
172 | # | ||
173 | # Boot options | ||
174 | # | ||
175 | |||
176 | # | ||
177 | # Power management | ||
178 | # | ||
179 | |||
180 | # | ||
181 | # Atmel AT91 System-on-Chip | ||
182 | # | ||
183 | # CONFIG_ARCH_AT91RM9200 is not set | ||
184 | # CONFIG_ARCH_AT91SAM9260 is not set | ||
185 | # CONFIG_ARCH_AT91SAM9261 is not set | ||
186 | CONFIG_ARCH_AT91SAM9263=y | ||
187 | # CONFIG_ARCH_AT91SAM9RL is not set | ||
188 | # CONFIG_ARCH_AT91SAM9G20 is not set | ||
189 | # CONFIG_ARCH_AT91CAP9 is not set | ||
190 | # CONFIG_ARCH_AT91X40 is not set | ||
191 | CONFIG_AT91_PMC_UNIT=y | ||
192 | |||
193 | # | ||
194 | # AT91SAM9263 Board Type | ||
195 | # | ||
196 | # CONFIG_MACH_AT91SAM9263EK is not set | ||
197 | # CONFIG_MACH_USB_A9263 is not set | ||
198 | CONFIG_MACH_NEOCORE926=y | ||
199 | |||
200 | # | ||
201 | # AT91 Board Options | ||
202 | # | ||
203 | CONFIG_MTD_AT91_DATAFLASH_CARD=y | ||
204 | |||
205 | # | ||
206 | # AT91 Feature Selections | ||
207 | # | ||
208 | # CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set | ||
209 | CONFIG_AT91_TIMER_HZ=100 | ||
210 | CONFIG_AT91_EARLY_DBGU=y | ||
211 | # CONFIG_AT91_EARLY_USART0 is not set | ||
212 | # CONFIG_AT91_EARLY_USART1 is not set | ||
213 | # CONFIG_AT91_EARLY_USART2 is not set | ||
214 | # CONFIG_AT91_EARLY_USART3 is not set | ||
215 | # CONFIG_AT91_EARLY_USART4 is not set | ||
216 | # CONFIG_AT91_EARLY_USART5 is not set | ||
217 | |||
218 | # | ||
219 | # Processor Type | ||
220 | # | ||
221 | CONFIG_CPU_32=y | ||
222 | CONFIG_CPU_ARM926T=y | ||
223 | CONFIG_CPU_32v5=y | ||
224 | CONFIG_CPU_ABRT_EV5TJ=y | ||
225 | CONFIG_CPU_PABRT_NOIFAR=y | ||
226 | CONFIG_CPU_CACHE_VIVT=y | ||
227 | CONFIG_CPU_COPY_V4WB=y | ||
228 | CONFIG_CPU_TLB_V4WBI=y | ||
229 | CONFIG_CPU_CP15=y | ||
230 | CONFIG_CPU_CP15_MMU=y | ||
231 | |||
232 | # | ||
233 | # Processor Features | ||
234 | # | ||
235 | CONFIG_ARM_THUMB=y | ||
236 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
237 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
238 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
239 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
240 | # CONFIG_OUTER_CACHE is not set | ||
241 | |||
242 | # | ||
243 | # Bus support | ||
244 | # | ||
245 | # CONFIG_PCI_SYSCALL is not set | ||
246 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
247 | # CONFIG_PCCARD is not set | ||
248 | |||
249 | # | ||
250 | # Kernel Features | ||
251 | # | ||
252 | # CONFIG_TICK_ONESHOT is not set | ||
253 | # CONFIG_NO_HZ is not set | ||
254 | # CONFIG_HIGH_RES_TIMERS is not set | ||
255 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
256 | # CONFIG_PREEMPT is not set | ||
257 | CONFIG_HZ=100 | ||
258 | # CONFIG_AEABI is not set | ||
259 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
260 | CONFIG_SELECT_MEMORY_MODEL=y | ||
261 | CONFIG_FLATMEM_MANUAL=y | ||
262 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
263 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
264 | CONFIG_FLATMEM=y | ||
265 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
266 | # CONFIG_SPARSEMEM_STATIC is not set | ||
267 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
268 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
269 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
270 | # CONFIG_RESOURCES_64BIT is not set | ||
271 | CONFIG_ZONE_DMA_FLAG=1 | ||
272 | CONFIG_BOUNCE=y | ||
273 | CONFIG_VIRT_TO_BUS=y | ||
274 | # CONFIG_LEDS is not set | ||
275 | CONFIG_ALIGNMENT_TRAP=y | ||
276 | |||
277 | # | ||
278 | # Boot options | ||
279 | # | ||
280 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
281 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
282 | CONFIG_CMDLINE="" | ||
283 | # CONFIG_XIP_KERNEL is not set | ||
284 | # CONFIG_KEXEC is not set | ||
285 | |||
286 | # | ||
287 | # Floating point emulation | ||
288 | # | ||
289 | |||
290 | # | ||
291 | # At least one emulation must be selected | ||
292 | # | ||
293 | CONFIG_FPE_NWFPE=y | ||
294 | # CONFIG_FPE_NWFPE_XP is not set | ||
295 | # CONFIG_FPE_FASTFPE is not set | ||
296 | # CONFIG_VFP is not set | ||
297 | |||
298 | # | ||
299 | # Userspace binary formats | ||
300 | # | ||
301 | CONFIG_BINFMT_ELF=y | ||
302 | # CONFIG_BINFMT_AOUT is not set | ||
303 | # CONFIG_BINFMT_MISC is not set | ||
304 | # CONFIG_ARTHUR is not set | ||
305 | |||
306 | # | ||
307 | # Power management options | ||
308 | # | ||
309 | # CONFIG_PM is not set | ||
310 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
311 | |||
312 | # | ||
313 | # Networking | ||
314 | # | ||
315 | CONFIG_NET=y | ||
316 | |||
317 | # | ||
318 | # Networking options | ||
319 | # | ||
320 | CONFIG_PACKET=y | ||
321 | # CONFIG_PACKET_MMAP is not set | ||
322 | CONFIG_UNIX=y | ||
323 | CONFIG_XFRM=y | ||
324 | # CONFIG_XFRM_USER is not set | ||
325 | # CONFIG_XFRM_SUB_POLICY is not set | ||
326 | # CONFIG_XFRM_MIGRATE is not set | ||
327 | # CONFIG_XFRM_STATISTICS is not set | ||
328 | CONFIG_NET_KEY=y | ||
329 | # CONFIG_NET_KEY_MIGRATE is not set | ||
330 | CONFIG_INET=y | ||
331 | # CONFIG_IP_MULTICAST is not set | ||
332 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
333 | CONFIG_IP_FIB_HASH=y | ||
334 | CONFIG_IP_PNP=y | ||
335 | CONFIG_IP_PNP_DHCP=y | ||
336 | CONFIG_IP_PNP_BOOTP=y | ||
337 | CONFIG_IP_PNP_RARP=y | ||
338 | CONFIG_NET_IPIP=y | ||
339 | # CONFIG_NET_IPGRE is not set | ||
340 | # CONFIG_ARPD is not set | ||
341 | # CONFIG_SYN_COOKIES is not set | ||
342 | # CONFIG_INET_AH is not set | ||
343 | # CONFIG_INET_ESP is not set | ||
344 | # CONFIG_INET_IPCOMP is not set | ||
345 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
346 | CONFIG_INET_TUNNEL=y | ||
347 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
348 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
349 | CONFIG_INET_XFRM_MODE_BEET=y | ||
350 | # CONFIG_INET_LRO is not set | ||
351 | CONFIG_INET_DIAG=y | ||
352 | CONFIG_INET_TCP_DIAG=y | ||
353 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
354 | CONFIG_TCP_CONG_CUBIC=y | ||
355 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
356 | # CONFIG_TCP_MD5SIG is not set | ||
357 | CONFIG_IPV6=y | ||
358 | # CONFIG_IPV6_PRIVACY is not set | ||
359 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
360 | # CONFIG_IPV6_OPTIMISTIC_DAD is not set | ||
361 | # CONFIG_INET6_AH is not set | ||
362 | # CONFIG_INET6_ESP is not set | ||
363 | # CONFIG_INET6_IPCOMP is not set | ||
364 | # CONFIG_IPV6_MIP6 is not set | ||
365 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
366 | # CONFIG_INET6_TUNNEL is not set | ||
367 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y | ||
368 | CONFIG_INET6_XFRM_MODE_TUNNEL=y | ||
369 | CONFIG_INET6_XFRM_MODE_BEET=y | ||
370 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | ||
371 | CONFIG_IPV6_SIT=y | ||
372 | CONFIG_IPV6_NDISC_NODETYPE=y | ||
373 | # CONFIG_IPV6_TUNNEL is not set | ||
374 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | ||
375 | # CONFIG_IPV6_MROUTE is not set | ||
376 | # CONFIG_NETWORK_SECMARK is not set | ||
377 | # CONFIG_NETFILTER is not set | ||
378 | # CONFIG_IP_DCCP is not set | ||
379 | # CONFIG_IP_SCTP is not set | ||
380 | # CONFIG_TIPC is not set | ||
381 | # CONFIG_ATM is not set | ||
382 | # CONFIG_BRIDGE is not set | ||
383 | # CONFIG_VLAN_8021Q is not set | ||
384 | # CONFIG_DECNET is not set | ||
385 | # CONFIG_LLC2 is not set | ||
386 | # CONFIG_IPX is not set | ||
387 | # CONFIG_ATALK is not set | ||
388 | # CONFIG_X25 is not set | ||
389 | # CONFIG_LAPB is not set | ||
390 | # CONFIG_ECONET is not set | ||
391 | # CONFIG_WAN_ROUTER is not set | ||
392 | # CONFIG_NET_SCHED is not set | ||
393 | |||
394 | # | ||
395 | # Network testing | ||
396 | # | ||
397 | # CONFIG_NET_PKTGEN is not set | ||
398 | # CONFIG_HAMRADIO is not set | ||
399 | # CONFIG_CAN is not set | ||
400 | # CONFIG_IRDA is not set | ||
401 | # CONFIG_BT is not set | ||
402 | # CONFIG_AF_RXRPC is not set | ||
403 | |||
404 | # | ||
405 | # Wireless | ||
406 | # | ||
407 | # CONFIG_CFG80211 is not set | ||
408 | # CONFIG_WIRELESS_EXT is not set | ||
409 | # CONFIG_MAC80211 is not set | ||
410 | # CONFIG_IEEE80211 is not set | ||
411 | # CONFIG_RFKILL is not set | ||
412 | # CONFIG_NET_9P is not set | ||
413 | |||
414 | # | ||
415 | # Device Drivers | ||
416 | # | ||
417 | |||
418 | # | ||
419 | # Generic Driver Options | ||
420 | # | ||
421 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
422 | CONFIG_STANDALONE=y | ||
423 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
424 | CONFIG_FW_LOADER=y | ||
425 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
426 | CONFIG_EXTRA_FIRMWARE="" | ||
427 | # CONFIG_SYS_HYPERVISOR is not set | ||
428 | # CONFIG_CONNECTOR is not set | ||
429 | CONFIG_MTD=y | ||
430 | # CONFIG_MTD_DEBUG is not set | ||
431 | # CONFIG_MTD_CONCAT is not set | ||
432 | CONFIG_MTD_PARTITIONS=y | ||
433 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
434 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
435 | # CONFIG_MTD_AFS_PARTS is not set | ||
436 | # CONFIG_MTD_AR7_PARTS is not set | ||
437 | |||
438 | # | ||
439 | # User Modules And Translation Layers | ||
440 | # | ||
441 | CONFIG_MTD_CHAR=y | ||
442 | CONFIG_MTD_BLKDEVS=y | ||
443 | CONFIG_MTD_BLOCK=y | ||
444 | # CONFIG_FTL is not set | ||
445 | CONFIG_NFTL=y | ||
446 | CONFIG_NFTL_RW=y | ||
447 | # CONFIG_INFTL is not set | ||
448 | # CONFIG_RFD_FTL is not set | ||
449 | # CONFIG_SSFDC is not set | ||
450 | # CONFIG_MTD_OOPS is not set | ||
451 | |||
452 | # | ||
453 | # RAM/ROM/Flash chip drivers | ||
454 | # | ||
455 | # CONFIG_MTD_CFI is not set | ||
456 | # CONFIG_MTD_JEDECPROBE is not set | ||
457 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
458 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
459 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
460 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
461 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
462 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
463 | CONFIG_MTD_CFI_I1=y | ||
464 | CONFIG_MTD_CFI_I2=y | ||
465 | # CONFIG_MTD_CFI_I4 is not set | ||
466 | # CONFIG_MTD_CFI_I8 is not set | ||
467 | # CONFIG_MTD_RAM is not set | ||
468 | # CONFIG_MTD_ROM is not set | ||
469 | # CONFIG_MTD_ABSENT is not set | ||
470 | |||
471 | # | ||
472 | # Mapping drivers for chip access | ||
473 | # | ||
474 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
475 | # CONFIG_MTD_PLATRAM is not set | ||
476 | |||
477 | # | ||
478 | # Self-contained MTD device drivers | ||
479 | # | ||
480 | # CONFIG_MTD_DATAFLASH is not set | ||
481 | # CONFIG_MTD_M25P80 is not set | ||
482 | # CONFIG_MTD_SLRAM is not set | ||
483 | # CONFIG_MTD_PHRAM is not set | ||
484 | # CONFIG_MTD_MTDRAM is not set | ||
485 | CONFIG_MTD_BLOCK2MTD=y | ||
486 | |||
487 | # | ||
488 | # Disk-On-Chip Device Drivers | ||
489 | # | ||
490 | # CONFIG_MTD_DOC2000 is not set | ||
491 | # CONFIG_MTD_DOC2001 is not set | ||
492 | # CONFIG_MTD_DOC2001PLUS is not set | ||
493 | CONFIG_MTD_NAND=y | ||
494 | CONFIG_MTD_NAND_VERIFY_WRITE=y | ||
495 | CONFIG_MTD_NAND_ECC_SMC=y | ||
496 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
497 | CONFIG_MTD_NAND_IDS=y | ||
498 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
499 | CONFIG_MTD_NAND_ATMEL=y | ||
500 | CONFIG_MTD_NAND_ATMEL_ECC_HW=y | ||
501 | # CONFIG_MTD_NAND_ATMEL_ECC_SOFT is not set | ||
502 | # CONFIG_MTD_NAND_ATMEL_ECC_NONE is not set | ||
503 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
504 | CONFIG_MTD_NAND_PLATFORM=y | ||
505 | # CONFIG_MTD_ALAUDA is not set | ||
506 | # CONFIG_MTD_ONENAND is not set | ||
507 | |||
508 | # | ||
509 | # UBI - Unsorted block images | ||
510 | # | ||
511 | # CONFIG_MTD_UBI is not set | ||
512 | # CONFIG_PARPORT is not set | ||
513 | CONFIG_BLK_DEV=y | ||
514 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
515 | CONFIG_BLK_DEV_LOOP=y | ||
516 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
517 | CONFIG_BLK_DEV_NBD=y | ||
518 | # CONFIG_BLK_DEV_UB is not set | ||
519 | # CONFIG_BLK_DEV_RAM is not set | ||
520 | # CONFIG_CDROM_PKTCDVD is not set | ||
521 | # CONFIG_ATA_OVER_ETH is not set | ||
522 | CONFIG_MISC_DEVICES=y | ||
523 | CONFIG_ATMEL_PWM=y | ||
524 | CONFIG_ATMEL_TCLIB=y | ||
525 | CONFIG_ATMEL_TCB_CLKSRC=y | ||
526 | CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0 | ||
527 | # CONFIG_EEPROM_93CX6 is not set | ||
528 | # CONFIG_ATMEL_SSC is not set | ||
529 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
530 | CONFIG_HAVE_IDE=y | ||
531 | # CONFIG_IDE is not set | ||
532 | |||
533 | # | ||
534 | # SCSI device support | ||
535 | # | ||
536 | # CONFIG_RAID_ATTRS is not set | ||
537 | CONFIG_SCSI=y | ||
538 | CONFIG_SCSI_DMA=y | ||
539 | # CONFIG_SCSI_TGT is not set | ||
540 | # CONFIG_SCSI_NETLINK is not set | ||
541 | CONFIG_SCSI_PROC_FS=y | ||
542 | |||
543 | # | ||
544 | # SCSI support type (disk, tape, CD-ROM) | ||
545 | # | ||
546 | # CONFIG_BLK_DEV_SD is not set | ||
547 | # CONFIG_CHR_DEV_ST is not set | ||
548 | # CONFIG_CHR_DEV_OSST is not set | ||
549 | # CONFIG_BLK_DEV_SR is not set | ||
550 | CONFIG_CHR_DEV_SG=y | ||
551 | # CONFIG_CHR_DEV_SCH is not set | ||
552 | |||
553 | # | ||
554 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
555 | # | ||
556 | # CONFIG_SCSI_MULTI_LUN is not set | ||
557 | # CONFIG_SCSI_CONSTANTS is not set | ||
558 | # CONFIG_SCSI_LOGGING is not set | ||
559 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
560 | CONFIG_SCSI_WAIT_SCAN=m | ||
561 | |||
562 | # | ||
563 | # SCSI Transports | ||
564 | # | ||
565 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
566 | # CONFIG_SCSI_FC_ATTRS is not set | ||
567 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
568 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
569 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
570 | CONFIG_SCSI_LOWLEVEL=y | ||
571 | # CONFIG_ISCSI_TCP is not set | ||
572 | # CONFIG_SCSI_DEBUG is not set | ||
573 | # CONFIG_SCSI_DH is not set | ||
574 | # CONFIG_ATA is not set | ||
575 | # CONFIG_MD is not set | ||
576 | CONFIG_NETDEVICES=y | ||
577 | # CONFIG_DUMMY is not set | ||
578 | # CONFIG_BONDING is not set | ||
579 | # CONFIG_MACVLAN is not set | ||
580 | # CONFIG_EQUALIZER is not set | ||
581 | # CONFIG_TUN is not set | ||
582 | # CONFIG_VETH is not set | ||
583 | CONFIG_PHYLIB=y | ||
584 | |||
585 | # | ||
586 | # MII PHY device drivers | ||
587 | # | ||
588 | # CONFIG_MARVELL_PHY is not set | ||
589 | # CONFIG_DAVICOM_PHY is not set | ||
590 | # CONFIG_QSEMI_PHY is not set | ||
591 | # CONFIG_LXT_PHY is not set | ||
592 | # CONFIG_CICADA_PHY is not set | ||
593 | # CONFIG_VITESSE_PHY is not set | ||
594 | CONFIG_SMSC_PHY=y | ||
595 | # CONFIG_BROADCOM_PHY is not set | ||
596 | # CONFIG_ICPLUS_PHY is not set | ||
597 | # CONFIG_REALTEK_PHY is not set | ||
598 | # CONFIG_FIXED_PHY is not set | ||
599 | # CONFIG_MDIO_BITBANG is not set | ||
600 | CONFIG_NET_ETHERNET=y | ||
601 | # CONFIG_MII is not set | ||
602 | CONFIG_MACB=y | ||
603 | # CONFIG_AX88796 is not set | ||
604 | # CONFIG_SMC91X is not set | ||
605 | # CONFIG_DM9000 is not set | ||
606 | # CONFIG_ENC28J60 is not set | ||
607 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
608 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
609 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
610 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
611 | # CONFIG_B44 is not set | ||
612 | # CONFIG_NETDEV_1000 is not set | ||
613 | # CONFIG_NETDEV_10000 is not set | ||
614 | |||
615 | # | ||
616 | # Wireless LAN | ||
617 | # | ||
618 | # CONFIG_WLAN_PRE80211 is not set | ||
619 | # CONFIG_WLAN_80211 is not set | ||
620 | # CONFIG_IWLWIFI_LEDS is not set | ||
621 | |||
622 | # | ||
623 | # USB Network Adapters | ||
624 | # | ||
625 | # CONFIG_USB_CATC is not set | ||
626 | # CONFIG_USB_KAWETH is not set | ||
627 | # CONFIG_USB_PEGASUS is not set | ||
628 | # CONFIG_USB_RTL8150 is not set | ||
629 | # CONFIG_USB_USBNET is not set | ||
630 | # CONFIG_WAN is not set | ||
631 | # CONFIG_PPP is not set | ||
632 | # CONFIG_SLIP is not set | ||
633 | # CONFIG_NETCONSOLE is not set | ||
634 | # CONFIG_NETPOLL is not set | ||
635 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
636 | # CONFIG_ISDN is not set | ||
637 | |||
638 | # | ||
639 | # Input device support | ||
640 | # | ||
641 | CONFIG_INPUT=y | ||
642 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
643 | # CONFIG_INPUT_POLLDEV is not set | ||
644 | |||
645 | # | ||
646 | # Userland interfaces | ||
647 | # | ||
648 | CONFIG_INPUT_MOUSEDEV=y | ||
649 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
650 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
651 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
652 | # CONFIG_INPUT_JOYDEV is not set | ||
653 | CONFIG_INPUT_EVDEV=y | ||
654 | # CONFIG_INPUT_EVBUG is not set | ||
655 | |||
656 | # | ||
657 | # Input Device Drivers | ||
658 | # | ||
659 | CONFIG_INPUT_KEYBOARD=y | ||
660 | CONFIG_KEYBOARD_ATKBD=y | ||
661 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
662 | # CONFIG_KEYBOARD_LKKBD is not set | ||
663 | # CONFIG_KEYBOARD_XTKBD is not set | ||
664 | # CONFIG_KEYBOARD_NEWTON is not set | ||
665 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
666 | # CONFIG_KEYBOARD_GPIO is not set | ||
667 | CONFIG_INPUT_MOUSE=y | ||
668 | CONFIG_MOUSE_PS2=y | ||
669 | CONFIG_MOUSE_PS2_ALPS=y | ||
670 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
671 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
672 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
673 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
674 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
675 | # CONFIG_MOUSE_SERIAL is not set | ||
676 | # CONFIG_MOUSE_APPLETOUCH is not set | ||
677 | # CONFIG_MOUSE_VSXXXAA is not set | ||
678 | # CONFIG_MOUSE_GPIO is not set | ||
679 | # CONFIG_INPUT_JOYSTICK is not set | ||
680 | # CONFIG_INPUT_TABLET is not set | ||
681 | CONFIG_INPUT_TOUCHSCREEN=y | ||
682 | CONFIG_TOUCHSCREEN_ADS7846=y | ||
683 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | ||
684 | # CONFIG_TOUCHSCREEN_GUNZE is not set | ||
685 | # CONFIG_TOUCHSCREEN_ELO is not set | ||
686 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | ||
687 | # CONFIG_TOUCHSCREEN_INEXIO is not set | ||
688 | # CONFIG_TOUCHSCREEN_MK712 is not set | ||
689 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | ||
690 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | ||
691 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | ||
692 | # CONFIG_TOUCHSCREEN_UCB1400 is not set | ||
693 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | ||
694 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | ||
695 | # CONFIG_INPUT_MISC is not set | ||
696 | |||
697 | # | ||
698 | # Hardware I/O ports | ||
699 | # | ||
700 | CONFIG_SERIO=y | ||
701 | CONFIG_SERIO_SERPORT=y | ||
702 | CONFIG_SERIO_LIBPS2=y | ||
703 | # CONFIG_SERIO_RAW is not set | ||
704 | # CONFIG_GAMEPORT is not set | ||
705 | |||
706 | # | ||
707 | # Character devices | ||
708 | # | ||
709 | CONFIG_VT=y | ||
710 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
711 | CONFIG_VT_CONSOLE=y | ||
712 | CONFIG_HW_CONSOLE=y | ||
713 | CONFIG_VT_HW_CONSOLE_BINDING=y | ||
714 | # CONFIG_DEVKMEM is not set | ||
715 | CONFIG_SERIAL_NONSTANDARD=y | ||
716 | # CONFIG_N_HDLC is not set | ||
717 | # CONFIG_RISCOM8 is not set | ||
718 | # CONFIG_SPECIALIX is not set | ||
719 | # CONFIG_RIO is not set | ||
720 | # CONFIG_STALDRV is not set | ||
721 | |||
722 | # | ||
723 | # Serial drivers | ||
724 | # | ||
725 | # CONFIG_SERIAL_8250 is not set | ||
726 | |||
727 | # | ||
728 | # Non-8250 serial port support | ||
729 | # | ||
730 | CONFIG_SERIAL_ATMEL=y | ||
731 | CONFIG_SERIAL_ATMEL_CONSOLE=y | ||
732 | # CONFIG_SERIAL_ATMEL_PDC is not set | ||
733 | # CONFIG_SERIAL_ATMEL_TTYAT is not set | ||
734 | CONFIG_SERIAL_CORE=y | ||
735 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
736 | CONFIG_UNIX98_PTYS=y | ||
737 | CONFIG_LEGACY_PTYS=y | ||
738 | CONFIG_LEGACY_PTY_COUNT=256 | ||
739 | # CONFIG_IPMI_HANDLER is not set | ||
740 | # CONFIG_HW_RANDOM is not set | ||
741 | # CONFIG_NVRAM is not set | ||
742 | # CONFIG_R3964 is not set | ||
743 | # CONFIG_RAW_DRIVER is not set | ||
744 | # CONFIG_TCG_TPM is not set | ||
745 | CONFIG_I2C=y | ||
746 | CONFIG_I2C_BOARDINFO=y | ||
747 | CONFIG_I2C_CHARDEV=y | ||
748 | |||
749 | # | ||
750 | # I2C Hardware Bus support | ||
751 | # | ||
752 | |||
753 | # | ||
754 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
755 | # | ||
756 | # CONFIG_I2C_GPIO is not set | ||
757 | # CONFIG_I2C_OCORES is not set | ||
758 | # CONFIG_I2C_SIMTEC is not set | ||
759 | |||
760 | # | ||
761 | # External I2C/SMBus adapter drivers | ||
762 | # | ||
763 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
764 | # CONFIG_I2C_TAOS_EVM is not set | ||
765 | # CONFIG_I2C_TINY_USB is not set | ||
766 | |||
767 | # | ||
768 | # Other I2C/SMBus bus drivers | ||
769 | # | ||
770 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
771 | # CONFIG_I2C_STUB is not set | ||
772 | |||
773 | # | ||
774 | # Miscellaneous I2C Chip support | ||
775 | # | ||
776 | # CONFIG_DS1682 is not set | ||
777 | # CONFIG_AT24 is not set | ||
778 | # CONFIG_SENSORS_EEPROM is not set | ||
779 | # CONFIG_SENSORS_PCF8574 is not set | ||
780 | # CONFIG_PCF8575 is not set | ||
781 | # CONFIG_SENSORS_PCA9539 is not set | ||
782 | # CONFIG_SENSORS_PCF8591 is not set | ||
783 | # CONFIG_SENSORS_MAX6875 is not set | ||
784 | # CONFIG_SENSORS_TSL2550 is not set | ||
785 | # CONFIG_I2C_DEBUG_CORE is not set | ||
786 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
787 | # CONFIG_I2C_DEBUG_BUS is not set | ||
788 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
789 | CONFIG_SPI=y | ||
790 | CONFIG_SPI_MASTER=y | ||
791 | |||
792 | # | ||
793 | # SPI Master Controller Drivers | ||
794 | # | ||
795 | CONFIG_SPI_ATMEL=y | ||
796 | # CONFIG_SPI_BITBANG is not set | ||
797 | |||
798 | # | ||
799 | # SPI Protocol Masters | ||
800 | # | ||
801 | # CONFIG_SPI_AT25 is not set | ||
802 | # CONFIG_SPI_SPIDEV is not set | ||
803 | # CONFIG_SPI_TLE62X0 is not set | ||
804 | # CONFIG_W1 is not set | ||
805 | # CONFIG_POWER_SUPPLY is not set | ||
806 | # CONFIG_HWMON is not set | ||
807 | # CONFIG_WATCHDOG is not set | ||
808 | |||
809 | # | ||
810 | # Sonics Silicon Backplane | ||
811 | # | ||
812 | CONFIG_SSB_POSSIBLE=y | ||
813 | # CONFIG_SSB is not set | ||
814 | |||
815 | # | ||
816 | # Multifunction device drivers | ||
817 | # | ||
818 | # CONFIG_MFD_CORE is not set | ||
819 | # CONFIG_MFD_SM501 is not set | ||
820 | # CONFIG_HTC_PASIC3 is not set | ||
821 | |||
822 | # | ||
823 | # Multimedia devices | ||
824 | # | ||
825 | |||
826 | # | ||
827 | # Multimedia core support | ||
828 | # | ||
829 | # CONFIG_VIDEO_DEV is not set | ||
830 | # CONFIG_DVB_CORE is not set | ||
831 | # CONFIG_VIDEO_MEDIA is not set | ||
832 | |||
833 | # | ||
834 | # Multimedia drivers | ||
835 | # | ||
836 | # CONFIG_DAB is not set | ||
837 | |||
838 | # | ||
839 | # Graphics support | ||
840 | # | ||
841 | # CONFIG_VGASTATE is not set | ||
842 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
843 | CONFIG_FB=y | ||
844 | # CONFIG_FIRMWARE_EDID is not set | ||
845 | # CONFIG_FB_DDC is not set | ||
846 | CONFIG_FB_CFB_FILLRECT=y | ||
847 | CONFIG_FB_CFB_COPYAREA=y | ||
848 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
849 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
850 | # CONFIG_FB_SYS_FILLRECT is not set | ||
851 | # CONFIG_FB_SYS_COPYAREA is not set | ||
852 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
853 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
854 | # CONFIG_FB_SYS_FOPS is not set | ||
855 | # CONFIG_FB_SVGALIB is not set | ||
856 | # CONFIG_FB_MACMODES is not set | ||
857 | # CONFIG_FB_BACKLIGHT is not set | ||
858 | # CONFIG_FB_MODE_HELPERS is not set | ||
859 | # CONFIG_FB_TILEBLITTING is not set | ||
860 | |||
861 | # | ||
862 | # Frame buffer hardware drivers | ||
863 | # | ||
864 | # CONFIG_FB_S1D13XXX is not set | ||
865 | CONFIG_FB_ATMEL=y | ||
866 | # CONFIG_FB_VIRTUAL is not set | ||
867 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
868 | CONFIG_LCD_CLASS_DEVICE=y | ||
869 | # CONFIG_LCD_LTV350QV is not set | ||
870 | # CONFIG_LCD_ILI9320 is not set | ||
871 | # CONFIG_LCD_VGG2432A4 is not set | ||
872 | # CONFIG_LCD_PLATFORM is not set | ||
873 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
874 | CONFIG_BACKLIGHT_ATMEL_LCDC=y | ||
875 | # CONFIG_BACKLIGHT_ATMEL_PWM is not set | ||
876 | # CONFIG_BACKLIGHT_CORGI is not set | ||
877 | |||
878 | # | ||
879 | # Display device support | ||
880 | # | ||
881 | # CONFIG_DISPLAY_SUPPORT is not set | ||
882 | |||
883 | # | ||
884 | # Console display driver support | ||
885 | # | ||
886 | # CONFIG_VGA_CONSOLE is not set | ||
887 | CONFIG_DUMMY_CONSOLE=y | ||
888 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
889 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
890 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
891 | # CONFIG_FONTS is not set | ||
892 | CONFIG_FONT_8x8=y | ||
893 | CONFIG_FONT_8x16=y | ||
894 | CONFIG_LOGO=y | ||
895 | CONFIG_LOGO_LINUX_MONO=y | ||
896 | CONFIG_LOGO_LINUX_VGA16=y | ||
897 | CONFIG_LOGO_LINUX_CLUT224=y | ||
898 | # CONFIG_SOUND is not set | ||
899 | CONFIG_HID_SUPPORT=y | ||
900 | CONFIG_HID=y | ||
901 | CONFIG_HID_DEBUG=y | ||
902 | # CONFIG_HIDRAW is not set | ||
903 | |||
904 | # | ||
905 | # USB Input Devices | ||
906 | # | ||
907 | CONFIG_USB_HID=y | ||
908 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
909 | # CONFIG_HID_FF is not set | ||
910 | # CONFIG_USB_HIDDEV is not set | ||
911 | CONFIG_USB_SUPPORT=y | ||
912 | CONFIG_USB_ARCH_HAS_HCD=y | ||
913 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
914 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
915 | CONFIG_USB=y | ||
916 | # CONFIG_USB_DEBUG is not set | ||
917 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
918 | |||
919 | # | ||
920 | # Miscellaneous USB options | ||
921 | # | ||
922 | CONFIG_USB_DEVICEFS=y | ||
923 | CONFIG_USB_DEVICE_CLASS=y | ||
924 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
925 | # CONFIG_USB_OTG is not set | ||
926 | |||
927 | # | ||
928 | # USB Host Controller Drivers | ||
929 | # | ||
930 | # CONFIG_USB_C67X00_HCD is not set | ||
931 | # CONFIG_USB_ISP116X_HCD is not set | ||
932 | # CONFIG_USB_ISP1760_HCD is not set | ||
933 | CONFIG_USB_OHCI_HCD=y | ||
934 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | ||
935 | # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set | ||
936 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
937 | # CONFIG_USB_SL811_HCD is not set | ||
938 | # CONFIG_USB_R8A66597_HCD is not set | ||
939 | |||
940 | # | ||
941 | # USB Device Class drivers | ||
942 | # | ||
943 | # CONFIG_USB_ACM is not set | ||
944 | # CONFIG_USB_PRINTER is not set | ||
945 | # CONFIG_USB_WDM is not set | ||
946 | |||
947 | # | ||
948 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
949 | # | ||
950 | |||
951 | # | ||
952 | # may also be needed; see USB_STORAGE Help for more information | ||
953 | # | ||
954 | CONFIG_USB_STORAGE=y | ||
955 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
956 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
957 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
958 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
959 | # CONFIG_USB_STORAGE_DPCM is not set | ||
960 | # CONFIG_USB_STORAGE_USBAT is not set | ||
961 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
962 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
963 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
964 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
965 | # CONFIG_USB_STORAGE_ONETOUCH is not set | ||
966 | # CONFIG_USB_STORAGE_KARMA is not set | ||
967 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
968 | # CONFIG_USB_LIBUSUAL is not set | ||
969 | |||
970 | # | ||
971 | # USB Imaging devices | ||
972 | # | ||
973 | # CONFIG_USB_MDC800 is not set | ||
974 | # CONFIG_USB_MICROTEK is not set | ||
975 | CONFIG_USB_MON=y | ||
976 | |||
977 | # | ||
978 | # USB port drivers | ||
979 | # | ||
980 | # CONFIG_USB_SERIAL is not set | ||
981 | |||
982 | # | ||
983 | # USB Miscellaneous drivers | ||
984 | # | ||
985 | # CONFIG_USB_EMI62 is not set | ||
986 | # CONFIG_USB_EMI26 is not set | ||
987 | # CONFIG_USB_ADUTUX is not set | ||
988 | # CONFIG_USB_AUERSWALD is not set | ||
989 | # CONFIG_USB_RIO500 is not set | ||
990 | # CONFIG_USB_LEGOTOWER is not set | ||
991 | # CONFIG_USB_LCD is not set | ||
992 | # CONFIG_USB_BERRY_CHARGE is not set | ||
993 | # CONFIG_USB_LED is not set | ||
994 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
995 | # CONFIG_USB_CYTHERM is not set | ||
996 | # CONFIG_USB_PHIDGET is not set | ||
997 | # CONFIG_USB_IDMOUSE is not set | ||
998 | # CONFIG_USB_FTDI_ELAN is not set | ||
999 | # CONFIG_USB_APPLEDISPLAY is not set | ||
1000 | # CONFIG_USB_LD is not set | ||
1001 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1002 | # CONFIG_USB_IOWARRIOR is not set | ||
1003 | # CONFIG_USB_TEST is not set | ||
1004 | # CONFIG_USB_ISIGHTFW is not set | ||
1005 | # CONFIG_USB_GADGET is not set | ||
1006 | CONFIG_MMC=y | ||
1007 | # CONFIG_MMC_DEBUG is not set | ||
1008 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
1009 | |||
1010 | # | ||
1011 | # MMC/SD Card Drivers | ||
1012 | # | ||
1013 | CONFIG_MMC_BLOCK=y | ||
1014 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
1015 | CONFIG_SDIO_UART=y | ||
1016 | # CONFIG_MMC_TEST is not set | ||
1017 | |||
1018 | # | ||
1019 | # MMC/SD Host Controller Drivers | ||
1020 | # | ||
1021 | # CONFIG_MMC_SDHCI is not set | ||
1022 | CONFIG_MMC_AT91=y | ||
1023 | # CONFIG_MMC_SPI is not set | ||
1024 | # CONFIG_NEW_LEDS is not set | ||
1025 | CONFIG_RTC_LIB=y | ||
1026 | # CONFIG_RTC_CLASS is not set | ||
1027 | # CONFIG_DMADEVICES is not set | ||
1028 | # CONFIG_UIO is not set | ||
1029 | |||
1030 | # | ||
1031 | # File systems | ||
1032 | # | ||
1033 | CONFIG_EXT2_FS=y | ||
1034 | # CONFIG_EXT2_FS_XATTR is not set | ||
1035 | # CONFIG_EXT2_FS_XIP is not set | ||
1036 | # CONFIG_EXT3_FS is not set | ||
1037 | # CONFIG_EXT4DEV_FS is not set | ||
1038 | # CONFIG_REISERFS_FS is not set | ||
1039 | # CONFIG_JFS_FS is not set | ||
1040 | # CONFIG_FS_POSIX_ACL is not set | ||
1041 | # CONFIG_XFS_FS is not set | ||
1042 | # CONFIG_OCFS2_FS is not set | ||
1043 | # CONFIG_DNOTIFY is not set | ||
1044 | # CONFIG_INOTIFY is not set | ||
1045 | # CONFIG_QUOTA is not set | ||
1046 | CONFIG_AUTOFS_FS=y | ||
1047 | # CONFIG_AUTOFS4_FS is not set | ||
1048 | # CONFIG_FUSE_FS is not set | ||
1049 | |||
1050 | # | ||
1051 | # CD-ROM/DVD Filesystems | ||
1052 | # | ||
1053 | # CONFIG_ISO9660_FS is not set | ||
1054 | # CONFIG_UDF_FS is not set | ||
1055 | |||
1056 | # | ||
1057 | # DOS/FAT/NT Filesystems | ||
1058 | # | ||
1059 | CONFIG_FAT_FS=y | ||
1060 | # CONFIG_MSDOS_FS is not set | ||
1061 | CONFIG_VFAT_FS=y | ||
1062 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1063 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1064 | # CONFIG_NTFS_FS is not set | ||
1065 | |||
1066 | # | ||
1067 | # Pseudo filesystems | ||
1068 | # | ||
1069 | CONFIG_PROC_FS=y | ||
1070 | CONFIG_PROC_SYSCTL=y | ||
1071 | CONFIG_SYSFS=y | ||
1072 | CONFIG_TMPFS=y | ||
1073 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1074 | # CONFIG_HUGETLB_PAGE is not set | ||
1075 | # CONFIG_CONFIGFS_FS is not set | ||
1076 | |||
1077 | # | ||
1078 | # Miscellaneous filesystems | ||
1079 | # | ||
1080 | # CONFIG_ADFS_FS is not set | ||
1081 | # CONFIG_AFFS_FS is not set | ||
1082 | # CONFIG_HFS_FS is not set | ||
1083 | # CONFIG_HFSPLUS_FS is not set | ||
1084 | # CONFIG_BEFS_FS is not set | ||
1085 | # CONFIG_BFS_FS is not set | ||
1086 | # CONFIG_EFS_FS is not set | ||
1087 | CONFIG_JFFS2_FS=y | ||
1088 | CONFIG_JFFS2_FS_DEBUG=0 | ||
1089 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
1090 | CONFIG_JFFS2_FS_WBUF_VERIFY=y | ||
1091 | # CONFIG_JFFS2_SUMMARY is not set | ||
1092 | # CONFIG_JFFS2_FS_XATTR is not set | ||
1093 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
1094 | CONFIG_JFFS2_ZLIB=y | ||
1095 | # CONFIG_JFFS2_LZO is not set | ||
1096 | CONFIG_JFFS2_RTIME=y | ||
1097 | # CONFIG_JFFS2_RUBIN is not set | ||
1098 | # CONFIG_CRAMFS is not set | ||
1099 | # CONFIG_VXFS_FS is not set | ||
1100 | # CONFIG_MINIX_FS is not set | ||
1101 | # CONFIG_OMFS_FS is not set | ||
1102 | # CONFIG_HPFS_FS is not set | ||
1103 | # CONFIG_QNX4FS_FS is not set | ||
1104 | # CONFIG_ROMFS_FS is not set | ||
1105 | # CONFIG_SYSV_FS is not set | ||
1106 | # CONFIG_UFS_FS is not set | ||
1107 | CONFIG_NETWORK_FILESYSTEMS=y | ||
1108 | CONFIG_NFS_FS=y | ||
1109 | # CONFIG_NFS_V3 is not set | ||
1110 | # CONFIG_NFS_V4 is not set | ||
1111 | CONFIG_ROOT_NFS=y | ||
1112 | # CONFIG_NFSD is not set | ||
1113 | CONFIG_LOCKD=y | ||
1114 | CONFIG_NFS_COMMON=y | ||
1115 | CONFIG_SUNRPC=y | ||
1116 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
1117 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1118 | # CONFIG_SMB_FS is not set | ||
1119 | # CONFIG_CIFS is not set | ||
1120 | # CONFIG_NCP_FS is not set | ||
1121 | # CONFIG_CODA_FS is not set | ||
1122 | # CONFIG_AFS_FS is not set | ||
1123 | |||
1124 | # | ||
1125 | # Partition Types | ||
1126 | # | ||
1127 | # CONFIG_PARTITION_ADVANCED is not set | ||
1128 | CONFIG_MSDOS_PARTITION=y | ||
1129 | CONFIG_NLS=y | ||
1130 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1131 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1132 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1133 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1134 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1135 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1136 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1137 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1138 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1139 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1140 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1141 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1142 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1143 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1144 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1145 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1146 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1147 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1148 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1149 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1150 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1151 | # CONFIG_NLS_ISO8859_8 is not set | ||
1152 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1153 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1154 | # CONFIG_NLS_ASCII is not set | ||
1155 | # CONFIG_NLS_ISO8859_1 is not set | ||
1156 | # CONFIG_NLS_ISO8859_2 is not set | ||
1157 | # CONFIG_NLS_ISO8859_3 is not set | ||
1158 | # CONFIG_NLS_ISO8859_4 is not set | ||
1159 | # CONFIG_NLS_ISO8859_5 is not set | ||
1160 | # CONFIG_NLS_ISO8859_6 is not set | ||
1161 | # CONFIG_NLS_ISO8859_7 is not set | ||
1162 | # CONFIG_NLS_ISO8859_9 is not set | ||
1163 | # CONFIG_NLS_ISO8859_13 is not set | ||
1164 | # CONFIG_NLS_ISO8859_14 is not set | ||
1165 | # CONFIG_NLS_ISO8859_15 is not set | ||
1166 | # CONFIG_NLS_KOI8_R is not set | ||
1167 | # CONFIG_NLS_KOI8_U is not set | ||
1168 | # CONFIG_NLS_UTF8 is not set | ||
1169 | # CONFIG_DLM is not set | ||
1170 | |||
1171 | # | ||
1172 | # Kernel hacking | ||
1173 | # | ||
1174 | # CONFIG_PRINTK_TIME is not set | ||
1175 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
1176 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
1177 | CONFIG_FRAME_WARN=1024 | ||
1178 | # CONFIG_MAGIC_SYSRQ is not set | ||
1179 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1180 | # CONFIG_DEBUG_FS is not set | ||
1181 | # CONFIG_HEADERS_CHECK is not set | ||
1182 | # CONFIG_DEBUG_KERNEL is not set | ||
1183 | # CONFIG_SLUB_DEBUG_ON is not set | ||
1184 | # CONFIG_SLUB_STATS is not set | ||
1185 | CONFIG_DEBUG_BUGVERBOSE=y | ||
1186 | CONFIG_DEBUG_MEMORY_INIT=y | ||
1187 | CONFIG_FRAME_POINTER=y | ||
1188 | # CONFIG_LATENCYTOP is not set | ||
1189 | CONFIG_HAVE_FTRACE=y | ||
1190 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1191 | # CONFIG_FTRACE is not set | ||
1192 | # CONFIG_IRQSOFF_TRACER is not set | ||
1193 | # CONFIG_SCHED_TRACER is not set | ||
1194 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
1195 | # CONFIG_SAMPLES is not set | ||
1196 | CONFIG_HAVE_ARCH_KGDB=y | ||
1197 | # CONFIG_DEBUG_USER is not set | ||
1198 | |||
1199 | # | ||
1200 | # Security options | ||
1201 | # | ||
1202 | # CONFIG_KEYS is not set | ||
1203 | # CONFIG_SECURITY is not set | ||
1204 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1205 | CONFIG_CRYPTO=y | ||
1206 | |||
1207 | # | ||
1208 | # Crypto core or helper | ||
1209 | # | ||
1210 | # CONFIG_CRYPTO_MANAGER is not set | ||
1211 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1212 | # CONFIG_CRYPTO_NULL is not set | ||
1213 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1214 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1215 | # CONFIG_CRYPTO_TEST is not set | ||
1216 | |||
1217 | # | ||
1218 | # Authenticated Encryption with Associated Data | ||
1219 | # | ||
1220 | # CONFIG_CRYPTO_CCM is not set | ||
1221 | # CONFIG_CRYPTO_GCM is not set | ||
1222 | # CONFIG_CRYPTO_SEQIV is not set | ||
1223 | |||
1224 | # | ||
1225 | # Block modes | ||
1226 | # | ||
1227 | # CONFIG_CRYPTO_CBC is not set | ||
1228 | # CONFIG_CRYPTO_CTR is not set | ||
1229 | # CONFIG_CRYPTO_CTS is not set | ||
1230 | # CONFIG_CRYPTO_ECB is not set | ||
1231 | # CONFIG_CRYPTO_LRW is not set | ||
1232 | # CONFIG_CRYPTO_PCBC is not set | ||
1233 | # CONFIG_CRYPTO_XTS is not set | ||
1234 | |||
1235 | # | ||
1236 | # Hash modes | ||
1237 | # | ||
1238 | # CONFIG_CRYPTO_HMAC is not set | ||
1239 | # CONFIG_CRYPTO_XCBC is not set | ||
1240 | |||
1241 | # | ||
1242 | # Digest | ||
1243 | # | ||
1244 | # CONFIG_CRYPTO_CRC32C is not set | ||
1245 | # CONFIG_CRYPTO_MD4 is not set | ||
1246 | # CONFIG_CRYPTO_MD5 is not set | ||
1247 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1248 | # CONFIG_CRYPTO_RMD128 is not set | ||
1249 | # CONFIG_CRYPTO_RMD160 is not set | ||
1250 | # CONFIG_CRYPTO_RMD256 is not set | ||
1251 | # CONFIG_CRYPTO_RMD320 is not set | ||
1252 | # CONFIG_CRYPTO_SHA1 is not set | ||
1253 | # CONFIG_CRYPTO_SHA256 is not set | ||
1254 | # CONFIG_CRYPTO_SHA512 is not set | ||
1255 | # CONFIG_CRYPTO_TGR192 is not set | ||
1256 | # CONFIG_CRYPTO_WP512 is not set | ||
1257 | |||
1258 | # | ||
1259 | # Ciphers | ||
1260 | # | ||
1261 | # CONFIG_CRYPTO_AES is not set | ||
1262 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1263 | # CONFIG_CRYPTO_ARC4 is not set | ||
1264 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1265 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1266 | # CONFIG_CRYPTO_CAST5 is not set | ||
1267 | # CONFIG_CRYPTO_CAST6 is not set | ||
1268 | # CONFIG_CRYPTO_DES is not set | ||
1269 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1270 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1271 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1272 | # CONFIG_CRYPTO_SEED is not set | ||
1273 | # CONFIG_CRYPTO_SERPENT is not set | ||
1274 | # CONFIG_CRYPTO_TEA is not set | ||
1275 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1276 | |||
1277 | # | ||
1278 | # Compression | ||
1279 | # | ||
1280 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1281 | # CONFIG_CRYPTO_LZO is not set | ||
1282 | # CONFIG_CRYPTO_HW is not set | ||
1283 | |||
1284 | # | ||
1285 | # Library routines | ||
1286 | # | ||
1287 | CONFIG_BITREVERSE=y | ||
1288 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
1289 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
1290 | # CONFIG_CRC_CCITT is not set | ||
1291 | # CONFIG_CRC16 is not set | ||
1292 | # CONFIG_CRC_T10DIF is not set | ||
1293 | # CONFIG_CRC_ITU_T is not set | ||
1294 | CONFIG_CRC32=y | ||
1295 | # CONFIG_CRC7 is not set | ||
1296 | # CONFIG_LIBCRC32C is not set | ||
1297 | CONFIG_ZLIB_INFLATE=y | ||
1298 | CONFIG_ZLIB_DEFLATE=y | ||
1299 | CONFIG_PLIST=y | ||
1300 | CONFIG_HAS_IOMEM=y | ||
1301 | CONFIG_HAS_IOPORT=y | ||
1302 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/netx_defconfig b/arch/arm/configs/netx_defconfig index 0884f2370c3a..61d0fc5b2417 100644 --- a/arch/arm/configs/netx_defconfig +++ b/arch/arm/configs/netx_defconfig | |||
@@ -728,9 +728,9 @@ CONFIG_RTC_CLASS=m | |||
728 | # | 728 | # |
729 | # RTC interfaces | 729 | # RTC interfaces |
730 | # | 730 | # |
731 | CONFIG_RTC_INTF_SYSFS=m | 731 | CONFIG_RTC_INTF_SYSFS=y |
732 | CONFIG_RTC_INTF_PROC=m | 732 | CONFIG_RTC_INTF_PROC=y |
733 | CONFIG_RTC_INTF_DEV=m | 733 | CONFIG_RTC_INTF_DEV=y |
734 | 734 | ||
735 | # | 735 | # |
736 | # RTC drivers | 736 | # RTC drivers |
diff --git a/arch/arm/configs/omap3_pandora_defconfig b/arch/arm/configs/omap3_pandora_defconfig new file mode 100644 index 000000000000..09543f4de5bc --- /dev/null +++ b/arch/arm/configs/omap3_pandora_defconfig | |||
@@ -0,0 +1,1409 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.28-rc7 | ||
4 | # Fri Dec 5 11:54:09 2008 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
11 | CONFIG_MMU=y | ||
12 | # CONFIG_NO_IOPORT is not set | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
25 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
26 | CONFIG_VECTORS_BASE=0xffff0000 | ||
27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
28 | |||
29 | # | ||
30 | # General setup | ||
31 | # | ||
32 | CONFIG_EXPERIMENTAL=y | ||
33 | CONFIG_BROKEN_ON_SMP=y | ||
34 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
35 | CONFIG_LOCALVERSION="" | ||
36 | CONFIG_LOCALVERSION_AUTO=y | ||
37 | CONFIG_SWAP=y | ||
38 | CONFIG_SYSVIPC=y | ||
39 | CONFIG_SYSVIPC_SYSCTL=y | ||
40 | # CONFIG_POSIX_MQUEUE is not set | ||
41 | CONFIG_BSD_PROCESS_ACCT=y | ||
42 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
43 | # CONFIG_TASKSTATS is not set | ||
44 | # CONFIG_AUDIT is not set | ||
45 | CONFIG_IKCONFIG=y | ||
46 | CONFIG_IKCONFIG_PROC=y | ||
47 | CONFIG_LOG_BUF_SHIFT=14 | ||
48 | # CONFIG_CGROUPS is not set | ||
49 | CONFIG_GROUP_SCHED=y | ||
50 | CONFIG_FAIR_GROUP_SCHED=y | ||
51 | # CONFIG_RT_GROUP_SCHED is not set | ||
52 | CONFIG_USER_SCHED=y | ||
53 | # CONFIG_CGROUP_SCHED is not set | ||
54 | CONFIG_SYSFS_DEPRECATED=y | ||
55 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
56 | # CONFIG_RELAY is not set | ||
57 | # CONFIG_NAMESPACES is not set | ||
58 | CONFIG_BLK_DEV_INITRD=y | ||
59 | CONFIG_INITRAMFS_SOURCE="" | ||
60 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
61 | CONFIG_SYSCTL=y | ||
62 | CONFIG_EMBEDDED=y | ||
63 | CONFIG_UID16=y | ||
64 | # CONFIG_SYSCTL_SYSCALL is not set | ||
65 | CONFIG_KALLSYMS=y | ||
66 | # CONFIG_KALLSYMS_ALL is not set | ||
67 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
68 | CONFIG_HOTPLUG=y | ||
69 | CONFIG_PRINTK=y | ||
70 | CONFIG_BUG=y | ||
71 | CONFIG_ELF_CORE=y | ||
72 | CONFIG_COMPAT_BRK=y | ||
73 | CONFIG_BASE_FULL=y | ||
74 | CONFIG_FUTEX=y | ||
75 | CONFIG_ANON_INODES=y | ||
76 | CONFIG_EPOLL=y | ||
77 | CONFIG_SIGNALFD=y | ||
78 | CONFIG_TIMERFD=y | ||
79 | CONFIG_EVENTFD=y | ||
80 | CONFIG_SHMEM=y | ||
81 | CONFIG_AIO=y | ||
82 | CONFIG_VM_EVENT_COUNTERS=y | ||
83 | CONFIG_SLAB=y | ||
84 | # CONFIG_SLUB is not set | ||
85 | # CONFIG_SLOB is not set | ||
86 | # CONFIG_PROFILING is not set | ||
87 | # CONFIG_MARKERS is not set | ||
88 | CONFIG_HAVE_OPROFILE=y | ||
89 | # CONFIG_KPROBES is not set | ||
90 | CONFIG_HAVE_KPROBES=y | ||
91 | CONFIG_HAVE_KRETPROBES=y | ||
92 | CONFIG_HAVE_CLK=y | ||
93 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
94 | CONFIG_SLABINFO=y | ||
95 | CONFIG_RT_MUTEXES=y | ||
96 | # CONFIG_TINY_SHMEM is not set | ||
97 | CONFIG_BASE_SMALL=0 | ||
98 | CONFIG_MODULES=y | ||
99 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
100 | CONFIG_MODULE_UNLOAD=y | ||
101 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
102 | CONFIG_MODVERSIONS=y | ||
103 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
104 | CONFIG_KMOD=y | ||
105 | CONFIG_BLOCK=y | ||
106 | # CONFIG_LBD is not set | ||
107 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
108 | # CONFIG_LSF is not set | ||
109 | # CONFIG_BLK_DEV_BSG is not set | ||
110 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
111 | |||
112 | # | ||
113 | # IO Schedulers | ||
114 | # | ||
115 | CONFIG_IOSCHED_NOOP=y | ||
116 | CONFIG_IOSCHED_AS=y | ||
117 | CONFIG_IOSCHED_DEADLINE=y | ||
118 | CONFIG_IOSCHED_CFQ=y | ||
119 | CONFIG_DEFAULT_AS=y | ||
120 | # CONFIG_DEFAULT_DEADLINE is not set | ||
121 | # CONFIG_DEFAULT_CFQ is not set | ||
122 | # CONFIG_DEFAULT_NOOP is not set | ||
123 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
124 | CONFIG_CLASSIC_RCU=y | ||
125 | # CONFIG_FREEZER is not set | ||
126 | |||
127 | # | ||
128 | # System Type | ||
129 | # | ||
130 | # CONFIG_ARCH_AAEC2000 is not set | ||
131 | # CONFIG_ARCH_INTEGRATOR is not set | ||
132 | # CONFIG_ARCH_REALVIEW is not set | ||
133 | # CONFIG_ARCH_VERSATILE is not set | ||
134 | # CONFIG_ARCH_AT91 is not set | ||
135 | # CONFIG_ARCH_CLPS7500 is not set | ||
136 | # CONFIG_ARCH_CLPS711X is not set | ||
137 | # CONFIG_ARCH_EBSA110 is not set | ||
138 | # CONFIG_ARCH_EP93XX is not set | ||
139 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
140 | # CONFIG_ARCH_NETX is not set | ||
141 | # CONFIG_ARCH_H720X is not set | ||
142 | # CONFIG_ARCH_IMX is not set | ||
143 | # CONFIG_ARCH_IOP13XX is not set | ||
144 | # CONFIG_ARCH_IOP32X is not set | ||
145 | # CONFIG_ARCH_IOP33X is not set | ||
146 | # CONFIG_ARCH_IXP23XX is not set | ||
147 | # CONFIG_ARCH_IXP2000 is not set | ||
148 | # CONFIG_ARCH_IXP4XX is not set | ||
149 | # CONFIG_ARCH_L7200 is not set | ||
150 | # CONFIG_ARCH_KIRKWOOD is not set | ||
151 | # CONFIG_ARCH_KS8695 is not set | ||
152 | # CONFIG_ARCH_NS9XXX is not set | ||
153 | # CONFIG_ARCH_LOKI is not set | ||
154 | # CONFIG_ARCH_MV78XX0 is not set | ||
155 | # CONFIG_ARCH_MXC is not set | ||
156 | # CONFIG_ARCH_ORION5X is not set | ||
157 | # CONFIG_ARCH_PNX4008 is not set | ||
158 | # CONFIG_ARCH_PXA is not set | ||
159 | # CONFIG_ARCH_RPC is not set | ||
160 | # CONFIG_ARCH_SA1100 is not set | ||
161 | # CONFIG_ARCH_S3C2410 is not set | ||
162 | # CONFIG_ARCH_SHARK is not set | ||
163 | # CONFIG_ARCH_LH7A40X is not set | ||
164 | # CONFIG_ARCH_DAVINCI is not set | ||
165 | CONFIG_ARCH_OMAP=y | ||
166 | # CONFIG_ARCH_MSM is not set | ||
167 | |||
168 | # | ||
169 | # TI OMAP Implementations | ||
170 | # | ||
171 | CONFIG_ARCH_OMAP_OTG=y | ||
172 | # CONFIG_ARCH_OMAP1 is not set | ||
173 | # CONFIG_ARCH_OMAP2 is not set | ||
174 | CONFIG_ARCH_OMAP3=y | ||
175 | |||
176 | # | ||
177 | # OMAP Feature Selections | ||
178 | # | ||
179 | # CONFIG_OMAP_DEBUG_POWERDOMAIN is not set | ||
180 | # CONFIG_OMAP_DEBUG_CLOCKDOMAIN is not set | ||
181 | # CONFIG_OMAP_RESET_CLOCKS is not set | ||
182 | # CONFIG_OMAP_MUX is not set | ||
183 | CONFIG_OMAP_MCBSP=y | ||
184 | # CONFIG_OMAP_MPU_TIMER is not set | ||
185 | CONFIG_OMAP_32K_TIMER=y | ||
186 | CONFIG_OMAP_32K_TIMER_HZ=128 | ||
187 | CONFIG_OMAP_DM_TIMER=y | ||
188 | # CONFIG_OMAP_LL_DEBUG_UART1 is not set | ||
189 | # CONFIG_OMAP_LL_DEBUG_UART2 is not set | ||
190 | CONFIG_OMAP_LL_DEBUG_UART3=y | ||
191 | CONFIG_ARCH_OMAP34XX=y | ||
192 | CONFIG_ARCH_OMAP3430=y | ||
193 | |||
194 | # | ||
195 | # OMAP Board Type | ||
196 | # | ||
197 | # CONFIG_MACH_OMAP3_BEAGLE is not set | ||
198 | # CONFIG_MACH_OMAP_LDP is not set | ||
199 | # CONFIG_MACH_OVERO is not set | ||
200 | CONFIG_MACH_OMAP3_PANDORA=y | ||
201 | |||
202 | # | ||
203 | # Boot options | ||
204 | # | ||
205 | |||
206 | # | ||
207 | # Power management | ||
208 | # | ||
209 | |||
210 | # | ||
211 | # Processor Type | ||
212 | # | ||
213 | CONFIG_CPU_32=y | ||
214 | CONFIG_CPU_32v6K=y | ||
215 | CONFIG_CPU_V7=y | ||
216 | CONFIG_CPU_32v7=y | ||
217 | CONFIG_CPU_ABRT_EV7=y | ||
218 | CONFIG_CPU_PABRT_IFAR=y | ||
219 | CONFIG_CPU_CACHE_V7=y | ||
220 | CONFIG_CPU_CACHE_VIPT=y | ||
221 | CONFIG_CPU_COPY_V6=y | ||
222 | CONFIG_CPU_TLB_V7=y | ||
223 | CONFIG_CPU_HAS_ASID=y | ||
224 | CONFIG_CPU_CP15=y | ||
225 | CONFIG_CPU_CP15_MMU=y | ||
226 | |||
227 | # | ||
228 | # Processor Features | ||
229 | # | ||
230 | CONFIG_ARM_THUMB=y | ||
231 | CONFIG_ARM_THUMBEE=y | ||
232 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
233 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
234 | # CONFIG_CPU_BPREDICT_DISABLE is not set | ||
235 | CONFIG_HAS_TLS_REG=y | ||
236 | # CONFIG_OUTER_CACHE is not set | ||
237 | |||
238 | # | ||
239 | # Bus support | ||
240 | # | ||
241 | # CONFIG_PCI_SYSCALL is not set | ||
242 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
243 | # CONFIG_PCCARD is not set | ||
244 | |||
245 | # | ||
246 | # Kernel Features | ||
247 | # | ||
248 | CONFIG_TICK_ONESHOT=y | ||
249 | CONFIG_NO_HZ=y | ||
250 | CONFIG_HIGH_RES_TIMERS=y | ||
251 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
252 | CONFIG_VMSPLIT_3G=y | ||
253 | # CONFIG_VMSPLIT_2G is not set | ||
254 | # CONFIG_VMSPLIT_1G is not set | ||
255 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
256 | # CONFIG_PREEMPT is not set | ||
257 | CONFIG_HZ=128 | ||
258 | CONFIG_AEABI=y | ||
259 | CONFIG_OABI_COMPAT=y | ||
260 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
261 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
262 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
263 | CONFIG_SELECT_MEMORY_MODEL=y | ||
264 | CONFIG_FLATMEM_MANUAL=y | ||
265 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
266 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
267 | CONFIG_FLATMEM=y | ||
268 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
269 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
270 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
271 | # CONFIG_RESOURCES_64BIT is not set | ||
272 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
273 | CONFIG_ZONE_DMA_FLAG=0 | ||
274 | CONFIG_VIRT_TO_BUS=y | ||
275 | CONFIG_UNEVICTABLE_LRU=y | ||
276 | # CONFIG_LEDS is not set | ||
277 | CONFIG_ALIGNMENT_TRAP=y | ||
278 | |||
279 | # | ||
280 | # Boot options | ||
281 | # | ||
282 | CONFIG_ZBOOT_ROM_TEXT=0x0 | ||
283 | CONFIG_ZBOOT_ROM_BSS=0x0 | ||
284 | CONFIG_CMDLINE=" debug " | ||
285 | # CONFIG_XIP_KERNEL is not set | ||
286 | # CONFIG_KEXEC is not set | ||
287 | |||
288 | # | ||
289 | # CPU Power Management | ||
290 | # | ||
291 | # CONFIG_CPU_FREQ is not set | ||
292 | # CONFIG_CPU_IDLE is not set | ||
293 | |||
294 | # | ||
295 | # Floating point emulation | ||
296 | # | ||
297 | |||
298 | # | ||
299 | # At least one emulation must be selected | ||
300 | # | ||
301 | CONFIG_FPE_NWFPE=y | ||
302 | # CONFIG_FPE_NWFPE_XP is not set | ||
303 | # CONFIG_FPE_FASTFPE is not set | ||
304 | CONFIG_VFP=y | ||
305 | CONFIG_VFPv3=y | ||
306 | CONFIG_NEON=y | ||
307 | |||
308 | # | ||
309 | # Userspace binary formats | ||
310 | # | ||
311 | CONFIG_BINFMT_ELF=y | ||
312 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
313 | CONFIG_HAVE_AOUT=y | ||
314 | # CONFIG_BINFMT_AOUT is not set | ||
315 | CONFIG_BINFMT_MISC=y | ||
316 | |||
317 | # | ||
318 | # Power management options | ||
319 | # | ||
320 | # CONFIG_PM is not set | ||
321 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
322 | CONFIG_NET=y | ||
323 | |||
324 | # | ||
325 | # Networking options | ||
326 | # | ||
327 | CONFIG_PACKET=y | ||
328 | # CONFIG_PACKET_MMAP is not set | ||
329 | CONFIG_UNIX=y | ||
330 | CONFIG_XFRM=y | ||
331 | # CONFIG_XFRM_USER is not set | ||
332 | # CONFIG_XFRM_SUB_POLICY is not set | ||
333 | # CONFIG_XFRM_MIGRATE is not set | ||
334 | # CONFIG_XFRM_STATISTICS is not set | ||
335 | CONFIG_NET_KEY=y | ||
336 | # CONFIG_NET_KEY_MIGRATE is not set | ||
337 | CONFIG_INET=y | ||
338 | # CONFIG_IP_MULTICAST is not set | ||
339 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
340 | CONFIG_IP_FIB_HASH=y | ||
341 | CONFIG_IP_PNP=y | ||
342 | CONFIG_IP_PNP_DHCP=y | ||
343 | CONFIG_IP_PNP_BOOTP=y | ||
344 | CONFIG_IP_PNP_RARP=y | ||
345 | # CONFIG_NET_IPIP is not set | ||
346 | # CONFIG_NET_IPGRE is not set | ||
347 | # CONFIG_ARPD is not set | ||
348 | # CONFIG_SYN_COOKIES is not set | ||
349 | # CONFIG_INET_AH is not set | ||
350 | # CONFIG_INET_ESP is not set | ||
351 | # CONFIG_INET_IPCOMP is not set | ||
352 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
353 | # CONFIG_INET_TUNNEL is not set | ||
354 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
355 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
356 | CONFIG_INET_XFRM_MODE_BEET=y | ||
357 | # CONFIG_INET_LRO is not set | ||
358 | CONFIG_INET_DIAG=y | ||
359 | CONFIG_INET_TCP_DIAG=y | ||
360 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
361 | CONFIG_TCP_CONG_CUBIC=y | ||
362 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
363 | # CONFIG_TCP_MD5SIG is not set | ||
364 | # CONFIG_IPV6 is not set | ||
365 | # CONFIG_NETWORK_SECMARK is not set | ||
366 | # CONFIG_NETFILTER is not set | ||
367 | # CONFIG_IP_DCCP is not set | ||
368 | # CONFIG_IP_SCTP is not set | ||
369 | # CONFIG_TIPC is not set | ||
370 | # CONFIG_ATM is not set | ||
371 | # CONFIG_BRIDGE is not set | ||
372 | # CONFIG_NET_DSA is not set | ||
373 | # CONFIG_VLAN_8021Q is not set | ||
374 | # CONFIG_DECNET is not set | ||
375 | # CONFIG_LLC2 is not set | ||
376 | # CONFIG_IPX is not set | ||
377 | # CONFIG_ATALK is not set | ||
378 | # CONFIG_X25 is not set | ||
379 | # CONFIG_LAPB is not set | ||
380 | # CONFIG_ECONET is not set | ||
381 | # CONFIG_WAN_ROUTER is not set | ||
382 | # CONFIG_NET_SCHED is not set | ||
383 | |||
384 | # | ||
385 | # Network testing | ||
386 | # | ||
387 | # CONFIG_NET_PKTGEN is not set | ||
388 | # CONFIG_HAMRADIO is not set | ||
389 | # CONFIG_CAN is not set | ||
390 | # CONFIG_IRDA is not set | ||
391 | # CONFIG_BT is not set | ||
392 | # CONFIG_AF_RXRPC is not set | ||
393 | # CONFIG_PHONET is not set | ||
394 | # CONFIG_WIRELESS is not set | ||
395 | # CONFIG_RFKILL is not set | ||
396 | # CONFIG_NET_9P is not set | ||
397 | |||
398 | # | ||
399 | # Device Drivers | ||
400 | # | ||
401 | |||
402 | # | ||
403 | # Generic Driver Options | ||
404 | # | ||
405 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
406 | CONFIG_STANDALONE=y | ||
407 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
408 | # CONFIG_FW_LOADER is not set | ||
409 | # CONFIG_DEBUG_DRIVER is not set | ||
410 | # CONFIG_DEBUG_DEVRES is not set | ||
411 | # CONFIG_SYS_HYPERVISOR is not set | ||
412 | # CONFIG_CONNECTOR is not set | ||
413 | CONFIG_MTD=y | ||
414 | # CONFIG_MTD_DEBUG is not set | ||
415 | # CONFIG_MTD_CONCAT is not set | ||
416 | CONFIG_MTD_PARTITIONS=y | ||
417 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
418 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
419 | # CONFIG_MTD_AFS_PARTS is not set | ||
420 | # CONFIG_MTD_AR7_PARTS is not set | ||
421 | |||
422 | # | ||
423 | # User Modules And Translation Layers | ||
424 | # | ||
425 | CONFIG_MTD_CHAR=y | ||
426 | CONFIG_MTD_BLKDEVS=y | ||
427 | CONFIG_MTD_BLOCK=y | ||
428 | # CONFIG_FTL is not set | ||
429 | # CONFIG_NFTL is not set | ||
430 | # CONFIG_INFTL is not set | ||
431 | # CONFIG_RFD_FTL is not set | ||
432 | # CONFIG_SSFDC is not set | ||
433 | # CONFIG_MTD_OOPS is not set | ||
434 | |||
435 | # | ||
436 | # RAM/ROM/Flash chip drivers | ||
437 | # | ||
438 | # CONFIG_MTD_CFI is not set | ||
439 | # CONFIG_MTD_JEDECPROBE is not set | ||
440 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
441 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
442 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
443 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
444 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
445 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
446 | CONFIG_MTD_CFI_I1=y | ||
447 | CONFIG_MTD_CFI_I2=y | ||
448 | # CONFIG_MTD_CFI_I4 is not set | ||
449 | # CONFIG_MTD_CFI_I8 is not set | ||
450 | # CONFIG_MTD_RAM is not set | ||
451 | # CONFIG_MTD_ROM is not set | ||
452 | # CONFIG_MTD_ABSENT is not set | ||
453 | |||
454 | # | ||
455 | # Mapping drivers for chip access | ||
456 | # | ||
457 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
458 | # CONFIG_MTD_PLATRAM is not set | ||
459 | |||
460 | # | ||
461 | # Self-contained MTD device drivers | ||
462 | # | ||
463 | # CONFIG_MTD_DATAFLASH is not set | ||
464 | # CONFIG_MTD_M25P80 is not set | ||
465 | # CONFIG_MTD_SLRAM is not set | ||
466 | # CONFIG_MTD_PHRAM is not set | ||
467 | # CONFIG_MTD_MTDRAM is not set | ||
468 | # CONFIG_MTD_BLOCK2MTD is not set | ||
469 | |||
470 | # | ||
471 | # Disk-On-Chip Device Drivers | ||
472 | # | ||
473 | # CONFIG_MTD_DOC2000 is not set | ||
474 | # CONFIG_MTD_DOC2001 is not set | ||
475 | # CONFIG_MTD_DOC2001PLUS is not set | ||
476 | CONFIG_MTD_NAND=y | ||
477 | # CONFIG_MTD_NAND_VERIFY_WRITE is not set | ||
478 | # CONFIG_MTD_NAND_ECC_SMC is not set | ||
479 | # CONFIG_MTD_NAND_MUSEUM_IDS is not set | ||
480 | # CONFIG_MTD_NAND_GPIO is not set | ||
481 | CONFIG_MTD_NAND_IDS=y | ||
482 | # CONFIG_MTD_NAND_DISKONCHIP is not set | ||
483 | # CONFIG_MTD_NAND_NANDSIM is not set | ||
484 | # CONFIG_MTD_NAND_PLATFORM is not set | ||
485 | # CONFIG_MTD_ALAUDA is not set | ||
486 | # CONFIG_MTD_ONENAND is not set | ||
487 | |||
488 | # | ||
489 | # UBI - Unsorted block images | ||
490 | # | ||
491 | # CONFIG_MTD_UBI is not set | ||
492 | # CONFIG_PARPORT is not set | ||
493 | CONFIG_BLK_DEV=y | ||
494 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
495 | CONFIG_BLK_DEV_LOOP=y | ||
496 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
497 | # CONFIG_BLK_DEV_NBD is not set | ||
498 | # CONFIG_BLK_DEV_UB is not set | ||
499 | CONFIG_BLK_DEV_RAM=y | ||
500 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
501 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
502 | # CONFIG_BLK_DEV_XIP is not set | ||
503 | # CONFIG_CDROM_PKTCDVD is not set | ||
504 | # CONFIG_ATA_OVER_ETH is not set | ||
505 | # CONFIG_MISC_DEVICES is not set | ||
506 | CONFIG_HAVE_IDE=y | ||
507 | # CONFIG_IDE is not set | ||
508 | |||
509 | # | ||
510 | # SCSI device support | ||
511 | # | ||
512 | # CONFIG_RAID_ATTRS is not set | ||
513 | CONFIG_SCSI=y | ||
514 | CONFIG_SCSI_DMA=y | ||
515 | # CONFIG_SCSI_TGT is not set | ||
516 | # CONFIG_SCSI_NETLINK is not set | ||
517 | CONFIG_SCSI_PROC_FS=y | ||
518 | |||
519 | # | ||
520 | # SCSI support type (disk, tape, CD-ROM) | ||
521 | # | ||
522 | CONFIG_BLK_DEV_SD=y | ||
523 | # CONFIG_CHR_DEV_ST is not set | ||
524 | # CONFIG_CHR_DEV_OSST is not set | ||
525 | # CONFIG_BLK_DEV_SR is not set | ||
526 | # CONFIG_CHR_DEV_SG is not set | ||
527 | # CONFIG_CHR_DEV_SCH is not set | ||
528 | |||
529 | # | ||
530 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
531 | # | ||
532 | # CONFIG_SCSI_MULTI_LUN is not set | ||
533 | # CONFIG_SCSI_CONSTANTS is not set | ||
534 | # CONFIG_SCSI_LOGGING is not set | ||
535 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
536 | CONFIG_SCSI_WAIT_SCAN=m | ||
537 | |||
538 | # | ||
539 | # SCSI Transports | ||
540 | # | ||
541 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
542 | # CONFIG_SCSI_FC_ATTRS is not set | ||
543 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
544 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
545 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
546 | CONFIG_SCSI_LOWLEVEL=y | ||
547 | # CONFIG_ISCSI_TCP is not set | ||
548 | # CONFIG_SCSI_DEBUG is not set | ||
549 | # CONFIG_SCSI_DH is not set | ||
550 | # CONFIG_ATA is not set | ||
551 | # CONFIG_MD is not set | ||
552 | CONFIG_NETDEVICES=y | ||
553 | # CONFIG_DUMMY is not set | ||
554 | # CONFIG_BONDING is not set | ||
555 | # CONFIG_MACVLAN is not set | ||
556 | # CONFIG_EQUALIZER is not set | ||
557 | # CONFIG_TUN is not set | ||
558 | # CONFIG_VETH is not set | ||
559 | # CONFIG_NET_ETHERNET is not set | ||
560 | # CONFIG_NETDEV_1000 is not set | ||
561 | # CONFIG_NETDEV_10000 is not set | ||
562 | |||
563 | # | ||
564 | # Wireless LAN | ||
565 | # | ||
566 | # CONFIG_WLAN_PRE80211 is not set | ||
567 | # CONFIG_WLAN_80211 is not set | ||
568 | # CONFIG_IWLWIFI_LEDS is not set | ||
569 | |||
570 | # | ||
571 | # USB Network Adapters | ||
572 | # | ||
573 | # CONFIG_USB_CATC is not set | ||
574 | # CONFIG_USB_KAWETH is not set | ||
575 | # CONFIG_USB_PEGASUS is not set | ||
576 | # CONFIG_USB_RTL8150 is not set | ||
577 | # CONFIG_USB_USBNET is not set | ||
578 | # CONFIG_WAN is not set | ||
579 | # CONFIG_PPP is not set | ||
580 | # CONFIG_SLIP is not set | ||
581 | # CONFIG_NETCONSOLE is not set | ||
582 | # CONFIG_NETPOLL is not set | ||
583 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
584 | # CONFIG_ISDN is not set | ||
585 | |||
586 | # | ||
587 | # Input device support | ||
588 | # | ||
589 | CONFIG_INPUT=y | ||
590 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
591 | # CONFIG_INPUT_POLLDEV is not set | ||
592 | |||
593 | # | ||
594 | # Userland interfaces | ||
595 | # | ||
596 | CONFIG_INPUT_MOUSEDEV=y | ||
597 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
598 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=800 | ||
599 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480 | ||
600 | CONFIG_INPUT_JOYDEV=y | ||
601 | CONFIG_INPUT_EVDEV=y | ||
602 | # CONFIG_INPUT_EVBUG is not set | ||
603 | |||
604 | # | ||
605 | # Input Device Drivers | ||
606 | # | ||
607 | CONFIG_INPUT_KEYBOARD=y | ||
608 | # CONFIG_KEYBOARD_ATKBD is not set | ||
609 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
610 | # CONFIG_KEYBOARD_LKKBD is not set | ||
611 | # CONFIG_KEYBOARD_XTKBD is not set | ||
612 | # CONFIG_KEYBOARD_NEWTON is not set | ||
613 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
614 | # CONFIG_KEYBOARD_GPIO is not set | ||
615 | CONFIG_INPUT_MOUSE=y | ||
616 | # CONFIG_MOUSE_PS2 is not set | ||
617 | # CONFIG_MOUSE_SERIAL is not set | ||
618 | # CONFIG_MOUSE_APPLETOUCH is not set | ||
619 | # CONFIG_MOUSE_BCM5974 is not set | ||
620 | # CONFIG_MOUSE_VSXXXAA is not set | ||
621 | # CONFIG_MOUSE_GPIO is not set | ||
622 | # CONFIG_INPUT_JOYSTICK is not set | ||
623 | # CONFIG_INPUT_TABLET is not set | ||
624 | CONFIG_INPUT_TOUCHSCREEN=y | ||
625 | CONFIG_TOUCHSCREEN_ADS7846=y | ||
626 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | ||
627 | # CONFIG_TOUCHSCREEN_GUNZE is not set | ||
628 | # CONFIG_TOUCHSCREEN_ELO is not set | ||
629 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | ||
630 | # CONFIG_TOUCHSCREEN_INEXIO is not set | ||
631 | # CONFIG_TOUCHSCREEN_MK712 is not set | ||
632 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | ||
633 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | ||
634 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | ||
635 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | ||
636 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | ||
637 | # CONFIG_INPUT_MISC is not set | ||
638 | |||
639 | # | ||
640 | # Hardware I/O ports | ||
641 | # | ||
642 | # CONFIG_SERIO is not set | ||
643 | # CONFIG_GAMEPORT is not set | ||
644 | |||
645 | # | ||
646 | # Character devices | ||
647 | # | ||
648 | CONFIG_VT=y | ||
649 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
650 | CONFIG_VT_CONSOLE=y | ||
651 | CONFIG_HW_CONSOLE=y | ||
652 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
653 | CONFIG_DEVKMEM=y | ||
654 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
655 | |||
656 | # | ||
657 | # Serial drivers | ||
658 | # | ||
659 | CONFIG_SERIAL_8250=y | ||
660 | CONFIG_SERIAL_8250_CONSOLE=y | ||
661 | CONFIG_SERIAL_8250_NR_UARTS=32 | ||
662 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
663 | CONFIG_SERIAL_8250_EXTENDED=y | ||
664 | CONFIG_SERIAL_8250_MANY_PORTS=y | ||
665 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
666 | CONFIG_SERIAL_8250_DETECT_IRQ=y | ||
667 | CONFIG_SERIAL_8250_RSA=y | ||
668 | |||
669 | # | ||
670 | # Non-8250 serial port support | ||
671 | # | ||
672 | CONFIG_SERIAL_CORE=y | ||
673 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
674 | CONFIG_UNIX98_PTYS=y | ||
675 | # CONFIG_LEGACY_PTYS is not set | ||
676 | # CONFIG_IPMI_HANDLER is not set | ||
677 | CONFIG_HW_RANDOM=y | ||
678 | # CONFIG_NVRAM is not set | ||
679 | # CONFIG_R3964 is not set | ||
680 | # CONFIG_RAW_DRIVER is not set | ||
681 | # CONFIG_TCG_TPM is not set | ||
682 | CONFIG_I2C=y | ||
683 | CONFIG_I2C_BOARDINFO=y | ||
684 | CONFIG_I2C_CHARDEV=y | ||
685 | CONFIG_I2C_HELPER_AUTO=y | ||
686 | |||
687 | # | ||
688 | # I2C Hardware Bus support | ||
689 | # | ||
690 | |||
691 | # | ||
692 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
693 | # | ||
694 | # CONFIG_I2C_GPIO is not set | ||
695 | # CONFIG_I2C_OCORES is not set | ||
696 | CONFIG_I2C_OMAP=y | ||
697 | # CONFIG_I2C_SIMTEC is not set | ||
698 | |||
699 | # | ||
700 | # External I2C/SMBus adapter drivers | ||
701 | # | ||
702 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
703 | # CONFIG_I2C_TAOS_EVM is not set | ||
704 | # CONFIG_I2C_TINY_USB is not set | ||
705 | |||
706 | # | ||
707 | # Other I2C/SMBus bus drivers | ||
708 | # | ||
709 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
710 | # CONFIG_I2C_STUB is not set | ||
711 | |||
712 | # | ||
713 | # Miscellaneous I2C Chip support | ||
714 | # | ||
715 | # CONFIG_DS1682 is not set | ||
716 | # CONFIG_AT24 is not set | ||
717 | # CONFIG_SENSORS_EEPROM is not set | ||
718 | # CONFIG_SENSORS_PCF8574 is not set | ||
719 | # CONFIG_PCF8575 is not set | ||
720 | # CONFIG_SENSORS_PCA9539 is not set | ||
721 | # CONFIG_SENSORS_PCF8591 is not set | ||
722 | # CONFIG_ISP1301_OMAP is not set | ||
723 | # CONFIG_TPS65010 is not set | ||
724 | # CONFIG_SENSORS_MAX6875 is not set | ||
725 | # CONFIG_SENSORS_TSL2550 is not set | ||
726 | # CONFIG_I2C_DEBUG_CORE is not set | ||
727 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
728 | # CONFIG_I2C_DEBUG_BUS is not set | ||
729 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
730 | CONFIG_SPI=y | ||
731 | # CONFIG_SPI_DEBUG is not set | ||
732 | CONFIG_SPI_MASTER=y | ||
733 | |||
734 | # | ||
735 | # SPI Master Controller Drivers | ||
736 | # | ||
737 | # CONFIG_SPI_BITBANG is not set | ||
738 | CONFIG_SPI_OMAP24XX=y | ||
739 | |||
740 | # | ||
741 | # SPI Protocol Masters | ||
742 | # | ||
743 | # CONFIG_SPI_AT25 is not set | ||
744 | # CONFIG_SPI_SPIDEV is not set | ||
745 | # CONFIG_SPI_TLE62X0 is not set | ||
746 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
747 | CONFIG_GPIOLIB=y | ||
748 | # CONFIG_DEBUG_GPIO is not set | ||
749 | # CONFIG_GPIO_SYSFS is not set | ||
750 | |||
751 | # | ||
752 | # Memory mapped GPIO expanders: | ||
753 | # | ||
754 | |||
755 | # | ||
756 | # I2C GPIO expanders: | ||
757 | # | ||
758 | # CONFIG_GPIO_MAX732X is not set | ||
759 | # CONFIG_GPIO_PCA953X is not set | ||
760 | # CONFIG_GPIO_PCF857X is not set | ||
761 | CONFIG_GPIO_TWL4030=y | ||
762 | |||
763 | # | ||
764 | # PCI GPIO expanders: | ||
765 | # | ||
766 | |||
767 | # | ||
768 | # SPI GPIO expanders: | ||
769 | # | ||
770 | # CONFIG_GPIO_MAX7301 is not set | ||
771 | # CONFIG_GPIO_MCP23S08 is not set | ||
772 | # CONFIG_W1 is not set | ||
773 | # CONFIG_POWER_SUPPLY is not set | ||
774 | # CONFIG_HWMON is not set | ||
775 | # CONFIG_THERMAL is not set | ||
776 | # CONFIG_THERMAL_HWMON is not set | ||
777 | # CONFIG_WATCHDOG is not set | ||
778 | CONFIG_SSB_POSSIBLE=y | ||
779 | |||
780 | # | ||
781 | # Sonics Silicon Backplane | ||
782 | # | ||
783 | # CONFIG_SSB is not set | ||
784 | |||
785 | # | ||
786 | # Multifunction device drivers | ||
787 | # | ||
788 | # CONFIG_MFD_CORE is not set | ||
789 | # CONFIG_MFD_SM501 is not set | ||
790 | # CONFIG_MFD_ASIC3 is not set | ||
791 | # CONFIG_HTC_EGPIO is not set | ||
792 | # CONFIG_HTC_PASIC3 is not set | ||
793 | CONFIG_TWL4030_CORE=y | ||
794 | # CONFIG_MFD_TMIO is not set | ||
795 | # CONFIG_MFD_T7L66XB is not set | ||
796 | # CONFIG_MFD_TC6387XB is not set | ||
797 | # CONFIG_MFD_TC6393XB is not set | ||
798 | # CONFIG_PMIC_DA903X is not set | ||
799 | # CONFIG_MFD_WM8400 is not set | ||
800 | # CONFIG_MFD_WM8350_I2C is not set | ||
801 | |||
802 | # | ||
803 | # Multimedia devices | ||
804 | # | ||
805 | |||
806 | # | ||
807 | # Multimedia core support | ||
808 | # | ||
809 | # CONFIG_VIDEO_DEV is not set | ||
810 | # CONFIG_DVB_CORE is not set | ||
811 | # CONFIG_VIDEO_MEDIA is not set | ||
812 | |||
813 | # | ||
814 | # Multimedia drivers | ||
815 | # | ||
816 | CONFIG_DAB=y | ||
817 | # CONFIG_USB_DABUSB is not set | ||
818 | |||
819 | # | ||
820 | # Graphics support | ||
821 | # | ||
822 | # CONFIG_VGASTATE is not set | ||
823 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
824 | # CONFIG_FB is not set | ||
825 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
826 | |||
827 | # | ||
828 | # Display device support | ||
829 | # | ||
830 | # CONFIG_DISPLAY_SUPPORT is not set | ||
831 | |||
832 | # | ||
833 | # Console display driver support | ||
834 | # | ||
835 | # CONFIG_VGA_CONSOLE is not set | ||
836 | CONFIG_DUMMY_CONSOLE=y | ||
837 | # CONFIG_SOUND is not set | ||
838 | CONFIG_HID_SUPPORT=y | ||
839 | CONFIG_HID=y | ||
840 | # CONFIG_HID_DEBUG is not set | ||
841 | # CONFIG_HIDRAW is not set | ||
842 | |||
843 | # | ||
844 | # USB Input Devices | ||
845 | # | ||
846 | CONFIG_USB_HID=y | ||
847 | # CONFIG_HID_PID is not set | ||
848 | # CONFIG_USB_HIDDEV is not set | ||
849 | |||
850 | # | ||
851 | # Special HID drivers | ||
852 | # | ||
853 | # CONFIG_HID_COMPAT is not set | ||
854 | # CONFIG_HID_A4TECH is not set | ||
855 | # CONFIG_HID_APPLE is not set | ||
856 | # CONFIG_HID_BELKIN is not set | ||
857 | # CONFIG_HID_BRIGHT is not set | ||
858 | # CONFIG_HID_CHERRY is not set | ||
859 | # CONFIG_HID_CHICONY is not set | ||
860 | # CONFIG_HID_CYPRESS is not set | ||
861 | # CONFIG_HID_DELL is not set | ||
862 | # CONFIG_HID_EZKEY is not set | ||
863 | # CONFIG_HID_GYRATION is not set | ||
864 | # CONFIG_HID_LOGITECH is not set | ||
865 | # CONFIG_HID_MICROSOFT is not set | ||
866 | # CONFIG_HID_MONTEREY is not set | ||
867 | # CONFIG_HID_PANTHERLORD is not set | ||
868 | # CONFIG_HID_PETALYNX is not set | ||
869 | # CONFIG_HID_SAMSUNG is not set | ||
870 | # CONFIG_HID_SONY is not set | ||
871 | # CONFIG_HID_SUNPLUS is not set | ||
872 | # CONFIG_THRUSTMASTER_FF is not set | ||
873 | # CONFIG_ZEROPLUS_FF is not set | ||
874 | CONFIG_USB_SUPPORT=y | ||
875 | CONFIG_USB_ARCH_HAS_HCD=y | ||
876 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
877 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
878 | CONFIG_USB=y | ||
879 | # CONFIG_USB_DEBUG is not set | ||
880 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
881 | |||
882 | # | ||
883 | # Miscellaneous USB options | ||
884 | # | ||
885 | CONFIG_USB_DEVICEFS=y | ||
886 | CONFIG_USB_DEVICE_CLASS=y | ||
887 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
888 | # CONFIG_USB_OTG is not set | ||
889 | # CONFIG_USB_OTG_WHITELIST is not set | ||
890 | # CONFIG_USB_OTG_BLACKLIST_HUB is not set | ||
891 | CONFIG_USB_MON=y | ||
892 | # CONFIG_USB_WUSB is not set | ||
893 | # CONFIG_USB_WUSB_CBAF is not set | ||
894 | |||
895 | # | ||
896 | # USB Host Controller Drivers | ||
897 | # | ||
898 | # CONFIG_USB_C67X00_HCD is not set | ||
899 | # CONFIG_USB_ISP116X_HCD is not set | ||
900 | # CONFIG_USB_OHCI_HCD is not set | ||
901 | # CONFIG_USB_SL811_HCD is not set | ||
902 | # CONFIG_USB_R8A66597_HCD is not set | ||
903 | # CONFIG_USB_HWA_HCD is not set | ||
904 | CONFIG_USB_MUSB_HDRC=y | ||
905 | CONFIG_USB_MUSB_SOC=y | ||
906 | |||
907 | # | ||
908 | # OMAP 343x high speed USB support | ||
909 | # | ||
910 | CONFIG_USB_MUSB_HOST=y | ||
911 | # CONFIG_USB_MUSB_PERIPHERAL is not set | ||
912 | # CONFIG_USB_MUSB_OTG is not set | ||
913 | # CONFIG_USB_GADGET_MUSB_HDRC is not set | ||
914 | CONFIG_USB_MUSB_HDRC_HCD=y | ||
915 | # CONFIG_MUSB_PIO_ONLY is not set | ||
916 | CONFIG_USB_INVENTRA_DMA=y | ||
917 | # CONFIG_USB_TI_CPPI_DMA is not set | ||
918 | # CONFIG_USB_MUSB_DEBUG is not set | ||
919 | |||
920 | # | ||
921 | # USB Device Class drivers | ||
922 | # | ||
923 | # CONFIG_USB_ACM is not set | ||
924 | # CONFIG_USB_PRINTER is not set | ||
925 | # CONFIG_USB_WDM is not set | ||
926 | # CONFIG_USB_TMC is not set | ||
927 | |||
928 | # | ||
929 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; | ||
930 | # | ||
931 | |||
932 | # | ||
933 | # see USB_STORAGE Help for more information | ||
934 | # | ||
935 | # CONFIG_USB_STORAGE is not set | ||
936 | # CONFIG_USB_LIBUSUAL is not set | ||
937 | |||
938 | # | ||
939 | # USB Imaging devices | ||
940 | # | ||
941 | # CONFIG_USB_MDC800 is not set | ||
942 | # CONFIG_USB_MICROTEK is not set | ||
943 | |||
944 | # | ||
945 | # USB port drivers | ||
946 | # | ||
947 | # CONFIG_USB_SERIAL is not set | ||
948 | |||
949 | # | ||
950 | # USB Miscellaneous drivers | ||
951 | # | ||
952 | # CONFIG_USB_EMI62 is not set | ||
953 | # CONFIG_USB_EMI26 is not set | ||
954 | # CONFIG_USB_ADUTUX is not set | ||
955 | # CONFIG_USB_SEVSEG is not set | ||
956 | # CONFIG_USB_RIO500 is not set | ||
957 | # CONFIG_USB_LEGOTOWER is not set | ||
958 | # CONFIG_USB_LCD is not set | ||
959 | # CONFIG_USB_BERRY_CHARGE is not set | ||
960 | # CONFIG_USB_LED is not set | ||
961 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
962 | # CONFIG_USB_CYTHERM is not set | ||
963 | # CONFIG_USB_PHIDGET is not set | ||
964 | # CONFIG_USB_IDMOUSE is not set | ||
965 | # CONFIG_USB_FTDI_ELAN is not set | ||
966 | # CONFIG_USB_APPLEDISPLAY is not set | ||
967 | # CONFIG_USB_LD is not set | ||
968 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
969 | # CONFIG_USB_IOWARRIOR is not set | ||
970 | # CONFIG_USB_TEST is not set | ||
971 | # CONFIG_USB_ISIGHTFW is not set | ||
972 | # CONFIG_USB_VST is not set | ||
973 | CONFIG_USB_GADGET=y | ||
974 | # CONFIG_USB_GADGET_DEBUG is not set | ||
975 | # CONFIG_USB_GADGET_DEBUG_FILES is not set | ||
976 | CONFIG_USB_GADGET_VBUS_DRAW=2 | ||
977 | CONFIG_USB_GADGET_SELECTED=y | ||
978 | # CONFIG_USB_GADGET_AT91 is not set | ||
979 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
980 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
981 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
982 | CONFIG_USB_GADGET_OMAP=y | ||
983 | CONFIG_USB_OMAP=y | ||
984 | # CONFIG_USB_GADGET_PXA25X is not set | ||
985 | # CONFIG_USB_GADGET_PXA27X is not set | ||
986 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
987 | # CONFIG_USB_GADGET_M66592 is not set | ||
988 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
989 | # CONFIG_USB_GADGET_FSL_QE is not set | ||
990 | # CONFIG_USB_GADGET_NET2280 is not set | ||
991 | # CONFIG_USB_GADGET_GOKU is not set | ||
992 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
993 | # CONFIG_USB_GADGET_DUALSPEED is not set | ||
994 | # CONFIG_USB_ZERO is not set | ||
995 | CONFIG_USB_ETH=y | ||
996 | CONFIG_USB_ETH_RNDIS=y | ||
997 | # CONFIG_USB_GADGETFS is not set | ||
998 | # CONFIG_USB_FILE_STORAGE is not set | ||
999 | # CONFIG_USB_G_SERIAL is not set | ||
1000 | # CONFIG_USB_MIDI_GADGET is not set | ||
1001 | # CONFIG_USB_G_PRINTER is not set | ||
1002 | # CONFIG_USB_CDC_COMPOSITE is not set | ||
1003 | CONFIG_MMC=y | ||
1004 | # CONFIG_MMC_DEBUG is not set | ||
1005 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
1006 | |||
1007 | # | ||
1008 | # MMC/SD/SDIO Card Drivers | ||
1009 | # | ||
1010 | CONFIG_MMC_BLOCK=y | ||
1011 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
1012 | # CONFIG_SDIO_UART is not set | ||
1013 | # CONFIG_MMC_TEST is not set | ||
1014 | |||
1015 | # | ||
1016 | # MMC/SD/SDIO Host Controller Drivers | ||
1017 | # | ||
1018 | # CONFIG_MMC_SDHCI is not set | ||
1019 | # CONFIG_MMC_OMAP is not set | ||
1020 | # CONFIG_MMC_SPI is not set | ||
1021 | # CONFIG_MEMSTICK is not set | ||
1022 | # CONFIG_ACCESSIBILITY is not set | ||
1023 | # CONFIG_NEW_LEDS is not set | ||
1024 | CONFIG_RTC_LIB=y | ||
1025 | CONFIG_RTC_CLASS=y | ||
1026 | CONFIG_RTC_HCTOSYS=y | ||
1027 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
1028 | # CONFIG_RTC_DEBUG is not set | ||
1029 | |||
1030 | # | ||
1031 | # RTC interfaces | ||
1032 | # | ||
1033 | CONFIG_RTC_INTF_SYSFS=y | ||
1034 | CONFIG_RTC_INTF_PROC=y | ||
1035 | CONFIG_RTC_INTF_DEV=y | ||
1036 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
1037 | # CONFIG_RTC_DRV_TEST is not set | ||
1038 | |||
1039 | # | ||
1040 | # I2C RTC drivers | ||
1041 | # | ||
1042 | # CONFIG_RTC_DRV_DS1307 is not set | ||
1043 | # CONFIG_RTC_DRV_DS1374 is not set | ||
1044 | # CONFIG_RTC_DRV_DS1672 is not set | ||
1045 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
1046 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
1047 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
1048 | # CONFIG_RTC_DRV_X1205 is not set | ||
1049 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
1050 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
1051 | # CONFIG_RTC_DRV_M41T80 is not set | ||
1052 | CONFIG_RTC_DRV_TWL4030=y | ||
1053 | # CONFIG_RTC_DRV_S35390A is not set | ||
1054 | # CONFIG_RTC_DRV_FM3130 is not set | ||
1055 | # CONFIG_RTC_DRV_RX8581 is not set | ||
1056 | |||
1057 | # | ||
1058 | # SPI RTC drivers | ||
1059 | # | ||
1060 | # CONFIG_RTC_DRV_M41T94 is not set | ||
1061 | # CONFIG_RTC_DRV_DS1305 is not set | ||
1062 | # CONFIG_RTC_DRV_DS1390 is not set | ||
1063 | # CONFIG_RTC_DRV_MAX6902 is not set | ||
1064 | # CONFIG_RTC_DRV_R9701 is not set | ||
1065 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
1066 | # CONFIG_RTC_DRV_DS3234 is not set | ||
1067 | |||
1068 | # | ||
1069 | # Platform RTC drivers | ||
1070 | # | ||
1071 | # CONFIG_RTC_DRV_CMOS is not set | ||
1072 | # CONFIG_RTC_DRV_DS1286 is not set | ||
1073 | # CONFIG_RTC_DRV_DS1511 is not set | ||
1074 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1075 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1076 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
1077 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1078 | # CONFIG_RTC_DRV_M48T35 is not set | ||
1079 | # CONFIG_RTC_DRV_M48T59 is not set | ||
1080 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
1081 | # CONFIG_RTC_DRV_V3020 is not set | ||
1082 | |||
1083 | # | ||
1084 | # on-CPU RTC drivers | ||
1085 | # | ||
1086 | # CONFIG_DMADEVICES is not set | ||
1087 | # CONFIG_REGULATOR is not set | ||
1088 | # CONFIG_UIO is not set | ||
1089 | |||
1090 | # | ||
1091 | # File systems | ||
1092 | # | ||
1093 | CONFIG_EXT2_FS=y | ||
1094 | # CONFIG_EXT2_FS_XATTR is not set | ||
1095 | # CONFIG_EXT2_FS_XIP is not set | ||
1096 | CONFIG_EXT3_FS=y | ||
1097 | # CONFIG_EXT3_FS_XATTR is not set | ||
1098 | # CONFIG_EXT4_FS is not set | ||
1099 | CONFIG_JBD=y | ||
1100 | # CONFIG_REISERFS_FS is not set | ||
1101 | # CONFIG_JFS_FS is not set | ||
1102 | # CONFIG_FS_POSIX_ACL is not set | ||
1103 | CONFIG_FILE_LOCKING=y | ||
1104 | # CONFIG_XFS_FS is not set | ||
1105 | # CONFIG_OCFS2_FS is not set | ||
1106 | CONFIG_DNOTIFY=y | ||
1107 | CONFIG_INOTIFY=y | ||
1108 | CONFIG_INOTIFY_USER=y | ||
1109 | CONFIG_QUOTA=y | ||
1110 | # CONFIG_QUOTA_NETLINK_INTERFACE is not set | ||
1111 | CONFIG_PRINT_QUOTA_WARNING=y | ||
1112 | # CONFIG_QFMT_V1 is not set | ||
1113 | CONFIG_QFMT_V2=y | ||
1114 | CONFIG_QUOTACTL=y | ||
1115 | # CONFIG_AUTOFS_FS is not set | ||
1116 | # CONFIG_AUTOFS4_FS is not set | ||
1117 | # CONFIG_FUSE_FS is not set | ||
1118 | |||
1119 | # | ||
1120 | # CD-ROM/DVD Filesystems | ||
1121 | # | ||
1122 | # CONFIG_ISO9660_FS is not set | ||
1123 | # CONFIG_UDF_FS is not set | ||
1124 | |||
1125 | # | ||
1126 | # DOS/FAT/NT Filesystems | ||
1127 | # | ||
1128 | CONFIG_FAT_FS=y | ||
1129 | CONFIG_MSDOS_FS=y | ||
1130 | CONFIG_VFAT_FS=y | ||
1131 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1132 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1133 | # CONFIG_NTFS_FS is not set | ||
1134 | |||
1135 | # | ||
1136 | # Pseudo filesystems | ||
1137 | # | ||
1138 | CONFIG_PROC_FS=y | ||
1139 | CONFIG_PROC_SYSCTL=y | ||
1140 | CONFIG_PROC_PAGE_MONITOR=y | ||
1141 | CONFIG_SYSFS=y | ||
1142 | CONFIG_TMPFS=y | ||
1143 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1144 | # CONFIG_HUGETLB_PAGE is not set | ||
1145 | # CONFIG_CONFIGFS_FS is not set | ||
1146 | |||
1147 | # | ||
1148 | # Miscellaneous filesystems | ||
1149 | # | ||
1150 | # CONFIG_ADFS_FS is not set | ||
1151 | # CONFIG_AFFS_FS is not set | ||
1152 | # CONFIG_HFS_FS is not set | ||
1153 | # CONFIG_HFSPLUS_FS is not set | ||
1154 | # CONFIG_BEFS_FS is not set | ||
1155 | # CONFIG_BFS_FS is not set | ||
1156 | # CONFIG_EFS_FS is not set | ||
1157 | # CONFIG_JFFS2_FS is not set | ||
1158 | # CONFIG_CRAMFS is not set | ||
1159 | # CONFIG_VXFS_FS is not set | ||
1160 | # CONFIG_MINIX_FS is not set | ||
1161 | # CONFIG_OMFS_FS is not set | ||
1162 | # CONFIG_HPFS_FS is not set | ||
1163 | # CONFIG_QNX4FS_FS is not set | ||
1164 | # CONFIG_ROMFS_FS is not set | ||
1165 | # CONFIG_SYSV_FS is not set | ||
1166 | # CONFIG_UFS_FS is not set | ||
1167 | # CONFIG_NETWORK_FILESYSTEMS is not set | ||
1168 | |||
1169 | # | ||
1170 | # Partition Types | ||
1171 | # | ||
1172 | CONFIG_PARTITION_ADVANCED=y | ||
1173 | # CONFIG_ACORN_PARTITION is not set | ||
1174 | # CONFIG_OSF_PARTITION is not set | ||
1175 | # CONFIG_AMIGA_PARTITION is not set | ||
1176 | # CONFIG_ATARI_PARTITION is not set | ||
1177 | # CONFIG_MAC_PARTITION is not set | ||
1178 | CONFIG_MSDOS_PARTITION=y | ||
1179 | # CONFIG_BSD_DISKLABEL is not set | ||
1180 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1181 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1182 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1183 | # CONFIG_LDM_PARTITION is not set | ||
1184 | # CONFIG_SGI_PARTITION is not set | ||
1185 | # CONFIG_ULTRIX_PARTITION is not set | ||
1186 | # CONFIG_SUN_PARTITION is not set | ||
1187 | # CONFIG_KARMA_PARTITION is not set | ||
1188 | # CONFIG_EFI_PARTITION is not set | ||
1189 | # CONFIG_SYSV68_PARTITION is not set | ||
1190 | CONFIG_NLS=y | ||
1191 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1192 | CONFIG_NLS_CODEPAGE_437=y | ||
1193 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1194 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1195 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1196 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1197 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1198 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1199 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1200 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1201 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1202 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1203 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1204 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1205 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1206 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1207 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1208 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1209 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1210 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1211 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1212 | # CONFIG_NLS_ISO8859_8 is not set | ||
1213 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1214 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1215 | # CONFIG_NLS_ASCII is not set | ||
1216 | CONFIG_NLS_ISO8859_1=y | ||
1217 | # CONFIG_NLS_ISO8859_2 is not set | ||
1218 | # CONFIG_NLS_ISO8859_3 is not set | ||
1219 | # CONFIG_NLS_ISO8859_4 is not set | ||
1220 | # CONFIG_NLS_ISO8859_5 is not set | ||
1221 | # CONFIG_NLS_ISO8859_6 is not set | ||
1222 | # CONFIG_NLS_ISO8859_7 is not set | ||
1223 | # CONFIG_NLS_ISO8859_9 is not set | ||
1224 | # CONFIG_NLS_ISO8859_13 is not set | ||
1225 | # CONFIG_NLS_ISO8859_14 is not set | ||
1226 | # CONFIG_NLS_ISO8859_15 is not set | ||
1227 | # CONFIG_NLS_KOI8_R is not set | ||
1228 | # CONFIG_NLS_KOI8_U is not set | ||
1229 | # CONFIG_NLS_UTF8 is not set | ||
1230 | # CONFIG_DLM is not set | ||
1231 | |||
1232 | # | ||
1233 | # Kernel hacking | ||
1234 | # | ||
1235 | # CONFIG_PRINTK_TIME is not set | ||
1236 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1237 | CONFIG_ENABLE_MUST_CHECK=y | ||
1238 | CONFIG_FRAME_WARN=1024 | ||
1239 | CONFIG_MAGIC_SYSRQ=y | ||
1240 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1241 | # CONFIG_DEBUG_FS is not set | ||
1242 | # CONFIG_HEADERS_CHECK is not set | ||
1243 | CONFIG_DEBUG_KERNEL=y | ||
1244 | # CONFIG_DEBUG_SHIRQ is not set | ||
1245 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1246 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
1247 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
1248 | CONFIG_SCHED_DEBUG=y | ||
1249 | # CONFIG_SCHEDSTATS is not set | ||
1250 | # CONFIG_TIMER_STATS is not set | ||
1251 | # CONFIG_DEBUG_OBJECTS is not set | ||
1252 | # CONFIG_DEBUG_SLAB is not set | ||
1253 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1254 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1255 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1256 | CONFIG_DEBUG_MUTEXES=y | ||
1257 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1258 | # CONFIG_PROVE_LOCKING is not set | ||
1259 | # CONFIG_LOCK_STAT is not set | ||
1260 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1261 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1262 | # CONFIG_DEBUG_KOBJECT is not set | ||
1263 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1264 | CONFIG_DEBUG_INFO=y | ||
1265 | # CONFIG_DEBUG_VM is not set | ||
1266 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1267 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
1268 | # CONFIG_DEBUG_LIST is not set | ||
1269 | # CONFIG_DEBUG_SG is not set | ||
1270 | CONFIG_FRAME_POINTER=y | ||
1271 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1272 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1273 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1274 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1275 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
1276 | # CONFIG_FAULT_INJECTION is not set | ||
1277 | # CONFIG_LATENCYTOP is not set | ||
1278 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
1279 | |||
1280 | # | ||
1281 | # Tracers | ||
1282 | # | ||
1283 | # CONFIG_FUNCTION_TRACER is not set | ||
1284 | # CONFIG_IRQSOFF_TRACER is not set | ||
1285 | # CONFIG_SCHED_TRACER is not set | ||
1286 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
1287 | # CONFIG_BOOT_TRACER is not set | ||
1288 | # CONFIG_STACK_TRACER is not set | ||
1289 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
1290 | # CONFIG_SAMPLES is not set | ||
1291 | CONFIG_HAVE_ARCH_KGDB=y | ||
1292 | # CONFIG_KGDB is not set | ||
1293 | # CONFIG_DEBUG_USER is not set | ||
1294 | # CONFIG_DEBUG_ERRORS is not set | ||
1295 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1296 | # CONFIG_DEBUG_LL is not set | ||
1297 | |||
1298 | # | ||
1299 | # Security options | ||
1300 | # | ||
1301 | # CONFIG_KEYS is not set | ||
1302 | # CONFIG_SECURITY is not set | ||
1303 | # CONFIG_SECURITYFS is not set | ||
1304 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1305 | CONFIG_CRYPTO=y | ||
1306 | |||
1307 | # | ||
1308 | # Crypto core or helper | ||
1309 | # | ||
1310 | # CONFIG_CRYPTO_FIPS is not set | ||
1311 | CONFIG_CRYPTO_ALGAPI=y | ||
1312 | CONFIG_CRYPTO_AEAD=y | ||
1313 | CONFIG_CRYPTO_BLKCIPHER=y | ||
1314 | CONFIG_CRYPTO_HASH=y | ||
1315 | CONFIG_CRYPTO_RNG=y | ||
1316 | CONFIG_CRYPTO_MANAGER=y | ||
1317 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1318 | # CONFIG_CRYPTO_NULL is not set | ||
1319 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1320 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1321 | # CONFIG_CRYPTO_TEST is not set | ||
1322 | |||
1323 | # | ||
1324 | # Authenticated Encryption with Associated Data | ||
1325 | # | ||
1326 | # CONFIG_CRYPTO_CCM is not set | ||
1327 | # CONFIG_CRYPTO_GCM is not set | ||
1328 | # CONFIG_CRYPTO_SEQIV is not set | ||
1329 | |||
1330 | # | ||
1331 | # Block modes | ||
1332 | # | ||
1333 | CONFIG_CRYPTO_CBC=y | ||
1334 | # CONFIG_CRYPTO_CTR is not set | ||
1335 | # CONFIG_CRYPTO_CTS is not set | ||
1336 | CONFIG_CRYPTO_ECB=m | ||
1337 | # CONFIG_CRYPTO_LRW is not set | ||
1338 | CONFIG_CRYPTO_PCBC=m | ||
1339 | # CONFIG_CRYPTO_XTS is not set | ||
1340 | |||
1341 | # | ||
1342 | # Hash modes | ||
1343 | # | ||
1344 | # CONFIG_CRYPTO_HMAC is not set | ||
1345 | # CONFIG_CRYPTO_XCBC is not set | ||
1346 | |||
1347 | # | ||
1348 | # Digest | ||
1349 | # | ||
1350 | # CONFIG_CRYPTO_CRC32C is not set | ||
1351 | # CONFIG_CRYPTO_MD4 is not set | ||
1352 | CONFIG_CRYPTO_MD5=y | ||
1353 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1354 | # CONFIG_CRYPTO_RMD128 is not set | ||
1355 | # CONFIG_CRYPTO_RMD160 is not set | ||
1356 | # CONFIG_CRYPTO_RMD256 is not set | ||
1357 | # CONFIG_CRYPTO_RMD320 is not set | ||
1358 | # CONFIG_CRYPTO_SHA1 is not set | ||
1359 | # CONFIG_CRYPTO_SHA256 is not set | ||
1360 | # CONFIG_CRYPTO_SHA512 is not set | ||
1361 | # CONFIG_CRYPTO_TGR192 is not set | ||
1362 | # CONFIG_CRYPTO_WP512 is not set | ||
1363 | |||
1364 | # | ||
1365 | # Ciphers | ||
1366 | # | ||
1367 | # CONFIG_CRYPTO_AES is not set | ||
1368 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1369 | # CONFIG_CRYPTO_ARC4 is not set | ||
1370 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1371 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1372 | # CONFIG_CRYPTO_CAST5 is not set | ||
1373 | # CONFIG_CRYPTO_CAST6 is not set | ||
1374 | CONFIG_CRYPTO_DES=y | ||
1375 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1376 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1377 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1378 | # CONFIG_CRYPTO_SEED is not set | ||
1379 | # CONFIG_CRYPTO_SERPENT is not set | ||
1380 | # CONFIG_CRYPTO_TEA is not set | ||
1381 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1382 | |||
1383 | # | ||
1384 | # Compression | ||
1385 | # | ||
1386 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1387 | # CONFIG_CRYPTO_LZO is not set | ||
1388 | |||
1389 | # | ||
1390 | # Random Number Generation | ||
1391 | # | ||
1392 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1393 | CONFIG_CRYPTO_HW=y | ||
1394 | |||
1395 | # | ||
1396 | # Library routines | ||
1397 | # | ||
1398 | CONFIG_BITREVERSE=y | ||
1399 | CONFIG_CRC_CCITT=y | ||
1400 | # CONFIG_CRC16 is not set | ||
1401 | # CONFIG_CRC_T10DIF is not set | ||
1402 | # CONFIG_CRC_ITU_T is not set | ||
1403 | CONFIG_CRC32=y | ||
1404 | # CONFIG_CRC7 is not set | ||
1405 | CONFIG_LIBCRC32C=y | ||
1406 | CONFIG_PLIST=y | ||
1407 | CONFIG_HAS_IOMEM=y | ||
1408 | CONFIG_HAS_IOPORT=y | ||
1409 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/omap_ldp_defconfig b/arch/arm/configs/omap_ldp_defconfig index 948a212fb1cc..b77d054169ee 100644 --- a/arch/arm/configs/omap_ldp_defconfig +++ b/arch/arm/configs/omap_ldp_defconfig | |||
@@ -316,7 +316,82 @@ CONFIG_BINFMT_MISC=y | |||
316 | # | 316 | # |
317 | # CONFIG_PM is not set | 317 | # CONFIG_PM is not set |
318 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | 318 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
319 | # CONFIG_NET is not set | 319 | CONFIG_NET=y |
320 | |||
321 | # | ||
322 | # Networking options | ||
323 | # | ||
324 | CONFIG_PACKET=y | ||
325 | # CONFIG_PACKET_MMAP is not set | ||
326 | CONFIG_UNIX=y | ||
327 | CONFIG_XFRM=y | ||
328 | CONFIG_XFRM_USER=y | ||
329 | # CONFIG_XFRM_SUB_POLICY is not set | ||
330 | CONFIG_XFRM_MIGRATE=y | ||
331 | # CONFIG_XFRM_STATISTICS is not set | ||
332 | CONFIG_NET_KEY=y | ||
333 | CONFIG_NET_KEY_MIGRATE=y | ||
334 | CONFIG_INET=y | ||
335 | CONFIG_IP_MULTICAST=y | ||
336 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
337 | CONFIG_IP_FIB_HASH=y | ||
338 | CONFIG_IP_PNP=y | ||
339 | CONFIG_IP_PNP_DHCP=y | ||
340 | CONFIG_IP_PNP_BOOTP=y | ||
341 | CONFIG_IP_PNP_RARP=y | ||
342 | # CONFIG_NET_IPIP is not set | ||
343 | # CONFIG_NET_IPGRE is not set | ||
344 | # CONFIG_IP_MROUTE is not set | ||
345 | # CONFIG_ARPD is not set | ||
346 | # CONFIG_SYN_COOKIES is not set | ||
347 | # CONFIG_INET_AH is not set | ||
348 | # CONFIG_INET_ESP is not set | ||
349 | # CONFIG_INET_IPCOMP is not set | ||
350 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
351 | # CONFIG_INET_TUNNEL is not set | ||
352 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
353 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
354 | CONFIG_INET_XFRM_MODE_BEET=y | ||
355 | # CONFIG_INET_LRO is not set | ||
356 | CONFIG_INET_DIAG=y | ||
357 | CONFIG_INET_TCP_DIAG=y | ||
358 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
359 | CONFIG_TCP_CONG_CUBIC=y | ||
360 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
361 | # CONFIG_TCP_MD5SIG is not set | ||
362 | # CONFIG_IPV6 is not set | ||
363 | # CONFIG_NETWORK_SECMARK is not set | ||
364 | # CONFIG_NETFILTER is not set | ||
365 | # CONFIG_IP_DCCP is not set | ||
366 | # CONFIG_IP_SCTP is not set | ||
367 | # CONFIG_TIPC is not set | ||
368 | # CONFIG_ATM is not set | ||
369 | # CONFIG_BRIDGE is not set | ||
370 | # CONFIG_NET_DSA is not set | ||
371 | # CONFIG_VLAN_8021Q is not set | ||
372 | # CONFIG_DECNET is not set | ||
373 | # CONFIG_LLC2 is not set | ||
374 | # CONFIG_IPX is not set | ||
375 | # CONFIG_ATALK is not set | ||
376 | # CONFIG_X25 is not set | ||
377 | # CONFIG_LAPB is not set | ||
378 | # CONFIG_ECONET is not set | ||
379 | # CONFIG_WAN_ROUTER is not set | ||
380 | # CONFIG_NET_SCHED is not set | ||
381 | |||
382 | # | ||
383 | # Network testing | ||
384 | # | ||
385 | # CONFIG_NET_PKTGEN is not set | ||
386 | # CONFIG_HAMRADIO is not set | ||
387 | # CONFIG_CAN is not set | ||
388 | # CONFIG_IRDA is not set | ||
389 | # CONFIG_BT is not set | ||
390 | # CONFIG_AF_RXRPC is not set | ||
391 | # CONFIG_PHONET is not set | ||
392 | # CONFIG_WIRELESS is not set | ||
393 | # CONFIG_RFKILL is not set | ||
394 | # CONFIG_NET_9P is not set | ||
320 | 395 | ||
321 | # | 396 | # |
322 | # Device Drivers | 397 | # Device Drivers |
@@ -332,6 +407,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
332 | # CONFIG_DEBUG_DRIVER is not set | 407 | # CONFIG_DEBUG_DRIVER is not set |
333 | # CONFIG_DEBUG_DEVRES is not set | 408 | # CONFIG_DEBUG_DEVRES is not set |
334 | # CONFIG_SYS_HYPERVISOR is not set | 409 | # CONFIG_SYS_HYPERVISOR is not set |
410 | CONFIG_CONNECTOR=y | ||
411 | CONFIG_PROC_EVENTS=y | ||
335 | # CONFIG_MTD is not set | 412 | # CONFIG_MTD is not set |
336 | # CONFIG_PARPORT is not set | 413 | # CONFIG_PARPORT is not set |
337 | CONFIG_BLK_DEV=y | 414 | CONFIG_BLK_DEV=y |
@@ -390,6 +467,54 @@ CONFIG_SCSI_LOWLEVEL=y | |||
390 | # CONFIG_SCSI_DH is not set | 467 | # CONFIG_SCSI_DH is not set |
391 | # CONFIG_ATA is not set | 468 | # CONFIG_ATA is not set |
392 | # CONFIG_MD is not set | 469 | # CONFIG_MD is not set |
470 | CONFIG_NETDEVICES=y | ||
471 | # CONFIG_DUMMY is not set | ||
472 | # CONFIG_BONDING is not set | ||
473 | # CONFIG_MACVLAN is not set | ||
474 | # CONFIG_EQUALIZER is not set | ||
475 | # CONFIG_TUN is not set | ||
476 | # CONFIG_VETH is not set | ||
477 | # CONFIG_PHYLIB is not set | ||
478 | CONFIG_NET_ETHERNET=y | ||
479 | CONFIG_MII=y | ||
480 | # CONFIG_AX88796 is not set | ||
481 | # CONFIG_SMC91X is not set | ||
482 | # CONFIG_DM9000 is not set | ||
483 | # CONFIG_ENC28J60 is not set | ||
484 | CONFIG_SMC911X=y | ||
485 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
486 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
487 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
488 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
489 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
490 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
491 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
492 | # CONFIG_B44 is not set | ||
493 | CONFIG_NETDEV_1000=y | ||
494 | CONFIG_NETDEV_10000=y | ||
495 | |||
496 | # | ||
497 | # Wireless LAN | ||
498 | # | ||
499 | # CONFIG_WLAN_PRE80211 is not set | ||
500 | # CONFIG_WLAN_80211 is not set | ||
501 | # CONFIG_IWLWIFI_LEDS is not set | ||
502 | |||
503 | # | ||
504 | # USB Network Adapters | ||
505 | # | ||
506 | # CONFIG_USB_CATC is not set | ||
507 | # CONFIG_USB_KAWETH is not set | ||
508 | # CONFIG_USB_PEGASUS is not set | ||
509 | # CONFIG_USB_RTL8150 is not set | ||
510 | # CONFIG_USB_USBNET is not set | ||
511 | # CONFIG_WAN is not set | ||
512 | # CONFIG_PPP is not set | ||
513 | # CONFIG_SLIP is not set | ||
514 | # CONFIG_NETCONSOLE is not set | ||
515 | # CONFIG_NETPOLL is not set | ||
516 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
517 | # CONFIG_ISDN is not set | ||
393 | 518 | ||
394 | # | 519 | # |
395 | # Input device support | 520 | # Input device support |
@@ -816,6 +941,27 @@ CONFIG_TMPFS=y | |||
816 | # CONFIG_ROMFS_FS is not set | 941 | # CONFIG_ROMFS_FS is not set |
817 | # CONFIG_SYSV_FS is not set | 942 | # CONFIG_SYSV_FS is not set |
818 | # CONFIG_UFS_FS is not set | 943 | # CONFIG_UFS_FS is not set |
944 | CONFIG_NETWORK_FILESYSTEMS=y | ||
945 | CONFIG_NFS_FS=y | ||
946 | CONFIG_NFS_V3=y | ||
947 | CONFIG_NFS_V3_ACL=y | ||
948 | CONFIG_NFS_V4=y | ||
949 | CONFIG_ROOT_NFS=y | ||
950 | # CONFIG_NFSD is not set | ||
951 | CONFIG_LOCKD=y | ||
952 | CONFIG_LOCKD_V4=y | ||
953 | CONFIG_NFS_ACL_SUPPORT=y | ||
954 | CONFIG_NFS_COMMON=y | ||
955 | CONFIG_SUNRPC=y | ||
956 | CONFIG_SUNRPC_GSS=y | ||
957 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
958 | CONFIG_RPCSEC_GSS_KRB5=y | ||
959 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
960 | # CONFIG_SMB_FS is not set | ||
961 | # CONFIG_CIFS is not set | ||
962 | # CONFIG_NCP_FS is not set | ||
963 | # CONFIG_CODA_FS is not set | ||
964 | # CONFIG_AFS_FS is not set | ||
819 | 965 | ||
820 | # | 966 | # |
821 | # Partition Types | 967 | # Partition Types |
diff --git a/arch/arm/configs/picotux200_defconfig b/arch/arm/configs/picotux200_defconfig index 14826f0dabde..59e4463c2da2 100644 --- a/arch/arm/configs/picotux200_defconfig +++ b/arch/arm/configs/picotux200_defconfig | |||
@@ -1069,9 +1069,9 @@ CONFIG_RTC_CLASS=m | |||
1069 | # | 1069 | # |
1070 | # RTC interfaces | 1070 | # RTC interfaces |
1071 | # | 1071 | # |
1072 | CONFIG_RTC_INTF_SYSFS=m | 1072 | CONFIG_RTC_INTF_SYSFS=y |
1073 | CONFIG_RTC_INTF_PROC=m | 1073 | CONFIG_RTC_INTF_PROC=y |
1074 | CONFIG_RTC_INTF_DEV=m | 1074 | CONFIG_RTC_INTF_DEV=y |
1075 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | 1075 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set |
1076 | 1076 | ||
1077 | # | 1077 | # |
diff --git a/arch/arm/configs/realview-smp_defconfig b/arch/arm/configs/realview-smp_defconfig index 0c09b23167ec..cd29824d791c 100644 --- a/arch/arm/configs/realview-smp_defconfig +++ b/arch/arm/configs/realview-smp_defconfig | |||
@@ -1,84 +1,111 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.19-rc3 | 3 | # Linux kernel version: 2.6.28-rc2 |
4 | # Wed Oct 25 14:12:00 2006 | 4 | # Mon Nov 10 14:41:47 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | # CONFIG_GENERIC_TIME is not set | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
8 | # CONFIG_GENERIC_GPIO is not set | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
8 | CONFIG_MMU=y | 11 | CONFIG_MMU=y |
12 | # CONFIG_NO_IOPORT is not set | ||
9 | CONFIG_GENERIC_HARDIRQS=y | 13 | CONFIG_GENERIC_HARDIRQS=y |
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
10 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 16 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
11 | CONFIG_HARDIRQS_SW_RESEND=y | 17 | CONFIG_HARDIRQS_SW_RESEND=y |
12 | CONFIG_GENERIC_IRQ_PROBE=y | 18 | CONFIG_GENERIC_IRQ_PROBE=y |
13 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 19 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
20 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
14 | CONFIG_GENERIC_HWEIGHT=y | 22 | CONFIG_GENERIC_HWEIGHT=y |
15 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 23 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
24 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
16 | CONFIG_VECTORS_BASE=0xffff0000 | 25 | CONFIG_VECTORS_BASE=0xffff0000 |
17 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 26 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
18 | 27 | ||
19 | # | 28 | # |
20 | # Code maturity level options | 29 | # General setup |
21 | # | 30 | # |
22 | CONFIG_EXPERIMENTAL=y | 31 | CONFIG_EXPERIMENTAL=y |
23 | CONFIG_LOCK_KERNEL=y | 32 | CONFIG_LOCK_KERNEL=y |
24 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 33 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
25 | |||
26 | # | ||
27 | # General setup | ||
28 | # | ||
29 | CONFIG_LOCALVERSION="" | 34 | CONFIG_LOCALVERSION="" |
30 | CONFIG_LOCALVERSION_AUTO=y | 35 | CONFIG_LOCALVERSION_AUTO=y |
31 | # CONFIG_SWAP is not set | 36 | # CONFIG_SWAP is not set |
32 | CONFIG_SYSVIPC=y | 37 | CONFIG_SYSVIPC=y |
33 | # CONFIG_IPC_NS is not set | 38 | CONFIG_SYSVIPC_SYSCTL=y |
34 | # CONFIG_POSIX_MQUEUE is not set | 39 | # CONFIG_POSIX_MQUEUE is not set |
35 | # CONFIG_BSD_PROCESS_ACCT is not set | 40 | # CONFIG_BSD_PROCESS_ACCT is not set |
36 | # CONFIG_TASKSTATS is not set | 41 | # CONFIG_TASKSTATS is not set |
37 | # CONFIG_UTS_NS is not set | ||
38 | # CONFIG_AUDIT is not set | 42 | # CONFIG_AUDIT is not set |
39 | # CONFIG_IKCONFIG is not set | 43 | # CONFIG_IKCONFIG is not set |
40 | # CONFIG_CPUSETS is not set | 44 | CONFIG_LOG_BUF_SHIFT=14 |
45 | # CONFIG_CGROUPS is not set | ||
46 | # CONFIG_GROUP_SCHED is not set | ||
47 | CONFIG_SYSFS_DEPRECATED=y | ||
48 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
41 | # CONFIG_RELAY is not set | 49 | # CONFIG_RELAY is not set |
42 | CONFIG_INITRAMFS_SOURCE="" | 50 | CONFIG_NAMESPACES=y |
51 | # CONFIG_UTS_NS is not set | ||
52 | # CONFIG_IPC_NS is not set | ||
53 | # CONFIG_USER_NS is not set | ||
54 | # CONFIG_PID_NS is not set | ||
55 | # CONFIG_BLK_DEV_INITRD is not set | ||
43 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 56 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
44 | CONFIG_SYSCTL=y | 57 | CONFIG_SYSCTL=y |
45 | # CONFIG_EMBEDDED is not set | 58 | # CONFIG_EMBEDDED is not set |
46 | CONFIG_UID16=y | 59 | CONFIG_UID16=y |
47 | # CONFIG_SYSCTL_SYSCALL is not set | 60 | CONFIG_SYSCTL_SYSCALL=y |
48 | CONFIG_KALLSYMS=y | 61 | CONFIG_KALLSYMS=y |
49 | CONFIG_KALLSYMS_ALL=y | 62 | # CONFIG_KALLSYMS_ALL is not set |
50 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 63 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
51 | CONFIG_HOTPLUG=y | 64 | CONFIG_HOTPLUG=y |
52 | CONFIG_PRINTK=y | 65 | CONFIG_PRINTK=y |
53 | CONFIG_BUG=y | 66 | CONFIG_BUG=y |
54 | CONFIG_ELF_CORE=y | 67 | CONFIG_ELF_CORE=y |
68 | CONFIG_COMPAT_BRK=y | ||
55 | CONFIG_BASE_FULL=y | 69 | CONFIG_BASE_FULL=y |
56 | CONFIG_FUTEX=y | 70 | CONFIG_FUTEX=y |
71 | CONFIG_ANON_INODES=y | ||
57 | CONFIG_EPOLL=y | 72 | CONFIG_EPOLL=y |
73 | CONFIG_SIGNALFD=y | ||
74 | CONFIG_TIMERFD=y | ||
75 | CONFIG_EVENTFD=y | ||
58 | CONFIG_SHMEM=y | 76 | CONFIG_SHMEM=y |
59 | CONFIG_SLAB=y | 77 | CONFIG_AIO=y |
60 | CONFIG_VM_EVENT_COUNTERS=y | 78 | CONFIG_VM_EVENT_COUNTERS=y |
79 | CONFIG_SLAB=y | ||
80 | # CONFIG_SLUB is not set | ||
81 | # CONFIG_SLOB is not set | ||
82 | # CONFIG_PROFILING is not set | ||
83 | # CONFIG_MARKERS is not set | ||
84 | CONFIG_HAVE_OPROFILE=y | ||
85 | # CONFIG_KPROBES is not set | ||
86 | CONFIG_HAVE_KPROBES=y | ||
87 | CONFIG_HAVE_KRETPROBES=y | ||
88 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
89 | CONFIG_HAVE_CLK=y | ||
90 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
91 | CONFIG_SLABINFO=y | ||
61 | CONFIG_RT_MUTEXES=y | 92 | CONFIG_RT_MUTEXES=y |
62 | # CONFIG_TINY_SHMEM is not set | 93 | # CONFIG_TINY_SHMEM is not set |
63 | CONFIG_BASE_SMALL=0 | 94 | CONFIG_BASE_SMALL=0 |
64 | # CONFIG_SLOB is not set | ||
65 | |||
66 | # | ||
67 | # Loadable module support | ||
68 | # | ||
69 | CONFIG_MODULES=y | 95 | CONFIG_MODULES=y |
96 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
70 | CONFIG_MODULE_UNLOAD=y | 97 | CONFIG_MODULE_UNLOAD=y |
71 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 98 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
72 | # CONFIG_MODVERSIONS is not set | 99 | # CONFIG_MODVERSIONS is not set |
73 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 100 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
74 | # CONFIG_KMOD is not set | 101 | CONFIG_KMOD=y |
75 | CONFIG_STOP_MACHINE=y | 102 | CONFIG_STOP_MACHINE=y |
76 | |||
77 | # | ||
78 | # Block layer | ||
79 | # | ||
80 | CONFIG_BLOCK=y | 103 | CONFIG_BLOCK=y |
104 | # CONFIG_LBD is not set | ||
81 | # CONFIG_BLK_DEV_IO_TRACE is not set | 105 | # CONFIG_BLK_DEV_IO_TRACE is not set |
106 | # CONFIG_LSF is not set | ||
107 | # CONFIG_BLK_DEV_BSG is not set | ||
108 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
82 | 109 | ||
83 | # | 110 | # |
84 | # IO Schedulers | 111 | # IO Schedulers |
@@ -92,6 +119,8 @@ CONFIG_DEFAULT_DEADLINE=y | |||
92 | # CONFIG_DEFAULT_CFQ is not set | 119 | # CONFIG_DEFAULT_CFQ is not set |
93 | # CONFIG_DEFAULT_NOOP is not set | 120 | # CONFIG_DEFAULT_NOOP is not set |
94 | CONFIG_DEFAULT_IOSCHED="deadline" | 121 | CONFIG_DEFAULT_IOSCHED="deadline" |
122 | CONFIG_CLASSIC_RCU=y | ||
123 | # CONFIG_FREEZER is not set | ||
95 | 124 | ||
96 | # | 125 | # |
97 | # System Type | 126 | # System Type |
@@ -103,19 +132,26 @@ CONFIG_ARCH_REALVIEW=y | |||
103 | # CONFIG_ARCH_AT91 is not set | 132 | # CONFIG_ARCH_AT91 is not set |
104 | # CONFIG_ARCH_CLPS7500 is not set | 133 | # CONFIG_ARCH_CLPS7500 is not set |
105 | # CONFIG_ARCH_CLPS711X is not set | 134 | # CONFIG_ARCH_CLPS711X is not set |
106 | # CONFIG_ARCH_CO285 is not set | ||
107 | # CONFIG_ARCH_EBSA110 is not set | 135 | # CONFIG_ARCH_EBSA110 is not set |
108 | # CONFIG_ARCH_EP93XX is not set | 136 | # CONFIG_ARCH_EP93XX is not set |
109 | # CONFIG_ARCH_FOOTBRIDGE is not set | 137 | # CONFIG_ARCH_FOOTBRIDGE is not set |
110 | # CONFIG_ARCH_NETX is not set | 138 | # CONFIG_ARCH_NETX is not set |
111 | # CONFIG_ARCH_H720X is not set | 139 | # CONFIG_ARCH_H720X is not set |
112 | # CONFIG_ARCH_IMX is not set | 140 | # CONFIG_ARCH_IMX is not set |
141 | # CONFIG_ARCH_IOP13XX is not set | ||
113 | # CONFIG_ARCH_IOP32X is not set | 142 | # CONFIG_ARCH_IOP32X is not set |
114 | # CONFIG_ARCH_IOP33X is not set | 143 | # CONFIG_ARCH_IOP33X is not set |
115 | # CONFIG_ARCH_IXP4XX is not set | ||
116 | # CONFIG_ARCH_IXP2000 is not set | ||
117 | # CONFIG_ARCH_IXP23XX is not set | 144 | # CONFIG_ARCH_IXP23XX is not set |
145 | # CONFIG_ARCH_IXP2000 is not set | ||
146 | # CONFIG_ARCH_IXP4XX is not set | ||
118 | # CONFIG_ARCH_L7200 is not set | 147 | # CONFIG_ARCH_L7200 is not set |
148 | # CONFIG_ARCH_KIRKWOOD is not set | ||
149 | # CONFIG_ARCH_KS8695 is not set | ||
150 | # CONFIG_ARCH_NS9XXX is not set | ||
151 | # CONFIG_ARCH_LOKI is not set | ||
152 | # CONFIG_ARCH_MV78XX0 is not set | ||
153 | # CONFIG_ARCH_MXC is not set | ||
154 | # CONFIG_ARCH_ORION5X is not set | ||
119 | # CONFIG_ARCH_PNX4008 is not set | 155 | # CONFIG_ARCH_PNX4008 is not set |
120 | # CONFIG_ARCH_PXA is not set | 156 | # CONFIG_ARCH_PXA is not set |
121 | # CONFIG_ARCH_RPC is not set | 157 | # CONFIG_ARCH_RPC is not set |
@@ -123,13 +159,29 @@ CONFIG_ARCH_REALVIEW=y | |||
123 | # CONFIG_ARCH_S3C2410 is not set | 159 | # CONFIG_ARCH_S3C2410 is not set |
124 | # CONFIG_ARCH_SHARK is not set | 160 | # CONFIG_ARCH_SHARK is not set |
125 | # CONFIG_ARCH_LH7A40X is not set | 161 | # CONFIG_ARCH_LH7A40X is not set |
162 | # CONFIG_ARCH_DAVINCI is not set | ||
126 | # CONFIG_ARCH_OMAP is not set | 163 | # CONFIG_ARCH_OMAP is not set |
164 | # CONFIG_ARCH_MSM is not set | ||
165 | |||
166 | # | ||
167 | # Boot options | ||
168 | # | ||
169 | |||
170 | # | ||
171 | # Power management | ||
172 | # | ||
127 | 173 | ||
128 | # | 174 | # |
129 | # RealView platform type | 175 | # RealView platform type |
130 | # | 176 | # |
131 | CONFIG_MACH_REALVIEW_EB=y | 177 | CONFIG_MACH_REALVIEW_EB=y |
132 | CONFIG_REALVIEW_MPCORE=y | 178 | # CONFIG_REALVIEW_EB_A9MP is not set |
179 | CONFIG_REALVIEW_EB_ARM11MP=y | ||
180 | # CONFIG_REALVIEW_EB_ARM11MP_REVB is not set | ||
181 | CONFIG_MACH_REALVIEW_PB11MP=y | ||
182 | # CONFIG_MACH_REALVIEW_PB1176 is not set | ||
183 | # CONFIG_MACH_REALVIEW_PBA8 is not set | ||
184 | CONFIG_REALVIEW_HIGH_PHYS_OFFSET=y | ||
133 | 185 | ||
134 | # | 186 | # |
135 | # Processor Type | 187 | # Processor Type |
@@ -138,12 +190,15 @@ CONFIG_CPU_32=y | |||
138 | # CONFIG_CPU_ARM926T is not set | 190 | # CONFIG_CPU_ARM926T is not set |
139 | CONFIG_CPU_V6=y | 191 | CONFIG_CPU_V6=y |
140 | CONFIG_CPU_32v6K=y | 192 | CONFIG_CPU_32v6K=y |
193 | # CONFIG_CPU_V7 is not set | ||
141 | CONFIG_CPU_32v6=y | 194 | CONFIG_CPU_32v6=y |
142 | CONFIG_CPU_ABRT_EV6=y | 195 | CONFIG_CPU_ABRT_EV6=y |
196 | CONFIG_CPU_PABRT_NOIFAR=y | ||
143 | CONFIG_CPU_CACHE_V6=y | 197 | CONFIG_CPU_CACHE_V6=y |
144 | CONFIG_CPU_CACHE_VIPT=y | 198 | CONFIG_CPU_CACHE_VIPT=y |
145 | CONFIG_CPU_COPY_V6=y | 199 | CONFIG_CPU_COPY_V6=y |
146 | CONFIG_CPU_TLB_V6=y | 200 | CONFIG_CPU_TLB_V6=y |
201 | CONFIG_CPU_HAS_ASID=y | ||
147 | CONFIG_CPU_CP15=y | 202 | CONFIG_CPU_CP15=y |
148 | CONFIG_CPU_CP15_MMU=y | 203 | CONFIG_CPU_CP15_MMU=y |
149 | 204 | ||
@@ -153,9 +208,10 @@ CONFIG_CPU_CP15_MMU=y | |||
153 | CONFIG_ARM_THUMB=y | 208 | CONFIG_ARM_THUMB=y |
154 | # CONFIG_CPU_ICACHE_DISABLE is not set | 209 | # CONFIG_CPU_ICACHE_DISABLE is not set |
155 | # CONFIG_CPU_DCACHE_DISABLE is not set | 210 | # CONFIG_CPU_DCACHE_DISABLE is not set |
156 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
157 | # CONFIG_CPU_BPREDICT_DISABLE is not set | 211 | # CONFIG_CPU_BPREDICT_DISABLE is not set |
158 | CONFIG_HAS_TLS_REG=y | 212 | CONFIG_HAS_TLS_REG=y |
213 | CONFIG_OUTER_CACHE=y | ||
214 | CONFIG_CACHE_L2X0=y | ||
159 | CONFIG_ARM_GIC=y | 215 | CONFIG_ARM_GIC=y |
160 | CONFIG_ICST307=y | 216 | CONFIG_ICST307=y |
161 | 217 | ||
@@ -163,32 +219,44 @@ CONFIG_ICST307=y | |||
163 | # Bus support | 219 | # Bus support |
164 | # | 220 | # |
165 | CONFIG_ARM_AMBA=y | 221 | CONFIG_ARM_AMBA=y |
166 | 222 | # CONFIG_PCI_SYSCALL is not set | |
167 | # | 223 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
168 | # PCCARD (PCMCIA/CardBus) support | ||
169 | # | ||
170 | # CONFIG_PCCARD is not set | 224 | # CONFIG_PCCARD is not set |
171 | 225 | ||
172 | # | 226 | # |
173 | # Kernel Features | 227 | # Kernel Features |
174 | # | 228 | # |
229 | # CONFIG_NO_HZ is not set | ||
230 | # CONFIG_HIGH_RES_TIMERS is not set | ||
231 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
175 | CONFIG_SMP=y | 232 | CONFIG_SMP=y |
233 | CONFIG_VMSPLIT_3G=y | ||
234 | # CONFIG_VMSPLIT_2G is not set | ||
235 | # CONFIG_VMSPLIT_1G is not set | ||
236 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
176 | CONFIG_NR_CPUS=4 | 237 | CONFIG_NR_CPUS=4 |
177 | CONFIG_HOTPLUG_CPU=y | 238 | CONFIG_HOTPLUG_CPU=y |
178 | CONFIG_LOCAL_TIMERS=y | 239 | CONFIG_LOCAL_TIMERS=y |
179 | # CONFIG_PREEMPT is not set | 240 | # CONFIG_PREEMPT is not set |
180 | CONFIG_HZ=100 | 241 | CONFIG_HZ=100 |
181 | # CONFIG_AEABI is not set | 242 | CONFIG_AEABI=y |
182 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 243 | CONFIG_OABI_COMPAT=y |
244 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
245 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
246 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
183 | CONFIG_SELECT_MEMORY_MODEL=y | 247 | CONFIG_SELECT_MEMORY_MODEL=y |
184 | CONFIG_FLATMEM_MANUAL=y | 248 | CONFIG_FLATMEM_MANUAL=y |
185 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 249 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
186 | # CONFIG_SPARSEMEM_MANUAL is not set | 250 | # CONFIG_SPARSEMEM_MANUAL is not set |
187 | CONFIG_FLATMEM=y | 251 | CONFIG_FLATMEM=y |
188 | CONFIG_FLAT_NODE_MEM_MAP=y | 252 | CONFIG_FLAT_NODE_MEM_MAP=y |
189 | # CONFIG_SPARSEMEM_STATIC is not set | 253 | CONFIG_PAGEFLAGS_EXTENDED=y |
190 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 254 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
191 | # CONFIG_RESOURCES_64BIT is not set | 255 | # CONFIG_RESOURCES_64BIT is not set |
256 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
257 | CONFIG_ZONE_DMA_FLAG=0 | ||
258 | CONFIG_VIRT_TO_BUS=y | ||
259 | CONFIG_UNEVICTABLE_LRU=y | ||
192 | CONFIG_ALIGNMENT_TRAP=y | 260 | CONFIG_ALIGNMENT_TRAP=y |
193 | 261 | ||
194 | # | 262 | # |
@@ -198,6 +266,12 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 | |||
198 | CONFIG_ZBOOT_ROM_BSS=0x0 | 266 | CONFIG_ZBOOT_ROM_BSS=0x0 |
199 | CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M" | 267 | CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M" |
200 | # CONFIG_XIP_KERNEL is not set | 268 | # CONFIG_XIP_KERNEL is not set |
269 | # CONFIG_KEXEC is not set | ||
270 | |||
271 | # | ||
272 | # CPU Power Management | ||
273 | # | ||
274 | # CONFIG_CPU_IDLE is not set | ||
201 | 275 | ||
202 | # | 276 | # |
203 | # Floating point emulation | 277 | # Floating point emulation |
@@ -206,8 +280,7 @@ CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=tt | |||
206 | # | 280 | # |
207 | # At least one emulation must be selected | 281 | # At least one emulation must be selected |
208 | # | 282 | # |
209 | CONFIG_FPE_NWFPE=y | 283 | # CONFIG_FPE_NWFPE is not set |
210 | # CONFIG_FPE_NWFPE_XP is not set | ||
211 | # CONFIG_FPE_FASTFPE is not set | 284 | # CONFIG_FPE_FASTFPE is not set |
212 | CONFIG_VFP=y | 285 | CONFIG_VFP=y |
213 | 286 | ||
@@ -215,28 +288,29 @@ CONFIG_VFP=y | |||
215 | # Userspace binary formats | 288 | # Userspace binary formats |
216 | # | 289 | # |
217 | CONFIG_BINFMT_ELF=y | 290 | CONFIG_BINFMT_ELF=y |
291 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
292 | CONFIG_HAVE_AOUT=y | ||
218 | # CONFIG_BINFMT_AOUT is not set | 293 | # CONFIG_BINFMT_AOUT is not set |
219 | # CONFIG_BINFMT_MISC is not set | 294 | # CONFIG_BINFMT_MISC is not set |
220 | # CONFIG_ARTHUR is not set | ||
221 | 295 | ||
222 | # | 296 | # |
223 | # Power management options | 297 | # Power management options |
224 | # | 298 | # |
225 | # CONFIG_PM is not set | 299 | # CONFIG_PM is not set |
226 | # CONFIG_APM is not set | 300 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
227 | |||
228 | # | ||
229 | # Networking | ||
230 | # | ||
231 | CONFIG_NET=y | 301 | CONFIG_NET=y |
232 | 302 | ||
233 | # | 303 | # |
234 | # Networking options | 304 | # Networking options |
235 | # | 305 | # |
236 | # CONFIG_NETDEBUG is not set | ||
237 | CONFIG_PACKET=y | 306 | CONFIG_PACKET=y |
238 | # CONFIG_PACKET_MMAP is not set | 307 | # CONFIG_PACKET_MMAP is not set |
239 | CONFIG_UNIX=y | 308 | CONFIG_UNIX=y |
309 | CONFIG_XFRM=y | ||
310 | # CONFIG_XFRM_USER is not set | ||
311 | # CONFIG_XFRM_SUB_POLICY is not set | ||
312 | # CONFIG_XFRM_MIGRATE is not set | ||
313 | # CONFIG_XFRM_STATISTICS is not set | ||
240 | # CONFIG_NET_KEY is not set | 314 | # CONFIG_NET_KEY is not set |
241 | CONFIG_INET=y | 315 | CONFIG_INET=y |
242 | # CONFIG_IP_MULTICAST is not set | 316 | # CONFIG_IP_MULTICAST is not set |
@@ -255,36 +329,25 @@ CONFIG_IP_PNP_BOOTP=y | |||
255 | # CONFIG_INET_IPCOMP is not set | 329 | # CONFIG_INET_IPCOMP is not set |
256 | # CONFIG_INET_XFRM_TUNNEL is not set | 330 | # CONFIG_INET_XFRM_TUNNEL is not set |
257 | # CONFIG_INET_TUNNEL is not set | 331 | # CONFIG_INET_TUNNEL is not set |
258 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | 332 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
259 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | 333 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
260 | # CONFIG_INET_XFRM_MODE_BEET is not set | 334 | CONFIG_INET_XFRM_MODE_BEET=y |
335 | # CONFIG_INET_LRO is not set | ||
261 | CONFIG_INET_DIAG=y | 336 | CONFIG_INET_DIAG=y |
262 | CONFIG_INET_TCP_DIAG=y | 337 | CONFIG_INET_TCP_DIAG=y |
263 | # CONFIG_TCP_CONG_ADVANCED is not set | 338 | # CONFIG_TCP_CONG_ADVANCED is not set |
264 | CONFIG_TCP_CONG_CUBIC=y | 339 | CONFIG_TCP_CONG_CUBIC=y |
265 | CONFIG_DEFAULT_TCP_CONG="cubic" | 340 | CONFIG_DEFAULT_TCP_CONG="cubic" |
341 | # CONFIG_TCP_MD5SIG is not set | ||
266 | # CONFIG_IPV6 is not set | 342 | # CONFIG_IPV6 is not set |
267 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
268 | # CONFIG_INET6_TUNNEL is not set | ||
269 | # CONFIG_NETWORK_SECMARK is not set | 343 | # CONFIG_NETWORK_SECMARK is not set |
270 | # CONFIG_NETFILTER is not set | 344 | # CONFIG_NETFILTER is not set |
271 | |||
272 | # | ||
273 | # DCCP Configuration (EXPERIMENTAL) | ||
274 | # | ||
275 | # CONFIG_IP_DCCP is not set | 345 | # CONFIG_IP_DCCP is not set |
276 | |||
277 | # | ||
278 | # SCTP Configuration (EXPERIMENTAL) | ||
279 | # | ||
280 | # CONFIG_IP_SCTP is not set | 346 | # CONFIG_IP_SCTP is not set |
281 | |||
282 | # | ||
283 | # TIPC Configuration (EXPERIMENTAL) | ||
284 | # | ||
285 | # CONFIG_TIPC is not set | 347 | # CONFIG_TIPC is not set |
286 | # CONFIG_ATM is not set | 348 | # CONFIG_ATM is not set |
287 | # CONFIG_BRIDGE is not set | 349 | # CONFIG_BRIDGE is not set |
350 | # CONFIG_NET_DSA is not set | ||
288 | # CONFIG_VLAN_8021Q is not set | 351 | # CONFIG_VLAN_8021Q is not set |
289 | # CONFIG_DECNET is not set | 352 | # CONFIG_DECNET is not set |
290 | # CONFIG_LLC2 is not set | 353 | # CONFIG_LLC2 is not set |
@@ -294,10 +357,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
294 | # CONFIG_LAPB is not set | 357 | # CONFIG_LAPB is not set |
295 | # CONFIG_ECONET is not set | 358 | # CONFIG_ECONET is not set |
296 | # CONFIG_WAN_ROUTER is not set | 359 | # CONFIG_WAN_ROUTER is not set |
297 | |||
298 | # | ||
299 | # QoS and/or fair queueing | ||
300 | # | ||
301 | # CONFIG_NET_SCHED is not set | 360 | # CONFIG_NET_SCHED is not set |
302 | 361 | ||
303 | # | 362 | # |
@@ -305,9 +364,14 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
305 | # | 364 | # |
306 | # CONFIG_NET_PKTGEN is not set | 365 | # CONFIG_NET_PKTGEN is not set |
307 | # CONFIG_HAMRADIO is not set | 366 | # CONFIG_HAMRADIO is not set |
367 | # CONFIG_CAN is not set | ||
308 | # CONFIG_IRDA is not set | 368 | # CONFIG_IRDA is not set |
309 | # CONFIG_BT is not set | 369 | # CONFIG_BT is not set |
310 | # CONFIG_IEEE80211 is not set | 370 | # CONFIG_AF_RXRPC is not set |
371 | # CONFIG_PHONET is not set | ||
372 | # CONFIG_WIRELESS is not set | ||
373 | # CONFIG_RFKILL is not set | ||
374 | # CONFIG_NET_9P is not set | ||
311 | 375 | ||
312 | # | 376 | # |
313 | # Device Drivers | 377 | # Device Drivers |
@@ -316,38 +380,37 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
316 | # | 380 | # |
317 | # Generic Driver Options | 381 | # Generic Driver Options |
318 | # | 382 | # |
383 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
319 | CONFIG_STANDALONE=y | 384 | CONFIG_STANDALONE=y |
320 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 385 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
321 | # CONFIG_FW_LOADER is not set | 386 | CONFIG_FW_LOADER=y |
387 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
388 | CONFIG_EXTRA_FIRMWARE="" | ||
322 | # CONFIG_DEBUG_DRIVER is not set | 389 | # CONFIG_DEBUG_DRIVER is not set |
390 | # CONFIG_DEBUG_DEVRES is not set | ||
323 | # CONFIG_SYS_HYPERVISOR is not set | 391 | # CONFIG_SYS_HYPERVISOR is not set |
324 | |||
325 | # | ||
326 | # Connector - unified userspace <-> kernelspace linker | ||
327 | # | ||
328 | # CONFIG_CONNECTOR is not set | 392 | # CONFIG_CONNECTOR is not set |
329 | |||
330 | # | ||
331 | # Memory Technology Devices (MTD) | ||
332 | # | ||
333 | CONFIG_MTD=y | 393 | CONFIG_MTD=y |
334 | # CONFIG_MTD_DEBUG is not set | 394 | # CONFIG_MTD_DEBUG is not set |
335 | # CONFIG_MTD_CONCAT is not set | 395 | CONFIG_MTD_CONCAT=y |
336 | CONFIG_MTD_PARTITIONS=y | 396 | CONFIG_MTD_PARTITIONS=y |
337 | # CONFIG_MTD_REDBOOT_PARTS is not set | 397 | # CONFIG_MTD_REDBOOT_PARTS is not set |
338 | CONFIG_MTD_CMDLINE_PARTS=y | 398 | CONFIG_MTD_CMDLINE_PARTS=y |
339 | # CONFIG_MTD_AFS_PARTS is not set | 399 | # CONFIG_MTD_AFS_PARTS is not set |
400 | # CONFIG_MTD_AR7_PARTS is not set | ||
340 | 401 | ||
341 | # | 402 | # |
342 | # User Modules And Translation Layers | 403 | # User Modules And Translation Layers |
343 | # | 404 | # |
344 | CONFIG_MTD_CHAR=y | 405 | CONFIG_MTD_CHAR=y |
406 | CONFIG_MTD_BLKDEVS=y | ||
345 | CONFIG_MTD_BLOCK=y | 407 | CONFIG_MTD_BLOCK=y |
346 | # CONFIG_FTL is not set | 408 | # CONFIG_FTL is not set |
347 | # CONFIG_NFTL is not set | 409 | # CONFIG_NFTL is not set |
348 | # CONFIG_INFTL is not set | 410 | # CONFIG_INFTL is not set |
349 | # CONFIG_RFD_FTL is not set | 411 | # CONFIG_RFD_FTL is not set |
350 | # CONFIG_SSFDC is not set | 412 | # CONFIG_SSFDC is not set |
413 | # CONFIG_MTD_OOPS is not set | ||
351 | 414 | ||
352 | # | 415 | # |
353 | # RAM/ROM/Flash chip drivers | 416 | # RAM/ROM/Flash chip drivers |
@@ -373,7 +436,6 @@ CONFIG_MTD_CFI_UTIL=y | |||
373 | # CONFIG_MTD_RAM is not set | 436 | # CONFIG_MTD_RAM is not set |
374 | # CONFIG_MTD_ROM is not set | 437 | # CONFIG_MTD_ROM is not set |
375 | # CONFIG_MTD_ABSENT is not set | 438 | # CONFIG_MTD_ABSENT is not set |
376 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
377 | 439 | ||
378 | # | 440 | # |
379 | # Mapping drivers for chip access | 441 | # Mapping drivers for chip access |
@@ -397,115 +459,73 @@ CONFIG_MTD_ARM_INTEGRATOR=y | |||
397 | # CONFIG_MTD_DOC2000 is not set | 459 | # CONFIG_MTD_DOC2000 is not set |
398 | # CONFIG_MTD_DOC2001 is not set | 460 | # CONFIG_MTD_DOC2001 is not set |
399 | # CONFIG_MTD_DOC2001PLUS is not set | 461 | # CONFIG_MTD_DOC2001PLUS is not set |
400 | |||
401 | # | ||
402 | # NAND Flash Device Drivers | ||
403 | # | ||
404 | # CONFIG_MTD_NAND is not set | 462 | # CONFIG_MTD_NAND is not set |
405 | |||
406 | # | ||
407 | # OneNAND Flash Device Drivers | ||
408 | # | ||
409 | # CONFIG_MTD_ONENAND is not set | 463 | # CONFIG_MTD_ONENAND is not set |
410 | 464 | ||
411 | # | 465 | # |
412 | # Parallel port support | 466 | # UBI - Unsorted block images |
413 | # | 467 | # |
468 | # CONFIG_MTD_UBI is not set | ||
414 | # CONFIG_PARPORT is not set | 469 | # CONFIG_PARPORT is not set |
415 | 470 | CONFIG_BLK_DEV=y | |
416 | # | ||
417 | # Plug and Play support | ||
418 | # | ||
419 | |||
420 | # | ||
421 | # Block devices | ||
422 | # | ||
423 | # CONFIG_BLK_DEV_COW_COMMON is not set | 471 | # CONFIG_BLK_DEV_COW_COMMON is not set |
424 | # CONFIG_BLK_DEV_LOOP is not set | 472 | # CONFIG_BLK_DEV_LOOP is not set |
425 | # CONFIG_BLK_DEV_NBD is not set | 473 | # CONFIG_BLK_DEV_NBD is not set |
426 | # CONFIG_BLK_DEV_RAM is not set | 474 | # CONFIG_BLK_DEV_RAM is not set |
427 | CONFIG_BLK_DEV_INITRD=y | ||
428 | # CONFIG_CDROM_PKTCDVD is not set | 475 | # CONFIG_CDROM_PKTCDVD is not set |
429 | # CONFIG_ATA_OVER_ETH is not set | 476 | # CONFIG_ATA_OVER_ETH is not set |
477 | CONFIG_MISC_DEVICES=y | ||
478 | # CONFIG_EEPROM_93CX6 is not set | ||
479 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
480 | CONFIG_HAVE_IDE=y | ||
481 | # CONFIG_IDE is not set | ||
430 | 482 | ||
431 | # | 483 | # |
432 | # SCSI device support | 484 | # SCSI device support |
433 | # | 485 | # |
434 | # CONFIG_RAID_ATTRS is not set | 486 | # CONFIG_RAID_ATTRS is not set |
435 | # CONFIG_SCSI is not set | 487 | # CONFIG_SCSI is not set |
488 | # CONFIG_SCSI_DMA is not set | ||
436 | # CONFIG_SCSI_NETLINK is not set | 489 | # CONFIG_SCSI_NETLINK is not set |
437 | 490 | # CONFIG_ATA is not set | |
438 | # | ||
439 | # Multi-device support (RAID and LVM) | ||
440 | # | ||
441 | # CONFIG_MD is not set | 491 | # CONFIG_MD is not set |
442 | |||
443 | # | ||
444 | # Fusion MPT device support | ||
445 | # | ||
446 | # CONFIG_FUSION is not set | ||
447 | |||
448 | # | ||
449 | # IEEE 1394 (FireWire) support | ||
450 | # | ||
451 | |||
452 | # | ||
453 | # I2O device support | ||
454 | # | ||
455 | |||
456 | # | ||
457 | # Network device support | ||
458 | # | ||
459 | CONFIG_NETDEVICES=y | 492 | CONFIG_NETDEVICES=y |
460 | # CONFIG_DUMMY is not set | 493 | # CONFIG_DUMMY is not set |
461 | # CONFIG_BONDING is not set | 494 | # CONFIG_BONDING is not set |
495 | # CONFIG_MACVLAN is not set | ||
462 | # CONFIG_EQUALIZER is not set | 496 | # CONFIG_EQUALIZER is not set |
463 | # CONFIG_TUN is not set | 497 | # CONFIG_TUN is not set |
464 | 498 | # CONFIG_VETH is not set | |
465 | # | ||
466 | # PHY device support | ||
467 | # | ||
468 | # CONFIG_PHYLIB is not set | 499 | # CONFIG_PHYLIB is not set |
469 | |||
470 | # | ||
471 | # Ethernet (10 or 100Mbit) | ||
472 | # | ||
473 | CONFIG_NET_ETHERNET=y | 500 | CONFIG_NET_ETHERNET=y |
474 | CONFIG_MII=y | 501 | CONFIG_MII=y |
502 | # CONFIG_AX88796 is not set | ||
475 | CONFIG_SMC91X=y | 503 | CONFIG_SMC91X=y |
476 | # CONFIG_DM9000 is not set | 504 | # CONFIG_DM9000 is not set |
477 | 505 | CONFIG_SMC911X=y | |
478 | # | 506 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
479 | # Ethernet (1000 Mbit) | 507 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
480 | # | 508 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
481 | 509 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | |
482 | # | 510 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set |
483 | # Ethernet (10000 Mbit) | 511 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
484 | # | 512 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
485 | 513 | # CONFIG_B44 is not set | |
486 | # | 514 | # CONFIG_NETDEV_1000 is not set |
487 | # Token Ring devices | 515 | # CONFIG_NETDEV_10000 is not set |
488 | # | 516 | |
489 | 517 | # | |
490 | # | 518 | # Wireless LAN |
491 | # Wireless LAN (non-hamradio) | 519 | # |
492 | # | 520 | # CONFIG_WLAN_PRE80211 is not set |
493 | # CONFIG_NET_RADIO is not set | 521 | # CONFIG_WLAN_80211 is not set |
494 | 522 | # CONFIG_IWLWIFI_LEDS is not set | |
495 | # | ||
496 | # Wan interfaces | ||
497 | # | ||
498 | # CONFIG_WAN is not set | 523 | # CONFIG_WAN is not set |
499 | # CONFIG_PPP is not set | 524 | # CONFIG_PPP is not set |
500 | # CONFIG_SLIP is not set | 525 | # CONFIG_SLIP is not set |
501 | # CONFIG_SHAPER is not set | ||
502 | # CONFIG_NETCONSOLE is not set | 526 | # CONFIG_NETCONSOLE is not set |
503 | # CONFIG_NETPOLL is not set | 527 | # CONFIG_NETPOLL is not set |
504 | # CONFIG_NET_POLL_CONTROLLER is not set | 528 | # CONFIG_NET_POLL_CONTROLLER is not set |
505 | |||
506 | # | ||
507 | # ISDN subsystem | ||
508 | # | ||
509 | # CONFIG_ISDN is not set | 529 | # CONFIG_ISDN is not set |
510 | 530 | ||
511 | # | 531 | # |
@@ -513,6 +533,7 @@ CONFIG_SMC91X=y | |||
513 | # | 533 | # |
514 | CONFIG_INPUT=y | 534 | CONFIG_INPUT=y |
515 | # CONFIG_INPUT_FF_MEMLESS is not set | 535 | # CONFIG_INPUT_FF_MEMLESS is not set |
536 | # CONFIG_INPUT_POLLDEV is not set | ||
516 | 537 | ||
517 | # | 538 | # |
518 | # Userland interfaces | 539 | # Userland interfaces |
@@ -522,7 +543,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y | |||
522 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | 543 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 |
523 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | 544 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 |
524 | # CONFIG_INPUT_JOYDEV is not set | 545 | # CONFIG_INPUT_JOYDEV is not set |
525 | # CONFIG_INPUT_TSDEV is not set | ||
526 | # CONFIG_INPUT_EVDEV is not set | 546 | # CONFIG_INPUT_EVDEV is not set |
527 | # CONFIG_INPUT_EVBUG is not set | 547 | # CONFIG_INPUT_EVBUG is not set |
528 | 548 | ||
@@ -538,9 +558,16 @@ CONFIG_KEYBOARD_ATKBD=y | |||
538 | # CONFIG_KEYBOARD_STOWAWAY is not set | 558 | # CONFIG_KEYBOARD_STOWAWAY is not set |
539 | CONFIG_INPUT_MOUSE=y | 559 | CONFIG_INPUT_MOUSE=y |
540 | CONFIG_MOUSE_PS2=y | 560 | CONFIG_MOUSE_PS2=y |
561 | CONFIG_MOUSE_PS2_ALPS=y | ||
562 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
563 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
564 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
565 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
566 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
541 | # CONFIG_MOUSE_SERIAL is not set | 567 | # CONFIG_MOUSE_SERIAL is not set |
542 | # CONFIG_MOUSE_VSXXXAA is not set | 568 | # CONFIG_MOUSE_VSXXXAA is not set |
543 | # CONFIG_INPUT_JOYSTICK is not set | 569 | # CONFIG_INPUT_JOYSTICK is not set |
570 | # CONFIG_INPUT_TABLET is not set | ||
544 | # CONFIG_INPUT_TOUCHSCREEN is not set | 571 | # CONFIG_INPUT_TOUCHSCREEN is not set |
545 | # CONFIG_INPUT_MISC is not set | 572 | # CONFIG_INPUT_MISC is not set |
546 | 573 | ||
@@ -558,9 +585,11 @@ CONFIG_SERIO_LIBPS2=y | |||
558 | # Character devices | 585 | # Character devices |
559 | # | 586 | # |
560 | CONFIG_VT=y | 587 | CONFIG_VT=y |
588 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
561 | CONFIG_VT_CONSOLE=y | 589 | CONFIG_VT_CONSOLE=y |
562 | CONFIG_HW_CONSOLE=y | 590 | CONFIG_HW_CONSOLE=y |
563 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 591 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
592 | CONFIG_DEVKMEM=y | ||
564 | # CONFIG_SERIAL_NONSTANDARD is not set | 593 | # CONFIG_SERIAL_NONSTANDARD is not set |
565 | 594 | ||
566 | # | 595 | # |
@@ -579,97 +608,91 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
579 | CONFIG_UNIX98_PTYS=y | 608 | CONFIG_UNIX98_PTYS=y |
580 | CONFIG_LEGACY_PTYS=y | 609 | CONFIG_LEGACY_PTYS=y |
581 | CONFIG_LEGACY_PTY_COUNT=16 | 610 | CONFIG_LEGACY_PTY_COUNT=16 |
582 | |||
583 | # | ||
584 | # IPMI | ||
585 | # | ||
586 | # CONFIG_IPMI_HANDLER is not set | 611 | # CONFIG_IPMI_HANDLER is not set |
587 | |||
588 | # | ||
589 | # Watchdog Cards | ||
590 | # | ||
591 | # CONFIG_WATCHDOG is not set | ||
592 | # CONFIG_HW_RANDOM is not set | 612 | # CONFIG_HW_RANDOM is not set |
593 | # CONFIG_NVRAM is not set | 613 | # CONFIG_NVRAM is not set |
594 | # CONFIG_DTLK is not set | ||
595 | # CONFIG_R3964 is not set | 614 | # CONFIG_R3964 is not set |
596 | |||
597 | # | ||
598 | # Ftape, the floppy tape device driver | ||
599 | # | ||
600 | # CONFIG_RAW_DRIVER is not set | 615 | # CONFIG_RAW_DRIVER is not set |
601 | |||
602 | # | ||
603 | # TPM devices | ||
604 | # | ||
605 | # CONFIG_TCG_TPM is not set | 616 | # CONFIG_TCG_TPM is not set |
606 | |||
607 | # | ||
608 | # I2C support | ||
609 | # | ||
610 | # CONFIG_I2C is not set | 617 | # CONFIG_I2C is not set |
611 | |||
612 | # | ||
613 | # SPI support | ||
614 | # | ||
615 | # CONFIG_SPI is not set | 618 | # CONFIG_SPI is not set |
616 | # CONFIG_SPI_MASTER is not set | ||
617 | |||
618 | # | ||
619 | # Dallas's 1-wire bus | ||
620 | # | ||
621 | # CONFIG_W1 is not set | 619 | # CONFIG_W1 is not set |
622 | 620 | # CONFIG_POWER_SUPPLY is not set | |
623 | # | ||
624 | # Hardware Monitoring support | ||
625 | # | ||
626 | # CONFIG_HWMON is not set | 621 | # CONFIG_HWMON is not set |
627 | # CONFIG_HWMON_VID is not set | 622 | # CONFIG_THERMAL is not set |
628 | 623 | # CONFIG_THERMAL_HWMON is not set | |
629 | # | 624 | # CONFIG_WATCHDOG is not set |
630 | # Misc devices | ||
631 | # | ||
632 | # CONFIG_SGI_IOC4 is not set | ||
633 | # CONFIG_TIFM_CORE is not set | ||
634 | 625 | ||
635 | # | 626 | # |
636 | # LED devices | 627 | # Sonics Silicon Backplane |
637 | # | 628 | # |
638 | # CONFIG_NEW_LEDS is not set | 629 | CONFIG_SSB_POSSIBLE=y |
630 | # CONFIG_SSB is not set | ||
639 | 631 | ||
640 | # | 632 | # |
641 | # LED drivers | 633 | # Multifunction device drivers |
642 | # | 634 | # |
635 | # CONFIG_MFD_CORE is not set | ||
636 | # CONFIG_MFD_SM501 is not set | ||
637 | # CONFIG_HTC_PASIC3 is not set | ||
638 | # CONFIG_MFD_TMIO is not set | ||
639 | # CONFIG_MFD_T7L66XB is not set | ||
640 | # CONFIG_MFD_TC6387XB is not set | ||
641 | # CONFIG_MFD_WM8400 is not set | ||
643 | 642 | ||
644 | # | 643 | # |
645 | # LED Triggers | 644 | # Multimedia devices |
646 | # | 645 | # |
647 | 646 | ||
648 | # | 647 | # |
649 | # Multimedia devices | 648 | # Multimedia core support |
650 | # | 649 | # |
651 | # CONFIG_VIDEO_DEV is not set | 650 | # CONFIG_VIDEO_DEV is not set |
651 | # CONFIG_DVB_CORE is not set | ||
652 | # CONFIG_VIDEO_MEDIA is not set | ||
652 | 653 | ||
653 | # | 654 | # |
654 | # Digital Video Broadcasting Devices | 655 | # Multimedia drivers |
655 | # | 656 | # |
656 | # CONFIG_DVB is not set | 657 | # CONFIG_DAB is not set |
657 | 658 | ||
658 | # | 659 | # |
659 | # Graphics support | 660 | # Graphics support |
660 | # | 661 | # |
661 | # CONFIG_FIRMWARE_EDID is not set | 662 | # CONFIG_VGASTATE is not set |
663 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
662 | CONFIG_FB=y | 664 | CONFIG_FB=y |
665 | # CONFIG_FIRMWARE_EDID is not set | ||
666 | # CONFIG_FB_DDC is not set | ||
667 | # CONFIG_FB_BOOT_VESA_SUPPORT is not set | ||
663 | CONFIG_FB_CFB_FILLRECT=y | 668 | CONFIG_FB_CFB_FILLRECT=y |
664 | CONFIG_FB_CFB_COPYAREA=y | 669 | CONFIG_FB_CFB_COPYAREA=y |
665 | CONFIG_FB_CFB_IMAGEBLIT=y | 670 | CONFIG_FB_CFB_IMAGEBLIT=y |
671 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
672 | # CONFIG_FB_SYS_FILLRECT is not set | ||
673 | # CONFIG_FB_SYS_COPYAREA is not set | ||
674 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
675 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
676 | # CONFIG_FB_SYS_FOPS is not set | ||
677 | # CONFIG_FB_SVGALIB is not set | ||
666 | # CONFIG_FB_MACMODES is not set | 678 | # CONFIG_FB_MACMODES is not set |
667 | # CONFIG_FB_BACKLIGHT is not set | 679 | # CONFIG_FB_BACKLIGHT is not set |
668 | # CONFIG_FB_MODE_HELPERS is not set | 680 | # CONFIG_FB_MODE_HELPERS is not set |
669 | # CONFIG_FB_TILEBLITTING is not set | 681 | # CONFIG_FB_TILEBLITTING is not set |
682 | |||
683 | # | ||
684 | # Frame buffer hardware drivers | ||
685 | # | ||
670 | CONFIG_FB_ARMCLCD=y | 686 | CONFIG_FB_ARMCLCD=y |
671 | # CONFIG_FB_S1D13XXX is not set | 687 | # CONFIG_FB_S1D13XXX is not set |
672 | # CONFIG_FB_VIRTUAL is not set | 688 | # CONFIG_FB_VIRTUAL is not set |
689 | # CONFIG_FB_METRONOME is not set | ||
690 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
691 | |||
692 | # | ||
693 | # Display device support | ||
694 | # | ||
695 | # CONFIG_DISPLAY_SUPPORT is not set | ||
673 | 696 | ||
674 | # | 697 | # |
675 | # Console display driver support | 698 | # Console display driver support |
@@ -677,28 +700,17 @@ CONFIG_FB_ARMCLCD=y | |||
677 | # CONFIG_VGA_CONSOLE is not set | 700 | # CONFIG_VGA_CONSOLE is not set |
678 | CONFIG_DUMMY_CONSOLE=y | 701 | CONFIG_DUMMY_CONSOLE=y |
679 | CONFIG_FRAMEBUFFER_CONSOLE=y | 702 | CONFIG_FRAMEBUFFER_CONSOLE=y |
703 | # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set | ||
680 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | 704 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set |
681 | # CONFIG_FONTS is not set | 705 | # CONFIG_FONTS is not set |
682 | CONFIG_FONT_8x8=y | 706 | CONFIG_FONT_8x8=y |
683 | CONFIG_FONT_8x16=y | 707 | CONFIG_FONT_8x16=y |
684 | |||
685 | # | ||
686 | # Logo configuration | ||
687 | # | ||
688 | CONFIG_LOGO=y | 708 | CONFIG_LOGO=y |
689 | # CONFIG_LOGO_LINUX_MONO is not set | 709 | # CONFIG_LOGO_LINUX_MONO is not set |
690 | # CONFIG_LOGO_LINUX_VGA16 is not set | 710 | # CONFIG_LOGO_LINUX_VGA16 is not set |
691 | CONFIG_LOGO_LINUX_CLUT224=y | 711 | CONFIG_LOGO_LINUX_CLUT224=y |
692 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
693 | |||
694 | # | ||
695 | # Sound | ||
696 | # | ||
697 | CONFIG_SOUND=y | 712 | CONFIG_SOUND=y |
698 | 713 | CONFIG_SOUND_OSS_CORE=y | |
699 | # | ||
700 | # Advanced Linux Sound Architecture | ||
701 | # | ||
702 | CONFIG_SND=y | 714 | CONFIG_SND=y |
703 | CONFIG_SND_TIMER=y | 715 | CONFIG_SND_TIMER=y |
704 | CONFIG_SND_PCM=y | 716 | CONFIG_SND_PCM=y |
@@ -712,100 +724,65 @@ CONFIG_SND_SUPPORT_OLD_API=y | |||
712 | CONFIG_SND_VERBOSE_PROCFS=y | 724 | CONFIG_SND_VERBOSE_PROCFS=y |
713 | # CONFIG_SND_VERBOSE_PRINTK is not set | 725 | # CONFIG_SND_VERBOSE_PRINTK is not set |
714 | # CONFIG_SND_DEBUG is not set | 726 | # CONFIG_SND_DEBUG is not set |
715 | 727 | CONFIG_SND_VMASTER=y | |
716 | # | 728 | CONFIG_SND_AC97_CODEC=y |
717 | # Generic devices | 729 | # CONFIG_SND_DRIVERS is not set |
718 | # | 730 | CONFIG_SND_ARM=y |
719 | CONFIG_SND_AC97_CODEC=m | 731 | CONFIG_SND_ARMAACI=y |
720 | CONFIG_SND_AC97_BUS=m | 732 | # CONFIG_SND_SOC is not set |
721 | # CONFIG_SND_DUMMY is not set | ||
722 | # CONFIG_SND_MTPAV is not set | ||
723 | # CONFIG_SND_SERIAL_U16550 is not set | ||
724 | # CONFIG_SND_MPU401 is not set | ||
725 | |||
726 | # | ||
727 | # ALSA ARM devices | ||
728 | # | ||
729 | CONFIG_SND_ARMAACI=m | ||
730 | |||
731 | # | ||
732 | # Open Sound System | ||
733 | # | ||
734 | # CONFIG_SOUND_PRIME is not set | 733 | # CONFIG_SOUND_PRIME is not set |
735 | 734 | CONFIG_AC97_BUS=y | |
736 | # | 735 | # CONFIG_HID_SUPPORT is not set |
737 | # USB support | 736 | # CONFIG_USB_SUPPORT is not set |
738 | # | ||
739 | CONFIG_USB_ARCH_HAS_HCD=y | ||
740 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
741 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
742 | # CONFIG_USB is not set | ||
743 | |||
744 | # | ||
745 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
746 | # | ||
747 | |||
748 | # | ||
749 | # USB Gadget Support | ||
750 | # | ||
751 | # CONFIG_USB_GADGET is not set | ||
752 | |||
753 | # | ||
754 | # MMC/SD Card support | ||
755 | # | ||
756 | CONFIG_MMC=y | 737 | CONFIG_MMC=y |
757 | # CONFIG_MMC_DEBUG is not set | 738 | # CONFIG_MMC_DEBUG is not set |
758 | CONFIG_MMC_BLOCK=y | 739 | # CONFIG_MMC_UNSAFE_RESUME is not set |
759 | CONFIG_MMC_ARMMMCI=y | ||
760 | # CONFIG_MMC_TIFM_SD is not set | ||
761 | 740 | ||
762 | # | 741 | # |
763 | # Real Time Clock | 742 | # MMC/SD/SDIO Card Drivers |
764 | # | 743 | # |
765 | CONFIG_RTC_LIB=y | 744 | CONFIG_MMC_BLOCK=y |
766 | CONFIG_RTC_CLASS=y | 745 | CONFIG_MMC_BLOCK_BOUNCE=y |
767 | CONFIG_RTC_HCTOSYS=y | 746 | # CONFIG_SDIO_UART is not set |
768 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | 747 | # CONFIG_MMC_TEST is not set |
769 | # CONFIG_RTC_DEBUG is not set | ||
770 | 748 | ||
771 | # | 749 | # |
772 | # RTC interfaces | 750 | # MMC/SD/SDIO Host Controller Drivers |
773 | # | 751 | # |
774 | CONFIG_RTC_INTF_SYSFS=y | 752 | CONFIG_MMC_ARMMMCI=y |
775 | CONFIG_RTC_INTF_PROC=y | 753 | # CONFIG_MMC_SDHCI is not set |
776 | CONFIG_RTC_INTF_DEV=y | 754 | # CONFIG_MEMSTICK is not set |
777 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | 755 | # CONFIG_ACCESSIBILITY is not set |
756 | # CONFIG_NEW_LEDS is not set | ||
757 | CONFIG_RTC_LIB=y | ||
758 | # CONFIG_RTC_CLASS is not set | ||
759 | # CONFIG_DMADEVICES is not set | ||
778 | 760 | ||
779 | # | 761 | # |
780 | # RTC drivers | 762 | # Voltage and Current regulators |
781 | # | 763 | # |
782 | # CONFIG_RTC_DRV_DS1553 is not set | 764 | # CONFIG_REGULATOR is not set |
783 | # CONFIG_RTC_DRV_DS1742 is not set | 765 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set |
784 | # CONFIG_RTC_DRV_M48T86 is not set | 766 | # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set |
785 | CONFIG_RTC_DRV_PL031=y | 767 | # CONFIG_REGULATOR_BQ24022 is not set |
786 | # CONFIG_RTC_DRV_TEST is not set | 768 | # CONFIG_UIO is not set |
787 | # CONFIG_RTC_DRV_V3020 is not set | ||
788 | 769 | ||
789 | # | 770 | # |
790 | # File systems | 771 | # File systems |
791 | # | 772 | # |
792 | CONFIG_EXT2_FS=y | 773 | # CONFIG_EXT2_FS is not set |
793 | # CONFIG_EXT2_FS_XATTR is not set | ||
794 | # CONFIG_EXT2_FS_XIP is not set | ||
795 | # CONFIG_EXT3_FS is not set | 774 | # CONFIG_EXT3_FS is not set |
796 | # CONFIG_EXT4DEV_FS is not set | 775 | # CONFIG_EXT4_FS is not set |
797 | # CONFIG_REISERFS_FS is not set | 776 | # CONFIG_REISERFS_FS is not set |
798 | # CONFIG_JFS_FS is not set | 777 | # CONFIG_JFS_FS is not set |
799 | # CONFIG_FS_POSIX_ACL is not set | 778 | # CONFIG_FS_POSIX_ACL is not set |
779 | CONFIG_FILE_LOCKING=y | ||
800 | # CONFIG_XFS_FS is not set | 780 | # CONFIG_XFS_FS is not set |
801 | # CONFIG_GFS2_FS is not set | ||
802 | # CONFIG_OCFS2_FS is not set | 781 | # CONFIG_OCFS2_FS is not set |
803 | # CONFIG_MINIX_FS is not set | 782 | CONFIG_DNOTIFY=y |
804 | # CONFIG_ROMFS_FS is not set | ||
805 | CONFIG_INOTIFY=y | 783 | CONFIG_INOTIFY=y |
806 | # CONFIG_INOTIFY_USER is not set | 784 | CONFIG_INOTIFY_USER=y |
807 | # CONFIG_QUOTA is not set | 785 | # CONFIG_QUOTA is not set |
808 | CONFIG_DNOTIFY=y | ||
809 | # CONFIG_AUTOFS_FS is not set | 786 | # CONFIG_AUTOFS_FS is not set |
810 | # CONFIG_AUTOFS4_FS is not set | 787 | # CONFIG_AUTOFS4_FS is not set |
811 | # CONFIG_FUSE_FS is not set | 788 | # CONFIG_FUSE_FS is not set |
@@ -831,11 +808,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
831 | # | 808 | # |
832 | CONFIG_PROC_FS=y | 809 | CONFIG_PROC_FS=y |
833 | CONFIG_PROC_SYSCTL=y | 810 | CONFIG_PROC_SYSCTL=y |
811 | CONFIG_PROC_PAGE_MONITOR=y | ||
834 | CONFIG_SYSFS=y | 812 | CONFIG_SYSFS=y |
835 | CONFIG_TMPFS=y | 813 | CONFIG_TMPFS=y |
836 | # CONFIG_TMPFS_POSIX_ACL is not set | 814 | # CONFIG_TMPFS_POSIX_ACL is not set |
837 | # CONFIG_HUGETLB_PAGE is not set | 815 | # CONFIG_HUGETLB_PAGE is not set |
838 | CONFIG_RAMFS=y | ||
839 | # CONFIG_CONFIGFS_FS is not set | 816 | # CONFIG_CONFIGFS_FS is not set |
840 | 817 | ||
841 | # | 818 | # |
@@ -848,29 +825,28 @@ CONFIG_RAMFS=y | |||
848 | # CONFIG_BEFS_FS is not set | 825 | # CONFIG_BEFS_FS is not set |
849 | # CONFIG_BFS_FS is not set | 826 | # CONFIG_BFS_FS is not set |
850 | # CONFIG_EFS_FS is not set | 827 | # CONFIG_EFS_FS is not set |
851 | # CONFIG_JFFS_FS is not set | ||
852 | # CONFIG_JFFS2_FS is not set | 828 | # CONFIG_JFFS2_FS is not set |
853 | CONFIG_CRAMFS=y | 829 | CONFIG_CRAMFS=y |
854 | # CONFIG_VXFS_FS is not set | 830 | # CONFIG_VXFS_FS is not set |
831 | # CONFIG_MINIX_FS is not set | ||
832 | # CONFIG_OMFS_FS is not set | ||
855 | # CONFIG_HPFS_FS is not set | 833 | # CONFIG_HPFS_FS is not set |
856 | # CONFIG_QNX4FS_FS is not set | 834 | # CONFIG_QNX4FS_FS is not set |
835 | # CONFIG_ROMFS_FS is not set | ||
857 | # CONFIG_SYSV_FS is not set | 836 | # CONFIG_SYSV_FS is not set |
858 | # CONFIG_UFS_FS is not set | 837 | # CONFIG_UFS_FS is not set |
859 | 838 | CONFIG_NETWORK_FILESYSTEMS=y | |
860 | # | ||
861 | # Network File Systems | ||
862 | # | ||
863 | CONFIG_NFS_FS=y | 839 | CONFIG_NFS_FS=y |
864 | CONFIG_NFS_V3=y | 840 | CONFIG_NFS_V3=y |
865 | # CONFIG_NFS_V3_ACL is not set | 841 | # CONFIG_NFS_V3_ACL is not set |
866 | # CONFIG_NFS_V4 is not set | 842 | # CONFIG_NFS_V4 is not set |
867 | # CONFIG_NFS_DIRECTIO is not set | ||
868 | # CONFIG_NFSD is not set | ||
869 | CONFIG_ROOT_NFS=y | 843 | CONFIG_ROOT_NFS=y |
844 | # CONFIG_NFSD is not set | ||
870 | CONFIG_LOCKD=y | 845 | CONFIG_LOCKD=y |
871 | CONFIG_LOCKD_V4=y | 846 | CONFIG_LOCKD_V4=y |
872 | CONFIG_NFS_COMMON=y | 847 | CONFIG_NFS_COMMON=y |
873 | CONFIG_SUNRPC=y | 848 | CONFIG_SUNRPC=y |
849 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
874 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 850 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
875 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 851 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
876 | # CONFIG_SMB_FS is not set | 852 | # CONFIG_SMB_FS is not set |
@@ -878,17 +854,12 @@ CONFIG_SUNRPC=y | |||
878 | # CONFIG_NCP_FS is not set | 854 | # CONFIG_NCP_FS is not set |
879 | # CONFIG_CODA_FS is not set | 855 | # CONFIG_CODA_FS is not set |
880 | # CONFIG_AFS_FS is not set | 856 | # CONFIG_AFS_FS is not set |
881 | # CONFIG_9P_FS is not set | ||
882 | 857 | ||
883 | # | 858 | # |
884 | # Partition Types | 859 | # Partition Types |
885 | # | 860 | # |
886 | # CONFIG_PARTITION_ADVANCED is not set | 861 | # CONFIG_PARTITION_ADVANCED is not set |
887 | CONFIG_MSDOS_PARTITION=y | 862 | CONFIG_MSDOS_PARTITION=y |
888 | |||
889 | # | ||
890 | # Native Language Support | ||
891 | # | ||
892 | CONFIG_NLS=y | 863 | CONFIG_NLS=y |
893 | CONFIG_NLS_DEFAULT="iso8859-1" | 864 | CONFIG_NLS_DEFAULT="iso8859-1" |
894 | CONFIG_NLS_CODEPAGE_437=y | 865 | CONFIG_NLS_CODEPAGE_437=y |
@@ -929,64 +900,177 @@ CONFIG_NLS_ISO8859_1=y | |||
929 | # CONFIG_NLS_KOI8_R is not set | 900 | # CONFIG_NLS_KOI8_R is not set |
930 | # CONFIG_NLS_KOI8_U is not set | 901 | # CONFIG_NLS_KOI8_U is not set |
931 | # CONFIG_NLS_UTF8 is not set | 902 | # CONFIG_NLS_UTF8 is not set |
932 | 903 | # CONFIG_DLM is not set | |
933 | # | ||
934 | # Profiling support | ||
935 | # | ||
936 | # CONFIG_PROFILING is not set | ||
937 | 904 | ||
938 | # | 905 | # |
939 | # Kernel hacking | 906 | # Kernel hacking |
940 | # | 907 | # |
941 | # CONFIG_PRINTK_TIME is not set | 908 | # CONFIG_PRINTK_TIME is not set |
942 | # CONFIG_ENABLE_MUST_CHECK is not set | 909 | CONFIG_ENABLE_WARN_DEPRECATED=y |
910 | CONFIG_ENABLE_MUST_CHECK=y | ||
911 | CONFIG_FRAME_WARN=1024 | ||
943 | CONFIG_MAGIC_SYSRQ=y | 912 | CONFIG_MAGIC_SYSRQ=y |
944 | # CONFIG_UNUSED_SYMBOLS is not set | 913 | # CONFIG_UNUSED_SYMBOLS is not set |
914 | # CONFIG_DEBUG_FS is not set | ||
915 | # CONFIG_HEADERS_CHECK is not set | ||
945 | CONFIG_DEBUG_KERNEL=y | 916 | CONFIG_DEBUG_KERNEL=y |
946 | CONFIG_LOG_BUF_SHIFT=14 | 917 | # CONFIG_DEBUG_SHIRQ is not set |
947 | CONFIG_DETECT_SOFTLOCKUP=y | 918 | CONFIG_DETECT_SOFTLOCKUP=y |
919 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
920 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
921 | # CONFIG_SCHED_DEBUG is not set | ||
948 | # CONFIG_SCHEDSTATS is not set | 922 | # CONFIG_SCHEDSTATS is not set |
923 | # CONFIG_TIMER_STATS is not set | ||
924 | # CONFIG_DEBUG_OBJECTS is not set | ||
949 | # CONFIG_DEBUG_SLAB is not set | 925 | # CONFIG_DEBUG_SLAB is not set |
950 | # CONFIG_DEBUG_RT_MUTEXES is not set | 926 | # CONFIG_DEBUG_RT_MUTEXES is not set |
951 | # CONFIG_RT_MUTEX_TESTER is not set | 927 | # CONFIG_RT_MUTEX_TESTER is not set |
952 | CONFIG_DEBUG_SPINLOCK=y | 928 | # CONFIG_DEBUG_SPINLOCK is not set |
953 | CONFIG_DEBUG_MUTEXES=y | 929 | # CONFIG_DEBUG_MUTEXES is not set |
954 | CONFIG_DEBUG_RWSEMS=y | 930 | # CONFIG_DEBUG_LOCK_ALLOC is not set |
931 | # CONFIG_PROVE_LOCKING is not set | ||
932 | # CONFIG_LOCK_STAT is not set | ||
955 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 933 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
956 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 934 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
957 | # CONFIG_DEBUG_KOBJECT is not set | 935 | # CONFIG_DEBUG_KOBJECT is not set |
958 | CONFIG_DEBUG_BUGVERBOSE=y | 936 | CONFIG_DEBUG_BUGVERBOSE=y |
959 | # CONFIG_DEBUG_INFO is not set | 937 | # CONFIG_DEBUG_INFO is not set |
960 | # CONFIG_DEBUG_FS is not set | ||
961 | # CONFIG_DEBUG_VM is not set | 938 | # CONFIG_DEBUG_VM is not set |
939 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
940 | CONFIG_DEBUG_MEMORY_INIT=y | ||
962 | # CONFIG_DEBUG_LIST is not set | 941 | # CONFIG_DEBUG_LIST is not set |
942 | # CONFIG_DEBUG_SG is not set | ||
963 | CONFIG_FRAME_POINTER=y | 943 | CONFIG_FRAME_POINTER=y |
964 | # CONFIG_UNWIND_INFO is not set | 944 | # CONFIG_BOOT_PRINTK_DELAY is not set |
965 | CONFIG_FORCED_INLINING=y | ||
966 | # CONFIG_HEADERS_CHECK is not set | ||
967 | # CONFIG_RCU_TORTURE_TEST is not set | 945 | # CONFIG_RCU_TORTURE_TEST is not set |
946 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
947 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
948 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
949 | # CONFIG_FAULT_INJECTION is not set | ||
950 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
951 | CONFIG_NOP_TRACER=y | ||
952 | CONFIG_HAVE_FTRACE=y | ||
953 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
954 | # CONFIG_FTRACE is not set | ||
955 | # CONFIG_IRQSOFF_TRACER is not set | ||
956 | # CONFIG_SCHED_TRACER is not set | ||
957 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
958 | # CONFIG_BOOT_TRACER is not set | ||
959 | # CONFIG_STACK_TRACER is not set | ||
960 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
961 | # CONFIG_SAMPLES is not set | ||
962 | CONFIG_HAVE_ARCH_KGDB=y | ||
963 | # CONFIG_KGDB is not set | ||
968 | CONFIG_DEBUG_USER=y | 964 | CONFIG_DEBUG_USER=y |
969 | CONFIG_DEBUG_ERRORS=y | 965 | CONFIG_DEBUG_ERRORS=y |
970 | CONFIG_DEBUG_LL=y | 966 | # CONFIG_DEBUG_STACK_USAGE is not set |
971 | # CONFIG_DEBUG_ICEDCC is not set | 967 | # CONFIG_DEBUG_LL is not set |
972 | 968 | ||
973 | # | 969 | # |
974 | # Security options | 970 | # Security options |
975 | # | 971 | # |
976 | # CONFIG_KEYS is not set | 972 | # CONFIG_KEYS is not set |
977 | # CONFIG_SECURITY is not set | 973 | # CONFIG_SECURITY is not set |
974 | # CONFIG_SECURITYFS is not set | ||
975 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
976 | CONFIG_CRYPTO=y | ||
977 | |||
978 | # | ||
979 | # Crypto core or helper | ||
980 | # | ||
981 | # CONFIG_CRYPTO_FIPS is not set | ||
982 | # CONFIG_CRYPTO_MANAGER is not set | ||
983 | # CONFIG_CRYPTO_GF128MUL is not set | ||
984 | # CONFIG_CRYPTO_NULL is not set | ||
985 | # CONFIG_CRYPTO_CRYPTD is not set | ||
986 | # CONFIG_CRYPTO_AUTHENC is not set | ||
987 | # CONFIG_CRYPTO_TEST is not set | ||
988 | |||
989 | # | ||
990 | # Authenticated Encryption with Associated Data | ||
991 | # | ||
992 | # CONFIG_CRYPTO_CCM is not set | ||
993 | # CONFIG_CRYPTO_GCM is not set | ||
994 | # CONFIG_CRYPTO_SEQIV is not set | ||
995 | |||
996 | # | ||
997 | # Block modes | ||
998 | # | ||
999 | # CONFIG_CRYPTO_CBC is not set | ||
1000 | # CONFIG_CRYPTO_CTR is not set | ||
1001 | # CONFIG_CRYPTO_CTS is not set | ||
1002 | # CONFIG_CRYPTO_ECB is not set | ||
1003 | # CONFIG_CRYPTO_LRW is not set | ||
1004 | # CONFIG_CRYPTO_PCBC is not set | ||
1005 | # CONFIG_CRYPTO_XTS is not set | ||
1006 | |||
1007 | # | ||
1008 | # Hash modes | ||
1009 | # | ||
1010 | # CONFIG_CRYPTO_HMAC is not set | ||
1011 | # CONFIG_CRYPTO_XCBC is not set | ||
1012 | |||
1013 | # | ||
1014 | # Digest | ||
1015 | # | ||
1016 | # CONFIG_CRYPTO_CRC32C is not set | ||
1017 | # CONFIG_CRYPTO_MD4 is not set | ||
1018 | # CONFIG_CRYPTO_MD5 is not set | ||
1019 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1020 | # CONFIG_CRYPTO_RMD128 is not set | ||
1021 | # CONFIG_CRYPTO_RMD160 is not set | ||
1022 | # CONFIG_CRYPTO_RMD256 is not set | ||
1023 | # CONFIG_CRYPTO_RMD320 is not set | ||
1024 | # CONFIG_CRYPTO_SHA1 is not set | ||
1025 | # CONFIG_CRYPTO_SHA256 is not set | ||
1026 | # CONFIG_CRYPTO_SHA512 is not set | ||
1027 | # CONFIG_CRYPTO_TGR192 is not set | ||
1028 | # CONFIG_CRYPTO_WP512 is not set | ||
1029 | |||
1030 | # | ||
1031 | # Ciphers | ||
1032 | # | ||
1033 | # CONFIG_CRYPTO_AES is not set | ||
1034 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1035 | # CONFIG_CRYPTO_ARC4 is not set | ||
1036 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1037 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1038 | # CONFIG_CRYPTO_CAST5 is not set | ||
1039 | # CONFIG_CRYPTO_CAST6 is not set | ||
1040 | # CONFIG_CRYPTO_DES is not set | ||
1041 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1042 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1043 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1044 | # CONFIG_CRYPTO_SEED is not set | ||
1045 | # CONFIG_CRYPTO_SERPENT is not set | ||
1046 | # CONFIG_CRYPTO_TEA is not set | ||
1047 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1048 | |||
1049 | # | ||
1050 | # Compression | ||
1051 | # | ||
1052 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1053 | # CONFIG_CRYPTO_LZO is not set | ||
978 | 1054 | ||
979 | # | 1055 | # |
980 | # Cryptographic options | 1056 | # Random Number Generation |
981 | # | 1057 | # |
982 | # CONFIG_CRYPTO is not set | 1058 | # CONFIG_CRYPTO_ANSI_CPRNG is not set |
1059 | # CONFIG_CRYPTO_HW is not set | ||
983 | 1060 | ||
984 | # | 1061 | # |
985 | # Library routines | 1062 | # Library routines |
986 | # | 1063 | # |
1064 | CONFIG_BITREVERSE=y | ||
987 | # CONFIG_CRC_CCITT is not set | 1065 | # CONFIG_CRC_CCITT is not set |
988 | # CONFIG_CRC16 is not set | 1066 | # CONFIG_CRC16 is not set |
1067 | # CONFIG_CRC_T10DIF is not set | ||
1068 | # CONFIG_CRC_ITU_T is not set | ||
989 | CONFIG_CRC32=y | 1069 | CONFIG_CRC32=y |
1070 | # CONFIG_CRC7 is not set | ||
990 | # CONFIG_LIBCRC32C is not set | 1071 | # CONFIG_LIBCRC32C is not set |
991 | CONFIG_ZLIB_INFLATE=y | 1072 | CONFIG_ZLIB_INFLATE=y |
992 | CONFIG_PLIST=y | 1073 | CONFIG_PLIST=y |
1074 | CONFIG_HAS_IOMEM=y | ||
1075 | CONFIG_HAS_IOPORT=y | ||
1076 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/realview_defconfig b/arch/arm/configs/realview_defconfig index 907e54344dad..7e253f58ed18 100644 --- a/arch/arm/configs/realview_defconfig +++ b/arch/arm/configs/realview_defconfig | |||
@@ -1,105 +1,204 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.14-rc2 | 3 | # Linux kernel version: 2.6.28-rc2 |
4 | # Thu Sep 29 14:50:10 2005 | 4 | # Mon Nov 10 14:39:48 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | # CONFIG_GENERIC_GPIO is not set | ||
9 | CONFIG_GENERIC_TIME=y | ||
10 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
7 | CONFIG_MMU=y | 11 | CONFIG_MMU=y |
8 | CONFIG_UID16=y | 12 | # CONFIG_NO_IOPORT is not set |
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
9 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
10 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 24 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
25 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
26 | CONFIG_VECTORS_BASE=0xffff0000 | ||
27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
11 | 28 | ||
12 | # | 29 | # |
13 | # Code maturity level options | 30 | # General setup |
14 | # | 31 | # |
15 | # CONFIG_EXPERIMENTAL is not set | 32 | CONFIG_EXPERIMENTAL=y |
16 | CONFIG_CLEAN_COMPILE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 33 | CONFIG_BROKEN_ON_SMP=y |
18 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 34 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
19 | |||
20 | # | ||
21 | # General setup | ||
22 | # | ||
23 | CONFIG_LOCALVERSION="" | 35 | CONFIG_LOCALVERSION="" |
24 | CONFIG_LOCALVERSION_AUTO=y | 36 | CONFIG_LOCALVERSION_AUTO=y |
25 | # CONFIG_SWAP is not set | 37 | # CONFIG_SWAP is not set |
26 | CONFIG_SYSVIPC=y | 38 | CONFIG_SYSVIPC=y |
39 | CONFIG_SYSVIPC_SYSCTL=y | ||
40 | # CONFIG_POSIX_MQUEUE is not set | ||
27 | # CONFIG_BSD_PROCESS_ACCT is not set | 41 | # CONFIG_BSD_PROCESS_ACCT is not set |
28 | CONFIG_SYSCTL=y | 42 | # CONFIG_TASKSTATS is not set |
29 | # CONFIG_AUDIT is not set | 43 | # CONFIG_AUDIT is not set |
30 | CONFIG_HOTPLUG=y | ||
31 | CONFIG_KOBJECT_UEVENT=y | ||
32 | # CONFIG_IKCONFIG is not set | 44 | # CONFIG_IKCONFIG is not set |
33 | CONFIG_INITRAMFS_SOURCE="" | 45 | CONFIG_LOG_BUF_SHIFT=14 |
46 | # CONFIG_CGROUPS is not set | ||
47 | # CONFIG_GROUP_SCHED is not set | ||
48 | CONFIG_SYSFS_DEPRECATED=y | ||
49 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
50 | # CONFIG_RELAY is not set | ||
51 | CONFIG_NAMESPACES=y | ||
52 | # CONFIG_UTS_NS is not set | ||
53 | # CONFIG_IPC_NS is not set | ||
54 | # CONFIG_USER_NS is not set | ||
55 | # CONFIG_PID_NS is not set | ||
56 | # CONFIG_BLK_DEV_INITRD is not set | ||
57 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
58 | CONFIG_SYSCTL=y | ||
34 | # CONFIG_EMBEDDED is not set | 59 | # CONFIG_EMBEDDED is not set |
60 | CONFIG_UID16=y | ||
61 | CONFIG_SYSCTL_SYSCALL=y | ||
35 | CONFIG_KALLSYMS=y | 62 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 63 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 64 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
65 | CONFIG_HOTPLUG=y | ||
38 | CONFIG_PRINTK=y | 66 | CONFIG_PRINTK=y |
39 | CONFIG_BUG=y | 67 | CONFIG_BUG=y |
68 | CONFIG_ELF_CORE=y | ||
69 | CONFIG_COMPAT_BRK=y | ||
40 | CONFIG_BASE_FULL=y | 70 | CONFIG_BASE_FULL=y |
41 | CONFIG_FUTEX=y | 71 | CONFIG_FUTEX=y |
72 | CONFIG_ANON_INODES=y | ||
42 | CONFIG_EPOLL=y | 73 | CONFIG_EPOLL=y |
43 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 74 | CONFIG_SIGNALFD=y |
75 | CONFIG_TIMERFD=y | ||
76 | CONFIG_EVENTFD=y | ||
44 | CONFIG_SHMEM=y | 77 | CONFIG_SHMEM=y |
45 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 78 | CONFIG_AIO=y |
46 | CONFIG_CC_ALIGN_LABELS=0 | 79 | CONFIG_VM_EVENT_COUNTERS=y |
47 | CONFIG_CC_ALIGN_LOOPS=0 | 80 | CONFIG_SLAB=y |
48 | CONFIG_CC_ALIGN_JUMPS=0 | 81 | # CONFIG_SLUB is not set |
82 | # CONFIG_SLOB is not set | ||
83 | # CONFIG_PROFILING is not set | ||
84 | # CONFIG_MARKERS is not set | ||
85 | CONFIG_HAVE_OPROFILE=y | ||
86 | # CONFIG_KPROBES is not set | ||
87 | CONFIG_HAVE_KPROBES=y | ||
88 | CONFIG_HAVE_KRETPROBES=y | ||
89 | CONFIG_HAVE_CLK=y | ||
90 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
91 | CONFIG_SLABINFO=y | ||
92 | CONFIG_RT_MUTEXES=y | ||
49 | # CONFIG_TINY_SHMEM is not set | 93 | # CONFIG_TINY_SHMEM is not set |
50 | CONFIG_BASE_SMALL=0 | 94 | CONFIG_BASE_SMALL=0 |
51 | |||
52 | # | ||
53 | # Loadable module support | ||
54 | # | ||
55 | CONFIG_MODULES=y | 95 | CONFIG_MODULES=y |
96 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
56 | CONFIG_MODULE_UNLOAD=y | 97 | CONFIG_MODULE_UNLOAD=y |
57 | CONFIG_OBSOLETE_MODPARM=y | 98 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
99 | # CONFIG_MODVERSIONS is not set | ||
58 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 100 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
59 | # CONFIG_KMOD is not set | 101 | CONFIG_KMOD=y |
102 | CONFIG_BLOCK=y | ||
103 | # CONFIG_LBD is not set | ||
104 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
105 | # CONFIG_LSF is not set | ||
106 | # CONFIG_BLK_DEV_BSG is not set | ||
107 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
108 | |||
109 | # | ||
110 | # IO Schedulers | ||
111 | # | ||
112 | CONFIG_IOSCHED_NOOP=y | ||
113 | # CONFIG_IOSCHED_AS is not set | ||
114 | CONFIG_IOSCHED_DEADLINE=y | ||
115 | # CONFIG_IOSCHED_CFQ is not set | ||
116 | # CONFIG_DEFAULT_AS is not set | ||
117 | CONFIG_DEFAULT_DEADLINE=y | ||
118 | # CONFIG_DEFAULT_CFQ is not set | ||
119 | # CONFIG_DEFAULT_NOOP is not set | ||
120 | CONFIG_DEFAULT_IOSCHED="deadline" | ||
121 | CONFIG_CLASSIC_RCU=y | ||
122 | # CONFIG_FREEZER is not set | ||
60 | 123 | ||
61 | # | 124 | # |
62 | # System Type | 125 | # System Type |
63 | # | 126 | # |
127 | # CONFIG_ARCH_AAEC2000 is not set | ||
128 | # CONFIG_ARCH_INTEGRATOR is not set | ||
129 | CONFIG_ARCH_REALVIEW=y | ||
130 | # CONFIG_ARCH_VERSATILE is not set | ||
131 | # CONFIG_ARCH_AT91 is not set | ||
64 | # CONFIG_ARCH_CLPS7500 is not set | 132 | # CONFIG_ARCH_CLPS7500 is not set |
65 | # CONFIG_ARCH_CLPS711X is not set | 133 | # CONFIG_ARCH_CLPS711X is not set |
66 | # CONFIG_ARCH_CO285 is not set | ||
67 | # CONFIG_ARCH_EBSA110 is not set | 134 | # CONFIG_ARCH_EBSA110 is not set |
135 | # CONFIG_ARCH_EP93XX is not set | ||
68 | # CONFIG_ARCH_FOOTBRIDGE is not set | 136 | # CONFIG_ARCH_FOOTBRIDGE is not set |
69 | # CONFIG_ARCH_INTEGRATOR is not set | 137 | # CONFIG_ARCH_NETX is not set |
70 | # CONFIG_ARCH_IOP3XX is not set | 138 | # CONFIG_ARCH_H720X is not set |
71 | # CONFIG_ARCH_IXP4XX is not set | 139 | # CONFIG_ARCH_IMX is not set |
140 | # CONFIG_ARCH_IOP13XX is not set | ||
141 | # CONFIG_ARCH_IOP32X is not set | ||
142 | # CONFIG_ARCH_IOP33X is not set | ||
143 | # CONFIG_ARCH_IXP23XX is not set | ||
72 | # CONFIG_ARCH_IXP2000 is not set | 144 | # CONFIG_ARCH_IXP2000 is not set |
145 | # CONFIG_ARCH_IXP4XX is not set | ||
73 | # CONFIG_ARCH_L7200 is not set | 146 | # CONFIG_ARCH_L7200 is not set |
147 | # CONFIG_ARCH_KIRKWOOD is not set | ||
148 | # CONFIG_ARCH_KS8695 is not set | ||
149 | # CONFIG_ARCH_NS9XXX is not set | ||
150 | # CONFIG_ARCH_LOKI is not set | ||
151 | # CONFIG_ARCH_MV78XX0 is not set | ||
152 | # CONFIG_ARCH_MXC is not set | ||
153 | # CONFIG_ARCH_ORION5X is not set | ||
154 | # CONFIG_ARCH_PNX4008 is not set | ||
74 | # CONFIG_ARCH_PXA is not set | 155 | # CONFIG_ARCH_PXA is not set |
75 | # CONFIG_ARCH_RPC is not set | 156 | # CONFIG_ARCH_RPC is not set |
76 | # CONFIG_ARCH_SA1100 is not set | 157 | # CONFIG_ARCH_SA1100 is not set |
77 | # CONFIG_ARCH_S3C2410 is not set | 158 | # CONFIG_ARCH_S3C2410 is not set |
78 | # CONFIG_ARCH_SHARK is not set | 159 | # CONFIG_ARCH_SHARK is not set |
79 | # CONFIG_ARCH_LH7A40X is not set | 160 | # CONFIG_ARCH_LH7A40X is not set |
161 | # CONFIG_ARCH_DAVINCI is not set | ||
80 | # CONFIG_ARCH_OMAP is not set | 162 | # CONFIG_ARCH_OMAP is not set |
81 | # CONFIG_ARCH_VERSATILE is not set | 163 | # CONFIG_ARCH_MSM is not set |
82 | CONFIG_ARCH_REALVIEW=y | 164 | |
83 | # CONFIG_ARCH_IMX is not set | 165 | # |
84 | # CONFIG_ARCH_H720X is not set | 166 | # Boot options |
85 | # CONFIG_ARCH_AAEC2000 is not set | 167 | # |
168 | |||
169 | # | ||
170 | # Power management | ||
171 | # | ||
86 | 172 | ||
87 | # | 173 | # |
88 | # RealView platform type | 174 | # RealView platform type |
89 | # | 175 | # |
90 | CONFIG_MACH_REALVIEW_EB=y | 176 | CONFIG_MACH_REALVIEW_EB=y |
177 | # CONFIG_REALVIEW_EB_A9MP is not set | ||
178 | CONFIG_REALVIEW_EB_ARM11MP=y | ||
179 | # CONFIG_REALVIEW_EB_ARM11MP_REVB is not set | ||
180 | CONFIG_MACH_REALVIEW_PB11MP=y | ||
181 | CONFIG_MACH_REALVIEW_PB1176=y | ||
182 | # CONFIG_MACH_REALVIEW_PBA8 is not set | ||
91 | 183 | ||
92 | # | 184 | # |
93 | # Processor Type | 185 | # Processor Type |
94 | # | 186 | # |
95 | CONFIG_CPU_32=y | 187 | CONFIG_CPU_32=y |
96 | CONFIG_CPU_ARM926T=y | 188 | # CONFIG_CPU_ARM926T is not set |
97 | # CONFIG_CPU_V6 is not set | 189 | CONFIG_CPU_V6=y |
98 | CONFIG_CPU_32v5=y | 190 | # CONFIG_CPU_32v6K is not set |
99 | CONFIG_CPU_ABRT_EV5TJ=y | 191 | # CONFIG_CPU_V7 is not set |
100 | CONFIG_CPU_CACHE_VIVT=y | 192 | CONFIG_CPU_32v6=y |
101 | CONFIG_CPU_COPY_V4WB=y | 193 | CONFIG_CPU_ABRT_EV6=y |
102 | CONFIG_CPU_TLB_V4WBI=y | 194 | CONFIG_CPU_PABRT_NOIFAR=y |
195 | CONFIG_CPU_CACHE_V6=y | ||
196 | CONFIG_CPU_CACHE_VIPT=y | ||
197 | CONFIG_CPU_COPY_V6=y | ||
198 | CONFIG_CPU_TLB_V6=y | ||
199 | CONFIG_CPU_HAS_ASID=y | ||
200 | CONFIG_CPU_CP15=y | ||
201 | CONFIG_CPU_CP15_MMU=y | ||
103 | 202 | ||
104 | # | 203 | # |
105 | # Processor Features | 204 | # Processor Features |
@@ -107,8 +206,9 @@ CONFIG_CPU_TLB_V4WBI=y | |||
107 | CONFIG_ARM_THUMB=y | 206 | CONFIG_ARM_THUMB=y |
108 | # CONFIG_CPU_ICACHE_DISABLE is not set | 207 | # CONFIG_CPU_ICACHE_DISABLE is not set |
109 | # CONFIG_CPU_DCACHE_DISABLE is not set | 208 | # CONFIG_CPU_DCACHE_DISABLE is not set |
110 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | 209 | # CONFIG_CPU_BPREDICT_DISABLE is not set |
111 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | 210 | CONFIG_OUTER_CACHE=y |
211 | CONFIG_CACHE_L2X0=y | ||
112 | CONFIG_ARM_GIC=y | 212 | CONFIG_ARM_GIC=y |
113 | CONFIG_ICST307=y | 213 | CONFIG_ICST307=y |
114 | 214 | ||
@@ -116,20 +216,41 @@ CONFIG_ICST307=y | |||
116 | # Bus support | 216 | # Bus support |
117 | # | 217 | # |
118 | CONFIG_ARM_AMBA=y | 218 | CONFIG_ARM_AMBA=y |
119 | CONFIG_ISA_DMA_API=y | 219 | # CONFIG_PCI_SYSCALL is not set |
120 | 220 | # CONFIG_ARCH_SUPPORTS_MSI is not set | |
121 | # | ||
122 | # PCCARD (PCMCIA/CardBus) support | ||
123 | # | ||
124 | # CONFIG_PCCARD is not set | 221 | # CONFIG_PCCARD is not set |
125 | 222 | ||
126 | # | 223 | # |
127 | # Kernel Features | 224 | # Kernel Features |
128 | # | 225 | # |
129 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | 226 | # CONFIG_NO_HZ is not set |
227 | # CONFIG_HIGH_RES_TIMERS is not set | ||
228 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
229 | # CONFIG_SMP is not set | ||
230 | CONFIG_VMSPLIT_3G=y | ||
231 | # CONFIG_VMSPLIT_2G is not set | ||
232 | # CONFIG_VMSPLIT_1G is not set | ||
233 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
234 | # CONFIG_PREEMPT is not set | ||
235 | CONFIG_HZ=100 | ||
236 | CONFIG_AEABI=y | ||
237 | CONFIG_OABI_COMPAT=y | ||
238 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
239 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
240 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
241 | CONFIG_SELECT_MEMORY_MODEL=y | ||
242 | CONFIG_FLATMEM_MANUAL=y | ||
243 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
244 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
130 | CONFIG_FLATMEM=y | 245 | CONFIG_FLATMEM=y |
131 | CONFIG_FLAT_NODE_MEM_MAP=y | 246 | CONFIG_FLAT_NODE_MEM_MAP=y |
132 | # CONFIG_SPARSEMEM_STATIC is not set | 247 | CONFIG_PAGEFLAGS_EXTENDED=y |
248 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
249 | # CONFIG_RESOURCES_64BIT is not set | ||
250 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
251 | CONFIG_ZONE_DMA_FLAG=0 | ||
252 | CONFIG_VIRT_TO_BUS=y | ||
253 | CONFIG_UNEVICTABLE_LRU=y | ||
133 | CONFIG_ALIGNMENT_TRAP=y | 254 | CONFIG_ALIGNMENT_TRAP=y |
134 | 255 | ||
135 | # | 256 | # |
@@ -139,6 +260,12 @@ CONFIG_ZBOOT_ROM_TEXT=0x0 | |||
139 | CONFIG_ZBOOT_ROM_BSS=0x0 | 260 | CONFIG_ZBOOT_ROM_BSS=0x0 |
140 | CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M" | 261 | CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=ttyAMA0 mem=128M" |
141 | # CONFIG_XIP_KERNEL is not set | 262 | # CONFIG_XIP_KERNEL is not set |
263 | # CONFIG_KEXEC is not set | ||
264 | |||
265 | # | ||
266 | # CPU Power Management | ||
267 | # | ||
268 | # CONFIG_CPU_IDLE is not set | ||
142 | 269 | ||
143 | # | 270 | # |
144 | # Floating point emulation | 271 | # Floating point emulation |
@@ -147,26 +274,24 @@ CONFIG_CMDLINE="root=/dev/nfs nfsroot=10.1.69.3:/work/nfsroot ip=dhcp console=tt | |||
147 | # | 274 | # |
148 | # At least one emulation must be selected | 275 | # At least one emulation must be selected |
149 | # | 276 | # |
150 | CONFIG_FPE_NWFPE=y | 277 | # CONFIG_FPE_NWFPE is not set |
151 | # CONFIG_FPE_NWFPE_XP is not set | 278 | # CONFIG_FPE_FASTFPE is not set |
152 | # CONFIG_VFP is not set | 279 | CONFIG_VFP=y |
153 | 280 | ||
154 | # | 281 | # |
155 | # Userspace binary formats | 282 | # Userspace binary formats |
156 | # | 283 | # |
157 | CONFIG_BINFMT_ELF=y | 284 | CONFIG_BINFMT_ELF=y |
285 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
286 | CONFIG_HAVE_AOUT=y | ||
158 | # CONFIG_BINFMT_AOUT is not set | 287 | # CONFIG_BINFMT_AOUT is not set |
159 | # CONFIG_BINFMT_MISC is not set | 288 | # CONFIG_BINFMT_MISC is not set |
160 | # CONFIG_ARTHUR is not set | ||
161 | 289 | ||
162 | # | 290 | # |
163 | # Power management options | 291 | # Power management options |
164 | # | 292 | # |
165 | # CONFIG_PM is not set | 293 | # CONFIG_PM is not set |
166 | 294 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | |
167 | # | ||
168 | # Networking | ||
169 | # | ||
170 | CONFIG_NET=y | 295 | CONFIG_NET=y |
171 | 296 | ||
172 | # | 297 | # |
@@ -175,6 +300,11 @@ CONFIG_NET=y | |||
175 | CONFIG_PACKET=y | 300 | CONFIG_PACKET=y |
176 | # CONFIG_PACKET_MMAP is not set | 301 | # CONFIG_PACKET_MMAP is not set |
177 | CONFIG_UNIX=y | 302 | CONFIG_UNIX=y |
303 | CONFIG_XFRM=y | ||
304 | # CONFIG_XFRM_USER is not set | ||
305 | # CONFIG_XFRM_SUB_POLICY is not set | ||
306 | # CONFIG_XFRM_MIGRATE is not set | ||
307 | # CONFIG_XFRM_STATISTICS is not set | ||
178 | # CONFIG_NET_KEY is not set | 308 | # CONFIG_NET_KEY is not set |
179 | CONFIG_INET=y | 309 | CONFIG_INET=y |
180 | # CONFIG_IP_MULTICAST is not set | 310 | # CONFIG_IP_MULTICAST is not set |
@@ -186,34 +316,56 @@ CONFIG_IP_PNP_BOOTP=y | |||
186 | # CONFIG_IP_PNP_RARP is not set | 316 | # CONFIG_IP_PNP_RARP is not set |
187 | # CONFIG_NET_IPIP is not set | 317 | # CONFIG_NET_IPIP is not set |
188 | # CONFIG_NET_IPGRE is not set | 318 | # CONFIG_NET_IPGRE is not set |
319 | # CONFIG_ARPD is not set | ||
189 | # CONFIG_SYN_COOKIES is not set | 320 | # CONFIG_SYN_COOKIES is not set |
190 | # CONFIG_INET_AH is not set | 321 | # CONFIG_INET_AH is not set |
191 | # CONFIG_INET_ESP is not set | 322 | # CONFIG_INET_ESP is not set |
192 | # CONFIG_INET_IPCOMP is not set | 323 | # CONFIG_INET_IPCOMP is not set |
324 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
193 | # CONFIG_INET_TUNNEL is not set | 325 | # CONFIG_INET_TUNNEL is not set |
326 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
327 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
328 | CONFIG_INET_XFRM_MODE_BEET=y | ||
329 | # CONFIG_INET_LRO is not set | ||
194 | CONFIG_INET_DIAG=y | 330 | CONFIG_INET_DIAG=y |
195 | CONFIG_INET_TCP_DIAG=y | 331 | CONFIG_INET_TCP_DIAG=y |
196 | # CONFIG_TCP_CONG_ADVANCED is not set | 332 | # CONFIG_TCP_CONG_ADVANCED is not set |
197 | CONFIG_TCP_CONG_BIC=y | 333 | CONFIG_TCP_CONG_CUBIC=y |
334 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
335 | # CONFIG_TCP_MD5SIG is not set | ||
198 | # CONFIG_IPV6 is not set | 336 | # CONFIG_IPV6 is not set |
337 | # CONFIG_NETWORK_SECMARK is not set | ||
199 | # CONFIG_NETFILTER is not set | 338 | # CONFIG_NETFILTER is not set |
339 | # CONFIG_IP_DCCP is not set | ||
340 | # CONFIG_IP_SCTP is not set | ||
341 | # CONFIG_TIPC is not set | ||
342 | # CONFIG_ATM is not set | ||
200 | # CONFIG_BRIDGE is not set | 343 | # CONFIG_BRIDGE is not set |
344 | # CONFIG_NET_DSA is not set | ||
201 | # CONFIG_VLAN_8021Q is not set | 345 | # CONFIG_VLAN_8021Q is not set |
202 | # CONFIG_DECNET is not set | 346 | # CONFIG_DECNET is not set |
203 | # CONFIG_LLC2 is not set | 347 | # CONFIG_LLC2 is not set |
204 | # CONFIG_IPX is not set | 348 | # CONFIG_IPX is not set |
205 | # CONFIG_ATALK is not set | 349 | # CONFIG_ATALK is not set |
350 | # CONFIG_X25 is not set | ||
351 | # CONFIG_LAPB is not set | ||
352 | # CONFIG_ECONET is not set | ||
353 | # CONFIG_WAN_ROUTER is not set | ||
206 | # CONFIG_NET_SCHED is not set | 354 | # CONFIG_NET_SCHED is not set |
207 | # CONFIG_NET_CLS_ROUTE is not set | ||
208 | 355 | ||
209 | # | 356 | # |
210 | # Network testing | 357 | # Network testing |
211 | # | 358 | # |
212 | # CONFIG_NET_PKTGEN is not set | 359 | # CONFIG_NET_PKTGEN is not set |
213 | # CONFIG_HAMRADIO is not set | 360 | # CONFIG_HAMRADIO is not set |
361 | # CONFIG_CAN is not set | ||
214 | # CONFIG_IRDA is not set | 362 | # CONFIG_IRDA is not set |
215 | # CONFIG_BT is not set | 363 | # CONFIG_BT is not set |
216 | # CONFIG_IEEE80211 is not set | 364 | # CONFIG_AF_RXRPC is not set |
365 | # CONFIG_PHONET is not set | ||
366 | # CONFIG_WIRELESS is not set | ||
367 | # CONFIG_RFKILL is not set | ||
368 | # CONFIG_NET_9P is not set | ||
217 | 369 | ||
218 | # | 370 | # |
219 | # Device Drivers | 371 | # Device Drivers |
@@ -222,30 +374,37 @@ CONFIG_TCP_CONG_BIC=y | |||
222 | # | 374 | # |
223 | # Generic Driver Options | 375 | # Generic Driver Options |
224 | # | 376 | # |
377 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
225 | CONFIG_STANDALONE=y | 378 | CONFIG_STANDALONE=y |
226 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 379 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
227 | # CONFIG_FW_LOADER is not set | 380 | CONFIG_FW_LOADER=y |
381 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
382 | CONFIG_EXTRA_FIRMWARE="" | ||
228 | # CONFIG_DEBUG_DRIVER is not set | 383 | # CONFIG_DEBUG_DRIVER is not set |
229 | 384 | # CONFIG_DEBUG_DEVRES is not set | |
230 | # | 385 | # CONFIG_SYS_HYPERVISOR is not set |
231 | # Memory Technology Devices (MTD) | 386 | # CONFIG_CONNECTOR is not set |
232 | # | ||
233 | CONFIG_MTD=y | 387 | CONFIG_MTD=y |
234 | # CONFIG_MTD_DEBUG is not set | 388 | # CONFIG_MTD_DEBUG is not set |
235 | # CONFIG_MTD_CONCAT is not set | 389 | CONFIG_MTD_CONCAT=y |
236 | CONFIG_MTD_PARTITIONS=y | 390 | CONFIG_MTD_PARTITIONS=y |
237 | # CONFIG_MTD_REDBOOT_PARTS is not set | 391 | # CONFIG_MTD_REDBOOT_PARTS is not set |
238 | CONFIG_MTD_CMDLINE_PARTS=y | 392 | CONFIG_MTD_CMDLINE_PARTS=y |
239 | # CONFIG_MTD_AFS_PARTS is not set | 393 | # CONFIG_MTD_AFS_PARTS is not set |
394 | # CONFIG_MTD_AR7_PARTS is not set | ||
240 | 395 | ||
241 | # | 396 | # |
242 | # User Modules And Translation Layers | 397 | # User Modules And Translation Layers |
243 | # | 398 | # |
244 | CONFIG_MTD_CHAR=y | 399 | CONFIG_MTD_CHAR=y |
400 | CONFIG_MTD_BLKDEVS=y | ||
245 | CONFIG_MTD_BLOCK=y | 401 | CONFIG_MTD_BLOCK=y |
246 | # CONFIG_FTL is not set | 402 | # CONFIG_FTL is not set |
247 | # CONFIG_NFTL is not set | 403 | # CONFIG_NFTL is not set |
248 | # CONFIG_INFTL is not set | 404 | # CONFIG_INFTL is not set |
405 | # CONFIG_RFD_FTL is not set | ||
406 | # CONFIG_SSFDC is not set | ||
407 | # CONFIG_MTD_OOPS is not set | ||
249 | 408 | ||
250 | # | 409 | # |
251 | # RAM/ROM/Flash chip drivers | 410 | # RAM/ROM/Flash chip drivers |
@@ -266,7 +425,6 @@ CONFIG_MTD_CFI_I2=y | |||
266 | # CONFIG_MTD_CFI_I8 is not set | 425 | # CONFIG_MTD_CFI_I8 is not set |
267 | CONFIG_MTD_CFI_INTELEXT=y | 426 | CONFIG_MTD_CFI_INTELEXT=y |
268 | CONFIG_MTD_CFI_AMDSTD=y | 427 | CONFIG_MTD_CFI_AMDSTD=y |
269 | CONFIG_MTD_CFI_AMDSTD_RETRY=0 | ||
270 | # CONFIG_MTD_CFI_STAA is not set | 428 | # CONFIG_MTD_CFI_STAA is not set |
271 | CONFIG_MTD_CFI_UTIL=y | 429 | CONFIG_MTD_CFI_UTIL=y |
272 | # CONFIG_MTD_RAM is not set | 430 | # CONFIG_MTD_RAM is not set |
@@ -279,7 +437,6 @@ CONFIG_MTD_CFI_UTIL=y | |||
279 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 437 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
280 | # CONFIG_MTD_PHYSMAP is not set | 438 | # CONFIG_MTD_PHYSMAP is not set |
281 | CONFIG_MTD_ARM_INTEGRATOR=y | 439 | CONFIG_MTD_ARM_INTEGRATOR=y |
282 | # CONFIG_MTD_EDB7312 is not set | ||
283 | # CONFIG_MTD_PLATRAM is not set | 440 | # CONFIG_MTD_PLATRAM is not set |
284 | 441 | ||
285 | # | 442 | # |
@@ -288,7 +445,7 @@ CONFIG_MTD_ARM_INTEGRATOR=y | |||
288 | # CONFIG_MTD_SLRAM is not set | 445 | # CONFIG_MTD_SLRAM is not set |
289 | # CONFIG_MTD_PHRAM is not set | 446 | # CONFIG_MTD_PHRAM is not set |
290 | # CONFIG_MTD_MTDRAM is not set | 447 | # CONFIG_MTD_MTDRAM is not set |
291 | # CONFIG_MTD_BLKMTD is not set | 448 | # CONFIG_MTD_BLOCK2MTD is not set |
292 | 449 | ||
293 | # | 450 | # |
294 | # Disk-On-Chip Device Drivers | 451 | # Disk-On-Chip Device Drivers |
@@ -296,121 +453,81 @@ CONFIG_MTD_ARM_INTEGRATOR=y | |||
296 | # CONFIG_MTD_DOC2000 is not set | 453 | # CONFIG_MTD_DOC2000 is not set |
297 | # CONFIG_MTD_DOC2001 is not set | 454 | # CONFIG_MTD_DOC2001 is not set |
298 | # CONFIG_MTD_DOC2001PLUS is not set | 455 | # CONFIG_MTD_DOC2001PLUS is not set |
299 | |||
300 | # | ||
301 | # NAND Flash Device Drivers | ||
302 | # | ||
303 | # CONFIG_MTD_NAND is not set | 456 | # CONFIG_MTD_NAND is not set |
457 | # CONFIG_MTD_ONENAND is not set | ||
304 | 458 | ||
305 | # | 459 | # |
306 | # Parallel port support | 460 | # UBI - Unsorted block images |
307 | # | 461 | # |
462 | # CONFIG_MTD_UBI is not set | ||
308 | # CONFIG_PARPORT is not set | 463 | # CONFIG_PARPORT is not set |
309 | 464 | CONFIG_BLK_DEV=y | |
310 | # | ||
311 | # Plug and Play support | ||
312 | # | ||
313 | |||
314 | # | ||
315 | # Block devices | ||
316 | # | ||
317 | # CONFIG_BLK_DEV_COW_COMMON is not set | 465 | # CONFIG_BLK_DEV_COW_COMMON is not set |
318 | # CONFIG_BLK_DEV_LOOP is not set | 466 | # CONFIG_BLK_DEV_LOOP is not set |
319 | # CONFIG_BLK_DEV_NBD is not set | 467 | # CONFIG_BLK_DEV_NBD is not set |
320 | # CONFIG_BLK_DEV_RAM is not set | 468 | # CONFIG_BLK_DEV_RAM is not set |
321 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
322 | # CONFIG_CDROM_PKTCDVD is not set | 469 | # CONFIG_CDROM_PKTCDVD is not set |
323 | |||
324 | # | ||
325 | # IO Schedulers | ||
326 | # | ||
327 | CONFIG_IOSCHED_NOOP=y | ||
328 | # CONFIG_IOSCHED_AS is not set | ||
329 | CONFIG_IOSCHED_DEADLINE=y | ||
330 | # CONFIG_IOSCHED_CFQ is not set | ||
331 | # CONFIG_ATA_OVER_ETH is not set | 470 | # CONFIG_ATA_OVER_ETH is not set |
471 | CONFIG_MISC_DEVICES=y | ||
472 | # CONFIG_EEPROM_93CX6 is not set | ||
473 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
474 | CONFIG_HAVE_IDE=y | ||
475 | # CONFIG_IDE is not set | ||
332 | 476 | ||
333 | # | 477 | # |
334 | # SCSI device support | 478 | # SCSI device support |
335 | # | 479 | # |
336 | # CONFIG_RAID_ATTRS is not set | 480 | # CONFIG_RAID_ATTRS is not set |
337 | # CONFIG_SCSI is not set | 481 | # CONFIG_SCSI is not set |
338 | 482 | # CONFIG_SCSI_DMA is not set | |
339 | # | 483 | # CONFIG_SCSI_NETLINK is not set |
340 | # Multi-device support (RAID and LVM) | 484 | # CONFIG_ATA is not set |
341 | # | ||
342 | # CONFIG_MD is not set | 485 | # CONFIG_MD is not set |
343 | |||
344 | # | ||
345 | # Fusion MPT device support | ||
346 | # | ||
347 | # CONFIG_FUSION is not set | ||
348 | |||
349 | # | ||
350 | # IEEE 1394 (FireWire) support | ||
351 | # | ||
352 | |||
353 | # | ||
354 | # I2O device support | ||
355 | # | ||
356 | |||
357 | # | ||
358 | # Network device support | ||
359 | # | ||
360 | CONFIG_NETDEVICES=y | 486 | CONFIG_NETDEVICES=y |
361 | # CONFIG_DUMMY is not set | 487 | # CONFIG_DUMMY is not set |
362 | # CONFIG_BONDING is not set | 488 | # CONFIG_BONDING is not set |
489 | # CONFIG_MACVLAN is not set | ||
363 | # CONFIG_EQUALIZER is not set | 490 | # CONFIG_EQUALIZER is not set |
364 | # CONFIG_TUN is not set | 491 | # CONFIG_TUN is not set |
365 | 492 | # CONFIG_VETH is not set | |
366 | # | ||
367 | # PHY device support | ||
368 | # | ||
369 | # CONFIG_PHYLIB is not set | 493 | # CONFIG_PHYLIB is not set |
370 | |||
371 | # | ||
372 | # Ethernet (10 or 100Mbit) | ||
373 | # | ||
374 | CONFIG_NET_ETHERNET=y | 494 | CONFIG_NET_ETHERNET=y |
375 | CONFIG_MII=y | 495 | CONFIG_MII=y |
496 | # CONFIG_AX88796 is not set | ||
376 | CONFIG_SMC91X=y | 497 | CONFIG_SMC91X=y |
377 | # CONFIG_DM9000 is not set | 498 | # CONFIG_DM9000 is not set |
378 | 499 | CONFIG_SMC911X=y | |
379 | # | 500 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
380 | # Ethernet (1000 Mbit) | 501 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
381 | # | 502 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
382 | 503 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | |
383 | # | 504 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set |
384 | # Ethernet (10000 Mbit) | 505 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set |
385 | # | 506 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set |
386 | 507 | # CONFIG_B44 is not set | |
387 | # | 508 | # CONFIG_NETDEV_1000 is not set |
388 | # Token Ring devices | 509 | # CONFIG_NETDEV_10000 is not set |
389 | # | 510 | |
390 | 511 | # | |
391 | # | 512 | # Wireless LAN |
392 | # Wireless LAN (non-hamradio) | 513 | # |
393 | # | 514 | # CONFIG_WLAN_PRE80211 is not set |
394 | # CONFIG_NET_RADIO is not set | 515 | # CONFIG_WLAN_80211 is not set |
395 | 516 | # CONFIG_IWLWIFI_LEDS is not set | |
396 | # | ||
397 | # Wan interfaces | ||
398 | # | ||
399 | # CONFIG_WAN is not set | 517 | # CONFIG_WAN is not set |
400 | # CONFIG_PPP is not set | 518 | # CONFIG_PPP is not set |
401 | # CONFIG_SLIP is not set | 519 | # CONFIG_SLIP is not set |
520 | # CONFIG_NETCONSOLE is not set | ||
402 | # CONFIG_NETPOLL is not set | 521 | # CONFIG_NETPOLL is not set |
403 | # CONFIG_NET_POLL_CONTROLLER is not set | 522 | # CONFIG_NET_POLL_CONTROLLER is not set |
404 | |||
405 | # | ||
406 | # ISDN subsystem | ||
407 | # | ||
408 | # CONFIG_ISDN is not set | 523 | # CONFIG_ISDN is not set |
409 | 524 | ||
410 | # | 525 | # |
411 | # Input device support | 526 | # Input device support |
412 | # | 527 | # |
413 | CONFIG_INPUT=y | 528 | CONFIG_INPUT=y |
529 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
530 | # CONFIG_INPUT_POLLDEV is not set | ||
414 | 531 | ||
415 | # | 532 | # |
416 | # Userland interfaces | 533 | # Userland interfaces |
@@ -420,7 +537,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y | |||
420 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | 537 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 |
421 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | 538 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 |
422 | # CONFIG_INPUT_JOYDEV is not set | 539 | # CONFIG_INPUT_JOYDEV is not set |
423 | # CONFIG_INPUT_TSDEV is not set | ||
424 | # CONFIG_INPUT_EVDEV is not set | 540 | # CONFIG_INPUT_EVDEV is not set |
425 | # CONFIG_INPUT_EVBUG is not set | 541 | # CONFIG_INPUT_EVBUG is not set |
426 | 542 | ||
@@ -433,11 +549,19 @@ CONFIG_KEYBOARD_ATKBD=y | |||
433 | # CONFIG_KEYBOARD_LKKBD is not set | 549 | # CONFIG_KEYBOARD_LKKBD is not set |
434 | # CONFIG_KEYBOARD_XTKBD is not set | 550 | # CONFIG_KEYBOARD_XTKBD is not set |
435 | # CONFIG_KEYBOARD_NEWTON is not set | 551 | # CONFIG_KEYBOARD_NEWTON is not set |
552 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
436 | CONFIG_INPUT_MOUSE=y | 553 | CONFIG_INPUT_MOUSE=y |
437 | CONFIG_MOUSE_PS2=y | 554 | CONFIG_MOUSE_PS2=y |
555 | CONFIG_MOUSE_PS2_ALPS=y | ||
556 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
557 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
558 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
559 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
560 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
438 | # CONFIG_MOUSE_SERIAL is not set | 561 | # CONFIG_MOUSE_SERIAL is not set |
439 | # CONFIG_MOUSE_VSXXXAA is not set | 562 | # CONFIG_MOUSE_VSXXXAA is not set |
440 | # CONFIG_INPUT_JOYSTICK is not set | 563 | # CONFIG_INPUT_JOYSTICK is not set |
564 | # CONFIG_INPUT_TABLET is not set | ||
441 | # CONFIG_INPUT_TOUCHSCREEN is not set | 565 | # CONFIG_INPUT_TOUCHSCREEN is not set |
442 | # CONFIG_INPUT_MISC is not set | 566 | # CONFIG_INPUT_MISC is not set |
443 | 567 | ||
@@ -455,8 +579,11 @@ CONFIG_SERIO_LIBPS2=y | |||
455 | # Character devices | 579 | # Character devices |
456 | # | 580 | # |
457 | CONFIG_VT=y | 581 | CONFIG_VT=y |
582 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
458 | CONFIG_VT_CONSOLE=y | 583 | CONFIG_VT_CONSOLE=y |
459 | CONFIG_HW_CONSOLE=y | 584 | CONFIG_HW_CONSOLE=y |
585 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
586 | CONFIG_DEVKMEM=y | ||
460 | # CONFIG_SERIAL_NONSTANDARD is not set | 587 | # CONFIG_SERIAL_NONSTANDARD is not set |
461 | 588 | ||
462 | # | 589 | # |
@@ -475,73 +602,91 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
475 | CONFIG_UNIX98_PTYS=y | 602 | CONFIG_UNIX98_PTYS=y |
476 | CONFIG_LEGACY_PTYS=y | 603 | CONFIG_LEGACY_PTYS=y |
477 | CONFIG_LEGACY_PTY_COUNT=16 | 604 | CONFIG_LEGACY_PTY_COUNT=16 |
478 | |||
479 | # | ||
480 | # IPMI | ||
481 | # | ||
482 | # CONFIG_IPMI_HANDLER is not set | 605 | # CONFIG_IPMI_HANDLER is not set |
483 | 606 | # CONFIG_HW_RANDOM is not set | |
484 | # | ||
485 | # Watchdog Cards | ||
486 | # | ||
487 | # CONFIG_WATCHDOG is not set | ||
488 | # CONFIG_NVRAM is not set | 607 | # CONFIG_NVRAM is not set |
489 | # CONFIG_RTC is not set | ||
490 | # CONFIG_DTLK is not set | ||
491 | # CONFIG_R3964 is not set | 608 | # CONFIG_R3964 is not set |
492 | |||
493 | # | ||
494 | # Ftape, the floppy tape device driver | ||
495 | # | ||
496 | # CONFIG_RAW_DRIVER is not set | 609 | # CONFIG_RAW_DRIVER is not set |
497 | 610 | # CONFIG_TCG_TPM is not set | |
498 | # | ||
499 | # TPM devices | ||
500 | # | ||
501 | |||
502 | # | ||
503 | # I2C support | ||
504 | # | ||
505 | # CONFIG_I2C is not set | 611 | # CONFIG_I2C is not set |
612 | # CONFIG_SPI is not set | ||
613 | # CONFIG_W1 is not set | ||
614 | # CONFIG_POWER_SUPPLY is not set | ||
615 | # CONFIG_HWMON is not set | ||
616 | # CONFIG_THERMAL is not set | ||
617 | # CONFIG_THERMAL_HWMON is not set | ||
618 | # CONFIG_WATCHDOG is not set | ||
506 | 619 | ||
507 | # | 620 | # |
508 | # Hardware Monitoring support | 621 | # Sonics Silicon Backplane |
509 | # | 622 | # |
510 | # CONFIG_HWMON is not set | 623 | CONFIG_SSB_POSSIBLE=y |
511 | # CONFIG_HWMON_VID is not set | 624 | # CONFIG_SSB is not set |
512 | 625 | ||
513 | # | 626 | # |
514 | # Misc devices | 627 | # Multifunction device drivers |
515 | # | 628 | # |
629 | # CONFIG_MFD_CORE is not set | ||
630 | # CONFIG_MFD_SM501 is not set | ||
631 | # CONFIG_HTC_PASIC3 is not set | ||
632 | # CONFIG_MFD_TMIO is not set | ||
633 | # CONFIG_MFD_T7L66XB is not set | ||
634 | # CONFIG_MFD_TC6387XB is not set | ||
635 | # CONFIG_MFD_WM8400 is not set | ||
516 | 636 | ||
517 | # | 637 | # |
518 | # Multimedia Capabilities Port drivers | 638 | # Multimedia devices |
519 | # | 639 | # |
520 | 640 | ||
521 | # | 641 | # |
522 | # Multimedia devices | 642 | # Multimedia core support |
523 | # | 643 | # |
524 | # CONFIG_VIDEO_DEV is not set | 644 | # CONFIG_VIDEO_DEV is not set |
645 | # CONFIG_DVB_CORE is not set | ||
646 | # CONFIG_VIDEO_MEDIA is not set | ||
525 | 647 | ||
526 | # | 648 | # |
527 | # Digital Video Broadcasting Devices | 649 | # Multimedia drivers |
528 | # | 650 | # |
529 | # CONFIG_DVB is not set | 651 | # CONFIG_DAB is not set |
530 | 652 | ||
531 | # | 653 | # |
532 | # Graphics support | 654 | # Graphics support |
533 | # | 655 | # |
656 | # CONFIG_VGASTATE is not set | ||
657 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
534 | CONFIG_FB=y | 658 | CONFIG_FB=y |
659 | # CONFIG_FIRMWARE_EDID is not set | ||
660 | # CONFIG_FB_DDC is not set | ||
661 | # CONFIG_FB_BOOT_VESA_SUPPORT is not set | ||
535 | CONFIG_FB_CFB_FILLRECT=y | 662 | CONFIG_FB_CFB_FILLRECT=y |
536 | CONFIG_FB_CFB_COPYAREA=y | 663 | CONFIG_FB_CFB_COPYAREA=y |
537 | CONFIG_FB_CFB_IMAGEBLIT=y | 664 | CONFIG_FB_CFB_IMAGEBLIT=y |
538 | CONFIG_FB_SOFT_CURSOR=y | 665 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set |
666 | # CONFIG_FB_SYS_FILLRECT is not set | ||
667 | # CONFIG_FB_SYS_COPYAREA is not set | ||
668 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
669 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
670 | # CONFIG_FB_SYS_FOPS is not set | ||
671 | # CONFIG_FB_SVGALIB is not set | ||
539 | # CONFIG_FB_MACMODES is not set | 672 | # CONFIG_FB_MACMODES is not set |
673 | # CONFIG_FB_BACKLIGHT is not set | ||
540 | # CONFIG_FB_MODE_HELPERS is not set | 674 | # CONFIG_FB_MODE_HELPERS is not set |
541 | # CONFIG_FB_TILEBLITTING is not set | 675 | # CONFIG_FB_TILEBLITTING is not set |
676 | |||
677 | # | ||
678 | # Frame buffer hardware drivers | ||
679 | # | ||
542 | CONFIG_FB_ARMCLCD=y | 680 | CONFIG_FB_ARMCLCD=y |
543 | # CONFIG_FB_S1D13XXX is not set | 681 | # CONFIG_FB_S1D13XXX is not set |
544 | # CONFIG_FB_VIRTUAL is not set | 682 | # CONFIG_FB_VIRTUAL is not set |
683 | # CONFIG_FB_METRONOME is not set | ||
684 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
685 | |||
686 | # | ||
687 | # Display device support | ||
688 | # | ||
689 | # CONFIG_DISPLAY_SUPPORT is not set | ||
545 | 690 | ||
546 | # | 691 | # |
547 | # Console display driver support | 692 | # Console display driver support |
@@ -549,27 +694,17 @@ CONFIG_FB_ARMCLCD=y | |||
549 | # CONFIG_VGA_CONSOLE is not set | 694 | # CONFIG_VGA_CONSOLE is not set |
550 | CONFIG_DUMMY_CONSOLE=y | 695 | CONFIG_DUMMY_CONSOLE=y |
551 | CONFIG_FRAMEBUFFER_CONSOLE=y | 696 | CONFIG_FRAMEBUFFER_CONSOLE=y |
697 | # CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set | ||
698 | # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set | ||
552 | # CONFIG_FONTS is not set | 699 | # CONFIG_FONTS is not set |
553 | CONFIG_FONT_8x8=y | 700 | CONFIG_FONT_8x8=y |
554 | CONFIG_FONT_8x16=y | 701 | CONFIG_FONT_8x16=y |
555 | |||
556 | # | ||
557 | # Logo configuration | ||
558 | # | ||
559 | CONFIG_LOGO=y | 702 | CONFIG_LOGO=y |
560 | # CONFIG_LOGO_LINUX_MONO is not set | 703 | # CONFIG_LOGO_LINUX_MONO is not set |
561 | # CONFIG_LOGO_LINUX_VGA16 is not set | 704 | # CONFIG_LOGO_LINUX_VGA16 is not set |
562 | CONFIG_LOGO_LINUX_CLUT224=y | 705 | CONFIG_LOGO_LINUX_CLUT224=y |
563 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
564 | |||
565 | # | ||
566 | # Sound | ||
567 | # | ||
568 | CONFIG_SOUND=y | 706 | CONFIG_SOUND=y |
569 | 707 | CONFIG_SOUND_OSS_CORE=y | |
570 | # | ||
571 | # Advanced Linux Sound Architecture | ||
572 | # | ||
573 | CONFIG_SND=y | 708 | CONFIG_SND=y |
574 | CONFIG_SND_TIMER=y | 709 | CONFIG_SND_TIMER=y |
575 | CONFIG_SND_PCM=y | 710 | CONFIG_SND_PCM=y |
@@ -577,59 +712,71 @@ CONFIG_SND_PCM=y | |||
577 | CONFIG_SND_OSSEMUL=y | 712 | CONFIG_SND_OSSEMUL=y |
578 | CONFIG_SND_MIXER_OSS=y | 713 | CONFIG_SND_MIXER_OSS=y |
579 | CONFIG_SND_PCM_OSS=y | 714 | CONFIG_SND_PCM_OSS=y |
715 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
716 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
717 | CONFIG_SND_SUPPORT_OLD_API=y | ||
718 | CONFIG_SND_VERBOSE_PROCFS=y | ||
580 | # CONFIG_SND_VERBOSE_PRINTK is not set | 719 | # CONFIG_SND_VERBOSE_PRINTK is not set |
581 | # CONFIG_SND_DEBUG is not set | 720 | # CONFIG_SND_DEBUG is not set |
582 | 721 | CONFIG_SND_VMASTER=y | |
583 | # | 722 | CONFIG_SND_AC97_CODEC=y |
584 | # Generic devices | 723 | # CONFIG_SND_DRIVERS is not set |
585 | # | 724 | CONFIG_SND_ARM=y |
586 | # CONFIG_SND_DUMMY is not set | 725 | CONFIG_SND_ARMAACI=y |
587 | # CONFIG_SND_MTPAV is not set | 726 | # CONFIG_SND_SOC is not set |
588 | # CONFIG_SND_SERIAL_U16550 is not set | ||
589 | # CONFIG_SND_MPU401 is not set | ||
590 | |||
591 | # | ||
592 | # ALSA ARM devices | ||
593 | # | ||
594 | # CONFIG_SND_ARMAACI is not set | ||
595 | |||
596 | # | ||
597 | # Open Sound System | ||
598 | # | ||
599 | # CONFIG_SOUND_PRIME is not set | 727 | # CONFIG_SOUND_PRIME is not set |
728 | CONFIG_AC97_BUS=y | ||
729 | # CONFIG_HID_SUPPORT is not set | ||
730 | # CONFIG_USB_SUPPORT is not set | ||
731 | CONFIG_MMC=y | ||
732 | # CONFIG_MMC_DEBUG is not set | ||
733 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
600 | 734 | ||
601 | # | 735 | # |
602 | # USB support | 736 | # MMC/SD/SDIO Card Drivers |
603 | # | 737 | # |
604 | CONFIG_USB_ARCH_HAS_HCD=y | 738 | CONFIG_MMC_BLOCK=y |
605 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 739 | CONFIG_MMC_BLOCK_BOUNCE=y |
606 | # CONFIG_USB is not set | 740 | # CONFIG_SDIO_UART is not set |
741 | # CONFIG_MMC_TEST is not set | ||
607 | 742 | ||
608 | # | 743 | # |
609 | # USB Gadget Support | 744 | # MMC/SD/SDIO Host Controller Drivers |
610 | # | 745 | # |
611 | # CONFIG_USB_GADGET is not set | 746 | CONFIG_MMC_ARMMMCI=y |
747 | # CONFIG_MMC_SDHCI is not set | ||
748 | # CONFIG_MEMSTICK is not set | ||
749 | # CONFIG_ACCESSIBILITY is not set | ||
750 | # CONFIG_NEW_LEDS is not set | ||
751 | CONFIG_RTC_LIB=y | ||
752 | # CONFIG_RTC_CLASS is not set | ||
753 | # CONFIG_DMADEVICES is not set | ||
612 | 754 | ||
613 | # | 755 | # |
614 | # MMC/SD Card support | 756 | # Voltage and Current regulators |
615 | # | 757 | # |
616 | # CONFIG_MMC is not set | 758 | # CONFIG_REGULATOR is not set |
759 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set | ||
760 | # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set | ||
761 | # CONFIG_REGULATOR_BQ24022 is not set | ||
762 | # CONFIG_UIO is not set | ||
617 | 763 | ||
618 | # | 764 | # |
619 | # File systems | 765 | # File systems |
620 | # | 766 | # |
621 | # CONFIG_EXT2_FS is not set | 767 | # CONFIG_EXT2_FS is not set |
622 | # CONFIG_EXT3_FS is not set | 768 | # CONFIG_EXT3_FS is not set |
623 | # CONFIG_JBD is not set | 769 | # CONFIG_EXT4_FS is not set |
624 | # CONFIG_REISERFS_FS is not set | 770 | # CONFIG_REISERFS_FS is not set |
625 | # CONFIG_JFS_FS is not set | 771 | # CONFIG_JFS_FS is not set |
626 | # CONFIG_FS_POSIX_ACL is not set | 772 | # CONFIG_FS_POSIX_ACL is not set |
773 | CONFIG_FILE_LOCKING=y | ||
627 | # CONFIG_XFS_FS is not set | 774 | # CONFIG_XFS_FS is not set |
628 | # CONFIG_MINIX_FS is not set | 775 | # CONFIG_OCFS2_FS is not set |
629 | # CONFIG_ROMFS_FS is not set | 776 | CONFIG_DNOTIFY=y |
630 | CONFIG_INOTIFY=y | 777 | CONFIG_INOTIFY=y |
778 | CONFIG_INOTIFY_USER=y | ||
631 | # CONFIG_QUOTA is not set | 779 | # CONFIG_QUOTA is not set |
632 | CONFIG_DNOTIFY=y | ||
633 | # CONFIG_AUTOFS_FS is not set | 780 | # CONFIG_AUTOFS_FS is not set |
634 | # CONFIG_AUTOFS4_FS is not set | 781 | # CONFIG_AUTOFS4_FS is not set |
635 | # CONFIG_FUSE_FS is not set | 782 | # CONFIG_FUSE_FS is not set |
@@ -654,51 +801,59 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | |||
654 | # Pseudo filesystems | 801 | # Pseudo filesystems |
655 | # | 802 | # |
656 | CONFIG_PROC_FS=y | 803 | CONFIG_PROC_FS=y |
804 | CONFIG_PROC_SYSCTL=y | ||
805 | CONFIG_PROC_PAGE_MONITOR=y | ||
657 | CONFIG_SYSFS=y | 806 | CONFIG_SYSFS=y |
658 | CONFIG_TMPFS=y | 807 | CONFIG_TMPFS=y |
808 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
659 | # CONFIG_HUGETLB_PAGE is not set | 809 | # CONFIG_HUGETLB_PAGE is not set |
660 | CONFIG_RAMFS=y | 810 | # CONFIG_CONFIGFS_FS is not set |
661 | # CONFIG_RELAYFS_FS is not set | ||
662 | 811 | ||
663 | # | 812 | # |
664 | # Miscellaneous filesystems | 813 | # Miscellaneous filesystems |
665 | # | 814 | # |
815 | # CONFIG_ADFS_FS is not set | ||
816 | # CONFIG_AFFS_FS is not set | ||
817 | # CONFIG_HFS_FS is not set | ||
666 | # CONFIG_HFSPLUS_FS is not set | 818 | # CONFIG_HFSPLUS_FS is not set |
667 | # CONFIG_JFFS_FS is not set | 819 | # CONFIG_BEFS_FS is not set |
820 | # CONFIG_BFS_FS is not set | ||
821 | # CONFIG_EFS_FS is not set | ||
668 | # CONFIG_JFFS2_FS is not set | 822 | # CONFIG_JFFS2_FS is not set |
669 | CONFIG_CRAMFS=y | 823 | CONFIG_CRAMFS=y |
670 | # CONFIG_VXFS_FS is not set | 824 | # CONFIG_VXFS_FS is not set |
825 | # CONFIG_MINIX_FS is not set | ||
826 | # CONFIG_OMFS_FS is not set | ||
671 | # CONFIG_HPFS_FS is not set | 827 | # CONFIG_HPFS_FS is not set |
672 | # CONFIG_QNX4FS_FS is not set | 828 | # CONFIG_QNX4FS_FS is not set |
829 | # CONFIG_ROMFS_FS is not set | ||
673 | # CONFIG_SYSV_FS is not set | 830 | # CONFIG_SYSV_FS is not set |
674 | # CONFIG_UFS_FS is not set | 831 | # CONFIG_UFS_FS is not set |
675 | 832 | CONFIG_NETWORK_FILESYSTEMS=y | |
676 | # | ||
677 | # Network File Systems | ||
678 | # | ||
679 | CONFIG_NFS_FS=y | 833 | CONFIG_NFS_FS=y |
680 | CONFIG_NFS_V3=y | 834 | CONFIG_NFS_V3=y |
681 | # CONFIG_NFS_V3_ACL is not set | 835 | # CONFIG_NFS_V3_ACL is not set |
682 | # CONFIG_NFSD is not set | 836 | # CONFIG_NFS_V4 is not set |
683 | CONFIG_ROOT_NFS=y | 837 | CONFIG_ROOT_NFS=y |
838 | # CONFIG_NFSD is not set | ||
684 | CONFIG_LOCKD=y | 839 | CONFIG_LOCKD=y |
685 | CONFIG_LOCKD_V4=y | 840 | CONFIG_LOCKD_V4=y |
686 | CONFIG_NFS_COMMON=y | 841 | CONFIG_NFS_COMMON=y |
687 | CONFIG_SUNRPC=y | 842 | CONFIG_SUNRPC=y |
843 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
844 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
845 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
688 | # CONFIG_SMB_FS is not set | 846 | # CONFIG_SMB_FS is not set |
689 | # CONFIG_CIFS is not set | 847 | # CONFIG_CIFS is not set |
690 | # CONFIG_NCP_FS is not set | 848 | # CONFIG_NCP_FS is not set |
691 | # CONFIG_CODA_FS is not set | 849 | # CONFIG_CODA_FS is not set |
850 | # CONFIG_AFS_FS is not set | ||
692 | 851 | ||
693 | # | 852 | # |
694 | # Partition Types | 853 | # Partition Types |
695 | # | 854 | # |
696 | # CONFIG_PARTITION_ADVANCED is not set | 855 | # CONFIG_PARTITION_ADVANCED is not set |
697 | CONFIG_MSDOS_PARTITION=y | 856 | CONFIG_MSDOS_PARTITION=y |
698 | |||
699 | # | ||
700 | # Native Language Support | ||
701 | # | ||
702 | CONFIG_NLS=y | 857 | CONFIG_NLS=y |
703 | CONFIG_NLS_DEFAULT="iso8859-1" | 858 | CONFIG_NLS_DEFAULT="iso8859-1" |
704 | CONFIG_NLS_CODEPAGE_437=y | 859 | CONFIG_NLS_CODEPAGE_437=y |
@@ -739,26 +894,71 @@ CONFIG_NLS_ISO8859_1=y | |||
739 | # CONFIG_NLS_KOI8_R is not set | 894 | # CONFIG_NLS_KOI8_R is not set |
740 | # CONFIG_NLS_KOI8_U is not set | 895 | # CONFIG_NLS_KOI8_U is not set |
741 | # CONFIG_NLS_UTF8 is not set | 896 | # CONFIG_NLS_UTF8 is not set |
897 | # CONFIG_DLM is not set | ||
742 | 898 | ||
743 | # | 899 | # |
744 | # Kernel hacking | 900 | # Kernel hacking |
745 | # | 901 | # |
746 | # CONFIG_PRINTK_TIME is not set | 902 | # CONFIG_PRINTK_TIME is not set |
747 | CONFIG_DEBUG_KERNEL=y | 903 | CONFIG_ENABLE_WARN_DEPRECATED=y |
904 | CONFIG_ENABLE_MUST_CHECK=y | ||
905 | CONFIG_FRAME_WARN=1024 | ||
748 | CONFIG_MAGIC_SYSRQ=y | 906 | CONFIG_MAGIC_SYSRQ=y |
749 | CONFIG_LOG_BUF_SHIFT=14 | 907 | # CONFIG_UNUSED_SYMBOLS is not set |
908 | # CONFIG_DEBUG_FS is not set | ||
909 | # CONFIG_HEADERS_CHECK is not set | ||
910 | CONFIG_DEBUG_KERNEL=y | ||
911 | # CONFIG_DEBUG_SHIRQ is not set | ||
750 | CONFIG_DETECT_SOFTLOCKUP=y | 912 | CONFIG_DETECT_SOFTLOCKUP=y |
913 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
914 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
915 | # CONFIG_SCHED_DEBUG is not set | ||
751 | # CONFIG_SCHEDSTATS is not set | 916 | # CONFIG_SCHEDSTATS is not set |
917 | # CONFIG_TIMER_STATS is not set | ||
918 | # CONFIG_DEBUG_OBJECTS is not set | ||
752 | # CONFIG_DEBUG_SLAB is not set | 919 | # CONFIG_DEBUG_SLAB is not set |
920 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
921 | # CONFIG_RT_MUTEX_TESTER is not set | ||
753 | # CONFIG_DEBUG_SPINLOCK is not set | 922 | # CONFIG_DEBUG_SPINLOCK is not set |
923 | # CONFIG_DEBUG_MUTEXES is not set | ||
924 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
925 | # CONFIG_PROVE_LOCKING is not set | ||
926 | # CONFIG_LOCK_STAT is not set | ||
754 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 927 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
928 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
755 | # CONFIG_DEBUG_KOBJECT is not set | 929 | # CONFIG_DEBUG_KOBJECT is not set |
756 | CONFIG_DEBUG_BUGVERBOSE=y | 930 | CONFIG_DEBUG_BUGVERBOSE=y |
757 | # CONFIG_DEBUG_INFO is not set | 931 | # CONFIG_DEBUG_INFO is not set |
758 | # CONFIG_DEBUG_FS is not set | 932 | # CONFIG_DEBUG_VM is not set |
933 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
934 | CONFIG_DEBUG_MEMORY_INIT=y | ||
935 | # CONFIG_DEBUG_LIST is not set | ||
936 | # CONFIG_DEBUG_SG is not set | ||
759 | CONFIG_FRAME_POINTER=y | 937 | CONFIG_FRAME_POINTER=y |
938 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
939 | # CONFIG_RCU_TORTURE_TEST is not set | ||
940 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
941 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
942 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
943 | # CONFIG_FAULT_INJECTION is not set | ||
944 | # CONFIG_LATENCYTOP is not set | ||
945 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
946 | CONFIG_NOP_TRACER=y | ||
947 | CONFIG_HAVE_FTRACE=y | ||
948 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
949 | # CONFIG_FTRACE is not set | ||
950 | # CONFIG_IRQSOFF_TRACER is not set | ||
951 | # CONFIG_SCHED_TRACER is not set | ||
952 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
953 | # CONFIG_BOOT_TRACER is not set | ||
954 | # CONFIG_STACK_TRACER is not set | ||
955 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
956 | # CONFIG_SAMPLES is not set | ||
957 | CONFIG_HAVE_ARCH_KGDB=y | ||
958 | # CONFIG_KGDB is not set | ||
760 | CONFIG_DEBUG_USER=y | 959 | CONFIG_DEBUG_USER=y |
761 | CONFIG_DEBUG_ERRORS=y | 960 | CONFIG_DEBUG_ERRORS=y |
961 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
762 | # CONFIG_DEBUG_LL is not set | 962 | # CONFIG_DEBUG_LL is not set |
763 | 963 | ||
764 | # | 964 | # |
@@ -766,21 +966,106 @@ CONFIG_DEBUG_ERRORS=y | |||
766 | # | 966 | # |
767 | # CONFIG_KEYS is not set | 967 | # CONFIG_KEYS is not set |
768 | # CONFIG_SECURITY is not set | 968 | # CONFIG_SECURITY is not set |
969 | # CONFIG_SECURITYFS is not set | ||
970 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
971 | CONFIG_CRYPTO=y | ||
972 | |||
973 | # | ||
974 | # Crypto core or helper | ||
975 | # | ||
976 | # CONFIG_CRYPTO_FIPS is not set | ||
977 | # CONFIG_CRYPTO_MANAGER is not set | ||
978 | # CONFIG_CRYPTO_GF128MUL is not set | ||
979 | # CONFIG_CRYPTO_NULL is not set | ||
980 | # CONFIG_CRYPTO_CRYPTD is not set | ||
981 | # CONFIG_CRYPTO_AUTHENC is not set | ||
982 | # CONFIG_CRYPTO_TEST is not set | ||
983 | |||
984 | # | ||
985 | # Authenticated Encryption with Associated Data | ||
986 | # | ||
987 | # CONFIG_CRYPTO_CCM is not set | ||
988 | # CONFIG_CRYPTO_GCM is not set | ||
989 | # CONFIG_CRYPTO_SEQIV is not set | ||
990 | |||
991 | # | ||
992 | # Block modes | ||
993 | # | ||
994 | # CONFIG_CRYPTO_CBC is not set | ||
995 | # CONFIG_CRYPTO_CTR is not set | ||
996 | # CONFIG_CRYPTO_CTS is not set | ||
997 | # CONFIG_CRYPTO_ECB is not set | ||
998 | # CONFIG_CRYPTO_LRW is not set | ||
999 | # CONFIG_CRYPTO_PCBC is not set | ||
1000 | # CONFIG_CRYPTO_XTS is not set | ||
1001 | |||
1002 | # | ||
1003 | # Hash modes | ||
1004 | # | ||
1005 | # CONFIG_CRYPTO_HMAC is not set | ||
1006 | # CONFIG_CRYPTO_XCBC is not set | ||
1007 | |||
1008 | # | ||
1009 | # Digest | ||
1010 | # | ||
1011 | # CONFIG_CRYPTO_CRC32C is not set | ||
1012 | # CONFIG_CRYPTO_MD4 is not set | ||
1013 | # CONFIG_CRYPTO_MD5 is not set | ||
1014 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1015 | # CONFIG_CRYPTO_RMD128 is not set | ||
1016 | # CONFIG_CRYPTO_RMD160 is not set | ||
1017 | # CONFIG_CRYPTO_RMD256 is not set | ||
1018 | # CONFIG_CRYPTO_RMD320 is not set | ||
1019 | # CONFIG_CRYPTO_SHA1 is not set | ||
1020 | # CONFIG_CRYPTO_SHA256 is not set | ||
1021 | # CONFIG_CRYPTO_SHA512 is not set | ||
1022 | # CONFIG_CRYPTO_TGR192 is not set | ||
1023 | # CONFIG_CRYPTO_WP512 is not set | ||
1024 | |||
1025 | # | ||
1026 | # Ciphers | ||
1027 | # | ||
1028 | # CONFIG_CRYPTO_AES is not set | ||
1029 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1030 | # CONFIG_CRYPTO_ARC4 is not set | ||
1031 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1032 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1033 | # CONFIG_CRYPTO_CAST5 is not set | ||
1034 | # CONFIG_CRYPTO_CAST6 is not set | ||
1035 | # CONFIG_CRYPTO_DES is not set | ||
1036 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1037 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1038 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1039 | # CONFIG_CRYPTO_SEED is not set | ||
1040 | # CONFIG_CRYPTO_SERPENT is not set | ||
1041 | # CONFIG_CRYPTO_TEA is not set | ||
1042 | # CONFIG_CRYPTO_TWOFISH is not set | ||
769 | 1043 | ||
770 | # | 1044 | # |
771 | # Cryptographic options | 1045 | # Compression |
772 | # | 1046 | # |
773 | # CONFIG_CRYPTO is not set | 1047 | # CONFIG_CRYPTO_DEFLATE is not set |
1048 | # CONFIG_CRYPTO_LZO is not set | ||
774 | 1049 | ||
775 | # | 1050 | # |
776 | # Hardware crypto devices | 1051 | # Random Number Generation |
777 | # | 1052 | # |
1053 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1054 | # CONFIG_CRYPTO_HW is not set | ||
778 | 1055 | ||
779 | # | 1056 | # |
780 | # Library routines | 1057 | # Library routines |
781 | # | 1058 | # |
1059 | CONFIG_BITREVERSE=y | ||
782 | # CONFIG_CRC_CCITT is not set | 1060 | # CONFIG_CRC_CCITT is not set |
783 | # CONFIG_CRC16 is not set | 1061 | # CONFIG_CRC16 is not set |
1062 | # CONFIG_CRC_T10DIF is not set | ||
1063 | # CONFIG_CRC_ITU_T is not set | ||
784 | CONFIG_CRC32=y | 1064 | CONFIG_CRC32=y |
1065 | # CONFIG_CRC7 is not set | ||
785 | # CONFIG_LIBCRC32C is not set | 1066 | # CONFIG_LIBCRC32C is not set |
786 | CONFIG_ZLIB_INFLATE=y | 1067 | CONFIG_ZLIB_INFLATE=y |
1068 | CONFIG_PLIST=y | ||
1069 | CONFIG_HAS_IOMEM=y | ||
1070 | CONFIG_HAS_IOPORT=y | ||
1071 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig new file mode 100644 index 000000000000..cf3c1b5d7048 --- /dev/null +++ b/arch/arm/configs/s3c6400_defconfig | |||
@@ -0,0 +1,845 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.28-rc3 | ||
4 | # Mon Nov 3 10:10:30 2008 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | CONFIG_GENERIC_GPIO=y | ||
9 | # CONFIG_GENERIC_TIME is not set | ||
10 | # CONFIG_GENERIC_CLOCKEVENTS is not set | ||
11 | CONFIG_MMU=y | ||
12 | CONFIG_NO_IOPORT=y | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
25 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
26 | CONFIG_VECTORS_BASE=0xffff0000 | ||
27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
28 | |||
29 | # | ||
30 | # General setup | ||
31 | # | ||
32 | CONFIG_EXPERIMENTAL=y | ||
33 | CONFIG_BROKEN_ON_SMP=y | ||
34 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
35 | CONFIG_LOCALVERSION="" | ||
36 | CONFIG_LOCALVERSION_AUTO=y | ||
37 | CONFIG_SWAP=y | ||
38 | # CONFIG_SYSVIPC is not set | ||
39 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
40 | # CONFIG_IKCONFIG is not set | ||
41 | CONFIG_LOG_BUF_SHIFT=17 | ||
42 | # CONFIG_CGROUPS is not set | ||
43 | # CONFIG_GROUP_SCHED is not set | ||
44 | CONFIG_SYSFS_DEPRECATED=y | ||
45 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
46 | # CONFIG_RELAY is not set | ||
47 | CONFIG_NAMESPACES=y | ||
48 | # CONFIG_UTS_NS is not set | ||
49 | # CONFIG_USER_NS is not set | ||
50 | # CONFIG_PID_NS is not set | ||
51 | CONFIG_BLK_DEV_INITRD=y | ||
52 | CONFIG_INITRAMFS_SOURCE="" | ||
53 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
54 | CONFIG_SYSCTL=y | ||
55 | # CONFIG_EMBEDDED is not set | ||
56 | CONFIG_UID16=y | ||
57 | CONFIG_SYSCTL_SYSCALL=y | ||
58 | CONFIG_KALLSYMS=y | ||
59 | CONFIG_KALLSYMS_ALL=y | ||
60 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
61 | CONFIG_HOTPLUG=y | ||
62 | CONFIG_PRINTK=y | ||
63 | CONFIG_BUG=y | ||
64 | CONFIG_ELF_CORE=y | ||
65 | CONFIG_COMPAT_BRK=y | ||
66 | CONFIG_BASE_FULL=y | ||
67 | CONFIG_FUTEX=y | ||
68 | CONFIG_ANON_INODES=y | ||
69 | CONFIG_EPOLL=y | ||
70 | CONFIG_SIGNALFD=y | ||
71 | CONFIG_TIMERFD=y | ||
72 | CONFIG_EVENTFD=y | ||
73 | CONFIG_SHMEM=y | ||
74 | CONFIG_AIO=y | ||
75 | CONFIG_VM_EVENT_COUNTERS=y | ||
76 | CONFIG_SLUB_DEBUG=y | ||
77 | # CONFIG_SLAB is not set | ||
78 | CONFIG_SLUB=y | ||
79 | # CONFIG_SLOB is not set | ||
80 | # CONFIG_PROFILING is not set | ||
81 | # CONFIG_MARKERS is not set | ||
82 | CONFIG_HAVE_OPROFILE=y | ||
83 | # CONFIG_KPROBES is not set | ||
84 | CONFIG_HAVE_KPROBES=y | ||
85 | CONFIG_HAVE_KRETPROBES=y | ||
86 | CONFIG_HAVE_CLK=y | ||
87 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
88 | CONFIG_SLABINFO=y | ||
89 | CONFIG_RT_MUTEXES=y | ||
90 | # CONFIG_TINY_SHMEM is not set | ||
91 | CONFIG_BASE_SMALL=0 | ||
92 | CONFIG_MODULES=y | ||
93 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
94 | CONFIG_MODULE_UNLOAD=y | ||
95 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
96 | # CONFIG_MODVERSIONS is not set | ||
97 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
98 | CONFIG_KMOD=y | ||
99 | CONFIG_BLOCK=y | ||
100 | CONFIG_LBD=y | ||
101 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
102 | CONFIG_LSF=y | ||
103 | # CONFIG_BLK_DEV_BSG is not set | ||
104 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
105 | |||
106 | # | ||
107 | # IO Schedulers | ||
108 | # | ||
109 | CONFIG_IOSCHED_NOOP=y | ||
110 | CONFIG_IOSCHED_AS=y | ||
111 | CONFIG_IOSCHED_DEADLINE=y | ||
112 | CONFIG_IOSCHED_CFQ=y | ||
113 | # CONFIG_DEFAULT_AS is not set | ||
114 | # CONFIG_DEFAULT_DEADLINE is not set | ||
115 | CONFIG_DEFAULT_CFQ=y | ||
116 | # CONFIG_DEFAULT_NOOP is not set | ||
117 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
118 | CONFIG_CLASSIC_RCU=y | ||
119 | # CONFIG_FREEZER is not set | ||
120 | |||
121 | # | ||
122 | # System Type | ||
123 | # | ||
124 | # CONFIG_ARCH_AAEC2000 is not set | ||
125 | # CONFIG_ARCH_INTEGRATOR is not set | ||
126 | # CONFIG_ARCH_REALVIEW is not set | ||
127 | # CONFIG_ARCH_VERSATILE is not set | ||
128 | # CONFIG_ARCH_AT91 is not set | ||
129 | # CONFIG_ARCH_CLPS7500 is not set | ||
130 | # CONFIG_ARCH_CLPS711X is not set | ||
131 | # CONFIG_ARCH_EBSA110 is not set | ||
132 | # CONFIG_ARCH_EP93XX is not set | ||
133 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
134 | # CONFIG_ARCH_NETX is not set | ||
135 | # CONFIG_ARCH_H720X is not set | ||
136 | # CONFIG_ARCH_IMX is not set | ||
137 | # CONFIG_ARCH_IOP13XX is not set | ||
138 | # CONFIG_ARCH_IOP32X is not set | ||
139 | # CONFIG_ARCH_IOP33X is not set | ||
140 | # CONFIG_ARCH_IXP23XX is not set | ||
141 | # CONFIG_ARCH_IXP2000 is not set | ||
142 | # CONFIG_ARCH_IXP4XX is not set | ||
143 | # CONFIG_ARCH_L7200 is not set | ||
144 | # CONFIG_ARCH_KIRKWOOD is not set | ||
145 | # CONFIG_ARCH_KS8695 is not set | ||
146 | # CONFIG_ARCH_NS9XXX is not set | ||
147 | # CONFIG_ARCH_LOKI is not set | ||
148 | # CONFIG_ARCH_MV78XX0 is not set | ||
149 | # CONFIG_ARCH_MXC is not set | ||
150 | # CONFIG_ARCH_ORION5X is not set | ||
151 | # CONFIG_ARCH_PNX4008 is not set | ||
152 | # CONFIG_ARCH_PXA is not set | ||
153 | # CONFIG_ARCH_RPC is not set | ||
154 | # CONFIG_ARCH_SA1100 is not set | ||
155 | # CONFIG_ARCH_S3C2410 is not set | ||
156 | CONFIG_ARCH_S3C64XX=y | ||
157 | # CONFIG_ARCH_SHARK is not set | ||
158 | # CONFIG_ARCH_LH7A40X is not set | ||
159 | # CONFIG_ARCH_DAVINCI is not set | ||
160 | # CONFIG_ARCH_OMAP is not set | ||
161 | # CONFIG_ARCH_MSM is not set | ||
162 | CONFIG_PLAT_S3C64XX=y | ||
163 | CONFIG_CPU_S3C6400_INIT=y | ||
164 | CONFIG_CPU_S3C6400_CLOCK=y | ||
165 | CONFIG_S3C64XX_SETUP_I2C0=y | ||
166 | CONFIG_S3C64XX_SETUP_I2C1=y | ||
167 | CONFIG_PLAT_S3C=y | ||
168 | |||
169 | # | ||
170 | # Boot options | ||
171 | # | ||
172 | CONFIG_S3C_BOOT_ERROR_RESET=y | ||
173 | |||
174 | # | ||
175 | # Power management | ||
176 | # | ||
177 | CONFIG_S3C_LOWLEVEL_UART_PORT=0 | ||
178 | CONFIG_S3C_GPIO_SPACE=0 | ||
179 | CONFIG_S3C_GPIO_TRACK=y | ||
180 | CONFIG_S3C_GPIO_PULL_UPDOWN=y | ||
181 | CONFIG_S3C_GPIO_CFG_S3C24XX=y | ||
182 | CONFIG_S3C_GPIO_CFG_S3C64XX=y | ||
183 | CONFIG_S3C_DEV_HSMMC=y | ||
184 | CONFIG_S3C_DEV_HSMMC1=y | ||
185 | CONFIG_S3C_DEV_I2C1=y | ||
186 | CONFIG_CPU_S3C6410=y | ||
187 | CONFIG_S3C6410_SETUP_SDHCI=y | ||
188 | CONFIG_MACH_SMDK6410=y | ||
189 | CONFIG_SMDK6410_SD_CH0=y | ||
190 | # CONFIG_SMDK6410_SD_CH1 is not set | ||
191 | |||
192 | # | ||
193 | # Processor Type | ||
194 | # | ||
195 | CONFIG_CPU_32=y | ||
196 | CONFIG_CPU_V6=y | ||
197 | CONFIG_CPU_32v6K=y | ||
198 | CONFIG_CPU_32v6=y | ||
199 | CONFIG_CPU_ABRT_EV6=y | ||
200 | CONFIG_CPU_PABRT_NOIFAR=y | ||
201 | CONFIG_CPU_CACHE_V6=y | ||
202 | CONFIG_CPU_CACHE_VIPT=y | ||
203 | CONFIG_CPU_COPY_V6=y | ||
204 | CONFIG_CPU_TLB_V6=y | ||
205 | CONFIG_CPU_HAS_ASID=y | ||
206 | CONFIG_CPU_CP15=y | ||
207 | CONFIG_CPU_CP15_MMU=y | ||
208 | |||
209 | # | ||
210 | # Processor Features | ||
211 | # | ||
212 | CONFIG_ARM_THUMB=y | ||
213 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
214 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
215 | # CONFIG_CPU_BPREDICT_DISABLE is not set | ||
216 | # CONFIG_OUTER_CACHE is not set | ||
217 | CONFIG_ARM_VIC=y | ||
218 | |||
219 | # | ||
220 | # Bus support | ||
221 | # | ||
222 | # CONFIG_PCI_SYSCALL is not set | ||
223 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
224 | # CONFIG_PCCARD is not set | ||
225 | |||
226 | # | ||
227 | # Kernel Features | ||
228 | # | ||
229 | CONFIG_VMSPLIT_3G=y | ||
230 | # CONFIG_VMSPLIT_2G is not set | ||
231 | # CONFIG_VMSPLIT_1G is not set | ||
232 | CONFIG_PAGE_OFFSET=0xC0000000 | ||
233 | # CONFIG_PREEMPT is not set | ||
234 | CONFIG_HZ=100 | ||
235 | CONFIG_AEABI=y | ||
236 | CONFIG_OABI_COMPAT=y | ||
237 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
238 | # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set | ||
239 | # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set | ||
240 | CONFIG_SELECT_MEMORY_MODEL=y | ||
241 | CONFIG_FLATMEM_MANUAL=y | ||
242 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
243 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
244 | CONFIG_FLATMEM=y | ||
245 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
246 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
247 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
248 | # CONFIG_RESOURCES_64BIT is not set | ||
249 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
250 | CONFIG_ZONE_DMA_FLAG=0 | ||
251 | CONFIG_VIRT_TO_BUS=y | ||
252 | CONFIG_UNEVICTABLE_LRU=y | ||
253 | CONFIG_ALIGNMENT_TRAP=y | ||
254 | |||
255 | # | ||
256 | # Boot options | ||
257 | # | ||
258 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
259 | CONFIG_ZBOOT_ROM_BSS=0 | ||
260 | CONFIG_CMDLINE="console=ttySAC0,115200 root=/dev/ram init=/bin/bash initrd=0x51000000,4M" | ||
261 | # CONFIG_XIP_KERNEL is not set | ||
262 | # CONFIG_KEXEC is not set | ||
263 | |||
264 | # | ||
265 | # CPU Power Management | ||
266 | # | ||
267 | # CONFIG_CPU_IDLE is not set | ||
268 | |||
269 | # | ||
270 | # Floating point emulation | ||
271 | # | ||
272 | |||
273 | # | ||
274 | # At least one emulation must be selected | ||
275 | # | ||
276 | # CONFIG_FPE_NWFPE is not set | ||
277 | # CONFIG_FPE_FASTFPE is not set | ||
278 | CONFIG_VFP=y | ||
279 | |||
280 | # | ||
281 | # Userspace binary formats | ||
282 | # | ||
283 | CONFIG_BINFMT_ELF=y | ||
284 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
285 | CONFIG_HAVE_AOUT=y | ||
286 | # CONFIG_BINFMT_AOUT is not set | ||
287 | # CONFIG_BINFMT_MISC is not set | ||
288 | |||
289 | # | ||
290 | # Power management options | ||
291 | # | ||
292 | # CONFIG_PM is not set | ||
293 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
294 | # CONFIG_NET is not set | ||
295 | |||
296 | # | ||
297 | # Device Drivers | ||
298 | # | ||
299 | |||
300 | # | ||
301 | # Generic Driver Options | ||
302 | # | ||
303 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
304 | CONFIG_STANDALONE=y | ||
305 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
306 | CONFIG_FW_LOADER=y | ||
307 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
308 | CONFIG_EXTRA_FIRMWARE="" | ||
309 | # CONFIG_DEBUG_DRIVER is not set | ||
310 | # CONFIG_DEBUG_DEVRES is not set | ||
311 | # CONFIG_SYS_HYPERVISOR is not set | ||
312 | # CONFIG_MTD is not set | ||
313 | # CONFIG_PARPORT is not set | ||
314 | CONFIG_BLK_DEV=y | ||
315 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
316 | CONFIG_BLK_DEV_LOOP=y | ||
317 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
318 | CONFIG_BLK_DEV_RAM=y | ||
319 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
320 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
321 | # CONFIG_BLK_DEV_XIP is not set | ||
322 | # CONFIG_CDROM_PKTCDVD is not set | ||
323 | CONFIG_MISC_DEVICES=y | ||
324 | # CONFIG_EEPROM_93CX6 is not set | ||
325 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
326 | CONFIG_HAVE_IDE=y | ||
327 | # CONFIG_IDE is not set | ||
328 | |||
329 | # | ||
330 | # SCSI device support | ||
331 | # | ||
332 | # CONFIG_RAID_ATTRS is not set | ||
333 | # CONFIG_SCSI is not set | ||
334 | # CONFIG_SCSI_DMA is not set | ||
335 | # CONFIG_SCSI_NETLINK is not set | ||
336 | # CONFIG_ATA is not set | ||
337 | # CONFIG_MD is not set | ||
338 | |||
339 | # | ||
340 | # Input device support | ||
341 | # | ||
342 | CONFIG_INPUT=y | ||
343 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
344 | # CONFIG_INPUT_POLLDEV is not set | ||
345 | |||
346 | # | ||
347 | # Userland interfaces | ||
348 | # | ||
349 | CONFIG_INPUT_MOUSEDEV=y | ||
350 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
351 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
352 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
353 | # CONFIG_INPUT_JOYDEV is not set | ||
354 | # CONFIG_INPUT_EVDEV is not set | ||
355 | # CONFIG_INPUT_EVBUG is not set | ||
356 | |||
357 | # | ||
358 | # Input Device Drivers | ||
359 | # | ||
360 | CONFIG_INPUT_KEYBOARD=y | ||
361 | CONFIG_KEYBOARD_ATKBD=y | ||
362 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
363 | # CONFIG_KEYBOARD_LKKBD is not set | ||
364 | # CONFIG_KEYBOARD_XTKBD is not set | ||
365 | # CONFIG_KEYBOARD_NEWTON is not set | ||
366 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
367 | # CONFIG_KEYBOARD_GPIO is not set | ||
368 | CONFIG_INPUT_MOUSE=y | ||
369 | CONFIG_MOUSE_PS2=y | ||
370 | CONFIG_MOUSE_PS2_ALPS=y | ||
371 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
372 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
373 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
374 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
375 | # CONFIG_MOUSE_PS2_ELANTECH is not set | ||
376 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
377 | # CONFIG_MOUSE_SERIAL is not set | ||
378 | # CONFIG_MOUSE_APPLETOUCH is not set | ||
379 | # CONFIG_MOUSE_BCM5974 is not set | ||
380 | # CONFIG_MOUSE_VSXXXAA is not set | ||
381 | # CONFIG_MOUSE_GPIO is not set | ||
382 | # CONFIG_INPUT_JOYSTICK is not set | ||
383 | # CONFIG_INPUT_TABLET is not set | ||
384 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
385 | # CONFIG_INPUT_MISC is not set | ||
386 | |||
387 | # | ||
388 | # Hardware I/O ports | ||
389 | # | ||
390 | CONFIG_SERIO=y | ||
391 | CONFIG_SERIO_SERPORT=y | ||
392 | CONFIG_SERIO_LIBPS2=y | ||
393 | # CONFIG_SERIO_RAW is not set | ||
394 | # CONFIG_GAMEPORT is not set | ||
395 | |||
396 | # | ||
397 | # Character devices | ||
398 | # | ||
399 | CONFIG_VT=y | ||
400 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
401 | CONFIG_VT_CONSOLE=y | ||
402 | CONFIG_HW_CONSOLE=y | ||
403 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
404 | CONFIG_DEVKMEM=y | ||
405 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
406 | |||
407 | # | ||
408 | # Serial drivers | ||
409 | # | ||
410 | CONFIG_SERIAL_8250=y | ||
411 | # CONFIG_SERIAL_8250_CONSOLE is not set | ||
412 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
413 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
414 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
415 | |||
416 | # | ||
417 | # Non-8250 serial port support | ||
418 | # | ||
419 | CONFIG_SERIAL_SAMSUNG=y | ||
420 | CONFIG_SERIAL_SAMSUNG_UARTS=4 | ||
421 | # CONFIG_SERIAL_SAMSUNG_DEBUG is not set | ||
422 | CONFIG_SERIAL_SAMSUNG_CONSOLE=y | ||
423 | CONFIG_SERIAL_S3C6400=y | ||
424 | CONFIG_SERIAL_CORE=y | ||
425 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
426 | CONFIG_UNIX98_PTYS=y | ||
427 | CONFIG_LEGACY_PTYS=y | ||
428 | CONFIG_LEGACY_PTY_COUNT=256 | ||
429 | # CONFIG_IPMI_HANDLER is not set | ||
430 | CONFIG_HW_RANDOM=y | ||
431 | # CONFIG_NVRAM is not set | ||
432 | # CONFIG_R3964 is not set | ||
433 | # CONFIG_RAW_DRIVER is not set | ||
434 | # CONFIG_TCG_TPM is not set | ||
435 | CONFIG_I2C=y | ||
436 | CONFIG_I2C_BOARDINFO=y | ||
437 | CONFIG_I2C_CHARDEV=y | ||
438 | CONFIG_I2C_HELPER_AUTO=y | ||
439 | |||
440 | # | ||
441 | # I2C Hardware Bus support | ||
442 | # | ||
443 | |||
444 | # | ||
445 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
446 | # | ||
447 | # CONFIG_I2C_GPIO is not set | ||
448 | # CONFIG_I2C_OCORES is not set | ||
449 | CONFIG_I2C_S3C2410=y | ||
450 | # CONFIG_I2C_SIMTEC is not set | ||
451 | |||
452 | # | ||
453 | # External I2C/SMBus adapter drivers | ||
454 | # | ||
455 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
456 | # CONFIG_I2C_TAOS_EVM is not set | ||
457 | |||
458 | # | ||
459 | # Other I2C/SMBus bus drivers | ||
460 | # | ||
461 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
462 | # CONFIG_I2C_STUB is not set | ||
463 | |||
464 | # | ||
465 | # Miscellaneous I2C Chip support | ||
466 | # | ||
467 | # CONFIG_DS1682 is not set | ||
468 | CONFIG_AT24=y | ||
469 | # CONFIG_SENSORS_EEPROM is not set | ||
470 | # CONFIG_SENSORS_PCF8574 is not set | ||
471 | # CONFIG_PCF8575 is not set | ||
472 | # CONFIG_SENSORS_PCA9539 is not set | ||
473 | # CONFIG_SENSORS_PCF8591 is not set | ||
474 | # CONFIG_TPS65010 is not set | ||
475 | # CONFIG_SENSORS_MAX6875 is not set | ||
476 | # CONFIG_SENSORS_TSL2550 is not set | ||
477 | # CONFIG_I2C_DEBUG_CORE is not set | ||
478 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
479 | # CONFIG_I2C_DEBUG_BUS is not set | ||
480 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
481 | # CONFIG_SPI is not set | ||
482 | CONFIG_ARCH_REQUIRE_GPIOLIB=y | ||
483 | CONFIG_GPIOLIB=y | ||
484 | # CONFIG_DEBUG_GPIO is not set | ||
485 | # CONFIG_GPIO_SYSFS is not set | ||
486 | |||
487 | # | ||
488 | # I2C GPIO expanders: | ||
489 | # | ||
490 | # CONFIG_GPIO_MAX732X is not set | ||
491 | # CONFIG_GPIO_PCA953X is not set | ||
492 | # CONFIG_GPIO_PCF857X is not set | ||
493 | |||
494 | # | ||
495 | # PCI GPIO expanders: | ||
496 | # | ||
497 | |||
498 | # | ||
499 | # SPI GPIO expanders: | ||
500 | # | ||
501 | # CONFIG_W1 is not set | ||
502 | # CONFIG_POWER_SUPPLY is not set | ||
503 | CONFIG_HWMON=y | ||
504 | # CONFIG_HWMON_VID is not set | ||
505 | # CONFIG_SENSORS_AD7414 is not set | ||
506 | # CONFIG_SENSORS_AD7418 is not set | ||
507 | # CONFIG_SENSORS_ADM1021 is not set | ||
508 | # CONFIG_SENSORS_ADM1025 is not set | ||
509 | # CONFIG_SENSORS_ADM1026 is not set | ||
510 | # CONFIG_SENSORS_ADM1029 is not set | ||
511 | # CONFIG_SENSORS_ADM1031 is not set | ||
512 | # CONFIG_SENSORS_ADM9240 is not set | ||
513 | # CONFIG_SENSORS_ADT7470 is not set | ||
514 | # CONFIG_SENSORS_ADT7473 is not set | ||
515 | # CONFIG_SENSORS_ATXP1 is not set | ||
516 | # CONFIG_SENSORS_DS1621 is not set | ||
517 | # CONFIG_SENSORS_F71805F is not set | ||
518 | # CONFIG_SENSORS_F71882FG is not set | ||
519 | # CONFIG_SENSORS_F75375S is not set | ||
520 | # CONFIG_SENSORS_GL518SM is not set | ||
521 | # CONFIG_SENSORS_GL520SM is not set | ||
522 | # CONFIG_SENSORS_IT87 is not set | ||
523 | # CONFIG_SENSORS_LM63 is not set | ||
524 | # CONFIG_SENSORS_LM75 is not set | ||
525 | # CONFIG_SENSORS_LM77 is not set | ||
526 | # CONFIG_SENSORS_LM78 is not set | ||
527 | # CONFIG_SENSORS_LM80 is not set | ||
528 | # CONFIG_SENSORS_LM83 is not set | ||
529 | # CONFIG_SENSORS_LM85 is not set | ||
530 | # CONFIG_SENSORS_LM87 is not set | ||
531 | # CONFIG_SENSORS_LM90 is not set | ||
532 | # CONFIG_SENSORS_LM92 is not set | ||
533 | # CONFIG_SENSORS_LM93 is not set | ||
534 | # CONFIG_SENSORS_MAX1619 is not set | ||
535 | # CONFIG_SENSORS_MAX6650 is not set | ||
536 | # CONFIG_SENSORS_PC87360 is not set | ||
537 | # CONFIG_SENSORS_PC87427 is not set | ||
538 | # CONFIG_SENSORS_DME1737 is not set | ||
539 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
540 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
541 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
542 | # CONFIG_SENSORS_ADS7828 is not set | ||
543 | # CONFIG_SENSORS_THMC50 is not set | ||
544 | # CONFIG_SENSORS_VT1211 is not set | ||
545 | # CONFIG_SENSORS_W83781D is not set | ||
546 | # CONFIG_SENSORS_W83791D is not set | ||
547 | # CONFIG_SENSORS_W83792D is not set | ||
548 | # CONFIG_SENSORS_W83793 is not set | ||
549 | # CONFIG_SENSORS_W83L785TS is not set | ||
550 | # CONFIG_SENSORS_W83L786NG is not set | ||
551 | # CONFIG_SENSORS_W83627HF is not set | ||
552 | # CONFIG_SENSORS_W83627EHF is not set | ||
553 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
554 | # CONFIG_THERMAL is not set | ||
555 | # CONFIG_THERMAL_HWMON is not set | ||
556 | # CONFIG_WATCHDOG is not set | ||
557 | |||
558 | # | ||
559 | # Sonics Silicon Backplane | ||
560 | # | ||
561 | CONFIG_SSB_POSSIBLE=y | ||
562 | # CONFIG_SSB is not set | ||
563 | |||
564 | # | ||
565 | # Multifunction device drivers | ||
566 | # | ||
567 | # CONFIG_MFD_CORE is not set | ||
568 | # CONFIG_MFD_SM501 is not set | ||
569 | # CONFIG_MFD_ASIC3 is not set | ||
570 | # CONFIG_HTC_EGPIO is not set | ||
571 | # CONFIG_HTC_PASIC3 is not set | ||
572 | # CONFIG_MFD_TMIO is not set | ||
573 | # CONFIG_MFD_T7L66XB is not set | ||
574 | # CONFIG_MFD_TC6387XB is not set | ||
575 | # CONFIG_MFD_TC6393XB is not set | ||
576 | # CONFIG_PMIC_DA903X is not set | ||
577 | # CONFIG_MFD_WM8400 is not set | ||
578 | # CONFIG_MFD_WM8350_I2C is not set | ||
579 | |||
580 | # | ||
581 | # Multimedia devices | ||
582 | # | ||
583 | |||
584 | # | ||
585 | # Multimedia core support | ||
586 | # | ||
587 | # CONFIG_VIDEO_DEV is not set | ||
588 | # CONFIG_VIDEO_MEDIA is not set | ||
589 | |||
590 | # | ||
591 | # Multimedia drivers | ||
592 | # | ||
593 | # CONFIG_DAB is not set | ||
594 | |||
595 | # | ||
596 | # Graphics support | ||
597 | # | ||
598 | # CONFIG_VGASTATE is not set | ||
599 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
600 | # CONFIG_FB is not set | ||
601 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
602 | |||
603 | # | ||
604 | # Display device support | ||
605 | # | ||
606 | # CONFIG_DISPLAY_SUPPORT is not set | ||
607 | |||
608 | # | ||
609 | # Console display driver support | ||
610 | # | ||
611 | # CONFIG_VGA_CONSOLE is not set | ||
612 | CONFIG_DUMMY_CONSOLE=y | ||
613 | # CONFIG_SOUND is not set | ||
614 | CONFIG_HID_SUPPORT=y | ||
615 | CONFIG_HID=y | ||
616 | CONFIG_HID_DEBUG=y | ||
617 | # CONFIG_HIDRAW is not set | ||
618 | # CONFIG_HID_PID is not set | ||
619 | |||
620 | # | ||
621 | # Special HID drivers | ||
622 | # | ||
623 | # CONFIG_HID_COMPAT is not set | ||
624 | CONFIG_USB_SUPPORT=y | ||
625 | CONFIG_USB_ARCH_HAS_HCD=y | ||
626 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
627 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
628 | # CONFIG_USB is not set | ||
629 | |||
630 | # | ||
631 | # Enable Host or Gadget support to see Inventra options | ||
632 | # | ||
633 | |||
634 | # | ||
635 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
636 | # | ||
637 | # CONFIG_USB_GADGET is not set | ||
638 | CONFIG_MMC=y | ||
639 | CONFIG_MMC_DEBUG=y | ||
640 | CONFIG_MMC_UNSAFE_RESUME=y | ||
641 | |||
642 | # | ||
643 | # MMC/SD/SDIO Card Drivers | ||
644 | # | ||
645 | CONFIG_MMC_BLOCK=y | ||
646 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
647 | CONFIG_SDIO_UART=y | ||
648 | # CONFIG_MMC_TEST is not set | ||
649 | |||
650 | # | ||
651 | # MMC/SD/SDIO Host Controller Drivers | ||
652 | # | ||
653 | CONFIG_MMC_SDHCI=y | ||
654 | CONFIG_MMC_SDHCI_S3C=y | ||
655 | # CONFIG_MEMSTICK is not set | ||
656 | # CONFIG_ACCESSIBILITY is not set | ||
657 | # CONFIG_NEW_LEDS is not set | ||
658 | CONFIG_RTC_LIB=y | ||
659 | # CONFIG_RTC_CLASS is not set | ||
660 | # CONFIG_DMADEVICES is not set | ||
661 | |||
662 | # | ||
663 | # Voltage and Current regulators | ||
664 | # | ||
665 | # CONFIG_REGULATOR is not set | ||
666 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set | ||
667 | # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set | ||
668 | # CONFIG_REGULATOR_BQ24022 is not set | ||
669 | # CONFIG_UIO is not set | ||
670 | |||
671 | # | ||
672 | # File systems | ||
673 | # | ||
674 | CONFIG_EXT2_FS=y | ||
675 | # CONFIG_EXT2_FS_XATTR is not set | ||
676 | # CONFIG_EXT2_FS_XIP is not set | ||
677 | CONFIG_EXT3_FS=y | ||
678 | CONFIG_EXT3_FS_XATTR=y | ||
679 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
680 | CONFIG_EXT3_FS_SECURITY=y | ||
681 | # CONFIG_EXT4_FS is not set | ||
682 | CONFIG_JBD=y | ||
683 | CONFIG_FS_MBCACHE=y | ||
684 | # CONFIG_REISERFS_FS is not set | ||
685 | # CONFIG_JFS_FS is not set | ||
686 | CONFIG_FS_POSIX_ACL=y | ||
687 | CONFIG_FILE_LOCKING=y | ||
688 | # CONFIG_XFS_FS is not set | ||
689 | # CONFIG_GFS2_FS is not set | ||
690 | CONFIG_DNOTIFY=y | ||
691 | CONFIG_INOTIFY=y | ||
692 | CONFIG_INOTIFY_USER=y | ||
693 | # CONFIG_QUOTA is not set | ||
694 | # CONFIG_AUTOFS_FS is not set | ||
695 | # CONFIG_AUTOFS4_FS is not set | ||
696 | # CONFIG_FUSE_FS is not set | ||
697 | CONFIG_GENERIC_ACL=y | ||
698 | |||
699 | # | ||
700 | # CD-ROM/DVD Filesystems | ||
701 | # | ||
702 | # CONFIG_ISO9660_FS is not set | ||
703 | # CONFIG_UDF_FS is not set | ||
704 | |||
705 | # | ||
706 | # DOS/FAT/NT Filesystems | ||
707 | # | ||
708 | # CONFIG_MSDOS_FS is not set | ||
709 | # CONFIG_VFAT_FS is not set | ||
710 | # CONFIG_NTFS_FS is not set | ||
711 | |||
712 | # | ||
713 | # Pseudo filesystems | ||
714 | # | ||
715 | CONFIG_PROC_FS=y | ||
716 | CONFIG_PROC_SYSCTL=y | ||
717 | CONFIG_PROC_PAGE_MONITOR=y | ||
718 | CONFIG_SYSFS=y | ||
719 | CONFIG_TMPFS=y | ||
720 | CONFIG_TMPFS_POSIX_ACL=y | ||
721 | # CONFIG_HUGETLB_PAGE is not set | ||
722 | # CONFIG_CONFIGFS_FS is not set | ||
723 | |||
724 | # | ||
725 | # Miscellaneous filesystems | ||
726 | # | ||
727 | # CONFIG_ADFS_FS is not set | ||
728 | # CONFIG_AFFS_FS is not set | ||
729 | # CONFIG_HFS_FS is not set | ||
730 | # CONFIG_HFSPLUS_FS is not set | ||
731 | # CONFIG_BEFS_FS is not set | ||
732 | # CONFIG_BFS_FS is not set | ||
733 | # CONFIG_EFS_FS is not set | ||
734 | CONFIG_CRAMFS=y | ||
735 | # CONFIG_VXFS_FS is not set | ||
736 | # CONFIG_MINIX_FS is not set | ||
737 | # CONFIG_OMFS_FS is not set | ||
738 | # CONFIG_HPFS_FS is not set | ||
739 | # CONFIG_QNX4FS_FS is not set | ||
740 | CONFIG_ROMFS_FS=y | ||
741 | # CONFIG_SYSV_FS is not set | ||
742 | # CONFIG_UFS_FS is not set | ||
743 | |||
744 | # | ||
745 | # Partition Types | ||
746 | # | ||
747 | # CONFIG_PARTITION_ADVANCED is not set | ||
748 | CONFIG_MSDOS_PARTITION=y | ||
749 | # CONFIG_NLS is not set | ||
750 | |||
751 | # | ||
752 | # Kernel hacking | ||
753 | # | ||
754 | # CONFIG_PRINTK_TIME is not set | ||
755 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
756 | CONFIG_ENABLE_MUST_CHECK=y | ||
757 | CONFIG_FRAME_WARN=1024 | ||
758 | CONFIG_MAGIC_SYSRQ=y | ||
759 | # CONFIG_UNUSED_SYMBOLS is not set | ||
760 | # CONFIG_DEBUG_FS is not set | ||
761 | # CONFIG_HEADERS_CHECK is not set | ||
762 | CONFIG_DEBUG_KERNEL=y | ||
763 | # CONFIG_DEBUG_SHIRQ is not set | ||
764 | CONFIG_DETECT_SOFTLOCKUP=y | ||
765 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
766 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
767 | CONFIG_SCHED_DEBUG=y | ||
768 | # CONFIG_SCHEDSTATS is not set | ||
769 | # CONFIG_TIMER_STATS is not set | ||
770 | # CONFIG_DEBUG_OBJECTS is not set | ||
771 | # CONFIG_SLUB_DEBUG_ON is not set | ||
772 | # CONFIG_SLUB_STATS is not set | ||
773 | CONFIG_DEBUG_RT_MUTEXES=y | ||
774 | CONFIG_DEBUG_PI_LIST=y | ||
775 | # CONFIG_RT_MUTEX_TESTER is not set | ||
776 | CONFIG_DEBUG_SPINLOCK=y | ||
777 | CONFIG_DEBUG_MUTEXES=y | ||
778 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
779 | # CONFIG_PROVE_LOCKING is not set | ||
780 | # CONFIG_LOCK_STAT is not set | ||
781 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
782 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
783 | # CONFIG_DEBUG_KOBJECT is not set | ||
784 | CONFIG_DEBUG_BUGVERBOSE=y | ||
785 | CONFIG_DEBUG_INFO=y | ||
786 | # CONFIG_DEBUG_VM is not set | ||
787 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
788 | CONFIG_DEBUG_MEMORY_INIT=y | ||
789 | # CONFIG_DEBUG_LIST is not set | ||
790 | # CONFIG_DEBUG_SG is not set | ||
791 | CONFIG_FRAME_POINTER=y | ||
792 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
793 | # CONFIG_RCU_TORTURE_TEST is not set | ||
794 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
795 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
796 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
797 | # CONFIG_FAULT_INJECTION is not set | ||
798 | # CONFIG_LATENCYTOP is not set | ||
799 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
800 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
801 | |||
802 | # | ||
803 | # Tracers | ||
804 | # | ||
805 | # CONFIG_FUNCTION_TRACER is not set | ||
806 | # CONFIG_SCHED_TRACER is not set | ||
807 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
808 | # CONFIG_BOOT_TRACER is not set | ||
809 | # CONFIG_STACK_TRACER is not set | ||
810 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
811 | # CONFIG_SAMPLES is not set | ||
812 | CONFIG_HAVE_ARCH_KGDB=y | ||
813 | # CONFIG_KGDB is not set | ||
814 | CONFIG_DEBUG_USER=y | ||
815 | CONFIG_DEBUG_ERRORS=y | ||
816 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
817 | CONFIG_DEBUG_LL=y | ||
818 | # CONFIG_DEBUG_ICEDCC is not set | ||
819 | CONFIG_DEBUG_S3C_PORT=y | ||
820 | CONFIG_DEBUG_S3C_UART=0 | ||
821 | |||
822 | # | ||
823 | # Security options | ||
824 | # | ||
825 | # CONFIG_KEYS is not set | ||
826 | # CONFIG_SECURITY is not set | ||
827 | # CONFIG_SECURITYFS is not set | ||
828 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
829 | # CONFIG_CRYPTO is not set | ||
830 | |||
831 | # | ||
832 | # Library routines | ||
833 | # | ||
834 | CONFIG_BITREVERSE=y | ||
835 | # CONFIG_CRC_CCITT is not set | ||
836 | # CONFIG_CRC16 is not set | ||
837 | # CONFIG_CRC_T10DIF is not set | ||
838 | # CONFIG_CRC_ITU_T is not set | ||
839 | CONFIG_CRC32=y | ||
840 | # CONFIG_CRC7 is not set | ||
841 | # CONFIG_LIBCRC32C is not set | ||
842 | CONFIG_ZLIB_INFLATE=y | ||
843 | CONFIG_PLIST=y | ||
844 | CONFIG_HAS_IOMEM=y | ||
845 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/configs/w90p910_defconfig b/arch/arm/configs/w90p910_defconfig new file mode 100644 index 000000000000..56bda7c6d670 --- /dev/null +++ b/arch/arm/configs/w90p910_defconfig | |||
@@ -0,0 +1,626 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.27-rc8-git8 | ||
4 | # Sat Nov 15 10:05:00 2008 | ||
5 | # | ||
6 | CONFIG_ARM=y | ||
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
8 | # CONFIG_GENERIC_GPIO is not set | ||
9 | # CONFIG_GENERIC_TIME is not set | ||
10 | # CONFIG_GENERIC_CLOCKEVENTS is not set | ||
11 | CONFIG_MMU=y | ||
12 | # CONFIG_NO_IOPORT is not set | ||
13 | CONFIG_GENERIC_HARDIRQS=y | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
16 | CONFIG_LOCKDEP_SUPPORT=y | ||
17 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
18 | CONFIG_HARDIRQS_SW_RESEND=y | ||
19 | CONFIG_GENERIC_IRQ_PROBE=y | ||
20 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
21 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
22 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
23 | CONFIG_GENERIC_HWEIGHT=y | ||
24 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
25 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
26 | CONFIG_ZONE_DMA=y | ||
27 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | ||
28 | CONFIG_VECTORS_BASE=0xffff0000 | ||
29 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
30 | |||
31 | # | ||
32 | # General setup | ||
33 | # | ||
34 | CONFIG_EXPERIMENTAL=y | ||
35 | CONFIG_BROKEN_ON_SMP=y | ||
36 | CONFIG_LOCK_KERNEL=y | ||
37 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
38 | CONFIG_LOCALVERSION="" | ||
39 | # CONFIG_LOCALVERSION_AUTO is not set | ||
40 | CONFIG_SWAP=y | ||
41 | CONFIG_SYSVIPC=y | ||
42 | CONFIG_SYSVIPC_SYSCTL=y | ||
43 | CONFIG_BSD_PROCESS_ACCT=y | ||
44 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
45 | # CONFIG_IKCONFIG is not set | ||
46 | CONFIG_LOG_BUF_SHIFT=17 | ||
47 | # CONFIG_CGROUPS is not set | ||
48 | # CONFIG_GROUP_SCHED is not set | ||
49 | CONFIG_SYSFS_DEPRECATED=y | ||
50 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
51 | CONFIG_RELAY=y | ||
52 | CONFIG_NAMESPACES=y | ||
53 | # CONFIG_UTS_NS is not set | ||
54 | # CONFIG_IPC_NS is not set | ||
55 | CONFIG_USER_NS=y | ||
56 | # CONFIG_PID_NS is not set | ||
57 | CONFIG_BLK_DEV_INITRD=y | ||
58 | CONFIG_INITRAMFS_SOURCE="" | ||
59 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
60 | CONFIG_SYSCTL=y | ||
61 | # CONFIG_EMBEDDED is not set | ||
62 | CONFIG_UID16=y | ||
63 | CONFIG_SYSCTL_SYSCALL=y | ||
64 | CONFIG_KALLSYMS=y | ||
65 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
66 | CONFIG_HOTPLUG=y | ||
67 | CONFIG_PRINTK=y | ||
68 | CONFIG_BUG=y | ||
69 | CONFIG_ELF_CORE=y | ||
70 | CONFIG_COMPAT_BRK=y | ||
71 | CONFIG_BASE_FULL=y | ||
72 | CONFIG_FUTEX=y | ||
73 | CONFIG_ANON_INODES=y | ||
74 | CONFIG_EPOLL=y | ||
75 | CONFIG_SIGNALFD=y | ||
76 | CONFIG_TIMERFD=y | ||
77 | CONFIG_EVENTFD=y | ||
78 | CONFIG_SHMEM=y | ||
79 | CONFIG_VM_EVENT_COUNTERS=y | ||
80 | CONFIG_SLAB=y | ||
81 | # CONFIG_SLUB is not set | ||
82 | # CONFIG_SLOB is not set | ||
83 | # CONFIG_PROFILING is not set | ||
84 | # CONFIG_MARKERS is not set | ||
85 | CONFIG_HAVE_OPROFILE=y | ||
86 | # CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is not set | ||
87 | # CONFIG_HAVE_IOREMAP_PROT is not set | ||
88 | CONFIG_HAVE_KPROBES=y | ||
89 | CONFIG_HAVE_KRETPROBES=y | ||
90 | # CONFIG_HAVE_ARCH_TRACEHOOK is not set | ||
91 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
92 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | ||
93 | # CONFIG_HAVE_CLK is not set | ||
94 | CONFIG_PROC_PAGE_MONITOR=y | ||
95 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | ||
96 | CONFIG_SLABINFO=y | ||
97 | CONFIG_RT_MUTEXES=y | ||
98 | # CONFIG_TINY_SHMEM is not set | ||
99 | CONFIG_BASE_SMALL=0 | ||
100 | # CONFIG_MODULES is not set | ||
101 | CONFIG_BLOCK=y | ||
102 | CONFIG_LBD=y | ||
103 | CONFIG_BLK_DEV_IO_TRACE=y | ||
104 | CONFIG_LSF=y | ||
105 | CONFIG_BLK_DEV_BSG=y | ||
106 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
107 | |||
108 | # | ||
109 | # IO Schedulers | ||
110 | # | ||
111 | CONFIG_IOSCHED_NOOP=y | ||
112 | CONFIG_IOSCHED_AS=y | ||
113 | CONFIG_IOSCHED_DEADLINE=y | ||
114 | CONFIG_IOSCHED_CFQ=y | ||
115 | # CONFIG_DEFAULT_AS is not set | ||
116 | # CONFIG_DEFAULT_DEADLINE is not set | ||
117 | CONFIG_DEFAULT_CFQ=y | ||
118 | # CONFIG_DEFAULT_NOOP is not set | ||
119 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
120 | CONFIG_CLASSIC_RCU=y | ||
121 | |||
122 | # | ||
123 | # System Type | ||
124 | # | ||
125 | # CONFIG_ARCH_AAEC2000 is not set | ||
126 | # CONFIG_ARCH_INTEGRATOR is not set | ||
127 | # CONFIG_ARCH_REALVIEW is not set | ||
128 | # CONFIG_ARCH_VERSATILE is not set | ||
129 | # CONFIG_ARCH_AT91 is not set | ||
130 | # CONFIG_ARCH_CLPS7500 is not set | ||
131 | # CONFIG_ARCH_CLPS711X is not set | ||
132 | # CONFIG_ARCH_EBSA110 is not set | ||
133 | # CONFIG_ARCH_EP93XX is not set | ||
134 | # CONFIG_ARCH_FOOTBRIDGE is not set | ||
135 | # CONFIG_ARCH_NETX is not set | ||
136 | # CONFIG_ARCH_H720X is not set | ||
137 | # CONFIG_ARCH_IMX is not set | ||
138 | # CONFIG_ARCH_IOP13XX is not set | ||
139 | # CONFIG_ARCH_IOP32X is not set | ||
140 | # CONFIG_ARCH_IOP33X is not set | ||
141 | # CONFIG_ARCH_IXP23XX is not set | ||
142 | # CONFIG_ARCH_IXP2000 is not set | ||
143 | # CONFIG_ARCH_IXP4XX is not set | ||
144 | # CONFIG_ARCH_L7200 is not set | ||
145 | # CONFIG_ARCH_KIRKWOOD is not set | ||
146 | # CONFIG_ARCH_KS8695 is not set | ||
147 | # CONFIG_ARCH_NS9XXX is not set | ||
148 | # CONFIG_ARCH_LOKI is not set | ||
149 | # CONFIG_ARCH_MV78XX0 is not set | ||
150 | # CONFIG_ARCH_MXC is not set | ||
151 | # CONFIG_ARCH_ORION5X is not set | ||
152 | # CONFIG_ARCH_PNX4008 is not set | ||
153 | # CONFIG_ARCH_PXA is not set | ||
154 | # CONFIG_ARCH_RPC is not set | ||
155 | # CONFIG_ARCH_SA1100 is not set | ||
156 | # CONFIG_ARCH_S3C2410 is not set | ||
157 | # CONFIG_ARCH_SHARK is not set | ||
158 | # CONFIG_ARCH_LH7A40X is not set | ||
159 | # CONFIG_ARCH_DAVINCI is not set | ||
160 | # CONFIG_ARCH_OMAP is not set | ||
161 | # CONFIG_ARCH_MSM7X00A is not set | ||
162 | CONFIG_ARCH_W90X900=y | ||
163 | |||
164 | # | ||
165 | # Boot options | ||
166 | # | ||
167 | |||
168 | # | ||
169 | # Power management | ||
170 | # | ||
171 | CONFIG_CPU_W90P910=y | ||
172 | |||
173 | # | ||
174 | # W90P910 Machines | ||
175 | # | ||
176 | CONFIG_MACH_W90P910EVB=y | ||
177 | |||
178 | # | ||
179 | # Processor Type | ||
180 | # | ||
181 | CONFIG_CPU_32=y | ||
182 | CONFIG_CPU_ARM926T=y | ||
183 | CONFIG_CPU_32v5=y | ||
184 | CONFIG_CPU_ABRT_EV5TJ=y | ||
185 | CONFIG_CPU_PABRT_NOIFAR=y | ||
186 | CONFIG_CPU_CACHE_VIVT=y | ||
187 | CONFIG_CPU_COPY_V4WB=y | ||
188 | CONFIG_CPU_TLB_V4WBI=y | ||
189 | CONFIG_CPU_CP15=y | ||
190 | CONFIG_CPU_CP15_MMU=y | ||
191 | |||
192 | # | ||
193 | # Processor Features | ||
194 | # | ||
195 | CONFIG_ARM_THUMB=y | ||
196 | # CONFIG_CPU_ICACHE_DISABLE is not set | ||
197 | # CONFIG_CPU_DCACHE_DISABLE is not set | ||
198 | # CONFIG_CPU_DCACHE_WRITETHROUGH is not set | ||
199 | # CONFIG_CPU_CACHE_ROUND_ROBIN is not set | ||
200 | # CONFIG_OUTER_CACHE is not set | ||
201 | |||
202 | # | ||
203 | # Bus support | ||
204 | # | ||
205 | # CONFIG_PCI_SYSCALL is not set | ||
206 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
207 | # CONFIG_PCCARD is not set | ||
208 | |||
209 | # | ||
210 | # Kernel Features | ||
211 | # | ||
212 | # CONFIG_TICK_ONESHOT is not set | ||
213 | CONFIG_PREEMPT=y | ||
214 | CONFIG_HZ=100 | ||
215 | CONFIG_AEABI=y | ||
216 | CONFIG_OABI_COMPAT=y | ||
217 | CONFIG_ARCH_FLATMEM_HAS_HOLES=y | ||
218 | # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set | ||
219 | CONFIG_SELECT_MEMORY_MODEL=y | ||
220 | CONFIG_FLATMEM_MANUAL=y | ||
221 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
222 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
223 | CONFIG_FLATMEM=y | ||
224 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
225 | # CONFIG_SPARSEMEM_STATIC is not set | ||
226 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
227 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
228 | CONFIG_SPLIT_PTLOCK_CPUS=4096 | ||
229 | # CONFIG_RESOURCES_64BIT is not set | ||
230 | CONFIG_ZONE_DMA_FLAG=1 | ||
231 | CONFIG_BOUNCE=y | ||
232 | CONFIG_VIRT_TO_BUS=y | ||
233 | CONFIG_ALIGNMENT_TRAP=y | ||
234 | |||
235 | # | ||
236 | # Boot options | ||
237 | # | ||
238 | CONFIG_ZBOOT_ROM_TEXT=0 | ||
239 | CONFIG_ZBOOT_ROM_BSS=0 | ||
240 | CONFIG_CMDLINE="root=/dev/ram0 console=ttyS0,115200n8 initrd=0xa00000,4000000 mem=64M" | ||
241 | # CONFIG_XIP_KERNEL is not set | ||
242 | CONFIG_KEXEC=y | ||
243 | CONFIG_ATAGS_PROC=y | ||
244 | |||
245 | # | ||
246 | # Floating point emulation | ||
247 | # | ||
248 | |||
249 | # | ||
250 | # At least one emulation must be selected | ||
251 | # | ||
252 | CONFIG_FPE_NWFPE=y | ||
253 | # CONFIG_FPE_NWFPE_XP is not set | ||
254 | # CONFIG_FPE_FASTFPE is not set | ||
255 | # CONFIG_VFP is not set | ||
256 | |||
257 | # | ||
258 | # Userspace binary formats | ||
259 | # | ||
260 | CONFIG_BINFMT_ELF=y | ||
261 | # CONFIG_BINFMT_AOUT is not set | ||
262 | # CONFIG_BINFMT_MISC is not set | ||
263 | |||
264 | # | ||
265 | # Power management options | ||
266 | # | ||
267 | # CONFIG_PM is not set | ||
268 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
269 | # CONFIG_NET is not set | ||
270 | |||
271 | # | ||
272 | # Device Drivers | ||
273 | # | ||
274 | |||
275 | # | ||
276 | # Generic Driver Options | ||
277 | # | ||
278 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
279 | CONFIG_STANDALONE=y | ||
280 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
281 | CONFIG_FW_LOADER=y | ||
282 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
283 | CONFIG_EXTRA_FIRMWARE="" | ||
284 | # CONFIG_SYS_HYPERVISOR is not set | ||
285 | # CONFIG_MTD is not set | ||
286 | # CONFIG_PARPORT is not set | ||
287 | CONFIG_BLK_DEV=y | ||
288 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
289 | # CONFIG_BLK_DEV_LOOP is not set | ||
290 | CONFIG_BLK_DEV_RAM=y | ||
291 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
292 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
293 | # CONFIG_BLK_DEV_XIP is not set | ||
294 | # CONFIG_CDROM_PKTCDVD is not set | ||
295 | # CONFIG_MISC_DEVICES is not set | ||
296 | CONFIG_HAVE_IDE=y | ||
297 | # CONFIG_IDE is not set | ||
298 | |||
299 | # | ||
300 | # SCSI device support | ||
301 | # | ||
302 | # CONFIG_RAID_ATTRS is not set | ||
303 | # CONFIG_SCSI is not set | ||
304 | # CONFIG_SCSI_DMA is not set | ||
305 | # CONFIG_SCSI_NETLINK is not set | ||
306 | # CONFIG_ATA is not set | ||
307 | # CONFIG_MD is not set | ||
308 | |||
309 | # | ||
310 | # Input device support | ||
311 | # | ||
312 | CONFIG_INPUT=y | ||
313 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
314 | # CONFIG_INPUT_POLLDEV is not set | ||
315 | |||
316 | # | ||
317 | # Userland interfaces | ||
318 | # | ||
319 | CONFIG_INPUT_MOUSEDEV=y | ||
320 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
321 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
322 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
323 | # CONFIG_INPUT_JOYDEV is not set | ||
324 | # CONFIG_INPUT_EVDEV is not set | ||
325 | # CONFIG_INPUT_EVBUG is not set | ||
326 | |||
327 | # | ||
328 | # Input Device Drivers | ||
329 | # | ||
330 | # CONFIG_INPUT_KEYBOARD is not set | ||
331 | # CONFIG_INPUT_MOUSE is not set | ||
332 | # CONFIG_INPUT_JOYSTICK is not set | ||
333 | # CONFIG_INPUT_TABLET is not set | ||
334 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
335 | # CONFIG_INPUT_MISC is not set | ||
336 | |||
337 | # | ||
338 | # Hardware I/O ports | ||
339 | # | ||
340 | # CONFIG_SERIO is not set | ||
341 | # CONFIG_GAMEPORT is not set | ||
342 | |||
343 | # | ||
344 | # Character devices | ||
345 | # | ||
346 | CONFIG_VT=y | ||
347 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
348 | CONFIG_VT_CONSOLE=y | ||
349 | CONFIG_HW_CONSOLE=y | ||
350 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
351 | # CONFIG_DEVKMEM is not set | ||
352 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
353 | |||
354 | # | ||
355 | # Serial drivers | ||
356 | # | ||
357 | # CONFIG_SERIAL_8250 is not set | ||
358 | |||
359 | # | ||
360 | # Non-8250 serial port support | ||
361 | # | ||
362 | CONFIG_SERIAL_W90X900=y | ||
363 | # CONFIG_SERIAL_W90X900_PORT1 is not set | ||
364 | # CONFIG_SERIAL_W90X900_PORT2 is not set | ||
365 | # CONFIG_SERIAL_W90X900_PORT3 is not set | ||
366 | # CONFIG_SERIAL_W90X900_PORT4 is not set | ||
367 | CONFIG_SERIAL_W90X900_CONSOLE=y | ||
368 | CONFIG_SERIAL_CORE=y | ||
369 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
370 | CONFIG_UNIX98_PTYS=y | ||
371 | # CONFIG_LEGACY_PTYS is not set | ||
372 | # CONFIG_IPMI_HANDLER is not set | ||
373 | # CONFIG_HW_RANDOM is not set | ||
374 | # CONFIG_NVRAM is not set | ||
375 | # CONFIG_R3964 is not set | ||
376 | # CONFIG_RAW_DRIVER is not set | ||
377 | # CONFIG_TCG_TPM is not set | ||
378 | # CONFIG_I2C is not set | ||
379 | # CONFIG_SPI is not set | ||
380 | # CONFIG_W1 is not set | ||
381 | # CONFIG_POWER_SUPPLY is not set | ||
382 | # CONFIG_HWMON is not set | ||
383 | # CONFIG_WATCHDOG is not set | ||
384 | |||
385 | # | ||
386 | # Sonics Silicon Backplane | ||
387 | # | ||
388 | CONFIG_SSB_POSSIBLE=y | ||
389 | # CONFIG_SSB is not set | ||
390 | |||
391 | # | ||
392 | # Multifunction device drivers | ||
393 | # | ||
394 | # CONFIG_MFD_CORE is not set | ||
395 | # CONFIG_MFD_SM501 is not set | ||
396 | # CONFIG_HTC_PASIC3 is not set | ||
397 | # CONFIG_MFD_TMIO is not set | ||
398 | # CONFIG_MFD_T7L66XB is not set | ||
399 | # CONFIG_MFD_TC6387XB is not set | ||
400 | |||
401 | # | ||
402 | # Multimedia devices | ||
403 | # | ||
404 | |||
405 | # | ||
406 | # Multimedia core support | ||
407 | # | ||
408 | # CONFIG_VIDEO_DEV is not set | ||
409 | # CONFIG_VIDEO_MEDIA is not set | ||
410 | |||
411 | # | ||
412 | # Multimedia drivers | ||
413 | # | ||
414 | # CONFIG_DAB is not set | ||
415 | |||
416 | # | ||
417 | # Graphics support | ||
418 | # | ||
419 | # CONFIG_VGASTATE is not set | ||
420 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
421 | # CONFIG_FB is not set | ||
422 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
423 | |||
424 | # | ||
425 | # Display device support | ||
426 | # | ||
427 | # CONFIG_DISPLAY_SUPPORT is not set | ||
428 | |||
429 | # | ||
430 | # Console display driver support | ||
431 | # | ||
432 | # CONFIG_VGA_CONSOLE is not set | ||
433 | CONFIG_DUMMY_CONSOLE=y | ||
434 | # CONFIG_SOUND is not set | ||
435 | # CONFIG_HID_SUPPORT is not set | ||
436 | # CONFIG_USB_SUPPORT is not set | ||
437 | # CONFIG_MMC is not set | ||
438 | # CONFIG_NEW_LEDS is not set | ||
439 | CONFIG_RTC_LIB=y | ||
440 | # CONFIG_RTC_CLASS is not set | ||
441 | # CONFIG_DMADEVICES is not set | ||
442 | |||
443 | # | ||
444 | # Voltage and Current regulators | ||
445 | # | ||
446 | # CONFIG_REGULATOR is not set | ||
447 | # CONFIG_REGULATOR_FIXED_VOLTAGE is not set | ||
448 | # CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set | ||
449 | # CONFIG_REGULATOR_BQ24022 is not set | ||
450 | # CONFIG_UIO is not set | ||
451 | |||
452 | # | ||
453 | # File systems | ||
454 | # | ||
455 | # CONFIG_EXT2_FS is not set | ||
456 | # CONFIG_EXT3_FS is not set | ||
457 | # CONFIG_EXT4DEV_FS is not set | ||
458 | # CONFIG_REISERFS_FS is not set | ||
459 | # CONFIG_JFS_FS is not set | ||
460 | CONFIG_FS_POSIX_ACL=y | ||
461 | # CONFIG_XFS_FS is not set | ||
462 | # CONFIG_GFS2_FS is not set | ||
463 | # CONFIG_DNOTIFY is not set | ||
464 | # CONFIG_INOTIFY is not set | ||
465 | # CONFIG_QUOTA is not set | ||
466 | # CONFIG_AUTOFS_FS is not set | ||
467 | # CONFIG_AUTOFS4_FS is not set | ||
468 | # CONFIG_FUSE_FS is not set | ||
469 | CONFIG_GENERIC_ACL=y | ||
470 | |||
471 | # | ||
472 | # CD-ROM/DVD Filesystems | ||
473 | # | ||
474 | # CONFIG_ISO9660_FS is not set | ||
475 | # CONFIG_UDF_FS is not set | ||
476 | |||
477 | # | ||
478 | # DOS/FAT/NT Filesystems | ||
479 | # | ||
480 | # CONFIG_MSDOS_FS is not set | ||
481 | # CONFIG_VFAT_FS is not set | ||
482 | # CONFIG_NTFS_FS is not set | ||
483 | |||
484 | # | ||
485 | # Pseudo filesystems | ||
486 | # | ||
487 | CONFIG_PROC_FS=y | ||
488 | CONFIG_PROC_SYSCTL=y | ||
489 | CONFIG_SYSFS=y | ||
490 | CONFIG_TMPFS=y | ||
491 | CONFIG_TMPFS_POSIX_ACL=y | ||
492 | # CONFIG_HUGETLB_PAGE is not set | ||
493 | # CONFIG_CONFIGFS_FS is not set | ||
494 | |||
495 | # | ||
496 | # Miscellaneous filesystems | ||
497 | # | ||
498 | # CONFIG_ADFS_FS is not set | ||
499 | # CONFIG_AFFS_FS is not set | ||
500 | # CONFIG_HFS_FS is not set | ||
501 | # CONFIG_HFSPLUS_FS is not set | ||
502 | # CONFIG_BEFS_FS is not set | ||
503 | # CONFIG_BFS_FS is not set | ||
504 | # CONFIG_EFS_FS is not set | ||
505 | # CONFIG_CRAMFS is not set | ||
506 | # CONFIG_VXFS_FS is not set | ||
507 | # CONFIG_MINIX_FS is not set | ||
508 | # CONFIG_OMFS_FS is not set | ||
509 | # CONFIG_HPFS_FS is not set | ||
510 | # CONFIG_QNX4FS_FS is not set | ||
511 | CONFIG_ROMFS_FS=y | ||
512 | # CONFIG_SYSV_FS is not set | ||
513 | # CONFIG_UFS_FS is not set | ||
514 | |||
515 | # | ||
516 | # Partition Types | ||
517 | # | ||
518 | CONFIG_PARTITION_ADVANCED=y | ||
519 | # CONFIG_ACORN_PARTITION is not set | ||
520 | # CONFIG_OSF_PARTITION is not set | ||
521 | # CONFIG_AMIGA_PARTITION is not set | ||
522 | # CONFIG_ATARI_PARTITION is not set | ||
523 | # CONFIG_MAC_PARTITION is not set | ||
524 | CONFIG_MSDOS_PARTITION=y | ||
525 | # CONFIG_BSD_DISKLABEL is not set | ||
526 | # CONFIG_MINIX_SUBPARTITION is not set | ||
527 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
528 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
529 | # CONFIG_LDM_PARTITION is not set | ||
530 | # CONFIG_SGI_PARTITION is not set | ||
531 | # CONFIG_ULTRIX_PARTITION is not set | ||
532 | # CONFIG_SUN_PARTITION is not set | ||
533 | # CONFIG_KARMA_PARTITION is not set | ||
534 | # CONFIG_EFI_PARTITION is not set | ||
535 | # CONFIG_SYSV68_PARTITION is not set | ||
536 | CONFIG_NLS=y | ||
537 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
538 | CONFIG_NLS_CODEPAGE_437=y | ||
539 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
540 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
541 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
542 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
543 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
544 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
545 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
546 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
547 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
548 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
549 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
550 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
551 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
552 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
553 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
554 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
555 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
556 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
557 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
558 | # CONFIG_NLS_ISO8859_8 is not set | ||
559 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
560 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
561 | # CONFIG_NLS_ASCII is not set | ||
562 | CONFIG_NLS_ISO8859_1=y | ||
563 | # CONFIG_NLS_ISO8859_2 is not set | ||
564 | # CONFIG_NLS_ISO8859_3 is not set | ||
565 | # CONFIG_NLS_ISO8859_4 is not set | ||
566 | # CONFIG_NLS_ISO8859_5 is not set | ||
567 | # CONFIG_NLS_ISO8859_6 is not set | ||
568 | # CONFIG_NLS_ISO8859_7 is not set | ||
569 | # CONFIG_NLS_ISO8859_9 is not set | ||
570 | # CONFIG_NLS_ISO8859_13 is not set | ||
571 | # CONFIG_NLS_ISO8859_14 is not set | ||
572 | # CONFIG_NLS_ISO8859_15 is not set | ||
573 | # CONFIG_NLS_KOI8_R is not set | ||
574 | # CONFIG_NLS_KOI8_U is not set | ||
575 | # CONFIG_NLS_UTF8 is not set | ||
576 | |||
577 | # | ||
578 | # Kernel hacking | ||
579 | # | ||
580 | # CONFIG_PRINTK_TIME is not set | ||
581 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
582 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
583 | CONFIG_FRAME_WARN=1024 | ||
584 | # CONFIG_MAGIC_SYSRQ is not set | ||
585 | # CONFIG_UNUSED_SYMBOLS is not set | ||
586 | CONFIG_DEBUG_FS=y | ||
587 | # CONFIG_HEADERS_CHECK is not set | ||
588 | # CONFIG_DEBUG_KERNEL is not set | ||
589 | CONFIG_DEBUG_BUGVERBOSE=y | ||
590 | CONFIG_DEBUG_MEMORY_INIT=y | ||
591 | CONFIG_FRAME_POINTER=y | ||
592 | # CONFIG_LATENCYTOP is not set | ||
593 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
594 | CONFIG_HAVE_FTRACE=y | ||
595 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
596 | # CONFIG_FTRACE is not set | ||
597 | # CONFIG_SCHED_TRACER is not set | ||
598 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
599 | # CONFIG_SAMPLES is not set | ||
600 | CONFIG_HAVE_ARCH_KGDB=y | ||
601 | # CONFIG_DEBUG_USER is not set | ||
602 | |||
603 | # | ||
604 | # Security options | ||
605 | # | ||
606 | # CONFIG_KEYS is not set | ||
607 | # CONFIG_SECURITY is not set | ||
608 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
609 | # CONFIG_CRYPTO is not set | ||
610 | |||
611 | # | ||
612 | # Library routines | ||
613 | # | ||
614 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
615 | # CONFIG_GENERIC_FIND_NEXT_BIT is not set | ||
616 | # CONFIG_CRC_CCITT is not set | ||
617 | # CONFIG_CRC16 is not set | ||
618 | # CONFIG_CRC_T10DIF is not set | ||
619 | # CONFIG_CRC_ITU_T is not set | ||
620 | # CONFIG_CRC32 is not set | ||
621 | # CONFIG_CRC7 is not set | ||
622 | # CONFIG_LIBCRC32C is not set | ||
623 | CONFIG_PLIST=y | ||
624 | CONFIG_HAS_IOMEM=y | ||
625 | CONFIG_HAS_IOPORT=y | ||
626 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h index de6c59f814a1..6cbd8fdc9f1f 100644 --- a/arch/arm/include/asm/cacheflush.h +++ b/arch/arm/include/asm/cacheflush.h | |||
@@ -10,11 +10,11 @@ | |||
10 | #ifndef _ASMARM_CACHEFLUSH_H | 10 | #ifndef _ASMARM_CACHEFLUSH_H |
11 | #define _ASMARM_CACHEFLUSH_H | 11 | #define _ASMARM_CACHEFLUSH_H |
12 | 12 | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
15 | 14 | ||
16 | #include <asm/glue.h> | 15 | #include <asm/glue.h> |
17 | #include <asm/shmparam.h> | 16 | #include <asm/shmparam.h> |
17 | #include <asm/cachetype.h> | ||
18 | 18 | ||
19 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | 19 | #define CACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) |
20 | 20 | ||
@@ -296,16 +296,6 @@ static inline void outer_flush_range(unsigned long start, unsigned long end) | |||
296 | #endif | 296 | #endif |
297 | 297 | ||
298 | /* | 298 | /* |
299 | * flush_cache_vmap() is used when creating mappings (eg, via vmap, | ||
300 | * vmalloc, ioremap etc) in kernel space for pages. Since the | ||
301 | * direct-mappings of these pages may contain cached data, we need | ||
302 | * to do a full cache flush to ensure that writebacks don't corrupt | ||
303 | * data placed into these pages via the new mappings. | ||
304 | */ | ||
305 | #define flush_cache_vmap(start, end) flush_cache_all() | ||
306 | #define flush_cache_vunmap(start, end) flush_cache_all() | ||
307 | |||
308 | /* | ||
309 | * Copy user data from/to a page which is mapped into a different | 299 | * Copy user data from/to a page which is mapped into a different |
310 | * processes address space. Really, we want to allow our "user | 300 | * processes address space. Really, we want to allow our "user |
311 | * space" model to handle this. | 301 | * space" model to handle this. |
@@ -444,4 +434,29 @@ static inline void flush_ioremap_region(unsigned long phys, void __iomem *virt, | |||
444 | dmac_inv_range(start, start + size); | 434 | dmac_inv_range(start, start + size); |
445 | } | 435 | } |
446 | 436 | ||
437 | /* | ||
438 | * flush_cache_vmap() is used when creating mappings (eg, via vmap, | ||
439 | * vmalloc, ioremap etc) in kernel space for pages. On non-VIPT | ||
440 | * caches, since the direct-mappings of these pages may contain cached | ||
441 | * data, we need to do a full cache flush to ensure that writebacks | ||
442 | * don't corrupt data placed into these pages via the new mappings. | ||
443 | */ | ||
444 | static inline void flush_cache_vmap(unsigned long start, unsigned long end) | ||
445 | { | ||
446 | if (!cache_is_vipt_nonaliasing()) | ||
447 | flush_cache_all(); | ||
448 | else | ||
449 | /* | ||
450 | * set_pte_at() called from vmap_pte_range() does not | ||
451 | * have a DSB after cleaning the cache line. | ||
452 | */ | ||
453 | dsb(); | ||
454 | } | ||
455 | |||
456 | static inline void flush_cache_vunmap(unsigned long start, unsigned long end) | ||
457 | { | ||
458 | if (!cache_is_vipt_nonaliasing()) | ||
459 | flush_cache_all(); | ||
460 | } | ||
461 | |||
447 | #endif | 462 | #endif |
diff --git a/arch/arm/include/asm/clkdev.h b/arch/arm/include/asm/clkdev.h new file mode 100644 index 000000000000..b6ec7c627b39 --- /dev/null +++ b/arch/arm/include/asm/clkdev.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * arch/arm/include/asm/clkdev.h | ||
3 | * | ||
4 | * Copyright (C) 2008 Russell King. | ||
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 | * Helper for the clk API to assist looking up a struct clk. | ||
11 | */ | ||
12 | #ifndef __ASM_CLKDEV_H | ||
13 | #define __ASM_CLKDEV_H | ||
14 | |||
15 | struct clk; | ||
16 | |||
17 | struct clk_lookup { | ||
18 | struct list_head node; | ||
19 | const char *dev_id; | ||
20 | const char *con_id; | ||
21 | struct clk *clk; | ||
22 | }; | ||
23 | |||
24 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | ||
25 | const char *dev_fmt, ...); | ||
26 | |||
27 | void clkdev_add(struct clk_lookup *cl); | ||
28 | void clkdev_drop(struct clk_lookup *cl); | ||
29 | |||
30 | #endif | ||
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 4ed149cbb32a..22cb14ec3438 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -69,7 +69,9 @@ extern void dma_cache_maint(const void *kaddr, size_t size, int rw); | |||
69 | */ | 69 | */ |
70 | static inline int dma_supported(struct device *dev, u64 mask) | 70 | static inline int dma_supported(struct device *dev, u64 mask) |
71 | { | 71 | { |
72 | return dev->dma_mask && *dev->dma_mask != 0; | 72 | if (mask < ISA_DMA_THRESHOLD) |
73 | return 0; | ||
74 | return 1; | ||
73 | } | 75 | } |
74 | 76 | ||
75 | static inline int dma_set_mask(struct device *dev, u64 dma_mask) | 77 | static inline int dma_set_mask(struct device *dev, u64 dma_mask) |
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h index 75154b193117..df5638f3643a 100644 --- a/arch/arm/include/asm/dma.h +++ b/arch/arm/include/asm/dma.h | |||
@@ -1,12 +1,7 @@ | |||
1 | #ifndef __ASM_ARM_DMA_H | 1 | #ifndef __ASM_ARM_DMA_H |
2 | #define __ASM_ARM_DMA_H | 2 | #define __ASM_ARM_DMA_H |
3 | 3 | ||
4 | typedef unsigned int dmach_t; | 4 | #include <asm/memory.h> |
5 | |||
6 | #include <linux/spinlock.h> | ||
7 | #include <asm/system.h> | ||
8 | #include <asm/scatterlist.h> | ||
9 | #include <mach/dma.h> | ||
10 | 5 | ||
11 | /* | 6 | /* |
12 | * This is the maximum virtual address which can be DMA'd from. | 7 | * This is the maximum virtual address which can be DMA'd from. |
@@ -15,6 +10,19 @@ typedef unsigned int dmach_t; | |||
15 | #define MAX_DMA_ADDRESS 0xffffffff | 10 | #define MAX_DMA_ADDRESS 0xffffffff |
16 | #endif | 11 | #endif |
17 | 12 | ||
13 | #ifdef CONFIG_ISA_DMA_API | ||
14 | /* | ||
15 | * This is used to support drivers written for the x86 ISA DMA API. | ||
16 | * It should not be re-used except for that purpose. | ||
17 | */ | ||
18 | #include <linux/spinlock.h> | ||
19 | #include <asm/system.h> | ||
20 | #include <asm/scatterlist.h> | ||
21 | |||
22 | typedef unsigned int dmach_t; | ||
23 | |||
24 | #include <mach/isa-dma.h> | ||
25 | |||
18 | /* | 26 | /* |
19 | * DMA modes | 27 | * DMA modes |
20 | */ | 28 | */ |
@@ -140,4 +148,6 @@ extern int isa_dma_bridge_buggy; | |||
140 | #define isa_dma_bridge_buggy (0) | 148 | #define isa_dma_bridge_buggy (0) |
141 | #endif | 149 | #endif |
142 | 150 | ||
143 | #endif /* _ARM_DMA_H */ | 151 | #endif /* CONFIG_ISA_DMA_API */ |
152 | |||
153 | #endif /* __ASM_ARM_DMA_H */ | ||
diff --git a/arch/arm/include/asm/hardware/iomd.h b/arch/arm/include/asm/hardware/iomd.h index 9c5afbd71a69..f9ee69e4f53e 100644 --- a/arch/arm/include/asm/hardware/iomd.h +++ b/arch/arm/include/asm/hardware/iomd.h | |||
@@ -32,19 +32,11 @@ | |||
32 | #define IOMD_KARTRX (0x004) | 32 | #define IOMD_KARTRX (0x004) |
33 | #define IOMD_KCTRL (0x008) | 33 | #define IOMD_KCTRL (0x008) |
34 | 34 | ||
35 | #ifdef CONFIG_ARCH_CLPS7500 | ||
36 | #define IOMD_IOLINES (0x00C) | ||
37 | #endif | ||
38 | |||
39 | #define IOMD_IRQSTATA (0x010) | 35 | #define IOMD_IRQSTATA (0x010) |
40 | #define IOMD_IRQREQA (0x014) | 36 | #define IOMD_IRQREQA (0x014) |
41 | #define IOMD_IRQCLRA (0x014) | 37 | #define IOMD_IRQCLRA (0x014) |
42 | #define IOMD_IRQMASKA (0x018) | 38 | #define IOMD_IRQMASKA (0x018) |
43 | 39 | ||
44 | #ifdef CONFIG_ARCH_CLPS7500 | ||
45 | #define IOMD_SUSMODE (0x01C) | ||
46 | #endif | ||
47 | |||
48 | #define IOMD_IRQSTATB (0x020) | 40 | #define IOMD_IRQSTATB (0x020) |
49 | #define IOMD_IRQREQB (0x024) | 41 | #define IOMD_IRQREQB (0x024) |
50 | #define IOMD_IRQMASKB (0x028) | 42 | #define IOMD_IRQMASKB (0x028) |
@@ -53,10 +45,6 @@ | |||
53 | #define IOMD_FIQREQ (0x034) | 45 | #define IOMD_FIQREQ (0x034) |
54 | #define IOMD_FIQMASK (0x038) | 46 | #define IOMD_FIQMASK (0x038) |
55 | 47 | ||
56 | #ifdef CONFIG_ARCH_CLPS7500 | ||
57 | #define IOMD_CLKCTL (0x03C) | ||
58 | #endif | ||
59 | |||
60 | #define IOMD_T0CNTL (0x040) | 48 | #define IOMD_T0CNTL (0x040) |
61 | #define IOMD_T0LTCHL (0x040) | 49 | #define IOMD_T0LTCHL (0x040) |
62 | #define IOMD_T0CNTH (0x044) | 50 | #define IOMD_T0CNTH (0x044) |
@@ -71,18 +59,6 @@ | |||
71 | #define IOMD_T1GO (0x058) | 59 | #define IOMD_T1GO (0x058) |
72 | #define IOMD_T1LATCH (0x05c) | 60 | #define IOMD_T1LATCH (0x05c) |
73 | 61 | ||
74 | #ifdef CONFIG_ARCH_CLPS7500 | ||
75 | #define IOMD_IRQSTATC (0x060) | ||
76 | #define IOMD_IRQREQC (0x064) | ||
77 | #define IOMD_IRQMASKC (0x068) | ||
78 | |||
79 | #define IOMD_VIDMUX (0x06c) | ||
80 | |||
81 | #define IOMD_IRQSTATD (0x070) | ||
82 | #define IOMD_IRQREQD (0x074) | ||
83 | #define IOMD_IRQMASKD (0x078) | ||
84 | #endif | ||
85 | |||
86 | #define IOMD_ROMCR0 (0x080) | 62 | #define IOMD_ROMCR0 (0x080) |
87 | #define IOMD_ROMCR1 (0x084) | 63 | #define IOMD_ROMCR1 (0x084) |
88 | #ifdef CONFIG_ARCH_RPC | 64 | #ifdef CONFIG_ARCH_RPC |
@@ -100,11 +76,6 @@ | |||
100 | #define IOMD_MOUSEY (0x0A4) | 76 | #define IOMD_MOUSEY (0x0A4) |
101 | #endif | 77 | #endif |
102 | 78 | ||
103 | #ifdef CONFIG_ARCH_CLPS7500 | ||
104 | #define IOMD_MSEDAT (0x0A8) | ||
105 | #define IOMD_MSECTL (0x0Ac) | ||
106 | #endif | ||
107 | |||
108 | #ifdef CONFIG_ARCH_RPC | 79 | #ifdef CONFIG_ARCH_RPC |
109 | #define IOMD_DMATCR (0x0C0) | 80 | #define IOMD_DMATCR (0x0C0) |
110 | #endif | 81 | #endif |
@@ -113,18 +84,6 @@ | |||
113 | #ifdef CONFIG_ARCH_RPC | 84 | #ifdef CONFIG_ARCH_RPC |
114 | #define IOMD_DMAEXT (0x0CC) | 85 | #define IOMD_DMAEXT (0x0CC) |
115 | #endif | 86 | #endif |
116 | #ifdef CONFIG_ARCH_CLPS7500 | ||
117 | #define IOMD_ASTCR (0x0CC) | ||
118 | #define IOMD_DRAMCR (0x0D0) | ||
119 | #define IOMD_SELFREF (0x0D4) | ||
120 | #define IOMD_ATODICR (0x0E0) | ||
121 | #define IOMD_ATODSR (0x0E4) | ||
122 | #define IOMD_ATODCC (0x0E8) | ||
123 | #define IOMD_ATODCNT1 (0x0EC) | ||
124 | #define IOMD_ATODCNT2 (0x0F0) | ||
125 | #define IOMD_ATODCNT3 (0x0F4) | ||
126 | #define IOMD_ATODCNT4 (0x0F8) | ||
127 | #endif | ||
128 | 87 | ||
129 | #ifdef CONFIG_ARCH_RPC | 88 | #ifdef CONFIG_ARCH_RPC |
130 | #define DMA_EXT_IO0 1 | 89 | #define DMA_EXT_IO0 1 |
diff --git a/arch/arm/include/asm/hardware/vic.h b/arch/arm/include/asm/hardware/vic.h index 263f2c362a30..f87328d4a180 100644 --- a/arch/arm/include/asm/hardware/vic.h +++ b/arch/arm/include/asm/hardware/vic.h | |||
@@ -29,15 +29,17 @@ | |||
29 | #define VIC_INT_SOFT 0x18 | 29 | #define VIC_INT_SOFT 0x18 |
30 | #define VIC_INT_SOFT_CLEAR 0x1c | 30 | #define VIC_INT_SOFT_CLEAR 0x1c |
31 | #define VIC_PROTECT 0x20 | 31 | #define VIC_PROTECT 0x20 |
32 | #define VIC_VECT_ADDR 0x30 | 32 | #define VIC_PL190_VECT_ADDR 0x30 /* PL190 only */ |
33 | #define VIC_DEF_VECT_ADDR 0x34 | 33 | #define VIC_PL190_DEF_VECT_ADDR 0x34 /* PL190 only */ |
34 | 34 | ||
35 | #define VIC_VECT_ADDR0 0x100 /* 0 to 15 */ | 35 | #define VIC_VECT_ADDR0 0x100 /* 0 to 15 (0..31 PL192) */ |
36 | #define VIC_VECT_CNTL0 0x200 /* 0 to 15 */ | 36 | #define VIC_VECT_CNTL0 0x200 /* 0 to 15 (0..31 PL192) */ |
37 | #define VIC_ITCR 0x300 /* VIC test control register */ | 37 | #define VIC_ITCR 0x300 /* VIC test control register */ |
38 | 38 | ||
39 | #define VIC_VECT_CNTL_ENABLE (1 << 5) | 39 | #define VIC_VECT_CNTL_ENABLE (1 << 5) |
40 | 40 | ||
41 | #define VIC_PL192_VECT_ADDR 0xF00 | ||
42 | |||
41 | #ifndef __ASSEMBLY__ | 43 | #ifndef __ASSEMBLY__ |
42 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources); | 44 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources); |
43 | #endif | 45 | #endif |
diff --git a/arch/arm/include/asm/hwcap.h b/arch/arm/include/asm/hwcap.h index 81f4c899a555..bda489f9f017 100644 --- a/arch/arm/include/asm/hwcap.h +++ b/arch/arm/include/asm/hwcap.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define HWCAP_IWMMXT 512 | 16 | #define HWCAP_IWMMXT 512 |
17 | #define HWCAP_CRUNCH 1024 | 17 | #define HWCAP_CRUNCH 1024 |
18 | #define HWCAP_THUMBEE 2048 | 18 | #define HWCAP_THUMBEE 2048 |
19 | #define HWCAP_NEON 4096 | ||
19 | 20 | ||
20 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 21 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) |
21 | /* | 22 | /* |
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index a8094451be57..d2a59cfc30ce 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -80,6 +80,14 @@ extern void __iounmap(volatile void __iomem *addr); | |||
80 | extern void __readwrite_bug(const char *fn); | 80 | extern void __readwrite_bug(const char *fn); |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * A typesafe __io() helper | ||
84 | */ | ||
85 | static inline void __iomem *__typesafe_io(unsigned long addr) | ||
86 | { | ||
87 | return (void __iomem *)addr; | ||
88 | } | ||
89 | |||
90 | /* | ||
83 | * Now, pick up the machine-defined IO definitions | 91 | * Now, pick up the machine-defined IO definitions |
84 | */ | 92 | */ |
85 | #include <mach/io.h> | 93 | #include <mach/io.h> |
diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h index a0009aa5d157..328f14a8b790 100644 --- a/arch/arm/include/asm/irq.h +++ b/arch/arm/include/asm/irq.h | |||
@@ -7,10 +7,6 @@ | |||
7 | #define irq_canonicalize(i) (i) | 7 | #define irq_canonicalize(i) (i) |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #ifndef NR_IRQS | ||
11 | #define NR_IRQS 128 | ||
12 | #endif | ||
13 | |||
14 | /* | 10 | /* |
15 | * Use this value to indicate lack of interrupt | 11 | * Use this value to indicate lack of interrupt |
16 | * capability | 12 | * capability |
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h index 77764301844b..0202a7c20e62 100644 --- a/arch/arm/include/asm/memory.h +++ b/arch/arm/include/asm/memory.h | |||
@@ -112,10 +112,8 @@ | |||
112 | * private definitions which should NOT be used outside memory.h | 112 | * private definitions which should NOT be used outside memory.h |
113 | * files. Use virt_to_phys/phys_to_virt/__pa/__va instead. | 113 | * files. Use virt_to_phys/phys_to_virt/__pa/__va instead. |
114 | */ | 114 | */ |
115 | #ifndef __virt_to_phys | ||
116 | #define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) | 115 | #define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) |
117 | #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) | 116 | #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) |
118 | #endif | ||
119 | 117 | ||
120 | /* | 118 | /* |
121 | * Convert a physical address to a Page Frame Number and back | 119 | * Convert a physical address to a Page Frame Number and back |
@@ -180,6 +178,11 @@ static inline void *phys_to_virt(unsigned long x) | |||
180 | * memory. Use of these is *deprecated* (and that doesn't mean | 178 | * memory. Use of these is *deprecated* (and that doesn't mean |
181 | * use the __ prefixed forms instead.) See dma-mapping.h. | 179 | * use the __ prefixed forms instead.) See dma-mapping.h. |
182 | */ | 180 | */ |
181 | #ifndef __virt_to_bus | ||
182 | #define __virt_to_bus __virt_to_phys | ||
183 | #define __bus_to_virt __phys_to_virt | ||
184 | #endif | ||
185 | |||
183 | static inline __deprecated unsigned long virt_to_bus(void *x) | 186 | static inline __deprecated unsigned long virt_to_bus(void *x) |
184 | { | 187 | { |
185 | return __virt_to_bus((unsigned long)x); | 188 | return __virt_to_bus((unsigned long)x); |
diff --git a/arch/arm/include/asm/mmu_context.h b/arch/arm/include/asm/mmu_context.h index 0559f37c2a27..263fed05ea33 100644 --- a/arch/arm/include/asm/mmu_context.h +++ b/arch/arm/include/asm/mmu_context.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define __ASM_ARM_MMU_CONTEXT_H | 14 | #define __ASM_ARM_MMU_CONTEXT_H |
15 | 15 | ||
16 | #include <linux/compiler.h> | 16 | #include <linux/compiler.h> |
17 | #include <linux/sched.h> | ||
17 | #include <asm/cacheflush.h> | 18 | #include <asm/cacheflush.h> |
18 | #include <asm/cachetype.h> | 19 | #include <asm/cachetype.h> |
19 | #include <asm/proc-fns.h> | 20 | #include <asm/proc-fns.h> |
diff --git a/arch/arm/include/asm/mtd-xip.h b/arch/arm/include/asm/mtd-xip.h index d8fbe2d9b8b9..d79d66d2cf71 100644 --- a/arch/arm/include/asm/mtd-xip.h +++ b/arch/arm/include/asm/mtd-xip.h | |||
@@ -15,7 +15,6 @@ | |||
15 | #ifndef __ARM_MTD_XIP_H__ | 15 | #ifndef __ARM_MTD_XIP_H__ |
16 | #define __ARM_MTD_XIP_H__ | 16 | #define __ARM_MTD_XIP_H__ |
17 | 17 | ||
18 | #include <mach/hardware.h> | ||
19 | #include <mach/mtd-xip.h> | 18 | #include <mach/mtd-xip.h> |
20 | 19 | ||
21 | /* fill instruction prefetch */ | 20 | /* fill instruction prefetch */ |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index bed1c0a00368..f341c9dbd662 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -108,32 +108,38 @@ | |||
108 | #error Unknown user operations model | 108 | #error Unknown user operations model |
109 | #endif | 109 | #endif |
110 | 110 | ||
111 | struct page; | ||
112 | |||
111 | struct cpu_user_fns { | 113 | struct cpu_user_fns { |
112 | void (*cpu_clear_user_page)(void *p, unsigned long user); | 114 | void (*cpu_clear_user_highpage)(struct page *page, unsigned long vaddr); |
113 | void (*cpu_copy_user_page)(void *to, const void *from, | 115 | void (*cpu_copy_user_highpage)(struct page *to, struct page *from, |
114 | unsigned long user); | 116 | unsigned long vaddr); |
115 | }; | 117 | }; |
116 | 118 | ||
117 | #ifdef MULTI_USER | 119 | #ifdef MULTI_USER |
118 | extern struct cpu_user_fns cpu_user; | 120 | extern struct cpu_user_fns cpu_user; |
119 | 121 | ||
120 | #define __cpu_clear_user_page cpu_user.cpu_clear_user_page | 122 | #define __cpu_clear_user_highpage cpu_user.cpu_clear_user_highpage |
121 | #define __cpu_copy_user_page cpu_user.cpu_copy_user_page | 123 | #define __cpu_copy_user_highpage cpu_user.cpu_copy_user_highpage |
122 | 124 | ||
123 | #else | 125 | #else |
124 | 126 | ||
125 | #define __cpu_clear_user_page __glue(_USER,_clear_user_page) | 127 | #define __cpu_clear_user_highpage __glue(_USER,_clear_user_highpage) |
126 | #define __cpu_copy_user_page __glue(_USER,_copy_user_page) | 128 | #define __cpu_copy_user_highpage __glue(_USER,_copy_user_highpage) |
127 | 129 | ||
128 | extern void __cpu_clear_user_page(void *p, unsigned long user); | 130 | extern void __cpu_clear_user_highpage(struct page *page, unsigned long vaddr); |
129 | extern void __cpu_copy_user_page(void *to, const void *from, | 131 | extern void __cpu_copy_user_highpage(struct page *to, struct page *from, |
130 | unsigned long user); | 132 | unsigned long vaddr); |
131 | #endif | 133 | #endif |
132 | 134 | ||
133 | #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) | 135 | #define clear_user_highpage(page,vaddr) \ |
134 | #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) | 136 | __cpu_clear_user_highpage(page, vaddr) |
137 | |||
138 | #define __HAVE_ARCH_COPY_USER_HIGHPAGE | ||
139 | #define copy_user_highpage(to,from,vaddr,vma) \ | ||
140 | __cpu_copy_user_highpage(to, from, vaddr) | ||
135 | 141 | ||
136 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) | 142 | #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) |
137 | extern void copy_page(void *to, const void *from); | 143 | extern void copy_page(void *to, const void *from); |
138 | 144 | ||
139 | #undef STRICT_MM_TYPECHECKS | 145 | #undef STRICT_MM_TYPECHECKS |
diff --git a/arch/arm/include/asm/processor.h b/arch/arm/include/asm/processor.h index 6ff33790f47b..1845892260e7 100644 --- a/arch/arm/include/asm/processor.h +++ b/arch/arm/include/asm/processor.h | |||
@@ -64,7 +64,7 @@ struct thread_struct { | |||
64 | ({ \ | 64 | ({ \ |
65 | unsigned long *stack = (unsigned long *)sp; \ | 65 | unsigned long *stack = (unsigned long *)sp; \ |
66 | set_fs(USER_DS); \ | 66 | set_fs(USER_DS); \ |
67 | memzero(regs->uregs, sizeof(regs->uregs)); \ | 67 | memset(regs->uregs, 0, sizeof(regs->uregs)); \ |
68 | if (current->personality & ADDR_LIMIT_32BIT) \ | 68 | if (current->personality & ADDR_LIMIT_32BIT) \ |
69 | regs->ARM_cpsr = USR_MODE; \ | 69 | regs->ARM_cpsr = USR_MODE; \ |
70 | else \ | 70 | else \ |
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index a65413ba121d..f2cd18a0932b 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -209,9 +209,11 @@ struct meminfo { | |||
209 | struct membank bank[NR_BANKS]; | 209 | struct membank bank[NR_BANKS]; |
210 | }; | 210 | }; |
211 | 211 | ||
212 | extern struct meminfo meminfo; | ||
213 | |||
212 | #define for_each_nodebank(iter,mi,no) \ | 214 | #define for_each_nodebank(iter,mi,no) \ |
213 | for (iter = 0; iter < mi->nr_banks; iter++) \ | 215 | for (iter = 0; iter < (mi)->nr_banks; iter++) \ |
214 | if (mi->bank[iter].node == no) | 216 | if ((mi)->bank[iter].node == no) |
215 | 217 | ||
216 | #define bank_pfn_start(bank) __phys_to_pfn((bank)->start) | 218 | #define bank_pfn_start(bank) __phys_to_pfn((bank)->start) |
217 | #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size) | 219 | #define bank_pfn_end(bank) __phys_to_pfn((bank)->start + (bank)->size) |
diff --git a/arch/arm/include/asm/smp.h b/arch/arm/include/asm/smp.h index 727b5c042e52..fad70da5911d 100644 --- a/arch/arm/include/asm/smp.h +++ b/arch/arm/include/asm/smp.h | |||
@@ -114,7 +114,7 @@ extern void local_timer_interrupt(void); | |||
114 | /* | 114 | /* |
115 | * Stop a local timer interrupt. | 115 | * Stop a local timer interrupt. |
116 | */ | 116 | */ |
117 | extern void local_timer_stop(unsigned int cpu); | 117 | extern void local_timer_stop(void); |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * Platform provides this to acknowledge a local timer IRQ | 120 | * Platform provides this to acknowledge a local timer IRQ |
@@ -123,7 +123,7 @@ extern int local_timer_ack(void); | |||
123 | 123 | ||
124 | #else | 124 | #else |
125 | 125 | ||
126 | static inline void local_timer_stop(unsigned int cpu) | 126 | static inline void local_timer_stop(void) |
127 | { | 127 | { |
128 | } | 128 | } |
129 | 129 | ||
@@ -132,7 +132,7 @@ static inline void local_timer_stop(unsigned int cpu) | |||
132 | /* | 132 | /* |
133 | * Setup a local timer interrupt for a CPU. | 133 | * Setup a local timer interrupt for a CPU. |
134 | */ | 134 | */ |
135 | extern void local_timer_setup(unsigned int cpu); | 135 | extern void local_timer_setup(void); |
136 | 136 | ||
137 | /* | 137 | /* |
138 | * show local interrupt info | 138 | * show local interrupt info |
diff --git a/arch/arm/include/asm/string.h b/arch/arm/include/asm/string.h index e50c4a39b699..cf4f3aad0fc1 100644 --- a/arch/arm/include/asm/string.h +++ b/arch/arm/include/asm/string.h | |||
@@ -21,7 +21,6 @@ extern void * memmove(void *, const void *, __kernel_size_t); | |||
21 | #define __HAVE_ARCH_MEMCHR | 21 | #define __HAVE_ARCH_MEMCHR |
22 | extern void * memchr(const void *, int, __kernel_size_t); | 22 | extern void * memchr(const void *, int, __kernel_size_t); |
23 | 23 | ||
24 | #define __HAVE_ARCH_MEMZERO | ||
25 | #define __HAVE_ARCH_MEMSET | 24 | #define __HAVE_ARCH_MEMSET |
26 | extern void * memset(void *, int, __kernel_size_t); | 25 | extern void * memset(void *, int, __kernel_size_t); |
27 | 26 | ||
@@ -39,12 +38,4 @@ extern void __memzero(void *ptr, __kernel_size_t n); | |||
39 | (__p); \ | 38 | (__p); \ |
40 | }) | 39 | }) |
41 | 40 | ||
42 | #define memzero(p,n) \ | ||
43 | ({ \ | ||
44 | void *__p = (p); size_t __n = n; \ | ||
45 | if ((__n) != 0) \ | ||
46 | __memzero((__p),(__n)); \ | ||
47 | (__p); \ | ||
48 | }) | ||
49 | |||
50 | #endif | 41 | #endif |
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 568020b34e3e..811be55f338e 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <asm/memory.h> | ||
7 | |||
8 | #define CPU_ARCH_UNKNOWN 0 | 6 | #define CPU_ARCH_UNKNOWN 0 |
9 | #define CPU_ARCH_ARMv3 1 | 7 | #define CPU_ARCH_ARMv3 1 |
10 | #define CPU_ARCH_ARMv4 2 | 8 | #define CPU_ARCH_ARMv4 2 |
diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index e98ec60b3400..7897464e0c24 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h | |||
@@ -11,7 +11,8 @@ | |||
11 | /* | 11 | /* |
12 | * User space memory access functions | 12 | * User space memory access functions |
13 | */ | 13 | */ |
14 | #include <linux/sched.h> | 14 | #include <linux/string.h> |
15 | #include <linux/thread_info.h> | ||
15 | #include <asm/errno.h> | 16 | #include <asm/errno.h> |
16 | #include <asm/memory.h> | 17 | #include <asm/memory.h> |
17 | #include <asm/domain.h> | 18 | #include <asm/domain.h> |
@@ -400,7 +401,7 @@ static inline unsigned long __must_check copy_from_user(void *to, const void __u | |||
400 | if (access_ok(VERIFY_READ, from, n)) | 401 | if (access_ok(VERIFY_READ, from, n)) |
401 | n = __copy_from_user(to, from, n); | 402 | n = __copy_from_user(to, from, n); |
402 | else /* security hole - plug it */ | 403 | else /* security hole - plug it */ |
403 | memzero(to, n); | 404 | memset(to, 0, n); |
404 | return n; | 405 | return n; |
405 | } | 406 | } |
406 | 407 | ||
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index 23af3c972c9a..531e1860e546 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
11 | #include <linux/sched.h> | ||
11 | #include <linux/string.h> | 12 | #include <linux/string.h> |
12 | #include <linux/cryptohash.h> | 13 | #include <linux/cryptohash.h> |
13 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
diff --git a/arch/arm/kernel/ftrace.c b/arch/arm/kernel/ftrace.c index 6c90479e8974..c63842766229 100644 --- a/arch/arm/kernel/ftrace.c +++ b/arch/arm/kernel/ftrace.c | |||
@@ -95,7 +95,7 @@ int ftrace_update_ftrace_func(ftrace_func_t func) | |||
95 | return ret; | 95 | return ret; |
96 | } | 96 | } |
97 | 97 | ||
98 | /* run from kstop_machine */ | 98 | /* run from ftrace_init with irqs disabled */ |
99 | int __init ftrace_dyn_arch_init(void *data) | 99 | int __init ftrace_dyn_arch_init(void *data) |
100 | { | 100 | { |
101 | ftrace_mcount_set(data); | 101 | ftrace_mcount_set(data); |
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index bde52df1c668..991952c644d1 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S | |||
@@ -18,7 +18,7 @@ | |||
18 | __switch_data: | 18 | __switch_data: |
19 | .long __mmap_switched | 19 | .long __mmap_switched |
20 | .long __data_loc @ r4 | 20 | .long __data_loc @ r4 |
21 | .long __data_start @ r5 | 21 | .long _data @ r5 |
22 | .long __bss_start @ r6 | 22 | .long __bss_start @ r6 |
23 | .long _end @ r7 | 23 | .long _end @ r7 |
24 | .long processor_id @ r4 | 24 | .long processor_id @ r4 |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index b8d965dcd6fd..dab48f27263f 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/string.h> | 21 | #include <linux/string.h> |
22 | 22 | ||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/sections.h> | ||
24 | 25 | ||
25 | #ifdef CONFIG_XIP_KERNEL | 26 | #ifdef CONFIG_XIP_KERNEL |
26 | /* | 27 | /* |
@@ -29,9 +30,8 @@ | |||
29 | * MODULES_VADDR is redefined here and not in asm/memory.h to avoid | 30 | * MODULES_VADDR is redefined here and not in asm/memory.h to avoid |
30 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. | 31 | * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. |
31 | */ | 32 | */ |
32 | extern void _etext; | ||
33 | #undef MODULES_VADDR | 33 | #undef MODULES_VADDR |
34 | #define MODULES_VADDR (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) | 34 | #define MODULES_VADDR (((unsigned long)_etext + ~PGDIR_MASK) & PGDIR_MASK) |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #ifdef CONFIG_MMU | 37 | #ifdef CONFIG_MMU |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 1f1eecca7f55..7049815d66d5 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/cputype.h> | 29 | #include <asm/cputype.h> |
30 | #include <asm/elf.h> | 30 | #include <asm/elf.h> |
31 | #include <asm/procinfo.h> | 31 | #include <asm/procinfo.h> |
32 | #include <asm/sections.h> | ||
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/cacheflush.h> | 35 | #include <asm/cacheflush.h> |
@@ -59,9 +60,8 @@ static int __init fpe_setup(char *line) | |||
59 | __setup("fpe=", fpe_setup); | 60 | __setup("fpe=", fpe_setup); |
60 | #endif | 61 | #endif |
61 | 62 | ||
62 | extern void paging_init(struct meminfo *, struct machine_desc *desc); | 63 | extern void paging_init(struct machine_desc *desc); |
63 | extern void reboot_setup(char *str); | 64 | extern void reboot_setup(char *str); |
64 | extern void _text, _etext, __data_start, _edata, _end; | ||
65 | 65 | ||
66 | unsigned int processor_id; | 66 | unsigned int processor_id; |
67 | EXPORT_SYMBOL(processor_id); | 67 | EXPORT_SYMBOL(processor_id); |
@@ -112,7 +112,6 @@ static struct stack stacks[NR_CPUS]; | |||
112 | char elf_platform[ELF_PLATFORM_SIZE]; | 112 | char elf_platform[ELF_PLATFORM_SIZE]; |
113 | EXPORT_SYMBOL(elf_platform); | 113 | EXPORT_SYMBOL(elf_platform); |
114 | 114 | ||
115 | static struct meminfo meminfo __initdata = { 0, }; | ||
116 | static const char *cpu_name; | 115 | static const char *cpu_name; |
117 | static const char *machine_name; | 116 | static const char *machine_name; |
118 | static char __initdata command_line[COMMAND_LINE_SIZE]; | 117 | static char __initdata command_line[COMMAND_LINE_SIZE]; |
@@ -367,21 +366,34 @@ static struct machine_desc * __init setup_machine(unsigned int nr) | |||
367 | return list; | 366 | return list; |
368 | } | 367 | } |
369 | 368 | ||
370 | static void __init arm_add_memory(unsigned long start, unsigned long size) | 369 | static int __init arm_add_memory(unsigned long start, unsigned long size) |
371 | { | 370 | { |
372 | struct membank *bank; | 371 | struct membank *bank = &meminfo.bank[meminfo.nr_banks]; |
372 | |||
373 | if (meminfo.nr_banks >= NR_BANKS) { | ||
374 | printk(KERN_CRIT "NR_BANKS too low, " | ||
375 | "ignoring memory at %#lx\n", start); | ||
376 | return -EINVAL; | ||
377 | } | ||
373 | 378 | ||
374 | /* | 379 | /* |
375 | * Ensure that start/size are aligned to a page boundary. | 380 | * Ensure that start/size are aligned to a page boundary. |
376 | * Size is appropriately rounded down, start is rounded up. | 381 | * Size is appropriately rounded down, start is rounded up. |
377 | */ | 382 | */ |
378 | size -= start & ~PAGE_MASK; | 383 | size -= start & ~PAGE_MASK; |
379 | |||
380 | bank = &meminfo.bank[meminfo.nr_banks++]; | ||
381 | |||
382 | bank->start = PAGE_ALIGN(start); | 384 | bank->start = PAGE_ALIGN(start); |
383 | bank->size = size & PAGE_MASK; | 385 | bank->size = size & PAGE_MASK; |
384 | bank->node = PHYS_TO_NID(start); | 386 | bank->node = PHYS_TO_NID(start); |
387 | |||
388 | /* | ||
389 | * Check whether this memory region has non-zero size or | ||
390 | * invalid node number. | ||
391 | */ | ||
392 | if (bank->size == 0 || bank->node >= MAX_NUMNODES) | ||
393 | return -EINVAL; | ||
394 | |||
395 | meminfo.nr_banks++; | ||
396 | return 0; | ||
385 | } | 397 | } |
386 | 398 | ||
387 | /* | 399 | /* |
@@ -472,10 +484,10 @@ request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc) | |||
472 | struct resource *res; | 484 | struct resource *res; |
473 | int i; | 485 | int i; |
474 | 486 | ||
475 | kernel_code.start = virt_to_phys(&_text); | 487 | kernel_code.start = virt_to_phys(_text); |
476 | kernel_code.end = virt_to_phys(&_etext - 1); | 488 | kernel_code.end = virt_to_phys(_etext - 1); |
477 | kernel_data.start = virt_to_phys(&__data_start); | 489 | kernel_data.start = virt_to_phys(_data); |
478 | kernel_data.end = virt_to_phys(&_end - 1); | 490 | kernel_data.end = virt_to_phys(_end - 1); |
479 | 491 | ||
480 | for (i = 0; i < mi->nr_banks; i++) { | 492 | for (i = 0; i < mi->nr_banks; i++) { |
481 | if (mi->bank[i].size == 0) | 493 | if (mi->bank[i].size == 0) |
@@ -539,14 +551,7 @@ __tagtable(ATAG_CORE, parse_tag_core); | |||
539 | 551 | ||
540 | static int __init parse_tag_mem32(const struct tag *tag) | 552 | static int __init parse_tag_mem32(const struct tag *tag) |
541 | { | 553 | { |
542 | if (meminfo.nr_banks >= NR_BANKS) { | 554 | return arm_add_memory(tag->u.mem.start, tag->u.mem.size); |
543 | printk(KERN_WARNING | ||
544 | "Ignoring memory bank 0x%08x size %dKB\n", | ||
545 | tag->u.mem.start, tag->u.mem.size / 1024); | ||
546 | return -EINVAL; | ||
547 | } | ||
548 | arm_add_memory(tag->u.mem.start, tag->u.mem.size); | ||
549 | return 0; | ||
550 | } | 555 | } |
551 | 556 | ||
552 | __tagtable(ATAG_MEM, parse_tag_mem32); | 557 | __tagtable(ATAG_MEM, parse_tag_mem32); |
@@ -710,15 +715,15 @@ void __init setup_arch(char **cmdline_p) | |||
710 | parse_tags(tags); | 715 | parse_tags(tags); |
711 | } | 716 | } |
712 | 717 | ||
713 | init_mm.start_code = (unsigned long) &_text; | 718 | init_mm.start_code = (unsigned long) _text; |
714 | init_mm.end_code = (unsigned long) &_etext; | 719 | init_mm.end_code = (unsigned long) _etext; |
715 | init_mm.end_data = (unsigned long) &_edata; | 720 | init_mm.end_data = (unsigned long) _edata; |
716 | init_mm.brk = (unsigned long) &_end; | 721 | init_mm.brk = (unsigned long) _end; |
717 | 722 | ||
718 | memcpy(boot_command_line, from, COMMAND_LINE_SIZE); | 723 | memcpy(boot_command_line, from, COMMAND_LINE_SIZE); |
719 | boot_command_line[COMMAND_LINE_SIZE-1] = '\0'; | 724 | boot_command_line[COMMAND_LINE_SIZE-1] = '\0'; |
720 | parse_cmdline(cmdline_p, from); | 725 | parse_cmdline(cmdline_p, from); |
721 | paging_init(&meminfo, mdesc); | 726 | paging_init(mdesc); |
722 | request_standard_resources(&meminfo, mdesc); | 727 | request_standard_resources(&meminfo, mdesc); |
723 | 728 | ||
724 | #ifdef CONFIG_SMP | 729 | #ifdef CONFIG_SMP |
@@ -772,6 +777,8 @@ static const char *hwcap_str[] = { | |||
772 | "java", | 777 | "java", |
773 | "iwmmxt", | 778 | "iwmmxt", |
774 | "crunch", | 779 | "crunch", |
780 | "thumbee", | ||
781 | "neon", | ||
775 | NULL | 782 | NULL |
776 | }; | 783 | }; |
777 | 784 | ||
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index e42a749a56dd..019237d21622 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -181,7 +181,7 @@ int __cpuexit __cpu_disable(void) | |||
181 | /* | 181 | /* |
182 | * Stop the local timer for this CPU. | 182 | * Stop the local timer for this CPU. |
183 | */ | 183 | */ |
184 | local_timer_stop(cpu); | 184 | local_timer_stop(); |
185 | 185 | ||
186 | /* | 186 | /* |
187 | * Flush user cache and TLB mappings, and then remove this CPU | 187 | * Flush user cache and TLB mappings, and then remove this CPU |
@@ -284,7 +284,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void) | |||
284 | /* | 284 | /* |
285 | * Setup local timer for this CPU. | 285 | * Setup local timer for this CPU. |
286 | */ | 286 | */ |
287 | local_timer_setup(cpu); | 287 | local_timer_setup(); |
288 | 288 | ||
289 | calibrate_delay(); | 289 | calibrate_delay(); |
290 | 290 | ||
diff --git a/arch/arm/kernel/thumbee.c b/arch/arm/kernel/thumbee.c index df3f6b7ebcea..9cb7aaca159f 100644 --- a/arch/arm/kernel/thumbee.c +++ b/arch/arm/kernel/thumbee.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* | 25 | /* |
26 | * Access to the ThumbEE Handler Base register | 26 | * Access to the ThumbEE Handler Base register |
27 | */ | 27 | */ |
28 | static inline unsigned long teehbr_read() | 28 | static inline unsigned long teehbr_read(void) |
29 | { | 29 | { |
30 | unsigned long v; | 30 | unsigned long v; |
31 | asm("mrc p14, 6, %0, c1, c0, 0\n" : "=r" (v)); | 31 | asm("mrc p14, 6, %0, c1, c0, 0\n" : "=r" (v)); |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index 4898bdcfe7dd..00216071eaf7 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -119,7 +119,7 @@ SECTIONS | |||
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | .data : AT(__data_loc) { | 121 | .data : AT(__data_loc) { |
122 | __data_start = .; /* address in memory */ | 122 | _data = .; /* address in memory */ |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * first, the init task union, aligned | 125 | * first, the init task union, aligned |
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile index 30351cd4560d..866f84a586ff 100644 --- a/arch/arm/lib/Makefile +++ b/arch/arm/lib/Makefile | |||
@@ -38,7 +38,6 @@ else | |||
38 | endif | 38 | endif |
39 | 39 | ||
40 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o | 40 | lib-$(CONFIG_ARCH_RPC) += ecard.o io-acorn.o floppydma.o |
41 | lib-$(CONFIG_ARCH_CLPS7500) += io-acorn.o | ||
42 | lib-$(CONFIG_ARCH_L7200) += io-acorn.o | 41 | lib-$(CONFIG_ARCH_L7200) += io-acorn.o |
43 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o | 42 | lib-$(CONFIG_ARCH_SHARK) += io-shark.o |
44 | 43 | ||
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S index 761eefa76243..650d5923ab83 100644 --- a/arch/arm/lib/memset.S +++ b/arch/arm/lib/memset.S | |||
@@ -25,7 +25,7 @@ | |||
25 | add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) | 25 | add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3)) |
26 | /* | 26 | /* |
27 | * The pointer is now aligned and the length is adjusted. Try doing the | 27 | * The pointer is now aligned and the length is adjusted. Try doing the |
28 | * memzero again. | 28 | * memset again. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | ENTRY(memset) | 31 | ENTRY(memset) |
diff --git a/arch/arm/mach-aaec2000/Makefile b/arch/arm/mach-aaec2000/Makefile index a8e462f58bc9..20ec83896c37 100644 --- a/arch/arm/mach-aaec2000/Makefile +++ b/arch/arm/mach-aaec2000/Makefile | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | # Common support (must be linked before board specific support) | 5 | # Common support (must be linked before board specific support) |
6 | obj-y += core.o clock.o | 6 | obj-y += core.o |
7 | 7 | ||
8 | # Specific board support | 8 | # Specific board support |
9 | obj-$(CONFIG_MACH_AAED2000) += aaed2000.o | 9 | obj-$(CONFIG_MACH_AAED2000) += aaed2000.o |
diff --git a/arch/arm/mach-aaec2000/clock.c b/arch/arm/mach-aaec2000/clock.c deleted file mode 100644 index e10ee158d720..000000000000 --- a/arch/arm/mach-aaec2000/clock.c +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/clock.c | ||
3 | * | ||
4 | * Copyright (C) 2005 Nicolas Bellido Y Ortega | ||
5 | * | ||
6 | * Based on linux/arch/arm/mach-integrator/clock.c | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <linux/errno.h> | ||
16 | #include <linux/err.h> | ||
17 | #include <linux/string.h> | ||
18 | #include <linux/clk.h> | ||
19 | #include <linux/mutex.h> | ||
20 | |||
21 | #include "clock.h" | ||
22 | |||
23 | static LIST_HEAD(clocks); | ||
24 | static DEFINE_MUTEX(clocks_mutex); | ||
25 | |||
26 | struct clk *clk_get(struct device *dev, const char *id) | ||
27 | { | ||
28 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
29 | |||
30 | mutex_lock(&clocks_mutex); | ||
31 | list_for_each_entry(p, &clocks, node) { | ||
32 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
33 | clk = p; | ||
34 | break; | ||
35 | } | ||
36 | } | ||
37 | mutex_unlock(&clocks_mutex); | ||
38 | |||
39 | return clk; | ||
40 | } | ||
41 | EXPORT_SYMBOL(clk_get); | ||
42 | |||
43 | void clk_put(struct clk *clk) | ||
44 | { | ||
45 | module_put(clk->owner); | ||
46 | } | ||
47 | EXPORT_SYMBOL(clk_put); | ||
48 | |||
49 | int clk_enable(struct clk *clk) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | EXPORT_SYMBOL(clk_enable); | ||
54 | |||
55 | void clk_disable(struct clk *clk) | ||
56 | { | ||
57 | } | ||
58 | EXPORT_SYMBOL(clk_disable); | ||
59 | |||
60 | unsigned long clk_get_rate(struct clk *clk) | ||
61 | { | ||
62 | return clk->rate; | ||
63 | } | ||
64 | EXPORT_SYMBOL(clk_get_rate); | ||
65 | |||
66 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
67 | { | ||
68 | return rate; | ||
69 | } | ||
70 | EXPORT_SYMBOL(clk_round_rate); | ||
71 | |||
72 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
73 | { | ||
74 | return 0; | ||
75 | } | ||
76 | EXPORT_SYMBOL(clk_set_rate); | ||
77 | |||
78 | int clk_register(struct clk *clk) | ||
79 | { | ||
80 | mutex_lock(&clocks_mutex); | ||
81 | list_add(&clk->node, &clocks); | ||
82 | mutex_unlock(&clocks_mutex); | ||
83 | return 0; | ||
84 | } | ||
85 | EXPORT_SYMBOL(clk_register); | ||
86 | |||
87 | void clk_unregister(struct clk *clk) | ||
88 | { | ||
89 | mutex_lock(&clocks_mutex); | ||
90 | list_del(&clk->node); | ||
91 | mutex_unlock(&clocks_mutex); | ||
92 | } | ||
93 | EXPORT_SYMBOL(clk_unregister); | ||
94 | |||
95 | static int __init clk_init(void) | ||
96 | { | ||
97 | return 0; | ||
98 | } | ||
99 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-aaec2000/clock.h b/arch/arm/mach-aaec2000/clock.h deleted file mode 100644 index d4bb74ff613f..000000000000 --- a/arch/arm/mach-aaec2000/clock.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Nicolas Bellido Y Ortega | ||
5 | * | ||
6 | * Based on linux/arch/arm/mach-integrator/clock.h | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | struct module; | ||
13 | |||
14 | struct clk { | ||
15 | struct list_head node; | ||
16 | unsigned long rate; | ||
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | void *data; | ||
20 | }; | ||
21 | |||
22 | int clk_register(struct clk *clk); | ||
23 | void clk_unregister(struct clk *clk); | ||
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c index dfb26bc23d1a..50e13965dfed 100644 --- a/arch/arm/mach-aaec2000/core.c +++ b/arch/arm/mach-aaec2000/core.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/timex.h> | 20 | #include <linux/timex.h> |
21 | #include <linux/signal.h> | 21 | #include <linux/signal.h> |
22 | #include <linux/clk.h> | ||
22 | 23 | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
@@ -30,7 +31,6 @@ | |||
30 | #include <asm/mach/map.h> | 31 | #include <asm/mach/map.h> |
31 | 32 | ||
32 | #include "core.h" | 33 | #include "core.h" |
33 | #include "clock.h" | ||
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Common I/O mapping: | 36 | * Common I/O mapping: |
@@ -229,9 +229,28 @@ static struct amba_device *amba_devs[] __initdata = { | |||
229 | &clcd_device, | 229 | &clcd_device, |
230 | }; | 230 | }; |
231 | 231 | ||
232 | static struct clk aaec2000_clcd_clk = { | 232 | void clk_disable(struct clk *clk) |
233 | .name = "CLCDCLK", | 233 | { |
234 | }; | 234 | } |
235 | |||
236 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
237 | { | ||
238 | return 0; | ||
239 | } | ||
240 | |||
241 | int clk_enable(struct clk *clk) | ||
242 | { | ||
243 | return 0; | ||
244 | } | ||
245 | |||
246 | struct clk *clk_get(struct device *dev, const char *id) | ||
247 | { | ||
248 | return dev && strcmp(dev_name(dev), "mb:16") == 0 ? NULL : ERR_PTR(-ENOENT); | ||
249 | } | ||
250 | |||
251 | void clk_put(struct clk *clk) | ||
252 | { | ||
253 | } | ||
235 | 254 | ||
236 | void __init aaec2000_set_clcd_plat_data(struct aaec2000_clcd_info *clcd) | 255 | void __init aaec2000_set_clcd_plat_data(struct aaec2000_clcd_info *clcd) |
237 | { | 256 | { |
@@ -265,8 +284,6 @@ static int __init aaec2000_init(void) | |||
265 | { | 284 | { |
266 | int i; | 285 | int i; |
267 | 286 | ||
268 | clk_register(&aaec2000_clcd_clk); | ||
269 | |||
270 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 287 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
271 | struct amba_device *d = amba_devs[i]; | 288 | struct amba_device *d = amba_devs[i]; |
272 | amba_device_register(d, &iomem_resource); | 289 | amba_device_register(d, &iomem_resource); |
diff --git a/arch/arm/mach-aaec2000/include/mach/dma.h b/arch/arm/mach-aaec2000/include/mach/dma.h deleted file mode 100644 index 2da846c72fe7..000000000000 --- a/arch/arm/mach-aaec2000/include/mach/dma.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-aaec2000/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
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 | */ | ||
diff --git a/arch/arm/mach-aaec2000/include/mach/io.h b/arch/arm/mach-aaec2000/include/mach/io.h index c87c24de1110..ab4fe5d20eaf 100644 --- a/arch/arm/mach-aaec2000/include/mach/io.h +++ b/arch/arm/mach-aaec2000/include/mach/io.h | |||
@@ -6,15 +6,13 @@ | |||
6 | #ifndef __ASM_ARM_ARCH_IO_H | 6 | #ifndef __ASM_ARM_ARCH_IO_H |
7 | #define __ASM_ARM_ARCH_IO_H | 7 | #define __ASM_ARM_ARCH_IO_H |
8 | 8 | ||
9 | #include <mach/hardware.h> | ||
10 | |||
11 | #define IO_SPACE_LIMIT 0xffffffff | 9 | #define IO_SPACE_LIMIT 0xffffffff |
12 | 10 | ||
13 | /* | 11 | /* |
14 | * We don't actually have real ISA nor PCI buses, but there is so many | 12 | * We don't actually have real ISA nor PCI buses, but there is so many |
15 | * drivers out there that might just work if we fake them... | 13 | * drivers out there that might just work if we fake them... |
16 | */ | 14 | */ |
17 | #define __io(a) ((void __iomem *)(a)) | 15 | #define __io(a) __typesafe_io(a) |
18 | #define __mem_pci(a) (a) | 16 | #define __mem_pci(a) (a) |
19 | 17 | ||
20 | #endif | 18 | #endif |
diff --git a/arch/arm/mach-aaec2000/include/mach/memory.h b/arch/arm/mach-aaec2000/include/mach/memory.h index 56ae900a482e..c00822543d9f 100644 --- a/arch/arm/mach-aaec2000/include/mach/memory.h +++ b/arch/arm/mach-aaec2000/include/mach/memory.h | |||
@@ -14,9 +14,6 @@ | |||
14 | 14 | ||
15 | #define PHYS_OFFSET UL(0xf0000000) | 15 | #define PHYS_OFFSET UL(0xf0000000) |
16 | 16 | ||
17 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
18 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
19 | |||
20 | /* | 17 | /* |
21 | * The nodes are the followings: | 18 | * The nodes are the followings: |
22 | * | 19 | * |
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 5aafb2e2ca7a..323b47f2b52f 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig | |||
@@ -7,36 +7,43 @@ choice | |||
7 | 7 | ||
8 | config ARCH_AT91RM9200 | 8 | config ARCH_AT91RM9200 |
9 | bool "AT91RM9200" | 9 | bool "AT91RM9200" |
10 | select CPU_ARM920T | ||
10 | select GENERIC_TIME | 11 | select GENERIC_TIME |
11 | select GENERIC_CLOCKEVENTS | 12 | select GENERIC_CLOCKEVENTS |
12 | 13 | ||
13 | config ARCH_AT91SAM9260 | 14 | config ARCH_AT91SAM9260 |
14 | bool "AT91SAM9260 or AT91SAM9XE" | 15 | bool "AT91SAM9260 or AT91SAM9XE" |
16 | select CPU_ARM926T | ||
15 | select GENERIC_TIME | 17 | select GENERIC_TIME |
16 | select GENERIC_CLOCKEVENTS | 18 | select GENERIC_CLOCKEVENTS |
17 | 19 | ||
18 | config ARCH_AT91SAM9261 | 20 | config ARCH_AT91SAM9261 |
19 | bool "AT91SAM9261" | 21 | bool "AT91SAM9261" |
22 | select CPU_ARM926T | ||
20 | select GENERIC_TIME | 23 | select GENERIC_TIME |
21 | select GENERIC_CLOCKEVENTS | 24 | select GENERIC_CLOCKEVENTS |
22 | 25 | ||
23 | config ARCH_AT91SAM9263 | 26 | config ARCH_AT91SAM9263 |
24 | bool "AT91SAM9263" | 27 | bool "AT91SAM9263" |
28 | select CPU_ARM926T | ||
25 | select GENERIC_TIME | 29 | select GENERIC_TIME |
26 | select GENERIC_CLOCKEVENTS | 30 | select GENERIC_CLOCKEVENTS |
27 | 31 | ||
28 | config ARCH_AT91SAM9RL | 32 | config ARCH_AT91SAM9RL |
29 | bool "AT91SAM9RL" | 33 | bool "AT91SAM9RL" |
34 | select CPU_ARM926T | ||
30 | select GENERIC_TIME | 35 | select GENERIC_TIME |
31 | select GENERIC_CLOCKEVENTS | 36 | select GENERIC_CLOCKEVENTS |
32 | 37 | ||
33 | config ARCH_AT91SAM9G20 | 38 | config ARCH_AT91SAM9G20 |
34 | bool "AT91SAM9G20" | 39 | bool "AT91SAM9G20" |
40 | select CPU_ARM926T | ||
35 | select GENERIC_TIME | 41 | select GENERIC_TIME |
36 | select GENERIC_CLOCKEVENTS | 42 | select GENERIC_CLOCKEVENTS |
37 | 43 | ||
38 | config ARCH_AT91CAP9 | 44 | config ARCH_AT91CAP9 |
39 | bool "AT91CAP9" | 45 | bool "AT91CAP9" |
46 | select CPU_ARM926T | ||
40 | select GENERIC_TIME | 47 | select GENERIC_TIME |
41 | select GENERIC_CLOCKEVENTS | 48 | select GENERIC_CLOCKEVENTS |
42 | 49 | ||
@@ -235,6 +242,12 @@ config MACH_USB_A9263 | |||
235 | Select this if you are using a Calao Systems USB-A9263. | 242 | Select this if you are using a Calao Systems USB-A9263. |
236 | <http://www.calao-systems.com> | 243 | <http://www.calao-systems.com> |
237 | 244 | ||
245 | config MACH_NEOCORE926 | ||
246 | bool "Adeneo NEOCORE926" | ||
247 | depends on ARCH_AT91SAM9263 | ||
248 | help | ||
249 | Select this if you are using the Adeneo Neocore 926 board. | ||
250 | |||
238 | endif | 251 | endif |
239 | 252 | ||
240 | # ---------------------------------------------------------- | 253 | # ---------------------------------------------------------- |
@@ -302,7 +315,7 @@ comment "AT91 Board Options" | |||
302 | 315 | ||
303 | config MTD_AT91_DATAFLASH_CARD | 316 | config MTD_AT91_DATAFLASH_CARD |
304 | bool "Enable DataFlash Card support" | 317 | bool "Enable DataFlash Card support" |
305 | depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_ECBAT91 || MACH_SAM9_L9260 || MACH_AT91CAP9ADK) | 318 | depends on (ARCH_AT91RM9200DK || MACH_AT91RM9200EK || MACH_AT91SAM9260EK || MACH_AT91SAM9261EK || MACH_AT91SAM9263EK || MACH_AT91SAM9G20EK || MACH_ECBAT91 || MACH_SAM9_L9260 || MACH_AT91CAP9ADK || MACH_NEOCORE926) |
306 | help | 319 | help |
307 | Enable support for the DataFlash card. | 320 | Enable support for the DataFlash card. |
308 | 321 | ||
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile index cca612d97ca2..c69ff237fd14 100644 --- a/arch/arm/mach-at91/Makefile +++ b/arch/arm/mach-at91/Makefile | |||
@@ -11,12 +11,12 @@ obj-$(CONFIG_AT91_PMC_UNIT) += clock.o | |||
11 | 11 | ||
12 | # CPU-specific support | 12 | # CPU-specific support |
13 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o | 13 | obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o |
14 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o | 14 | obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o |
15 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o | 15 | obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o |
16 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o | 16 | obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o |
17 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o | 17 | obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o |
18 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o | 18 | obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o |
19 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o | 19 | obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o |
20 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o | 20 | obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o |
21 | 21 | ||
22 | # AT91RM9200 board-specific support | 22 | # AT91RM9200 board-specific support |
@@ -47,6 +47,7 @@ obj-$(CONFIG_MACH_AT91SAM9261EK) += board-sam9261ek.o | |||
47 | # AT91SAM9263 board-specific support | 47 | # AT91SAM9263 board-specific support |
48 | obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o | 48 | obj-$(CONFIG_MACH_AT91SAM9263EK) += board-sam9263ek.o |
49 | obj-$(CONFIG_MACH_USB_A9263) += board-usb-a9263.o | 49 | obj-$(CONFIG_MACH_USB_A9263) += board-usb-a9263.o |
50 | obj-$(CONFIG_MACH_NEOCORE926) += board-neocore926.o | ||
50 | 51 | ||
51 | # AT91SAM9RL board-specific support | 52 | # AT91SAM9RL board-specific support |
52 | obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o | 53 | obj-$(CONFIG_MACH_AT91SAM9RLEK) += board-sam9rlek.o |
diff --git a/arch/arm/mach-at91/at91cap9.c b/arch/arm/mach-at91/at91cap9.c index 0fc0adaebd58..0a38c69fdbc4 100644 --- a/arch/arm/mach-at91/at91cap9.c +++ b/arch/arm/mach-at91/at91cap9.c | |||
@@ -17,6 +17,8 @@ | |||
17 | 17 | ||
18 | #include <asm/mach/arch.h> | 18 | #include <asm/mach/arch.h> |
19 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
20 | |||
21 | #include <mach/cpu.h> | ||
20 | #include <mach/at91cap9.h> | 22 | #include <mach/at91cap9.h> |
21 | #include <mach/at91_pmc.h> | 23 | #include <mach/at91_pmc.h> |
22 | #include <mach/at91_rstc.h> | 24 | #include <mach/at91_rstc.h> |
@@ -317,6 +319,12 @@ void __init at91cap9_initialize(unsigned long main_clock) | |||
317 | 319 | ||
318 | /* Register GPIO subsystem */ | 320 | /* Register GPIO subsystem */ |
319 | at91_gpio_init(at91cap9_gpio, 4); | 321 | at91_gpio_init(at91cap9_gpio, 4); |
322 | |||
323 | /* Remember the silicon revision */ | ||
324 | if (cpu_is_at91cap9_revB()) | ||
325 | system_rev = 0xB; | ||
326 | else if (cpu_is_at91cap9_revC()) | ||
327 | system_rev = 0xC; | ||
320 | } | 328 | } |
321 | 329 | ||
322 | /* -------------------------------------------------------------------- | 330 | /* -------------------------------------------------------------------- |
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index 5ebd4273d353..9eca2209cde6 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | #include <asm/mach/arch.h> | 14 | #include <asm/mach/arch.h> |
15 | #include <asm/mach/map.h> | 15 | #include <asm/mach/map.h> |
16 | #include <asm/mach/irq.h> | ||
16 | 17 | ||
17 | #include <linux/dma-mapping.h> | 18 | #include <linux/dma-mapping.h> |
18 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
@@ -21,6 +22,7 @@ | |||
21 | #include <video/atmel_lcdc.h> | 22 | #include <video/atmel_lcdc.h> |
22 | 23 | ||
23 | #include <mach/board.h> | 24 | #include <mach/board.h> |
25 | #include <mach/cpu.h> | ||
24 | #include <mach/gpio.h> | 26 | #include <mach/gpio.h> |
25 | #include <mach/at91cap9.h> | 27 | #include <mach/at91cap9.h> |
26 | #include <mach/at91cap9_matrix.h> | 28 | #include <mach/at91cap9_matrix.h> |
@@ -69,6 +71,9 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) | |||
69 | if (!data) | 71 | if (!data) |
70 | return; | 72 | return; |
71 | 73 | ||
74 | if (cpu_is_at91cap9_revB()) | ||
75 | set_irq_type(AT91CAP9_ID_UHP, IRQ_TYPE_LEVEL_HIGH); | ||
76 | |||
72 | /* Enable VBus control for UHP ports */ | 77 | /* Enable VBus control for UHP ports */ |
73 | for (i = 0; i < data->ports; i++) { | 78 | for (i = 0; i < data->ports; i++) { |
74 | if (data->vbus_pin[i]) | 79 | if (data->vbus_pin[i]) |
@@ -151,8 +156,13 @@ static struct platform_device at91_usba_udc_device = { | |||
151 | 156 | ||
152 | void __init at91_add_device_usba(struct usba_platform_data *data) | 157 | void __init at91_add_device_usba(struct usba_platform_data *data) |
153 | { | 158 | { |
154 | at91_sys_write(AT91_MATRIX_UDPHS, AT91_MATRIX_SELECT_UDPHS | | 159 | if (cpu_is_at91cap9_revB()) { |
155 | AT91_MATRIX_UDPHS_BYPASS_LOCK); | 160 | set_irq_type(AT91CAP9_ID_UDPHS, IRQ_TYPE_LEVEL_HIGH); |
161 | at91_sys_write(AT91_MATRIX_UDPHS, AT91_MATRIX_SELECT_UDPHS | | ||
162 | AT91_MATRIX_UDPHS_BYPASS_LOCK); | ||
163 | } | ||
164 | else | ||
165 | at91_sys_write(AT91_MATRIX_UDPHS, AT91_MATRIX_SELECT_UDPHS); | ||
156 | 166 | ||
157 | /* | 167 | /* |
158 | * Invalid pins are 0 on AT91, but the usba driver is shared | 168 | * Invalid pins are 0 on AT91, but the usba driver is shared |
@@ -406,28 +416,13 @@ static struct platform_device at91cap9_nand_device = { | |||
406 | 416 | ||
407 | void __init at91_add_device_nand(struct atmel_nand_data *data) | 417 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
408 | { | 418 | { |
409 | unsigned long csa, mode; | 419 | unsigned long csa; |
410 | 420 | ||
411 | if (!data) | 421 | if (!data) |
412 | return; | 422 | return; |
413 | 423 | ||
414 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | 424 | csa = at91_sys_read(AT91_MATRIX_EBICSA); |
415 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); | 425 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA); |
416 | |||
417 | /* set the bus interface characteristics */ | ||
418 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(1) | ||
419 | | AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(1)); | ||
420 | |||
421 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(6) | ||
422 | | AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(6)); | ||
423 | |||
424 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(8) | AT91_SMC_NRDCYCLE_(8)); | ||
425 | |||
426 | if (data->bus_width_16) | ||
427 | mode = AT91_SMC_DBW_16; | ||
428 | else | ||
429 | mode = AT91_SMC_DBW_8; | ||
430 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(1)); | ||
431 | 426 | ||
432 | /* enable pin */ | 427 | /* enable pin */ |
433 | if (data->enable_pin) | 428 | if (data->enable_pin) |
@@ -865,6 +860,9 @@ void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) | |||
865 | if (!data) | 860 | if (!data) |
866 | return; | 861 | return; |
867 | 862 | ||
863 | if (cpu_is_at91cap9_revB()) | ||
864 | set_irq_type(AT91CAP9_ID_LCDC, IRQ_TYPE_LEVEL_HIGH); | ||
865 | |||
868 | at91_set_A_periph(AT91_PIN_PC1, 0); /* LCDHSYNC */ | 866 | at91_set_A_periph(AT91_PIN_PC1, 0); /* LCDHSYNC */ |
869 | at91_set_A_periph(AT91_PIN_PC2, 0); /* LCDDOTCK */ | 867 | at91_set_A_periph(AT91_PIN_PC2, 0); /* LCDDOTCK */ |
870 | at91_set_A_periph(AT91_PIN_PC3, 0); /* LCDDEN */ | 868 | at91_set_A_periph(AT91_PIN_PC3, 0); /* LCDDEN */ |
diff --git a/arch/arm/mach-at91/at91rm9200_time.c b/arch/arm/mach-at91/at91rm9200_time.c index a72e798a2a40..d140eae53ded 100644 --- a/arch/arm/mach-at91/at91rm9200_time.c +++ b/arch/arm/mach-at91/at91rm9200_time.c | |||
@@ -141,6 +141,15 @@ clkevt32k_next_event(unsigned long delta, struct clock_event_device *dev) | |||
141 | /* Use "raw" primitives so we behave correctly on RT kernels. */ | 141 | /* Use "raw" primitives so we behave correctly on RT kernels. */ |
142 | raw_local_irq_save(flags); | 142 | raw_local_irq_save(flags); |
143 | 143 | ||
144 | /* | ||
145 | * According to Thomas Gleixner irqs are already disabled here. Simply | ||
146 | * removing raw_local_irq_save above (and the matching | ||
147 | * raw_local_irq_restore) was not accepted. See | ||
148 | * http://thread.gmane.org/gmane.linux.ports.arm.kernel/41174 | ||
149 | * So for now (2008-11-20) just warn once if irqs were not disabled ... | ||
150 | */ | ||
151 | WARN_ON_ONCE(!raw_irqs_disabled_flags(flags)); | ||
152 | |||
144 | /* The alarm IRQ uses absolute time (now+delta), not the relative | 153 | /* The alarm IRQ uses absolute time (now+delta), not the relative |
145 | * time (delta) in our calling convention. Like all clockevents | 154 | * time (delta) in our calling convention. Like all clockevents |
146 | * using such "match" hardware, we have a race to defend against. | 155 | * using such "match" hardware, we have a race to defend against. |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index 7774d17dde74..fdde1ea21b07 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -313,7 +313,7 @@ static struct platform_device at91sam9260_nand_device = { | |||
313 | 313 | ||
314 | void __init at91_add_device_nand(struct atmel_nand_data *data) | 314 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
315 | { | 315 | { |
316 | unsigned long csa, mode; | 316 | unsigned long csa; |
317 | 317 | ||
318 | if (!data) | 318 | if (!data) |
319 | return; | 319 | return; |
@@ -321,42 +321,6 @@ void __init at91_add_device_nand(struct atmel_nand_data *data) | |||
321 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | 321 | csa = at91_sys_read(AT91_MATRIX_EBICSA); |
322 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); | 322 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); |
323 | 323 | ||
324 | if (cpu_is_at91sam9260()) { | ||
325 | /* Timing for sam9260 */ | ||
326 | /* set the bus interface characteristics */ | ||
327 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | ||
328 | | AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); | ||
329 | |||
330 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | ||
331 | | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); | ||
332 | |||
333 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); | ||
334 | |||
335 | if (data->bus_width_16) | ||
336 | mode = AT91_SMC_DBW_16; | ||
337 | else | ||
338 | mode = AT91_SMC_DBW_8; | ||
339 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(2)); | ||
340 | } | ||
341 | |||
342 | if (cpu_is_at91sam9g20()) { | ||
343 | /* Timing for sam9g20 */ | ||
344 | /* set the bus interface characteristics */ | ||
345 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(0) | ||
346 | | AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(0)); | ||
347 | |||
348 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(4) | ||
349 | | AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(4)); | ||
350 | |||
351 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7)); | ||
352 | |||
353 | if (data->bus_width_16) | ||
354 | mode = AT91_SMC_DBW_16; | ||
355 | else | ||
356 | mode = AT91_SMC_DBW_8; | ||
357 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(3)); | ||
358 | } | ||
359 | |||
360 | /* enable pin */ | 324 | /* enable pin */ |
361 | if (data->enable_pin) | 325 | if (data->enable_pin) |
362 | at91_set_gpio_output(data->enable_pin, 1); | 326 | at91_set_gpio_output(data->enable_pin, 1); |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 6b89172310c7..17289756f80f 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -223,7 +223,7 @@ static struct platform_device atmel_nand_device = { | |||
223 | 223 | ||
224 | void __init at91_add_device_nand(struct atmel_nand_data *data) | 224 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
225 | { | 225 | { |
226 | unsigned long csa, mode; | 226 | unsigned long csa; |
227 | 227 | ||
228 | if (!data) | 228 | if (!data) |
229 | return; | 229 | return; |
@@ -231,21 +231,6 @@ void __init at91_add_device_nand(struct atmel_nand_data *data) | |||
231 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | 231 | csa = at91_sys_read(AT91_MATRIX_EBICSA); |
232 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); | 232 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); |
233 | 233 | ||
234 | /* set the bus interface characteristics */ | ||
235 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | ||
236 | | AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); | ||
237 | |||
238 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | ||
239 | | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); | ||
240 | |||
241 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); | ||
242 | |||
243 | if (data->bus_width_16) | ||
244 | mode = AT91_SMC_DBW_16; | ||
245 | else | ||
246 | mode = AT91_SMC_DBW_8; | ||
247 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(2)); | ||
248 | |||
249 | /* enable pin */ | 234 | /* enable pin */ |
250 | if (data->enable_pin) | 235 | if (data->enable_pin) |
251 | at91_set_gpio_output(data->enable_pin, 1); | 236 | at91_set_gpio_output(data->enable_pin, 1); |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 8b884083f76d..b753cb879d8e 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -382,7 +382,7 @@ static struct platform_device at91sam9263_nand_device = { | |||
382 | 382 | ||
383 | void __init at91_add_device_nand(struct atmel_nand_data *data) | 383 | void __init at91_add_device_nand(struct atmel_nand_data *data) |
384 | { | 384 | { |
385 | unsigned long csa, mode; | 385 | unsigned long csa; |
386 | 386 | ||
387 | if (!data) | 387 | if (!data) |
388 | return; | 388 | return; |
@@ -390,21 +390,6 @@ void __init at91_add_device_nand(struct atmel_nand_data *data) | |||
390 | csa = at91_sys_read(AT91_MATRIX_EBI0CSA); | 390 | csa = at91_sys_read(AT91_MATRIX_EBI0CSA); |
391 | at91_sys_write(AT91_MATRIX_EBI0CSA, csa | AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA); | 391 | at91_sys_write(AT91_MATRIX_EBI0CSA, csa | AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA); |
392 | 392 | ||
393 | /* set the bus interface characteristics */ | ||
394 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | ||
395 | | AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); | ||
396 | |||
397 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | ||
398 | | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); | ||
399 | |||
400 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); | ||
401 | |||
402 | if (data->bus_width_16) | ||
403 | mode = AT91_SMC_DBW_16; | ||
404 | else | ||
405 | mode = AT91_SMC_DBW_8; | ||
406 | at91_sys_write(AT91_SMC_MODE(3), mode | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(2)); | ||
407 | |||
408 | /* enable pin */ | 393 | /* enable pin */ |
409 | if (data->enable_pin) | 394 | if (data->enable_pin) |
410 | at91_set_gpio_output(data->enable_pin, 1); | 395 | at91_set_gpio_output(data->enable_pin, 1); |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 87deb1e1b529..145324f4ec56 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -232,17 +232,6 @@ void __init at91_add_device_nand(struct atmel_nand_data *data) | |||
232 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | 232 | csa = at91_sys_read(AT91_MATRIX_EBICSA); |
233 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); | 233 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA); |
234 | 234 | ||
235 | /* set the bus interface characteristics */ | ||
236 | at91_sys_write(AT91_SMC_SETUP(3), AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) | ||
237 | | AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0)); | ||
238 | |||
239 | at91_sys_write(AT91_SMC_PULSE(3), AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) | ||
240 | | AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3)); | ||
241 | |||
242 | at91_sys_write(AT91_SMC_CYCLE(3), AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5)); | ||
243 | |||
244 | at91_sys_write(AT91_SMC_MODE(3), AT91_SMC_DBW_8 | AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_TDF_(2)); | ||
245 | |||
246 | /* enable pin */ | 235 | /* enable pin */ |
247 | if (data->enable_pin) | 236 | if (data->enable_pin) |
248 | at91_set_gpio_output(data->enable_pin, 1); | 237 | at91_set_gpio_output(data->enable_pin, 1); |
diff --git a/arch/arm/mach-at91/board-cam60.c b/arch/arm/mach-at91/board-cam60.c index cdddca54b938..d3ba29c5d8c8 100644 --- a/arch/arm/mach-at91/board-cam60.c +++ b/arch/arm/mach-at91/board-cam60.c | |||
@@ -39,7 +39,9 @@ | |||
39 | 39 | ||
40 | #include <mach/board.h> | 40 | #include <mach/board.h> |
41 | #include <mach/gpio.h> | 41 | #include <mach/gpio.h> |
42 | #include <mach/at91sam9_smc.h> | ||
42 | 43 | ||
44 | #include "sam9_smc.h" | ||
43 | #include "generic.h" | 45 | #include "generic.h" |
44 | 46 | ||
45 | 47 | ||
@@ -151,6 +153,32 @@ static struct atmel_nand_data __initdata cam60_nand_data = { | |||
151 | .partition_info = nand_partitions, | 153 | .partition_info = nand_partitions, |
152 | }; | 154 | }; |
153 | 155 | ||
156 | static struct sam9_smc_config __initdata cam60_nand_smc_config = { | ||
157 | .ncs_read_setup = 0, | ||
158 | .nrd_setup = 1, | ||
159 | .ncs_write_setup = 0, | ||
160 | .nwe_setup = 1, | ||
161 | |||
162 | .ncs_read_pulse = 3, | ||
163 | .nrd_pulse = 3, | ||
164 | .ncs_write_pulse = 3, | ||
165 | .nwe_pulse = 3, | ||
166 | |||
167 | .read_cycle = 5, | ||
168 | .write_cycle = 5, | ||
169 | |||
170 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
171 | .tdf_cycles = 2, | ||
172 | }; | ||
173 | |||
174 | static void __init cam60_add_device_nand(void) | ||
175 | { | ||
176 | /* configure chip-select 3 (NAND) */ | ||
177 | sam9_smc_configure(3, &cam60_nand_smc_config); | ||
178 | |||
179 | at91_add_device_nand(&cam60_nand_data); | ||
180 | } | ||
181 | |||
154 | 182 | ||
155 | static void __init cam60_board_init(void) | 183 | static void __init cam60_board_init(void) |
156 | { | 184 | { |
@@ -165,7 +193,7 @@ static void __init cam60_board_init(void) | |||
165 | at91_set_gpio_output(AT91_PIN_PB18, 1); | 193 | at91_set_gpio_output(AT91_PIN_PB18, 1); |
166 | at91_add_device_usbh(&cam60_usbh_data); | 194 | at91_add_device_usbh(&cam60_usbh_data); |
167 | /* NAND */ | 195 | /* NAND */ |
168 | at91_add_device_nand(&cam60_nand_data); | 196 | cam60_add_device_nand(); |
169 | } | 197 | } |
170 | 198 | ||
171 | MACHINE_START(CAM60, "KwikByte CAM60") | 199 | MACHINE_START(CAM60, "KwikByte CAM60") |
diff --git a/arch/arm/mach-at91/board-cap9adk.c b/arch/arm/mach-at91/board-cap9adk.c index 201b89392dcc..83a1a0fef47b 100644 --- a/arch/arm/mach-at91/board-cap9adk.c +++ b/arch/arm/mach-at91/board-cap9adk.c | |||
@@ -36,17 +36,16 @@ | |||
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <asm/setup.h> | 37 | #include <asm/setup.h> |
38 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
39 | #include <asm/irq.h> | ||
40 | 39 | ||
41 | #include <asm/mach/arch.h> | 40 | #include <asm/mach/arch.h> |
42 | #include <asm/mach/map.h> | 41 | #include <asm/mach/map.h> |
43 | #include <asm/mach/irq.h> | ||
44 | 42 | ||
45 | #include <mach/board.h> | 43 | #include <mach/board.h> |
46 | #include <mach/gpio.h> | 44 | #include <mach/gpio.h> |
47 | #include <mach/at91cap9_matrix.h> | 45 | #include <mach/at91cap9_matrix.h> |
48 | #include <mach/at91sam9_smc.h> | 46 | #include <mach/at91sam9_smc.h> |
49 | 47 | ||
48 | #include "sam9_smc.h" | ||
50 | #include "generic.h" | 49 | #include "generic.h" |
51 | 50 | ||
52 | 51 | ||
@@ -195,6 +194,43 @@ static struct atmel_nand_data __initdata cap9adk_nand_data = { | |||
195 | #endif | 194 | #endif |
196 | }; | 195 | }; |
197 | 196 | ||
197 | static struct sam9_smc_config __initdata cap9adk_nand_smc_config = { | ||
198 | .ncs_read_setup = 1, | ||
199 | .nrd_setup = 2, | ||
200 | .ncs_write_setup = 1, | ||
201 | .nwe_setup = 2, | ||
202 | |||
203 | .ncs_read_pulse = 6, | ||
204 | .nrd_pulse = 4, | ||
205 | .ncs_write_pulse = 6, | ||
206 | .nwe_pulse = 4, | ||
207 | |||
208 | .read_cycle = 8, | ||
209 | .write_cycle = 8, | ||
210 | |||
211 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
212 | .tdf_cycles = 1, | ||
213 | }; | ||
214 | |||
215 | static void __init cap9adk_add_device_nand(void) | ||
216 | { | ||
217 | unsigned long csa; | ||
218 | |||
219 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | ||
220 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); | ||
221 | |||
222 | /* setup bus-width (8 or 16) */ | ||
223 | if (cap9adk_nand_data.bus_width_16) | ||
224 | cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
225 | else | ||
226 | cap9adk_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
227 | |||
228 | /* configure chip-select 3 (NAND) */ | ||
229 | sam9_smc_configure(3, &cap9adk_nand_smc_config); | ||
230 | |||
231 | at91_add_device_nand(&cap9adk_nand_data); | ||
232 | } | ||
233 | |||
198 | 234 | ||
199 | /* | 235 | /* |
200 | * NOR flash | 236 | * NOR flash |
@@ -234,6 +270,24 @@ static struct platform_device cap9adk_nor_flash = { | |||
234 | .num_resources = ARRAY_SIZE(nor_flash_resources), | 270 | .num_resources = ARRAY_SIZE(nor_flash_resources), |
235 | }; | 271 | }; |
236 | 272 | ||
273 | static struct sam9_smc_config __initdata cap9adk_nor_smc_config = { | ||
274 | .ncs_read_setup = 2, | ||
275 | .nrd_setup = 4, | ||
276 | .ncs_write_setup = 2, | ||
277 | .nwe_setup = 4, | ||
278 | |||
279 | .ncs_read_pulse = 10, | ||
280 | .nrd_pulse = 8, | ||
281 | .ncs_write_pulse = 10, | ||
282 | .nwe_pulse = 8, | ||
283 | |||
284 | .read_cycle = 16, | ||
285 | .write_cycle = 16, | ||
286 | |||
287 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_16, | ||
288 | .tdf_cycles = 1, | ||
289 | }; | ||
290 | |||
237 | static __init void cap9adk_add_device_nor(void) | 291 | static __init void cap9adk_add_device_nor(void) |
238 | { | 292 | { |
239 | unsigned long csa; | 293 | unsigned long csa; |
@@ -241,18 +295,8 @@ static __init void cap9adk_add_device_nor(void) | |||
241 | csa = at91_sys_read(AT91_MATRIX_EBICSA); | 295 | csa = at91_sys_read(AT91_MATRIX_EBICSA); |
242 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); | 296 | at91_sys_write(AT91_MATRIX_EBICSA, csa | AT91_MATRIX_EBI_VDDIOMSEL_3_3V); |
243 | 297 | ||
244 | /* set the bus interface characteristics */ | 298 | /* configure chip-select 0 (NOR) */ |
245 | at91_sys_write(AT91_SMC_SETUP(0), AT91_SMC_NWESETUP_(4) | AT91_SMC_NCS_WRSETUP_(2) | 299 | sam9_smc_configure(0, &cap9adk_nor_smc_config); |
246 | | AT91_SMC_NRDSETUP_(4) | AT91_SMC_NCS_RDSETUP_(2)); | ||
247 | |||
248 | at91_sys_write(AT91_SMC_PULSE(0), AT91_SMC_NWEPULSE_(8) | AT91_SMC_NCS_WRPULSE_(10) | ||
249 | | AT91_SMC_NRDPULSE_(8) | AT91_SMC_NCS_RDPULSE_(10)); | ||
250 | |||
251 | at91_sys_write(AT91_SMC_CYCLE(0), AT91_SMC_NWECYCLE_(16) | AT91_SMC_NRDCYCLE_(16)); | ||
252 | |||
253 | at91_sys_write(AT91_SMC_MODE(0), AT91_SMC_READMODE | AT91_SMC_WRITEMODE | ||
254 | | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | ||
255 | | AT91_SMC_DBW_16 | AT91_SMC_TDF_(1)); | ||
256 | 300 | ||
257 | platform_device_register(&cap9adk_nor_flash); | 301 | platform_device_register(&cap9adk_nor_flash); |
258 | } | 302 | } |
@@ -330,10 +374,8 @@ static void __init cap9adk_board_init(void) | |||
330 | /* Serial */ | 374 | /* Serial */ |
331 | at91_add_device_serial(); | 375 | at91_add_device_serial(); |
332 | /* USB Host */ | 376 | /* USB Host */ |
333 | set_irq_type(AT91CAP9_ID_UHP, IRQ_TYPE_LEVEL_HIGH); | ||
334 | at91_add_device_usbh(&cap9adk_usbh_data); | 377 | at91_add_device_usbh(&cap9adk_usbh_data); |
335 | /* USB HS */ | 378 | /* USB HS */ |
336 | set_irq_type(AT91CAP9_ID_UDPHS, IRQ_TYPE_LEVEL_HIGH); | ||
337 | at91_add_device_usba(&cap9adk_usba_udc_data); | 379 | at91_add_device_usba(&cap9adk_usba_udc_data); |
338 | /* SPI */ | 380 | /* SPI */ |
339 | at91_add_device_spi(cap9adk_spi_devices, ARRAY_SIZE(cap9adk_spi_devices)); | 381 | at91_add_device_spi(cap9adk_spi_devices, ARRAY_SIZE(cap9adk_spi_devices)); |
@@ -344,13 +386,12 @@ static void __init cap9adk_board_init(void) | |||
344 | /* Ethernet */ | 386 | /* Ethernet */ |
345 | at91_add_device_eth(&cap9adk_macb_data); | 387 | at91_add_device_eth(&cap9adk_macb_data); |
346 | /* NAND */ | 388 | /* NAND */ |
347 | at91_add_device_nand(&cap9adk_nand_data); | 389 | cap9adk_add_device_nand(); |
348 | /* NOR Flash */ | 390 | /* NOR Flash */ |
349 | cap9adk_add_device_nor(); | 391 | cap9adk_add_device_nor(); |
350 | /* I2C */ | 392 | /* I2C */ |
351 | at91_add_device_i2c(NULL, 0); | 393 | at91_add_device_i2c(NULL, 0); |
352 | /* LCD Controller */ | 394 | /* LCD Controller */ |
353 | set_irq_type(AT91CAP9_ID_LCDC, IRQ_TYPE_LEVEL_HIGH); | ||
354 | at91_add_device_lcdc(&cap9adk_lcdc_data); | 395 | at91_add_device_lcdc(&cap9adk_lcdc_data); |
355 | /* AC97 */ | 396 | /* AC97 */ |
356 | at91_add_device_ac97(&cap9adk_ac97_data); | 397 | at91_add_device_ac97(&cap9adk_ac97_data); |
diff --git a/arch/arm/mach-at91/board-neocore926.c b/arch/arm/mach-at91/board-neocore926.c new file mode 100644 index 000000000000..9ba7ba2cc3b1 --- /dev/null +++ b/arch/arm/mach-at91/board-neocore926.c | |||
@@ -0,0 +1,397 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91/board-neocore926.c | ||
3 | * | ||
4 | * Copyright (C) 2005 SAN People | ||
5 | * Copyright (C) 2007 Atmel Corporation | ||
6 | * Copyright (C) 2008 ADENEO. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/mm.h> | ||
26 | #include <linux/module.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/spi/spi.h> | ||
29 | #include <linux/spi/ads7846.h> | ||
30 | #include <linux/fb.h> | ||
31 | #include <linux/gpio_keys.h> | ||
32 | #include <linux/input.h> | ||
33 | |||
34 | #include <video/atmel_lcdc.h> | ||
35 | |||
36 | #include <asm/setup.h> | ||
37 | #include <asm/mach-types.h> | ||
38 | #include <asm/irq.h> | ||
39 | #include <asm/sizes.h> | ||
40 | |||
41 | #include <asm/mach/arch.h> | ||
42 | #include <asm/mach/map.h> | ||
43 | #include <asm/mach/irq.h> | ||
44 | |||
45 | #include <mach/hardware.h> | ||
46 | #include <mach/board.h> | ||
47 | #include <mach/gpio.h> | ||
48 | #include <mach/at91sam9_smc.h> | ||
49 | |||
50 | #include "sam9_smc.h" | ||
51 | #include "generic.h" | ||
52 | |||
53 | |||
54 | static void __init neocore926_map_io(void) | ||
55 | { | ||
56 | /* Initialize processor: 20 MHz crystal */ | ||
57 | at91sam9263_initialize(20000000); | ||
58 | |||
59 | /* DGBU on ttyS0. (Rx & Tx only) */ | ||
60 | at91_register_uart(0, 0, 0); | ||
61 | |||
62 | /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ | ||
63 | at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
64 | |||
65 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
66 | at91_set_serial_console(0); | ||
67 | } | ||
68 | |||
69 | static void __init neocore926_init_irq(void) | ||
70 | { | ||
71 | at91sam9263_init_interrupts(NULL); | ||
72 | } | ||
73 | |||
74 | |||
75 | /* | ||
76 | * USB Host port | ||
77 | */ | ||
78 | static struct at91_usbh_data __initdata neocore926_usbh_data = { | ||
79 | .ports = 2, | ||
80 | .vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 }, | ||
81 | }; | ||
82 | |||
83 | /* | ||
84 | * USB Device port | ||
85 | */ | ||
86 | static struct at91_udc_data __initdata neocore926_udc_data = { | ||
87 | .vbus_pin = AT91_PIN_PA25, | ||
88 | .pullup_pin = 0, /* pull-up driven by UDC */ | ||
89 | }; | ||
90 | |||
91 | |||
92 | /* | ||
93 | * ADS7846 Touchscreen | ||
94 | */ | ||
95 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | ||
96 | static int ads7843_pendown_state(void) | ||
97 | { | ||
98 | return !at91_get_gpio_value(AT91_PIN_PA15); /* Touchscreen PENIRQ */ | ||
99 | } | ||
100 | |||
101 | static struct ads7846_platform_data ads_info = { | ||
102 | .model = 7843, | ||
103 | .x_min = 150, | ||
104 | .x_max = 3830, | ||
105 | .y_min = 190, | ||
106 | .y_max = 3830, | ||
107 | .vref_delay_usecs = 100, | ||
108 | .x_plate_ohms = 450, | ||
109 | .y_plate_ohms = 250, | ||
110 | .pressure_max = 15000, | ||
111 | .debounce_max = 1, | ||
112 | .debounce_rep = 0, | ||
113 | .debounce_tol = (~0), | ||
114 | .get_pendown_state = ads7843_pendown_state, | ||
115 | }; | ||
116 | |||
117 | static void __init neocore926_add_device_ts(void) | ||
118 | { | ||
119 | at91_set_B_periph(AT91_PIN_PA15, 1); /* External IRQ1, with pullup */ | ||
120 | at91_set_gpio_input(AT91_PIN_PC13, 1); /* Touchscreen BUSY signal */ | ||
121 | } | ||
122 | #else | ||
123 | static void __init neocore926_add_device_ts(void) {} | ||
124 | #endif | ||
125 | |||
126 | /* | ||
127 | * SPI devices. | ||
128 | */ | ||
129 | static struct spi_board_info neocore926_spi_devices[] = { | ||
130 | #if defined(CONFIG_MTD_AT91_DATAFLASH_CARD) | ||
131 | { /* DataFlash card */ | ||
132 | .modalias = "mtd_dataflash", | ||
133 | .chip_select = 0, | ||
134 | .max_speed_hz = 15 * 1000 * 1000, | ||
135 | .bus_num = 0, | ||
136 | }, | ||
137 | #endif | ||
138 | #if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) | ||
139 | { | ||
140 | .modalias = "ads7846", | ||
141 | .chip_select = 1, | ||
142 | .max_speed_hz = 125000 * 16, | ||
143 | .bus_num = 0, | ||
144 | .platform_data = &ads_info, | ||
145 | .irq = AT91SAM9263_ID_IRQ1, | ||
146 | }, | ||
147 | #endif | ||
148 | }; | ||
149 | |||
150 | |||
151 | /* | ||
152 | * MCI (SD/MMC) | ||
153 | */ | ||
154 | static struct at91_mmc_data __initdata neocore926_mmc_data = { | ||
155 | .wire4 = 1, | ||
156 | .det_pin = AT91_PIN_PE18, | ||
157 | .wp_pin = AT91_PIN_PE19, | ||
158 | }; | ||
159 | |||
160 | |||
161 | /* | ||
162 | * MACB Ethernet device | ||
163 | */ | ||
164 | static struct at91_eth_data __initdata neocore926_macb_data = { | ||
165 | .phy_irq_pin = AT91_PIN_PE31, | ||
166 | .is_rmii = 1, | ||
167 | }; | ||
168 | |||
169 | |||
170 | /* | ||
171 | * NAND flash | ||
172 | */ | ||
173 | static struct mtd_partition __initdata neocore926_nand_partition[] = { | ||
174 | { | ||
175 | .name = "Linux Kernel", /* "Partition 1", */ | ||
176 | .offset = 0, | ||
177 | .size = SZ_8M, | ||
178 | }, | ||
179 | { | ||
180 | .name = "Filesystem", /* "Partition 2", */ | ||
181 | .offset = MTDPART_OFS_NXTBLK, | ||
182 | .size = SZ_32M, | ||
183 | }, | ||
184 | { | ||
185 | .name = "Free", /* "Partition 3", */ | ||
186 | .offset = MTDPART_OFS_NXTBLK, | ||
187 | .size = MTDPART_SIZ_FULL, | ||
188 | }, | ||
189 | }; | ||
190 | |||
191 | static struct mtd_partition * __init nand_partitions(int size, int *num_partitions) | ||
192 | { | ||
193 | *num_partitions = ARRAY_SIZE(neocore926_nand_partition); | ||
194 | return neocore926_nand_partition; | ||
195 | } | ||
196 | |||
197 | static struct atmel_nand_data __initdata neocore926_nand_data = { | ||
198 | .ale = 21, | ||
199 | .cle = 22, | ||
200 | .rdy_pin = AT91_PIN_PB19, | ||
201 | .rdy_pin_active_low = 1, | ||
202 | .enable_pin = AT91_PIN_PD15, | ||
203 | .partition_info = nand_partitions, | ||
204 | }; | ||
205 | |||
206 | static struct sam9_smc_config __initdata neocore926_nand_smc_config = { | ||
207 | .ncs_read_setup = 0, | ||
208 | .nrd_setup = 1, | ||
209 | .ncs_write_setup = 0, | ||
210 | .nwe_setup = 1, | ||
211 | |||
212 | .ncs_read_pulse = 4, | ||
213 | .nrd_pulse = 4, | ||
214 | .ncs_write_pulse = 4, | ||
215 | .nwe_pulse = 4, | ||
216 | |||
217 | .read_cycle = 6, | ||
218 | .write_cycle = 6, | ||
219 | |||
220 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
221 | .tdf_cycles = 2, | ||
222 | }; | ||
223 | |||
224 | static void __init neocore926_add_device_nand(void) | ||
225 | { | ||
226 | /* configure chip-select 3 (NAND) */ | ||
227 | sam9_smc_configure(3, &neocore926_nand_smc_config); | ||
228 | |||
229 | at91_add_device_nand(&neocore926_nand_data); | ||
230 | } | ||
231 | |||
232 | |||
233 | /* | ||
234 | * LCD Controller | ||
235 | */ | ||
236 | #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) | ||
237 | static struct fb_videomode at91_tft_vga_modes[] = { | ||
238 | { | ||
239 | .name = "TX09D50VM1CCA @ 60", | ||
240 | .refresh = 60, | ||
241 | .xres = 240, .yres = 320, | ||
242 | .pixclock = KHZ2PICOS(5000), | ||
243 | |||
244 | .left_margin = 1, .right_margin = 33, | ||
245 | .upper_margin = 1, .lower_margin = 0, | ||
246 | .hsync_len = 5, .vsync_len = 1, | ||
247 | |||
248 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
249 | .vmode = FB_VMODE_NONINTERLACED, | ||
250 | }, | ||
251 | }; | ||
252 | |||
253 | static struct fb_monspecs at91fb_default_monspecs = { | ||
254 | .manufacturer = "HIT", | ||
255 | .monitor = "TX09D70VM1CCA", | ||
256 | |||
257 | .modedb = at91_tft_vga_modes, | ||
258 | .modedb_len = ARRAY_SIZE(at91_tft_vga_modes), | ||
259 | .hfmin = 15000, | ||
260 | .hfmax = 64000, | ||
261 | .vfmin = 50, | ||
262 | .vfmax = 150, | ||
263 | }; | ||
264 | |||
265 | #define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \ | ||
266 | | ATMEL_LCDC_DISTYPE_TFT \ | ||
267 | | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE) | ||
268 | |||
269 | static void at91_lcdc_power_control(int on) | ||
270 | { | ||
271 | at91_set_gpio_value(AT91_PIN_PA30, on); | ||
272 | } | ||
273 | |||
274 | /* Driver datas */ | ||
275 | static struct atmel_lcdfb_info __initdata neocore926_lcdc_data = { | ||
276 | .lcdcon_is_backlight = true, | ||
277 | .default_bpp = 16, | ||
278 | .default_dmacon = ATMEL_LCDC_DMAEN, | ||
279 | .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2, | ||
280 | .default_monspecs = &at91fb_default_monspecs, | ||
281 | .atmel_lcdfb_power_control = at91_lcdc_power_control, | ||
282 | .guard_time = 1, | ||
283 | .lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB555, | ||
284 | }; | ||
285 | |||
286 | #else | ||
287 | static struct atmel_lcdfb_info __initdata neocore926_lcdc_data; | ||
288 | #endif | ||
289 | |||
290 | |||
291 | /* | ||
292 | * GPIO Buttons | ||
293 | */ | ||
294 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | ||
295 | static struct gpio_keys_button neocore926_buttons[] = { | ||
296 | { /* BP1, "leftclic" */ | ||
297 | .code = BTN_LEFT, | ||
298 | .gpio = AT91_PIN_PC5, | ||
299 | .active_low = 1, | ||
300 | .desc = "left_click", | ||
301 | .wakeup = 1, | ||
302 | }, | ||
303 | { /* BP2, "rightclic" */ | ||
304 | .code = BTN_RIGHT, | ||
305 | .gpio = AT91_PIN_PC4, | ||
306 | .active_low = 1, | ||
307 | .desc = "right_click", | ||
308 | .wakeup = 1, | ||
309 | }, | ||
310 | }; | ||
311 | |||
312 | static struct gpio_keys_platform_data neocore926_button_data = { | ||
313 | .buttons = neocore926_buttons, | ||
314 | .nbuttons = ARRAY_SIZE(neocore926_buttons), | ||
315 | }; | ||
316 | |||
317 | static struct platform_device neocore926_button_device = { | ||
318 | .name = "gpio-keys", | ||
319 | .id = -1, | ||
320 | .num_resources = 0, | ||
321 | .dev = { | ||
322 | .platform_data = &neocore926_button_data, | ||
323 | } | ||
324 | }; | ||
325 | |||
326 | static void __init neocore926_add_device_buttons(void) | ||
327 | { | ||
328 | at91_set_GPIO_periph(AT91_PIN_PC5, 0); /* left button */ | ||
329 | at91_set_deglitch(AT91_PIN_PC5, 1); | ||
330 | at91_set_GPIO_periph(AT91_PIN_PC4, 0); /* right button */ | ||
331 | at91_set_deglitch(AT91_PIN_PC4, 1); | ||
332 | |||
333 | platform_device_register(&neocore926_button_device); | ||
334 | } | ||
335 | #else | ||
336 | static void __init neocore926_add_device_buttons(void) {} | ||
337 | #endif | ||
338 | |||
339 | |||
340 | /* | ||
341 | * AC97 | ||
342 | */ | ||
343 | static struct atmel_ac97_data neocore926_ac97_data = { | ||
344 | .reset_pin = AT91_PIN_PA13, | ||
345 | }; | ||
346 | |||
347 | |||
348 | static void __init neocore926_board_init(void) | ||
349 | { | ||
350 | /* Serial */ | ||
351 | at91_add_device_serial(); | ||
352 | |||
353 | /* USB Host */ | ||
354 | at91_add_device_usbh(&neocore926_usbh_data); | ||
355 | |||
356 | /* USB Device */ | ||
357 | at91_add_device_udc(&neocore926_udc_data); | ||
358 | |||
359 | /* SPI */ | ||
360 | at91_set_gpio_output(AT91_PIN_PE20, 1); /* select spi0 clock */ | ||
361 | at91_add_device_spi(neocore926_spi_devices, ARRAY_SIZE(neocore926_spi_devices)); | ||
362 | |||
363 | /* Touchscreen */ | ||
364 | neocore926_add_device_ts(); | ||
365 | |||
366 | /* MMC */ | ||
367 | at91_add_device_mmc(1, &neocore926_mmc_data); | ||
368 | |||
369 | /* Ethernet */ | ||
370 | at91_add_device_eth(&neocore926_macb_data); | ||
371 | |||
372 | /* NAND */ | ||
373 | neocore926_add_device_nand(); | ||
374 | |||
375 | /* I2C */ | ||
376 | at91_add_device_i2c(NULL, 0); | ||
377 | |||
378 | /* LCD Controller */ | ||
379 | at91_add_device_lcdc(&neocore926_lcdc_data); | ||
380 | |||
381 | /* Push Buttons */ | ||
382 | neocore926_add_device_buttons(); | ||
383 | |||
384 | /* AC97 */ | ||
385 | at91_add_device_ac97(&neocore926_ac97_data); | ||
386 | } | ||
387 | |||
388 | MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926") | ||
389 | /* Maintainer: ADENEO */ | ||
390 | .phys_io = AT91_BASE_SYS, | ||
391 | .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc, | ||
392 | .boot_params = AT91_SDRAM_BASE + 0x100, | ||
393 | .timer = &at91sam926x_timer, | ||
394 | .map_io = neocore926_map_io, | ||
395 | .init_irq = neocore926_init_irq, | ||
396 | .init_machine = neocore926_board_init, | ||
397 | MACHINE_END | ||
diff --git a/arch/arm/mach-at91/board-qil-a9260.c b/arch/arm/mach-at91/board-qil-a9260.c index cfb4571a2e27..4cff9a7e61d2 100644 --- a/arch/arm/mach-at91/board-qil-a9260.c +++ b/arch/arm/mach-at91/board-qil-a9260.c | |||
@@ -41,8 +41,10 @@ | |||
41 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
42 | #include <mach/board.h> | 42 | #include <mach/board.h> |
43 | #include <mach/gpio.h> | 43 | #include <mach/gpio.h> |
44 | #include <mach/at91sam9_smc.h> | ||
44 | #include <mach/at91_shdwc.h> | 45 | #include <mach/at91_shdwc.h> |
45 | 46 | ||
47 | #include "sam9_smc.h" | ||
46 | #include "generic.h" | 48 | #include "generic.h" |
47 | 49 | ||
48 | 50 | ||
@@ -147,13 +149,34 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
147 | .rdy_pin = AT91_PIN_PC13, | 149 | .rdy_pin = AT91_PIN_PC13, |
148 | .enable_pin = AT91_PIN_PC14, | 150 | .enable_pin = AT91_PIN_PC14, |
149 | .partition_info = nand_partitions, | 151 | .partition_info = nand_partitions, |
150 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
151 | .bus_width_16 = 1, | ||
152 | #else | ||
153 | .bus_width_16 = 0, | ||
154 | #endif | ||
155 | }; | 152 | }; |
156 | 153 | ||
154 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
155 | .ncs_read_setup = 0, | ||
156 | .nrd_setup = 1, | ||
157 | .ncs_write_setup = 0, | ||
158 | .nwe_setup = 1, | ||
159 | |||
160 | .ncs_read_pulse = 3, | ||
161 | .nrd_pulse = 3, | ||
162 | .ncs_write_pulse = 3, | ||
163 | .nwe_pulse = 3, | ||
164 | |||
165 | .read_cycle = 5, | ||
166 | .write_cycle = 5, | ||
167 | |||
168 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
169 | .tdf_cycles = 2, | ||
170 | }; | ||
171 | |||
172 | static void __init ek_add_device_nand(void) | ||
173 | { | ||
174 | /* configure chip-select 3 (NAND) */ | ||
175 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
176 | |||
177 | at91_add_device_nand(&ek_nand_data); | ||
178 | } | ||
179 | |||
157 | /* | 180 | /* |
158 | * MCI (SD/MMC) | 181 | * MCI (SD/MMC) |
159 | */ | 182 | */ |
@@ -227,7 +250,7 @@ static void __init ek_board_init(void) | |||
227 | /* SPI */ | 250 | /* SPI */ |
228 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | 251 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); |
229 | /* NAND */ | 252 | /* NAND */ |
230 | at91_add_device_nand(&ek_nand_data); | 253 | ek_add_device_nand(); |
231 | /* I2C */ | 254 | /* I2C */ |
232 | at91_add_device_i2c(NULL, 0); | 255 | at91_add_device_i2c(NULL, 0); |
233 | /* Ethernet */ | 256 | /* Ethernet */ |
diff --git a/arch/arm/mach-at91/board-sam9-l9260.c b/arch/arm/mach-at91/board-sam9-l9260.c index 99bb4cc23a09..b48346977534 100644 --- a/arch/arm/mach-at91/board-sam9-l9260.c +++ b/arch/arm/mach-at91/board-sam9-l9260.c | |||
@@ -38,7 +38,9 @@ | |||
38 | 38 | ||
39 | #include <mach/board.h> | 39 | #include <mach/board.h> |
40 | #include <mach/gpio.h> | 40 | #include <mach/gpio.h> |
41 | #include <mach/at91sam9_smc.h> | ||
41 | 42 | ||
43 | #include "sam9_smc.h" | ||
42 | #include "generic.h" | 44 | #include "generic.h" |
43 | 45 | ||
44 | 46 | ||
@@ -148,13 +150,34 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
148 | .rdy_pin = AT91_PIN_PC13, | 150 | .rdy_pin = AT91_PIN_PC13, |
149 | .enable_pin = AT91_PIN_PC14, | 151 | .enable_pin = AT91_PIN_PC14, |
150 | .partition_info = nand_partitions, | 152 | .partition_info = nand_partitions, |
151 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
152 | .bus_width_16 = 1, | ||
153 | #else | ||
154 | .bus_width_16 = 0, | ||
155 | #endif | ||
156 | }; | 153 | }; |
157 | 154 | ||
155 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
156 | .ncs_read_setup = 0, | ||
157 | .nrd_setup = 1, | ||
158 | .ncs_write_setup = 0, | ||
159 | .nwe_setup = 1, | ||
160 | |||
161 | .ncs_read_pulse = 3, | ||
162 | .nrd_pulse = 3, | ||
163 | .ncs_write_pulse = 3, | ||
164 | .nwe_pulse = 3, | ||
165 | |||
166 | .read_cycle = 5, | ||
167 | .write_cycle = 5, | ||
168 | |||
169 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
170 | .tdf_cycles = 2, | ||
171 | }; | ||
172 | |||
173 | static void __init ek_add_device_nand(void) | ||
174 | { | ||
175 | /* configure chip-select 3 (NAND) */ | ||
176 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
177 | |||
178 | at91_add_device_nand(&ek_nand_data); | ||
179 | } | ||
180 | |||
158 | 181 | ||
159 | /* | 182 | /* |
160 | * MCI (SD/MMC) | 183 | * MCI (SD/MMC) |
@@ -178,7 +201,7 @@ static void __init ek_board_init(void) | |||
178 | /* SPI */ | 201 | /* SPI */ |
179 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | 202 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); |
180 | /* NAND */ | 203 | /* NAND */ |
181 | at91_add_device_nand(&ek_nand_data); | 204 | ek_add_device_nand(); |
182 | /* Ethernet */ | 205 | /* Ethernet */ |
183 | at91_add_device_eth(&ek_macb_data); | 206 | at91_add_device_eth(&ek_macb_data); |
184 | /* MMC */ | 207 | /* MMC */ |
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index b49eb6e4918a..93a0f8b100eb 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -42,7 +42,10 @@ | |||
42 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
43 | #include <mach/board.h> | 43 | #include <mach/board.h> |
44 | #include <mach/gpio.h> | 44 | #include <mach/gpio.h> |
45 | #include <mach/at91sam9_smc.h> | ||
46 | #include <mach/at91_shdwc.h> | ||
45 | 47 | ||
48 | #include "sam9_smc.h" | ||
46 | #include "generic.h" | 49 | #include "generic.h" |
47 | 50 | ||
48 | 51 | ||
@@ -195,6 +198,38 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
195 | #endif | 198 | #endif |
196 | }; | 199 | }; |
197 | 200 | ||
201 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
202 | .ncs_read_setup = 0, | ||
203 | .nrd_setup = 1, | ||
204 | .ncs_write_setup = 0, | ||
205 | .nwe_setup = 1, | ||
206 | |||
207 | .ncs_read_pulse = 3, | ||
208 | .nrd_pulse = 3, | ||
209 | .ncs_write_pulse = 3, | ||
210 | .nwe_pulse = 3, | ||
211 | |||
212 | .read_cycle = 5, | ||
213 | .write_cycle = 5, | ||
214 | |||
215 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
216 | .tdf_cycles = 2, | ||
217 | }; | ||
218 | |||
219 | static void __init ek_add_device_nand(void) | ||
220 | { | ||
221 | /* setup bus-width (8 or 16) */ | ||
222 | if (ek_nand_data.bus_width_16) | ||
223 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
224 | else | ||
225 | ek_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
226 | |||
227 | /* configure chip-select 3 (NAND) */ | ||
228 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
229 | |||
230 | at91_add_device_nand(&ek_nand_data); | ||
231 | } | ||
232 | |||
198 | 233 | ||
199 | /* | 234 | /* |
200 | * MCI (SD/MMC) | 235 | * MCI (SD/MMC) |
@@ -303,7 +338,7 @@ static void __init ek_board_init(void) | |||
303 | /* SPI */ | 338 | /* SPI */ |
304 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | 339 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); |
305 | /* NAND */ | 340 | /* NAND */ |
306 | at91_add_device_nand(&ek_nand_data); | 341 | ek_add_device_nand(); |
307 | /* Ethernet */ | 342 | /* Ethernet */ |
308 | at91_add_device_eth(&ek_macb_data); | 343 | at91_add_device_eth(&ek_macb_data); |
309 | /* MMC */ | 344 | /* MMC */ |
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index 4977409d4fc6..d5266da55311 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c | |||
@@ -47,7 +47,9 @@ | |||
47 | #include <mach/board.h> | 47 | #include <mach/board.h> |
48 | #include <mach/gpio.h> | 48 | #include <mach/gpio.h> |
49 | #include <mach/at91sam9_smc.h> | 49 | #include <mach/at91sam9_smc.h> |
50 | #include <mach/at91_shdwc.h> | ||
50 | 51 | ||
52 | #include "sam9_smc.h" | ||
51 | #include "generic.h" | 53 | #include "generic.h" |
52 | 54 | ||
53 | 55 | ||
@@ -76,7 +78,7 @@ static void __init ek_init_irq(void) | |||
76 | * DM9000 ethernet device | 78 | * DM9000 ethernet device |
77 | */ | 79 | */ |
78 | #if defined(CONFIG_DM9000) | 80 | #if defined(CONFIG_DM9000) |
79 | static struct resource at91sam9261_dm9000_resource[] = { | 81 | static struct resource dm9000_resource[] = { |
80 | [0] = { | 82 | [0] = { |
81 | .start = AT91_CHIPSELECT_2, | 83 | .start = AT91_CHIPSELECT_2, |
82 | .end = AT91_CHIPSELECT_2 + 3, | 84 | .end = AT91_CHIPSELECT_2 + 3, |
@@ -98,27 +100,42 @@ static struct dm9000_plat_data dm9000_platdata = { | |||
98 | .flags = DM9000_PLATF_16BITONLY, | 100 | .flags = DM9000_PLATF_16BITONLY, |
99 | }; | 101 | }; |
100 | 102 | ||
101 | static struct platform_device at91sam9261_dm9000_device = { | 103 | static struct platform_device dm9000_device = { |
102 | .name = "dm9000", | 104 | .name = "dm9000", |
103 | .id = 0, | 105 | .id = 0, |
104 | .num_resources = ARRAY_SIZE(at91sam9261_dm9000_resource), | 106 | .num_resources = ARRAY_SIZE(dm9000_resource), |
105 | .resource = at91sam9261_dm9000_resource, | 107 | .resource = dm9000_resource, |
106 | .dev = { | 108 | .dev = { |
107 | .platform_data = &dm9000_platdata, | 109 | .platform_data = &dm9000_platdata, |
108 | } | 110 | } |
109 | }; | 111 | }; |
110 | 112 | ||
113 | /* | ||
114 | * SMC timings for the DM9000. | ||
115 | * Note: These timings were calculated for MASTER_CLOCK = 100000000 according to the DM9000 timings. | ||
116 | */ | ||
117 | static struct sam9_smc_config __initdata dm9000_smc_config = { | ||
118 | .ncs_read_setup = 0, | ||
119 | .nrd_setup = 2, | ||
120 | .ncs_write_setup = 0, | ||
121 | .nwe_setup = 2, | ||
122 | |||
123 | .ncs_read_pulse = 8, | ||
124 | .nrd_pulse = 4, | ||
125 | .ncs_write_pulse = 8, | ||
126 | .nwe_pulse = 4, | ||
127 | |||
128 | .read_cycle = 16, | ||
129 | .write_cycle = 16, | ||
130 | |||
131 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_16, | ||
132 | .tdf_cycles = 1, | ||
133 | }; | ||
134 | |||
111 | static void __init ek_add_device_dm9000(void) | 135 | static void __init ek_add_device_dm9000(void) |
112 | { | 136 | { |
113 | /* | 137 | /* Configure chip-select 2 (DM9000) */ |
114 | * Configure Chip-Select 2 on SMC for the DM9000. | 138 | sam9_smc_configure(2, &dm9000_smc_config); |
115 | * Note: These timings were calculated for MASTER_CLOCK = 100000000 | ||
116 | * according to the DM9000 timings. | ||
117 | */ | ||
118 | at91_sys_write(AT91_SMC_SETUP(2), AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(0) | AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(0)); | ||
119 | at91_sys_write(AT91_SMC_PULSE(2), AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(8) | AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(8)); | ||
120 | at91_sys_write(AT91_SMC_CYCLE(2), AT91_SMC_NWECYCLE_(16) | AT91_SMC_NRDCYCLE_(16)); | ||
121 | at91_sys_write(AT91_SMC_MODE(2), AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_BAT_WRITE | AT91_SMC_DBW_16 | AT91_SMC_TDF_(1)); | ||
122 | 139 | ||
123 | /* Configure Reset signal as output */ | 140 | /* Configure Reset signal as output */ |
124 | at91_set_gpio_output(AT91_PIN_PC10, 0); | 141 | at91_set_gpio_output(AT91_PIN_PC10, 0); |
@@ -126,7 +143,7 @@ static void __init ek_add_device_dm9000(void) | |||
126 | /* Configure Interrupt pin as input, no pull-up */ | 143 | /* Configure Interrupt pin as input, no pull-up */ |
127 | at91_set_gpio_input(AT91_PIN_PC11, 0); | 144 | at91_set_gpio_input(AT91_PIN_PC11, 0); |
128 | 145 | ||
129 | platform_device_register(&at91sam9261_dm9000_device); | 146 | platform_device_register(&dm9000_device); |
130 | } | 147 | } |
131 | #else | 148 | #else |
132 | static void __init ek_add_device_dm9000(void) {} | 149 | static void __init ek_add_device_dm9000(void) {} |
@@ -197,6 +214,39 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
197 | #endif | 214 | #endif |
198 | }; | 215 | }; |
199 | 216 | ||
217 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
218 | .ncs_read_setup = 0, | ||
219 | .nrd_setup = 1, | ||
220 | .ncs_write_setup = 0, | ||
221 | .nwe_setup = 1, | ||
222 | |||
223 | .ncs_read_pulse = 3, | ||
224 | .nrd_pulse = 3, | ||
225 | .ncs_write_pulse = 3, | ||
226 | .nwe_pulse = 3, | ||
227 | |||
228 | .read_cycle = 5, | ||
229 | .write_cycle = 5, | ||
230 | |||
231 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
232 | .tdf_cycles = 2, | ||
233 | }; | ||
234 | |||
235 | static void __init ek_add_device_nand(void) | ||
236 | { | ||
237 | /* setup bus-width (8 or 16) */ | ||
238 | if (ek_nand_data.bus_width_16) | ||
239 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
240 | else | ||
241 | ek_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
242 | |||
243 | /* configure chip-select 3 (NAND) */ | ||
244 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
245 | |||
246 | at91_add_device_nand(&ek_nand_data); | ||
247 | } | ||
248 | |||
249 | |||
200 | /* | 250 | /* |
201 | * ADS7846 Touchscreen | 251 | * ADS7846 Touchscreen |
202 | */ | 252 | */ |
@@ -525,7 +575,7 @@ static void __init ek_board_init(void) | |||
525 | /* I2C */ | 575 | /* I2C */ |
526 | at91_add_device_i2c(NULL, 0); | 576 | at91_add_device_i2c(NULL, 0); |
527 | /* NAND */ | 577 | /* NAND */ |
528 | at91_add_device_nand(&ek_nand_data); | 578 | ek_add_device_nand(); |
529 | /* DM9000 ethernet */ | 579 | /* DM9000 ethernet */ |
530 | ek_add_device_dm9000(); | 580 | ek_add_device_dm9000(); |
531 | 581 | ||
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 8354015c6a23..57d52528f224 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -46,7 +46,9 @@ | |||
46 | #include <mach/board.h> | 46 | #include <mach/board.h> |
47 | #include <mach/gpio.h> | 47 | #include <mach/gpio.h> |
48 | #include <mach/at91sam9_smc.h> | 48 | #include <mach/at91sam9_smc.h> |
49 | #include <mach/at91_shdwc.h> | ||
49 | 50 | ||
51 | #include "sam9_smc.h" | ||
50 | #include "generic.h" | 52 | #include "generic.h" |
51 | 53 | ||
52 | 54 | ||
@@ -203,6 +205,38 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
203 | #endif | 205 | #endif |
204 | }; | 206 | }; |
205 | 207 | ||
208 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
209 | .ncs_read_setup = 0, | ||
210 | .nrd_setup = 1, | ||
211 | .ncs_write_setup = 0, | ||
212 | .nwe_setup = 1, | ||
213 | |||
214 | .ncs_read_pulse = 3, | ||
215 | .nrd_pulse = 3, | ||
216 | .ncs_write_pulse = 3, | ||
217 | .nwe_pulse = 3, | ||
218 | |||
219 | .read_cycle = 5, | ||
220 | .write_cycle = 5, | ||
221 | |||
222 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
223 | .tdf_cycles = 2, | ||
224 | }; | ||
225 | |||
226 | static void __init ek_add_device_nand(void) | ||
227 | { | ||
228 | /* setup bus-width (8 or 16) */ | ||
229 | if (ek_nand_data.bus_width_16) | ||
230 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
231 | else | ||
232 | ek_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
233 | |||
234 | /* configure chip-select 3 (NAND) */ | ||
235 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
236 | |||
237 | at91_add_device_nand(&ek_nand_data); | ||
238 | } | ||
239 | |||
206 | 240 | ||
207 | /* | 241 | /* |
208 | * I2C devices | 242 | * I2C devices |
@@ -385,7 +419,7 @@ static void __init ek_board_init(void) | |||
385 | /* Ethernet */ | 419 | /* Ethernet */ |
386 | at91_add_device_eth(&ek_macb_data); | 420 | at91_add_device_eth(&ek_macb_data); |
387 | /* NAND */ | 421 | /* NAND */ |
388 | at91_add_device_nand(&ek_nand_data); | 422 | ek_add_device_nand(); |
389 | /* I2C */ | 423 | /* I2C */ |
390 | at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); | 424 | at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices)); |
391 | /* LCD Controller */ | 425 | /* LCD Controller */ |
diff --git a/arch/arm/mach-at91/board-sam9g20ek.c b/arch/arm/mach-at91/board-sam9g20ek.c index b588ead14d68..81439fe6fb3d 100644 --- a/arch/arm/mach-at91/board-sam9g20ek.c +++ b/arch/arm/mach-at91/board-sam9g20ek.c | |||
@@ -37,7 +37,9 @@ | |||
37 | 37 | ||
38 | #include <mach/board.h> | 38 | #include <mach/board.h> |
39 | #include <mach/gpio.h> | 39 | #include <mach/gpio.h> |
40 | #include <mach/at91sam9_smc.h> | ||
40 | 41 | ||
42 | #include "sam9_smc.h" | ||
41 | #include "generic.h" | 43 | #include "generic.h" |
42 | 44 | ||
43 | 45 | ||
@@ -156,6 +158,38 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
156 | #endif | 158 | #endif |
157 | }; | 159 | }; |
158 | 160 | ||
161 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
162 | .ncs_read_setup = 0, | ||
163 | .nrd_setup = 2, | ||
164 | .ncs_write_setup = 0, | ||
165 | .nwe_setup = 2, | ||
166 | |||
167 | .ncs_read_pulse = 4, | ||
168 | .nrd_pulse = 4, | ||
169 | .ncs_write_pulse = 4, | ||
170 | .nwe_pulse = 4, | ||
171 | |||
172 | .read_cycle = 7, | ||
173 | .write_cycle = 7, | ||
174 | |||
175 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE, | ||
176 | .tdf_cycles = 3, | ||
177 | }; | ||
178 | |||
179 | static void __init ek_add_device_nand(void) | ||
180 | { | ||
181 | /* setup bus-width (8 or 16) */ | ||
182 | if (ek_nand_data.bus_width_16) | ||
183 | ek_nand_smc_config.mode |= AT91_SMC_DBW_16; | ||
184 | else | ||
185 | ek_nand_smc_config.mode |= AT91_SMC_DBW_8; | ||
186 | |||
187 | /* configure chip-select 3 (NAND) */ | ||
188 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
189 | |||
190 | at91_add_device_nand(&ek_nand_data); | ||
191 | } | ||
192 | |||
159 | 193 | ||
160 | /* | 194 | /* |
161 | * MCI (SD/MMC) | 195 | * MCI (SD/MMC) |
@@ -195,7 +229,7 @@ static void __init ek_board_init(void) | |||
195 | /* SPI */ | 229 | /* SPI */ |
196 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | 230 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); |
197 | /* NAND */ | 231 | /* NAND */ |
198 | at91_add_device_nand(&ek_nand_data); | 232 | ek_add_device_nand(); |
199 | /* Ethernet */ | 233 | /* Ethernet */ |
200 | at91_add_device_eth(&ek_macb_data); | 234 | at91_add_device_eth(&ek_macb_data); |
201 | /* MMC */ | 235 | /* MMC */ |
diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index 270851864308..9b937ee4815a 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c | |||
@@ -29,8 +29,9 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/board.h> | 30 | #include <mach/board.h> |
31 | #include <mach/gpio.h> | 31 | #include <mach/gpio.h> |
32 | #include <mach/at91sam9_smc.h> | 32 | #include <mach/at91_shdwc.h> |
33 | 33 | ||
34 | #include "sam9_smc.h" | ||
34 | #include "generic.h" | 35 | #include "generic.h" |
35 | 36 | ||
36 | 37 | ||
@@ -103,9 +104,34 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
103 | .rdy_pin = AT91_PIN_PD17, | 104 | .rdy_pin = AT91_PIN_PD17, |
104 | .enable_pin = AT91_PIN_PB6, | 105 | .enable_pin = AT91_PIN_PB6, |
105 | .partition_info = nand_partitions, | 106 | .partition_info = nand_partitions, |
106 | .bus_width_16 = 0, | ||
107 | }; | 107 | }; |
108 | 108 | ||
109 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
110 | .ncs_read_setup = 0, | ||
111 | .nrd_setup = 1, | ||
112 | .ncs_write_setup = 0, | ||
113 | .nwe_setup = 1, | ||
114 | |||
115 | .ncs_read_pulse = 3, | ||
116 | .nrd_pulse = 3, | ||
117 | .ncs_write_pulse = 3, | ||
118 | .nwe_pulse = 3, | ||
119 | |||
120 | .read_cycle = 5, | ||
121 | .write_cycle = 5, | ||
122 | |||
123 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
124 | .tdf_cycles = 2, | ||
125 | }; | ||
126 | |||
127 | static void __init ek_add_device_nand(void) | ||
128 | { | ||
129 | /* configure chip-select 3 (NAND) */ | ||
130 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
131 | |||
132 | at91_add_device_nand(&ek_nand_data); | ||
133 | } | ||
134 | |||
109 | 135 | ||
110 | /* | 136 | /* |
111 | * SPI devices | 137 | * SPI devices |
@@ -188,7 +214,7 @@ static void __init ek_board_init(void) | |||
188 | /* I2C */ | 214 | /* I2C */ |
189 | at91_add_device_i2c(NULL, 0); | 215 | at91_add_device_i2c(NULL, 0); |
190 | /* NAND */ | 216 | /* NAND */ |
191 | at91_add_device_nand(&ek_nand_data); | 217 | ek_add_device_nand(); |
192 | /* SPI */ | 218 | /* SPI */ |
193 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); | 219 | at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices)); |
194 | /* MMC */ | 220 | /* MMC */ |
diff --git a/arch/arm/mach-at91/board-usb-a9260.c b/arch/arm/mach-at91/board-usb-a9260.c index 7c350357333a..d13304c0bc45 100644 --- a/arch/arm/mach-at91/board-usb-a9260.c +++ b/arch/arm/mach-at91/board-usb-a9260.c | |||
@@ -41,8 +41,10 @@ | |||
41 | #include <mach/hardware.h> | 41 | #include <mach/hardware.h> |
42 | #include <mach/board.h> | 42 | #include <mach/board.h> |
43 | #include <mach/gpio.h> | 43 | #include <mach/gpio.h> |
44 | #include <mach/at91sam9_smc.h> | ||
44 | #include <mach/at91_shdwc.h> | 45 | #include <mach/at91_shdwc.h> |
45 | 46 | ||
47 | #include "sam9_smc.h" | ||
46 | #include "generic.h" | 48 | #include "generic.h" |
47 | 49 | ||
48 | 50 | ||
@@ -121,13 +123,34 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
121 | .rdy_pin = AT91_PIN_PC13, | 123 | .rdy_pin = AT91_PIN_PC13, |
122 | .enable_pin = AT91_PIN_PC14, | 124 | .enable_pin = AT91_PIN_PC14, |
123 | .partition_info = nand_partitions, | 125 | .partition_info = nand_partitions, |
124 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
125 | .bus_width_16 = 1, | ||
126 | #else | ||
127 | .bus_width_16 = 0, | ||
128 | #endif | ||
129 | }; | 126 | }; |
130 | 127 | ||
128 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
129 | .ncs_read_setup = 0, | ||
130 | .nrd_setup = 1, | ||
131 | .ncs_write_setup = 0, | ||
132 | .nwe_setup = 1, | ||
133 | |||
134 | .ncs_read_pulse = 3, | ||
135 | .nrd_pulse = 3, | ||
136 | .ncs_write_pulse = 3, | ||
137 | .nwe_pulse = 3, | ||
138 | |||
139 | .read_cycle = 5, | ||
140 | .write_cycle = 5, | ||
141 | |||
142 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
143 | .tdf_cycles = 2, | ||
144 | }; | ||
145 | |||
146 | static void __init ek_add_device_nand(void) | ||
147 | { | ||
148 | /* configure chip-select 3 (NAND) */ | ||
149 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
150 | |||
151 | at91_add_device_nand(&ek_nand_data); | ||
152 | } | ||
153 | |||
131 | /* | 154 | /* |
132 | * GPIO Buttons | 155 | * GPIO Buttons |
133 | */ | 156 | */ |
@@ -189,7 +212,7 @@ static void __init ek_board_init(void) | |||
189 | /* USB Device */ | 212 | /* USB Device */ |
190 | at91_add_device_udc(&ek_udc_data); | 213 | at91_add_device_udc(&ek_udc_data); |
191 | /* NAND */ | 214 | /* NAND */ |
192 | at91_add_device_nand(&ek_nand_data); | 215 | ek_add_device_nand(); |
193 | /* I2C */ | 216 | /* I2C */ |
194 | at91_add_device_i2c(NULL, 0); | 217 | at91_add_device_i2c(NULL, 0); |
195 | /* Ethernet */ | 218 | /* Ethernet */ |
diff --git a/arch/arm/mach-at91/board-usb-a9263.c b/arch/arm/mach-at91/board-usb-a9263.c index 391b566c4571..d96405b7d578 100644 --- a/arch/arm/mach-at91/board-usb-a9263.c +++ b/arch/arm/mach-at91/board-usb-a9263.c | |||
@@ -40,8 +40,10 @@ | |||
40 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
41 | #include <mach/board.h> | 41 | #include <mach/board.h> |
42 | #include <mach/gpio.h> | 42 | #include <mach/gpio.h> |
43 | #include <mach/at91sam9_smc.h> | ||
43 | #include <mach/at91_shdwc.h> | 44 | #include <mach/at91_shdwc.h> |
44 | 45 | ||
46 | #include "sam9_smc.h" | ||
45 | #include "generic.h" | 47 | #include "generic.h" |
46 | 48 | ||
47 | 49 | ||
@@ -134,13 +136,35 @@ static struct atmel_nand_data __initdata ek_nand_data = { | |||
134 | .rdy_pin = AT91_PIN_PA22, | 136 | .rdy_pin = AT91_PIN_PA22, |
135 | .enable_pin = AT91_PIN_PD15, | 137 | .enable_pin = AT91_PIN_PD15, |
136 | .partition_info = nand_partitions, | 138 | .partition_info = nand_partitions, |
137 | #if defined(CONFIG_MTD_NAND_ATMEL_BUSWIDTH_16) | ||
138 | .bus_width_16 = 1, | ||
139 | #else | ||
140 | .bus_width_16 = 0, | ||
141 | #endif | ||
142 | }; | 139 | }; |
143 | 140 | ||
141 | static struct sam9_smc_config __initdata ek_nand_smc_config = { | ||
142 | .ncs_read_setup = 0, | ||
143 | .nrd_setup = 1, | ||
144 | .ncs_write_setup = 0, | ||
145 | .nwe_setup = 1, | ||
146 | |||
147 | .ncs_read_pulse = 3, | ||
148 | .nrd_pulse = 3, | ||
149 | .ncs_write_pulse = 3, | ||
150 | .nwe_pulse = 3, | ||
151 | |||
152 | .read_cycle = 5, | ||
153 | .write_cycle = 5, | ||
154 | |||
155 | .mode = AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE | AT91_SMC_DBW_8, | ||
156 | .tdf_cycles = 2, | ||
157 | }; | ||
158 | |||
159 | static void __init ek_add_device_nand(void) | ||
160 | { | ||
161 | /* configure chip-select 3 (NAND) */ | ||
162 | sam9_smc_configure(3, &ek_nand_smc_config); | ||
163 | |||
164 | at91_add_device_nand(&ek_nand_data); | ||
165 | } | ||
166 | |||
167 | |||
144 | /* | 168 | /* |
145 | * GPIO Buttons | 169 | * GPIO Buttons |
146 | */ | 170 | */ |
@@ -206,7 +230,7 @@ static void __init ek_board_init(void) | |||
206 | /* Ethernet */ | 230 | /* Ethernet */ |
207 | at91_add_device_eth(&ek_macb_data); | 231 | at91_add_device_eth(&ek_macb_data); |
208 | /* NAND */ | 232 | /* NAND */ |
209 | at91_add_device_nand(&ek_nand_data); | 233 | ek_add_device_nand(); |
210 | /* I2C */ | 234 | /* I2C */ |
211 | at91_add_device_i2c(NULL, 0); | 235 | at91_add_device_i2c(NULL, 0); |
212 | /* Push Buttons */ | 236 | /* Push Buttons */ |
diff --git a/arch/arm/mach-at91/include/mach/at91_pmc.h b/arch/arm/mach-at91/include/mach/at91_pmc.h index 2e3f2894b704..9561e33b8a9a 100644 --- a/arch/arm/mach-at91/include/mach/at91_pmc.h +++ b/arch/arm/mach-at91/include/mach/at91_pmc.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define AT91_PMC_PCK (1 << 0) /* Processor Clock */ | 23 | #define AT91_PMC_PCK (1 << 0) /* Processor Clock */ |
24 | #define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */ | 24 | #define AT91RM9200_PMC_UDP (1 << 1) /* USB Devcice Port Clock [AT91RM9200 only] */ |
25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ | 25 | #define AT91RM9200_PMC_MCKUDP (1 << 2) /* USB Device Port Master Clock Automatic Disable on Suspend [AT91RM9200 only] */ |
26 | #define AT91CAP9_PMC_DDR (1 << 2) /* DDR Clock [AT91CAP9 revC only] */ | ||
26 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ | 27 | #define AT91RM9200_PMC_UHP (1 << 4) /* USB Host Port Clock [AT91RM9200 only] */ |
27 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ | 28 | #define AT91SAM926x_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91SAM926x only] */ |
28 | #define AT91CAP9_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91CAP9 only] */ | 29 | #define AT91CAP9_PMC_UHP (1 << 6) /* USB Host Port Clock [AT91CAP9 only] */ |
@@ -102,10 +103,16 @@ | |||
102 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ | 103 | #define AT91_PMC_LOCKB (1 << 2) /* PLLB Lock */ |
103 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ | 104 | #define AT91_PMC_MCKRDY (1 << 3) /* Master Clock */ |
104 | #define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [AT91CAP9 only] */ | 105 | #define AT91_PMC_LOCKU (1 << 6) /* UPLL Lock [AT91CAP9 only] */ |
106 | #define AT91_PMC_OSCSEL (1 << 7) /* Slow Clock Oscillator [AT91CAP9 revC only] */ | ||
105 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ | 107 | #define AT91_PMC_PCK0RDY (1 << 8) /* Programmable Clock 0 */ |
106 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ | 108 | #define AT91_PMC_PCK1RDY (1 << 9) /* Programmable Clock 1 */ |
107 | #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ | 109 | #define AT91_PMC_PCK2RDY (1 << 10) /* Programmable Clock 2 */ |
108 | #define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */ | 110 | #define AT91_PMC_PCK3RDY (1 << 11) /* Programmable Clock 3 */ |
109 | #define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */ | 111 | #define AT91_PMC_IMR (AT91_PMC + 0x6c) /* Interrupt Mask Register */ |
110 | 112 | ||
113 | #define AT91_PMC_PROT (AT91_PMC + 0xe4) /* Protect Register [AT91CAP9 revC only] */ | ||
114 | #define AT91_PMC_PROTKEY 0x504d4301 /* Activation Code */ | ||
115 | |||
116 | #define AT91_PMC_VER (AT91_PMC + 0xfc) /* PMC Module Version [AT91CAP9 only] */ | ||
117 | |||
111 | #endif | 118 | #endif |
diff --git a/arch/arm/mach-at91/include/mach/at91cap9.h b/arch/arm/mach-at91/include/mach/at91cap9.h index 4a4b64135a92..d8c1ededaa75 100644 --- a/arch/arm/mach-at91/include/mach/at91cap9.h +++ b/arch/arm/mach-at91/include/mach/at91cap9.h | |||
@@ -101,7 +101,9 @@ | |||
101 | #define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) | 101 | #define AT91_RTT (0xfffffd20 - AT91_BASE_SYS) |
102 | #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) | 102 | #define AT91_PIT (0xfffffd30 - AT91_BASE_SYS) |
103 | #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) | 103 | #define AT91_WDT (0xfffffd40 - AT91_BASE_SYS) |
104 | #define AT91_GPBR (0xfffffd50 - AT91_BASE_SYS) | 104 | #define AT91_GPBR (cpu_is_at91cap9_revB() ? \ |
105 | (0xfffffd50 - AT91_BASE_SYS) : \ | ||
106 | (0xfffffd60 - AT91_BASE_SYS)) | ||
105 | 107 | ||
106 | #define AT91_USART0 AT91CAP9_BASE_US0 | 108 | #define AT91_USART0 AT91CAP9_BASE_US0 |
107 | #define AT91_USART1 AT91CAP9_BASE_US1 | 109 | #define AT91_USART1 AT91CAP9_BASE_US1 |
diff --git a/arch/arm/mach-at91/include/mach/cpu.h b/arch/arm/mach-at91/include/mach/cpu.h index dbfd9f73f80b..c554c3e4d553 100644 --- a/arch/arm/mach-at91/include/mach/cpu.h +++ b/arch/arm/mach-at91/include/mach/cpu.h | |||
@@ -49,6 +49,17 @@ static inline unsigned long at91_arch_identify(void) | |||
49 | return (at91_sys_read(AT91_DBGU_CIDR) & AT91_CIDR_ARCH); | 49 | return (at91_sys_read(AT91_DBGU_CIDR) & AT91_CIDR_ARCH); |
50 | } | 50 | } |
51 | 51 | ||
52 | #ifdef CONFIG_ARCH_AT91CAP9 | ||
53 | #include <mach/at91_pmc.h> | ||
54 | |||
55 | #define ARCH_REVISION_CAP9_B 0x399 | ||
56 | #define ARCH_REVISION_CAP9_C 0x601 | ||
57 | |||
58 | static inline unsigned long at91cap9_rev_identify(void) | ||
59 | { | ||
60 | return (at91_sys_read(AT91_PMC_VER)); | ||
61 | } | ||
62 | #endif | ||
52 | 63 | ||
53 | #ifdef CONFIG_ARCH_AT91RM9200 | 64 | #ifdef CONFIG_ARCH_AT91RM9200 |
54 | #define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200) | 65 | #define cpu_is_at91rm9200() (at91_cpu_identify() == ARCH_ID_AT91RM9200) |
@@ -90,8 +101,12 @@ static inline unsigned long at91_arch_identify(void) | |||
90 | 101 | ||
91 | #ifdef CONFIG_ARCH_AT91CAP9 | 102 | #ifdef CONFIG_ARCH_AT91CAP9 |
92 | #define cpu_is_at91cap9() (at91_cpu_identify() == ARCH_ID_AT91CAP9) | 103 | #define cpu_is_at91cap9() (at91_cpu_identify() == ARCH_ID_AT91CAP9) |
104 | #define cpu_is_at91cap9_revB() (at91cap9_rev_identify() == ARCH_REVISION_CAP9_B) | ||
105 | #define cpu_is_at91cap9_revC() (at91cap9_rev_identify() == ARCH_REVISION_CAP9_C) | ||
93 | #else | 106 | #else |
94 | #define cpu_is_at91cap9() (0) | 107 | #define cpu_is_at91cap9() (0) |
108 | #define cpu_is_at91cap9_revB() (0) | ||
109 | #define cpu_is_at91cap9_revC() (0) | ||
95 | #endif | 110 | #endif |
96 | 111 | ||
97 | /* | 112 | /* |
diff --git a/arch/arm/mach-at91/include/mach/dma.h b/arch/arm/mach-at91/include/mach/dma.h deleted file mode 100644 index e4f90c177616..000000000000 --- a/arch/arm/mach-at91/include/mach/dma.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-at91/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2003 SAN People | ||
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h index 1611bd03f528..0b0cccc46e68 100644 --- a/arch/arm/mach-at91/include/mach/io.h +++ b/arch/arm/mach-at91/include/mach/io.h | |||
@@ -23,8 +23,8 @@ | |||
23 | 23 | ||
24 | #define IO_SPACE_LIMIT 0xFFFFFFFF | 24 | #define IO_SPACE_LIMIT 0xFFFFFFFF |
25 | 25 | ||
26 | #define __io(a) ((void __iomem *)(a)) | 26 | #define __io(a) __typesafe_io(a) |
27 | #define __mem_pci(a) (a) | 27 | #define __mem_pci(a) (a) |
28 | 28 | ||
29 | 29 | ||
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
diff --git a/arch/arm/mach-at91/include/mach/memory.h b/arch/arm/mach-at91/include/mach/memory.h index 9dd1b8c79b08..14f4ef4b6a9e 100644 --- a/arch/arm/mach-at91/include/mach/memory.h +++ b/arch/arm/mach-at91/include/mach/memory.h | |||
@@ -25,15 +25,4 @@ | |||
25 | 25 | ||
26 | #define PHYS_OFFSET (AT91_SDRAM_BASE) | 26 | #define PHYS_OFFSET (AT91_SDRAM_BASE) |
27 | 27 | ||
28 | |||
29 | /* | ||
30 | * Virtual view <-> DMA view memory address translations | ||
31 | * virt_to_bus: Used to translate the virtual address to an | ||
32 | * address suitable to be passed to set_dma_addr | ||
33 | * bus_to_virt: Used to convert an address for DMA operations | ||
34 | * to an address that the kernel can use. | ||
35 | */ | ||
36 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
37 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
38 | |||
39 | #endif | 28 | #endif |
diff --git a/arch/arm/mach-at91/sam9_smc.c b/arch/arm/mach-at91/sam9_smc.c new file mode 100644 index 000000000000..5eab6aa621d0 --- /dev/null +++ b/arch/arm/mach-at91/sam9_smc.c | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91/sam9_smc.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Andrew Victor | ||
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 | #include <linux/module.h> | ||
12 | #include <linux/io.h> | ||
13 | |||
14 | #include <mach/at91sam9_smc.h> | ||
15 | |||
16 | #include "sam9_smc.h" | ||
17 | |||
18 | void __init sam9_smc_configure(int cs, struct sam9_smc_config* config) | ||
19 | { | ||
20 | /* Setup register */ | ||
21 | at91_sys_write(AT91_SMC_SETUP(cs), | ||
22 | AT91_SMC_NWESETUP_(config->nwe_setup) | ||
23 | | AT91_SMC_NCS_WRSETUP_(config->ncs_write_setup) | ||
24 | | AT91_SMC_NRDSETUP_(config->nrd_setup) | ||
25 | | AT91_SMC_NCS_RDSETUP_(config->ncs_read_setup) | ||
26 | ); | ||
27 | |||
28 | /* Pulse register */ | ||
29 | at91_sys_write(AT91_SMC_PULSE(cs), | ||
30 | AT91_SMC_NWEPULSE_(config->nwe_pulse) | ||
31 | | AT91_SMC_NCS_WRPULSE_(config->ncs_write_pulse) | ||
32 | | AT91_SMC_NRDPULSE_(config->nrd_pulse) | ||
33 | | AT91_SMC_NCS_RDPULSE_(config->ncs_read_pulse) | ||
34 | ); | ||
35 | |||
36 | /* Cycle register */ | ||
37 | at91_sys_write(AT91_SMC_CYCLE(cs), | ||
38 | AT91_SMC_NWECYCLE_(config->write_cycle) | ||
39 | | AT91_SMC_NRDCYCLE_(config->read_cycle) | ||
40 | ); | ||
41 | |||
42 | /* Mode register */ | ||
43 | at91_sys_write(AT91_SMC_MODE(cs), | ||
44 | config->mode | ||
45 | | AT91_SMC_TDF_(config->tdf_cycles) | ||
46 | ); | ||
47 | } | ||
diff --git a/arch/arm/mach-at91/sam9_smc.h b/arch/arm/mach-at91/sam9_smc.h new file mode 100644 index 000000000000..bf72cfb3455b --- /dev/null +++ b/arch/arm/mach-at91/sam9_smc.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-at91/sam9_smc. | ||
3 | * | ||
4 | * Copyright (C) 2008 Andrew Victor | ||
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 | struct sam9_smc_config { | ||
12 | /* Setup register */ | ||
13 | u8 ncs_read_setup; | ||
14 | u8 nrd_setup; | ||
15 | u8 ncs_write_setup; | ||
16 | u8 nwe_setup; | ||
17 | |||
18 | /* Pulse register */ | ||
19 | u8 ncs_read_pulse; | ||
20 | u8 nrd_pulse; | ||
21 | u8 ncs_write_pulse; | ||
22 | u8 nwe_pulse; | ||
23 | |||
24 | /* Cycle register */ | ||
25 | u16 read_cycle; | ||
26 | u16 write_cycle; | ||
27 | |||
28 | /* Mode register */ | ||
29 | u32 mode; | ||
30 | u8 tdf_cycles:4; | ||
31 | }; | ||
32 | |||
33 | extern void __init sam9_smc_configure(int cs, struct sam9_smc_config* config); | ||
diff --git a/arch/arm/mach-clps711x/include/mach/dma.h b/arch/arm/mach-clps711x/include/mach/dma.h deleted file mode 100644 index 0d620e869536..000000000000 --- a/arch/arm/mach-clps711x/include/mach/dma.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps711x/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 1997,1998 Russell King | ||
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
diff --git a/arch/arm/mach-clps711x/include/mach/io.h b/arch/arm/mach-clps711x/include/mach/io.h index 4c8440087679..2e0b3ced8f07 100644 --- a/arch/arm/mach-clps711x/include/mach/io.h +++ b/arch/arm/mach-clps711x/include/mach/io.h | |||
@@ -20,12 +20,10 @@ | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | 20 | #ifndef __ASM_ARM_ARCH_IO_H |
21 | #define __ASM_ARM_ARCH_IO_H | 21 | #define __ASM_ARM_ARCH_IO_H |
22 | 22 | ||
23 | #include <mach/hardware.h> | ||
24 | |||
25 | #define IO_SPACE_LIMIT 0xffffffff | 23 | #define IO_SPACE_LIMIT 0xffffffff |
26 | 24 | ||
27 | #define __io(a) ((void __iomem *)(a)) | 25 | #define __io(a) __typesafe_io(a) |
28 | #define __mem_pci(a) (a) | 26 | #define __mem_pci(a) (a) |
29 | 27 | ||
30 | /* | 28 | /* |
31 | * We don't support ins[lb]/outs[lb]. Make them fault. | 29 | * We don't support ins[lb]/outs[lb]. Make them fault. |
diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h index 98ec30c97bbe..e522b20bcbc2 100644 --- a/arch/arm/mach-clps711x/include/mach/memory.h +++ b/arch/arm/mach-clps711x/include/mach/memory.h | |||
@@ -26,25 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | #define PHYS_OFFSET UL(0xc0000000) | 27 | #define PHYS_OFFSET UL(0xc0000000) |
28 | 28 | ||
29 | /* | 29 | #if !defined(CONFIG_ARCH_CDB89712) && !defined (CONFIG_ARCH_AUTCPU12) |
30 | * Virtual view <-> DMA view memory address translations | ||
31 | * virt_to_bus: Used to translate the virtual address to an | ||
32 | * address suitable to be passed to set_dma_addr | ||
33 | * bus_to_virt: Used to convert an address for DMA operations | ||
34 | * to an address that the kernel can use. | ||
35 | */ | ||
36 | |||
37 | #if defined(CONFIG_ARCH_CDB89712) | ||
38 | |||
39 | #define __virt_to_bus(x) (x) | ||
40 | #define __bus_to_virt(x) (x) | ||
41 | |||
42 | #elif defined (CONFIG_ARCH_AUTCPU12) | ||
43 | |||
44 | #define __virt_to_bus(x) (x) | ||
45 | #define __bus_to_virt(x) (x) | ||
46 | |||
47 | #else | ||
48 | 30 | ||
49 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET) | 31 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET) |
50 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET) | 32 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET) |
diff --git a/arch/arm/mach-clps7500/Makefile b/arch/arm/mach-clps7500/Makefile deleted file mode 100644 index 4bd8ebd70e7b..000000000000 --- a/arch/arm/mach-clps7500/Makefile +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y := core.o | ||
8 | obj-m := | ||
9 | obj-n := | ||
10 | obj- := | ||
11 | |||
diff --git a/arch/arm/mach-clps7500/Makefile.boot b/arch/arm/mach-clps7500/Makefile.boot deleted file mode 100644 index fe16506c1540..000000000000 --- a/arch/arm/mach-clps7500/Makefile.boot +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | zreladdr-y := 0x10008000 | ||
2 | |||
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c deleted file mode 100644 index 7e247c04d41c..000000000000 --- a/arch/arm/mach-clps7500/core.c +++ /dev/null | |||
@@ -1,395 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-clps7500/core.c | ||
3 | * | ||
4 | * Copyright (C) 1998 Russell King | ||
5 | * Copyright (C) 1999 Nexus Electronics Ltd | ||
6 | * | ||
7 | * Extra MM routines for CL7500 architecture | ||
8 | */ | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/types.h> | ||
11 | #include <linux/interrupt.h> | ||
12 | #include <linux/irq.h> | ||
13 | #include <linux/list.h> | ||
14 | #include <linux/sched.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/serial_8250.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include <asm/mach/arch.h> | ||
21 | #include <asm/mach/map.h> | ||
22 | #include <asm/mach/irq.h> | ||
23 | #include <asm/mach/time.h> | ||
24 | |||
25 | #include <mach/hardware.h> | ||
26 | #include <asm/hardware/iomd.h> | ||
27 | #include <asm/irq.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | |||
30 | unsigned int vram_size; | ||
31 | |||
32 | static void cl7500_ack_irq_a(unsigned int irq) | ||
33 | { | ||
34 | unsigned int val, mask; | ||
35 | |||
36 | mask = 1 << irq; | ||
37 | val = iomd_readb(IOMD_IRQMASKA); | ||
38 | iomd_writeb(val & ~mask, IOMD_IRQMASKA); | ||
39 | iomd_writeb(mask, IOMD_IRQCLRA); | ||
40 | } | ||
41 | |||
42 | static void cl7500_mask_irq_a(unsigned int irq) | ||
43 | { | ||
44 | unsigned int val, mask; | ||
45 | |||
46 | mask = 1 << irq; | ||
47 | val = iomd_readb(IOMD_IRQMASKA); | ||
48 | iomd_writeb(val & ~mask, IOMD_IRQMASKA); | ||
49 | } | ||
50 | |||
51 | static void cl7500_unmask_irq_a(unsigned int irq) | ||
52 | { | ||
53 | unsigned int val, mask; | ||
54 | |||
55 | mask = 1 << irq; | ||
56 | val = iomd_readb(IOMD_IRQMASKA); | ||
57 | iomd_writeb(val | mask, IOMD_IRQMASKA); | ||
58 | } | ||
59 | |||
60 | static struct irq_chip clps7500_a_chip = { | ||
61 | .ack = cl7500_ack_irq_a, | ||
62 | .mask = cl7500_mask_irq_a, | ||
63 | .unmask = cl7500_unmask_irq_a, | ||
64 | }; | ||
65 | |||
66 | static void cl7500_mask_irq_b(unsigned int irq) | ||
67 | { | ||
68 | unsigned int val, mask; | ||
69 | |||
70 | mask = 1 << (irq & 7); | ||
71 | val = iomd_readb(IOMD_IRQMASKB); | ||
72 | iomd_writeb(val & ~mask, IOMD_IRQMASKB); | ||
73 | } | ||
74 | |||
75 | static void cl7500_unmask_irq_b(unsigned int irq) | ||
76 | { | ||
77 | unsigned int val, mask; | ||
78 | |||
79 | mask = 1 << (irq & 7); | ||
80 | val = iomd_readb(IOMD_IRQMASKB); | ||
81 | iomd_writeb(val | mask, IOMD_IRQMASKB); | ||
82 | } | ||
83 | |||
84 | static struct irq_chip clps7500_b_chip = { | ||
85 | .ack = cl7500_mask_irq_b, | ||
86 | .mask = cl7500_mask_irq_b, | ||
87 | .unmask = cl7500_unmask_irq_b, | ||
88 | }; | ||
89 | |||
90 | static void cl7500_mask_irq_c(unsigned int irq) | ||
91 | { | ||
92 | unsigned int val, mask; | ||
93 | |||
94 | mask = 1 << (irq & 7); | ||
95 | val = iomd_readb(IOMD_IRQMASKC); | ||
96 | iomd_writeb(val & ~mask, IOMD_IRQMASKC); | ||
97 | } | ||
98 | |||
99 | static void cl7500_unmask_irq_c(unsigned int irq) | ||
100 | { | ||
101 | unsigned int val, mask; | ||
102 | |||
103 | mask = 1 << (irq & 7); | ||
104 | val = iomd_readb(IOMD_IRQMASKC); | ||
105 | iomd_writeb(val | mask, IOMD_IRQMASKC); | ||
106 | } | ||
107 | |||
108 | static struct irq_chip clps7500_c_chip = { | ||
109 | .ack = cl7500_mask_irq_c, | ||
110 | .mask = cl7500_mask_irq_c, | ||
111 | .unmask = cl7500_unmask_irq_c, | ||
112 | }; | ||
113 | |||
114 | static void cl7500_mask_irq_d(unsigned int irq) | ||
115 | { | ||
116 | unsigned int val, mask; | ||
117 | |||
118 | mask = 1 << (irq & 7); | ||
119 | val = iomd_readb(IOMD_IRQMASKD); | ||
120 | iomd_writeb(val & ~mask, IOMD_IRQMASKD); | ||
121 | } | ||
122 | |||
123 | static void cl7500_unmask_irq_d(unsigned int irq) | ||
124 | { | ||
125 | unsigned int val, mask; | ||
126 | |||
127 | mask = 1 << (irq & 7); | ||
128 | val = iomd_readb(IOMD_IRQMASKD); | ||
129 | iomd_writeb(val | mask, IOMD_IRQMASKD); | ||
130 | } | ||
131 | |||
132 | static struct irq_chip clps7500_d_chip = { | ||
133 | .ack = cl7500_mask_irq_d, | ||
134 | .mask = cl7500_mask_irq_d, | ||
135 | .unmask = cl7500_unmask_irq_d, | ||
136 | }; | ||
137 | |||
138 | static void cl7500_mask_irq_dma(unsigned int irq) | ||
139 | { | ||
140 | unsigned int val, mask; | ||
141 | |||
142 | mask = 1 << (irq & 7); | ||
143 | val = iomd_readb(IOMD_DMAMASK); | ||
144 | iomd_writeb(val & ~mask, IOMD_DMAMASK); | ||
145 | } | ||
146 | |||
147 | static void cl7500_unmask_irq_dma(unsigned int irq) | ||
148 | { | ||
149 | unsigned int val, mask; | ||
150 | |||
151 | mask = 1 << (irq & 7); | ||
152 | val = iomd_readb(IOMD_DMAMASK); | ||
153 | iomd_writeb(val | mask, IOMD_DMAMASK); | ||
154 | } | ||
155 | |||
156 | static struct irq_chip clps7500_dma_chip = { | ||
157 | .ack = cl7500_mask_irq_dma, | ||
158 | .mask = cl7500_mask_irq_dma, | ||
159 | .unmask = cl7500_unmask_irq_dma, | ||
160 | }; | ||
161 | |||
162 | static void cl7500_mask_irq_fiq(unsigned int irq) | ||
163 | { | ||
164 | unsigned int val, mask; | ||
165 | |||
166 | mask = 1 << (irq & 7); | ||
167 | val = iomd_readb(IOMD_FIQMASK); | ||
168 | iomd_writeb(val & ~mask, IOMD_FIQMASK); | ||
169 | } | ||
170 | |||
171 | static void cl7500_unmask_irq_fiq(unsigned int irq) | ||
172 | { | ||
173 | unsigned int val, mask; | ||
174 | |||
175 | mask = 1 << (irq & 7); | ||
176 | val = iomd_readb(IOMD_FIQMASK); | ||
177 | iomd_writeb(val | mask, IOMD_FIQMASK); | ||
178 | } | ||
179 | |||
180 | static struct irq_chip clps7500_fiq_chip = { | ||
181 | .ack = cl7500_mask_irq_fiq, | ||
182 | .mask = cl7500_mask_irq_fiq, | ||
183 | .unmask = cl7500_unmask_irq_fiq, | ||
184 | }; | ||
185 | |||
186 | static void cl7500_no_action(unsigned int irq) | ||
187 | { | ||
188 | } | ||
189 | |||
190 | static struct irq_chip clps7500_no_chip = { | ||
191 | .ack = cl7500_no_action, | ||
192 | .mask = cl7500_no_action, | ||
193 | .unmask = cl7500_no_action, | ||
194 | }; | ||
195 | |||
196 | static struct irqaction irq_isa = { | ||
197 | .handler = no_action, | ||
198 | .mask = CPU_MASK_NONE, | ||
199 | .name = "isa", | ||
200 | }; | ||
201 | |||
202 | static void __init clps7500_init_irq(void) | ||
203 | { | ||
204 | unsigned int irq, flags; | ||
205 | |||
206 | iomd_writeb(0, IOMD_IRQMASKA); | ||
207 | iomd_writeb(0, IOMD_IRQMASKB); | ||
208 | iomd_writeb(0, IOMD_FIQMASK); | ||
209 | iomd_writeb(0, IOMD_DMAMASK); | ||
210 | |||
211 | for (irq = 0; irq < NR_IRQS; irq++) { | ||
212 | flags = IRQF_VALID; | ||
213 | |||
214 | if (irq <= 6 || (irq >= 9 && irq <= 15) || | ||
215 | (irq >= 48 && irq <= 55)) | ||
216 | flags |= IRQF_PROBE; | ||
217 | |||
218 | switch (irq) { | ||
219 | case 0 ... 7: | ||
220 | set_irq_chip(irq, &clps7500_a_chip); | ||
221 | set_irq_handler(irq, handle_level_irq); | ||
222 | set_irq_flags(irq, flags); | ||
223 | break; | ||
224 | |||
225 | case 8 ... 15: | ||
226 | set_irq_chip(irq, &clps7500_b_chip); | ||
227 | set_irq_handler(irq, handle_level_irq); | ||
228 | set_irq_flags(irq, flags); | ||
229 | break; | ||
230 | |||
231 | case 16 ... 22: | ||
232 | set_irq_chip(irq, &clps7500_dma_chip); | ||
233 | set_irq_handler(irq, handle_level_irq); | ||
234 | set_irq_flags(irq, flags); | ||
235 | break; | ||
236 | |||
237 | case 24 ... 31: | ||
238 | set_irq_chip(irq, &clps7500_c_chip); | ||
239 | set_irq_handler(irq, handle_level_irq); | ||
240 | set_irq_flags(irq, flags); | ||
241 | break; | ||
242 | |||
243 | case 40 ... 47: | ||
244 | set_irq_chip(irq, &clps7500_d_chip); | ||
245 | set_irq_handler(irq, handle_level_irq); | ||
246 | set_irq_flags(irq, flags); | ||
247 | break; | ||
248 | |||
249 | case 48 ... 55: | ||
250 | set_irq_chip(irq, &clps7500_no_chip); | ||
251 | set_irq_handler(irq, handle_level_irq); | ||
252 | set_irq_flags(irq, flags); | ||
253 | break; | ||
254 | |||
255 | case 64 ... 72: | ||
256 | set_irq_chip(irq, &clps7500_fiq_chip); | ||
257 | set_irq_handler(irq, handle_level_irq); | ||
258 | set_irq_flags(irq, flags); | ||
259 | break; | ||
260 | } | ||
261 | } | ||
262 | |||
263 | setup_irq(IRQ_ISA, &irq_isa); | ||
264 | } | ||
265 | |||
266 | static struct map_desc cl7500_io_desc[] __initdata = { | ||
267 | { /* IO space */ | ||
268 | .virtual = (unsigned long)IO_BASE, | ||
269 | .pfn = __phys_to_pfn(IO_START), | ||
270 | .length = IO_SIZE, | ||
271 | .type = MT_DEVICE | ||
272 | }, { /* ISA space */ | ||
273 | .virtual = ISA_BASE, | ||
274 | .pfn = __phys_to_pfn(ISA_START), | ||
275 | .length = ISA_SIZE, | ||
276 | .type = MT_DEVICE | ||
277 | }, { /* Flash */ | ||
278 | .virtual = CLPS7500_FLASH_BASE, | ||
279 | .pfn = __phys_to_pfn(CLPS7500_FLASH_START), | ||
280 | .length = CLPS7500_FLASH_SIZE, | ||
281 | .type = MT_DEVICE | ||
282 | }, { /* LED */ | ||
283 | .virtual = LED_BASE, | ||
284 | .pfn = __phys_to_pfn(LED_START), | ||
285 | .length = LED_SIZE, | ||
286 | .type = MT_DEVICE | ||
287 | } | ||
288 | }; | ||
289 | |||
290 | static void __init clps7500_map_io(void) | ||
291 | { | ||
292 | iotable_init(cl7500_io_desc, ARRAY_SIZE(cl7500_io_desc)); | ||
293 | } | ||
294 | |||
295 | extern void ioctime_init(void); | ||
296 | extern unsigned long ioc_timer_gettimeoffset(void); | ||
297 | |||
298 | static irqreturn_t | ||
299 | clps7500_timer_interrupt(int irq, void *dev_id) | ||
300 | { | ||
301 | timer_tick(); | ||
302 | |||
303 | /* Why not using do_leds interface?? */ | ||
304 | { | ||
305 | /* Twinkle the lights. */ | ||
306 | static int count, state = 0xff00; | ||
307 | if (count-- == 0) { | ||
308 | state ^= 0x100; | ||
309 | count = 25; | ||
310 | *((volatile unsigned int *)LED_ADDRESS) = state; | ||
311 | } | ||
312 | } | ||
313 | |||
314 | return IRQ_HANDLED; | ||
315 | } | ||
316 | |||
317 | static struct irqaction clps7500_timer_irq = { | ||
318 | .name = "CLPS7500 Timer Tick", | ||
319 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
320 | .handler = clps7500_timer_interrupt, | ||
321 | }; | ||
322 | |||
323 | /* | ||
324 | * Set up timer interrupt. | ||
325 | */ | ||
326 | static void __init clps7500_timer_init(void) | ||
327 | { | ||
328 | ioctime_init(); | ||
329 | setup_irq(IRQ_TIMER, &clps7500_timer_irq); | ||
330 | } | ||
331 | |||
332 | static struct sys_timer clps7500_timer = { | ||
333 | .init = clps7500_timer_init, | ||
334 | .offset = ioc_timer_gettimeoffset, | ||
335 | }; | ||
336 | |||
337 | static struct plat_serial8250_port serial_platform_data[] = { | ||
338 | { | ||
339 | .mapbase = 0x03010fe0, | ||
340 | .irq = 10, | ||
341 | .uartclk = 1843200, | ||
342 | .regshift = 2, | ||
343 | .iotype = UPIO_MEM, | ||
344 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SKIP_TEST, | ||
345 | }, | ||
346 | { | ||
347 | .mapbase = 0x03010be0, | ||
348 | .irq = 0, | ||
349 | .uartclk = 1843200, | ||
350 | .regshift = 2, | ||
351 | .iotype = UPIO_MEM, | ||
352 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP | UPF_SKIP_TEST, | ||
353 | }, | ||
354 | { | ||
355 | .iobase = ISASLOT_IO + 0x2e8, | ||
356 | .irq = 41, | ||
357 | .uartclk = 1843200, | ||
358 | .regshift = 0, | ||
359 | .iotype = UPIO_PORT, | ||
360 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
361 | }, | ||
362 | { | ||
363 | .iobase = ISASLOT_IO + 0x3e8, | ||
364 | .irq = 40, | ||
365 | .uartclk = 1843200, | ||
366 | .regshift = 0, | ||
367 | .iotype = UPIO_PORT, | ||
368 | .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST, | ||
369 | }, | ||
370 | { }, | ||
371 | }; | ||
372 | |||
373 | static struct platform_device serial_device = { | ||
374 | .name = "serial8250", | ||
375 | .id = PLAT8250_DEV_PLATFORM, | ||
376 | .dev = { | ||
377 | .platform_data = serial_platform_data, | ||
378 | }, | ||
379 | }; | ||
380 | |||
381 | static void __init clps7500_init(void) | ||
382 | { | ||
383 | platform_device_register(&serial_device); | ||
384 | } | ||
385 | |||
386 | MACHINE_START(CLPS7500, "CL-PS7500") | ||
387 | /* Maintainer: Philip Blundell */ | ||
388 | .phys_io = 0x03000000, | ||
389 | .io_pg_offst = ((0xe0000000) >> 18) & 0xfffc, | ||
390 | .map_io = clps7500_map_io, | ||
391 | .init_irq = clps7500_init_irq, | ||
392 | .init_machine = clps7500_init, | ||
393 | .timer = &clps7500_timer, | ||
394 | MACHINE_END | ||
395 | |||
diff --git a/arch/arm/mach-clps7500/include/mach/acornfb.h b/arch/arm/mach-clps7500/include/mach/acornfb.h deleted file mode 100644 index aea6330c9745..000000000000 --- a/arch/arm/mach-clps7500/include/mach/acornfb.h +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | #define acornfb_valid_pixrate(var) (var->pixclock >= 39325 && var->pixclock <= 40119) | ||
2 | |||
3 | static inline void | ||
4 | acornfb_vidc20_find_rates(struct vidc_timing *vidc, | ||
5 | struct fb_var_screeninfo *var) | ||
6 | { | ||
7 | u_int bandwidth; | ||
8 | |||
9 | vidc->control |= VIDC20_CTRL_PIX_CK; | ||
10 | |||
11 | /* Calculate bandwidth */ | ||
12 | bandwidth = var->pixclock * 8 / var->bits_per_pixel; | ||
13 | |||
14 | /* Encode bandwidth as VIDC20 setting */ | ||
15 | if (bandwidth > 16667*2) | ||
16 | vidc->control |= VIDC20_CTRL_FIFO_16; | ||
17 | else if (bandwidth > 13333*2) | ||
18 | vidc->control |= VIDC20_CTRL_FIFO_20; | ||
19 | else if (bandwidth > 11111*2) | ||
20 | vidc->control |= VIDC20_CTRL_FIFO_24; | ||
21 | else | ||
22 | vidc->control |= VIDC20_CTRL_FIFO_28; | ||
23 | |||
24 | vidc->pll_ctl = 0x2020; | ||
25 | } | ||
26 | |||
27 | #ifdef CONFIG_CHRONTEL_7003 | ||
28 | #define acornfb_default_control() VIDC20_CTRL_PIX_HCLK | ||
29 | #else | ||
30 | #define acornfb_default_control() VIDC20_CTRL_PIX_VCLK | ||
31 | #endif | ||
32 | |||
33 | #define acornfb_default_econtrol() VIDC20_ECTL_DAC | VIDC20_ECTL_REG(3) | VIDC20_ECTL_ECK | ||
diff --git a/arch/arm/mach-clps7500/include/mach/debug-macro.S b/arch/arm/mach-clps7500/include/mach/debug-macro.S deleted file mode 100644 index af4104e7e84a..000000000000 --- a/arch/arm/mach-clps7500/include/mach/debug-macro.S +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* arch/arm/mach-clps7500/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mov \rx, #0xe0000000 | ||
16 | orr \rx, \rx, #0x00010000 | ||
17 | orr \rx, \rx, #0x00000be0 | ||
18 | .endm | ||
19 | |||
20 | #define UART_SHIFT 2 | ||
21 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/arch/arm/mach-clps7500/include/mach/dma.h b/arch/arm/mach-clps7500/include/mach/dma.h deleted file mode 100644 index 63fcde505498..000000000000 --- a/arch/arm/mach-clps7500/include/mach/dma.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 1999 Nexus Electronics Ltd. | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_ARCH_DMA_H | ||
8 | #define __ASM_ARCH_DMA_H | ||
9 | |||
10 | /* DMA is not yet implemented! It should be the same as acorn, copy over.. */ | ||
11 | |||
12 | /* | ||
13 | * This is the maximum DMA address that can be DMAd to. | ||
14 | * There should not be more than (0xd0000000 - 0xc0000000) | ||
15 | * bytes of RAM. | ||
16 | */ | ||
17 | #define MAX_DMA_ADDRESS 0xd0000000 | ||
18 | |||
19 | #define DMA_S0 0 | ||
20 | |||
21 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-clps7500/include/mach/entry-macro.S b/arch/arm/mach-clps7500/include/mach/entry-macro.S deleted file mode 100644 index 4e7e54144093..000000000000 --- a/arch/arm/mach-clps7500/include/mach/entry-macro.S +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #include <mach/hardware.h> | ||
2 | #include <asm/hardware/entry-macro-iomd.S> | ||
3 | |||
4 | .equ ioc_base_high, IOC_BASE & 0xff000000 | ||
5 | .equ ioc_base_low, IOC_BASE & 0x00ff0000 | ||
6 | |||
7 | .macro get_irqnr_preamble, base, tmp | ||
8 | mov \base, #ioc_base_high @ point at IOC | ||
9 | .if ioc_base_low | ||
10 | orr \base, \base, #ioc_base_low | ||
11 | .endif | ||
12 | .endm | ||
13 | |||
14 | .macro arch_ret_to_user, tmp1, tmp2 | ||
15 | .endm | ||
16 | |||
diff --git a/arch/arm/mach-clps7500/include/mach/hardware.h b/arch/arm/mach-clps7500/include/mach/hardware.h deleted file mode 100644 index a6ad1d44badf..000000000000 --- a/arch/arm/mach-clps7500/include/mach/hardware.h +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 1996-1999 Russell King. | ||
5 | * Copyright (C) 1999 Nexus Electronics Ltd. | ||
6 | * | ||
7 | * This file contains the hardware definitions of the | ||
8 | * CL7500 evaluation board. | ||
9 | */ | ||
10 | #ifndef __ASM_ARCH_HARDWARE_H | ||
11 | #define __ASM_ARCH_HARDWARE_H | ||
12 | |||
13 | #include <mach/memory.h> | ||
14 | #include <asm/hardware/iomd.h> | ||
15 | |||
16 | #ifdef __ASSEMBLY__ | ||
17 | #define IOMEM(x) x | ||
18 | #else | ||
19 | #define IOMEM(x) ((void __iomem *)(x)) | ||
20 | #endif | ||
21 | |||
22 | /* | ||
23 | * What hardware must be present | ||
24 | */ | ||
25 | #define HAS_IOMD | ||
26 | #define HAS_VIDC20 | ||
27 | |||
28 | /* Hardware addresses of major areas. | ||
29 | * *_START is the physical address | ||
30 | * *_SIZE is the size of the region | ||
31 | * *_BASE is the virtual address | ||
32 | */ | ||
33 | |||
34 | #define IO_START 0x03000000 /* I/O */ | ||
35 | #define IO_SIZE 0x01000000 | ||
36 | #define IO_BASE IOMEM(0xe0000000) | ||
37 | |||
38 | #define ISA_START 0x0c000000 /* ISA */ | ||
39 | #define ISA_SIZE 0x00010000 | ||
40 | #define ISA_BASE 0xe1000000 | ||
41 | |||
42 | #define CLPS7500_FLASH_START 0x01000000 /* XXX */ | ||
43 | #define CLPS7500_FLASH_SIZE 0x01000000 | ||
44 | #define CLPS7500_FLASH_BASE 0xe2000000 | ||
45 | |||
46 | #define LED_START 0x0302B000 | ||
47 | #define LED_SIZE 0x00001000 | ||
48 | #define LED_BASE 0xe3000000 | ||
49 | #define LED_ADDRESS (LED_BASE + 0xa00) | ||
50 | |||
51 | /* Let's define SCREEN_START for CL7500, even though it's a lie. */ | ||
52 | #define SCREEN_START 0x02000000 /* VRAM */ | ||
53 | #define SCREEN_END 0xdfc00000 | ||
54 | #define SCREEN_BASE 0xdf800000 | ||
55 | |||
56 | #define VIDC_BASE (void __iomem *)0xe0400000 | ||
57 | #define IOMD_BASE IOMEM(0xe0200000) | ||
58 | #define IOC_BASE IOMEM(0xe0200000) | ||
59 | #define FLOPPYDMA_BASE IOMEM(0xe002a000) | ||
60 | #define PCIO_BASE IOMEM(0xe0010000) | ||
61 | |||
62 | #define vidc_writel(val) __raw_writel(val, VIDC_BASE) | ||
63 | |||
64 | /* in/out bias for the ISA slot region */ | ||
65 | #define ISASLOT_IO 0x80400000 | ||
66 | |||
67 | #endif | ||
diff --git a/arch/arm/mach-clps7500/include/mach/io.h b/arch/arm/mach-clps7500/include/mach/io.h deleted file mode 100644 index 2ff2860889ed..000000000000 --- a/arch/arm/mach-clps7500/include/mach/io.h +++ /dev/null | |||
@@ -1,255 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/io.h | ||
3 | * from arch/arm/mach-rpc/include/mach/io.h | ||
4 | * | ||
5 | * Copyright (C) 1997 Russell King | ||
6 | * | ||
7 | * Modifications: | ||
8 | * 06-Dec-1997 RMK Created. | ||
9 | */ | ||
10 | #ifndef __ASM_ARM_ARCH_IO_H | ||
11 | #define __ASM_ARM_ARCH_IO_H | ||
12 | |||
13 | #include <mach/hardware.h> | ||
14 | |||
15 | #define IO_SPACE_LIMIT 0xffffffff | ||
16 | |||
17 | /* | ||
18 | * GCC is totally crap at loading/storing data. We try to persuade it | ||
19 | * to do the right thing by using these whereever possible instead of | ||
20 | * the above. | ||
21 | */ | ||
22 | #define __arch_base_getb(b,o) \ | ||
23 | ({ \ | ||
24 | unsigned int v, r = (b); \ | ||
25 | __asm__ __volatile__( \ | ||
26 | "ldrb %0, [%1, %2]" \ | ||
27 | : "=r" (v) \ | ||
28 | : "r" (r), "Ir" (o)); \ | ||
29 | v; \ | ||
30 | }) | ||
31 | |||
32 | #define __arch_base_getl(b,o) \ | ||
33 | ({ \ | ||
34 | unsigned int v, r = (b); \ | ||
35 | __asm__ __volatile__( \ | ||
36 | "ldr %0, [%1, %2]" \ | ||
37 | : "=r" (v) \ | ||
38 | : "r" (r), "Ir" (o)); \ | ||
39 | v; \ | ||
40 | }) | ||
41 | |||
42 | #define __arch_base_putb(v,b,o) \ | ||
43 | ({ \ | ||
44 | unsigned int r = (b); \ | ||
45 | __asm__ __volatile__( \ | ||
46 | "strb %0, [%1, %2]" \ | ||
47 | : \ | ||
48 | : "r" (v), "r" (r), "Ir" (o)); \ | ||
49 | }) | ||
50 | |||
51 | #define __arch_base_putl(v,b,o) \ | ||
52 | ({ \ | ||
53 | unsigned int r = (b); \ | ||
54 | __asm__ __volatile__( \ | ||
55 | "str %0, [%1, %2]" \ | ||
56 | : \ | ||
57 | : "r" (v), "r" (r), "Ir" (o)); \ | ||
58 | }) | ||
59 | |||
60 | /* | ||
61 | * We use two different types of addressing - PC style addresses, and ARM | ||
62 | * addresses. PC style accesses the PC hardware with the normal PC IO | ||
63 | * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ | ||
64 | * and are translated to the start of IO. Note that all addresses are | ||
65 | * shifted left! | ||
66 | */ | ||
67 | #define __PORT_PCIO(x) (!((x) & 0x80000000)) | ||
68 | |||
69 | /* | ||
70 | * Dynamic IO functions - let the compiler | ||
71 | * optimize the expressions | ||
72 | */ | ||
73 | static inline void __outb (unsigned int value, unsigned int port) | ||
74 | { | ||
75 | unsigned long temp; | ||
76 | __asm__ __volatile__( | ||
77 | "tst %2, #0x80000000\n\t" | ||
78 | "mov %0, %4\n\t" | ||
79 | "addeq %0, %0, %3\n\t" | ||
80 | "strb %1, [%0, %2, lsl #2] @ outb" | ||
81 | : "=&r" (temp) | ||
82 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
83 | : "cc"); | ||
84 | } | ||
85 | |||
86 | static inline void __outw (unsigned int value, unsigned int port) | ||
87 | { | ||
88 | unsigned long temp; | ||
89 | __asm__ __volatile__( | ||
90 | "tst %2, #0x80000000\n\t" | ||
91 | "mov %0, %4\n\t" | ||
92 | "addeq %0, %0, %3\n\t" | ||
93 | "str %1, [%0, %2, lsl #2] @ outw" | ||
94 | : "=&r" (temp) | ||
95 | : "r" (value|value<<16), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
96 | : "cc"); | ||
97 | } | ||
98 | |||
99 | static inline void __outl (unsigned int value, unsigned int port) | ||
100 | { | ||
101 | unsigned long temp; | ||
102 | __asm__ __volatile__( | ||
103 | "tst %2, #0x80000000\n\t" | ||
104 | "mov %0, %4\n\t" | ||
105 | "addeq %0, %0, %3\n\t" | ||
106 | "str %1, [%0, %2, lsl #2] @ outl" | ||
107 | : "=&r" (temp) | ||
108 | : "r" (value), "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) | ||
109 | : "cc"); | ||
110 | } | ||
111 | |||
112 | #define DECLARE_DYN_IN(sz,fnsuffix,instr) \ | ||
113 | static inline unsigned sz __in##fnsuffix (unsigned int port) \ | ||
114 | { \ | ||
115 | unsigned long temp, value; \ | ||
116 | __asm__ __volatile__( \ | ||
117 | "tst %2, #0x80000000\n\t" \ | ||
118 | "mov %0, %4\n\t" \ | ||
119 | "addeq %0, %0, %3\n\t" \ | ||
120 | "ldr" instr " %1, [%0, %2, lsl #2] @ in" #fnsuffix \ | ||
121 | : "=&r" (temp), "=r" (value) \ | ||
122 | : "r" (port), "Ir" (PCIO_BASE - IO_BASE), "Ir" (IO_BASE) \ | ||
123 | : "cc"); \ | ||
124 | return (unsigned sz)value; \ | ||
125 | } | ||
126 | |||
127 | static inline unsigned int __ioaddr (unsigned int port) \ | ||
128 | { \ | ||
129 | if (__PORT_PCIO(port)) \ | ||
130 | return (unsigned int)(PCIO_BASE + (port << 2)); \ | ||
131 | else \ | ||
132 | return (unsigned int)(IO_BASE + (port << 2)); \ | ||
133 | } | ||
134 | |||
135 | #define DECLARE_IO(sz,fnsuffix,instr) \ | ||
136 | DECLARE_DYN_IN(sz,fnsuffix,instr) | ||
137 | |||
138 | DECLARE_IO(char,b,"b") | ||
139 | DECLARE_IO(short,w,"") | ||
140 | DECLARE_IO(int,l,"") | ||
141 | |||
142 | #undef DECLARE_IO | ||
143 | #undef DECLARE_DYN_IN | ||
144 | |||
145 | /* | ||
146 | * Constant address IO functions | ||
147 | * | ||
148 | * These have to be macros for the 'J' constraint to work - | ||
149 | * +/-4096 immediate operand. | ||
150 | */ | ||
151 | #define __outbc(value,port) \ | ||
152 | ({ \ | ||
153 | if (__PORT_PCIO((port))) \ | ||
154 | __asm__ __volatile__( \ | ||
155 | "strb %0, [%1, %2] @ outbc" \ | ||
156 | : : "r" (value), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
157 | else \ | ||
158 | __asm__ __volatile__( \ | ||
159 | "strb %0, [%1, %2] @ outbc" \ | ||
160 | : : "r" (value), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
161 | }) | ||
162 | |||
163 | #define __inbc(port) \ | ||
164 | ({ \ | ||
165 | unsigned char result; \ | ||
166 | if (__PORT_PCIO((port))) \ | ||
167 | __asm__ __volatile__( \ | ||
168 | "ldrb %0, [%1, %2] @ inbc" \ | ||
169 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
170 | else \ | ||
171 | __asm__ __volatile__( \ | ||
172 | "ldrb %0, [%1, %2] @ inbc" \ | ||
173 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
174 | result; \ | ||
175 | }) | ||
176 | |||
177 | #define __outwc(value,port) \ | ||
178 | ({ \ | ||
179 | unsigned long v = value; \ | ||
180 | if (__PORT_PCIO((port))) \ | ||
181 | __asm__ __volatile__( \ | ||
182 | "str %0, [%1, %2] @ outwc" \ | ||
183 | : : "r" (v|v<<16), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
184 | else \ | ||
185 | __asm__ __volatile__( \ | ||
186 | "str %0, [%1, %2] @ outwc" \ | ||
187 | : : "r" (v|v<<16), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
188 | }) | ||
189 | |||
190 | #define __inwc(port) \ | ||
191 | ({ \ | ||
192 | unsigned short result; \ | ||
193 | if (__PORT_PCIO((port))) \ | ||
194 | __asm__ __volatile__( \ | ||
195 | "ldr %0, [%1, %2] @ inwc" \ | ||
196 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
197 | else \ | ||
198 | __asm__ __volatile__( \ | ||
199 | "ldr %0, [%1, %2] @ inwc" \ | ||
200 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
201 | result & 0xffff; \ | ||
202 | }) | ||
203 | |||
204 | #define __outlc(value,port) \ | ||
205 | ({ \ | ||
206 | unsigned long v = value; \ | ||
207 | if (__PORT_PCIO((port))) \ | ||
208 | __asm__ __volatile__( \ | ||
209 | "str %0, [%1, %2] @ outlc" \ | ||
210 | : : "r" (v), "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
211 | else \ | ||
212 | __asm__ __volatile__( \ | ||
213 | "str %0, [%1, %2] @ outlc" \ | ||
214 | : : "r" (v), "r" (IO_BASE), "r" ((port) << 2)); \ | ||
215 | }) | ||
216 | |||
217 | #define __inlc(port) \ | ||
218 | ({ \ | ||
219 | unsigned long result; \ | ||
220 | if (__PORT_PCIO((port))) \ | ||
221 | __asm__ __volatile__( \ | ||
222 | "ldr %0, [%1, %2] @ inlc" \ | ||
223 | : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port) << 2)); \ | ||
224 | else \ | ||
225 | __asm__ __volatile__( \ | ||
226 | "ldr %0, [%1, %2] @ inlc" \ | ||
227 | : "=r" (result) : "r" (IO_BASE), "r" ((port) << 2)); \ | ||
228 | result; \ | ||
229 | }) | ||
230 | |||
231 | #define __ioaddrc(port) \ | ||
232 | (__PORT_PCIO((port)) ? PCIO_BASE + ((port) << 2) : IO_BASE + ((port) << 2)) | ||
233 | |||
234 | #define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p)) | ||
235 | #define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p)) | ||
236 | #define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p)) | ||
237 | #define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p)) | ||
238 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) | ||
239 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) | ||
240 | #define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p)) | ||
241 | /* the following macro is deprecated */ | ||
242 | #define ioaddr(port) __ioaddr((port)) | ||
243 | |||
244 | #define insb(p,d,l) __raw_readsb(__ioaddr(p),d,l) | ||
245 | #define insw(p,d,l) __raw_readsw(__ioaddr(p),d,l) | ||
246 | |||
247 | #define outsb(p,d,l) __raw_writesb(__ioaddr(p),d,l) | ||
248 | #define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l) | ||
249 | |||
250 | /* | ||
251 | * 1:1 mapping for ioremapped regions. | ||
252 | */ | ||
253 | #define __mem_pci(x) (x) | ||
254 | |||
255 | #endif | ||
diff --git a/arch/arm/mach-clps7500/include/mach/irq.h b/arch/arm/mach-clps7500/include/mach/irq.h deleted file mode 100644 index d02fcf28ee05..000000000000 --- a/arch/arm/mach-clps7500/include/mach/irq.h +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/irq.h | ||
3 | * | ||
4 | * Copyright (C) 1996 Russell King | ||
5 | * Copyright (C) 1999, 2001 Nexus Electronics Ltd. | ||
6 | * | ||
7 | * Changelog: | ||
8 | * 10-10-1996 RMK Brought up to date with arch-sa110eval | ||
9 | * 22-08-1998 RMK Restructured IRQ routines | ||
10 | * 11-08-1999 PJB Created ARM7500 version, derived from RiscPC code | ||
11 | */ | ||
12 | |||
13 | #include <linux/io.h> | ||
14 | #include <asm/hardware/iomd.h> | ||
15 | |||
16 | static inline int fixup_irq(unsigned int irq) | ||
17 | { | ||
18 | if (irq == IRQ_ISA) { | ||
19 | int isabits = *((volatile unsigned int *)0xe002b700); | ||
20 | if (isabits == 0) { | ||
21 | printk("Spurious ISA IRQ!\n"); | ||
22 | return irq; | ||
23 | } | ||
24 | irq = IRQ_ISA_BASE; | ||
25 | while (!(isabits & 1)) { | ||
26 | irq++; | ||
27 | isabits >>= 1; | ||
28 | } | ||
29 | } | ||
30 | |||
31 | return irq; | ||
32 | } | ||
diff --git a/arch/arm/mach-clps7500/include/mach/irqs.h b/arch/arm/mach-clps7500/include/mach/irqs.h deleted file mode 100644 index bee66b487f59..000000000000 --- a/arch/arm/mach-clps7500/include/mach/irqs.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 1999 Nexus Electronics Ltd | ||
5 | */ | ||
6 | |||
7 | #define IRQ_INT2 0 | ||
8 | #define IRQ_INT1 2 | ||
9 | #define IRQ_VSYNCPULSE 3 | ||
10 | #define IRQ_POWERON 4 | ||
11 | #define IRQ_TIMER0 5 | ||
12 | #define IRQ_TIMER1 6 | ||
13 | #define IRQ_FORCE 7 | ||
14 | #define IRQ_INT8 8 | ||
15 | #define IRQ_ISA 9 | ||
16 | #define IRQ_INT6 10 | ||
17 | #define IRQ_INT5 11 | ||
18 | #define IRQ_INT4 12 | ||
19 | #define IRQ_INT3 13 | ||
20 | #define IRQ_KEYBOARDTX 14 | ||
21 | #define IRQ_KEYBOARDRX 15 | ||
22 | |||
23 | #define IRQ_DMA0 16 | ||
24 | #define IRQ_DMA1 17 | ||
25 | #define IRQ_DMA2 18 | ||
26 | #define IRQ_DMA3 19 | ||
27 | #define IRQ_DMAS0 20 | ||
28 | #define IRQ_DMAS1 21 | ||
29 | |||
30 | #define IRQ_IOP0 24 | ||
31 | #define IRQ_IOP1 25 | ||
32 | #define IRQ_IOP2 26 | ||
33 | #define IRQ_IOP3 27 | ||
34 | #define IRQ_IOP4 28 | ||
35 | #define IRQ_IOP5 29 | ||
36 | #define IRQ_IOP6 30 | ||
37 | #define IRQ_IOP7 31 | ||
38 | |||
39 | #define IRQ_MOUSERX 40 | ||
40 | #define IRQ_MOUSETX 41 | ||
41 | #define IRQ_ADC 42 | ||
42 | #define IRQ_EVENT1 43 | ||
43 | #define IRQ_EVENT2 44 | ||
44 | |||
45 | #define IRQ_ISA_BASE 48 | ||
46 | #define IRQ_ISA_3 48 | ||
47 | #define IRQ_ISA_4 49 | ||
48 | #define IRQ_ISA_5 50 | ||
49 | #define IRQ_ISA_7 51 | ||
50 | #define IRQ_ISA_9 52 | ||
51 | #define IRQ_ISA_10 53 | ||
52 | #define IRQ_ISA_11 54 | ||
53 | #define IRQ_ISA_14 55 | ||
54 | |||
55 | #define FIQ_INT9 0 | ||
56 | #define FIQ_INT5 1 | ||
57 | #define FIQ_INT6 4 | ||
58 | #define FIQ_INT8 6 | ||
59 | #define FIQ_FORCE 7 | ||
60 | |||
61 | /* | ||
62 | * This is the offset of the FIQ "IRQ" numbers | ||
63 | */ | ||
64 | #define FIQ_START 64 | ||
65 | |||
66 | #define IRQ_TIMER IRQ_TIMER0 | ||
diff --git a/arch/arm/mach-clps7500/include/mach/memory.h b/arch/arm/mach-clps7500/include/mach/memory.h deleted file mode 100644 index 87b32db470c8..000000000000 --- a/arch/arm/mach-clps7500/include/mach/memory.h +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 1996,1997,1998 Russell King. | ||
5 | * | ||
6 | * Changelog: | ||
7 | * 20-Oct-1996 RMK Created | ||
8 | * 31-Dec-1997 RMK Fixed definitions to reduce warnings | ||
9 | * 11-Jan-1998 RMK Uninlined to reduce hits on cache | ||
10 | * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt | ||
11 | * 21-Mar-1999 RMK Renamed to memory.h | ||
12 | * RMK Added TASK_SIZE and PAGE_OFFSET | ||
13 | */ | ||
14 | #ifndef __ASM_ARCH_MEMORY_H | ||
15 | #define __ASM_ARCH_MEMORY_H | ||
16 | |||
17 | /* | ||
18 | * Physical DRAM offset. | ||
19 | */ | ||
20 | #define PHYS_OFFSET UL(0x10000000) | ||
21 | |||
22 | /* | ||
23 | * These are exactly the same on the RiscPC as the | ||
24 | * physical memory view. | ||
25 | */ | ||
26 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
27 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
28 | |||
29 | /* | ||
30 | * Cache flushing area - ROM | ||
31 | */ | ||
32 | #define FLUSH_BASE_PHYS 0x00000000 | ||
33 | #define FLUSH_BASE 0xdf000000 | ||
34 | |||
35 | /* | ||
36 | * Sparsemem support. Each section is a maximum of 64MB. The sections | ||
37 | * are offset by 128MB and can cover 128MB, so that gives us a maximum | ||
38 | * of 29 physmem bits. | ||
39 | */ | ||
40 | #define MAX_PHYSMEM_BITS 29 | ||
41 | #define SECTION_SIZE_BITS 26 | ||
42 | |||
43 | #endif | ||
diff --git a/arch/arm/mach-clps7500/include/mach/system.h b/arch/arm/mach-clps7500/include/mach/system.h deleted file mode 100644 index 6d325fbe8b08..000000000000 --- a/arch/arm/mach-clps7500/include/mach/system.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (c) 1999 Nexus Electronics Ltd. | ||
5 | */ | ||
6 | #ifndef __ASM_ARCH_SYSTEM_H | ||
7 | #define __ASM_ARCH_SYSTEM_H | ||
8 | |||
9 | #include <linux/io.h> | ||
10 | #include <asm/hardware/iomd.h> | ||
11 | |||
12 | static inline void arch_idle(void) | ||
13 | { | ||
14 | iomd_writeb(0, IOMD_SUSMODE); | ||
15 | } | ||
16 | |||
17 | #define arch_reset(mode) \ | ||
18 | do { \ | ||
19 | iomd_writeb(0, IOMD_ROMCR0); \ | ||
20 | cpu_reset(0); \ | ||
21 | } while (0) | ||
22 | |||
23 | #endif | ||
diff --git a/arch/arm/mach-clps7500/include/mach/timex.h b/arch/arm/mach-clps7500/include/mach/timex.h deleted file mode 100644 index dfaa9b425757..000000000000 --- a/arch/arm/mach-clps7500/include/mach/timex.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/timex.h | ||
3 | * | ||
4 | * CL7500 architecture timex specifications | ||
5 | * | ||
6 | * Copyright (C) 1999 Nexus Electronics Ltd | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * On the ARM7500, the clock ticks at 2MHz. | ||
11 | */ | ||
12 | #define CLOCK_TICK_RATE 2000000 | ||
13 | |||
diff --git a/arch/arm/mach-clps7500/include/mach/uncompress.h b/arch/arm/mach-clps7500/include/mach/uncompress.h deleted file mode 100644 index d7d0af4b49fc..000000000000 --- a/arch/arm/mach-clps7500/include/mach/uncompress.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 1999, 2000 Nexus Electronics Ltd. | ||
5 | */ | ||
6 | #define BASE 0x03010000 | ||
7 | #define SERBASE (BASE + (0x2f8 << 2)) | ||
8 | |||
9 | static inline void putc(char c) | ||
10 | { | ||
11 | while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20)) | ||
12 | barrier(); | ||
13 | |||
14 | *((volatile unsigned int *)(SERBASE)) = c; | ||
15 | } | ||
16 | |||
17 | static inline void flush(void) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | static __inline__ void arch_decomp_setup(void) | ||
22 | { | ||
23 | int baud = 3686400 / (9600 * 32); | ||
24 | |||
25 | *((volatile unsigned int *)(SERBASE + 0xC)) = 0x80; | ||
26 | *((volatile unsigned int *)(SERBASE + 0x0)) = baud & 0xff; | ||
27 | *((volatile unsigned int *)(SERBASE + 0x4)) = (baud & 0xff00) >> 8; | ||
28 | *((volatile unsigned int *)(SERBASE + 0xC)) = 3; /* 8 bits */ | ||
29 | *((volatile unsigned int *)(SERBASE + 0x10)) = 3; /* DTR, RTS */ | ||
30 | } | ||
31 | |||
32 | /* | ||
33 | * nothing to do | ||
34 | */ | ||
35 | #define arch_decomp_wdog() | ||
diff --git a/arch/arm/mach-clps7500/include/mach/vmalloc.h b/arch/arm/mach-clps7500/include/mach/vmalloc.h deleted file mode 100644 index 8fc5406d1b6d..000000000000 --- a/arch/arm/mach-clps7500/include/mach/vmalloc.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-clps7500/include/mach/vmalloc.h | ||
3 | */ | ||
4 | #define VMALLOC_END (PAGE_OFFSET + 0x1c000000) | ||
diff --git a/arch/arm/mach-davinci/include/mach/dma.h b/arch/arm/mach-davinci/include/mach/dma.h deleted file mode 100644 index 8e2f2d0ba667..000000000000 --- a/arch/arm/mach-davinci/include/mach/dma.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | /* | ||
2 | * DaVinci DMA definitions | ||
3 | * | ||
4 | * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com> | ||
5 | * | ||
6 | * 2007 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_DMA_H | ||
12 | #define __ASM_ARCH_DMA_H | ||
13 | |||
14 | #define MAX_DMA_ADDRESS 0xffffffff | ||
15 | |||
16 | #endif /* __ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h index b78ee9140496..a48795fd2417 100644 --- a/arch/arm/mach-davinci/include/mach/io.h +++ b/arch/arm/mach-davinci/include/mach/io.h | |||
@@ -29,8 +29,7 @@ | |||
29 | * We don't actually have real ISA nor PCI buses, but there is so many | 29 | * We don't actually have real ISA nor PCI buses, but there is so many |
30 | * drivers out there that might just work if we fake them... | 30 | * drivers out there that might just work if we fake them... |
31 | */ | 31 | */ |
32 | #define PCIO_BASE 0 | 32 | #define __io(a) __typesafe_io(a) |
33 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) | ||
34 | #define __mem_pci(a) (a) | 33 | #define __mem_pci(a) (a) |
35 | #define __mem_isa(a) (a) | 34 | #define __mem_isa(a) (a) |
36 | 35 | ||
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h index dd1625c23cf4..86c25c7f3ce3 100644 --- a/arch/arm/mach-davinci/include/mach/memory.h +++ b/arch/arm/mach-davinci/include/mach/memory.h | |||
@@ -52,13 +52,8 @@ __arch_adjust_zones(int node, unsigned long *size, unsigned long *holes) | |||
52 | if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(node, zone_size, holes) | 52 | if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(node, zone_size, holes) |
53 | 53 | ||
54 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + (128<<20) - 1) | 54 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + (128<<20) - 1) |
55 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + (128<<20)) | ||
55 | 56 | ||
56 | #endif | 57 | #endif |
57 | 58 | ||
58 | /* | ||
59 | * Bus address is physical address | ||
60 | */ | ||
61 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
62 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
63 | |||
64 | #endif /* __ASM_ARCH_MEMORY_H */ | 59 | #endif /* __ASM_ARCH_MEMORY_H */ |
diff --git a/arch/arm/mach-davinci/include/mach/vmalloc.h b/arch/arm/mach-davinci/include/mach/vmalloc.h index b98bd9e92fd6..ad51625b6609 100644 --- a/arch/arm/mach-davinci/include/mach/vmalloc.h +++ b/arch/arm/mach-davinci/include/mach/vmalloc.h | |||
@@ -8,7 +8,6 @@ | |||
8 | * is licensed "as is" without any warranty of any kind, whether express | 8 | * is licensed "as is" without any warranty of any kind, whether express |
9 | * or implied. | 9 | * or implied. |
10 | */ | 10 | */ |
11 | #include <asm/memory.h> | ||
12 | #include <mach/io.h> | 11 | #include <mach/io.h> |
13 | 12 | ||
14 | /* Allow vmalloc range until the IO virtual range minus a 2M "hole" */ | 13 | /* Allow vmalloc range until the IO virtual range minus a 2M "hole" */ |
diff --git a/arch/arm/mach-ebsa110/include/mach/dma.h b/arch/arm/mach-ebsa110/include/mach/dma.h deleted file mode 100644 index 780a04c8bbe9..000000000000 --- a/arch/arm/mach-ebsa110/include/mach/dma.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ebsa110/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 1997,1998 Russell King | ||
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 | * EBSA110 DMA definitions | ||
11 | */ | ||
diff --git a/arch/arm/mach-ebsa110/include/mach/memory.h b/arch/arm/mach-ebsa110/include/mach/memory.h index eea4b75b657b..0ca66d080c69 100644 --- a/arch/arm/mach-ebsa110/include/mach/memory.h +++ b/arch/arm/mach-ebsa110/include/mach/memory.h | |||
@@ -22,13 +22,6 @@ | |||
22 | #define PHYS_OFFSET UL(0x00000000) | 22 | #define PHYS_OFFSET UL(0x00000000) |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * We keep this 1:1 so that we don't interfere | ||
26 | * with the PCMCIA memory regions | ||
27 | */ | ||
28 | #define __virt_to_bus(x) (x) | ||
29 | #define __bus_to_virt(x) (x) | ||
30 | |||
31 | /* | ||
32 | * Cache flushing area - SRAM | 25 | * Cache flushing area - SRAM |
33 | */ | 26 | */ |
34 | #define FLUSH_BASE_PHYS 0x40000000 | 27 | #define FLUSH_BASE_PHYS 0x40000000 |
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index 5a1b8c05c958..56bddcef6905 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -33,6 +33,12 @@ config MACH_EDB9307 | |||
33 | Say 'Y' here if you want your kernel to support the Cirrus | 33 | Say 'Y' here if you want your kernel to support the Cirrus |
34 | Logic EDB9307 Evaluation Board. | 34 | Logic EDB9307 Evaluation Board. |
35 | 35 | ||
36 | config MACH_EDB9307A | ||
37 | bool "Support Cirrus Logic EDB9307A" | ||
38 | help | ||
39 | Say 'Y' here if you want your kernel to support the Cirrus | ||
40 | Logic EDB9307A Evaluation Board. | ||
41 | |||
36 | config MACH_EDB9312 | 42 | config MACH_EDB9312 |
37 | bool "Support Cirrus Logic EDB9312" | 43 | bool "Support Cirrus Logic EDB9312" |
38 | help | 44 | help |
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index c1252ca9648e..944e42d51646 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile | |||
@@ -10,6 +10,7 @@ obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o | |||
10 | obj-$(CONFIG_MACH_EDB9302) += edb9302.o | 10 | obj-$(CONFIG_MACH_EDB9302) += edb9302.o |
11 | obj-$(CONFIG_MACH_EDB9302A) += edb9302a.o | 11 | obj-$(CONFIG_MACH_EDB9302A) += edb9302a.o |
12 | obj-$(CONFIG_MACH_EDB9307) += edb9307.o | 12 | obj-$(CONFIG_MACH_EDB9307) += edb9307.o |
13 | obj-$(CONFIG_MACH_EDB9307A) += edb9307a.o | ||
13 | obj-$(CONFIG_MACH_EDB9312) += edb9312.o | 14 | obj-$(CONFIG_MACH_EDB9312) += edb9312.o |
14 | obj-$(CONFIG_MACH_EDB9315) += edb9315.o | 15 | obj-$(CONFIG_MACH_EDB9315) += edb9315.o |
15 | obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o | 16 | obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o |
diff --git a/arch/arm/mach-ep93xx/adssphere.c b/arch/arm/mach-ep93xx/adssphere.c index 561db73ec1ae..3fbd9b0fbe24 100644 --- a/arch/arm/mach-ep93xx/adssphere.c +++ b/arch/arm/mach-ep93xx/adssphere.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/i2c.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -28,8 +29,8 @@ static struct physmap_flash_data adssphere_flash_data = { | |||
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct resource adssphere_flash_resource = { | 31 | static struct resource adssphere_flash_resource = { |
31 | .start = 0x60000000, | 32 | .start = EP93XX_CS6_PHYS_BASE, |
32 | .end = 0x61ffffff, | 33 | .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1, |
33 | .flags = IORESOURCE_MEM, | 34 | .flags = IORESOURCE_MEM, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -59,7 +60,7 @@ MACHINE_START(ADSSPHERE, "ADS Sphere board") | |||
59 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | 60 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ |
60 | .phys_io = EP93XX_APB_PHYS_BASE, | 61 | .phys_io = EP93XX_APB_PHYS_BASE, |
61 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
62 | .boot_params = 0x00000100, | 63 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
63 | .map_io = ep93xx_map_io, | 64 | .map_io = ep93xx_map_io, |
64 | .init_irq = ep93xx_init_irq, | 65 | .init_irq = ep93xx_init_irq, |
65 | .timer = &ep93xx_timer, | 66 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c index 8c9f2491dccc..96049283a10a 100644 --- a/arch/arm/mach-ep93xx/clock.c +++ b/arch/arm/mach-ep93xx/clock.c | |||
@@ -16,11 +16,12 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | |||
20 | #include <asm/clkdev.h> | ||
19 | #include <asm/div64.h> | 21 | #include <asm/div64.h> |
20 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
21 | 23 | ||
22 | struct clk { | 24 | struct clk { |
23 | char *name; | ||
24 | unsigned long rate; | 25 | unsigned long rate; |
25 | int users; | 26 | int users; |
26 | u32 enable_reg; | 27 | u32 enable_reg; |
@@ -28,53 +29,33 @@ struct clk { | |||
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct clk clk_uart = { | 31 | static struct clk clk_uart = { |
31 | .name = "UARTCLK", | ||
32 | .rate = 14745600, | 32 | .rate = 14745600, |
33 | }; | 33 | }; |
34 | static struct clk clk_pll1 = { | 34 | static struct clk clk_pll1; |
35 | .name = "pll1", | 35 | static struct clk clk_f; |
36 | }; | 36 | static struct clk clk_h; |
37 | static struct clk clk_f = { | 37 | static struct clk clk_p; |
38 | .name = "fclk", | 38 | static struct clk clk_pll2; |
39 | }; | ||
40 | static struct clk clk_h = { | ||
41 | .name = "hclk", | ||
42 | }; | ||
43 | static struct clk clk_p = { | ||
44 | .name = "pclk", | ||
45 | }; | ||
46 | static struct clk clk_pll2 = { | ||
47 | .name = "pll2", | ||
48 | }; | ||
49 | static struct clk clk_usb_host = { | 39 | static struct clk clk_usb_host = { |
50 | .name = "usb_host", | ||
51 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, | 40 | .enable_reg = EP93XX_SYSCON_CLOCK_CONTROL, |
52 | .enable_mask = EP93XX_SYSCON_CLOCK_USH_EN, | 41 | .enable_mask = EP93XX_SYSCON_CLOCK_USH_EN, |
53 | }; | 42 | }; |
54 | 43 | ||
55 | 44 | #define INIT_CK(dev,con,ck) \ | |
56 | static struct clk *clocks[] = { | 45 | { .dev_id = dev, .con_id = con, .clk = ck } |
57 | &clk_uart, | 46 | |
58 | &clk_pll1, | 47 | static struct clk_lookup clocks[] = { |
59 | &clk_f, | 48 | INIT_CK("apb:uart1", NULL, &clk_uart), |
60 | &clk_h, | 49 | INIT_CK("apb:uart2", NULL, &clk_uart), |
61 | &clk_p, | 50 | INIT_CK("apb:uart3", NULL, &clk_uart), |
62 | &clk_pll2, | 51 | INIT_CK(NULL, "pll1", &clk_pll1), |
63 | &clk_usb_host, | 52 | INIT_CK(NULL, "fclk", &clk_f), |
53 | INIT_CK(NULL, "hclk", &clk_h), | ||
54 | INIT_CK(NULL, "pclk", &clk_p), | ||
55 | INIT_CK(NULL, "pll2", &clk_pll2), | ||
56 | INIT_CK(NULL, "usb_host", &clk_usb_host), | ||
64 | }; | 57 | }; |
65 | 58 | ||
66 | struct clk *clk_get(struct device *dev, const char *id) | ||
67 | { | ||
68 | int i; | ||
69 | |||
70 | for (i = 0; i < ARRAY_SIZE(clocks); i++) { | ||
71 | if (!strcmp(clocks[i]->name, id)) | ||
72 | return clocks[i]; | ||
73 | } | ||
74 | |||
75 | return ERR_PTR(-ENOENT); | ||
76 | } | ||
77 | EXPORT_SYMBOL(clk_get); | ||
78 | 59 | ||
79 | int clk_enable(struct clk *clk) | 60 | int clk_enable(struct clk *clk) |
80 | { | 61 | { |
@@ -106,12 +87,6 @@ unsigned long clk_get_rate(struct clk *clk) | |||
106 | } | 87 | } |
107 | EXPORT_SYMBOL(clk_get_rate); | 88 | EXPORT_SYMBOL(clk_get_rate); |
108 | 89 | ||
109 | void clk_put(struct clk *clk) | ||
110 | { | ||
111 | } | ||
112 | EXPORT_SYMBOL(clk_put); | ||
113 | |||
114 | |||
115 | 90 | ||
116 | static char fclk_divisors[] = { 1, 2, 4, 8, 16, 1, 1, 1 }; | 91 | static char fclk_divisors[] = { 1, 2, 4, 8, 16, 1, 1, 1 }; |
117 | static char hclk_divisors[] = { 1, 2, 4, 5, 6, 8, 16, 32 }; | 92 | static char hclk_divisors[] = { 1, 2, 4, 5, 6, 8, 16, 32 }; |
@@ -138,6 +113,7 @@ static unsigned long calc_pll_rate(u32 config_word) | |||
138 | static int __init ep93xx_clock_init(void) | 113 | static int __init ep93xx_clock_init(void) |
139 | { | 114 | { |
140 | u32 value; | 115 | u32 value; |
116 | int i; | ||
141 | 117 | ||
142 | value = __raw_readl(EP93XX_SYSCON_CLOCK_SET1); | 118 | value = __raw_readl(EP93XX_SYSCON_CLOCK_SET1); |
143 | if (!(value & 0x00800000)) { /* PLL1 bypassed? */ | 119 | if (!(value & 0x00800000)) { /* PLL1 bypassed? */ |
@@ -165,6 +141,8 @@ static int __init ep93xx_clock_init(void) | |||
165 | clk_f.rate / 1000000, clk_h.rate / 1000000, | 141 | clk_f.rate / 1000000, clk_h.rate / 1000000, |
166 | clk_p.rate / 1000000); | 142 | clk_p.rate / 1000000); |
167 | 143 | ||
144 | for (i = 0; i < ARRAY_SIZE(clocks); i++) | ||
145 | clkdev_add(&clocks[i]); | ||
168 | return 0; | 146 | return 0; |
169 | } | 147 | } |
170 | arch_initcall(ep93xx_clock_init); | 148 | arch_initcall(ep93xx_clock_init); |
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 48345fb34613..4781f323703b 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <linux/amba/bus.h> | 34 | #include <linux/amba/bus.h> |
35 | #include <linux/amba/serial.h> | 35 | #include <linux/amba/serial.h> |
36 | #include <linux/io.h> | 36 | #include <linux/io.h> |
37 | #include <linux/i2c.h> | ||
38 | #include <linux/i2c-gpio.h> | ||
37 | 39 | ||
38 | #include <asm/types.h> | 40 | #include <asm/types.h> |
39 | #include <asm/setup.h> | 41 | #include <asm/setup.h> |
@@ -153,12 +155,14 @@ static unsigned char gpio_int_unmasked[3]; | |||
153 | static unsigned char gpio_int_enabled[3]; | 155 | static unsigned char gpio_int_enabled[3]; |
154 | static unsigned char gpio_int_type1[3]; | 156 | static unsigned char gpio_int_type1[3]; |
155 | static unsigned char gpio_int_type2[3]; | 157 | static unsigned char gpio_int_type2[3]; |
158 | static unsigned char gpio_int_debouce[3]; | ||
156 | 159 | ||
157 | /* Port ordering is: A B F */ | 160 | /* Port ordering is: A B F */ |
158 | static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c }; | 161 | static const u8 int_type1_register_offset[3] = { 0x90, 0xac, 0x4c }; |
159 | static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 }; | 162 | static const u8 int_type2_register_offset[3] = { 0x94, 0xb0, 0x50 }; |
160 | static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 }; | 163 | static const u8 eoi_register_offset[3] = { 0x98, 0xb4, 0x54 }; |
161 | static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 }; | 164 | static const u8 int_en_register_offset[3] = { 0x9c, 0xb8, 0x58 }; |
165 | static const u8 int_debounce_register_offset[3] = { 0xa8, 0xc4, 0x64 }; | ||
162 | 166 | ||
163 | void ep93xx_gpio_update_int_params(unsigned port) | 167 | void ep93xx_gpio_update_int_params(unsigned port) |
164 | { | 168 | { |
@@ -181,6 +185,22 @@ void ep93xx_gpio_int_mask(unsigned line) | |||
181 | gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7)); | 185 | gpio_int_unmasked[line >> 3] &= ~(1 << (line & 7)); |
182 | } | 186 | } |
183 | 187 | ||
188 | void ep93xx_gpio_int_debounce(unsigned int irq, int enable) | ||
189 | { | ||
190 | int line = irq_to_gpio(irq); | ||
191 | int port = line >> 3; | ||
192 | int port_mask = 1 << (line & 7); | ||
193 | |||
194 | if (enable) | ||
195 | gpio_int_debouce[port] |= port_mask; | ||
196 | else | ||
197 | gpio_int_debouce[port] &= ~port_mask; | ||
198 | |||
199 | __raw_writeb(gpio_int_debouce[port], | ||
200 | EP93XX_GPIO_REG(int_debounce_register_offset[port])); | ||
201 | } | ||
202 | EXPORT_SYMBOL(ep93xx_gpio_int_debounce); | ||
203 | |||
184 | /************************************************************************* | 204 | /************************************************************************* |
185 | * EP93xx IRQ handling | 205 | * EP93xx IRQ handling |
186 | *************************************************************************/ | 206 | *************************************************************************/ |
@@ -497,6 +517,26 @@ void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr) | |||
497 | platform_device_register(&ep93xx_eth_device); | 517 | platform_device_register(&ep93xx_eth_device); |
498 | } | 518 | } |
499 | 519 | ||
520 | static struct i2c_gpio_platform_data ep93xx_i2c_data = { | ||
521 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, | ||
522 | .sda_is_open_drain = 0, | ||
523 | .scl_pin = EP93XX_GPIO_LINE_EECLK, | ||
524 | .scl_is_open_drain = 0, | ||
525 | .udelay = 2, | ||
526 | }; | ||
527 | |||
528 | static struct platform_device ep93xx_i2c_device = { | ||
529 | .name = "i2c-gpio", | ||
530 | .id = 0, | ||
531 | .dev.platform_data = &ep93xx_i2c_data, | ||
532 | }; | ||
533 | |||
534 | void __init ep93xx_register_i2c(struct i2c_board_info *devices, int num) | ||
535 | { | ||
536 | i2c_register_board_info(0, devices, num); | ||
537 | platform_device_register(&ep93xx_i2c_device); | ||
538 | } | ||
539 | |||
500 | extern void ep93xx_gpio_init(void); | 540 | extern void ep93xx_gpio_init(void); |
501 | 541 | ||
502 | void __init ep93xx_init_devices(void) | 542 | void __init ep93xx_init_devices(void) |
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c index e4add5bdccfd..8bf8d7c78f1a 100644 --- a/arch/arm/mach-ep93xx/edb9302.c +++ b/arch/arm/mach-ep93xx/edb9302.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/i2c.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -28,8 +29,8 @@ static struct physmap_flash_data edb9302_flash_data = { | |||
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct resource edb9302_flash_resource = { | 31 | static struct resource edb9302_flash_resource = { |
31 | .start = 0x60000000, | 32 | .start = EP93XX_CS6_PHYS_BASE, |
32 | .end = 0x60ffffff, | 33 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, |
33 | .flags = IORESOURCE_MEM, | 34 | .flags = IORESOURCE_MEM, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -59,7 +60,7 @@ MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board") | |||
59 | /* Maintainer: George Kashperko <george@chas.com.ua> */ | 60 | /* Maintainer: George Kashperko <george@chas.com.ua> */ |
60 | .phys_io = EP93XX_APB_PHYS_BASE, | 61 | .phys_io = EP93XX_APB_PHYS_BASE, |
61 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
62 | .boot_params = 0x00000100, | 63 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
63 | .map_io = ep93xx_map_io, | 64 | .map_io = ep93xx_map_io, |
64 | .init_irq = ep93xx_init_irq, | 65 | .init_irq = ep93xx_init_irq, |
65 | .timer = &ep93xx_timer, | 66 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-ep93xx/edb9302a.c b/arch/arm/mach-ep93xx/edb9302a.c index 02c4405afed7..a352c57c7b46 100644 --- a/arch/arm/mach-ep93xx/edb9302a.c +++ b/arch/arm/mach-ep93xx/edb9302a.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/i2c.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -28,8 +29,8 @@ static struct physmap_flash_data edb9302a_flash_data = { | |||
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct resource edb9302a_flash_resource = { | 31 | static struct resource edb9302a_flash_resource = { |
31 | .start = 0x60000000, | 32 | .start = EP93XX_CS6_PHYS_BASE, |
32 | .end = 0x60ffffff, | 33 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, |
33 | .flags = IORESOURCE_MEM, | 34 | .flags = IORESOURCE_MEM, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -44,7 +45,7 @@ static struct platform_device edb9302a_flash = { | |||
44 | }; | 45 | }; |
45 | 46 | ||
46 | static struct ep93xx_eth_data edb9302a_eth_data = { | 47 | static struct ep93xx_eth_data edb9302a_eth_data = { |
47 | .phy_id = 1, | 48 | .phy_id = 1, |
48 | }; | 49 | }; |
49 | 50 | ||
50 | static void __init edb9302a_init_machine(void) | 51 | static void __init edb9302a_init_machine(void) |
@@ -59,7 +60,7 @@ MACHINE_START(EDB9302A, "Cirrus Logic EDB9302A Evaluation Board") | |||
59 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | 60 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ |
60 | .phys_io = EP93XX_APB_PHYS_BASE, | 61 | .phys_io = EP93XX_APB_PHYS_BASE, |
61 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
62 | .boot_params = 0xc0000100, | 63 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, |
63 | .map_io = ep93xx_map_io, | 64 | .map_io = ep93xx_map_io, |
64 | .init_irq = ep93xx_init_irq, | 65 | .init_irq = ep93xx_init_irq, |
65 | .timer = &ep93xx_timer, | 66 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-ep93xx/edb9307.c b/arch/arm/mach-ep93xx/edb9307.c index 040edbd2ea05..5ab22f63a4eb 100644 --- a/arch/arm/mach-ep93xx/edb9307.c +++ b/arch/arm/mach-ep93xx/edb9307.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/i2c.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -28,8 +29,8 @@ static struct physmap_flash_data edb9307_flash_data = { | |||
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct resource edb9307_flash_resource = { | 31 | static struct resource edb9307_flash_resource = { |
31 | .start = 0x60000000, | 32 | .start = EP93XX_CS6_PHYS_BASE, |
32 | .end = 0x61ffffff, | 33 | .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1, |
33 | .flags = IORESOURCE_MEM, | 34 | .flags = IORESOURCE_MEM, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -44,7 +45,7 @@ static struct platform_device edb9307_flash = { | |||
44 | }; | 45 | }; |
45 | 46 | ||
46 | static struct ep93xx_eth_data edb9307_eth_data = { | 47 | static struct ep93xx_eth_data edb9307_eth_data = { |
47 | .phy_id = 1, | 48 | .phy_id = 1, |
48 | }; | 49 | }; |
49 | 50 | ||
50 | static void __init edb9307_init_machine(void) | 51 | static void __init edb9307_init_machine(void) |
@@ -59,7 +60,7 @@ MACHINE_START(EDB9307, "Cirrus Logic EDB9307 Evaluation Board") | |||
59 | /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ | 60 | /* Maintainer: Herbert Valerio Riedel <hvr@gnu.org> */ |
60 | .phys_io = EP93XX_APB_PHYS_BASE, | 61 | .phys_io = EP93XX_APB_PHYS_BASE, |
61 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
62 | .boot_params = 0x00000100, | 63 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
63 | .map_io = ep93xx_map_io, | 64 | .map_io = ep93xx_map_io, |
64 | .init_irq = ep93xx_init_irq, | 65 | .init_irq = ep93xx_init_irq, |
65 | .timer = &ep93xx_timer, | 66 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-ep93xx/edb9307a.c b/arch/arm/mach-ep93xx/edb9307a.c new file mode 100644 index 000000000000..5b5c22b681be --- /dev/null +++ b/arch/arm/mach-ep93xx/edb9307a.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/edb9307a.c | ||
3 | * Cirrus Logic EDB9307A support. | ||
4 | * | ||
5 | * Copyright (C) 2008 H Hartley Sweeten <hsweeten@visionengravers.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/sched.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/mtd/physmap.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | #include <asm/mach/arch.h> | ||
26 | |||
27 | static struct physmap_flash_data edb9307a_flash_data = { | ||
28 | .width = 2, | ||
29 | }; | ||
30 | |||
31 | static struct resource edb9307a_flash_resource = { | ||
32 | .start = EP93XX_CS6_PHYS_BASE, | ||
33 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, | ||
34 | .flags = IORESOURCE_MEM, | ||
35 | }; | ||
36 | |||
37 | static struct platform_device edb9307a_flash = { | ||
38 | .name = "physmap-flash", | ||
39 | .id = 0, | ||
40 | .dev = { | ||
41 | .platform_data = &edb9307a_flash_data, | ||
42 | }, | ||
43 | .num_resources = 1, | ||
44 | .resource = &edb9307a_flash_resource, | ||
45 | }; | ||
46 | |||
47 | static struct ep93xx_eth_data edb9307a_eth_data = { | ||
48 | .phy_id = 1, | ||
49 | }; | ||
50 | |||
51 | static void __init edb9307a_init_machine(void) | ||
52 | { | ||
53 | ep93xx_init_devices(); | ||
54 | platform_device_register(&edb9307a_flash); | ||
55 | |||
56 | ep93xx_register_eth(&edb9307a_eth_data, 1); | ||
57 | } | ||
58 | |||
59 | MACHINE_START(EDB9307A, "Cirrus Logic EDB9307A Evaluation Board") | ||
60 | /* Maintainer: H Hartley Sweeten <hsweeten@visionengravers.com> */ | ||
61 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
63 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
64 | .map_io = ep93xx_map_io, | ||
65 | .init_irq = ep93xx_init_irq, | ||
66 | .timer = &ep93xx_timer, | ||
67 | .init_machine = edb9307a_init_machine, | ||
68 | MACHINE_END | ||
diff --git a/arch/arm/mach-ep93xx/edb9312.c b/arch/arm/mach-ep93xx/edb9312.c index 6853e302bc3a..d7179f66d804 100644 --- a/arch/arm/mach-ep93xx/edb9312.c +++ b/arch/arm/mach-ep93xx/edb9312.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/mtd/physmap.h> | 20 | #include <linux/mtd/physmap.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
@@ -29,8 +30,8 @@ static struct physmap_flash_data edb9312_flash_data = { | |||
29 | }; | 30 | }; |
30 | 31 | ||
31 | static struct resource edb9312_flash_resource = { | 32 | static struct resource edb9312_flash_resource = { |
32 | .start = 0x60000000, | 33 | .start = EP93XX_CS6_PHYS_BASE, |
33 | .end = 0x61ffffff, | 34 | .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1, |
34 | .flags = IORESOURCE_MEM, | 35 | .flags = IORESOURCE_MEM, |
35 | }; | 36 | }; |
36 | 37 | ||
@@ -45,7 +46,7 @@ static struct platform_device edb9312_flash = { | |||
45 | }; | 46 | }; |
46 | 47 | ||
47 | static struct ep93xx_eth_data edb9312_eth_data = { | 48 | static struct ep93xx_eth_data edb9312_eth_data = { |
48 | .phy_id = 1, | 49 | .phy_id = 1, |
49 | }; | 50 | }; |
50 | 51 | ||
51 | static void __init edb9312_init_machine(void) | 52 | static void __init edb9312_init_machine(void) |
@@ -60,7 +61,7 @@ MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board") | |||
60 | /* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */ | 61 | /* Maintainer: Toufeeq Hussain <toufeeq_hussain@infosys.com> */ |
61 | .phys_io = EP93XX_APB_PHYS_BASE, | 62 | .phys_io = EP93XX_APB_PHYS_BASE, |
62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 63 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
63 | .boot_params = 0x00000100, | 64 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
64 | .map_io = ep93xx_map_io, | 65 | .map_io = ep93xx_map_io, |
65 | .init_irq = ep93xx_init_irq, | 66 | .init_irq = ep93xx_init_irq, |
66 | .timer = &ep93xx_timer, | 67 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-ep93xx/edb9315.c b/arch/arm/mach-ep93xx/edb9315.c index 9469b350d253..025af6eaca10 100644 --- a/arch/arm/mach-ep93xx/edb9315.c +++ b/arch/arm/mach-ep93xx/edb9315.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/i2c.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -28,8 +29,8 @@ static struct physmap_flash_data edb9315_flash_data = { | |||
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct resource edb9315_flash_resource = { | 31 | static struct resource edb9315_flash_resource = { |
31 | .start = 0x60000000, | 32 | .start = EP93XX_CS6_PHYS_BASE, |
32 | .end = 0x61ffffff, | 33 | .end = EP93XX_CS6_PHYS_BASE + SZ_32M - 1, |
33 | .flags = IORESOURCE_MEM, | 34 | .flags = IORESOURCE_MEM, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -44,7 +45,7 @@ static struct platform_device edb9315_flash = { | |||
44 | }; | 45 | }; |
45 | 46 | ||
46 | static struct ep93xx_eth_data edb9315_eth_data = { | 47 | static struct ep93xx_eth_data edb9315_eth_data = { |
47 | .phy_id = 1, | 48 | .phy_id = 1, |
48 | }; | 49 | }; |
49 | 50 | ||
50 | static void __init edb9315_init_machine(void) | 51 | static void __init edb9315_init_machine(void) |
@@ -59,7 +60,7 @@ MACHINE_START(EDB9315, "Cirrus Logic EDB9315 Evaluation Board") | |||
59 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | 60 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ |
60 | .phys_io = EP93XX_APB_PHYS_BASE, | 61 | .phys_io = EP93XX_APB_PHYS_BASE, |
61 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
62 | .boot_params = 0x00000100, | 63 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
63 | .map_io = ep93xx_map_io, | 64 | .map_io = ep93xx_map_io, |
64 | .init_irq = ep93xx_init_irq, | 65 | .init_irq = ep93xx_init_irq, |
65 | .timer = &ep93xx_timer, | 66 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c index 584457ce7c80..4c9cc8a39f5c 100644 --- a/arch/arm/mach-ep93xx/edb9315a.c +++ b/arch/arm/mach-ep93xx/edb9315a.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/i2c.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -28,8 +29,8 @@ static struct physmap_flash_data edb9315a_flash_data = { | |||
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct resource edb9315a_flash_resource = { | 31 | static struct resource edb9315a_flash_resource = { |
31 | .start = 0x60000000, | 32 | .start = EP93XX_CS6_PHYS_BASE, |
32 | .end = 0x60ffffff, | 33 | .end = EP93XX_CS6_PHYS_BASE + SZ_16M - 1, |
33 | .flags = IORESOURCE_MEM, | 34 | .flags = IORESOURCE_MEM, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -44,7 +45,7 @@ static struct platform_device edb9315a_flash = { | |||
44 | }; | 45 | }; |
45 | 46 | ||
46 | static struct ep93xx_eth_data edb9315a_eth_data = { | 47 | static struct ep93xx_eth_data edb9315a_eth_data = { |
47 | .phy_id = 1, | 48 | .phy_id = 1, |
48 | }; | 49 | }; |
49 | 50 | ||
50 | static void __init edb9315a_init_machine(void) | 51 | static void __init edb9315a_init_machine(void) |
@@ -59,7 +60,7 @@ MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") | |||
59 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | 60 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ |
60 | .phys_io = EP93XX_APB_PHYS_BASE, | 61 | .phys_io = EP93XX_APB_PHYS_BASE, |
61 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
62 | .boot_params = 0xc0000100, | 63 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, |
63 | .map_io = ep93xx_map_io, | 64 | .map_io = ep93xx_map_io, |
64 | .init_irq = ep93xx_init_irq, | 65 | .init_irq = ep93xx_init_irq, |
65 | .timer = &ep93xx_timer, | 66 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c index 035b24e31b64..3bad500b71b6 100644 --- a/arch/arm/mach-ep93xx/gesbc9312.c +++ b/arch/arm/mach-ep93xx/gesbc9312.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/physmap.h> | 19 | #include <linux/mtd/physmap.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/i2c.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <asm/mach/arch.h> | 25 | #include <asm/mach/arch.h> |
@@ -28,8 +29,8 @@ static struct physmap_flash_data gesbc9312_flash_data = { | |||
28 | }; | 29 | }; |
29 | 30 | ||
30 | static struct resource gesbc9312_flash_resource = { | 31 | static struct resource gesbc9312_flash_resource = { |
31 | .start = 0x60000000, | 32 | .start = EP93XX_CS6_PHYS_BASE, |
32 | .end = 0x607fffff, | 33 | .end = EP93XX_CS6_PHYS_BASE + SZ_8M - 1, |
33 | .flags = IORESOURCE_MEM, | 34 | .flags = IORESOURCE_MEM, |
34 | }; | 35 | }; |
35 | 36 | ||
@@ -59,7 +60,7 @@ MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") | |||
59 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | 60 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ |
60 | .phys_io = EP93XX_APB_PHYS_BASE, | 61 | .phys_io = EP93XX_APB_PHYS_BASE, |
61 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 62 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
62 | .boot_params = 0x00000100, | 63 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
63 | .map_io = ep93xx_map_io, | 64 | .map_io = ep93xx_map_io, |
64 | .init_irq = ep93xx_init_irq, | 65 | .init_irq = ep93xx_init_irq, |
65 | .timer = &ep93xx_timer, | 66 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-ep93xx/include/mach/clkdev.h b/arch/arm/mach-ep93xx/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-ep93xx/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/dma.h b/arch/arm/mach-ep93xx/include/mach/dma.h deleted file mode 100644 index d0fa9656e92f..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/dma.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/dma.h | ||
3 | */ | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio.h index f7020414c5df..0a1498ae899a 100644 --- a/arch/arm/mach-ep93xx/include/mach/gpio.h +++ b/arch/arm/mach-ep93xx/include/mach/gpio.h | |||
@@ -99,6 +99,8 @@ | |||
99 | /* maximum value for irq capable line identifiers */ | 99 | /* maximum value for irq capable line identifiers */ |
100 | #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) | 100 | #define EP93XX_GPIO_LINE_MAX_IRQ EP93XX_GPIO_LINE_F(7) |
101 | 101 | ||
102 | extern void ep93xx_gpio_int_debounce(unsigned int irq, int enable); | ||
103 | |||
102 | /* new generic GPIO API - see Documentation/gpio.txt */ | 104 | /* new generic GPIO API - see Documentation/gpio.txt */ |
103 | 105 | ||
104 | #include <asm-generic/gpio.h> | 106 | #include <asm-generic/gpio.h> |
diff --git a/arch/arm/mach-ep93xx/include/mach/io.h b/arch/arm/mach-ep93xx/include/mach/io.h index 1ab9a90ad339..fd5f081cc8b7 100644 --- a/arch/arm/mach-ep93xx/include/mach/io.h +++ b/arch/arm/mach-ep93xx/include/mach/io.h | |||
@@ -4,5 +4,5 @@ | |||
4 | 4 | ||
5 | #define IO_SPACE_LIMIT 0xffffffff | 5 | #define IO_SPACE_LIMIT 0xffffffff |
6 | 6 | ||
7 | #define __io(p) ((void __iomem *)(p)) | 7 | #define __io(p) __typesafe_io(p) |
8 | #define __mem_pci(p) (p) | 8 | #define __mem_pci(p) (p) |
diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h index f1b633590752..5c80c3c8158d 100644 --- a/arch/arm/mach-ep93xx/include/mach/memory.h +++ b/arch/arm/mach-ep93xx/include/mach/memory.h | |||
@@ -7,8 +7,4 @@ | |||
7 | 7 | ||
8 | #define PHYS_OFFSET UL(0x00000000) | 8 | #define PHYS_OFFSET UL(0x00000000) |
9 | 9 | ||
10 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
11 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
12 | |||
13 | |||
14 | #endif | 10 | #endif |
diff --git a/arch/arm/mach-ep93xx/include/mach/platform.h b/arch/arm/mach-ep93xx/include/mach/platform.h index db2489d3bda7..88f7e88f152f 100644 --- a/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/arch/arm/mach-ep93xx/include/mach/platform.h | |||
@@ -14,6 +14,7 @@ void ep93xx_map_io(void); | |||
14 | void ep93xx_init_irq(void); | 14 | void ep93xx_init_irq(void); |
15 | void ep93xx_init_time(unsigned long); | 15 | void ep93xx_init_time(unsigned long); |
16 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); | 16 | void ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr); |
17 | void ep93xx_register_i2c(struct i2c_board_info *devices, int num); | ||
17 | void ep93xx_init_devices(void); | 18 | void ep93xx_init_devices(void); |
18 | extern struct sys_timer ep93xx_timer; | 19 | extern struct sys_timer ep93xx_timer; |
19 | 20 | ||
diff --git a/arch/arm/mach-ep93xx/micro9.c b/arch/arm/mach-ep93xx/micro9.c index c2197236b632..15d6815d78c4 100644 --- a/arch/arm/mach-ep93xx/micro9.c +++ b/arch/arm/mach-ep93xx/micro9.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/i2c.h> | ||
20 | #include <linux/mtd/physmap.h> | 21 | #include <linux/mtd/physmap.h> |
21 | 22 | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
@@ -25,7 +26,7 @@ | |||
25 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
26 | 27 | ||
27 | static struct ep93xx_eth_data micro9_eth_data = { | 28 | static struct ep93xx_eth_data micro9_eth_data = { |
28 | .phy_id = 0x1f, | 29 | .phy_id = 0x1f, |
29 | }; | 30 | }; |
30 | 31 | ||
31 | static void __init micro9_init(void) | 32 | static void __init micro9_init(void) |
@@ -38,46 +39,46 @@ static void __init micro9_init(void) | |||
38 | */ | 39 | */ |
39 | #ifdef CONFIG_MACH_MICRO9H | 40 | #ifdef CONFIG_MACH_MICRO9H |
40 | static struct physmap_flash_data micro9h_flash_data = { | 41 | static struct physmap_flash_data micro9h_flash_data = { |
41 | .width = 4, | 42 | .width = 4, |
42 | }; | 43 | }; |
43 | 44 | ||
44 | static struct resource micro9h_flash_resource = { | 45 | static struct resource micro9h_flash_resource = { |
45 | .start = 0x10000000, | 46 | .start = EP93XX_CS1_PHYS_BASE, |
46 | .end = 0x13ffffff, | 47 | .end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1, |
47 | .flags = IORESOURCE_MEM, | 48 | .flags = IORESOURCE_MEM, |
48 | }; | 49 | }; |
49 | 50 | ||
50 | static struct platform_device micro9h_flash = { | 51 | static struct platform_device micro9h_flash = { |
51 | .name = "physmap-flash", | 52 | .name = "physmap-flash", |
52 | .id = 0, | 53 | .id = 0, |
53 | .dev = { | 54 | .dev = { |
54 | .platform_data = µ9h_flash_data, | 55 | .platform_data = µ9h_flash_data, |
55 | }, | 56 | }, |
56 | .num_resources = 1, | 57 | .num_resources = 1, |
57 | .resource = µ9h_flash_resource, | 58 | .resource = µ9h_flash_resource, |
58 | }; | 59 | }; |
59 | 60 | ||
60 | static void __init micro9h_init(void) | 61 | static void __init micro9h_init(void) |
61 | { | 62 | { |
62 | platform_device_register(µ9h_flash); | 63 | platform_device_register(µ9h_flash); |
63 | } | 64 | } |
64 | 65 | ||
65 | static void __init micro9h_init_machine(void) | 66 | static void __init micro9h_init_machine(void) |
66 | { | 67 | { |
67 | ep93xx_init_devices(); | 68 | ep93xx_init_devices(); |
68 | micro9_init(); | 69 | micro9_init(); |
69 | micro9h_init(); | 70 | micro9h_init(); |
70 | } | 71 | } |
71 | 72 | ||
72 | MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H") | 73 | MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H") |
73 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ | 74 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ |
74 | .phys_io = EP93XX_APB_PHYS_BASE, | 75 | .phys_io = EP93XX_APB_PHYS_BASE, |
75 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 76 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
76 | .boot_params = 0x00000100, | 77 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
77 | .map_io = ep93xx_map_io, | 78 | .map_io = ep93xx_map_io, |
78 | .init_irq = ep93xx_init_irq, | 79 | .init_irq = ep93xx_init_irq, |
79 | .timer = &ep93xx_timer, | 80 | .timer = &ep93xx_timer, |
80 | .init_machine = micro9h_init_machine, | 81 | .init_machine = micro9h_init_machine, |
81 | MACHINE_END | 82 | MACHINE_END |
82 | #endif | 83 | #endif |
83 | 84 | ||
@@ -87,19 +88,19 @@ MACHINE_END | |||
87 | #ifdef CONFIG_MACH_MICRO9M | 88 | #ifdef CONFIG_MACH_MICRO9M |
88 | static void __init micro9m_init_machine(void) | 89 | static void __init micro9m_init_machine(void) |
89 | { | 90 | { |
90 | ep93xx_init_devices(); | 91 | ep93xx_init_devices(); |
91 | micro9_init(); | 92 | micro9_init(); |
92 | } | 93 | } |
93 | 94 | ||
94 | MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M") | 95 | MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M") |
95 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ | 96 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ |
96 | .phys_io = EP93XX_APB_PHYS_BASE, | 97 | .phys_io = EP93XX_APB_PHYS_BASE, |
97 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 98 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
98 | .boot_params = 0x00000100, | 99 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
99 | .map_io = ep93xx_map_io, | 100 | .map_io = ep93xx_map_io, |
100 | .init_irq = ep93xx_init_irq, | 101 | .init_irq = ep93xx_init_irq, |
101 | .timer = &ep93xx_timer, | 102 | .timer = &ep93xx_timer, |
102 | .init_machine = micro9m_init_machine, | 103 | .init_machine = micro9m_init_machine, |
103 | MACHINE_END | 104 | MACHINE_END |
104 | #endif | 105 | #endif |
105 | 106 | ||
@@ -109,19 +110,19 @@ MACHINE_END | |||
109 | #ifdef CONFIG_MACH_MICRO9L | 110 | #ifdef CONFIG_MACH_MICRO9L |
110 | static void __init micro9l_init_machine(void) | 111 | static void __init micro9l_init_machine(void) |
111 | { | 112 | { |
112 | ep93xx_init_devices(); | 113 | ep93xx_init_devices(); |
113 | micro9_init(); | 114 | micro9_init(); |
114 | } | 115 | } |
115 | 116 | ||
116 | MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L") | 117 | MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L") |
117 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ | 118 | /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */ |
118 | .phys_io = EP93XX_APB_PHYS_BASE, | 119 | .phys_io = EP93XX_APB_PHYS_BASE, |
119 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 120 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
120 | .boot_params = 0x00000100, | 121 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
121 | .map_io = ep93xx_map_io, | 122 | .map_io = ep93xx_map_io, |
122 | .init_irq = ep93xx_init_irq, | 123 | .init_irq = ep93xx_init_irq, |
123 | .timer = &ep93xx_timer, | 124 | .timer = &ep93xx_timer, |
124 | .init_machine = micro9l_init_machine, | 125 | .init_machine = micro9l_init_machine, |
125 | MACHINE_END | 126 | MACHINE_END |
126 | #endif | 127 | #endif |
127 | 128 | ||
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c index b4aa4c054276..7ee024d34829 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c +++ b/arch/arm/mach-ep93xx/ts72xx.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/m48t86.h> | 21 | #include <linux/m48t86.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/i2c.h> | ||
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
@@ -117,7 +118,7 @@ static struct physmap_flash_data ts72xx_flash_data = { | |||
117 | 118 | ||
118 | static struct resource ts72xx_flash_resource = { | 119 | static struct resource ts72xx_flash_resource = { |
119 | .start = TS72XX_NOR_PHYS_BASE, | 120 | .start = TS72XX_NOR_PHYS_BASE, |
120 | .end = TS72XX_NOR_PHYS_BASE + 0x00ffffff, | 121 | .end = TS72XX_NOR_PHYS_BASE + SZ_16M - 1, |
121 | .flags = IORESOURCE_MEM, | 122 | .flags = IORESOURCE_MEM, |
122 | }; | 123 | }; |
123 | 124 | ||
@@ -144,21 +145,21 @@ static void ts72xx_rtc_writebyte(unsigned char value, unsigned long addr) | |||
144 | } | 145 | } |
145 | 146 | ||
146 | static struct m48t86_ops ts72xx_rtc_ops = { | 147 | static struct m48t86_ops ts72xx_rtc_ops = { |
147 | .readbyte = ts72xx_rtc_readbyte, | 148 | .readbyte = ts72xx_rtc_readbyte, |
148 | .writebyte = ts72xx_rtc_writebyte, | 149 | .writebyte = ts72xx_rtc_writebyte, |
149 | }; | 150 | }; |
150 | 151 | ||
151 | static struct platform_device ts72xx_rtc_device = { | 152 | static struct platform_device ts72xx_rtc_device = { |
152 | .name = "rtc-m48t86", | 153 | .name = "rtc-m48t86", |
153 | .id = -1, | 154 | .id = -1, |
154 | .dev = { | 155 | .dev = { |
155 | .platform_data = &ts72xx_rtc_ops, | 156 | .platform_data = &ts72xx_rtc_ops, |
156 | }, | 157 | }, |
157 | .num_resources = 0, | 158 | .num_resources = 0, |
158 | }; | 159 | }; |
159 | 160 | ||
160 | static struct ep93xx_eth_data ts72xx_eth_data = { | 161 | static struct ep93xx_eth_data ts72xx_eth_data = { |
161 | .phy_id = 1, | 162 | .phy_id = 1, |
162 | }; | 163 | }; |
163 | 164 | ||
164 | static void __init ts72xx_init_machine(void) | 165 | static void __init ts72xx_init_machine(void) |
@@ -175,7 +176,7 @@ MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") | |||
175 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ | 176 | /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */ |
176 | .phys_io = EP93XX_APB_PHYS_BASE, | 177 | .phys_io = EP93XX_APB_PHYS_BASE, |
177 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | 178 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, |
178 | .boot_params = 0x00000100, | 179 | .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100, |
179 | .map_io = ts72xx_map_io, | 180 | .map_io = ts72xx_map_io, |
180 | .init_irq = ep93xx_init_irq, | 181 | .init_irq = ep93xx_init_irq, |
181 | .timer = &ep93xx_timer, | 182 | .timer = &ep93xx_timer, |
diff --git a/arch/arm/mach-footbridge/cats-hw.c b/arch/arm/mach-footbridge/cats-hw.c index 6a5b437ab86f..1b996b26d2e0 100644 --- a/arch/arm/mach-footbridge/cats-hw.c +++ b/arch/arm/mach-footbridge/cats-hw.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/screen_info.h> | 11 | #include <linux/screen_info.h> |
12 | #include <linux/io.h> | 12 | #include <linux/io.h> |
13 | #include <linux/spinlock.h> | ||
13 | 14 | ||
14 | #include <asm/hardware/dec21285.h> | 15 | #include <asm/hardware/dec21285.h> |
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c index 818014e09f4a..36ff06d4df15 100644 --- a/arch/arm/mach-footbridge/common.c +++ b/arch/arm/mach-footbridge/common.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/spinlock.h> | ||
17 | 18 | ||
18 | #include <asm/pgtable.h> | 19 | #include <asm/pgtable.h> |
19 | #include <asm/page.h> | 20 | #include <asm/page.h> |
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c index b2a21189dd81..da35bc5c5ccc 100644 --- a/arch/arm/mach-footbridge/dc21285-timer.c +++ b/arch/arm/mach-footbridge/dc21285-timer.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | #include <linux/interrupt.h> | 8 | #include <linux/interrupt.h> |
9 | #include <linux/irq.h> | 9 | #include <linux/irq.h> |
10 | #include <linux/spinlock.h> | ||
10 | 11 | ||
11 | #include <asm/irq.h> | 12 | #include <asm/irq.h> |
12 | 13 | ||
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c index d4c1e526f59c..133086019e3e 100644 --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/spinlock.h> | ||
20 | 21 | ||
21 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
22 | #include <asm/system.h> | 23 | #include <asm/system.h> |
diff --git a/arch/arm/mach-footbridge/dma.c b/arch/arm/mach-footbridge/dma.c index b653e9cfa3f7..4f3506346969 100644 --- a/arch/arm/mach-footbridge/dma.c +++ b/arch/arm/mach-footbridge/dma.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/spinlock.h> | ||
15 | 16 | ||
16 | #include <asm/dma.h> | 17 | #include <asm/dma.h> |
17 | #include <asm/scatterlist.h> | 18 | #include <asm/scatterlist.h> |
diff --git a/arch/arm/mach-footbridge/ebsa285.c b/arch/arm/mach-footbridge/ebsa285.c index b1d3bf20a41e..30040fd588cc 100644 --- a/arch/arm/mach-footbridge/ebsa285.c +++ b/arch/arm/mach-footbridge/ebsa285.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * EBSA285 machine fixup | 4 | * EBSA285 machine fixup |
5 | */ | 5 | */ |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/spinlock.h> | ||
7 | 8 | ||
8 | #include <asm/hardware/dec21285.h> | 9 | #include <asm/hardware/dec21285.h> |
9 | #include <asm/mach-types.h> | 10 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-footbridge/include/mach/hardware.h b/arch/arm/mach-footbridge/include/mach/hardware.h index ffaea90486f9..51dd902043ad 100644 --- a/arch/arm/mach-footbridge/include/mach/hardware.h +++ b/arch/arm/mach-footbridge/include/mach/hardware.h | |||
@@ -12,8 +12,6 @@ | |||
12 | #ifndef __ASM_ARCH_HARDWARE_H | 12 | #ifndef __ASM_ARCH_HARDWARE_H |
13 | #define __ASM_ARCH_HARDWARE_H | 13 | #define __ASM_ARCH_HARDWARE_H |
14 | 14 | ||
15 | #include <mach/memory.h> | ||
16 | |||
17 | /* Virtual Physical Size | 15 | /* Virtual Physical Size |
18 | * 0xff800000 0x40000000 1MB X-Bus | 16 | * 0xff800000 0x40000000 1MB X-Bus |
19 | * 0xff000000 0x7c000000 1MB PCI I/O space | 17 | * 0xff000000 0x7c000000 1MB PCI I/O space |
@@ -28,9 +26,6 @@ | |||
28 | #define XBUS_SIZE 0x00100000 | 26 | #define XBUS_SIZE 0x00100000 |
29 | #define XBUS_BASE 0xff800000 | 27 | #define XBUS_BASE 0xff800000 |
30 | 28 | ||
31 | #define PCIO_SIZE 0x00100000 | ||
32 | #define PCIO_BASE 0xff000000 | ||
33 | |||
34 | #define ARMCSR_SIZE 0x00100000 | 29 | #define ARMCSR_SIZE 0x00100000 |
35 | #define ARMCSR_BASE 0xfe000000 | 30 | #define ARMCSR_BASE 0xfe000000 |
36 | 31 | ||
@@ -91,10 +86,11 @@ | |||
91 | #define CPLD_FLASH_WR_ENABLE 1 | 86 | #define CPLD_FLASH_WR_ENABLE 1 |
92 | 87 | ||
93 | #ifndef __ASSEMBLY__ | 88 | #ifndef __ASSEMBLY__ |
94 | extern void gpio_modify_op(int mask, int set); | 89 | extern spinlock_t nw_gpio_lock; |
95 | extern void gpio_modify_io(int mask, int in); | 90 | extern void nw_gpio_modify_op(unsigned int mask, unsigned int set); |
96 | extern int gpio_read(void); | 91 | extern void nw_gpio_modify_io(unsigned int mask, unsigned int in); |
97 | extern void cpld_modify(int mask, int set); | 92 | extern unsigned int nw_gpio_read(void); |
93 | extern void nw_cpld_modify(unsigned int mask, unsigned int set); | ||
98 | #endif | 94 | #endif |
99 | 95 | ||
100 | #define pcibios_assign_all_busses() 1 | 96 | #define pcibios_assign_all_busses() 1 |
diff --git a/arch/arm/mach-footbridge/include/mach/io.h b/arch/arm/mach-footbridge/include/mach/io.h index a7b066239996..101a4fe90bde 100644 --- a/arch/arm/mach-footbridge/include/mach/io.h +++ b/arch/arm/mach-footbridge/include/mach/io.h | |||
@@ -14,7 +14,8 @@ | |||
14 | #ifndef __ASM_ARM_ARCH_IO_H | 14 | #ifndef __ASM_ARM_ARCH_IO_H |
15 | #define __ASM_ARM_ARCH_IO_H | 15 | #define __ASM_ARM_ARCH_IO_H |
16 | 16 | ||
17 | #include <mach/hardware.h> | 17 | #define PCIO_SIZE 0x00100000 |
18 | #define PCIO_BASE 0xff000000 | ||
18 | 19 | ||
19 | #define IO_SPACE_LIMIT 0xffff | 20 | #define IO_SPACE_LIMIT 0xffff |
20 | 21 | ||
diff --git a/arch/arm/mach-footbridge/include/mach/dma.h b/arch/arm/mach-footbridge/include/mach/isa-dma.h index 62afd213effb..5bd4a0d338a8 100644 --- a/arch/arm/mach-footbridge/include/mach/dma.h +++ b/arch/arm/mach-footbridge/include/mach/isa-dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-footbridge/include/mach/dma.h | 2 | * arch/arm/mach-footbridge/include/mach/isa-dma.h |
3 | * | 3 | * |
4 | * Architecture DMA routines | 4 | * Architecture DMA routines |
5 | * | 5 | * |
diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h index 6ae2f1a07ab9..cb16e59d87b6 100644 --- a/arch/arm/mach-footbridge/include/mach/memory.h +++ b/arch/arm/mach-footbridge/include/mach/memory.h | |||
@@ -30,9 +30,18 @@ | |||
30 | extern unsigned long __virt_to_bus(unsigned long); | 30 | extern unsigned long __virt_to_bus(unsigned long); |
31 | extern unsigned long __bus_to_virt(unsigned long); | 31 | extern unsigned long __bus_to_virt(unsigned long); |
32 | #endif | 32 | #endif |
33 | #define __virt_to_bus __virt_to_bus | ||
34 | #define __bus_to_virt __bus_to_virt | ||
33 | 35 | ||
34 | #elif defined(CONFIG_FOOTBRIDGE_HOST) | 36 | #elif defined(CONFIG_FOOTBRIDGE_HOST) |
35 | 37 | ||
38 | /* | ||
39 | * The footbridge is programmed to expose the system RAM at the corresponding | ||
40 | * address. So, if PAGE_OFFSET is 0xc0000000, RAM appears at 0xe0000000. | ||
41 | * If 0x80000000, then its exposed at 0xa0000000 on the bus. etc. | ||
42 | * The only requirement is that the RAM isn't placed at bus address 0 which | ||
43 | * would clash with VGA cards. | ||
44 | */ | ||
36 | #define __virt_to_bus(x) ((x) - 0xe0000000) | 45 | #define __virt_to_bus(x) ((x) - 0xe0000000) |
37 | #define __bus_to_virt(x) ((x) + 0xe0000000) | 46 | #define __bus_to_virt(x) ((x) + 0xe0000000) |
38 | 47 | ||
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c index 54fec9ae28b9..9ee80a211d3c 100644 --- a/arch/arm/mach-footbridge/isa-irq.c +++ b/arch/arm/mach-footbridge/isa-irq.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/list.h> | 19 | #include <linux/list.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/spinlock.h> | ||
22 | 23 | ||
23 | #include <asm/mach/irq.h> | 24 | #include <asm/mach/irq.h> |
24 | 25 | ||
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c index 00b0ddcac283..ac7ffa6fc413 100644 --- a/arch/arm/mach-footbridge/netwinder-hw.c +++ b/arch/arm/mach-footbridge/netwinder-hw.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/delay.h> | 11 | #include <linux/delay.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/spinlock.h> | ||
14 | 15 | ||
15 | #include <asm/hardware/dec21285.h> | 16 | #include <asm/hardware/dec21285.h> |
16 | #include <asm/leds.h> | 17 | #include <asm/leds.h> |
@@ -67,13 +68,14 @@ static inline void wb977_ww(int reg, int val) | |||
67 | /* | 68 | /* |
68 | * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE | 69 | * This is a lock for accessing ports GP1_IO_BASE and GP2_IO_BASE |
69 | */ | 70 | */ |
70 | DEFINE_SPINLOCK(gpio_lock); | 71 | DEFINE_SPINLOCK(nw_gpio_lock); |
72 | EXPORT_SYMBOL(nw_gpio_lock); | ||
71 | 73 | ||
72 | static unsigned int current_gpio_op; | 74 | static unsigned int current_gpio_op; |
73 | static unsigned int current_gpio_io; | 75 | static unsigned int current_gpio_io; |
74 | static unsigned int current_cpld; | 76 | static unsigned int current_cpld; |
75 | 77 | ||
76 | void gpio_modify_op(int mask, int set) | 78 | void nw_gpio_modify_op(unsigned int mask, unsigned int set) |
77 | { | 79 | { |
78 | unsigned int new_gpio, changed; | 80 | unsigned int new_gpio, changed; |
79 | 81 | ||
@@ -86,6 +88,7 @@ void gpio_modify_op(int mask, int set) | |||
86 | if (changed & 0xff00) | 88 | if (changed & 0xff00) |
87 | outb(new_gpio >> 8, GP2_IO_BASE); | 89 | outb(new_gpio >> 8, GP2_IO_BASE); |
88 | } | 90 | } |
91 | EXPORT_SYMBOL(nw_gpio_modify_op); | ||
89 | 92 | ||
90 | static inline void __gpio_modify_io(int mask, int in) | 93 | static inline void __gpio_modify_io(int mask, int in) |
91 | { | 94 | { |
@@ -118,7 +121,7 @@ static inline void __gpio_modify_io(int mask, int in) | |||
118 | } | 121 | } |
119 | } | 122 | } |
120 | 123 | ||
121 | void gpio_modify_io(int mask, int in) | 124 | void nw_gpio_modify_io(unsigned int mask, unsigned int in) |
122 | { | 125 | { |
123 | /* Open up the SuperIO chip */ | 126 | /* Open up the SuperIO chip */ |
124 | wb977_open(); | 127 | wb977_open(); |
@@ -128,11 +131,13 @@ void gpio_modify_io(int mask, int in) | |||
128 | /* Close up the EFER gate */ | 131 | /* Close up the EFER gate */ |
129 | wb977_close(); | 132 | wb977_close(); |
130 | } | 133 | } |
134 | EXPORT_SYMBOL(nw_gpio_modify_io); | ||
131 | 135 | ||
132 | int gpio_read(void) | 136 | unsigned int nw_gpio_read(void) |
133 | { | 137 | { |
134 | return inb(GP1_IO_BASE) | inb(GP2_IO_BASE) << 8; | 138 | return inb(GP1_IO_BASE) | inb(GP2_IO_BASE) << 8; |
135 | } | 139 | } |
140 | EXPORT_SYMBOL(nw_gpio_read); | ||
136 | 141 | ||
137 | /* | 142 | /* |
138 | * Initialise the Winbond W83977F global registers | 143 | * Initialise the Winbond W83977F global registers |
@@ -322,9 +327,9 @@ static inline void wb977_init_gpio(void) | |||
322 | /* | 327 | /* |
323 | * Set Group1/Group2 outputs | 328 | * Set Group1/Group2 outputs |
324 | */ | 329 | */ |
325 | spin_lock_irqsave(&gpio_lock, flags); | 330 | spin_lock_irqsave(&nw_gpio_lock, flags); |
326 | gpio_modify_op(-1, GPIO_RED_LED | GPIO_FAN); | 331 | nw_gpio_modify_op(-1, GPIO_RED_LED | GPIO_FAN); |
327 | spin_unlock_irqrestore(&gpio_lock, flags); | 332 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
328 | } | 333 | } |
329 | 334 | ||
330 | /* | 335 | /* |
@@ -359,34 +364,35 @@ static void __init wb977_init(void) | |||
359 | wb977_close(); | 364 | wb977_close(); |
360 | } | 365 | } |
361 | 366 | ||
362 | void cpld_modify(int mask, int set) | 367 | void nw_cpld_modify(unsigned int mask, unsigned int set) |
363 | { | 368 | { |
364 | int msk; | 369 | int msk; |
365 | 370 | ||
366 | current_cpld = (current_cpld & ~mask) | set; | 371 | current_cpld = (current_cpld & ~mask) | set; |
367 | 372 | ||
368 | gpio_modify_io(GPIO_DATA | GPIO_IOCLK | GPIO_IOLOAD, 0); | 373 | nw_gpio_modify_io(GPIO_DATA | GPIO_IOCLK | GPIO_IOLOAD, 0); |
369 | gpio_modify_op(GPIO_IOLOAD, 0); | 374 | nw_gpio_modify_op(GPIO_IOLOAD, 0); |
370 | 375 | ||
371 | for (msk = 8; msk; msk >>= 1) { | 376 | for (msk = 8; msk; msk >>= 1) { |
372 | int bit = current_cpld & msk; | 377 | int bit = current_cpld & msk; |
373 | 378 | ||
374 | gpio_modify_op(GPIO_DATA | GPIO_IOCLK, bit ? GPIO_DATA : 0); | 379 | nw_gpio_modify_op(GPIO_DATA | GPIO_IOCLK, bit ? GPIO_DATA : 0); |
375 | gpio_modify_op(GPIO_IOCLK, GPIO_IOCLK); | 380 | nw_gpio_modify_op(GPIO_IOCLK, GPIO_IOCLK); |
376 | } | 381 | } |
377 | 382 | ||
378 | gpio_modify_op(GPIO_IOCLK|GPIO_DATA, 0); | 383 | nw_gpio_modify_op(GPIO_IOCLK|GPIO_DATA, 0); |
379 | gpio_modify_op(GPIO_IOLOAD|GPIO_DSCLK, GPIO_IOLOAD|GPIO_DSCLK); | 384 | nw_gpio_modify_op(GPIO_IOLOAD|GPIO_DSCLK, GPIO_IOLOAD|GPIO_DSCLK); |
380 | gpio_modify_op(GPIO_IOLOAD, 0); | 385 | nw_gpio_modify_op(GPIO_IOLOAD, 0); |
381 | } | 386 | } |
387 | EXPORT_SYMBOL(nw_cpld_modify); | ||
382 | 388 | ||
383 | static void __init cpld_init(void) | 389 | static void __init cpld_init(void) |
384 | { | 390 | { |
385 | unsigned long flags; | 391 | unsigned long flags; |
386 | 392 | ||
387 | spin_lock_irqsave(&gpio_lock, flags); | 393 | spin_lock_irqsave(&nw_gpio_lock, flags); |
388 | cpld_modify(-1, CPLD_UNMUTE | CPLD_7111_DISABLE); | 394 | nw_cpld_modify(-1, CPLD_UNMUTE | CPLD_7111_DISABLE); |
389 | spin_unlock_irqrestore(&gpio_lock, flags); | 395 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
390 | } | 396 | } |
391 | 397 | ||
392 | static unsigned char rwa_unlock[] __initdata = | 398 | static unsigned char rwa_unlock[] __initdata = |
@@ -596,12 +602,6 @@ static void __init rwa010_init(void) | |||
596 | rwa010_soundblaster_reset(); | 602 | rwa010_soundblaster_reset(); |
597 | } | 603 | } |
598 | 604 | ||
599 | EXPORT_SYMBOL(gpio_lock); | ||
600 | EXPORT_SYMBOL(gpio_modify_op); | ||
601 | EXPORT_SYMBOL(gpio_modify_io); | ||
602 | EXPORT_SYMBOL(cpld_modify); | ||
603 | EXPORT_SYMBOL(gpio_read); | ||
604 | |||
605 | /* | 605 | /* |
606 | * Initialise any other hardware after we've got the PCI bus | 606 | * Initialise any other hardware after we've got the PCI bus |
607 | * initialised. We may need the PCI bus to talk to this other | 607 | * initialised. We may need the PCI bus to talk to this other |
@@ -616,9 +616,9 @@ static int __init nw_hw_init(void) | |||
616 | cpld_init(); | 616 | cpld_init(); |
617 | rwa010_init(); | 617 | rwa010_init(); |
618 | 618 | ||
619 | spin_lock_irqsave(&gpio_lock, flags); | 619 | spin_lock_irqsave(&nw_gpio_lock, flags); |
620 | gpio_modify_op(GPIO_RED_LED|GPIO_GREEN_LED, DEFAULT_LEDS); | 620 | nw_gpio_modify_op(GPIO_RED_LED|GPIO_GREEN_LED, DEFAULT_LEDS); |
621 | spin_unlock_irqrestore(&gpio_lock, flags); | 621 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
622 | } | 622 | } |
623 | return 0; | 623 | return 0; |
624 | } | 624 | } |
diff --git a/arch/arm/mach-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c index d91a4f4a32dc..00269fe0be8a 100644 --- a/arch/arm/mach-footbridge/netwinder-leds.c +++ b/arch/arm/mach-footbridge/netwinder-leds.c | |||
@@ -32,7 +32,6 @@ static char led_state; | |||
32 | static char hw_led_state; | 32 | static char hw_led_state; |
33 | 33 | ||
34 | static DEFINE_SPINLOCK(leds_lock); | 34 | static DEFINE_SPINLOCK(leds_lock); |
35 | extern spinlock_t gpio_lock; | ||
36 | 35 | ||
37 | static void netwinder_leds_event(led_event_t evt) | 36 | static void netwinder_leds_event(led_event_t evt) |
38 | { | 37 | { |
@@ -121,9 +120,9 @@ static void netwinder_leds_event(led_event_t evt) | |||
121 | spin_unlock_irqrestore(&leds_lock, flags); | 120 | spin_unlock_irqrestore(&leds_lock, flags); |
122 | 121 | ||
123 | if (led_state & LED_STATE_ENABLED) { | 122 | if (led_state & LED_STATE_ENABLED) { |
124 | spin_lock_irqsave(&gpio_lock, flags); | 123 | spin_lock_irqsave(&nw_gpio_lock, flags); |
125 | gpio_modify_op(GPIO_RED_LED | GPIO_GREEN_LED, hw_led_state); | 124 | nw_gpio_modify_op(GPIO_RED_LED | GPIO_GREEN_LED, hw_led_state); |
126 | spin_unlock_irqrestore(&gpio_lock, flags); | 125 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
127 | } | 126 | } |
128 | } | 127 | } |
129 | 128 | ||
diff --git a/arch/arm/mach-footbridge/personal.c b/arch/arm/mach-footbridge/personal.c index c4f843fc099d..e2c9f0690b16 100644 --- a/arch/arm/mach-footbridge/personal.c +++ b/arch/arm/mach-footbridge/personal.c | |||
@@ -4,6 +4,7 @@ | |||
4 | * Personal server (Skiff) machine fixup | 4 | * Personal server (Skiff) machine fixup |
5 | */ | 5 | */ |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/spinlock.h> | ||
7 | 8 | ||
8 | #include <asm/hardware/dec21285.h> | 9 | #include <asm/hardware/dec21285.h> |
9 | #include <asm/mach-types.h> | 10 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-h720x/include/mach/io.h b/arch/arm/mach-h720x/include/mach/io.h index 1dab74ce88c6..2c8659c21a93 100644 --- a/arch/arm/mach-h720x/include/mach/io.h +++ b/arch/arm/mach-h720x/include/mach/io.h | |||
@@ -14,11 +14,9 @@ | |||
14 | #ifndef __ASM_ARM_ARCH_IO_H | 14 | #ifndef __ASM_ARM_ARCH_IO_H |
15 | #define __ASM_ARM_ARCH_IO_H | 15 | #define __ASM_ARM_ARCH_IO_H |
16 | 16 | ||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | #define IO_SPACE_LIMIT 0xffffffff | 17 | #define IO_SPACE_LIMIT 0xffffffff |
20 | 18 | ||
21 | #define __io(a) ((void __iomem *)(a)) | 19 | #define __io(a) __typesafe_io(a) |
22 | #define __mem_pci(a) (a) | 20 | #define __mem_pci(a) (a) |
23 | 21 | ||
24 | #endif | 22 | #endif |
diff --git a/arch/arm/mach-h720x/include/mach/dma.h b/arch/arm/mach-h720x/include/mach/isa-dma.h index 0a9d86ee84fe..3eafb3f163c0 100644 --- a/arch/arm/mach-h720x/include/mach/dma.h +++ b/arch/arm/mach-h720x/include/mach/isa-dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-h720x/include/mach/dma.h | 2 | * arch/arm/mach-h720x/include/mach/isa-dma.h |
3 | * | 3 | * |
4 | * Architecture DMA routes | 4 | * Architecture DMA routes |
5 | * | 5 | * |
@@ -8,13 +8,6 @@ | |||
8 | #ifndef __ASM_ARCH_DMA_H | 8 | #ifndef __ASM_ARCH_DMA_H |
9 | #define __ASM_ARCH_DMA_H | 9 | #define __ASM_ARCH_DMA_H |
10 | 10 | ||
11 | /* | ||
12 | * This is the maximum DMA address that can be DMAd to. | ||
13 | * There should not be more than (0xd0000000 - 0xc0000000) | ||
14 | * bytes of RAM. | ||
15 | */ | ||
16 | #define MAX_DMA_ADDRESS 0xd0000000 | ||
17 | |||
18 | #if defined (CONFIG_CPU_H7201) | 11 | #if defined (CONFIG_CPU_H7201) |
19 | #define MAX_DMA_CHANNELS 3 | 12 | #define MAX_DMA_CHANNELS 3 |
20 | #elif defined (CONFIG_CPU_H7202) | 13 | #elif defined (CONFIG_CPU_H7202) |
diff --git a/arch/arm/mach-h720x/include/mach/memory.h b/arch/arm/mach-h720x/include/mach/memory.h index cb26f49cc4e1..ef4c1e26f18e 100644 --- a/arch/arm/mach-h720x/include/mach/memory.h +++ b/arch/arm/mach-h720x/include/mach/memory.h | |||
@@ -7,23 +7,13 @@ | |||
7 | #ifndef __ASM_ARCH_MEMORY_H | 7 | #ifndef __ASM_ARCH_MEMORY_H |
8 | #define __ASM_ARCH_MEMORY_H | 8 | #define __ASM_ARCH_MEMORY_H |
9 | 9 | ||
10 | /* | ||
11 | * Page offset: | ||
12 | * ( 0xc0000000UL ) | ||
13 | */ | ||
14 | #define PHYS_OFFSET UL(0x40000000) | 10 | #define PHYS_OFFSET UL(0x40000000) |
15 | |||
16 | /* | 11 | /* |
17 | * Virtual view <-> DMA view memory address translations | 12 | * This is the maximum DMA address that can be DMAd to. |
18 | * virt_to_bus: Used to translate the virtual address to an | 13 | * There should not be more than (0xd0000000 - 0xc0000000) |
19 | * address suitable to be passed to set_dma_addr | 14 | * bytes of RAM. |
20 | * bus_to_virt: Used to convert an address for DMA operations | ||
21 | * to an address that the kernel can use. | ||
22 | * | ||
23 | * There is something to do here later !, Mar 2000, Jungjun Kim | ||
24 | */ | 15 | */ |
25 | 16 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1) | |
26 | #define __virt_to_bus(x) __virt_to_phys(x) | 17 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M) |
27 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
28 | 18 | ||
29 | #endif | 19 | #endif |
diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c index c10810c936b3..1536583eece0 100644 --- a/arch/arm/mach-imx/dma.c +++ b/arch/arm/mach-imx/dma.c | |||
@@ -28,10 +28,11 @@ | |||
28 | #include <linux/interrupt.h> | 28 | #include <linux/interrupt.h> |
29 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
30 | 30 | ||
31 | #include <asm/scatterlist.h> | ||
31 | #include <asm/system.h> | 32 | #include <asm/system.h> |
32 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
34 | #include <asm/dma.h> | 35 | #include <mach/dma.h> |
35 | #include <mach/imx-dma.h> | 36 | #include <mach/imx-dma.h> |
36 | 37 | ||
37 | struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; | 38 | struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; |
@@ -138,7 +139,7 @@ imx_dma_setup_sg_base(imx_dmach_t dma_ch, | |||
138 | int | 139 | int |
139 | imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address, | 140 | imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address, |
140 | unsigned int dma_length, unsigned int dev_addr, | 141 | unsigned int dma_length, unsigned int dev_addr, |
141 | dmamode_t dmamode) | 142 | unsigned int dmamode) |
142 | { | 143 | { |
143 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | 144 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; |
144 | 145 | ||
@@ -223,7 +224,7 @@ imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address, | |||
223 | int | 224 | int |
224 | imx_dma_setup_sg(imx_dmach_t dma_ch, | 225 | imx_dma_setup_sg(imx_dmach_t dma_ch, |
225 | struct scatterlist *sg, unsigned int sgcount, unsigned int dma_length, | 226 | struct scatterlist *sg, unsigned int sgcount, unsigned int dma_length, |
226 | unsigned int dev_addr, dmamode_t dmamode) | 227 | unsigned int dev_addr, unsigned int dmamode) |
227 | { | 228 | { |
228 | int res; | 229 | int res; |
229 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; | 230 | struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; |
diff --git a/arch/arm/mach-imx/include/mach/imx-dma.h b/arch/arm/mach-imx/include/mach/imx-dma.h index 44d89c35539a..bbe54df7f0de 100644 --- a/arch/arm/mach-imx/include/mach/imx-dma.h +++ b/arch/arm/mach-imx/include/mach/imx-dma.h | |||
@@ -18,7 +18,7 @@ | |||
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 | 20 | ||
21 | #include <asm/dma.h> | 21 | #include <mach/dma.h> |
22 | 22 | ||
23 | #ifndef __ASM_ARCH_IMX_DMA_H | 23 | #ifndef __ASM_ARCH_IMX_DMA_H |
24 | #define __ASM_ARCH_IMX_DMA_H | 24 | #define __ASM_ARCH_IMX_DMA_H |
@@ -48,7 +48,7 @@ struct imx_dma_channel { | |||
48 | void (*irq_handler) (int, void *); | 48 | void (*irq_handler) (int, void *); |
49 | void (*err_handler) (int, void *, int errcode); | 49 | void (*err_handler) (int, void *, int errcode); |
50 | void *data; | 50 | void *data; |
51 | dmamode_t dma_mode; | 51 | unsigned int dma_mode; |
52 | struct scatterlist *sg; | 52 | struct scatterlist *sg; |
53 | unsigned int sgbc; | 53 | unsigned int sgbc; |
54 | unsigned int sgcount; | 54 | unsigned int sgcount; |
@@ -66,14 +66,18 @@ extern struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; | |||
66 | /* The type to distinguish channel numbers parameter from ordinal int type */ | 66 | /* The type to distinguish channel numbers parameter from ordinal int type */ |
67 | typedef int imx_dmach_t; | 67 | typedef int imx_dmach_t; |
68 | 68 | ||
69 | #define DMA_MODE_READ 0 | ||
70 | #define DMA_MODE_WRITE 1 | ||
71 | #define DMA_MODE_MASK 1 | ||
72 | |||
69 | int | 73 | int |
70 | imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address, | 74 | imx_dma_setup_single(imx_dmach_t dma_ch, dma_addr_t dma_address, |
71 | unsigned int dma_length, unsigned int dev_addr, dmamode_t dmamode); | 75 | unsigned int dma_length, unsigned int dev_addr, unsigned int dmamode); |
72 | 76 | ||
73 | int | 77 | int |
74 | imx_dma_setup_sg(imx_dmach_t dma_ch, | 78 | imx_dma_setup_sg(imx_dmach_t dma_ch, |
75 | struct scatterlist *sg, unsigned int sgcount, unsigned int dma_length, | 79 | struct scatterlist *sg, unsigned int sgcount, unsigned int dma_length, |
76 | unsigned int dev_addr, dmamode_t dmamode); | 80 | unsigned int dev_addr, unsigned int dmamode); |
77 | 81 | ||
78 | int | 82 | int |
79 | imx_dma_setup_handlers(imx_dmach_t dma_ch, | 83 | imx_dma_setup_handlers(imx_dmach_t dma_ch, |
diff --git a/arch/arm/mach-imx/include/mach/imxfb.h b/arch/arm/mach-imx/include/mach/imxfb.h index 3ed9ec8b9f00..870d0d939616 100644 --- a/arch/arm/mach-imx/include/mach/imxfb.h +++ b/arch/arm/mach-imx/include/mach/imxfb.h | |||
@@ -1,7 +1,52 @@ | |||
1 | /* | 1 | /* |
2 | * This structure describes the machine which we are running on. | 2 | * This structure describes the machine which we are running on. |
3 | */ | 3 | */ |
4 | struct imxfb_mach_info { | 4 | |
5 | #define PCR_TFT (1 << 31) | ||
6 | #define PCR_COLOR (1 << 30) | ||
7 | #define PCR_PBSIZ_1 (0 << 28) | ||
8 | #define PCR_PBSIZ_2 (1 << 28) | ||
9 | #define PCR_PBSIZ_4 (2 << 28) | ||
10 | #define PCR_PBSIZ_8 (3 << 28) | ||
11 | #define PCR_BPIX_1 (0 << 25) | ||
12 | #define PCR_BPIX_2 (1 << 25) | ||
13 | #define PCR_BPIX_4 (2 << 25) | ||
14 | #define PCR_BPIX_8 (3 << 25) | ||
15 | #define PCR_BPIX_12 (4 << 25) | ||
16 | #define PCR_BPIX_16 (4 << 25) | ||
17 | #define PCR_PIXPOL (1 << 24) | ||
18 | #define PCR_FLMPOL (1 << 23) | ||
19 | #define PCR_LPPOL (1 << 22) | ||
20 | #define PCR_CLKPOL (1 << 21) | ||
21 | #define PCR_OEPOL (1 << 20) | ||
22 | #define PCR_SCLKIDLE (1 << 19) | ||
23 | #define PCR_END_SEL (1 << 18) | ||
24 | #define PCR_END_BYTE_SWAP (1 << 17) | ||
25 | #define PCR_REV_VS (1 << 16) | ||
26 | #define PCR_ACD_SEL (1 << 15) | ||
27 | #define PCR_ACD(x) (((x) & 0x7f) << 8) | ||
28 | #define PCR_SCLK_SEL (1 << 7) | ||
29 | #define PCR_SHARP (1 << 6) | ||
30 | #define PCR_PCD(x) ((x) & 0x3f) | ||
31 | |||
32 | #define PWMR_CLS(x) (((x) & 0x1ff) << 16) | ||
33 | #define PWMR_LDMSK (1 << 15) | ||
34 | #define PWMR_SCR1 (1 << 10) | ||
35 | #define PWMR_SCR0 (1 << 9) | ||
36 | #define PWMR_CC_EN (1 << 8) | ||
37 | #define PWMR_PW(x) ((x) & 0xff) | ||
38 | |||
39 | #define LSCR1_PS_RISE_DELAY(x) (((x) & 0x7f) << 26) | ||
40 | #define LSCR1_CLS_RISE_DELAY(x) (((x) & 0x3f) << 16) | ||
41 | #define LSCR1_REV_TOGGLE_DELAY(x) (((x) & 0xf) << 8) | ||
42 | #define LSCR1_GRAY2(x) (((x) & 0xf) << 4) | ||
43 | #define LSCR1_GRAY1(x) (((x) & 0xf)) | ||
44 | |||
45 | #define DMACR_BURST (1 << 31) | ||
46 | #define DMACR_HM(x) (((x) & 0xf) << 16) | ||
47 | #define DMACR_TM(x) ((x) & 0xf) | ||
48 | |||
49 | struct imx_fb_platform_data { | ||
5 | u_long pixclock; | 50 | u_long pixclock; |
6 | 51 | ||
7 | u_short xres; | 52 | u_short xres; |
@@ -34,4 +79,5 @@ struct imxfb_mach_info { | |||
34 | void (*lcd_power)(int); | 79 | void (*lcd_power)(int); |
35 | void (*backlight_power)(int); | 80 | void (*backlight_power)(int); |
36 | }; | 81 | }; |
37 | void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info); | 82 | |
83 | void set_imx_fb_info(struct imx_fb_platform_data *); | ||
diff --git a/arch/arm/mach-imx/include/mach/io.h b/arch/arm/mach-imx/include/mach/io.h index c50c5fa6fb81..9e197ae4590f 100644 --- a/arch/arm/mach-imx/include/mach/io.h +++ b/arch/arm/mach-imx/include/mach/io.h | |||
@@ -20,11 +20,9 @@ | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | 20 | #ifndef __ASM_ARM_ARCH_IO_H |
21 | #define __ASM_ARM_ARCH_IO_H | 21 | #define __ASM_ARM_ARCH_IO_H |
22 | 22 | ||
23 | #include <mach/hardware.h> | ||
24 | |||
25 | #define IO_SPACE_LIMIT 0xffffffff | 23 | #define IO_SPACE_LIMIT 0xffffffff |
26 | 24 | ||
27 | #define __io(a) ((void __iomem *)(a)) | 25 | #define __io(a) __typesafe_io(a) |
28 | #define __mem_pci(a) (a) | 26 | #define __mem_pci(a) (a) |
29 | 27 | ||
30 | #endif | 28 | #endif |
diff --git a/arch/arm/mach-imx/include/mach/memory.h b/arch/arm/mach-imx/include/mach/memory.h index 5c453063c0ed..a93df7cba694 100644 --- a/arch/arm/mach-imx/include/mach/memory.h +++ b/arch/arm/mach-imx/include/mach/memory.h | |||
@@ -23,14 +23,4 @@ | |||
23 | 23 | ||
24 | #define PHYS_OFFSET UL(0x08000000) | 24 | #define PHYS_OFFSET UL(0x08000000) |
25 | 25 | ||
26 | /* | ||
27 | * Virtual view <-> DMA view memory address translations | ||
28 | * virt_to_bus: Used to translate the virtual address to an | ||
29 | * address suitable to be passed to set_dma_addr | ||
30 | * bus_to_virt: Used to convert an address for DMA operations | ||
31 | * to an address that the kernel can use. | ||
32 | */ | ||
33 | #define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET) | ||
34 | #define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET) | ||
35 | |||
36 | #endif | 26 | #endif |
diff --git a/arch/arm/mach-integrator/clock.c b/arch/arm/mach-integrator/clock.c index 8d761fdd2ecd..989ecf5f5c46 100644 --- a/arch/arm/mach-integrator/clock.c +++ b/arch/arm/mach-integrator/clock.c | |||
@@ -10,42 +10,12 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/list.h> | ||
14 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
15 | #include <linux/err.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
18 | #include <linux/mutex.h> | 15 | #include <linux/mutex.h> |
19 | 16 | ||
20 | #include <asm/hardware/icst525.h> | 17 | #include <asm/clkdev.h> |
21 | 18 | #include <mach/clkdev.h> | |
22 | #include "clock.h" | ||
23 | |||
24 | static LIST_HEAD(clocks); | ||
25 | static DEFINE_MUTEX(clocks_mutex); | ||
26 | |||
27 | struct clk *clk_get(struct device *dev, const char *id) | ||
28 | { | ||
29 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
30 | |||
31 | mutex_lock(&clocks_mutex); | ||
32 | list_for_each_entry(p, &clocks, node) { | ||
33 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
34 | clk = p; | ||
35 | break; | ||
36 | } | ||
37 | } | ||
38 | mutex_unlock(&clocks_mutex); | ||
39 | |||
40 | return clk; | ||
41 | } | ||
42 | EXPORT_SYMBOL(clk_get); | ||
43 | |||
44 | void clk_put(struct clk *clk) | ||
45 | { | ||
46 | module_put(clk->owner); | ||
47 | } | ||
48 | EXPORT_SYMBOL(clk_put); | ||
49 | 19 | ||
50 | int clk_enable(struct clk *clk) | 20 | int clk_enable(struct clk *clk) |
51 | { | 21 | { |
@@ -67,7 +37,6 @@ EXPORT_SYMBOL(clk_get_rate); | |||
67 | long clk_round_rate(struct clk *clk, unsigned long rate) | 37 | long clk_round_rate(struct clk *clk, unsigned long rate) |
68 | { | 38 | { |
69 | struct icst525_vco vco; | 39 | struct icst525_vco vco; |
70 | |||
71 | vco = icst525_khz_to_vco(clk->params, rate / 1000); | 40 | vco = icst525_khz_to_vco(clk->params, rate / 1000); |
72 | return icst525_khz(clk->params, vco) * 1000; | 41 | return icst525_khz(clk->params, vco) * 1000; |
73 | } | 42 | } |
@@ -76,56 +45,15 @@ EXPORT_SYMBOL(clk_round_rate); | |||
76 | int clk_set_rate(struct clk *clk, unsigned long rate) | 45 | int clk_set_rate(struct clk *clk, unsigned long rate) |
77 | { | 46 | { |
78 | int ret = -EIO; | 47 | int ret = -EIO; |
48 | |||
79 | if (clk->setvco) { | 49 | if (clk->setvco) { |
80 | struct icst525_vco vco; | 50 | struct icst525_vco vco; |
81 | 51 | ||
82 | vco = icst525_khz_to_vco(clk->params, rate / 1000); | 52 | vco = icst525_khz_to_vco(clk->params, rate / 1000); |
83 | clk->rate = icst525_khz(clk->params, vco) * 1000; | 53 | clk->rate = icst525_khz(clk->params, vco) * 1000; |
84 | |||
85 | printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", | ||
86 | clk->name, vco.s, vco.r, vco.v); | ||
87 | |||
88 | clk->setvco(clk, vco); | 54 | clk->setvco(clk, vco); |
89 | ret = 0; | 55 | ret = 0; |
90 | } | 56 | } |
91 | return 0; | 57 | return ret; |
92 | } | 58 | } |
93 | EXPORT_SYMBOL(clk_set_rate); | 59 | EXPORT_SYMBOL(clk_set_rate); |
94 | |||
95 | /* | ||
96 | * These are fixed clocks. | ||
97 | */ | ||
98 | static struct clk kmi_clk = { | ||
99 | .name = "KMIREFCLK", | ||
100 | .rate = 24000000, | ||
101 | }; | ||
102 | |||
103 | static struct clk uart_clk = { | ||
104 | .name = "UARTCLK", | ||
105 | .rate = 14745600, | ||
106 | }; | ||
107 | |||
108 | int clk_register(struct clk *clk) | ||
109 | { | ||
110 | mutex_lock(&clocks_mutex); | ||
111 | list_add(&clk->node, &clocks); | ||
112 | mutex_unlock(&clocks_mutex); | ||
113 | return 0; | ||
114 | } | ||
115 | EXPORT_SYMBOL(clk_register); | ||
116 | |||
117 | void clk_unregister(struct clk *clk) | ||
118 | { | ||
119 | mutex_lock(&clocks_mutex); | ||
120 | list_del(&clk->node); | ||
121 | mutex_unlock(&clocks_mutex); | ||
122 | } | ||
123 | EXPORT_SYMBOL(clk_unregister); | ||
124 | |||
125 | static int __init clk_init(void) | ||
126 | { | ||
127 | clk_register(&kmi_clk); | ||
128 | clk_register(&uart_clk); | ||
129 | return 0; | ||
130 | } | ||
131 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-integrator/clock.h b/arch/arm/mach-integrator/clock.h index 09e6328ceba9..e69de29bb2d1 100644 --- a/arch/arm/mach-integrator/clock.h +++ b/arch/arm/mach-integrator/clock.h | |||
@@ -1,25 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-integrator/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2004 ARM Limited. | ||
5 | * Written by Deep Blue Solutions Limited. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | struct module; | ||
12 | struct icst525_params; | ||
13 | |||
14 | struct clk { | ||
15 | struct list_head node; | ||
16 | unsigned long rate; | ||
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | const struct icst525_params *params; | ||
20 | void *data; | ||
21 | void (*setvco)(struct clk *, struct icst525_vco vco); | ||
22 | }; | ||
23 | |||
24 | int clk_register(struct clk *clk); | ||
25 | void clk_unregister(struct clk *clk); | ||
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index 595b7392ee4e..c89c949b4d45 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/amba/serial.h> | 21 | #include <linux/amba/serial.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <asm/clkdev.h> | ||
25 | #include <mach/clkdev.h> | ||
24 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
25 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
26 | #include <asm/hardware/arm_timer.h> | 28 | #include <asm/hardware/arm_timer.h> |
@@ -108,10 +110,43 @@ static struct amba_device *amba_devs[] __initdata = { | |||
108 | &kmi1_device, | 110 | &kmi1_device, |
109 | }; | 111 | }; |
110 | 112 | ||
113 | /* | ||
114 | * These are fixed clocks. | ||
115 | */ | ||
116 | static struct clk clk24mhz = { | ||
117 | .rate = 24000000, | ||
118 | }; | ||
119 | |||
120 | static struct clk uartclk = { | ||
121 | .rate = 14745600, | ||
122 | }; | ||
123 | |||
124 | static struct clk_lookup lookups[] __initdata = { | ||
125 | { /* UART0 */ | ||
126 | .dev_id = "mb:16", | ||
127 | .clk = &uartclk, | ||
128 | }, { /* UART1 */ | ||
129 | .dev_id = "mb:17", | ||
130 | .clk = &uartclk, | ||
131 | }, { /* KMI0 */ | ||
132 | .dev_id = "mb:18", | ||
133 | .clk = &clk24mhz, | ||
134 | }, { /* KMI1 */ | ||
135 | .dev_id = "mb:19", | ||
136 | .clk = &clk24mhz, | ||
137 | }, { /* MMCI - IntegratorCP */ | ||
138 | .dev_id = "mb:1c", | ||
139 | .clk = &uartclk, | ||
140 | } | ||
141 | }; | ||
142 | |||
111 | static int __init integrator_init(void) | 143 | static int __init integrator_init(void) |
112 | { | 144 | { |
113 | int i; | 145 | int i; |
114 | 146 | ||
147 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | ||
148 | clkdev_add(&lookups[i]); | ||
149 | |||
115 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 150 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
116 | struct amba_device *d = amba_devs[i]; | 151 | struct amba_device *d = amba_devs[i]; |
117 | amba_device_register(d, &iomem_resource); | 152 | amba_device_register(d, &iomem_resource); |
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 172299a78302..0058c937719e 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -22,13 +22,13 @@ | |||
22 | #include <linux/amba/clcd.h> | 22 | #include <linux/amba/clcd.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | 24 | ||
25 | #include <asm/clkdev.h> | ||
26 | #include <mach/clkdev.h> | ||
25 | #include <asm/hardware/icst525.h> | 27 | #include <asm/hardware/icst525.h> |
26 | #include <mach/lm.h> | 28 | #include <mach/lm.h> |
27 | #include <mach/impd1.h> | 29 | #include <mach/impd1.h> |
28 | #include <asm/sizes.h> | 30 | #include <asm/sizes.h> |
29 | 31 | ||
30 | #include "clock.h" | ||
31 | |||
32 | static int module_id; | 32 | static int module_id; |
33 | 33 | ||
34 | module_param_named(lmid, module_id, int, 0444); | 34 | module_param_named(lmid, module_id, int, 0444); |
@@ -37,6 +37,7 @@ MODULE_PARM_DESC(lmid, "logic module stack position"); | |||
37 | struct impd1_module { | 37 | struct impd1_module { |
38 | void __iomem *base; | 38 | void __iomem *base; |
39 | struct clk vcos[2]; | 39 | struct clk vcos[2]; |
40 | struct clk_lookup *clks[3]; | ||
40 | }; | 41 | }; |
41 | 42 | ||
42 | static const struct icst525_params impd1_vco_params = { | 43 | static const struct icst525_params impd1_vco_params = { |
@@ -339,9 +340,8 @@ static struct impd1_device impd1_devs[] = { | |||
339 | } | 340 | } |
340 | }; | 341 | }; |
341 | 342 | ||
342 | static const char *impd1_vconames[2] = { | 343 | static struct clk fixed_14745600 = { |
343 | "CLCDCLK", | 344 | .rate = 14745600, |
344 | "AUXVCO2", | ||
345 | }; | 345 | }; |
346 | 346 | ||
347 | static int impd1_probe(struct lm_device *dev) | 347 | static int impd1_probe(struct lm_device *dev) |
@@ -374,14 +374,20 @@ static int impd1_probe(struct lm_device *dev) | |||
374 | 374 | ||
375 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { | 375 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) { |
376 | impd1->vcos[i].owner = THIS_MODULE, | 376 | impd1->vcos[i].owner = THIS_MODULE, |
377 | impd1->vcos[i].name = impd1_vconames[i], | ||
378 | impd1->vcos[i].params = &impd1_vco_params, | 377 | impd1->vcos[i].params = &impd1_vco_params, |
379 | impd1->vcos[i].data = impd1, | 378 | impd1->vcos[i].data = impd1, |
380 | impd1->vcos[i].setvco = impd1_setvco; | 379 | impd1->vcos[i].setvco = impd1_setvco; |
381 | |||
382 | clk_register(&impd1->vcos[i]); | ||
383 | } | 380 | } |
384 | 381 | ||
382 | impd1->clks[0] = clkdev_alloc(&impd1->vcos[0], NULL, "lm%x:01000", | ||
383 | dev->id); | ||
384 | impd1->clks[1] = clkdev_alloc(&fixed_14745600, NULL, "lm%x:00100", | ||
385 | dev->id); | ||
386 | impd1->clks[2] = clkdev_alloc(&fixed_14745600, NULL, "lm%x:00200", | ||
387 | dev->id); | ||
388 | for (i = 0; i < ARRAY_SIZE(impd1->clks); i++) | ||
389 | clkdev_add(impd1->clks[i]); | ||
390 | |||
385 | for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { | 391 | for (i = 0; i < ARRAY_SIZE(impd1_devs); i++) { |
386 | struct impd1_device *idev = impd1_devs + i; | 392 | struct impd1_device *idev = impd1_devs + i; |
387 | struct amba_device *d; | 393 | struct amba_device *d; |
@@ -434,8 +440,8 @@ static void impd1_remove(struct lm_device *dev) | |||
434 | 440 | ||
435 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); | 441 | device_for_each_child(&dev->dev, NULL, impd1_remove_one); |
436 | 442 | ||
437 | for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) | 443 | for (i = 0; i < ARRAY_SIZE(impd1->clks); i++) |
438 | clk_unregister(&impd1->vcos[i]); | 444 | clkdev_drop(impd1->clks[i]); |
439 | 445 | ||
440 | lm_set_drvdata(dev, NULL); | 446 | lm_set_drvdata(dev, NULL); |
441 | 447 | ||
diff --git a/arch/arm/mach-integrator/include/mach/clkdev.h b/arch/arm/mach-integrator/include/mach/clkdev.h new file mode 100644 index 000000000000..9293e410832a --- /dev/null +++ b/arch/arm/mach-integrator/include/mach/clkdev.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #include <linux/module.h> | ||
5 | #include <asm/hardware/icst525.h> | ||
6 | |||
7 | struct clk { | ||
8 | unsigned long rate; | ||
9 | struct module *owner; | ||
10 | const struct icst525_params *params; | ||
11 | void *data; | ||
12 | void (*setvco)(struct clk *, struct icst525_vco vco); | ||
13 | }; | ||
14 | |||
15 | static inline int __clk_get(struct clk *clk) | ||
16 | { | ||
17 | return try_module_get(clk->owner); | ||
18 | } | ||
19 | |||
20 | static inline void __clk_put(struct clk *clk) | ||
21 | { | ||
22 | module_put(clk->owner); | ||
23 | } | ||
24 | |||
25 | #endif | ||
diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h index be7e63c21d25..2b2e7a110724 100644 --- a/arch/arm/mach-integrator/include/mach/memory.h +++ b/arch/arm/mach-integrator/include/mach/memory.h | |||
@@ -24,16 +24,9 @@ | |||
24 | * Physical DRAM offset. | 24 | * Physical DRAM offset. |
25 | */ | 25 | */ |
26 | #define PHYS_OFFSET UL(0x00000000) | 26 | #define PHYS_OFFSET UL(0x00000000) |
27 | #define BUS_OFFSET UL(0x80000000) | ||
28 | 27 | ||
29 | /* | 28 | #define BUS_OFFSET UL(0x80000000) |
30 | * Virtual view <-> DMA view memory address translations | 29 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET) |
31 | * virt_to_bus: Used to translate the virtual address to an | 30 | #define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET) |
32 | * address suitable to be passed to set_dma_addr | ||
33 | * bus_to_virt: Used to convert an address for DMA operations | ||
34 | * to an address that the kernel can use. | ||
35 | */ | ||
36 | #define __virt_to_bus(x) (x - PAGE_OFFSET + BUS_OFFSET) | ||
37 | #define __bus_to_virt(x) (x - BUS_OFFSET + PAGE_OFFSET) | ||
38 | 31 | ||
39 | #endif | 32 | #endif |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 88026ccd5ac9..427c2d8dc123 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/amba/clcd.h> | 21 | #include <linux/amba/clcd.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #include <asm/clkdev.h> | ||
25 | #include <mach/clkdev.h> | ||
24 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
25 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
26 | #include <asm/setup.h> | 28 | #include <asm/setup.h> |
@@ -38,7 +40,6 @@ | |||
38 | #include <asm/mach/time.h> | 40 | #include <asm/mach/time.h> |
39 | 41 | ||
40 | #include "common.h" | 42 | #include "common.h" |
41 | #include "clock.h" | ||
42 | 43 | ||
43 | #define INTCP_PA_MMC_BASE 0x1c000000 | 44 | #define INTCP_PA_MMC_BASE 0x1c000000 |
44 | #define INTCP_PA_AACI_BASE 0x1d000000 | 45 | #define INTCP_PA_AACI_BASE 0x1d000000 |
@@ -289,15 +290,16 @@ static void cp_auxvco_set(struct clk *clk, struct icst525_vco vco) | |||
289 | writel(0, CM_LOCK); | 290 | writel(0, CM_LOCK); |
290 | } | 291 | } |
291 | 292 | ||
292 | static struct clk cp_clcd_clk = { | 293 | static struct clk cp_auxclk = { |
293 | .name = "CLCDCLK", | ||
294 | .params = &cp_auxvco_params, | 294 | .params = &cp_auxvco_params, |
295 | .setvco = cp_auxvco_set, | 295 | .setvco = cp_auxvco_set, |
296 | }; | 296 | }; |
297 | 297 | ||
298 | static struct clk cp_mmci_clk = { | 298 | static struct clk_lookup cp_lookups[] = { |
299 | .name = "MCLK", | 299 | { /* CLCD */ |
300 | .rate = 14745600, | 300 | .dev_id = "mb:c0", |
301 | .clk = &cp_auxclk, | ||
302 | }, | ||
301 | }; | 303 | }; |
302 | 304 | ||
303 | /* | 305 | /* |
@@ -554,8 +556,8 @@ static void __init intcp_init(void) | |||
554 | { | 556 | { |
555 | int i; | 557 | int i; |
556 | 558 | ||
557 | clk_register(&cp_clcd_clk); | 559 | for (i = 0; i < ARRAY_SIZE(cp_lookups); i++) |
558 | clk_register(&cp_mmci_clk); | 560 | clkdev_add(&cp_lookups[i]); |
559 | 561 | ||
560 | platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs)); | 562 | platform_add_devices(intcp_devs, ARRAY_SIZE(intcp_devs)); |
561 | 563 | ||
diff --git a/arch/arm/mach-iop13xx/include/mach/dma.h b/arch/arm/mach-iop13xx/include/mach/dma.h deleted file mode 100644 index d79846fbb394..000000000000 --- a/arch/arm/mach-iop13xx/include/mach/dma.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | #ifndef _IOP13XX_DMA_H | ||
2 | #define _IOP13XX_DMA_H | ||
3 | #endif | ||
diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h index b82602d529bf..e012bf13c955 100644 --- a/arch/arm/mach-iop13xx/include/mach/memory.h +++ b/arch/arm/mach-iop13xx/include/mach/memory.h | |||
@@ -16,18 +16,6 @@ | |||
16 | #define IOP13XX_PMMR_P_START (IOP13XX_PMMR_PHYS_MEM_BASE) | 16 | #define IOP13XX_PMMR_P_START (IOP13XX_PMMR_PHYS_MEM_BASE) |
17 | #define IOP13XX_PMMR_P_END (IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_SIZE) | 17 | #define IOP13XX_PMMR_P_END (IOP13XX_PMMR_PHYS_MEM_BASE + IOP13XX_PMMR_SIZE) |
18 | 18 | ||
19 | /* | ||
20 | * Virtual view <-> PCI DMA view memory address translations | ||
21 | * virt_to_bus: Used to translate the virtual address to an | ||
22 | * address suitable to be passed to set_dma_addr | ||
23 | * bus_to_virt: Used to convert an address for DMA operations | ||
24 | * to an address that the kernel can use. | ||
25 | */ | ||
26 | |||
27 | /* RAM has 1:1 mapping on the PCIe/x Busses */ | ||
28 | #define __virt_to_bus(x) (__virt_to_phys(x)) | ||
29 | #define __bus_to_virt(x) (__phys_to_virt(x)) | ||
30 | |||
31 | static inline dma_addr_t __virt_to_lbus(unsigned long x) | 19 | static inline dma_addr_t __virt_to_lbus(unsigned long x) |
32 | { | 20 | { |
33 | return x + IOP13XX_PMMR_PHYS_MEM_BASE - IOP13XX_PMMR_VIRT_MEM_BASE; | 21 | return x + IOP13XX_PMMR_PHYS_MEM_BASE - IOP13XX_PMMR_VIRT_MEM_BASE; |
@@ -55,7 +43,7 @@ static inline unsigned long __lbus_to_virt(dma_addr_t x) | |||
55 | if (is_lbus_device(dev) && __is_lbus_dma(__dma)) \ | 43 | if (is_lbus_device(dev) && __is_lbus_dma(__dma)) \ |
56 | __virt = __lbus_to_virt(__dma); \ | 44 | __virt = __lbus_to_virt(__dma); \ |
57 | else \ | 45 | else \ |
58 | __virt = __bus_to_virt(__dma); \ | 46 | __virt = __phys_to_virt(__dma); \ |
59 | (void *)__virt; \ | 47 | (void *)__virt; \ |
60 | }) | 48 | }) |
61 | 49 | ||
@@ -66,7 +54,7 @@ static inline unsigned long __lbus_to_virt(dma_addr_t x) | |||
66 | if (is_lbus_device(dev) && __is_lbus_virt(__virt)) \ | 54 | if (is_lbus_device(dev) && __is_lbus_virt(__virt)) \ |
67 | __dma = __virt_to_lbus(__virt); \ | 55 | __dma = __virt_to_lbus(__virt); \ |
68 | else \ | 56 | else \ |
69 | __dma = __virt_to_bus(__virt); \ | 57 | __dma = __virt_to_phys(__virt); \ |
70 | __dma; \ | 58 | __dma; \ |
71 | }) | 59 | }) |
72 | 60 | ||
diff --git a/arch/arm/mach-iop13xx/include/mach/timex.h b/arch/arm/mach-iop13xx/include/mach/timex.h index 5b1f1c8a8270..45fb2745bb54 100644 --- a/arch/arm/mach-iop13xx/include/mach/timex.h +++ b/arch/arm/mach-iop13xx/include/mach/timex.h | |||
@@ -1,3 +1 @@ | |||
1 | #include <mach/hardware.h> | ||
2 | |||
3 | #define CLOCK_TICK_RATE (100 * HZ) | #define CLOCK_TICK_RATE (100 * HZ) | |
diff --git a/arch/arm/mach-iop32x/include/mach/dma.h b/arch/arm/mach-iop32x/include/mach/dma.h deleted file mode 100644 index f8bd817f205d..000000000000 --- a/arch/arm/mach-iop32x/include/mach/dma.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop32x/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Intel Corp. | ||
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 | */ | ||
diff --git a/arch/arm/mach-iop32x/include/mach/io.h b/arch/arm/mach-iop32x/include/mach/io.h index ce54705ba3d4..339e5854728b 100644 --- a/arch/arm/mach-iop32x/include/mach/io.h +++ b/arch/arm/mach-iop32x/include/mach/io.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __IO_H | 11 | #ifndef __IO_H |
12 | #define __IO_H | 12 | #define __IO_H |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <asm/hardware/iop3xx.h> |
15 | 15 | ||
16 | extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, | 16 | extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, |
17 | unsigned int mtype); | 17 | unsigned int mtype); |
diff --git a/arch/arm/mach-iop32x/include/mach/memory.h b/arch/arm/mach-iop32x/include/mach/memory.h index 42cd4bf3148c..c30f6450ad50 100644 --- a/arch/arm/mach-iop32x/include/mach/memory.h +++ b/arch/arm/mach-iop32x/include/mach/memory.h | |||
@@ -5,22 +5,9 @@ | |||
5 | #ifndef __MEMORY_H | 5 | #ifndef __MEMORY_H |
6 | #define __MEMORY_H | 6 | #define __MEMORY_H |
7 | 7 | ||
8 | #include <mach/hardware.h> | ||
9 | |||
10 | /* | 8 | /* |
11 | * Physical DRAM offset. | 9 | * Physical DRAM offset. |
12 | */ | 10 | */ |
13 | #define PHYS_OFFSET UL(0xa0000000) | 11 | #define PHYS_OFFSET UL(0xa0000000) |
14 | 12 | ||
15 | /* | ||
16 | * Virtual view <-> PCI DMA view memory address translations | ||
17 | * virt_to_bus: Used to translate the virtual address to an | ||
18 | * address suitable to be passed to set_dma_addr | ||
19 | * bus_to_virt: Used to convert an address for DMA operations | ||
20 | * to an address that the kernel can use. | ||
21 | */ | ||
22 | #define __virt_to_bus(x) (__virt_to_phys(x)) | ||
23 | #define __bus_to_virt(x) (__phys_to_virt(x)) | ||
24 | |||
25 | |||
26 | #endif | 13 | #endif |
diff --git a/arch/arm/mach-iop32x/include/mach/system.h b/arch/arm/mach-iop32x/include/mach/system.h index 20f923e54f46..32d9e5b0a28d 100644 --- a/arch/arm/mach-iop32x/include/mach/system.h +++ b/arch/arm/mach-iop32x/include/mach/system.h | |||
@@ -7,8 +7,9 @@ | |||
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 | #include <asm/mach-types.h> | 10 | #include <asm/mach-types.h> |
11 | #include <asm/hardware/iop3xx.h> | ||
12 | #include <mach/n2100.h> | ||
12 | 13 | ||
13 | static inline void arch_idle(void) | 14 | static inline void arch_idle(void) |
14 | { | 15 | { |
diff --git a/arch/arm/mach-iop32x/include/mach/timex.h b/arch/arm/mach-iop32x/include/mach/timex.h index a541afced3cb..7262ab81419d 100644 --- a/arch/arm/mach-iop32x/include/mach/timex.h +++ b/arch/arm/mach-iop32x/include/mach/timex.h | |||
@@ -3,7 +3,4 @@ | |||
3 | * | 3 | * |
4 | * IOP32x architecture timex specifications | 4 | * IOP32x architecture timex specifications |
5 | */ | 5 | */ |
6 | |||
7 | #include <mach/hardware.h> | ||
8 | |||
9 | #define CLOCK_TICK_RATE (100 * HZ) | 6 | #define CLOCK_TICK_RATE (100 * HZ) |
diff --git a/arch/arm/mach-iop33x/include/mach/dma.h b/arch/arm/mach-iop33x/include/mach/dma.h deleted file mode 100644 index d8b42232931d..000000000000 --- a/arch/arm/mach-iop33x/include/mach/dma.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-iop33x/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Intel Corp. | ||
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 | */ | ||
diff --git a/arch/arm/mach-iop33x/include/mach/io.h b/arch/arm/mach-iop33x/include/mach/io.h index 158874631217..e99a7ed6d050 100644 --- a/arch/arm/mach-iop33x/include/mach/io.h +++ b/arch/arm/mach-iop33x/include/mach/io.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __IO_H | 11 | #ifndef __IO_H |
12 | #define __IO_H | 12 | #define __IO_H |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #include <asm/hardware/iop3xx.h> |
15 | 15 | ||
16 | extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, | 16 | extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size, |
17 | unsigned int mtype); | 17 | unsigned int mtype); |
diff --git a/arch/arm/mach-iop33x/include/mach/memory.h b/arch/arm/mach-iop33x/include/mach/memory.h index 2cef0bbb354f..a30a96aa6d2d 100644 --- a/arch/arm/mach-iop33x/include/mach/memory.h +++ b/arch/arm/mach-iop33x/include/mach/memory.h | |||
@@ -5,22 +5,9 @@ | |||
5 | #ifndef __MEMORY_H | 5 | #ifndef __MEMORY_H |
6 | #define __MEMORY_H | 6 | #define __MEMORY_H |
7 | 7 | ||
8 | #include <mach/hardware.h> | ||
9 | |||
10 | /* | 8 | /* |
11 | * Physical DRAM offset. | 9 | * Physical DRAM offset. |
12 | */ | 10 | */ |
13 | #define PHYS_OFFSET UL(0x00000000) | 11 | #define PHYS_OFFSET UL(0x00000000) |
14 | 12 | ||
15 | /* | ||
16 | * Virtual view <-> PCI DMA view memory address translations | ||
17 | * virt_to_bus: Used to translate the virtual address to an | ||
18 | * address suitable to be passed to set_dma_addr | ||
19 | * bus_to_virt: Used to convert an address for DMA operations | ||
20 | * to an address that the kernel can use. | ||
21 | */ | ||
22 | #define __virt_to_bus(x) (__virt_to_phys(x)) | ||
23 | #define __bus_to_virt(x) (__phys_to_virt(x)) | ||
24 | |||
25 | |||
26 | #endif | 13 | #endif |
diff --git a/arch/arm/mach-iop33x/include/mach/system.h b/arch/arm/mach-iop33x/include/mach/system.h index 7bf3bfb49446..0cb3ad862acd 100644 --- a/arch/arm/mach-iop33x/include/mach/system.h +++ b/arch/arm/mach-iop33x/include/mach/system.h | |||
@@ -7,6 +7,7 @@ | |||
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 | #include <asm/hardware/iop3xx.h> | ||
10 | 11 | ||
11 | static inline void arch_idle(void) | 12 | static inline void arch_idle(void) |
12 | { | 13 | { |
diff --git a/arch/arm/mach-iop33x/include/mach/timex.h b/arch/arm/mach-iop33x/include/mach/timex.h index c75760844d49..54c589091d6e 100644 --- a/arch/arm/mach-iop33x/include/mach/timex.h +++ b/arch/arm/mach-iop33x/include/mach/timex.h | |||
@@ -3,7 +3,4 @@ | |||
3 | * | 3 | * |
4 | * IOP3xx architecture timex specifications | 4 | * IOP3xx architecture timex specifications |
5 | */ | 5 | */ |
6 | |||
7 | #include <mach/hardware.h> | ||
8 | |||
9 | #define CLOCK_TICK_RATE (100 * HZ) | 6 | #define CLOCK_TICK_RATE (100 * HZ) |
diff --git a/arch/arm/mach-ixp2000/include/mach/dma.h b/arch/arm/mach-ixp2000/include/mach/dma.h deleted file mode 100644 index 26063d60f622..000000000000 --- a/arch/arm/mach-ixp2000/include/mach/dma.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp2000/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intel Corp. | ||
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 | */ | ||
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h index 241529a7c52d..aee7eb8a71b2 100644 --- a/arch/arm/mach-ixp2000/include/mach/memory.h +++ b/arch/arm/mach-ixp2000/include/mach/memory.h | |||
@@ -15,13 +15,6 @@ | |||
15 | 15 | ||
16 | #define PHYS_OFFSET UL(0x00000000) | 16 | #define PHYS_OFFSET UL(0x00000000) |
17 | 17 | ||
18 | /* | ||
19 | * Virtual view <-> DMA view memory address translations | ||
20 | * virt_to_bus: Used to translate the virtual address to an | ||
21 | * address suitable to be passed to set_dma_addr | ||
22 | * bus_to_virt: Used to convert an address for DMA operations | ||
23 | * to an address that the kernel can use. | ||
24 | */ | ||
25 | #include <mach/ixp2000-regs.h> | 18 | #include <mach/ixp2000-regs.h> |
26 | 19 | ||
27 | #define __virt_to_bus(v) \ | 20 | #define __virt_to_bus(v) \ |
diff --git a/arch/arm/mach-ixp23xx/include/mach/dma.h b/arch/arm/mach-ixp23xx/include/mach/dma.h deleted file mode 100644 index 8886544b93f7..000000000000 --- a/arch/arm/mach-ixp23xx/include/mach/dma.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp23xx/include/mach/dma.h | ||
3 | */ | ||
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h index 305ea1808c71..fd9ef8e519f7 100644 --- a/arch/arm/mach-ixp23xx/include/mach/io.h +++ b/arch/arm/mach-ixp23xx/include/mach/io.h | |||
@@ -20,8 +20,6 @@ | |||
20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) | 20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) |
21 | #define __mem_pci(a) (a) | 21 | #define __mem_pci(a) (a) |
22 | 22 | ||
23 | #include <linux/kernel.h> /* For BUG */ | ||
24 | |||
25 | static inline void __iomem * | 23 | static inline void __iomem * |
26 | ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype) | 24 | ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype) |
27 | { | 25 | { |
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h index 9d40115f7ebe..fdd138706c70 100644 --- a/arch/arm/mach-ixp23xx/include/mach/memory.h +++ b/arch/arm/mach-ixp23xx/include/mach/memory.h | |||
@@ -19,16 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | #define PHYS_OFFSET (0x00000000) | 20 | #define PHYS_OFFSET (0x00000000) |
21 | 21 | ||
22 | |||
23 | /* | ||
24 | * Virtual view <-> DMA view memory address translations | ||
25 | * virt_to_bus: Used to translate the virtual address to an | ||
26 | * address suitable to be passed to set_dma_addr | ||
27 | * bus_to_virt: Used to convert an address for DMA operations | ||
28 | * to an address that the kernel can use. | ||
29 | */ | ||
30 | #ifndef __ASSEMBLY__ | ||
31 | |||
32 | #define __virt_to_bus(v) \ | 22 | #define __virt_to_bus(v) \ |
33 | ({ unsigned int ret; \ | 23 | ({ unsigned int ret; \ |
34 | ret = ((__virt_to_phys(v) - 0x00000000) + \ | 24 | ret = ((__virt_to_phys(v) - 0x00000000) + \ |
@@ -43,6 +33,3 @@ | |||
43 | #define arch_is_coherent() 1 | 33 | #define arch_is_coherent() 1 |
44 | 34 | ||
45 | #endif | 35 | #endif |
46 | |||
47 | |||
48 | #endif | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/dma.h b/arch/arm/mach-ixp4xx/include/mach/dma.h deleted file mode 100644 index 00c5070c0201..000000000000 --- a/arch/arm/mach-ixp4xx/include/mach/dma.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ixp4xx/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2001-2004 MontaVista Software, Inc. | ||
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 | #ifndef __ASM_ARCH_DMA_H | ||
12 | #define __ASM_ARCH_DMA_H | ||
13 | |||
14 | #include <linux/device.h> | ||
15 | #include <asm/page.h> | ||
16 | #include <asm/sizes.h> | ||
17 | #include <mach/hardware.h> | ||
18 | |||
19 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M) | ||
20 | |||
21 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 319948e31bec..ce63048d45eb 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h | |||
@@ -49,8 +49,6 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); | |||
49 | 49 | ||
50 | #else | 50 | #else |
51 | 51 | ||
52 | #include <linux/mm.h> | ||
53 | |||
54 | /* | 52 | /* |
55 | * In the case of using indirect PCI, we simply return the actual PCI | 53 | * In the case of using indirect PCI, we simply return the actual PCI |
56 | * address and our read/write implementation use that to drive the | 54 | * address and our read/write implementation use that to drive the |
@@ -241,7 +239,7 @@ __ixp4xx_readsl(const volatile void __iomem *bus_addr, u32 *vaddr, u32 count) | |||
241 | 239 | ||
242 | #ifndef CONFIG_PCI | 240 | #ifndef CONFIG_PCI |
243 | 241 | ||
244 | #define __io(v) v | 242 | #define __io(v) __typesafe_io(v) |
245 | 243 | ||
246 | #else | 244 | #else |
247 | 245 | ||
diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h index c4d2830ac987..98f5e5e20980 100644 --- a/arch/arm/mach-ixp4xx/include/mach/memory.h +++ b/arch/arm/mach-ixp4xx/include/mach/memory.h | |||
@@ -22,19 +22,8 @@ void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes); | |||
22 | ixp4xx_adjust_zones(node, size, holes) | 22 | ixp4xx_adjust_zones(node, size, holes) |
23 | 23 | ||
24 | #define ISA_DMA_THRESHOLD (SZ_64M - 1) | 24 | #define ISA_DMA_THRESHOLD (SZ_64M - 1) |
25 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M) | ||
25 | 26 | ||
26 | #endif | 27 | #endif |
27 | 28 | ||
28 | /* | ||
29 | * Virtual view <-> DMA view memory address translations | ||
30 | * virt_to_bus: Used to translate the virtual address to an | ||
31 | * address suitable to be passed to set_dma_addr | ||
32 | * bus_to_virt: Used to convert an address for DMA operations | ||
33 | * to an address that the kernel can use. | ||
34 | * | ||
35 | * These are dummies for now. | ||
36 | */ | ||
37 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
38 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
39 | |||
40 | #endif | 29 | #endif |
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c index 0bb1fbd84ccb..7b8ef97fb501 100644 --- a/arch/arm/mach-kirkwood/common.c +++ b/arch/arm/mach-kirkwood/common.c | |||
@@ -57,6 +57,7 @@ void __init kirkwood_map_io(void) | |||
57 | ****************************************************************************/ | 57 | ****************************************************************************/ |
58 | static struct orion_ehci_data kirkwood_ehci_data = { | 58 | static struct orion_ehci_data kirkwood_ehci_data = { |
59 | .dram = &kirkwood_mbus_dram_info, | 59 | .dram = &kirkwood_mbus_dram_info, |
60 | .phy_version = EHCI_PHY_NA, | ||
60 | }; | 61 | }; |
61 | 62 | ||
62 | static u64 ehci_dmamask = 0xffffffffUL; | 63 | static u64 ehci_dmamask = 0xffffffffUL; |
@@ -153,6 +154,64 @@ void __init kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data) | |||
153 | 154 | ||
154 | 155 | ||
155 | /***************************************************************************** | 156 | /***************************************************************************** |
157 | * GE01 | ||
158 | ****************************************************************************/ | ||
159 | struct mv643xx_eth_shared_platform_data kirkwood_ge01_shared_data = { | ||
160 | .dram = &kirkwood_mbus_dram_info, | ||
161 | .shared_smi = &kirkwood_ge00_shared, | ||
162 | }; | ||
163 | |||
164 | static struct resource kirkwood_ge01_shared_resources[] = { | ||
165 | { | ||
166 | .name = "ge01 base", | ||
167 | .start = GE01_PHYS_BASE + 0x2000, | ||
168 | .end = GE01_PHYS_BASE + 0x3fff, | ||
169 | .flags = IORESOURCE_MEM, | ||
170 | }, { | ||
171 | .name = "ge01 err irq", | ||
172 | .start = IRQ_KIRKWOOD_GE01_ERR, | ||
173 | .end = IRQ_KIRKWOOD_GE01_ERR, | ||
174 | .flags = IORESOURCE_IRQ, | ||
175 | }, | ||
176 | }; | ||
177 | |||
178 | static struct platform_device kirkwood_ge01_shared = { | ||
179 | .name = MV643XX_ETH_SHARED_NAME, | ||
180 | .id = 1, | ||
181 | .dev = { | ||
182 | .platform_data = &kirkwood_ge01_shared_data, | ||
183 | }, | ||
184 | .num_resources = ARRAY_SIZE(kirkwood_ge01_shared_resources), | ||
185 | .resource = kirkwood_ge01_shared_resources, | ||
186 | }; | ||
187 | |||
188 | static struct resource kirkwood_ge01_resources[] = { | ||
189 | { | ||
190 | .name = "ge01 irq", | ||
191 | .start = IRQ_KIRKWOOD_GE01_SUM, | ||
192 | .end = IRQ_KIRKWOOD_GE01_SUM, | ||
193 | .flags = IORESOURCE_IRQ, | ||
194 | }, | ||
195 | }; | ||
196 | |||
197 | static struct platform_device kirkwood_ge01 = { | ||
198 | .name = MV643XX_ETH_NAME, | ||
199 | .id = 1, | ||
200 | .num_resources = 1, | ||
201 | .resource = kirkwood_ge01_resources, | ||
202 | }; | ||
203 | |||
204 | void __init kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data) | ||
205 | { | ||
206 | eth_data->shared = &kirkwood_ge01_shared; | ||
207 | kirkwood_ge01.dev.platform_data = eth_data; | ||
208 | |||
209 | platform_device_register(&kirkwood_ge01_shared); | ||
210 | platform_device_register(&kirkwood_ge01); | ||
211 | } | ||
212 | |||
213 | |||
214 | /***************************************************************************** | ||
156 | * Ethernet switch | 215 | * Ethernet switch |
157 | ****************************************************************************/ | 216 | ****************************************************************************/ |
158 | static struct resource kirkwood_switch_resources[] = { | 217 | static struct resource kirkwood_switch_resources[] = { |
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h index 5774632a67e3..fe367c18e722 100644 --- a/arch/arm/mach-kirkwood/common.h +++ b/arch/arm/mach-kirkwood/common.h | |||
@@ -30,6 +30,7 @@ void kirkwood_pcie_id(u32 *dev, u32 *rev); | |||
30 | 30 | ||
31 | void kirkwood_ehci_init(void); | 31 | void kirkwood_ehci_init(void); |
32 | void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data); | 32 | void kirkwood_ge00_init(struct mv643xx_eth_platform_data *eth_data); |
33 | void kirkwood_ge01_init(struct mv643xx_eth_platform_data *eth_data); | ||
33 | void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq); | 34 | void kirkwood_ge00_switch_init(struct dsa_platform_data *d, int irq); |
34 | void kirkwood_pcie_init(void); | 35 | void kirkwood_pcie_init(void); |
35 | void kirkwood_rtc_init(void); | 36 | void kirkwood_rtc_init(void); |
diff --git a/arch/arm/mach-kirkwood/include/mach/dma.h b/arch/arm/mach-kirkwood/include/mach/dma.h deleted file mode 100644 index 40a8c178f10d..000000000000 --- a/arch/arm/mach-kirkwood/include/mach/dma.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* empty */ | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/gpio.h b/arch/arm/mach-kirkwood/include/mach/gpio.h new file mode 100644 index 000000000000..81b335eb62ec --- /dev/null +++ b/arch/arm/mach-kirkwood/include/mach/gpio.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * arch/asm-arm/mach-kirkwood/include/mach/gpio.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_GPIO_H | ||
10 | #define __ASM_ARCH_GPIO_H | ||
11 | |||
12 | #include <mach/irqs.h> | ||
13 | #include <plat/gpio.h> | ||
14 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
15 | |||
16 | #define GPIO_MAX 50 | ||
17 | #define GPIO_OFF(pin) (((pin) >> 5) ? 0x0140 : 0x0100) | ||
18 | #define GPIO_OUT(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x00) | ||
19 | #define GPIO_IO_CONF(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x04) | ||
20 | #define GPIO_BLINK_EN(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x08) | ||
21 | #define GPIO_IN_POL(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x0c) | ||
22 | #define GPIO_DATA_IN(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x10) | ||
23 | #define GPIO_EDGE_CAUSE(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x14) | ||
24 | #define GPIO_EDGE_MASK(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x18) | ||
25 | #define GPIO_LEVEL_MASK(pin) (DEV_BUS_VIRT_BASE + GPIO_OFF(pin) + 0x1c) | ||
26 | |||
27 | static inline int gpio_to_irq(int pin) | ||
28 | { | ||
29 | return pin + IRQ_KIRKWOOD_GPIO_START; | ||
30 | } | ||
31 | |||
32 | static inline int irq_to_gpio(int irq) | ||
33 | { | ||
34 | return irq - IRQ_KIRKWOOD_GPIO_START; | ||
35 | } | ||
36 | |||
37 | |||
38 | #endif | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/irqs.h b/arch/arm/mach-kirkwood/include/mach/irqs.h index ffab89f21c11..f00a0a45a67e 100644 --- a/arch/arm/mach-kirkwood/include/mach/irqs.h +++ b/arch/arm/mach-kirkwood/include/mach/irqs.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef __ASM_ARCH_IRQS_H | 11 | #ifndef __ASM_ARCH_IRQS_H |
12 | #define __ASM_ARCH_IRQS_H | 12 | #define __ASM_ARCH_IRQS_H |
13 | 13 | ||
14 | #include "kirkwood.h" /* need GPIO_MAX */ | ||
15 | |||
16 | /* | 14 | /* |
17 | * Low Interrupt Controller | 15 | * Low Interrupt Controller |
18 | */ | 16 | */ |
@@ -51,12 +49,13 @@ | |||
51 | #define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40 | 49 | #define IRQ_KIRKWOOD_GPIO_HIGH_8_15 40 |
52 | #define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41 | 50 | #define IRQ_KIRKWOOD_GPIO_HIGH_16_23 41 |
53 | #define IRQ_KIRKWOOD_GE00_ERR 46 | 51 | #define IRQ_KIRKWOOD_GE00_ERR 46 |
52 | #define IRQ_KIRKWOOD_GE01_ERR 47 | ||
54 | 53 | ||
55 | /* | 54 | /* |
56 | * KIRKWOOD General Purpose Pins | 55 | * KIRKWOOD General Purpose Pins |
57 | */ | 56 | */ |
58 | #define IRQ_KIRKWOOD_GPIO_START 64 | 57 | #define IRQ_KIRKWOOD_GPIO_START 64 |
59 | #define NR_GPIO_IRQS GPIO_MAX | 58 | #define NR_GPIO_IRQS 50 |
60 | 59 | ||
61 | #define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS) | 60 | #define NR_IRQS (IRQ_KIRKWOOD_GPIO_START + NR_GPIO_IRQS) |
62 | 61 | ||
diff --git a/arch/arm/mach-kirkwood/include/mach/kirkwood.h b/arch/arm/mach-kirkwood/include/mach/kirkwood.h index eae42406fd86..ada480c0e197 100644 --- a/arch/arm/mach-kirkwood/include/mach/kirkwood.h +++ b/arch/arm/mach-kirkwood/include/mach/kirkwood.h | |||
@@ -117,7 +117,4 @@ | |||
117 | #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000) | 117 | #define SATA_PHYS_BASE (KIRKWOOD_REGS_PHYS_BASE | 0x80000) |
118 | 118 | ||
119 | 119 | ||
120 | #define GPIO_MAX 50 | ||
121 | |||
122 | |||
123 | #endif | 120 | #endif |
diff --git a/arch/arm/mach-kirkwood/include/mach/memory.h b/arch/arm/mach-kirkwood/include/mach/memory.h index b5fb34bdccd5..45431e131465 100644 --- a/arch/arm/mach-kirkwood/include/mach/memory.h +++ b/arch/arm/mach-kirkwood/include/mach/memory.h | |||
@@ -7,8 +7,4 @@ | |||
7 | 7 | ||
8 | #define PHYS_OFFSET UL(0x00000000) | 8 | #define PHYS_OFFSET UL(0x00000000) |
9 | 9 | ||
10 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
11 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
12 | |||
13 | |||
14 | #endif | 10 | #endif |
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c index 5790643ffe07..efb86b700276 100644 --- a/arch/arm/mach-kirkwood/irq.c +++ b/arch/arm/mach-kirkwood/irq.c | |||
@@ -13,10 +13,45 @@ | |||
13 | #include <linux/irq.h> | 13 | #include <linux/irq.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <plat/irq.h> | 15 | #include <plat/irq.h> |
16 | #include <asm/gpio.h> | ||
16 | #include "common.h" | 17 | #include "common.h" |
17 | 18 | ||
19 | static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
20 | { | ||
21 | BUG_ON(irq < IRQ_KIRKWOOD_GPIO_LOW_0_7); | ||
22 | BUG_ON(irq > IRQ_KIRKWOOD_GPIO_HIGH_16_23); | ||
23 | |||
24 | orion_gpio_irq_handler((irq - IRQ_KIRKWOOD_GPIO_LOW_0_7) << 3); | ||
25 | } | ||
26 | |||
18 | void __init kirkwood_init_irq(void) | 27 | void __init kirkwood_init_irq(void) |
19 | { | 28 | { |
29 | int i; | ||
30 | |||
20 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); | 31 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); |
21 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); | 32 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); |
33 | |||
34 | /* | ||
35 | * Mask and clear GPIO IRQ interrupts. | ||
36 | */ | ||
37 | writel(0, GPIO_LEVEL_MASK(0)); | ||
38 | writel(0, GPIO_EDGE_MASK(0)); | ||
39 | writel(0, GPIO_EDGE_CAUSE(0)); | ||
40 | writel(0, GPIO_LEVEL_MASK(32)); | ||
41 | writel(0, GPIO_EDGE_MASK(32)); | ||
42 | writel(0, GPIO_EDGE_CAUSE(32)); | ||
43 | |||
44 | for (i = IRQ_KIRKWOOD_GPIO_START; i < NR_IRQS; i++) { | ||
45 | set_irq_chip(i, &orion_gpio_irq_level_chip); | ||
46 | set_irq_handler(i, handle_level_irq); | ||
47 | irq_desc[i].status |= IRQ_LEVEL; | ||
48 | set_irq_flags(i, IRQF_VALID); | ||
49 | } | ||
50 | set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_0_7, gpio_irq_handler); | ||
51 | set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_8_15, gpio_irq_handler); | ||
52 | set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_16_23, gpio_irq_handler); | ||
53 | set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_LOW_24_31, gpio_irq_handler); | ||
54 | set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_0_7, gpio_irq_handler); | ||
55 | set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_8_15, gpio_irq_handler); | ||
56 | set_irq_chained_handler(IRQ_KIRKWOOD_GPIO_HIGH_16_23, gpio_irq_handler); | ||
22 | } | 57 | } |
diff --git a/arch/arm/mach-kirkwood/rd88f6281-setup.c b/arch/arm/mach-kirkwood/rd88f6281-setup.c index 175054abd630..9a0e905d10cd 100644 --- a/arch/arm/mach-kirkwood/rd88f6281-setup.c +++ b/arch/arm/mach-kirkwood/rd88f6281-setup.c | |||
@@ -80,24 +80,38 @@ static struct dsa_platform_data rd88f6281_switch_data = { | |||
80 | .port_names[1] = "lan2", | 80 | .port_names[1] = "lan2", |
81 | .port_names[2] = "lan3", | 81 | .port_names[2] = "lan3", |
82 | .port_names[3] = "lan4", | 82 | .port_names[3] = "lan4", |
83 | .port_names[4] = "wan", | ||
84 | .port_names[5] = "cpu", | 83 | .port_names[5] = "cpu", |
85 | }; | 84 | }; |
86 | 85 | ||
86 | static struct mv643xx_eth_platform_data rd88f6281_ge01_data = { | ||
87 | .phy_addr = MV643XX_ETH_PHY_ADDR(11), | ||
88 | }; | ||
89 | |||
87 | static struct mv_sata_platform_data rd88f6281_sata_data = { | 90 | static struct mv_sata_platform_data rd88f6281_sata_data = { |
88 | .n_ports = 2, | 91 | .n_ports = 2, |
89 | }; | 92 | }; |
90 | 93 | ||
91 | static void __init rd88f6281_init(void) | 94 | static void __init rd88f6281_init(void) |
92 | { | 95 | { |
96 | u32 dev, rev; | ||
97 | |||
93 | /* | 98 | /* |
94 | * Basic setup. Needs to be called early. | 99 | * Basic setup. Needs to be called early. |
95 | */ | 100 | */ |
96 | kirkwood_init(); | 101 | kirkwood_init(); |
97 | 102 | ||
98 | kirkwood_ehci_init(); | 103 | kirkwood_ehci_init(); |
104 | |||
99 | kirkwood_ge00_init(&rd88f6281_ge00_data); | 105 | kirkwood_ge00_init(&rd88f6281_ge00_data); |
106 | kirkwood_pcie_id(&dev, &rev); | ||
107 | if (rev == MV88F6281_REV_A0) { | ||
108 | rd88f6281_switch_data.sw_addr = 10; | ||
109 | kirkwood_ge01_init(&rd88f6281_ge01_data); | ||
110 | } else { | ||
111 | rd88f6281_switch_data.port_names[4] = "wan"; | ||
112 | } | ||
100 | kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); | 113 | kirkwood_ge00_switch_init(&rd88f6281_switch_data, NO_IRQ); |
114 | |||
101 | kirkwood_rtc_init(); | 115 | kirkwood_rtc_init(); |
102 | kirkwood_sata_init(&rd88f6281_sata_data); | 116 | kirkwood_sata_init(&rd88f6281_sata_data); |
103 | kirkwood_uart0_init(); | 117 | kirkwood_uart0_init(); |
diff --git a/arch/arm/mach-ks8695/Kconfig b/arch/arm/mach-ks8695/Kconfig index ce1cf8de2b4d..2754daabda55 100644 --- a/arch/arm/mach-ks8695/Kconfig +++ b/arch/arm/mach-ks8695/Kconfig | |||
@@ -8,6 +8,12 @@ config MACH_KS8695 | |||
8 | Say 'Y' here if you want your kernel to run on the original | 8 | Say 'Y' here if you want your kernel to run on the original |
9 | Kendin-Micrel KS8695 development board. | 9 | Kendin-Micrel KS8695 development board. |
10 | 10 | ||
11 | config MACH_DSM320 | ||
12 | bool "DSM-320 Wireless Media Player" | ||
13 | help | ||
14 | Say 'Y' here if you want your kernel to run on the D-Link | ||
15 | DSM-320 Wireless Media Player. | ||
16 | |||
11 | endmenu | 17 | endmenu |
12 | 18 | ||
13 | endif | 19 | endif |
diff --git a/arch/arm/mach-ks8695/Makefile b/arch/arm/mach-ks8695/Makefile index ade42b73afbb..f735d2cc0294 100644 --- a/arch/arm/mach-ks8695/Makefile +++ b/arch/arm/mach-ks8695/Makefile | |||
@@ -16,3 +16,4 @@ obj-$(CONFIG_LEDS) += leds.o | |||
16 | 16 | ||
17 | # Board-specific support | 17 | # Board-specific support |
18 | obj-$(CONFIG_MACH_KS8695) += board-micrel.o | 18 | obj-$(CONFIG_MACH_KS8695) += board-micrel.o |
19 | obj-$(CONFIG_MACH_DSM320) += board-dsm320.o | ||
diff --git a/arch/arm/mach-ks8695/board-dsm320.c b/arch/arm/mach-ks8695/board-dsm320.c new file mode 100644 index 000000000000..521ff0789f39 --- /dev/null +++ b/arch/arm/mach-ks8695/board-dsm320.c | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ks8695/board-dsm320.c | ||
3 | * | ||
4 | * DSM-320 D-Link Wireless Media Player, board support. | ||
5 | * | ||
6 | * Copyright 2008 Simtec Electronics | ||
7 | * Daniel Silverstone <dsilvers@simtec.co.uk> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | |||
20 | #include <linux/mtd/mtd.h> | ||
21 | #include <linux/mtd/map.h> | ||
22 | #include <linux/mtd/physmap.h> | ||
23 | #include <linux/mtd/partitions.h> | ||
24 | |||
25 | #include <asm/mach-types.h> | ||
26 | |||
27 | #include <asm/mach/arch.h> | ||
28 | #include <asm/mach/map.h> | ||
29 | #include <asm/mach/irq.h> | ||
30 | |||
31 | #include <mach/devices.h> | ||
32 | #include <mach/gpio.h> | ||
33 | |||
34 | #include "generic.h" | ||
35 | |||
36 | #ifdef CONFIG_PCI | ||
37 | static int dsm320_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
38 | { | ||
39 | switch (slot) { | ||
40 | case 0: | ||
41 | /* PCI-AHB bridge? */ | ||
42 | return KS8695_IRQ_EXTERN0; | ||
43 | case 18: | ||
44 | /* Mini PCI slot */ | ||
45 | return KS8695_IRQ_EXTERN2; | ||
46 | case 20: | ||
47 | /* RealMAGIC chip */ | ||
48 | return KS8695_IRQ_EXTERN0; | ||
49 | } | ||
50 | BUG(); | ||
51 | } | ||
52 | |||
53 | static struct ks8695_pci_cfg __initdata dsm320_pci = { | ||
54 | .mode = KS8695_MODE_MINIPCI, | ||
55 | .map_irq = dsm320_pci_map_irq, | ||
56 | }; | ||
57 | |||
58 | static void __init dsm320_register_pci(void) | ||
59 | { | ||
60 | /* Initialise the GPIO lines for interrupt mode */ | ||
61 | /* RealMAGIC */ | ||
62 | ks8695_gpio_interrupt(KS8695_GPIO_0, IRQ_TYPE_LEVEL_LOW); | ||
63 | /* MiniPCI Slot */ | ||
64 | ks8695_gpio_interrupt(KS8695_GPIO_2, IRQ_TYPE_LEVEL_LOW); | ||
65 | |||
66 | ks8695_init_pci(&dsm320_pci); | ||
67 | } | ||
68 | |||
69 | #else | ||
70 | static inline void __init dsm320_register_pci(void) { } | ||
71 | #endif | ||
72 | |||
73 | static struct physmap_flash_data dsm320_nor_pdata = { | ||
74 | .width = 4, | ||
75 | .nr_parts = 0, | ||
76 | }; | ||
77 | |||
78 | static struct resource dsm320_nor_resource[] = { | ||
79 | [0] = { | ||
80 | .start = SZ_32M, /* We expect the bootloader to map | ||
81 | * the flash here. | ||
82 | */ | ||
83 | .end = SZ_32M + SZ_4M - 1, | ||
84 | .flags = IORESOURCE_MEM, | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | static struct platform_device dsm320_device_nor = { | ||
89 | .name = "physmap-flash", | ||
90 | .id = -1, | ||
91 | .num_resources = ARRAY_SIZE(dsm320_nor_resource), | ||
92 | .resource = dsm320_nor_resource, | ||
93 | .dev = { | ||
94 | .platform_data = &dsm320_nor_pdata, | ||
95 | }, | ||
96 | }; | ||
97 | |||
98 | void __init dsm320_register_nor(void) | ||
99 | { | ||
100 | int ret; | ||
101 | |||
102 | ret = platform_device_register(&dsm320_device_nor); | ||
103 | if (ret < 0) | ||
104 | printk(KERN_ERR "failed to register physmap-flash device\n"); | ||
105 | } | ||
106 | |||
107 | static void __init dsm320_init(void) | ||
108 | { | ||
109 | /* GPIO registration */ | ||
110 | ks8695_register_gpios(); | ||
111 | |||
112 | /* PCI registration */ | ||
113 | dsm320_register_pci(); | ||
114 | |||
115 | /* Network device */ | ||
116 | ks8695_add_device_lan(); /* eth0 = LAN */ | ||
117 | |||
118 | /* NOR devices */ | ||
119 | dsm320_register_nor(); | ||
120 | } | ||
121 | |||
122 | MACHINE_START(DSM320, "D-Link DSM-320 Wireless Media Player") | ||
123 | /* Maintainer: Simtec Electronics. */ | ||
124 | .phys_io = KS8695_IO_PA, | ||
125 | .io_pg_offst = (KS8695_IO_VA >> 18) & 0xfffc, | ||
126 | .boot_params = KS8695_SDRAM_PA + 0x100, | ||
127 | .map_io = ks8695_map_io, | ||
128 | .init_irq = ks8695_init_irq, | ||
129 | .init_machine = dsm320_init, | ||
130 | .timer = &ks8695_timer, | ||
131 | MACHINE_END | ||
diff --git a/arch/arm/mach-ks8695/board-micrel.c b/arch/arm/mach-ks8695/board-micrel.c index 0468e93b7d3b..8ceaf5ac6e2c 100644 --- a/arch/arm/mach-ks8695/board-micrel.c +++ b/arch/arm/mach-ks8695/board-micrel.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <asm/mach/irq.h> | 19 | #include <asm/mach/irq.h> |
20 | 20 | ||
21 | #include <mach/gpio.h> | ||
21 | #include <mach/devices.h> | 22 | #include <mach/devices.h> |
22 | 23 | ||
23 | #include "generic.h" | 24 | #include "generic.h" |
@@ -39,6 +40,8 @@ static void __init micrel_init(void) | |||
39 | { | 40 | { |
40 | printk(KERN_INFO "Micrel KS8695 Development Board initializing\n"); | 41 | printk(KERN_INFO "Micrel KS8695 Development Board initializing\n"); |
41 | 42 | ||
43 | ks8695_register_gpios(); | ||
44 | |||
42 | #ifdef CONFIG_PCI | 45 | #ifdef CONFIG_PCI |
43 | ks8695_init_pci(&micrel_pci); | 46 | ks8695_init_pci(&micrel_pci); |
44 | #endif | 47 | #endif |
diff --git a/arch/arm/mach-ks8695/devices.c b/arch/arm/mach-ks8695/devices.c index 4bd251482c8f..36ab0fd3d9b6 100644 --- a/arch/arm/mach-ks8695/devices.c +++ b/arch/arm/mach-ks8695/devices.c | |||
@@ -25,19 +25,20 @@ | |||
25 | #include <mach/regs-wan.h> | 25 | #include <mach/regs-wan.h> |
26 | #include <mach/regs-lan.h> | 26 | #include <mach/regs-lan.h> |
27 | #include <mach/regs-hpna.h> | 27 | #include <mach/regs-hpna.h> |
28 | #include <mach/regs-switch.h> | ||
29 | #include <mach/regs-misc.h> | ||
28 | 30 | ||
29 | 31 | ||
30 | /* -------------------------------------------------------------------- | 32 | /* -------------------------------------------------------------------- |
31 | * Ethernet | 33 | * Ethernet |
32 | * -------------------------------------------------------------------- */ | 34 | * -------------------------------------------------------------------- */ |
33 | 35 | ||
34 | #if defined(CONFIG_ARM_KS8695_ETHER) || defined(CONFIG_ARM_KS8695_ETHER_MODULE) | ||
35 | static u64 eth_dmamask = 0xffffffffUL; | 36 | static u64 eth_dmamask = 0xffffffffUL; |
36 | 37 | ||
37 | static struct resource ks8695_wan_resources[] = { | 38 | static struct resource ks8695_wan_resources[] = { |
38 | [0] = { | 39 | [0] = { |
39 | .start = KS8695_WAN_VA, | 40 | .start = KS8695_WAN_PA, |
40 | .end = KS8695_WAN_VA + 0x00ff, | 41 | .end = KS8695_WAN_PA + 0x00ff, |
41 | .flags = IORESOURCE_MEM, | 42 | .flags = IORESOURCE_MEM, |
42 | }, | 43 | }, |
43 | [1] = { | 44 | [1] = { |
@@ -58,6 +59,12 @@ static struct resource ks8695_wan_resources[] = { | |||
58 | .end = KS8695_IRQ_WAN_LINK, | 59 | .end = KS8695_IRQ_WAN_LINK, |
59 | .flags = IORESOURCE_IRQ, | 60 | .flags = IORESOURCE_IRQ, |
60 | }, | 61 | }, |
62 | [4] = { | ||
63 | .name = "WAN PHY", | ||
64 | .start = KS8695_MISC_PA, | ||
65 | .end = KS8695_MISC_PA + 0x1f, | ||
66 | .flags = IORESOURCE_MEM, | ||
67 | }, | ||
61 | }; | 68 | }; |
62 | 69 | ||
63 | static struct platform_device ks8695_wan_device = { | 70 | static struct platform_device ks8695_wan_device = { |
@@ -74,8 +81,8 @@ static struct platform_device ks8695_wan_device = { | |||
74 | 81 | ||
75 | static struct resource ks8695_lan_resources[] = { | 82 | static struct resource ks8695_lan_resources[] = { |
76 | [0] = { | 83 | [0] = { |
77 | .start = KS8695_LAN_VA, | 84 | .start = KS8695_LAN_PA, |
78 | .end = KS8695_LAN_VA + 0x00ff, | 85 | .end = KS8695_LAN_PA + 0x00ff, |
79 | .flags = IORESOURCE_MEM, | 86 | .flags = IORESOURCE_MEM, |
80 | }, | 87 | }, |
81 | [1] = { | 88 | [1] = { |
@@ -90,6 +97,12 @@ static struct resource ks8695_lan_resources[] = { | |||
90 | .end = KS8695_IRQ_LAN_TX_STATUS, | 97 | .end = KS8695_IRQ_LAN_TX_STATUS, |
91 | .flags = IORESOURCE_IRQ, | 98 | .flags = IORESOURCE_IRQ, |
92 | }, | 99 | }, |
100 | [3] = { | ||
101 | .name = "LAN SWITCH", | ||
102 | .start = KS8695_SWITCH_PA, | ||
103 | .end = KS8695_SWITCH_PA + 0x4f, | ||
104 | .flags = IORESOURCE_MEM, | ||
105 | }, | ||
93 | }; | 106 | }; |
94 | 107 | ||
95 | static struct platform_device ks8695_lan_device = { | 108 | static struct platform_device ks8695_lan_device = { |
@@ -106,8 +119,8 @@ static struct platform_device ks8695_lan_device = { | |||
106 | 119 | ||
107 | static struct resource ks8695_hpna_resources[] = { | 120 | static struct resource ks8695_hpna_resources[] = { |
108 | [0] = { | 121 | [0] = { |
109 | .start = KS8695_HPNA_VA, | 122 | .start = KS8695_HPNA_PA, |
110 | .end = KS8695_HPNA_VA + 0x00ff, | 123 | .end = KS8695_HPNA_PA + 0x00ff, |
111 | .flags = IORESOURCE_MEM, | 124 | .flags = IORESOURCE_MEM, |
112 | }, | 125 | }, |
113 | [1] = { | 126 | [1] = { |
@@ -149,18 +162,12 @@ void __init ks8696_add_device_hpna(void) | |||
149 | { | 162 | { |
150 | platform_device_register(&ks8695_hpna_device); | 163 | platform_device_register(&ks8695_hpna_device); |
151 | } | 164 | } |
152 | #else | ||
153 | void __init ks8695_add_device_wan(void) {} | ||
154 | void __init ks8695_add_device_lan(void) {} | ||
155 | void __init ks8696_add_device_hpna(void) {} | ||
156 | #endif | ||
157 | 165 | ||
158 | 166 | ||
159 | /* -------------------------------------------------------------------- | 167 | /* -------------------------------------------------------------------- |
160 | * Watchdog | 168 | * Watchdog |
161 | * -------------------------------------------------------------------- */ | 169 | * -------------------------------------------------------------------- */ |
162 | 170 | ||
163 | #if defined(CONFIG_KS8695_WATCHDOG) || defined(CONFIG_KS8695_WATCHDOG_MODULE) | ||
164 | static struct platform_device ks8695_wdt_device = { | 171 | static struct platform_device ks8695_wdt_device = { |
165 | .name = "ks8695_wdt", | 172 | .name = "ks8695_wdt", |
166 | .id = -1, | 173 | .id = -1, |
@@ -171,9 +178,6 @@ static void __init ks8695_add_device_watchdog(void) | |||
171 | { | 178 | { |
172 | platform_device_register(&ks8695_wdt_device); | 179 | platform_device_register(&ks8695_wdt_device); |
173 | } | 180 | } |
174 | #else | ||
175 | static void __init ks8695_add_device_watchdog(void) {} | ||
176 | #endif | ||
177 | 181 | ||
178 | 182 | ||
179 | /* -------------------------------------------------------------------- | 183 | /* -------------------------------------------------------------------- |
@@ -190,7 +194,7 @@ void __init ks8695_init_leds(u8 cpu_led, u8 timer_led) | |||
190 | gpio_direction_output(cpu_led, 1); | 194 | gpio_direction_output(cpu_led, 1); |
191 | gpio_direction_output(timer_led, 1); | 195 | gpio_direction_output(timer_led, 1); |
192 | 196 | ||
193 | ks8695_leds_cpu = cpu_led; | 197 | ks8695_leds_cpu = cpu_led; |
194 | ks8695_leds_timer = timer_led; | 198 | ks8695_leds_timer = timer_led; |
195 | } | 199 | } |
196 | #else | 200 | #else |
diff --git a/arch/arm/mach-ks8695/gpio.c b/arch/arm/mach-ks8695/gpio.c index 9aecf0c4b8b1..55fbf7111a5b 100644 --- a/arch/arm/mach-ks8695/gpio.c +++ b/arch/arm/mach-ks8695/gpio.c | |||
@@ -2,6 +2,8 @@ | |||
2 | * arch/arm/mach-ks8695/gpio.c | 2 | * arch/arm/mach-ks8695/gpio.c |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Andrew Victor | 4 | * Copyright (C) 2006 Andrew Victor |
5 | * Updated to GPIOLIB, Copyright 2008 Simtec Electronics | ||
6 | * Daniel Silverstone <dsilvers@simtec.co.uk> | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -35,7 +37,7 @@ | |||
35 | * Configure a GPIO line for either GPIO function, or its internal | 37 | * Configure a GPIO line for either GPIO function, or its internal |
36 | * function (Interrupt, Timer, etc). | 38 | * function (Interrupt, Timer, etc). |
37 | */ | 39 | */ |
38 | static void __init_or_module ks8695_gpio_mode(unsigned int pin, short gpio) | 40 | static void ks8695_gpio_mode(unsigned int pin, short gpio) |
39 | { | 41 | { |
40 | unsigned int enable[] = { IOPC_IOEINT0EN, IOPC_IOEINT1EN, IOPC_IOEINT2EN, IOPC_IOEINT3EN, IOPC_IOTIM0EN, IOPC_IOTIM1EN }; | 42 | unsigned int enable[] = { IOPC_IOEINT0EN, IOPC_IOEINT1EN, IOPC_IOEINT2EN, IOPC_IOEINT3EN, IOPC_IOTIM0EN, IOPC_IOTIM1EN }; |
41 | unsigned long x, flags; | 43 | unsigned long x, flags; |
@@ -61,7 +63,7 @@ static unsigned short gpio_irq[] = { KS8695_IRQ_EXTERN0, KS8695_IRQ_EXTERN1, KS8 | |||
61 | /* | 63 | /* |
62 | * Configure GPIO pin as external interrupt source. | 64 | * Configure GPIO pin as external interrupt source. |
63 | */ | 65 | */ |
64 | int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type) | 66 | int ks8695_gpio_interrupt(unsigned int pin, unsigned int type) |
65 | { | 67 | { |
66 | unsigned long x, flags; | 68 | unsigned long x, flags; |
67 | 69 | ||
@@ -94,7 +96,7 @@ EXPORT_SYMBOL(ks8695_gpio_interrupt); | |||
94 | /* | 96 | /* |
95 | * Configure the GPIO line as an input. | 97 | * Configure the GPIO line as an input. |
96 | */ | 98 | */ |
97 | int __init_or_module gpio_direction_input(unsigned int pin) | 99 | static int ks8695_gpio_direction_input(struct gpio_chip *gc, unsigned int pin) |
98 | { | 100 | { |
99 | unsigned long x, flags; | 101 | unsigned long x, flags; |
100 | 102 | ||
@@ -115,13 +117,13 @@ int __init_or_module gpio_direction_input(unsigned int pin) | |||
115 | 117 | ||
116 | return 0; | 118 | return 0; |
117 | } | 119 | } |
118 | EXPORT_SYMBOL(gpio_direction_input); | ||
119 | 120 | ||
120 | 121 | ||
121 | /* | 122 | /* |
122 | * Configure the GPIO line as an output, with default state. | 123 | * Configure the GPIO line as an output, with default state. |
123 | */ | 124 | */ |
124 | int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state) | 125 | static int ks8695_gpio_direction_output(struct gpio_chip *gc, |
126 | unsigned int pin, int state) | ||
125 | { | 127 | { |
126 | unsigned long x, flags; | 128 | unsigned long x, flags; |
127 | 129 | ||
@@ -150,13 +152,13 @@ int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state) | |||
150 | 152 | ||
151 | return 0; | 153 | return 0; |
152 | } | 154 | } |
153 | EXPORT_SYMBOL(gpio_direction_output); | ||
154 | 155 | ||
155 | 156 | ||
156 | /* | 157 | /* |
157 | * Set the state of an output GPIO line. | 158 | * Set the state of an output GPIO line. |
158 | */ | 159 | */ |
159 | void gpio_set_value(unsigned int pin, unsigned int state) | 160 | static void ks8695_gpio_set_value(struct gpio_chip *gc, |
161 | unsigned int pin, int state) | ||
160 | { | 162 | { |
161 | unsigned long x, flags; | 163 | unsigned long x, flags; |
162 | 164 | ||
@@ -175,13 +177,12 @@ void gpio_set_value(unsigned int pin, unsigned int state) | |||
175 | 177 | ||
176 | local_irq_restore(flags); | 178 | local_irq_restore(flags); |
177 | } | 179 | } |
178 | EXPORT_SYMBOL(gpio_set_value); | ||
179 | 180 | ||
180 | 181 | ||
181 | /* | 182 | /* |
182 | * Read the state of a GPIO line. | 183 | * Read the state of a GPIO line. |
183 | */ | 184 | */ |
184 | int gpio_get_value(unsigned int pin) | 185 | static int ks8695_gpio_get_value(struct gpio_chip *gc, unsigned int pin) |
185 | { | 186 | { |
186 | unsigned long x; | 187 | unsigned long x; |
187 | 188 | ||
@@ -191,21 +192,18 @@ int gpio_get_value(unsigned int pin) | |||
191 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); | 192 | x = __raw_readl(KS8695_GPIO_VA + KS8695_IOPD); |
192 | return (x & IOPD(pin)) != 0; | 193 | return (x & IOPD(pin)) != 0; |
193 | } | 194 | } |
194 | EXPORT_SYMBOL(gpio_get_value); | ||
195 | 195 | ||
196 | 196 | ||
197 | /* | 197 | /* |
198 | * Map GPIO line to IRQ number. | 198 | * Map GPIO line to IRQ number. |
199 | */ | 199 | */ |
200 | int gpio_to_irq(unsigned int pin) | 200 | static int ks8695_gpio_to_irq(struct gpio_chip *gc, unsigned int pin) |
201 | { | 201 | { |
202 | if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */ | 202 | if (pin > KS8695_GPIO_3) /* only GPIO 0..3 can generate IRQ */ |
203 | return -EINVAL; | 203 | return -EINVAL; |
204 | 204 | ||
205 | return gpio_irq[pin]; | 205 | return gpio_irq[pin]; |
206 | } | 206 | } |
207 | EXPORT_SYMBOL(gpio_to_irq); | ||
208 | |||
209 | 207 | ||
210 | /* | 208 | /* |
211 | * Map IRQ number to GPIO line. | 209 | * Map IRQ number to GPIO line. |
@@ -219,6 +217,26 @@ int irq_to_gpio(unsigned int irq) | |||
219 | } | 217 | } |
220 | EXPORT_SYMBOL(irq_to_gpio); | 218 | EXPORT_SYMBOL(irq_to_gpio); |
221 | 219 | ||
220 | /* GPIOLIB interface */ | ||
221 | |||
222 | static struct gpio_chip ks8695_gpio_chip = { | ||
223 | .label = "KS8695", | ||
224 | .direction_input = ks8695_gpio_direction_input, | ||
225 | .direction_output = ks8695_gpio_direction_output, | ||
226 | .get = ks8695_gpio_get_value, | ||
227 | .set = ks8695_gpio_set_value, | ||
228 | .to_irq = ks8695_gpio_to_irq, | ||
229 | .base = 0, | ||
230 | .ngpio = 16, | ||
231 | .can_sleep = 0, | ||
232 | }; | ||
233 | |||
234 | /* Register the GPIOs */ | ||
235 | void ks8695_register_gpios(void) | ||
236 | { | ||
237 | if (gpiochip_add(&ks8695_gpio_chip)) | ||
238 | printk(KERN_ERR "Unable to register core GPIOs\n"); | ||
239 | } | ||
222 | 240 | ||
223 | /* .... Debug interface ..................................................... */ | 241 | /* .... Debug interface ..................................................... */ |
224 | 242 | ||
diff --git a/arch/arm/mach-ks8695/include/mach/dma.h b/arch/arm/mach-ks8695/include/mach/dma.h deleted file mode 100644 index 561206280089..000000000000 --- a/arch/arm/mach-ks8695/include/mach/dma.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ks8695/include/mach/dma.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
diff --git a/arch/arm/mach-ks8695/include/mach/gpio.h b/arch/arm/mach-ks8695/include/mach/gpio.h index d4af5c335f16..86312d476bc6 100644 --- a/arch/arm/mach-ks8695/include/mach/gpio.h +++ b/arch/arm/mach-ks8695/include/mach/gpio.h | |||
@@ -30,53 +30,28 @@ | |||
30 | #define KS8695_GPIO_14 14 | 30 | #define KS8695_GPIO_14 14 |
31 | #define KS8695_GPIO_15 15 | 31 | #define KS8695_GPIO_15 15 |
32 | 32 | ||
33 | |||
34 | /* | 33 | /* |
35 | * Configure GPIO pin as external interrupt source. | 34 | * Configure GPIO pin as external interrupt source. |
36 | */ | 35 | */ |
37 | int __init_or_module ks8695_gpio_interrupt(unsigned int pin, unsigned int type); | 36 | extern int ks8695_gpio_interrupt(unsigned int pin, unsigned int type); |
38 | |||
39 | /* | ||
40 | * Configure the GPIO line as an input. | ||
41 | */ | ||
42 | int __init_or_module gpio_direction_input(unsigned int pin); | ||
43 | |||
44 | /* | ||
45 | * Configure the GPIO line as an output, with default state. | ||
46 | */ | ||
47 | int __init_or_module gpio_direction_output(unsigned int pin, unsigned int state); | ||
48 | |||
49 | /* | ||
50 | * Set the state of an output GPIO line. | ||
51 | */ | ||
52 | void gpio_set_value(unsigned int pin, unsigned int state); | ||
53 | |||
54 | /* | ||
55 | * Read the state of a GPIO line. | ||
56 | */ | ||
57 | int gpio_get_value(unsigned int pin); | ||
58 | |||
59 | /* | ||
60 | * Map GPIO line to IRQ number. | ||
61 | */ | ||
62 | int gpio_to_irq(unsigned int pin); | ||
63 | 37 | ||
64 | /* | 38 | /* |
65 | * Map IRQ number to GPIO line. | 39 | * Map IRQ number to GPIO line. |
66 | */ | 40 | */ |
67 | int irq_to_gpio(unsigned int irq); | 41 | extern int irq_to_gpio(unsigned int irq); |
68 | |||
69 | 42 | ||
70 | #include <asm-generic/gpio.h> | 43 | #include <asm-generic/gpio.h> |
71 | 44 | ||
72 | static inline int gpio_request(unsigned int pin, const char *label) | 45 | /* If it turns out that we need to optimise GPIO access for the |
73 | { | 46 | * Micrel's GPIOs, then these can be changed to check their argument |
74 | return 0; | 47 | * directly as static inlines. However for now it's probably not |
75 | } | 48 | * worthwhile. |
49 | */ | ||
50 | #define gpio_get_value __gpio_get_value | ||
51 | #define gpio_set_value __gpio_set_value | ||
52 | #define gpio_to_irq __gpio_to_irq | ||
76 | 53 | ||
77 | static inline void gpio_free(unsigned int pin) | 54 | /* Register the GPIOs */ |
78 | { | 55 | extern void ks8695_register_gpios(void); |
79 | might_sleep(); | ||
80 | } | ||
81 | 56 | ||
82 | #endif | 57 | #endif |
diff --git a/arch/arm/mach-ks8695/include/mach/io.h b/arch/arm/mach-ks8695/include/mach/io.h index f364f24ffe1e..a7a63ac3ba4e 100644 --- a/arch/arm/mach-ks8695/include/mach/io.h +++ b/arch/arm/mach-ks8695/include/mach/io.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #define IO_SPACE_LIMIT 0xffffffff | 14 | #define IO_SPACE_LIMIT 0xffffffff |
15 | 15 | ||
16 | #define __io(a) ((void __iomem *)(a)) | 16 | #define __io(a) __typesafe_io(a) |
17 | #define __mem_pci(a) (a) | 17 | #define __mem_pci(a) (a) |
18 | 18 | ||
19 | #endif | 19 | #endif |
diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h index 8fbc4c76c38b..6d5887cf5742 100644 --- a/arch/arm/mach-ks8695/include/mach/memory.h +++ b/arch/arm/mach-ks8695/include/mach/memory.h | |||
@@ -37,11 +37,6 @@ extern struct bus_type platform_bus_type; | |||
37 | (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); }) | 37 | (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); }) |
38 | #define __arch_page_to_dma(dev, x) __arch_virt_to_dma(dev, page_address(x)) | 38 | #define __arch_page_to_dma(dev, x) __arch_virt_to_dma(dev, page_address(x)) |
39 | 39 | ||
40 | #else | ||
41 | |||
42 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
43 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
44 | |||
45 | #endif | 40 | #endif |
46 | 41 | ||
47 | #endif | 42 | #endif |
diff --git a/arch/arm/mach-l7200/include/mach/dma.h b/arch/arm/mach-l7200/include/mach/dma.h deleted file mode 100644 index c7e48bd4590c..000000000000 --- a/arch/arm/mach-l7200/include/mach/dma.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-l7200/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Steve Hill (sjhill@cotw.com) | ||
5 | * | ||
6 | * Changelog: | ||
7 | * 08-29-2000 SJH Created | ||
8 | */ | ||
9 | #ifndef __ASM_ARCH_DMA_H | ||
10 | #define __ASM_ARCH_DMA_H | ||
11 | |||
12 | /* DMA is not yet implemented! It should be the same as acorn, copy over.. */ | ||
13 | |||
14 | /* | ||
15 | * This is the maximum DMA address that can be DMAd to. | ||
16 | * There should not be more than (0xd0000000 - 0xc0000000) | ||
17 | * bytes of RAM. | ||
18 | */ | ||
19 | #define MAX_DMA_ADDRESS 0xd0000000 | ||
20 | |||
21 | #define DMA_S0 0 | ||
22 | |||
23 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-l7200/include/mach/io.h b/arch/arm/mach-l7200/include/mach/io.h index d432ba9e5dff..a770a89fb708 100644 --- a/arch/arm/mach-l7200/include/mach/io.h +++ b/arch/arm/mach-l7200/include/mach/io.h | |||
@@ -10,18 +10,12 @@ | |||
10 | #ifndef __ASM_ARM_ARCH_IO_H | 10 | #ifndef __ASM_ARM_ARCH_IO_H |
11 | #define __ASM_ARM_ARCH_IO_H | 11 | #define __ASM_ARM_ARCH_IO_H |
12 | 12 | ||
13 | #include <mach/hardware.h> | ||
14 | |||
15 | #define IO_SPACE_LIMIT 0xffffffff | 13 | #define IO_SPACE_LIMIT 0xffffffff |
16 | 14 | ||
17 | /* | 15 | /* |
18 | * There are not real ISA nor PCI buses, so we fake it. | 16 | * There are not real ISA nor PCI buses, so we fake it. |
19 | */ | 17 | */ |
20 | static inline void __iomem *__io(unsigned long addr) | 18 | #define __io(a) __typesafe_io(a) |
21 | { | 19 | #define __mem_pci(a) (a) |
22 | return (void __iomem *)addr; | ||
23 | } | ||
24 | #define __io(a) __io(a) | ||
25 | #define __mem_pci(a) (a) | ||
26 | 20 | ||
27 | #endif | 21 | #endif |
diff --git a/arch/arm/mach-l7200/include/mach/memory.h b/arch/arm/mach-l7200/include/mach/memory.h index f338cf3ffd93..9fb40ed2f03b 100644 --- a/arch/arm/mach-l7200/include/mach/memory.h +++ b/arch/arm/mach-l7200/include/mach/memory.h | |||
@@ -17,9 +17,6 @@ | |||
17 | */ | 17 | */ |
18 | #define PHYS_OFFSET UL(0xf0000000) | 18 | #define PHYS_OFFSET UL(0xf0000000) |
19 | 19 | ||
20 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
21 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
22 | |||
23 | /* | 20 | /* |
24 | * Cache flushing area - ROM | 21 | * Cache flushing area - ROM |
25 | */ | 22 | */ |
diff --git a/arch/arm/mach-lh7a40x/clocks.c b/arch/arm/mach-lh7a40x/clocks.c index 4fb23ac6b5ac..6182f5410b4d 100644 --- a/arch/arm/mach-lh7a40x/clocks.c +++ b/arch/arm/mach-lh7a40x/clocks.c | |||
@@ -14,21 +14,14 @@ | |||
14 | #include <linux/err.h> | 14 | #include <linux/err.h> |
15 | 15 | ||
16 | struct module; | 16 | struct module; |
17 | struct icst525_params; | ||
18 | 17 | ||
19 | struct clk { | 18 | struct clk { |
20 | struct list_head node; | 19 | struct list_head node; |
21 | unsigned long rate; | 20 | unsigned long rate; |
22 | struct module *owner; | 21 | struct module *owner; |
23 | const char *name; | 22 | const char *name; |
24 | // void *data; | ||
25 | // const struct icst525_params *params; | ||
26 | // void (*setvco)(struct clk *, struct icst525_vco vco); | ||
27 | }; | 23 | }; |
28 | 24 | ||
29 | int clk_register(struct clk *clk); | ||
30 | void clk_unregister(struct clk *clk); | ||
31 | |||
32 | /* ----- */ | 25 | /* ----- */ |
33 | 26 | ||
34 | #define MAINDIV1(c) (((c) >> 7) & 0x0f) | 27 | #define MAINDIV1(c) (((c) >> 7) & 0x0f) |
@@ -79,31 +72,15 @@ unsigned int pclkfreq_get (void) | |||
79 | 72 | ||
80 | /* ----- */ | 73 | /* ----- */ |
81 | 74 | ||
82 | static LIST_HEAD(clocks); | ||
83 | static DECLARE_MUTEX(clocks_sem); | ||
84 | |||
85 | struct clk *clk_get (struct device *dev, const char *id) | 75 | struct clk *clk_get (struct device *dev, const char *id) |
86 | { | 76 | { |
87 | struct clk *p; | 77 | return dev && strcmp(dev_name(dev), "cldc-lh7a40x") == 0 |
88 | struct clk *clk = ERR_PTR(-ENOENT); | 78 | ? NULL : ERR_PTR(-ENOENT); |
89 | |||
90 | down (&clocks_sem); | ||
91 | list_for_each_entry (p, &clocks, node) { | ||
92 | if (strcmp (id, p->name) == 0 | ||
93 | && try_module_get(p->owner)) { | ||
94 | clk = p; | ||
95 | break; | ||
96 | } | ||
97 | } | ||
98 | up (&clocks_sem); | ||
99 | |||
100 | return clk; | ||
101 | } | 79 | } |
102 | EXPORT_SYMBOL(clk_get); | 80 | EXPORT_SYMBOL(clk_get); |
103 | 81 | ||
104 | void clk_put (struct clk *clk) | 82 | void clk_put (struct clk *clk) |
105 | { | 83 | { |
106 | module_put(clk->owner); | ||
107 | } | 84 | } |
108 | EXPORT_SYMBOL(clk_put); | 85 | EXPORT_SYMBOL(clk_put); |
109 | 86 | ||
@@ -118,20 +95,9 @@ void clk_disable (struct clk *clk) | |||
118 | } | 95 | } |
119 | EXPORT_SYMBOL(clk_disable); | 96 | EXPORT_SYMBOL(clk_disable); |
120 | 97 | ||
121 | int clk_use (struct clk *clk) | ||
122 | { | ||
123 | return 0; | ||
124 | } | ||
125 | EXPORT_SYMBOL(clk_use); | ||
126 | |||
127 | void clk_unuse (struct clk *clk) | ||
128 | { | ||
129 | } | ||
130 | EXPORT_SYMBOL(clk_unuse); | ||
131 | |||
132 | unsigned long clk_get_rate (struct clk *clk) | 98 | unsigned long clk_get_rate (struct clk *clk) |
133 | { | 99 | { |
134 | return clk->rate; | 100 | return 0; |
135 | } | 101 | } |
136 | EXPORT_SYMBOL(clk_get_rate); | 102 | EXPORT_SYMBOL(clk_get_rate); |
137 | 103 | ||
@@ -143,56 +109,6 @@ EXPORT_SYMBOL(clk_round_rate); | |||
143 | 109 | ||
144 | int clk_set_rate (struct clk *clk, unsigned long rate) | 110 | int clk_set_rate (struct clk *clk, unsigned long rate) |
145 | { | 111 | { |
146 | int ret = -EIO; | 112 | return -EIO; |
147 | return ret; | ||
148 | } | 113 | } |
149 | EXPORT_SYMBOL(clk_set_rate); | 114 | EXPORT_SYMBOL(clk_set_rate); |
150 | |||
151 | #if 0 | ||
152 | /* | ||
153 | * These are fixed clocks. | ||
154 | */ | ||
155 | static struct clk kmi_clk = { | ||
156 | .name = "KMIREFCLK", | ||
157 | .rate = 24000000, | ||
158 | }; | ||
159 | |||
160 | static struct clk uart_clk = { | ||
161 | .name = "UARTCLK", | ||
162 | .rate = 24000000, | ||
163 | }; | ||
164 | |||
165 | static struct clk mmci_clk = { | ||
166 | .name = "MCLK", | ||
167 | .rate = 33000000, | ||
168 | }; | ||
169 | #endif | ||
170 | |||
171 | static struct clk clcd_clk = { | ||
172 | .name = "CLCDCLK", | ||
173 | .rate = 0, | ||
174 | }; | ||
175 | |||
176 | int clk_register (struct clk *clk) | ||
177 | { | ||
178 | down (&clocks_sem); | ||
179 | list_add (&clk->node, &clocks); | ||
180 | up (&clocks_sem); | ||
181 | return 0; | ||
182 | } | ||
183 | EXPORT_SYMBOL(clk_register); | ||
184 | |||
185 | void clk_unregister (struct clk *clk) | ||
186 | { | ||
187 | down (&clocks_sem); | ||
188 | list_del (&clk->node); | ||
189 | up (&clocks_sem); | ||
190 | } | ||
191 | EXPORT_SYMBOL(clk_unregister); | ||
192 | |||
193 | static int __init clk_init (void) | ||
194 | { | ||
195 | clk_register(&clcd_clk); | ||
196 | return 0; | ||
197 | } | ||
198 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-lh7a40x/include/mach/io.h b/arch/arm/mach-lh7a40x/include/mach/io.h index 031d26f9163c..6ece45911cbc 100644 --- a/arch/arm/mach-lh7a40x/include/mach/io.h +++ b/arch/arm/mach-lh7a40x/include/mach/io.h | |||
@@ -11,12 +11,10 @@ | |||
11 | #ifndef __ASM_ARCH_IO_H | 11 | #ifndef __ASM_ARCH_IO_H |
12 | #define __ASM_ARCH_IO_H | 12 | #define __ASM_ARCH_IO_H |
13 | 13 | ||
14 | #include <mach/hardware.h> | ||
15 | |||
16 | #define IO_SPACE_LIMIT 0xffffffff | 14 | #define IO_SPACE_LIMIT 0xffffffff |
17 | 15 | ||
18 | /* No ISA or PCI bus on this machine. */ | 16 | /* No ISA or PCI bus on this machine. */ |
19 | #define __io(a) ((void __iomem *)(a)) | 17 | #define __io(a) __typesafe_io(a) |
20 | #define __mem_pci(a) (a) | 18 | #define __mem_pci(a) (a) |
21 | 19 | ||
22 | #endif /* __ASM_ARCH_IO_H */ | 20 | #endif /* __ASM_ARCH_IO_H */ |
diff --git a/arch/arm/mach-lh7a40x/include/mach/memory.h b/arch/arm/mach-lh7a40x/include/mach/memory.h index 1da14ff66c93..189d20e543e7 100644 --- a/arch/arm/mach-lh7a40x/include/mach/memory.h +++ b/arch/arm/mach-lh7a40x/include/mach/memory.h | |||
@@ -19,16 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | #define PHYS_OFFSET UL(0xc0000000) | 20 | #define PHYS_OFFSET UL(0xc0000000) |
21 | 21 | ||
22 | /* | ||
23 | * Virtual view <-> DMA view memory address translations | ||
24 | * virt_to_bus: Used to translate the virtual address to an | ||
25 | * address suitable to be passed to set_dma_addr | ||
26 | * bus_to_virt: Used to convert an address for DMA operations | ||
27 | * to an address that the kernel can use. | ||
28 | */ | ||
29 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
30 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
31 | |||
32 | #ifdef CONFIG_DISCONTIGMEM | 22 | #ifdef CONFIG_DISCONTIGMEM |
33 | 23 | ||
34 | /* | 24 | /* |
diff --git a/arch/arm/mach-loki/include/mach/dma.h b/arch/arm/mach-loki/include/mach/dma.h deleted file mode 100644 index 40a8c178f10d..000000000000 --- a/arch/arm/mach-loki/include/mach/dma.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* empty */ | ||
diff --git a/arch/arm/mach-loki/include/mach/memory.h b/arch/arm/mach-loki/include/mach/memory.h index a39533ab489d..2ed7e6e732c2 100644 --- a/arch/arm/mach-loki/include/mach/memory.h +++ b/arch/arm/mach-loki/include/mach/memory.h | |||
@@ -7,8 +7,4 @@ | |||
7 | 7 | ||
8 | #define PHYS_OFFSET UL(0x00000000) | 8 | #define PHYS_OFFSET UL(0x00000000) |
9 | 9 | ||
10 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
11 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
12 | |||
13 | |||
14 | #endif | 10 | #endif |
diff --git a/arch/arm/mach-msm/include/mach/io.h b/arch/arm/mach-msm/include/mach/io.h index c6a2feb268b0..aab964591db4 100644 --- a/arch/arm/mach-msm/include/mach/io.h +++ b/arch/arm/mach-msm/include/mach/io.h | |||
@@ -23,11 +23,7 @@ | |||
23 | 23 | ||
24 | void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype); | 24 | void __iomem *__msm_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype); |
25 | 25 | ||
26 | static inline void __iomem *__io(unsigned long addr) | 26 | #define __io(a) __typesafe_io(a) |
27 | { | ||
28 | return (void __iomem *)addr; | ||
29 | } | ||
30 | #define __io(a) __io(a) | ||
31 | #define __mem_pci(a) (a) | 27 | #define __mem_pci(a) (a) |
32 | 28 | ||
33 | #endif | 29 | #endif |
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h index 63fd47f2e62e..f4698baec976 100644 --- a/arch/arm/mach-msm/include/mach/memory.h +++ b/arch/arm/mach-msm/include/mach/memory.h | |||
@@ -19,9 +19,5 @@ | |||
19 | /* physical offset of RAM */ | 19 | /* physical offset of RAM */ |
20 | #define PHYS_OFFSET UL(0x10000000) | 20 | #define PHYS_OFFSET UL(0x10000000) |
21 | 21 | ||
22 | /* bus address and physical addresses are identical */ | ||
23 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
24 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
25 | |||
26 | #endif | 22 | #endif |
27 | 23 | ||
diff --git a/arch/arm/mach-mv78xx0/common.c b/arch/arm/mach-mv78xx0/common.c index 238a2f8c2d52..b0e4e0d8f506 100644 --- a/arch/arm/mach-mv78xx0/common.c +++ b/arch/arm/mach-mv78xx0/common.c | |||
@@ -167,6 +167,7 @@ void __init mv78xx0_map_io(void) | |||
167 | ****************************************************************************/ | 167 | ****************************************************************************/ |
168 | static struct orion_ehci_data mv78xx0_ehci_data = { | 168 | static struct orion_ehci_data mv78xx0_ehci_data = { |
169 | .dram = &mv78xx0_mbus_dram_info, | 169 | .dram = &mv78xx0_mbus_dram_info, |
170 | .phy_version = EHCI_PHY_NA, | ||
170 | }; | 171 | }; |
171 | 172 | ||
172 | static u64 ehci_dmamask = 0xffffffffUL; | 173 | static u64 ehci_dmamask = 0xffffffffUL; |
diff --git a/arch/arm/mach-mv78xx0/include/mach/dma.h b/arch/arm/mach-mv78xx0/include/mach/dma.h deleted file mode 100644 index 40a8c178f10d..000000000000 --- a/arch/arm/mach-mv78xx0/include/mach/dma.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* empty */ | ||
diff --git a/arch/arm/mach-mv78xx0/include/mach/gpio.h b/arch/arm/mach-mv78xx0/include/mach/gpio.h new file mode 100644 index 000000000000..d9d1535ea100 --- /dev/null +++ b/arch/arm/mach-mv78xx0/include/mach/gpio.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * arch/asm-arm/mach-mv78xx0/include/mach/gpio.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_GPIO_H | ||
10 | #define __ASM_ARCH_GPIO_H | ||
11 | |||
12 | #include <mach/irqs.h> | ||
13 | #include <plat/gpio.h> | ||
14 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
15 | |||
16 | extern int mv78xx0_core_index(void); | ||
17 | |||
18 | #define GPIO_MAX 32 | ||
19 | #define GPIO_OUT(pin) (DEV_BUS_VIRT_BASE + 0x0100) | ||
20 | #define GPIO_IO_CONF(pin) (DEV_BUS_VIRT_BASE + 0x0104) | ||
21 | #define GPIO_BLINK_EN(pin) (DEV_BUS_VIRT_BASE + 0x0108) | ||
22 | #define GPIO_IN_POL(pin) (DEV_BUS_VIRT_BASE + 0x010c) | ||
23 | #define GPIO_DATA_IN(pin) (DEV_BUS_VIRT_BASE + 0x0110) | ||
24 | #define GPIO_EDGE_CAUSE(pin) (DEV_BUS_VIRT_BASE + 0x0114) | ||
25 | #define GPIO_MASK_OFF (mv78xx0_core_index() ? 0x18 : 0) | ||
26 | #define GPIO_EDGE_MASK(pin) (DEV_BUS_VIRT_BASE + 0x0118 + GPIO_MASK_OFF) | ||
27 | #define GPIO_LEVEL_MASK(pin) (DEV_BUS_VIRT_BASE + 0x011c + GPIO_MASK_OFF) | ||
28 | |||
29 | static inline int gpio_to_irq(int pin) | ||
30 | { | ||
31 | return pin + IRQ_MV78XX0_GPIO_START; | ||
32 | } | ||
33 | |||
34 | static inline int irq_to_gpio(int irq) | ||
35 | { | ||
36 | return irq - IRQ_MV78XX0_GPIO_START; | ||
37 | } | ||
38 | |||
39 | |||
40 | #endif | ||
diff --git a/arch/arm/mach-mv78xx0/include/mach/irqs.h b/arch/arm/mach-mv78xx0/include/mach/irqs.h index bebc330281ec..fa1d422196c2 100644 --- a/arch/arm/mach-mv78xx0/include/mach/irqs.h +++ b/arch/arm/mach-mv78xx0/include/mach/irqs.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef __ASM_ARCH_IRQS_H | 11 | #ifndef __ASM_ARCH_IRQS_H |
12 | #define __ASM_ARCH_IRQS_H | 12 | #define __ASM_ARCH_IRQS_H |
13 | 13 | ||
14 | #include "mv78xx0.h" /* need GPIO_MAX */ | ||
15 | |||
16 | /* | 14 | /* |
17 | * MV78xx0 Low Interrupt Controller | 15 | * MV78xx0 Low Interrupt Controller |
18 | */ | 16 | */ |
@@ -88,7 +86,7 @@ | |||
88 | * MV78XX0 General Purpose Pins | 86 | * MV78XX0 General Purpose Pins |
89 | */ | 87 | */ |
90 | #define IRQ_MV78XX0_GPIO_START 96 | 88 | #define IRQ_MV78XX0_GPIO_START 96 |
91 | #define NR_GPIO_IRQS GPIO_MAX | 89 | #define NR_GPIO_IRQS 32 |
92 | 90 | ||
93 | #define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS) | 91 | #define NR_IRQS (IRQ_MV78XX0_GPIO_START + NR_GPIO_IRQS) |
94 | 92 | ||
diff --git a/arch/arm/mach-mv78xx0/include/mach/memory.h b/arch/arm/mach-mv78xx0/include/mach/memory.h index 9e47a140ff7a..e663042d307f 100644 --- a/arch/arm/mach-mv78xx0/include/mach/memory.h +++ b/arch/arm/mach-mv78xx0/include/mach/memory.h | |||
@@ -7,8 +7,4 @@ | |||
7 | 7 | ||
8 | #define PHYS_OFFSET UL(0x00000000) | 8 | #define PHYS_OFFSET UL(0x00000000) |
9 | 9 | ||
10 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
11 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
12 | |||
13 | |||
14 | #endif | 10 | #endif |
diff --git a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h index ee9c5593ee92..e930ea5330a2 100644 --- a/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h +++ b/arch/arm/mach-mv78xx0/include/mach/mv78xx0.h | |||
@@ -122,7 +122,4 @@ | |||
122 | #define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000) | 122 | #define SATA_PHYS_BASE (MV78XX0_REGS_PHYS_BASE | 0xa0000) |
123 | 123 | ||
124 | 124 | ||
125 | #define GPIO_MAX 32 | ||
126 | |||
127 | |||
128 | #endif | 125 | #endif |
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c index 503e5d195ae5..e273418797b4 100644 --- a/arch/arm/mach-mv78xx0/irq.c +++ b/arch/arm/mach-mv78xx0/irq.c | |||
@@ -11,13 +11,42 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <linux/irq.h> | ||
15 | #include <asm/gpio.h> | ||
14 | #include <mach/mv78xx0.h> | 16 | #include <mach/mv78xx0.h> |
15 | #include <plat/irq.h> | 17 | #include <plat/irq.h> |
16 | #include "common.h" | 18 | #include "common.h" |
17 | 19 | ||
20 | static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
21 | { | ||
22 | BUG_ON(irq < IRQ_MV78XX0_GPIO_0_7 || irq > IRQ_MV78XX0_GPIO_24_31); | ||
23 | |||
24 | orion_gpio_irq_handler((irq - IRQ_MV78XX0_GPIO_0_7) << 3); | ||
25 | } | ||
26 | |||
18 | void __init mv78xx0_init_irq(void) | 27 | void __init mv78xx0_init_irq(void) |
19 | { | 28 | { |
29 | int i; | ||
30 | |||
20 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); | 31 | orion_irq_init(0, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF)); |
21 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); | 32 | orion_irq_init(32, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF)); |
22 | orion_irq_init(64, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF)); | 33 | orion_irq_init(64, (void __iomem *)(IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF)); |
34 | |||
35 | /* | ||
36 | * Mask and clear GPIO IRQ interrupts. | ||
37 | */ | ||
38 | writel(0, GPIO_LEVEL_MASK(0)); | ||
39 | writel(0, GPIO_EDGE_MASK(0)); | ||
40 | writel(0, GPIO_EDGE_CAUSE(0)); | ||
41 | |||
42 | for (i = IRQ_MV78XX0_GPIO_START; i < NR_IRQS; i++) { | ||
43 | set_irq_chip(i, &orion_gpio_irq_level_chip); | ||
44 | set_irq_handler(i, handle_level_irq); | ||
45 | irq_desc[i].status |= IRQ_LEVEL; | ||
46 | set_irq_flags(i, IRQF_VALID); | ||
47 | } | ||
48 | set_irq_chained_handler(IRQ_MV78XX0_GPIO_0_7, gpio_irq_handler); | ||
49 | set_irq_chained_handler(IRQ_MV78XX0_GPIO_8_15, gpio_irq_handler); | ||
50 | set_irq_chained_handler(IRQ_MV78XX0_GPIO_16_23, gpio_irq_handler); | ||
51 | set_irq_chained_handler(IRQ_MV78XX0_GPIO_24_31, gpio_irq_handler); | ||
23 | } | 52 | } |
diff --git a/arch/arm/mach-mx1/Kconfig b/arch/arm/mach-mx1/Kconfig new file mode 100644 index 000000000000..2b59fc74784f --- /dev/null +++ b/arch/arm/mach-mx1/Kconfig | |||
@@ -0,0 +1,14 @@ | |||
1 | if ARCH_MX1 | ||
2 | |||
3 | comment "MX1 Platforms" | ||
4 | |||
5 | config MACH_MXLADS | ||
6 | bool | ||
7 | |||
8 | config ARCH_MX1ADS | ||
9 | bool "MX1ADS platform" | ||
10 | select MACH_MXLADS | ||
11 | help | ||
12 | Say Y here if you are using Motorola MX1ADS/MXLADS boards | ||
13 | |||
14 | endif | ||
diff --git a/arch/arm/mach-mx1/Makefile b/arch/arm/mach-mx1/Makefile new file mode 100644 index 000000000000..b969719011fa --- /dev/null +++ b/arch/arm/mach-mx1/Makefile | |||
@@ -0,0 +1,10 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y += generic.o clock.o devices.o | ||
8 | |||
9 | # Specific board support | ||
10 | obj-$(CONFIG_ARCH_MX1ADS) += mx1ads.o | ||
diff --git a/arch/arm/mach-mx1/Makefile.boot b/arch/arm/mach-mx1/Makefile.boot new file mode 100644 index 000000000000..8ed1492288a2 --- /dev/null +++ b/arch/arm/mach-mx1/Makefile.boot | |||
@@ -0,0 +1,4 @@ | |||
1 | zreladdr-y := 0x08008000 | ||
2 | params_phys-y := 0x08000100 | ||
3 | initrd_phys-y := 0x08800000 | ||
4 | |||
diff --git a/arch/arm/mach-mx1/clock.c b/arch/arm/mach-mx1/clock.c new file mode 100644 index 000000000000..4bcd1ece55f5 --- /dev/null +++ b/arch/arm/mach-mx1/clock.c | |||
@@ -0,0 +1,656 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/math64.h> | ||
22 | #include <linux/err.h> | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/io.h> | ||
25 | |||
26 | #include <mach/clock.h> | ||
27 | #include <mach/hardware.h> | ||
28 | #include "crm_regs.h" | ||
29 | |||
30 | static int _clk_enable(struct clk *clk) | ||
31 | { | ||
32 | unsigned int reg; | ||
33 | |||
34 | reg = __raw_readl(clk->enable_reg); | ||
35 | reg |= 1 << clk->enable_shift; | ||
36 | __raw_writel(reg, clk->enable_reg); | ||
37 | |||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | static void _clk_disable(struct clk *clk) | ||
42 | { | ||
43 | unsigned int reg; | ||
44 | |||
45 | reg = __raw_readl(clk->enable_reg); | ||
46 | reg &= ~(1 << clk->enable_shift); | ||
47 | __raw_writel(reg, clk->enable_reg); | ||
48 | } | ||
49 | |||
50 | static int _clk_can_use_parent(const struct clk *clk_arr[], unsigned int size, | ||
51 | struct clk *parent) | ||
52 | { | ||
53 | int i; | ||
54 | |||
55 | for (i = 0; i < size; i++) | ||
56 | if (parent == clk_arr[i]) | ||
57 | return i; | ||
58 | |||
59 | return -EINVAL; | ||
60 | } | ||
61 | |||
62 | static unsigned long | ||
63 | _clk_simple_round_rate(struct clk *clk, unsigned long rate, unsigned int limit) | ||
64 | { | ||
65 | int div; | ||
66 | unsigned long parent_rate; | ||
67 | |||
68 | parent_rate = clk_get_rate(clk->parent); | ||
69 | |||
70 | div = parent_rate / rate; | ||
71 | if (parent_rate % rate) | ||
72 | div++; | ||
73 | |||
74 | if (div > limit) | ||
75 | div = limit; | ||
76 | |||
77 | return parent_rate / div; | ||
78 | } | ||
79 | |||
80 | static unsigned long _clk_parent_round_rate(struct clk *clk, unsigned long rate) | ||
81 | { | ||
82 | return clk->parent->round_rate(clk->parent, rate); | ||
83 | } | ||
84 | |||
85 | static int _clk_parent_set_rate(struct clk *clk, unsigned long rate) | ||
86 | { | ||
87 | return clk->parent->set_rate(clk->parent, rate); | ||
88 | } | ||
89 | |||
90 | /* | ||
91 | * get the system pll clock in Hz | ||
92 | * | ||
93 | * mfi + mfn / (mfd +1) | ||
94 | * f = 2 * f_ref * -------------------- | ||
95 | * pd + 1 | ||
96 | */ | ||
97 | static unsigned long mx1_decode_pll(unsigned int pll, u32 f_ref) | ||
98 | { | ||
99 | unsigned long long ll; | ||
100 | unsigned long quot; | ||
101 | |||
102 | u32 mfi = (pll >> 10) & 0xf; | ||
103 | u32 mfn = pll & 0x3ff; | ||
104 | u32 mfd = (pll >> 16) & 0x3ff; | ||
105 | u32 pd = (pll >> 26) & 0xf; | ||
106 | |||
107 | mfi = mfi <= 5 ? 5 : mfi; | ||
108 | |||
109 | ll = 2 * (unsigned long long)f_ref * | ||
110 | ((mfi << 16) + (mfn << 16) / (mfd + 1)); | ||
111 | quot = (pd + 1) * (1 << 16); | ||
112 | ll += quot / 2; | ||
113 | do_div(ll, quot); | ||
114 | return (unsigned long)ll; | ||
115 | } | ||
116 | |||
117 | static unsigned long clk16m_get_rate(struct clk *clk) | ||
118 | { | ||
119 | return 16000000; | ||
120 | } | ||
121 | |||
122 | static struct clk clk16m = { | ||
123 | .name = "CLK16M", | ||
124 | .get_rate = clk16m_get_rate, | ||
125 | .enable = _clk_enable, | ||
126 | .enable_reg = CCM_CSCR, | ||
127 | .enable_shift = CCM_CSCR_OSC_EN_SHIFT, | ||
128 | .disable = _clk_disable, | ||
129 | }; | ||
130 | |||
131 | /* in Hz */ | ||
132 | static unsigned long clk32_rate; | ||
133 | |||
134 | static unsigned long clk32_get_rate(struct clk *clk) | ||
135 | { | ||
136 | return clk32_rate; | ||
137 | } | ||
138 | |||
139 | static struct clk clk32 = { | ||
140 | .name = "CLK32", | ||
141 | .get_rate = clk32_get_rate, | ||
142 | }; | ||
143 | |||
144 | static unsigned long clk32_premult_get_rate(struct clk *clk) | ||
145 | { | ||
146 | return clk_get_rate(clk->parent) * 512; | ||
147 | } | ||
148 | |||
149 | static struct clk clk32_premult = { | ||
150 | .name = "CLK32_premultiplier", | ||
151 | .parent = &clk32, | ||
152 | .get_rate = clk32_premult_get_rate, | ||
153 | }; | ||
154 | |||
155 | static const struct clk *prem_clk_clocks[] = { | ||
156 | &clk32_premult, | ||
157 | &clk16m, | ||
158 | }; | ||
159 | |||
160 | static int prem_clk_set_parent(struct clk *clk, struct clk *parent) | ||
161 | { | ||
162 | int i; | ||
163 | unsigned int reg = __raw_readl(CCM_CSCR); | ||
164 | |||
165 | i = _clk_can_use_parent(prem_clk_clocks, ARRAY_SIZE(prem_clk_clocks), | ||
166 | parent); | ||
167 | |||
168 | switch (i) { | ||
169 | case 0: | ||
170 | reg &= ~CCM_CSCR_SYSTEM_SEL; | ||
171 | break; | ||
172 | case 1: | ||
173 | reg |= CCM_CSCR_SYSTEM_SEL; | ||
174 | break; | ||
175 | default: | ||
176 | return i; | ||
177 | } | ||
178 | |||
179 | __raw_writel(reg, CCM_CSCR); | ||
180 | |||
181 | return 0; | ||
182 | } | ||
183 | |||
184 | static struct clk prem_clk = { | ||
185 | .name = "prem_clk", | ||
186 | .set_parent = prem_clk_set_parent, | ||
187 | }; | ||
188 | |||
189 | static unsigned long system_clk_get_rate(struct clk *clk) | ||
190 | { | ||
191 | return mx1_decode_pll(__raw_readl(CCM_SPCTL0), | ||
192 | clk_get_rate(clk->parent)); | ||
193 | } | ||
194 | |||
195 | static struct clk system_clk = { | ||
196 | .name = "system_clk", | ||
197 | .parent = &prem_clk, | ||
198 | .get_rate = system_clk_get_rate, | ||
199 | }; | ||
200 | |||
201 | static unsigned long mcu_clk_get_rate(struct clk *clk) | ||
202 | { | ||
203 | return mx1_decode_pll(__raw_readl(CCM_MPCTL0), | ||
204 | clk_get_rate(clk->parent)); | ||
205 | } | ||
206 | |||
207 | static struct clk mcu_clk = { | ||
208 | .name = "mcu_clk", | ||
209 | .parent = &clk32_premult, | ||
210 | .get_rate = mcu_clk_get_rate, | ||
211 | }; | ||
212 | |||
213 | static unsigned long fclk_get_rate(struct clk *clk) | ||
214 | { | ||
215 | unsigned long fclk = clk_get_rate(clk->parent); | ||
216 | |||
217 | if (__raw_readl(CCM_CSCR) & CCM_CSCR_PRESC) | ||
218 | fclk /= 2; | ||
219 | |||
220 | return fclk; | ||
221 | } | ||
222 | |||
223 | static struct clk fclk = { | ||
224 | .name = "fclk", | ||
225 | .parent = &mcu_clk, | ||
226 | .get_rate = fclk_get_rate, | ||
227 | }; | ||
228 | |||
229 | /* | ||
230 | * get hclk ( SDRAM, CSI, Memory Stick, I2C, DMA ) | ||
231 | */ | ||
232 | static unsigned long hclk_get_rate(struct clk *clk) | ||
233 | { | ||
234 | return clk_get_rate(clk->parent) / (((__raw_readl(CCM_CSCR) & | ||
235 | CCM_CSCR_BCLK_MASK) >> CCM_CSCR_BCLK_OFFSET) + 1); | ||
236 | } | ||
237 | |||
238 | static unsigned long hclk_round_rate(struct clk *clk, unsigned long rate) | ||
239 | { | ||
240 | return _clk_simple_round_rate(clk, rate, 16); | ||
241 | } | ||
242 | |||
243 | static int hclk_set_rate(struct clk *clk, unsigned long rate) | ||
244 | { | ||
245 | unsigned int div; | ||
246 | unsigned int reg; | ||
247 | unsigned long parent_rate; | ||
248 | |||
249 | parent_rate = clk_get_rate(clk->parent); | ||
250 | |||
251 | div = parent_rate / rate; | ||
252 | |||
253 | if (div > 16 || div < 1 || ((parent_rate / div) != rate)) | ||
254 | return -EINVAL; | ||
255 | |||
256 | div--; | ||
257 | |||
258 | reg = __raw_readl(CCM_CSCR); | ||
259 | reg &= ~CCM_CSCR_BCLK_MASK; | ||
260 | reg |= div << CCM_CSCR_BCLK_OFFSET; | ||
261 | __raw_writel(reg, CCM_CSCR); | ||
262 | |||
263 | return 0; | ||
264 | } | ||
265 | |||
266 | static struct clk hclk = { | ||
267 | .name = "hclk", | ||
268 | .parent = &system_clk, | ||
269 | .get_rate = hclk_get_rate, | ||
270 | .round_rate = hclk_round_rate, | ||
271 | .set_rate = hclk_set_rate, | ||
272 | }; | ||
273 | |||
274 | static unsigned long clk48m_get_rate(struct clk *clk) | ||
275 | { | ||
276 | return clk_get_rate(clk->parent) / (((__raw_readl(CCM_CSCR) & | ||
277 | CCM_CSCR_USB_MASK) >> CCM_CSCR_USB_OFFSET) + 1); | ||
278 | } | ||
279 | |||
280 | static unsigned long clk48m_round_rate(struct clk *clk, unsigned long rate) | ||
281 | { | ||
282 | return _clk_simple_round_rate(clk, rate, 8); | ||
283 | } | ||
284 | |||
285 | static int clk48m_set_rate(struct clk *clk, unsigned long rate) | ||
286 | { | ||
287 | unsigned int div; | ||
288 | unsigned int reg; | ||
289 | unsigned long parent_rate; | ||
290 | |||
291 | parent_rate = clk_get_rate(clk->parent); | ||
292 | |||
293 | div = parent_rate / rate; | ||
294 | |||
295 | if (div > 8 || div < 1 || ((parent_rate / div) != rate)) | ||
296 | return -EINVAL; | ||
297 | |||
298 | div--; | ||
299 | |||
300 | reg = __raw_readl(CCM_CSCR); | ||
301 | reg &= ~CCM_CSCR_USB_MASK; | ||
302 | reg |= div << CCM_CSCR_USB_OFFSET; | ||
303 | __raw_writel(reg, CCM_CSCR); | ||
304 | |||
305 | return 0; | ||
306 | } | ||
307 | |||
308 | static struct clk clk48m = { | ||
309 | .name = "CLK48M", | ||
310 | .parent = &system_clk, | ||
311 | .get_rate = clk48m_get_rate, | ||
312 | .round_rate = clk48m_round_rate, | ||
313 | .set_rate = clk48m_set_rate, | ||
314 | }; | ||
315 | |||
316 | /* | ||
317 | * get peripheral clock 1 ( UART[12], Timer[12], PWM ) | ||
318 | */ | ||
319 | static unsigned long perclk1_get_rate(struct clk *clk) | ||
320 | { | ||
321 | return clk_get_rate(clk->parent) / (((__raw_readl(CCM_PCDR) & | ||
322 | CCM_PCDR_PCLK1_MASK) >> CCM_PCDR_PCLK1_OFFSET) + 1); | ||
323 | } | ||
324 | |||
325 | static unsigned long perclk1_round_rate(struct clk *clk, unsigned long rate) | ||
326 | { | ||
327 | return _clk_simple_round_rate(clk, rate, 16); | ||
328 | } | ||
329 | |||
330 | static int perclk1_set_rate(struct clk *clk, unsigned long rate) | ||
331 | { | ||
332 | unsigned int div; | ||
333 | unsigned int reg; | ||
334 | unsigned long parent_rate; | ||
335 | |||
336 | parent_rate = clk_get_rate(clk->parent); | ||
337 | |||
338 | div = parent_rate / rate; | ||
339 | |||
340 | if (div > 16 || div < 1 || ((parent_rate / div) != rate)) | ||
341 | return -EINVAL; | ||
342 | |||
343 | div--; | ||
344 | |||
345 | reg = __raw_readl(CCM_PCDR); | ||
346 | reg &= ~CCM_PCDR_PCLK1_MASK; | ||
347 | reg |= div << CCM_PCDR_PCLK1_OFFSET; | ||
348 | __raw_writel(reg, CCM_PCDR); | ||
349 | |||
350 | return 0; | ||
351 | } | ||
352 | |||
353 | /* | ||
354 | * get peripheral clock 2 ( LCD, SD, SPI[12] ) | ||
355 | */ | ||
356 | static unsigned long perclk2_get_rate(struct clk *clk) | ||
357 | { | ||
358 | return clk_get_rate(clk->parent) / (((__raw_readl(CCM_PCDR) & | ||
359 | CCM_PCDR_PCLK2_MASK) >> CCM_PCDR_PCLK2_OFFSET) + 1); | ||
360 | } | ||
361 | |||
362 | static unsigned long perclk2_round_rate(struct clk *clk, unsigned long rate) | ||
363 | { | ||
364 | return _clk_simple_round_rate(clk, rate, 16); | ||
365 | } | ||
366 | |||
367 | static int perclk2_set_rate(struct clk *clk, unsigned long rate) | ||
368 | { | ||
369 | unsigned int div; | ||
370 | unsigned int reg; | ||
371 | unsigned long parent_rate; | ||
372 | |||
373 | parent_rate = clk_get_rate(clk->parent); | ||
374 | |||
375 | div = parent_rate / rate; | ||
376 | |||
377 | if (div > 16 || div < 1 || ((parent_rate / div) != rate)) | ||
378 | return -EINVAL; | ||
379 | |||
380 | div--; | ||
381 | |||
382 | reg = __raw_readl(CCM_PCDR); | ||
383 | reg &= ~CCM_PCDR_PCLK2_MASK; | ||
384 | reg |= div << CCM_PCDR_PCLK2_OFFSET; | ||
385 | __raw_writel(reg, CCM_PCDR); | ||
386 | |||
387 | return 0; | ||
388 | } | ||
389 | |||
390 | /* | ||
391 | * get peripheral clock 3 ( SSI ) | ||
392 | */ | ||
393 | static unsigned long perclk3_get_rate(struct clk *clk) | ||
394 | { | ||
395 | return clk_get_rate(clk->parent) / (((__raw_readl(CCM_PCDR) & | ||
396 | CCM_PCDR_PCLK3_MASK) >> CCM_PCDR_PCLK3_OFFSET) + 1); | ||
397 | } | ||
398 | |||
399 | static unsigned long perclk3_round_rate(struct clk *clk, unsigned long rate) | ||
400 | { | ||
401 | return _clk_simple_round_rate(clk, rate, 128); | ||
402 | } | ||
403 | |||
404 | static int perclk3_set_rate(struct clk *clk, unsigned long rate) | ||
405 | { | ||
406 | unsigned int div; | ||
407 | unsigned int reg; | ||
408 | unsigned long parent_rate; | ||
409 | |||
410 | parent_rate = clk_get_rate(clk->parent); | ||
411 | |||
412 | div = parent_rate / rate; | ||
413 | |||
414 | if (div > 128 || div < 1 || ((parent_rate / div) != rate)) | ||
415 | return -EINVAL; | ||
416 | |||
417 | div--; | ||
418 | |||
419 | reg = __raw_readl(CCM_PCDR); | ||
420 | reg &= ~CCM_PCDR_PCLK3_MASK; | ||
421 | reg |= div << CCM_PCDR_PCLK3_OFFSET; | ||
422 | __raw_writel(reg, CCM_PCDR); | ||
423 | |||
424 | return 0; | ||
425 | } | ||
426 | |||
427 | static struct clk perclk[] = { | ||
428 | { | ||
429 | .name = "perclk", | ||
430 | .id = 0, | ||
431 | .parent = &system_clk, | ||
432 | .get_rate = perclk1_get_rate, | ||
433 | .round_rate = perclk1_round_rate, | ||
434 | .set_rate = perclk1_set_rate, | ||
435 | }, { | ||
436 | .name = "perclk", | ||
437 | .id = 1, | ||
438 | .parent = &system_clk, | ||
439 | .get_rate = perclk2_get_rate, | ||
440 | .round_rate = perclk2_round_rate, | ||
441 | .set_rate = perclk2_set_rate, | ||
442 | }, { | ||
443 | .name = "perclk", | ||
444 | .id = 2, | ||
445 | .parent = &system_clk, | ||
446 | .get_rate = perclk3_get_rate, | ||
447 | .round_rate = perclk3_round_rate, | ||
448 | .set_rate = perclk3_set_rate, | ||
449 | } | ||
450 | }; | ||
451 | |||
452 | static const struct clk *clko_clocks[] = { | ||
453 | &perclk[0], | ||
454 | &hclk, | ||
455 | &clk48m, | ||
456 | &clk16m, | ||
457 | &prem_clk, | ||
458 | &fclk, | ||
459 | }; | ||
460 | |||
461 | static int clko_set_parent(struct clk *clk, struct clk *parent) | ||
462 | { | ||
463 | int i; | ||
464 | unsigned int reg; | ||
465 | |||
466 | i = _clk_can_use_parent(clko_clocks, ARRAY_SIZE(clko_clocks), parent); | ||
467 | if (i < 0) | ||
468 | return i; | ||
469 | |||
470 | reg = __raw_readl(CCM_CSCR) & ~CCM_CSCR_CLKO_MASK; | ||
471 | reg |= i << CCM_CSCR_CLKO_OFFSET; | ||
472 | __raw_writel(reg, CCM_CSCR); | ||
473 | |||
474 | if (clko_clocks[i]->set_rate && clko_clocks[i]->round_rate) { | ||
475 | clk->set_rate = _clk_parent_set_rate; | ||
476 | clk->round_rate = _clk_parent_round_rate; | ||
477 | } else { | ||
478 | clk->set_rate = NULL; | ||
479 | clk->round_rate = NULL; | ||
480 | } | ||
481 | |||
482 | return 0; | ||
483 | } | ||
484 | |||
485 | static struct clk clko_clk = { | ||
486 | .name = "clko_clk", | ||
487 | .set_parent = clko_set_parent, | ||
488 | }; | ||
489 | |||
490 | static struct clk dma_clk = { | ||
491 | .name = "dma_clk", | ||
492 | .parent = &hclk, | ||
493 | .round_rate = _clk_parent_round_rate, | ||
494 | .set_rate = _clk_parent_set_rate, | ||
495 | .enable = _clk_enable, | ||
496 | .enable_reg = SCM_GCCR, | ||
497 | .enable_shift = SCM_GCCR_DMA_CLK_EN_OFFSET, | ||
498 | .disable = _clk_disable, | ||
499 | }; | ||
500 | |||
501 | static struct clk csi_clk = { | ||
502 | .name = "csi_clk", | ||
503 | .parent = &hclk, | ||
504 | .round_rate = _clk_parent_round_rate, | ||
505 | .set_rate = _clk_parent_set_rate, | ||
506 | .enable = _clk_enable, | ||
507 | .enable_reg = SCM_GCCR, | ||
508 | .enable_shift = SCM_GCCR_CSI_CLK_EN_OFFSET, | ||
509 | .disable = _clk_disable, | ||
510 | }; | ||
511 | |||
512 | static struct clk mma_clk = { | ||
513 | .name = "mma_clk", | ||
514 | .parent = &hclk, | ||
515 | .round_rate = _clk_parent_round_rate, | ||
516 | .set_rate = _clk_parent_set_rate, | ||
517 | .enable = _clk_enable, | ||
518 | .enable_reg = SCM_GCCR, | ||
519 | .enable_shift = SCM_GCCR_MMA_CLK_EN_OFFSET, | ||
520 | .disable = _clk_disable, | ||
521 | }; | ||
522 | |||
523 | static struct clk usbd_clk = { | ||
524 | .name = "usbd_clk", | ||
525 | .parent = &clk48m, | ||
526 | .round_rate = _clk_parent_round_rate, | ||
527 | .set_rate = _clk_parent_set_rate, | ||
528 | .enable = _clk_enable, | ||
529 | .enable_reg = SCM_GCCR, | ||
530 | .enable_shift = SCM_GCCR_USBD_CLK_EN_OFFSET, | ||
531 | .disable = _clk_disable, | ||
532 | }; | ||
533 | |||
534 | static struct clk gpt_clk = { | ||
535 | .name = "gpt_clk", | ||
536 | .parent = &perclk[0], | ||
537 | .round_rate = _clk_parent_round_rate, | ||
538 | .set_rate = _clk_parent_set_rate, | ||
539 | }; | ||
540 | |||
541 | static struct clk uart_clk = { | ||
542 | .name = "uart_clk", | ||
543 | .parent = &perclk[0], | ||
544 | .round_rate = _clk_parent_round_rate, | ||
545 | .set_rate = _clk_parent_set_rate, | ||
546 | }; | ||
547 | |||
548 | static struct clk i2c_clk = { | ||
549 | .name = "i2c_clk", | ||
550 | .parent = &hclk, | ||
551 | .round_rate = _clk_parent_round_rate, | ||
552 | .set_rate = _clk_parent_set_rate, | ||
553 | }; | ||
554 | |||
555 | static struct clk spi_clk = { | ||
556 | .name = "spi_clk", | ||
557 | .parent = &perclk[1], | ||
558 | .round_rate = _clk_parent_round_rate, | ||
559 | .set_rate = _clk_parent_set_rate, | ||
560 | }; | ||
561 | |||
562 | static struct clk sdhc_clk = { | ||
563 | .name = "sdhc_clk", | ||
564 | .parent = &perclk[1], | ||
565 | .round_rate = _clk_parent_round_rate, | ||
566 | .set_rate = _clk_parent_set_rate, | ||
567 | }; | ||
568 | |||
569 | static struct clk lcdc_clk = { | ||
570 | .name = "lcdc_clk", | ||
571 | .parent = &perclk[1], | ||
572 | .round_rate = _clk_parent_round_rate, | ||
573 | .set_rate = _clk_parent_set_rate, | ||
574 | }; | ||
575 | |||
576 | static struct clk mshc_clk = { | ||
577 | .name = "mshc_clk", | ||
578 | .parent = &hclk, | ||
579 | .round_rate = _clk_parent_round_rate, | ||
580 | .set_rate = _clk_parent_set_rate, | ||
581 | }; | ||
582 | |||
583 | static struct clk ssi_clk = { | ||
584 | .name = "ssi_clk", | ||
585 | .parent = &perclk[2], | ||
586 | .round_rate = _clk_parent_round_rate, | ||
587 | .set_rate = _clk_parent_set_rate, | ||
588 | }; | ||
589 | |||
590 | static struct clk rtc_clk = { | ||
591 | .name = "rtc_clk", | ||
592 | .parent = &clk32, | ||
593 | }; | ||
594 | |||
595 | static struct clk *mxc_clks[] = { | ||
596 | &clk16m, | ||
597 | &clk32, | ||
598 | &clk32_premult, | ||
599 | &prem_clk, | ||
600 | &system_clk, | ||
601 | &mcu_clk, | ||
602 | &fclk, | ||
603 | &hclk, | ||
604 | &clk48m, | ||
605 | &perclk[0], | ||
606 | &perclk[1], | ||
607 | &perclk[2], | ||
608 | &clko_clk, | ||
609 | &dma_clk, | ||
610 | &csi_clk, | ||
611 | &mma_clk, | ||
612 | &usbd_clk, | ||
613 | &gpt_clk, | ||
614 | &uart_clk, | ||
615 | &i2c_clk, | ||
616 | &spi_clk, | ||
617 | &sdhc_clk, | ||
618 | &lcdc_clk, | ||
619 | &mshc_clk, | ||
620 | &ssi_clk, | ||
621 | &rtc_clk, | ||
622 | }; | ||
623 | |||
624 | int __init mxc_clocks_init(unsigned long fref) | ||
625 | { | ||
626 | struct clk **clkp; | ||
627 | unsigned int reg; | ||
628 | |||
629 | /* disable clocks we are able to */ | ||
630 | __raw_writel(0, SCM_GCCR); | ||
631 | |||
632 | clk32_rate = fref; | ||
633 | reg = __raw_readl(CCM_CSCR); | ||
634 | |||
635 | /* detect clock reference for system PLL */ | ||
636 | if (reg & CCM_CSCR_SYSTEM_SEL) { | ||
637 | prem_clk.parent = &clk16m; | ||
638 | } else { | ||
639 | /* ensure that oscillator is disabled */ | ||
640 | reg &= ~(1 << CCM_CSCR_OSC_EN_SHIFT); | ||
641 | __raw_writel(reg, CCM_CSCR); | ||
642 | prem_clk.parent = &clk32_premult; | ||
643 | } | ||
644 | |||
645 | /* detect reference for CLKO */ | ||
646 | reg = (reg & CCM_CSCR_CLKO_MASK) >> CCM_CSCR_CLKO_OFFSET; | ||
647 | clko_clk.parent = (struct clk *)clko_clocks[reg]; | ||
648 | |||
649 | for (clkp = mxc_clks; clkp < mxc_clks + ARRAY_SIZE(mxc_clks); clkp++) | ||
650 | clk_register(*clkp); | ||
651 | |||
652 | clk_enable(&hclk); | ||
653 | clk_enable(&fclk); | ||
654 | |||
655 | return 0; | ||
656 | } | ||
diff --git a/arch/arm/mach-mx1/crm_regs.h b/arch/arm/mach-mx1/crm_regs.h new file mode 100644 index 000000000000..22e866ff0c09 --- /dev/null +++ b/arch/arm/mach-mx1/crm_regs.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
4 | * | ||
5 | * This file may be distributed under the terms of the GNU General | ||
6 | * Public License, version 2. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ARCH_ARM_MACH_MX1_CRM_REGS_H__ | ||
10 | #define __ARCH_ARM_MACH_MX1_CRM_REGS_H__ | ||
11 | |||
12 | #define CCM_BASE IO_ADDRESS(CCM_BASE_ADDR) | ||
13 | #define SCM_BASE IO_ADDRESS(SCM_BASE_ADDR) | ||
14 | |||
15 | /* CCM register addresses */ | ||
16 | #define CCM_CSCR (CCM_BASE + 0x0) | ||
17 | #define CCM_MPCTL0 (CCM_BASE + 0x4) | ||
18 | #define CCM_MPCTL1 (CCM_BASE + 0x8) | ||
19 | #define CCM_SPCTL0 (CCM_BASE + 0xC) | ||
20 | #define CCM_SPCTL1 (CCM_BASE + 0x10) | ||
21 | #define CCM_PCDR (CCM_BASE + 0x20) | ||
22 | |||
23 | #define CCM_CSCR_CLKO_OFFSET 29 | ||
24 | #define CCM_CSCR_CLKO_MASK (0x7 << 29) | ||
25 | #define CCM_CSCR_USB_OFFSET 26 | ||
26 | #define CCM_CSCR_USB_MASK (0x7 << 26) | ||
27 | #define CCM_CSCR_SPLL_RESTART (1 << 22) | ||
28 | #define CCM_CSCR_MPLL_RESTART (1 << 21) | ||
29 | #define CCM_CSCR_OSC_EN_SHIFT 17 | ||
30 | #define CCM_CSCR_SYSTEM_SEL (1 << 16) | ||
31 | #define CCM_CSCR_BCLK_OFFSET 10 | ||
32 | #define CCM_CSCR_BCLK_MASK (0xF << 10) | ||
33 | #define CCM_CSCR_PRESC (1 << 15) | ||
34 | #define CCM_CSCR_SPEN (1 << 1) | ||
35 | #define CCM_CSCR_MPEN (1 << 0) | ||
36 | |||
37 | #define CCM_PCDR_PCLK3_OFFSET 16 | ||
38 | #define CCM_PCDR_PCLK3_MASK (0x7F << 16) | ||
39 | #define CCM_PCDR_PCLK2_OFFSET 4 | ||
40 | #define CCM_PCDR_PCLK2_MASK (0xF << 4) | ||
41 | #define CCM_PCDR_PCLK1_OFFSET 0 | ||
42 | #define CCM_PCDR_PCLK1_MASK 0xF | ||
43 | |||
44 | /* SCM register addresses */ | ||
45 | #define SCM_SIDR (SCM_BASE + 0x0) | ||
46 | #define SCM_FMCR (SCM_BASE + 0x4) | ||
47 | #define SCM_GPCR (SCM_BASE + 0x8) | ||
48 | #define SCM_GCCR (SCM_BASE + 0xC) | ||
49 | |||
50 | #define SCM_GCCR_DMA_CLK_EN_OFFSET 3 | ||
51 | #define SCM_GCCR_CSI_CLK_EN_OFFSET 2 | ||
52 | #define SCM_GCCR_MMA_CLK_EN_OFFSET 1 | ||
53 | #define SCM_GCCR_USBD_CLK_EN_OFFSET 0 | ||
54 | |||
55 | #endif /* __ARCH_ARM_MACH_MX2_CRM_REGS_H__ */ | ||
diff --git a/arch/arm/mach-mx1/devices.c b/arch/arm/mach-mx1/devices.c new file mode 100644 index 000000000000..686d8d2dbb24 --- /dev/null +++ b/arch/arm/mach-mx1/devices.c | |||
@@ -0,0 +1,260 @@ | |||
1 | /* | ||
2 | * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * Copyright 2008 Sascha Hauer, kernel@pengutronix.de | ||
4 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
5 | * Copyright (c) 2008 Darius Augulis <darius.augulis@teltonika.lt> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or | ||
8 | * modify it under the terms of the GNU General Public License | ||
9 | * as published by the Free Software Foundation; either version 2 | ||
10 | * of the License, or (at your option) any later version. | ||
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., 51 Franklin Street, Fifth Floor, | ||
19 | * Boston, MA 02110-1301, USA. | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <mach/hardware.h> | ||
27 | |||
28 | static struct resource imx_csi_resources[] = { | ||
29 | [0] = { | ||
30 | .start = 0x00224000, | ||
31 | .end = 0x00224010, | ||
32 | .flags = IORESOURCE_MEM, | ||
33 | }, | ||
34 | [1] = { | ||
35 | .start = CSI_INT, | ||
36 | .end = CSI_INT, | ||
37 | .flags = IORESOURCE_IRQ, | ||
38 | }, | ||
39 | }; | ||
40 | |||
41 | static u64 imx_csi_dmamask = 0xffffffffUL; | ||
42 | |||
43 | struct platform_device imx_csi_device = { | ||
44 | .name = "imx-csi", | ||
45 | .id = 0, /* This is used to put cameras on this interface */ | ||
46 | .dev = { | ||
47 | .dma_mask = &imx_csi_dmamask, | ||
48 | .coherent_dma_mask = 0xffffffff, | ||
49 | }, | ||
50 | .resource = imx_csi_resources, | ||
51 | .num_resources = ARRAY_SIZE(imx_csi_resources), | ||
52 | }; | ||
53 | |||
54 | static struct resource imx_i2c_resources[] = { | ||
55 | [0] = { | ||
56 | .start = 0x00217000, | ||
57 | .end = 0x00217010, | ||
58 | .flags = IORESOURCE_MEM, | ||
59 | }, | ||
60 | [1] = { | ||
61 | .start = I2C_INT, | ||
62 | .end = I2C_INT, | ||
63 | .flags = IORESOURCE_IRQ, | ||
64 | }, | ||
65 | }; | ||
66 | |||
67 | struct platform_device imx_i2c_device = { | ||
68 | .name = "imx-i2c", | ||
69 | .id = 0, | ||
70 | .resource = imx_i2c_resources, | ||
71 | .num_resources = ARRAY_SIZE(imx_i2c_resources), | ||
72 | }; | ||
73 | |||
74 | static struct resource imx_uart1_resources[] = { | ||
75 | [0] = { | ||
76 | .start = UART1_BASE_ADDR, | ||
77 | .end = UART1_BASE_ADDR + 0xD0, | ||
78 | .flags = IORESOURCE_MEM, | ||
79 | }, | ||
80 | [1] = { | ||
81 | .start = UART1_MINT_RX, | ||
82 | .end = UART1_MINT_RX, | ||
83 | .flags = IORESOURCE_IRQ, | ||
84 | }, | ||
85 | [2] = { | ||
86 | .start = UART1_MINT_TX, | ||
87 | .end = UART1_MINT_TX, | ||
88 | .flags = IORESOURCE_IRQ, | ||
89 | }, | ||
90 | [3] = { | ||
91 | .start = UART1_MINT_RTS, | ||
92 | .end = UART1_MINT_RTS, | ||
93 | .flags = IORESOURCE_IRQ, | ||
94 | }, | ||
95 | }; | ||
96 | |||
97 | struct platform_device imx_uart1_device = { | ||
98 | .name = "imx-uart", | ||
99 | .id = 0, | ||
100 | .num_resources = ARRAY_SIZE(imx_uart1_resources), | ||
101 | .resource = imx_uart1_resources, | ||
102 | }; | ||
103 | |||
104 | static struct resource imx_uart2_resources[] = { | ||
105 | [0] = { | ||
106 | .start = UART2_BASE_ADDR, | ||
107 | .end = UART2_BASE_ADDR + 0xD0, | ||
108 | .flags = IORESOURCE_MEM, | ||
109 | }, | ||
110 | [1] = { | ||
111 | .start = UART2_MINT_RX, | ||
112 | .end = UART2_MINT_RX, | ||
113 | .flags = IORESOURCE_IRQ, | ||
114 | }, | ||
115 | [2] = { | ||
116 | .start = UART2_MINT_TX, | ||
117 | .end = UART2_MINT_TX, | ||
118 | .flags = IORESOURCE_IRQ, | ||
119 | }, | ||
120 | [3] = { | ||
121 | .start = UART2_MINT_RTS, | ||
122 | .end = UART2_MINT_RTS, | ||
123 | .flags = IORESOURCE_IRQ, | ||
124 | }, | ||
125 | }; | ||
126 | |||
127 | struct platform_device imx_uart2_device = { | ||
128 | .name = "imx-uart", | ||
129 | .id = 1, | ||
130 | .num_resources = ARRAY_SIZE(imx_uart2_resources), | ||
131 | .resource = imx_uart2_resources, | ||
132 | }; | ||
133 | |||
134 | static struct resource imx_rtc_resources[] = { | ||
135 | [0] = { | ||
136 | .start = 0x00204000, | ||
137 | .end = 0x00204024, | ||
138 | .flags = IORESOURCE_MEM, | ||
139 | }, | ||
140 | [1] = { | ||
141 | .start = RTC_INT, | ||
142 | .end = RTC_INT, | ||
143 | .flags = IORESOURCE_IRQ, | ||
144 | }, | ||
145 | [2] = { | ||
146 | .start = RTC_SAMINT, | ||
147 | .end = RTC_SAMINT, | ||
148 | .flags = IORESOURCE_IRQ, | ||
149 | }, | ||
150 | }; | ||
151 | |||
152 | struct platform_device imx_rtc_device = { | ||
153 | .name = "rtc-imx", | ||
154 | .id = 0, | ||
155 | .resource = imx_rtc_resources, | ||
156 | .num_resources = ARRAY_SIZE(imx_rtc_resources), | ||
157 | }; | ||
158 | |||
159 | static struct resource imx_wdt_resources[] = { | ||
160 | [0] = { | ||
161 | .start = 0x00201000, | ||
162 | .end = 0x00201008, | ||
163 | .flags = IORESOURCE_MEM, | ||
164 | }, | ||
165 | [1] = { | ||
166 | .start = WDT_INT, | ||
167 | .end = WDT_INT, | ||
168 | .flags = IORESOURCE_IRQ, | ||
169 | }, | ||
170 | }; | ||
171 | |||
172 | struct platform_device imx_wdt_device = { | ||
173 | .name = "imx-wdt", | ||
174 | .id = 0, | ||
175 | .resource = imx_wdt_resources, | ||
176 | .num_resources = ARRAY_SIZE(imx_wdt_resources), | ||
177 | }; | ||
178 | |||
179 | static struct resource imx_usb_resources[] = { | ||
180 | [0] = { | ||
181 | .start = 0x00212000, | ||
182 | .end = 0x00212148, | ||
183 | .flags = IORESOURCE_MEM, | ||
184 | }, | ||
185 | [1] = { | ||
186 | .start = USBD_INT0, | ||
187 | .end = USBD_INT0, | ||
188 | .flags = IORESOURCE_IRQ, | ||
189 | }, | ||
190 | [2] = { | ||
191 | .start = USBD_INT1, | ||
192 | .end = USBD_INT1, | ||
193 | .flags = IORESOURCE_IRQ, | ||
194 | }, | ||
195 | [3] = { | ||
196 | .start = USBD_INT2, | ||
197 | .end = USBD_INT2, | ||
198 | .flags = IORESOURCE_IRQ, | ||
199 | }, | ||
200 | [4] = { | ||
201 | .start = USBD_INT3, | ||
202 | .end = USBD_INT3, | ||
203 | .flags = IORESOURCE_IRQ, | ||
204 | }, | ||
205 | [5] = { | ||
206 | .start = USBD_INT4, | ||
207 | .end = USBD_INT4, | ||
208 | .flags = IORESOURCE_IRQ, | ||
209 | }, | ||
210 | [6] = { | ||
211 | .start = USBD_INT5, | ||
212 | .end = USBD_INT5, | ||
213 | .flags = IORESOURCE_IRQ, | ||
214 | }, | ||
215 | [7] = { | ||
216 | .start = USBD_INT6, | ||
217 | .end = USBD_INT6, | ||
218 | .flags = IORESOURCE_IRQ, | ||
219 | }, | ||
220 | }; | ||
221 | |||
222 | struct platform_device imx_usb_device = { | ||
223 | .name = "imx_udc", | ||
224 | .id = 0, | ||
225 | .num_resources = ARRAY_SIZE(imx_usb_resources), | ||
226 | .resource = imx_usb_resources, | ||
227 | }; | ||
228 | |||
229 | /* GPIO port description */ | ||
230 | static struct mxc_gpio_port imx_gpio_ports[] = { | ||
231 | [0] = { | ||
232 | .chip.label = "gpio-0", | ||
233 | .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR), | ||
234 | .irq = GPIO_INT_PORTA, | ||
235 | .virtual_irq_start = MXC_GPIO_IRQ_START | ||
236 | }, | ||
237 | [1] = { | ||
238 | .chip.label = "gpio-1", | ||
239 | .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x100), | ||
240 | .irq = GPIO_INT_PORTB, | ||
241 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32 | ||
242 | }, | ||
243 | [2] = { | ||
244 | .chip.label = "gpio-2", | ||
245 | .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x200), | ||
246 | .irq = GPIO_INT_PORTC, | ||
247 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64 | ||
248 | }, | ||
249 | [3] = { | ||
250 | .chip.label = "gpio-3", | ||
251 | .base = (void __iomem *)IO_ADDRESS(GPIO_BASE_ADDR + 0x300), | ||
252 | .irq = GPIO_INT_PORTD, | ||
253 | .virtual_irq_start = MXC_GPIO_IRQ_START + 96 | ||
254 | } | ||
255 | }; | ||
256 | |||
257 | int __init mxc_register_gpios(void) | ||
258 | { | ||
259 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | ||
260 | } | ||
diff --git a/arch/arm/mach-mx1/devices.h b/arch/arm/mach-mx1/devices.h new file mode 100644 index 000000000000..0da5d7cce3a2 --- /dev/null +++ b/arch/arm/mach-mx1/devices.h | |||
@@ -0,0 +1,7 @@ | |||
1 | extern struct platform_device imx_csi_device; | ||
2 | extern struct platform_device imx_i2c_device; | ||
3 | extern struct platform_device imx_uart1_device; | ||
4 | extern struct platform_device imx_uart2_device; | ||
5 | extern struct platform_device imx_rtc_device; | ||
6 | extern struct platform_device imx_wdt_device; | ||
7 | extern struct platform_device imx_usb_device; | ||
diff --git a/arch/arm/mach-integrator/include/mach/dma.h b/arch/arm/mach-mx1/generic.c index fbebe85a2db7..0dec6f300ffc 100644 --- a/arch/arm/mach-integrator/include/mach/dma.h +++ b/arch/arm/mach-mx1/generic.c | |||
@@ -1,7 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-integrator/include/mach/dma.h | 2 | * author: Sascha Hauer |
3 | * Created: april 20th, 2004 | ||
4 | * Copyright: Synertronixx GmbH | ||
3 | * | 5 | * |
4 | * Copyright (C) 1997,1998 Russell King | 6 | * Common code for i.MX machines |
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * 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 | 9 | * it under the terms of the GNU General Public License as published by |
@@ -16,4 +18,26 @@ | |||
16 | * You should have received a copy of the GNU General Public License | 18 | * You should have received a copy of the GNU General Public License |
17 | * along with this program; if not, write to the Free Software | 19 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | * | ||
19 | */ | 22 | */ |
23 | #include <linux/kernel.h> | ||
24 | #include <linux/init.h> | ||
25 | #include <linux/io.h> | ||
26 | |||
27 | #include <asm/mach/map.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | |||
31 | static struct map_desc imx_io_desc[] __initdata = { | ||
32 | { | ||
33 | .virtual = IMX_IO_BASE, | ||
34 | .pfn = __phys_to_pfn(IMX_IO_PHYS), | ||
35 | .length = IMX_IO_SIZE, | ||
36 | .type = MT_DEVICE | ||
37 | } | ||
38 | }; | ||
39 | |||
40 | void __init mxc_map_io(void) | ||
41 | { | ||
42 | iotable_init(imx_io_desc, ARRAY_SIZE(imx_io_desc)); | ||
43 | } | ||
diff --git a/arch/arm/mach-mx1/mx1ads.c b/arch/arm/mach-mx1/mx1ads.c new file mode 100644 index 000000000000..2e4b185fe4a9 --- /dev/null +++ b/arch/arm/mach-mx1/mx1ads.c | |||
@@ -0,0 +1,148 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-imx/mx1ads.c | ||
3 | * | ||
4 | * Initially based on: | ||
5 | * linux-2.6.7-imx/arch/arm/mach-imx/scb9328.c | ||
6 | * Copyright (c) 2004 Sascha Hauer <sascha@saschahauer.de> | ||
7 | * | ||
8 | * 2004 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/mtd/physmap.h> | ||
19 | |||
20 | #include <asm/mach-types.h> | ||
21 | #include <asm/mach/arch.h> | ||
22 | #include <asm/mach/time.h> | ||
23 | |||
24 | #include <mach/hardware.h> | ||
25 | #include <mach/common.h> | ||
26 | #include <mach/imx-uart.h> | ||
27 | #include <mach/iomux-mx1-mx2.h> | ||
28 | #include "devices.h" | ||
29 | |||
30 | /* | ||
31 | * UARTs platform data | ||
32 | */ | ||
33 | static int mxc_uart1_pins[] = { | ||
34 | PC9_PF_UART1_CTS, | ||
35 | PC10_PF_UART1_RTS, | ||
36 | PC11_PF_UART1_TXD, | ||
37 | PC12_PF_UART1_RXD, | ||
38 | }; | ||
39 | |||
40 | static int uart1_mxc_init(struct platform_device *pdev) | ||
41 | { | ||
42 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | ||
43 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); | ||
44 | } | ||
45 | |||
46 | static int uart1_mxc_exit(struct platform_device *pdev) | ||
47 | { | ||
48 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, | ||
49 | ARRAY_SIZE(mxc_uart1_pins)); | ||
50 | return 0; | ||
51 | } | ||
52 | |||
53 | static int mxc_uart2_pins[] = { | ||
54 | PB28_PF_UART2_CTS, | ||
55 | PB29_PF_UART2_RTS, | ||
56 | PB30_PF_UART2_TXD, | ||
57 | PB31_PF_UART2_RXD, | ||
58 | }; | ||
59 | |||
60 | static int uart2_mxc_init(struct platform_device *pdev) | ||
61 | { | ||
62 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, | ||
63 | ARRAY_SIZE(mxc_uart2_pins), "UART2"); | ||
64 | } | ||
65 | |||
66 | static int uart2_mxc_exit(struct platform_device *pdev) | ||
67 | { | ||
68 | mxc_gpio_release_multiple_pins(mxc_uart2_pins, | ||
69 | ARRAY_SIZE(mxc_uart2_pins)); | ||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | static struct imxuart_platform_data uart_pdata[] = { | ||
74 | { | ||
75 | .init = uart1_mxc_init, | ||
76 | .exit = uart1_mxc_exit, | ||
77 | .flags = IMXUART_HAVE_RTSCTS, | ||
78 | }, { | ||
79 | .init = uart2_mxc_init, | ||
80 | .exit = uart2_mxc_exit, | ||
81 | .flags = IMXUART_HAVE_RTSCTS, | ||
82 | }, | ||
83 | }; | ||
84 | |||
85 | /* | ||
86 | * Physmap flash | ||
87 | */ | ||
88 | |||
89 | static struct physmap_flash_data mx1ads_flash_data = { | ||
90 | .width = 4, /* bankwidth in bytes */ | ||
91 | }; | ||
92 | |||
93 | static struct resource flash_resource = { | ||
94 | .start = IMX_CS0_PHYS, | ||
95 | .end = IMX_CS0_PHYS + SZ_32M - 1, | ||
96 | .flags = IORESOURCE_MEM, | ||
97 | }; | ||
98 | |||
99 | static struct platform_device flash_device = { | ||
100 | .name = "physmap-flash", | ||
101 | .id = 0, | ||
102 | .resource = &flash_resource, | ||
103 | .num_resources = 1, | ||
104 | }; | ||
105 | |||
106 | /* | ||
107 | * Board init | ||
108 | */ | ||
109 | static void __init mx1ads_init(void) | ||
110 | { | ||
111 | /* UART */ | ||
112 | mxc_register_device(&imx_uart1_device, &uart_pdata[0]); | ||
113 | mxc_register_device(&imx_uart2_device, &uart_pdata[1]); | ||
114 | |||
115 | /* Physmap flash */ | ||
116 | mxc_register_device(&flash_device, &mx1ads_flash_data); | ||
117 | } | ||
118 | |||
119 | static void __init mx1ads_timer_init(void) | ||
120 | { | ||
121 | mxc_clocks_init(32000); | ||
122 | mxc_timer_init("gpt_clk"); | ||
123 | } | ||
124 | |||
125 | struct sys_timer mx1ads_timer = { | ||
126 | .init = mx1ads_timer_init, | ||
127 | }; | ||
128 | |||
129 | MACHINE_START(MX1ADS, "Freescale MX1ADS") | ||
130 | /* Maintainer: Sascha Hauer, Pengutronix */ | ||
131 | .phys_io = IMX_IO_PHYS, | ||
132 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, | ||
133 | .boot_params = PHYS_OFFSET + 0x100, | ||
134 | .map_io = mxc_map_io, | ||
135 | .init_irq = mxc_init_irq, | ||
136 | .timer = &mx1ads_timer, | ||
137 | .init_machine = mx1ads_init, | ||
138 | MACHINE_END | ||
139 | |||
140 | MACHINE_START(MXLADS, "Freescale MXLADS") | ||
141 | .phys_io = IMX_IO_PHYS, | ||
142 | .io_pg_offst = (IMX_IO_BASE >> 18) & 0xfffc, | ||
143 | .boot_params = PHYS_OFFSET + 0x100, | ||
144 | .map_io = mxc_map_io, | ||
145 | .init_irq = mxc_init_irq, | ||
146 | .timer = &mx1ads_timer, | ||
147 | .init_machine = mx1ads_init, | ||
148 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c index bd0559d5933e..af121f5ab710 100644 --- a/arch/arm/mach-mx2/devices.c +++ b/arch/arm/mach-mx2/devices.c | |||
@@ -190,38 +190,72 @@ struct platform_device mxc_wdt = { | |||
190 | .resource = mxc_wdt_resources, | 190 | .resource = mxc_wdt_resources, |
191 | }; | 191 | }; |
192 | 192 | ||
193 | static struct resource mxc_w1_master_resources[] = { | ||
194 | { | ||
195 | .start = OWIRE_BASE_ADDR, | ||
196 | .end = OWIRE_BASE_ADDR + SZ_4K - 1, | ||
197 | .flags = IORESOURCE_MEM, | ||
198 | }, | ||
199 | }; | ||
200 | |||
201 | struct platform_device mxc_w1_master_device = { | ||
202 | .name = "mxc_w1", | ||
203 | .id = 0, | ||
204 | .num_resources = ARRAY_SIZE(mxc_w1_master_resources), | ||
205 | .resource = mxc_w1_master_resources, | ||
206 | }; | ||
207 | |||
208 | static struct resource mxc_nand_resources[] = { | ||
209 | { | ||
210 | .start = NFC_BASE_ADDR, | ||
211 | .end = NFC_BASE_ADDR + 0xfff, | ||
212 | .flags = IORESOURCE_MEM | ||
213 | }, { | ||
214 | .start = MXC_INT_NANDFC, | ||
215 | .end = MXC_INT_NANDFC, | ||
216 | .flags = IORESOURCE_IRQ | ||
217 | }, | ||
218 | }; | ||
219 | |||
220 | struct platform_device mxc_nand_device = { | ||
221 | .name = "mxc_nand", | ||
222 | .id = 0, | ||
223 | .num_resources = ARRAY_SIZE(mxc_nand_resources), | ||
224 | .resource = mxc_nand_resources, | ||
225 | }; | ||
226 | |||
193 | /* GPIO port description */ | 227 | /* GPIO port description */ |
194 | static struct mxc_gpio_port imx_gpio_ports[] = { | 228 | static struct mxc_gpio_port imx_gpio_ports[] = { |
195 | [0] = { | 229 | [0] = { |
196 | .chip.label = "gpio-0", | 230 | .chip.label = "gpio-0", |
197 | .irq = MXC_INT_GPIO, | 231 | .irq = MXC_INT_GPIO, |
198 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 0), | 232 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 0), |
199 | .virtual_irq_start = MXC_MAX_INT_LINES, | 233 | .virtual_irq_start = MXC_GPIO_IRQ_START, |
200 | }, | 234 | }, |
201 | [1] = { | 235 | [1] = { |
202 | .chip.label = "gpio-1", | 236 | .chip.label = "gpio-1", |
203 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 1), | 237 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 1), |
204 | .virtual_irq_start = MXC_MAX_INT_LINES + 32, | 238 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, |
205 | }, | 239 | }, |
206 | [2] = { | 240 | [2] = { |
207 | .chip.label = "gpio-2", | 241 | .chip.label = "gpio-2", |
208 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 2), | 242 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 2), |
209 | .virtual_irq_start = MXC_MAX_INT_LINES + 64, | 243 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, |
210 | }, | 244 | }, |
211 | [3] = { | 245 | [3] = { |
212 | .chip.label = "gpio-3", | 246 | .chip.label = "gpio-3", |
213 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 3), | 247 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 3), |
214 | .virtual_irq_start = MXC_MAX_INT_LINES + 96, | 248 | .virtual_irq_start = MXC_GPIO_IRQ_START + 96, |
215 | }, | 249 | }, |
216 | [4] = { | 250 | [4] = { |
217 | .chip.label = "gpio-4", | 251 | .chip.label = "gpio-4", |
218 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 4), | 252 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 4), |
219 | .virtual_irq_start = MXC_MAX_INT_LINES + 128, | 253 | .virtual_irq_start = MXC_GPIO_IRQ_START + 128, |
220 | }, | 254 | }, |
221 | [5] = { | 255 | [5] = { |
222 | .chip.label = "gpio-5", | 256 | .chip.label = "gpio-5", |
223 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 5), | 257 | .base = (void*)(AIPI_BASE_ADDR_VIRT + 0x15000 + 0x100 * 5), |
224 | .virtual_irq_start = MXC_MAX_INT_LINES + 160, | 258 | .virtual_irq_start = MXC_GPIO_IRQ_START + 160, |
225 | } | 259 | } |
226 | }; | 260 | }; |
227 | 261 | ||
diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h index c77a4b8f73b4..1e8cb577a642 100644 --- a/arch/arm/mach-mx2/devices.h +++ b/arch/arm/mach-mx2/devices.h | |||
@@ -12,4 +12,5 @@ extern struct platform_device mxc_uart_device2; | |||
12 | extern struct platform_device mxc_uart_device3; | 12 | extern struct platform_device mxc_uart_device3; |
13 | extern struct platform_device mxc_uart_device4; | 13 | extern struct platform_device mxc_uart_device4; |
14 | extern struct platform_device mxc_uart_device5; | 14 | extern struct platform_device mxc_uart_device5; |
15 | 15 | extern struct platform_device mxc_w1_master_device; | |
16 | extern struct platform_device mxc_nand_device; | ||
diff --git a/arch/arm/mach-mx2/mx27ads.c b/arch/arm/mach-mx2/mx27ads.c index 56e22d3ca075..2b5c67f54571 100644 --- a/arch/arm/mach-mx2/mx27ads.c +++ b/arch/arm/mach-mx2/mx27ads.c | |||
@@ -68,15 +68,14 @@ static int mxc_uart0_pins[] = { | |||
68 | static int uart_mxc_port0_init(struct platform_device *pdev) | 68 | static int uart_mxc_port0_init(struct platform_device *pdev) |
69 | { | 69 | { |
70 | return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, | 70 | return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, |
71 | ARRAY_SIZE(mxc_uart0_pins), | 71 | ARRAY_SIZE(mxc_uart0_pins), "UART0"); |
72 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART0"); | ||
73 | } | 72 | } |
74 | 73 | ||
75 | static int uart_mxc_port0_exit(struct platform_device *pdev) | 74 | static int uart_mxc_port0_exit(struct platform_device *pdev) |
76 | { | 75 | { |
77 | return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, | 76 | mxc_gpio_release_multiple_pins(mxc_uart0_pins, |
78 | ARRAY_SIZE(mxc_uart0_pins), | 77 | ARRAY_SIZE(mxc_uart0_pins)); |
79 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART0"); | 78 | return 0; |
80 | } | 79 | } |
81 | 80 | ||
82 | static int mxc_uart1_pins[] = { | 81 | static int mxc_uart1_pins[] = { |
@@ -89,15 +88,14 @@ static int mxc_uart1_pins[] = { | |||
89 | static int uart_mxc_port1_init(struct platform_device *pdev) | 88 | static int uart_mxc_port1_init(struct platform_device *pdev) |
90 | { | 89 | { |
91 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | 90 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, |
92 | ARRAY_SIZE(mxc_uart1_pins), | 91 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); |
93 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART1"); | ||
94 | } | 92 | } |
95 | 93 | ||
96 | static int uart_mxc_port1_exit(struct platform_device *pdev) | 94 | static int uart_mxc_port1_exit(struct platform_device *pdev) |
97 | { | 95 | { |
98 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | 96 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, |
99 | ARRAY_SIZE(mxc_uart1_pins), | 97 | ARRAY_SIZE(mxc_uart1_pins)); |
100 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART1"); | 98 | return 0; |
101 | } | 99 | } |
102 | 100 | ||
103 | static int mxc_uart2_pins[] = { | 101 | static int mxc_uart2_pins[] = { |
@@ -110,15 +108,14 @@ static int mxc_uart2_pins[] = { | |||
110 | static int uart_mxc_port2_init(struct platform_device *pdev) | 108 | static int uart_mxc_port2_init(struct platform_device *pdev) |
111 | { | 109 | { |
112 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, | 110 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, |
113 | ARRAY_SIZE(mxc_uart2_pins), | 111 | ARRAY_SIZE(mxc_uart2_pins), "UART2"); |
114 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART2"); | ||
115 | } | 112 | } |
116 | 113 | ||
117 | static int uart_mxc_port2_exit(struct platform_device *pdev) | 114 | static int uart_mxc_port2_exit(struct platform_device *pdev) |
118 | { | 115 | { |
119 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, | 116 | mxc_gpio_release_multiple_pins(mxc_uart2_pins, |
120 | ARRAY_SIZE(mxc_uart2_pins), | 117 | ARRAY_SIZE(mxc_uart2_pins)); |
121 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART2"); | 118 | return 0; |
122 | } | 119 | } |
123 | 120 | ||
124 | static int mxc_uart3_pins[] = { | 121 | static int mxc_uart3_pins[] = { |
@@ -131,15 +128,13 @@ static int mxc_uart3_pins[] = { | |||
131 | static int uart_mxc_port3_init(struct platform_device *pdev) | 128 | static int uart_mxc_port3_init(struct platform_device *pdev) |
132 | { | 129 | { |
133 | return mxc_gpio_setup_multiple_pins(mxc_uart3_pins, | 130 | return mxc_gpio_setup_multiple_pins(mxc_uart3_pins, |
134 | ARRAY_SIZE(mxc_uart3_pins), | 131 | ARRAY_SIZE(mxc_uart3_pins), "UART3"); |
135 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART3"); | ||
136 | } | 132 | } |
137 | 133 | ||
138 | static int uart_mxc_port3_exit(struct platform_device *pdev) | 134 | static int uart_mxc_port3_exit(struct platform_device *pdev) |
139 | { | 135 | { |
140 | return mxc_gpio_setup_multiple_pins(mxc_uart3_pins, | 136 | mxc_gpio_release_multiple_pins(mxc_uart3_pins, |
141 | ARRAY_SIZE(mxc_uart3_pins), | 137 | ARRAY_SIZE(mxc_uart3_pins)); |
142 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART3"); | ||
143 | } | 138 | } |
144 | 139 | ||
145 | static int mxc_uart4_pins[] = { | 140 | static int mxc_uart4_pins[] = { |
@@ -152,15 +147,14 @@ static int mxc_uart4_pins[] = { | |||
152 | static int uart_mxc_port4_init(struct platform_device *pdev) | 147 | static int uart_mxc_port4_init(struct platform_device *pdev) |
153 | { | 148 | { |
154 | return mxc_gpio_setup_multiple_pins(mxc_uart4_pins, | 149 | return mxc_gpio_setup_multiple_pins(mxc_uart4_pins, |
155 | ARRAY_SIZE(mxc_uart4_pins), | 150 | ARRAY_SIZE(mxc_uart4_pins), "UART4"); |
156 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART4"); | ||
157 | } | 151 | } |
158 | 152 | ||
159 | static int uart_mxc_port4_exit(struct platform_device *pdev) | 153 | static int uart_mxc_port4_exit(struct platform_device *pdev) |
160 | { | 154 | { |
161 | return mxc_gpio_setup_multiple_pins(mxc_uart4_pins, | 155 | mxc_gpio_release_multiple_pins(mxc_uart4_pins, |
162 | ARRAY_SIZE(mxc_uart4_pins), | 156 | ARRAY_SIZE(mxc_uart4_pins)); |
163 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART4"); | 157 | return 0; |
164 | } | 158 | } |
165 | 159 | ||
166 | static int mxc_uart5_pins[] = { | 160 | static int mxc_uart5_pins[] = { |
@@ -173,15 +167,14 @@ static int mxc_uart5_pins[] = { | |||
173 | static int uart_mxc_port5_init(struct platform_device *pdev) | 167 | static int uart_mxc_port5_init(struct platform_device *pdev) |
174 | { | 168 | { |
175 | return mxc_gpio_setup_multiple_pins(mxc_uart5_pins, | 169 | return mxc_gpio_setup_multiple_pins(mxc_uart5_pins, |
176 | ARRAY_SIZE(mxc_uart5_pins), | 170 | ARRAY_SIZE(mxc_uart5_pins), "UART5"); |
177 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART5"); | ||
178 | } | 171 | } |
179 | 172 | ||
180 | static int uart_mxc_port5_exit(struct platform_device *pdev) | 173 | static int uart_mxc_port5_exit(struct platform_device *pdev) |
181 | { | 174 | { |
182 | return mxc_gpio_setup_multiple_pins(mxc_uart5_pins, | 175 | mxc_gpio_release_multiple_pins(mxc_uart5_pins, |
183 | ARRAY_SIZE(mxc_uart5_pins), | 176 | ARRAY_SIZE(mxc_uart5_pins)); |
184 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART5"); | 177 | return 0; |
185 | } | 178 | } |
186 | 179 | ||
187 | static struct platform_device *platform_devices[] __initdata = { | 180 | static struct platform_device *platform_devices[] __initdata = { |
@@ -212,15 +205,13 @@ static int mxc_fec_pins[] = { | |||
212 | static void gpio_fec_active(void) | 205 | static void gpio_fec_active(void) |
213 | { | 206 | { |
214 | mxc_gpio_setup_multiple_pins(mxc_fec_pins, | 207 | mxc_gpio_setup_multiple_pins(mxc_fec_pins, |
215 | ARRAY_SIZE(mxc_fec_pins), | 208 | ARRAY_SIZE(mxc_fec_pins), "FEC"); |
216 | MXC_GPIO_ALLOC_MODE_NORMAL, "FEC"); | ||
217 | } | 209 | } |
218 | 210 | ||
219 | static void gpio_fec_inactive(void) | 211 | static void gpio_fec_inactive(void) |
220 | { | 212 | { |
221 | mxc_gpio_setup_multiple_pins(mxc_fec_pins, | 213 | mxc_gpio_release_multiple_pins(mxc_fec_pins, |
222 | ARRAY_SIZE(mxc_fec_pins), | 214 | ARRAY_SIZE(mxc_fec_pins)); |
223 | MXC_GPIO_ALLOC_MODE_RELEASE, "FEC"); | ||
224 | } | 215 | } |
225 | 216 | ||
226 | static struct imxuart_platform_data uart_pdata[] = { | 217 | static struct imxuart_platform_data uart_pdata[] = { |
diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c index 7f55746e2591..dfd4156da7d5 100644 --- a/arch/arm/mach-mx2/pcm038.c +++ b/arch/arm/mach-mx2/pcm038.c | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/mtd/physmap.h> | 21 | #include <linux/mtd/physmap.h> |
22 | #include <linux/mtd/plat-ram.h> | ||
22 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | #include <mach/common.h> | 25 | #include <mach/common.h> |
@@ -27,10 +28,36 @@ | |||
27 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
28 | #include <mach/imx-uart.h> | 29 | #include <mach/imx-uart.h> |
29 | #include <mach/board-pcm038.h> | 30 | #include <mach/board-pcm038.h> |
31 | #include <mach/mxc_nand.h> | ||
30 | 32 | ||
31 | #include "devices.h" | 33 | #include "devices.h" |
32 | 34 | ||
33 | /* | 35 | /* |
36 | * Phytec's PCM038 comes with 2MiB battery buffered SRAM, | ||
37 | * 16 bit width | ||
38 | */ | ||
39 | |||
40 | static struct platdata_mtd_ram pcm038_sram_data = { | ||
41 | .bankwidth = 2, | ||
42 | }; | ||
43 | |||
44 | static struct resource pcm038_sram_resource = { | ||
45 | .start = CS1_BASE_ADDR, | ||
46 | .end = CS1_BASE_ADDR + 512 * 1024 - 1, | ||
47 | .flags = IORESOURCE_MEM, | ||
48 | }; | ||
49 | |||
50 | static struct platform_device pcm038_sram_mtd_device = { | ||
51 | .name = "mtd-ram", | ||
52 | .id = 0, | ||
53 | .dev = { | ||
54 | .platform_data = &pcm038_sram_data, | ||
55 | }, | ||
56 | .num_resources = 1, | ||
57 | .resource = &pcm038_sram_resource, | ||
58 | }; | ||
59 | |||
60 | /* | ||
34 | * Phytec's phyCORE-i.MX27 comes with 32MiB flash, | 61 | * Phytec's phyCORE-i.MX27 comes with 32MiB flash, |
35 | * 16 bit width | 62 | * 16 bit width |
36 | */ | 63 | */ |
@@ -64,15 +91,14 @@ static int mxc_uart0_pins[] = { | |||
64 | static int uart_mxc_port0_init(struct platform_device *pdev) | 91 | static int uart_mxc_port0_init(struct platform_device *pdev) |
65 | { | 92 | { |
66 | return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, | 93 | return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, |
67 | ARRAY_SIZE(mxc_uart0_pins), | 94 | ARRAY_SIZE(mxc_uart0_pins), "UART0"); |
68 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART0"); | ||
69 | } | 95 | } |
70 | 96 | ||
71 | static int uart_mxc_port0_exit(struct platform_device *pdev) | 97 | static int uart_mxc_port0_exit(struct platform_device *pdev) |
72 | { | 98 | { |
73 | return mxc_gpio_setup_multiple_pins(mxc_uart0_pins, | 99 | mxc_gpio_release_multiple_pins(mxc_uart0_pins, |
74 | ARRAY_SIZE(mxc_uart0_pins), | 100 | ARRAY_SIZE(mxc_uart0_pins)); |
75 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART0"); | 101 | return 0; |
76 | } | 102 | } |
77 | 103 | ||
78 | static int mxc_uart1_pins[] = { | 104 | static int mxc_uart1_pins[] = { |
@@ -85,15 +111,14 @@ static int mxc_uart1_pins[] = { | |||
85 | static int uart_mxc_port1_init(struct platform_device *pdev) | 111 | static int uart_mxc_port1_init(struct platform_device *pdev) |
86 | { | 112 | { |
87 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | 113 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, |
88 | ARRAY_SIZE(mxc_uart1_pins), | 114 | ARRAY_SIZE(mxc_uart1_pins), "UART1"); |
89 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART1"); | ||
90 | } | 115 | } |
91 | 116 | ||
92 | static int uart_mxc_port1_exit(struct platform_device *pdev) | 117 | static int uart_mxc_port1_exit(struct platform_device *pdev) |
93 | { | 118 | { |
94 | return mxc_gpio_setup_multiple_pins(mxc_uart1_pins, | 119 | mxc_gpio_release_multiple_pins(mxc_uart1_pins, |
95 | ARRAY_SIZE(mxc_uart1_pins), | 120 | ARRAY_SIZE(mxc_uart1_pins)); |
96 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART1"); | 121 | return 0; |
97 | } | 122 | } |
98 | 123 | ||
99 | static int mxc_uart2_pins[] = { PE10_PF_UART3_CTS, | 124 | static int mxc_uart2_pins[] = { PE10_PF_UART3_CTS, |
@@ -104,15 +129,14 @@ static int mxc_uart2_pins[] = { PE10_PF_UART3_CTS, | |||
104 | static int uart_mxc_port2_init(struct platform_device *pdev) | 129 | static int uart_mxc_port2_init(struct platform_device *pdev) |
105 | { | 130 | { |
106 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, | 131 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, |
107 | ARRAY_SIZE(mxc_uart2_pins), | 132 | ARRAY_SIZE(mxc_uart2_pins), "UART2"); |
108 | MXC_GPIO_ALLOC_MODE_NORMAL, "UART2"); | ||
109 | } | 133 | } |
110 | 134 | ||
111 | static int uart_mxc_port2_exit(struct platform_device *pdev) | 135 | static int uart_mxc_port2_exit(struct platform_device *pdev) |
112 | { | 136 | { |
113 | return mxc_gpio_setup_multiple_pins(mxc_uart2_pins, | 137 | mxc_gpio_release_multiple_pins(mxc_uart2_pins, |
114 | ARRAY_SIZE(mxc_uart2_pins), | 138 | ARRAY_SIZE(mxc_uart2_pins)); |
115 | MXC_GPIO_ALLOC_MODE_RELEASE, "UART2"); | 139 | return 0; |
116 | } | 140 | } |
117 | 141 | ||
118 | static struct imxuart_platform_data uart_pdata[] = { | 142 | static struct imxuart_platform_data uart_pdata[] = { |
@@ -155,29 +179,47 @@ static int mxc_fec_pins[] = { | |||
155 | static void gpio_fec_active(void) | 179 | static void gpio_fec_active(void) |
156 | { | 180 | { |
157 | mxc_gpio_setup_multiple_pins(mxc_fec_pins, | 181 | mxc_gpio_setup_multiple_pins(mxc_fec_pins, |
158 | ARRAY_SIZE(mxc_fec_pins), | 182 | ARRAY_SIZE(mxc_fec_pins), "FEC"); |
159 | MXC_GPIO_ALLOC_MODE_NORMAL, "FEC"); | ||
160 | } | 183 | } |
161 | 184 | ||
162 | static void gpio_fec_inactive(void) | 185 | static void gpio_fec_inactive(void) |
163 | { | 186 | { |
164 | mxc_gpio_setup_multiple_pins(mxc_fec_pins, | 187 | mxc_gpio_release_multiple_pins(mxc_fec_pins, |
165 | ARRAY_SIZE(mxc_fec_pins), | 188 | ARRAY_SIZE(mxc_fec_pins)); |
166 | MXC_GPIO_ALLOC_MODE_RELEASE, "FEC"); | ||
167 | } | 189 | } |
168 | 190 | ||
191 | static struct mxc_nand_platform_data pcm038_nand_board_info = { | ||
192 | .width = 1, | ||
193 | .hw_ecc = 1, | ||
194 | }; | ||
195 | |||
169 | static struct platform_device *platform_devices[] __initdata = { | 196 | static struct platform_device *platform_devices[] __initdata = { |
170 | &pcm038_nor_mtd_device, | 197 | &pcm038_nor_mtd_device, |
198 | &mxc_w1_master_device, | ||
199 | &pcm038_sram_mtd_device, | ||
171 | }; | 200 | }; |
172 | 201 | ||
202 | /* On pcm038 there's a sram attached to CS1, we enable the chipselect here and | ||
203 | * setup other stuffs to access the sram. */ | ||
204 | static void __init pcm038_init_sram(void) | ||
205 | { | ||
206 | __raw_writel(0x0000d843, CSCR_U(1)); | ||
207 | __raw_writel(0x22252521, CSCR_L(1)); | ||
208 | __raw_writel(0x22220a00, CSCR_A(1)); | ||
209 | } | ||
210 | |||
173 | static void __init pcm038_init(void) | 211 | static void __init pcm038_init(void) |
174 | { | 212 | { |
175 | gpio_fec_active(); | 213 | gpio_fec_active(); |
214 | pcm038_init_sram(); | ||
176 | 215 | ||
177 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); | 216 | mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); |
178 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); | 217 | mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); |
179 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); | 218 | mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); |
180 | 219 | ||
220 | mxc_gpio_mode(PE16_AF_RTCK); /* OWIRE */ | ||
221 | mxc_register_device(&mxc_nand_device, &pcm038_nand_board_info); | ||
222 | |||
181 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); | 223 | platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); |
182 | 224 | ||
183 | #ifdef CONFIG_MACH_PCM970_BASEBOARD | 225 | #ifdef CONFIG_MACH_PCM970_BASEBOARD |
diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig index db9431dee1b4..e79659e8176e 100644 --- a/arch/arm/mach-mx3/Kconfig +++ b/arch/arm/mach-mx3/Kconfig | |||
@@ -21,5 +21,19 @@ config MACH_MX31LITE | |||
21 | Include support for MX31 LITEKIT platform. This includes specific | 21 | Include support for MX31 LITEKIT platform. This includes specific |
22 | configurations for the board and its peripherals. | 22 | configurations for the board and its peripherals. |
23 | 23 | ||
24 | config MACH_MX31_3DS | ||
25 | bool "Support MX31PDK (3DS)" | ||
26 | default n | ||
27 | help | ||
28 | Include support for MX31PDK (3DS) platform. This includes specific | ||
29 | configurations for the board and its peripherals. | ||
30 | |||
31 | config MACH_MX31MOBOARD | ||
32 | bool "Support mx31moboard platforms (EPFL Mobots group)" | ||
33 | default n | ||
34 | help | ||
35 | Include support for mx31moboard platform. This includes specific | ||
36 | configurations for the board and its peripherals. | ||
37 | |||
24 | endmenu | 38 | endmenu |
25 | 39 | ||
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile index 8b21abb71fb0..5a151540fe83 100644 --- a/arch/arm/mach-mx3/Makefile +++ b/arch/arm/mach-mx3/Makefile | |||
@@ -8,3 +8,5 @@ obj-y := mm.o clock.o devices.o iomux.o | |||
8 | obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o | 8 | obj-$(CONFIG_MACH_MX31ADS) += mx31ads.o |
9 | obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o | 9 | obj-$(CONFIG_MACH_MX31LITE) += mx31lite.o |
10 | obj-$(CONFIG_MACH_PCM037) += pcm037.o | 10 | obj-$(CONFIG_MACH_PCM037) += pcm037.o |
11 | obj-$(CONFIG_MACH_MX31_3DS) += mx31pdk.o | ||
12 | obj-$(CONFIG_MACH_MX31MOBOARD) += mx31moboard.o | ||
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c index 9f14a871ee7c..b1746aae1f89 100644 --- a/arch/arm/mach-mx3/clock.c +++ b/arch/arm/mach-mx3/clock.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <mach/clock.h> | 26 | #include <mach/clock.h> |
27 | #include <mach/hardware.h> | ||
27 | #include <asm/div64.h> | 28 | #include <asm/div64.h> |
28 | 29 | ||
29 | #include "crm_regs.h" | 30 | #include "crm_regs.h" |
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c index a6bdcc07f3c9..1d46cb4adf96 100644 --- a/arch/arm/mach-mx3/devices.c +++ b/arch/arm/mach-mx3/devices.c | |||
@@ -125,19 +125,19 @@ static struct mxc_gpio_port imx_gpio_ports[] = { | |||
125 | .chip.label = "gpio-0", | 125 | .chip.label = "gpio-0", |
126 | .base = IO_ADDRESS(GPIO1_BASE_ADDR), | 126 | .base = IO_ADDRESS(GPIO1_BASE_ADDR), |
127 | .irq = MXC_INT_GPIO1, | 127 | .irq = MXC_INT_GPIO1, |
128 | .virtual_irq_start = MXC_GPIO_INT_BASE | 128 | .virtual_irq_start = MXC_GPIO_IRQ_START, |
129 | }, | 129 | }, |
130 | [1] = { | 130 | [1] = { |
131 | .chip.label = "gpio-1", | 131 | .chip.label = "gpio-1", |
132 | .base = IO_ADDRESS(GPIO2_BASE_ADDR), | 132 | .base = IO_ADDRESS(GPIO2_BASE_ADDR), |
133 | .irq = MXC_INT_GPIO2, | 133 | .irq = MXC_INT_GPIO2, |
134 | .virtual_irq_start = MXC_GPIO_INT_BASE + GPIO_NUM_PIN | 134 | .virtual_irq_start = MXC_GPIO_IRQ_START + 32, |
135 | }, | 135 | }, |
136 | [2] = { | 136 | [2] = { |
137 | .chip.label = "gpio-2", | 137 | .chip.label = "gpio-2", |
138 | .base = IO_ADDRESS(GPIO3_BASE_ADDR), | 138 | .base = IO_ADDRESS(GPIO3_BASE_ADDR), |
139 | .irq = MXC_INT_GPIO3, | 139 | .irq = MXC_INT_GPIO3, |
140 | .virtual_irq_start = MXC_GPIO_INT_BASE + GPIO_NUM_PIN * 2 | 140 | .virtual_irq_start = MXC_GPIO_IRQ_START + 64, |
141 | } | 141 | } |
142 | }; | 142 | }; |
143 | 143 | ||
@@ -145,3 +145,37 @@ int __init mxc_register_gpios(void) | |||
145 | { | 145 | { |
146 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); | 146 | return mxc_gpio_init(imx_gpio_ports, ARRAY_SIZE(imx_gpio_ports)); |
147 | } | 147 | } |
148 | |||
149 | static struct resource mxc_w1_master_resources[] = { | ||
150 | { | ||
151 | .start = OWIRE_BASE_ADDR, | ||
152 | .end = OWIRE_BASE_ADDR + SZ_4K - 1, | ||
153 | .flags = IORESOURCE_MEM, | ||
154 | }, | ||
155 | }; | ||
156 | |||
157 | struct platform_device mxc_w1_master_device = { | ||
158 | .name = "mxc_w1", | ||
159 | .id = 0, | ||
160 | .num_resources = ARRAY_SIZE(mxc_w1_master_resources), | ||
161 | .resource = mxc_w1_master_resources, | ||
162 | }; | ||
163 | |||
164 | static struct resource mxc_nand_resources[] = { | ||
165 | { | ||
166 | .start = NFC_BASE_ADDR, | ||
167 | .end = NFC_BASE_ADDR + 0xfff, | ||
168 | .flags = IORESOURCE_MEM | ||
169 | }, { | ||
170 | .start = MXC_INT_NANDFC, | ||
171 | .end = MXC_INT_NANDFC, | ||
172 | .flags = IORESOURCE_IRQ | ||
173 | }, | ||
174 | }; | ||
175 | |||
176 | struct platform_device mxc_nand_device = { | ||
177 | .name = "mxc_nand", | ||
178 | .id = 0, | ||
179 | .num_resources = ARRAY_SIZE(mxc_nand_resources), | ||
180 | .resource = mxc_nand_resources, | ||
181 | }; | ||
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h index 4dc03f9e6001..9949ef4e0694 100644 --- a/arch/arm/mach-mx3/devices.h +++ b/arch/arm/mach-mx3/devices.h | |||
@@ -4,3 +4,5 @@ extern struct platform_device mxc_uart_device1; | |||
4 | extern struct platform_device mxc_uart_device2; | 4 | extern struct platform_device mxc_uart_device2; |
5 | extern struct platform_device mxc_uart_device3; | 5 | extern struct platform_device mxc_uart_device3; |
6 | extern struct platform_device mxc_uart_device4; | 6 | extern struct platform_device mxc_uart_device4; |
7 | extern struct platform_device mxc_w1_master_device; | ||
8 | extern struct platform_device mxc_nand_device; | ||
diff --git a/arch/arm/mach-mx3/iomux.c b/arch/arm/mach-mx3/iomux.c index 6e664be8cc13..7a5088b519a8 100644 --- a/arch/arm/mach-mx3/iomux.c +++ b/arch/arm/mach-mx3/iomux.c | |||
@@ -74,17 +74,18 @@ void mxc_iomux_set_pad(enum iomux_pins pin, u32 config) | |||
74 | u32 field, l; | 74 | u32 field, l; |
75 | void __iomem *reg; | 75 | void __iomem *reg; |
76 | 76 | ||
77 | reg = IOMUXSW_PAD_CTL + (pin + 2) / 3; | 77 | pin &= IOMUX_PADNUM_MASK; |
78 | reg = IOMUXSW_PAD_CTL + (pin + 2) / 3 * 4; | ||
78 | field = (pin + 2) % 3; | 79 | field = (pin + 2) % 3; |
79 | 80 | ||
80 | pr_debug("%s: reg offset = 0x%x field = %d\n", | 81 | pr_debug("%s: reg offset = 0x%x, field = %d\n", |
81 | __func__, (pin + 2) / 3, field); | 82 | __func__, (pin + 2) / 3, field); |
82 | 83 | ||
83 | spin_lock(&gpio_mux_lock); | 84 | spin_lock(&gpio_mux_lock); |
84 | 85 | ||
85 | l = __raw_readl(reg); | 86 | l = __raw_readl(reg); |
86 | l &= ~(0x1ff << (field * 9)); | 87 | l &= ~(0x1ff << (field * 10)); |
87 | l |= config << (field * 9); | 88 | l |= config << (field * 10); |
88 | __raw_writel(l, reg); | 89 | __raw_writel(l, reg); |
89 | 90 | ||
90 | spin_unlock(&gpio_mux_lock); | 91 | spin_unlock(&gpio_mux_lock); |
diff --git a/arch/arm/mach-mx3/mx31moboard.c b/arch/arm/mach-mx3/mx31moboard.c new file mode 100644 index 000000000000..c29098af7394 --- /dev/null +++ b/arch/arm/mach-mx3/mx31moboard.c | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2008 Valentin Longchamp, EPFL Mobots group | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | #include <linux/init.h> | ||
21 | |||
22 | #include <linux/platform_device.h> | ||
23 | #include <linux/mtd/physmap.h> | ||
24 | #include <linux/mtd/partitions.h> | ||
25 | #include <linux/memory.h> | ||
26 | |||
27 | #include <mach/hardware.h> | ||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/time.h> | ||
31 | #include <asm/mach/map.h> | ||
32 | #include <mach/common.h> | ||
33 | #include <mach/imx-uart.h> | ||
34 | #include <mach/iomux-mx3.h> | ||
35 | |||
36 | #include "devices.h" | ||
37 | |||
38 | static struct physmap_flash_data mx31moboard_flash_data = { | ||
39 | .width = 2, | ||
40 | }; | ||
41 | |||
42 | static struct resource mx31moboard_flash_resource = { | ||
43 | .start = 0xa0000000, | ||
44 | .end = 0xa1ffffff, | ||
45 | .flags = IORESOURCE_MEM, | ||
46 | }; | ||
47 | |||
48 | static struct platform_device mx31moboard_flash = { | ||
49 | .name = "physmap-flash", | ||
50 | .id = 0, | ||
51 | .dev = { | ||
52 | .platform_data = &mx31moboard_flash_data, | ||
53 | }, | ||
54 | .resource = &mx31moboard_flash_resource, | ||
55 | .num_resources = 1, | ||
56 | }; | ||
57 | |||
58 | static struct imxuart_platform_data uart_pdata = { | ||
59 | .flags = IMXUART_HAVE_RTSCTS, | ||
60 | }; | ||
61 | |||
62 | static struct platform_device *devices[] __initdata = { | ||
63 | &mx31moboard_flash, | ||
64 | }; | ||
65 | |||
66 | /* | ||
67 | * Board specific initialization. | ||
68 | */ | ||
69 | static void __init mxc_board_init(void) | ||
70 | { | ||
71 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
72 | |||
73 | mxc_iomux_mode(MX31_PIN_CTS1__CTS1); | ||
74 | mxc_iomux_mode(MX31_PIN_RTS1__RTS1); | ||
75 | mxc_iomux_mode(MX31_PIN_TXD1__TXD1); | ||
76 | mxc_iomux_mode(MX31_PIN_RXD1__RXD1); | ||
77 | |||
78 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
79 | |||
80 | mxc_iomux_mode(MX31_PIN_CTS2__CTS2); | ||
81 | mxc_iomux_mode(MX31_PIN_RTS2__RTS2); | ||
82 | mxc_iomux_mode(MX31_PIN_TXD2__TXD2); | ||
83 | mxc_iomux_mode(MX31_PIN_RXD2__RXD2); | ||
84 | |||
85 | mxc_register_device(&mxc_uart_device1, &uart_pdata); | ||
86 | |||
87 | mxc_iomux_mode(MX31_PIN_PC_RST__CTS5); | ||
88 | mxc_iomux_mode(MX31_PIN_PC_VS2__RTS5); | ||
89 | mxc_iomux_mode(MX31_PIN_PC_BVD2__TXD5); | ||
90 | mxc_iomux_mode(MX31_PIN_PC_BVD1__RXD5); | ||
91 | |||
92 | mxc_register_device(&mxc_uart_device4, &uart_pdata); | ||
93 | } | ||
94 | |||
95 | /* | ||
96 | * This structure defines static mappings for the mx31moboard. | ||
97 | */ | ||
98 | static struct map_desc mx31moboard_io_desc[] __initdata = { | ||
99 | { | ||
100 | .virtual = AIPS1_BASE_ADDR_VIRT, | ||
101 | .pfn = __phys_to_pfn(AIPS1_BASE_ADDR), | ||
102 | .length = AIPS1_SIZE, | ||
103 | .type = MT_DEVICE_NONSHARED | ||
104 | }, { | ||
105 | .virtual = AIPS2_BASE_ADDR_VIRT, | ||
106 | .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), | ||
107 | .length = AIPS2_SIZE, | ||
108 | .type = MT_DEVICE_NONSHARED | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | /* | ||
113 | * Set up static virtual mappings. | ||
114 | */ | ||
115 | void __init mx31moboard_map_io(void) | ||
116 | { | ||
117 | mxc_map_io(); | ||
118 | iotable_init(mx31moboard_io_desc, ARRAY_SIZE(mx31moboard_io_desc)); | ||
119 | } | ||
120 | |||
121 | static void __init mx31moboard_timer_init(void) | ||
122 | { | ||
123 | mxc_clocks_init(26000000); | ||
124 | mxc_timer_init("ipg_clk.0"); | ||
125 | } | ||
126 | |||
127 | struct sys_timer mx31moboard_timer = { | ||
128 | .init = mx31moboard_timer_init, | ||
129 | }; | ||
130 | |||
131 | MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard") | ||
132 | /* Maintainer: Valentin Longchamp, EPFL Mobots group */ | ||
133 | .phys_io = AIPS1_BASE_ADDR, | ||
134 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
135 | .boot_params = PHYS_OFFSET + 0x100, | ||
136 | .map_io = mx31moboard_map_io, | ||
137 | .init_irq = mxc_init_irq, | ||
138 | .init_machine = mxc_board_init, | ||
139 | .timer = &mx31moboard_timer, | ||
140 | MACHINE_END | ||
141 | |||
diff --git a/arch/arm/mach-mx3/mx31pdk.c b/arch/arm/mach-mx3/mx31pdk.c new file mode 100644 index 000000000000..d464d068a4a6 --- /dev/null +++ b/arch/arm/mach-mx3/mx31pdk.c | |||
@@ -0,0 +1,115 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License as published by | ||
6 | * the Free Software Foundation; either version 2 of the License, or | ||
7 | * (at your option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | * GNU General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License | ||
15 | * along with this program; if not, write to the Free Software | ||
16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
17 | */ | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/clk.h> | ||
22 | #include <linux/irq.h> | ||
23 | |||
24 | #include <mach/hardware.h> | ||
25 | #include <asm/mach-types.h> | ||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/time.h> | ||
28 | #include <asm/memory.h> | ||
29 | #include <asm/mach/map.h> | ||
30 | #include <mach/common.h> | ||
31 | #include <mach/board-mx31pdk.h> | ||
32 | #include <mach/imx-uart.h> | ||
33 | #include <mach/iomux-mx3.h> | ||
34 | #include "devices.h" | ||
35 | |||
36 | /*! | ||
37 | * @file mx31pdk.c | ||
38 | * | ||
39 | * @brief This file contains the board-specific initialization routines. | ||
40 | * | ||
41 | * @ingroup System | ||
42 | */ | ||
43 | |||
44 | static struct imxuart_platform_data uart_pdata = { | ||
45 | .flags = IMXUART_HAVE_RTSCTS, | ||
46 | }; | ||
47 | |||
48 | static inline void mxc_init_imx_uart(void) | ||
49 | { | ||
50 | mxc_iomux_mode(MX31_PIN_CTS1__CTS1); | ||
51 | mxc_iomux_mode(MX31_PIN_RTS1__RTS1); | ||
52 | mxc_iomux_mode(MX31_PIN_TXD1__TXD1); | ||
53 | mxc_iomux_mode(MX31_PIN_RXD1__RXD1); | ||
54 | |||
55 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | ||
56 | } | ||
57 | |||
58 | /*! | ||
59 | * This structure defines static mappings for the i.MX31PDK board. | ||
60 | */ | ||
61 | static struct map_desc mx31pdk_io_desc[] __initdata = { | ||
62 | { | ||
63 | .virtual = AIPS1_BASE_ADDR_VIRT, | ||
64 | .pfn = __phys_to_pfn(AIPS1_BASE_ADDR), | ||
65 | .length = AIPS1_SIZE, | ||
66 | .type = MT_DEVICE_NONSHARED | ||
67 | }, { | ||
68 | .virtual = AIPS2_BASE_ADDR_VIRT, | ||
69 | .pfn = __phys_to_pfn(AIPS2_BASE_ADDR), | ||
70 | .length = AIPS2_SIZE, | ||
71 | .type = MT_DEVICE_NONSHARED | ||
72 | }, | ||
73 | }; | ||
74 | |||
75 | /*! | ||
76 | * Set up static virtual mappings. | ||
77 | */ | ||
78 | static void __init mx31pdk_map_io(void) | ||
79 | { | ||
80 | mxc_map_io(); | ||
81 | iotable_init(mx31pdk_io_desc, ARRAY_SIZE(mx31pdk_io_desc)); | ||
82 | } | ||
83 | |||
84 | /*! | ||
85 | * Board specific initialization. | ||
86 | */ | ||
87 | static void __init mxc_board_init(void) | ||
88 | { | ||
89 | mxc_init_imx_uart(); | ||
90 | } | ||
91 | |||
92 | static void __init mx31pdk_timer_init(void) | ||
93 | { | ||
94 | mxc_clocks_init(26000000); | ||
95 | mxc_timer_init("ipg_clk.0"); | ||
96 | } | ||
97 | |||
98 | static struct sys_timer mx31pdk_timer = { | ||
99 | .init = mx31pdk_timer_init, | ||
100 | }; | ||
101 | |||
102 | /* | ||
103 | * The following uses standard kernel macros defined in arch.h in order to | ||
104 | * initialize __mach_desc_MX31PDK data structure. | ||
105 | */ | ||
106 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") | ||
107 | /* Maintainer: Freescale Semiconductor, Inc. */ | ||
108 | .phys_io = AIPS1_BASE_ADDR, | ||
109 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, | ||
110 | .boot_params = PHYS_OFFSET + 0x100, | ||
111 | .map_io = mx31pdk_map_io, | ||
112 | .init_irq = mxc_init_irq, | ||
113 | .init_machine = mxc_board_init, | ||
114 | .timer = &mx31pdk_timer, | ||
115 | MACHINE_END | ||
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index 843f68c8ead1..8cea82587222 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -21,7 +21,11 @@ | |||
21 | 21 | ||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/mtd/plat-ram.h> | ||
24 | #include <linux/memory.h> | 25 | #include <linux/memory.h> |
26 | #include <linux/gpio.h> | ||
27 | #include <linux/smc911x.h> | ||
28 | #include <linux/interrupt.h> | ||
25 | 29 | ||
26 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
27 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
@@ -32,6 +36,7 @@ | |||
32 | #include <mach/imx-uart.h> | 36 | #include <mach/imx-uart.h> |
33 | #include <mach/iomux-mx3.h> | 37 | #include <mach/iomux-mx3.h> |
34 | #include <mach/board-pcm037.h> | 38 | #include <mach/board-pcm037.h> |
39 | #include <mach/mxc_nand.h> | ||
35 | 40 | ||
36 | #include "devices.h" | 41 | #include "devices.h" |
37 | 42 | ||
@@ -59,8 +64,63 @@ static struct imxuart_platform_data uart_pdata = { | |||
59 | .flags = IMXUART_HAVE_RTSCTS, | 64 | .flags = IMXUART_HAVE_RTSCTS, |
60 | }; | 65 | }; |
61 | 66 | ||
67 | static struct resource smc911x_resources[] = { | ||
68 | [0] = { | ||
69 | .start = CS1_BASE_ADDR + 0x300, | ||
70 | .end = CS1_BASE_ADDR + 0x300 + SZ_64K - 1, | ||
71 | .flags = IORESOURCE_MEM, | ||
72 | }, | ||
73 | [1] = { | ||
74 | .start = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | ||
75 | .end = IOMUX_TO_IRQ(MX31_PIN_GPIO3_1), | ||
76 | .flags = IORESOURCE_IRQ, | ||
77 | }, | ||
78 | }; | ||
79 | |||
80 | static struct smc911x_platdata smc911x_info = { | ||
81 | .flags = SMC911X_USE_32BIT, | ||
82 | .irq_flags = IRQF_SHARED | IRQF_TRIGGER_LOW, | ||
83 | }; | ||
84 | |||
85 | static struct platform_device pcm037_eth = { | ||
86 | .name = "smc911x", | ||
87 | .id = -1, | ||
88 | .num_resources = ARRAY_SIZE(smc911x_resources), | ||
89 | .resource = smc911x_resources, | ||
90 | .dev = { | ||
91 | .platform_data = &smc911x_info, | ||
92 | }, | ||
93 | }; | ||
94 | |||
95 | static struct platdata_mtd_ram pcm038_sram_data = { | ||
96 | .bankwidth = 2, | ||
97 | }; | ||
98 | |||
99 | static struct resource pcm038_sram_resource = { | ||
100 | .start = CS4_BASE_ADDR, | ||
101 | .end = CS4_BASE_ADDR + 512 * 1024 - 1, | ||
102 | .flags = IORESOURCE_MEM, | ||
103 | }; | ||
104 | |||
105 | static struct platform_device pcm037_sram_device = { | ||
106 | .name = "mtd-ram", | ||
107 | .id = 0, | ||
108 | .dev = { | ||
109 | .platform_data = &pcm038_sram_data, | ||
110 | }, | ||
111 | .num_resources = 1, | ||
112 | .resource = &pcm038_sram_resource, | ||
113 | }; | ||
114 | |||
115 | static struct mxc_nand_platform_data pcm037_nand_board_info = { | ||
116 | .width = 1, | ||
117 | .hw_ecc = 1, | ||
118 | }; | ||
119 | |||
62 | static struct platform_device *devices[] __initdata = { | 120 | static struct platform_device *devices[] __initdata = { |
63 | &pcm037_flash, | 121 | &pcm037_flash, |
122 | &pcm037_eth, | ||
123 | &pcm037_sram_device, | ||
64 | }; | 124 | }; |
65 | 125 | ||
66 | /* | 126 | /* |
@@ -81,6 +141,16 @@ static void __init mxc_board_init(void) | |||
81 | mxc_iomux_mode(MX31_PIN_CSPI3_MISO__TXD3); | 141 | mxc_iomux_mode(MX31_PIN_CSPI3_MISO__TXD3); |
82 | 142 | ||
83 | mxc_register_device(&mxc_uart_device2, &uart_pdata); | 143 | mxc_register_device(&mxc_uart_device2, &uart_pdata); |
144 | |||
145 | mxc_iomux_mode(MX31_PIN_BATT_LINE__OWIRE); | ||
146 | mxc_register_device(&mxc_w1_master_device, NULL); | ||
147 | |||
148 | /* SMSC9215 IRQ pin */ | ||
149 | mxc_iomux_mode(IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO)); | ||
150 | if (!gpio_request(MX31_PIN_GPIO3_1, "pcm037-eth")) | ||
151 | gpio_direction_input(MX31_PIN_GPIO3_1); | ||
152 | |||
153 | mxc_register_device(&mxc_nand_device, &pcm037_nand_board_info); | ||
84 | } | 154 | } |
85 | 155 | ||
86 | /* | 156 | /* |
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c index 24c79650f9f3..8f1f992f002e 100644 --- a/arch/arm/mach-netx/fb.c +++ b/arch/arm/mach-netx/fb.c | |||
@@ -22,14 +22,11 @@ | |||
22 | #include <linux/dma-mapping.h> | 22 | #include <linux/dma-mapping.h> |
23 | #include <linux/amba/bus.h> | 23 | #include <linux/amba/bus.h> |
24 | #include <linux/amba/clcd.h> | 24 | #include <linux/amba/clcd.h> |
25 | #include <linux/err.h> | ||
25 | 26 | ||
26 | #include <mach/netx-regs.h> | 27 | #include <mach/netx-regs.h> |
27 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
28 | 29 | ||
29 | struct clk {}; | ||
30 | |||
31 | static struct clk fb_clk; | ||
32 | |||
33 | static struct clcd_panel *netx_panel; | 30 | static struct clcd_panel *netx_panel; |
34 | 31 | ||
35 | void netx_clcd_enable(struct clcd_fb *fb) | 32 | void netx_clcd_enable(struct clcd_fb *fb) |
@@ -85,7 +82,7 @@ int clk_enable(struct clk *clk) | |||
85 | 82 | ||
86 | struct clk *clk_get(struct device *dev, const char *id) | 83 | struct clk *clk_get(struct device *dev, const char *id) |
87 | { | 84 | { |
88 | return &fb_clk; | 85 | return dev && strcmp(dev_name(dev), "fb") == 0 ? NULL : ERR_PTR(-ENOENT); |
89 | } | 86 | } |
90 | 87 | ||
91 | void clk_put(struct clk *clk) | 88 | void clk_put(struct clk *clk) |
diff --git a/arch/arm/mach-netx/include/mach/dma.h b/arch/arm/mach-netx/include/mach/dma.h deleted file mode 100644 index 690b3ebc43ac..000000000000 --- a/arch/arm/mach-netx/include/mach/dma.h +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-netx/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #define MAX_DMA_CHANNELS 0 | ||
21 | #define MAX_DMA_ADDRESS ~0 | ||
diff --git a/arch/arm/mach-netx/include/mach/io.h b/arch/arm/mach-netx/include/mach/io.h index 468b92a82585..c3921cb3b6a6 100644 --- a/arch/arm/mach-netx/include/mach/io.h +++ b/arch/arm/mach-netx/include/mach/io.h | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffffffff | 23 | #define IO_SPACE_LIMIT 0xffffffff |
24 | 24 | ||
25 | #define __io(a) ((void __iomem *)(a)) | 25 | #define __io(a) __typesafe_io(a) |
26 | #define __mem_pci(a) (a) | 26 | #define __mem_pci(a) (a) |
27 | 27 | ||
28 | #endif | 28 | #endif |
diff --git a/arch/arm/mach-netx/include/mach/memory.h b/arch/arm/mach-netx/include/mach/memory.h index 53745a1378de..9a363f297f90 100644 --- a/arch/arm/mach-netx/include/mach/memory.h +++ b/arch/arm/mach-netx/include/mach/memory.h | |||
@@ -22,15 +22,5 @@ | |||
22 | 22 | ||
23 | #define PHYS_OFFSET UL(0x80000000) | 23 | #define PHYS_OFFSET UL(0x80000000) |
24 | 24 | ||
25 | /* | ||
26 | * Virtual view <-> DMA view memory address translations | ||
27 | * virt_to_bus: Used to translate the virtual address to an | ||
28 | * address suitable to be passed to set_dma_addr | ||
29 | * bus_to_virt: Used to convert an address for DMA operations | ||
30 | * to an address that the kernel can use. | ||
31 | */ | ||
32 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
33 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
34 | |||
35 | #endif | 25 | #endif |
36 | 26 | ||
diff --git a/arch/arm/mach-netx/include/mach/netx-regs.h b/arch/arm/mach-netx/include/mach/netx-regs.h index 5104a00d40f4..08c60ff227be 100644 --- a/arch/arm/mach-netx/include/mach/netx-regs.h +++ b/arch/arm/mach-netx/include/mach/netx-regs.h | |||
@@ -328,6 +328,28 @@ | |||
328 | #define NETX_PFIFO_FILL_LEVEL(pfifo) NETX_PFIFO_REG(0x180 + ((pfifo)<<2)) | 328 | #define NETX_PFIFO_FILL_LEVEL(pfifo) NETX_PFIFO_REG(0x180 + ((pfifo)<<2)) |
329 | #define NETX_PFIFO_XPEC_ISR(xpec) NETX_PFIFO_REG(0x400 + ((xpec) << 2)) | 329 | #define NETX_PFIFO_XPEC_ISR(xpec) NETX_PFIFO_REG(0x400 + ((xpec) << 2)) |
330 | 330 | ||
331 | |||
332 | /******************************* | ||
333 | * Memory Controller * | ||
334 | *******************************/ | ||
335 | |||
336 | /* Registers */ | ||
337 | #define NETX_MEMCR_REG(ofs) __io(NETX_VA_MEMCR + (ofs)) | ||
338 | #define NETX_MEMCR_SRAM_CTRL(cs) NETX_MEMCR_REG(0x0 + 4 * (cs)) /* SRAM for CS 0..2 */ | ||
339 | #define NETX_MEMCR_SDRAM_CFG_CTRL NETX_MEMCR_REG(0x40) | ||
340 | #define NETX_MEMCR_SDRAM_TIMING_CTRL NETX_MEMCR_REG(0x44) | ||
341 | #define NETX_MEMCR_SDRAM_MODE NETX_MEMCR_REG(0x48) | ||
342 | #define NETX_MEMCR_SDRAM_EXT_MODE NETX_MEMCR_REG(0x4c) | ||
343 | #define NETX_MEMCR_PRIO_TIMESLOT_CTRL NETX_MEMCR_REG(0x80) | ||
344 | #define NETX_MEMCR_PRIO_ACCESS_CTRL NETX_MEMCR_REG(0x84) | ||
345 | |||
346 | /* Bits */ | ||
347 | #define NETX_MEMCR_SRAM_CTRL_WIDTHEXTMEM(x) (((x) & 0x3) << 24) | ||
348 | #define NETX_MEMCR_SRAM_CTRL_WSPOSTPAUSEEXTMEM(x) (((x) & 0x3) << 16) | ||
349 | #define NETX_MEMCR_SRAM_CTRL_WSPREPASEEXTMEM(x) (((x) & 0x3) << 8) | ||
350 | #define NETX_MEMCR_SRAM_CTRL_WSEXTMEM(x) (((x) & 0x1f) << 0) | ||
351 | |||
352 | |||
331 | /******************************* | 353 | /******************************* |
332 | * Dual Port Memory * | 354 | * Dual Port Memory * |
333 | *******************************/ | 355 | *******************************/ |
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c index 7c540c1f01fa..d51d627ce7cf 100644 --- a/arch/arm/mach-netx/time.c +++ b/arch/arm/mach-netx/time.c | |||
@@ -21,43 +21,100 @@ | |||
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/clocksource.h> | 23 | #include <linux/clocksource.h> |
24 | #include <linux/clockchips.h> | ||
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
25 | 26 | ||
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <asm/mach/time.h> | 28 | #include <asm/mach/time.h> |
28 | #include <mach/netx-regs.h> | 29 | #include <mach/netx-regs.h> |
29 | 30 | ||
31 | #define TIMER_CLOCKEVENT 0 | ||
32 | #define TIMER_CLOCKSOURCE 1 | ||
33 | |||
34 | static void netx_set_mode(enum clock_event_mode mode, | ||
35 | struct clock_event_device *clk) | ||
36 | { | ||
37 | u32 tmode; | ||
38 | |||
39 | /* disable timer */ | ||
40 | writel(0, NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKEVENT)); | ||
41 | |||
42 | switch (mode) { | ||
43 | case CLOCK_EVT_MODE_PERIODIC: | ||
44 | writel(LATCH, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKEVENT)); | ||
45 | tmode = NETX_GPIO_COUNTER_CTRL_RST_EN | | ||
46 | NETX_GPIO_COUNTER_CTRL_IRQ_EN | | ||
47 | NETX_GPIO_COUNTER_CTRL_RUN; | ||
48 | break; | ||
49 | |||
50 | case CLOCK_EVT_MODE_ONESHOT: | ||
51 | writel(0, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKEVENT)); | ||
52 | tmode = NETX_GPIO_COUNTER_CTRL_IRQ_EN | | ||
53 | NETX_GPIO_COUNTER_CTRL_RUN; | ||
54 | break; | ||
55 | |||
56 | default: | ||
57 | WARN(1, "%s: unhandled mode %d\n", __func__, mode); | ||
58 | /* fall through */ | ||
59 | |||
60 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
61 | case CLOCK_EVT_MODE_UNUSED: | ||
62 | case CLOCK_EVT_MODE_RESUME: | ||
63 | tmode = 0; | ||
64 | break; | ||
65 | } | ||
66 | |||
67 | writel(tmode, NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKEVENT)); | ||
68 | } | ||
69 | |||
70 | static int netx_set_next_event(unsigned long evt, | ||
71 | struct clock_event_device *clk) | ||
72 | { | ||
73 | writel(0 - evt, NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKEVENT)); | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static struct clock_event_device netx_clockevent = { | ||
78 | .name = "netx-timer" __stringify(TIMER_CLOCKEVENT), | ||
79 | .shift = 32, | ||
80 | .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT, | ||
81 | .set_next_event = netx_set_next_event, | ||
82 | .set_mode = netx_set_mode, | ||
83 | }; | ||
84 | |||
30 | /* | 85 | /* |
31 | * IRQ handler for the timer | 86 | * IRQ handler for the timer |
32 | */ | 87 | */ |
33 | static irqreturn_t | 88 | static irqreturn_t |
34 | netx_timer_interrupt(int irq, void *dev_id) | 89 | netx_timer_interrupt(int irq, void *dev_id) |
35 | { | 90 | { |
36 | timer_tick(); | 91 | struct clock_event_device *evt = &netx_clockevent; |
37 | 92 | ||
38 | /* acknowledge interrupt */ | 93 | /* acknowledge interrupt */ |
39 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ); | 94 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ); |
40 | 95 | ||
96 | evt->event_handler(evt); | ||
97 | |||
41 | return IRQ_HANDLED; | 98 | return IRQ_HANDLED; |
42 | } | 99 | } |
43 | 100 | ||
44 | static struct irqaction netx_timer_irq = { | 101 | static struct irqaction netx_timer_irq = { |
45 | .name = "NetX Timer Tick", | 102 | .name = "NetX Timer Tick", |
46 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | 103 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, |
47 | .handler = netx_timer_interrupt, | 104 | .handler = netx_timer_interrupt, |
48 | }; | 105 | }; |
49 | 106 | ||
50 | cycle_t netx_get_cycles(void) | 107 | cycle_t netx_get_cycles(void) |
51 | { | 108 | { |
52 | return readl(NETX_GPIO_COUNTER_CURRENT(1)); | 109 | return readl(NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE)); |
53 | } | 110 | } |
54 | 111 | ||
55 | static struct clocksource clocksource_netx = { | 112 | static struct clocksource clocksource_netx = { |
56 | .name = "netx_timer", | 113 | .name = "netx_timer", |
57 | .rating = 200, | 114 | .rating = 200, |
58 | .read = netx_get_cycles, | 115 | .read = netx_get_cycles, |
59 | .mask = CLOCKSOURCE_MASK(32), | 116 | .mask = CLOCKSOURCE_MASK(32), |
60 | .shift = 20, | 117 | .shift = 20, |
61 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 118 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
62 | }; | 119 | }; |
63 | 120 | ||
@@ -77,24 +134,37 @@ static void __init netx_timer_init(void) | |||
77 | /* acknowledge interrupt */ | 134 | /* acknowledge interrupt */ |
78 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ); | 135 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ); |
79 | 136 | ||
80 | /* Enable the interrupt in the specific timer register and start timer */ | 137 | /* Enable the interrupt in the specific timer |
138 | * register and start timer | ||
139 | */ | ||
81 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ_ENABLE); | 140 | writel(COUNTER_BIT(0), NETX_GPIO_IRQ_ENABLE); |
82 | writel(NETX_GPIO_COUNTER_CTRL_IRQ_EN | NETX_GPIO_COUNTER_CTRL_RUN, | 141 | writel(NETX_GPIO_COUNTER_CTRL_IRQ_EN | NETX_GPIO_COUNTER_CTRL_RUN, |
83 | NETX_GPIO_COUNTER_CTRL(0)); | 142 | NETX_GPIO_COUNTER_CTRL(0)); |
84 | 143 | ||
85 | setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq); | 144 | setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq); |
86 | 145 | ||
87 | /* Setup timer one for clocksource */ | 146 | /* Setup timer one for clocksource */ |
88 | writel(0, NETX_GPIO_COUNTER_CTRL(1)); | 147 | writel(0, NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE)); |
89 | writel(0, NETX_GPIO_COUNTER_CURRENT(1)); | 148 | writel(0, NETX_GPIO_COUNTER_CURRENT(TIMER_CLOCKSOURCE)); |
90 | writel(0xFFFFFFFF, NETX_GPIO_COUNTER_MAX(1)); | 149 | writel(0xffffffff, NETX_GPIO_COUNTER_MAX(TIMER_CLOCKSOURCE)); |
91 | 150 | ||
92 | writel(NETX_GPIO_COUNTER_CTRL_RUN, | 151 | writel(NETX_GPIO_COUNTER_CTRL_RUN, |
93 | NETX_GPIO_COUNTER_CTRL(1)); | 152 | NETX_GPIO_COUNTER_CTRL(TIMER_CLOCKSOURCE)); |
94 | 153 | ||
95 | clocksource_netx.mult = | 154 | clocksource_netx.mult = |
96 | clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_netx.shift); | 155 | clocksource_hz2mult(CLOCK_TICK_RATE, clocksource_netx.shift); |
97 | clocksource_register(&clocksource_netx); | 156 | clocksource_register(&clocksource_netx); |
157 | |||
158 | netx_clockevent.mult = div_sc(CLOCK_TICK_RATE, NSEC_PER_SEC, | ||
159 | netx_clockevent.shift); | ||
160 | netx_clockevent.max_delta_ns = | ||
161 | clockevent_delta2ns(0xfffffffe, &netx_clockevent); | ||
162 | /* with max_delta_ns >= delta2ns(0x800) the system currently runs fine. | ||
163 | * Adding some safety ... */ | ||
164 | netx_clockevent.min_delta_ns = | ||
165 | clockevent_delta2ns(0xa00, &netx_clockevent); | ||
166 | netx_clockevent.cpumask = cpumask_of_cpu(0); | ||
167 | clockevents_register_device(&netx_clockevent); | ||
98 | } | 168 | } |
99 | 169 | ||
100 | struct sys_timer netx_timer = { | 170 | struct sys_timer netx_timer = { |
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c index 32eabf5dfa4f..8fc6205dc3a5 100644 --- a/arch/arm/mach-netx/xc.c +++ b/arch/arm/mach-netx/xc.c | |||
@@ -92,10 +92,10 @@ static int xc_check_ptr(struct xc *x, unsigned long adr, unsigned int size) | |||
92 | return -1; | 92 | return -1; |
93 | } | 93 | } |
94 | 94 | ||
95 | static int xc_patch(struct xc *x, void *patch, int count) | 95 | static int xc_patch(struct xc *x, const void *patch, int count) |
96 | { | 96 | { |
97 | unsigned int val, adr; | 97 | unsigned int val, adr; |
98 | unsigned int *data = patch; | 98 | const unsigned int *data = patch; |
99 | 99 | ||
100 | int i; | 100 | int i; |
101 | for (i = 0; i < count; i++) { | 101 | for (i = 0; i < count; i++) { |
@@ -117,7 +117,7 @@ int xc_request_firmware(struct xc *x) | |||
117 | struct fw_header *head; | 117 | struct fw_header *head; |
118 | unsigned int size; | 118 | unsigned int size; |
119 | int i; | 119 | int i; |
120 | void *src; | 120 | const void *src; |
121 | unsigned long dst; | 121 | unsigned long dst; |
122 | 122 | ||
123 | sprintf(name, "xc%d.bin", x->no); | 123 | sprintf(name, "xc%d.bin", x->no); |
diff --git a/arch/arm/mach-ns9xxx/include/mach/dma.h b/arch/arm/mach-ns9xxx/include/mach/dma.h deleted file mode 100644 index 3f50d8c9e5c7..000000000000 --- a/arch/arm/mach-ns9xxx/include/mach/dma.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ns9xxx/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2006 by Digi International Inc. | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_DMA_H | ||
12 | #define __ASM_ARCH_DMA_H | ||
13 | |||
14 | #endif /* ifndef __ASM_ARCH_DMA_H */ | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/hardware.h b/arch/arm/mach-ns9xxx/include/mach/hardware.h index 6dbb2030f563..76631128e11c 100644 --- a/arch/arm/mach-ns9xxx/include/mach/hardware.h +++ b/arch/arm/mach-ns9xxx/include/mach/hardware.h | |||
@@ -11,8 +11,6 @@ | |||
11 | #ifndef __ASM_ARCH_HARDWARE_H | 11 | #ifndef __ASM_ARCH_HARDWARE_H |
12 | #define __ASM_ARCH_HARDWARE_H | 12 | #define __ASM_ARCH_HARDWARE_H |
13 | 13 | ||
14 | #include <asm/memory.h> | ||
15 | |||
16 | /* | 14 | /* |
17 | * NetSilicon NS9xxx internal mapping: | 15 | * NetSilicon NS9xxx internal mapping: |
18 | * | 16 | * |
diff --git a/arch/arm/mach-ns9xxx/include/mach/io.h b/arch/arm/mach-ns9xxx/include/mach/io.h index 027bf649645a..f08451d2e1bc 100644 --- a/arch/arm/mach-ns9xxx/include/mach/io.h +++ b/arch/arm/mach-ns9xxx/include/mach/io.h | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | #define IO_SPACE_LIMIT 0xffffffff /* XXX */ | 14 | #define IO_SPACE_LIMIT 0xffffffff /* XXX */ |
15 | 15 | ||
16 | #define __io(a) ((void __iomem *)(a)) | 16 | #define __io(a) __typesafe_io(a) |
17 | #define __mem_pci(a) (a) | 17 | #define __mem_pci(a) (a) |
18 | #define __mem_isa(a) (IO_BASE + (a)) | 18 | #define __mem_isa(a) (IO_BASE + (a)) |
19 | 19 | ||
diff --git a/arch/arm/mach-ns9xxx/include/mach/memory.h b/arch/arm/mach-ns9xxx/include/mach/memory.h index 649ee6235b94..6107193adbfe 100644 --- a/arch/arm/mach-ns9xxx/include/mach/memory.h +++ b/arch/arm/mach-ns9xxx/include/mach/memory.h | |||
@@ -21,7 +21,4 @@ | |||
21 | 21 | ||
22 | #define PHYS_OFFSET UL(0x00000000) | 22 | #define PHYS_OFFSET UL(0x00000000) |
23 | 23 | ||
24 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
25 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
26 | |||
27 | #endif | 24 | #endif |
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig index 79f0b1f8497b..10a301e32434 100644 --- a/arch/arm/mach-omap1/Kconfig +++ b/arch/arm/mach-omap1/Kconfig | |||
@@ -4,16 +4,19 @@ comment "OMAP Core Type" | |||
4 | config ARCH_OMAP730 | 4 | config ARCH_OMAP730 |
5 | depends on ARCH_OMAP1 | 5 | depends on ARCH_OMAP1 |
6 | bool "OMAP730 Based System" | 6 | bool "OMAP730 Based System" |
7 | select CPU_ARM926T | ||
7 | select ARCH_OMAP_OTG | 8 | select ARCH_OMAP_OTG |
8 | 9 | ||
9 | config ARCH_OMAP15XX | 10 | config ARCH_OMAP15XX |
10 | depends on ARCH_OMAP1 | 11 | depends on ARCH_OMAP1 |
11 | default y | 12 | default y |
12 | bool "OMAP15xx Based System" | 13 | bool "OMAP15xx Based System" |
14 | select CPU_ARM925T | ||
13 | 15 | ||
14 | config ARCH_OMAP16XX | 16 | config ARCH_OMAP16XX |
15 | depends on ARCH_OMAP1 | 17 | depends on ARCH_OMAP1 |
16 | bool "OMAP16xx Based System" | 18 | bool "OMAP16xx Based System" |
19 | select CPU_ARM926T | ||
17 | select ARCH_OMAP_OTG | 20 | select ARCH_OMAP_OTG |
18 | 21 | ||
19 | comment "OMAP Board Type" | 22 | comment "OMAP Board Type" |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index db789461fca4..30308294e7c1 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -205,7 +205,7 @@ static struct platform_device *devices[] __initdata = { | |||
205 | 205 | ||
206 | static int nand_dev_ready(struct omap_nand_platform_data *data) | 206 | static int nand_dev_ready(struct omap_nand_platform_data *data) |
207 | { | 207 | { |
208 | return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); | 208 | return gpio_get_value(P2_NAND_RB_GPIO_PIN); |
209 | } | 209 | } |
210 | 210 | ||
211 | static struct omap_uart_config fsample_uart_config __initdata = { | 211 | static struct omap_uart_config fsample_uart_config __initdata = { |
@@ -223,8 +223,9 @@ static struct omap_board_config_kernel fsample_config[] = { | |||
223 | 223 | ||
224 | static void __init omap_fsample_init(void) | 224 | static void __init omap_fsample_init(void) |
225 | { | 225 | { |
226 | if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN))) | 226 | if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
227 | nand_data.dev_ready = nand_dev_ready; | 227 | BUG(); |
228 | nand_data.dev_ready = nand_dev_ready; | ||
228 | 229 | ||
229 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 230 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
230 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 231 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
diff --git a/arch/arm/mach-omap1/board-h2-mmc.c b/arch/arm/mach-omap1/board-h2-mmc.c index ab9ee5820c48..409fa56d0a87 100644 --- a/arch/arm/mach-omap1/board-h2-mmc.c +++ b/arch/arm/mach-omap1/board-h2-mmc.c | |||
@@ -12,90 +12,68 @@ | |||
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/platform_device.h> | ||
16 | |||
17 | #include <linux/i2c/tps65010.h> | ||
18 | |||
15 | #include <mach/mmc.h> | 19 | #include <mach/mmc.h> |
16 | #include <mach/gpio.h> | 20 | #include <mach/gpio.h> |
17 | 21 | ||
18 | #ifdef CONFIG_MMC_OMAP | 22 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
19 | static int slot_cover_open; | ||
20 | static struct device *mmc_device; | ||
21 | 23 | ||
22 | static int h2_mmc_set_power(struct device *dev, int slot, int power_on, | 24 | static int mmc_set_power(struct device *dev, int slot, int power_on, |
23 | int vdd) | 25 | int vdd) |
24 | { | 26 | { |
25 | #ifdef CONFIG_MMC_DEBUG | 27 | if (power_on) |
26 | dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1, | 28 | gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 1); |
27 | power_on ? "on" : "off", vdd); | 29 | else |
28 | #endif | 30 | gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 0); |
29 | if (slot != 0) { | ||
30 | dev_err(dev, "No such slot %d\n", slot + 1); | ||
31 | return -ENODEV; | ||
32 | } | ||
33 | 31 | ||
34 | return 0; | 32 | return 0; |
35 | } | 33 | } |
36 | 34 | ||
37 | static int h2_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode) | 35 | static int mmc_late_init(struct device *dev) |
38 | { | 36 | { |
39 | #ifdef CONFIG_MMC_DEBUG | 37 | int ret; |
40 | dev_dbg(dev, "Set slot %d bus_mode %s\n", slot + 1, | ||
41 | bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull"); | ||
42 | #endif | ||
43 | if (slot != 0) { | ||
44 | dev_err(dev, "No such slot %d\n", slot + 1); | ||
45 | return -ENODEV; | ||
46 | } | ||
47 | 38 | ||
48 | return 0; | 39 | ret = gpio_request(H2_TPS_GPIO_MMC_PWR_EN, "MMC power"); |
49 | } | 40 | if (ret < 0) |
41 | return ret; | ||
50 | 42 | ||
51 | static int h2_mmc_get_cover_state(struct device *dev, int slot) | 43 | gpio_direction_output(H2_TPS_GPIO_MMC_PWR_EN, 0); |
52 | { | ||
53 | BUG_ON(slot != 0); | ||
54 | |||
55 | return slot_cover_open; | ||
56 | } | ||
57 | |||
58 | void h2_mmc_slot_cover_handler(void *arg, int state) | ||
59 | { | ||
60 | if (mmc_device == NULL) | ||
61 | return; | ||
62 | |||
63 | slot_cover_open = state; | ||
64 | omap_mmc_notify_cover_event(mmc_device, 0, state); | ||
65 | } | ||
66 | |||
67 | static int h2_mmc_late_init(struct device *dev) | ||
68 | { | ||
69 | int ret = 0; | ||
70 | |||
71 | mmc_device = dev; | ||
72 | 44 | ||
73 | return ret; | 45 | return ret; |
74 | } | 46 | } |
75 | 47 | ||
76 | static void h2_mmc_cleanup(struct device *dev) | 48 | static void mmc_shutdown(struct device *dev) |
77 | { | 49 | { |
50 | gpio_free(H2_TPS_GPIO_MMC_PWR_EN); | ||
78 | } | 51 | } |
79 | 52 | ||
80 | static struct omap_mmc_platform_data h2_mmc_data = { | 53 | /* |
54 | * H2 could use the following functions tested: | ||
55 | * - mmc_get_cover_state that uses OMAP_MPUIO(1) | ||
56 | * - mmc_get_wp that uses OMAP_MPUIO(3) | ||
57 | */ | ||
58 | static struct omap_mmc_platform_data mmc1_data = { | ||
81 | .nr_slots = 1, | 59 | .nr_slots = 1, |
82 | .switch_slot = NULL, | 60 | .init = mmc_late_init, |
83 | .init = h2_mmc_late_init, | 61 | .shutdown = mmc_shutdown, |
84 | .cleanup = h2_mmc_cleanup, | 62 | .dma_mask = 0xffffffff, |
85 | .slots[0] = { | 63 | .slots[0] = { |
86 | .set_power = h2_mmc_set_power, | 64 | .set_power = mmc_set_power, |
87 | .set_bus_mode = h2_mmc_set_bus_mode, | ||
88 | .get_ro = NULL, | ||
89 | .get_cover_state = h2_mmc_get_cover_state, | ||
90 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | | 65 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | |
91 | MMC_VDD_32_33 | MMC_VDD_33_34, | 66 | MMC_VDD_32_33 | MMC_VDD_33_34, |
92 | .name = "mmcblk", | 67 | .name = "mmcblk", |
93 | }, | 68 | }, |
94 | }; | 69 | }; |
95 | 70 | ||
71 | static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC]; | ||
72 | |||
96 | void __init h2_mmc_init(void) | 73 | void __init h2_mmc_init(void) |
97 | { | 74 | { |
98 | omap_set_mmc_info(1, &h2_mmc_data); | 75 | mmc_data[0] = &mmc1_data; |
76 | omap1_init_mmc(mmc_data, OMAP16XX_NR_MMC); | ||
99 | } | 77 | } |
100 | 78 | ||
101 | #else | 79 | #else |
@@ -104,7 +82,4 @@ void __init h2_mmc_init(void) | |||
104 | { | 82 | { |
105 | } | 83 | } |
106 | 84 | ||
107 | void h2_mmc_slot_cover_handler(void *arg, int state) | ||
108 | { | ||
109 | } | ||
110 | #endif | 85 | #endif |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 3b65914b9141..b240c5f861da 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -250,11 +250,8 @@ static struct platform_device h2_kp_device = { | |||
250 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) | 250 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) |
251 | static int h2_transceiver_mode(struct device *dev, int state) | 251 | static int h2_transceiver_mode(struct device *dev, int state) |
252 | { | 252 | { |
253 | if (state & IR_SIRMODE) | 253 | /* SIR when low, else MIR/FIR when HIGH */ |
254 | omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 0); | 254 | gpio_set_value(H2_IRDA_FIRSEL_GPIO_PIN, !(state & IR_SIRMODE)); |
255 | else /* MIR/FIR */ | ||
256 | omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 1); | ||
257 | |||
258 | return 0; | 255 | return 0; |
259 | } | 256 | } |
260 | #endif | 257 | #endif |
@@ -342,16 +339,31 @@ static struct platform_device *h2_devices[] __initdata = { | |||
342 | 339 | ||
343 | static void __init h2_init_smc91x(void) | 340 | static void __init h2_init_smc91x(void) |
344 | { | 341 | { |
345 | if ((omap_request_gpio(0)) < 0) { | 342 | if (gpio_request(0, "SMC91x irq") < 0) { |
346 | printk("Error requesting gpio 0 for smc91x irq\n"); | 343 | printk("Error requesting gpio 0 for smc91x irq\n"); |
347 | return; | 344 | return; |
348 | } | 345 | } |
349 | } | 346 | } |
350 | 347 | ||
348 | static int tps_setup(struct i2c_client *client, void *context) | ||
349 | { | ||
350 | tps65010_config_vregs1(TPS_LDO2_ENABLE | TPS_VLDO2_3_0V | | ||
351 | TPS_LDO1_ENABLE | TPS_VLDO1_3_0V); | ||
352 | |||
353 | return 0; | ||
354 | } | ||
355 | |||
356 | static struct tps65010_board tps_board = { | ||
357 | .base = H2_TPS_GPIO_BASE, | ||
358 | .outmask = 0x0f, | ||
359 | .setup = tps_setup, | ||
360 | }; | ||
361 | |||
351 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { | 362 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { |
352 | { | 363 | { |
353 | I2C_BOARD_INFO("tps65010", 0x48), | 364 | I2C_BOARD_INFO("tps65010", 0x48), |
354 | .irq = OMAP_GPIO_IRQ(58), | 365 | .irq = OMAP_GPIO_IRQ(58), |
366 | .platform_data = &tps_board, | ||
355 | }, { | 367 | }, { |
356 | I2C_BOARD_INFO("isp1301_omap", 0x2d), | 368 | I2C_BOARD_INFO("isp1301_omap", 0x2d), |
357 | .irq = OMAP_GPIO_IRQ(2), | 369 | .irq = OMAP_GPIO_IRQ(2), |
@@ -381,15 +393,6 @@ static struct omap_usb_config h2_usb_config __initdata = { | |||
381 | .pins[1] = 3, | 393 | .pins[1] = 3, |
382 | }; | 394 | }; |
383 | 395 | ||
384 | static struct omap_mmc_config h2_mmc_config __initdata = { | ||
385 | .mmc[0] = { | ||
386 | .enabled = 1, | ||
387 | .wire4 = 1, | ||
388 | }, | ||
389 | }; | ||
390 | |||
391 | extern struct omap_mmc_platform_data h2_mmc_data; | ||
392 | |||
393 | static struct omap_uart_config h2_uart_config __initdata = { | 396 | static struct omap_uart_config h2_uart_config __initdata = { |
394 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 397 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
395 | }; | 398 | }; |
@@ -400,7 +403,6 @@ static struct omap_lcd_config h2_lcd_config __initdata = { | |||
400 | 403 | ||
401 | static struct omap_board_config_kernel h2_config[] __initdata = { | 404 | static struct omap_board_config_kernel h2_config[] __initdata = { |
402 | { OMAP_TAG_USB, &h2_usb_config }, | 405 | { OMAP_TAG_USB, &h2_usb_config }, |
403 | { OMAP_TAG_MMC, &h2_mmc_config }, | ||
404 | { OMAP_TAG_UART, &h2_uart_config }, | 406 | { OMAP_TAG_UART, &h2_uart_config }, |
405 | { OMAP_TAG_LCD, &h2_lcd_config }, | 407 | { OMAP_TAG_LCD, &h2_lcd_config }, |
406 | }; | 408 | }; |
@@ -409,7 +411,7 @@ static struct omap_board_config_kernel h2_config[] __initdata = { | |||
409 | 411 | ||
410 | static int h2_nand_dev_ready(struct omap_nand_platform_data *data) | 412 | static int h2_nand_dev_ready(struct omap_nand_platform_data *data) |
411 | { | 413 | { |
412 | return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN); | 414 | return gpio_get_value(H2_NAND_RB_GPIO_PIN); |
413 | } | 415 | } |
414 | 416 | ||
415 | static void __init h2_init(void) | 417 | static void __init h2_init(void) |
@@ -428,8 +430,9 @@ static void __init h2_init(void) | |||
428 | 430 | ||
429 | h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; | 431 | h2_nand_resource.end = h2_nand_resource.start = OMAP_CS2B_PHYS; |
430 | h2_nand_resource.end += SZ_4K - 1; | 432 | h2_nand_resource.end += SZ_4K - 1; |
431 | if (!(omap_request_gpio(H2_NAND_RB_GPIO_PIN))) | 433 | if (gpio_request(H2_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
432 | h2_nand_data.dev_ready = h2_nand_dev_ready; | 434 | BUG(); |
435 | gpio_direction_input(H2_NAND_RB_GPIO_PIN); | ||
433 | 436 | ||
434 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 437 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
435 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 438 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
@@ -441,10 +444,10 @@ static void __init h2_init(void) | |||
441 | /* Irda */ | 444 | /* Irda */ |
442 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) | 445 | #if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) |
443 | omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); | 446 | omap_writel(omap_readl(FUNC_MUX_CTRL_A) | 7, FUNC_MUX_CTRL_A); |
444 | if (!(omap_request_gpio(H2_IRDA_FIRSEL_GPIO_PIN))) { | 447 | if (gpio_request(H2_IRDA_FIRSEL_GPIO_PIN, "IRDA mode") < 0) |
445 | omap_set_gpio_direction(H2_IRDA_FIRSEL_GPIO_PIN, 0); | 448 | BUG(); |
446 | h2_irda_data.transceiver_mode = h2_transceiver_mode; | 449 | gpio_direction_output(H2_IRDA_FIRSEL_GPIO_PIN, 0); |
447 | } | 450 | h2_irda_data.transceiver_mode = h2_transceiver_mode; |
448 | #endif | 451 | #endif |
449 | 452 | ||
450 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); | 453 | platform_add_devices(h2_devices, ARRAY_SIZE(h2_devices)); |
diff --git a/arch/arm/mach-omap1/board-h3-mmc.c b/arch/arm/mach-omap1/board-h3-mmc.c index 36085819098c..fdfe793d56f2 100644 --- a/arch/arm/mach-omap1/board-h3-mmc.c +++ b/arch/arm/mach-omap1/board-h3-mmc.c | |||
@@ -12,94 +12,55 @@ | |||
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/platform_device.h> | ||
16 | |||
17 | #include <linux/i2c/tps65010.h> | ||
18 | |||
15 | #include <mach/mmc.h> | 19 | #include <mach/mmc.h> |
16 | #include <mach/gpio.h> | 20 | #include <mach/gpio.h> |
17 | 21 | ||
18 | #ifdef CONFIG_MMC_OMAP | 22 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
19 | static int slot_cover_open; | ||
20 | static struct device *mmc_device; | ||
21 | 23 | ||
22 | static int h3_mmc_set_power(struct device *dev, int slot, int power_on, | 24 | static int mmc_set_power(struct device *dev, int slot, int power_on, |
23 | int vdd) | 25 | int vdd) |
24 | { | 26 | { |
25 | #ifdef CONFIG_MMC_DEBUG | 27 | if (power_on) |
26 | dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1, | 28 | gpio_direction_output(H3_TPS_GPIO_MMC_PWR_EN, 1); |
27 | power_on ? "on" : "off", vdd); | 29 | else |
28 | #endif | 30 | gpio_direction_output(H3_TPS_GPIO_MMC_PWR_EN, 0); |
29 | if (slot != 0) { | ||
30 | dev_err(dev, "No such slot %d\n", slot + 1); | ||
31 | return -ENODEV; | ||
32 | } | ||
33 | 31 | ||
34 | return 0; | 32 | return 0; |
35 | } | 33 | } |
36 | 34 | ||
37 | static int h3_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode) | 35 | /* |
38 | { | 36 | * H3 could use the following functions tested: |
39 | int ret = 0; | 37 | * - mmc_get_cover_state that uses OMAP_MPUIO(1) |
40 | 38 | * - mmc_get_wp that maybe uses OMAP_MPUIO(3) | |
41 | #ifdef CONFIG_MMC_DEBUG | 39 | */ |
42 | dev_dbg(dev, "Set slot %d bus_mode %s\n", slot + 1, | 40 | static struct omap_mmc_platform_data mmc1_data = { |
43 | bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull"); | ||
44 | #endif | ||
45 | if (slot != 0) { | ||
46 | dev_err(dev, "No such slot %d\n", slot + 1); | ||
47 | return -ENODEV; | ||
48 | } | ||
49 | |||
50 | /* Treated on upper level */ | ||
51 | |||
52 | return bus_mode; | ||
53 | } | ||
54 | |||
55 | static int h3_mmc_get_cover_state(struct device *dev, int slot) | ||
56 | { | ||
57 | BUG_ON(slot != 0); | ||
58 | |||
59 | return slot_cover_open; | ||
60 | } | ||
61 | |||
62 | void h3_mmc_slot_cover_handler(void *arg, int state) | ||
63 | { | ||
64 | if (mmc_device == NULL) | ||
65 | return; | ||
66 | |||
67 | slot_cover_open = state; | ||
68 | omap_mmc_notify_cover_event(mmc_device, 0, state); | ||
69 | } | ||
70 | |||
71 | static int h3_mmc_late_init(struct device *dev) | ||
72 | { | ||
73 | int ret = 0; | ||
74 | |||
75 | mmc_device = dev; | ||
76 | |||
77 | return ret; | ||
78 | } | ||
79 | |||
80 | static void h3_mmc_cleanup(struct device *dev) | ||
81 | { | ||
82 | } | ||
83 | |||
84 | static struct omap_mmc_platform_data h3_mmc_data = { | ||
85 | .nr_slots = 1, | 41 | .nr_slots = 1, |
86 | .switch_slot = NULL, | 42 | .dma_mask = 0xffffffff, |
87 | .init = h3_mmc_late_init, | ||
88 | .cleanup = h3_mmc_cleanup, | ||
89 | .slots[0] = { | 43 | .slots[0] = { |
90 | .set_power = h3_mmc_set_power, | 44 | .set_power = mmc_set_power, |
91 | .set_bus_mode = h3_mmc_set_bus_mode, | ||
92 | .get_ro = NULL, | ||
93 | .get_cover_state = h3_mmc_get_cover_state, | ||
94 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | | 45 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | |
95 | MMC_VDD_32_33 | MMC_VDD_33_34, | 46 | MMC_VDD_32_33 | MMC_VDD_33_34, |
96 | .name = "mmcblk", | 47 | .name = "mmcblk", |
97 | }, | 48 | }, |
98 | }; | 49 | }; |
99 | 50 | ||
51 | static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC]; | ||
52 | |||
100 | void __init h3_mmc_init(void) | 53 | void __init h3_mmc_init(void) |
101 | { | 54 | { |
102 | omap_set_mmc_info(1, &h3_mmc_data); | 55 | int ret; |
56 | |||
57 | ret = gpio_request(H3_TPS_GPIO_MMC_PWR_EN, "MMC power"); | ||
58 | if (ret < 0) | ||
59 | return; | ||
60 | gpio_direction_output(H3_TPS_GPIO_MMC_PWR_EN, 0); | ||
61 | |||
62 | mmc_data[0] = &mmc1_data; | ||
63 | omap1_init_mmc(mmc_data, OMAP16XX_NR_MMC); | ||
103 | } | 64 | } |
104 | 65 | ||
105 | #else | 66 | #else |
@@ -108,7 +69,4 @@ void __init h3_mmc_init(void) | |||
108 | { | 69 | { |
109 | } | 70 | } |
110 | 71 | ||
111 | void h3_mmc_slot_cover_handler(void *arg, int state) | ||
112 | { | ||
113 | } | ||
114 | #endif | 72 | #endif |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index adfcd7b51393..5157eea9be35 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -447,15 +447,6 @@ static struct omap_usb_config h3_usb_config __initdata = { | |||
447 | .pins[1] = 3, | 447 | .pins[1] = 3, |
448 | }; | 448 | }; |
449 | 449 | ||
450 | static struct omap_mmc_config h3_mmc_config __initdata = { | ||
451 | .mmc[0] = { | ||
452 | .enabled = 1, | ||
453 | .wire4 = 1, | ||
454 | }, | ||
455 | }; | ||
456 | |||
457 | extern struct omap_mmc_platform_data h3_mmc_data; | ||
458 | |||
459 | static struct omap_uart_config h3_uart_config __initdata = { | 450 | static struct omap_uart_config h3_uart_config __initdata = { |
460 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 451 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
461 | }; | 452 | }; |
@@ -466,7 +457,6 @@ static struct omap_lcd_config h3_lcd_config __initdata = { | |||
466 | 457 | ||
467 | static struct omap_board_config_kernel h3_config[] __initdata = { | 458 | static struct omap_board_config_kernel h3_config[] __initdata = { |
468 | { OMAP_TAG_USB, &h3_usb_config }, | 459 | { OMAP_TAG_USB, &h3_usb_config }, |
469 | { OMAP_TAG_MMC, &h3_mmc_config }, | ||
470 | { OMAP_TAG_UART, &h3_uart_config }, | 460 | { OMAP_TAG_UART, &h3_uart_config }, |
471 | { OMAP_TAG_LCD, &h3_lcd_config }, | 461 | { OMAP_TAG_LCD, &h3_lcd_config }, |
472 | }; | 462 | }; |
@@ -498,7 +488,7 @@ static struct omap_gpio_switch h3_gpio_switches[] __initdata = { | |||
498 | 488 | ||
499 | static int nand_dev_ready(struct omap_nand_platform_data *data) | 489 | static int nand_dev_ready(struct omap_nand_platform_data *data) |
500 | { | 490 | { |
501 | return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN); | 491 | return gpio_get_value(H3_NAND_RB_GPIO_PIN); |
502 | } | 492 | } |
503 | 493 | ||
504 | static void __init h3_init(void) | 494 | static void __init h3_init(void) |
@@ -516,8 +506,9 @@ static void __init h3_init(void) | |||
516 | 506 | ||
517 | nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS; | 507 | nand_resource.end = nand_resource.start = OMAP_CS2B_PHYS; |
518 | nand_resource.end += SZ_4K - 1; | 508 | nand_resource.end += SZ_4K - 1; |
519 | if (!(omap_request_gpio(H3_NAND_RB_GPIO_PIN))) | 509 | if (gpio_request(H3_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
520 | nand_data.dev_ready = nand_dev_ready; | 510 | BUG(); |
511 | nand_data.dev_ready = nand_dev_ready; | ||
521 | 512 | ||
522 | /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */ | 513 | /* GPIO10 Func_MUX_CTRL reg bit 29:27, Configure V2 to mode1 as GPIO */ |
523 | /* GPIO10 pullup/down register, Enable pullup on GPIO10 */ | 514 | /* GPIO10 pullup/down register, Enable pullup on GPIO10 */ |
@@ -537,7 +528,7 @@ static void __init h3_init(void) | |||
537 | static void __init h3_init_smc91x(void) | 528 | static void __init h3_init_smc91x(void) |
538 | { | 529 | { |
539 | omap_cfg_reg(W15_1710_GPIO40); | 530 | omap_cfg_reg(W15_1710_GPIO40); |
540 | if (omap_request_gpio(40) < 0) { | 531 | if (gpio_request(40, "SMC91x irq") < 0) { |
541 | printk("Error requesting gpio 40 for smc91x irq\n"); | 532 | printk("Error requesting gpio 40 for smc91x irq\n"); |
542 | return; | 533 | return; |
543 | } | 534 | } |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index cbc11be5cd2a..af2fb9070083 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <mach/common.h> | 39 | #include <mach/common.h> |
40 | #include <mach/mcbsp.h> | 40 | #include <mach/mcbsp.h> |
41 | #include <mach/omap-alsa.h> | 41 | #include <mach/omap-alsa.h> |
42 | #include <mach/mmc.h> | ||
42 | 43 | ||
43 | static int innovator_keymap[] = { | 44 | static int innovator_keymap[] = { |
44 | KEY(0, 0, KEY_F1), | 45 | KEY(0, 0, KEY_F1), |
@@ -301,7 +302,7 @@ static void __init innovator_init_smc91x(void) | |||
301 | OMAP1510_FPGA_RST); | 302 | OMAP1510_FPGA_RST); |
302 | udelay(750); | 303 | udelay(750); |
303 | } else { | 304 | } else { |
304 | if ((omap_request_gpio(0)) < 0) { | 305 | if (gpio_request(0, "SMC91x irq") < 0) { |
305 | printk("Error requesting gpio 0 for smc91x irq\n"); | 306 | printk("Error requesting gpio 0 for smc91x irq\n"); |
306 | return; | 307 | return; |
307 | } | 308 | } |
@@ -360,16 +361,49 @@ static struct omap_lcd_config innovator1610_lcd_config __initdata = { | |||
360 | }; | 361 | }; |
361 | #endif | 362 | #endif |
362 | 363 | ||
363 | static struct omap_mmc_config innovator_mmc_config __initdata = { | 364 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
364 | .mmc [0] = { | 365 | |
365 | .enabled = 1, | 366 | static int mmc_set_power(struct device *dev, int slot, int power_on, |
366 | .wire4 = 1, | 367 | int vdd) |
367 | .wp_pin = OMAP_MPUIO(3), | 368 | { |
368 | .power_pin = -1, /* FPGA F3 UIO42 */ | 369 | if (power_on) |
369 | .switch_pin = -1, /* FPGA F4 UIO43 */ | 370 | fpga_write(fpga_read(OMAP1510_FPGA_POWER) | (1 << 3), |
371 | OMAP1510_FPGA_POWER); | ||
372 | else | ||
373 | fpga_write(fpga_read(OMAP1510_FPGA_POWER) & ~(1 << 3), | ||
374 | OMAP1510_FPGA_POWER); | ||
375 | |||
376 | return 0; | ||
377 | } | ||
378 | |||
379 | /* | ||
380 | * Innovator could use the following functions tested: | ||
381 | * - mmc_get_wp that uses OMAP_MPUIO(3) | ||
382 | * - mmc_get_cover_state that uses FPGA F4 UIO43 | ||
383 | */ | ||
384 | static struct omap_mmc_platform_data mmc1_data = { | ||
385 | .nr_slots = 1, | ||
386 | .slots[0] = { | ||
387 | .set_power = mmc_set_power, | ||
388 | .wires = 4, | ||
389 | .name = "mmcblk", | ||
370 | }, | 390 | }, |
371 | }; | 391 | }; |
372 | 392 | ||
393 | static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC]; | ||
394 | |||
395 | void __init innovator_mmc_init(void) | ||
396 | { | ||
397 | mmc_data[0] = &mmc1_data; | ||
398 | omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC); | ||
399 | } | ||
400 | |||
401 | #else | ||
402 | static inline void innovator_mmc_init(void) | ||
403 | { | ||
404 | } | ||
405 | #endif | ||
406 | |||
373 | static struct omap_uart_config innovator_uart_config __initdata = { | 407 | static struct omap_uart_config innovator_uart_config __initdata = { |
374 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 408 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
375 | }; | 409 | }; |
@@ -377,7 +411,6 @@ static struct omap_uart_config innovator_uart_config __initdata = { | |||
377 | static struct omap_board_config_kernel innovator_config[] = { | 411 | static struct omap_board_config_kernel innovator_config[] = { |
378 | { OMAP_TAG_USB, NULL }, | 412 | { OMAP_TAG_USB, NULL }, |
379 | { OMAP_TAG_LCD, NULL }, | 413 | { OMAP_TAG_LCD, NULL }, |
380 | { OMAP_TAG_MMC, &innovator_mmc_config }, | ||
381 | { OMAP_TAG_UART, &innovator_uart_config }, | 414 | { OMAP_TAG_UART, &innovator_uart_config }, |
382 | }; | 415 | }; |
383 | 416 | ||
@@ -412,6 +445,7 @@ static void __init innovator_init(void) | |||
412 | omap_board_config_size = ARRAY_SIZE(innovator_config); | 445 | omap_board_config_size = ARRAY_SIZE(innovator_config); |
413 | omap_serial_init(); | 446 | omap_serial_init(); |
414 | omap_register_i2c_bus(1, 100, NULL, 0); | 447 | omap_register_i2c_bus(1, 100, NULL, 0); |
448 | innovator_mmc_init(); | ||
415 | } | 449 | } |
416 | 450 | ||
417 | static void __init innovator_map_io(void) | 451 | static void __init innovator_map_io(void) |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index 38d9783ac6d6..4970c402a594 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <mach/aic23.h> | 35 | #include <mach/aic23.h> |
36 | #include <mach/omapfb.h> | 36 | #include <mach/omapfb.h> |
37 | #include <mach/lcd_mipid.h> | 37 | #include <mach/lcd_mipid.h> |
38 | #include <mach/mmc.h> | ||
38 | 39 | ||
39 | #define ADS7846_PENDOWN_GPIO 15 | 40 | #define ADS7846_PENDOWN_GPIO 15 |
40 | 41 | ||
@@ -102,7 +103,7 @@ static void mipid_shutdown(struct mipid_platform_data *pdata) | |||
102 | { | 103 | { |
103 | if (pdata->nreset_gpio != -1) { | 104 | if (pdata->nreset_gpio != -1) { |
104 | printk(KERN_INFO "shutdown LCD\n"); | 105 | printk(KERN_INFO "shutdown LCD\n"); |
105 | omap_set_gpio_dataout(pdata->nreset_gpio, 0); | 106 | gpio_set_value(pdata->nreset_gpio, 0); |
106 | msleep(120); | 107 | msleep(120); |
107 | } | 108 | } |
108 | } | 109 | } |
@@ -124,13 +125,13 @@ static void mipid_dev_init(void) | |||
124 | 125 | ||
125 | static void ads7846_dev_init(void) | 126 | static void ads7846_dev_init(void) |
126 | { | 127 | { |
127 | if (omap_request_gpio(ADS7846_PENDOWN_GPIO) < 0) | 128 | if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0) |
128 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); | 129 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); |
129 | } | 130 | } |
130 | 131 | ||
131 | static int ads7846_get_pendown_state(void) | 132 | static int ads7846_get_pendown_state(void) |
132 | { | 133 | { |
133 | return !omap_get_gpio_datain(ADS7846_PENDOWN_GPIO); | 134 | return !gpio_get_value(ADS7846_PENDOWN_GPIO); |
134 | } | 135 | } |
135 | 136 | ||
136 | static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = { | 137 | static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = { |
@@ -173,26 +174,68 @@ static struct omap_usb_config nokia770_usb_config __initdata = { | |||
173 | .pins[0] = 6, | 174 | .pins[0] = 6, |
174 | }; | 175 | }; |
175 | 176 | ||
176 | static struct omap_mmc_config nokia770_mmc_config __initdata = { | 177 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
177 | .mmc[0] = { | 178 | |
178 | .enabled = 0, | 179 | #define NOKIA770_GPIO_MMC_POWER 41 |
179 | .wire4 = 0, | 180 | #define NOKIA770_GPIO_MMC_SWITCH 23 |
180 | .wp_pin = -1, | 181 | |
181 | .power_pin = -1, | 182 | static int nokia770_mmc_set_power(struct device *dev, int slot, int power_on, |
182 | .switch_pin = -1, | 183 | int vdd) |
183 | }, | 184 | { |
184 | .mmc[1] = { | 185 | if (power_on) |
185 | .enabled = 0, | 186 | gpio_set_value(NOKIA770_GPIO_MMC_POWER, 1); |
186 | .wire4 = 0, | 187 | else |
187 | .wp_pin = -1, | 188 | gpio_set_value(NOKIA770_GPIO_MMC_POWER, 0); |
188 | .power_pin = -1, | 189 | |
189 | .switch_pin = -1, | 190 | return 0; |
191 | } | ||
192 | |||
193 | static int nokia770_mmc_get_cover_state(struct device *dev, int slot) | ||
194 | { | ||
195 | return gpio_get_value(NOKIA770_GPIO_MMC_SWITCH); | ||
196 | } | ||
197 | |||
198 | static struct omap_mmc_platform_data nokia770_mmc2_data = { | ||
199 | .nr_slots = 1, | ||
200 | .dma_mask = 0xffffffff, | ||
201 | .slots[0] = { | ||
202 | .set_power = nokia770_mmc_set_power, | ||
203 | .get_cover_state = nokia770_mmc_get_cover_state, | ||
204 | .name = "mmcblk", | ||
190 | }, | 205 | }, |
191 | }; | 206 | }; |
192 | 207 | ||
208 | static struct omap_mmc_platform_data *nokia770_mmc_data[OMAP16XX_NR_MMC]; | ||
209 | |||
210 | static void __init nokia770_mmc_init(void) | ||
211 | { | ||
212 | int ret; | ||
213 | |||
214 | ret = gpio_request(NOKIA770_GPIO_MMC_POWER, "MMC power"); | ||
215 | if (ret < 0) | ||
216 | return; | ||
217 | gpio_direction_output(NOKIA770_GPIO_MMC_POWER, 0); | ||
218 | |||
219 | ret = gpio_request(NOKIA770_GPIO_MMC_SWITCH, "MMC cover"); | ||
220 | if (ret < 0) { | ||
221 | gpio_free(NOKIA770_GPIO_MMC_POWER); | ||
222 | return; | ||
223 | } | ||
224 | gpio_direction_input(NOKIA770_GPIO_MMC_SWITCH); | ||
225 | |||
226 | /* Only the second MMC controller is used */ | ||
227 | nokia770_mmc_data[1] = &nokia770_mmc2_data; | ||
228 | omap1_init_mmc(nokia770_mmc_data, OMAP16XX_NR_MMC); | ||
229 | } | ||
230 | |||
231 | #else | ||
232 | static inline void nokia770_mmc_init(void) | ||
233 | { | ||
234 | } | ||
235 | #endif | ||
236 | |||
193 | static struct omap_board_config_kernel nokia770_config[] __initdata = { | 237 | static struct omap_board_config_kernel nokia770_config[] __initdata = { |
194 | { OMAP_TAG_USB, NULL }, | 238 | { OMAP_TAG_USB, NULL }, |
195 | { OMAP_TAG_MMC, &nokia770_mmc_config }, | ||
196 | }; | 239 | }; |
197 | 240 | ||
198 | #if defined(CONFIG_OMAP_DSP) | 241 | #if defined(CONFIG_OMAP_DSP) |
@@ -228,9 +271,9 @@ static void nokia770_audio_pwr_up(void) | |||
228 | /* Turn on codec */ | 271 | /* Turn on codec */ |
229 | aic23_power_up(); | 272 | aic23_power_up(); |
230 | 273 | ||
231 | if (omap_get_gpio_datain(HEADPHONE_GPIO)) | 274 | if (gpio_get_value(HEADPHONE_GPIO)) |
232 | /* HP not connected, turn on amplifier */ | 275 | /* HP not connected, turn on amplifier */ |
233 | omap_set_gpio_dataout(AMPLIFIER_CTRL_GPIO, 1); | 276 | gpio_set_value(AMPLIFIER_CTRL_GPIO, 1); |
234 | else | 277 | else |
235 | /* HP connected, do not turn on amplifier */ | 278 | /* HP connected, do not turn on amplifier */ |
236 | printk("HP connected\n"); | 279 | printk("HP connected\n"); |
@@ -250,7 +293,7 @@ static DECLARE_DELAYED_WORK(codec_power_down_work, codec_delayed_power_down); | |||
250 | static void nokia770_audio_pwr_down(void) | 293 | static void nokia770_audio_pwr_down(void) |
251 | { | 294 | { |
252 | /* Turn off amplifier */ | 295 | /* Turn off amplifier */ |
253 | omap_set_gpio_dataout(AMPLIFIER_CTRL_GPIO, 0); | 296 | gpio_set_value(AMPLIFIER_CTRL_GPIO, 0); |
254 | 297 | ||
255 | /* Turn off codec: schedule delayed work */ | 298 | /* Turn off codec: schedule delayed work */ |
256 | schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */ | 299 | schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */ |
@@ -335,6 +378,7 @@ static void __init omap_nokia770_init(void) | |||
335 | omap_dsp_init(); | 378 | omap_dsp_init(); |
336 | ads7846_dev_init(); | 379 | ads7846_dev_init(); |
337 | mipid_dev_init(); | 380 | mipid_dev_init(); |
381 | nokia770_mmc_init(); | ||
338 | } | 382 | } |
339 | 383 | ||
340 | static void __init omap_nokia770_map_io(void) | 384 | static void __init omap_nokia770_map_io(void) |
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index 3e766e49f7cc..ff9e67baa5c9 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c | |||
@@ -188,7 +188,8 @@ static struct gpio_led tps_leds[] = { | |||
188 | /* NOTE: D9 and D2 have hardware blink support. | 188 | /* NOTE: D9 and D2 have hardware blink support. |
189 | * Also, D9 requires non-battery power. | 189 | * Also, D9 requires non-battery power. |
190 | */ | 190 | */ |
191 | { .gpio = OSK_TPS_GPIO_LED_D9, .name = "d9", }, | 191 | { .gpio = OSK_TPS_GPIO_LED_D9, .name = "d9", |
192 | .default_trigger = "ide-disk", }, | ||
192 | { .gpio = OSK_TPS_GPIO_LED_D2, .name = "d2", }, | 193 | { .gpio = OSK_TPS_GPIO_LED_D2, .name = "d2", }, |
193 | { .gpio = OSK_TPS_GPIO_LED_D3, .name = "d3", .active_low = 1, | 194 | { .gpio = OSK_TPS_GPIO_LED_D3, .name = "d3", .active_low = 1, |
194 | .default_trigger = "heartbeat", }, | 195 | .default_trigger = "heartbeat", }, |
@@ -260,7 +261,6 @@ static struct i2c_board_info __initdata osk_i2c_board_info[] = { | |||
260 | }, | 261 | }, |
261 | /* TODO when driver support is ready: | 262 | /* TODO when driver support is ready: |
262 | * - aic23 audio chip at 0x1a | 263 | * - aic23 audio chip at 0x1a |
263 | * - on Mistral, 24c04 eeprom at 0x50 | ||
264 | * - optionally on Mistral, ov9640 camera sensor at 0x30 | 264 | * - optionally on Mistral, ov9640 camera sensor at 0x30 |
265 | */ | 265 | */ |
266 | }; | 266 | }; |
@@ -288,7 +288,7 @@ static void __init osk_init_cf(void) | |||
288 | return; | 288 | return; |
289 | } | 289 | } |
290 | /* the CF I/O IRQ is really active-low */ | 290 | /* the CF I/O IRQ is really active-low */ |
291 | set_irq_type(OMAP_GPIO_IRQ(62), IRQ_TYPE_EDGE_FALLING); | 291 | set_irq_type(gpio_to_irq(62), IRQ_TYPE_EDGE_FALLING); |
292 | } | 292 | } |
293 | 293 | ||
294 | static void __init osk_init_irq(void) | 294 | static void __init osk_init_irq(void) |
@@ -337,11 +337,28 @@ static struct omap_board_config_kernel osk_config[] __initdata = { | |||
337 | #ifdef CONFIG_OMAP_OSK_MISTRAL | 337 | #ifdef CONFIG_OMAP_OSK_MISTRAL |
338 | 338 | ||
339 | #include <linux/input.h> | 339 | #include <linux/input.h> |
340 | #include <linux/i2c/at24.h> | ||
340 | #include <linux/spi/spi.h> | 341 | #include <linux/spi/spi.h> |
341 | #include <linux/spi/ads7846.h> | 342 | #include <linux/spi/ads7846.h> |
342 | 343 | ||
343 | #include <mach/keypad.h> | 344 | #include <mach/keypad.h> |
344 | 345 | ||
346 | static struct at24_platform_data at24c04 = { | ||
347 | .byte_len = SZ_4K / 8, | ||
348 | .page_size = 16, | ||
349 | }; | ||
350 | |||
351 | static struct i2c_board_info __initdata mistral_i2c_board_info[] = { | ||
352 | { | ||
353 | /* NOTE: powered from LCD supply */ | ||
354 | I2C_BOARD_INFO("24c04", 0x50), | ||
355 | .platform_data = &at24c04, | ||
356 | }, | ||
357 | /* TODO when driver support is ready: | ||
358 | * - optionally ov9640 camera sensor at 0x30 | ||
359 | */ | ||
360 | }; | ||
361 | |||
345 | static const int osk_keymap[] = { | 362 | static const int osk_keymap[] = { |
346 | /* KEY(col, row, code) */ | 363 | /* KEY(col, row, code) */ |
347 | KEY(0, 0, KEY_F1), /* SW4 */ | 364 | KEY(0, 0, KEY_F1), /* SW4 */ |
@@ -483,23 +500,30 @@ static void __init osk_mistral_init(void) | |||
483 | omap_cfg_reg(P20_1610_GPIO4); /* PENIRQ */ | 500 | omap_cfg_reg(P20_1610_GPIO4); /* PENIRQ */ |
484 | gpio_request(4, "ts_int"); | 501 | gpio_request(4, "ts_int"); |
485 | gpio_direction_input(4); | 502 | gpio_direction_input(4); |
486 | set_irq_type(OMAP_GPIO_IRQ(4), IRQ_TYPE_EDGE_FALLING); | 503 | set_irq_type(gpio_to_irq(4), IRQ_TYPE_EDGE_FALLING); |
487 | 504 | ||
488 | spi_register_board_info(mistral_boardinfo, | 505 | spi_register_board_info(mistral_boardinfo, |
489 | ARRAY_SIZE(mistral_boardinfo)); | 506 | ARRAY_SIZE(mistral_boardinfo)); |
490 | 507 | ||
491 | /* the sideways button (SW1) is for use as a "wakeup" button */ | 508 | /* the sideways button (SW1) is for use as a "wakeup" button |
509 | * | ||
510 | * NOTE: The Mistral board has the wakeup button (SW1) wired | ||
511 | * to the LCD 3.3V rail, which is powered down during suspend. | ||
512 | * To allow this button to wake up the omap, work around this | ||
513 | * HW bug by rewiring SW1 to use the main 3.3V rail. | ||
514 | */ | ||
492 | omap_cfg_reg(N15_1610_MPUIO2); | 515 | omap_cfg_reg(N15_1610_MPUIO2); |
493 | if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) { | 516 | if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) { |
494 | int ret = 0; | 517 | int ret = 0; |
518 | int irq = gpio_to_irq(OMAP_MPUIO(2)); | ||
495 | 519 | ||
496 | gpio_direction_input(OMAP_MPUIO(2)); | 520 | gpio_direction_input(OMAP_MPUIO(2)); |
497 | set_irq_type(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), IRQ_TYPE_EDGE_RISING); | 521 | set_irq_type(irq, IRQ_TYPE_EDGE_RISING); |
498 | #ifdef CONFIG_PM | 522 | #ifdef CONFIG_PM |
499 | /* share the IRQ in case someone wants to use the | 523 | /* share the IRQ in case someone wants to use the |
500 | * button for more than wakeup from system sleep. | 524 | * button for more than wakeup from system sleep. |
501 | */ | 525 | */ |
502 | ret = request_irq(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), | 526 | ret = request_irq(irq, |
503 | &osk_mistral_wake_interrupt, | 527 | &osk_mistral_wake_interrupt, |
504 | IRQF_SHARED, "mistral_wakeup", | 528 | IRQF_SHARED, "mistral_wakeup", |
505 | &osk_mistral_wake_interrupt); | 529 | &osk_mistral_wake_interrupt); |
@@ -508,7 +532,7 @@ static void __init osk_mistral_init(void) | |||
508 | printk(KERN_ERR "OSK+Mistral: no wakeup irq, %d?\n", | 532 | printk(KERN_ERR "OSK+Mistral: no wakeup irq, %d?\n", |
509 | ret); | 533 | ret); |
510 | } else | 534 | } else |
511 | enable_irq_wake(OMAP_GPIO_IRQ(OMAP_MPUIO(2))); | 535 | enable_irq_wake(irq); |
512 | #endif | 536 | #endif |
513 | } else | 537 | } else |
514 | printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); | 538 | printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); |
@@ -520,6 +544,9 @@ static void __init osk_mistral_init(void) | |||
520 | if (gpio_request(2, "lcd_pwr") == 0) | 544 | if (gpio_request(2, "lcd_pwr") == 0) |
521 | gpio_direction_output(2, 1); | 545 | gpio_direction_output(2, 1); |
522 | 546 | ||
547 | i2c_register_board_info(1, mistral_i2c_board_info, | ||
548 | ARRAY_SIZE(mistral_i2c_board_info)); | ||
549 | |||
523 | platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices)); | 550 | platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices)); |
524 | } | 551 | } |
525 | #else | 552 | #else |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index b58043644a6f..75e32d35afd9 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -255,7 +255,7 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery) | |||
255 | { | 255 | { |
256 | int charging, batt, hi, lo, mid; | 256 | int charging, batt, hi, lo, mid; |
257 | 257 | ||
258 | charging = !omap_get_gpio_datain(PALMTE_DC_GPIO); | 258 | charging = !gpio_get_value(PALMTE_DC_GPIO); |
259 | batt = battery[0]; | 259 | batt = battery[0]; |
260 | if (charging) | 260 | if (charging) |
261 | batt -= 60; | 261 | batt -= 60; |
@@ -316,7 +316,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery) | |||
316 | 316 | ||
317 | static struct omap_board_config_kernel palmte_config[] __initdata = { | 317 | static struct omap_board_config_kernel palmte_config[] __initdata = { |
318 | { OMAP_TAG_USB, &palmte_usb_config }, | 318 | { OMAP_TAG_USB, &palmte_usb_config }, |
319 | { OMAP_TAG_MMC, &palmte_mmc_config }, | ||
320 | { OMAP_TAG_LCD, &palmte_lcd_config }, | 319 | { OMAP_TAG_LCD, &palmte_lcd_config }, |
321 | { OMAP_TAG_UART, &palmte_uart_config }, | 320 | { OMAP_TAG_UART, &palmte_uart_config }, |
322 | }; | 321 | }; |
@@ -335,11 +334,11 @@ static void palmte_headphones_detect(void *data, int state) | |||
335 | { | 334 | { |
336 | if (state) { | 335 | if (state) { |
337 | /* Headphones connected, disable speaker */ | 336 | /* Headphones connected, disable speaker */ |
338 | omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 0); | 337 | gpio_set_value(PALMTE_SPEAKER_GPIO, 0); |
339 | printk(KERN_INFO "PM: speaker off\n"); | 338 | printk(KERN_INFO "PM: speaker off\n"); |
340 | } else { | 339 | } else { |
341 | /* Headphones unplugged, re-enable speaker */ | 340 | /* Headphones unplugged, re-enable speaker */ |
342 | omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 1); | 341 | gpio_set_value(PALMTE_SPEAKER_GPIO, 1); |
343 | printk(KERN_INFO "PM: speaker on\n"); | 342 | printk(KERN_INFO "PM: speaker on\n"); |
344 | } | 343 | } |
345 | } | 344 | } |
@@ -347,18 +346,18 @@ static void palmte_headphones_detect(void *data, int state) | |||
347 | static void __init palmte_misc_gpio_setup(void) | 346 | static void __init palmte_misc_gpio_setup(void) |
348 | { | 347 | { |
349 | /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ | 348 | /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ |
350 | if (omap_request_gpio(PALMTE_PINTDAV_GPIO)) { | 349 | if (gpio_request(PALMTE_PINTDAV_GPIO, "TSC2102 PINTDAV") < 0) { |
351 | printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n"); | 350 | printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n"); |
352 | return; | 351 | return; |
353 | } | 352 | } |
354 | omap_set_gpio_direction(PALMTE_PINTDAV_GPIO, 1); | 353 | gpio_direction_input(PALMTE_PINTDAV_GPIO); |
355 | 354 | ||
356 | /* Set USB-or-DC-IN pin as input (unused) */ | 355 | /* Set USB-or-DC-IN pin as input (unused) */ |
357 | if (omap_request_gpio(PALMTE_USB_OR_DC_GPIO)) { | 356 | if (gpio_request(PALMTE_USB_OR_DC_GPIO, "USB/DC-IN") < 0) { |
358 | printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); | 357 | printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); |
359 | return; | 358 | return; |
360 | } | 359 | } |
361 | omap_set_gpio_direction(PALMTE_USB_OR_DC_GPIO, 1); | 360 | gpio_direction_input(PALMTE_USB_OR_DC_GPIO); |
362 | } | 361 | } |
363 | 362 | ||
364 | static void __init omap_palmte_init(void) | 363 | static void __init omap_palmte_init(void) |
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c index 40f9860a09df..5c001afe8062 100644 --- a/arch/arm/mach-omap1/board-palmtt.c +++ b/arch/arm/mach-omap1/board-palmtt.c | |||
@@ -268,7 +268,7 @@ static struct platform_device *palmtt_devices[] __initdata = { | |||
268 | 268 | ||
269 | static int palmtt_get_pendown_state(void) | 269 | static int palmtt_get_pendown_state(void) |
270 | { | 270 | { |
271 | return !omap_get_gpio_datain(6); | 271 | return !gpio_get_value(6); |
272 | } | 272 | } |
273 | 273 | ||
274 | static const struct ads7846_platform_data palmtt_ts_info = { | 274 | static const struct ads7846_platform_data palmtt_ts_info = { |
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c index e719294250b1..cc05257eb1cd 100644 --- a/arch/arm/mach-omap1/board-palmz71.c +++ b/arch/arm/mach-omap1/board-palmz71.c | |||
@@ -239,7 +239,7 @@ static struct platform_device *devices[] __initdata = { | |||
239 | static int | 239 | static int |
240 | palmz71_get_pendown_state(void) | 240 | palmz71_get_pendown_state(void) |
241 | { | 241 | { |
242 | return !omap_get_gpio_datain(PALMZ71_PENIRQ_GPIO); | 242 | return !gpio_get_value(PALMZ71_PENIRQ_GPIO); |
243 | } | 243 | } |
244 | 244 | ||
245 | static const struct ads7846_platform_data palmz71_ts_info = { | 245 | static const struct ads7846_platform_data palmz71_ts_info = { |
@@ -267,16 +267,6 @@ static struct omap_usb_config palmz71_usb_config __initdata = { | |||
267 | .pins[0] = 2, | 267 | .pins[0] = 2, |
268 | }; | 268 | }; |
269 | 269 | ||
270 | static struct omap_mmc_config palmz71_mmc_config __initdata = { | ||
271 | .mmc[0] = { | ||
272 | .enabled = 1, | ||
273 | .wire4 = 0, | ||
274 | .wp_pin = PALMZ71_MMC_WP_GPIO, | ||
275 | .power_pin = -1, | ||
276 | .switch_pin = PALMZ71_MMC_IN_GPIO, | ||
277 | }, | ||
278 | }; | ||
279 | |||
280 | static struct omap_lcd_config palmz71_lcd_config __initdata = { | 270 | static struct omap_lcd_config palmz71_lcd_config __initdata = { |
281 | .ctrl_name = "internal", | 271 | .ctrl_name = "internal", |
282 | }; | 272 | }; |
@@ -287,7 +277,6 @@ static struct omap_uart_config palmz71_uart_config __initdata = { | |||
287 | 277 | ||
288 | static struct omap_board_config_kernel palmz71_config[] __initdata = { | 278 | static struct omap_board_config_kernel palmz71_config[] __initdata = { |
289 | {OMAP_TAG_USB, &palmz71_usb_config}, | 279 | {OMAP_TAG_USB, &palmz71_usb_config}, |
290 | {OMAP_TAG_MMC, &palmz71_mmc_config}, | ||
291 | {OMAP_TAG_LCD, &palmz71_lcd_config}, | 280 | {OMAP_TAG_LCD, &palmz71_lcd_config}, |
292 | {OMAP_TAG_UART, &palmz71_uart_config}, | 281 | {OMAP_TAG_UART, &palmz71_uart_config}, |
293 | }; | 282 | }; |
@@ -295,13 +284,13 @@ static struct omap_board_config_kernel palmz71_config[] __initdata = { | |||
295 | static irqreturn_t | 284 | static irqreturn_t |
296 | palmz71_powercable(int irq, void *dev_id) | 285 | palmz71_powercable(int irq, void *dev_id) |
297 | { | 286 | { |
298 | if (omap_get_gpio_datain(PALMZ71_USBDETECT_GPIO)) { | 287 | if (gpio_get_value(PALMZ71_USBDETECT_GPIO)) { |
299 | printk(KERN_INFO "PM: Power cable connected\n"); | 288 | printk(KERN_INFO "PM: Power cable connected\n"); |
300 | set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), | 289 | set_irq_type(gpio_to_irq(PALMZ71_USBDETECT_GPIO), |
301 | IRQ_TYPE_EDGE_FALLING); | 290 | IRQ_TYPE_EDGE_FALLING); |
302 | } else { | 291 | } else { |
303 | printk(KERN_INFO "PM: Power cable disconnected\n"); | 292 | printk(KERN_INFO "PM: Power cable disconnected\n"); |
304 | set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), | 293 | set_irq_type(gpio_to_irq(PALMZ71_USBDETECT_GPIO), |
305 | IRQ_TYPE_EDGE_RISING); | 294 | IRQ_TYPE_EDGE_RISING); |
306 | } | 295 | } |
307 | return IRQ_HANDLED; | 296 | return IRQ_HANDLED; |
@@ -323,29 +312,28 @@ palmz71_gpio_setup(int early) | |||
323 | { | 312 | { |
324 | if (early) { | 313 | if (early) { |
325 | /* Only set GPIO1 so we have a working serial */ | 314 | /* Only set GPIO1 so we have a working serial */ |
326 | omap_set_gpio_dataout(1, 1); | 315 | gpio_direction_output(1, 1); |
327 | omap_set_gpio_direction(1, 0); | ||
328 | } else { | 316 | } else { |
329 | /* Set MMC/SD host WP pin as input */ | 317 | /* Set MMC/SD host WP pin as input */ |
330 | if (omap_request_gpio(PALMZ71_MMC_WP_GPIO)) { | 318 | if (gpio_request(PALMZ71_MMC_WP_GPIO, "MMC WP") < 0) { |
331 | printk(KERN_ERR "Could not reserve WP GPIO!\n"); | 319 | printk(KERN_ERR "Could not reserve WP GPIO!\n"); |
332 | return; | 320 | return; |
333 | } | 321 | } |
334 | omap_set_gpio_direction(PALMZ71_MMC_WP_GPIO, 1); | 322 | gpio_direction_input(PALMZ71_MMC_WP_GPIO); |
335 | 323 | ||
336 | /* Monitor the Power-cable-connected signal */ | 324 | /* Monitor the Power-cable-connected signal */ |
337 | if (omap_request_gpio(PALMZ71_USBDETECT_GPIO)) { | 325 | if (gpio_request(PALMZ71_USBDETECT_GPIO, "USB detect") < 0) { |
338 | printk(KERN_ERR | 326 | printk(KERN_ERR |
339 | "Could not reserve cable signal GPIO!\n"); | 327 | "Could not reserve cable signal GPIO!\n"); |
340 | return; | 328 | return; |
341 | } | 329 | } |
342 | omap_set_gpio_direction(PALMZ71_USBDETECT_GPIO, 1); | 330 | gpio_direction_input(PALMZ71_USBDETECT_GPIO); |
343 | if (request_irq(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), | 331 | if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO), |
344 | palmz71_powercable, IRQF_SAMPLE_RANDOM, | 332 | palmz71_powercable, IRQF_SAMPLE_RANDOM, |
345 | "palmz71-cable", 0)) | 333 | "palmz71-cable", 0)) |
346 | printk(KERN_ERR | 334 | printk(KERN_ERR |
347 | "IRQ request for power cable failed!\n"); | 335 | "IRQ request for power cable failed!\n"); |
348 | palmz71_powercable(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 0); | 336 | palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0); |
349 | } | 337 | } |
350 | } | 338 | } |
351 | 339 | ||
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c index b715917bfdaf..3b9f907aa899 100644 --- a/arch/arm/mach-omap1/board-perseus2.c +++ b/arch/arm/mach-omap1/board-perseus2.c | |||
@@ -205,7 +205,7 @@ static struct platform_device *devices[] __initdata = { | |||
205 | 205 | ||
206 | static int nand_dev_ready(struct omap_nand_platform_data *data) | 206 | static int nand_dev_ready(struct omap_nand_platform_data *data) |
207 | { | 207 | { |
208 | return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); | 208 | return gpio_get_value(P2_NAND_RB_GPIO_PIN); |
209 | } | 209 | } |
210 | 210 | ||
211 | static struct omap_uart_config perseus2_uart_config __initdata = { | 211 | static struct omap_uart_config perseus2_uart_config __initdata = { |
@@ -223,8 +223,9 @@ static struct omap_board_config_kernel perseus2_config[] __initdata = { | |||
223 | 223 | ||
224 | static void __init omap_perseus2_init(void) | 224 | static void __init omap_perseus2_init(void) |
225 | { | 225 | { |
226 | if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN))) | 226 | if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0) |
227 | nand_data.dev_ready = nand_dev_ready; | 227 | BUG(); |
228 | nand_data.dev_ready = nand_dev_ready; | ||
228 | 229 | ||
229 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); | 230 | omap_cfg_reg(L3_1610_FLASH_CS2B_OE); |
230 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); | 231 | omap_cfg_reg(M8_1610_FLASH_CS2B_WE); |
diff --git a/arch/arm/mach-omap1/board-sx1-mmc.c b/arch/arm/mach-omap1/board-sx1-mmc.c index 0be4ebaa2842..66a4d7d5255d 100644 --- a/arch/arm/mach-omap1/board-sx1-mmc.c +++ b/arch/arm/mach-omap1/board-sx1-mmc.c | |||
@@ -12,30 +12,20 @@ | |||
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/platform_device.h> | ||
16 | |||
15 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
16 | #include <mach/mmc.h> | 18 | #include <mach/mmc.h> |
17 | #include <mach/gpio.h> | 19 | #include <mach/gpio.h> |
18 | 20 | ||
19 | #ifdef CONFIG_MMC_OMAP | 21 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) |
20 | static int slot_cover_open; | ||
21 | static struct device *mmc_device; | ||
22 | 22 | ||
23 | static int sx1_mmc_set_power(struct device *dev, int slot, int power_on, | 23 | static int mmc_set_power(struct device *dev, int slot, int power_on, |
24 | int vdd) | 24 | int vdd) |
25 | { | 25 | { |
26 | int err; | 26 | int err; |
27 | u8 dat = 0; | 27 | u8 dat = 0; |
28 | 28 | ||
29 | #ifdef CONFIG_MMC_DEBUG | ||
30 | dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1, | ||
31 | power_on ? "on" : "off", vdd); | ||
32 | #endif | ||
33 | |||
34 | if (slot != 0) { | ||
35 | dev_err(dev, "No such slot %d\n", slot + 1); | ||
36 | return -ENODEV; | ||
37 | } | ||
38 | |||
39 | err = sx1_i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat); | 29 | err = sx1_i2c_read_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, &dat); |
40 | if (err < 0) | 30 | if (err < 0) |
41 | return err; | 31 | return err; |
@@ -48,68 +38,23 @@ static int sx1_mmc_set_power(struct device *dev, int slot, int power_on, | |||
48 | return sx1_i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat); | 38 | return sx1_i2c_write_byte(SOFIA_I2C_ADDR, SOFIA_POWER1_REG, dat); |
49 | } | 39 | } |
50 | 40 | ||
51 | static int sx1_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode) | 41 | /* Cover switch is at OMAP_MPUIO(3) */ |
52 | { | 42 | static struct omap_mmc_platform_data mmc1_data = { |
53 | #ifdef CONFIG_MMC_DEBUG | ||
54 | dev_dbg(dev, "Set slot %d bus_mode %s\n", slot + 1, | ||
55 | bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull"); | ||
56 | #endif | ||
57 | if (slot != 0) { | ||
58 | dev_err(dev, "No such slot %d\n", slot + 1); | ||
59 | return -ENODEV; | ||
60 | } | ||
61 | |||
62 | return 0; | ||
63 | } | ||
64 | |||
65 | static int sx1_mmc_get_cover_state(struct device *dev, int slot) | ||
66 | { | ||
67 | BUG_ON(slot != 0); | ||
68 | |||
69 | return slot_cover_open; | ||
70 | } | ||
71 | |||
72 | void sx1_mmc_slot_cover_handler(void *arg, int state) | ||
73 | { | ||
74 | if (mmc_device == NULL) | ||
75 | return; | ||
76 | |||
77 | slot_cover_open = state; | ||
78 | omap_mmc_notify_cover_event(mmc_device, 0, state); | ||
79 | } | ||
80 | |||
81 | static int sx1_mmc_late_init(struct device *dev) | ||
82 | { | ||
83 | int ret = 0; | ||
84 | |||
85 | mmc_device = dev; | ||
86 | |||
87 | return ret; | ||
88 | } | ||
89 | |||
90 | static void sx1_mmc_cleanup(struct device *dev) | ||
91 | { | ||
92 | } | ||
93 | |||
94 | static struct omap_mmc_platform_data sx1_mmc_data = { | ||
95 | .nr_slots = 1, | 43 | .nr_slots = 1, |
96 | .switch_slot = NULL, | ||
97 | .init = sx1_mmc_late_init, | ||
98 | .cleanup = sx1_mmc_cleanup, | ||
99 | .slots[0] = { | 44 | .slots[0] = { |
100 | .set_power = sx1_mmc_set_power, | 45 | .set_power = mmc_set_power, |
101 | .set_bus_mode = sx1_mmc_set_bus_mode, | ||
102 | .get_ro = NULL, | ||
103 | .get_cover_state = sx1_mmc_get_cover_state, | ||
104 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | | 46 | .ocr_mask = MMC_VDD_28_29 | MMC_VDD_30_31 | |
105 | MMC_VDD_32_33 | MMC_VDD_33_34, | 47 | MMC_VDD_32_33 | MMC_VDD_33_34, |
106 | .name = "mmcblk", | 48 | .name = "mmcblk", |
107 | }, | 49 | }, |
108 | }; | 50 | }; |
109 | 51 | ||
52 | static struct omap_mmc_platform_data *mmc_data[OMAP15XX_NR_MMC]; | ||
53 | |||
110 | void __init sx1_mmc_init(void) | 54 | void __init sx1_mmc_init(void) |
111 | { | 55 | { |
112 | omap_set_mmc_info(1, &sx1_mmc_data); | 56 | mmc_data[0] = &mmc1_data; |
57 | omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC); | ||
113 | } | 58 | } |
114 | 59 | ||
115 | #else | 60 | #else |
@@ -118,7 +63,4 @@ void __init sx1_mmc_init(void) | |||
118 | { | 63 | { |
119 | } | 64 | } |
120 | 65 | ||
121 | void sx1_mmc_slot_cover_handler(void *arg, int state) | ||
122 | { | ||
123 | } | ||
124 | #endif | 66 | #endif |
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c index 130bcc6fd082..8171fe0ca082 100644 --- a/arch/arm/mach-omap1/board-sx1.c +++ b/arch/arm/mach-omap1/board-sx1.c | |||
@@ -378,15 +378,6 @@ static struct omap_usb_config sx1_usb_config __initdata = { | |||
378 | .pins[2] = 0, | 378 | .pins[2] = 0, |
379 | }; | 379 | }; |
380 | 380 | ||
381 | /*----------- MMC -------------------------*/ | ||
382 | |||
383 | static struct omap_mmc_config sx1_mmc_config __initdata = { | ||
384 | .mmc [0] = { | ||
385 | .enabled = 1, | ||
386 | .wire4 = 0, | ||
387 | }, | ||
388 | }; | ||
389 | |||
390 | /*----------- LCD -------------------------*/ | 381 | /*----------- LCD -------------------------*/ |
391 | 382 | ||
392 | static struct platform_device sx1_lcd_device = { | 383 | static struct platform_device sx1_lcd_device = { |
@@ -414,7 +405,6 @@ static struct omap_uart_config sx1_uart_config __initdata = { | |||
414 | 405 | ||
415 | static struct omap_board_config_kernel sx1_config[] __initdata = { | 406 | static struct omap_board_config_kernel sx1_config[] __initdata = { |
416 | { OMAP_TAG_USB, &sx1_usb_config }, | 407 | { OMAP_TAG_USB, &sx1_usb_config }, |
417 | { OMAP_TAG_MMC, &sx1_mmc_config }, | ||
418 | { OMAP_TAG_LCD, &sx1_lcd_config }, | 408 | { OMAP_TAG_LCD, &sx1_lcd_config }, |
419 | { OMAP_TAG_UART, &sx1_uart_config }, | 409 | { OMAP_TAG_UART, &sx1_uart_config }, |
420 | }; | 410 | }; |
@@ -436,14 +426,9 @@ static void __init omap_sx1_init(void) | |||
436 | omap_request_gpio(1); /* A_IRDA_OFF */ | 426 | omap_request_gpio(1); /* A_IRDA_OFF */ |
437 | omap_request_gpio(11); /* A_SWITCH */ | 427 | omap_request_gpio(11); /* A_SWITCH */ |
438 | omap_request_gpio(15); /* A_USB_ON */ | 428 | omap_request_gpio(15); /* A_USB_ON */ |
439 | omap_set_gpio_direction(1, 0);/* gpio1 -> output */ | 429 | gpio_direction_output(1, 1); /*A_IRDA_OFF = 1 */ |
440 | omap_set_gpio_direction(11, 0);/* gpio11 -> output */ | 430 | gpio_direction_output(11, 0); /*A_SWITCH = 0 */ |
441 | omap_set_gpio_direction(15, 0);/* gpio15 -> output */ | 431 | gpio_direction_output(15, 0); /*A_USB_ON = 0 */ |
442 | /* set GPIO data */ | ||
443 | omap_set_gpio_dataout(1, 1);/*A_IRDA_OFF = 1 */ | ||
444 | omap_set_gpio_dataout(11, 0);/*A_SWITCH = 0 */ | ||
445 | omap_set_gpio_dataout(15, 0);/*A_USB_ON = 0 */ | ||
446 | |||
447 | } | 432 | } |
448 | /*----------------------------------------*/ | 433 | /*----------------------------------------*/ |
449 | static void __init omap_sx1_init_irq(void) | 434 | static void __init omap_sx1_init_irq(void) |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 45a01311669a..c224f3c64235 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/irq.h> | ||
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/notifier.h> | 21 | #include <linux/notifier.h> |
@@ -140,21 +141,12 @@ static struct omap_usb_config voiceblue_usb_config __initdata = { | |||
140 | .pins[2] = 6, | 141 | .pins[2] = 6, |
141 | }; | 142 | }; |
142 | 143 | ||
143 | static struct omap_mmc_config voiceblue_mmc_config __initdata = { | ||
144 | .mmc[0] = { | ||
145 | .enabled = 1, | ||
146 | .power_pin = 2, | ||
147 | .switch_pin = -1, | ||
148 | }, | ||
149 | }; | ||
150 | |||
151 | static struct omap_uart_config voiceblue_uart_config __initdata = { | 144 | static struct omap_uart_config voiceblue_uart_config __initdata = { |
152 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 145 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
153 | }; | 146 | }; |
154 | 147 | ||
155 | static struct omap_board_config_kernel voiceblue_config[] = { | 148 | static struct omap_board_config_kernel voiceblue_config[] = { |
156 | { OMAP_TAG_USB, &voiceblue_usb_config }, | 149 | { OMAP_TAG_USB, &voiceblue_usb_config }, |
157 | { OMAP_TAG_MMC, &voiceblue_mmc_config }, | ||
158 | { OMAP_TAG_UART, &voiceblue_uart_config }, | 150 | { OMAP_TAG_UART, &voiceblue_uart_config }, |
159 | }; | 151 | }; |
160 | 152 | ||
@@ -168,29 +160,27 @@ static void __init voiceblue_init_irq(void) | |||
168 | static void __init voiceblue_init(void) | 160 | static void __init voiceblue_init(void) |
169 | { | 161 | { |
170 | /* Watchdog */ | 162 | /* Watchdog */ |
171 | omap_request_gpio(0); | 163 | gpio_request(0, "Watchdog"); |
172 | /* smc91x reset */ | 164 | /* smc91x reset */ |
173 | omap_request_gpio(7); | 165 | gpio_request(7, "SMC91x reset"); |
174 | omap_set_gpio_direction(7, 0); | 166 | gpio_direction_output(7, 1); |
175 | omap_set_gpio_dataout(7, 1); | ||
176 | udelay(2); /* wait at least 100ns */ | 167 | udelay(2); /* wait at least 100ns */ |
177 | omap_set_gpio_dataout(7, 0); | 168 | gpio_set_value(7, 0); |
178 | mdelay(50); /* 50ms until PHY ready */ | 169 | mdelay(50); /* 50ms until PHY ready */ |
179 | /* smc91x interrupt pin */ | 170 | /* smc91x interrupt pin */ |
180 | omap_request_gpio(8); | 171 | gpio_request(8, "SMC91x irq"); |
181 | /* 16C554 reset*/ | 172 | /* 16C554 reset*/ |
182 | omap_request_gpio(6); | 173 | gpio_request(6, "16C554 reset"); |
183 | omap_set_gpio_direction(6, 0); | 174 | gpio_direction_output(6, 0); |
184 | omap_set_gpio_dataout(6, 0); | ||
185 | /* 16C554 interrupt pins */ | 175 | /* 16C554 interrupt pins */ |
186 | omap_request_gpio(12); | 176 | gpio_request(12, "16C554 irq"); |
187 | omap_request_gpio(13); | 177 | gpio_request(13, "16C554 irq"); |
188 | omap_request_gpio(14); | 178 | gpio_request(14, "16C554 irq"); |
189 | omap_request_gpio(15); | 179 | gpio_request(15, "16C554 irq"); |
190 | set_irq_type(OMAP_GPIO_IRQ(12), IRQ_TYPE_EDGE_RISING); | 180 | set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING); |
191 | set_irq_type(OMAP_GPIO_IRQ(13), IRQ_TYPE_EDGE_RISING); | 181 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); |
192 | set_irq_type(OMAP_GPIO_IRQ(14), IRQ_TYPE_EDGE_RISING); | 182 | set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING); |
193 | set_irq_type(OMAP_GPIO_IRQ(15), IRQ_TYPE_EDGE_RISING); | 183 | set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING); |
194 | 184 | ||
195 | platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); | 185 | platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); |
196 | omap_board_config = voiceblue_config; | 186 | omap_board_config = voiceblue_config; |
@@ -244,19 +234,18 @@ static int wdt_gpio_state; | |||
244 | 234 | ||
245 | void voiceblue_wdt_enable(void) | 235 | void voiceblue_wdt_enable(void) |
246 | { | 236 | { |
247 | omap_set_gpio_direction(0, 0); | 237 | gpio_direction_output(0, 0); |
248 | omap_set_gpio_dataout(0, 0); | 238 | gpio_set_value(0, 1); |
249 | omap_set_gpio_dataout(0, 1); | 239 | gpio_set_value(0, 0); |
250 | omap_set_gpio_dataout(0, 0); | ||
251 | wdt_gpio_state = 0; | 240 | wdt_gpio_state = 0; |
252 | } | 241 | } |
253 | 242 | ||
254 | void voiceblue_wdt_disable(void) | 243 | void voiceblue_wdt_disable(void) |
255 | { | 244 | { |
256 | omap_set_gpio_dataout(0, 0); | 245 | gpio_set_value(0, 0); |
257 | omap_set_gpio_dataout(0, 1); | 246 | gpio_set_value(0, 1); |
258 | omap_set_gpio_dataout(0, 0); | 247 | gpio_set_value(0, 0); |
259 | omap_set_gpio_direction(0, 1); | 248 | gpio_direction_input(0); |
260 | } | 249 | } |
261 | 250 | ||
262 | void voiceblue_wdt_ping(void) | 251 | void voiceblue_wdt_ping(void) |
@@ -265,7 +254,7 @@ void voiceblue_wdt_ping(void) | |||
265 | return; | 254 | return; |
266 | 255 | ||
267 | wdt_gpio_state = !wdt_gpio_state; | 256 | wdt_gpio_state = !wdt_gpio_state; |
268 | omap_set_gpio_dataout(0, wdt_gpio_state); | 257 | gpio_set_value(0, wdt_gpio_state); |
269 | } | 258 | } |
270 | 259 | ||
271 | void voiceblue_reset(void) | 260 | void voiceblue_reset(void) |
diff --git a/arch/arm/mach-omap1/clock.h b/arch/arm/mach-omap1/clock.h index 5635b511ab6f..c1dcdf18d8dd 100644 --- a/arch/arm/mach-omap1/clock.h +++ b/arch/arm/mach-omap1/clock.h | |||
@@ -705,7 +705,6 @@ static struct clk bclk_16xx = { | |||
705 | 705 | ||
706 | static struct clk mmc1_ck = { | 706 | static struct clk mmc1_ck = { |
707 | .name = "mmc_ck", | 707 | .name = "mmc_ck", |
708 | .id = 1, | ||
709 | /* Functional clock is direct from ULPD, interface clock is ARMPER */ | 708 | /* Functional clock is direct from ULPD, interface clock is ARMPER */ |
710 | .parent = &armper_ck.clk, | 709 | .parent = &armper_ck.clk, |
711 | .rate = 48000000, | 710 | .rate = 48000000, |
@@ -720,7 +719,7 @@ static struct clk mmc1_ck = { | |||
720 | 719 | ||
721 | static struct clk mmc2_ck = { | 720 | static struct clk mmc2_ck = { |
722 | .name = "mmc_ck", | 721 | .name = "mmc_ck", |
723 | .id = 2, | 722 | .id = 1, |
724 | /* Functional clock is direct from ULPD, interface clock is ARMPER */ | 723 | /* Functional clock is direct from ULPD, interface clock is ARMPER */ |
725 | .parent = &armper_ck.clk, | 724 | .parent = &armper_ck.clk, |
726 | .rate = 48000000, | 725 | .rate = 48000000, |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index e382b438c64e..77382d8b6b2f 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <mach/board.h> | 22 | #include <mach/board.h> |
23 | #include <mach/mux.h> | 23 | #include <mach/mux.h> |
24 | #include <mach/gpio.h> | 24 | #include <mach/gpio.h> |
25 | #include <mach/mmc.h> | ||
25 | 26 | ||
26 | /*-------------------------------------------------------------------------*/ | 27 | /*-------------------------------------------------------------------------*/ |
27 | 28 | ||
@@ -99,6 +100,95 @@ static inline void omap_init_mbox(void) | |||
99 | static inline void omap_init_mbox(void) { } | 100 | static inline void omap_init_mbox(void) { } |
100 | #endif | 101 | #endif |
101 | 102 | ||
103 | /*-------------------------------------------------------------------------*/ | ||
104 | |||
105 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | ||
106 | |||
107 | static inline void omap1_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | ||
108 | int controller_nr) | ||
109 | { | ||
110 | if (controller_nr == 0) { | ||
111 | omap_cfg_reg(MMC_CMD); | ||
112 | omap_cfg_reg(MMC_CLK); | ||
113 | omap_cfg_reg(MMC_DAT0); | ||
114 | if (cpu_is_omap1710()) { | ||
115 | omap_cfg_reg(M15_1710_MMC_CLKI); | ||
116 | omap_cfg_reg(P19_1710_MMC_CMDDIR); | ||
117 | omap_cfg_reg(P20_1710_MMC_DATDIR0); | ||
118 | } | ||
119 | if (mmc_controller->slots[0].wires == 4) { | ||
120 | omap_cfg_reg(MMC_DAT1); | ||
121 | /* NOTE: DAT2 can be on W10 (here) or M15 */ | ||
122 | if (!mmc_controller->slots[0].nomux) | ||
123 | omap_cfg_reg(MMC_DAT2); | ||
124 | omap_cfg_reg(MMC_DAT3); | ||
125 | } | ||
126 | } | ||
127 | |||
128 | /* Block 2 is on newer chips, and has many pinout options */ | ||
129 | if (cpu_is_omap16xx() && controller_nr == 1) { | ||
130 | if (!mmc_controller->slots[1].nomux) { | ||
131 | omap_cfg_reg(Y8_1610_MMC2_CMD); | ||
132 | omap_cfg_reg(Y10_1610_MMC2_CLK); | ||
133 | omap_cfg_reg(R18_1610_MMC2_CLKIN); | ||
134 | omap_cfg_reg(W8_1610_MMC2_DAT0); | ||
135 | if (mmc_controller->slots[1].wires == 4) { | ||
136 | omap_cfg_reg(V8_1610_MMC2_DAT1); | ||
137 | omap_cfg_reg(W15_1610_MMC2_DAT2); | ||
138 | omap_cfg_reg(R10_1610_MMC2_DAT3); | ||
139 | } | ||
140 | |||
141 | /* These are needed for the level shifter */ | ||
142 | omap_cfg_reg(V9_1610_MMC2_CMDDIR); | ||
143 | omap_cfg_reg(V5_1610_MMC2_DATDIR0); | ||
144 | omap_cfg_reg(W19_1610_MMC2_DATDIR1); | ||
145 | } | ||
146 | |||
147 | /* Feedback clock must be set on OMAP-1710 MMC2 */ | ||
148 | if (cpu_is_omap1710()) | ||
149 | omap_writel(omap_readl(MOD_CONF_CTRL_1) | (1 << 24), | ||
150 | MOD_CONF_CTRL_1); | ||
151 | } | ||
152 | } | ||
153 | |||
154 | void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
155 | int nr_controllers) | ||
156 | { | ||
157 | int i; | ||
158 | |||
159 | for (i = 0; i < nr_controllers; i++) { | ||
160 | unsigned long base, size; | ||
161 | unsigned int irq = 0; | ||
162 | |||
163 | if (!mmc_data[i]) | ||
164 | continue; | ||
165 | |||
166 | omap1_mmc_mux(mmc_data[i], i); | ||
167 | |||
168 | switch (i) { | ||
169 | case 0: | ||
170 | base = OMAP1_MMC1_BASE; | ||
171 | irq = INT_MMC; | ||
172 | break; | ||
173 | case 1: | ||
174 | if (!cpu_is_omap16xx()) | ||
175 | return; | ||
176 | base = OMAP1_MMC2_BASE; | ||
177 | irq = INT_1610_MMC2; | ||
178 | break; | ||
179 | default: | ||
180 | continue; | ||
181 | } | ||
182 | size = OMAP1_MMC_SIZE; | ||
183 | |||
184 | omap_mmc_add(i, base, size, irq, mmc_data[i]); | ||
185 | }; | ||
186 | } | ||
187 | |||
188 | #endif | ||
189 | |||
190 | /*-------------------------------------------------------------------------*/ | ||
191 | |||
102 | #if defined(CONFIG_OMAP_STI) | 192 | #if defined(CONFIG_OMAP_STI) |
103 | 193 | ||
104 | #define OMAP1_STI_BASE 0xfffea000 | 194 | #define OMAP1_STI_BASE 0xfffea000 |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index 04995381aa5c..4f2b8a7adb19 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
@@ -177,9 +177,9 @@ void omap1510_fpga_init_irq(void) | |||
177 | * NOTE: For general GPIO/MPUIO access and interrupts, please see | 177 | * NOTE: For general GPIO/MPUIO access and interrupts, please see |
178 | * gpio.[ch] | 178 | * gpio.[ch] |
179 | */ | 179 | */ |
180 | omap_request_gpio(13); | 180 | gpio_request(13, "FPGA irq"); |
181 | omap_set_gpio_direction(13, 1); | 181 | gpio_direction_input(13); |
182 | set_irq_type(OMAP_GPIO_IRQ(13), IRQ_TYPE_EDGE_RISING); | 182 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); |
183 | set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux); | 183 | set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux); |
184 | } | 184 | } |
185 | 185 | ||
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c index 13083d7e692d..89bb8756f450 100644 --- a/arch/arm/mach-omap1/id.c +++ b/arch/arm/mach-omap1/id.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/io.h> | 17 | #include <linux/io.h> |
18 | #include <mach/cpu.h> | ||
18 | 19 | ||
19 | #define OMAP_DIE_ID_0 0xfffe1800 | 20 | #define OMAP_DIE_ID_0 0xfffe1800 |
20 | #define OMAP_DIE_ID_1 0xfffe1804 | 21 | #define OMAP_DIE_ID_1 0xfffe1804 |
@@ -30,6 +31,8 @@ struct omap_id { | |||
30 | u32 type; /* Cpu id bits [31:08], cpu class bits [07:00] */ | 31 | u32 type; /* Cpu id bits [31:08], cpu class bits [07:00] */ |
31 | }; | 32 | }; |
32 | 33 | ||
34 | static unsigned int omap_revision; | ||
35 | |||
33 | /* Register values to detect the OMAP version */ | 36 | /* Register values to detect the OMAP version */ |
34 | static struct omap_id omap_ids[] __initdata = { | 37 | static struct omap_id omap_ids[] __initdata = { |
35 | { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 0x03100000}, | 38 | { .jtag_id = 0xb574, .die_rev = 0x2, .omap_id = 0x03310315, .type = 0x03100000}, |
@@ -53,6 +56,12 @@ static struct omap_id omap_ids[] __initdata = { | |||
53 | { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000}, | 56 | { .jtag_id = 0xb5f7, .die_rev = 0x2, .omap_id = 0x03330100, .type = 0x17100000}, |
54 | }; | 57 | }; |
55 | 58 | ||
59 | unsigned int omap_rev(void) | ||
60 | { | ||
61 | return omap_revision; | ||
62 | } | ||
63 | EXPORT_SYMBOL(omap_rev); | ||
64 | |||
56 | /* | 65 | /* |
57 | * Get OMAP type from PROD_ID. | 66 | * Get OMAP type from PROD_ID. |
58 | * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM. | 67 | * 1710 has the PROD_ID in bits 15:00, not in 16:01 as documented in TRM. |
@@ -121,17 +130,18 @@ void __init omap_check_revision(void) | |||
121 | omap_id = omap_readl(OMAP32_ID_0); | 130 | omap_id = omap_readl(OMAP32_ID_0); |
122 | 131 | ||
123 | #ifdef DEBUG | 132 | #ifdef DEBUG |
124 | printk("OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0)); | 133 | printk(KERN_DEBUG "OMAP_DIE_ID_0: 0x%08x\n", omap_readl(OMAP_DIE_ID_0)); |
125 | printk("OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n", | 134 | printk(KERN_DEBUG "OMAP_DIE_ID_1: 0x%08x DIE_REV: %i\n", |
126 | omap_readl(OMAP_DIE_ID_1), | 135 | omap_readl(OMAP_DIE_ID_1), |
127 | (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf); | 136 | (omap_readl(OMAP_DIE_ID_1) >> 17) & 0xf); |
128 | printk("OMAP_PRODUCTION_ID_0: 0x%08x\n", omap_readl(OMAP_PRODUCTION_ID_0)); | 137 | printk(KERN_DEBUG "OMAP_PRODUCTION_ID_0: 0x%08x\n", |
129 | printk("OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n", | 138 | omap_readl(OMAP_PRODUCTION_ID_0)); |
139 | printk(KERN_DEBUG "OMAP_PRODUCTION_ID_1: 0x%08x JTAG_ID: 0x%04x\n", | ||
130 | omap_readl(OMAP_PRODUCTION_ID_1), | 140 | omap_readl(OMAP_PRODUCTION_ID_1), |
131 | omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff); | 141 | omap_readl(OMAP_PRODUCTION_ID_1) & 0xffff); |
132 | printk("OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0)); | 142 | printk(KERN_DEBUG "OMAP32_ID_0: 0x%08x\n", omap_readl(OMAP32_ID_0)); |
133 | printk("OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1)); | 143 | printk(KERN_DEBUG "OMAP32_ID_1: 0x%08x\n", omap_readl(OMAP32_ID_1)); |
134 | printk("JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev); | 144 | printk(KERN_DEBUG "JTAG_ID: 0x%04x DIE_REV: %i\n", jtag_id, die_rev); |
135 | #endif | 145 | #endif |
136 | 146 | ||
137 | system_serial_high = omap_readl(OMAP_DIE_ID_0); | 147 | system_serial_high = omap_readl(OMAP_DIE_ID_0); |
@@ -140,7 +150,7 @@ void __init omap_check_revision(void) | |||
140 | /* First check only the major version in a safe way */ | 150 | /* First check only the major version in a safe way */ |
141 | for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { | 151 | for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { |
142 | if (jtag_id == (omap_ids[i].jtag_id)) { | 152 | if (jtag_id == (omap_ids[i].jtag_id)) { |
143 | system_rev = omap_ids[i].type; | 153 | omap_revision = omap_ids[i].type; |
144 | break; | 154 | break; |
145 | } | 155 | } |
146 | } | 156 | } |
@@ -148,7 +158,7 @@ void __init omap_check_revision(void) | |||
148 | /* Check if we can find the die revision */ | 158 | /* Check if we can find the die revision */ |
149 | for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { | 159 | for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { |
150 | if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) { | 160 | if (jtag_id == omap_ids[i].jtag_id && die_rev == omap_ids[i].die_rev) { |
151 | system_rev = omap_ids[i].type; | 161 | omap_revision = omap_ids[i].type; |
152 | break; | 162 | break; |
153 | } | 163 | } |
154 | } | 164 | } |
@@ -158,38 +168,35 @@ void __init omap_check_revision(void) | |||
158 | if (jtag_id == omap_ids[i].jtag_id | 168 | if (jtag_id == omap_ids[i].jtag_id |
159 | && die_rev == omap_ids[i].die_rev | 169 | && die_rev == omap_ids[i].die_rev |
160 | && omap_id == omap_ids[i].omap_id) { | 170 | && omap_id == omap_ids[i].omap_id) { |
161 | system_rev = omap_ids[i].type; | 171 | omap_revision = omap_ids[i].type; |
162 | break; | 172 | break; |
163 | } | 173 | } |
164 | } | 174 | } |
165 | 175 | ||
166 | /* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */ | 176 | /* Add the cpu class info (7xx, 15xx, 16xx, 24xx) */ |
167 | cpu_type = system_rev >> 24; | 177 | cpu_type = omap_revision >> 24; |
168 | 178 | ||
169 | switch (cpu_type) { | 179 | switch (cpu_type) { |
170 | case 0x07: | 180 | case 0x07: |
171 | system_rev |= 0x07; | 181 | omap_revision |= 0x07; |
172 | break; | 182 | break; |
173 | case 0x03: | 183 | case 0x03: |
174 | case 0x15: | 184 | case 0x15: |
175 | system_rev |= 0x15; | 185 | omap_revision |= 0x15; |
176 | break; | 186 | break; |
177 | case 0x16: | 187 | case 0x16: |
178 | case 0x17: | 188 | case 0x17: |
179 | system_rev |= 0x16; | 189 | omap_revision |= 0x16; |
180 | break; | ||
181 | case 0x24: | ||
182 | system_rev |= 0x24; | ||
183 | break; | 190 | break; |
184 | default: | 191 | default: |
185 | printk("Unknown OMAP cpu type: 0x%02x\n", cpu_type); | 192 | printk(KERN_INFO "Unknown OMAP cpu type: 0x%02x\n", cpu_type); |
186 | } | 193 | } |
187 | 194 | ||
188 | printk("OMAP%04x", system_rev >> 16); | 195 | printk(KERN_INFO "OMAP%04x", omap_revision >> 16); |
189 | if ((system_rev >> 8) & 0xff) | 196 | if ((omap_revision >> 8) & 0xff) |
190 | printk("%x", (system_rev >> 8) & 0xff); | 197 | printk(KERN_INFO "%x", (omap_revision >> 8) & 0xff); |
191 | printk(" revision %i handled as %02xxx id: %08x%08x\n", | 198 | printk(KERN_INFO " revision %i handled as %02xxx id: %08x%08x\n", |
192 | die_rev, system_rev & 0xff, system_serial_low, | 199 | die_rev, omap_revision & 0xff, system_serial_low, |
193 | system_serial_high); | 200 | system_serial_high); |
194 | } | 201 | } |
195 | 202 | ||
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c index 71fe2cc7f7cf..17c9d0e04216 100644 --- a/arch/arm/mach-omap1/leds-h2p2-debug.c +++ b/arch/arm/mach-omap1/leds-h2p2-debug.c | |||
@@ -65,8 +65,8 @@ void h2p2_dbg_leds_event(led_event_t evt) | |||
65 | /* all leds off during suspend or shutdown */ | 65 | /* all leds off during suspend or shutdown */ |
66 | 66 | ||
67 | if (! machine_is_omap_perseus2()) { | 67 | if (! machine_is_omap_perseus2()) { |
68 | omap_set_gpio_dataout(GPIO_TIMER, 0); | 68 | gpio_set_value(GPIO_TIMER, 0); |
69 | omap_set_gpio_dataout(GPIO_IDLE, 0); | 69 | gpio_set_value(GPIO_IDLE, 0); |
70 | } | 70 | } |
71 | 71 | ||
72 | __raw_writew(~0, &fpga->leds); | 72 | __raw_writew(~0, &fpga->leds); |
@@ -94,7 +94,7 @@ void h2p2_dbg_leds_event(led_event_t evt) | |||
94 | if (machine_is_omap_perseus2()) | 94 | if (machine_is_omap_perseus2()) |
95 | hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER; | 95 | hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER; |
96 | else { | 96 | else { |
97 | omap_set_gpio_dataout(GPIO_TIMER, led_state & LED_TIMER_ON); | 97 | gpio_set_value(GPIO_TIMER, led_state & LED_TIMER_ON); |
98 | goto done; | 98 | goto done; |
99 | } | 99 | } |
100 | 100 | ||
@@ -106,7 +106,7 @@ void h2p2_dbg_leds_event(led_event_t evt) | |||
106 | if (machine_is_omap_perseus2()) | 106 | if (machine_is_omap_perseus2()) |
107 | hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE; | 107 | hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE; |
108 | else { | 108 | else { |
109 | omap_set_gpio_dataout(GPIO_IDLE, 1); | 109 | gpio_set_value(GPIO_IDLE, 1); |
110 | goto done; | 110 | goto done; |
111 | } | 111 | } |
112 | 112 | ||
@@ -116,7 +116,7 @@ void h2p2_dbg_leds_event(led_event_t evt) | |||
116 | if (machine_is_omap_perseus2()) | 116 | if (machine_is_omap_perseus2()) |
117 | hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE; | 117 | hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE; |
118 | else { | 118 | else { |
119 | omap_set_gpio_dataout(GPIO_IDLE, 0); | 119 | gpio_set_value(GPIO_IDLE, 0); |
120 | goto done; | 120 | goto done; |
121 | } | 121 | } |
122 | 122 | ||
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c index 98e789622dfd..499d7ad8697d 100644 --- a/arch/arm/mach-omap1/leds-osk.c +++ b/arch/arm/mach-omap1/leds-osk.c | |||
@@ -44,8 +44,8 @@ static void mistral_setled(void) | |||
44 | green = 1; | 44 | green = 1; |
45 | /* else both sides are disabled */ | 45 | /* else both sides are disabled */ |
46 | 46 | ||
47 | omap_set_gpio_dataout(GPIO_LED_GREEN, green); | 47 | gpio_set_value(GPIO_LED_GREEN, green); |
48 | omap_set_gpio_dataout(GPIO_LED_RED, red); | 48 | gpio_set_value(GPIO_LED_RED, red); |
49 | } | 49 | } |
50 | 50 | ||
51 | #endif | 51 | #endif |
diff --git a/arch/arm/mach-omap1/leds.c b/arch/arm/mach-omap1/leds.c index 6cdad93c4a00..8cbf2562dcaa 100644 --- a/arch/arm/mach-omap1/leds.c +++ b/arch/arm/mach-omap1/leds.c | |||
@@ -47,14 +47,14 @@ omap_leds_init(void) | |||
47 | * that's a different kind of LED (just one color at a time). | 47 | * that's a different kind of LED (just one color at a time). |
48 | */ | 48 | */ |
49 | omap_cfg_reg(P18_1610_GPIO3); | 49 | omap_cfg_reg(P18_1610_GPIO3); |
50 | if (omap_request_gpio(3) == 0) | 50 | if (gpio_request(3, "LED red") == 0) |
51 | omap_set_gpio_direction(3, 0); | 51 | gpio_direction_output(3, 1); |
52 | else | 52 | else |
53 | printk(KERN_WARNING "LED: can't get GPIO3/red?\n"); | 53 | printk(KERN_WARNING "LED: can't get GPIO3/red?\n"); |
54 | 54 | ||
55 | omap_cfg_reg(MPUIO4); | 55 | omap_cfg_reg(MPUIO4); |
56 | if (omap_request_gpio(OMAP_MPUIO(4)) == 0) | 56 | if (gpio_request(OMAP_MPUIO(4), "LED green") == 0) |
57 | omap_set_gpio_direction(OMAP_MPUIO(4), 0); | 57 | gpio_direction_output(OMAP_MPUIO(4), 1); |
58 | else | 58 | else |
59 | printk(KERN_WARNING "LED: can't get MPUIO4/green?\n"); | 59 | printk(KERN_WARNING "LED: can't get MPUIO4/green?\n"); |
60 | } | 60 | } |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 770d256c790b..9774c1f5311e 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -226,7 +226,8 @@ void omap_pm_suspend(void) | |||
226 | { | 226 | { |
227 | unsigned long arg0 = 0, arg1 = 0; | 227 | unsigned long arg0 = 0, arg1 = 0; |
228 | 228 | ||
229 | printk("PM: OMAP%x is trying to enter deep sleep...\n", system_rev); | 229 | printk(KERN_INFO "PM: OMAP%x is trying to enter deep sleep...\n", |
230 | omap_rev()); | ||
230 | 231 | ||
231 | omap_serial_wake_trigger(1); | 232 | omap_serial_wake_trigger(1); |
232 | 233 | ||
@@ -421,7 +422,8 @@ void omap_pm_suspend(void) | |||
421 | 422 | ||
422 | omap_serial_wake_trigger(0); | 423 | omap_serial_wake_trigger(0); |
423 | 424 | ||
424 | printk("PM: OMAP%x is re-starting from deep sleep...\n", system_rev); | 425 | printk(KERN_INFO "PM: OMAP%x is re-starting from deep sleep...\n", |
426 | omap_rev()); | ||
425 | } | 427 | } |
426 | 428 | ||
427 | #if defined(DEBUG) && defined(CONFIG_PROC_FS) | 429 | #if defined(DEBUG) && defined(CONFIG_PROC_FS) |
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c index 528691d5cb51..0002084e0655 100644 --- a/arch/arm/mach-omap1/serial.c +++ b/arch/arm/mach-omap1/serial.c | |||
@@ -244,22 +244,22 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr) | |||
244 | { | 244 | { |
245 | int ret; | 245 | int ret; |
246 | 246 | ||
247 | ret = omap_request_gpio(gpio_nr); | 247 | ret = gpio_request(gpio_nr, "UART wake"); |
248 | if (ret < 0) { | 248 | if (ret < 0) { |
249 | printk(KERN_ERR "Could not request UART wake GPIO: %i\n", | 249 | printk(KERN_ERR "Could not request UART wake GPIO: %i\n", |
250 | gpio_nr); | 250 | gpio_nr); |
251 | return; | 251 | return; |
252 | } | 252 | } |
253 | omap_set_gpio_direction(gpio_nr, 1); | 253 | gpio_direction_input(gpio_nr); |
254 | ret = request_irq(OMAP_GPIO_IRQ(gpio_nr), &omap_serial_wake_interrupt, | 254 | ret = request_irq(gpio_to_irq(gpio_nr), &omap_serial_wake_interrupt, |
255 | IRQF_TRIGGER_RISING, "serial wakeup", NULL); | 255 | IRQF_TRIGGER_RISING, "serial wakeup", NULL); |
256 | if (ret) { | 256 | if (ret) { |
257 | omap_free_gpio(gpio_nr); | 257 | gpio_free(gpio_nr); |
258 | printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n", | 258 | printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n", |
259 | gpio_nr); | 259 | gpio_nr); |
260 | return; | 260 | return; |
261 | } | 261 | } |
262 | enable_irq_wake(OMAP_GPIO_IRQ(gpio_nr)); | 262 | enable_irq_wake(gpio_to_irq(gpio_nr)); |
263 | } | 263 | } |
264 | 264 | ||
265 | static int __init omap_serial_wakeup_init(void) | 265 | static int __init omap_serial_wakeup_init(void) |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 4832fcc7d04a..3754b79092ab 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -55,3 +55,7 @@ config MACH_OMAP_LDP | |||
55 | config MACH_OVERO | 55 | config MACH_OVERO |
56 | bool "Gumstix Overo board" | 56 | bool "Gumstix Overo board" |
57 | depends on ARCH_OMAP3 && ARCH_OMAP34XX | 57 | depends on ARCH_OMAP3 && ARCH_OMAP34XX |
58 | |||
59 | config MACH_OMAP3_PANDORA | ||
60 | bool "OMAP3 Pandora" | ||
61 | depends on ARCH_OMAP3 && ARCH_OMAP34XX \ No newline at end of file | ||
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index c69392372c99..bbd12bc10fdc 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -27,9 +27,15 @@ obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o | |||
27 | # Specific board support | 27 | # Specific board support |
28 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o | 28 | obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o |
29 | obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o | 29 | obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o |
30 | obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o | 30 | obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o \ |
31 | mmc-twl4030.o | ||
31 | obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o | 32 | obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o |
32 | obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o | 33 | obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \ |
33 | obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o | 34 | mmc-twl4030.o |
34 | obj-$(CONFIG_MACH_OVERO) += board-overo.o | 35 | obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o \ |
36 | mmc-twl4030.o | ||
37 | obj-$(CONFIG_MACH_OVERO) += board-overo.o \ | ||
38 | mmc-twl4030.o | ||
39 | obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o \ | ||
40 | mmc-twl4030.o | ||
35 | 41 | ||
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index 24688efaa445..83fa37211d77 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/mtd/mtd.h> | 19 | #include <linux/mtd/mtd.h> |
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/i2c/twl4030.h> | ||
22 | #include <linux/err.h> | 23 | #include <linux/err.h> |
23 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
24 | #include <linux/io.h> | 25 | #include <linux/io.h> |
@@ -35,6 +36,7 @@ | |||
35 | #include <mach/common.h> | 36 | #include <mach/common.h> |
36 | #include <mach/gpmc.h> | 37 | #include <mach/gpmc.h> |
37 | 38 | ||
39 | #include "mmc-twl4030.h" | ||
38 | 40 | ||
39 | #define SDP2430_FLASH_CS 0 | 41 | #define SDP2430_FLASH_CS 0 |
40 | #define SDP2430_SMC91X_CS 5 | 42 | #define SDP2430_SMC91X_CS 5 |
@@ -168,13 +170,13 @@ static inline void __init sdp2430_init_smc91x(void) | |||
168 | sdp2430_smc91x_resources[0].end = cs_mem_base + 0x30f; | 170 | sdp2430_smc91x_resources[0].end = cs_mem_base + 0x30f; |
169 | udelay(100); | 171 | udelay(100); |
170 | 172 | ||
171 | if (omap_request_gpio(OMAP24XX_ETHR_GPIO_IRQ) < 0) { | 173 | if (gpio_request(OMAP24XX_ETHR_GPIO_IRQ, "SMC91x irq") < 0) { |
172 | printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", | 174 | printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", |
173 | OMAP24XX_ETHR_GPIO_IRQ); | 175 | OMAP24XX_ETHR_GPIO_IRQ); |
174 | gpmc_cs_free(eth_cs); | 176 | gpmc_cs_free(eth_cs); |
175 | goto out; | 177 | goto out; |
176 | } | 178 | } |
177 | omap_set_gpio_direction(OMAP24XX_ETHR_GPIO_IRQ, 1); | 179 | gpio_direction_input(OMAP24XX_ETHR_GPIO_IRQ); |
178 | 180 | ||
179 | out: | 181 | out: |
180 | clk_disable(gpmc_fck); | 182 | clk_disable(gpmc_fck); |
@@ -197,12 +199,58 @@ static struct omap_board_config_kernel sdp2430_config[] = { | |||
197 | {OMAP_TAG_UART, &sdp2430_uart_config}, | 199 | {OMAP_TAG_UART, &sdp2430_uart_config}, |
198 | }; | 200 | }; |
199 | 201 | ||
202 | |||
203 | static struct twl4030_gpio_platform_data sdp2430_gpio_data = { | ||
204 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
205 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
206 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
207 | }; | ||
208 | |||
209 | static struct twl4030_platform_data sdp2430_twldata = { | ||
210 | .irq_base = TWL4030_IRQ_BASE, | ||
211 | .irq_end = TWL4030_IRQ_END, | ||
212 | |||
213 | /* platform_data for children goes here */ | ||
214 | .gpio = &sdp2430_gpio_data, | ||
215 | }; | ||
216 | |||
217 | static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = { | ||
218 | { | ||
219 | I2C_BOARD_INFO("twl4030", 0x48), | ||
220 | .flags = I2C_CLIENT_WAKE, | ||
221 | .irq = INT_24XX_SYS_NIRQ, | ||
222 | .platform_data = &sdp2430_twldata, | ||
223 | }, | ||
224 | }; | ||
225 | |||
226 | static int __init omap2430_i2c_init(void) | ||
227 | { | ||
228 | omap_register_i2c_bus(1, 400, NULL, 0); | ||
229 | omap_register_i2c_bus(2, 2600, sdp2430_i2c_boardinfo, | ||
230 | ARRAY_SIZE(sdp2430_i2c_boardinfo)); | ||
231 | return 0; | ||
232 | } | ||
233 | |||
234 | static struct twl4030_hsmmc_info mmc[] __initdata = { | ||
235 | { | ||
236 | .mmc = 1, | ||
237 | .wires = 4, | ||
238 | .gpio_cd = -EINVAL, | ||
239 | .gpio_wp = -EINVAL, | ||
240 | .ext_clock = 1, | ||
241 | }, | ||
242 | {} /* Terminator */ | ||
243 | }; | ||
244 | |||
200 | static void __init omap_2430sdp_init(void) | 245 | static void __init omap_2430sdp_init(void) |
201 | { | 246 | { |
247 | omap2430_i2c_init(); | ||
248 | |||
202 | platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); | 249 | platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices)); |
203 | omap_board_config = sdp2430_config; | 250 | omap_board_config = sdp2430_config; |
204 | omap_board_config_size = ARRAY_SIZE(sdp2430_config); | 251 | omap_board_config_size = ARRAY_SIZE(sdp2430_config); |
205 | omap_serial_init(); | 252 | omap_serial_init(); |
253 | twl4030_mmc_init(mmc); | ||
206 | } | 254 | } |
207 | 255 | ||
208 | static void __init omap_2430sdp_map_io(void) | 256 | static void __init omap_2430sdp_map_io(void) |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 989ad152d7f8..bf1e5d32c2a3 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -236,13 +236,13 @@ static inline void __init apollon_init_smc91x(void) | |||
236 | udelay(100); | 236 | udelay(100); |
237 | 237 | ||
238 | omap_cfg_reg(W4__24XX_GPIO74); | 238 | omap_cfg_reg(W4__24XX_GPIO74); |
239 | if (omap_request_gpio(APOLLON_ETHR_GPIO_IRQ) < 0) { | 239 | if (gpio_request(APOLLON_ETHR_GPIO_IRQ, "SMC91x irq") < 0) { |
240 | printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", | 240 | printk(KERN_ERR "Failed to request GPIO%d for smc91x IRQ\n", |
241 | APOLLON_ETHR_GPIO_IRQ); | 241 | APOLLON_ETHR_GPIO_IRQ); |
242 | gpmc_cs_free(APOLLON_ETH_CS); | 242 | gpmc_cs_free(APOLLON_ETH_CS); |
243 | goto out; | 243 | goto out; |
244 | } | 244 | } |
245 | omap_set_gpio_direction(APOLLON_ETHR_GPIO_IRQ, 1); | 245 | gpio_direction_input(APOLLON_ETHR_GPIO_IRQ); |
246 | 246 | ||
247 | out: | 247 | out: |
248 | clk_disable(gpmc_fck); | 248 | clk_disable(gpmc_fck); |
@@ -261,16 +261,6 @@ static struct omap_uart_config apollon_uart_config __initdata = { | |||
261 | .enabled_uarts = (1 << 0) | (0 << 1) | (0 << 2), | 261 | .enabled_uarts = (1 << 0) | (0 << 1) | (0 << 2), |
262 | }; | 262 | }; |
263 | 263 | ||
264 | static struct omap_mmc_config apollon_mmc_config __initdata = { | ||
265 | .mmc [0] = { | ||
266 | .enabled = 1, | ||
267 | .wire4 = 1, | ||
268 | .wp_pin = -1, | ||
269 | .power_pin = -1, | ||
270 | .switch_pin = -1, | ||
271 | }, | ||
272 | }; | ||
273 | |||
274 | static struct omap_usb_config apollon_usb_config __initdata = { | 264 | static struct omap_usb_config apollon_usb_config __initdata = { |
275 | .register_dev = 1, | 265 | .register_dev = 1, |
276 | .hmc_mode = 0x14, /* 0:dev 1:host1 2:disable */ | 266 | .hmc_mode = 0x14, /* 0:dev 1:host1 2:disable */ |
@@ -284,7 +274,6 @@ static struct omap_lcd_config apollon_lcd_config __initdata = { | |||
284 | 274 | ||
285 | static struct omap_board_config_kernel apollon_config[] = { | 275 | static struct omap_board_config_kernel apollon_config[] = { |
286 | { OMAP_TAG_UART, &apollon_uart_config }, | 276 | { OMAP_TAG_UART, &apollon_uart_config }, |
287 | { OMAP_TAG_MMC, &apollon_mmc_config }, | ||
288 | { OMAP_TAG_USB, &apollon_usb_config }, | 277 | { OMAP_TAG_USB, &apollon_usb_config }, |
289 | { OMAP_TAG_LCD, &apollon_lcd_config }, | 278 | { OMAP_TAG_LCD, &apollon_lcd_config }, |
290 | }; | 279 | }; |
@@ -327,15 +316,15 @@ static void __init apollon_sw_init(void) | |||
327 | /* Enter SW - Y11 */ | 316 | /* Enter SW - Y11 */ |
328 | omap_cfg_reg(Y11_242X_GPIO16); | 317 | omap_cfg_reg(Y11_242X_GPIO16); |
329 | omap_request_gpio(SW_ENTER_GPIO16); | 318 | omap_request_gpio(SW_ENTER_GPIO16); |
330 | omap_set_gpio_direction(SW_ENTER_GPIO16, 1); | 319 | gpio_direction_input(SW_ENTER_GPIO16); |
331 | /* Up SW - AA12 */ | 320 | /* Up SW - AA12 */ |
332 | omap_cfg_reg(AA12_242X_GPIO17); | 321 | omap_cfg_reg(AA12_242X_GPIO17); |
333 | omap_request_gpio(SW_UP_GPIO17); | 322 | omap_request_gpio(SW_UP_GPIO17); |
334 | omap_set_gpio_direction(SW_UP_GPIO17, 1); | 323 | gpio_direction_input(SW_UP_GPIO17); |
335 | /* Down SW - AA8 */ | 324 | /* Down SW - AA8 */ |
336 | omap_cfg_reg(AA8_242X_GPIO58); | 325 | omap_cfg_reg(AA8_242X_GPIO58); |
337 | omap_request_gpio(SW_DOWN_GPIO58); | 326 | omap_request_gpio(SW_DOWN_GPIO58); |
338 | omap_set_gpio_direction(SW_DOWN_GPIO58, 1); | 327 | gpio_direction_input(SW_DOWN_GPIO58); |
339 | 328 | ||
340 | set_irq_type(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), IRQ_TYPE_EDGE_RISING); | 329 | set_irq_type(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), IRQ_TYPE_EDGE_RISING); |
341 | if (request_irq(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), &apollon_sw_interrupt, | 330 | if (request_irq(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), &apollon_sw_interrupt, |
@@ -359,9 +348,8 @@ static void __init apollon_usb_init(void) | |||
359 | /* USB device */ | 348 | /* USB device */ |
360 | /* DEVICE_SUSPEND */ | 349 | /* DEVICE_SUSPEND */ |
361 | omap_cfg_reg(P21_242X_GPIO12); | 350 | omap_cfg_reg(P21_242X_GPIO12); |
362 | omap_request_gpio(12); | 351 | gpio_request(12, "USB suspend"); |
363 | omap_set_gpio_direction(12, 0); /* OUT */ | 352 | gpio_direction_output(12, 0); |
364 | omap_set_gpio_dataout(12, 0); | ||
365 | } | 353 | } |
366 | 354 | ||
367 | static void __init omap_apollon_init(void) | 355 | static void __init omap_apollon_init(void) |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 9ba097868e72..3b34c20d1df4 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -41,19 +41,8 @@ static struct omap_uart_config generic_uart_config __initdata = { | |||
41 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 41 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static struct omap_mmc_config generic_mmc_config __initdata = { | ||
45 | .mmc [0] = { | ||
46 | .enabled = 0, | ||
47 | .wire4 = 0, | ||
48 | .wp_pin = -1, | ||
49 | .power_pin = -1, | ||
50 | .switch_pin = -1, | ||
51 | }, | ||
52 | }; | ||
53 | |||
54 | static struct omap_board_config_kernel generic_config[] = { | 44 | static struct omap_board_config_kernel generic_config[] = { |
55 | { OMAP_TAG_UART, &generic_uart_config }, | 45 | { OMAP_TAG_UART, &generic_uart_config }, |
56 | { OMAP_TAG_MMC, &generic_mmc_config }, | ||
57 | }; | 46 | }; |
58 | 47 | ||
59 | static void __init omap_generic_init(void) | 48 | static void __init omap_generic_init(void) |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 2fef2c845083..5e9b14675b1e 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/workqueue.h> | 20 | #include <linux/workqueue.h> |
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/i2c/at24.h> | ||
22 | #include <linux/input.h> | 23 | #include <linux/input.h> |
23 | #include <linux/err.h> | 24 | #include <linux/err.h> |
24 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
@@ -372,31 +373,33 @@ static struct omap_uart_config h4_uart_config __initdata = { | |||
372 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 373 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
373 | }; | 374 | }; |
374 | 375 | ||
375 | static struct omap_mmc_config h4_mmc_config __initdata = { | ||
376 | .mmc [0] = { | ||
377 | .enabled = 1, | ||
378 | .wire4 = 1, | ||
379 | .wp_pin = -1, | ||
380 | .power_pin = -1, | ||
381 | .switch_pin = -1, | ||
382 | }, | ||
383 | }; | ||
384 | |||
385 | static struct omap_lcd_config h4_lcd_config __initdata = { | 376 | static struct omap_lcd_config h4_lcd_config __initdata = { |
386 | .ctrl_name = "internal", | 377 | .ctrl_name = "internal", |
387 | }; | 378 | }; |
388 | 379 | ||
389 | static struct omap_board_config_kernel h4_config[] = { | 380 | static struct omap_board_config_kernel h4_config[] = { |
390 | { OMAP_TAG_UART, &h4_uart_config }, | 381 | { OMAP_TAG_UART, &h4_uart_config }, |
391 | { OMAP_TAG_MMC, &h4_mmc_config }, | ||
392 | { OMAP_TAG_LCD, &h4_lcd_config }, | 382 | { OMAP_TAG_LCD, &h4_lcd_config }, |
393 | }; | 383 | }; |
394 | 384 | ||
385 | static struct at24_platform_data m24c01 = { | ||
386 | .byte_len = SZ_1K / 8, | ||
387 | .page_size = 16, | ||
388 | }; | ||
389 | |||
395 | static struct i2c_board_info __initdata h4_i2c_board_info[] = { | 390 | static struct i2c_board_info __initdata h4_i2c_board_info[] = { |
396 | { | 391 | { |
397 | I2C_BOARD_INFO("isp1301_omap", 0x2d), | 392 | I2C_BOARD_INFO("isp1301_omap", 0x2d), |
398 | .irq = OMAP_GPIO_IRQ(125), | 393 | .irq = OMAP_GPIO_IRQ(125), |
399 | }, | 394 | }, |
395 | { /* EEPROM on mainboard */ | ||
396 | I2C_BOARD_INFO("24c01", 0x52), | ||
397 | .platform_data = &m24c01, | ||
398 | }, | ||
399 | { /* EEPROM on cpu card */ | ||
400 | I2C_BOARD_INFO("24c01", 0x57), | ||
401 | .platform_data = &m24c01, | ||
402 | }, | ||
400 | }; | 403 | }; |
401 | 404 | ||
402 | static void __init omap_h4_init(void) | 405 | static void __init omap_h4_init(void) |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index 1ea59986aa7a..aa6972781e4a 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/clk.h> | 21 | #include <linux/clk.h> |
22 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
23 | #include <linux/spi/ads7846.h> | 23 | #include <linux/spi/ads7846.h> |
24 | #include <linux/i2c/twl4030.h> | ||
24 | 25 | ||
25 | #include <mach/hardware.h> | 26 | #include <mach/hardware.h> |
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
@@ -38,11 +39,69 @@ | |||
38 | #include <asm/delay.h> | 39 | #include <asm/delay.h> |
39 | #include <mach/control.h> | 40 | #include <mach/control.h> |
40 | 41 | ||
42 | #include "mmc-twl4030.h" | ||
43 | |||
44 | #define SDP3430_SMC91X_CS 3 | ||
45 | |||
46 | static struct resource ldp_smc911x_resources[] = { | ||
47 | [0] = { | ||
48 | .start = OMAP34XX_ETHR_START, | ||
49 | .end = OMAP34XX_ETHR_START + SZ_4K, | ||
50 | .flags = IORESOURCE_MEM, | ||
51 | }, | ||
52 | [1] = { | ||
53 | .start = 0, | ||
54 | .end = 0, | ||
55 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, | ||
56 | }, | ||
57 | }; | ||
58 | |||
59 | static struct platform_device ldp_smc911x_device = { | ||
60 | .name = "smc911x", | ||
61 | .id = -1, | ||
62 | .num_resources = ARRAY_SIZE(ldp_smc911x_resources), | ||
63 | .resource = ldp_smc911x_resources, | ||
64 | }; | ||
65 | |||
66 | static struct platform_device *ldp_devices[] __initdata = { | ||
67 | &ldp_smc911x_device, | ||
68 | }; | ||
69 | |||
70 | static inline void __init ldp_init_smc911x(void) | ||
71 | { | ||
72 | int eth_cs; | ||
73 | unsigned long cs_mem_base; | ||
74 | int eth_gpio = 0; | ||
75 | |||
76 | eth_cs = LDP_SMC911X_CS; | ||
77 | |||
78 | if (gpmc_cs_request(eth_cs, SZ_16M, &cs_mem_base) < 0) { | ||
79 | printk(KERN_ERR "Failed to request GPMC mem for smc911x\n"); | ||
80 | return; | ||
81 | } | ||
82 | |||
83 | ldp_smc911x_resources[0].start = cs_mem_base + 0x0; | ||
84 | ldp_smc911x_resources[0].end = cs_mem_base + 0xf; | ||
85 | udelay(100); | ||
86 | |||
87 | eth_gpio = LDP_SMC911X_GPIO; | ||
88 | |||
89 | ldp_smc911x_resources[1].start = OMAP_GPIO_IRQ(eth_gpio); | ||
90 | |||
91 | if (omap_request_gpio(eth_gpio) < 0) { | ||
92 | printk(KERN_ERR "Failed to request GPIO%d for smc911x IRQ\n", | ||
93 | eth_gpio); | ||
94 | return; | ||
95 | } | ||
96 | gpio_direction_input(eth_gpio); | ||
97 | } | ||
98 | |||
41 | static void __init omap_ldp_init_irq(void) | 99 | static void __init omap_ldp_init_irq(void) |
42 | { | 100 | { |
43 | omap2_init_common_hw(); | 101 | omap2_init_common_hw(); |
44 | omap_init_irq(); | 102 | omap_init_irq(); |
45 | omap_gpio_init(); | 103 | omap_gpio_init(); |
104 | ldp_init_smc911x(); | ||
46 | } | 105 | } |
47 | 106 | ||
48 | static struct omap_uart_config ldp_uart_config __initdata = { | 107 | static struct omap_uart_config ldp_uart_config __initdata = { |
@@ -53,20 +112,56 @@ static struct omap_board_config_kernel ldp_config[] __initdata = { | |||
53 | { OMAP_TAG_UART, &ldp_uart_config }, | 112 | { OMAP_TAG_UART, &ldp_uart_config }, |
54 | }; | 113 | }; |
55 | 114 | ||
115 | static struct twl4030_gpio_platform_data ldp_gpio_data = { | ||
116 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
117 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
118 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
119 | }; | ||
120 | |||
121 | static struct twl4030_platform_data ldp_twldata = { | ||
122 | .irq_base = TWL4030_IRQ_BASE, | ||
123 | .irq_end = TWL4030_IRQ_END, | ||
124 | |||
125 | /* platform_data for children goes here */ | ||
126 | .gpio = &ldp_gpio_data, | ||
127 | }; | ||
128 | |||
129 | static struct i2c_board_info __initdata ldp_i2c_boardinfo[] = { | ||
130 | { | ||
131 | I2C_BOARD_INFO("twl4030", 0x48), | ||
132 | .flags = I2C_CLIENT_WAKE, | ||
133 | .irq = INT_34XX_SYS_NIRQ, | ||
134 | .platform_data = &ldp_twldata, | ||
135 | }, | ||
136 | }; | ||
137 | |||
56 | static int __init omap_i2c_init(void) | 138 | static int __init omap_i2c_init(void) |
57 | { | 139 | { |
58 | omap_register_i2c_bus(1, 2600, NULL, 0); | 140 | omap_register_i2c_bus(1, 2600, ldp_i2c_boardinfo, |
141 | ARRAY_SIZE(ldp_i2c_boardinfo)); | ||
59 | omap_register_i2c_bus(2, 400, NULL, 0); | 142 | omap_register_i2c_bus(2, 400, NULL, 0); |
60 | omap_register_i2c_bus(3, 400, NULL, 0); | 143 | omap_register_i2c_bus(3, 400, NULL, 0); |
61 | return 0; | 144 | return 0; |
62 | } | 145 | } |
63 | 146 | ||
147 | static struct twl4030_hsmmc_info mmc[] __initdata = { | ||
148 | { | ||
149 | .mmc = 1, | ||
150 | .wires = 4, | ||
151 | .gpio_cd = -EINVAL, | ||
152 | .gpio_wp = -EINVAL, | ||
153 | }, | ||
154 | {} /* Terminator */ | ||
155 | }; | ||
156 | |||
64 | static void __init omap_ldp_init(void) | 157 | static void __init omap_ldp_init(void) |
65 | { | 158 | { |
66 | omap_i2c_init(); | 159 | omap_i2c_init(); |
160 | platform_add_devices(ldp_devices, ARRAY_SIZE(ldp_devices)); | ||
67 | omap_board_config = ldp_config; | 161 | omap_board_config = ldp_config; |
68 | omap_board_config_size = ARRAY_SIZE(ldp_config); | 162 | omap_board_config_size = ARRAY_SIZE(ldp_config); |
69 | omap_serial_init(); | 163 | omap_serial_init(); |
164 | twl4030_mmc_init(mmc); | ||
70 | } | 165 | } |
71 | 166 | ||
72 | static void __init omap_ldp_map_io(void) | 167 | static void __init omap_ldp_map_io(void) |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index baa79674e9d5..9e5ada01b5fa 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -38,7 +38,9 @@ | |||
38 | #include <mach/common.h> | 38 | #include <mach/common.h> |
39 | #include <mach/gpmc.h> | 39 | #include <mach/gpmc.h> |
40 | #include <mach/nand.h> | 40 | #include <mach/nand.h> |
41 | #include <mach/mux.h> | ||
41 | 42 | ||
43 | #include "mmc-twl4030.h" | ||
42 | 44 | ||
43 | #define GPMC_CS0_BASE 0x60 | 45 | #define GPMC_CS0_BASE 0x60 |
44 | #define GPMC_CS_SIZE 0x30 | 46 | #define GPMC_CS_SIZE 0x30 |
@@ -103,6 +105,78 @@ static struct omap_uart_config omap3_beagle_uart_config __initdata = { | |||
103 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 105 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
104 | }; | 106 | }; |
105 | 107 | ||
108 | static struct twl4030_hsmmc_info mmc[] = { | ||
109 | { | ||
110 | .mmc = 1, | ||
111 | .wires = 8, | ||
112 | .gpio_wp = 29, | ||
113 | }, | ||
114 | {} /* Terminator */ | ||
115 | }; | ||
116 | |||
117 | static struct gpio_led gpio_leds[]; | ||
118 | |||
119 | static int beagle_twl_gpio_setup(struct device *dev, | ||
120 | unsigned gpio, unsigned ngpio) | ||
121 | { | ||
122 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | ||
123 | |||
124 | /* REVISIT: need ehci-omap hooks for external VBUS | ||
125 | * power switch and overcurrent detect | ||
126 | */ | ||
127 | |||
128 | gpio_request(gpio + 1, "EHCI_nOC"); | ||
129 | gpio_direction_input(gpio + 1); | ||
130 | |||
131 | /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ | ||
132 | gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); | ||
133 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); | ||
134 | |||
135 | /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ | ||
136 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | ||
137 | |||
138 | return 0; | ||
139 | } | ||
140 | |||
141 | static struct twl4030_gpio_platform_data beagle_gpio_data = { | ||
142 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
143 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
144 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
145 | .use_leds = true, | ||
146 | .pullups = BIT(1), | ||
147 | .pulldowns = BIT(2) | BIT(6) | BIT(7) | BIT(8) | BIT(13) | ||
148 | | BIT(15) | BIT(16) | BIT(17), | ||
149 | .setup = beagle_twl_gpio_setup, | ||
150 | }; | ||
151 | |||
152 | static struct twl4030_platform_data beagle_twldata = { | ||
153 | .irq_base = TWL4030_IRQ_BASE, | ||
154 | .irq_end = TWL4030_IRQ_END, | ||
155 | |||
156 | /* platform_data for children goes here */ | ||
157 | .gpio = &beagle_gpio_data, | ||
158 | }; | ||
159 | |||
160 | static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { | ||
161 | { | ||
162 | I2C_BOARD_INFO("twl4030", 0x48), | ||
163 | .flags = I2C_CLIENT_WAKE, | ||
164 | .irq = INT_34XX_SYS_NIRQ, | ||
165 | .platform_data = &beagle_twldata, | ||
166 | }, | ||
167 | }; | ||
168 | |||
169 | static int __init omap3_beagle_i2c_init(void) | ||
170 | { | ||
171 | omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, | ||
172 | ARRAY_SIZE(beagle_i2c_boardinfo)); | ||
173 | #ifdef CONFIG_I2C2_OMAP_BEAGLE | ||
174 | omap_register_i2c_bus(2, 400, NULL, 0); | ||
175 | #endif | ||
176 | omap_register_i2c_bus(3, 400, NULL, 0); | ||
177 | return 0; | ||
178 | } | ||
179 | |||
106 | static void __init omap3_beagle_init_irq(void) | 180 | static void __init omap3_beagle_init_irq(void) |
107 | { | 181 | { |
108 | omap2_init_common_hw(); | 182 | omap2_init_common_hw(); |
@@ -130,6 +204,11 @@ static struct gpio_led gpio_leds[] = { | |||
130 | .default_trigger = "mmc0", | 204 | .default_trigger = "mmc0", |
131 | .gpio = 149, | 205 | .gpio = 149, |
132 | }, | 206 | }, |
207 | { | ||
208 | .name = "beagleboard::pmu_stat", | ||
209 | .gpio = -EINVAL, /* gets replaced */ | ||
210 | .active_low = true, | ||
211 | }, | ||
133 | }; | 212 | }; |
134 | 213 | ||
135 | static struct gpio_led_platform_data gpio_led_info = { | 214 | static struct gpio_led_platform_data gpio_led_info = { |
@@ -218,11 +297,22 @@ static void __init omap3beagle_flash_init(void) | |||
218 | 297 | ||
219 | static void __init omap3_beagle_init(void) | 298 | static void __init omap3_beagle_init(void) |
220 | { | 299 | { |
300 | omap3_beagle_i2c_init(); | ||
221 | platform_add_devices(omap3_beagle_devices, | 301 | platform_add_devices(omap3_beagle_devices, |
222 | ARRAY_SIZE(omap3_beagle_devices)); | 302 | ARRAY_SIZE(omap3_beagle_devices)); |
223 | omap_board_config = omap3_beagle_config; | 303 | omap_board_config = omap3_beagle_config; |
224 | omap_board_config_size = ARRAY_SIZE(omap3_beagle_config); | 304 | omap_board_config_size = ARRAY_SIZE(omap3_beagle_config); |
225 | omap_serial_init(); | 305 | omap_serial_init(); |
306 | |||
307 | omap_cfg_reg(AH8_34XX_GPIO29); | ||
308 | mmc[0].gpio_cd = gpio + 0; | ||
309 | twl4030_mmc_init(mmc); | ||
310 | |||
311 | omap_cfg_reg(J25_34XX_GPIO170); | ||
312 | gpio_request(170, "DVI_nPD"); | ||
313 | /* REVISIT leave DVI powered down until it's needed ... */ | ||
314 | gpio_direction_output(170, true); | ||
315 | |||
226 | omap3beagle_flash_init(); | 316 | omap3beagle_flash_init(); |
227 | } | 317 | } |
228 | 318 | ||
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c new file mode 100644 index 000000000000..b3196107afdb --- /dev/null +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -0,0 +1,212 @@ | |||
1 | /* | ||
2 | * board-omap3pandora.c (Pandora Handheld Console) | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * version 2 as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, but | ||
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
11 | * General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
16 | * 02110-1301 USA | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #include <linux/init.h> | ||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/platform_device.h> | ||
23 | |||
24 | #include <linux/spi/spi.h> | ||
25 | #include <linux/spi/ads7846.h> | ||
26 | #include <linux/i2c/twl4030.h> | ||
27 | |||
28 | #include <asm/mach-types.h> | ||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | |||
32 | #include <mach/board.h> | ||
33 | #include <mach/common.h> | ||
34 | #include <mach/gpio.h> | ||
35 | #include <mach/hardware.h> | ||
36 | #include <mach/mcspi.h> | ||
37 | |||
38 | #include "mmc-twl4030.h" | ||
39 | |||
40 | #define OMAP3_PANDORA_TS_GPIO 94 | ||
41 | |||
42 | static struct twl4030_hsmmc_info omap3pandora_mmc[] = { | ||
43 | { | ||
44 | .mmc = 1, | ||
45 | .wires = 4, | ||
46 | .gpio_cd = -EINVAL, | ||
47 | .gpio_wp = 126, | ||
48 | .ext_clock = 0, | ||
49 | }, | ||
50 | { | ||
51 | .mmc = 2, | ||
52 | .wires = 4, | ||
53 | .gpio_cd = -EINVAL, | ||
54 | .gpio_wp = 127, | ||
55 | .ext_clock = 1, | ||
56 | }, | ||
57 | {} /* Terminator */ | ||
58 | }; | ||
59 | |||
60 | static struct omap_uart_config omap3pandora_uart_config __initdata = { | ||
61 | .enabled_uarts = (1 << 2), /* UART3 */ | ||
62 | }; | ||
63 | |||
64 | static int omap3pandora_twl_gpio_setup(struct device *dev, | ||
65 | unsigned gpio, unsigned ngpio) | ||
66 | { | ||
67 | /* gpio + {0,1} is "mmc{0,1}_cd" (input/IRQ) */ | ||
68 | omap3pandora_mmc[0].gpio_cd = gpio + 0; | ||
69 | omap3pandora_mmc[1].gpio_cd = gpio + 1; | ||
70 | twl4030_mmc_init(omap3pandora_mmc); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { | ||
76 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
77 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
78 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
79 | .setup = omap3pandora_twl_gpio_setup, | ||
80 | }; | ||
81 | |||
82 | static struct twl4030_usb_data omap3pandora_usb_data = { | ||
83 | .usb_mode = T2_USB_MODE_ULPI, | ||
84 | }; | ||
85 | |||
86 | static struct twl4030_platform_data omap3pandora_twldata = { | ||
87 | .irq_base = TWL4030_IRQ_BASE, | ||
88 | .irq_end = TWL4030_IRQ_END, | ||
89 | .gpio = &omap3pandora_gpio_data, | ||
90 | .usb = &omap3pandora_usb_data, | ||
91 | }; | ||
92 | |||
93 | static struct i2c_board_info __initdata omap3pandora_i2c_boardinfo[] = { | ||
94 | { | ||
95 | I2C_BOARD_INFO("tps65950", 0x48), | ||
96 | .flags = I2C_CLIENT_WAKE, | ||
97 | .irq = INT_34XX_SYS_NIRQ, | ||
98 | .platform_data = &omap3pandora_twldata, | ||
99 | }, | ||
100 | }; | ||
101 | |||
102 | static int __init omap3pandora_i2c_init(void) | ||
103 | { | ||
104 | omap_register_i2c_bus(1, 2600, omap3pandora_i2c_boardinfo, | ||
105 | ARRAY_SIZE(omap3pandora_i2c_boardinfo)); | ||
106 | /* i2c2 pins are not connected */ | ||
107 | omap_register_i2c_bus(3, 400, NULL, 0); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static void __init omap3pandora_init_irq(void) | ||
112 | { | ||
113 | omap2_init_common_hw(); | ||
114 | omap_init_irq(); | ||
115 | omap_gpio_init(); | ||
116 | } | ||
117 | |||
118 | static void __init omap3pandora_ads7846_init(void) | ||
119 | { | ||
120 | int gpio = OMAP3_PANDORA_TS_GPIO; | ||
121 | int ret; | ||
122 | |||
123 | ret = gpio_request(gpio, "ads7846_pen_down"); | ||
124 | if (ret < 0) { | ||
125 | printk(KERN_ERR "Failed to request GPIO %d for " | ||
126 | "ads7846 pen down IRQ\n", gpio); | ||
127 | return; | ||
128 | } | ||
129 | |||
130 | gpio_direction_input(gpio); | ||
131 | } | ||
132 | |||
133 | static int ads7846_get_pendown_state(void) | ||
134 | { | ||
135 | return !gpio_get_value(OMAP3_PANDORA_TS_GPIO); | ||
136 | } | ||
137 | |||
138 | static struct ads7846_platform_data ads7846_config = { | ||
139 | .x_max = 0x0fff, | ||
140 | .y_max = 0x0fff, | ||
141 | .x_plate_ohms = 180, | ||
142 | .pressure_max = 255, | ||
143 | .debounce_max = 10, | ||
144 | .debounce_tol = 3, | ||
145 | .debounce_rep = 1, | ||
146 | .get_pendown_state = ads7846_get_pendown_state, | ||
147 | .keep_vref_on = 1, | ||
148 | }; | ||
149 | |||
150 | static struct omap2_mcspi_device_config ads7846_mcspi_config = { | ||
151 | .turbo_mode = 0, | ||
152 | .single_channel = 1, /* 0: slave, 1: master */ | ||
153 | }; | ||
154 | |||
155 | static struct spi_board_info omap3pandora_spi_board_info[] __initdata = { | ||
156 | { | ||
157 | .modalias = "ads7846", | ||
158 | .bus_num = 1, | ||
159 | .chip_select = 0, | ||
160 | .max_speed_hz = 1500000, | ||
161 | .controller_data = &ads7846_mcspi_config, | ||
162 | .irq = OMAP_GPIO_IRQ(OMAP3_PANDORA_TS_GPIO), | ||
163 | .platform_data = &ads7846_config, | ||
164 | } | ||
165 | }; | ||
166 | |||
167 | static struct platform_device omap3pandora_lcd_device = { | ||
168 | .name = "pandora_lcd", | ||
169 | .id = -1, | ||
170 | }; | ||
171 | |||
172 | static struct omap_lcd_config omap3pandora_lcd_config __initdata = { | ||
173 | .ctrl_name = "internal", | ||
174 | }; | ||
175 | |||
176 | static struct omap_board_config_kernel omap3pandora_config[] __initdata = { | ||
177 | { OMAP_TAG_UART, &omap3pandora_uart_config }, | ||
178 | { OMAP_TAG_LCD, &omap3pandora_lcd_config }, | ||
179 | }; | ||
180 | |||
181 | static struct platform_device *omap3pandora_devices[] __initdata = { | ||
182 | &omap3pandora_lcd_device, | ||
183 | }; | ||
184 | |||
185 | static void __init omap3pandora_init(void) | ||
186 | { | ||
187 | omap3pandora_i2c_init(); | ||
188 | platform_add_devices(omap3pandora_devices, | ||
189 | ARRAY_SIZE(omap3pandora_devices)); | ||
190 | omap_board_config = omap3pandora_config; | ||
191 | omap_board_config_size = ARRAY_SIZE(omap3pandora_config); | ||
192 | omap_serial_init(); | ||
193 | spi_register_board_info(omap3pandora_spi_board_info, | ||
194 | ARRAY_SIZE(omap3pandora_spi_board_info)); | ||
195 | omap3pandora_ads7846_init(); | ||
196 | } | ||
197 | |||
198 | static void __init omap3pandora_map_io(void) | ||
199 | { | ||
200 | omap2_set_globals_343x(); | ||
201 | omap2_map_common_io(); | ||
202 | } | ||
203 | |||
204 | MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") | ||
205 | .phys_io = 0x48000000, | ||
206 | .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc, | ||
207 | .boot_params = 0x80000100, | ||
208 | .map_io = omap3pandora_map_io, | ||
209 | .init_irq = omap3pandora_init_irq, | ||
210 | .init_machine = omap3pandora_init, | ||
211 | .timer = &omap_timer, | ||
212 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index e09aa59a399c..82b3dc557c96 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/io.h> | 26 | #include <linux/io.h> |
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/i2c/twl4030.h> | ||
29 | 30 | ||
30 | #include <linux/mtd/mtd.h> | 31 | #include <linux/mtd/mtd.h> |
31 | #include <linux/mtd/nand.h> | 32 | #include <linux/mtd/nand.h> |
@@ -44,6 +45,8 @@ | |||
44 | #include <mach/hardware.h> | 45 | #include <mach/hardware.h> |
45 | #include <mach/nand.h> | 46 | #include <mach/nand.h> |
46 | 47 | ||
48 | #include "mmc-twl4030.h" | ||
49 | |||
47 | #define NAND_BLOCK_SIZE SZ_128K | 50 | #define NAND_BLOCK_SIZE SZ_128K |
48 | #define GPMC_CS0_BASE 0x60 | 51 | #define GPMC_CS0_BASE 0x60 |
49 | #define GPMC_CS_SIZE 0x30 | 52 | #define GPMC_CS_SIZE 0x30 |
@@ -139,8 +142,31 @@ static struct omap_uart_config overo_uart_config __initdata = { | |||
139 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 142 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
140 | }; | 143 | }; |
141 | 144 | ||
145 | static struct twl4030_gpio_platform_data overo_gpio_data = { | ||
146 | .gpio_base = OMAP_MAX_GPIO_LINES, | ||
147 | .irq_base = TWL4030_GPIO_IRQ_BASE, | ||
148 | .irq_end = TWL4030_GPIO_IRQ_END, | ||
149 | }; | ||
150 | |||
151 | static struct twl4030_platform_data overo_twldata = { | ||
152 | .irq_base = TWL4030_IRQ_BASE, | ||
153 | .irq_end = TWL4030_IRQ_END, | ||
154 | .gpio = &overo_gpio_data, | ||
155 | }; | ||
156 | |||
157 | static struct i2c_board_info __initdata overo_i2c_boardinfo[] = { | ||
158 | { | ||
159 | I2C_BOARD_INFO("twl4030", 0x48), | ||
160 | .flags = I2C_CLIENT_WAKE, | ||
161 | .irq = INT_34XX_SYS_NIRQ, | ||
162 | .platform_data = &overo_twldata, | ||
163 | }, | ||
164 | }; | ||
165 | |||
142 | static int __init overo_i2c_init(void) | 166 | static int __init overo_i2c_init(void) |
143 | { | 167 | { |
168 | omap_register_i2c_bus(1, 2600, overo_i2c_boardinfo, | ||
169 | ARRAY_SIZE(overo_i2c_boardinfo)); | ||
144 | /* i2c2 pins are used for gpio */ | 170 | /* i2c2 pins are used for gpio */ |
145 | omap_register_i2c_bus(3, 400, NULL, 0); | 171 | omap_register_i2c_bus(3, 400, NULL, 0); |
146 | return 0; | 172 | return 0; |
@@ -171,6 +197,22 @@ static struct platform_device *overo_devices[] __initdata = { | |||
171 | &overo_lcd_device, | 197 | &overo_lcd_device, |
172 | }; | 198 | }; |
173 | 199 | ||
200 | static struct twl4030_hsmmc_info mmc[] __initdata = { | ||
201 | { | ||
202 | .mmc = 1, | ||
203 | .wires = 4, | ||
204 | .gpio_cd = -EINVAL, | ||
205 | .gpio_wp = -EINVAL, | ||
206 | }, | ||
207 | { | ||
208 | .mmc = 2, | ||
209 | .wires = 4, | ||
210 | .gpio_cd = -EINVAL, | ||
211 | .gpio_wp = -EINVAL, | ||
212 | }, | ||
213 | {} /* Terminator */ | ||
214 | }; | ||
215 | |||
174 | static void __init overo_init(void) | 216 | static void __init overo_init(void) |
175 | { | 217 | { |
176 | overo_i2c_init(); | 218 | overo_i2c_init(); |
@@ -178,6 +220,7 @@ static void __init overo_init(void) | |||
178 | omap_board_config = overo_config; | 220 | omap_board_config = overo_config; |
179 | omap_board_config_size = ARRAY_SIZE(overo_config); | 221 | omap_board_config_size = ARRAY_SIZE(overo_config); |
180 | omap_serial_init(); | 222 | omap_serial_init(); |
223 | twl4030_mmc_init(mmc); | ||
181 | overo_flash_init(); | 224 | overo_flash_init(); |
182 | 225 | ||
183 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, | 226 | if ((gpio_request(OVERO_GPIO_W2W_NRESET, |
diff --git a/arch/arm/mach-omap2/clock24xx.h b/arch/arm/mach-omap2/clock24xx.h index 242a19d86ccd..ff6cd14d254d 100644 --- a/arch/arm/mach-omap2/clock24xx.h +++ b/arch/arm/mach-omap2/clock24xx.h | |||
@@ -2522,7 +2522,6 @@ static struct clk usbhs_ick = { | |||
2522 | 2522 | ||
2523 | static struct clk mmchs1_ick = { | 2523 | static struct clk mmchs1_ick = { |
2524 | .name = "mmchs_ick", | 2524 | .name = "mmchs_ick", |
2525 | .id = 1, | ||
2526 | .parent = &l4_ck, | 2525 | .parent = &l4_ck, |
2527 | .flags = CLOCK_IN_OMAP243X, | 2526 | .flags = CLOCK_IN_OMAP243X, |
2528 | .clkdm_name = "core_l4_clkdm", | 2527 | .clkdm_name = "core_l4_clkdm", |
@@ -2533,7 +2532,6 @@ static struct clk mmchs1_ick = { | |||
2533 | 2532 | ||
2534 | static struct clk mmchs1_fck = { | 2533 | static struct clk mmchs1_fck = { |
2535 | .name = "mmchs_fck", | 2534 | .name = "mmchs_fck", |
2536 | .id = 1, | ||
2537 | .parent = &func_96m_ck, | 2535 | .parent = &func_96m_ck, |
2538 | .flags = CLOCK_IN_OMAP243X, | 2536 | .flags = CLOCK_IN_OMAP243X, |
2539 | .clkdm_name = "core_l3_clkdm", | 2537 | .clkdm_name = "core_l3_clkdm", |
@@ -2544,7 +2542,7 @@ static struct clk mmchs1_fck = { | |||
2544 | 2542 | ||
2545 | static struct clk mmchs2_ick = { | 2543 | static struct clk mmchs2_ick = { |
2546 | .name = "mmchs_ick", | 2544 | .name = "mmchs_ick", |
2547 | .id = 2, | 2545 | .id = 1, |
2548 | .parent = &l4_ck, | 2546 | .parent = &l4_ck, |
2549 | .flags = CLOCK_IN_OMAP243X, | 2547 | .flags = CLOCK_IN_OMAP243X, |
2550 | .clkdm_name = "core_l4_clkdm", | 2548 | .clkdm_name = "core_l4_clkdm", |
@@ -2555,7 +2553,7 @@ static struct clk mmchs2_ick = { | |||
2555 | 2553 | ||
2556 | static struct clk mmchs2_fck = { | 2554 | static struct clk mmchs2_fck = { |
2557 | .name = "mmchs_fck", | 2555 | .name = "mmchs_fck", |
2558 | .id = 2, | 2556 | .id = 1, |
2559 | .parent = &func_96m_ck, | 2557 | .parent = &func_96m_ck, |
2560 | .flags = CLOCK_IN_OMAP243X, | 2558 | .flags = CLOCK_IN_OMAP243X, |
2561 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), | 2559 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP24XX_CM_FCLKEN2), |
@@ -2595,7 +2593,6 @@ static struct clk mdm_intc_ick = { | |||
2595 | 2593 | ||
2596 | static struct clk mmchsdb1_fck = { | 2594 | static struct clk mmchsdb1_fck = { |
2597 | .name = "mmchsdb_fck", | 2595 | .name = "mmchsdb_fck", |
2598 | .id = 1, | ||
2599 | .parent = &func_32k_ck, | 2596 | .parent = &func_32k_ck, |
2600 | .flags = CLOCK_IN_OMAP243X, | 2597 | .flags = CLOCK_IN_OMAP243X, |
2601 | .clkdm_name = "core_l4_clkdm", | 2598 | .clkdm_name = "core_l4_clkdm", |
@@ -2606,7 +2603,7 @@ static struct clk mmchsdb1_fck = { | |||
2606 | 2603 | ||
2607 | static struct clk mmchsdb2_fck = { | 2604 | static struct clk mmchsdb2_fck = { |
2608 | .name = "mmchsdb_fck", | 2605 | .name = "mmchsdb_fck", |
2609 | .id = 2, | 2606 | .id = 1, |
2610 | .parent = &func_32k_ck, | 2607 | .parent = &func_32k_ck, |
2611 | .flags = CLOCK_IN_OMAP243X, | 2608 | .flags = CLOCK_IN_OMAP243X, |
2612 | .clkdm_name = "core_l4_clkdm", | 2609 | .clkdm_name = "core_l4_clkdm", |
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 084e11082f80..31bb7010bd48 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c | |||
@@ -475,7 +475,7 @@ int __init omap2_clk_init(void) | |||
475 | * Update this if there are further clock changes between ES2 | 475 | * Update this if there are further clock changes between ES2 |
476 | * and production parts | 476 | * and production parts |
477 | */ | 477 | */ |
478 | if (is_sil_rev_equal_to(OMAP3430_REV_ES1_0)) { | 478 | if (omap_rev() == OMAP3430_REV_ES1_0) { |
479 | /* No 3430ES1-only rates exist, so no RATE_IN_3430ES1 */ | 479 | /* No 3430ES1-only rates exist, so no RATE_IN_3430ES1 */ |
480 | cpu_clkflg |= CLOCK_IN_OMAP3430ES1; | 480 | cpu_clkflg |= CLOCK_IN_OMAP3430ES1; |
481 | } else { | 481 | } else { |
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h index c38a8a09692f..a826094d89b5 100644 --- a/arch/arm/mach-omap2/clock34xx.h +++ b/arch/arm/mach-omap2/clock34xx.h | |||
@@ -1374,7 +1374,7 @@ static struct clk core_96m_fck = { | |||
1374 | 1374 | ||
1375 | static struct clk mmchs3_fck = { | 1375 | static struct clk mmchs3_fck = { |
1376 | .name = "mmchs_fck", | 1376 | .name = "mmchs_fck", |
1377 | .id = 3, | 1377 | .id = 2, |
1378 | .parent = &core_96m_fck, | 1378 | .parent = &core_96m_fck, |
1379 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1379 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1380 | .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT, | 1380 | .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT, |
@@ -1385,7 +1385,7 @@ static struct clk mmchs3_fck = { | |||
1385 | 1385 | ||
1386 | static struct clk mmchs2_fck = { | 1386 | static struct clk mmchs2_fck = { |
1387 | .name = "mmchs_fck", | 1387 | .name = "mmchs_fck", |
1388 | .id = 2, | 1388 | .id = 1, |
1389 | .parent = &core_96m_fck, | 1389 | .parent = &core_96m_fck, |
1390 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1390 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1391 | .enable_bit = OMAP3430_EN_MMC2_SHIFT, | 1391 | .enable_bit = OMAP3430_EN_MMC2_SHIFT, |
@@ -1406,7 +1406,6 @@ static struct clk mspro_fck = { | |||
1406 | 1406 | ||
1407 | static struct clk mmchs1_fck = { | 1407 | static struct clk mmchs1_fck = { |
1408 | .name = "mmchs_fck", | 1408 | .name = "mmchs_fck", |
1409 | .id = 1, | ||
1410 | .parent = &core_96m_fck, | 1409 | .parent = &core_96m_fck, |
1411 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1410 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1412 | .enable_bit = OMAP3430_EN_MMC1_SHIFT, | 1411 | .enable_bit = OMAP3430_EN_MMC1_SHIFT, |
@@ -1722,7 +1721,7 @@ static struct clk usbtll_ick = { | |||
1722 | 1721 | ||
1723 | static struct clk mmchs3_ick = { | 1722 | static struct clk mmchs3_ick = { |
1724 | .name = "mmchs_ick", | 1723 | .name = "mmchs_ick", |
1725 | .id = 3, | 1724 | .id = 2, |
1726 | .parent = &core_l4_ick, | 1725 | .parent = &core_l4_ick, |
1727 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1726 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
1728 | .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT, | 1727 | .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT, |
@@ -1774,7 +1773,7 @@ static struct clk des2_ick = { | |||
1774 | 1773 | ||
1775 | static struct clk mmchs2_ick = { | 1774 | static struct clk mmchs2_ick = { |
1776 | .name = "mmchs_ick", | 1775 | .name = "mmchs_ick", |
1777 | .id = 2, | 1776 | .id = 1, |
1778 | .parent = &core_l4_ick, | 1777 | .parent = &core_l4_ick, |
1779 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1778 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
1780 | .enable_bit = OMAP3430_EN_MMC2_SHIFT, | 1779 | .enable_bit = OMAP3430_EN_MMC2_SHIFT, |
@@ -1785,7 +1784,6 @@ static struct clk mmchs2_ick = { | |||
1785 | 1784 | ||
1786 | static struct clk mmchs1_ick = { | 1785 | static struct clk mmchs1_ick = { |
1787 | .name = "mmchs_ick", | 1786 | .name = "mmchs_ick", |
1788 | .id = 1, | ||
1789 | .parent = &core_l4_ick, | 1787 | .parent = &core_l4_ick, |
1790 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1788 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
1791 | .enable_bit = OMAP3430_EN_MMC1_SHIFT, | 1789 | .enable_bit = OMAP3430_EN_MMC1_SHIFT, |
@@ -2280,8 +2278,8 @@ static struct clk wkup_32k_fck = { | |||
2280 | .recalc = &followparent_recalc, | 2278 | .recalc = &followparent_recalc, |
2281 | }; | 2279 | }; |
2282 | 2280 | ||
2283 | static struct clk gpio1_fck = { | 2281 | static struct clk gpio1_dbck = { |
2284 | .name = "gpio1_fck", | 2282 | .name = "gpio1_dbck", |
2285 | .parent = &wkup_32k_fck, | 2283 | .parent = &wkup_32k_fck, |
2286 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), | 2284 | .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN), |
2287 | .enable_bit = OMAP3430_EN_GPIO1_SHIFT, | 2285 | .enable_bit = OMAP3430_EN_GPIO1_SHIFT, |
@@ -2527,8 +2525,8 @@ static struct clk per_32k_alwon_fck = { | |||
2527 | .recalc = &followparent_recalc, | 2525 | .recalc = &followparent_recalc, |
2528 | }; | 2526 | }; |
2529 | 2527 | ||
2530 | static struct clk gpio6_fck = { | 2528 | static struct clk gpio6_dbck = { |
2531 | .name = "gpio6_fck", | 2529 | .name = "gpio6_dbck", |
2532 | .parent = &per_32k_alwon_fck, | 2530 | .parent = &per_32k_alwon_fck, |
2533 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2531 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2534 | .enable_bit = OMAP3430_EN_GPIO6_SHIFT, | 2532 | .enable_bit = OMAP3430_EN_GPIO6_SHIFT, |
@@ -2537,8 +2535,8 @@ static struct clk gpio6_fck = { | |||
2537 | .recalc = &followparent_recalc, | 2535 | .recalc = &followparent_recalc, |
2538 | }; | 2536 | }; |
2539 | 2537 | ||
2540 | static struct clk gpio5_fck = { | 2538 | static struct clk gpio5_dbck = { |
2541 | .name = "gpio5_fck", | 2539 | .name = "gpio5_dbck", |
2542 | .parent = &per_32k_alwon_fck, | 2540 | .parent = &per_32k_alwon_fck, |
2543 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2541 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2544 | .enable_bit = OMAP3430_EN_GPIO5_SHIFT, | 2542 | .enable_bit = OMAP3430_EN_GPIO5_SHIFT, |
@@ -2547,8 +2545,8 @@ static struct clk gpio5_fck = { | |||
2547 | .recalc = &followparent_recalc, | 2545 | .recalc = &followparent_recalc, |
2548 | }; | 2546 | }; |
2549 | 2547 | ||
2550 | static struct clk gpio4_fck = { | 2548 | static struct clk gpio4_dbck = { |
2551 | .name = "gpio4_fck", | 2549 | .name = "gpio4_dbck", |
2552 | .parent = &per_32k_alwon_fck, | 2550 | .parent = &per_32k_alwon_fck, |
2553 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2551 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2554 | .enable_bit = OMAP3430_EN_GPIO4_SHIFT, | 2552 | .enable_bit = OMAP3430_EN_GPIO4_SHIFT, |
@@ -2557,8 +2555,8 @@ static struct clk gpio4_fck = { | |||
2557 | .recalc = &followparent_recalc, | 2555 | .recalc = &followparent_recalc, |
2558 | }; | 2556 | }; |
2559 | 2557 | ||
2560 | static struct clk gpio3_fck = { | 2558 | static struct clk gpio3_dbck = { |
2561 | .name = "gpio3_fck", | 2559 | .name = "gpio3_dbck", |
2562 | .parent = &per_32k_alwon_fck, | 2560 | .parent = &per_32k_alwon_fck, |
2563 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2561 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2564 | .enable_bit = OMAP3430_EN_GPIO3_SHIFT, | 2562 | .enable_bit = OMAP3430_EN_GPIO3_SHIFT, |
@@ -2567,8 +2565,8 @@ static struct clk gpio3_fck = { | |||
2567 | .recalc = &followparent_recalc, | 2565 | .recalc = &followparent_recalc, |
2568 | }; | 2566 | }; |
2569 | 2567 | ||
2570 | static struct clk gpio2_fck = { | 2568 | static struct clk gpio2_dbck = { |
2571 | .name = "gpio2_fck", | 2569 | .name = "gpio2_dbck", |
2572 | .parent = &per_32k_alwon_fck, | 2570 | .parent = &per_32k_alwon_fck, |
2573 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2571 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2574 | .enable_bit = OMAP3430_EN_GPIO2_SHIFT, | 2572 | .enable_bit = OMAP3430_EN_GPIO2_SHIFT, |
@@ -3170,7 +3168,7 @@ static struct clk *onchip_34xx_clks[] __initdata = { | |||
3170 | &usim_fck, | 3168 | &usim_fck, |
3171 | &gpt1_fck, | 3169 | &gpt1_fck, |
3172 | &wkup_32k_fck, | 3170 | &wkup_32k_fck, |
3173 | &gpio1_fck, | 3171 | &gpio1_dbck, |
3174 | &wdt2_fck, | 3172 | &wdt2_fck, |
3175 | &wkup_l4_ick, | 3173 | &wkup_l4_ick, |
3176 | &usim_ick, | 3174 | &usim_ick, |
@@ -3192,11 +3190,11 @@ static struct clk *onchip_34xx_clks[] __initdata = { | |||
3192 | &gpt8_fck, | 3190 | &gpt8_fck, |
3193 | &gpt9_fck, | 3191 | &gpt9_fck, |
3194 | &per_32k_alwon_fck, | 3192 | &per_32k_alwon_fck, |
3195 | &gpio6_fck, | 3193 | &gpio6_dbck, |
3196 | &gpio5_fck, | 3194 | &gpio5_dbck, |
3197 | &gpio4_fck, | 3195 | &gpio4_dbck, |
3198 | &gpio3_fck, | 3196 | &gpio3_dbck, |
3199 | &gpio2_fck, | 3197 | &gpio2_dbck, |
3200 | &wdt3_fck, | 3198 | &wdt3_fck, |
3201 | &per_l4_ick, | 3199 | &per_l4_ick, |
3202 | &gpio6_ick, | 3200 | &gpio6_ick, |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 90af2ac469aa..9d7216ff6c9f 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -14,16 +14,19 @@ | |||
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/clk.h> | ||
17 | 18 | ||
18 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
19 | #include <asm/mach-types.h> | 20 | #include <asm/mach-types.h> |
20 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
21 | 22 | ||
23 | #include <mach/control.h> | ||
22 | #include <mach/tc.h> | 24 | #include <mach/tc.h> |
23 | #include <mach/board.h> | 25 | #include <mach/board.h> |
24 | #include <mach/mux.h> | 26 | #include <mach/mux.h> |
25 | #include <mach/gpio.h> | 27 | #include <mach/gpio.h> |
26 | #include <mach/eac.h> | 28 | #include <mach/eac.h> |
29 | #include <mach/mmc.h> | ||
27 | 30 | ||
28 | #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) | 31 | #if defined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE) |
29 | #define OMAP2_MBOX_BASE IO_ADDRESS(OMAP24XX_MAILBOX_BASE) | 32 | #define OMAP2_MBOX_BASE IO_ADDRESS(OMAP24XX_MAILBOX_BASE) |
@@ -295,6 +298,171 @@ static void omap_init_sha1_md5(void) | |||
295 | static inline void omap_init_sha1_md5(void) { } | 298 | static inline void omap_init_sha1_md5(void) { } |
296 | #endif | 299 | #endif |
297 | 300 | ||
301 | /*-------------------------------------------------------------------------*/ | ||
302 | |||
303 | #ifdef CONFIG_ARCH_OMAP3 | ||
304 | |||
305 | #define MMCHS_SYSCONFIG 0x0010 | ||
306 | #define MMCHS_SYSCONFIG_SWRESET (1 << 1) | ||
307 | #define MMCHS_SYSSTATUS 0x0014 | ||
308 | #define MMCHS_SYSSTATUS_RESETDONE (1 << 0) | ||
309 | |||
310 | static struct platform_device dummy_pdev = { | ||
311 | .dev = { | ||
312 | .bus = &platform_bus_type, | ||
313 | }, | ||
314 | }; | ||
315 | |||
316 | /** | ||
317 | * omap_hsmmc_reset() - Full reset of each HS-MMC controller | ||
318 | * | ||
319 | * Ensure that each MMC controller is fully reset. Controllers | ||
320 | * left in an unknown state (by bootloader) may prevent retention | ||
321 | * or OFF-mode. This is especially important in cases where the | ||
322 | * MMC driver is not enabled, _or_ built as a module. | ||
323 | * | ||
324 | * In order for reset to work, interface, functional and debounce | ||
325 | * clocks must be enabled. The debounce clock comes from func_32k_clk | ||
326 | * and is not under SW control, so we only enable i- and f-clocks. | ||
327 | **/ | ||
328 | static void __init omap_hsmmc_reset(void) | ||
329 | { | ||
330 | u32 i, nr_controllers = cpu_is_omap34xx() ? OMAP34XX_NR_MMC : | ||
331 | OMAP24XX_NR_MMC; | ||
332 | |||
333 | for (i = 0; i < nr_controllers; i++) { | ||
334 | u32 v, base = 0; | ||
335 | struct clk *iclk, *fclk; | ||
336 | struct device *dev = &dummy_pdev.dev; | ||
337 | |||
338 | switch (i) { | ||
339 | case 0: | ||
340 | base = OMAP2_MMC1_BASE; | ||
341 | break; | ||
342 | case 1: | ||
343 | base = OMAP2_MMC2_BASE; | ||
344 | break; | ||
345 | case 2: | ||
346 | base = OMAP3_MMC3_BASE; | ||
347 | break; | ||
348 | } | ||
349 | |||
350 | dummy_pdev.id = i; | ||
351 | iclk = clk_get(dev, "mmchs_ick"); | ||
352 | if (iclk && clk_enable(iclk)) | ||
353 | iclk = NULL; | ||
354 | |||
355 | fclk = clk_get(dev, "mmchs_fck"); | ||
356 | if (fclk && clk_enable(fclk)) | ||
357 | fclk = NULL; | ||
358 | |||
359 | if (!iclk || !fclk) { | ||
360 | printk(KERN_WARNING | ||
361 | "%s: Unable to enable clocks for MMC%d, " | ||
362 | "cannot reset.\n", __func__, i); | ||
363 | break; | ||
364 | } | ||
365 | |||
366 | omap_writel(MMCHS_SYSCONFIG_SWRESET, base + MMCHS_SYSCONFIG); | ||
367 | v = omap_readl(base + MMCHS_SYSSTATUS); | ||
368 | while (!(omap_readl(base + MMCHS_SYSSTATUS) & | ||
369 | MMCHS_SYSSTATUS_RESETDONE)) | ||
370 | cpu_relax(); | ||
371 | |||
372 | if (fclk) { | ||
373 | clk_disable(fclk); | ||
374 | clk_put(fclk); | ||
375 | } | ||
376 | if (iclk) { | ||
377 | clk_disable(iclk); | ||
378 | clk_put(iclk); | ||
379 | } | ||
380 | } | ||
381 | } | ||
382 | #else | ||
383 | static inline void omap_hsmmc_reset(void) {} | ||
384 | #endif | ||
385 | |||
386 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ | ||
387 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | ||
388 | |||
389 | static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller, | ||
390 | int controller_nr) | ||
391 | { | ||
392 | if (cpu_is_omap2420() && controller_nr == 0) { | ||
393 | omap_cfg_reg(H18_24XX_MMC_CMD); | ||
394 | omap_cfg_reg(H15_24XX_MMC_CLKI); | ||
395 | omap_cfg_reg(G19_24XX_MMC_CLKO); | ||
396 | omap_cfg_reg(F20_24XX_MMC_DAT0); | ||
397 | omap_cfg_reg(F19_24XX_MMC_DAT_DIR0); | ||
398 | omap_cfg_reg(G18_24XX_MMC_CMD_DIR); | ||
399 | if (mmc_controller->slots[0].wires == 4) { | ||
400 | omap_cfg_reg(H14_24XX_MMC_DAT1); | ||
401 | omap_cfg_reg(E19_24XX_MMC_DAT2); | ||
402 | omap_cfg_reg(D19_24XX_MMC_DAT3); | ||
403 | omap_cfg_reg(E20_24XX_MMC_DAT_DIR1); | ||
404 | omap_cfg_reg(F18_24XX_MMC_DAT_DIR2); | ||
405 | omap_cfg_reg(E18_24XX_MMC_DAT_DIR3); | ||
406 | } | ||
407 | |||
408 | /* | ||
409 | * Use internal loop-back in MMC/SDIO Module Input Clock | ||
410 | * selection | ||
411 | */ | ||
412 | if (mmc_controller->slots[0].internal_clock) { | ||
413 | u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
414 | v |= (1 << 24); | ||
415 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
416 | } | ||
417 | } | ||
418 | } | ||
419 | |||
420 | void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
421 | int nr_controllers) | ||
422 | { | ||
423 | int i; | ||
424 | |||
425 | for (i = 0; i < nr_controllers; i++) { | ||
426 | unsigned long base, size; | ||
427 | unsigned int irq = 0; | ||
428 | |||
429 | if (!mmc_data[i]) | ||
430 | continue; | ||
431 | |||
432 | omap2_mmc_mux(mmc_data[i], i); | ||
433 | |||
434 | switch (i) { | ||
435 | case 0: | ||
436 | base = OMAP2_MMC1_BASE; | ||
437 | irq = INT_24XX_MMC_IRQ; | ||
438 | break; | ||
439 | case 1: | ||
440 | base = OMAP2_MMC2_BASE; | ||
441 | irq = INT_24XX_MMC2_IRQ; | ||
442 | break; | ||
443 | case 2: | ||
444 | if (!cpu_is_omap34xx()) | ||
445 | return; | ||
446 | base = OMAP3_MMC3_BASE; | ||
447 | irq = INT_34XX_MMC3_IRQ; | ||
448 | break; | ||
449 | default: | ||
450 | continue; | ||
451 | } | ||
452 | |||
453 | if (cpu_is_omap2420()) | ||
454 | size = OMAP2420_MMC_SIZE; | ||
455 | else | ||
456 | size = HSMMC_SIZE; | ||
457 | |||
458 | omap_mmc_add(i, base, size, irq, mmc_data[i]); | ||
459 | }; | ||
460 | } | ||
461 | |||
462 | #endif | ||
463 | |||
464 | /*-------------------------------------------------------------------------*/ | ||
465 | |||
298 | #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE) | 466 | #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE) |
299 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430) | 467 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430) |
300 | #define OMAP_HDQ_BASE 0x480B2000 | 468 | #define OMAP_HDQ_BASE 0x480B2000 |
@@ -334,6 +502,7 @@ static int __init omap2_init_devices(void) | |||
334 | /* please keep these calls, and their implementations above, | 502 | /* please keep these calls, and their implementations above, |
335 | * in alphabetical order so they're easier to sort through. | 503 | * in alphabetical order so they're easier to sort through. |
336 | */ | 504 | */ |
505 | omap_hsmmc_reset(); | ||
337 | omap_init_mbox(); | 506 | omap_init_mbox(); |
338 | omap_init_mcspi(); | 507 | omap_init_mcspi(); |
339 | omap_hdq_init(); | 508 | omap_hdq_init(); |
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index bf45ff39a7b5..b0f8e7d62798 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -22,40 +22,15 @@ | |||
22 | #include <mach/control.h> | 22 | #include <mach/control.h> |
23 | #include <mach/cpu.h> | 23 | #include <mach/cpu.h> |
24 | 24 | ||
25 | static u32 class; | 25 | static struct omap_chip_id omap_chip; |
26 | static void __iomem *tap_base; | 26 | static unsigned int omap_revision; |
27 | static u16 tap_prod_id; | ||
28 | |||
29 | #define OMAP_TAP_IDCODE 0x0204 | ||
30 | #define OMAP_TAP_DIE_ID_0 0x0218 | ||
31 | #define OMAP_TAP_DIE_ID_1 0x021C | ||
32 | #define OMAP_TAP_DIE_ID_2 0x0220 | ||
33 | #define OMAP_TAP_DIE_ID_3 0x0224 | ||
34 | |||
35 | /* system_rev fields for OMAP2 processors: | ||
36 | * CPU id bits [31:16], | ||
37 | * CPU device type [15:12], (unprg,normal,POP) | ||
38 | * CPU revision [11:08] | ||
39 | * CPU class bits [07:00] | ||
40 | */ | ||
41 | |||
42 | struct omap_id { | ||
43 | u16 hawkeye; /* Silicon type (Hawkeye id) */ | ||
44 | u8 dev; /* Device type from production_id reg */ | ||
45 | u32 type; /* combined type id copied to system_rev */ | ||
46 | }; | ||
47 | 27 | ||
48 | /* Register values to detect the OMAP version */ | ||
49 | static struct omap_id omap_ids[] __initdata = { | ||
50 | { .hawkeye = 0xb5d9, .dev = 0x0, .type = 0x24200000 }, | ||
51 | { .hawkeye = 0xb5d9, .dev = 0x1, .type = 0x24201000 }, | ||
52 | { .hawkeye = 0xb5d9, .dev = 0x2, .type = 0x24202000 }, | ||
53 | { .hawkeye = 0xb5d9, .dev = 0x4, .type = 0x24220000 }, | ||
54 | { .hawkeye = 0xb5d9, .dev = 0x8, .type = 0x24230000 }, | ||
55 | { .hawkeye = 0xb68a, .dev = 0x0, .type = 0x24300000 }, | ||
56 | }; | ||
57 | 28 | ||
58 | static struct omap_chip_id omap_chip; | 29 | unsigned int omap_rev(void) |
30 | { | ||
31 | return omap_revision; | ||
32 | } | ||
33 | EXPORT_SYMBOL(omap_rev); | ||
59 | 34 | ||
60 | /** | 35 | /** |
61 | * omap_chip_is - test whether currently running OMAP matches a chip type | 36 | * omap_chip_is - test whether currently running OMAP matches a chip type |
@@ -70,135 +45,41 @@ int omap_chip_is(struct omap_chip_id oci) | |||
70 | } | 45 | } |
71 | EXPORT_SYMBOL(omap_chip_is); | 46 | EXPORT_SYMBOL(omap_chip_is); |
72 | 47 | ||
73 | static u32 __init read_tap_reg(int reg) | 48 | /*----------------------------------------------------------------------------*/ |
74 | { | ||
75 | unsigned int regval = 0; | ||
76 | u32 cpuid; | ||
77 | |||
78 | /* Reading the IDCODE register on 3430 ES1 results in a | ||
79 | * data abort as the register is not exposed on the OCP | ||
80 | * Hence reading the Cortex Rev | ||
81 | */ | ||
82 | cpuid = read_cpuid(CPUID_ID); | ||
83 | |||
84 | /* If the processor type is Cortex-A8 and the revision is 0x0 | ||
85 | * it means its Cortex r0p0 which is 3430 ES1 | ||
86 | */ | ||
87 | if ((((cpuid >> 4) & 0xFFF) == 0xC08) && ((cpuid & 0xF) == 0x0)) { | ||
88 | |||
89 | if (reg == tap_prod_id) { | ||
90 | regval = 0x000F00F0; | ||
91 | goto out; | ||
92 | } | ||
93 | |||
94 | switch (reg) { | ||
95 | case OMAP_TAP_IDCODE : regval = 0x0B7AE02F; break; | ||
96 | /* Making DevType as 0xF in ES1 to differ from ES2 */ | ||
97 | case OMAP_TAP_DIE_ID_0: regval = 0x01000000; break; | ||
98 | case OMAP_TAP_DIE_ID_1: regval = 0x1012d687; break; | ||
99 | case OMAP_TAP_DIE_ID_2: regval = 0x00000000; break; | ||
100 | case OMAP_TAP_DIE_ID_3: regval = 0x2d2c0000; break; | ||
101 | } | ||
102 | } else | ||
103 | regval = __raw_readl(tap_base + reg); | ||
104 | |||
105 | out: | ||
106 | return regval; | ||
107 | |||
108 | } | ||
109 | 49 | ||
110 | /* | 50 | #define OMAP_TAP_IDCODE 0x0204 |
111 | * _set_system_rev - set the system_rev global based on current OMAP chip type | 51 | #define OMAP_TAP_DIE_ID_0 0x0218 |
112 | * | 52 | #define OMAP_TAP_DIE_ID_1 0x021C |
113 | * Set the system_rev global. This is primarily used by the cpu_is_omapxxxx() | 53 | #define OMAP_TAP_DIE_ID_2 0x0220 |
114 | * macros. | 54 | #define OMAP_TAP_DIE_ID_3 0x0224 |
115 | */ | ||
116 | static void __init _set_system_rev(u32 type, u8 rev) | ||
117 | { | ||
118 | u32 i, ctrl_status; | ||
119 | |||
120 | /* | ||
121 | * system_rev encoding is as follows | ||
122 | * system_rev & 0xff000000 -> Omap Class (24xx/34xx) | ||
123 | * system_rev & 0xfff00000 -> Omap Sub Class (242x/343x) | ||
124 | * system_rev & 0xffff0000 -> Omap type (2420/2422/2423/2430/3430) | ||
125 | * system_rev & 0x0000f000 -> Silicon revision (ES1, ES2 ) | ||
126 | * system_rev & 0x00000700 -> Device Type ( EMU/HS/GP/BAD ) | ||
127 | * system_rev & 0x000000c0 -> IDCODE revision[6:7] | ||
128 | * system_rev & 0x0000003f -> sys_boot[0:5] | ||
129 | */ | ||
130 | /* Embedding the ES revision info in type field */ | ||
131 | system_rev = type; | ||
132 | /* Also add IDCODE revision info only two lower bits */ | ||
133 | system_rev |= ((rev & 0x3) << 6); | ||
134 | |||
135 | /* Add in the device type and sys_boot fields (see above) */ | ||
136 | if (cpu_is_omap24xx()) { | ||
137 | i = OMAP24XX_CONTROL_STATUS; | ||
138 | } else if (cpu_is_omap343x()) { | ||
139 | i = OMAP343X_CONTROL_STATUS; | ||
140 | } else { | ||
141 | printk(KERN_ERR "id: unknown CPU type\n"); | ||
142 | BUG(); | ||
143 | } | ||
144 | ctrl_status = omap_ctrl_readl(i); | ||
145 | system_rev |= (ctrl_status & (OMAP2_SYSBOOT_5_MASK | | ||
146 | OMAP2_SYSBOOT_4_MASK | | ||
147 | OMAP2_SYSBOOT_3_MASK | | ||
148 | OMAP2_SYSBOOT_2_MASK | | ||
149 | OMAP2_SYSBOOT_1_MASK | | ||
150 | OMAP2_SYSBOOT_0_MASK)); | ||
151 | system_rev |= (ctrl_status & OMAP2_DEVICETYPE_MASK); | ||
152 | } | ||
153 | |||
154 | |||
155 | /* | ||
156 | * _set_omap_chip - set the omap_chip global based on OMAP chip type | ||
157 | * | ||
158 | * Build the omap_chip bits. This variable is used by powerdomain and | ||
159 | * clockdomain code to indicate whether structures are applicable for | ||
160 | * the current OMAP chip type by ANDing it against a 'platform' bitfield | ||
161 | * in the structure. | ||
162 | */ | ||
163 | static void __init _set_omap_chip(void) | ||
164 | { | ||
165 | if (cpu_is_omap343x()) { | ||
166 | |||
167 | omap_chip.oc = CHIP_IS_OMAP3430; | ||
168 | if (is_sil_rev_equal_to(OMAP3430_REV_ES1_0)) | ||
169 | omap_chip.oc |= CHIP_IS_OMAP3430ES1; | ||
170 | else if (is_sil_rev_greater_than(OMAP3430_REV_ES1_0)) | ||
171 | omap_chip.oc |= CHIP_IS_OMAP3430ES2; | ||
172 | |||
173 | } else if (cpu_is_omap243x()) { | ||
174 | |||
175 | /* Currently only supports 2430ES2.1 and 2430-all */ | ||
176 | omap_chip.oc |= CHIP_IS_OMAP2430; | ||
177 | |||
178 | } else if (cpu_is_omap242x()) { | ||
179 | |||
180 | /* Currently only supports 2420ES2.1.1 and 2420-all */ | ||
181 | omap_chip.oc |= CHIP_IS_OMAP2420; | ||
182 | 55 | ||
183 | } else { | 56 | #define read_tap_reg(reg) __raw_readl(tap_base + (reg)) |
184 | 57 | ||
185 | /* Current CPU not supported by this code. */ | 58 | struct omap_id { |
186 | printk(KERN_WARNING "OMAP chip type code does not yet support " | 59 | u16 hawkeye; /* Silicon type (Hawkeye id) */ |
187 | "this CPU type.\n"); | 60 | u8 dev; /* Device type from production_id reg */ |
188 | WARN_ON(1); | 61 | u32 type; /* Combined type id copied to omap_revision */ |
62 | }; | ||
189 | 63 | ||
190 | } | 64 | /* Register values to detect the OMAP version */ |
65 | static struct omap_id omap_ids[] __initdata = { | ||
66 | { .hawkeye = 0xb5d9, .dev = 0x0, .type = 0x24200024 }, | ||
67 | { .hawkeye = 0xb5d9, .dev = 0x1, .type = 0x24201024 }, | ||
68 | { .hawkeye = 0xb5d9, .dev = 0x2, .type = 0x24202024 }, | ||
69 | { .hawkeye = 0xb5d9, .dev = 0x4, .type = 0x24220024 }, | ||
70 | { .hawkeye = 0xb5d9, .dev = 0x8, .type = 0x24230024 }, | ||
71 | { .hawkeye = 0xb68a, .dev = 0x0, .type = 0x24300024 }, | ||
72 | }; | ||
191 | 73 | ||
192 | } | 74 | static void __iomem *tap_base; |
75 | static u16 tap_prod_id; | ||
193 | 76 | ||
194 | void __init omap2_check_revision(void) | 77 | void __init omap24xx_check_revision(void) |
195 | { | 78 | { |
196 | int i, j; | 79 | int i, j; |
197 | u32 idcode; | 80 | u32 idcode, prod_id; |
198 | u32 prod_id; | ||
199 | u16 hawkeye; | 81 | u16 hawkeye; |
200 | u8 dev_type; | 82 | u8 dev_type, rev; |
201 | u8 rev; | ||
202 | 83 | ||
203 | idcode = read_tap_reg(OMAP_TAP_IDCODE); | 84 | idcode = read_tap_reg(OMAP_TAP_IDCODE); |
204 | prod_id = read_tap_reg(tap_prod_id); | 85 | prod_id = read_tap_reg(tap_prod_id); |
@@ -220,18 +101,6 @@ void __init omap2_check_revision(void) | |||
220 | pr_debug("OMAP_TAP_PROD_ID_0: 0x%08x DEV_TYPE: %i\n", | 101 | pr_debug("OMAP_TAP_PROD_ID_0: 0x%08x DEV_TYPE: %i\n", |
221 | prod_id, dev_type); | 102 | prod_id, dev_type); |
222 | 103 | ||
223 | /* | ||
224 | * Detection for 34xx ES2.0 and above can be done with just | ||
225 | * hawkeye and rev. See TRM 1.5.2 Device Identification. | ||
226 | * Note that rev cannot be used directly as ES1.0 uses value 0. | ||
227 | */ | ||
228 | if (hawkeye == 0xb7ae) { | ||
229 | system_rev = 0x34300000 | ((1 + rev) << 12); | ||
230 | pr_info("OMAP%04x ES2.%i\n", system_rev >> 16, rev); | ||
231 | _set_omap_chip(); | ||
232 | return; | ||
233 | } | ||
234 | |||
235 | /* Check hawkeye ids */ | 104 | /* Check hawkeye ids */ |
236 | for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { | 105 | for (i = 0; i < ARRAY_SIZE(omap_ids); i++) { |
237 | if (hawkeye == omap_ids[i].hawkeye) | 106 | if (hawkeye == omap_ids[i].hawkeye) |
@@ -255,23 +124,115 @@ void __init omap2_check_revision(void) | |||
255 | j = i; | 124 | j = i; |
256 | } | 125 | } |
257 | 126 | ||
258 | _set_system_rev(omap_ids[j].type, rev); | 127 | pr_info("OMAP%04x", omap_rev() >> 16); |
128 | if ((omap_rev() >> 8) & 0x0f) | ||
129 | pr_info("ES%x", (omap_rev() >> 12) & 0xf); | ||
130 | pr_info("\n"); | ||
131 | } | ||
259 | 132 | ||
260 | _set_omap_chip(); | 133 | void __init omap34xx_check_revision(void) |
134 | { | ||
135 | u32 cpuid, idcode; | ||
136 | u16 hawkeye; | ||
137 | u8 rev; | ||
138 | char *rev_name = "ES1.0"; | ||
261 | 139 | ||
262 | pr_info("OMAP%04x", system_rev >> 16); | 140 | /* |
263 | if ((system_rev >> 8) & 0x0f) | 141 | * We cannot access revision registers on ES1.0. |
264 | pr_info("ES%x", (system_rev >> 12) & 0xf); | 142 | * If the processor type is Cortex-A8 and the revision is 0x0 |
265 | pr_info("\n"); | 143 | * it means its Cortex r0p0 which is 3430 ES1.0. |
144 | */ | ||
145 | cpuid = read_cpuid(CPUID_ID); | ||
146 | if ((((cpuid >> 4) & 0xfff) == 0xc08) && ((cpuid & 0xf) == 0x0)) { | ||
147 | omap_revision = OMAP3430_REV_ES1_0; | ||
148 | goto out; | ||
149 | } | ||
266 | 150 | ||
151 | /* | ||
152 | * Detection for 34xx ES2.0 and above can be done with just | ||
153 | * hawkeye and rev. See TRM 1.5.2 Device Identification. | ||
154 | * Note that rev does not map directly to our defined processor | ||
155 | * revision numbers as ES1.0 uses value 0. | ||
156 | */ | ||
157 | idcode = read_tap_reg(OMAP_TAP_IDCODE); | ||
158 | hawkeye = (idcode >> 12) & 0xffff; | ||
159 | rev = (idcode >> 28) & 0xff; | ||
160 | |||
161 | if (hawkeye == 0xb7ae) { | ||
162 | switch (rev) { | ||
163 | case 0: | ||
164 | omap_revision = OMAP3430_REV_ES2_0; | ||
165 | rev_name = "ES2.0"; | ||
166 | break; | ||
167 | case 2: | ||
168 | omap_revision = OMAP3430_REV_ES2_1; | ||
169 | rev_name = "ES2.1"; | ||
170 | break; | ||
171 | case 3: | ||
172 | omap_revision = OMAP3430_REV_ES3_0; | ||
173 | rev_name = "ES3.0"; | ||
174 | break; | ||
175 | default: | ||
176 | /* Use the latest known revision as default */ | ||
177 | omap_revision = OMAP3430_REV_ES3_0; | ||
178 | rev_name = "Unknown revision\n"; | ||
179 | } | ||
180 | } | ||
181 | |||
182 | out: | ||
183 | pr_info("OMAP%04x %s\n", omap_rev() >> 16, rev_name); | ||
267 | } | 184 | } |
268 | 185 | ||
186 | /* | ||
187 | * Try to detect the exact revision of the omap we're running on | ||
188 | */ | ||
189 | void __init omap2_check_revision(void) | ||
190 | { | ||
191 | /* | ||
192 | * At this point we have an idea about the processor revision set | ||
193 | * earlier with omap2_set_globals_tap(). | ||
194 | */ | ||
195 | if (cpu_is_omap24xx()) | ||
196 | omap24xx_check_revision(); | ||
197 | else if (cpu_is_omap34xx()) | ||
198 | omap34xx_check_revision(); | ||
199 | else | ||
200 | pr_err("OMAP revision unknown, please fix!\n"); | ||
201 | |||
202 | /* | ||
203 | * OK, now we know the exact revision. Initialize omap_chip bits | ||
204 | * for powerdowmain and clockdomain code. | ||
205 | */ | ||
206 | if (cpu_is_omap243x()) { | ||
207 | /* Currently only supports 2430ES2.1 and 2430-all */ | ||
208 | omap_chip.oc |= CHIP_IS_OMAP2430; | ||
209 | } else if (cpu_is_omap242x()) { | ||
210 | /* Currently only supports 2420ES2.1.1 and 2420-all */ | ||
211 | omap_chip.oc |= CHIP_IS_OMAP2420; | ||
212 | } else if (cpu_is_omap343x()) { | ||
213 | omap_chip.oc = CHIP_IS_OMAP3430; | ||
214 | if (omap_rev() == OMAP3430_REV_ES1_0) | ||
215 | omap_chip.oc |= CHIP_IS_OMAP3430ES1; | ||
216 | else if (omap_rev() > OMAP3430_REV_ES1_0) | ||
217 | omap_chip.oc |= CHIP_IS_OMAP3430ES2; | ||
218 | } else { | ||
219 | pr_err("Uninitialized omap_chip, please fix!\n"); | ||
220 | } | ||
221 | } | ||
222 | |||
223 | /* | ||
224 | * Set up things for map_io and processor detection later on. Gets called | ||
225 | * pretty much first thing from board init. For multi-omap, this gets | ||
226 | * cpu_is_omapxxxx() working accurately enough for map_io. Then we'll try to | ||
227 | * detect the exact revision later on in omap2_detect_revision() once map_io | ||
228 | * is done. | ||
229 | */ | ||
269 | void __init omap2_set_globals_tap(struct omap_globals *omap2_globals) | 230 | void __init omap2_set_globals_tap(struct omap_globals *omap2_globals) |
270 | { | 231 | { |
271 | class = omap2_globals->class; | 232 | omap_revision = omap2_globals->class; |
272 | tap_base = omap2_globals->tap; | 233 | tap_base = omap2_globals->tap; |
273 | 234 | ||
274 | if (class == 0x3430) | 235 | if (cpu_is_omap34xx()) |
275 | tap_prod_id = 0x0210; | 236 | tap_prod_id = 0x0210; |
276 | else | 237 | else |
277 | tap_prod_id = 0x0208; | 238 | tap_prod_id = 0x0208; |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index c40fc378a251..636e2821af7d 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #define INTC_REVISION 0x0000 | 23 | #define INTC_REVISION 0x0000 |
24 | #define INTC_SYSCONFIG 0x0010 | 24 | #define INTC_SYSCONFIG 0x0010 |
25 | #define INTC_SYSSTATUS 0x0014 | 25 | #define INTC_SYSSTATUS 0x0014 |
26 | #define INTC_SIR 0x0040 | ||
26 | #define INTC_CONTROL 0x0048 | 27 | #define INTC_CONTROL 0x0048 |
27 | #define INTC_MIR_CLEAR0 0x0088 | 28 | #define INTC_MIR_CLEAR0 0x0088 |
28 | #define INTC_MIR_SET0 0x008c | 29 | #define INTC_MIR_SET0 0x008c |
@@ -60,6 +61,30 @@ static u32 intc_bank_read_reg(struct omap_irq_bank *bank, u16 reg) | |||
60 | return __raw_readl(bank->base_reg + reg); | 61 | return __raw_readl(bank->base_reg + reg); |
61 | } | 62 | } |
62 | 63 | ||
64 | static int previous_irq; | ||
65 | |||
66 | /* | ||
67 | * On 34xx we can get occasional spurious interrupts if the ack from | ||
68 | * an interrupt handler does not get posted before we unmask. Warn about | ||
69 | * the interrupt handlers that need to flush posted writes. | ||
70 | */ | ||
71 | static int omap_check_spurious(unsigned int irq) | ||
72 | { | ||
73 | u32 sir, spurious; | ||
74 | |||
75 | sir = intc_bank_read_reg(&irq_banks[0], INTC_SIR); | ||
76 | spurious = sir >> 6; | ||
77 | |||
78 | if (spurious > 1) { | ||
79 | printk(KERN_WARNING "Spurious irq %i: 0x%08x, please flush " | ||
80 | "posted write for irq %i\n", | ||
81 | irq, sir, previous_irq); | ||
82 | return spurious; | ||
83 | } | ||
84 | |||
85 | return 0; | ||
86 | } | ||
87 | |||
63 | /* XXX: FIQ and additional INTC support (only MPU at the moment) */ | 88 | /* XXX: FIQ and additional INTC support (only MPU at the moment) */ |
64 | static void omap_ack_irq(unsigned int irq) | 89 | static void omap_ack_irq(unsigned int irq) |
65 | { | 90 | { |
@@ -70,6 +95,20 @@ static void omap_mask_irq(unsigned int irq) | |||
70 | { | 95 | { |
71 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); | 96 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); |
72 | 97 | ||
98 | if (cpu_is_omap34xx()) { | ||
99 | int spurious = 0; | ||
100 | |||
101 | /* | ||
102 | * INT_34XX_GPT12_IRQ is also the spurious irq. Maybe because | ||
103 | * it is the highest irq number? | ||
104 | */ | ||
105 | if (irq == INT_34XX_GPT12_IRQ) | ||
106 | spurious = omap_check_spurious(irq); | ||
107 | |||
108 | if (!spurious) | ||
109 | previous_irq = irq; | ||
110 | } | ||
111 | |||
73 | irq &= (IRQ_BITS_PER_REG - 1); | 112 | irq &= (IRQ_BITS_PER_REG - 1); |
74 | 113 | ||
75 | intc_bank_write_reg(1 << irq, &irq_banks[0], INTC_MIR_SET0 + offset); | 114 | intc_bank_write_reg(1 << irq, &irq_banks[0], INTC_MIR_SET0 + offset); |
diff --git a/arch/arm/mach-omap2/mmc-twl4030.c b/arch/arm/mach-omap2/mmc-twl4030.c new file mode 100644 index 000000000000..437f52073f6e --- /dev/null +++ b/arch/arm/mach-omap2/mmc-twl4030.c | |||
@@ -0,0 +1,408 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/mmc-twl4030.c | ||
3 | * | ||
4 | * Copyright (C) 2007-2008 Texas Instruments | ||
5 | * Copyright (C) 2008 Nokia Corporation | ||
6 | * Author: Texas Instruments | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/err.h> | ||
13 | #include <linux/io.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/delay.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/i2c/twl4030.h> | ||
20 | |||
21 | #include <mach/hardware.h> | ||
22 | #include <mach/control.h> | ||
23 | #include <mach/mmc.h> | ||
24 | #include <mach/board.h> | ||
25 | |||
26 | #include "mmc-twl4030.h" | ||
27 | |||
28 | #if defined(CONFIG_TWL4030_CORE) && \ | ||
29 | (defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)) | ||
30 | |||
31 | #define LDO_CLR 0x00 | ||
32 | #define VSEL_S2_CLR 0x40 | ||
33 | |||
34 | #define VMMC1_DEV_GRP 0x27 | ||
35 | #define VMMC1_CLR 0x00 | ||
36 | #define VMMC1_315V 0x03 | ||
37 | #define VMMC1_300V 0x02 | ||
38 | #define VMMC1_285V 0x01 | ||
39 | #define VMMC1_185V 0x00 | ||
40 | #define VMMC1_DEDICATED 0x2A | ||
41 | |||
42 | #define VMMC2_DEV_GRP 0x2B | ||
43 | #define VMMC2_CLR 0x40 | ||
44 | #define VMMC2_315V 0x0c | ||
45 | #define VMMC2_300V 0x0b | ||
46 | #define VMMC2_285V 0x0a | ||
47 | #define VMMC2_260V 0x08 | ||
48 | #define VMMC2_185V 0x06 | ||
49 | #define VMMC2_DEDICATED 0x2E | ||
50 | |||
51 | #define VMMC_DEV_GRP_P1 0x20 | ||
52 | |||
53 | static u16 control_pbias_offset; | ||
54 | static u16 control_devconf1_offset; | ||
55 | |||
56 | #define HSMMC_NAME_LEN 9 | ||
57 | |||
58 | static struct twl_mmc_controller { | ||
59 | struct omap_mmc_platform_data *mmc; | ||
60 | u8 twl_vmmc_dev_grp; | ||
61 | u8 twl_mmc_dedicated; | ||
62 | char name[HSMMC_NAME_LEN]; | ||
63 | } hsmmc[] = { | ||
64 | { | ||
65 | .twl_vmmc_dev_grp = VMMC1_DEV_GRP, | ||
66 | .twl_mmc_dedicated = VMMC1_DEDICATED, | ||
67 | }, | ||
68 | { | ||
69 | .twl_vmmc_dev_grp = VMMC2_DEV_GRP, | ||
70 | .twl_mmc_dedicated = VMMC2_DEDICATED, | ||
71 | }, | ||
72 | }; | ||
73 | |||
74 | static int twl_mmc_card_detect(int irq) | ||
75 | { | ||
76 | unsigned i; | ||
77 | |||
78 | for (i = 0; i < ARRAY_SIZE(hsmmc); i++) { | ||
79 | struct omap_mmc_platform_data *mmc; | ||
80 | |||
81 | mmc = hsmmc[i].mmc; | ||
82 | if (!mmc) | ||
83 | continue; | ||
84 | if (irq != mmc->slots[0].card_detect_irq) | ||
85 | continue; | ||
86 | |||
87 | /* NOTE: assumes card detect signal is active-low */ | ||
88 | return !gpio_get_value_cansleep(mmc->slots[0].switch_pin); | ||
89 | } | ||
90 | return -ENOSYS; | ||
91 | } | ||
92 | |||
93 | static int twl_mmc_get_ro(struct device *dev, int slot) | ||
94 | { | ||
95 | struct omap_mmc_platform_data *mmc = dev->platform_data; | ||
96 | |||
97 | /* NOTE: assumes write protect signal is active-high */ | ||
98 | return gpio_get_value_cansleep(mmc->slots[0].gpio_wp); | ||
99 | } | ||
100 | |||
101 | /* | ||
102 | * MMC Slot Initialization. | ||
103 | */ | ||
104 | static int twl_mmc_late_init(struct device *dev) | ||
105 | { | ||
106 | struct omap_mmc_platform_data *mmc = dev->platform_data; | ||
107 | int ret = 0; | ||
108 | int i; | ||
109 | |||
110 | ret = gpio_request(mmc->slots[0].switch_pin, "mmc_cd"); | ||
111 | if (ret) | ||
112 | goto done; | ||
113 | ret = gpio_direction_input(mmc->slots[0].switch_pin); | ||
114 | if (ret) | ||
115 | goto err; | ||
116 | |||
117 | for (i = 0; i < ARRAY_SIZE(hsmmc); i++) { | ||
118 | if (hsmmc[i].name == mmc->slots[0].name) { | ||
119 | hsmmc[i].mmc = mmc; | ||
120 | break; | ||
121 | } | ||
122 | } | ||
123 | |||
124 | return 0; | ||
125 | |||
126 | err: | ||
127 | gpio_free(mmc->slots[0].switch_pin); | ||
128 | done: | ||
129 | mmc->slots[0].card_detect_irq = 0; | ||
130 | mmc->slots[0].card_detect = NULL; | ||
131 | |||
132 | dev_err(dev, "err %d configuring card detect\n", ret); | ||
133 | return ret; | ||
134 | } | ||
135 | |||
136 | static void twl_mmc_cleanup(struct device *dev) | ||
137 | { | ||
138 | struct omap_mmc_platform_data *mmc = dev->platform_data; | ||
139 | |||
140 | gpio_free(mmc->slots[0].switch_pin); | ||
141 | } | ||
142 | |||
143 | #ifdef CONFIG_PM | ||
144 | |||
145 | static int twl_mmc_suspend(struct device *dev, int slot) | ||
146 | { | ||
147 | struct omap_mmc_platform_data *mmc = dev->platform_data; | ||
148 | |||
149 | disable_irq(mmc->slots[0].card_detect_irq); | ||
150 | return 0; | ||
151 | } | ||
152 | |||
153 | static int twl_mmc_resume(struct device *dev, int slot) | ||
154 | { | ||
155 | struct omap_mmc_platform_data *mmc = dev->platform_data; | ||
156 | |||
157 | enable_irq(mmc->slots[0].card_detect_irq); | ||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | #else | ||
162 | #define twl_mmc_suspend NULL | ||
163 | #define twl_mmc_resume NULL | ||
164 | #endif | ||
165 | |||
166 | /* | ||
167 | * Sets the MMC voltage in twl4030 | ||
168 | */ | ||
169 | static int twl_mmc_set_voltage(struct twl_mmc_controller *c, int vdd) | ||
170 | { | ||
171 | int ret; | ||
172 | u8 vmmc, dev_grp_val; | ||
173 | |||
174 | switch (1 << vdd) { | ||
175 | case MMC_VDD_35_36: | ||
176 | case MMC_VDD_34_35: | ||
177 | case MMC_VDD_33_34: | ||
178 | case MMC_VDD_32_33: | ||
179 | case MMC_VDD_31_32: | ||
180 | case MMC_VDD_30_31: | ||
181 | if (c->twl_vmmc_dev_grp == VMMC1_DEV_GRP) | ||
182 | vmmc = VMMC1_315V; | ||
183 | else | ||
184 | vmmc = VMMC2_315V; | ||
185 | break; | ||
186 | case MMC_VDD_29_30: | ||
187 | if (c->twl_vmmc_dev_grp == VMMC1_DEV_GRP) | ||
188 | vmmc = VMMC1_315V; | ||
189 | else | ||
190 | vmmc = VMMC2_300V; | ||
191 | break; | ||
192 | case MMC_VDD_27_28: | ||
193 | case MMC_VDD_26_27: | ||
194 | if (c->twl_vmmc_dev_grp == VMMC1_DEV_GRP) | ||
195 | vmmc = VMMC1_285V; | ||
196 | else | ||
197 | vmmc = VMMC2_285V; | ||
198 | break; | ||
199 | case MMC_VDD_25_26: | ||
200 | case MMC_VDD_24_25: | ||
201 | case MMC_VDD_23_24: | ||
202 | case MMC_VDD_22_23: | ||
203 | case MMC_VDD_21_22: | ||
204 | case MMC_VDD_20_21: | ||
205 | if (c->twl_vmmc_dev_grp == VMMC1_DEV_GRP) | ||
206 | vmmc = VMMC1_285V; | ||
207 | else | ||
208 | vmmc = VMMC2_260V; | ||
209 | break; | ||
210 | case MMC_VDD_165_195: | ||
211 | if (c->twl_vmmc_dev_grp == VMMC1_DEV_GRP) | ||
212 | vmmc = VMMC1_185V; | ||
213 | else | ||
214 | vmmc = VMMC2_185V; | ||
215 | break; | ||
216 | default: | ||
217 | vmmc = 0; | ||
218 | break; | ||
219 | } | ||
220 | |||
221 | if (vmmc) | ||
222 | dev_grp_val = VMMC_DEV_GRP_P1; /* Power up */ | ||
223 | else | ||
224 | dev_grp_val = LDO_CLR; /* Power down */ | ||
225 | |||
226 | ret = twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, | ||
227 | dev_grp_val, c->twl_vmmc_dev_grp); | ||
228 | if (ret) | ||
229 | return ret; | ||
230 | |||
231 | ret = twl4030_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, | ||
232 | vmmc, c->twl_mmc_dedicated); | ||
233 | |||
234 | return ret; | ||
235 | } | ||
236 | |||
237 | static int twl_mmc1_set_power(struct device *dev, int slot, int power_on, | ||
238 | int vdd) | ||
239 | { | ||
240 | u32 reg; | ||
241 | int ret = 0; | ||
242 | struct twl_mmc_controller *c = &hsmmc[0]; | ||
243 | struct omap_mmc_platform_data *mmc = dev->platform_data; | ||
244 | |||
245 | if (power_on) { | ||
246 | if (cpu_is_omap2430()) { | ||
247 | reg = omap_ctrl_readl(OMAP243X_CONTROL_DEVCONF1); | ||
248 | if ((1 << vdd) >= MMC_VDD_30_31) | ||
249 | reg |= OMAP243X_MMC1_ACTIVE_OVERWRITE; | ||
250 | else | ||
251 | reg &= ~OMAP243X_MMC1_ACTIVE_OVERWRITE; | ||
252 | omap_ctrl_writel(reg, OMAP243X_CONTROL_DEVCONF1); | ||
253 | } | ||
254 | |||
255 | if (mmc->slots[0].internal_clock) { | ||
256 | reg = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
257 | reg |= OMAP2_MMCSDIO1ADPCLKISEL; | ||
258 | omap_ctrl_writel(reg, OMAP2_CONTROL_DEVCONF0); | ||
259 | } | ||
260 | |||
261 | reg = omap_ctrl_readl(control_pbias_offset); | ||
262 | reg |= OMAP2_PBIASSPEEDCTRL0; | ||
263 | reg &= ~OMAP2_PBIASLITEPWRDNZ0; | ||
264 | omap_ctrl_writel(reg, control_pbias_offset); | ||
265 | |||
266 | ret = twl_mmc_set_voltage(c, vdd); | ||
267 | |||
268 | /* 100ms delay required for PBIAS configuration */ | ||
269 | msleep(100); | ||
270 | reg = omap_ctrl_readl(control_pbias_offset); | ||
271 | reg |= (OMAP2_PBIASLITEPWRDNZ0 | OMAP2_PBIASSPEEDCTRL0); | ||
272 | if ((1 << vdd) <= MMC_VDD_165_195) | ||
273 | reg &= ~OMAP2_PBIASLITEVMODE0; | ||
274 | else | ||
275 | reg |= OMAP2_PBIASLITEVMODE0; | ||
276 | omap_ctrl_writel(reg, control_pbias_offset); | ||
277 | } else { | ||
278 | reg = omap_ctrl_readl(control_pbias_offset); | ||
279 | reg &= ~OMAP2_PBIASLITEPWRDNZ0; | ||
280 | omap_ctrl_writel(reg, control_pbias_offset); | ||
281 | |||
282 | ret = twl_mmc_set_voltage(c, 0); | ||
283 | |||
284 | /* 100ms delay required for PBIAS configuration */ | ||
285 | msleep(100); | ||
286 | reg = omap_ctrl_readl(control_pbias_offset); | ||
287 | reg |= (OMAP2_PBIASSPEEDCTRL0 | OMAP2_PBIASLITEPWRDNZ0 | | ||
288 | OMAP2_PBIASLITEVMODE0); | ||
289 | omap_ctrl_writel(reg, control_pbias_offset); | ||
290 | } | ||
291 | |||
292 | return ret; | ||
293 | } | ||
294 | |||
295 | static int twl_mmc2_set_power(struct device *dev, int slot, int power_on, int vdd) | ||
296 | { | ||
297 | int ret; | ||
298 | struct twl_mmc_controller *c = &hsmmc[1]; | ||
299 | struct omap_mmc_platform_data *mmc = dev->platform_data; | ||
300 | |||
301 | if (power_on) { | ||
302 | if (mmc->slots[0].internal_clock) { | ||
303 | u32 reg; | ||
304 | |||
305 | reg = omap_ctrl_readl(control_devconf1_offset); | ||
306 | reg |= OMAP2_MMCSDIO2ADPCLKISEL; | ||
307 | omap_ctrl_writel(reg, control_devconf1_offset); | ||
308 | } | ||
309 | ret = twl_mmc_set_voltage(c, vdd); | ||
310 | } else { | ||
311 | ret = twl_mmc_set_voltage(c, 0); | ||
312 | } | ||
313 | |||
314 | return ret; | ||
315 | } | ||
316 | |||
317 | static struct omap_mmc_platform_data *hsmmc_data[OMAP34XX_NR_MMC] __initdata; | ||
318 | |||
319 | void __init twl4030_mmc_init(struct twl4030_hsmmc_info *controllers) | ||
320 | { | ||
321 | struct twl4030_hsmmc_info *c; | ||
322 | int nr_hsmmc = ARRAY_SIZE(hsmmc_data); | ||
323 | |||
324 | if (cpu_is_omap2430()) { | ||
325 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; | ||
326 | control_devconf1_offset = OMAP243X_CONTROL_DEVCONF1; | ||
327 | nr_hsmmc = 2; | ||
328 | } else { | ||
329 | control_pbias_offset = OMAP343X_CONTROL_PBIAS_LITE; | ||
330 | control_devconf1_offset = OMAP343X_CONTROL_DEVCONF1; | ||
331 | } | ||
332 | |||
333 | for (c = controllers; c->mmc; c++) { | ||
334 | struct twl_mmc_controller *twl = hsmmc + c->mmc - 1; | ||
335 | struct omap_mmc_platform_data *mmc = hsmmc_data[c->mmc - 1]; | ||
336 | |||
337 | if (!c->mmc || c->mmc > nr_hsmmc) { | ||
338 | pr_debug("MMC%d: no such controller\n", c->mmc); | ||
339 | continue; | ||
340 | } | ||
341 | if (mmc) { | ||
342 | pr_debug("MMC%d: already configured\n", c->mmc); | ||
343 | continue; | ||
344 | } | ||
345 | |||
346 | mmc = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL); | ||
347 | if (!mmc) { | ||
348 | pr_err("Cannot allocate memory for mmc device!\n"); | ||
349 | return; | ||
350 | } | ||
351 | |||
352 | sprintf(twl->name, "mmc%islot%i", c->mmc, 1); | ||
353 | mmc->slots[0].name = twl->name; | ||
354 | mmc->nr_slots = 1; | ||
355 | mmc->slots[0].ocr_mask = MMC_VDD_165_195 | | ||
356 | MMC_VDD_26_27 | MMC_VDD_27_28 | | ||
357 | MMC_VDD_29_30 | | ||
358 | MMC_VDD_30_31 | MMC_VDD_31_32; | ||
359 | mmc->slots[0].wires = c->wires; | ||
360 | mmc->slots[0].internal_clock = !c->ext_clock; | ||
361 | mmc->dma_mask = 0xffffffff; | ||
362 | |||
363 | /* note: twl4030 card detect GPIOs normally switch VMMCx ... */ | ||
364 | if (gpio_is_valid(c->gpio_cd)) { | ||
365 | mmc->init = twl_mmc_late_init; | ||
366 | mmc->cleanup = twl_mmc_cleanup; | ||
367 | mmc->suspend = twl_mmc_suspend; | ||
368 | mmc->resume = twl_mmc_resume; | ||
369 | |||
370 | mmc->slots[0].switch_pin = c->gpio_cd; | ||
371 | mmc->slots[0].card_detect_irq = gpio_to_irq(c->gpio_cd); | ||
372 | mmc->slots[0].card_detect = twl_mmc_card_detect; | ||
373 | } else | ||
374 | mmc->slots[0].switch_pin = -EINVAL; | ||
375 | |||
376 | /* write protect normally uses an OMAP gpio */ | ||
377 | if (gpio_is_valid(c->gpio_wp)) { | ||
378 | gpio_request(c->gpio_wp, "mmc_wp"); | ||
379 | gpio_direction_input(c->gpio_wp); | ||
380 | |||
381 | mmc->slots[0].gpio_wp = c->gpio_wp; | ||
382 | mmc->slots[0].get_ro = twl_mmc_get_ro; | ||
383 | } else | ||
384 | mmc->slots[0].gpio_wp = -EINVAL; | ||
385 | |||
386 | /* NOTE: we assume OMAP's MMC1 and MMC2 use | ||
387 | * the TWL4030's VMMC1 and VMMC2, respectively; | ||
388 | * and that OMAP's MMC3 isn't used. | ||
389 | */ | ||
390 | |||
391 | switch (c->mmc) { | ||
392 | case 1: | ||
393 | mmc->slots[0].set_power = twl_mmc1_set_power; | ||
394 | break; | ||
395 | case 2: | ||
396 | mmc->slots[0].set_power = twl_mmc2_set_power; | ||
397 | break; | ||
398 | default: | ||
399 | pr_err("MMC%d configuration not supported!\n", c->mmc); | ||
400 | continue; | ||
401 | } | ||
402 | hsmmc_data[c->mmc - 1] = mmc; | ||
403 | } | ||
404 | |||
405 | omap2_init_mmc(hsmmc_data, OMAP34XX_NR_MMC); | ||
406 | } | ||
407 | |||
408 | #endif | ||
diff --git a/arch/arm/mach-omap2/mmc-twl4030.h b/arch/arm/mach-omap2/mmc-twl4030.h new file mode 100644 index 000000000000..e1c8076400ca --- /dev/null +++ b/arch/arm/mach-omap2/mmc-twl4030.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * MMC definitions for OMAP2 | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | struct twl4030_hsmmc_info { | ||
10 | u8 mmc; /* controller 1/2/3 */ | ||
11 | u8 wires; /* 1/4/8 wires */ | ||
12 | int gpio_cd; /* or -EINVAL */ | ||
13 | int gpio_wp; /* or -EINVAL */ | ||
14 | int ext_clock:1; /* use external pin for input clock */ | ||
15 | }; | ||
16 | |||
17 | #if defined(CONFIG_TWL4030_CORE) && \ | ||
18 | (defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ | ||
19 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)) | ||
20 | |||
21 | void twl4030_mmc_init(struct twl4030_hsmmc_info *); | ||
22 | |||
23 | #else | ||
24 | |||
25 | static inline void twl4030_mmc_init(struct twl4030_hsmmc_info *info) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | #endif | ||
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index b1393673d95d..dacb41f130c0 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -203,6 +203,15 @@ MUX_CFG_24XX("AE9_2430_USB0HS_NXT", 0x13D, 0, 0, 0, 1) | |||
203 | MUX_CFG_24XX("AC7_2430_USB0HS_DATA7", 0x13E, 0, 0, 0, 1) | 203 | MUX_CFG_24XX("AC7_2430_USB0HS_DATA7", 0x13E, 0, 0, 0, 1) |
204 | 204 | ||
205 | /* 2430 McBSP */ | 205 | /* 2430 McBSP */ |
206 | MUX_CFG_24XX("AD6_2430_MCBSP_CLKS", 0x011E, 0, 0, 0, 1) | ||
207 | |||
208 | MUX_CFG_24XX("AB2_2430_MCBSP1_CLKR", 0x011A, 0, 0, 0, 1) | ||
209 | MUX_CFG_24XX("AD5_2430_MCBSP1_FSR", 0x011B, 0, 0, 0, 1) | ||
210 | MUX_CFG_24XX("AA1_2430_MCBSP1_DX", 0x011C, 0, 0, 0, 1) | ||
211 | MUX_CFG_24XX("AF3_2430_MCBSP1_DR", 0x011D, 0, 0, 0, 1) | ||
212 | MUX_CFG_24XX("AB3_2430_MCBSP1_FSX", 0x011F, 0, 0, 0, 1) | ||
213 | MUX_CFG_24XX("Y9_2430_MCBSP1_CLKX", 0x0120, 0, 0, 0, 1) | ||
214 | |||
206 | MUX_CFG_24XX("AC10_2430_MCBSP2_FSX", 0x012E, 1, 0, 0, 1) | 215 | MUX_CFG_24XX("AC10_2430_MCBSP2_FSX", 0x012E, 1, 0, 0, 1) |
207 | MUX_CFG_24XX("AD16_2430_MCBSP2_CLX", 0x012F, 1, 0, 0, 1) | 216 | MUX_CFG_24XX("AD16_2430_MCBSP2_CLX", 0x012F, 1, 0, 0, 1) |
208 | MUX_CFG_24XX("AE13_2430_MCBSP2_DX", 0x0130, 1, 0, 0, 1) | 217 | MUX_CFG_24XX("AE13_2430_MCBSP2_DX", 0x0130, 1, 0, 0, 1) |
@@ -211,6 +220,31 @@ MUX_CFG_24XX("AC10_2430_MCBSP2_FSX_OFF",0x012E, 0, 0, 0, 1) | |||
211 | MUX_CFG_24XX("AD16_2430_MCBSP2_CLX_OFF",0x012F, 0, 0, 0, 1) | 220 | MUX_CFG_24XX("AD16_2430_MCBSP2_CLX_OFF",0x012F, 0, 0, 0, 1) |
212 | MUX_CFG_24XX("AE13_2430_MCBSP2_DX_OFF", 0x0130, 0, 0, 0, 1) | 221 | MUX_CFG_24XX("AE13_2430_MCBSP2_DX_OFF", 0x0130, 0, 0, 0, 1) |
213 | MUX_CFG_24XX("AD13_2430_MCBSP2_DR_OFF", 0x0131, 0, 0, 0, 1) | 222 | MUX_CFG_24XX("AD13_2430_MCBSP2_DR_OFF", 0x0131, 0, 0, 0, 1) |
223 | |||
224 | MUX_CFG_24XX("AC9_2430_MCBSP3_CLKX", 0x0103, 0, 0, 0, 1) | ||
225 | MUX_CFG_24XX("AE4_2430_MCBSP3_FSX", 0x0104, 0, 0, 0, 1) | ||
226 | MUX_CFG_24XX("AE2_2430_MCBSP3_DR", 0x0105, 0, 0, 0, 1) | ||
227 | MUX_CFG_24XX("AF4_2430_MCBSP3_DX", 0x0106, 0, 0, 0, 1) | ||
228 | |||
229 | MUX_CFG_24XX("N3_2430_MCBSP4_CLKX", 0x010B, 1, 0, 0, 1) | ||
230 | MUX_CFG_24XX("AD23_2430_MCBSP4_DR", 0x010C, 1, 0, 0, 1) | ||
231 | MUX_CFG_24XX("AB25_2430_MCBSP4_DX", 0x010D, 1, 0, 0, 1) | ||
232 | MUX_CFG_24XX("AC25_2430_MCBSP4_FSX", 0x010E, 1, 0, 0, 1) | ||
233 | |||
234 | MUX_CFG_24XX("AE16_2430_MCBSP5_CLKX", 0x00ED, 1, 0, 0, 1) | ||
235 | MUX_CFG_24XX("AF12_2430_MCBSP5_FSX", 0x00ED, 1, 0, 0, 1) | ||
236 | MUX_CFG_24XX("K7_2430_MCBSP5_DX", 0x00EF, 1, 0, 0, 1) | ||
237 | MUX_CFG_24XX("M1_2430_MCBSP5_DR", 0x00F0, 1, 0, 0, 1) | ||
238 | |||
239 | /* 2430 MCSPI1 */ | ||
240 | MUX_CFG_24XX("Y18_2430_MCSPI1_CLK", 0x010F, 0, 0, 0, 1) | ||
241 | MUX_CFG_24XX("AD15_2430_MCSPI1_SIMO", 0x0110, 0, 0, 0, 1) | ||
242 | MUX_CFG_24XX("AE17_2430_MCSPI1_SOMI", 0x0111, 0, 0, 0, 1) | ||
243 | MUX_CFG_24XX("U1_2430_MCSPI1_CS0", 0x0112, 0, 0, 0, 1) | ||
244 | |||
245 | /* Touchscreen GPIO */ | ||
246 | MUX_CFG_24XX("AF19_2430_GPIO_85", 0x0113, 3, 0, 0, 1) | ||
247 | |||
214 | }; | 248 | }; |
215 | 249 | ||
216 | #define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) | 250 | #define OMAP24XX_PINS_SZ ARRAY_SIZE(omap24xx_pins) |
@@ -417,6 +451,14 @@ MUX_CFG_34XX("AD2_3430_USB3FS_PHY_MM3_TXDAT", 0x188, | |||
417 | MUX_CFG_34XX("AC1_3430_USB3FS_PHY_MM3_TXEN_N", 0x18a, | 451 | MUX_CFG_34XX("AC1_3430_USB3FS_PHY_MM3_TXEN_N", 0x18a, |
418 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_OUTPUT) | 452 | OMAP34XX_MUX_MODE6 | OMAP34XX_PIN_OUTPUT) |
419 | 453 | ||
454 | |||
455 | /* 34XX GPIO - bidirectional, unless the name has an "_OUT" suffix. | ||
456 | * No internal pullup/pulldown without "_UP" or "_DOWN" suffix. | ||
457 | */ | ||
458 | MUX_CFG_34XX("AH8_34XX_GPIO29", 0x5fa, | ||
459 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
460 | MUX_CFG_34XX("J25_34XX_GPIO170", 0x1c6, | ||
461 | OMAP34XX_MUX_MODE4 | OMAP34XX_PIN_INPUT) | ||
420 | }; | 462 | }; |
421 | 463 | ||
422 | #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) | 464 | #define OMAP34XX_PINS_SZ ARRAY_SIZE(omap34xx_pins) |
@@ -452,7 +494,7 @@ static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 r | |||
452 | #endif | 494 | #endif |
453 | 495 | ||
454 | #ifdef CONFIG_ARCH_OMAP24XX | 496 | #ifdef CONFIG_ARCH_OMAP24XX |
455 | int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) | 497 | static int __init_or_module omap24xx_cfg_reg(const struct pin_config *cfg) |
456 | { | 498 | { |
457 | static DEFINE_SPINLOCK(mux_spin_lock); | 499 | static DEFINE_SPINLOCK(mux_spin_lock); |
458 | unsigned long flags; | 500 | unsigned long flags; |
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c index 10ef464d6be7..15e509013def 100644 --- a/arch/arm/mach-omap2/usb-tusb6010.c +++ b/arch/arm/mach-omap2/usb-tusb6010.c | |||
@@ -12,11 +12,11 @@ | |||
12 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <linux/gpio.h> | ||
15 | 16 | ||
16 | #include <linux/usb/musb.h> | 17 | #include <linux/usb/musb.h> |
17 | 18 | ||
18 | #include <mach/gpmc.h> | 19 | #include <mach/gpmc.h> |
19 | #include <mach/gpio.h> | ||
20 | #include <mach/mux.h> | 20 | #include <mach/mux.h> |
21 | 21 | ||
22 | 22 | ||
@@ -292,12 +292,12 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data, | |||
292 | ); | 292 | ); |
293 | 293 | ||
294 | /* IRQ */ | 294 | /* IRQ */ |
295 | status = omap_request_gpio(irq); | 295 | status = gpio_request(irq, "TUSB6010 irq"); |
296 | if (status < 0) { | 296 | if (status < 0) { |
297 | printk(error, 3, status); | 297 | printk(error, 3, status); |
298 | return status; | 298 | return status; |
299 | } | 299 | } |
300 | omap_set_gpio_direction(irq, 1); | 300 | gpio_direction_input(irq); |
301 | tusb_resources[2].start = irq + IH_GPIO_BASE; | 301 | tusb_resources[2].start = irq + IH_GPIO_BASE; |
302 | 302 | ||
303 | /* set up memory timings ... can speed them up later */ | 303 | /* set up memory timings ... can speed them up later */ |
diff --git a/arch/arm/mach-orion5x/Makefile b/arch/arm/mach-orion5x/Makefile index 3d4a1bc12355..edc38e2c856f 100644 --- a/arch/arm/mach-orion5x/Makefile +++ b/arch/arm/mach-orion5x/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y += common.o addr-map.o pci.o gpio.o irq.o mpp.o | 1 | obj-y += common.o addr-map.o pci.o irq.o mpp.o |
2 | obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o | 2 | obj-$(CONFIG_MACH_DB88F5281) += db88f5281-setup.o |
3 | obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o | 3 | obj-$(CONFIG_MACH_RD88F5182) += rd88f5182-setup.o |
4 | obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o | 4 | obj-$(CONFIG_MACH_KUROBOX_PRO) += kurobox_pro-setup.o |
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c index 437065c25c9c..0a623379789f 100644 --- a/arch/arm/mach-orion5x/common.c +++ b/arch/arm/mach-orion5x/common.c | |||
@@ -72,6 +72,7 @@ void __init orion5x_map_io(void) | |||
72 | ****************************************************************************/ | 72 | ****************************************************************************/ |
73 | static struct orion_ehci_data orion5x_ehci_data = { | 73 | static struct orion_ehci_data orion5x_ehci_data = { |
74 | .dram = &orion5x_mbus_dram_info, | 74 | .dram = &orion5x_mbus_dram_info, |
75 | .phy_version = EHCI_PHY_ORION, | ||
75 | }; | 76 | }; |
76 | 77 | ||
77 | static u64 ehci_dmamask = 0xffffffffUL; | 78 | static u64 ehci_dmamask = 0xffffffffUL; |
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index a000c7c6ee96..798b9a5e3da9 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -51,13 +51,6 @@ int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); | |||
51 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); | 51 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); |
52 | int orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); | 52 | int orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); |
53 | 53 | ||
54 | /* | ||
55 | * Valid GPIO pins according to MPP setup, used by machine-setup. | ||
56 | * (/mach-orion/gpio.c). | ||
57 | */ | ||
58 | void orion5x_gpio_set_valid(unsigned pin, int valid); | ||
59 | void gpio_display(void); /* debug */ | ||
60 | |||
61 | struct machine_desc; | 54 | struct machine_desc; |
62 | struct meminfo; | 55 | struct meminfo; |
63 | struct tag; | 56 | struct tag; |
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 3e66098340a5..0722d6510df1 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/gpio_keys.h> | 21 | #include <linux/gpio_keys.h> |
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
24 | #include <linux/ata_platform.h> | ||
24 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
25 | #include <asm/gpio.h> | 26 | #include <asm/gpio.h> |
26 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
@@ -64,9 +65,21 @@ static struct hw_pci dns323_pci __initdata = { | |||
64 | .map_irq = dns323_pci_map_irq, | 65 | .map_irq = dns323_pci_map_irq, |
65 | }; | 66 | }; |
66 | 67 | ||
68 | static int __init dns323_dev_id(void) | ||
69 | { | ||
70 | u32 dev, rev; | ||
71 | |||
72 | orion5x_pcie_id(&dev, &rev); | ||
73 | |||
74 | return dev; | ||
75 | } | ||
76 | |||
67 | static int __init dns323_pci_init(void) | 77 | static int __init dns323_pci_init(void) |
68 | { | 78 | { |
69 | if (machine_is_dns323()) | 79 | /* The 5182 doesn't really use it's PCI bus, and initialising PCI |
80 | * gets in the way of initialising the SATA controller. | ||
81 | */ | ||
82 | if (machine_is_dns323() && dns323_dev_id() != MV88F5182_DEV_ID) | ||
70 | pci_common_init(&dns323_pci); | 83 | pci_common_init(&dns323_pci); |
71 | 84 | ||
72 | return 0; | 85 | return 0; |
@@ -75,14 +88,6 @@ static int __init dns323_pci_init(void) | |||
75 | subsys_initcall(dns323_pci_init); | 88 | subsys_initcall(dns323_pci_init); |
76 | 89 | ||
77 | /**************************************************************************** | 90 | /**************************************************************************** |
78 | * Ethernet | ||
79 | */ | ||
80 | |||
81 | static struct mv643xx_eth_platform_data dns323_eth_data = { | ||
82 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
83 | }; | ||
84 | |||
85 | /**************************************************************************** | ||
86 | * 8MiB NOR flash (Spansion S29GL064M90TFIR4) | 91 | * 8MiB NOR flash (Spansion S29GL064M90TFIR4) |
87 | * | 92 | * |
88 | * Layout as used by D-Link: | 93 | * Layout as used by D-Link: |
@@ -143,6 +148,90 @@ static struct platform_device dns323_nor_flash = { | |||
143 | }; | 148 | }; |
144 | 149 | ||
145 | /**************************************************************************** | 150 | /**************************************************************************** |
151 | * Ethernet | ||
152 | */ | ||
153 | |||
154 | static struct mv643xx_eth_platform_data dns323_eth_data = { | ||
155 | .phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
156 | }; | ||
157 | |||
158 | /* dns323_parse_hex_*() taken from tsx09-common.c; should a common copy of these | ||
159 | * functions be kept somewhere? | ||
160 | */ | ||
161 | static int __init dns323_parse_hex_nibble(char n) | ||
162 | { | ||
163 | if (n >= '0' && n <= '9') | ||
164 | return n - '0'; | ||
165 | |||
166 | if (n >= 'A' && n <= 'F') | ||
167 | return n - 'A' + 10; | ||
168 | |||
169 | if (n >= 'a' && n <= 'f') | ||
170 | return n - 'a' + 10; | ||
171 | |||
172 | return -1; | ||
173 | } | ||
174 | |||
175 | static int __init dns323_parse_hex_byte(const char *b) | ||
176 | { | ||
177 | int hi; | ||
178 | int lo; | ||
179 | |||
180 | hi = dns323_parse_hex_nibble(b[0]); | ||
181 | lo = dns323_parse_hex_nibble(b[1]); | ||
182 | |||
183 | if (hi < 0 || lo < 0) | ||
184 | return -1; | ||
185 | |||
186 | return (hi << 4) | lo; | ||
187 | } | ||
188 | |||
189 | static int __init dns323_read_mac_addr(void) | ||
190 | { | ||
191 | u_int8_t addr[6]; | ||
192 | int i; | ||
193 | char *mac_page; | ||
194 | |||
195 | /* MAC address is stored as a regular ol' string in /dev/mtdblock4 | ||
196 | * (0x007d0000-0x00800000) starting at offset 196480 (0x2ff80). | ||
197 | */ | ||
198 | mac_page = ioremap(DNS323_NOR_BOOT_BASE + 0x7d0000 + 196480, 1024); | ||
199 | if (!mac_page) | ||
200 | return -ENOMEM; | ||
201 | |||
202 | /* Sanity check the string we're looking at */ | ||
203 | for (i = 0; i < 5; i++) { | ||
204 | if (*(mac_page + (i * 3) + 2) != ':') { | ||
205 | goto error_fail; | ||
206 | } | ||
207 | } | ||
208 | |||
209 | for (i = 0; i < 6; i++) { | ||
210 | int byte; | ||
211 | |||
212 | byte = dns323_parse_hex_byte(mac_page + (i * 3)); | ||
213 | if (byte < 0) { | ||
214 | goto error_fail; | ||
215 | } | ||
216 | |||
217 | addr[i] = byte; | ||
218 | } | ||
219 | |||
220 | iounmap(mac_page); | ||
221 | printk("DNS323: Found ethernet MAC address: "); | ||
222 | for (i = 0; i < 6; i++) | ||
223 | printk("%.2x%s", addr[i], (i < 5) ? ":" : ".\n"); | ||
224 | |||
225 | memcpy(dns323_eth_data.mac_addr, addr, 6); | ||
226 | |||
227 | return 0; | ||
228 | |||
229 | error_fail: | ||
230 | iounmap(mac_page); | ||
231 | return -EINVAL; | ||
232 | } | ||
233 | |||
234 | /**************************************************************************** | ||
146 | * GPIO LEDs (simple - doesn't use hardware blinking support) | 235 | * GPIO LEDs (simple - doesn't use hardware blinking support) |
147 | */ | 236 | */ |
148 | 237 | ||
@@ -207,10 +296,17 @@ static struct platform_device dns323_button_device = { | |||
207 | }, | 296 | }, |
208 | }; | 297 | }; |
209 | 298 | ||
299 | /***************************************************************************** | ||
300 | * SATA | ||
301 | */ | ||
302 | static struct mv_sata_platform_data dns323_sata_data = { | ||
303 | .n_ports = 2, | ||
304 | }; | ||
305 | |||
210 | /**************************************************************************** | 306 | /**************************************************************************** |
211 | * General Setup | 307 | * General Setup |
212 | */ | 308 | */ |
213 | static struct orion5x_mpp_mode dns323_mpp_modes[] __initdata = { | 309 | static struct orion5x_mpp_mode dns323_mv88f5181_mpp_modes[] __initdata = { |
214 | { 0, MPP_PCIE_RST_OUTn }, | 310 | { 0, MPP_PCIE_RST_OUTn }, |
215 | { 1, MPP_GPIO }, /* right amber LED (sata ch0) */ | 311 | { 1, MPP_GPIO }, /* right amber LED (sata ch0) */ |
216 | { 2, MPP_GPIO }, /* left amber LED (sata ch1) */ | 312 | { 2, MPP_GPIO }, /* left amber LED (sata ch1) */ |
@@ -234,6 +330,30 @@ static struct orion5x_mpp_mode dns323_mpp_modes[] __initdata = { | |||
234 | { -1 }, | 330 | { -1 }, |
235 | }; | 331 | }; |
236 | 332 | ||
333 | static struct orion5x_mpp_mode dns323_mv88f5182_mpp_modes[] __initdata = { | ||
334 | { 0, MPP_UNUSED }, | ||
335 | { 1, MPP_GPIO }, /* right amber LED (sata ch0) */ | ||
336 | { 2, MPP_GPIO }, /* left amber LED (sata ch1) */ | ||
337 | { 3, MPP_UNUSED }, | ||
338 | { 4, MPP_GPIO }, /* power button LED */ | ||
339 | { 5, MPP_GPIO }, /* power button LED */ | ||
340 | { 6, MPP_GPIO }, /* GMT G751-2f overtemp */ | ||
341 | { 7, MPP_GPIO }, /* M41T80 nIRQ/OUT/SQW */ | ||
342 | { 8, MPP_GPIO }, /* triggers power off */ | ||
343 | { 9, MPP_GPIO }, /* power button switch */ | ||
344 | { 10, MPP_GPIO }, /* reset button switch */ | ||
345 | { 11, MPP_UNUSED }, | ||
346 | { 12, MPP_SATA_LED }, | ||
347 | { 13, MPP_SATA_LED }, | ||
348 | { 14, MPP_SATA_LED }, | ||
349 | { 15, MPP_SATA_LED }, | ||
350 | { 16, MPP_UNUSED }, | ||
351 | { 17, MPP_UNUSED }, | ||
352 | { 18, MPP_UNUSED }, | ||
353 | { 19, MPP_UNUSED }, | ||
354 | { -1 }, | ||
355 | }; | ||
356 | |||
237 | /* | 357 | /* |
238 | * On the DNS-323 the following devices are attached via I2C: | 358 | * On the DNS-323 the following devices are attached via I2C: |
239 | * | 359 | * |
@@ -264,16 +384,15 @@ static void __init dns323_init(void) | |||
264 | /* Setup basic Orion functions. Need to be called early. */ | 384 | /* Setup basic Orion functions. Need to be called early. */ |
265 | orion5x_init(); | 385 | orion5x_init(); |
266 | 386 | ||
267 | orion5x_mpp_conf(dns323_mpp_modes); | 387 | /* Just to be tricky, the 5182 has a completely different |
268 | writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */ | 388 | * set of MPP modes to the 5181. |
269 | |||
270 | /* | ||
271 | * Configure peripherals. | ||
272 | */ | 389 | */ |
273 | orion5x_ehci0_init(); | 390 | if (dns323_dev_id() == MV88F5182_DEV_ID) |
274 | orion5x_eth_init(&dns323_eth_data); | 391 | orion5x_mpp_conf(dns323_mv88f5182_mpp_modes); |
275 | orion5x_i2c_init(); | 392 | else { |
276 | orion5x_uart0_init(); | 393 | orion5x_mpp_conf(dns323_mv88f5181_mpp_modes); |
394 | writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */ | ||
395 | } | ||
277 | 396 | ||
278 | /* setup flash mapping | 397 | /* setup flash mapping |
279 | * CS3 holds a 8 MB Spansion S29GL064M90TFIR4 | 398 | * CS3 holds a 8 MB Spansion S29GL064M90TFIR4 |
@@ -288,6 +407,23 @@ static void __init dns323_init(void) | |||
288 | i2c_register_board_info(0, dns323_i2c_devices, | 407 | i2c_register_board_info(0, dns323_i2c_devices, |
289 | ARRAY_SIZE(dns323_i2c_devices)); | 408 | ARRAY_SIZE(dns323_i2c_devices)); |
290 | 409 | ||
410 | /* | ||
411 | * Configure peripherals. | ||
412 | */ | ||
413 | if (dns323_read_mac_addr() < 0) | ||
414 | printk("DNS323: Failed to read MAC address\n"); | ||
415 | |||
416 | orion5x_ehci0_init(); | ||
417 | orion5x_eth_init(&dns323_eth_data); | ||
418 | orion5x_i2c_init(); | ||
419 | orion5x_uart0_init(); | ||
420 | |||
421 | /* The 5182 has it's SATA controller on-chip, and needs it's own little | ||
422 | * init routine. | ||
423 | */ | ||
424 | if (dns323_dev_id() == MV88F5182_DEV_ID) | ||
425 | orion5x_sata_init(&dns323_sata_data); | ||
426 | |||
291 | /* register dns323 specific power-off method */ | 427 | /* register dns323 specific power-off method */ |
292 | if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || | 428 | if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || |
293 | gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0) | 429 | gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0) |
diff --git a/arch/arm/mach-orion5x/gpio.c b/arch/arm/mach-orion5x/gpio.c deleted file mode 100644 index f99d08811e5a..000000000000 --- a/arch/arm/mach-orion5x/gpio.c +++ /dev/null | |||
@@ -1,231 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-orion5x/gpio.c | ||
3 | * | ||
4 | * GPIO functions for Marvell Orion System On Chip | ||
5 | * | ||
6 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/spinlock.h> | ||
17 | #include <linux/bitops.h> | ||
18 | #include <linux/io.h> | ||
19 | #include <asm/gpio.h> | ||
20 | #include <mach/orion5x.h> | ||
21 | #include "common.h" | ||
22 | |||
23 | static DEFINE_SPINLOCK(gpio_lock); | ||
24 | static unsigned long gpio_valid[BITS_TO_LONGS(GPIO_MAX)]; | ||
25 | static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */ | ||
26 | |||
27 | void __init orion5x_gpio_set_valid(unsigned pin, int valid) | ||
28 | { | ||
29 | if (valid) | ||
30 | __set_bit(pin, gpio_valid); | ||
31 | else | ||
32 | __clear_bit(pin, gpio_valid); | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * GENERIC_GPIO primitives | ||
37 | */ | ||
38 | int gpio_direction_input(unsigned pin) | ||
39 | { | ||
40 | unsigned long flags; | ||
41 | |||
42 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | ||
43 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
44 | return -EINVAL; | ||
45 | } | ||
46 | |||
47 | spin_lock_irqsave(&gpio_lock, flags); | ||
48 | |||
49 | /* | ||
50 | * Some callers might have not used the gpio_request(), | ||
51 | * so flag this pin as requested now. | ||
52 | */ | ||
53 | if (!gpio_label[pin]) | ||
54 | gpio_label[pin] = "?"; | ||
55 | |||
56 | orion5x_setbits(GPIO_IO_CONF, 1 << pin); | ||
57 | |||
58 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
59 | return 0; | ||
60 | } | ||
61 | EXPORT_SYMBOL(gpio_direction_input); | ||
62 | |||
63 | int gpio_direction_output(unsigned pin, int value) | ||
64 | { | ||
65 | unsigned long flags; | ||
66 | int mask; | ||
67 | |||
68 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | ||
69 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
70 | return -EINVAL; | ||
71 | } | ||
72 | |||
73 | spin_lock_irqsave(&gpio_lock, flags); | ||
74 | |||
75 | /* | ||
76 | * Some callers might have not used the gpio_request(), | ||
77 | * so flag this pin as requested now. | ||
78 | */ | ||
79 | if (!gpio_label[pin]) | ||
80 | gpio_label[pin] = "?"; | ||
81 | |||
82 | mask = 1 << pin; | ||
83 | orion5x_clrbits(GPIO_BLINK_EN, mask); | ||
84 | if (value) | ||
85 | orion5x_setbits(GPIO_OUT, mask); | ||
86 | else | ||
87 | orion5x_clrbits(GPIO_OUT, mask); | ||
88 | orion5x_clrbits(GPIO_IO_CONF, mask); | ||
89 | |||
90 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
91 | return 0; | ||
92 | } | ||
93 | EXPORT_SYMBOL(gpio_direction_output); | ||
94 | |||
95 | int gpio_get_value(unsigned pin) | ||
96 | { | ||
97 | int val, mask = 1 << pin; | ||
98 | |||
99 | if (readl(GPIO_IO_CONF) & mask) | ||
100 | val = readl(GPIO_DATA_IN) ^ readl(GPIO_IN_POL); | ||
101 | else | ||
102 | val = readl(GPIO_OUT); | ||
103 | |||
104 | return val & mask; | ||
105 | } | ||
106 | EXPORT_SYMBOL(gpio_get_value); | ||
107 | |||
108 | void gpio_set_value(unsigned pin, int value) | ||
109 | { | ||
110 | unsigned long flags; | ||
111 | int mask = 1 << pin; | ||
112 | |||
113 | spin_lock_irqsave(&gpio_lock, flags); | ||
114 | |||
115 | orion5x_clrbits(GPIO_BLINK_EN, mask); | ||
116 | if (value) | ||
117 | orion5x_setbits(GPIO_OUT, mask); | ||
118 | else | ||
119 | orion5x_clrbits(GPIO_OUT, mask); | ||
120 | |||
121 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
122 | } | ||
123 | EXPORT_SYMBOL(gpio_set_value); | ||
124 | |||
125 | void orion5x_gpio_set_blink(unsigned pin, int blink) | ||
126 | { | ||
127 | unsigned long flags; | ||
128 | int mask = 1 << pin; | ||
129 | |||
130 | spin_lock_irqsave(&gpio_lock, flags); | ||
131 | |||
132 | orion5x_clrbits(GPIO_OUT, mask); | ||
133 | if (blink) | ||
134 | orion5x_setbits(GPIO_BLINK_EN, mask); | ||
135 | else | ||
136 | orion5x_clrbits(GPIO_BLINK_EN, mask); | ||
137 | |||
138 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
139 | } | ||
140 | EXPORT_SYMBOL(orion5x_gpio_set_blink); | ||
141 | |||
142 | int gpio_request(unsigned pin, const char *label) | ||
143 | { | ||
144 | int ret = 0; | ||
145 | unsigned long flags; | ||
146 | |||
147 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | ||
148 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
149 | return -EINVAL; | ||
150 | } | ||
151 | |||
152 | spin_lock_irqsave(&gpio_lock, flags); | ||
153 | |||
154 | if (gpio_label[pin]) { | ||
155 | pr_debug("%s: GPIO %d already used as %s\n", | ||
156 | __func__, pin, gpio_label[pin]); | ||
157 | ret = -EBUSY; | ||
158 | } else | ||
159 | gpio_label[pin] = label ? label : "?"; | ||
160 | |||
161 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
162 | return ret; | ||
163 | } | ||
164 | EXPORT_SYMBOL(gpio_request); | ||
165 | |||
166 | void gpio_free(unsigned pin) | ||
167 | { | ||
168 | might_sleep(); | ||
169 | |||
170 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | ||
171 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
172 | return; | ||
173 | } | ||
174 | |||
175 | if (!gpio_label[pin]) | ||
176 | pr_warning("%s: GPIO %d already freed\n", __func__, pin); | ||
177 | else | ||
178 | gpio_label[pin] = NULL; | ||
179 | } | ||
180 | EXPORT_SYMBOL(gpio_free); | ||
181 | |||
182 | /* Debug helper */ | ||
183 | void gpio_display(void) | ||
184 | { | ||
185 | int i; | ||
186 | |||
187 | for (i = 0; i < GPIO_MAX; i++) { | ||
188 | printk(KERN_DEBUG "Pin-%d: ", i); | ||
189 | |||
190 | if (!test_bit(i, gpio_valid)) { | ||
191 | printk("non-GPIO\n"); | ||
192 | } else if (!gpio_label[i]) { | ||
193 | printk("GPIO, free\n"); | ||
194 | } else { | ||
195 | printk("GPIO, used by %s, ", gpio_label[i]); | ||
196 | if (readl(GPIO_IO_CONF) & (1 << i)) { | ||
197 | printk("input, active %s, level %s, edge %s\n", | ||
198 | ((readl(GPIO_IN_POL) >> i) & 1) ? "low" : "high", | ||
199 | ((readl(GPIO_LEVEL_MASK) >> i) & 1) ? "enabled" : "masked", | ||
200 | ((readl(GPIO_EDGE_MASK) >> i) & 1) ? "enabled" : "masked"); | ||
201 | } else { | ||
202 | printk("output, val=%d\n", (readl(GPIO_OUT) >> i) & 1); | ||
203 | } | ||
204 | } | ||
205 | } | ||
206 | |||
207 | printk(KERN_DEBUG "MPP_0_7_CTRL (0x%08x) = 0x%08x\n", | ||
208 | MPP_0_7_CTRL, readl(MPP_0_7_CTRL)); | ||
209 | printk(KERN_DEBUG "MPP_8_15_CTRL (0x%08x) = 0x%08x\n", | ||
210 | MPP_8_15_CTRL, readl(MPP_8_15_CTRL)); | ||
211 | printk(KERN_DEBUG "MPP_16_19_CTRL (0x%08x) = 0x%08x\n", | ||
212 | MPP_16_19_CTRL, readl(MPP_16_19_CTRL)); | ||
213 | printk(KERN_DEBUG "MPP_DEV_CTRL (0x%08x) = 0x%08x\n", | ||
214 | MPP_DEV_CTRL, readl(MPP_DEV_CTRL)); | ||
215 | printk(KERN_DEBUG "GPIO_OUT (0x%08x) = 0x%08x\n", | ||
216 | GPIO_OUT, readl(GPIO_OUT)); | ||
217 | printk(KERN_DEBUG "GPIO_IO_CONF (0x%08x) = 0x%08x\n", | ||
218 | GPIO_IO_CONF, readl(GPIO_IO_CONF)); | ||
219 | printk(KERN_DEBUG "GPIO_BLINK_EN (0x%08x) = 0x%08x\n", | ||
220 | GPIO_BLINK_EN, readl(GPIO_BLINK_EN)); | ||
221 | printk(KERN_DEBUG "GPIO_IN_POL (0x%08x) = 0x%08x\n", | ||
222 | GPIO_IN_POL, readl(GPIO_IN_POL)); | ||
223 | printk(KERN_DEBUG "GPIO_DATA_IN (0x%08x) = 0x%08x\n", | ||
224 | GPIO_DATA_IN, readl(GPIO_DATA_IN)); | ||
225 | printk(KERN_DEBUG "GPIO_LEVEL_MASK (0x%08x) = 0x%08x\n", | ||
226 | GPIO_LEVEL_MASK, readl(GPIO_LEVEL_MASK)); | ||
227 | printk(KERN_DEBUG "GPIO_EDGE_CAUSE (0x%08x) = 0x%08x\n", | ||
228 | GPIO_EDGE_CAUSE, readl(GPIO_EDGE_CAUSE)); | ||
229 | printk(KERN_DEBUG "GPIO_EDGE_MASK (0x%08x) = 0x%08x\n", | ||
230 | GPIO_EDGE_MASK, readl(GPIO_EDGE_MASK)); | ||
231 | } | ||
diff --git a/arch/arm/mach-orion5x/include/mach/dma.h b/arch/arm/mach-orion5x/include/mach/dma.h deleted file mode 100644 index 40a8c178f10d..000000000000 --- a/arch/arm/mach-orion5x/include/mach/dma.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | /* empty */ | ||
diff --git a/arch/arm/mach-orion5x/include/mach/gpio.h b/arch/arm/mach-orion5x/include/mach/gpio.h index 65dc136a86f7..d8182e87ac16 100644 --- a/arch/arm/mach-orion5x/include/mach/gpio.h +++ b/arch/arm/mach-orion5x/include/mach/gpio.h | |||
@@ -2,18 +2,26 @@ | |||
2 | * arch/arm/mach-orion5x/include/mach/gpio.h | 2 | * arch/arm/mach-orion5x/include/mach/gpio.h |
3 | * | 3 | * |
4 | * This file is licensed under the terms of the GNU General Public | 4 | * This file is licensed under the terms of the GNU General Public |
5 | * License version 2. This program is licensed "as is" without any | 5 | * License version 2. This program is licensed "as is" without any |
6 | * warranty of any kind, whether express or implied. | 6 | * warranty of any kind, whether express or implied. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | extern int gpio_request(unsigned pin, const char *label); | 9 | #ifndef __ASM_ARCH_GPIO_H |
10 | extern void gpio_free(unsigned pin); | 10 | #define __ASM_ARCH_GPIO_H |
11 | extern int gpio_direction_input(unsigned pin); | 11 | |
12 | extern int gpio_direction_output(unsigned pin, int value); | 12 | #include <mach/irqs.h> |
13 | extern int gpio_get_value(unsigned pin); | 13 | #include <plat/gpio.h> |
14 | extern void gpio_set_value(unsigned pin, int value); | 14 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
15 | extern void orion5x_gpio_set_blink(unsigned pin, int blink); | 15 | |
16 | extern void gpio_display(void); /* debug */ | 16 | #define GPIO_MAX 32 |
17 | #define GPIO_OUT(pin) ORION5X_DEV_BUS_REG(0x100) | ||
18 | #define GPIO_IO_CONF(pin) ORION5X_DEV_BUS_REG(0x104) | ||
19 | #define GPIO_BLINK_EN(pin) ORION5X_DEV_BUS_REG(0x108) | ||
20 | #define GPIO_IN_POL(pin) ORION5X_DEV_BUS_REG(0x10c) | ||
21 | #define GPIO_DATA_IN(pin) ORION5X_DEV_BUS_REG(0x110) | ||
22 | #define GPIO_EDGE_CAUSE(pin) ORION5X_DEV_BUS_REG(0x114) | ||
23 | #define GPIO_EDGE_MASK(pin) ORION5X_DEV_BUS_REG(0x118) | ||
24 | #define GPIO_LEVEL_MASK(pin) ORION5X_DEV_BUS_REG(0x11c) | ||
17 | 25 | ||
18 | static inline int gpio_to_irq(int pin) | 26 | static inline int gpio_to_irq(int pin) |
19 | { | 27 | { |
@@ -25,4 +33,5 @@ static inline int irq_to_gpio(int irq) | |||
25 | return irq - IRQ_ORION5X_GPIO_START; | 33 | return irq - IRQ_ORION5X_GPIO_START; |
26 | } | 34 | } |
27 | 35 | ||
28 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 36 | |
37 | #endif | ||
diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h index f24b2513f7f3..c47b033bd999 100644 --- a/arch/arm/mach-orion5x/include/mach/io.h +++ b/arch/arm/mach-orion5x/include/mach/io.h | |||
@@ -38,14 +38,9 @@ __arch_iounmap(void __iomem *addr) | |||
38 | __iounmap(addr); | 38 | __iounmap(addr); |
39 | } | 39 | } |
40 | 40 | ||
41 | static inline void __iomem *__io(unsigned long addr) | ||
42 | { | ||
43 | return (void __iomem *)addr; | ||
44 | } | ||
45 | |||
46 | #define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m) | 41 | #define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m) |
47 | #define __arch_iounmap(a) __arch_iounmap(a) | 42 | #define __arch_iounmap(a) __arch_iounmap(a) |
48 | #define __io(a) __io(a) | 43 | #define __io(a) __typesafe_io(a) |
49 | #define __mem_pci(a) (a) | 44 | #define __mem_pci(a) (a) |
50 | 45 | ||
51 | 46 | ||
diff --git a/arch/arm/mach-orion5x/include/mach/irqs.h b/arch/arm/mach-orion5x/include/mach/irqs.h index d5b0fbf6b965..a6fa9d8f12d8 100644 --- a/arch/arm/mach-orion5x/include/mach/irqs.h +++ b/arch/arm/mach-orion5x/include/mach/irqs.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #ifndef __ASM_ARCH_IRQS_H | 13 | #ifndef __ASM_ARCH_IRQS_H |
14 | #define __ASM_ARCH_IRQS_H | 14 | #define __ASM_ARCH_IRQS_H |
15 | 15 | ||
16 | #include "orion5x.h" /* need GPIO_MAX */ | ||
17 | |||
18 | /* | 16 | /* |
19 | * Orion Main Interrupt Controller | 17 | * Orion Main Interrupt Controller |
20 | */ | 18 | */ |
@@ -54,7 +52,7 @@ | |||
54 | * Orion General Purpose Pins | 52 | * Orion General Purpose Pins |
55 | */ | 53 | */ |
56 | #define IRQ_ORION5X_GPIO_START 32 | 54 | #define IRQ_ORION5X_GPIO_START 32 |
57 | #define NR_GPIO_IRQS GPIO_MAX | 55 | #define NR_GPIO_IRQS 32 |
58 | 56 | ||
59 | #define NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS) | 57 | #define NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS) |
60 | 58 | ||
diff --git a/arch/arm/mach-orion5x/include/mach/memory.h b/arch/arm/mach-orion5x/include/mach/memory.h index 54dd76b013f2..52a2955d0f87 100644 --- a/arch/arm/mach-orion5x/include/mach/memory.h +++ b/arch/arm/mach-orion5x/include/mach/memory.h | |||
@@ -9,8 +9,4 @@ | |||
9 | 9 | ||
10 | #define PHYS_OFFSET UL(0x00000000) | 10 | #define PHYS_OFFSET UL(0x00000000) |
11 | 11 | ||
12 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
13 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
14 | |||
15 | |||
16 | #endif | 12 | #endif |
diff --git a/arch/arm/mach-orion5x/include/mach/orion5x.h b/arch/arm/mach-orion5x/include/mach/orion5x.h index 9f5ce1ce5840..67bda31406dd 100644 --- a/arch/arm/mach-orion5x/include/mach/orion5x.h +++ b/arch/arm/mach-orion5x/include/mach/orion5x.h | |||
@@ -134,14 +134,6 @@ | |||
134 | #define MPP_16_19_CTRL ORION5X_DEV_BUS_REG(0x050) | 134 | #define MPP_16_19_CTRL ORION5X_DEV_BUS_REG(0x050) |
135 | #define MPP_DEV_CTRL ORION5X_DEV_BUS_REG(0x008) | 135 | #define MPP_DEV_CTRL ORION5X_DEV_BUS_REG(0x008) |
136 | #define MPP_RESET_SAMPLE ORION5X_DEV_BUS_REG(0x010) | 136 | #define MPP_RESET_SAMPLE ORION5X_DEV_BUS_REG(0x010) |
137 | #define GPIO_OUT ORION5X_DEV_BUS_REG(0x100) | ||
138 | #define GPIO_IO_CONF ORION5X_DEV_BUS_REG(0x104) | ||
139 | #define GPIO_BLINK_EN ORION5X_DEV_BUS_REG(0x108) | ||
140 | #define GPIO_IN_POL ORION5X_DEV_BUS_REG(0x10c) | ||
141 | #define GPIO_DATA_IN ORION5X_DEV_BUS_REG(0x110) | ||
142 | #define GPIO_EDGE_CAUSE ORION5X_DEV_BUS_REG(0x114) | ||
143 | #define GPIO_EDGE_MASK ORION5X_DEV_BUS_REG(0x118) | ||
144 | #define GPIO_LEVEL_MASK ORION5X_DEV_BUS_REG(0x11c) | ||
145 | #define DEV_BANK_0_PARAM ORION5X_DEV_BUS_REG(0x45c) | 137 | #define DEV_BANK_0_PARAM ORION5X_DEV_BUS_REG(0x45c) |
146 | #define DEV_BANK_1_PARAM ORION5X_DEV_BUS_REG(0x460) | 138 | #define DEV_BANK_1_PARAM ORION5X_DEV_BUS_REG(0x460) |
147 | #define DEV_BANK_2_PARAM ORION5X_DEV_BUS_REG(0x464) | 139 | #define DEV_BANK_2_PARAM ORION5X_DEV_BUS_REG(0x464) |
@@ -149,7 +141,6 @@ | |||
149 | #define DEV_BUS_CTRL ORION5X_DEV_BUS_REG(0x4c0) | 141 | #define DEV_BUS_CTRL ORION5X_DEV_BUS_REG(0x4c0) |
150 | #define DEV_BUS_INT_CAUSE ORION5X_DEV_BUS_REG(0x4d0) | 142 | #define DEV_BUS_INT_CAUSE ORION5X_DEV_BUS_REG(0x4d0) |
151 | #define DEV_BUS_INT_MASK ORION5X_DEV_BUS_REG(0x4d4) | 143 | #define DEV_BUS_INT_MASK ORION5X_DEV_BUS_REG(0x4d4) |
152 | #define GPIO_MAX 32 | ||
153 | 144 | ||
154 | /*************************************************************************** | 145 | /*************************************************************************** |
155 | * Orion CPU Bridge Registers | 146 | * Orion CPU Bridge Registers |
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index 632a36f5cf14..0caae43301e5 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -19,193 +19,38 @@ | |||
19 | #include <plat/irq.h> | 19 | #include <plat/irq.h> |
20 | #include "common.h" | 20 | #include "common.h" |
21 | 21 | ||
22 | /***************************************************************************** | 22 | static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) |
23 | * Orion GPIO IRQ | ||
24 | * | ||
25 | * GPIO_IN_POL register controlls whether GPIO_DATA_IN will hold the same | ||
26 | * value of the line or the opposite value. | ||
27 | * | ||
28 | * Level IRQ handlers: DATA_IN is used directly as cause register. | ||
29 | * Interrupt are masked by LEVEL_MASK registers. | ||
30 | * Edge IRQ handlers: Change in DATA_IN are latched in EDGE_CAUSE. | ||
31 | * Interrupt are masked by EDGE_MASK registers. | ||
32 | * Both-edge handlers: Similar to regular Edge handlers, but also swaps | ||
33 | * the polarity to catch the next line transaction. | ||
34 | * This is a race condition that might not perfectly | ||
35 | * work on some use cases. | ||
36 | * | ||
37 | * Every eight GPIO lines are grouped (OR'ed) before going up to main | ||
38 | * cause register. | ||
39 | * | ||
40 | * EDGE cause mask | ||
41 | * data-in /--------| |-----| |----\ | ||
42 | * -----| |----- ---- to main cause reg | ||
43 | * X \----------------| |----/ | ||
44 | * polarity LEVEL mask | ||
45 | * | ||
46 | ****************************************************************************/ | ||
47 | static void orion5x_gpio_irq_ack(u32 irq) | ||
48 | { | ||
49 | int pin = irq_to_gpio(irq); | ||
50 | if (irq_desc[irq].status & IRQ_LEVEL) | ||
51 | /* | ||
52 | * Mask bit for level interrupt | ||
53 | */ | ||
54 | orion5x_clrbits(GPIO_LEVEL_MASK, 1 << pin); | ||
55 | else | ||
56 | /* | ||
57 | * Clear casue bit for egde interrupt | ||
58 | */ | ||
59 | orion5x_clrbits(GPIO_EDGE_CAUSE, 1 << pin); | ||
60 | } | ||
61 | |||
62 | static void orion5x_gpio_irq_mask(u32 irq) | ||
63 | { | ||
64 | int pin = irq_to_gpio(irq); | ||
65 | if (irq_desc[irq].status & IRQ_LEVEL) | ||
66 | orion5x_clrbits(GPIO_LEVEL_MASK, 1 << pin); | ||
67 | else | ||
68 | orion5x_clrbits(GPIO_EDGE_MASK, 1 << pin); | ||
69 | } | ||
70 | |||
71 | static void orion5x_gpio_irq_unmask(u32 irq) | ||
72 | { | 23 | { |
73 | int pin = irq_to_gpio(irq); | ||
74 | if (irq_desc[irq].status & IRQ_LEVEL) | ||
75 | orion5x_setbits(GPIO_LEVEL_MASK, 1 << pin); | ||
76 | else | ||
77 | orion5x_setbits(GPIO_EDGE_MASK, 1 << pin); | ||
78 | } | ||
79 | |||
80 | static int orion5x_gpio_set_irq_type(u32 irq, u32 type) | ||
81 | { | ||
82 | int pin = irq_to_gpio(irq); | ||
83 | struct irq_desc *desc; | ||
84 | |||
85 | if ((readl(GPIO_IO_CONF) & (1 << pin)) == 0) { | ||
86 | printk(KERN_ERR "orion5x_gpio_set_irq_type failed " | ||
87 | "(irq %d, pin %d).\n", irq, pin); | ||
88 | return -EINVAL; | ||
89 | } | ||
90 | |||
91 | desc = irq_desc + irq; | ||
92 | |||
93 | switch (type) { | ||
94 | case IRQ_TYPE_LEVEL_HIGH: | ||
95 | desc->handle_irq = handle_level_irq; | ||
96 | desc->status |= IRQ_LEVEL; | ||
97 | orion5x_clrbits(GPIO_IN_POL, (1 << pin)); | ||
98 | break; | ||
99 | case IRQ_TYPE_LEVEL_LOW: | ||
100 | desc->handle_irq = handle_level_irq; | ||
101 | desc->status |= IRQ_LEVEL; | ||
102 | orion5x_setbits(GPIO_IN_POL, (1 << pin)); | ||
103 | break; | ||
104 | case IRQ_TYPE_EDGE_RISING: | ||
105 | desc->handle_irq = handle_edge_irq; | ||
106 | desc->status &= ~IRQ_LEVEL; | ||
107 | orion5x_clrbits(GPIO_IN_POL, (1 << pin)); | ||
108 | break; | ||
109 | case IRQ_TYPE_EDGE_FALLING: | ||
110 | desc->handle_irq = handle_edge_irq; | ||
111 | desc->status &= ~IRQ_LEVEL; | ||
112 | orion5x_setbits(GPIO_IN_POL, (1 << pin)); | ||
113 | break; | ||
114 | case IRQ_TYPE_EDGE_BOTH: | ||
115 | desc->handle_irq = handle_edge_irq; | ||
116 | desc->status &= ~IRQ_LEVEL; | ||
117 | /* | ||
118 | * set initial polarity based on current input level | ||
119 | */ | ||
120 | if ((readl(GPIO_IN_POL) ^ readl(GPIO_DATA_IN)) | ||
121 | & (1 << pin)) | ||
122 | orion5x_setbits(GPIO_IN_POL, (1 << pin)); /* falling */ | ||
123 | else | ||
124 | orion5x_clrbits(GPIO_IN_POL, (1 << pin)); /* rising */ | ||
125 | |||
126 | break; | ||
127 | default: | ||
128 | printk(KERN_ERR "failed to set irq=%d (type=%d)\n", irq, type); | ||
129 | return -EINVAL; | ||
130 | } | ||
131 | |||
132 | desc->status &= ~IRQ_TYPE_SENSE_MASK; | ||
133 | desc->status |= type & IRQ_TYPE_SENSE_MASK; | ||
134 | |||
135 | return 0; | ||
136 | } | ||
137 | |||
138 | static struct irq_chip orion5x_gpio_irq_chip = { | ||
139 | .name = "Orion-IRQ-GPIO", | ||
140 | .ack = orion5x_gpio_irq_ack, | ||
141 | .mask = orion5x_gpio_irq_mask, | ||
142 | .unmask = orion5x_gpio_irq_unmask, | ||
143 | .set_type = orion5x_gpio_set_irq_type, | ||
144 | }; | ||
145 | |||
146 | static void orion5x_gpio_irq_handler(unsigned int irq, struct irq_desc *desc) | ||
147 | { | ||
148 | u32 cause, offs, pin; | ||
149 | |||
150 | BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31); | 24 | BUG_ON(irq < IRQ_ORION5X_GPIO_0_7 || irq > IRQ_ORION5X_GPIO_24_31); |
151 | offs = (irq - IRQ_ORION5X_GPIO_0_7) * 8; | ||
152 | cause = (readl(GPIO_DATA_IN) & readl(GPIO_LEVEL_MASK)) | | ||
153 | (readl(GPIO_EDGE_CAUSE) & readl(GPIO_EDGE_MASK)); | ||
154 | 25 | ||
155 | for (pin = offs; pin < offs + 8; pin++) { | 26 | orion_gpio_irq_handler((irq - IRQ_ORION5X_GPIO_0_7) << 3); |
156 | if (cause & (1 << pin)) { | ||
157 | irq = gpio_to_irq(pin); | ||
158 | desc = irq_desc + irq; | ||
159 | if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { | ||
160 | /* Swap polarity (race with GPIO line) */ | ||
161 | u32 polarity = readl(GPIO_IN_POL); | ||
162 | polarity ^= 1 << pin; | ||
163 | writel(polarity, GPIO_IN_POL); | ||
164 | } | ||
165 | generic_handle_irq(irq); | ||
166 | } | ||
167 | } | ||
168 | } | 27 | } |
169 | 28 | ||
170 | static void __init orion5x_init_gpio_irq(void) | 29 | void __init orion5x_init_irq(void) |
171 | { | 30 | { |
172 | int i; | 31 | int i; |
173 | struct irq_desc *desc; | 32 | |
33 | orion_irq_init(0, (void __iomem *)MAIN_IRQ_MASK); | ||
174 | 34 | ||
175 | /* | 35 | /* |
176 | * Mask and clear GPIO IRQ interrupts | 36 | * Mask and clear GPIO IRQ interrupts |
177 | */ | 37 | */ |
178 | writel(0x0, GPIO_LEVEL_MASK); | 38 | writel(0x0, GPIO_LEVEL_MASK(0)); |
179 | writel(0x0, GPIO_EDGE_MASK); | 39 | writel(0x0, GPIO_EDGE_MASK(0)); |
180 | writel(0x0, GPIO_EDGE_CAUSE); | 40 | writel(0x0, GPIO_EDGE_CAUSE(0)); |
181 | 41 | ||
182 | /* | 42 | /* |
183 | * Register chained level handlers for GPIO IRQs by default. | 43 | * Register chained level handlers for GPIO IRQs by default. |
184 | * User can use set_type() if he wants to use edge types handlers. | 44 | * User can use set_type() if he wants to use edge types handlers. |
185 | */ | 45 | */ |
186 | for (i = IRQ_ORION5X_GPIO_START; i < NR_IRQS; i++) { | 46 | for (i = IRQ_ORION5X_GPIO_START; i < NR_IRQS; i++) { |
187 | set_irq_chip(i, &orion5x_gpio_irq_chip); | 47 | set_irq_chip(i, &orion_gpio_irq_level_chip); |
188 | set_irq_handler(i, handle_level_irq); | 48 | set_irq_handler(i, handle_level_irq); |
189 | desc = irq_desc + i; | 49 | irq_desc[i].status |= IRQ_LEVEL; |
190 | desc->status |= IRQ_LEVEL; | ||
191 | set_irq_flags(i, IRQF_VALID); | 50 | set_irq_flags(i, IRQF_VALID); |
192 | } | 51 | } |
193 | set_irq_chained_handler(IRQ_ORION5X_GPIO_0_7, orion5x_gpio_irq_handler); | 52 | set_irq_chained_handler(IRQ_ORION5X_GPIO_0_7, gpio_irq_handler); |
194 | set_irq_chained_handler(IRQ_ORION5X_GPIO_8_15, orion5x_gpio_irq_handler); | 53 | set_irq_chained_handler(IRQ_ORION5X_GPIO_8_15, gpio_irq_handler); |
195 | set_irq_chained_handler(IRQ_ORION5X_GPIO_16_23, orion5x_gpio_irq_handler); | 54 | set_irq_chained_handler(IRQ_ORION5X_GPIO_16_23, gpio_irq_handler); |
196 | set_irq_chained_handler(IRQ_ORION5X_GPIO_24_31, orion5x_gpio_irq_handler); | 55 | set_irq_chained_handler(IRQ_ORION5X_GPIO_24_31, gpio_irq_handler); |
197 | } | ||
198 | |||
199 | /***************************************************************************** | ||
200 | * Orion Main IRQ | ||
201 | ****************************************************************************/ | ||
202 | static void __init orion5x_init_main_irq(void) | ||
203 | { | ||
204 | orion_irq_init(0, (void __iomem *)MAIN_IRQ_MASK); | ||
205 | } | ||
206 | |||
207 | void __init orion5x_init_irq(void) | ||
208 | { | ||
209 | orion5x_init_main_irq(); | ||
210 | orion5x_init_gpio_irq(); | ||
211 | } | 56 | } |
diff --git a/arch/arm/mach-orion5x/mpp.c b/arch/arm/mach-orion5x/mpp.c index 640ea2a3fc6c..e23a3f91d6c6 100644 --- a/arch/arm/mach-orion5x/mpp.c +++ b/arch/arm/mach-orion5x/mpp.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mbus.h> | 13 | #include <linux/mbus.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <asm/gpio.h> | ||
15 | #include <mach/hardware.h> | 16 | #include <mach/hardware.h> |
16 | #include "common.h" | 17 | #include "common.h" |
17 | #include "mpp.h" | 18 | #include "mpp.h" |
@@ -152,7 +153,10 @@ void __init orion5x_mpp_conf(struct orion5x_mpp_mode *mode) | |||
152 | *reg &= ~(0xf << shift); | 153 | *reg &= ~(0xf << shift); |
153 | *reg |= (num_type & 0xf) << shift; | 154 | *reg |= (num_type & 0xf) << shift; |
154 | 155 | ||
155 | orion5x_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO)); | 156 | if (mode->type == MPP_UNUSED && (mode->mpp < 16 || is_5182())) |
157 | orion_gpio_set_unused(mode->mpp); | ||
158 | |||
159 | orion_gpio_set_valid(mode->mpp, !!(mode->type == MPP_GPIO)); | ||
156 | 160 | ||
157 | mode++; | 161 | mode++; |
158 | } | 162 | } |
diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c index ac2f70eddb9e..425f7188505e 100644 --- a/arch/arm/mach-pnx4008/dma.c +++ b/arch/arm/mach-pnx4008/dma.c | |||
@@ -25,9 +25,8 @@ | |||
25 | 25 | ||
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <asm/dma.h> | 28 | #include <mach/dma.h> |
29 | #include <asm/dma-mapping.h> | 29 | #include <asm/dma-mapping.h> |
30 | #include <asm/mach/dma.h> | ||
31 | #include <mach/clock.h> | 30 | #include <mach/clock.h> |
32 | 31 | ||
33 | static struct dma_channel { | 32 | static struct dma_channel { |
diff --git a/arch/arm/mach-pnx4008/include/mach/dma.h b/arch/arm/mach-pnx4008/include/mach/dma.h index 5442d04fc575..f094bf8bfb18 100644 --- a/arch/arm/mach-pnx4008/include/mach/dma.h +++ b/arch/arm/mach-pnx4008/include/mach/dma.h | |||
@@ -16,8 +16,6 @@ | |||
16 | 16 | ||
17 | #include "platform.h" | 17 | #include "platform.h" |
18 | 18 | ||
19 | #define MAX_DMA_ADDRESS 0xffffffff | ||
20 | |||
21 | #define MAX_DMA_CHANNELS 8 | 19 | #define MAX_DMA_CHANNELS 8 |
22 | 20 | ||
23 | #define DMAC_BASE IO_ADDRESS(PNX4008_DMA_CONFIG_BASE) | 21 | #define DMAC_BASE IO_ADDRESS(PNX4008_DMA_CONFIG_BASE) |
diff --git a/arch/arm/mach-pnx4008/include/mach/io.h b/arch/arm/mach-pnx4008/include/mach/io.h index c6206f25839d..cbf0904540ea 100644 --- a/arch/arm/mach-pnx4008/include/mach/io.h +++ b/arch/arm/mach-pnx4008/include/mach/io.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
17 | 17 | ||
18 | #define __io(a) ((void __iomem *)(a)) | 18 | #define __io(a) __typesafe_io(a) |
19 | #define __mem_pci(a) (a) | 19 | #define __mem_pci(a) (a) |
20 | 20 | ||
21 | #endif | 21 | #endif |
diff --git a/arch/arm/mach-pnx4008/include/mach/memory.h b/arch/arm/mach-pnx4008/include/mach/memory.h index 5789a2d16f5a..0e8770081058 100644 --- a/arch/arm/mach-pnx4008/include/mach/memory.h +++ b/arch/arm/mach-pnx4008/include/mach/memory.h | |||
@@ -16,9 +16,6 @@ | |||
16 | /* | 16 | /* |
17 | * Physical DRAM offset. | 17 | * Physical DRAM offset. |
18 | */ | 18 | */ |
19 | #define PHYS_OFFSET (0x80000000) | 19 | #define PHYS_OFFSET UL(0x80000000) |
20 | |||
21 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) | ||
22 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET - PHYS_OFFSET) | ||
23 | 20 | ||
24 | #endif | 21 | #endif |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index a062235e83a8..8eea7306f29b 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -19,20 +19,34 @@ config CPU_PXA320 | |||
19 | config CPU_PXA930 | 19 | config CPU_PXA930 |
20 | bool "PXA930 (codename Tavor-P)" | 20 | bool "PXA930 (codename Tavor-P)" |
21 | 21 | ||
22 | config CPU_PXA935 | ||
23 | bool "PXA935 (codename Tavor-P65)" | ||
24 | |||
22 | endmenu | 25 | endmenu |
23 | 26 | ||
24 | endif | 27 | endif |
25 | 28 | ||
26 | config ARCH_GUMSTIX | 29 | config ARCH_GUMSTIX |
27 | bool "Gumstix XScale boards" | 30 | bool "Gumstix XScale 255 boards" |
31 | select PXA25x | ||
28 | help | 32 | help |
29 | Say Y here if you intend to run this kernel on a | 33 | Say Y here if you intend to run this kernel on |
30 | Gumstix Full Function Minature Computer. | 34 | Basix, Connex, ws-200ax, ws-400ax systems |
31 | 35 | ||
32 | config MACH_GUMSTIX_F | 36 | choice |
33 | bool "Basix, Connex, ws-200ax, ws-400ax systems" | 37 | prompt "Gumstix Carrier/Expansion Board" |
34 | depends on ARCH_GUMSTIX | 38 | depends on ARCH_GUMSTIX |
35 | select PXA25x | 39 | |
40 | config GUMSTIX_AM200EPD | ||
41 | bool "Enable AM200EPD board support" | ||
42 | |||
43 | endchoice | ||
44 | |||
45 | config MACH_INTELMOTE2 | ||
46 | bool "Intel Mote 2 Platform" | ||
47 | select PXA27x | ||
48 | select IWMMXT | ||
49 | select PXA_HAVE_BOARD_IRQS | ||
36 | 50 | ||
37 | config ARCH_LUBBOCK | 51 | config ARCH_LUBBOCK |
38 | bool "Intel DBPXA250 Development Platform" | 52 | bool "Intel DBPXA250 Development Platform" |
@@ -199,6 +213,10 @@ config MACH_E800 | |||
199 | config TRIZEPS_PXA | 213 | config TRIZEPS_PXA |
200 | bool "PXA based Keith und Koep Trizeps DIMM-Modules" | 214 | bool "PXA based Keith und Koep Trizeps DIMM-Modules" |
201 | 215 | ||
216 | config MACH_H5000 | ||
217 | bool "HP iPAQ h5000" | ||
218 | select PXA25x | ||
219 | |||
202 | config MACH_TRIZEPS4 | 220 | config MACH_TRIZEPS4 |
203 | bool "Keith und Koep Trizeps4 DIMM-Module" | 221 | bool "Keith und Koep Trizeps4 DIMM-Module" |
204 | depends on TRIZEPS_PXA | 222 | depends on TRIZEPS_PXA |
@@ -283,7 +301,6 @@ config MACH_MIOA701 | |||
283 | bool "Mitac Mio A701 Support" | 301 | bool "Mitac Mio A701 Support" |
284 | select PXA27x | 302 | select PXA27x |
285 | select IWMMXT | 303 | select IWMMXT |
286 | select LEDS_GPIO | ||
287 | select HAVE_PWM | 304 | select HAVE_PWM |
288 | select GPIO_SYSFS | 305 | select GPIO_SYSFS |
289 | help | 306 | help |
@@ -342,10 +359,6 @@ config PCM990_DISPLAY_NONE | |||
342 | 359 | ||
343 | endchoice | 360 | endchoice |
344 | 361 | ||
345 | config MACH_AM200EPD | ||
346 | depends on MACH_GUMSTIX_F | ||
347 | bool "Enable AM200EPD board support" | ||
348 | |||
349 | config PXA_EZX | 362 | config PXA_EZX |
350 | bool "Motorola EZX Platform" | 363 | bool "Motorola EZX Platform" |
351 | select PXA27x | 364 | select PXA27x |
@@ -386,16 +399,25 @@ endmenu | |||
386 | 399 | ||
387 | config PXA25x | 400 | config PXA25x |
388 | bool | 401 | bool |
402 | select CPU_XSCALE | ||
389 | help | 403 | help |
390 | Select code specific to PXA21x/25x/26x variants | 404 | Select code specific to PXA21x/25x/26x variants |
391 | 405 | ||
392 | config PXA27x | 406 | config PXA27x |
393 | bool | 407 | bool |
408 | select CPU_XSCALE | ||
394 | help | 409 | help |
395 | Select code specific to PXA27x variants | 410 | Select code specific to PXA27x variants |
396 | 411 | ||
412 | config CPU_PXA26x | ||
413 | bool | ||
414 | select PXA25x | ||
415 | help | ||
416 | Select code specific to PXA26x (codename Dalhart) | ||
417 | |||
397 | config PXA3xx | 418 | config PXA3xx |
398 | bool | 419 | bool |
420 | select CPU_XSC3 | ||
399 | help | 421 | help |
400 | Select code specific to PXA3xx variants | 422 | Select code specific to PXA3xx variants |
401 | 423 | ||
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile index d64c68b232e3..7b28bb561d63 100644 --- a/arch/arm/mach-pxa/Makefile +++ b/arch/arm/mach-pxa/Makefile | |||
@@ -27,7 +27,7 @@ obj-$(CONFIG_CPU_PXA930) += pxa930.o | |||
27 | 27 | ||
28 | # Specific board support | 28 | # Specific board support |
29 | obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o | 29 | obj-$(CONFIG_ARCH_GUMSTIX) += gumstix.o |
30 | obj-$(CONFIG_MACH_AM200EPD) += am200epd.o | 30 | obj-$(CONFIG_GUMSTIX_AM200EPD) += am200epd.o |
31 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o | 31 | obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o |
32 | obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o | 32 | obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o |
33 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o | 33 | obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o |
@@ -35,6 +35,7 @@ obj-$(CONFIG_MACH_MP900C) += mp900.o | |||
35 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o | 35 | obj-$(CONFIG_ARCH_PXA_IDP) += idp.o |
36 | obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o | 36 | obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o |
37 | obj-$(CONFIG_MACH_COLIBRI) += colibri.o | 37 | obj-$(CONFIG_MACH_COLIBRI) += colibri.o |
38 | obj-$(CONFIG_MACH_H5000) += h5000.o | ||
38 | obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o | 39 | obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o sharpsl_pm.o corgi_pm.o |
39 | obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o | 40 | obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o sharpsl_pm.o spitz_pm.o |
40 | obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o | 41 | obj-$(CONFIG_CORGI_SSP_DEPRECATED) += corgi_ssp.o corgi_lcd.o |
@@ -69,6 +70,8 @@ obj-$(CONFIG_MACH_ARMCORE) += cm-x2xx.o cm-x255.o cm-x270.o | |||
69 | obj-$(CONFIG_MACH_CM_X300) += cm-x300.o | 70 | obj-$(CONFIG_MACH_CM_X300) += cm-x300.o |
70 | obj-$(CONFIG_PXA_EZX) += ezx.o | 71 | obj-$(CONFIG_PXA_EZX) += ezx.o |
71 | 72 | ||
73 | obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o | ||
74 | |||
72 | # Support for blinky lights | 75 | # Support for blinky lights |
73 | led-y := leds.o | 76 | led-y := leds.o |
74 | led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o | 77 | led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o |
diff --git a/arch/arm/mach-pxa/am200epd.c b/arch/arm/mach-pxa/am200epd.c index b965085a37b9..77ee80e5e47b 100644 --- a/arch/arm/mach-pxa/am200epd.c +++ b/arch/arm/mach-pxa/am200epd.c | |||
@@ -30,8 +30,12 @@ | |||
30 | #include <linux/irq.h> | 30 | #include <linux/irq.h> |
31 | #include <linux/gpio.h> | 31 | #include <linux/gpio.h> |
32 | 32 | ||
33 | #include <mach/gumstix.h> | ||
34 | #include <mach/mfp-pxa25x.h> | ||
33 | #include <mach/pxafb.h> | 35 | #include <mach/pxafb.h> |
34 | 36 | ||
37 | #include "generic.h" | ||
38 | |||
35 | #include <video/metronomefb.h> | 39 | #include <video/metronomefb.h> |
36 | 40 | ||
37 | static unsigned int panel_type = 6; | 41 | static unsigned int panel_type = 6; |
@@ -331,7 +335,16 @@ static struct metronome_board am200_board = { | |||
331 | .cleanup = am200_cleanup, | 335 | .cleanup = am200_cleanup, |
332 | }; | 336 | }; |
333 | 337 | ||
334 | static int __init am200_init(void) | 338 | static unsigned long am200_pin_config[] __initdata = { |
339 | GPIO51_GPIO, | ||
340 | GPIO49_GPIO, | ||
341 | GPIO48_GPIO, | ||
342 | GPIO32_GPIO, | ||
343 | GPIO17_GPIO, | ||
344 | GPIO16_GPIO, | ||
345 | }; | ||
346 | |||
347 | int __init am200_init(void) | ||
335 | { | 348 | { |
336 | int ret; | 349 | int ret; |
337 | 350 | ||
@@ -339,6 +352,8 @@ static int __init am200_init(void) | |||
339 | * creation events */ | 352 | * creation events */ |
340 | fb_register_client(&am200_fb_notif); | 353 | fb_register_client(&am200_fb_notif); |
341 | 354 | ||
355 | pxa2xx_mfp_config(ARRAY_AND_SIZE(am200_pin_config)); | ||
356 | |||
342 | /* request our platform independent driver */ | 357 | /* request our platform independent driver */ |
343 | request_module("metronomefb"); | 358 | request_module("metronomefb"); |
344 | 359 | ||
@@ -367,8 +382,6 @@ static int __init am200_init(void) | |||
367 | module_param(panel_type, uint, 0); | 382 | module_param(panel_type, uint, 0); |
368 | MODULE_PARM_DESC(panel_type, "Select the panel type: 6, 8, 97"); | 383 | MODULE_PARM_DESC(panel_type, "Select the panel type: 6, 8, 97"); |
369 | 384 | ||
370 | module_init(am200_init); | ||
371 | |||
372 | MODULE_DESCRIPTION("board driver for am200 metronome epd kit"); | 385 | MODULE_DESCRIPTION("board driver for am200 metronome epd kit"); |
373 | MODULE_AUTHOR("Jaya Kumar"); | 386 | MODULE_AUTHOR("Jaya Kumar"); |
374 | MODULE_LICENSE("GPL"); | 387 | MODULE_LICENSE("GPL"); |
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c index ca8e20538157..40b774084514 100644 --- a/arch/arm/mach-pxa/clock.c +++ b/arch/arm/mach-pxa/clock.c | |||
@@ -12,53 +12,16 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/delay.h> | 13 | #include <linux/delay.h> |
14 | 14 | ||
15 | #include <asm/clkdev.h> | ||
15 | #include <mach/pxa2xx-regs.h> | 16 | #include <mach/pxa2xx-regs.h> |
16 | #include <mach/pxa2xx-gpio.h> | ||
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | 18 | ||
19 | #include "devices.h" | 19 | #include "devices.h" |
20 | #include "generic.h" | 20 | #include "generic.h" |
21 | #include "clock.h" | 21 | #include "clock.h" |
22 | 22 | ||
23 | static LIST_HEAD(clocks); | ||
24 | static DEFINE_MUTEX(clocks_mutex); | ||
25 | static DEFINE_SPINLOCK(clocks_lock); | 23 | static DEFINE_SPINLOCK(clocks_lock); |
26 | 24 | ||
27 | static struct clk *clk_lookup(struct device *dev, const char *id) | ||
28 | { | ||
29 | struct clk *p; | ||
30 | |||
31 | list_for_each_entry(p, &clocks, node) | ||
32 | if (strcmp(id, p->name) == 0 && p->dev == dev) | ||
33 | return p; | ||
34 | |||
35 | return NULL; | ||
36 | } | ||
37 | |||
38 | struct clk *clk_get(struct device *dev, const char *id) | ||
39 | { | ||
40 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
41 | |||
42 | mutex_lock(&clocks_mutex); | ||
43 | p = clk_lookup(dev, id); | ||
44 | if (!p) | ||
45 | p = clk_lookup(NULL, id); | ||
46 | if (p) | ||
47 | clk = p; | ||
48 | mutex_unlock(&clocks_mutex); | ||
49 | |||
50 | if (!IS_ERR(clk) && clk->ops == NULL) | ||
51 | clk = clk->other; | ||
52 | |||
53 | return clk; | ||
54 | } | ||
55 | EXPORT_SYMBOL(clk_get); | ||
56 | |||
57 | void clk_put(struct clk *clk) | ||
58 | { | ||
59 | } | ||
60 | EXPORT_SYMBOL(clk_put); | ||
61 | |||
62 | int clk_enable(struct clk *clk) | 25 | int clk_enable(struct clk *clk) |
63 | { | 26 | { |
64 | unsigned long flags; | 27 | unsigned long flags; |
@@ -116,37 +79,27 @@ const struct clkops clk_cken_ops = { | |||
116 | .disable = clk_cken_disable, | 79 | .disable = clk_cken_disable, |
117 | }; | 80 | }; |
118 | 81 | ||
119 | void clks_register(struct clk *clks, size_t num) | 82 | void clks_register(struct clk_lookup *clks, size_t num) |
120 | { | 83 | { |
121 | int i; | 84 | int i; |
122 | 85 | ||
123 | mutex_lock(&clocks_mutex); | ||
124 | for (i = 0; i < num; i++) | 86 | for (i = 0; i < num; i++) |
125 | list_add(&clks[i].node, &clocks); | 87 | clkdev_add(&clks[i]); |
126 | mutex_unlock(&clocks_mutex); | ||
127 | } | 88 | } |
128 | 89 | ||
129 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, | 90 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, |
130 | struct device *dev) | 91 | struct device *dev) |
131 | { | 92 | { |
132 | struct clk *r = clk_lookup(dev, id); | 93 | struct clk *r = clk_get(dev, id); |
133 | struct clk *new; | 94 | struct clk_lookup *l; |
134 | 95 | ||
135 | if (!r) | 96 | if (!r) |
136 | return -ENODEV; | 97 | return -ENODEV; |
137 | 98 | ||
138 | new = kzalloc(sizeof(struct clk), GFP_KERNEL); | 99 | l = clkdev_alloc(r, alias, alias_dev ? dev_name(alias_dev) : NULL); |
139 | 100 | clk_put(r); | |
140 | if (!new) | 101 | if (!l) |
141 | return -ENOMEM; | 102 | return -ENODEV; |
142 | 103 | clkdev_add(l); | |
143 | new->name = alias; | ||
144 | new->dev = alias_dev; | ||
145 | new->other = r; | ||
146 | |||
147 | mutex_lock(&clocks_mutex); | ||
148 | list_add(&new->node, &clocks); | ||
149 | mutex_unlock(&clocks_mutex); | ||
150 | |||
151 | return 0; | 104 | return 0; |
152 | } | 105 | } |
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h index 73be795fe3bf..4e9c613c6767 100644 --- a/arch/arm/mach-pxa/clock.h +++ b/arch/arm/mach-pxa/clock.h | |||
@@ -1,6 +1,4 @@ | |||
1 | #include <linux/list.h> | 1 | #include <asm/clkdev.h> |
2 | |||
3 | struct clk; | ||
4 | 2 | ||
5 | struct clkops { | 3 | struct clkops { |
6 | void (*enable)(struct clk *); | 4 | void (*enable)(struct clk *); |
@@ -9,9 +7,6 @@ struct clkops { | |||
9 | }; | 7 | }; |
10 | 8 | ||
11 | struct clk { | 9 | struct clk { |
12 | struct list_head node; | ||
13 | const char *name; | ||
14 | struct device *dev; | ||
15 | const struct clkops *ops; | 10 | const struct clkops *ops; |
16 | unsigned long rate; | 11 | unsigned long rate; |
17 | unsigned int cken; | 12 | unsigned int cken; |
@@ -20,41 +15,31 @@ struct clk { | |||
20 | struct clk *other; | 15 | struct clk *other; |
21 | }; | 16 | }; |
22 | 17 | ||
23 | #define INIT_CKEN(_name, _cken, _rate, _delay, _dev) \ | 18 | #define INIT_CLKREG(_clk,_devname,_conname) \ |
24 | { \ | 19 | { \ |
25 | .name = _name, \ | 20 | .clk = _clk, \ |
26 | .dev = _dev, \ | 21 | .dev_id = _devname, \ |
22 | .con_id = _conname, \ | ||
23 | } | ||
24 | |||
25 | #define DEFINE_CKEN(_name, _cken, _rate, _delay) \ | ||
26 | struct clk clk_##_name = { \ | ||
27 | .ops = &clk_cken_ops, \ | 27 | .ops = &clk_cken_ops, \ |
28 | .rate = _rate, \ | 28 | .rate = _rate, \ |
29 | .cken = CKEN_##_cken, \ | 29 | .cken = CKEN_##_cken, \ |
30 | .delay = _delay, \ | 30 | .delay = _delay, \ |
31 | } | 31 | } |
32 | 32 | ||
33 | #define INIT_CK(_name, _cken, _ops, _dev) \ | 33 | #define DEFINE_CK(_name, _cken, _ops) \ |
34 | { \ | 34 | struct clk clk_##_name = { \ |
35 | .name = _name, \ | ||
36 | .dev = _dev, \ | ||
37 | .ops = _ops, \ | 35 | .ops = _ops, \ |
38 | .cken = CKEN_##_cken, \ | 36 | .cken = CKEN_##_cken, \ |
39 | } | 37 | } |
40 | 38 | ||
41 | /* | 39 | #define DEFINE_CLK(_name, _ops, _rate, _delay) \ |
42 | * This is a placeholder to alias one clock device+name pair | 40 | struct clk clk_##_name = { \ |
43 | * to another struct clk. | 41 | .ops = _ops, \ |
44 | */ | 42 | .rate = _rate, \ |
45 | #define INIT_CKOTHER(_name, _other, _dev) \ | ||
46 | { \ | ||
47 | .name = _name, \ | ||
48 | .dev = _dev, \ | ||
49 | .other = _other, \ | ||
50 | } | ||
51 | |||
52 | #define INIT_CLK(_name, _ops, _rate, _delay, _dev) \ | ||
53 | { \ | ||
54 | .name = _name, \ | ||
55 | .dev = _dev, \ | ||
56 | .ops = _ops, \ | ||
57 | .rate = _rate, \ | ||
58 | .delay = _delay, \ | 43 | .delay = _delay, \ |
59 | } | 44 | } |
60 | 45 | ||
@@ -64,20 +49,16 @@ void clk_cken_enable(struct clk *clk); | |||
64 | void clk_cken_disable(struct clk *clk); | 49 | void clk_cken_disable(struct clk *clk); |
65 | 50 | ||
66 | #ifdef CONFIG_PXA3xx | 51 | #ifdef CONFIG_PXA3xx |
67 | #define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \ | 52 | #define DEFINE_PXA3_CKEN(_name, _cken, _rate, _delay) \ |
68 | { \ | 53 | struct clk clk_##_name = { \ |
69 | .name = _name, \ | ||
70 | .dev = _dev, \ | ||
71 | .ops = &clk_pxa3xx_cken_ops, \ | 54 | .ops = &clk_pxa3xx_cken_ops, \ |
72 | .rate = _rate, \ | 55 | .rate = _rate, \ |
73 | .cken = CKEN_##_cken, \ | 56 | .cken = CKEN_##_cken, \ |
74 | .delay = _delay, \ | 57 | .delay = _delay, \ |
75 | } | 58 | } |
76 | 59 | ||
77 | #define PXA3xx_CK(_name, _cken, _ops, _dev) \ | 60 | #define DEFINE_PXA3_CK(_name, _cken, _ops) \ |
78 | { \ | 61 | struct clk clk_##_name = { \ |
79 | .name = _name, \ | ||
80 | .dev = _dev, \ | ||
81 | .ops = _ops, \ | 62 | .ops = _ops, \ |
82 | .cken = CKEN_##_cken, \ | 63 | .cken = CKEN_##_cken, \ |
83 | } | 64 | } |
@@ -87,7 +68,7 @@ extern void clk_pxa3xx_cken_enable(struct clk *); | |||
87 | extern void clk_pxa3xx_cken_disable(struct clk *); | 68 | extern void clk_pxa3xx_cken_disable(struct clk *); |
88 | #endif | 69 | #endif |
89 | 70 | ||
90 | void clks_register(struct clk *clks, size_t num); | 71 | void clks_register(struct clk_lookup *clks, size_t num); |
91 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, | 72 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, |
92 | struct device *dev); | 73 | struct device *dev); |
93 | 74 | ||
diff --git a/arch/arm/mach-pxa/cm-x2xx.c b/arch/arm/mach-pxa/cm-x2xx.c index 0b3ce3b6d896..d99fd9e4d888 100644 --- a/arch/arm/mach-pxa/cm-x2xx.c +++ b/arch/arm/mach-pxa/cm-x2xx.c | |||
@@ -210,10 +210,8 @@ static struct pxafb_mode_info generic_stn_320x240_mode = { | |||
210 | static struct pxafb_mach_info generic_stn_320x240 = { | 210 | static struct pxafb_mach_info generic_stn_320x240 = { |
211 | .modes = &generic_stn_320x240_mode, | 211 | .modes = &generic_stn_320x240_mode, |
212 | .num_modes = 1, | 212 | .num_modes = 1, |
213 | .lccr0 = 0, | 213 | .lcd_conn = LCD_COLOR_STN_8BPP | LCD_PCLK_EDGE_FALL |\ |
214 | .lccr3 = (LCCR3_PixClkDiv(0x03) | | 214 | LCD_AC_BIAS_FREQ(0xff), |
215 | LCCR3_Acb(0xff) | | ||
216 | LCCR3_PCP), | ||
217 | .cmap_inverse = 0, | 215 | .cmap_inverse = 0, |
218 | .cmap_static = 0, | 216 | .cmap_static = 0, |
219 | }; | 217 | }; |
@@ -236,10 +234,8 @@ static struct pxafb_mode_info generic_tft_640x480_mode = { | |||
236 | static struct pxafb_mach_info generic_tft_640x480 = { | 234 | static struct pxafb_mach_info generic_tft_640x480 = { |
237 | .modes = &generic_tft_640x480_mode, | 235 | .modes = &generic_tft_640x480_mode, |
238 | .num_modes = 1, | 236 | .num_modes = 1, |
239 | .lccr0 = (LCCR0_PAS), | 237 | .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_PCLK_EDGE_FALL |\ |
240 | .lccr3 = (LCCR3_PixClkDiv(0x01) | | 238 | LCD_AC_BIAS_FREQ(0xff), |
241 | LCCR3_Acb(0xff) | | ||
242 | LCCR3_PCP), | ||
243 | .cmap_inverse = 0, | 239 | .cmap_inverse = 0, |
244 | .cmap_static = 0, | 240 | .cmap_static = 0, |
245 | }; | 241 | }; |
@@ -263,9 +259,7 @@ static struct pxafb_mode_info generic_crt_640x480_mode = { | |||
263 | static struct pxafb_mach_info generic_crt_640x480 = { | 259 | static struct pxafb_mach_info generic_crt_640x480 = { |
264 | .modes = &generic_crt_640x480_mode, | 260 | .modes = &generic_crt_640x480_mode, |
265 | .num_modes = 1, | 261 | .num_modes = 1, |
266 | .lccr0 = (LCCR0_PAS), | 262 | .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_AC_BIAS_FREQ(0xff), |
267 | .lccr3 = (LCCR3_PixClkDiv(0x01) | | ||
268 | LCCR3_Acb(0xff)), | ||
269 | .cmap_inverse = 0, | 263 | .cmap_inverse = 0, |
270 | .cmap_static = 0, | 264 | .cmap_static = 0, |
271 | }; | 265 | }; |
@@ -289,9 +283,7 @@ static struct pxafb_mode_info generic_crt_800x600_mode = { | |||
289 | static struct pxafb_mach_info generic_crt_800x600 = { | 283 | static struct pxafb_mach_info generic_crt_800x600 = { |
290 | .modes = &generic_crt_800x600_mode, | 284 | .modes = &generic_crt_800x600_mode, |
291 | .num_modes = 1, | 285 | .num_modes = 1, |
292 | .lccr0 = (LCCR0_PAS), | 286 | .lcd_conn = LCD_COLOR_TFT_8BPP | LCD_AC_BIAS_FREQ(0xff), |
293 | .lccr3 = (LCCR3_PixClkDiv(0x02) | | ||
294 | LCCR3_Acb(0xff)), | ||
295 | .cmap_inverse = 0, | 287 | .cmap_inverse = 0, |
296 | .cmap_static = 0, | 288 | .cmap_static = 0, |
297 | }; | 289 | }; |
@@ -314,10 +306,7 @@ static struct pxafb_mode_info generic_tft_320x240_mode = { | |||
314 | static struct pxafb_mach_info generic_tft_320x240 = { | 306 | static struct pxafb_mach_info generic_tft_320x240 = { |
315 | .modes = &generic_tft_320x240_mode, | 307 | .modes = &generic_tft_320x240_mode, |
316 | .num_modes = 1, | 308 | .num_modes = 1, |
317 | .lccr0 = (LCCR0_PAS), | 309 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_AC_BIAS_FREQ(0xff), |
318 | .lccr3 = (LCCR3_PixClkDiv(0x06) | | ||
319 | LCCR3_Acb(0xff) | | ||
320 | LCCR3_PCP), | ||
321 | .cmap_inverse = 0, | 310 | .cmap_inverse = 0, |
322 | .cmap_static = 0, | 311 | .cmap_static = 0, |
323 | }; | 312 | }; |
@@ -341,9 +330,7 @@ static struct pxafb_mode_info generic_stn_640x480_mode = { | |||
341 | static struct pxafb_mach_info generic_stn_640x480 = { | 330 | static struct pxafb_mach_info generic_stn_640x480 = { |
342 | .modes = &generic_stn_640x480_mode, | 331 | .modes = &generic_stn_640x480_mode, |
343 | .num_modes = 1, | 332 | .num_modes = 1, |
344 | .lccr0 = 0, | 333 | .lcd_conn = LCD_COLOR_STN_8BPP | LCD_AC_BIAS_FREQ(0xff), |
345 | .lccr3 = (LCCR3_PixClkDiv(0x02) | | ||
346 | LCCR3_Acb(0xff)), | ||
347 | .cmap_inverse = 0, | 334 | .cmap_inverse = 0, |
348 | .cmap_static = 0, | 335 | .cmap_static = 0, |
349 | }; | 336 | }; |
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index deb46cd144bf..ff0c577cd1ac 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <mach/mfp-pxa300.h> | 31 | #include <mach/mfp-pxa300.h> |
32 | 32 | ||
33 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
34 | #include <mach/gpio.h> | ||
35 | #include <mach/pxafb.h> | 34 | #include <mach/pxafb.h> |
36 | #include <mach/mmc.h> | 35 | #include <mach/mmc.h> |
37 | #include <mach/ohci.h> | 36 | #include <mach/ohci.h> |
@@ -137,6 +136,10 @@ static mfp_cfg_t cm_x300_mfp_cfg[] __initdata = { | |||
137 | GPIO82_GPIO | MFP_PULL_HIGH, /* MMC CD */ | 136 | GPIO82_GPIO | MFP_PULL_HIGH, /* MMC CD */ |
138 | GPIO85_GPIO, /* MMC WP */ | 137 | GPIO85_GPIO, /* MMC WP */ |
139 | GPIO99_GPIO, /* Ethernet IRQ */ | 138 | GPIO99_GPIO, /* Ethernet IRQ */ |
139 | |||
140 | /* Standard I2C */ | ||
141 | GPIO21_I2C_SCL, | ||
142 | GPIO22_I2C_SDA, | ||
140 | }; | 143 | }; |
141 | 144 | ||
142 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) | 145 | #if defined(CONFIG_DM9000) || defined(CONFIG_DM9000_MODULE) |
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index 65558d6aa220..c5e28a46b292 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/mmc/host.h> | 21 | #include <linux/mmc/host.h> |
22 | #include <linux/mtd/physmap.h> | ||
22 | #include <linux/pm.h> | 23 | #include <linux/pm.h> |
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | #include <linux/backlight.h> | 25 | #include <linux/backlight.h> |
@@ -541,11 +542,42 @@ err_free_1: | |||
541 | static inline void corgi_init_spi(void) {} | 542 | static inline void corgi_init_spi(void) {} |
542 | #endif | 543 | #endif |
543 | 544 | ||
545 | static struct mtd_partition sharpsl_rom_parts[] = { | ||
546 | { | ||
547 | .name ="Boot PROM Filesystem", | ||
548 | .offset = 0x00120000, | ||
549 | .size = MTDPART_SIZ_FULL, | ||
550 | }, | ||
551 | }; | ||
552 | |||
553 | static struct physmap_flash_data sharpsl_rom_data = { | ||
554 | .width = 2, | ||
555 | .nr_parts = ARRAY_SIZE(sharpsl_rom_parts), | ||
556 | .parts = sharpsl_rom_parts, | ||
557 | }; | ||
558 | |||
559 | static struct resource sharpsl_rom_resources[] = { | ||
560 | { | ||
561 | .start = 0x00000000, | ||
562 | .end = 0x007fffff, | ||
563 | .flags = IORESOURCE_MEM, | ||
564 | }, | ||
565 | }; | ||
566 | |||
567 | static struct platform_device sharpsl_rom_device = { | ||
568 | .name = "physmap-flash", | ||
569 | .id = -1, | ||
570 | .resource = sharpsl_rom_resources, | ||
571 | .num_resources = ARRAY_SIZE(sharpsl_rom_resources), | ||
572 | .dev.platform_data = &sharpsl_rom_data, | ||
573 | }; | ||
574 | |||
544 | static struct platform_device *devices[] __initdata = { | 575 | static struct platform_device *devices[] __initdata = { |
545 | &corgiscoop_device, | 576 | &corgiscoop_device, |
546 | &corgifb_device, | 577 | &corgifb_device, |
547 | &corgikbd_device, | 578 | &corgikbd_device, |
548 | &corgiled_device, | 579 | &corgiled_device, |
580 | &sharpsl_rom_device, | ||
549 | }; | 581 | }; |
550 | 582 | ||
551 | static void corgi_poweroff(void) | 583 | static void corgi_poweroff(void) |
diff --git a/arch/arm/mach-pxa/cpufreq-pxa2xx.c b/arch/arm/mach-pxa/cpufreq-pxa2xx.c index 1f272ea83f36..771dd4eac935 100644 --- a/arch/arm/mach-pxa/cpufreq-pxa2xx.c +++ b/arch/arm/mach-pxa/cpufreq-pxa2xx.c | |||
@@ -64,7 +64,7 @@ typedef struct { | |||
64 | 64 | ||
65 | /* Define the refresh period in mSec for the SDRAM and the number of rows */ | 65 | /* Define the refresh period in mSec for the SDRAM and the number of rows */ |
66 | #define SDRAM_TREF 64 /* standard 64ms SDRAM */ | 66 | #define SDRAM_TREF 64 /* standard 64ms SDRAM */ |
67 | #define SDRAM_ROWS 4096 /* 64MB=8192 32MB=4096 */ | 67 | static unsigned int sdram_rows; |
68 | 68 | ||
69 | #define CCLKCFG_TURBO 0x1 | 69 | #define CCLKCFG_TURBO 0x1 |
70 | #define CCLKCFG_FCS 0x2 | 70 | #define CCLKCFG_FCS 0x2 |
@@ -73,6 +73,9 @@ typedef struct { | |||
73 | #define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2) | 73 | #define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2) |
74 | #define MDREFR_DRI_MASK 0xFFF | 74 | #define MDREFR_DRI_MASK 0xFFF |
75 | 75 | ||
76 | #define MDCNFG_DRAC2(mdcnfg) (((mdcnfg) >> 21) & 0x3) | ||
77 | #define MDCNFG_DRAC0(mdcnfg) (((mdcnfg) >> 5) & 0x3) | ||
78 | |||
76 | /* | 79 | /* |
77 | * PXA255 definitions | 80 | * PXA255 definitions |
78 | */ | 81 | */ |
@@ -109,6 +112,10 @@ static struct cpufreq_frequency_table | |||
109 | static struct cpufreq_frequency_table | 112 | static struct cpufreq_frequency_table |
110 | pxa255_turbo_freq_table[NUM_PXA25x_TURBO_FREQS+1]; | 113 | pxa255_turbo_freq_table[NUM_PXA25x_TURBO_FREQS+1]; |
111 | 114 | ||
115 | static unsigned int pxa255_turbo_table; | ||
116 | module_param(pxa255_turbo_table, uint, 0); | ||
117 | MODULE_PARM_DESC(pxa255_turbo_table, "Selects the frequency table (0 = run table, !0 = turbo table)"); | ||
118 | |||
112 | /* | 119 | /* |
113 | * PXA270 definitions | 120 | * PXA270 definitions |
114 | * | 121 | * |
@@ -158,22 +165,16 @@ static struct cpufreq_frequency_table | |||
158 | 165 | ||
159 | extern unsigned get_clk_frequency_khz(int info); | 166 | extern unsigned get_clk_frequency_khz(int info); |
160 | 167 | ||
161 | static void find_freq_tables(struct cpufreq_policy *policy, | 168 | static void find_freq_tables(struct cpufreq_frequency_table **freq_table, |
162 | struct cpufreq_frequency_table **freq_table, | ||
163 | pxa_freqs_t **pxa_freqs) | 169 | pxa_freqs_t **pxa_freqs) |
164 | { | 170 | { |
165 | if (cpu_is_pxa25x()) { | 171 | if (cpu_is_pxa25x()) { |
166 | if (policy->policy == CPUFREQ_POLICY_PERFORMANCE) { | 172 | if (!pxa255_turbo_table) { |
167 | *pxa_freqs = pxa255_run_freqs; | 173 | *pxa_freqs = pxa255_run_freqs; |
168 | *freq_table = pxa255_run_freq_table; | 174 | *freq_table = pxa255_run_freq_table; |
169 | } else if (policy->policy == CPUFREQ_POLICY_POWERSAVE) { | 175 | } else { |
170 | *pxa_freqs = pxa255_turbo_freqs; | 176 | *pxa_freqs = pxa255_turbo_freqs; |
171 | *freq_table = pxa255_turbo_freq_table; | 177 | *freq_table = pxa255_turbo_freq_table; |
172 | } else { | ||
173 | printk("CPU PXA: Unknown policy found. " | ||
174 | "Using CPUFREQ_POLICY_PERFORMANCE\n"); | ||
175 | *pxa_freqs = pxa255_run_freqs; | ||
176 | *freq_table = pxa255_run_freq_table; | ||
177 | } | 178 | } |
178 | } | 179 | } |
179 | if (cpu_is_pxa27x()) { | 180 | if (cpu_is_pxa27x()) { |
@@ -194,14 +195,28 @@ static void pxa27x_guess_max_freq(void) | |||
194 | } | 195 | } |
195 | } | 196 | } |
196 | 197 | ||
198 | static void init_sdram_rows(void) | ||
199 | { | ||
200 | uint32_t mdcnfg = MDCNFG; | ||
201 | unsigned int drac2 = 0, drac0 = 0; | ||
202 | |||
203 | if (mdcnfg & (MDCNFG_DE2 | MDCNFG_DE3)) | ||
204 | drac2 = MDCNFG_DRAC2(mdcnfg); | ||
205 | |||
206 | if (mdcnfg & (MDCNFG_DE0 | MDCNFG_DE1)) | ||
207 | drac0 = MDCNFG_DRAC0(mdcnfg); | ||
208 | |||
209 | sdram_rows = 1 << (11 + max(drac0, drac2)); | ||
210 | } | ||
211 | |||
197 | static u32 mdrefr_dri(unsigned int freq) | 212 | static u32 mdrefr_dri(unsigned int freq) |
198 | { | 213 | { |
199 | u32 dri = 0; | 214 | u32 dri = 0; |
200 | 215 | ||
201 | if (cpu_is_pxa25x()) | 216 | if (cpu_is_pxa25x()) |
202 | dri = ((freq * SDRAM_TREF) / (SDRAM_ROWS * 32)); | 217 | dri = ((freq * SDRAM_TREF) / (sdram_rows * 32)); |
203 | if (cpu_is_pxa27x()) | 218 | if (cpu_is_pxa27x()) |
204 | dri = ((freq * SDRAM_TREF) / (SDRAM_ROWS - 31)) / 32; | 219 | dri = ((freq * SDRAM_TREF) / (sdram_rows - 31)) / 32; |
205 | return dri; | 220 | return dri; |
206 | } | 221 | } |
207 | 222 | ||
@@ -212,7 +227,7 @@ static int pxa_verify_policy(struct cpufreq_policy *policy) | |||
212 | pxa_freqs_t *pxa_freqs; | 227 | pxa_freqs_t *pxa_freqs; |
213 | int ret; | 228 | int ret; |
214 | 229 | ||
215 | find_freq_tables(policy, &pxa_freqs_table, &pxa_freqs); | 230 | find_freq_tables(&pxa_freqs_table, &pxa_freqs); |
216 | ret = cpufreq_frequency_table_verify(policy, pxa_freqs_table); | 231 | ret = cpufreq_frequency_table_verify(policy, pxa_freqs_table); |
217 | 232 | ||
218 | if (freq_debug) | 233 | if (freq_debug) |
@@ -240,7 +255,7 @@ static int pxa_set_target(struct cpufreq_policy *policy, | |||
240 | unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; | 255 | unsigned int unused, preset_mdrefr, postset_mdrefr, cclkcfg; |
241 | 256 | ||
242 | /* Get the current policy */ | 257 | /* Get the current policy */ |
243 | find_freq_tables(policy, &pxa_freqs_table, &pxa_freq_settings); | 258 | find_freq_tables(&pxa_freqs_table, &pxa_freq_settings); |
244 | 259 | ||
245 | /* Lookup the next frequency */ | 260 | /* Lookup the next frequency */ |
246 | if (cpufreq_frequency_table_target(policy, pxa_freqs_table, | 261 | if (cpufreq_frequency_table_target(policy, pxa_freqs_table, |
@@ -329,11 +344,15 @@ static __init int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
329 | { | 344 | { |
330 | int i; | 345 | int i; |
331 | unsigned int freq; | 346 | unsigned int freq; |
347 | struct cpufreq_frequency_table *pxa255_freq_table; | ||
348 | pxa_freqs_t *pxa255_freqs; | ||
332 | 349 | ||
333 | /* try to guess pxa27x cpu */ | 350 | /* try to guess pxa27x cpu */ |
334 | if (cpu_is_pxa27x()) | 351 | if (cpu_is_pxa27x()) |
335 | pxa27x_guess_max_freq(); | 352 | pxa27x_guess_max_freq(); |
336 | 353 | ||
354 | init_sdram_rows(); | ||
355 | |||
337 | /* set default policy and cpuinfo */ | 356 | /* set default policy and cpuinfo */ |
338 | policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ | 357 | policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */ |
339 | policy->cur = get_clk_frequency_khz(0); /* current freq */ | 358 | policy->cur = get_clk_frequency_khz(0); /* current freq */ |
@@ -354,6 +373,8 @@ static __init int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
354 | } | 373 | } |
355 | pxa255_turbo_freq_table[i].frequency = CPUFREQ_TABLE_END; | 374 | pxa255_turbo_freq_table[i].frequency = CPUFREQ_TABLE_END; |
356 | 375 | ||
376 | pxa255_turbo_table = !!pxa255_turbo_table; | ||
377 | |||
357 | /* Generate the pxa27x cpufreq_frequency_table struct */ | 378 | /* Generate the pxa27x cpufreq_frequency_table struct */ |
358 | for (i = 0; i < NUM_PXA27x_FREQS; i++) { | 379 | for (i = 0; i < NUM_PXA27x_FREQS; i++) { |
359 | freq = pxa27x_freqs[i].khz; | 380 | freq = pxa27x_freqs[i].khz; |
@@ -368,8 +389,12 @@ static __init int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
368 | * Set the policy's minimum and maximum frequencies from the tables | 389 | * Set the policy's minimum and maximum frequencies from the tables |
369 | * just constructed. This sets cpuinfo.mxx_freq, min and max. | 390 | * just constructed. This sets cpuinfo.mxx_freq, min and max. |
370 | */ | 391 | */ |
371 | if (cpu_is_pxa25x()) | 392 | if (cpu_is_pxa25x()) { |
372 | cpufreq_frequency_table_cpuinfo(policy, pxa255_run_freq_table); | 393 | find_freq_tables(&pxa255_freq_table, &pxa255_freqs); |
394 | pr_info("PXA255 cpufreq using %s frequency table\n", | ||
395 | pxa255_turbo_table ? "turbo" : "run"); | ||
396 | cpufreq_frequency_table_cpuinfo(policy, pxa255_freq_table); | ||
397 | } | ||
373 | else if (cpu_is_pxa27x()) | 398 | else if (cpu_is_pxa27x()) |
374 | cpufreq_frequency_table_cpuinfo(policy, pxa27x_freq_table); | 399 | cpufreq_frequency_table_cpuinfo(policy, pxa27x_freq_table); |
375 | 400 | ||
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 35736fc08634..e16f8e3d58d3 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -4,13 +4,12 @@ | |||
4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
5 | #include <linux/dma-mapping.h> | 5 | #include <linux/dma-mapping.h> |
6 | 6 | ||
7 | #include <mach/gpio.h> | 7 | #include <mach/pxa-regs.h> |
8 | #include <mach/udc.h> | 8 | #include <mach/udc.h> |
9 | #include <mach/pxafb.h> | 9 | #include <mach/pxafb.h> |
10 | #include <mach/mmc.h> | 10 | #include <mach/mmc.h> |
11 | #include <mach/irda.h> | 11 | #include <mach/irda.h> |
12 | #include <mach/i2c.h> | 12 | #include <mach/i2c.h> |
13 | #include <mach/mfp-pxa27x.h> | ||
14 | #include <mach/ohci.h> | 13 | #include <mach/ohci.h> |
15 | #include <mach/pxa27x_keypad.h> | 14 | #include <mach/pxa27x_keypad.h> |
16 | #include <mach/pxa2xx_spi.h> | 15 | #include <mach/pxa2xx_spi.h> |
@@ -156,8 +155,8 @@ void __init set_pxa_fb_parent(struct device *parent_dev) | |||
156 | 155 | ||
157 | static struct resource pxa_resource_ffuart[] = { | 156 | static struct resource pxa_resource_ffuart[] = { |
158 | { | 157 | { |
159 | .start = __PREG(FFUART), | 158 | .start = 0x40100000, |
160 | .end = __PREG(FFUART) + 35, | 159 | .end = 0x40100023, |
161 | .flags = IORESOURCE_MEM, | 160 | .flags = IORESOURCE_MEM, |
162 | }, { | 161 | }, { |
163 | .start = IRQ_FFUART, | 162 | .start = IRQ_FFUART, |
@@ -175,8 +174,8 @@ struct platform_device pxa_device_ffuart= { | |||
175 | 174 | ||
176 | static struct resource pxa_resource_btuart[] = { | 175 | static struct resource pxa_resource_btuart[] = { |
177 | { | 176 | { |
178 | .start = __PREG(BTUART), | 177 | .start = 0x40200000, |
179 | .end = __PREG(BTUART) + 35, | 178 | .end = 0x40200023, |
180 | .flags = IORESOURCE_MEM, | 179 | .flags = IORESOURCE_MEM, |
181 | }, { | 180 | }, { |
182 | .start = IRQ_BTUART, | 181 | .start = IRQ_BTUART, |
@@ -194,8 +193,8 @@ struct platform_device pxa_device_btuart = { | |||
194 | 193 | ||
195 | static struct resource pxa_resource_stuart[] = { | 194 | static struct resource pxa_resource_stuart[] = { |
196 | { | 195 | { |
197 | .start = __PREG(STUART), | 196 | .start = 0x40700000, |
198 | .end = __PREG(STUART) + 35, | 197 | .end = 0x40700023, |
199 | .flags = IORESOURCE_MEM, | 198 | .flags = IORESOURCE_MEM, |
200 | }, { | 199 | }, { |
201 | .start = IRQ_STUART, | 200 | .start = IRQ_STUART, |
@@ -213,8 +212,8 @@ struct platform_device pxa_device_stuart = { | |||
213 | 212 | ||
214 | static struct resource pxa_resource_hwuart[] = { | 213 | static struct resource pxa_resource_hwuart[] = { |
215 | { | 214 | { |
216 | .start = __PREG(HWUART), | 215 | .start = 0x41600000, |
217 | .end = __PREG(HWUART) + 47, | 216 | .end = 0x4160002F, |
218 | .flags = IORESOURCE_MEM, | 217 | .flags = IORESOURCE_MEM, |
219 | }, { | 218 | }, { |
220 | .start = IRQ_HWUART, | 219 | .start = IRQ_HWUART, |
@@ -249,18 +248,53 @@ struct platform_device pxa_device_i2c = { | |||
249 | .num_resources = ARRAY_SIZE(pxai2c_resources), | 248 | .num_resources = ARRAY_SIZE(pxai2c_resources), |
250 | }; | 249 | }; |
251 | 250 | ||
252 | static unsigned long pxa27x_i2c_mfp_cfg[] = { | ||
253 | GPIO117_I2C_SCL, | ||
254 | GPIO118_I2C_SDA, | ||
255 | }; | ||
256 | |||
257 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) | 251 | void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info) |
258 | { | 252 | { |
259 | if (cpu_is_pxa27x()) | ||
260 | pxa2xx_mfp_config(ARRAY_AND_SIZE(pxa27x_i2c_mfp_cfg)); | ||
261 | pxa_register_device(&pxa_device_i2c, info); | 253 | pxa_register_device(&pxa_device_i2c, info); |
262 | } | 254 | } |
263 | 255 | ||
256 | #ifdef CONFIG_PXA27x | ||
257 | static struct resource pxa27x_resources_i2c_power[] = { | ||
258 | { | ||
259 | .start = 0x40f00180, | ||
260 | .end = 0x40f001a3, | ||
261 | .flags = IORESOURCE_MEM, | ||
262 | }, { | ||
263 | .start = IRQ_PWRI2C, | ||
264 | .end = IRQ_PWRI2C, | ||
265 | .flags = IORESOURCE_IRQ, | ||
266 | }, | ||
267 | }; | ||
268 | |||
269 | struct platform_device pxa27x_device_i2c_power = { | ||
270 | .name = "pxa2xx-i2c", | ||
271 | .id = 1, | ||
272 | .resource = pxa27x_resources_i2c_power, | ||
273 | .num_resources = ARRAY_SIZE(pxa27x_resources_i2c_power), | ||
274 | }; | ||
275 | #endif | ||
276 | |||
277 | #ifdef CONFIG_PXA3xx | ||
278 | static struct resource pxa3xx_resources_i2c_power[] = { | ||
279 | { | ||
280 | .start = 0x40f500c0, | ||
281 | .end = 0x40f500d3, | ||
282 | .flags = IORESOURCE_MEM, | ||
283 | }, { | ||
284 | .start = IRQ_PWRI2C, | ||
285 | .end = IRQ_PWRI2C, | ||
286 | .flags = IORESOURCE_IRQ, | ||
287 | }, | ||
288 | }; | ||
289 | |||
290 | struct platform_device pxa3xx_device_i2c_power = { | ||
291 | .name = "pxa2xx-i2c", | ||
292 | .id = 1, | ||
293 | .resource = pxa3xx_resources_i2c_power, | ||
294 | .num_resources = ARRAY_SIZE(pxa3xx_resources_i2c_power), | ||
295 | }; | ||
296 | #endif | ||
297 | |||
264 | static struct resource pxai2s_resources[] = { | 298 | static struct resource pxai2s_resources[] = { |
265 | { | 299 | { |
266 | .start = 0x40400000, | 300 | .start = 0x40400000, |
@@ -296,11 +330,36 @@ void __init pxa_set_ficp_info(struct pxaficp_platform_data *info) | |||
296 | pxa_register_device(&pxa_device_ficp, info); | 330 | pxa_register_device(&pxa_device_ficp, info); |
297 | } | 331 | } |
298 | 332 | ||
299 | struct platform_device pxa_device_rtc = { | 333 | static struct resource pxa_rtc_resources[] = { |
334 | [0] = { | ||
335 | .start = 0x40900000, | ||
336 | .end = 0x40900000 + 0x3b, | ||
337 | .flags = IORESOURCE_MEM, | ||
338 | }, | ||
339 | [1] = { | ||
340 | .start = IRQ_RTC1Hz, | ||
341 | .end = IRQ_RTC1Hz, | ||
342 | .flags = IORESOURCE_IRQ, | ||
343 | }, | ||
344 | [2] = { | ||
345 | .start = IRQ_RTCAlrm, | ||
346 | .end = IRQ_RTCAlrm, | ||
347 | .flags = IORESOURCE_IRQ, | ||
348 | }, | ||
349 | }; | ||
350 | |||
351 | struct platform_device sa1100_device_rtc = { | ||
300 | .name = "sa1100-rtc", | 352 | .name = "sa1100-rtc", |
301 | .id = -1, | 353 | .id = -1, |
302 | }; | 354 | }; |
303 | 355 | ||
356 | struct platform_device pxa_device_rtc = { | ||
357 | .name = "pxa-rtc", | ||
358 | .id = -1, | ||
359 | .num_resources = ARRAY_SIZE(pxa_rtc_resources), | ||
360 | .resource = pxa_rtc_resources, | ||
361 | }; | ||
362 | |||
304 | static struct resource pxa_ac97_resources[] = { | 363 | static struct resource pxa_ac97_resources[] = { |
305 | [0] = { | 364 | [0] = { |
306 | .start = 0x40500000, | 365 | .start = 0x40500000, |
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h index bb04af4b0aa3..ecc24a4dca6d 100644 --- a/arch/arm/mach-pxa/devices.h +++ b/arch/arm/mach-pxa/devices.h | |||
@@ -11,6 +11,7 @@ extern struct platform_device pxa_device_hwuart; | |||
11 | extern struct platform_device pxa_device_i2c; | 11 | extern struct platform_device pxa_device_i2c; |
12 | extern struct platform_device pxa_device_i2s; | 12 | extern struct platform_device pxa_device_i2s; |
13 | extern struct platform_device pxa_device_ficp; | 13 | extern struct platform_device pxa_device_ficp; |
14 | extern struct platform_device sa1100_device_rtc; | ||
14 | extern struct platform_device pxa_device_rtc; | 15 | extern struct platform_device pxa_device_rtc; |
15 | extern struct platform_device pxa_device_ac97; | 16 | extern struct platform_device pxa_device_ac97; |
16 | 17 | ||
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c index c0be17e0ab82..b1514fb20d3a 100644 --- a/arch/arm/mach-pxa/dma.c +++ b/arch/arm/mach-pxa/dma.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #include <asm/system.h> | 21 | #include <asm/system.h> |
22 | #include <asm/irq.h> | 22 | #include <asm/irq.h> |
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <asm/dma.h> | 24 | #include <mach/dma.h> |
25 | 25 | ||
26 | #include <mach/pxa-regs.h> | 26 | #include <mach/pxa-regs.h> |
27 | 27 | ||
diff --git a/arch/arm/mach-pxa/e330.c b/arch/arm/mach-pxa/e330.c index d488eded2058..1bd7f740427c 100644 --- a/arch/arm/mach-pxa/e330.c +++ b/arch/arm/mach-pxa/e330.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Hardware definitions for the Toshiba eseries PDAs | 2 | * Hardware definitions for the Toshiba e330 PDAs |
3 | * | 3 | * |
4 | * Copyright (c) 2003 Ian Molton <spyro@f2s.com> | 4 | * Copyright (c) 2003 Ian Molton <spyro@f2s.com> |
5 | * | 5 | * |
@@ -12,6 +12,9 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/clk.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mfd/tc6387xb.h> | ||
15 | 18 | ||
16 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
17 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
@@ -19,13 +22,44 @@ | |||
19 | 22 | ||
20 | #include <mach/mfp-pxa25x.h> | 23 | #include <mach/mfp-pxa25x.h> |
21 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/eseries-gpio.h> | ||
22 | #include <mach/udc.h> | 27 | #include <mach/udc.h> |
23 | 28 | ||
24 | #include "generic.h" | 29 | #include "generic.h" |
25 | #include "eseries.h" | 30 | #include "eseries.h" |
31 | #include "clock.h" | ||
32 | |||
33 | /* -------------------- e330 tc6387xb parameters -------------------- */ | ||
34 | |||
35 | static struct tc6387xb_platform_data e330_tc6387xb_info = { | ||
36 | .enable = &eseries_tmio_enable, | ||
37 | .disable = &eseries_tmio_disable, | ||
38 | .suspend = &eseries_tmio_suspend, | ||
39 | .resume = &eseries_tmio_resume, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device e330_tc6387xb_device = { | ||
43 | .name = "tc6387xb", | ||
44 | .id = -1, | ||
45 | .dev = { | ||
46 | .platform_data = &e330_tc6387xb_info, | ||
47 | }, | ||
48 | .num_resources = 2, | ||
49 | .resource = eseries_tmio_resources, | ||
50 | }; | ||
51 | |||
52 | /* --------------------------------------------------------------- */ | ||
53 | |||
54 | static struct platform_device *devices[] __initdata = { | ||
55 | &e330_tc6387xb_device, | ||
56 | }; | ||
26 | 57 | ||
27 | static void __init e330_init(void) | 58 | static void __init e330_init(void) |
28 | { | 59 | { |
60 | eseries_register_clks(); | ||
61 | eseries_get_tmio_gpios(); | ||
62 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
29 | pxa_set_udc_info(&e7xx_udc_mach_info); | 63 | pxa_set_udc_info(&e7xx_udc_mach_info); |
30 | } | 64 | } |
31 | 65 | ||
diff --git a/arch/arm/mach-pxa/e350.c b/arch/arm/mach-pxa/e350.c index 8ecbc5479828..251129391d7d 100644 --- a/arch/arm/mach-pxa/e350.c +++ b/arch/arm/mach-pxa/e350.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Hardware definitions for the Toshiba eseries PDAs | 2 | * Hardware definitions for the Toshiba e350 PDAs |
3 | * | 3 | * |
4 | * Copyright (c) 2003 Ian Molton <spyro@f2s.com> | 4 | * Copyright (c) 2003 Ian Molton <spyro@f2s.com> |
5 | * | 5 | * |
@@ -12,20 +12,54 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/clk.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mfd/t7l66xb.h> | ||
15 | 18 | ||
16 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
17 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
18 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
19 | 22 | ||
20 | #include <mach/mfp-pxa25x.h> | 23 | #include <mach/mfp-pxa25x.h> |
24 | #include <mach/pxa-regs.h> | ||
21 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
26 | #include <mach/eseries-gpio.h> | ||
22 | #include <mach/udc.h> | 27 | #include <mach/udc.h> |
23 | 28 | ||
24 | #include "generic.h" | 29 | #include "generic.h" |
25 | #include "eseries.h" | 30 | #include "eseries.h" |
31 | #include "clock.h" | ||
32 | |||
33 | /* -------------------- e350 t7l66xb parameters -------------------- */ | ||
34 | |||
35 | static struct t7l66xb_platform_data e350_t7l66xb_info = { | ||
36 | .irq_base = IRQ_BOARD_START, | ||
37 | .enable = &eseries_tmio_enable, | ||
38 | .suspend = &eseries_tmio_suspend, | ||
39 | .resume = &eseries_tmio_resume, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device e350_t7l66xb_device = { | ||
43 | .name = "t7l66xb", | ||
44 | .id = -1, | ||
45 | .dev = { | ||
46 | .platform_data = &e350_t7l66xb_info, | ||
47 | }, | ||
48 | .num_resources = 2, | ||
49 | .resource = eseries_tmio_resources, | ||
50 | }; | ||
51 | |||
52 | /* ---------------------------------------------------------- */ | ||
53 | |||
54 | static struct platform_device *devices[] __initdata = { | ||
55 | &e350_t7l66xb_device, | ||
56 | }; | ||
26 | 57 | ||
27 | static void __init e350_init(void) | 58 | static void __init e350_init(void) |
28 | { | 59 | { |
60 | eseries_register_clks(); | ||
61 | eseries_get_tmio_gpios(); | ||
62 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
29 | pxa_set_udc_info(&e7xx_udc_mach_info); | 63 | pxa_set_udc_info(&e7xx_udc_mach_info); |
30 | } | 64 | } |
31 | 65 | ||
diff --git a/arch/arm/mach-pxa/e400.c b/arch/arm/mach-pxa/e400.c index 544bbaa20621..bed0336aca3d 100644 --- a/arch/arm/mach-pxa/e400.c +++ b/arch/arm/mach-pxa/e400.c | |||
@@ -12,20 +12,26 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/clk.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/mfd/t7l66xb.h> | ||
18 | #include <linux/mtd/nand.h> | ||
19 | #include <linux/mtd/partitions.h> | ||
15 | 20 | ||
16 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
17 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
18 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
19 | 24 | ||
20 | #include <mach/pxa-regs.h> | ||
21 | #include <mach/mfp-pxa25x.h> | 25 | #include <mach/mfp-pxa25x.h> |
26 | #include <mach/pxa-regs.h> | ||
22 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
23 | 28 | #include <mach/eseries-gpio.h> | |
24 | #include <mach/pxafb.h> | 29 | #include <mach/pxafb.h> |
25 | #include <mach/udc.h> | 30 | #include <mach/udc.h> |
26 | 31 | ||
27 | #include "generic.h" | 32 | #include "generic.h" |
28 | #include "eseries.h" | 33 | #include "eseries.h" |
34 | #include "clock.h" | ||
29 | 35 | ||
30 | /* ------------------------ E400 LCD definitions ------------------------ */ | 36 | /* ------------------------ E400 LCD definitions ------------------------ */ |
31 | 37 | ||
@@ -46,7 +52,7 @@ static struct pxafb_mode_info e400_pxafb_mode_info = { | |||
46 | static struct pxafb_mach_info e400_pxafb_mach_info = { | 52 | static struct pxafb_mach_info e400_pxafb_mach_info = { |
47 | .modes = &e400_pxafb_mode_info, | 53 | .modes = &e400_pxafb_mode_info, |
48 | .num_modes = 1, | 54 | .num_modes = 1, |
49 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | 55 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
50 | .lccr3 = 0, | 56 | .lccr3 = 0, |
51 | .pxafb_backlight_power = NULL, | 57 | .pxafb_backlight_power = NULL, |
52 | }; | 58 | }; |
@@ -65,7 +71,10 @@ static unsigned long e400_pin_config[] __initdata = { | |||
65 | GPIO42_BTUART_RXD, | 71 | GPIO42_BTUART_RXD, |
66 | GPIO43_BTUART_TXD, | 72 | GPIO43_BTUART_TXD, |
67 | GPIO44_BTUART_CTS, | 73 | GPIO44_BTUART_CTS, |
68 | GPIO45_GPIO, /* Used by TMIO for #SUSPEND */ | 74 | |
75 | /* TMIO controller */ | ||
76 | GPIO19_GPIO, /* t7l66xb #PCLR */ | ||
77 | GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */ | ||
69 | 78 | ||
70 | /* wakeup */ | 79 | /* wakeup */ |
71 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, | 80 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, |
@@ -73,10 +82,60 @@ static unsigned long e400_pin_config[] __initdata = { | |||
73 | 82 | ||
74 | /* ---------------------------------------------------------------------- */ | 83 | /* ---------------------------------------------------------------------- */ |
75 | 84 | ||
85 | static struct mtd_partition partition_a = { | ||
86 | .name = "Internal NAND flash", | ||
87 | .offset = 0, | ||
88 | .size = MTDPART_SIZ_FULL, | ||
89 | }; | ||
90 | |||
91 | static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; | ||
92 | |||
93 | static struct nand_bbt_descr e400_t7l66xb_nand_bbt = { | ||
94 | .options = 0, | ||
95 | .offs = 4, | ||
96 | .len = 2, | ||
97 | .pattern = scan_ff_pattern | ||
98 | }; | ||
99 | |||
100 | static struct tmio_nand_data e400_t7l66xb_nand_config = { | ||
101 | .num_partitions = 1, | ||
102 | .partition = &partition_a, | ||
103 | .badblock_pattern = &e400_t7l66xb_nand_bbt, | ||
104 | }; | ||
105 | |||
106 | static struct t7l66xb_platform_data e400_t7l66xb_info = { | ||
107 | .irq_base = IRQ_BOARD_START, | ||
108 | .enable = &eseries_tmio_enable, | ||
109 | .suspend = &eseries_tmio_suspend, | ||
110 | .resume = &eseries_tmio_resume, | ||
111 | |||
112 | .nand_data = &e400_t7l66xb_nand_config, | ||
113 | }; | ||
114 | |||
115 | static struct platform_device e400_t7l66xb_device = { | ||
116 | .name = "t7l66xb", | ||
117 | .id = -1, | ||
118 | .dev = { | ||
119 | .platform_data = &e400_t7l66xb_info, | ||
120 | }, | ||
121 | .num_resources = 2, | ||
122 | .resource = eseries_tmio_resources, | ||
123 | }; | ||
124 | |||
125 | /* ---------------------------------------------------------- */ | ||
126 | |||
127 | static struct platform_device *devices[] __initdata = { | ||
128 | &e400_t7l66xb_device, | ||
129 | }; | ||
130 | |||
76 | static void __init e400_init(void) | 131 | static void __init e400_init(void) |
77 | { | 132 | { |
78 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config)); | 133 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e400_pin_config)); |
134 | /* Fixme - e400 may have a switched clock */ | ||
135 | eseries_register_clks(); | ||
136 | eseries_get_tmio_gpios(); | ||
79 | set_pxa_fb_info(&e400_pxafb_mach_info); | 137 | set_pxa_fb_info(&e400_pxafb_mach_info); |
138 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
80 | pxa_set_udc_info(&e7xx_udc_mach_info); | 139 | pxa_set_udc_info(&e7xx_udc_mach_info); |
81 | } | 140 | } |
82 | 141 | ||
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c index c57a15b37f0d..b00d670b2ea6 100644 --- a/arch/arm/mach-pxa/e740.c +++ b/arch/arm/mach-pxa/e740.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/clk.h> | ||
19 | #include <linux/mfd/t7l66xb.h> | ||
18 | 20 | ||
19 | #include <video/w100fb.h> | 21 | #include <video/w100fb.h> |
20 | 22 | ||
@@ -23,12 +25,16 @@ | |||
23 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
24 | 26 | ||
25 | #include <mach/mfp-pxa25x.h> | 27 | #include <mach/mfp-pxa25x.h> |
28 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <mach/eseries-gpio.h> | ||
27 | #include <mach/udc.h> | 31 | #include <mach/udc.h> |
32 | #include <mach/irda.h> | ||
28 | 33 | ||
29 | #include "generic.h" | 34 | #include "generic.h" |
30 | #include "eseries.h" | 35 | #include "eseries.h" |
31 | 36 | #include "clock.h" | |
37 | #include "devices.h" | ||
32 | 38 | ||
33 | /* ------------------------ e740 video support --------------------------- */ | 39 | /* ------------------------ e740 video support --------------------------- */ |
34 | 40 | ||
@@ -116,7 +122,17 @@ static unsigned long e740_pin_config[] __initdata = { | |||
116 | GPIO42_BTUART_RXD, | 122 | GPIO42_BTUART_RXD, |
117 | GPIO43_BTUART_TXD, | 123 | GPIO43_BTUART_TXD, |
118 | GPIO44_BTUART_CTS, | 124 | GPIO44_BTUART_CTS, |
119 | GPIO45_GPIO, /* Used by TMIO for #SUSPEND */ | 125 | |
126 | /* TMIO controller */ | ||
127 | GPIO19_GPIO, /* t7l66xb #PCLR */ | ||
128 | GPIO45_GPIO, /* t7l66xb #SUSPEND (NOT BTUART!) */ | ||
129 | |||
130 | /* UDC */ | ||
131 | GPIO13_GPIO, | ||
132 | GPIO3_GPIO, | ||
133 | |||
134 | /* IrDA */ | ||
135 | GPIO38_GPIO | MFP_LPM_DRIVE_HIGH, | ||
120 | 136 | ||
121 | /* PC Card */ | 137 | /* PC Card */ |
122 | GPIO8_GPIO, /* CD0 */ | 138 | GPIO8_GPIO, /* CD0 */ |
@@ -142,17 +158,43 @@ static unsigned long e740_pin_config[] __initdata = { | |||
142 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, | 158 | GPIO0_GPIO | WAKEUP_ON_EDGE_RISE, |
143 | }; | 159 | }; |
144 | 160 | ||
161 | /* -------------------- e740 t7l66xb parameters -------------------- */ | ||
162 | |||
163 | static struct t7l66xb_platform_data e740_t7l66xb_info = { | ||
164 | .irq_base = IRQ_BOARD_START, | ||
165 | .enable = &eseries_tmio_enable, | ||
166 | .suspend = &eseries_tmio_suspend, | ||
167 | .resume = &eseries_tmio_resume, | ||
168 | }; | ||
169 | |||
170 | static struct platform_device e740_t7l66xb_device = { | ||
171 | .name = "t7l66xb", | ||
172 | .id = -1, | ||
173 | .dev = { | ||
174 | .platform_data = &e740_t7l66xb_info, | ||
175 | }, | ||
176 | .num_resources = 2, | ||
177 | .resource = eseries_tmio_resources, | ||
178 | }; | ||
179 | |||
145 | /* ----------------------------------------------------------------------- */ | 180 | /* ----------------------------------------------------------------------- */ |
146 | 181 | ||
147 | static struct platform_device *devices[] __initdata = { | 182 | static struct platform_device *devices[] __initdata = { |
148 | &e740_fb_device, | 183 | &e740_fb_device, |
184 | &e740_t7l66xb_device, | ||
149 | }; | 185 | }; |
150 | 186 | ||
151 | static void __init e740_init(void) | 187 | static void __init e740_init(void) |
152 | { | 188 | { |
153 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); | 189 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); |
190 | eseries_register_clks(); | ||
191 | clk_add_alias("CLK_CK48M", &e740_t7l66xb_device.dev, | ||
192 | "UDCCLK", &pxa25x_device_udc.dev), | ||
193 | eseries_get_tmio_gpios(); | ||
154 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 194 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
155 | pxa_set_udc_info(&e7xx_udc_mach_info); | 195 | pxa_set_udc_info(&e7xx_udc_mach_info); |
196 | e7xx_irda_init(); | ||
197 | pxa_set_ficp_info(&e7xx_ficp_platform_data); | ||
156 | } | 198 | } |
157 | 199 | ||
158 | MACHINE_START(E740, "Toshiba e740") | 200 | MACHINE_START(E740, "Toshiba e740") |
diff --git a/arch/arm/mach-pxa/e750.c b/arch/arm/mach-pxa/e750.c index 640e738b85df..84d7c1aac58d 100644 --- a/arch/arm/mach-pxa/e750.c +++ b/arch/arm/mach-pxa/e750.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/mfd/tc6393xb.h> | ||
18 | 19 | ||
19 | #include <video/w100fb.h> | 20 | #include <video/w100fb.h> |
20 | 21 | ||
@@ -23,11 +24,15 @@ | |||
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | 25 | ||
25 | #include <mach/mfp-pxa25x.h> | 26 | #include <mach/mfp-pxa25x.h> |
27 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/eseries-gpio.h> | ||
27 | #include <mach/udc.h> | 30 | #include <mach/udc.h> |
31 | #include <mach/irda.h> | ||
28 | 32 | ||
29 | #include "generic.h" | 33 | #include "generic.h" |
30 | #include "eseries.h" | 34 | #include "eseries.h" |
35 | #include "clock.h" | ||
31 | 36 | ||
32 | /* ---------------------- E750 LCD definitions -------------------- */ | 37 | /* ---------------------- E750 LCD definitions -------------------- */ |
33 | 38 | ||
@@ -100,16 +105,45 @@ static struct platform_device e750_fb_device = { | |||
100 | .resource = e750_fb_resources, | 105 | .resource = e750_fb_resources, |
101 | }; | 106 | }; |
102 | 107 | ||
103 | /* ----------------------------------------------------------------------- */ | 108 | /* ----------------- e750 tc6393xb parameters ------------------ */ |
109 | |||
110 | static struct tc6393xb_platform_data e750_tc6393xb_info = { | ||
111 | .irq_base = IRQ_BOARD_START, | ||
112 | .scr_pll2cr = 0x0cc1, | ||
113 | .scr_gper = 0, | ||
114 | .gpio_base = -1, | ||
115 | .suspend = &eseries_tmio_suspend, | ||
116 | .resume = &eseries_tmio_resume, | ||
117 | .enable = &eseries_tmio_enable, | ||
118 | .disable = &eseries_tmio_disable, | ||
119 | }; | ||
120 | |||
121 | static struct platform_device e750_tc6393xb_device = { | ||
122 | .name = "tc6393xb", | ||
123 | .id = -1, | ||
124 | .dev = { | ||
125 | .platform_data = &e750_tc6393xb_info, | ||
126 | }, | ||
127 | .num_resources = 2, | ||
128 | .resource = eseries_tmio_resources, | ||
129 | }; | ||
130 | |||
131 | /* ------------------------------------------------------------- */ | ||
104 | 132 | ||
105 | static struct platform_device *devices[] __initdata = { | 133 | static struct platform_device *devices[] __initdata = { |
106 | &e750_fb_device, | 134 | &e750_fb_device, |
135 | &e750_tc6393xb_device, | ||
107 | }; | 136 | }; |
108 | 137 | ||
109 | static void __init e750_init(void) | 138 | static void __init e750_init(void) |
110 | { | 139 | { |
140 | clk_add_alias("CLK_CK3P6MI", &e750_tc6393xb_device.dev, | ||
141 | "GPIO11_CLK", NULL), | ||
142 | eseries_get_tmio_gpios(); | ||
111 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 143 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
112 | pxa_set_udc_info(&e7xx_udc_mach_info); | 144 | pxa_set_udc_info(&e7xx_udc_mach_info); |
145 | e7xx_irda_init(); | ||
146 | pxa_set_ficp_info(&e7xx_ficp_platform_data); | ||
113 | } | 147 | } |
114 | 148 | ||
115 | MACHINE_START(E750, "Toshiba e750") | 149 | MACHINE_START(E750, "Toshiba e750") |
diff --git a/arch/arm/mach-pxa/e800.c b/arch/arm/mach-pxa/e800.c index a293e09bfe25..9a86a426f924 100644 --- a/arch/arm/mach-pxa/e800.c +++ b/arch/arm/mach-pxa/e800.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/device.h> | 15 | #include <linux/device.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/fb.h> | 17 | #include <linux/fb.h> |
18 | #include <linux/mfd/tc6393xb.h> | ||
18 | 19 | ||
19 | #include <video/w100fb.h> | 20 | #include <video/w100fb.h> |
20 | 21 | ||
@@ -23,12 +24,14 @@ | |||
23 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
24 | 25 | ||
25 | #include <mach/mfp-pxa25x.h> | 26 | #include <mach/mfp-pxa25x.h> |
27 | #include <mach/pxa-regs.h> | ||
26 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
27 | #include <mach/eseries-gpio.h> | 29 | #include <mach/eseries-gpio.h> |
28 | #include <mach/udc.h> | 30 | #include <mach/udc.h> |
29 | 31 | ||
30 | #include "generic.h" | 32 | #include "generic.h" |
31 | #include "eseries.h" | 33 | #include "eseries.h" |
34 | #include "clock.h" | ||
32 | 35 | ||
33 | /* ------------------------ e800 LCD definitions ------------------------- */ | 36 | /* ------------------------ e800 LCD definitions ------------------------- */ |
34 | 37 | ||
@@ -160,14 +163,41 @@ static struct pxa2xx_udc_mach_info e800_udc_mach_info = { | |||
160 | .gpio_pullup_inverted = 1 | 163 | .gpio_pullup_inverted = 1 |
161 | }; | 164 | }; |
162 | 165 | ||
166 | /* ----------------- e800 tc6393xb parameters ------------------ */ | ||
167 | |||
168 | static struct tc6393xb_platform_data e800_tc6393xb_info = { | ||
169 | .irq_base = IRQ_BOARD_START, | ||
170 | .scr_pll2cr = 0x0cc1, | ||
171 | .scr_gper = 0, | ||
172 | .gpio_base = -1, | ||
173 | .suspend = &eseries_tmio_suspend, | ||
174 | .resume = &eseries_tmio_resume, | ||
175 | .enable = &eseries_tmio_enable, | ||
176 | .disable = &eseries_tmio_disable, | ||
177 | }; | ||
178 | |||
179 | static struct platform_device e800_tc6393xb_device = { | ||
180 | .name = "tc6393xb", | ||
181 | .id = -1, | ||
182 | .dev = { | ||
183 | .platform_data = &e800_tc6393xb_info, | ||
184 | }, | ||
185 | .num_resources = 2, | ||
186 | .resource = eseries_tmio_resources, | ||
187 | }; | ||
188 | |||
163 | /* ----------------------------------------------------------------------- */ | 189 | /* ----------------------------------------------------------------------- */ |
164 | 190 | ||
165 | static struct platform_device *devices[] __initdata = { | 191 | static struct platform_device *devices[] __initdata = { |
166 | &e800_fb_device, | 192 | &e800_fb_device, |
193 | &e800_tc6393xb_device, | ||
167 | }; | 194 | }; |
168 | 195 | ||
169 | static void __init e800_init(void) | 196 | static void __init e800_init(void) |
170 | { | 197 | { |
198 | clk_add_alias("CLK_CK3P6MI", &e800_tc6393xb_device.dev, | ||
199 | "GPIO11_CLK", NULL), | ||
200 | eseries_get_tmio_gpios(); | ||
171 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 201 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
172 | pxa_set_udc_info(&e800_udc_mach_info); | 202 | pxa_set_udc_info(&e800_udc_mach_info); |
173 | } | 203 | } |
diff --git a/arch/arm/mach-pxa/eseries.c b/arch/arm/mach-pxa/eseries.c index d28849b50a14..dfce7d5b659e 100644 --- a/arch/arm/mach-pxa/eseries.c +++ b/arch/arm/mach-pxa/eseries.c | |||
@@ -12,6 +12,9 @@ | |||
12 | 12 | ||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/gpio.h> | ||
16 | #include <linux/delay.h> | ||
17 | #include <linux/platform_device.h> | ||
15 | 18 | ||
16 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
17 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
@@ -21,8 +24,10 @@ | |||
21 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
22 | #include <mach/eseries-gpio.h> | 25 | #include <mach/eseries-gpio.h> |
23 | #include <mach/udc.h> | 26 | #include <mach/udc.h> |
27 | #include <mach/irda.h> | ||
24 | 28 | ||
25 | #include "generic.h" | 29 | #include "generic.h" |
30 | #include "clock.h" | ||
26 | 31 | ||
27 | /* Only e800 has 128MB RAM */ | 32 | /* Only e800 has 128MB RAM */ |
28 | void __init eseries_fixup(struct machine_desc *desc, | 33 | void __init eseries_fixup(struct machine_desc *desc, |
@@ -43,3 +48,122 @@ struct pxa2xx_udc_mach_info e7xx_udc_mach_info = { | |||
43 | .gpio_pullup_inverted = 1 | 48 | .gpio_pullup_inverted = 1 |
44 | }; | 49 | }; |
45 | 50 | ||
51 | static void e7xx_irda_transceiver_mode(struct device *dev, int mode) | ||
52 | { | ||
53 | if (mode & IR_OFF) { | ||
54 | gpio_set_value(GPIO_E7XX_IR_OFF, 1); | ||
55 | pxa2xx_transceiver_mode(dev, mode); | ||
56 | } else { | ||
57 | pxa2xx_transceiver_mode(dev, mode); | ||
58 | gpio_set_value(GPIO_E7XX_IR_OFF, 0); | ||
59 | } | ||
60 | } | ||
61 | |||
62 | int e7xx_irda_init(void) | ||
63 | { | ||
64 | int ret; | ||
65 | |||
66 | ret = gpio_request(GPIO_E7XX_IR_OFF, "IrDA power"); | ||
67 | if (ret) | ||
68 | goto out; | ||
69 | |||
70 | ret = gpio_direction_output(GPIO_E7XX_IR_OFF, 0); | ||
71 | if (ret) | ||
72 | goto out; | ||
73 | |||
74 | e7xx_irda_transceiver_mode(NULL, IR_SIRMODE | IR_OFF); | ||
75 | out: | ||
76 | return ret; | ||
77 | } | ||
78 | |||
79 | static void e7xx_irda_shutdown(struct device *dev) | ||
80 | { | ||
81 | e7xx_irda_transceiver_mode(dev, IR_SIRMODE | IR_OFF); | ||
82 | gpio_free(GPIO_E7XX_IR_OFF); | ||
83 | } | ||
84 | |||
85 | struct pxaficp_platform_data e7xx_ficp_platform_data = { | ||
86 | .transceiver_cap = IR_SIRMODE | IR_OFF, | ||
87 | .transceiver_mode = e7xx_irda_transceiver_mode, | ||
88 | .shutdown = e7xx_irda_shutdown, | ||
89 | }; | ||
90 | |||
91 | int eseries_tmio_enable(struct platform_device *dev) | ||
92 | { | ||
93 | /* Reset - bring SUSPEND high before PCLR */ | ||
94 | gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 0); | ||
95 | gpio_set_value(GPIO_ESERIES_TMIO_PCLR, 0); | ||
96 | msleep(1); | ||
97 | gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 1); | ||
98 | msleep(1); | ||
99 | gpio_set_value(GPIO_ESERIES_TMIO_PCLR, 1); | ||
100 | msleep(1); | ||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | int eseries_tmio_disable(struct platform_device *dev) | ||
105 | { | ||
106 | gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 0); | ||
107 | gpio_set_value(GPIO_ESERIES_TMIO_PCLR, 0); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | int eseries_tmio_suspend(struct platform_device *dev) | ||
112 | { | ||
113 | gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 0); | ||
114 | return 0; | ||
115 | } | ||
116 | |||
117 | int eseries_tmio_resume(struct platform_device *dev) | ||
118 | { | ||
119 | gpio_set_value(GPIO_ESERIES_TMIO_SUSPEND, 1); | ||
120 | msleep(1); | ||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | void eseries_get_tmio_gpios(void) | ||
125 | { | ||
126 | gpio_request(GPIO_ESERIES_TMIO_SUSPEND, NULL); | ||
127 | gpio_request(GPIO_ESERIES_TMIO_PCLR, NULL); | ||
128 | gpio_direction_output(GPIO_ESERIES_TMIO_SUSPEND, 0); | ||
129 | gpio_direction_output(GPIO_ESERIES_TMIO_PCLR, 0); | ||
130 | } | ||
131 | |||
132 | /* TMIO controller uses the same resources on all e-series machines. */ | ||
133 | struct resource eseries_tmio_resources[] = { | ||
134 | [0] = { | ||
135 | .start = PXA_CS4_PHYS, | ||
136 | .end = PXA_CS4_PHYS + 0x1fffff, | ||
137 | .flags = IORESOURCE_MEM, | ||
138 | }, | ||
139 | [1] = { | ||
140 | .start = IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ), | ||
141 | .end = IRQ_GPIO(GPIO_ESERIES_TMIO_IRQ), | ||
142 | .flags = IORESOURCE_IRQ, | ||
143 | }, | ||
144 | }; | ||
145 | |||
146 | /* Some e-series hardware cannot control the 32K clock */ | ||
147 | static void clk_32k_dummy(struct clk *clk) | ||
148 | { | ||
149 | } | ||
150 | |||
151 | static const struct clkops clk_32k_dummy_ops = { | ||
152 | .enable = clk_32k_dummy, | ||
153 | .disable = clk_32k_dummy, | ||
154 | }; | ||
155 | |||
156 | static struct clk tmio_dummy_clk = { | ||
157 | .ops = &clk_32k_dummy_ops, | ||
158 | .rate = 32768, | ||
159 | }; | ||
160 | |||
161 | static struct clk_lookup eseries_clkregs[] = { | ||
162 | INIT_CLKREG(&tmio_dummy_clk, NULL, "CLK_CK32K"), | ||
163 | }; | ||
164 | |||
165 | void eseries_register_clks(void) | ||
166 | { | ||
167 | clks_register(eseries_clkregs, ARRAY_SIZE(eseries_clkregs)); | ||
168 | } | ||
169 | |||
diff --git a/arch/arm/mach-pxa/eseries.h b/arch/arm/mach-pxa/eseries.h index a83f88d4b6ad..5930f5e2a123 100644 --- a/arch/arm/mach-pxa/eseries.h +++ b/arch/arm/mach-pxa/eseries.h | |||
@@ -2,3 +2,15 @@ void __init eseries_fixup(struct machine_desc *desc, | |||
2 | struct tag *tags, char **cmdline, struct meminfo *mi); | 2 | struct tag *tags, char **cmdline, struct meminfo *mi); |
3 | 3 | ||
4 | extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info; | 4 | extern struct pxa2xx_udc_mach_info e7xx_udc_mach_info; |
5 | extern struct pxaficp_platform_data e7xx_ficp_platform_data; | ||
6 | extern int e7xx_irda_init(void); | ||
7 | |||
8 | extern int eseries_tmio_enable(struct platform_device *dev); | ||
9 | extern int eseries_tmio_disable(struct platform_device *dev); | ||
10 | extern int eseries_tmio_suspend(struct platform_device *dev); | ||
11 | extern int eseries_tmio_resume(struct platform_device *dev); | ||
12 | extern void eseries_get_tmio_gpios(void); | ||
13 | extern struct resource eseries_tmio_resources[]; | ||
14 | extern struct platform_device e300_tc6387xb_device; | ||
15 | extern void eseries_register_clks(void); | ||
16 | |||
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index cc3d850cc0b6..df5f822f3b6c 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
@@ -16,11 +16,14 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/pwm_backlight.h> | 18 | #include <linux/pwm_backlight.h> |
19 | #include <linux/input.h> | ||
19 | 20 | ||
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
21 | #include <mach/pxafb.h> | 22 | #include <mach/pxafb.h> |
22 | #include <mach/ohci.h> | 23 | #include <mach/ohci.h> |
23 | #include <mach/i2c.h> | 24 | #include <mach/i2c.h> |
25 | #include <mach/hardware.h> | ||
26 | #include <mach/pxa27x_keypad.h> | ||
24 | 27 | ||
25 | #include <mach/mfp-pxa27x.h> | 28 | #include <mach/mfp-pxa27x.h> |
26 | #include <mach/pxa-regs.h> | 29 | #include <mach/pxa-regs.h> |
@@ -101,120 +104,732 @@ static unsigned long ezx_pin_config[] __initdata = { | |||
101 | GPIO44_BTUART_CTS, | 104 | GPIO44_BTUART_CTS, |
102 | GPIO45_BTUART_RTS, | 105 | GPIO45_BTUART_RTS, |
103 | 106 | ||
104 | /* STUART */ | 107 | /* I2C */ |
105 | GPIO46_STUART_RXD, | 108 | GPIO117_I2C_SCL, |
106 | GPIO47_STUART_TXD, | 109 | GPIO118_I2C_SDA, |
107 | 110 | ||
108 | /* For A780 support (connected with Neptune GSM chip) */ | 111 | /* PCAP SSP */ |
109 | GPIO30_USB_P3_2, /* ICL_TXENB */ | 112 | GPIO29_SSP1_SCLK, |
110 | GPIO31_USB_P3_6, /* ICL_VPOUT */ | 113 | GPIO25_SSP1_TXD, |
111 | GPIO90_USB_P3_5, /* ICL_VPIN */ | 114 | GPIO26_SSP1_RXD, |
112 | GPIO91_USB_P3_1, /* ICL_XRXD */ | 115 | GPIO24_GPIO, /* pcap chip select */ |
113 | GPIO56_USB_P3_4, /* ICL_VMOUT */ | 116 | GPIO1_GPIO, /* pcap interrupt */ |
114 | GPIO113_USB_P3_3, /* /ICL_VMIN */ | 117 | GPIO4_GPIO, /* WDI_AP */ |
118 | GPIO55_GPIO, /* SYS_RESTART */ | ||
119 | |||
120 | /* MMC */ | ||
121 | GPIO32_MMC_CLK, | ||
122 | GPIO92_MMC_DAT_0, | ||
123 | GPIO109_MMC_DAT_1, | ||
124 | GPIO110_MMC_DAT_2, | ||
125 | GPIO111_MMC_DAT_3, | ||
126 | GPIO112_MMC_CMD, | ||
127 | GPIO11_GPIO, /* mmc detect */ | ||
128 | |||
129 | /* usb to external transceiver */ | ||
130 | GPIO34_USB_P2_2, | ||
131 | GPIO35_USB_P2_1, | ||
132 | GPIO36_USB_P2_4, | ||
133 | GPIO39_USB_P2_6, | ||
134 | GPIO40_USB_P2_5, | ||
135 | GPIO53_USB_P2_3, | ||
136 | |||
137 | /* usb to Neptune GSM chip */ | ||
138 | GPIO30_USB_P3_2, | ||
139 | GPIO31_USB_P3_6, | ||
140 | GPIO90_USB_P3_5, | ||
141 | GPIO91_USB_P3_1, | ||
142 | GPIO56_USB_P3_4, | ||
143 | GPIO113_USB_P3_3, | ||
144 | }; | ||
145 | |||
146 | #if defined(CONFIG_MACH_EZX_A780) || defined(CONFIG_MACH_EZX_E680) | ||
147 | static unsigned long gen1_pin_config[] __initdata = { | ||
148 | /* flip / lockswitch */ | ||
149 | GPIO12_GPIO, | ||
150 | |||
151 | /* bluetooth (bcm2035) */ | ||
152 | GPIO14_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ | ||
153 | GPIO48_GPIO, /* RESET */ | ||
154 | GPIO28_GPIO, /* WAKEUP */ | ||
155 | |||
156 | /* Neptune handshake */ | ||
157 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */ | ||
158 | GPIO57_GPIO, /* AP_RDY */ | ||
159 | GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */ | ||
160 | GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI2 */ | ||
161 | GPIO82_GPIO, /* RESET */ | ||
162 | GPIO99_GPIO, /* TC_MM_EN */ | ||
163 | |||
164 | /* sound */ | ||
165 | GPIO52_SSP3_SCLK, | ||
166 | GPIO83_SSP3_SFRM, | ||
167 | GPIO81_SSP3_TXD, | ||
168 | GPIO89_SSP3_RXD, | ||
169 | |||
170 | /* ssp2 pins to in */ | ||
171 | GPIO22_GPIO, /* SSP2_SCLK */ | ||
172 | GPIO37_GPIO, /* SSP2_SFRM */ | ||
173 | GPIO38_GPIO, /* SSP2_TXD */ | ||
174 | GPIO88_GPIO, /* SSP2_RXD */ | ||
175 | |||
176 | /* camera */ | ||
177 | GPIO23_CIF_MCLK, | ||
178 | GPIO54_CIF_PCLK, | ||
179 | GPIO85_CIF_LV, | ||
180 | GPIO84_CIF_FV, | ||
181 | GPIO27_CIF_DD_0, | ||
182 | GPIO114_CIF_DD_1, | ||
183 | GPIO51_CIF_DD_2, | ||
184 | GPIO115_CIF_DD_3, | ||
185 | GPIO95_CIF_DD_4, | ||
186 | GPIO94_CIF_DD_5, | ||
187 | GPIO17_CIF_DD_6, | ||
188 | GPIO108_CIF_DD_7, | ||
189 | GPIO50_GPIO, /* CAM_EN */ | ||
190 | GPIO19_GPIO, /* CAM_RST */ | ||
191 | |||
192 | /* EMU */ | ||
193 | GPIO120_GPIO, /* EMU_MUX1 */ | ||
194 | GPIO119_GPIO, /* EMU_MUX2 */ | ||
195 | GPIO86_GPIO, /* SNP_INT_CTL */ | ||
196 | GPIO87_GPIO, /* SNP_INT_IN */ | ||
197 | }; | ||
198 | #endif | ||
199 | |||
200 | #if defined(CONFIG_MACH_EZX_A1200) || defined(CONFIG_MACH_EZX_A910) || \ | ||
201 | defined(CONFIG_MACH_EZX_E2) || defined(CONFIG_MACH_EZX_E6) | ||
202 | static unsigned long gen2_pin_config[] __initdata = { | ||
203 | /* flip / lockswitch */ | ||
204 | GPIO15_GPIO, | ||
205 | |||
206 | /* EOC */ | ||
207 | GPIO10_GPIO, | ||
208 | |||
209 | /* bluetooth (bcm2045) */ | ||
210 | GPIO13_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ | ||
211 | GPIO37_GPIO, /* RESET */ | ||
212 | GPIO57_GPIO, /* WAKEUP */ | ||
213 | |||
214 | /* Neptune handshake */ | ||
215 | GPIO0_GPIO | WAKEUP_ON_LEVEL_HIGH, /* BP_RDY */ | ||
216 | GPIO96_GPIO, /* AP_RDY */ | ||
217 | GPIO3_GPIO | WAKEUP_ON_LEVEL_HIGH, /* WDI */ | ||
218 | GPIO116_GPIO, /* RESET */ | ||
219 | GPIO41_GPIO, /* BP_FLASH */ | ||
220 | |||
221 | /* sound */ | ||
222 | GPIO52_SSP3_SCLK, | ||
223 | GPIO83_SSP3_SFRM, | ||
224 | GPIO81_SSP3_TXD, | ||
225 | GPIO82_SSP3_RXD, | ||
226 | |||
227 | /* ssp2 pins to in */ | ||
228 | GPIO22_GPIO, /* SSP2_SCLK */ | ||
229 | GPIO14_GPIO, /* SSP2_SFRM */ | ||
230 | GPIO38_GPIO, /* SSP2_TXD */ | ||
231 | GPIO88_GPIO, /* SSP2_RXD */ | ||
232 | |||
233 | /* camera */ | ||
234 | GPIO23_CIF_MCLK, | ||
235 | GPIO54_CIF_PCLK, | ||
236 | GPIO85_CIF_LV, | ||
237 | GPIO84_CIF_FV, | ||
238 | GPIO27_CIF_DD_0, | ||
239 | GPIO114_CIF_DD_1, | ||
240 | GPIO51_CIF_DD_2, | ||
241 | GPIO115_CIF_DD_3, | ||
242 | GPIO95_CIF_DD_4, | ||
243 | GPIO48_CIF_DD_5, | ||
244 | GPIO93_CIF_DD_6, | ||
245 | GPIO12_CIF_DD_7, | ||
246 | GPIO50_GPIO, /* CAM_EN */ | ||
247 | GPIO28_GPIO, /* CAM_RST */ | ||
248 | GPIO17_GPIO, /* CAM_FLASH */ | ||
249 | }; | ||
250 | #endif | ||
251 | |||
252 | #ifdef CONFIG_MACH_EZX_A780 | ||
253 | static unsigned long a780_pin_config[] __initdata = { | ||
254 | /* keypad */ | ||
255 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
256 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
257 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
258 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
259 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
260 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
261 | GPIO103_KP_MKOUT_0, | ||
262 | GPIO104_KP_MKOUT_1, | ||
263 | GPIO105_KP_MKOUT_2, | ||
264 | GPIO106_KP_MKOUT_3, | ||
265 | GPIO107_KP_MKOUT_4, | ||
266 | |||
267 | /* attenuate sound */ | ||
268 | GPIO96_GPIO, | ||
269 | }; | ||
270 | #endif | ||
271 | |||
272 | #ifdef CONFIG_MACH_EZX_E680 | ||
273 | static unsigned long e680_pin_config[] __initdata = { | ||
274 | /* keypad */ | ||
275 | GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
276 | GPIO96_KP_DKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
277 | GPIO97_KP_DKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
278 | GPIO98_KP_DKIN_5 | WAKEUP_ON_LEVEL_HIGH, | ||
279 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
280 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
281 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
282 | GPIO103_KP_MKOUT_0, | ||
283 | GPIO104_KP_MKOUT_1, | ||
284 | GPIO105_KP_MKOUT_2, | ||
285 | GPIO106_KP_MKOUT_3, | ||
286 | |||
287 | /* MIDI */ | ||
288 | GPIO79_GPIO, /* VA_SEL_BUL */ | ||
289 | GPIO80_GPIO, /* FLT_SEL_BUL */ | ||
290 | GPIO78_GPIO, /* MIDI_RESET */ | ||
291 | GPIO33_GPIO, /* MIDI_CS */ | ||
292 | GPIO15_GPIO, /* MIDI_IRQ */ | ||
293 | GPIO49_GPIO, /* MIDI_NPWE */ | ||
294 | GPIO18_GPIO, /* MIDI_RDY */ | ||
295 | |||
296 | /* leds */ | ||
297 | GPIO46_GPIO, | ||
298 | GPIO47_GPIO, | ||
299 | }; | ||
300 | #endif | ||
301 | |||
302 | #ifdef CONFIG_MACH_EZX_A1200 | ||
303 | static unsigned long a1200_pin_config[] __initdata = { | ||
304 | /* keypad */ | ||
305 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
306 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
307 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
308 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
309 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
310 | GPIO103_KP_MKOUT_0, | ||
311 | GPIO104_KP_MKOUT_1, | ||
312 | GPIO105_KP_MKOUT_2, | ||
313 | GPIO106_KP_MKOUT_3, | ||
314 | GPIO107_KP_MKOUT_4, | ||
315 | GPIO108_KP_MKOUT_5, | ||
316 | }; | ||
317 | #endif | ||
318 | |||
319 | #ifdef CONFIG_MACH_EZX_A910 | ||
320 | static unsigned long a910_pin_config[] __initdata = { | ||
321 | /* keypad */ | ||
322 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
323 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
324 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
325 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
326 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
327 | GPIO103_KP_MKOUT_0, | ||
328 | GPIO104_KP_MKOUT_1, | ||
329 | GPIO105_KP_MKOUT_2, | ||
330 | GPIO106_KP_MKOUT_3, | ||
331 | GPIO107_KP_MKOUT_4, | ||
332 | GPIO108_KP_MKOUT_5, | ||
333 | |||
334 | /* WLAN */ | ||
335 | GPIO89_GPIO, /* RESET */ | ||
336 | GPIO33_GPIO, /* WAKEUP */ | ||
337 | GPIO94_GPIO | WAKEUP_ON_LEVEL_HIGH, /* HOSTWAKE */ | ||
338 | |||
339 | /* MMC CS */ | ||
340 | GPIO20_GPIO, | ||
341 | }; | ||
342 | #endif | ||
343 | |||
344 | #ifdef CONFIG_MACH_EZX_E2 | ||
345 | static unsigned long e2_pin_config[] __initdata = { | ||
346 | /* keypad */ | ||
347 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
348 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
349 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
350 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
351 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
352 | GPIO103_KP_MKOUT_0, | ||
353 | GPIO104_KP_MKOUT_1, | ||
354 | GPIO105_KP_MKOUT_2, | ||
355 | GPIO106_KP_MKOUT_3, | ||
356 | GPIO107_KP_MKOUT_4, | ||
357 | GPIO108_KP_MKOUT_5, | ||
115 | }; | 358 | }; |
359 | #endif | ||
360 | |||
361 | #ifdef CONFIG_MACH_EZX_E6 | ||
362 | static unsigned long e6_pin_config[] __initdata = { | ||
363 | /* keypad */ | ||
364 | GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH, | ||
365 | GPIO101_KP_MKIN_1 | WAKEUP_ON_LEVEL_HIGH, | ||
366 | GPIO102_KP_MKIN_2 | WAKEUP_ON_LEVEL_HIGH, | ||
367 | GPIO97_KP_MKIN_3 | WAKEUP_ON_LEVEL_HIGH, | ||
368 | GPIO98_KP_MKIN_4 | WAKEUP_ON_LEVEL_HIGH, | ||
369 | GPIO103_KP_MKOUT_0, | ||
370 | GPIO104_KP_MKOUT_1, | ||
371 | GPIO105_KP_MKOUT_2, | ||
372 | GPIO106_KP_MKOUT_3, | ||
373 | GPIO107_KP_MKOUT_4, | ||
374 | GPIO108_KP_MKOUT_5, | ||
375 | }; | ||
376 | #endif | ||
377 | |||
378 | /* KEYPAD */ | ||
379 | #ifdef CONFIG_MACH_EZX_A780 | ||
380 | static unsigned int a780_key_map[] = { | ||
381 | KEY(0, 0, KEY_SEND), | ||
382 | KEY(0, 1, KEY_BACK), | ||
383 | KEY(0, 2, KEY_END), | ||
384 | KEY(0, 3, KEY_PAGEUP), | ||
385 | KEY(0, 4, KEY_UP), | ||
386 | |||
387 | KEY(1, 0, KEY_NUMERIC_1), | ||
388 | KEY(1, 1, KEY_NUMERIC_2), | ||
389 | KEY(1, 2, KEY_NUMERIC_3), | ||
390 | KEY(1, 3, KEY_SELECT), | ||
391 | KEY(1, 4, KEY_KPENTER), | ||
392 | |||
393 | KEY(2, 0, KEY_NUMERIC_4), | ||
394 | KEY(2, 1, KEY_NUMERIC_5), | ||
395 | KEY(2, 2, KEY_NUMERIC_6), | ||
396 | KEY(2, 3, KEY_RECORD), | ||
397 | KEY(2, 4, KEY_LEFT), | ||
398 | |||
399 | KEY(3, 0, KEY_NUMERIC_7), | ||
400 | KEY(3, 1, KEY_NUMERIC_8), | ||
401 | KEY(3, 2, KEY_NUMERIC_9), | ||
402 | KEY(3, 3, KEY_HOME), | ||
403 | KEY(3, 4, KEY_RIGHT), | ||
404 | |||
405 | KEY(4, 0, KEY_NUMERIC_STAR), | ||
406 | KEY(4, 1, KEY_NUMERIC_0), | ||
407 | KEY(4, 2, KEY_NUMERIC_POUND), | ||
408 | KEY(4, 3, KEY_PAGEDOWN), | ||
409 | KEY(4, 4, KEY_DOWN), | ||
410 | }; | ||
411 | |||
412 | static struct pxa27x_keypad_platform_data a780_keypad_platform_data = { | ||
413 | .matrix_key_rows = 5, | ||
414 | .matrix_key_cols = 5, | ||
415 | .matrix_key_map = a780_key_map, | ||
416 | .matrix_key_map_size = ARRAY_SIZE(a780_key_map), | ||
417 | |||
418 | .direct_key_map = { KEY_CAMERA }, | ||
419 | .direct_key_num = 1, | ||
420 | |||
421 | .debounce_interval = 30, | ||
422 | }; | ||
423 | #endif /* CONFIG_MACH_EZX_A780 */ | ||
424 | |||
425 | #ifdef CONFIG_MACH_EZX_E680 | ||
426 | static unsigned int e680_key_map[] = { | ||
427 | KEY(0, 0, KEY_UP), | ||
428 | KEY(0, 1, KEY_RIGHT), | ||
429 | KEY(0, 2, KEY_RESERVED), | ||
430 | KEY(0, 3, KEY_SEND), | ||
431 | |||
432 | KEY(1, 0, KEY_DOWN), | ||
433 | KEY(1, 1, KEY_LEFT), | ||
434 | KEY(1, 2, KEY_PAGEUP), | ||
435 | KEY(1, 3, KEY_PAGEDOWN), | ||
436 | |||
437 | KEY(2, 0, KEY_RESERVED), | ||
438 | KEY(2, 1, KEY_RESERVED), | ||
439 | KEY(2, 2, KEY_RESERVED), | ||
440 | KEY(2, 3, KEY_KPENTER), | ||
441 | }; | ||
442 | |||
443 | static struct pxa27x_keypad_platform_data e680_keypad_platform_data = { | ||
444 | .matrix_key_rows = 3, | ||
445 | .matrix_key_cols = 4, | ||
446 | .matrix_key_map = e680_key_map, | ||
447 | .matrix_key_map_size = ARRAY_SIZE(e680_key_map), | ||
448 | |||
449 | .direct_key_map = { | ||
450 | KEY_CAMERA, | ||
451 | KEY_RESERVED, | ||
452 | KEY_RESERVED, | ||
453 | KEY_F1, | ||
454 | KEY_CANCEL, | ||
455 | KEY_F2, | ||
456 | }, | ||
457 | .direct_key_num = 6, | ||
458 | |||
459 | .debounce_interval = 30, | ||
460 | }; | ||
461 | #endif /* CONFIG_MACH_EZX_E680 */ | ||
462 | |||
463 | #ifdef CONFIG_MACH_EZX_A1200 | ||
464 | static unsigned int a1200_key_map[] = { | ||
465 | KEY(0, 0, KEY_RESERVED), | ||
466 | KEY(0, 1, KEY_RIGHT), | ||
467 | KEY(0, 2, KEY_PAGEDOWN), | ||
468 | KEY(0, 3, KEY_RESERVED), | ||
469 | KEY(0, 4, KEY_RESERVED), | ||
470 | KEY(0, 5, KEY_RESERVED), | ||
471 | |||
472 | KEY(1, 0, KEY_RESERVED), | ||
473 | KEY(1, 1, KEY_DOWN), | ||
474 | KEY(1, 2, KEY_CAMERA), | ||
475 | KEY(1, 3, KEY_RESERVED), | ||
476 | KEY(1, 4, KEY_RESERVED), | ||
477 | KEY(1, 5, KEY_RESERVED), | ||
478 | |||
479 | KEY(2, 0, KEY_RESERVED), | ||
480 | KEY(2, 1, KEY_KPENTER), | ||
481 | KEY(2, 2, KEY_RECORD), | ||
482 | KEY(2, 3, KEY_RESERVED), | ||
483 | KEY(2, 4, KEY_RESERVED), | ||
484 | KEY(2, 5, KEY_SELECT), | ||
485 | |||
486 | KEY(3, 0, KEY_RESERVED), | ||
487 | KEY(3, 1, KEY_UP), | ||
488 | KEY(3, 2, KEY_SEND), | ||
489 | KEY(3, 3, KEY_RESERVED), | ||
490 | KEY(3, 4, KEY_RESERVED), | ||
491 | KEY(3, 5, KEY_RESERVED), | ||
492 | |||
493 | KEY(4, 0, KEY_RESERVED), | ||
494 | KEY(4, 1, KEY_LEFT), | ||
495 | KEY(4, 2, KEY_PAGEUP), | ||
496 | KEY(4, 3, KEY_RESERVED), | ||
497 | KEY(4, 4, KEY_RESERVED), | ||
498 | KEY(4, 5, KEY_RESERVED), | ||
499 | }; | ||
500 | |||
501 | static struct pxa27x_keypad_platform_data a1200_keypad_platform_data = { | ||
502 | .matrix_key_rows = 5, | ||
503 | .matrix_key_cols = 6, | ||
504 | .matrix_key_map = a1200_key_map, | ||
505 | .matrix_key_map_size = ARRAY_SIZE(a1200_key_map), | ||
506 | |||
507 | .debounce_interval = 30, | ||
508 | }; | ||
509 | #endif /* CONFIG_MACH_EZX_A1200 */ | ||
510 | |||
511 | #ifdef CONFIG_MACH_EZX_E6 | ||
512 | static unsigned int e6_key_map[] = { | ||
513 | KEY(0, 0, KEY_RESERVED), | ||
514 | KEY(0, 1, KEY_RIGHT), | ||
515 | KEY(0, 2, KEY_PAGEDOWN), | ||
516 | KEY(0, 3, KEY_RESERVED), | ||
517 | KEY(0, 4, KEY_RESERVED), | ||
518 | KEY(0, 5, KEY_NEXTSONG), | ||
519 | |||
520 | KEY(1, 0, KEY_RESERVED), | ||
521 | KEY(1, 1, KEY_DOWN), | ||
522 | KEY(1, 2, KEY_PROG1), | ||
523 | KEY(1, 3, KEY_RESERVED), | ||
524 | KEY(1, 4, KEY_RESERVED), | ||
525 | KEY(1, 5, KEY_RESERVED), | ||
526 | |||
527 | KEY(2, 0, KEY_RESERVED), | ||
528 | KEY(2, 1, KEY_ENTER), | ||
529 | KEY(2, 2, KEY_CAMERA), | ||
530 | KEY(2, 3, KEY_RESERVED), | ||
531 | KEY(2, 4, KEY_RESERVED), | ||
532 | KEY(2, 5, KEY_WWW), | ||
533 | |||
534 | KEY(3, 0, KEY_RESERVED), | ||
535 | KEY(3, 1, KEY_UP), | ||
536 | KEY(3, 2, KEY_SEND), | ||
537 | KEY(3, 3, KEY_RESERVED), | ||
538 | KEY(3, 4, KEY_RESERVED), | ||
539 | KEY(3, 5, KEY_PLAYPAUSE), | ||
540 | |||
541 | KEY(4, 0, KEY_RESERVED), | ||
542 | KEY(4, 1, KEY_LEFT), | ||
543 | KEY(4, 2, KEY_PAGEUP), | ||
544 | KEY(4, 3, KEY_RESERVED), | ||
545 | KEY(4, 4, KEY_RESERVED), | ||
546 | KEY(4, 5, KEY_PREVIOUSSONG), | ||
547 | }; | ||
548 | |||
549 | static struct pxa27x_keypad_platform_data e6_keypad_platform_data = { | ||
550 | .matrix_key_rows = 5, | ||
551 | .matrix_key_cols = 6, | ||
552 | .matrix_key_map = e6_key_map, | ||
553 | .matrix_key_map_size = ARRAY_SIZE(e6_key_map), | ||
116 | 554 | ||
117 | static void __init ezx_init(void) | 555 | .debounce_interval = 30, |
556 | }; | ||
557 | #endif /* CONFIG_MACH_EZX_E6 */ | ||
558 | |||
559 | #ifdef CONFIG_MACH_EZX_A910 | ||
560 | static unsigned int a910_key_map[] = { | ||
561 | KEY(0, 0, KEY_NUMERIC_6), | ||
562 | KEY(0, 1, KEY_RIGHT), | ||
563 | KEY(0, 2, KEY_PAGEDOWN), | ||
564 | KEY(0, 3, KEY_KPENTER), | ||
565 | KEY(0, 4, KEY_NUMERIC_5), | ||
566 | KEY(0, 5, KEY_CAMERA), | ||
567 | |||
568 | KEY(1, 0, KEY_NUMERIC_8), | ||
569 | KEY(1, 1, KEY_DOWN), | ||
570 | KEY(1, 2, KEY_RESERVED), | ||
571 | KEY(1, 3, KEY_F1), /* Left SoftKey */ | ||
572 | KEY(1, 4, KEY_NUMERIC_STAR), | ||
573 | KEY(1, 5, KEY_RESERVED), | ||
574 | |||
575 | KEY(2, 0, KEY_NUMERIC_7), | ||
576 | KEY(2, 1, KEY_NUMERIC_9), | ||
577 | KEY(2, 2, KEY_RECORD), | ||
578 | KEY(2, 3, KEY_F2), /* Right SoftKey */ | ||
579 | KEY(2, 4, KEY_BACK), | ||
580 | KEY(2, 5, KEY_SELECT), | ||
581 | |||
582 | KEY(3, 0, KEY_NUMERIC_2), | ||
583 | KEY(3, 1, KEY_UP), | ||
584 | KEY(3, 2, KEY_SEND), | ||
585 | KEY(3, 3, KEY_NUMERIC_0), | ||
586 | KEY(3, 4, KEY_NUMERIC_1), | ||
587 | KEY(3, 5, KEY_RECORD), | ||
588 | |||
589 | KEY(4, 0, KEY_NUMERIC_4), | ||
590 | KEY(4, 1, KEY_LEFT), | ||
591 | KEY(4, 2, KEY_PAGEUP), | ||
592 | KEY(4, 3, KEY_NUMERIC_POUND), | ||
593 | KEY(4, 4, KEY_NUMERIC_3), | ||
594 | KEY(4, 5, KEY_RESERVED), | ||
595 | }; | ||
596 | |||
597 | static struct pxa27x_keypad_platform_data a910_keypad_platform_data = { | ||
598 | .matrix_key_rows = 5, | ||
599 | .matrix_key_cols = 6, | ||
600 | .matrix_key_map = a910_key_map, | ||
601 | .matrix_key_map_size = ARRAY_SIZE(a910_key_map), | ||
602 | |||
603 | .debounce_interval = 30, | ||
604 | }; | ||
605 | #endif /* CONFIG_MACH_EZX_A910 */ | ||
606 | |||
607 | #ifdef CONFIG_MACH_EZX_E2 | ||
608 | static unsigned int e2_key_map[] = { | ||
609 | KEY(0, 0, KEY_NUMERIC_6), | ||
610 | KEY(0, 1, KEY_RIGHT), | ||
611 | KEY(0, 2, KEY_NUMERIC_9), | ||
612 | KEY(0, 3, KEY_NEXTSONG), | ||
613 | KEY(0, 4, KEY_NUMERIC_5), | ||
614 | KEY(0, 5, KEY_F1), /* Left SoftKey */ | ||
615 | |||
616 | KEY(1, 0, KEY_NUMERIC_8), | ||
617 | KEY(1, 1, KEY_DOWN), | ||
618 | KEY(1, 2, KEY_RESERVED), | ||
619 | KEY(1, 3, KEY_PAGEUP), | ||
620 | KEY(1, 4, KEY_NUMERIC_STAR), | ||
621 | KEY(1, 5, KEY_F2), /* Right SoftKey */ | ||
622 | |||
623 | KEY(2, 0, KEY_NUMERIC_7), | ||
624 | KEY(2, 1, KEY_KPENTER), | ||
625 | KEY(2, 2, KEY_RECORD), | ||
626 | KEY(2, 3, KEY_PAGEDOWN), | ||
627 | KEY(2, 4, KEY_BACK), | ||
628 | KEY(2, 5, KEY_NUMERIC_0), | ||
629 | |||
630 | KEY(3, 0, KEY_NUMERIC_2), | ||
631 | KEY(3, 1, KEY_UP), | ||
632 | KEY(3, 2, KEY_SEND), | ||
633 | KEY(3, 3, KEY_PLAYPAUSE), | ||
634 | KEY(3, 4, KEY_NUMERIC_1), | ||
635 | KEY(3, 5, KEY_SOUND), /* Music SoftKey */ | ||
636 | |||
637 | KEY(4, 0, KEY_NUMERIC_4), | ||
638 | KEY(4, 1, KEY_LEFT), | ||
639 | KEY(4, 2, KEY_NUMERIC_POUND), | ||
640 | KEY(4, 3, KEY_PREVIOUSSONG), | ||
641 | KEY(4, 4, KEY_NUMERIC_3), | ||
642 | KEY(4, 5, KEY_RESERVED), | ||
643 | }; | ||
644 | |||
645 | static struct pxa27x_keypad_platform_data e2_keypad_platform_data = { | ||
646 | .matrix_key_rows = 5, | ||
647 | .matrix_key_cols = 6, | ||
648 | .matrix_key_map = e2_key_map, | ||
649 | .matrix_key_map_size = ARRAY_SIZE(e2_key_map), | ||
650 | |||
651 | .debounce_interval = 30, | ||
652 | }; | ||
653 | #endif /* CONFIG_MACH_EZX_E2 */ | ||
654 | |||
655 | #ifdef CONFIG_MACH_EZX_A780 | ||
656 | static void __init a780_init(void) | ||
118 | { | 657 | { |
119 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | 658 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); |
659 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); | ||
660 | pxa2xx_mfp_config(ARRAY_AND_SIZE(a780_pin_config)); | ||
661 | |||
120 | pxa_set_i2c_info(NULL); | 662 | pxa_set_i2c_info(NULL); |
121 | if (machine_is_ezx_a780() || machine_is_ezx_e680()) | ||
122 | set_pxa_fb_info(&ezx_fb_info_1); | ||
123 | else | ||
124 | set_pxa_fb_info(&ezx_fb_info_2); | ||
125 | 663 | ||
126 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 664 | set_pxa_fb_info(&ezx_fb_info_1); |
127 | } | ||
128 | 665 | ||
129 | static void __init ezx_fixup(struct machine_desc *desc, struct tag *tags, | 666 | pxa_set_keypad_info(&a780_keypad_platform_data); |
130 | char **cmdline, struct meminfo *mi) | 667 | |
131 | { | 668 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
132 | /* We have two ram chips. First one with 32MB at 0xA0000000 and a second | ||
133 | * 16MB one at 0xAC000000 | ||
134 | */ | ||
135 | mi->nr_banks = 2; | ||
136 | mi->bank[0].start = 0xa0000000; | ||
137 | mi->bank[0].node = 0; | ||
138 | mi->bank[0].size = (32*1024*1024); | ||
139 | mi->bank[1].start = 0xac000000; | ||
140 | mi->bank[1].node = 1; | ||
141 | mi->bank[1].size = (16*1024*1024); | ||
142 | } | 669 | } |
143 | 670 | ||
144 | #ifdef CONFIG_MACH_EZX_A780 | ||
145 | MACHINE_START(EZX_A780, "Motorola EZX A780") | 671 | MACHINE_START(EZX_A780, "Motorola EZX A780") |
146 | .phys_io = 0x40000000, | 672 | .phys_io = 0x40000000, |
147 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 673 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
148 | .fixup = ezx_fixup, | ||
149 | .boot_params = 0xa0000100, | 674 | .boot_params = 0xa0000100, |
150 | .map_io = pxa_map_io, | 675 | .map_io = pxa_map_io, |
151 | .init_irq = pxa27x_init_irq, | 676 | .init_irq = pxa27x_init_irq, |
152 | .timer = &pxa_timer, | 677 | .timer = &pxa_timer, |
153 | .init_machine = &ezx_init, | 678 | .init_machine = a780_init, |
154 | MACHINE_END | 679 | MACHINE_END |
155 | #endif | 680 | #endif |
156 | 681 | ||
157 | #ifdef CONFIG_MACH_EZX_E680 | 682 | #ifdef CONFIG_MACH_EZX_E680 |
683 | static struct i2c_board_info __initdata e680_i2c_board_info[] = { | ||
684 | { I2C_BOARD_INFO("tea5767", 0x81) }, | ||
685 | }; | ||
686 | |||
687 | static void __init e680_init(void) | ||
688 | { | ||
689 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
690 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen1_pin_config)); | ||
691 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e680_pin_config)); | ||
692 | |||
693 | pxa_set_i2c_info(NULL); | ||
694 | i2c_register_board_info(0, ARRAY_AND_SIZE(e680_i2c_board_info)); | ||
695 | |||
696 | set_pxa_fb_info(&ezx_fb_info_1); | ||
697 | |||
698 | pxa_set_keypad_info(&e680_keypad_platform_data); | ||
699 | |||
700 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
701 | } | ||
702 | |||
158 | MACHINE_START(EZX_E680, "Motorola EZX E680") | 703 | MACHINE_START(EZX_E680, "Motorola EZX E680") |
159 | .phys_io = 0x40000000, | 704 | .phys_io = 0x40000000, |
160 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 705 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
161 | .fixup = ezx_fixup, | ||
162 | .boot_params = 0xa0000100, | 706 | .boot_params = 0xa0000100, |
163 | .map_io = pxa_map_io, | 707 | .map_io = pxa_map_io, |
164 | .init_irq = pxa27x_init_irq, | 708 | .init_irq = pxa27x_init_irq, |
165 | .timer = &pxa_timer, | 709 | .timer = &pxa_timer, |
166 | .init_machine = &ezx_init, | 710 | .init_machine = e680_init, |
167 | MACHINE_END | 711 | MACHINE_END |
168 | #endif | 712 | #endif |
169 | 713 | ||
170 | #ifdef CONFIG_MACH_EZX_A1200 | 714 | #ifdef CONFIG_MACH_EZX_A1200 |
715 | static struct i2c_board_info __initdata a1200_i2c_board_info[] = { | ||
716 | { I2C_BOARD_INFO("tea5767", 0x81) }, | ||
717 | }; | ||
718 | |||
719 | static void __init a1200_init(void) | ||
720 | { | ||
721 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
722 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); | ||
723 | pxa2xx_mfp_config(ARRAY_AND_SIZE(a1200_pin_config)); | ||
724 | |||
725 | pxa_set_i2c_info(NULL); | ||
726 | i2c_register_board_info(0, ARRAY_AND_SIZE(a1200_i2c_board_info)); | ||
727 | |||
728 | set_pxa_fb_info(&ezx_fb_info_2); | ||
729 | |||
730 | pxa_set_keypad_info(&a1200_keypad_platform_data); | ||
731 | |||
732 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
733 | } | ||
734 | |||
171 | MACHINE_START(EZX_A1200, "Motorola EZX A1200") | 735 | MACHINE_START(EZX_A1200, "Motorola EZX A1200") |
172 | .phys_io = 0x40000000, | 736 | .phys_io = 0x40000000, |
173 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 737 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
174 | .fixup = ezx_fixup, | ||
175 | .boot_params = 0xa0000100, | 738 | .boot_params = 0xa0000100, |
176 | .map_io = pxa_map_io, | 739 | .map_io = pxa_map_io, |
177 | .init_irq = pxa27x_init_irq, | 740 | .init_irq = pxa27x_init_irq, |
178 | .timer = &pxa_timer, | 741 | .timer = &pxa_timer, |
179 | .init_machine = &ezx_init, | 742 | .init_machine = a1200_init, |
180 | MACHINE_END | 743 | MACHINE_END |
181 | #endif | 744 | #endif |
182 | 745 | ||
183 | #ifdef CONFIG_MACH_EZX_A910 | 746 | #ifdef CONFIG_MACH_EZX_A910 |
747 | static void __init a910_init(void) | ||
748 | { | ||
749 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
750 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); | ||
751 | pxa2xx_mfp_config(ARRAY_AND_SIZE(a910_pin_config)); | ||
752 | |||
753 | pxa_set_i2c_info(NULL); | ||
754 | |||
755 | set_pxa_fb_info(&ezx_fb_info_2); | ||
756 | |||
757 | pxa_set_keypad_info(&a910_keypad_platform_data); | ||
758 | |||
759 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
760 | } | ||
761 | |||
184 | MACHINE_START(EZX_A910, "Motorola EZX A910") | 762 | MACHINE_START(EZX_A910, "Motorola EZX A910") |
185 | .phys_io = 0x40000000, | 763 | .phys_io = 0x40000000, |
186 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 764 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
187 | .fixup = ezx_fixup, | ||
188 | .boot_params = 0xa0000100, | 765 | .boot_params = 0xa0000100, |
189 | .map_io = pxa_map_io, | 766 | .map_io = pxa_map_io, |
190 | .init_irq = pxa27x_init_irq, | 767 | .init_irq = pxa27x_init_irq, |
191 | .timer = &pxa_timer, | 768 | .timer = &pxa_timer, |
192 | .init_machine = &ezx_init, | 769 | .init_machine = a910_init, |
193 | MACHINE_END | 770 | MACHINE_END |
194 | #endif | 771 | #endif |
195 | 772 | ||
196 | #ifdef CONFIG_MACH_EZX_E6 | 773 | #ifdef CONFIG_MACH_EZX_E6 |
774 | static struct i2c_board_info __initdata e6_i2c_board_info[] = { | ||
775 | { I2C_BOARD_INFO("tea5767", 0x81) }, | ||
776 | }; | ||
777 | |||
778 | static void __init e6_init(void) | ||
779 | { | ||
780 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
781 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); | ||
782 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e6_pin_config)); | ||
783 | |||
784 | pxa_set_i2c_info(NULL); | ||
785 | i2c_register_board_info(0, ARRAY_AND_SIZE(e6_i2c_board_info)); | ||
786 | |||
787 | set_pxa_fb_info(&ezx_fb_info_2); | ||
788 | |||
789 | pxa_set_keypad_info(&e6_keypad_platform_data); | ||
790 | |||
791 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
792 | } | ||
793 | |||
197 | MACHINE_START(EZX_E6, "Motorola EZX E6") | 794 | MACHINE_START(EZX_E6, "Motorola EZX E6") |
198 | .phys_io = 0x40000000, | 795 | .phys_io = 0x40000000, |
199 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 796 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
200 | .fixup = ezx_fixup, | ||
201 | .boot_params = 0xa0000100, | 797 | .boot_params = 0xa0000100, |
202 | .map_io = pxa_map_io, | 798 | .map_io = pxa_map_io, |
203 | .init_irq = pxa27x_init_irq, | 799 | .init_irq = pxa27x_init_irq, |
204 | .timer = &pxa_timer, | 800 | .timer = &pxa_timer, |
205 | .init_machine = &ezx_init, | 801 | .init_machine = e6_init, |
206 | MACHINE_END | 802 | MACHINE_END |
207 | #endif | 803 | #endif |
208 | 804 | ||
209 | #ifdef CONFIG_MACH_EZX_E2 | 805 | #ifdef CONFIG_MACH_EZX_E2 |
806 | static struct i2c_board_info __initdata e2_i2c_board_info[] = { | ||
807 | { I2C_BOARD_INFO("tea5767", 0x81) }, | ||
808 | }; | ||
809 | |||
810 | static void __init e2_init(void) | ||
811 | { | ||
812 | pxa2xx_mfp_config(ARRAY_AND_SIZE(ezx_pin_config)); | ||
813 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gen2_pin_config)); | ||
814 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e2_pin_config)); | ||
815 | |||
816 | pxa_set_i2c_info(NULL); | ||
817 | i2c_register_board_info(0, ARRAY_AND_SIZE(e2_i2c_board_info)); | ||
818 | |||
819 | set_pxa_fb_info(&ezx_fb_info_2); | ||
820 | |||
821 | pxa_set_keypad_info(&e2_keypad_platform_data); | ||
822 | |||
823 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
824 | } | ||
825 | |||
210 | MACHINE_START(EZX_E2, "Motorola EZX E2") | 826 | MACHINE_START(EZX_E2, "Motorola EZX E2") |
211 | .phys_io = 0x40000000, | 827 | .phys_io = 0x40000000, |
212 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 828 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
213 | .fixup = ezx_fixup, | ||
214 | .boot_params = 0xa0000100, | 829 | .boot_params = 0xa0000100, |
215 | .map_io = pxa_map_io, | 830 | .map_io = pxa_map_io, |
216 | .init_irq = pxa27x_init_irq, | 831 | .init_irq = pxa27x_init_irq, |
217 | .timer = &pxa_timer, | 832 | .timer = &pxa_timer, |
218 | .init_machine = &ezx_init, | 833 | .init_machine = e2_init, |
219 | MACHINE_END | 834 | MACHINE_END |
220 | #endif | 835 | #endif |
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c index 85ed0b33331f..0ccc91c92c44 100644 --- a/arch/arm/mach-pxa/generic.c +++ b/arch/arm/mach-pxa/generic.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/system.h> | 24 | #include <asm/system.h> |
25 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
26 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
27 | #include <asm/mach-types.h> | ||
27 | 28 | ||
28 | #include <mach/pxa-regs.h> | 29 | #include <mach/pxa-regs.h> |
29 | #include <mach/reset.h> | 30 | #include <mach/reset.h> |
@@ -39,6 +40,21 @@ void clear_reset_status(unsigned int mask) | |||
39 | pxa3xx_clear_reset_status(mask); | 40 | pxa3xx_clear_reset_status(mask); |
40 | } | 41 | } |
41 | 42 | ||
43 | unsigned long get_clock_tick_rate(void) | ||
44 | { | ||
45 | unsigned long clock_tick_rate; | ||
46 | |||
47 | if (cpu_is_pxa25x()) | ||
48 | clock_tick_rate = 3686400; | ||
49 | else if (machine_is_mainstone()) | ||
50 | clock_tick_rate = 3249600; | ||
51 | else | ||
52 | clock_tick_rate = 3250000; | ||
53 | |||
54 | return clock_tick_rate; | ||
55 | } | ||
56 | EXPORT_SYMBOL(get_clock_tick_rate); | ||
57 | |||
42 | /* | 58 | /* |
43 | * Get the clock frequency as reflected by CCCR and the turbo flag. | 59 | * Get the clock frequency as reflected by CCCR and the turbo flag. |
44 | * We assume these values have been applied via a fcs. | 60 | * We assume these values have been applied via a fcs. |
diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c index 14930cf8be7b..5fec1e479cb3 100644 --- a/arch/arm/mach-pxa/gpio.c +++ b/arch/arm/mach-pxa/gpio.c | |||
@@ -25,6 +25,18 @@ | |||
25 | 25 | ||
26 | #include "generic.h" | 26 | #include "generic.h" |
27 | 27 | ||
28 | #define GPIO0_BASE ((void __iomem *)io_p2v(0x40E00000)) | ||
29 | #define GPIO1_BASE ((void __iomem *)io_p2v(0x40E00004)) | ||
30 | #define GPIO2_BASE ((void __iomem *)io_p2v(0x40E00008)) | ||
31 | #define GPIO3_BASE ((void __iomem *)io_p2v(0x40E00100)) | ||
32 | |||
33 | #define GPLR_OFFSET 0x00 | ||
34 | #define GPDR_OFFSET 0x0C | ||
35 | #define GPSR_OFFSET 0x18 | ||
36 | #define GPCR_OFFSET 0x24 | ||
37 | #define GRER_OFFSET 0x30 | ||
38 | #define GFER_OFFSET 0x3C | ||
39 | #define GEDR_OFFSET 0x48 | ||
28 | 40 | ||
29 | struct pxa_gpio_chip { | 41 | struct pxa_gpio_chip { |
30 | struct gpio_chip chip; | 42 | struct gpio_chip chip; |
@@ -33,6 +45,18 @@ struct pxa_gpio_chip { | |||
33 | 45 | ||
34 | int pxa_last_gpio; | 46 | int pxa_last_gpio; |
35 | 47 | ||
48 | #ifdef CONFIG_CPU_PXA26x | ||
49 | /* GPIO86/87/88/89 on PXA26x have their direction bits in GPDR2 inverted, | ||
50 | * as well as their Alternate Function value being '1' for GPIO in GAFRx. | ||
51 | */ | ||
52 | static int __gpio_is_inverted(unsigned gpio) | ||
53 | { | ||
54 | return cpu_is_pxa25x() && gpio > 85; | ||
55 | } | ||
56 | #else | ||
57 | #define __gpio_is_inverted(gpio) (0) | ||
58 | #endif | ||
59 | |||
36 | /* | 60 | /* |
37 | * Configure pins for GPIO or other functions | 61 | * Configure pins for GPIO or other functions |
38 | */ | 62 | */ |
@@ -75,7 +99,10 @@ static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | |||
75 | gpdr = pxa->regbase + GPDR_OFFSET; | 99 | gpdr = pxa->regbase + GPDR_OFFSET; |
76 | local_irq_save(flags); | 100 | local_irq_save(flags); |
77 | value = __raw_readl(gpdr); | 101 | value = __raw_readl(gpdr); |
78 | value &= ~mask; | 102 | if (__gpio_is_inverted(chip->base + offset)) |
103 | value |= mask; | ||
104 | else | ||
105 | value &= ~mask; | ||
79 | __raw_writel(value, gpdr); | 106 | __raw_writel(value, gpdr); |
80 | local_irq_restore(flags); | 107 | local_irq_restore(flags); |
81 | 108 | ||
@@ -97,7 +124,10 @@ static int pxa_gpio_direction_output(struct gpio_chip *chip, | |||
97 | gpdr = pxa->regbase + GPDR_OFFSET; | 124 | gpdr = pxa->regbase + GPDR_OFFSET; |
98 | local_irq_save(flags); | 125 | local_irq_save(flags); |
99 | tmp = __raw_readl(gpdr); | 126 | tmp = __raw_readl(gpdr); |
100 | tmp |= mask; | 127 | if (__gpio_is_inverted(chip->base + offset)) |
128 | tmp &= ~mask; | ||
129 | else | ||
130 | tmp |= mask; | ||
101 | __raw_writel(tmp, gpdr); | 131 | __raw_writel(tmp, gpdr); |
102 | local_irq_restore(flags); | 132 | local_irq_restore(flags); |
103 | 133 | ||
@@ -173,10 +203,17 @@ static unsigned long GPIO_IRQ_mask[4]; | |||
173 | */ | 203 | */ |
174 | static int __gpio_is_occupied(unsigned gpio) | 204 | static int __gpio_is_occupied(unsigned gpio) |
175 | { | 205 | { |
176 | if (cpu_is_pxa25x() || cpu_is_pxa27x()) | 206 | if (cpu_is_pxa27x() || cpu_is_pxa25x()) { |
177 | return GAFR(gpio) & (0x3 << (((gpio) & 0xf) * 2)); | 207 | int af = (GAFR(gpio) >> ((gpio & 0xf) * 2)) & 0x3; |
178 | else | 208 | int dir = GPDR(gpio) & GPIO_bit(gpio); |
179 | return 0; | 209 | |
210 | if (__gpio_is_inverted(gpio)) | ||
211 | return af != 1 || dir == 0; | ||
212 | else | ||
213 | return af != 0 || dir != 0; | ||
214 | } | ||
215 | |||
216 | return 0; | ||
180 | } | 217 | } |
181 | 218 | ||
182 | static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | 219 | static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) |
@@ -190,9 +227,8 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | |||
190 | /* Don't mess with enabled GPIOs using preconfigured edges or | 227 | /* Don't mess with enabled GPIOs using preconfigured edges or |
191 | * GPIOs set to alternate function or to output during probe | 228 | * GPIOs set to alternate function or to output during probe |
192 | */ | 229 | */ |
193 | if ((GPIO_IRQ_rising_edge[idx] | | 230 | if ((GPIO_IRQ_rising_edge[idx] & GPIO_bit(gpio)) || |
194 | GPIO_IRQ_falling_edge[idx] | | 231 | (GPIO_IRQ_falling_edge[idx] & GPIO_bit(gpio))) |
195 | GPDR(gpio)) & GPIO_bit(gpio)) | ||
196 | return 0; | 232 | return 0; |
197 | 233 | ||
198 | if (__gpio_is_occupied(gpio)) | 234 | if (__gpio_is_occupied(gpio)) |
@@ -201,7 +237,10 @@ static int pxa_gpio_irq_type(unsigned int irq, unsigned int type) | |||
201 | type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; | 237 | type = IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING; |
202 | } | 238 | } |
203 | 239 | ||
204 | GPDR(gpio) &= ~GPIO_bit(gpio); | 240 | if (__gpio_is_inverted(gpio)) |
241 | GPDR(gpio) |= GPIO_bit(gpio); | ||
242 | else | ||
243 | GPDR(gpio) &= ~GPIO_bit(gpio); | ||
205 | 244 | ||
206 | if (type & IRQ_TYPE_EDGE_RISING) | 245 | if (type & IRQ_TYPE_EDGE_RISING) |
207 | __set_bit(gpio, GPIO_IRQ_rising_edge); | 246 | __set_bit(gpio, GPIO_IRQ_rising_edge); |
diff --git a/arch/arm/mach-pxa/gumstix.c b/arch/arm/mach-pxa/gumstix.c index d8962a0fb98d..e296ce11658c 100644 --- a/arch/arm/mach-pxa/gumstix.c +++ b/arch/arm/mach-pxa/gumstix.c | |||
@@ -184,15 +184,22 @@ static unsigned long gumstix_pin_config[] __initdata = { | |||
184 | GPIO6_MMC_CLK, | 184 | GPIO6_MMC_CLK, |
185 | GPIO53_MMC_CLK, | 185 | GPIO53_MMC_CLK, |
186 | GPIO8_MMC_CS0, | 186 | GPIO8_MMC_CS0, |
187 | /* these are used by AM200EPD */ | ||
188 | GPIO51_GPIO, | ||
189 | GPIO49_GPIO, | ||
190 | GPIO48_GPIO, | ||
191 | GPIO32_GPIO, | ||
192 | GPIO17_GPIO, | ||
193 | GPIO16_GPIO, | ||
194 | }; | 187 | }; |
195 | 188 | ||
189 | int __attribute__((weak)) am200_init(void) | ||
190 | { | ||
191 | return 0; | ||
192 | } | ||
193 | |||
194 | static void __init carrier_board_init(void) | ||
195 | { | ||
196 | /* | ||
197 | * put carrier/expansion board init here if | ||
198 | * they cannot be detected programatically | ||
199 | */ | ||
200 | am200_init(); | ||
201 | } | ||
202 | |||
196 | static void __init gumstix_init(void) | 203 | static void __init gumstix_init(void) |
197 | { | 204 | { |
198 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config)); | 205 | pxa2xx_mfp_config(ARRAY_AND_SIZE(gumstix_pin_config)); |
@@ -201,6 +208,7 @@ static void __init gumstix_init(void) | |||
201 | gumstix_udc_init(); | 208 | gumstix_udc_init(); |
202 | gumstix_mmc_init(); | 209 | gumstix_mmc_init(); |
203 | (void) platform_add_devices(devices, ARRAY_SIZE(devices)); | 210 | (void) platform_add_devices(devices, ARRAY_SIZE(devices)); |
211 | carrier_board_init(); | ||
204 | } | 212 | } |
205 | 213 | ||
206 | MACHINE_START(GUMSTIX, "Gumstix") | 214 | MACHINE_START(GUMSTIX, "Gumstix") |
diff --git a/arch/arm/mach-pxa/h5000.c b/arch/arm/mach-pxa/h5000.c new file mode 100644 index 000000000000..da6e4422c0f3 --- /dev/null +++ b/arch/arm/mach-pxa/h5000.c | |||
@@ -0,0 +1,200 @@ | |||
1 | /* | ||
2 | * Hardware definitions for HP iPAQ h5xxx Handheld Computers | ||
3 | * | ||
4 | * Copyright 2000-2003 Hewlett-Packard Company. | ||
5 | * Copyright 2002 Jamey Hicks <jamey.hicks@hp.com> | ||
6 | * Copyright 2004-2005 Phil Blundell <pb@handhelds.org> | ||
7 | * Copyright 2007-2008 Anton Vorontsov <cbouatmailru@gmail.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, | ||
15 | * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS | ||
16 | * FITNESS FOR ANY PARTICULAR PURPOSE. | ||
17 | * | ||
18 | * Author: Jamey Hicks. | ||
19 | */ | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/init.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/mtd/mtd.h> | ||
25 | #include <linux/mtd/partitions.h> | ||
26 | #include <linux/mtd/physmap.h> | ||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | #include <asm/mach/map.h> | ||
30 | #include <mach/h5000.h> | ||
31 | #include <mach/pxa-regs.h> | ||
32 | #include <mach/pxa2xx-regs.h> | ||
33 | #include <mach/mfp-pxa25x.h> | ||
34 | #include <mach/udc.h> | ||
35 | #include "generic.h" | ||
36 | |||
37 | /* | ||
38 | * Flash | ||
39 | */ | ||
40 | |||
41 | static struct mtd_partition h5000_flash0_partitions[] = { | ||
42 | { | ||
43 | .name = "bootldr", | ||
44 | .size = 0x00040000, | ||
45 | .offset = 0, | ||
46 | .mask_flags = MTD_WRITEABLE, | ||
47 | }, | ||
48 | { | ||
49 | .name = "root", | ||
50 | .size = MTDPART_SIZ_FULL, | ||
51 | .offset = MTDPART_OFS_APPEND, | ||
52 | }, | ||
53 | }; | ||
54 | |||
55 | static struct mtd_partition h5000_flash1_partitions[] = { | ||
56 | { | ||
57 | .name = "second root", | ||
58 | .size = SZ_16M - 0x00040000, | ||
59 | .offset = 0, | ||
60 | }, | ||
61 | { | ||
62 | .name = "asset", | ||
63 | .size = MTDPART_SIZ_FULL, | ||
64 | .offset = MTDPART_OFS_APPEND, | ||
65 | .mask_flags = MTD_WRITEABLE, | ||
66 | }, | ||
67 | }; | ||
68 | |||
69 | static struct physmap_flash_data h5000_flash0_data = { | ||
70 | .width = 4, | ||
71 | .parts = h5000_flash0_partitions, | ||
72 | .nr_parts = ARRAY_SIZE(h5000_flash0_partitions), | ||
73 | }; | ||
74 | |||
75 | static struct physmap_flash_data h5000_flash1_data = { | ||
76 | .width = 4, | ||
77 | .parts = h5000_flash1_partitions, | ||
78 | .nr_parts = ARRAY_SIZE(h5000_flash1_partitions), | ||
79 | }; | ||
80 | |||
81 | static struct resource h5000_flash0_resources = { | ||
82 | .start = PXA_CS0_PHYS, | ||
83 | .end = PXA_CS0_PHYS + SZ_32M - 1, | ||
84 | .flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT, | ||
85 | }; | ||
86 | |||
87 | static struct resource h5000_flash1_resources = { | ||
88 | .start = PXA_CS0_PHYS + SZ_32M, | ||
89 | .end = PXA_CS0_PHYS + SZ_32M + SZ_16M - 1, | ||
90 | .flags = IORESOURCE_MEM | IORESOURCE_MEM_32BIT, | ||
91 | }; | ||
92 | |||
93 | static struct platform_device h5000_flash[] = { | ||
94 | { | ||
95 | .name = "physmap-flash", | ||
96 | .id = 0, | ||
97 | .resource = &h5000_flash0_resources, | ||
98 | .num_resources = 1, | ||
99 | .dev = { | ||
100 | .platform_data = &h5000_flash0_data, | ||
101 | }, | ||
102 | }, | ||
103 | { | ||
104 | .name = "physmap-flash", | ||
105 | .id = 1, | ||
106 | .resource = &h5000_flash1_resources, | ||
107 | .num_resources = 1, | ||
108 | .dev = { | ||
109 | .platform_data = &h5000_flash1_data, | ||
110 | }, | ||
111 | }, | ||
112 | }; | ||
113 | |||
114 | /* | ||
115 | * USB Device Controller | ||
116 | */ | ||
117 | |||
118 | static struct pxa2xx_udc_mach_info h5000_udc_mach_info __initdata = { | ||
119 | .gpio_pullup = H5000_GPIO_USB_PULLUP, | ||
120 | }; | ||
121 | |||
122 | /* | ||
123 | * GPIO setup | ||
124 | */ | ||
125 | |||
126 | static unsigned long h5000_pin_config[] __initdata = { | ||
127 | /* Crystal and Clock Signals */ | ||
128 | GPIO12_32KHz, | ||
129 | |||
130 | /* SDRAM and Static Memory I/O Signals */ | ||
131 | GPIO15_nCS_1, | ||
132 | GPIO78_nCS_2, | ||
133 | GPIO79_nCS_3, | ||
134 | GPIO80_nCS_4, | ||
135 | |||
136 | /* FFUART */ | ||
137 | GPIO34_FFUART_RXD, | ||
138 | GPIO35_FFUART_CTS, | ||
139 | GPIO36_FFUART_DCD, | ||
140 | GPIO37_FFUART_DSR, | ||
141 | GPIO38_FFUART_RI, | ||
142 | GPIO39_FFUART_TXD, | ||
143 | GPIO40_FFUART_DTR, | ||
144 | GPIO41_FFUART_RTS, | ||
145 | |||
146 | /* BTUART */ | ||
147 | GPIO42_BTUART_RXD, | ||
148 | GPIO43_BTUART_TXD, | ||
149 | GPIO44_BTUART_CTS, | ||
150 | GPIO45_BTUART_RTS, | ||
151 | |||
152 | /* SSP1 */ | ||
153 | GPIO23_SSP1_SCLK, | ||
154 | GPIO25_SSP1_TXD, | ||
155 | GPIO26_SSP1_RXD, | ||
156 | }; | ||
157 | |||
158 | /* | ||
159 | * Localbus setup: | ||
160 | * CS0: Flash; | ||
161 | * CS1: MediaQ chip, select 16-bit bus and vlio; | ||
162 | * CS5: SAMCOP. | ||
163 | */ | ||
164 | |||
165 | static void fix_msc(void) | ||
166 | { | ||
167 | MSC0 = 0x129c24f2; | ||
168 | MSC1 = 0x7ff424fa; | ||
169 | MSC2 = 0x7ff47ff4; | ||
170 | |||
171 | MDREFR |= 0x02080000; | ||
172 | } | ||
173 | |||
174 | /* | ||
175 | * Platform devices | ||
176 | */ | ||
177 | |||
178 | static struct platform_device *devices[] __initdata = { | ||
179 | &h5000_flash[0], | ||
180 | &h5000_flash[1], | ||
181 | }; | ||
182 | |||
183 | static void __init h5000_init(void) | ||
184 | { | ||
185 | fix_msc(); | ||
186 | |||
187 | pxa2xx_mfp_config(ARRAY_AND_SIZE(h5000_pin_config)); | ||
188 | pxa_set_udc_info(&h5000_udc_mach_info); | ||
189 | platform_add_devices(ARRAY_AND_SIZE(devices)); | ||
190 | } | ||
191 | |||
192 | MACHINE_START(H5400, "HP iPAQ H5000") | ||
193 | .phys_io = 0x40000000, | ||
194 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
195 | .boot_params = 0xa0000100, | ||
196 | .map_io = pxa_map_io, | ||
197 | .init_irq = pxa25x_init_irq, | ||
198 | .timer = &pxa_timer, | ||
199 | .init_machine = h5000_init, | ||
200 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c new file mode 100644 index 000000000000..364c5e271330 --- /dev/null +++ b/arch/arm/mach-pxa/imote2.c | |||
@@ -0,0 +1,575 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-pxa/imote2.c | ||
3 | * | ||
4 | * Author: Ed C. Epp | ||
5 | * Created: Nov 05, 2002 | ||
6 | * Copyright: Intel Corp. | ||
7 | * | ||
8 | * Modified 2008: Jonathan Cameron | ||
9 | * | ||
10 | * The Imote2 is a wireless sensor node platform sold | ||
11 | * by Crossbow (www.xbow.com). | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/device.h> | ||
16 | #include <linux/mtd/mtd.h> | ||
17 | #include <linux/mtd/partitions.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/regulator/machine.h> | ||
20 | #include <linux/gpio.h> | ||
21 | #include <linux/leds.h> | ||
22 | #include <linux/spi/spi.h> | ||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/mfd/da903x.h> | ||
25 | |||
26 | #include <asm/mach-types.h> | ||
27 | #include <asm/mach/arch.h> | ||
28 | #include <asm/mach/map.h> | ||
29 | #include <asm/mach/flash.h> | ||
30 | |||
31 | #include <mach/i2c.h> | ||
32 | #include <mach/pxa-regs.h> | ||
33 | #include <mach/pxa2xx-regs.h> | ||
34 | #include <mach/mfp-pxa27x.h> | ||
35 | #include <mach/regs-ssp.h> | ||
36 | #include <mach/udc.h> | ||
37 | #include <mach/mmc.h> | ||
38 | #include <mach/pxa2xx_spi.h> | ||
39 | #include <mach/pxa27x-udc.h> | ||
40 | |||
41 | #include "devices.h" | ||
42 | #include "generic.h" | ||
43 | |||
44 | static unsigned long imote2_pin_config[] __initdata = { | ||
45 | |||
46 | /* Device Identification for wakeup*/ | ||
47 | GPIO102_GPIO, | ||
48 | |||
49 | /* Button */ | ||
50 | GPIO91_GPIO, | ||
51 | |||
52 | /* DA9030 */ | ||
53 | GPIO1_GPIO, | ||
54 | |||
55 | /* MMC */ | ||
56 | GPIO32_MMC_CLK, | ||
57 | GPIO112_MMC_CMD, | ||
58 | GPIO92_MMC_DAT_0, | ||
59 | GPIO109_MMC_DAT_1, | ||
60 | GPIO110_MMC_DAT_2, | ||
61 | GPIO111_MMC_DAT_3, | ||
62 | |||
63 | /* 802.15.4 radio - driver out of mainline */ | ||
64 | GPIO22_GPIO, /* CC_RSTN */ | ||
65 | GPIO114_GPIO, /* CC_FIFO */ | ||
66 | GPIO116_GPIO, /* CC_CCA */ | ||
67 | GPIO0_GPIO, /* CC_FIFOP */ | ||
68 | GPIO16_GPIO, /* CCSFD */ | ||
69 | GPIO39_GPIO, /* CSn */ | ||
70 | GPIO115_GPIO, /* Power enable */ | ||
71 | |||
72 | /* I2C */ | ||
73 | GPIO117_I2C_SCL, | ||
74 | GPIO118_I2C_SDA, | ||
75 | |||
76 | /* SSP 3 - 802.15.4 radio */ | ||
77 | GPIO39_GPIO, /* Chip Select */ | ||
78 | GPIO34_SSP3_SCLK, | ||
79 | GPIO35_SSP3_TXD, | ||
80 | GPIO41_SSP3_RXD, | ||
81 | |||
82 | /* SSP 2 - to daughter boards */ | ||
83 | GPIO37_GPIO, /* Chip Select */ | ||
84 | GPIO36_SSP2_SCLK, | ||
85 | GPIO38_SSP2_TXD, | ||
86 | GPIO11_SSP2_RXD, | ||
87 | |||
88 | /* SSP 1 - to daughter boards */ | ||
89 | GPIO24_GPIO, /* Chip Select */ | ||
90 | GPIO23_SSP1_SCLK, | ||
91 | GPIO25_SSP1_TXD, | ||
92 | GPIO26_SSP1_RXD, | ||
93 | |||
94 | /* BTUART Basic Connector*/ | ||
95 | GPIO42_BTUART_RXD, | ||
96 | GPIO43_BTUART_TXD, | ||
97 | GPIO44_BTUART_CTS, | ||
98 | GPIO45_BTUART_RTS, | ||
99 | |||
100 | /* STUART Serial console via debug board*/ | ||
101 | GPIO46_STUART_RXD, | ||
102 | GPIO47_STUART_TXD, | ||
103 | |||
104 | /* Basic sensor board */ | ||
105 | GPIO96_GPIO, /* accelerometer interrupt */ | ||
106 | GPIO99_GPIO, /* ADC interrupt */ | ||
107 | |||
108 | /* Connector pins specified as gpios */ | ||
109 | GPIO94_GPIO, /* large basic connector pin 14 */ | ||
110 | GPIO10_GPIO, /* large basic connector pin 23 */ | ||
111 | |||
112 | /* LEDS */ | ||
113 | GPIO103_GPIO, /* red led */ | ||
114 | GPIO104_GPIO, /* green led */ | ||
115 | GPIO105_GPIO, /* blue led */ | ||
116 | }; | ||
117 | |||
118 | static struct gpio_led imote2_led_pins[] = { | ||
119 | { | ||
120 | .name = "imote2:red", | ||
121 | .gpio = 103, | ||
122 | .active_low = 1, | ||
123 | }, { | ||
124 | .name = "imote2:green", | ||
125 | .gpio = 104, | ||
126 | .active_low = 1, | ||
127 | }, { | ||
128 | .name = "imote2:blue", | ||
129 | .gpio = 105, | ||
130 | .active_low = 1, | ||
131 | }, | ||
132 | }; | ||
133 | |||
134 | static struct gpio_led_platform_data imote2_led_data = { | ||
135 | .num_leds = ARRAY_SIZE(imote2_led_pins), | ||
136 | .leds = imote2_led_pins, | ||
137 | }; | ||
138 | |||
139 | static struct platform_device imote2_leds = { | ||
140 | .name = "leds-gpio", | ||
141 | .id = -1, | ||
142 | .dev = { | ||
143 | .platform_data = &imote2_led_data, | ||
144 | }, | ||
145 | }; | ||
146 | |||
147 | /* Reverse engineered partly from Platformx drivers */ | ||
148 | enum imote2_ldos{ | ||
149 | vcc_vref, | ||
150 | vcc_cc2420, | ||
151 | vcc_mica, | ||
152 | vcc_bt, | ||
153 | /* The two voltages available to sensor boards */ | ||
154 | vcc_sensor_1_8, | ||
155 | vcc_sensor_3, | ||
156 | |||
157 | vcc_sram_ext, /* directly connected to the pxa271 */ | ||
158 | vcc_pxa_pll, | ||
159 | vcc_pxa_usim, /* Reference voltage for certain gpios */ | ||
160 | vcc_pxa_mem, | ||
161 | vcc_pxa_flash, | ||
162 | vcc_pxa_core, /*Dc-Dc buck not yet supported */ | ||
163 | vcc_lcd, | ||
164 | vcc_bb, | ||
165 | vcc_bbio, | ||
166 | vcc_io, /* cc2420 802.15.4 radio and pxa vcc_io ?*/ | ||
167 | }; | ||
168 | |||
169 | /* The values of the various regulator constraints are obviously dependent | ||
170 | * on exactly what is wired to each ldo. Unfortunately this information is | ||
171 | * not generally available. More information has been requested from Xbow | ||
172 | * but as of yet they haven't been forthcoming. | ||
173 | * | ||
174 | * Some of these are clearly Stargate 2 related (no way of plugging | ||
175 | * in an lcd on the IM2 for example!). | ||
176 | */ | ||
177 | static struct regulator_init_data imote2_ldo_init_data[] = { | ||
178 | [vcc_bbio] = { | ||
179 | .constraints = { /* board default 1.8V */ | ||
180 | .name = "vcc_bbio", | ||
181 | .min_uV = 1800000, | ||
182 | .max_uV = 1800000, | ||
183 | }, | ||
184 | }, | ||
185 | [vcc_bb] = { | ||
186 | .constraints = { /* board default 2.8V */ | ||
187 | .name = "vcc_bb", | ||
188 | .min_uV = 2700000, | ||
189 | .max_uV = 3000000, | ||
190 | }, | ||
191 | }, | ||
192 | [vcc_pxa_flash] = { | ||
193 | .constraints = {/* default is 1.8V */ | ||
194 | .name = "vcc_pxa_flash", | ||
195 | .min_uV = 1800000, | ||
196 | .max_uV = 1800000, | ||
197 | }, | ||
198 | }, | ||
199 | [vcc_cc2420] = { /* also vcc_io */ | ||
200 | .constraints = { | ||
201 | /* board default is 2.8V */ | ||
202 | .name = "vcc_cc2420", | ||
203 | .min_uV = 2700000, | ||
204 | .max_uV = 3300000, | ||
205 | }, | ||
206 | }, | ||
207 | [vcc_vref] = { /* Reference for what? */ | ||
208 | .constraints = { /* default 1.8V */ | ||
209 | .name = "vcc_vref", | ||
210 | .min_uV = 1800000, | ||
211 | .max_uV = 1800000, | ||
212 | }, | ||
213 | }, | ||
214 | [vcc_sram_ext] = { | ||
215 | .constraints = { /* default 2.8V */ | ||
216 | .name = "vcc_sram_ext", | ||
217 | .min_uV = 2800000, | ||
218 | .max_uV = 2800000, | ||
219 | }, | ||
220 | }, | ||
221 | [vcc_mica] = { | ||
222 | .constraints = { /* default 2.8V */ | ||
223 | .name = "vcc_mica", | ||
224 | .min_uV = 2800000, | ||
225 | .max_uV = 2800000, | ||
226 | }, | ||
227 | }, | ||
228 | [vcc_bt] = { | ||
229 | .constraints = { /* default 2.8V */ | ||
230 | .name = "vcc_bt", | ||
231 | .min_uV = 2800000, | ||
232 | .max_uV = 2800000, | ||
233 | }, | ||
234 | }, | ||
235 | [vcc_lcd] = { | ||
236 | .constraints = { /* default 2.8V */ | ||
237 | .name = "vcc_lcd", | ||
238 | .min_uV = 2700000, | ||
239 | .max_uV = 3300000, | ||
240 | }, | ||
241 | }, | ||
242 | [vcc_io] = { /* Same or higher than everything | ||
243 | * bar vccbat and vccusb */ | ||
244 | .constraints = { /* default 2.8V */ | ||
245 | .name = "vcc_io", | ||
246 | .min_uV = 2692000, | ||
247 | .max_uV = 3300000, | ||
248 | }, | ||
249 | }, | ||
250 | [vcc_sensor_1_8] = { | ||
251 | .constraints = { /* default 1.8V */ | ||
252 | .name = "vcc_sensor_1_8", | ||
253 | .min_uV = 1800000, | ||
254 | .max_uV = 1800000, | ||
255 | }, | ||
256 | }, | ||
257 | [vcc_sensor_3] = { /* curiously default 2.8V */ | ||
258 | .constraints = { | ||
259 | .name = "vcc_sensor_3", | ||
260 | .min_uV = 2800000, | ||
261 | .max_uV = 3000000, | ||
262 | }, | ||
263 | }, | ||
264 | [vcc_pxa_pll] = { /* 1.17V - 1.43V, default 1.3V*/ | ||
265 | .constraints = { | ||
266 | .name = "vcc_pxa_pll", | ||
267 | .min_uV = 1170000, | ||
268 | .max_uV = 1430000, | ||
269 | }, | ||
270 | }, | ||
271 | [vcc_pxa_usim] = { | ||
272 | .constraints = { /* default 1.8V */ | ||
273 | .name = "vcc_pxa_usim", | ||
274 | .min_uV = 1710000, | ||
275 | .max_uV = 2160000, | ||
276 | }, | ||
277 | }, | ||
278 | [vcc_pxa_mem] = { | ||
279 | .constraints = { /* default 1.8V */ | ||
280 | .name = "vcc_pxa_mem", | ||
281 | .min_uV = 1800000, | ||
282 | .max_uV = 1800000, | ||
283 | }, | ||
284 | }, | ||
285 | }; | ||
286 | |||
287 | static struct da903x_subdev_info imote2_da9030_subdevs[] = { | ||
288 | { | ||
289 | .name = "da903x-regulator", | ||
290 | .id = DA9030_ID_LDO2, | ||
291 | .platform_data = &imote2_ldo_init_data[vcc_bbio], | ||
292 | }, { | ||
293 | .name = "da903x-regulator", | ||
294 | .id = DA9030_ID_LDO3, | ||
295 | .platform_data = &imote2_ldo_init_data[vcc_bb], | ||
296 | }, { | ||
297 | .name = "da903x-regulator", | ||
298 | .id = DA9030_ID_LDO4, | ||
299 | .platform_data = &imote2_ldo_init_data[vcc_pxa_flash], | ||
300 | }, { | ||
301 | .name = "da903x-regulator", | ||
302 | .id = DA9030_ID_LDO5, | ||
303 | .platform_data = &imote2_ldo_init_data[vcc_cc2420], | ||
304 | }, { | ||
305 | .name = "da903x-regulator", | ||
306 | .id = DA9030_ID_LDO6, | ||
307 | .platform_data = &imote2_ldo_init_data[vcc_vref], | ||
308 | }, { | ||
309 | .name = "da903x-regulator", | ||
310 | .id = DA9030_ID_LDO7, | ||
311 | .platform_data = &imote2_ldo_init_data[vcc_sram_ext], | ||
312 | }, { | ||
313 | .name = "da903x-regulator", | ||
314 | .id = DA9030_ID_LDO8, | ||
315 | .platform_data = &imote2_ldo_init_data[vcc_mica], | ||
316 | }, { | ||
317 | .name = "da903x-regulator", | ||
318 | .id = DA9030_ID_LDO9, | ||
319 | .platform_data = &imote2_ldo_init_data[vcc_bt], | ||
320 | }, { | ||
321 | .name = "da903x-regulator", | ||
322 | .id = DA9030_ID_LDO10, | ||
323 | .platform_data = &imote2_ldo_init_data[vcc_sensor_1_8], | ||
324 | }, { | ||
325 | .name = "da903x-regulator", | ||
326 | .id = DA9030_ID_LDO11, | ||
327 | .platform_data = &imote2_ldo_init_data[vcc_sensor_3], | ||
328 | }, { | ||
329 | .name = "da903x-regulator", | ||
330 | .id = DA9030_ID_LDO12, | ||
331 | .platform_data = &imote2_ldo_init_data[vcc_lcd], | ||
332 | }, { | ||
333 | .name = "da903x-regulator", | ||
334 | .id = DA9030_ID_LDO15, | ||
335 | .platform_data = &imote2_ldo_init_data[vcc_pxa_pll], | ||
336 | }, { | ||
337 | .name = "da903x-regulator", | ||
338 | .id = DA9030_ID_LDO17, | ||
339 | .platform_data = &imote2_ldo_init_data[vcc_pxa_usim], | ||
340 | }, { | ||
341 | .name = "da903x-regulator", | ||
342 | .id = DA9030_ID_LDO18, | ||
343 | .platform_data = &imote2_ldo_init_data[vcc_io], | ||
344 | }, { | ||
345 | .name = "da903x-regulator", | ||
346 | .id = DA9030_ID_LDO19, | ||
347 | .platform_data = &imote2_ldo_init_data[vcc_pxa_mem], | ||
348 | }, | ||
349 | }; | ||
350 | |||
351 | static struct da903x_platform_data imote2_da9030_pdata = { | ||
352 | .num_subdevs = ARRAY_SIZE(imote2_da9030_subdevs), | ||
353 | .subdevs = imote2_da9030_subdevs, | ||
354 | }; | ||
355 | |||
356 | /* As the the imote2 doesn't currently have a conventional SD slot | ||
357 | * there is no option to hotplug cards, making all this rather simple | ||
358 | */ | ||
359 | static int imote2_mci_get_ro(struct device *dev) | ||
360 | { | ||
361 | return 0; | ||
362 | } | ||
363 | |||
364 | /* Rather simple case as hotplugging not possible */ | ||
365 | static struct pxamci_platform_data imote2_mci_platform_data = { | ||
366 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, /* default anyway */ | ||
367 | .get_ro = imote2_mci_get_ro, | ||
368 | }; | ||
369 | |||
370 | static struct mtd_partition imote2flash_partitions[] = { | ||
371 | { | ||
372 | .name = "Bootloader", | ||
373 | .size = 0x00040000, | ||
374 | .offset = 0, | ||
375 | .mask_flags = MTD_WRITEABLE, | ||
376 | }, { | ||
377 | .name = "Kernel", | ||
378 | .size = 0x00200000, | ||
379 | .offset = 0x00040000, | ||
380 | .mask_flags = 0, | ||
381 | }, { | ||
382 | .name = "Filesystem", | ||
383 | .size = 0x01DC0000, | ||
384 | .offset = 0x00240000, | ||
385 | .mask_flags = 0, | ||
386 | }, | ||
387 | }; | ||
388 | |||
389 | static struct resource flash_resources = { | ||
390 | .start = PXA_CS0_PHYS, | ||
391 | .end = PXA_CS0_PHYS + SZ_32M - 1, | ||
392 | .flags = IORESOURCE_MEM, | ||
393 | }; | ||
394 | |||
395 | static struct flash_platform_data imote2_flash_data = { | ||
396 | .map_name = "cfi_probe", | ||
397 | .parts = imote2flash_partitions, | ||
398 | .nr_parts = ARRAY_SIZE(imote2flash_partitions), | ||
399 | .name = "PXA27xOnChipROM", | ||
400 | .width = 2, | ||
401 | }; | ||
402 | |||
403 | static struct platform_device imote2_flash_device = { | ||
404 | .name = "pxa2xx-flash", | ||
405 | .id = 0, | ||
406 | .dev = { | ||
407 | .platform_data = &imote2_flash_data, | ||
408 | }, | ||
409 | .resource = &flash_resources, | ||
410 | .num_resources = 1, | ||
411 | }; | ||
412 | |||
413 | /* Some of the drivers here are out of kernel at the moment (parts of IIO) | ||
414 | * and it may be a while before they are in the mainline. | ||
415 | */ | ||
416 | static struct i2c_board_info __initdata imote2_i2c_board_info[] = { | ||
417 | { /* UCAM sensor board */ | ||
418 | .type = "max1238", | ||
419 | .addr = 0x35, | ||
420 | }, { /* ITS400 Sensor board only */ | ||
421 | .type = "max1363", | ||
422 | .addr = 0x34, | ||
423 | /* Through a nand gate - Also beware, on V2 sensor board the | ||
424 | * pull up resistors are missing. | ||
425 | */ | ||
426 | .irq = IRQ_GPIO(99), | ||
427 | }, { /* ITS400 Sensor board only */ | ||
428 | .type = "tsl2561", | ||
429 | .addr = 0x49, | ||
430 | /* Through a nand gate - Also beware, on V2 sensor board the | ||
431 | * pull up resistors are missing. | ||
432 | */ | ||
433 | .irq = IRQ_GPIO(99), | ||
434 | }, { /* ITS400 Sensor board only */ | ||
435 | .type = "tmp175", | ||
436 | .addr = 0x4A, | ||
437 | .irq = IRQ_GPIO(96), | ||
438 | }, | ||
439 | }; | ||
440 | |||
441 | static struct i2c_board_info __initdata imote2_pwr_i2c_board_info[] = { | ||
442 | { | ||
443 | .type = "da9030", | ||
444 | .addr = 0x49, | ||
445 | .platform_data = &imote2_da9030_pdata, | ||
446 | .irq = gpio_to_irq(1), | ||
447 | }, | ||
448 | }; | ||
449 | |||
450 | static struct pxa2xx_spi_master pxa_ssp_master_0_info = { | ||
451 | .num_chipselect = 1, | ||
452 | }; | ||
453 | |||
454 | static struct pxa2xx_spi_master pxa_ssp_master_1_info = { | ||
455 | .num_chipselect = 1, | ||
456 | }; | ||
457 | |||
458 | static struct pxa2xx_spi_master pxa_ssp_master_2_info = { | ||
459 | .num_chipselect = 1, | ||
460 | }; | ||
461 | |||
462 | /* Patch posted by Eric Miao <eric.miao@marvell.com> will remove | ||
463 | * the need for these functions. | ||
464 | */ | ||
465 | static void spi1control(u32 command) | ||
466 | { | ||
467 | gpio_set_value(24, command & PXA2XX_CS_ASSERT ? 0 : 1); | ||
468 | }; | ||
469 | |||
470 | static void spi3control(u32 command) | ||
471 | { | ||
472 | gpio_set_value(39, command & PXA2XX_CS_ASSERT ? 0 : 1); | ||
473 | }; | ||
474 | |||
475 | static struct pxa2xx_spi_chip staccel_chip_info = { | ||
476 | .tx_threshold = 8, | ||
477 | .rx_threshold = 8, | ||
478 | .dma_burst_size = 8, | ||
479 | .timeout = 235, | ||
480 | .cs_control = spi1control, | ||
481 | }; | ||
482 | |||
483 | static struct pxa2xx_spi_chip cc2420_info = { | ||
484 | .tx_threshold = 8, | ||
485 | .rx_threshold = 8, | ||
486 | .dma_burst_size = 8, | ||
487 | .timeout = 235, | ||
488 | .cs_control = spi3control, | ||
489 | }; | ||
490 | |||
491 | static struct spi_board_info spi_board_info[] __initdata = { | ||
492 | { /* Driver in IIO */ | ||
493 | .modalias = "lis3l02dq", | ||
494 | .max_speed_hz = 8000000,/* 8MHz max spi frequency at 3V */ | ||
495 | .bus_num = 1, | ||
496 | .chip_select = 0, | ||
497 | .controller_data = &staccel_chip_info, | ||
498 | .irq = IRQ_GPIO(96), | ||
499 | }, { /* Driver out of kernel as it needs considerable rewriting */ | ||
500 | .modalias = "cc2420", | ||
501 | .max_speed_hz = 6500000, | ||
502 | .bus_num = 3, | ||
503 | .chip_select = 0, | ||
504 | .controller_data = &cc2420_info, | ||
505 | }, | ||
506 | }; | ||
507 | |||
508 | static void im2_udc_command(int cmd) | ||
509 | { | ||
510 | switch (cmd) { | ||
511 | case PXA2XX_UDC_CMD_CONNECT: | ||
512 | UP2OCR |= UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE; | ||
513 | break; | ||
514 | case PXA2XX_UDC_CMD_DISCONNECT: | ||
515 | UP2OCR &= ~(UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE); | ||
516 | break; | ||
517 | } | ||
518 | } | ||
519 | |||
520 | static struct pxa2xx_udc_mach_info imote2_udc_info __initdata = { | ||
521 | .udc_command = im2_udc_command, | ||
522 | }; | ||
523 | |||
524 | static struct platform_device *imote2_devices[] = { | ||
525 | &imote2_flash_device, | ||
526 | &imote2_leds, | ||
527 | }; | ||
528 | |||
529 | static struct i2c_pxa_platform_data i2c_pwr_pdata = { | ||
530 | .fast_mode = 1, | ||
531 | }; | ||
532 | |||
533 | static struct i2c_pxa_platform_data i2c_pdata = { | ||
534 | .fast_mode = 1, | ||
535 | }; | ||
536 | |||
537 | static void __init imote2_init(void) | ||
538 | { | ||
539 | |||
540 | pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config)); | ||
541 | /* SPI chip select directions - all other directions should | ||
542 | * be handled by drivers.*/ | ||
543 | gpio_direction_output(37, 0); | ||
544 | gpio_direction_output(24, 0); | ||
545 | gpio_direction_output(39, 0); | ||
546 | |||
547 | platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); | ||
548 | |||
549 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); | ||
550 | pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info); | ||
551 | pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info); | ||
552 | |||
553 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | ||
554 | |||
555 | i2c_register_board_info(0, imote2_i2c_board_info, | ||
556 | ARRAY_SIZE(imote2_i2c_board_info)); | ||
557 | i2c_register_board_info(1, imote2_pwr_i2c_board_info, | ||
558 | ARRAY_SIZE(imote2_pwr_i2c_board_info)); | ||
559 | |||
560 | pxa27x_set_i2c_power_info(&i2c_pwr_pdata); | ||
561 | pxa_set_i2c_info(&i2c_pdata); | ||
562 | |||
563 | pxa_set_mci_info(&imote2_mci_platform_data); | ||
564 | pxa_set_udc_info(&imote2_udc_info); | ||
565 | } | ||
566 | |||
567 | MACHINE_START(INTELMOTE2, "IMOTE 2") | ||
568 | .phys_io = 0x40000000, | ||
569 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | ||
570 | .map_io = pxa_map_io, | ||
571 | .init_irq = pxa27x_init_irq, | ||
572 | .timer = &pxa_timer, | ||
573 | .init_machine = imote2_init, | ||
574 | .boot_params = 0xA0000100, | ||
575 | MACHINE_END | ||
diff --git a/arch/arm/mach-pxa/include/mach/clkdev.h b/arch/arm/mach-pxa/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-pxa/include/mach/dma.h b/arch/arm/mach-pxa/include/mach/dma.h index 955bfe606067..7804637a6df3 100644 --- a/arch/arm/mach-pxa/include/mach/dma.h +++ b/arch/arm/mach-pxa/include/mach/dma.h | |||
@@ -30,10 +30,6 @@ typedef enum { | |||
30 | DMA_PRIO_LOW = 2 | 30 | DMA_PRIO_LOW = 2 |
31 | } pxa_dma_prio; | 31 | } pxa_dma_prio; |
32 | 32 | ||
33 | #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) | ||
34 | #define HAVE_ARCH_PCI_SET_DMA_MASK 1 | ||
35 | #endif | ||
36 | |||
37 | /* | 33 | /* |
38 | * DMA registration | 34 | * DMA registration |
39 | */ | 35 | */ |
diff --git a/arch/arm/mach-pxa/include/mach/eseries-gpio.h b/arch/arm/mach-pxa/include/mach/eseries-gpio.h index 4c90b1310270..efbd2aa9ecec 100644 --- a/arch/arm/mach-pxa/include/mach/eseries-gpio.h +++ b/arch/arm/mach-pxa/include/mach/eseries-gpio.h | |||
@@ -43,8 +43,10 @@ | |||
43 | #define GPIO_E800_PCMCIA_PWR1 73 | 43 | #define GPIO_E800_PCMCIA_PWR1 73 |
44 | 44 | ||
45 | /* e7xx IrDA power control */ | 45 | /* e7xx IrDA power control */ |
46 | #define GPIO_E7XX_IR_ON 38 | 46 | #define GPIO_E7XX_IR_OFF 38 |
47 | 47 | ||
48 | /* ASIC related GPIOs */ | 48 | /* ASIC related GPIOs */ |
49 | #define GPIO_ESERIES_TMIO_IRQ 5 | 49 | #define GPIO_ESERIES_TMIO_IRQ 5 |
50 | #define GPIO_ESERIES_TMIO_PCLR 19 | ||
51 | #define GPIO_ESERIES_TMIO_SUSPEND 45 | ||
50 | #define GPIO_E800_ANGELX_IRQ 8 | 52 | #define GPIO_E800_ANGELX_IRQ 8 |
diff --git a/arch/arm/mach-pxa/include/mach/gumstix.h b/arch/arm/mach-pxa/include/mach/gumstix.h index 42ee1956750e..099f54a41de4 100644 --- a/arch/arm/mach-pxa/include/mach/gumstix.h +++ b/arch/arm/mach-pxa/include/mach/gumstix.h | |||
@@ -94,3 +94,7 @@ has detected a cable insertion; driven low otherwise. */ | |||
94 | #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN) | 94 | #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN) |
95 | #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN) | 95 | #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN) |
96 | #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN) | 96 | #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN) |
97 | |||
98 | /* for expansion boards that can't be programatically detected */ | ||
99 | extern int am200_init(void); | ||
100 | |||
diff --git a/arch/arm/mach-pxa/include/mach/h5000.h b/arch/arm/mach-pxa/include/mach/h5000.h new file mode 100644 index 000000000000..2a5ae3802787 --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/h5000.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * Hardware definitions for HP iPAQ h5xxx Handheld Computers | ||
3 | * | ||
4 | * Copyright(20)02 Hewlett-Packard Company. | ||
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 | * COMPAQ COMPUTER CORPORATION MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, | ||
12 | * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS | ||
13 | * FITNESS FOR ANY PARTICULAR PURPOSE. | ||
14 | * | ||
15 | * Author: Jamey Hicks | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_H5000_H | ||
19 | #define __ASM_ARCH_H5000_H | ||
20 | |||
21 | #include <mach/mfp-pxa25x.h> | ||
22 | |||
23 | /* | ||
24 | * CPU GPIOs | ||
25 | */ | ||
26 | |||
27 | #define H5000_GPIO_POWER_BUTTON (0) | ||
28 | #define H5000_GPIO_RESET_BUTTON_N (1) | ||
29 | #define H5000_GPIO_OPT_INT (2) | ||
30 | #define H5000_GPIO_BACKUP_POWER (3) | ||
31 | #define H5000_GPIO_ACTION_BUTTON (4) | ||
32 | #define H5000_GPIO_COM_DCD_SOMETHING (5) /* what is this really ? */ | ||
33 | /* 6 not connected */ | ||
34 | #define H5000_GPIO_RESET_BUTTON_AGAIN_N (7) /* connected to gpio 1 as well */ | ||
35 | /* 8 not connected */ | ||
36 | #define H5000_GPIO_RSO_N (9) /* reset output from max1702 which regulates 3.3 and 2.5 */ | ||
37 | #define H5000_GPIO_ASIC_INT_N (10) /* from companion asic */ | ||
38 | #define H5000_GPIO_BT_ENV_0 (11) /* to LMX9814, set to 1 according to regdump */ | ||
39 | /*(12) not connected */ | ||
40 | #define H5000_GPIO_BT_ENV_1 (13) /* to LMX9814, set to 1 according to regdump */ | ||
41 | #define H5000_GPIO_BT_WU (14) /* from LMX9814, Defined as HOST_WAKEUP in the LMX9820 data sheet */ | ||
42 | /*(15) is CS1# */ | ||
43 | /*(16) not connected */ | ||
44 | /*(17) not connected */ | ||
45 | /*(18) is pcmcia ready */ | ||
46 | /*(19) is dreq1 */ | ||
47 | /*(20) is dreq0 */ | ||
48 | #define H5000_GPIO_OE_RD_NWR (21) /* output enable on rd/nwr signal to companion asic */ | ||
49 | /*(22) is not connected */ | ||
50 | #define H5000_GPIO_OPT_SPI_CLK (23) /* to extension pack */ | ||
51 | #define H5000_GPIO_OPT_SPI_CS_N (24) /* to extension pack */ | ||
52 | #define H5000_GPIO_OPT_SPI_DOUT (25) /* to extension pack */ | ||
53 | #define H5000_GPIO_OPT_SPI_DIN (26) /* to extension pack */ | ||
54 | /*(27) not connected */ | ||
55 | #define H5000_GPIO_I2S_BITCLK (28) /* connected to AC97 codec */ | ||
56 | #define H5000_GPIO_I2S_DATAOUT (29) /* connected to AC97 codec */ | ||
57 | #define H5000_GPIO_I2S_DATAIN (30) /* connected to AC97 codec */ | ||
58 | #define H5000_GPIO_I2S_LRCLK (31) /* connected to AC97 codec */ | ||
59 | #define H5000_GPIO_I2S_SYSCLK (32) /* connected to AC97 codec */ | ||
60 | /*(33) is CS5# */ | ||
61 | #define H5000_GPIO_COM_RXD (34) /* connected to cradle/cable connector */ | ||
62 | #define H5000_GPIO_COM_CTS (35) /* connected to cradle/cable connector */ | ||
63 | #define H5000_GPIO_COM_DCD (36) /* connected to cradle/cable connector */ | ||
64 | #define H5000_GPIO_COM_DSR (37) /* connected to cradle/cable connector */ | ||
65 | #define H5000_GPIO_COM_RI (38) /* connected to cradle/cable connector */ | ||
66 | #define H5000_GPIO_COM_TXD (39) /* connected to cradle/cable connector */ | ||
67 | #define H5000_GPIO_COM_DTR (40) /* connected to cradle/cable connector */ | ||
68 | #define H5000_GPIO_COM_RTS (41) /* connected to cradle/cable connector */ | ||
69 | |||
70 | #define H5000_GPIO_BT_RXD (42) /* connected to BT (LMX9814) */ | ||
71 | #define H5000_GPIO_BT_TXD (43) /* connected to BT (LMX9814) */ | ||
72 | #define H5000_GPIO_BT_CTS (44) /* connected to BT (LMX9814) */ | ||
73 | #define H5000_GPIO_BT_RTS (45) /* connected to BT (LMX9814) */ | ||
74 | |||
75 | #define H5000_GPIO_IRDA_RXD (46) | ||
76 | #define H5000_GPIO_IRDA_TXD (47) | ||
77 | |||
78 | #define H5000_GPIO_POE_N (48) /* used for pcmcia */ | ||
79 | #define H5000_GPIO_PWE_N (49) /* used for pcmcia */ | ||
80 | #define H5000_GPIO_PIOR_N (50) /* used for pcmcia */ | ||
81 | #define H5000_GPIO_PIOW_N (51) /* used for pcmcia */ | ||
82 | #define H5000_GPIO_PCE1_N (52) /* used for pcmcia */ | ||
83 | #define H5000_GPIO_PCE2_N (53) /* used for pcmcia */ | ||
84 | #define H5000_GPIO_PSKTSEL (54) /* used for pcmcia */ | ||
85 | #define H5000_GPIO_PREG_N (55) /* used for pcmcia */ | ||
86 | #define H5000_GPIO_PWAIT_N (56) /* used for pcmcia */ | ||
87 | #define H5000_GPIO_IOIS16_N (57) /* used for pcmcia */ | ||
88 | |||
89 | #define H5000_GPIO_IRDA_SD (58) /* to hsdl3002 sd */ | ||
90 | /*(59) not connected */ | ||
91 | #define H5000_GPIO_POWER_SD_N (60) /* controls power to SD */ | ||
92 | #define H5000_GPIO_POWER_RS232_N (61) /* inverted FORCEON to rs232 transceiver */ | ||
93 | #define H5000_GPIO_POWER_ACCEL_N (62) /* controls power to accel */ | ||
94 | /*(63) is not connected */ | ||
95 | #define H5000_GPIO_OPT_NVRAM (64) /* controls power to expansion pack */ | ||
96 | #define H5000_GPIO_CHG_EN (65) /* to sc801 en */ | ||
97 | #define H5000_GPIO_USB_PULLUP (66) /* USB d+ pullup via 1.5K resistor */ | ||
98 | #define H5000_GPIO_BT_2V8_N (67) /* 2.8V used by bluetooth */ | ||
99 | #define H5000_GPIO_EXT_CHG_RATE (68) /* enables external charging rate */ | ||
100 | /*(69) is not connected */ | ||
101 | #define H5000_GPIO_CIR_RESET (70) /* consumer IR reset */ | ||
102 | #define H5000_GPIO_POWER_LIGHT_SENSOR_N (71) | ||
103 | #define H5000_GPIO_BT_M_RESET (72) | ||
104 | #define H5000_GPIO_STD_CHG_RATE (73) | ||
105 | #define H5000_GPIO_SD_WP_N (74) | ||
106 | #define H5000_GPIO_MOTOR_ON_N (75) /* external pullup on this */ | ||
107 | #define H5000_GPIO_HEADPHONE_DETECT (76) | ||
108 | #define H5000_GPIO_USB_CHG_RATE (77) /* select rate for charging via usb */ | ||
109 | /*(78) is CS2# */ | ||
110 | /*(79) is CS3# */ | ||
111 | /*(80) is CS4# */ | ||
112 | |||
113 | #endif /* __ASM_ARCH_H5000_H */ | ||
diff --git a/arch/arm/mach-pxa/include/mach/hardware.h b/arch/arm/mach-pxa/include/mach/hardware.h index a582a6d9b92b..16ab79547dae 100644 --- a/arch/arm/mach-pxa/include/mach/hardware.h +++ b/arch/arm/mach-pxa/include/mach/hardware.h | |||
@@ -102,6 +102,9 @@ | |||
102 | * PXA930 B0 0x69056835 0x5E643013 | 102 | * PXA930 B0 0x69056835 0x5E643013 |
103 | * PXA930 B1 0x69056837 0x7E643013 | 103 | * PXA930 B1 0x69056837 0x7E643013 |
104 | * PXA930 B2 0x69056838 0x8E643013 | 104 | * PXA930 B2 0x69056838 0x8E643013 |
105 | * | ||
106 | * PXA935 A0 0x56056931 0x1E653013 | ||
107 | * PXA935 B0 0x56056936 0x6E653013 | ||
105 | */ | 108 | */ |
106 | #ifdef CONFIG_PXA25x | 109 | #ifdef CONFIG_PXA25x |
107 | #define __cpu_is_pxa210(id) \ | 110 | #define __cpu_is_pxa210(id) \ |
@@ -178,12 +181,22 @@ | |||
178 | #define __cpu_is_pxa930(id) \ | 181 | #define __cpu_is_pxa930(id) \ |
179 | ({ \ | 182 | ({ \ |
180 | unsigned int _id = (id) >> 4 & 0xfff; \ | 183 | unsigned int _id = (id) >> 4 & 0xfff; \ |
181 | _id == 0x683; \ | 184 | _id == 0x683; \ |
182 | }) | 185 | }) |
183 | #else | 186 | #else |
184 | #define __cpu_is_pxa930(id) (0) | 187 | #define __cpu_is_pxa930(id) (0) |
185 | #endif | 188 | #endif |
186 | 189 | ||
190 | #ifdef CONFIG_CPU_PXA935 | ||
191 | #define __cpu_is_pxa935(id) \ | ||
192 | ({ \ | ||
193 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
194 | _id == 0x693; \ | ||
195 | }) | ||
196 | #else | ||
197 | #define __cpu_is_pxa935(id) (0) | ||
198 | #endif | ||
199 | |||
187 | #define cpu_is_pxa210() \ | 200 | #define cpu_is_pxa210() \ |
188 | ({ \ | 201 | ({ \ |
189 | __cpu_is_pxa210(read_cpuid_id()); \ | 202 | __cpu_is_pxa210(read_cpuid_id()); \ |
@@ -204,8 +217,6 @@ | |||
204 | __cpu_is_pxa25x(read_cpuid_id()); \ | 217 | __cpu_is_pxa25x(read_cpuid_id()); \ |
205 | }) | 218 | }) |
206 | 219 | ||
207 | extern int cpu_is_pxa26x(void); | ||
208 | |||
209 | #define cpu_is_pxa27x() \ | 220 | #define cpu_is_pxa27x() \ |
210 | ({ \ | 221 | ({ \ |
211 | __cpu_is_pxa27x(read_cpuid_id()); \ | 222 | __cpu_is_pxa27x(read_cpuid_id()); \ |
@@ -232,6 +243,12 @@ extern int cpu_is_pxa26x(void); | |||
232 | __cpu_is_pxa930(id); \ | 243 | __cpu_is_pxa930(id); \ |
233 | }) | 244 | }) |
234 | 245 | ||
246 | #define cpu_is_pxa935() \ | ||
247 | ({ \ | ||
248 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
249 | __cpu_is_pxa935(id); \ | ||
250 | }) | ||
251 | |||
235 | /* | 252 | /* |
236 | * CPUID Core Generation Bit | 253 | * CPUID Core Generation Bit |
237 | * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x | 254 | * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x |
@@ -249,6 +266,12 @@ extern int cpu_is_pxa26x(void); | |||
249 | _id == 0x3; \ | 266 | _id == 0x3; \ |
250 | }) | 267 | }) |
251 | 268 | ||
269 | #define __cpu_is_pxa9xx(id) \ | ||
270 | ({ \ | ||
271 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
272 | _id == 0x683 || _id == 0x693; \ | ||
273 | }) | ||
274 | |||
252 | #define cpu_is_pxa2xx() \ | 275 | #define cpu_is_pxa2xx() \ |
253 | ({ \ | 276 | ({ \ |
254 | __cpu_is_pxa2xx(read_cpuid_id()); \ | 277 | __cpu_is_pxa2xx(read_cpuid_id()); \ |
@@ -259,32 +282,25 @@ extern int cpu_is_pxa26x(void); | |||
259 | __cpu_is_pxa3xx(read_cpuid_id()); \ | 282 | __cpu_is_pxa3xx(read_cpuid_id()); \ |
260 | }) | 283 | }) |
261 | 284 | ||
262 | /* | 285 | #define cpu_is_pxa9xx() \ |
263 | * Handy routine to set GPIO alternate functions | 286 | ({ \ |
264 | */ | 287 | __cpu_is_pxa9xx(read_cpuid_id()); \ |
265 | extern int pxa_gpio_mode( int gpio_mode ); | 288 | }) |
266 | |||
267 | /* | ||
268 | * Return GPIO level, nonzero means high, zero is low | ||
269 | */ | ||
270 | extern int pxa_gpio_get_value(unsigned gpio); | ||
271 | |||
272 | /* | ||
273 | * Set output GPIO level | ||
274 | */ | ||
275 | extern void pxa_gpio_set_value(unsigned gpio, int value); | ||
276 | |||
277 | /* | 289 | /* |
278 | * return current memory and LCD clock frequency in units of 10kHz | 290 | * return current memory and LCD clock frequency in units of 10kHz |
279 | */ | 291 | */ |
280 | extern unsigned int get_memclk_frequency_10khz(void); | 292 | extern unsigned int get_memclk_frequency_10khz(void); |
281 | 293 | ||
294 | /* return the clock tick rate of the OS timer */ | ||
295 | extern unsigned long get_clock_tick_rate(void); | ||
282 | #endif | 296 | #endif |
283 | 297 | ||
284 | #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) | 298 | #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) |
285 | #define PCIBIOS_MIN_IO 0 | 299 | #define PCIBIOS_MIN_IO 0 |
286 | #define PCIBIOS_MIN_MEM 0 | 300 | #define PCIBIOS_MIN_MEM 0 |
287 | #define pcibios_assign_all_busses() 1 | 301 | #define pcibios_assign_all_busses() 1 |
302 | #define HAVE_ARCH_PCI_SET_DMA_MASK 1 | ||
288 | #endif | 303 | #endif |
289 | 304 | ||
305 | |||
290 | #endif /* _ASM_ARCH_HARDWARE_H */ | 306 | #endif /* _ASM_ARCH_HARDWARE_H */ |
diff --git a/arch/arm/mach-pxa/include/mach/io.h b/arch/arm/mach-pxa/include/mach/io.h index 600fd4f76603..262691fb97d8 100644 --- a/arch/arm/mach-pxa/include/mach/io.h +++ b/arch/arm/mach-pxa/include/mach/io.h | |||
@@ -6,15 +6,13 @@ | |||
6 | #ifndef __ASM_ARM_ARCH_IO_H | 6 | #ifndef __ASM_ARM_ARCH_IO_H |
7 | #define __ASM_ARM_ARCH_IO_H | 7 | #define __ASM_ARM_ARCH_IO_H |
8 | 8 | ||
9 | #include <mach/hardware.h> | ||
10 | |||
11 | #define IO_SPACE_LIMIT 0xffffffff | 9 | #define IO_SPACE_LIMIT 0xffffffff |
12 | 10 | ||
13 | /* | 11 | /* |
14 | * We don't actually have real ISA nor PCI buses, but there is so many | 12 | * We don't actually have real ISA nor PCI buses, but there is so many |
15 | * drivers out there that might just work if we fake them... | 13 | * drivers out there that might just work if we fake them... |
16 | */ | 14 | */ |
17 | #define __io(a) ((void __iomem *)(a)) | 15 | #define __io(a) __typesafe_io(a) |
18 | #define __mem_pci(a) (a) | 16 | #define __mem_pci(a) (a) |
19 | 17 | ||
20 | #endif | 18 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/littleton.h b/arch/arm/mach-pxa/include/mach/littleton.h index 5c4e320c1437..6c9b21c51322 100644 --- a/arch/arm/mach-pxa/include/mach/littleton.h +++ b/arch/arm/mach-pxa/include/mach/littleton.h | |||
@@ -1,8 +1,13 @@ | |||
1 | #ifndef __ASM_ARCH_ZYLONITE_H | 1 | #ifndef __ASM_ARCH_LITTLETON_H |
2 | #define __ASM_ARCH_ZYLONITE_H | 2 | #define __ASM_ARCH_LITTLETON_H |
3 | |||
4 | #include <mach/gpio.h> | ||
3 | 5 | ||
4 | #define LITTLETON_ETH_PHYS 0x30000000 | 6 | #define LITTLETON_ETH_PHYS 0x30000000 |
5 | 7 | ||
6 | #define LITTLETON_GPIO_LCD_CS (17) | 8 | #define LITTLETON_GPIO_LCD_CS (17) |
7 | 9 | ||
8 | #endif /* __ASM_ARCH_ZYLONITE_H */ | 10 | #define EXT0_GPIO_BASE (NR_BUILTIN_GPIO) |
11 | #define EXT0_GPIO(x) (EXT0_GPIO_BASE + (x)) | ||
12 | |||
13 | #endif /* __ASM_ARCH_LITTLETON_H */ | ||
diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h index 59aef89808d6..f626730ee42e 100644 --- a/arch/arm/mach-pxa/include/mach/memory.h +++ b/arch/arm/mach-pxa/include/mach/memory.h | |||
@@ -18,16 +18,6 @@ | |||
18 | #define PHYS_OFFSET UL(0xa0000000) | 18 | #define PHYS_OFFSET UL(0xa0000000) |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * Virtual view <-> DMA view memory address translations | ||
22 | * virt_to_bus: Used to translate the virtual address to an | ||
23 | * address suitable to be passed to set_dma_addr | ||
24 | * bus_to_virt: Used to convert an address for DMA operations | ||
25 | * to an address that the kernel can use. | ||
26 | */ | ||
27 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
28 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
29 | |||
30 | /* | ||
31 | * The nodes are matched with the physical SDRAM banks as follows: | 21 | * The nodes are matched with the physical SDRAM banks as follows: |
32 | * | 22 | * |
33 | * node 0: 0xa0000000-0xa3ffffff --> 0xc0000000-0xc3ffffff | 23 | * node 0: 0xa0000000-0xa3ffffff --> 0xc0000000-0xc3ffffff |
@@ -47,6 +37,7 @@ void cmx2xx_pci_adjust_zones(int node, unsigned long *size, | |||
47 | cmx2xx_pci_adjust_zones(node, size, holes) | 37 | cmx2xx_pci_adjust_zones(node, size, holes) |
48 | 38 | ||
49 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1) | 39 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1) |
40 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M) | ||
50 | #endif | 41 | #endif |
51 | 42 | ||
52 | #endif | 43 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h index 617cab2cc8d0..a72869b73ee3 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa25x.h | |||
@@ -158,4 +158,35 @@ | |||
158 | #define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW) | 158 | #define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW) |
159 | #define GPIO77_LCD_BIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW) | 159 | #define GPIO77_LCD_BIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW) |
160 | 160 | ||
161 | #ifdef CONFIG_CPU_PXA26x | ||
162 | /* GPIO */ | ||
163 | #define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0) | ||
164 | #define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF1) | ||
165 | #define GPIO87_GPIO MFP_CFG_IN(GPIO87, AF1) | ||
166 | #define GPIO88_GPIO MFP_CFG_IN(GPIO88, AF1) | ||
167 | #define GPIO89_GPIO MFP_CFG_IN(GPIO89, AF1) | ||
168 | |||
169 | /* SDRAM */ | ||
170 | #define GPIO86_nSDCS2 MFP_CFG_OUT(GPIO86, AF0, DRIVE_HIGH) | ||
171 | #define GPIO87_nSDCS3 MFP_CFG_OUT(GPIO87, AF0, DRIVE_HIGH) | ||
172 | #define GPIO88_RDnWR MFP_CFG_OUT(GPIO88, AF0, DRIVE_HIGH) | ||
173 | #define GPIO89_nACRESET MFP_CFG_OUT(GPIO89, AF0, DRIVE_HIGH) | ||
174 | |||
175 | /* USB */ | ||
176 | #define GPIO9_USB_RCV MFP_CFG_IN(GPIO9, AF1) | ||
177 | #define GPIO32_USB_VP MFP_CFG_IN(GPIO32, AF2) | ||
178 | #define GPIO34_USB_VM MFP_CFG_IN(GPIO34, AF2) | ||
179 | #define GPIO39_USB_VPO MFP_CFG_OUT(GPIO39, AF3, DRIVE_LOW) | ||
180 | #define GPIO56_USB_VMO MFP_CFG_OUT(GPIO56, AF1, DRIVE_LOW) | ||
181 | #define GPIO57_USB_nOE MFP_CFG_OUT(GPIO57, AF1, DRIVE_HIGH) | ||
182 | |||
183 | /* ASSP */ | ||
184 | #define GPIO28_ASSP_BITCLK_IN MFP_CFG_IN(GPIO28, AF3) | ||
185 | #define GPIO28_ASSP_BITCLK_OUT MFP_CFG_OUT(GPIO28, AF3, DRIVE_LOW) | ||
186 | #define GPIO29_ASSP_RXD MFP_CFG_IN(GPIO29, AF3) | ||
187 | #define GPIO30_ASSP_TXD MFP_CFG_OUT(GPIO30, AF3, DRIVE_LOW) | ||
188 | #define GPIO31_ASSP_SFRM_IN MFP_CFG_IN(GPIO31, AF1) | ||
189 | #define GPIO31_ASSP_SFRM_OUT MFP_CFG_OUT(GPIO31, AF3, DRIVE_LOW) | ||
190 | #endif | ||
191 | |||
161 | #endif /* __ASM_ARCH_MFP_PXA25X_H */ | 192 | #endif /* __ASM_ARCH_MFP_PXA25X_H */ |
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h index 122bdbd53182..da4f85a4f990 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa27x.h | |||
@@ -11,6 +11,12 @@ | |||
11 | #include <mach/mfp.h> | 11 | #include <mach/mfp.h> |
12 | #include <mach/mfp-pxa2xx.h> | 12 | #include <mach/mfp-pxa2xx.h> |
13 | 13 | ||
14 | /* Note: GPIO3/GPIO4 will be driven by Power I2C when PCFR/PI2C_EN | ||
15 | * bit is set, regardless of the GPIO configuration | ||
16 | */ | ||
17 | #define GPIO3_GPIO MFP_CFG_IN(GPIO3, AF0) | ||
18 | #define GPIO4_GPIO MFP_CFG_IN(GPIO4, AF0) | ||
19 | |||
14 | /* GPIO */ | 20 | /* GPIO */ |
15 | #define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0) | 21 | #define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0) |
16 | #define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF0) | 22 | #define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF0) |
diff --git a/arch/arm/mach-pxa/include/mach/mfp-pxa930.h b/arch/arm/mach-pxa/include/mach/mfp-pxa930.h index fabd9b4df827..fa73f56a1372 100644 --- a/arch/arm/mach-pxa/include/mach/mfp-pxa930.h +++ b/arch/arm/mach-pxa/include/mach/mfp-pxa930.h | |||
@@ -421,6 +421,7 @@ | |||
421 | #define GPIO20_PWM0 MFP_CFG_LPM(GPIO20, AF2, PULL_LOW) | 421 | #define GPIO20_PWM0 MFP_CFG_LPM(GPIO20, AF2, PULL_LOW) |
422 | #define GPIO21_PWM2 MFP_CFG_LPM(GPIO21, AF3, PULL_LOW) | 422 | #define GPIO21_PWM2 MFP_CFG_LPM(GPIO21, AF3, PULL_LOW) |
423 | #define GPIO22_PWM3 MFP_CFG_LPM(GPIO22, AF3, PULL_LOW) | 423 | #define GPIO22_PWM3 MFP_CFG_LPM(GPIO22, AF3, PULL_LOW) |
424 | #define GPIO32_PWM0 MFP_CFG_LPM(GPIO32, AF4, PULL_LOW) | ||
424 | 425 | ||
425 | /* CIR */ | 426 | /* CIR */ |
426 | #define GPIO46_CIR_OUT MFP_CFG(GPIO46, AF1) | 427 | #define GPIO46_CIR_OUT MFP_CFG(GPIO46, AF1) |
diff --git a/arch/arm/mach-pxa/include/mach/mioa701.h b/arch/arm/mach-pxa/include/mach/mioa701.h index 8483cb511831..02868447b0b1 100644 --- a/arch/arm/mach-pxa/include/mach/mioa701.h +++ b/arch/arm/mach-pxa/include/mach/mioa701.h | |||
@@ -10,12 +10,14 @@ | |||
10 | (MFP_PIN(pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state)) | 10 | (MFP_PIN(pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state)) |
11 | 11 | ||
12 | /* Global GPIOs */ | 12 | /* Global GPIOs */ |
13 | #define GPIO9_CHARGE_nEN 9 | 13 | #define GPIO9_CHARGE_EN 9 |
14 | #define GPIO18_POWEROFF 18 | 14 | #define GPIO18_POWEROFF 18 |
15 | #define GPIO87_LCD_POWER 87 | 15 | #define GPIO87_LCD_POWER 87 |
16 | #define GPIO96_AC_DETECT 96 | ||
17 | #define GPIO80_MAYBE_CHARGE_VDROP 80 /* Drop of 88mV */ | ||
16 | 18 | ||
17 | /* USB */ | 19 | /* USB */ |
18 | #define GPIO13_USB_DETECT 13 | 20 | #define GPIO13_nUSB_DETECT 13 |
19 | #define GPIO22_USB_ENABLE 22 | 21 | #define GPIO22_USB_ENABLE 22 |
20 | 22 | ||
21 | /* SDIO bits */ | 23 | /* SDIO bits */ |
@@ -24,7 +26,10 @@ | |||
24 | #define GPIO91_SDIO_EN 91 | 26 | #define GPIO91_SDIO_EN 91 |
25 | 27 | ||
26 | /* Bluetooth */ | 28 | /* Bluetooth */ |
29 | #define GPIO14_BT_nACTIVITY 14 | ||
27 | #define GPIO83_BT_ON 83 | 30 | #define GPIO83_BT_ON 83 |
31 | #define GPIO77_BT_UNKNOWN1 77 | ||
32 | #define GPIO86_BT_MAYBE_nRESET 86 | ||
28 | 33 | ||
29 | /* GPS */ | 34 | /* GPS */ |
30 | #define GPIO23_GPS_UNKNOWN1 23 | 35 | #define GPIO23_GPS_UNKNOWN1 23 |
diff --git a/arch/arm/mach-pxa/include/mach/mtd-xip.h b/arch/arm/mach-pxa/include/mach/mtd-xip.h index 4d452fcb1508..cfca8155be72 100644 --- a/arch/arm/mach-pxa/include/mach/mtd-xip.h +++ b/arch/arm/mach-pxa/include/mach/mtd-xip.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #ifndef __ARCH_PXA_MTD_XIP_H__ | 15 | #ifndef __ARCH_PXA_MTD_XIP_H__ |
16 | #define __ARCH_PXA_MTD_XIP_H__ | 16 | #define __ARCH_PXA_MTD_XIP_H__ |
17 | 17 | ||
18 | #include <mach/hardware.h> | ||
18 | #include <mach/pxa-regs.h> | 19 | #include <mach/pxa-regs.h> |
19 | 20 | ||
20 | #define xip_irqpending() (ICIP & ICMR) | 21 | #define xip_irqpending() (ICIP & ICMR) |
diff --git a/arch/arm/mach-pxa/include/mach/pxa-regs.h b/arch/arm/mach-pxa/include/mach/pxa-regs.h index 15295d960000..31d615aa7723 100644 --- a/arch/arm/mach-pxa/include/mach/pxa-regs.h +++ b/arch/arm/mach-pxa/include/mach/pxa-regs.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #ifndef __PXA_REGS_H | 13 | #ifndef __PXA_REGS_H |
14 | #define __PXA_REGS_H | 14 | #define __PXA_REGS_H |
15 | 15 | ||
16 | #include <mach/hardware.h> | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * PXA Chip selects | 19 | * PXA Chip selects |
@@ -123,298 +124,6 @@ | |||
123 | #define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */ | 124 | #define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */ |
124 | #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ | 125 | #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ |
125 | 126 | ||
126 | |||
127 | /* | ||
128 | * UARTs | ||
129 | */ | ||
130 | |||
131 | /* Full Function UART (FFUART) */ | ||
132 | #define FFUART FFRBR | ||
133 | #define FFRBR __REG(0x40100000) /* Receive Buffer Register (read only) */ | ||
134 | #define FFTHR __REG(0x40100000) /* Transmit Holding Register (write only) */ | ||
135 | #define FFIER __REG(0x40100004) /* Interrupt Enable Register (read/write) */ | ||
136 | #define FFIIR __REG(0x40100008) /* Interrupt ID Register (read only) */ | ||
137 | #define FFFCR __REG(0x40100008) /* FIFO Control Register (write only) */ | ||
138 | #define FFLCR __REG(0x4010000C) /* Line Control Register (read/write) */ | ||
139 | #define FFMCR __REG(0x40100010) /* Modem Control Register (read/write) */ | ||
140 | #define FFLSR __REG(0x40100014) /* Line Status Register (read only) */ | ||
141 | #define FFMSR __REG(0x40100018) /* Modem Status Register (read only) */ | ||
142 | #define FFSPR __REG(0x4010001C) /* Scratch Pad Register (read/write) */ | ||
143 | #define FFISR __REG(0x40100020) /* Infrared Selection Register (read/write) */ | ||
144 | #define FFDLL __REG(0x40100000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
145 | #define FFDLH __REG(0x40100004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
146 | |||
147 | /* Bluetooth UART (BTUART) */ | ||
148 | #define BTUART BTRBR | ||
149 | #define BTRBR __REG(0x40200000) /* Receive Buffer Register (read only) */ | ||
150 | #define BTTHR __REG(0x40200000) /* Transmit Holding Register (write only) */ | ||
151 | #define BTIER __REG(0x40200004) /* Interrupt Enable Register (read/write) */ | ||
152 | #define BTIIR __REG(0x40200008) /* Interrupt ID Register (read only) */ | ||
153 | #define BTFCR __REG(0x40200008) /* FIFO Control Register (write only) */ | ||
154 | #define BTLCR __REG(0x4020000C) /* Line Control Register (read/write) */ | ||
155 | #define BTMCR __REG(0x40200010) /* Modem Control Register (read/write) */ | ||
156 | #define BTLSR __REG(0x40200014) /* Line Status Register (read only) */ | ||
157 | #define BTMSR __REG(0x40200018) /* Modem Status Register (read only) */ | ||
158 | #define BTSPR __REG(0x4020001C) /* Scratch Pad Register (read/write) */ | ||
159 | #define BTISR __REG(0x40200020) /* Infrared Selection Register (read/write) */ | ||
160 | #define BTDLL __REG(0x40200000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
161 | #define BTDLH __REG(0x40200004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
162 | |||
163 | /* Standard UART (STUART) */ | ||
164 | #define STUART STRBR | ||
165 | #define STRBR __REG(0x40700000) /* Receive Buffer Register (read only) */ | ||
166 | #define STTHR __REG(0x40700000) /* Transmit Holding Register (write only) */ | ||
167 | #define STIER __REG(0x40700004) /* Interrupt Enable Register (read/write) */ | ||
168 | #define STIIR __REG(0x40700008) /* Interrupt ID Register (read only) */ | ||
169 | #define STFCR __REG(0x40700008) /* FIFO Control Register (write only) */ | ||
170 | #define STLCR __REG(0x4070000C) /* Line Control Register (read/write) */ | ||
171 | #define STMCR __REG(0x40700010) /* Modem Control Register (read/write) */ | ||
172 | #define STLSR __REG(0x40700014) /* Line Status Register (read only) */ | ||
173 | #define STMSR __REG(0x40700018) /* Reserved */ | ||
174 | #define STSPR __REG(0x4070001C) /* Scratch Pad Register (read/write) */ | ||
175 | #define STISR __REG(0x40700020) /* Infrared Selection Register (read/write) */ | ||
176 | #define STDLL __REG(0x40700000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
177 | #define STDLH __REG(0x40700004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
178 | |||
179 | /* Hardware UART (HWUART) */ | ||
180 | #define HWUART HWRBR | ||
181 | #define HWRBR __REG(0x41600000) /* Receive Buffer Register (read only) */ | ||
182 | #define HWTHR __REG(0x41600000) /* Transmit Holding Register (write only) */ | ||
183 | #define HWIER __REG(0x41600004) /* Interrupt Enable Register (read/write) */ | ||
184 | #define HWIIR __REG(0x41600008) /* Interrupt ID Register (read only) */ | ||
185 | #define HWFCR __REG(0x41600008) /* FIFO Control Register (write only) */ | ||
186 | #define HWLCR __REG(0x4160000C) /* Line Control Register (read/write) */ | ||
187 | #define HWMCR __REG(0x41600010) /* Modem Control Register (read/write) */ | ||
188 | #define HWLSR __REG(0x41600014) /* Line Status Register (read only) */ | ||
189 | #define HWMSR __REG(0x41600018) /* Modem Status Register (read only) */ | ||
190 | #define HWSPR __REG(0x4160001C) /* Scratch Pad Register (read/write) */ | ||
191 | #define HWISR __REG(0x41600020) /* Infrared Selection Register (read/write) */ | ||
192 | #define HWFOR __REG(0x41600024) /* Receive FIFO Occupancy Register (read only) */ | ||
193 | #define HWABR __REG(0x41600028) /* Auto-Baud Control Register (read/write) */ | ||
194 | #define HWACR __REG(0x4160002C) /* Auto-Baud Count Register (read only) */ | ||
195 | #define HWDLL __REG(0x41600000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
196 | #define HWDLH __REG(0x41600004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
197 | |||
198 | #define IER_DMAE (1 << 7) /* DMA Requests Enable */ | ||
199 | #define IER_UUE (1 << 6) /* UART Unit Enable */ | ||
200 | #define IER_NRZE (1 << 5) /* NRZ coding Enable */ | ||
201 | #define IER_RTIOE (1 << 4) /* Receiver Time Out Interrupt Enable */ | ||
202 | #define IER_MIE (1 << 3) /* Modem Interrupt Enable */ | ||
203 | #define IER_RLSE (1 << 2) /* Receiver Line Status Interrupt Enable */ | ||
204 | #define IER_TIE (1 << 1) /* Transmit Data request Interrupt Enable */ | ||
205 | #define IER_RAVIE (1 << 0) /* Receiver Data Available Interrupt Enable */ | ||
206 | |||
207 | #define IIR_FIFOES1 (1 << 7) /* FIFO Mode Enable Status */ | ||
208 | #define IIR_FIFOES0 (1 << 6) /* FIFO Mode Enable Status */ | ||
209 | #define IIR_TOD (1 << 3) /* Time Out Detected */ | ||
210 | #define IIR_IID2 (1 << 2) /* Interrupt Source Encoded */ | ||
211 | #define IIR_IID1 (1 << 1) /* Interrupt Source Encoded */ | ||
212 | #define IIR_IP (1 << 0) /* Interrupt Pending (active low) */ | ||
213 | |||
214 | #define FCR_ITL2 (1 << 7) /* Interrupt Trigger Level */ | ||
215 | #define FCR_ITL1 (1 << 6) /* Interrupt Trigger Level */ | ||
216 | #define FCR_RESETTF (1 << 2) /* Reset Transmitter FIFO */ | ||
217 | #define FCR_RESETRF (1 << 1) /* Reset Receiver FIFO */ | ||
218 | #define FCR_TRFIFOE (1 << 0) /* Transmit and Receive FIFO Enable */ | ||
219 | #define FCR_ITL_1 (0) | ||
220 | #define FCR_ITL_8 (FCR_ITL1) | ||
221 | #define FCR_ITL_16 (FCR_ITL2) | ||
222 | #define FCR_ITL_32 (FCR_ITL2|FCR_ITL1) | ||
223 | |||
224 | #define LCR_DLAB (1 << 7) /* Divisor Latch Access Bit */ | ||
225 | #define LCR_SB (1 << 6) /* Set Break */ | ||
226 | #define LCR_STKYP (1 << 5) /* Sticky Parity */ | ||
227 | #define LCR_EPS (1 << 4) /* Even Parity Select */ | ||
228 | #define LCR_PEN (1 << 3) /* Parity Enable */ | ||
229 | #define LCR_STB (1 << 2) /* Stop Bit */ | ||
230 | #define LCR_WLS1 (1 << 1) /* Word Length Select */ | ||
231 | #define LCR_WLS0 (1 << 0) /* Word Length Select */ | ||
232 | |||
233 | #define LSR_FIFOE (1 << 7) /* FIFO Error Status */ | ||
234 | #define LSR_TEMT (1 << 6) /* Transmitter Empty */ | ||
235 | #define LSR_TDRQ (1 << 5) /* Transmit Data Request */ | ||
236 | #define LSR_BI (1 << 4) /* Break Interrupt */ | ||
237 | #define LSR_FE (1 << 3) /* Framing Error */ | ||
238 | #define LSR_PE (1 << 2) /* Parity Error */ | ||
239 | #define LSR_OE (1 << 1) /* Overrun Error */ | ||
240 | #define LSR_DR (1 << 0) /* Data Ready */ | ||
241 | |||
242 | #define MCR_LOOP (1 << 4) | ||
243 | #define MCR_OUT2 (1 << 3) /* force MSR_DCD in loopback mode */ | ||
244 | #define MCR_OUT1 (1 << 2) /* force MSR_RI in loopback mode */ | ||
245 | #define MCR_RTS (1 << 1) /* Request to Send */ | ||
246 | #define MCR_DTR (1 << 0) /* Data Terminal Ready */ | ||
247 | |||
248 | #define MSR_DCD (1 << 7) /* Data Carrier Detect */ | ||
249 | #define MSR_RI (1 << 6) /* Ring Indicator */ | ||
250 | #define MSR_DSR (1 << 5) /* Data Set Ready */ | ||
251 | #define MSR_CTS (1 << 4) /* Clear To Send */ | ||
252 | #define MSR_DDCD (1 << 3) /* Delta Data Carrier Detect */ | ||
253 | #define MSR_TERI (1 << 2) /* Trailing Edge Ring Indicator */ | ||
254 | #define MSR_DDSR (1 << 1) /* Delta Data Set Ready */ | ||
255 | #define MSR_DCTS (1 << 0) /* Delta Clear To Send */ | ||
256 | |||
257 | /* | ||
258 | * IrSR (Infrared Selection Register) | ||
259 | */ | ||
260 | #define STISR_RXPL (1 << 4) /* Receive Data Polarity */ | ||
261 | #define STISR_TXPL (1 << 3) /* Transmit Data Polarity */ | ||
262 | #define STISR_XMODE (1 << 2) /* Transmit Pulse Width Select */ | ||
263 | #define STISR_RCVEIR (1 << 1) /* Receiver SIR Enable */ | ||
264 | #define STISR_XMITIR (1 << 0) /* Transmitter SIR Enable */ | ||
265 | |||
266 | |||
267 | /* | ||
268 | * I2C registers - moved into drivers/i2c/busses/i2c-pxa.c | ||
269 | */ | ||
270 | |||
271 | /* | ||
272 | * Serial Audio Controller - moved into sound/soc/pxa/pxa2xx-i2s.c | ||
273 | */ | ||
274 | |||
275 | /* | ||
276 | * AC97 Controller registers | ||
277 | */ | ||
278 | |||
279 | #define POCR __REG(0x40500000) /* PCM Out Control Register */ | ||
280 | #define POCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */ | ||
281 | #define POCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
282 | |||
283 | #define PICR __REG(0x40500004) /* PCM In Control Register */ | ||
284 | #define PICR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */ | ||
285 | #define PICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
286 | |||
287 | #define MCCR __REG(0x40500008) /* Mic In Control Register */ | ||
288 | #define MCCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */ | ||
289 | #define MCCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
290 | |||
291 | #define GCR __REG(0x4050000C) /* Global Control Register */ | ||
292 | #ifdef CONFIG_PXA3xx | ||
293 | #define GCR_CLKBPB (1 << 31) /* Internal clock enable */ | ||
294 | #endif | ||
295 | #define GCR_nDMAEN (1 << 24) /* non DMA Enable */ | ||
296 | #define GCR_CDONE_IE (1 << 19) /* Command Done Interrupt Enable */ | ||
297 | #define GCR_SDONE_IE (1 << 18) /* Status Done Interrupt Enable */ | ||
298 | #define GCR_SECRDY_IEN (1 << 9) /* Secondary Ready Interrupt Enable */ | ||
299 | #define GCR_PRIRDY_IEN (1 << 8) /* Primary Ready Interrupt Enable */ | ||
300 | #define GCR_SECRES_IEN (1 << 5) /* Secondary Resume Interrupt Enable */ | ||
301 | #define GCR_PRIRES_IEN (1 << 4) /* Primary Resume Interrupt Enable */ | ||
302 | #define GCR_ACLINK_OFF (1 << 3) /* AC-link Shut Off */ | ||
303 | #define GCR_WARM_RST (1 << 2) /* AC97 Warm Reset */ | ||
304 | #define GCR_COLD_RST (1 << 1) /* AC'97 Cold Reset (0 = active) */ | ||
305 | #define GCR_GIE (1 << 0) /* Codec GPI Interrupt Enable */ | ||
306 | |||
307 | #define POSR __REG(0x40500010) /* PCM Out Status Register */ | ||
308 | #define POSR_FIFOE (1 << 4) /* FIFO error */ | ||
309 | #define POSR_FSR (1 << 2) /* FIFO Service Request */ | ||
310 | |||
311 | #define PISR __REG(0x40500014) /* PCM In Status Register */ | ||
312 | #define PISR_FIFOE (1 << 4) /* FIFO error */ | ||
313 | #define PISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */ | ||
314 | #define PISR_FSR (1 << 2) /* FIFO Service Request */ | ||
315 | |||
316 | #define MCSR __REG(0x40500018) /* Mic In Status Register */ | ||
317 | #define MCSR_FIFOE (1 << 4) /* FIFO error */ | ||
318 | #define MCSR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */ | ||
319 | #define MCSR_FSR (1 << 2) /* FIFO Service Request */ | ||
320 | |||
321 | #define GSR __REG(0x4050001C) /* Global Status Register */ | ||
322 | #define GSR_CDONE (1 << 19) /* Command Done */ | ||
323 | #define GSR_SDONE (1 << 18) /* Status Done */ | ||
324 | #define GSR_RDCS (1 << 15) /* Read Completion Status */ | ||
325 | #define GSR_BIT3SLT12 (1 << 14) /* Bit 3 of slot 12 */ | ||
326 | #define GSR_BIT2SLT12 (1 << 13) /* Bit 2 of slot 12 */ | ||
327 | #define GSR_BIT1SLT12 (1 << 12) /* Bit 1 of slot 12 */ | ||
328 | #define GSR_SECRES (1 << 11) /* Secondary Resume Interrupt */ | ||
329 | #define GSR_PRIRES (1 << 10) /* Primary Resume Interrupt */ | ||
330 | #define GSR_SCR (1 << 9) /* Secondary Codec Ready */ | ||
331 | #define GSR_PCR (1 << 8) /* Primary Codec Ready */ | ||
332 | #define GSR_MCINT (1 << 7) /* Mic In Interrupt */ | ||
333 | #define GSR_POINT (1 << 6) /* PCM Out Interrupt */ | ||
334 | #define GSR_PIINT (1 << 5) /* PCM In Interrupt */ | ||
335 | #define GSR_ACOFFD (1 << 3) /* AC-link Shut Off Done */ | ||
336 | #define GSR_MOINT (1 << 2) /* Modem Out Interrupt */ | ||
337 | #define GSR_MIINT (1 << 1) /* Modem In Interrupt */ | ||
338 | #define GSR_GSCI (1 << 0) /* Codec GPI Status Change Interrupt */ | ||
339 | |||
340 | #define CAR __REG(0x40500020) /* CODEC Access Register */ | ||
341 | #define CAR_CAIP (1 << 0) /* Codec Access In Progress */ | ||
342 | |||
343 | #define PCDR __REG(0x40500040) /* PCM FIFO Data Register */ | ||
344 | #define MCDR __REG(0x40500060) /* Mic-in FIFO Data Register */ | ||
345 | |||
346 | #define MOCR __REG(0x40500100) /* Modem Out Control Register */ | ||
347 | #define MOCR_FEIE (1 << 3) /* FIFO Error */ | ||
348 | #define MOCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
349 | |||
350 | #define MICR __REG(0x40500108) /* Modem In Control Register */ | ||
351 | #define MICR_FEIE (1 << 3) /* FIFO Error */ | ||
352 | #define MICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
353 | |||
354 | #define MOSR __REG(0x40500110) /* Modem Out Status Register */ | ||
355 | #define MOSR_FIFOE (1 << 4) /* FIFO error */ | ||
356 | #define MOSR_FSR (1 << 2) /* FIFO Service Request */ | ||
357 | |||
358 | #define MISR __REG(0x40500118) /* Modem In Status Register */ | ||
359 | #define MISR_FIFOE (1 << 4) /* FIFO error */ | ||
360 | #define MISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */ | ||
361 | #define MISR_FSR (1 << 2) /* FIFO Service Request */ | ||
362 | |||
363 | #define MODR __REG(0x40500140) /* Modem FIFO Data Register */ | ||
364 | |||
365 | #define PAC_REG_BASE __REG(0x40500200) /* Primary Audio Codec */ | ||
366 | #define SAC_REG_BASE __REG(0x40500300) /* Secondary Audio Codec */ | ||
367 | #define PMC_REG_BASE __REG(0x40500400) /* Primary Modem Codec */ | ||
368 | #define SMC_REG_BASE __REG(0x40500500) /* Secondary Modem Codec */ | ||
369 | |||
370 | |||
371 | /* | ||
372 | * Fast Infrared Communication Port | ||
373 | */ | ||
374 | |||
375 | #define FICP __REG(0x40800000) /* Start of FICP area */ | ||
376 | #define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */ | ||
377 | #define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */ | ||
378 | #define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */ | ||
379 | #define ICDR __REG(0x4080000c) /* ICP Data Register */ | ||
380 | #define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */ | ||
381 | #define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */ | ||
382 | |||
383 | #define ICCR0_AME (1 << 7) /* Address match enable */ | ||
384 | #define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */ | ||
385 | #define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */ | ||
386 | #define ICCR0_RXE (1 << 4) /* Receive enable */ | ||
387 | #define ICCR0_TXE (1 << 3) /* Transmit enable */ | ||
388 | #define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */ | ||
389 | #define ICCR0_LBM (1 << 1) /* Loopback mode */ | ||
390 | #define ICCR0_ITR (1 << 0) /* IrDA transmission */ | ||
391 | |||
392 | #define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */ | ||
393 | #define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */ | ||
394 | #define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */ | ||
395 | #define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */ | ||
396 | #define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */ | ||
397 | #define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */ | ||
398 | |||
399 | #ifdef CONFIG_PXA27x | ||
400 | #define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */ | ||
401 | #endif | ||
402 | #define ICSR0_FRE (1 << 5) /* Framing error */ | ||
403 | #define ICSR0_RFS (1 << 4) /* Receive FIFO service request */ | ||
404 | #define ICSR0_TFS (1 << 3) /* Transnit FIFO service request */ | ||
405 | #define ICSR0_RAB (1 << 2) /* Receiver abort */ | ||
406 | #define ICSR0_TUR (1 << 1) /* Trunsmit FIFO underun */ | ||
407 | #define ICSR0_EIF (1 << 0) /* End/Error in FIFO */ | ||
408 | |||
409 | #define ICSR1_ROR (1 << 6) /* Receiver FIFO underrun */ | ||
410 | #define ICSR1_CRE (1 << 5) /* CRC error */ | ||
411 | #define ICSR1_EOF (1 << 4) /* End of frame */ | ||
412 | #define ICSR1_TNF (1 << 3) /* Transmit FIFO not full */ | ||
413 | #define ICSR1_RNE (1 << 2) /* Receive FIFO not empty */ | ||
414 | #define ICSR1_TBY (1 << 1) /* Tramsmiter busy flag */ | ||
415 | #define ICSR1_RSY (1 << 0) /* Recevier synchronized flag */ | ||
416 | |||
417 | |||
418 | /* | 127 | /* |
419 | * Real Time Clock | 128 | * Real Time Clock |
420 | */ | 129 | */ |
@@ -463,19 +172,6 @@ | |||
463 | 172 | ||
464 | 173 | ||
465 | /* | 174 | /* |
466 | * Pulse Width Modulator | ||
467 | */ | ||
468 | |||
469 | #define PWM_CTRL0 __REG(0x40B00000) /* PWM 0 Control Register */ | ||
470 | #define PWM_PWDUTY0 __REG(0x40B00004) /* PWM 0 Duty Cycle Register */ | ||
471 | #define PWM_PERVAL0 __REG(0x40B00008) /* PWM 0 Period Control Register */ | ||
472 | |||
473 | #define PWM_CTRL1 __REG(0x40C00000) /* PWM 1Control Register */ | ||
474 | #define PWM_PWDUTY1 __REG(0x40C00004) /* PWM 1 Duty Cycle Register */ | ||
475 | #define PWM_PERVAL1 __REG(0x40C00008) /* PWM 1 Period Control Register */ | ||
476 | |||
477 | |||
478 | /* | ||
479 | * Interrupt Controller | 175 | * Interrupt Controller |
480 | */ | 176 | */ |
481 | 177 | ||
@@ -496,19 +192,6 @@ | |||
496 | * General Purpose I/O | 192 | * General Purpose I/O |
497 | */ | 193 | */ |
498 | 194 | ||
499 | #define GPIO0_BASE ((void __iomem *)io_p2v(0x40E00000)) | ||
500 | #define GPIO1_BASE ((void __iomem *)io_p2v(0x40E00004)) | ||
501 | #define GPIO2_BASE ((void __iomem *)io_p2v(0x40E00008)) | ||
502 | #define GPIO3_BASE ((void __iomem *)io_p2v(0x40E00100)) | ||
503 | |||
504 | #define GPLR_OFFSET 0x00 | ||
505 | #define GPDR_OFFSET 0x0C | ||
506 | #define GPSR_OFFSET 0x18 | ||
507 | #define GPCR_OFFSET 0x24 | ||
508 | #define GRER_OFFSET 0x30 | ||
509 | #define GFER_OFFSET 0x3C | ||
510 | #define GEDR_OFFSET 0x48 | ||
511 | |||
512 | #define GPLR0 __REG(0x40E00000) /* GPIO Pin-Level Register GPIO<31:0> */ | 195 | #define GPLR0 __REG(0x40E00000) /* GPIO Pin-Level Register GPIO<31:0> */ |
513 | #define GPLR1 __REG(0x40E00004) /* GPIO Pin-Level Register GPIO<63:32> */ | 196 | #define GPLR1 __REG(0x40E00004) /* GPIO Pin-Level Register GPIO<63:32> */ |
514 | #define GPLR2 __REG(0x40E00008) /* GPIO Pin-Level Register GPIO<80:64> */ | 197 | #define GPLR2 __REG(0x40E00008) /* GPIO Pin-Level Register GPIO<80:64> */ |
@@ -558,10 +241,6 @@ | |||
558 | 241 | ||
559 | #define GPIO_bit(x) (1 << ((x) & 0x1f)) | 242 | #define GPIO_bit(x) (1 << ((x) & 0x1f)) |
560 | 243 | ||
561 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | ||
562 | |||
563 | /* Interrupt Controller */ | ||
564 | |||
565 | #define _GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3) | 244 | #define _GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3) |
566 | #define _GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3) | 245 | #define _GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3) |
567 | #define _GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3) | 246 | #define _GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3) |
@@ -580,189 +259,5 @@ | |||
580 | #define GEDR(x) (*((((x) & 0x7f) < 96) ? &_GEDR(x) : &GEDR3)) | 259 | #define GEDR(x) (*((((x) & 0x7f) < 96) ? &_GEDR(x) : &GEDR3)) |
581 | #define GAFR(x) (*((((x) & 0x7f) < 96) ? &_GAFR(x) : \ | 260 | #define GAFR(x) (*((((x) & 0x7f) < 96) ? &_GAFR(x) : \ |
582 | ((((x) & 0x7f) < 112) ? &GAFR3_L : &GAFR3_U))) | 261 | ((((x) & 0x7f) < 112) ? &GAFR3_L : &GAFR3_U))) |
583 | #else | ||
584 | |||
585 | #define GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3) | ||
586 | #define GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3) | ||
587 | #define GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3) | ||
588 | #define GPCR(x) __REG2(0x40E00024, ((x) & 0x60) >> 3) | ||
589 | #define GRER(x) __REG2(0x40E00030, ((x) & 0x60) >> 3) | ||
590 | #define GFER(x) __REG2(0x40E0003C, ((x) & 0x60) >> 3) | ||
591 | #define GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3) | ||
592 | #define GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2) | ||
593 | |||
594 | #endif | ||
595 | |||
596 | /* | ||
597 | * Power Manager - see pxa2xx-regs.h | ||
598 | */ | ||
599 | |||
600 | /* | ||
601 | * SSP Serial Port Registers - see arch/arm/mach-pxa/include/mach/regs-ssp.h | ||
602 | */ | ||
603 | |||
604 | /* | ||
605 | * MultiMediaCard (MMC) controller - see drivers/mmc/host/pxamci.h | ||
606 | */ | ||
607 | |||
608 | /* | ||
609 | * Core Clock - see arch/arm/mach-pxa/include/mach/pxa2xx-regs.h | ||
610 | */ | ||
611 | |||
612 | #ifdef CONFIG_PXA27x | ||
613 | |||
614 | /* Camera Interface */ | ||
615 | #define CICR0 __REG(0x50000000) | ||
616 | #define CICR1 __REG(0x50000004) | ||
617 | #define CICR2 __REG(0x50000008) | ||
618 | #define CICR3 __REG(0x5000000C) | ||
619 | #define CICR4 __REG(0x50000010) | ||
620 | #define CISR __REG(0x50000014) | ||
621 | #define CIFR __REG(0x50000018) | ||
622 | #define CITOR __REG(0x5000001C) | ||
623 | #define CIBR0 __REG(0x50000028) | ||
624 | #define CIBR1 __REG(0x50000030) | ||
625 | #define CIBR2 __REG(0x50000038) | ||
626 | |||
627 | #define CICR0_DMAEN (1 << 31) /* DMA request enable */ | ||
628 | #define CICR0_PAR_EN (1 << 30) /* Parity enable */ | ||
629 | #define CICR0_SL_CAP_EN (1 << 29) /* Capture enable for slave mode */ | ||
630 | #define CICR0_ENB (1 << 28) /* Camera interface enable */ | ||
631 | #define CICR0_DIS (1 << 27) /* Camera interface disable */ | ||
632 | #define CICR0_SIM (0x7 << 24) /* Sensor interface mode mask */ | ||
633 | #define CICR0_TOM (1 << 9) /* Time-out mask */ | ||
634 | #define CICR0_RDAVM (1 << 8) /* Receive-data-available mask */ | ||
635 | #define CICR0_FEM (1 << 7) /* FIFO-empty mask */ | ||
636 | #define CICR0_EOLM (1 << 6) /* End-of-line mask */ | ||
637 | #define CICR0_PERRM (1 << 5) /* Parity-error mask */ | ||
638 | #define CICR0_QDM (1 << 4) /* Quick-disable mask */ | ||
639 | #define CICR0_CDM (1 << 3) /* Disable-done mask */ | ||
640 | #define CICR0_SOFM (1 << 2) /* Start-of-frame mask */ | ||
641 | #define CICR0_EOFM (1 << 1) /* End-of-frame mask */ | ||
642 | #define CICR0_FOM (1 << 0) /* FIFO-overrun mask */ | ||
643 | |||
644 | #define CICR1_TBIT (1 << 31) /* Transparency bit */ | ||
645 | #define CICR1_RGBT_CONV (0x3 << 29) /* RGBT conversion mask */ | ||
646 | #define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */ | ||
647 | #define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */ | ||
648 | #define CICR1_RGB_F (1 << 11) /* RGB format */ | ||
649 | #define CICR1_YCBCR_F (1 << 10) /* YCbCr format */ | ||
650 | #define CICR1_RGB_BPP (0x7 << 7) /* RGB bis per pixel mask */ | ||
651 | #define CICR1_RAW_BPP (0x3 << 5) /* Raw bis per pixel mask */ | ||
652 | #define CICR1_COLOR_SP (0x3 << 3) /* Color space mask */ | ||
653 | #define CICR1_DW (0x7 << 0) /* Data width mask */ | ||
654 | |||
655 | #define CICR2_BLW (0xff << 24) /* Beginning-of-line pixel clock | ||
656 | wait count mask */ | ||
657 | #define CICR2_ELW (0xff << 16) /* End-of-line pixel clock | ||
658 | wait count mask */ | ||
659 | #define CICR2_HSW (0x3f << 10) /* Horizontal sync pulse width mask */ | ||
660 | #define CICR2_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock | ||
661 | wait count mask */ | ||
662 | #define CICR2_FSW (0x7 << 0) /* Frame stabilization | ||
663 | wait count mask */ | ||
664 | |||
665 | #define CICR3_BFW (0xff << 24) /* Beginning-of-frame line clock | ||
666 | wait count mask */ | ||
667 | #define CICR3_EFW (0xff << 16) /* End-of-frame line clock | ||
668 | wait count mask */ | ||
669 | #define CICR3_VSW (0x3f << 10) /* Vertical sync pulse width mask */ | ||
670 | #define CICR3_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock | ||
671 | wait count mask */ | ||
672 | #define CICR3_LPF (0x7ff << 0) /* Lines per frame mask */ | ||
673 | |||
674 | #define CICR4_MCLK_DLY (0x3 << 24) /* MCLK Data Capture Delay mask */ | ||
675 | #define CICR4_PCLK_EN (1 << 23) /* Pixel clock enable */ | ||
676 | #define CICR4_PCP (1 << 22) /* Pixel clock polarity */ | ||
677 | #define CICR4_HSP (1 << 21) /* Horizontal sync polarity */ | ||
678 | #define CICR4_VSP (1 << 20) /* Vertical sync polarity */ | ||
679 | #define CICR4_MCLK_EN (1 << 19) /* MCLK enable */ | ||
680 | #define CICR4_FR_RATE (0x7 << 8) /* Frame rate mask */ | ||
681 | #define CICR4_DIV (0xff << 0) /* Clock divisor mask */ | ||
682 | |||
683 | #define CISR_FTO (1 << 15) /* FIFO time-out */ | ||
684 | #define CISR_RDAV_2 (1 << 14) /* Channel 2 receive data available */ | ||
685 | #define CISR_RDAV_1 (1 << 13) /* Channel 1 receive data available */ | ||
686 | #define CISR_RDAV_0 (1 << 12) /* Channel 0 receive data available */ | ||
687 | #define CISR_FEMPTY_2 (1 << 11) /* Channel 2 FIFO empty */ | ||
688 | #define CISR_FEMPTY_1 (1 << 10) /* Channel 1 FIFO empty */ | ||
689 | #define CISR_FEMPTY_0 (1 << 9) /* Channel 0 FIFO empty */ | ||
690 | #define CISR_EOL (1 << 8) /* End of line */ | ||
691 | #define CISR_PAR_ERR (1 << 7) /* Parity error */ | ||
692 | #define CISR_CQD (1 << 6) /* Camera interface quick disable */ | ||
693 | #define CISR_CDD (1 << 5) /* Camera interface disable done */ | ||
694 | #define CISR_SOF (1 << 4) /* Start of frame */ | ||
695 | #define CISR_EOF (1 << 3) /* End of frame */ | ||
696 | #define CISR_IFO_2 (1 << 2) /* FIFO overrun for Channel 2 */ | ||
697 | #define CISR_IFO_1 (1 << 1) /* FIFO overrun for Channel 1 */ | ||
698 | #define CISR_IFO_0 (1 << 0) /* FIFO overrun for Channel 0 */ | ||
699 | |||
700 | #define CIFR_FLVL2 (0x7f << 23) /* FIFO 2 level mask */ | ||
701 | #define CIFR_FLVL1 (0x7f << 16) /* FIFO 1 level mask */ | ||
702 | #define CIFR_FLVL0 (0xff << 8) /* FIFO 0 level mask */ | ||
703 | #define CIFR_THL_0 (0x3 << 4) /* Threshold Level for Channel 0 FIFO */ | ||
704 | #define CIFR_RESET_F (1 << 3) /* Reset input FIFOs */ | ||
705 | #define CIFR_FEN2 (1 << 2) /* FIFO enable for channel 2 */ | ||
706 | #define CIFR_FEN1 (1 << 1) /* FIFO enable for channel 1 */ | ||
707 | #define CIFR_FEN0 (1 << 0) /* FIFO enable for channel 0 */ | ||
708 | |||
709 | #define SRAM_SIZE 0x40000 /* 4x64K */ | ||
710 | |||
711 | #define SRAM_MEM_PHYS 0x5C000000 | ||
712 | |||
713 | #define IMPMCR __REG(0x58000000) /* IM Power Management Control Reg */ | ||
714 | #define IMPMSR __REG(0x58000008) /* IM Power Management Status Reg */ | ||
715 | |||
716 | #define IMPMCR_PC3 (0x3 << 22) /* Bank 3 Power Control */ | ||
717 | #define IMPMCR_PC3_RUN_MODE (0x0 << 22) /* Run mode */ | ||
718 | #define IMPMCR_PC3_STANDBY_MODE (0x1 << 22) /* Standby mode */ | ||
719 | #define IMPMCR_PC3_AUTO_MODE (0x3 << 22) /* Automatically controlled */ | ||
720 | |||
721 | #define IMPMCR_PC2 (0x3 << 20) /* Bank 2 Power Control */ | ||
722 | #define IMPMCR_PC2_RUN_MODE (0x0 << 20) /* Run mode */ | ||
723 | #define IMPMCR_PC2_STANDBY_MODE (0x1 << 20) /* Standby mode */ | ||
724 | #define IMPMCR_PC2_AUTO_MODE (0x3 << 20) /* Automatically controlled */ | ||
725 | |||
726 | #define IMPMCR_PC1 (0x3 << 18) /* Bank 1 Power Control */ | ||
727 | #define IMPMCR_PC1_RUN_MODE (0x0 << 18) /* Run mode */ | ||
728 | #define IMPMCR_PC1_STANDBY_MODE (0x1 << 18) /* Standby mode */ | ||
729 | #define IMPMCR_PC1_AUTO_MODE (0x3 << 18) /* Automatically controlled */ | ||
730 | |||
731 | #define IMPMCR_PC0 (0x3 << 16) /* Bank 0 Power Control */ | ||
732 | #define IMPMCR_PC0_RUN_MODE (0x0 << 16) /* Run mode */ | ||
733 | #define IMPMCR_PC0_STANDBY_MODE (0x1 << 16) /* Standby mode */ | ||
734 | #define IMPMCR_PC0_AUTO_MODE (0x3 << 16) /* Automatically controlled */ | ||
735 | |||
736 | #define IMPMCR_AW3 (1 << 11) /* Bank 3 Automatic Wake-up enable */ | ||
737 | #define IMPMCR_AW2 (1 << 10) /* Bank 2 Automatic Wake-up enable */ | ||
738 | #define IMPMCR_AW1 (1 << 9) /* Bank 1 Automatic Wake-up enable */ | ||
739 | #define IMPMCR_AW0 (1 << 8) /* Bank 0 Automatic Wake-up enable */ | ||
740 | |||
741 | #define IMPMCR_DST (0xFF << 0) /* Delay Standby Time, ms */ | ||
742 | |||
743 | #define IMPMSR_PS3 (0x3 << 6) /* Bank 3 Power Status: */ | ||
744 | #define IMPMSR_PS3_RUN_MODE (0x0 << 6) /* Run mode */ | ||
745 | #define IMPMSR_PS3_STANDBY_MODE (0x1 << 6) /* Standby mode */ | ||
746 | |||
747 | #define IMPMSR_PS2 (0x3 << 4) /* Bank 2 Power Status: */ | ||
748 | #define IMPMSR_PS2_RUN_MODE (0x0 << 4) /* Run mode */ | ||
749 | #define IMPMSR_PS2_STANDBY_MODE (0x1 << 4) /* Standby mode */ | ||
750 | |||
751 | #define IMPMSR_PS1 (0x3 << 2) /* Bank 1 Power Status: */ | ||
752 | #define IMPMSR_PS1_RUN_MODE (0x0 << 2) /* Run mode */ | ||
753 | #define IMPMSR_PS1_STANDBY_MODE (0x1 << 2) /* Standby mode */ | ||
754 | |||
755 | #define IMPMSR_PS0 (0x3 << 0) /* Bank 0 Power Status: */ | ||
756 | #define IMPMSR_PS0_RUN_MODE (0x0 << 0) /* Run mode */ | ||
757 | #define IMPMSR_PS0_STANDBY_MODE (0x1 << 0) /* Standby mode */ | ||
758 | |||
759 | #endif | ||
760 | |||
761 | /* PWRMODE register M field values */ | ||
762 | |||
763 | #define PWRMODE_IDLE 0x1 | ||
764 | #define PWRMODE_STANDBY 0x2 | ||
765 | #define PWRMODE_SLEEP 0x3 | ||
766 | #define PWRMODE_DEEPSLEEP 0x7 | ||
767 | 262 | ||
768 | #endif | 263 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h b/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h index 6ef1dd09970b..d83393e25273 100644 --- a/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h +++ b/arch/arm/mach-pxa/include/mach/pxa2xx-gpio.h | |||
@@ -365,4 +365,9 @@ | |||
365 | #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN) | 365 | #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN) |
366 | #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) | 366 | #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) |
367 | 367 | ||
368 | /* | ||
369 | * Handy routine to set GPIO alternate functions | ||
370 | */ | ||
371 | extern int pxa_gpio_mode( int gpio_mode ); | ||
372 | |||
368 | #endif /* __ASM_ARCH_PXA2XX_GPIO_H */ | 373 | #endif /* __ASM_ARCH_PXA2XX_GPIO_H */ |
diff --git a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h b/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h index 806ecfea44bf..77102d695cc7 100644 --- a/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h +++ b/arch/arm/mach-pxa/include/mach/pxa2xx-regs.h | |||
@@ -49,6 +49,11 @@ | |||
49 | #define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */ | 49 | #define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */ |
50 | #define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */ | 50 | #define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */ |
51 | 51 | ||
52 | #define MDCNFG_DE0 (1 << 0) /* SDRAM Bank 0 Enable */ | ||
53 | #define MDCNFG_DE1 (1 << 1) /* SDRAM Bank 1 Enable */ | ||
54 | #define MDCNFG_DE2 (1 << 16) /* SDRAM Bank 2 Enable */ | ||
55 | #define MDCNFG_DE3 (1 << 17) /* SDRAM Bank 3 Enable */ | ||
56 | |||
52 | #define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */ | 57 | #define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */ |
53 | #define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */ | 58 | #define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */ |
54 | #define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */ | 59 | #define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */ |
@@ -243,4 +248,11 @@ | |||
243 | #define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */ | 248 | #define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */ |
244 | #define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */ | 249 | #define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */ |
245 | 250 | ||
251 | /* PWRMODE register M field values */ | ||
252 | |||
253 | #define PWRMODE_IDLE 0x1 | ||
254 | #define PWRMODE_STANDBY 0x2 | ||
255 | #define PWRMODE_SLEEP 0x3 | ||
256 | #define PWRMODE_DEEPSLEEP 0x7 | ||
257 | |||
246 | #endif | 258 | #endif |
diff --git a/arch/arm/mach-pxa/include/mach/pxafb.h b/arch/arm/mach-pxa/include/mach/pxafb.h index cbda4d35c421..6932720ba04e 100644 --- a/arch/arm/mach-pxa/include/mach/pxafb.h +++ b/arch/arm/mach-pxa/include/mach/pxafb.h | |||
@@ -48,6 +48,7 @@ | |||
48 | #define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN) | 48 | #define LCD_MONO_DSTN_8BPP ((8 << 4) | LCD_TYPE_MONO_DSTN) |
49 | #define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN) | 49 | #define LCD_COLOR_STN_8BPP ((8 << 4) | LCD_TYPE_COLOR_STN) |
50 | #define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN) | 50 | #define LCD_COLOR_DSTN_16BPP ((16 << 4) | LCD_TYPE_COLOR_DSTN) |
51 | #define LCD_COLOR_TFT_8BPP ((8 << 4) | LCD_TYPE_COLOR_TFT) | ||
51 | #define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT) | 52 | #define LCD_COLOR_TFT_16BPP ((16 << 4) | LCD_TYPE_COLOR_TFT) |
52 | #define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT) | 53 | #define LCD_COLOR_TFT_18BPP ((18 << 4) | LCD_TYPE_COLOR_TFT) |
53 | #define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL) | 54 | #define LCD_SMART_PANEL_8BPP ((8 << 4) | LCD_TYPE_SMART_PANEL) |
@@ -94,6 +95,10 @@ struct pxafb_mode_info { | |||
94 | * in pxa27x and pxa3xx, initialize them to the same value or | 95 | * in pxa27x and pxa3xx, initialize them to the same value or |
95 | * the larger one will be used | 96 | * the larger one will be used |
96 | * 3. same to {rd,wr}_pulse_width | 97 | * 3. same to {rd,wr}_pulse_width |
98 | * | ||
99 | * 4. LCD_PCLK_EDGE_{RISE,FALL} controls the L_PCLK_WR polarity | ||
100 | * 5. sync & FB_SYNC_HOR_HIGH_ACT controls the L_LCLK_A0 | ||
101 | * 6. sync & FB_SYNC_VERT_HIGH_ACT controls the L_LCLK_RD | ||
97 | */ | 102 | */ |
98 | unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */ | 103 | unsigned a0csrd_set_hld; /* A0 and CS Setup/Hold Time before/after L_FCLK_RD */ |
99 | unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */ | 104 | unsigned a0cswr_set_hld; /* A0 and CS Setup/Hold Time before/after L_PCLK_WR */ |
@@ -108,6 +113,7 @@ struct pxafb_mach_info { | |||
108 | unsigned int num_modes; | 113 | unsigned int num_modes; |
109 | 114 | ||
110 | unsigned int lcd_conn; | 115 | unsigned int lcd_conn; |
116 | unsigned long video_mem_size; | ||
111 | 117 | ||
112 | u_int fixed_modes:1, | 118 | u_int fixed_modes:1, |
113 | cmap_inverse:1, | 119 | cmap_inverse:1, |
diff --git a/arch/arm/mach-pxa/include/mach/regs-ac97.h b/arch/arm/mach-pxa/include/mach/regs-ac97.h new file mode 100644 index 000000000000..e41b9d202b8c --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/regs-ac97.h | |||
@@ -0,0 +1,99 @@ | |||
1 | #ifndef __ASM_ARCH_REGS_AC97_H | ||
2 | #define __ASM_ARCH_REGS_AC97_H | ||
3 | |||
4 | /* | ||
5 | * AC97 Controller registers | ||
6 | */ | ||
7 | |||
8 | #define POCR __REG(0x40500000) /* PCM Out Control Register */ | ||
9 | #define POCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */ | ||
10 | #define POCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
11 | |||
12 | #define PICR __REG(0x40500004) /* PCM In Control Register */ | ||
13 | #define PICR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */ | ||
14 | #define PICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
15 | |||
16 | #define MCCR __REG(0x40500008) /* Mic In Control Register */ | ||
17 | #define MCCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */ | ||
18 | #define MCCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
19 | |||
20 | #define GCR __REG(0x4050000C) /* Global Control Register */ | ||
21 | #ifdef CONFIG_PXA3xx | ||
22 | #define GCR_CLKBPB (1 << 31) /* Internal clock enable */ | ||
23 | #endif | ||
24 | #define GCR_nDMAEN (1 << 24) /* non DMA Enable */ | ||
25 | #define GCR_CDONE_IE (1 << 19) /* Command Done Interrupt Enable */ | ||
26 | #define GCR_SDONE_IE (1 << 18) /* Status Done Interrupt Enable */ | ||
27 | #define GCR_SECRDY_IEN (1 << 9) /* Secondary Ready Interrupt Enable */ | ||
28 | #define GCR_PRIRDY_IEN (1 << 8) /* Primary Ready Interrupt Enable */ | ||
29 | #define GCR_SECRES_IEN (1 << 5) /* Secondary Resume Interrupt Enable */ | ||
30 | #define GCR_PRIRES_IEN (1 << 4) /* Primary Resume Interrupt Enable */ | ||
31 | #define GCR_ACLINK_OFF (1 << 3) /* AC-link Shut Off */ | ||
32 | #define GCR_WARM_RST (1 << 2) /* AC97 Warm Reset */ | ||
33 | #define GCR_COLD_RST (1 << 1) /* AC'97 Cold Reset (0 = active) */ | ||
34 | #define GCR_GIE (1 << 0) /* Codec GPI Interrupt Enable */ | ||
35 | |||
36 | #define POSR __REG(0x40500010) /* PCM Out Status Register */ | ||
37 | #define POSR_FIFOE (1 << 4) /* FIFO error */ | ||
38 | #define POSR_FSR (1 << 2) /* FIFO Service Request */ | ||
39 | |||
40 | #define PISR __REG(0x40500014) /* PCM In Status Register */ | ||
41 | #define PISR_FIFOE (1 << 4) /* FIFO error */ | ||
42 | #define PISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */ | ||
43 | #define PISR_FSR (1 << 2) /* FIFO Service Request */ | ||
44 | |||
45 | #define MCSR __REG(0x40500018) /* Mic In Status Register */ | ||
46 | #define MCSR_FIFOE (1 << 4) /* FIFO error */ | ||
47 | #define MCSR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */ | ||
48 | #define MCSR_FSR (1 << 2) /* FIFO Service Request */ | ||
49 | |||
50 | #define GSR __REG(0x4050001C) /* Global Status Register */ | ||
51 | #define GSR_CDONE (1 << 19) /* Command Done */ | ||
52 | #define GSR_SDONE (1 << 18) /* Status Done */ | ||
53 | #define GSR_RDCS (1 << 15) /* Read Completion Status */ | ||
54 | #define GSR_BIT3SLT12 (1 << 14) /* Bit 3 of slot 12 */ | ||
55 | #define GSR_BIT2SLT12 (1 << 13) /* Bit 2 of slot 12 */ | ||
56 | #define GSR_BIT1SLT12 (1 << 12) /* Bit 1 of slot 12 */ | ||
57 | #define GSR_SECRES (1 << 11) /* Secondary Resume Interrupt */ | ||
58 | #define GSR_PRIRES (1 << 10) /* Primary Resume Interrupt */ | ||
59 | #define GSR_SCR (1 << 9) /* Secondary Codec Ready */ | ||
60 | #define GSR_PCR (1 << 8) /* Primary Codec Ready */ | ||
61 | #define GSR_MCINT (1 << 7) /* Mic In Interrupt */ | ||
62 | #define GSR_POINT (1 << 6) /* PCM Out Interrupt */ | ||
63 | #define GSR_PIINT (1 << 5) /* PCM In Interrupt */ | ||
64 | #define GSR_ACOFFD (1 << 3) /* AC-link Shut Off Done */ | ||
65 | #define GSR_MOINT (1 << 2) /* Modem Out Interrupt */ | ||
66 | #define GSR_MIINT (1 << 1) /* Modem In Interrupt */ | ||
67 | #define GSR_GSCI (1 << 0) /* Codec GPI Status Change Interrupt */ | ||
68 | |||
69 | #define CAR __REG(0x40500020) /* CODEC Access Register */ | ||
70 | #define CAR_CAIP (1 << 0) /* Codec Access In Progress */ | ||
71 | |||
72 | #define PCDR __REG(0x40500040) /* PCM FIFO Data Register */ | ||
73 | #define MCDR __REG(0x40500060) /* Mic-in FIFO Data Register */ | ||
74 | |||
75 | #define MOCR __REG(0x40500100) /* Modem Out Control Register */ | ||
76 | #define MOCR_FEIE (1 << 3) /* FIFO Error */ | ||
77 | #define MOCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
78 | |||
79 | #define MICR __REG(0x40500108) /* Modem In Control Register */ | ||
80 | #define MICR_FEIE (1 << 3) /* FIFO Error */ | ||
81 | #define MICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */ | ||
82 | |||
83 | #define MOSR __REG(0x40500110) /* Modem Out Status Register */ | ||
84 | #define MOSR_FIFOE (1 << 4) /* FIFO error */ | ||
85 | #define MOSR_FSR (1 << 2) /* FIFO Service Request */ | ||
86 | |||
87 | #define MISR __REG(0x40500118) /* Modem In Status Register */ | ||
88 | #define MISR_FIFOE (1 << 4) /* FIFO error */ | ||
89 | #define MISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */ | ||
90 | #define MISR_FSR (1 << 2) /* FIFO Service Request */ | ||
91 | |||
92 | #define MODR __REG(0x40500140) /* Modem FIFO Data Register */ | ||
93 | |||
94 | #define PAC_REG_BASE __REG(0x40500200) /* Primary Audio Codec */ | ||
95 | #define SAC_REG_BASE __REG(0x40500300) /* Secondary Audio Codec */ | ||
96 | #define PMC_REG_BASE __REG(0x40500400) /* Primary Modem Codec */ | ||
97 | #define SMC_REG_BASE __REG(0x40500500) /* Secondary Modem Codec */ | ||
98 | |||
99 | #endif /* __ASM_ARCH_REGS_AC97_H */ | ||
diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h b/arch/arm/mach-pxa/include/mach/regs-lcd.h index c689c4ea769c..f82dcea792d9 100644 --- a/arch/arm/mach-pxa/include/mach/regs-lcd.h +++ b/arch/arm/mach-pxa/include/mach/regs-lcd.h | |||
@@ -12,27 +12,29 @@ | |||
12 | #define LCCR3 (0x00C) /* LCD Controller Control Register 3 */ | 12 | #define LCCR3 (0x00C) /* LCD Controller Control Register 3 */ |
13 | #define LCCR4 (0x010) /* LCD Controller Control Register 4 */ | 13 | #define LCCR4 (0x010) /* LCD Controller Control Register 4 */ |
14 | #define LCCR5 (0x014) /* LCD Controller Control Register 5 */ | 14 | #define LCCR5 (0x014) /* LCD Controller Control Register 5 */ |
15 | #define DFBR0 (0x020) /* DMA Channel 0 Frame Branch Register */ | 15 | #define LCSR (0x038) /* LCD Controller Status Register 0 */ |
16 | #define DFBR1 (0x024) /* DMA Channel 1 Frame Branch Register */ | 16 | #define LCSR1 (0x034) /* LCD Controller Status Register 1 */ |
17 | #define LCSR (0x038) /* LCD Controller Status Register */ | ||
18 | #define LIIDR (0x03C) /* LCD Controller Interrupt ID Register */ | 17 | #define LIIDR (0x03C) /* LCD Controller Interrupt ID Register */ |
19 | #define TMEDRGBR (0x040) /* TMED RGB Seed Register */ | 18 | #define TMEDRGBR (0x040) /* TMED RGB Seed Register */ |
20 | #define TMEDCR (0x044) /* TMED Control Register */ | 19 | #define TMEDCR (0x044) /* TMED Control Register */ |
21 | 20 | ||
21 | #define FBR0 (0x020) /* DMA Channel 0 Frame Branch Register */ | ||
22 | #define FBR1 (0x024) /* DMA Channel 1 Frame Branch Register */ | ||
23 | #define FBR2 (0x028) /* DMA Channel 2 Frame Branch Register */ | ||
24 | #define FBR3 (0x02C) /* DMA Channel 2 Frame Branch Register */ | ||
25 | #define FBR4 (0x030) /* DMA Channel 2 Frame Branch Register */ | ||
26 | #define FBR5 (0x110) /* DMA Channel 2 Frame Branch Register */ | ||
27 | #define FBR6 (0x114) /* DMA Channel 2 Frame Branch Register */ | ||
28 | |||
29 | #define OVL1C1 (0x050) /* Overlay 1 Control Register 1 */ | ||
30 | #define OVL1C2 (0x060) /* Overlay 1 Control Register 2 */ | ||
31 | #define OVL2C1 (0x070) /* Overlay 2 Control Register 1 */ | ||
32 | #define OVL2C2 (0x080) /* Overlay 2 Control Register 2 */ | ||
33 | |||
22 | #define CMDCR (0x100) /* Command Control Register */ | 34 | #define CMDCR (0x100) /* Command Control Register */ |
23 | #define PRSR (0x104) /* Panel Read Status Register */ | 35 | #define PRSR (0x104) /* Panel Read Status Register */ |
24 | 36 | ||
25 | #define LCCR3_1BPP (0 << 24) | 37 | #define LCCR3_BPP(x) ((((x) & 0x7) << 24) | (((x) & 0x8) ? (1 << 29) : 0)) |
26 | #define LCCR3_2BPP (1 << 24) | ||
27 | #define LCCR3_4BPP (2 << 24) | ||
28 | #define LCCR3_8BPP (3 << 24) | ||
29 | #define LCCR3_16BPP (4 << 24) | ||
30 | #define LCCR3_18BPP (5 << 24) | ||
31 | #define LCCR3_18BPP_P (6 << 24) | ||
32 | #define LCCR3_19BPP (7 << 24) | ||
33 | #define LCCR3_19BPP_P (1 << 29) | ||
34 | #define LCCR3_24BPP ((1 << 29) | (1 << 24)) | ||
35 | #define LCCR3_25BPP ((1 << 29) | (2 << 24)) | ||
36 | 38 | ||
37 | #define LCCR3_PDFOR_0 (0 << 30) | 39 | #define LCCR3_PDFOR_0 (0 << 30) |
38 | #define LCCR3_PDFOR_1 (1 << 30) | 40 | #define LCCR3_PDFOR_1 (1 << 30) |
@@ -42,19 +44,16 @@ | |||
42 | #define LCCR4_PAL_FOR_0 (0 << 15) | 44 | #define LCCR4_PAL_FOR_0 (0 << 15) |
43 | #define LCCR4_PAL_FOR_1 (1 << 15) | 45 | #define LCCR4_PAL_FOR_1 (1 << 15) |
44 | #define LCCR4_PAL_FOR_2 (2 << 15) | 46 | #define LCCR4_PAL_FOR_2 (2 << 15) |
47 | #define LCCR4_PAL_FOR_3 (3 << 15) | ||
45 | #define LCCR4_PAL_FOR_MASK (3 << 15) | 48 | #define LCCR4_PAL_FOR_MASK (3 << 15) |
46 | 49 | ||
47 | #define FDADR0 (0x200) /* DMA Channel 0 Frame Descriptor Address Register */ | 50 | #define FDADR0 (0x200) /* DMA Channel 0 Frame Descriptor Address Register */ |
48 | #define FSADR0 (0x204) /* DMA Channel 0 Frame Source Address Register */ | ||
49 | #define FIDR0 (0x208) /* DMA Channel 0 Frame ID Register */ | ||
50 | #define LDCMD0 (0x20C) /* DMA Channel 0 Command Register */ | ||
51 | #define FDADR1 (0x210) /* DMA Channel 1 Frame Descriptor Address Register */ | 51 | #define FDADR1 (0x210) /* DMA Channel 1 Frame Descriptor Address Register */ |
52 | #define FSADR1 (0x214) /* DMA Channel 1 Frame Source Address Register */ | 52 | #define FDADR2 (0x220) /* DMA Channel 2 Frame Descriptor Address Register */ |
53 | #define FIDR1 (0x218) /* DMA Channel 1 Frame ID Register */ | 53 | #define FDADR3 (0x230) /* DMA Channel 3 Frame Descriptor Address Register */ |
54 | #define LDCMD1 (0x21C) /* DMA Channel 1 Command Register */ | 54 | #define FDADR4 (0x240) /* DMA Channel 4 Frame Descriptor Address Register */ |
55 | #define FDADR5 (0x250) /* DMA Channel 5 Frame Descriptor Address Register */ | ||
55 | #define FDADR6 (0x260) /* DMA Channel 6 Frame Descriptor Address Register */ | 56 | #define FDADR6 (0x260) /* DMA Channel 6 Frame Descriptor Address Register */ |
56 | #define FSADR6 (0x264) /* DMA Channel 6 Frame Source Address Register */ | ||
57 | #define FIDR6 (0x268) /* DMA Channel 6 Frame ID Register */ | ||
58 | 57 | ||
59 | #define LCCR0_ENB (1 << 0) /* LCD Controller enable */ | 58 | #define LCCR0_ENB (1 << 0) /* LCD Controller enable */ |
60 | #define LCCR0_CMS (1 << 1) /* Color/Monochrome Display Select */ | 59 | #define LCCR0_CMS (1 << 1) /* Color/Monochrome Display Select */ |
@@ -126,9 +125,6 @@ | |||
126 | #define LCCR3_PCD Fld (8, 0) /* Pixel Clock Divisor */ | 125 | #define LCCR3_PCD Fld (8, 0) /* Pixel Clock Divisor */ |
127 | #define LCCR3_PixClkDiv(Div) (((Div) << FShft (LCCR3_PCD))) | 126 | #define LCCR3_PixClkDiv(Div) (((Div) << FShft (LCCR3_PCD))) |
128 | 127 | ||
129 | #define LCCR3_BPP Fld (3, 24) /* Bit Per Pixel */ | ||
130 | #define LCCR3_Bpp(Bpp) (((Bpp) << FShft (LCCR3_BPP))) | ||
131 | |||
132 | #define LCCR3_ACB Fld (8, 8) /* AC Bias */ | 128 | #define LCCR3_ACB Fld (8, 8) /* AC Bias */ |
133 | #define LCCR3_Acb(Acb) (((Acb) << FShft (LCCR3_ACB))) | 129 | #define LCCR3_Acb(Acb) (((Acb) << FShft (LCCR3_ACB))) |
134 | 130 | ||
@@ -157,8 +153,22 @@ | |||
157 | #define LCSR_RD_ST (1 << 11) /* read status */ | 153 | #define LCSR_RD_ST (1 << 11) /* read status */ |
158 | #define LCSR_CMD_INT (1 << 12) /* command interrupt */ | 154 | #define LCSR_CMD_INT (1 << 12) /* command interrupt */ |
159 | 155 | ||
156 | #define LCSR1_IU(x) (1 << ((x) + 23)) /* Input FIFO underrun */ | ||
157 | #define LCSR1_BS(x) (1 << ((x) + 15)) /* Branch Status */ | ||
158 | #define LCSR1_EOF(x) (1 << ((x) + 7)) /* End of Frame Status */ | ||
159 | #define LCSR1_SOF(x) (1 << ((x) - 1)) /* Start of Frame Status */ | ||
160 | |||
160 | #define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */ | 161 | #define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */ |
161 | 162 | ||
163 | /* overlay control registers */ | ||
164 | #define OVLxC1_PPL(x) ((((x) - 1) & 0x3ff) << 0) /* Pixels Per Line */ | ||
165 | #define OVLxC1_LPO(x) ((((x) - 1) & 0x3ff) << 10) /* Number of Lines */ | ||
166 | #define OVLxC1_BPP(x) (((x) & 0xf) << 20) /* Bits Per Pixel */ | ||
167 | #define OVLxC1_OEN (1 << 31) /* Enable bit for Overlay */ | ||
168 | #define OVLxC2_XPOS(x) (((x) & 0x3ff) << 0) /* Horizontal Position */ | ||
169 | #define OVLxC2_YPOS(x) (((x) & 0x3ff) << 10) /* Vertical Position */ | ||
170 | #define OVL2C2_PFOR(x) (((x) & 0x7) << 20) /* Pixel Format */ | ||
171 | |||
162 | /* smartpanel related */ | 172 | /* smartpanel related */ |
163 | #define PRSR_DATA(x) ((x) & 0xff) /* Panel Data */ | 173 | #define PRSR_DATA(x) ((x) & 0xff) /* Panel Data */ |
164 | #define PRSR_A0 (1 << 8) /* Read Data Source */ | 174 | #define PRSR_A0 (1 << 8) /* Read Data Source */ |
@@ -177,4 +187,11 @@ | |||
177 | 187 | ||
178 | #define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) | 188 | #define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff)) |
179 | #define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff)) | 189 | #define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff)) |
190 | |||
191 | /* SMART_DELAY() is introduced for software controlled delay primitive which | ||
192 | * can be inserted between command sequences, unused command 0x6 is used here | ||
193 | * and delay ranges from 0ms ~ 255ms | ||
194 | */ | ||
195 | #define SMART_CMD_DELAY (0x6 << 9) | ||
196 | #define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff)) | ||
180 | #endif /* __ASM_ARCH_REGS_LCD_H */ | 197 | #endif /* __ASM_ARCH_REGS_LCD_H */ |
diff --git a/arch/arm/mach-pxa/include/mach/regs-uart.h b/arch/arm/mach-pxa/include/mach/regs-uart.h new file mode 100644 index 000000000000..55aeb7fb72f6 --- /dev/null +++ b/arch/arm/mach-pxa/include/mach/regs-uart.h | |||
@@ -0,0 +1,143 @@ | |||
1 | #ifndef __ASM_ARCH_REGS_UART_H | ||
2 | #define __ASM_ARCH_REGS_UART_H | ||
3 | |||
4 | /* | ||
5 | * UARTs | ||
6 | */ | ||
7 | |||
8 | /* Full Function UART (FFUART) */ | ||
9 | #define FFUART FFRBR | ||
10 | #define FFRBR __REG(0x40100000) /* Receive Buffer Register (read only) */ | ||
11 | #define FFTHR __REG(0x40100000) /* Transmit Holding Register (write only) */ | ||
12 | #define FFIER __REG(0x40100004) /* Interrupt Enable Register (read/write) */ | ||
13 | #define FFIIR __REG(0x40100008) /* Interrupt ID Register (read only) */ | ||
14 | #define FFFCR __REG(0x40100008) /* FIFO Control Register (write only) */ | ||
15 | #define FFLCR __REG(0x4010000C) /* Line Control Register (read/write) */ | ||
16 | #define FFMCR __REG(0x40100010) /* Modem Control Register (read/write) */ | ||
17 | #define FFLSR __REG(0x40100014) /* Line Status Register (read only) */ | ||
18 | #define FFMSR __REG(0x40100018) /* Modem Status Register (read only) */ | ||
19 | #define FFSPR __REG(0x4010001C) /* Scratch Pad Register (read/write) */ | ||
20 | #define FFISR __REG(0x40100020) /* Infrared Selection Register (read/write) */ | ||
21 | #define FFDLL __REG(0x40100000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
22 | #define FFDLH __REG(0x40100004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
23 | |||
24 | /* Bluetooth UART (BTUART) */ | ||
25 | #define BTUART BTRBR | ||
26 | #define BTRBR __REG(0x40200000) /* Receive Buffer Register (read only) */ | ||
27 | #define BTTHR __REG(0x40200000) /* Transmit Holding Register (write only) */ | ||
28 | #define BTIER __REG(0x40200004) /* Interrupt Enable Register (read/write) */ | ||
29 | #define BTIIR __REG(0x40200008) /* Interrupt ID Register (read only) */ | ||
30 | #define BTFCR __REG(0x40200008) /* FIFO Control Register (write only) */ | ||
31 | #define BTLCR __REG(0x4020000C) /* Line Control Register (read/write) */ | ||
32 | #define BTMCR __REG(0x40200010) /* Modem Control Register (read/write) */ | ||
33 | #define BTLSR __REG(0x40200014) /* Line Status Register (read only) */ | ||
34 | #define BTMSR __REG(0x40200018) /* Modem Status Register (read only) */ | ||
35 | #define BTSPR __REG(0x4020001C) /* Scratch Pad Register (read/write) */ | ||
36 | #define BTISR __REG(0x40200020) /* Infrared Selection Register (read/write) */ | ||
37 | #define BTDLL __REG(0x40200000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
38 | #define BTDLH __REG(0x40200004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
39 | |||
40 | /* Standard UART (STUART) */ | ||
41 | #define STUART STRBR | ||
42 | #define STRBR __REG(0x40700000) /* Receive Buffer Register (read only) */ | ||
43 | #define STTHR __REG(0x40700000) /* Transmit Holding Register (write only) */ | ||
44 | #define STIER __REG(0x40700004) /* Interrupt Enable Register (read/write) */ | ||
45 | #define STIIR __REG(0x40700008) /* Interrupt ID Register (read only) */ | ||
46 | #define STFCR __REG(0x40700008) /* FIFO Control Register (write only) */ | ||
47 | #define STLCR __REG(0x4070000C) /* Line Control Register (read/write) */ | ||
48 | #define STMCR __REG(0x40700010) /* Modem Control Register (read/write) */ | ||
49 | #define STLSR __REG(0x40700014) /* Line Status Register (read only) */ | ||
50 | #define STMSR __REG(0x40700018) /* Reserved */ | ||
51 | #define STSPR __REG(0x4070001C) /* Scratch Pad Register (read/write) */ | ||
52 | #define STISR __REG(0x40700020) /* Infrared Selection Register (read/write) */ | ||
53 | #define STDLL __REG(0x40700000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
54 | #define STDLH __REG(0x40700004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
55 | |||
56 | /* Hardware UART (HWUART) */ | ||
57 | #define HWUART HWRBR | ||
58 | #define HWRBR __REG(0x41600000) /* Receive Buffer Register (read only) */ | ||
59 | #define HWTHR __REG(0x41600000) /* Transmit Holding Register (write only) */ | ||
60 | #define HWIER __REG(0x41600004) /* Interrupt Enable Register (read/write) */ | ||
61 | #define HWIIR __REG(0x41600008) /* Interrupt ID Register (read only) */ | ||
62 | #define HWFCR __REG(0x41600008) /* FIFO Control Register (write only) */ | ||
63 | #define HWLCR __REG(0x4160000C) /* Line Control Register (read/write) */ | ||
64 | #define HWMCR __REG(0x41600010) /* Modem Control Register (read/write) */ | ||
65 | #define HWLSR __REG(0x41600014) /* Line Status Register (read only) */ | ||
66 | #define HWMSR __REG(0x41600018) /* Modem Status Register (read only) */ | ||
67 | #define HWSPR __REG(0x4160001C) /* Scratch Pad Register (read/write) */ | ||
68 | #define HWISR __REG(0x41600020) /* Infrared Selection Register (read/write) */ | ||
69 | #define HWFOR __REG(0x41600024) /* Receive FIFO Occupancy Register (read only) */ | ||
70 | #define HWABR __REG(0x41600028) /* Auto-Baud Control Register (read/write) */ | ||
71 | #define HWACR __REG(0x4160002C) /* Auto-Baud Count Register (read only) */ | ||
72 | #define HWDLL __REG(0x41600000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */ | ||
73 | #define HWDLH __REG(0x41600004) /* Divisor Latch High Register (DLAB = 1) (read/write) */ | ||
74 | |||
75 | #define IER_DMAE (1 << 7) /* DMA Requests Enable */ | ||
76 | #define IER_UUE (1 << 6) /* UART Unit Enable */ | ||
77 | #define IER_NRZE (1 << 5) /* NRZ coding Enable */ | ||
78 | #define IER_RTIOE (1 << 4) /* Receiver Time Out Interrupt Enable */ | ||
79 | #define IER_MIE (1 << 3) /* Modem Interrupt Enable */ | ||
80 | #define IER_RLSE (1 << 2) /* Receiver Line Status Interrupt Enable */ | ||
81 | #define IER_TIE (1 << 1) /* Transmit Data request Interrupt Enable */ | ||
82 | #define IER_RAVIE (1 << 0) /* Receiver Data Available Interrupt Enable */ | ||
83 | |||
84 | #define IIR_FIFOES1 (1 << 7) /* FIFO Mode Enable Status */ | ||
85 | #define IIR_FIFOES0 (1 << 6) /* FIFO Mode Enable Status */ | ||
86 | #define IIR_TOD (1 << 3) /* Time Out Detected */ | ||
87 | #define IIR_IID2 (1 << 2) /* Interrupt Source Encoded */ | ||
88 | #define IIR_IID1 (1 << 1) /* Interrupt Source Encoded */ | ||
89 | #define IIR_IP (1 << 0) /* Interrupt Pending (active low) */ | ||
90 | |||
91 | #define FCR_ITL2 (1 << 7) /* Interrupt Trigger Level */ | ||
92 | #define FCR_ITL1 (1 << 6) /* Interrupt Trigger Level */ | ||
93 | #define FCR_RESETTF (1 << 2) /* Reset Transmitter FIFO */ | ||
94 | #define FCR_RESETRF (1 << 1) /* Reset Receiver FIFO */ | ||
95 | #define FCR_TRFIFOE (1 << 0) /* Transmit and Receive FIFO Enable */ | ||
96 | #define FCR_ITL_1 (0) | ||
97 | #define FCR_ITL_8 (FCR_ITL1) | ||
98 | #define FCR_ITL_16 (FCR_ITL2) | ||
99 | #define FCR_ITL_32 (FCR_ITL2|FCR_ITL1) | ||
100 | |||
101 | #define LCR_DLAB (1 << 7) /* Divisor Latch Access Bit */ | ||
102 | #define LCR_SB (1 << 6) /* Set Break */ | ||
103 | #define LCR_STKYP (1 << 5) /* Sticky Parity */ | ||
104 | #define LCR_EPS (1 << 4) /* Even Parity Select */ | ||
105 | #define LCR_PEN (1 << 3) /* Parity Enable */ | ||
106 | #define LCR_STB (1 << 2) /* Stop Bit */ | ||
107 | #define LCR_WLS1 (1 << 1) /* Word Length Select */ | ||
108 | #define LCR_WLS0 (1 << 0) /* Word Length Select */ | ||
109 | |||
110 | #define LSR_FIFOE (1 << 7) /* FIFO Error Status */ | ||
111 | #define LSR_TEMT (1 << 6) /* Transmitter Empty */ | ||
112 | #define LSR_TDRQ (1 << 5) /* Transmit Data Request */ | ||
113 | #define LSR_BI (1 << 4) /* Break Interrupt */ | ||
114 | #define LSR_FE (1 << 3) /* Framing Error */ | ||
115 | #define LSR_PE (1 << 2) /* Parity Error */ | ||
116 | #define LSR_OE (1 << 1) /* Overrun Error */ | ||
117 | #define LSR_DR (1 << 0) /* Data Ready */ | ||
118 | |||
119 | #define MCR_LOOP (1 << 4) | ||
120 | #define MCR_OUT2 (1 << 3) /* force MSR_DCD in loopback mode */ | ||
121 | #define MCR_OUT1 (1 << 2) /* force MSR_RI in loopback mode */ | ||
122 | #define MCR_RTS (1 << 1) /* Request to Send */ | ||
123 | #define MCR_DTR (1 << 0) /* Data Terminal Ready */ | ||
124 | |||
125 | #define MSR_DCD (1 << 7) /* Data Carrier Detect */ | ||
126 | #define MSR_RI (1 << 6) /* Ring Indicator */ | ||
127 | #define MSR_DSR (1 << 5) /* Data Set Ready */ | ||
128 | #define MSR_CTS (1 << 4) /* Clear To Send */ | ||
129 | #define MSR_DDCD (1 << 3) /* Delta Data Carrier Detect */ | ||
130 | #define MSR_TERI (1 << 2) /* Trailing Edge Ring Indicator */ | ||
131 | #define MSR_DDSR (1 << 1) /* Delta Data Set Ready */ | ||
132 | #define MSR_DCTS (1 << 0) /* Delta Clear To Send */ | ||
133 | |||
134 | /* | ||
135 | * IrSR (Infrared Selection Register) | ||
136 | */ | ||
137 | #define STISR_RXPL (1 << 4) /* Receive Data Polarity */ | ||
138 | #define STISR_TXPL (1 << 3) /* Transmit Data Polarity */ | ||
139 | #define STISR_XMODE (1 << 2) /* Transmit Pulse Width Select */ | ||
140 | #define STISR_RCVEIR (1 << 1) /* Receiver SIR Enable */ | ||
141 | #define STISR_XMITIR (1 << 0) /* Transmitter SIR Enable */ | ||
142 | |||
143 | #endif /* __ASM_ARCH_REGS_UART_H */ | ||
diff --git a/arch/arm/mach-pxa/include/mach/timex.h b/arch/arm/mach-pxa/include/mach/timex.h index b05fc6683c47..af6760a50e1a 100644 --- a/arch/arm/mach-pxa/include/mach/timex.h +++ b/arch/arm/mach-pxa/include/mach/timex.h | |||
@@ -10,6 +10,14 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | /* Various drivers are still using the constant of CLOCK_TICK_RATE, for | ||
14 | * those drivers to at least work, the definition is provided here. | ||
15 | * | ||
16 | * NOTE: this is no longer accurate when multiple processors and boards | ||
17 | * are selected, newer drivers should not depend on this any more. Use | ||
18 | * either the clocksource/clockevent or get this at run-time by calling | ||
19 | * get_clock_tick_rate() (as defined in generic.c). | ||
20 | */ | ||
13 | 21 | ||
14 | #if defined(CONFIG_PXA25x) | 22 | #if defined(CONFIG_PXA25x) |
15 | /* PXA250/210 timer base */ | 23 | /* PXA250/210 timer base */ |
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h index 21e3e890af98..f4b029c03957 100644 --- a/arch/arm/mach-pxa/include/mach/uncompress.h +++ b/arch/arm/mach-pxa/include/mach/uncompress.h | |||
@@ -10,7 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/serial_reg.h> | 12 | #include <linux/serial_reg.h> |
13 | #include <mach/pxa-regs.h> | 13 | #include <mach/regs-uart.h> |
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
15 | 15 | ||
16 | #define __REG(x) ((volatile unsigned long *)x) | 16 | #define __REG(x) ((volatile unsigned long *)x) |
@@ -35,7 +35,7 @@ static inline void flush(void) | |||
35 | 35 | ||
36 | static inline void arch_decomp_setup(void) | 36 | static inline void arch_decomp_setup(void) |
37 | { | 37 | { |
38 | if (machine_is_littleton()) | 38 | if (machine_is_littleton() || machine_is_intelmote2()) |
39 | UART = STUART; | 39 | UART = STUART; |
40 | } | 40 | } |
41 | 41 | ||
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index b4d00aba0e31..31da7f3c06f6 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -20,8 +20,13 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/clk.h> | 22 | #include <linux/clk.h> |
23 | #include <linux/gpio.h> | ||
23 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
24 | #include <linux/smc91x.h> | 25 | #include <linux/smc91x.h> |
26 | #include <linux/i2c.h> | ||
27 | #include <linux/leds.h> | ||
28 | #include <linux/mfd/da903x.h> | ||
29 | #include <linux/i2c/max732x.h> | ||
25 | 30 | ||
26 | #include <asm/types.h> | 31 | #include <asm/types.h> |
27 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
@@ -36,10 +41,10 @@ | |||
36 | 41 | ||
37 | #include <mach/pxa-regs.h> | 42 | #include <mach/pxa-regs.h> |
38 | #include <mach/mfp-pxa300.h> | 43 | #include <mach/mfp-pxa300.h> |
39 | #include <mach/gpio.h> | ||
40 | #include <mach/pxafb.h> | 44 | #include <mach/pxafb.h> |
41 | #include <mach/ssp.h> | 45 | #include <mach/ssp.h> |
42 | #include <mach/pxa2xx_spi.h> | 46 | #include <mach/pxa2xx_spi.h> |
47 | #include <mach/i2c.h> | ||
43 | #include <mach/pxa27x_keypad.h> | 48 | #include <mach/pxa27x_keypad.h> |
44 | #include <mach/pxa3xx_nand.h> | 49 | #include <mach/pxa3xx_nand.h> |
45 | #include <mach/littleton.h> | 50 | #include <mach/littleton.h> |
@@ -314,6 +319,73 @@ static void __init littleton_init_nand(void) | |||
314 | static inline void littleton_init_nand(void) {} | 319 | static inline void littleton_init_nand(void) {} |
315 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ | 320 | #endif /* CONFIG_MTD_NAND_PXA3xx || CONFIG_MTD_NAND_PXA3xx_MODULE */ |
316 | 321 | ||
322 | #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) | ||
323 | static struct led_info littleton_da9034_leds[] = { | ||
324 | [0] = { | ||
325 | .name = "littleton:keypad1", | ||
326 | .flags = DA9034_LED_RAMP, | ||
327 | }, | ||
328 | [1] = { | ||
329 | .name = "littleton:keypad2", | ||
330 | .flags = DA9034_LED_RAMP, | ||
331 | }, | ||
332 | [2] = { | ||
333 | .name = "littleton:vibra", | ||
334 | .flags = 0, | ||
335 | }, | ||
336 | }; | ||
337 | |||
338 | static struct da903x_subdev_info littleton_da9034_subdevs[] = { | ||
339 | { | ||
340 | .name = "da903x-led", | ||
341 | .id = DA9034_ID_LED_1, | ||
342 | .platform_data = &littleton_da9034_leds[0], | ||
343 | }, { | ||
344 | .name = "da903x-led", | ||
345 | .id = DA9034_ID_LED_2, | ||
346 | .platform_data = &littleton_da9034_leds[1], | ||
347 | }, { | ||
348 | .name = "da903x-led", | ||
349 | .id = DA9034_ID_VIBRA, | ||
350 | .platform_data = &littleton_da9034_leds[2], | ||
351 | }, { | ||
352 | .name = "da903x-backlight", | ||
353 | .id = DA9034_ID_WLED, | ||
354 | }, | ||
355 | }; | ||
356 | |||
357 | static struct da903x_platform_data littleton_da9034_info = { | ||
358 | .num_subdevs = ARRAY_SIZE(littleton_da9034_subdevs), | ||
359 | .subdevs = littleton_da9034_subdevs, | ||
360 | }; | ||
361 | |||
362 | static struct max732x_platform_data littleton_max7320_info = { | ||
363 | .gpio_base = EXT0_GPIO_BASE, | ||
364 | }; | ||
365 | |||
366 | static struct i2c_board_info littleton_i2c_info[] = { | ||
367 | [0] = { | ||
368 | .type = "da9034", | ||
369 | .addr = 0x34, | ||
370 | .platform_data = &littleton_da9034_info, | ||
371 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO18)), | ||
372 | }, | ||
373 | [1] = { | ||
374 | .type = "max7320", | ||
375 | .addr = 0x50, | ||
376 | .platform_data = &littleton_max7320_info, | ||
377 | }, | ||
378 | }; | ||
379 | |||
380 | static void __init littleton_init_i2c(void) | ||
381 | { | ||
382 | pxa_set_i2c_info(NULL); | ||
383 | i2c_register_board_info(0, ARRAY_AND_SIZE(littleton_i2c_info)); | ||
384 | } | ||
385 | #else | ||
386 | static inline void littleton_init_i2c(void) {} | ||
387 | #endif /* CONFIG_I2C_PXA || CONFIG_I2C_PXA_MODULE */ | ||
388 | |||
317 | static void __init littleton_init(void) | 389 | static void __init littleton_init(void) |
318 | { | 390 | { |
319 | /* initialize MFP configurations */ | 391 | /* initialize MFP configurations */ |
@@ -326,6 +398,7 @@ static void __init littleton_init(void) | |||
326 | platform_device_register(&smc91x_device); | 398 | platform_device_register(&smc91x_device); |
327 | 399 | ||
328 | littleton_init_spi(); | 400 | littleton_init_spi(); |
401 | littleton_init_i2c(); | ||
329 | littleton_init_lcd(); | 402 | littleton_init_lcd(); |
330 | littleton_init_keypad(); | 403 | littleton_init_keypad(); |
331 | littleton_init_nand(); | 404 | littleton_init_nand(); |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 519138bc5f85..21b821e1a60d 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -123,6 +123,10 @@ static unsigned long magician_pin_config[] __initdata = { | |||
123 | GPIO107_GPIO, /* DS1WM_IRQ */ | 123 | GPIO107_GPIO, /* DS1WM_IRQ */ |
124 | GPIO108_GPIO, /* GSM_READY */ | 124 | GPIO108_GPIO, /* GSM_READY */ |
125 | GPIO115_GPIO, /* nPEN_IRQ */ | 125 | GPIO115_GPIO, /* nPEN_IRQ */ |
126 | |||
127 | /* I2C */ | ||
128 | GPIO117_I2C_SCL, | ||
129 | GPIO118_I2C_SDA, | ||
126 | }; | 130 | }; |
127 | 131 | ||
128 | /* | 132 | /* |
@@ -332,8 +336,7 @@ static struct pxafb_mach_info toppoly_info = { | |||
332 | .modes = toppoly_modes, | 336 | .modes = toppoly_modes, |
333 | .num_modes = 1, | 337 | .num_modes = 1, |
334 | .fixed_modes = 1, | 338 | .fixed_modes = 1, |
335 | .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | 339 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
336 | .lccr3 = LCCR3_PixRsEdg, | ||
337 | .pxafb_lcd_power = toppoly_lcd_power, | 340 | .pxafb_lcd_power = toppoly_lcd_power, |
338 | }; | 341 | }; |
339 | 342 | ||
@@ -341,8 +344,8 @@ static struct pxafb_mach_info samsung_info = { | |||
341 | .modes = samsung_modes, | 344 | .modes = samsung_modes, |
342 | .num_modes = 1, | 345 | .num_modes = 1, |
343 | .fixed_modes = 1, | 346 | .fixed_modes = 1, |
344 | .lccr0 = LCCR0_LDDALT | LCCR0_Color | LCCR0_Sngl | LCCR0_Act, | 347 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL |\ |
345 | .lccr3 = LCCR3_PixFlEdg, | 348 | LCD_ALTERNATE_MAPPING, |
346 | .pxafb_lcd_power = samsung_lcd_power, | 349 | .pxafb_lcd_power = samsung_lcd_power, |
347 | }; | 350 | }; |
348 | 351 | ||
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index f2c7ad8f2b6b..5f224968043c 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -128,6 +128,10 @@ static unsigned long mainstone_pin_config[] = { | |||
128 | GPIO108_KP_MKOUT_5, | 128 | GPIO108_KP_MKOUT_5, |
129 | GPIO96_KP_MKOUT_6, | 129 | GPIO96_KP_MKOUT_6, |
130 | 130 | ||
131 | /* I2C */ | ||
132 | GPIO117_I2C_SCL, | ||
133 | GPIO118_I2C_SDA, | ||
134 | |||
131 | /* GPIO */ | 135 | /* GPIO */ |
132 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, | 136 | GPIO1_GPIO | WAKEUP_ON_EDGE_BOTH, |
133 | }; | 137 | }; |
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c index 2061c00c8ead..33626de8cbf6 100644 --- a/arch/arm/mach-pxa/mfp-pxa2xx.c +++ b/arch/arm/mach-pxa/mfp-pxa2xx.c | |||
@@ -38,12 +38,13 @@ struct gpio_desc { | |||
38 | unsigned valid : 1; | 38 | unsigned valid : 1; |
39 | unsigned can_wakeup : 1; | 39 | unsigned can_wakeup : 1; |
40 | unsigned keypad_gpio : 1; | 40 | unsigned keypad_gpio : 1; |
41 | unsigned dir_inverted : 1; | ||
41 | unsigned int mask; /* bit mask in PWER or PKWR */ | 42 | unsigned int mask; /* bit mask in PWER or PKWR */ |
43 | unsigned int mux_mask; /* bit mask of muxed gpio bits, 0 if no mux */ | ||
42 | unsigned long config; | 44 | unsigned long config; |
43 | }; | 45 | }; |
44 | 46 | ||
45 | static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1]; | 47 | static struct gpio_desc gpio_desc[MFP_PIN_GPIO127 + 1]; |
46 | static int gpio_nr; | ||
47 | 48 | ||
48 | static unsigned long gpdr_lpm[4]; | 49 | static unsigned long gpdr_lpm[4]; |
49 | 50 | ||
@@ -54,7 +55,7 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c) | |||
54 | int uorl = !!(gpio & 0x10); /* GAFRx_U or GAFRx_L ? */ | 55 | int uorl = !!(gpio & 0x10); /* GAFRx_U or GAFRx_L ? */ |
55 | int shft = (gpio & 0xf) << 1; | 56 | int shft = (gpio & 0xf) << 1; |
56 | int fn = MFP_AF(c); | 57 | int fn = MFP_AF(c); |
57 | int dir = c & MFP_DIR_OUT; | 58 | int is_out = (c & MFP_DIR_OUT) ? 1 : 0; |
58 | 59 | ||
59 | if (fn > 3) | 60 | if (fn > 3) |
60 | return -EINVAL; | 61 | return -EINVAL; |
@@ -68,7 +69,7 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c) | |||
68 | else | 69 | else |
69 | GAFR_U(bank) = gafr; | 70 | GAFR_U(bank) = gafr; |
70 | 71 | ||
71 | if (dir == MFP_DIR_OUT) | 72 | if (is_out ^ gpio_desc[gpio].dir_inverted) |
72 | GPDR(gpio) |= mask; | 73 | GPDR(gpio) |= mask; |
73 | else | 74 | else |
74 | GPDR(gpio) &= ~mask; | 75 | GPDR(gpio) &= ~mask; |
@@ -77,11 +78,11 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c) | |||
77 | switch (c & MFP_LPM_STATE_MASK) { | 78 | switch (c & MFP_LPM_STATE_MASK) { |
78 | case MFP_LPM_DRIVE_HIGH: | 79 | case MFP_LPM_DRIVE_HIGH: |
79 | PGSR(bank) |= mask; | 80 | PGSR(bank) |= mask; |
80 | dir = MFP_DIR_OUT; | 81 | is_out = 1; |
81 | break; | 82 | break; |
82 | case MFP_LPM_DRIVE_LOW: | 83 | case MFP_LPM_DRIVE_LOW: |
83 | PGSR(bank) &= ~mask; | 84 | PGSR(bank) &= ~mask; |
84 | dir = MFP_DIR_OUT; | 85 | is_out = 1; |
85 | break; | 86 | break; |
86 | case MFP_LPM_DEFAULT: | 87 | case MFP_LPM_DEFAULT: |
87 | break; | 88 | break; |
@@ -92,7 +93,7 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c) | |||
92 | break; | 93 | break; |
93 | } | 94 | } |
94 | 95 | ||
95 | if (dir == MFP_DIR_OUT) | 96 | if (is_out ^ gpio_desc[gpio].dir_inverted) |
96 | gpdr_lpm[bank] |= mask; | 97 | gpdr_lpm[bank] |= mask; |
97 | else | 98 | else |
98 | gpdr_lpm[bank] &= ~mask; | 99 | gpdr_lpm[bank] &= ~mask; |
@@ -106,7 +107,7 @@ static int __mfp_config_gpio(unsigned gpio, unsigned long c) | |||
106 | return -EINVAL; | 107 | return -EINVAL; |
107 | } | 108 | } |
108 | 109 | ||
109 | if ((c & MFP_LPM_CAN_WAKEUP) && (dir == MFP_DIR_OUT)) { | 110 | if ((c & MFP_LPM_CAN_WAKEUP) && is_out) { |
110 | pr_warning("%s: output GPIO%d unable to wakeup\n", | 111 | pr_warning("%s: output GPIO%d unable to wakeup\n", |
111 | __func__, gpio); | 112 | __func__, gpio); |
112 | return -EINVAL; | 113 | return -EINVAL; |
@@ -169,7 +170,7 @@ void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm) | |||
169 | int gpio_set_wake(unsigned int gpio, unsigned int on) | 170 | int gpio_set_wake(unsigned int gpio, unsigned int on) |
170 | { | 171 | { |
171 | struct gpio_desc *d; | 172 | struct gpio_desc *d; |
172 | unsigned long c; | 173 | unsigned long c, mux_taken; |
173 | 174 | ||
174 | if (gpio > mfp_to_gpio(MFP_PIN_GPIO127)) | 175 | if (gpio > mfp_to_gpio(MFP_PIN_GPIO127)) |
175 | return -EINVAL; | 176 | return -EINVAL; |
@@ -183,9 +184,13 @@ int gpio_set_wake(unsigned int gpio, unsigned int on) | |||
183 | if (d->keypad_gpio) | 184 | if (d->keypad_gpio) |
184 | return -EINVAL; | 185 | return -EINVAL; |
185 | 186 | ||
187 | mux_taken = (PWER & d->mux_mask) & (~d->mask); | ||
188 | if (on && mux_taken) | ||
189 | return -EBUSY; | ||
190 | |||
186 | if (d->can_wakeup && (c & MFP_LPM_CAN_WAKEUP)) { | 191 | if (d->can_wakeup && (c & MFP_LPM_CAN_WAKEUP)) { |
187 | if (on) { | 192 | if (on) { |
188 | PWER |= d->mask; | 193 | PWER = (PWER & ~d->mux_mask) | d->mask; |
189 | 194 | ||
190 | if (c & MFP_LPM_EDGE_RISE) | 195 | if (c & MFP_LPM_EDGE_RISE) |
191 | PRER |= d->mask; | 196 | PRER |= d->mask; |
@@ -210,7 +215,7 @@ static void __init pxa25x_mfp_init(void) | |||
210 | { | 215 | { |
211 | int i; | 216 | int i; |
212 | 217 | ||
213 | for (i = 0; i <= 84; i++) | 218 | for (i = 0; i <= pxa_last_gpio; i++) |
214 | gpio_desc[i].valid = 1; | 219 | gpio_desc[i].valid = 1; |
215 | 220 | ||
216 | for (i = 0; i <= 15; i++) { | 221 | for (i = 0; i <= 15; i++) { |
@@ -218,7 +223,11 @@ static void __init pxa25x_mfp_init(void) | |||
218 | gpio_desc[i].mask = GPIO_bit(i); | 223 | gpio_desc[i].mask = GPIO_bit(i); |
219 | } | 224 | } |
220 | 225 | ||
221 | gpio_nr = 85; | 226 | /* PXA26x has additional 4 GPIOs (86/87/88/89) which has the |
227 | * direction bit inverted in GPDR2. See PXA26x DM 4.1.1. | ||
228 | */ | ||
229 | for (i = 86; i <= pxa_last_gpio; i++) | ||
230 | gpio_desc[i].dir_inverted = 1; | ||
222 | } | 231 | } |
223 | #else | 232 | #else |
224 | static inline void pxa25x_mfp_init(void) {} | 233 | static inline void pxa25x_mfp_init(void) {} |
@@ -251,11 +260,27 @@ int keypad_set_wake(unsigned int on) | |||
251 | return 0; | 260 | return 0; |
252 | } | 261 | } |
253 | 262 | ||
263 | #define PWER_WEMUX2_GPIO38 (1 << 16) | ||
264 | #define PWER_WEMUX2_GPIO53 (2 << 16) | ||
265 | #define PWER_WEMUX2_GPIO40 (3 << 16) | ||
266 | #define PWER_WEMUX2_GPIO36 (4 << 16) | ||
267 | #define PWER_WEMUX2_MASK (7 << 16) | ||
268 | #define PWER_WEMUX3_GPIO31 (1 << 19) | ||
269 | #define PWER_WEMUX3_GPIO113 (2 << 19) | ||
270 | #define PWER_WEMUX3_MASK (3 << 19) | ||
271 | |||
272 | #define INIT_GPIO_DESC_MUXED(mux, gpio) \ | ||
273 | do { \ | ||
274 | gpio_desc[(gpio)].can_wakeup = 1; \ | ||
275 | gpio_desc[(gpio)].mask = PWER_ ## mux ## _GPIO ##gpio; \ | ||
276 | gpio_desc[(gpio)].mux_mask = PWER_ ## mux ## _MASK; \ | ||
277 | } while (0) | ||
278 | |||
254 | static void __init pxa27x_mfp_init(void) | 279 | static void __init pxa27x_mfp_init(void) |
255 | { | 280 | { |
256 | int i, gpio; | 281 | int i, gpio; |
257 | 282 | ||
258 | for (i = 0; i <= 120; i++) { | 283 | for (i = 0; i <= pxa_last_gpio; i++) { |
259 | /* skip GPIO2, 5, 6, 7, 8, they are not | 284 | /* skip GPIO2, 5, 6, 7, 8, they are not |
260 | * valid pins allow configuration | 285 | * valid pins allow configuration |
261 | */ | 286 | */ |
@@ -286,7 +311,12 @@ static void __init pxa27x_mfp_init(void) | |||
286 | gpio_desc[35].can_wakeup = 1; | 311 | gpio_desc[35].can_wakeup = 1; |
287 | gpio_desc[35].mask = PWER_WE35; | 312 | gpio_desc[35].mask = PWER_WE35; |
288 | 313 | ||
289 | gpio_nr = 121; | 314 | INIT_GPIO_DESC_MUXED(WEMUX3, 31); |
315 | INIT_GPIO_DESC_MUXED(WEMUX3, 113); | ||
316 | INIT_GPIO_DESC_MUXED(WEMUX2, 38); | ||
317 | INIT_GPIO_DESC_MUXED(WEMUX2, 53); | ||
318 | INIT_GPIO_DESC_MUXED(WEMUX2, 40); | ||
319 | INIT_GPIO_DESC_MUXED(WEMUX2, 36); | ||
290 | } | 320 | } |
291 | #else | 321 | #else |
292 | static inline void pxa27x_mfp_init(void) {} | 322 | static inline void pxa27x_mfp_init(void) {} |
@@ -300,7 +330,7 @@ static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state) | |||
300 | { | 330 | { |
301 | int i; | 331 | int i; |
302 | 332 | ||
303 | for (i = 0; i <= gpio_to_bank(gpio_nr); i++) { | 333 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) { |
304 | 334 | ||
305 | saved_gafr[0][i] = GAFR_L(i); | 335 | saved_gafr[0][i] = GAFR_L(i); |
306 | saved_gafr[1][i] = GAFR_U(i); | 336 | saved_gafr[1][i] = GAFR_U(i); |
@@ -315,7 +345,7 @@ static int pxa2xx_mfp_resume(struct sys_device *d) | |||
315 | { | 345 | { |
316 | int i; | 346 | int i; |
317 | 347 | ||
318 | for (i = 0; i <= gpio_to_bank(gpio_nr); i++) { | 348 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) { |
319 | GAFR_L(i) = saved_gafr[0][i]; | 349 | GAFR_L(i) = saved_gafr[0][i]; |
320 | GAFR_U(i) = saved_gafr[1][i]; | 350 | GAFR_U(i) = saved_gafr[1][i]; |
321 | GPDR(i * 32) = saved_gpdr[i]; | 351 | GPDR(i * 32) = saved_gpdr[i]; |
@@ -348,7 +378,7 @@ static int __init pxa2xx_mfp_init(void) | |||
348 | pxa27x_mfp_init(); | 378 | pxa27x_mfp_init(); |
349 | 379 | ||
350 | /* initialize gafr_run[], pgsr_lpm[] from existing values */ | 380 | /* initialize gafr_run[], pgsr_lpm[] from existing values */ |
351 | for (i = 0; i <= gpio_to_bank(gpio_nr); i++) | 381 | for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) |
352 | gpdr_lpm[i] = GPDR(i * 32); | 382 | gpdr_lpm[i] = GPDR(i * 32); |
353 | 383 | ||
354 | return sysdev_class_register(&pxa2xx_mfp_sysclass); | 384 | return sysdev_class_register(&pxa2xx_mfp_sysclass); |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index 782903fe9c6c..2b427e015b6f 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include <linux/irq.h> | 34 | #include <linux/irq.h> |
35 | #include <linux/pda_power.h> | 35 | #include <linux/pda_power.h> |
36 | #include <linux/power_supply.h> | 36 | #include <linux/power_supply.h> |
37 | #include <linux/wm97xx.h> | 37 | #include <linux/wm97xx_batt.h> |
38 | #include <linux/mtd/physmap.h> | 38 | #include <linux/mtd/physmap.h> |
39 | 39 | ||
40 | #include <asm/mach-types.h> | 40 | #include <asm/mach-types.h> |
@@ -46,6 +46,9 @@ | |||
46 | #include <mach/mmc.h> | 46 | #include <mach/mmc.h> |
47 | #include <mach/udc.h> | 47 | #include <mach/udc.h> |
48 | #include <mach/pxa27x-udc.h> | 48 | #include <mach/pxa27x-udc.h> |
49 | #include <mach/i2c.h> | ||
50 | #include <mach/camera.h> | ||
51 | #include <media/soc_camera.h> | ||
49 | 52 | ||
50 | #include <mach/mioa701.h> | 53 | #include <mach/mioa701.h> |
51 | 54 | ||
@@ -54,10 +57,11 @@ | |||
54 | 57 | ||
55 | static unsigned long mioa701_pin_config[] = { | 58 | static unsigned long mioa701_pin_config[] = { |
56 | /* Mio global */ | 59 | /* Mio global */ |
57 | MIO_CFG_OUT(GPIO9_CHARGE_nEN, AF0, DRIVE_LOW), | 60 | MIO_CFG_OUT(GPIO9_CHARGE_EN, AF0, DRIVE_LOW), |
58 | MIO_CFG_OUT(GPIO18_POWEROFF, AF0, DRIVE_LOW), | 61 | MIO_CFG_OUT(GPIO18_POWEROFF, AF0, DRIVE_LOW), |
59 | MFP_CFG_OUT(GPIO3, AF0, DRIVE_HIGH), | 62 | MFP_CFG_OUT(GPIO3, AF0, DRIVE_HIGH), |
60 | MFP_CFG_OUT(GPIO4, AF0, DRIVE_HIGH), | 63 | MFP_CFG_OUT(GPIO4, AF0, DRIVE_HIGH), |
64 | MIO_CFG_IN(GPIO80_MAYBE_CHARGE_VDROP, AF0), | ||
61 | 65 | ||
62 | /* Backlight PWM 0 */ | 66 | /* Backlight PWM 0 */ |
63 | GPIO16_PWM0_OUT, | 67 | GPIO16_PWM0_OUT, |
@@ -74,7 +78,7 @@ static unsigned long mioa701_pin_config[] = { | |||
74 | MIO_CFG_OUT(GPIO91_SDIO_EN, AF0, DRIVE_LOW), | 78 | MIO_CFG_OUT(GPIO91_SDIO_EN, AF0, DRIVE_LOW), |
75 | 79 | ||
76 | /* USB */ | 80 | /* USB */ |
77 | MIO_CFG_IN(GPIO13_USB_DETECT, AF0), | 81 | MIO_CFG_IN(GPIO13_nUSB_DETECT, AF0), |
78 | MIO_CFG_OUT(GPIO22_USB_ENABLE, AF0, DRIVE_LOW), | 82 | MIO_CFG_OUT(GPIO22_USB_ENABLE, AF0, DRIVE_LOW), |
79 | 83 | ||
80 | /* LCD */ | 84 | /* LCD */ |
@@ -98,12 +102,29 @@ static unsigned long mioa701_pin_config[] = { | |||
98 | GPIO75_LCD_LCLK, | 102 | GPIO75_LCD_LCLK, |
99 | GPIO76_LCD_PCLK, | 103 | GPIO76_LCD_PCLK, |
100 | 104 | ||
105 | /* QCI */ | ||
106 | GPIO12_CIF_DD_7, | ||
107 | GPIO17_CIF_DD_6, | ||
108 | GPIO50_CIF_DD_3, | ||
109 | GPIO51_CIF_DD_2, | ||
110 | GPIO52_CIF_DD_4, | ||
111 | GPIO53_CIF_MCLK, | ||
112 | GPIO54_CIF_PCLK, | ||
113 | GPIO55_CIF_DD_1, | ||
114 | GPIO81_CIF_DD_0, | ||
115 | GPIO82_CIF_DD_5, | ||
116 | GPIO84_CIF_FV, | ||
117 | GPIO85_CIF_LV, | ||
118 | |||
101 | /* Bluetooth */ | 119 | /* Bluetooth */ |
120 | MIO_CFG_IN(GPIO14_BT_nACTIVITY, AF0), | ||
102 | GPIO44_BTUART_CTS, | 121 | GPIO44_BTUART_CTS, |
103 | GPIO42_BTUART_RXD, | 122 | GPIO42_BTUART_RXD, |
104 | GPIO45_BTUART_RTS, | 123 | GPIO45_BTUART_RTS, |
105 | GPIO43_BTUART_TXD, | 124 | GPIO43_BTUART_TXD, |
106 | MIO_CFG_OUT(GPIO83_BT_ON, AF0, DRIVE_LOW), | 125 | MIO_CFG_OUT(GPIO83_BT_ON, AF0, DRIVE_LOW), |
126 | MIO_CFG_OUT(GPIO77_BT_UNKNOWN1, AF0, DRIVE_HIGH), | ||
127 | MIO_CFG_OUT(GPIO86_BT_MAYBE_nRESET, AF0, DRIVE_HIGH), | ||
107 | 128 | ||
108 | /* GPS */ | 129 | /* GPS */ |
109 | MIO_CFG_OUT(GPIO23_GPS_UNKNOWN1, AF0, DRIVE_LOW), | 130 | MIO_CFG_OUT(GPIO23_GPS_UNKNOWN1, AF0, DRIVE_LOW), |
@@ -151,16 +172,16 @@ static unsigned long mioa701_pin_config[] = { | |||
151 | GPIO104_KP_MKOUT_1, | 172 | GPIO104_KP_MKOUT_1, |
152 | GPIO105_KP_MKOUT_2, | 173 | GPIO105_KP_MKOUT_2, |
153 | 174 | ||
175 | /* I2C */ | ||
176 | GPIO117_I2C_SCL, | ||
177 | GPIO118_I2C_SDA, | ||
178 | |||
154 | /* Unknown */ | 179 | /* Unknown */ |
155 | MFP_CFG_IN(GPIO14, AF0), | ||
156 | MFP_CFG_IN(GPIO20, AF0), | 180 | MFP_CFG_IN(GPIO20, AF0), |
157 | MFP_CFG_IN(GPIO21, AF0), | 181 | MFP_CFG_IN(GPIO21, AF0), |
158 | MFP_CFG_IN(GPIO33, AF0), | 182 | MFP_CFG_IN(GPIO33, AF0), |
159 | MFP_CFG_OUT(GPIO49, AF0, DRIVE_HIGH), | 183 | MFP_CFG_OUT(GPIO49, AF0, DRIVE_HIGH), |
160 | MFP_CFG_OUT(GPIO57, AF0, DRIVE_HIGH), | 184 | MFP_CFG_OUT(GPIO57, AF0, DRIVE_HIGH), |
161 | MFP_CFG_OUT(GPIO77, AF0, DRIVE_HIGH), | ||
162 | MFP_CFG_IN(GPIO80, AF0), | ||
163 | MFP_CFG_OUT(GPIO86, AF0, DRIVE_HIGH), | ||
164 | MFP_CFG_IN(GPIO96, AF0), | 185 | MFP_CFG_IN(GPIO96, AF0), |
165 | MFP_CFG_OUT(GPIO116, AF0, DRIVE_HIGH), | 186 | MFP_CFG_OUT(GPIO116, AF0, DRIVE_HIGH), |
166 | }; | 187 | }; |
@@ -407,7 +428,7 @@ static void udc_power_command(int cmd) | |||
407 | 428 | ||
408 | static int is_usb_connected(void) | 429 | static int is_usb_connected(void) |
409 | { | 430 | { |
410 | return !!gpio_get_value(GPIO13_USB_DETECT); | 431 | return !gpio_get_value(GPIO13_nUSB_DETECT); |
411 | } | 432 | } |
412 | 433 | ||
413 | static struct pxa2xx_udc_mach_info mioa701_udc_info = { | 434 | static struct pxa2xx_udc_mach_info mioa701_udc_info = { |
@@ -659,13 +680,19 @@ static char *supplicants[] = { | |||
659 | "mioa701_battery" | 680 | "mioa701_battery" |
660 | }; | 681 | }; |
661 | 682 | ||
683 | static int is_ac_connected(void) | ||
684 | { | ||
685 | return gpio_get_value(GPIO96_AC_DETECT); | ||
686 | } | ||
687 | |||
662 | static void mioa701_set_charge(int flags) | 688 | static void mioa701_set_charge(int flags) |
663 | { | 689 | { |
664 | gpio_set_value(GPIO9_CHARGE_nEN, !flags); | 690 | gpio_set_value(GPIO9_CHARGE_EN, (flags == PDA_POWER_CHARGE_USB)); |
665 | } | 691 | } |
666 | 692 | ||
667 | static struct pda_power_pdata power_pdata = { | 693 | static struct pda_power_pdata power_pdata = { |
668 | .is_ac_online = is_usb_connected, | 694 | .is_ac_online = is_ac_connected, |
695 | .is_usb_online = is_usb_connected, | ||
669 | .set_charge = mioa701_set_charge, | 696 | .set_charge = mioa701_set_charge, |
670 | .supplied_to = supplicants, | 697 | .supplied_to = supplicants, |
671 | .num_supplicants = ARRAY_SIZE(supplicants), | 698 | .num_supplicants = ARRAY_SIZE(supplicants), |
@@ -674,8 +701,15 @@ static struct pda_power_pdata power_pdata = { | |||
674 | static struct resource power_resources[] = { | 701 | static struct resource power_resources[] = { |
675 | [0] = { | 702 | [0] = { |
676 | .name = "ac", | 703 | .name = "ac", |
677 | .start = gpio_to_irq(GPIO13_USB_DETECT), | 704 | .start = gpio_to_irq(GPIO96_AC_DETECT), |
678 | .end = gpio_to_irq(GPIO13_USB_DETECT), | 705 | .end = gpio_to_irq(GPIO96_AC_DETECT), |
706 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | ||
707 | IORESOURCE_IRQ_LOWEDGE, | ||
708 | }, | ||
709 | [1] = { | ||
710 | .name = "usb", | ||
711 | .start = gpio_to_irq(GPIO13_nUSB_DETECT), | ||
712 | .end = gpio_to_irq(GPIO13_nUSB_DETECT), | ||
679 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | | 713 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHEDGE | |
680 | IORESOURCE_IRQ_LOWEDGE, | 714 | IORESOURCE_IRQ_LOWEDGE, |
681 | }, | 715 | }, |
@@ -691,120 +725,43 @@ static struct platform_device power_dev = { | |||
691 | }, | 725 | }, |
692 | }; | 726 | }; |
693 | 727 | ||
694 | #if defined(CONFIG_PDA_POWER) && defined(CONFIG_TOUCHSCREEN_WM97XX) | 728 | static struct wm97xx_batt_info mioa701_battery_data = { |
695 | static struct wm97xx *battery_wm; | 729 | .batt_aux = WM97XX_AUX_ID1, |
696 | 730 | .temp_aux = -1, | |
697 | static enum power_supply_property battery_props[] = { | 731 | .charge_gpio = -1, |
698 | POWER_SUPPLY_PROP_STATUS, | 732 | .min_voltage = 0xc00, |
699 | POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, | 733 | .max_voltage = 0xfc0, |
700 | POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, | 734 | .batt_tech = POWER_SUPPLY_TECHNOLOGY_LION, |
701 | POWER_SUPPLY_PROP_VOLTAGE_NOW, | 735 | .batt_div = 1, |
702 | POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, /* Necessary for apm */ | 736 | .batt_mult = 1, |
737 | .batt_name = "mioa701_battery", | ||
703 | }; | 738 | }; |
704 | 739 | ||
705 | static int get_battery_voltage(void) | 740 | /* |
706 | { | 741 | * Camera interface |
707 | int adc = -1; | 742 | */ |
708 | 743 | struct pxacamera_platform_data mioa701_pxacamera_platform_data = { | |
709 | if (battery_wm) | 744 | .flags = PXA_CAMERA_MASTER | PXA_CAMERA_DATAWIDTH_8 | |
710 | adc = wm97xx_read_aux_adc(battery_wm, WM97XX_AUX_ID1); | 745 | PXA_CAMERA_PCLK_EN | PXA_CAMERA_MCLK_EN, |
711 | return adc; | 746 | .mclk_10khz = 5000, |
712 | } | ||
713 | |||
714 | static int get_battery_status(struct power_supply *b) | ||
715 | { | ||
716 | int status; | ||
717 | |||
718 | if (is_usb_connected()) | ||
719 | status = POWER_SUPPLY_STATUS_CHARGING; | ||
720 | else | ||
721 | status = POWER_SUPPLY_STATUS_DISCHARGING; | ||
722 | |||
723 | return status; | ||
724 | } | ||
725 | |||
726 | static int get_property(struct power_supply *b, | ||
727 | enum power_supply_property psp, | ||
728 | union power_supply_propval *val) | ||
729 | { | ||
730 | int rc = 0; | ||
731 | |||
732 | switch (psp) { | ||
733 | case POWER_SUPPLY_PROP_STATUS: | ||
734 | val->intval = get_battery_status(b); | ||
735 | break; | ||
736 | case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: | ||
737 | val->intval = 0xfd0; | ||
738 | break; | ||
739 | case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: | ||
740 | val->intval = 0xc00; | ||
741 | break; | ||
742 | case POWER_SUPPLY_PROP_VOLTAGE_NOW: | ||
743 | val->intval = get_battery_voltage(); | ||
744 | break; | ||
745 | case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: | ||
746 | val->intval = 100; | ||
747 | break; | ||
748 | default: | ||
749 | val->intval = -1; | ||
750 | rc = -1; | ||
751 | } | ||
752 | |||
753 | return rc; | ||
754 | }; | 747 | }; |
755 | 748 | ||
756 | static struct power_supply battery_ps = { | 749 | static struct soc_camera_link iclink = { |
757 | .name = "mioa701_battery", | 750 | .bus_id = 0, /* Must match id in pxa27x_device_camera in device.c */ |
758 | .type = POWER_SUPPLY_TYPE_BATTERY, | ||
759 | .get_property = get_property, | ||
760 | .properties = battery_props, | ||
761 | .num_properties = ARRAY_SIZE(battery_props), | ||
762 | }; | 751 | }; |
763 | 752 | ||
764 | static int battery_probe(struct platform_device *pdev) | 753 | /* Board I2C devices. */ |
765 | { | 754 | static struct i2c_board_info __initdata mioa701_i2c_devices[] = { |
766 | struct wm97xx *wm = platform_get_drvdata(pdev); | 755 | { |
767 | int rc; | 756 | /* Must initialize before the camera(s) */ |
768 | 757 | I2C_BOARD_INFO("mt9m111", 0x5d), | |
769 | battery_wm = wm; | 758 | .platform_data = &iclink, |
770 | |||
771 | rc = power_supply_register(NULL, &battery_ps); | ||
772 | if (rc) | ||
773 | dev_err(&pdev->dev, | ||
774 | "Could not register mioa701 battery -> %d\n", rc); | ||
775 | return rc; | ||
776 | } | ||
777 | |||
778 | static int battery_remove(struct platform_device *pdev) | ||
779 | { | ||
780 | battery_wm = NULL; | ||
781 | return 0; | ||
782 | } | ||
783 | |||
784 | static struct platform_driver mioa701_battery_driver = { | ||
785 | .driver = { | ||
786 | .name = "wm97xx-battery", | ||
787 | }, | 759 | }, |
788 | .probe = battery_probe, | ||
789 | .remove = battery_remove | ||
790 | }; | 760 | }; |
791 | 761 | ||
792 | static int __init mioa701_battery_init(void) | 762 | struct i2c_pxa_platform_data i2c_pdata = { |
793 | { | 763 | .fast_mode = 1, |
794 | int rc; | 764 | }; |
795 | |||
796 | rc = platform_driver_register(&mioa701_battery_driver); | ||
797 | if (rc) | ||
798 | printk(KERN_ERR "Could not register mioa701 battery driver\n"); | ||
799 | return rc; | ||
800 | } | ||
801 | |||
802 | #else | ||
803 | static int __init mioa701_battery_init(void) | ||
804 | { | ||
805 | return 0; | ||
806 | } | ||
807 | #endif | ||
808 | 765 | ||
809 | /* | 766 | /* |
810 | * Mio global | 767 | * Mio global |
@@ -851,17 +808,17 @@ static void mioa701_machine_exit(void); | |||
851 | static void mioa701_poweroff(void) | 808 | static void mioa701_poweroff(void) |
852 | { | 809 | { |
853 | mioa701_machine_exit(); | 810 | mioa701_machine_exit(); |
854 | gpio_set_value(GPIO18_POWEROFF, 1); | 811 | arm_machine_restart('s'); |
855 | } | 812 | } |
856 | 813 | ||
857 | static void mioa701_restart(char c) | 814 | static void mioa701_restart(char c) |
858 | { | 815 | { |
859 | mioa701_machine_exit(); | 816 | mioa701_machine_exit(); |
860 | arm_machine_restart(c); | 817 | arm_machine_restart('s'); |
861 | } | 818 | } |
862 | 819 | ||
863 | struct gpio_ress global_gpios[] = { | 820 | struct gpio_ress global_gpios[] = { |
864 | MIO_GPIO_OUT(GPIO9_CHARGE_nEN, 1, "Charger enable"), | 821 | MIO_GPIO_OUT(GPIO9_CHARGE_EN, 1, "Charger enable"), |
865 | MIO_GPIO_OUT(GPIO18_POWEROFF, 0, "Power Off"), | 822 | MIO_GPIO_OUT(GPIO18_POWEROFF, 0, "Power Off"), |
866 | MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power") | 823 | MIO_GPIO_OUT(GPIO87_LCD_POWER, 0, "LCD Power") |
867 | }; | 824 | }; |
@@ -879,12 +836,16 @@ static void __init mioa701_machine_init(void) | |||
879 | set_pxa_fb_info(&mioa701_pxafb_info); | 836 | set_pxa_fb_info(&mioa701_pxafb_info); |
880 | pxa_set_mci_info(&mioa701_mci_info); | 837 | pxa_set_mci_info(&mioa701_mci_info); |
881 | pxa_set_keypad_info(&mioa701_keypad_info); | 838 | pxa_set_keypad_info(&mioa701_keypad_info); |
839 | wm97xx_bat_set_pdata(&mioa701_battery_data); | ||
882 | udc_init(); | 840 | udc_init(); |
883 | pm_power_off = mioa701_poweroff; | 841 | pm_power_off = mioa701_poweroff; |
884 | arm_pm_restart = mioa701_restart; | 842 | arm_pm_restart = mioa701_restart; |
885 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 843 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
886 | gsm_init(); | 844 | gsm_init(); |
887 | mioa701_battery_init(); | 845 | |
846 | pxa_set_i2c_info(&i2c_pdata); | ||
847 | pxa_set_camera_info(&mioa701_pxacamera_platform_data); | ||
848 | i2c_register_board_info(0, ARRAY_AND_SIZE(mioa701_i2c_devices)); | ||
888 | } | 849 | } |
889 | 850 | ||
890 | static void mioa701_machine_exit(void) | 851 | static void mioa701_machine_exit(void) |
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index b36cec5c9eed..34841c72815f 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -55,6 +55,10 @@ static unsigned long pcm990_pin_config[] __initdata = { | |||
55 | GPIO89_USBH1_PEN, | 55 | GPIO89_USBH1_PEN, |
56 | /* PWM0 */ | 56 | /* PWM0 */ |
57 | GPIO16_PWM0_OUT, | 57 | GPIO16_PWM0_OUT, |
58 | |||
59 | /* I2C */ | ||
60 | GPIO117_I2C_SCL, | ||
61 | GPIO118_I2C_SDA, | ||
58 | }; | 62 | }; |
59 | 63 | ||
60 | /* | 64 | /* |
@@ -100,8 +104,7 @@ static struct pxafb_mode_info fb_info_sharp_lq084v1dg21 = { | |||
100 | static struct pxafb_mach_info pcm990_fbinfo __initdata = { | 104 | static struct pxafb_mach_info pcm990_fbinfo __initdata = { |
101 | .modes = &fb_info_sharp_lq084v1dg21, | 105 | .modes = &fb_info_sharp_lq084v1dg21, |
102 | .num_modes = 1, | 106 | .num_modes = 1, |
103 | .lccr0 = LCCR0_PAS, | 107 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
104 | .lccr3 = LCCR3_PCP, | ||
105 | .pxafb_lcd_power = pcm990_lcd_power, | 108 | .pxafb_lcd_power = pcm990_lcd_power, |
106 | }; | 109 | }; |
107 | #elif defined(CONFIG_PCM990_DISPLAY_NEC) | 110 | #elif defined(CONFIG_PCM990_DISPLAY_NEC) |
@@ -123,8 +126,7 @@ struct pxafb_mode_info fb_info_nec_nl6448bc20_18d = { | |||
123 | static struct pxafb_mach_info pcm990_fbinfo __initdata = { | 126 | static struct pxafb_mach_info pcm990_fbinfo __initdata = { |
124 | .modes = &fb_info_nec_nl6448bc20_18d, | 127 | .modes = &fb_info_nec_nl6448bc20_18d, |
125 | .num_modes = 1, | 128 | .num_modes = 1, |
126 | .lccr0 = LCCR0_Act, | 129 | .lcd_conn = LCD_COLOR_TFT_16BPP | LCD_PCLK_EDGE_FALL, |
127 | .lccr3 = LCCR3_PixFlEdg, | ||
128 | .pxafb_lcd_power = pcm990_lcd_power, | 130 | .pxafb_lcd_power = pcm990_lcd_power, |
129 | }; | 131 | }; |
130 | #endif | 132 | #endif |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 2e3bd8b1523b..ae88855bf974 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
21 | #include <linux/pm.h> | 21 | #include <linux/pm.h> |
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include <linux/mtd/physmap.h> | ||
23 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
24 | #include <linux/spi/spi.h> | 25 | #include <linux/spi/spi.h> |
25 | #include <linux/spi/ads7846.h> | 26 | #include <linux/spi/ads7846.h> |
@@ -413,9 +414,40 @@ static struct pxafb_mach_info poodle_fb_info = { | |||
413 | .lcd_conn = LCD_COLOR_TFT_16BPP, | 414 | .lcd_conn = LCD_COLOR_TFT_16BPP, |
414 | }; | 415 | }; |
415 | 416 | ||
417 | static struct mtd_partition sharpsl_rom_parts[] = { | ||
418 | { | ||
419 | .name ="Boot PROM Filesystem", | ||
420 | .offset = 0x00120000, | ||
421 | .size = MTDPART_SIZ_FULL, | ||
422 | }, | ||
423 | }; | ||
424 | |||
425 | static struct physmap_flash_data sharpsl_rom_data = { | ||
426 | .width = 2, | ||
427 | .nr_parts = ARRAY_SIZE(sharpsl_rom_parts), | ||
428 | .parts = sharpsl_rom_parts, | ||
429 | }; | ||
430 | |||
431 | static struct resource sharpsl_rom_resources[] = { | ||
432 | { | ||
433 | .start = 0x00000000, | ||
434 | .end = 0x007fffff, | ||
435 | .flags = IORESOURCE_MEM, | ||
436 | }, | ||
437 | }; | ||
438 | |||
439 | static struct platform_device sharpsl_rom_device = { | ||
440 | .name = "physmap-flash", | ||
441 | .id = -1, | ||
442 | .resource = sharpsl_rom_resources, | ||
443 | .num_resources = ARRAY_SIZE(sharpsl_rom_resources), | ||
444 | .dev.platform_data = &sharpsl_rom_data, | ||
445 | }; | ||
446 | |||
416 | static struct platform_device *devices[] __initdata = { | 447 | static struct platform_device *devices[] __initdata = { |
417 | &poodle_locomo_device, | 448 | &poodle_locomo_device, |
418 | &poodle_scoop_device, | 449 | &poodle_scoop_device, |
450 | &sharpsl_rom_device, | ||
419 | }; | 451 | }; |
420 | 452 | ||
421 | static void poodle_poweroff(void) | 453 | static void poodle_poweroff(void) |
diff --git a/arch/arm/mach-pxa/pwm.c b/arch/arm/mach-pxa/pwm.c index 74e2ead8cee8..3ca7ffc6904b 100644 --- a/arch/arm/mach-pxa/pwm.c +++ b/arch/arm/mach-pxa/pwm.c | |||
@@ -173,7 +173,7 @@ static struct pwm_device *pwm_probe(struct platform_device *pdev, | |||
173 | return ERR_PTR(-ENOMEM); | 173 | return ERR_PTR(-ENOMEM); |
174 | } | 174 | } |
175 | 175 | ||
176 | pwm->clk = clk_get(&pdev->dev, "PWMCLK"); | 176 | pwm->clk = clk_get(&pdev->dev, NULL); |
177 | if (IS_ERR(pwm->clk)) { | 177 | if (IS_ERR(pwm->clk)) { |
178 | ret = PTR_ERR(pwm->clk); | 178 | ret = PTR_ERR(pwm->clk); |
179 | goto err_free; | 179 | goto err_free; |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 25d17a1dab78..6c57522e2469 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -36,12 +36,6 @@ | |||
36 | #include "devices.h" | 36 | #include "devices.h" |
37 | #include "clock.h" | 37 | #include "clock.h" |
38 | 38 | ||
39 | int cpu_is_pxa26x(void) | ||
40 | { | ||
41 | return cpu_is_pxa250() && ((BOOT_DEF & 0x8) == 0); | ||
42 | } | ||
43 | EXPORT_SYMBOL_GPL(cpu_is_pxa26x); | ||
44 | |||
45 | /* | 39 | /* |
46 | * Various clock factors driven by the CCCR register. | 40 | * Various clock factors driven by the CCCR register. |
47 | */ | 41 | */ |
@@ -167,36 +161,51 @@ static const struct clkops clk_pxa25x_gpio11_ops = { | |||
167 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz | 161 | * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz |
168 | * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly) | 162 | * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly) |
169 | */ | 163 | */ |
170 | static struct clk pxa25x_hwuart_clk = | 164 | static DEFINE_CKEN(pxa25x_hwuart, HWUART, 14745600, 1); |
171 | INIT_CKEN("UARTCLK", HWUART, 14745600, 1, &pxa_device_hwuart.dev) | 165 | |
172 | ; | 166 | static struct clk_lookup pxa25x_hwuart_clkreg = |
167 | INIT_CLKREG(&clk_pxa25x_hwuart, "pxa2xx-uart.3", NULL); | ||
173 | 168 | ||
174 | /* | 169 | /* |
175 | * PXA 2xx clock declarations. | 170 | * PXA 2xx clock declarations. |
176 | */ | 171 | */ |
177 | static struct clk pxa25x_clks[] = { | 172 | static DEFINE_CK(pxa25x_lcd, LCD, &clk_pxa25x_lcd_ops); |
178 | INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev), | 173 | static DEFINE_CKEN(pxa25x_ffuart, FFUART, 14745600, 1); |
179 | INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev), | 174 | static DEFINE_CKEN(pxa25x_btuart, BTUART, 14745600, 1); |
180 | INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev), | 175 | static DEFINE_CKEN(pxa25x_stuart, STUART, 14745600, 1); |
181 | INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL), | 176 | static DEFINE_CKEN(pxa25x_usb, USB, 47923000, 5); |
182 | INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa25x_device_udc.dev), | 177 | static DEFINE_CLK(pxa25x_gpio11, &clk_pxa25x_gpio11_ops, 3686400, 0); |
183 | INIT_CLK("GPIO11_CLK", &clk_pxa25x_gpio11_ops, 3686400, 0, NULL), | 178 | static DEFINE_CLK(pxa25x_gpio12, &clk_pxa25x_gpio12_ops, 32768, 0); |
184 | INIT_CLK("GPIO12_CLK", &clk_pxa25x_gpio12_ops, 32768, 0, NULL), | 179 | static DEFINE_CKEN(pxa25x_mmc, MMC, 19169000, 0); |
185 | INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev), | 180 | static DEFINE_CKEN(pxa25x_i2c, I2C, 31949000, 0); |
186 | INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev), | 181 | static DEFINE_CKEN(pxa25x_ssp, SSP, 3686400, 0); |
187 | 182 | static DEFINE_CKEN(pxa25x_nssp, NSSP, 3686400, 0); | |
188 | INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev), | 183 | static DEFINE_CKEN(pxa25x_assp, ASSP, 3686400, 0); |
189 | INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev), | 184 | static DEFINE_CKEN(pxa25x_pwm0, PWM0, 3686400, 0); |
190 | INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev), | 185 | static DEFINE_CKEN(pxa25x_pwm1, PWM1, 3686400, 0); |
191 | INIT_CKEN("PWMCLK", PWM0, 3686400, 0, &pxa25x_device_pwm0.dev), | 186 | static DEFINE_CKEN(pxa25x_ac97, AC97, 24576000, 0); |
192 | INIT_CKEN("PWMCLK", PWM1, 3686400, 0, &pxa25x_device_pwm1.dev), | 187 | static DEFINE_CKEN(pxa25x_i2s, I2S, 14745600, 0); |
193 | 188 | static DEFINE_CKEN(pxa25x_ficp, FICP, 47923000, 0); | |
194 | INIT_CKEN("AC97CLK", AC97, 24576000, 0, NULL), | 189 | |
195 | 190 | static struct clk_lookup pxa25x_clkregs[] = { | |
196 | /* | 191 | INIT_CLKREG(&clk_pxa25x_lcd, "pxa2xx-fb", NULL), |
197 | INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL), | 192 | INIT_CLKREG(&clk_pxa25x_ffuart, "pxa2xx-uart.0", NULL), |
198 | */ | 193 | INIT_CLKREG(&clk_pxa25x_btuart, "pxa2xx-uart.1", NULL), |
199 | INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL), | 194 | INIT_CLKREG(&clk_pxa25x_stuart, "pxa2xx-uart.2", NULL), |
195 | INIT_CLKREG(&clk_pxa25x_usb, "pxa25x-udc", NULL), | ||
196 | INIT_CLKREG(&clk_pxa25x_mmc, "pxa2xx-mci.0", NULL), | ||
197 | INIT_CLKREG(&clk_pxa25x_i2c, "pxa2xx-i2c.0", NULL), | ||
198 | INIT_CLKREG(&clk_pxa25x_ssp, "pxa25x-ssp.0", NULL), | ||
199 | INIT_CLKREG(&clk_pxa25x_nssp, "pxa25x-nssp.1", NULL), | ||
200 | INIT_CLKREG(&clk_pxa25x_assp, "pxa25x-nssp.2", NULL), | ||
201 | INIT_CLKREG(&clk_pxa25x_pwm0, "pxa25x-pwm.0", NULL), | ||
202 | INIT_CLKREG(&clk_pxa25x_pwm1, "pxa25x-pwm.1", NULL), | ||
203 | INIT_CLKREG(&clk_pxa25x_i2s, "pxa2xx-i2s", NULL), | ||
204 | INIT_CLKREG(&clk_pxa25x_stuart, "pxa2xx-ir", "UARTCLK"), | ||
205 | INIT_CLKREG(&clk_pxa25x_ficp, "pxa2xx-ir", "FICPCLK"), | ||
206 | INIT_CLKREG(&clk_pxa25x_ac97, NULL, "AC97CLK"), | ||
207 | INIT_CLKREG(&clk_pxa25x_gpio11, NULL, "GPIO11_CLK"), | ||
208 | INIT_CLKREG(&clk_pxa25x_gpio12, NULL, "GPIO12_CLK"), | ||
200 | }; | 209 | }; |
201 | 210 | ||
202 | #ifdef CONFIG_PM | 211 | #ifdef CONFIG_PM |
@@ -304,13 +313,21 @@ void __init pxa25x_init_irq(void) | |||
304 | pxa_init_gpio(85, pxa25x_set_wake); | 313 | pxa_init_gpio(85, pxa25x_set_wake); |
305 | } | 314 | } |
306 | 315 | ||
316 | #ifdef CONFIG_CPU_PXA26x | ||
317 | void __init pxa26x_init_irq(void) | ||
318 | { | ||
319 | pxa_init_irq(32, pxa25x_set_wake); | ||
320 | pxa_init_gpio(90, pxa25x_set_wake); | ||
321 | } | ||
322 | #endif | ||
323 | |||
307 | static struct platform_device *pxa25x_devices[] __initdata = { | 324 | static struct platform_device *pxa25x_devices[] __initdata = { |
308 | &pxa25x_device_udc, | 325 | &pxa25x_device_udc, |
309 | &pxa_device_ffuart, | 326 | &pxa_device_ffuart, |
310 | &pxa_device_btuart, | 327 | &pxa_device_btuart, |
311 | &pxa_device_stuart, | 328 | &pxa_device_stuart, |
312 | &pxa_device_i2s, | 329 | &pxa_device_i2s, |
313 | &pxa_device_rtc, | 330 | &sa1100_device_rtc, |
314 | &pxa25x_device_ssp, | 331 | &pxa25x_device_ssp, |
315 | &pxa25x_device_nssp, | 332 | &pxa25x_device_nssp, |
316 | &pxa25x_device_assp, | 333 | &pxa25x_device_assp, |
@@ -336,7 +353,7 @@ static int __init pxa25x_init(void) | |||
336 | 353 | ||
337 | reset_status = RCSR; | 354 | reset_status = RCSR; |
338 | 355 | ||
339 | clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks)); | 356 | clks_register(pxa25x_clkregs, ARRAY_SIZE(pxa25x_clkregs)); |
340 | 357 | ||
341 | if ((ret = pxa_init_dma(16))) | 358 | if ((ret = pxa_init_dma(16))) |
342 | return ret; | 359 | return ret; |
@@ -356,8 +373,8 @@ static int __init pxa25x_init(void) | |||
356 | } | 373 | } |
357 | 374 | ||
358 | /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ | 375 | /* Only add HWUART for PXA255/26x; PXA210/250 do not have it. */ |
359 | if (cpu_is_pxa255() || cpu_is_pxa26x()) { | 376 | if (cpu_is_pxa255()) { |
360 | clks_register(&pxa25x_hwuart_clk, 1); | 377 | clks_register(&pxa25x_hwuart_clkreg, 1); |
361 | ret = platform_device_register(&pxa_device_hwuart); | 378 | ret = platform_device_register(&pxa_device_hwuart); |
362 | } | 379 | } |
363 | 380 | ||
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 3e4ab2279c99..411bec54fdc4 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -144,40 +144,59 @@ static const struct clkops clk_pxa27x_lcd_ops = { | |||
144 | .getrate = clk_pxa27x_lcd_getrate, | 144 | .getrate = clk_pxa27x_lcd_getrate, |
145 | }; | 145 | }; |
146 | 146 | ||
147 | static struct clk pxa27x_clks[] = { | 147 | static DEFINE_CK(pxa27x_lcd, LCD, &clk_pxa27x_lcd_ops); |
148 | INIT_CK("LCDCLK", LCD, &clk_pxa27x_lcd_ops, &pxa_device_fb.dev), | 148 | static DEFINE_CK(pxa27x_camera, CAMERA, &clk_pxa27x_lcd_ops); |
149 | INIT_CK("CAMCLK", CAMERA, &clk_pxa27x_lcd_ops, NULL), | 149 | static DEFINE_CKEN(pxa27x_ffuart, FFUART, 14857000, 1); |
150 | 150 | static DEFINE_CKEN(pxa27x_btuart, BTUART, 14857000, 1); | |
151 | INIT_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev), | 151 | static DEFINE_CKEN(pxa27x_stuart, STUART, 14857000, 1); |
152 | INIT_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev), | 152 | static DEFINE_CKEN(pxa27x_i2s, I2S, 14682000, 0); |
153 | INIT_CKEN("UARTCLK", STUART, 14857000, 1, NULL), | 153 | static DEFINE_CKEN(pxa27x_i2c, I2C, 32842000, 0); |
154 | 154 | static DEFINE_CKEN(pxa27x_usb, USB, 48000000, 5); | |
155 | INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.dev), | 155 | static DEFINE_CKEN(pxa27x_mmc, MMC, 19500000, 0); |
156 | INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), | 156 | static DEFINE_CKEN(pxa27x_ficp, FICP, 48000000, 0); |
157 | INIT_CKEN("UDCCLK", USB, 48000000, 5, &pxa27x_device_udc.dev), | 157 | static DEFINE_CKEN(pxa27x_usbhost, USBHOST, 48000000, 0); |
158 | INIT_CKEN("MMCCLK", MMC, 19500000, 0, &pxa_device_mci.dev), | 158 | static DEFINE_CKEN(pxa27x_pwri2c, PWRI2C, 13000000, 0); |
159 | INIT_CKEN("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev), | 159 | static DEFINE_CKEN(pxa27x_keypad, KEYPAD, 32768, 0); |
160 | 160 | static DEFINE_CKEN(pxa27x_ssp1, SSP1, 13000000, 0); | |
161 | INIT_CKEN("USBCLK", USBHOST, 48000000, 0, &pxa27x_device_ohci.dev), | 161 | static DEFINE_CKEN(pxa27x_ssp2, SSP2, 13000000, 0); |
162 | INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev), | 162 | static DEFINE_CKEN(pxa27x_ssp3, SSP3, 13000000, 0); |
163 | INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), | 163 | static DEFINE_CKEN(pxa27x_pwm0, PWM0, 13000000, 0); |
164 | 164 | static DEFINE_CKEN(pxa27x_pwm1, PWM1, 13000000, 0); | |
165 | INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), | 165 | static DEFINE_CKEN(pxa27x_ac97, AC97, 24576000, 0); |
166 | INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), | 166 | static DEFINE_CKEN(pxa27x_ac97conf, AC97CONF, 24576000, 0); |
167 | INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), | 167 | static DEFINE_CKEN(pxa27x_msl, MSL, 48000000, 0); |
168 | INIT_CKEN("PWMCLK", PWM0, 13000000, 0, &pxa27x_device_pwm0.dev), | 168 | static DEFINE_CKEN(pxa27x_usim, USIM, 48000000, 0); |
169 | INIT_CKEN("PWMCLK", PWM1, 13000000, 0, &pxa27x_device_pwm1.dev), | 169 | static DEFINE_CKEN(pxa27x_memstk, MEMSTK, 19500000, 0); |
170 | 170 | static DEFINE_CKEN(pxa27x_im, IM, 0, 0); | |
171 | INIT_CKEN("AC97CLK", AC97, 24576000, 0, NULL), | 171 | static DEFINE_CKEN(pxa27x_memc, MEMC, 0, 0); |
172 | INIT_CKEN("AC97CONFCLK", AC97CONF, 24576000, 0, NULL), | 172 | |
173 | 173 | static struct clk_lookup pxa27x_clkregs[] = { | |
174 | /* | 174 | INIT_CLKREG(&clk_pxa27x_lcd, "pxa2xx-fb", NULL), |
175 | INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL), | 175 | INIT_CLKREG(&clk_pxa27x_camera, "pxa27x-camera.0", NULL), |
176 | INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL), | 176 | INIT_CLKREG(&clk_pxa27x_ffuart, "pxa2xx-uart.0", NULL), |
177 | INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL), | 177 | INIT_CLKREG(&clk_pxa27x_btuart, "pxa2xx-uart.1", NULL), |
178 | INIT_CKEN("IMCLK", IM, 0, 0, NULL), | 178 | INIT_CLKREG(&clk_pxa27x_stuart, "pxa2xx-uart.2", NULL), |
179 | INIT_CKEN("MEMCLK", MEMC, 0, 0, NULL), | 179 | INIT_CLKREG(&clk_pxa27x_i2s, "pxa2xx-i2s", NULL), |
180 | */ | 180 | INIT_CLKREG(&clk_pxa27x_i2c, "pxa2xx-i2c.0", NULL), |
181 | INIT_CLKREG(&clk_pxa27x_usb, "pxa27x-udc", NULL), | ||
182 | INIT_CLKREG(&clk_pxa27x_mmc, "pxa2xx-mci.0", NULL), | ||
183 | INIT_CLKREG(&clk_pxa27x_stuart, "pxa2xx-ir", "UARTCLK"), | ||
184 | INIT_CLKREG(&clk_pxa27x_ficp, "pxa2xx-ir", "FICPCLK"), | ||
185 | INIT_CLKREG(&clk_pxa27x_usbhost, "pxa27x-ohci", NULL), | ||
186 | INIT_CLKREG(&clk_pxa27x_pwri2c, "pxa2xx-i2c.1", NULL), | ||
187 | INIT_CLKREG(&clk_pxa27x_keypad, "pxa27x-keypad", NULL), | ||
188 | INIT_CLKREG(&clk_pxa27x_ssp1, "pxa27x-ssp.0", NULL), | ||
189 | INIT_CLKREG(&clk_pxa27x_ssp2, "pxa27x-ssp.1", NULL), | ||
190 | INIT_CLKREG(&clk_pxa27x_ssp3, "pxa27x-ssp.2", NULL), | ||
191 | INIT_CLKREG(&clk_pxa27x_pwm0, "pxa27x-pwm.0", NULL), | ||
192 | INIT_CLKREG(&clk_pxa27x_pwm1, "pxa27x-pwm.1", NULL), | ||
193 | INIT_CLKREG(&clk_pxa27x_ac97, NULL, "AC97CLK"), | ||
194 | INIT_CLKREG(&clk_pxa27x_ac97conf, NULL, "AC97CONFCLK"), | ||
195 | INIT_CLKREG(&clk_pxa27x_msl, NULL, "MSLCLK"), | ||
196 | INIT_CLKREG(&clk_pxa27x_usim, NULL, "USIMCLK"), | ||
197 | INIT_CLKREG(&clk_pxa27x_memstk, NULL, "MSTKCLK"), | ||
198 | INIT_CLKREG(&clk_pxa27x_im, NULL, "IMCLK"), | ||
199 | INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"), | ||
181 | }; | 200 | }; |
182 | 201 | ||
183 | #ifdef CONFIG_PM | 202 | #ifdef CONFIG_PM |
@@ -313,38 +332,18 @@ static int pxa27x_set_wake(unsigned int irq, unsigned int on) | |||
313 | void __init pxa27x_init_irq(void) | 332 | void __init pxa27x_init_irq(void) |
314 | { | 333 | { |
315 | pxa_init_irq(34, pxa27x_set_wake); | 334 | pxa_init_irq(34, pxa27x_set_wake); |
316 | pxa_init_gpio(128, pxa27x_set_wake); | 335 | pxa_init_gpio(121, pxa27x_set_wake); |
317 | } | 336 | } |
318 | 337 | ||
319 | /* | 338 | /* |
320 | * device registration specific to PXA27x. | 339 | * device registration specific to PXA27x. |
321 | */ | 340 | */ |
322 | |||
323 | static struct resource i2c_power_resources[] = { | ||
324 | { | ||
325 | .start = 0x40f00180, | ||
326 | .end = 0x40f001a3, | ||
327 | .flags = IORESOURCE_MEM, | ||
328 | }, { | ||
329 | .start = IRQ_PWRI2C, | ||
330 | .end = IRQ_PWRI2C, | ||
331 | .flags = IORESOURCE_IRQ, | ||
332 | }, | ||
333 | }; | ||
334 | |||
335 | struct platform_device pxa27x_device_i2c_power = { | ||
336 | .name = "pxa2xx-i2c", | ||
337 | .id = 1, | ||
338 | .resource = i2c_power_resources, | ||
339 | .num_resources = ARRAY_SIZE(i2c_power_resources), | ||
340 | }; | ||
341 | |||
342 | void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) | 341 | void __init pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info) |
343 | { | 342 | { |
344 | local_irq_disable(); | 343 | local_irq_disable(); |
345 | PCFR |= PCFR_PI2CEN; | 344 | PCFR |= PCFR_PI2CEN; |
346 | local_irq_enable(); | 345 | local_irq_enable(); |
347 | pxa27x_device_i2c_power.dev.platform_data = info; | 346 | pxa_register_device(&pxa27x_device_i2c_power, info); |
348 | } | 347 | } |
349 | 348 | ||
350 | static struct platform_device *devices[] __initdata = { | 349 | static struct platform_device *devices[] __initdata = { |
@@ -353,8 +352,8 @@ static struct platform_device *devices[] __initdata = { | |||
353 | &pxa_device_btuart, | 352 | &pxa_device_btuart, |
354 | &pxa_device_stuart, | 353 | &pxa_device_stuart, |
355 | &pxa_device_i2s, | 354 | &pxa_device_i2s, |
355 | &sa1100_device_rtc, | ||
356 | &pxa_device_rtc, | 356 | &pxa_device_rtc, |
357 | &pxa27x_device_i2c_power, | ||
358 | &pxa27x_device_ssp1, | 357 | &pxa27x_device_ssp1, |
359 | &pxa27x_device_ssp2, | 358 | &pxa27x_device_ssp2, |
360 | &pxa27x_device_ssp3, | 359 | &pxa27x_device_ssp3, |
@@ -380,7 +379,7 @@ static int __init pxa27x_init(void) | |||
380 | 379 | ||
381 | reset_status = RCSR; | 380 | reset_status = RCSR; |
382 | 381 | ||
383 | clks_register(pxa27x_clks, ARRAY_SIZE(pxa27x_clks)); | 382 | clks_register(pxa27x_clkregs, ARRAY_SIZE(pxa27x_clkregs)); |
384 | 383 | ||
385 | if ((ret = pxa_init_dma(32))) | 384 | if ((ret = pxa_init_dma(32))) |
386 | return ret; | 385 | return ret; |
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c index 9adc7fc4618a..f735e58e6669 100644 --- a/arch/arm/mach-pxa/pxa300.c +++ b/arch/arm/mach-pxa/pxa300.c | |||
@@ -85,14 +85,16 @@ static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = { | |||
85 | MFP_ADDR_END, | 85 | MFP_ADDR_END, |
86 | }; | 86 | }; |
87 | 87 | ||
88 | static struct clk common_clks[] = { | 88 | static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0); |
89 | PXA3xx_CKEN("NANDCLK", NAND, 156000000, 0, &pxa3xx_device_nand.dev), | 89 | |
90 | static struct clk_lookup common_clkregs[] = { | ||
91 | INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", "NANDCLK"), | ||
90 | }; | 92 | }; |
91 | 93 | ||
92 | static struct clk pxa310_clks[] = { | 94 | static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); |
93 | #ifdef CONFIG_CPU_PXA310 | 95 | |
94 | PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev), | 96 | static struct clk_lookup pxa310_clkregs[] = { |
95 | #endif | 97 | INIT_CLKREG(&clk_pxa310_mmc3, "pxa2xx-mci.2", "MMCCLK"), |
96 | }; | 98 | }; |
97 | 99 | ||
98 | static int __init pxa300_init(void) | 100 | static int __init pxa300_init(void) |
@@ -100,12 +102,12 @@ static int __init pxa300_init(void) | |||
100 | if (cpu_is_pxa300() || cpu_is_pxa310()) { | 102 | if (cpu_is_pxa300() || cpu_is_pxa310()) { |
101 | pxa3xx_init_mfp(); | 103 | pxa3xx_init_mfp(); |
102 | pxa3xx_mfp_init_addr(pxa300_mfp_addr_map); | 104 | pxa3xx_mfp_init_addr(pxa300_mfp_addr_map); |
103 | clks_register(ARRAY_AND_SIZE(common_clks)); | 105 | clks_register(ARRAY_AND_SIZE(common_clkregs)); |
104 | } | 106 | } |
105 | 107 | ||
106 | if (cpu_is_pxa310()) { | 108 | if (cpu_is_pxa310()) { |
107 | pxa3xx_mfp_init_addr(pxa310_mfp_addr_map); | 109 | pxa3xx_mfp_init_addr(pxa310_mfp_addr_map); |
108 | clks_register(ARRAY_AND_SIZE(pxa310_clks)); | 110 | clks_register(ARRAY_AND_SIZE(pxa310_clkregs)); |
109 | } | 111 | } |
110 | 112 | ||
111 | return 0; | 113 | return 0; |
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c index 016eb18f01a3..effe408c186f 100644 --- a/arch/arm/mach-pxa/pxa320.c +++ b/arch/arm/mach-pxa/pxa320.c | |||
@@ -80,8 +80,10 @@ static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = { | |||
80 | MFP_ADDR_END, | 80 | MFP_ADDR_END, |
81 | }; | 81 | }; |
82 | 82 | ||
83 | static struct clk pxa320_clks[] = { | 83 | static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0); |
84 | PXA3xx_CKEN("NANDCLK", NAND, 104000000, 0, &pxa3xx_device_nand.dev), | 84 | |
85 | static struct clk_lookup pxa320_clkregs[] = { | ||
86 | INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", "NANDCLK"), | ||
85 | }; | 87 | }; |
86 | 88 | ||
87 | static int __init pxa320_init(void) | 89 | static int __init pxa320_init(void) |
@@ -89,7 +91,7 @@ static int __init pxa320_init(void) | |||
89 | if (cpu_is_pxa320()) { | 91 | if (cpu_is_pxa320()) { |
90 | pxa3xx_init_mfp(); | 92 | pxa3xx_init_mfp(); |
91 | pxa3xx_mfp_init_addr(pxa320_mfp_addr_map); | 93 | pxa3xx_mfp_init_addr(pxa320_mfp_addr_map); |
92 | clks_register(ARRAY_AND_SIZE(pxa320_clks)); | 94 | clks_register(ARRAY_AND_SIZE(pxa320_clkregs)); |
93 | } | 95 | } |
94 | 96 | ||
95 | return 0; | 97 | return 0; |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index b3cd5d0b0f35..490893824e78 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <mach/pm.h> | 29 | #include <mach/pm.h> |
30 | #include <mach/dma.h> | 30 | #include <mach/dma.h> |
31 | #include <mach/ssp.h> | 31 | #include <mach/ssp.h> |
32 | #include <mach/i2c.h> | ||
32 | 33 | ||
33 | #include "generic.h" | 34 | #include "generic.h" |
34 | #include "devices.h" | 35 | #include "devices.h" |
@@ -216,43 +217,58 @@ static const struct clkops clk_dummy_ops = { | |||
216 | .disable = clk_dummy_disable, | 217 | .disable = clk_dummy_disable, |
217 | }; | 218 | }; |
218 | 219 | ||
219 | static struct clk pxa3xx_clks[] = { | 220 | static struct clk clk_pxa3xx_pout = { |
220 | { | 221 | .ops = &clk_pout_ops, |
221 | .name = "CLK_POUT", | 222 | .rate = 13000000, |
222 | .ops = &clk_pout_ops, | 223 | .delay = 70, |
223 | .rate = 13000000, | 224 | }; |
224 | .delay = 70, | ||
225 | }, | ||
226 | |||
227 | /* Power I2C clock is always on */ | ||
228 | { | ||
229 | .name = "I2CCLK", | ||
230 | .ops = &clk_dummy_ops, | ||
231 | .dev = &pxa3xx_device_i2c_power.dev, | ||
232 | }, | ||
233 | |||
234 | PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev), | ||
235 | PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL), | ||
236 | PXA3xx_CK("AC97CLK", AC97, &clk_pxa3xx_ac97_ops, NULL), | ||
237 | |||
238 | PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev), | ||
239 | PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev), | ||
240 | PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL), | ||
241 | |||
242 | PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev), | ||
243 | PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa27x_device_udc.dev), | ||
244 | PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev), | ||
245 | PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev), | ||
246 | 225 | ||
247 | PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev), | 226 | static struct clk clk_dummy = { |
248 | PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev), | 227 | .ops = &clk_dummy_ops, |
249 | PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev), | 228 | }; |
250 | PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev), | ||
251 | PXA3xx_CKEN("PWMCLK", PWM0, 13000000, 0, &pxa27x_device_pwm0.dev), | ||
252 | PXA3xx_CKEN("PWMCLK", PWM1, 13000000, 0, &pxa27x_device_pwm1.dev), | ||
253 | 229 | ||
254 | PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev), | 230 | static DEFINE_PXA3_CK(pxa3xx_lcd, LCD, &clk_pxa3xx_hsio_ops); |
255 | PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev), | 231 | static DEFINE_PXA3_CK(pxa3xx_camera, CAMERA, &clk_pxa3xx_hsio_ops); |
232 | static DEFINE_PXA3_CK(pxa3xx_ac97, AC97, &clk_pxa3xx_ac97_ops); | ||
233 | static DEFINE_PXA3_CKEN(pxa3xx_ffuart, FFUART, 14857000, 1); | ||
234 | static DEFINE_PXA3_CKEN(pxa3xx_btuart, BTUART, 14857000, 1); | ||
235 | static DEFINE_PXA3_CKEN(pxa3xx_stuart, STUART, 14857000, 1); | ||
236 | static DEFINE_PXA3_CKEN(pxa3xx_i2c, I2C, 32842000, 0); | ||
237 | static DEFINE_PXA3_CKEN(pxa3xx_udc, UDC, 48000000, 5); | ||
238 | static DEFINE_PXA3_CKEN(pxa3xx_usbh, USBH, 48000000, 0); | ||
239 | static DEFINE_PXA3_CKEN(pxa3xx_keypad, KEYPAD, 32768, 0); | ||
240 | static DEFINE_PXA3_CKEN(pxa3xx_ssp1, SSP1, 13000000, 0); | ||
241 | static DEFINE_PXA3_CKEN(pxa3xx_ssp2, SSP2, 13000000, 0); | ||
242 | static DEFINE_PXA3_CKEN(pxa3xx_ssp3, SSP3, 13000000, 0); | ||
243 | static DEFINE_PXA3_CKEN(pxa3xx_ssp4, SSP4, 13000000, 0); | ||
244 | static DEFINE_PXA3_CKEN(pxa3xx_pwm0, PWM0, 13000000, 0); | ||
245 | static DEFINE_PXA3_CKEN(pxa3xx_pwm1, PWM1, 13000000, 0); | ||
246 | static DEFINE_PXA3_CKEN(pxa3xx_mmc1, MMC1, 19500000, 0); | ||
247 | static DEFINE_PXA3_CKEN(pxa3xx_mmc2, MMC2, 19500000, 0); | ||
248 | |||
249 | static struct clk_lookup pxa3xx_clkregs[] = { | ||
250 | INIT_CLKREG(&clk_pxa3xx_pout, NULL, "CLK_POUT"), | ||
251 | /* Power I2C clock is always on */ | ||
252 | INIT_CLKREG(&clk_dummy, "pxa2xx-i2c.1", NULL), | ||
253 | INIT_CLKREG(&clk_pxa3xx_lcd, "pxa2xx-fb", NULL), | ||
254 | INIT_CLKREG(&clk_pxa3xx_camera, NULL, "CAMCLK"), | ||
255 | INIT_CLKREG(&clk_pxa3xx_ac97, NULL, "AC97CLK"), | ||
256 | INIT_CLKREG(&clk_pxa3xx_ffuart, "pxa2xx-uart.0", NULL), | ||
257 | INIT_CLKREG(&clk_pxa3xx_btuart, "pxa2xx-uart.1", NULL), | ||
258 | INIT_CLKREG(&clk_pxa3xx_stuart, "pxa2xx-uart.2", NULL), | ||
259 | INIT_CLKREG(&clk_pxa3xx_stuart, "pxa2xx-ir", "UARTCLK"), | ||
260 | INIT_CLKREG(&clk_pxa3xx_i2c, "pxa2xx-i2c.0", NULL), | ||
261 | INIT_CLKREG(&clk_pxa3xx_udc, "pxa27x-udc", NULL), | ||
262 | INIT_CLKREG(&clk_pxa3xx_usbh, "pxa27x-ohci", NULL), | ||
263 | INIT_CLKREG(&clk_pxa3xx_keypad, "pxa27x-keypad", NULL), | ||
264 | INIT_CLKREG(&clk_pxa3xx_ssp1, "pxa27x-ssp.0", NULL), | ||
265 | INIT_CLKREG(&clk_pxa3xx_ssp2, "pxa27x-ssp.1", NULL), | ||
266 | INIT_CLKREG(&clk_pxa3xx_ssp3, "pxa27x-ssp.2", NULL), | ||
267 | INIT_CLKREG(&clk_pxa3xx_ssp4, "pxa27x-ssp.3", NULL), | ||
268 | INIT_CLKREG(&clk_pxa3xx_pwm0, "pxa27x-pwm.0", NULL), | ||
269 | INIT_CLKREG(&clk_pxa3xx_pwm1, "pxa27x-pwm.1", NULL), | ||
270 | INIT_CLKREG(&clk_pxa3xx_mmc1, "pxa2xx-mci.0", NULL), | ||
271 | INIT_CLKREG(&clk_pxa3xx_mmc2, "pxa2xx-mci.1", NULL), | ||
256 | }; | 272 | }; |
257 | 273 | ||
258 | #ifdef CONFIG_PM | 274 | #ifdef CONFIG_PM |
@@ -529,28 +545,9 @@ void __init pxa3xx_init_irq(void) | |||
529 | * device registration specific to PXA3xx. | 545 | * device registration specific to PXA3xx. |
530 | */ | 546 | */ |
531 | 547 | ||
532 | static struct resource i2c_power_resources[] = { | ||
533 | { | ||
534 | .start = 0x40f500c0, | ||
535 | .end = 0x40f500d3, | ||
536 | .flags = IORESOURCE_MEM, | ||
537 | }, { | ||
538 | .start = IRQ_PWRI2C, | ||
539 | .end = IRQ_PWRI2C, | ||
540 | .flags = IORESOURCE_IRQ, | ||
541 | }, | ||
542 | }; | ||
543 | |||
544 | struct platform_device pxa3xx_device_i2c_power = { | ||
545 | .name = "pxa2xx-i2c", | ||
546 | .id = 1, | ||
547 | .resource = i2c_power_resources, | ||
548 | .num_resources = ARRAY_SIZE(i2c_power_resources), | ||
549 | }; | ||
550 | |||
551 | void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) | 548 | void __init pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info) |
552 | { | 549 | { |
553 | pxa3xx_device_i2c_power.dev.platform_data = info; | 550 | pxa_register_device(&pxa3xx_device_i2c_power, info); |
554 | } | 551 | } |
555 | 552 | ||
556 | static struct platform_device *devices[] __initdata = { | 553 | static struct platform_device *devices[] __initdata = { |
@@ -559,6 +556,7 @@ static struct platform_device *devices[] __initdata = { | |||
559 | &pxa_device_btuart, | 556 | &pxa_device_btuart, |
560 | &pxa_device_stuart, | 557 | &pxa_device_stuart, |
561 | &pxa_device_i2s, | 558 | &pxa_device_i2s, |
559 | &sa1100_device_rtc, | ||
562 | &pxa_device_rtc, | 560 | &pxa_device_rtc, |
563 | &pxa27x_device_ssp1, | 561 | &pxa27x_device_ssp1, |
564 | &pxa27x_device_ssp2, | 562 | &pxa27x_device_ssp2, |
@@ -566,7 +564,6 @@ static struct platform_device *devices[] __initdata = { | |||
566 | &pxa3xx_device_ssp4, | 564 | &pxa3xx_device_ssp4, |
567 | &pxa27x_device_pwm0, | 565 | &pxa27x_device_pwm0, |
568 | &pxa27x_device_pwm1, | 566 | &pxa27x_device_pwm1, |
569 | &pxa3xx_device_i2c_power, | ||
570 | }; | 567 | }; |
571 | 568 | ||
572 | static struct sys_device pxa3xx_sysdev[] = { | 569 | static struct sys_device pxa3xx_sysdev[] = { |
@@ -595,7 +592,7 @@ static int __init pxa3xx_init(void) | |||
595 | */ | 592 | */ |
596 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); | 593 | ASCR &= ~(ASCR_RDH | ASCR_D1S | ASCR_D2S | ASCR_D3S); |
597 | 594 | ||
598 | clks_register(pxa3xx_clks, ARRAY_SIZE(pxa3xx_clks)); | 595 | clks_register(pxa3xx_clkregs, ARRAY_SIZE(pxa3xx_clkregs)); |
599 | 596 | ||
600 | if ((ret = pxa_init_dma(32))) | 597 | if ((ret = pxa_init_dma(32))) |
601 | return ret; | 598 | return ret; |
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c index e7ea91ce7f02..5d02a7325586 100644 --- a/arch/arm/mach-pxa/saar.c +++ b/arch/arm/mach-pxa/saar.c | |||
@@ -17,19 +17,44 @@ | |||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/delay.h> | ||
21 | #include <linux/fb.h> | ||
22 | #include <linux/i2c.h> | ||
20 | #include <linux/smc91x.h> | 23 | #include <linux/smc91x.h> |
24 | #include <linux/mfd/da903x.h> | ||
21 | 25 | ||
22 | #include <asm/mach-types.h> | 26 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
24 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
25 | #include <mach/pxa3xx-regs.h> | 29 | #include <mach/pxa3xx-regs.h> |
26 | #include <mach/mfp-pxa930.h> | 30 | #include <mach/mfp-pxa930.h> |
31 | #include <mach/i2c.h> | ||
32 | #include <mach/regs-lcd.h> | ||
33 | #include <mach/pxafb.h> | ||
27 | 34 | ||
28 | #include "devices.h" | 35 | #include "devices.h" |
29 | #include "generic.h" | 36 | #include "generic.h" |
30 | 37 | ||
38 | #define GPIO_LCD_RESET (16) | ||
39 | |||
31 | /* SAAR MFP configurations */ | 40 | /* SAAR MFP configurations */ |
32 | static mfp_cfg_t saar_mfp_cfg[] __initdata = { | 41 | static mfp_cfg_t saar_mfp_cfg[] __initdata = { |
42 | /* LCD */ | ||
43 | GPIO23_LCD_DD0, | ||
44 | GPIO24_LCD_DD1, | ||
45 | GPIO25_LCD_DD2, | ||
46 | GPIO26_LCD_DD3, | ||
47 | GPIO27_LCD_DD4, | ||
48 | GPIO28_LCD_DD5, | ||
49 | GPIO29_LCD_DD6, | ||
50 | GPIO44_LCD_DD7, | ||
51 | GPIO21_LCD_CS, | ||
52 | GPIO22_LCD_VSYNC, | ||
53 | GPIO17_LCD_FCLK_RD, | ||
54 | GPIO18_LCD_LCLK_A0, | ||
55 | GPIO19_LCD_PCLK_WR, | ||
56 | GPIO16_GPIO, /* LCD reset */ | ||
57 | |||
33 | /* Ethernet */ | 58 | /* Ethernet */ |
34 | DF_nCS1_nCS3, | 59 | DF_nCS1_nCS3, |
35 | GPIO97_GPIO, | 60 | GPIO97_GPIO, |
@@ -64,12 +89,408 @@ static struct platform_device smc91x_device = { | |||
64 | }, | 89 | }, |
65 | }; | 90 | }; |
66 | 91 | ||
92 | #if defined(CONFIG_FB_PXA) || (CONFIG_FB_PXA_MODULE) | ||
93 | static uint16_t lcd_power_on[] = { | ||
94 | /* single frame */ | ||
95 | SMART_CMD_NOOP, | ||
96 | SMART_CMD(0x00), | ||
97 | SMART_DELAY(0), | ||
98 | |||
99 | SMART_CMD_NOOP, | ||
100 | SMART_CMD(0x00), | ||
101 | SMART_DELAY(0), | ||
102 | |||
103 | SMART_CMD_NOOP, | ||
104 | SMART_CMD(0x00), | ||
105 | SMART_DELAY(0), | ||
106 | |||
107 | SMART_CMD_NOOP, | ||
108 | SMART_CMD(0x00), | ||
109 | SMART_DELAY(10), | ||
110 | |||
111 | /* calibration control */ | ||
112 | SMART_CMD(0x00), | ||
113 | SMART_CMD(0xA4), | ||
114 | SMART_DAT(0x80), | ||
115 | SMART_DAT(0x01), | ||
116 | SMART_DELAY(150), | ||
117 | |||
118 | /*Power-On Init sequence*/ | ||
119 | SMART_CMD(0x00), /* output ctrl */ | ||
120 | SMART_CMD(0x01), | ||
121 | SMART_DAT(0x01), | ||
122 | SMART_DAT(0x00), | ||
123 | SMART_CMD(0x00), /* wave ctrl */ | ||
124 | SMART_CMD(0x02), | ||
125 | SMART_DAT(0x07), | ||
126 | SMART_DAT(0x00), | ||
127 | SMART_CMD(0x00), | ||
128 | SMART_CMD(0x03), /* entry mode */ | ||
129 | SMART_DAT(0xD0), | ||
130 | SMART_DAT(0x30), | ||
131 | SMART_CMD(0x00), | ||
132 | SMART_CMD(0x08), /* display ctrl 2 */ | ||
133 | SMART_DAT(0x08), | ||
134 | SMART_DAT(0x08), | ||
135 | SMART_CMD(0x00), | ||
136 | SMART_CMD(0x09), /* display ctrl 3 */ | ||
137 | SMART_DAT(0x04), | ||
138 | SMART_DAT(0x2F), | ||
139 | SMART_CMD(0x00), | ||
140 | SMART_CMD(0x0A), /* display ctrl 4 */ | ||
141 | SMART_DAT(0x00), | ||
142 | SMART_DAT(0x08), | ||
143 | SMART_CMD(0x00), | ||
144 | SMART_CMD(0x0D), /* Frame Marker position */ | ||
145 | SMART_DAT(0x00), | ||
146 | SMART_DAT(0x08), | ||
147 | SMART_CMD(0x00), | ||
148 | SMART_CMD(0x60), /* Driver output control */ | ||
149 | SMART_DAT(0x27), | ||
150 | SMART_DAT(0x00), | ||
151 | SMART_CMD(0x00), | ||
152 | SMART_CMD(0x61), /* Base image display control */ | ||
153 | SMART_DAT(0x00), | ||
154 | SMART_DAT(0x01), | ||
155 | SMART_CMD(0x00), | ||
156 | SMART_CMD(0x30), /* Y settings 30h-3Dh */ | ||
157 | SMART_DAT(0x07), | ||
158 | SMART_DAT(0x07), | ||
159 | SMART_CMD(0x00), | ||
160 | SMART_CMD(0x31), | ||
161 | SMART_DAT(0x00), | ||
162 | SMART_DAT(0x07), | ||
163 | SMART_CMD(0x00), | ||
164 | SMART_CMD(0x32), /* Timing(3), ASW HOLD=0.5CLK */ | ||
165 | SMART_DAT(0x04), | ||
166 | SMART_DAT(0x00), | ||
167 | SMART_CMD(0x00), | ||
168 | SMART_CMD(0x33), /* Timing(4), CKV ST=0CLK, CKV ED=1CLK */ | ||
169 | SMART_DAT(0x03), | ||
170 | SMART_DAT(0x03), | ||
171 | SMART_CMD(0x00), | ||
172 | SMART_CMD(0x34), | ||
173 | SMART_DAT(0x00), | ||
174 | SMART_DAT(0x00), | ||
175 | SMART_CMD(0x00), | ||
176 | SMART_CMD(0x35), | ||
177 | SMART_DAT(0x02), | ||
178 | SMART_DAT(0x05), | ||
179 | SMART_CMD(0x00), | ||
180 | SMART_CMD(0x36), | ||
181 | SMART_DAT(0x1F), | ||
182 | SMART_DAT(0x1F), | ||
183 | SMART_CMD(0x00), | ||
184 | SMART_CMD(0x37), | ||
185 | SMART_DAT(0x07), | ||
186 | SMART_DAT(0x07), | ||
187 | SMART_CMD(0x00), | ||
188 | SMART_CMD(0x38), | ||
189 | SMART_DAT(0x00), | ||
190 | SMART_DAT(0x07), | ||
191 | SMART_CMD(0x00), | ||
192 | SMART_CMD(0x39), | ||
193 | SMART_DAT(0x04), | ||
194 | SMART_DAT(0x00), | ||
195 | SMART_CMD(0x00), | ||
196 | SMART_CMD(0x3A), | ||
197 | SMART_DAT(0x03), | ||
198 | SMART_DAT(0x03), | ||
199 | SMART_CMD(0x00), | ||
200 | SMART_CMD(0x3B), | ||
201 | SMART_DAT(0x00), | ||
202 | SMART_DAT(0x00), | ||
203 | SMART_CMD(0x00), | ||
204 | SMART_CMD(0x3C), | ||
205 | SMART_DAT(0x02), | ||
206 | SMART_DAT(0x05), | ||
207 | SMART_CMD(0x00), | ||
208 | SMART_CMD(0x3D), | ||
209 | SMART_DAT(0x1F), | ||
210 | SMART_DAT(0x1F), | ||
211 | SMART_CMD(0x00), /* Display control 1 */ | ||
212 | SMART_CMD(0x07), | ||
213 | SMART_DAT(0x00), | ||
214 | SMART_DAT(0x01), | ||
215 | SMART_CMD(0x00), /* Power control 5 */ | ||
216 | SMART_CMD(0x17), | ||
217 | SMART_DAT(0x00), | ||
218 | SMART_DAT(0x01), | ||
219 | SMART_CMD(0x00), /* Power control 1 */ | ||
220 | SMART_CMD(0x10), | ||
221 | SMART_DAT(0x10), | ||
222 | SMART_DAT(0xB0), | ||
223 | SMART_CMD(0x00), /* Power control 2 */ | ||
224 | SMART_CMD(0x11), | ||
225 | SMART_DAT(0x01), | ||
226 | SMART_DAT(0x30), | ||
227 | SMART_CMD(0x00), /* Power control 3 */ | ||
228 | SMART_CMD(0x12), | ||
229 | SMART_DAT(0x01), | ||
230 | SMART_DAT(0x9E), | ||
231 | SMART_CMD(0x00), /* Power control 4 */ | ||
232 | SMART_CMD(0x13), | ||
233 | SMART_DAT(0x17), | ||
234 | SMART_DAT(0x00), | ||
235 | SMART_CMD(0x00), /* Power control 3 */ | ||
236 | SMART_CMD(0x12), | ||
237 | SMART_DAT(0x01), | ||
238 | SMART_DAT(0xBE), | ||
239 | SMART_DELAY(100), | ||
240 | |||
241 | /* display mode : 240*320 */ | ||
242 | SMART_CMD(0x00), /* RAM address set(H) 0*/ | ||
243 | SMART_CMD(0x20), | ||
244 | SMART_DAT(0x00), | ||
245 | SMART_DAT(0x00), | ||
246 | SMART_CMD(0x00), /* RAM address set(V) 4*/ | ||
247 | SMART_CMD(0x21), | ||
248 | SMART_DAT(0x00), | ||
249 | SMART_DAT(0x00), | ||
250 | SMART_CMD(0x00), /* Start of Window RAM address set(H) 8*/ | ||
251 | SMART_CMD(0x50), | ||
252 | SMART_DAT(0x00), | ||
253 | SMART_DAT(0x00), | ||
254 | SMART_CMD(0x00), /* End of Window RAM address set(H) 12*/ | ||
255 | SMART_CMD(0x51), | ||
256 | SMART_DAT(0x00), | ||
257 | SMART_DAT(0xEF), | ||
258 | SMART_CMD(0x00), /* Start of Window RAM address set(V) 16*/ | ||
259 | SMART_CMD(0x52), | ||
260 | SMART_DAT(0x00), | ||
261 | SMART_DAT(0x00), | ||
262 | SMART_CMD(0x00), /* End of Window RAM address set(V) 20*/ | ||
263 | SMART_CMD(0x53), | ||
264 | SMART_DAT(0x01), | ||
265 | SMART_DAT(0x3F), | ||
266 | SMART_CMD(0x00), /* Panel interface control 1 */ | ||
267 | SMART_CMD(0x90), | ||
268 | SMART_DAT(0x00), | ||
269 | SMART_DAT(0x1A), | ||
270 | SMART_CMD(0x00), /* Panel interface control 2 */ | ||
271 | SMART_CMD(0x92), | ||
272 | SMART_DAT(0x04), | ||
273 | SMART_DAT(0x00), | ||
274 | SMART_CMD(0x00), /* Panel interface control 3 */ | ||
275 | SMART_CMD(0x93), | ||
276 | SMART_DAT(0x00), | ||
277 | SMART_DAT(0x05), | ||
278 | SMART_DELAY(20), | ||
279 | }; | ||
280 | |||
281 | static uint16_t lcd_panel_on[] = { | ||
282 | SMART_CMD(0x00), | ||
283 | SMART_CMD(0x07), | ||
284 | SMART_DAT(0x00), | ||
285 | SMART_DAT(0x21), | ||
286 | SMART_DELAY(1), | ||
287 | |||
288 | SMART_CMD(0x00), | ||
289 | SMART_CMD(0x07), | ||
290 | SMART_DAT(0x00), | ||
291 | SMART_DAT(0x61), | ||
292 | SMART_DELAY(100), | ||
293 | |||
294 | SMART_CMD(0x00), | ||
295 | SMART_CMD(0x07), | ||
296 | SMART_DAT(0x01), | ||
297 | SMART_DAT(0x73), | ||
298 | SMART_DELAY(1), | ||
299 | }; | ||
300 | |||
301 | static uint16_t lcd_panel_off[] = { | ||
302 | SMART_CMD(0x00), | ||
303 | SMART_CMD(0x07), | ||
304 | SMART_DAT(0x00), | ||
305 | SMART_DAT(0x72), | ||
306 | SMART_DELAY(40), | ||
307 | |||
308 | SMART_CMD(0x00), | ||
309 | SMART_CMD(0x07), | ||
310 | SMART_DAT(0x00), | ||
311 | SMART_DAT(0x01), | ||
312 | SMART_DELAY(1), | ||
313 | |||
314 | SMART_CMD(0x00), | ||
315 | SMART_CMD(0x07), | ||
316 | SMART_DAT(0x00), | ||
317 | SMART_DAT(0x00), | ||
318 | SMART_DELAY(1), | ||
319 | }; | ||
320 | |||
321 | static uint16_t lcd_power_off[] = { | ||
322 | SMART_CMD(0x00), | ||
323 | SMART_CMD(0x10), | ||
324 | SMART_DAT(0x00), | ||
325 | SMART_DAT(0x80), | ||
326 | |||
327 | SMART_CMD(0x00), | ||
328 | SMART_CMD(0x11), | ||
329 | SMART_DAT(0x01), | ||
330 | SMART_DAT(0x60), | ||
331 | |||
332 | SMART_CMD(0x00), | ||
333 | SMART_CMD(0x12), | ||
334 | SMART_DAT(0x01), | ||
335 | SMART_DAT(0xAE), | ||
336 | SMART_DELAY(40), | ||
337 | |||
338 | SMART_CMD(0x00), | ||
339 | SMART_CMD(0x10), | ||
340 | SMART_DAT(0x00), | ||
341 | SMART_DAT(0x00), | ||
342 | }; | ||
343 | |||
344 | static uint16_t update_framedata[] = { | ||
345 | /* set display ram: 240*320 */ | ||
346 | SMART_CMD(0x00), /* RAM address set(H) 0*/ | ||
347 | SMART_CMD(0x20), | ||
348 | SMART_DAT(0x00), | ||
349 | SMART_DAT(0x00), | ||
350 | SMART_CMD(0x00), /* RAM address set(V) 4*/ | ||
351 | SMART_CMD(0x21), | ||
352 | SMART_DAT(0x00), | ||
353 | SMART_DAT(0x00), | ||
354 | SMART_CMD(0x00), /* Start of Window RAM address set(H) 8 */ | ||
355 | SMART_CMD(0x50), | ||
356 | SMART_DAT(0x00), | ||
357 | SMART_DAT(0x00), | ||
358 | SMART_CMD(0x00), /* End of Window RAM address set(H) 12 */ | ||
359 | SMART_CMD(0x51), | ||
360 | SMART_DAT(0x00), | ||
361 | SMART_DAT(0xEF), | ||
362 | SMART_CMD(0x00), /* Start of Window RAM address set(V) 16 */ | ||
363 | SMART_CMD(0x52), | ||
364 | SMART_DAT(0x00), | ||
365 | SMART_DAT(0x00), | ||
366 | SMART_CMD(0x00), /* End of Window RAM address set(V) 20 */ | ||
367 | SMART_CMD(0x53), | ||
368 | SMART_DAT(0x01), | ||
369 | SMART_DAT(0x3F), | ||
370 | |||
371 | /* wait for vsync cmd before transferring frame data */ | ||
372 | SMART_CMD_WAIT_FOR_VSYNC, | ||
373 | |||
374 | /* write ram */ | ||
375 | SMART_CMD(0x00), | ||
376 | SMART_CMD(0x22), | ||
377 | |||
378 | /* write frame data */ | ||
379 | SMART_CMD_WRITE_FRAME, | ||
380 | }; | ||
381 | |||
382 | static void ltm022a97a_lcd_power(int on, struct fb_var_screeninfo *var) | ||
383 | { | ||
384 | static int pin_requested = 0; | ||
385 | struct fb_info *info = container_of(var, struct fb_info, var); | ||
386 | int err; | ||
387 | |||
388 | if (!pin_requested) { | ||
389 | err = gpio_request(GPIO_LCD_RESET, "lcd reset"); | ||
390 | if (err) { | ||
391 | pr_err("failed to request gpio for LCD reset\n"); | ||
392 | return; | ||
393 | } | ||
394 | |||
395 | gpio_direction_output(GPIO_LCD_RESET, 0); | ||
396 | pin_requested = 1; | ||
397 | } | ||
398 | |||
399 | if (on) { | ||
400 | gpio_set_value(GPIO_LCD_RESET, 0); msleep(100); | ||
401 | gpio_set_value(GPIO_LCD_RESET, 1); msleep(10); | ||
402 | |||
403 | pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_power_on)); | ||
404 | pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_panel_on)); | ||
405 | } else { | ||
406 | pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_panel_off)); | ||
407 | pxafb_smart_queue(info, ARRAY_AND_SIZE(lcd_power_off)); | ||
408 | } | ||
409 | |||
410 | err = pxafb_smart_flush(info); | ||
411 | if (err) | ||
412 | pr_err("%s: timed out\n", __func__); | ||
413 | } | ||
414 | |||
415 | static void ltm022a97a_update(struct fb_info *info) | ||
416 | { | ||
417 | pxafb_smart_queue(info, ARRAY_AND_SIZE(update_framedata)); | ||
418 | pxafb_smart_flush(info); | ||
419 | } | ||
420 | |||
421 | static struct pxafb_mode_info toshiba_ltm022a97a_modes[] = { | ||
422 | [0] = { | ||
423 | .xres = 240, | ||
424 | .yres = 320, | ||
425 | .bpp = 16, | ||
426 | .a0csrd_set_hld = 30, | ||
427 | .a0cswr_set_hld = 30, | ||
428 | .wr_pulse_width = 30, | ||
429 | .rd_pulse_width = 30, | ||
430 | .op_hold_time = 30, | ||
431 | .cmd_inh_time = 60, | ||
432 | |||
433 | /* L_LCLK_A0 and L_LCLK_RD active low */ | ||
434 | .sync = FB_SYNC_HOR_HIGH_ACT | | ||
435 | FB_SYNC_VERT_HIGH_ACT, | ||
436 | }, | ||
437 | }; | ||
438 | |||
439 | static struct pxafb_mach_info saar_lcd_info = { | ||
440 | .modes = toshiba_ltm022a97a_modes, | ||
441 | .num_modes = 1, | ||
442 | .lcd_conn = LCD_SMART_PANEL_8BPP | LCD_PCLK_EDGE_FALL, | ||
443 | .pxafb_lcd_power = ltm022a97a_lcd_power, | ||
444 | .smart_update = ltm022a97a_update, | ||
445 | }; | ||
446 | |||
447 | static void __init saar_init_lcd(void) | ||
448 | { | ||
449 | set_pxa_fb_info(&saar_lcd_info); | ||
450 | } | ||
451 | #else | ||
452 | static inline void saar_init_lcd(void) {} | ||
453 | #endif | ||
454 | |||
455 | #if defined(CONFIG_I2C_PXA) || defined(CONFIG_I2C_PXA_MODULE) | ||
456 | static struct da903x_subdev_info saar_da9034_subdevs[] = { | ||
457 | [0] = { | ||
458 | .name = "da903x-backlight", | ||
459 | .id = DA9034_ID_WLED, | ||
460 | }, | ||
461 | }; | ||
462 | |||
463 | static struct da903x_platform_data saar_da9034_info = { | ||
464 | .num_subdevs = ARRAY_SIZE(saar_da9034_subdevs), | ||
465 | .subdevs = saar_da9034_subdevs, | ||
466 | }; | ||
467 | |||
468 | static struct i2c_board_info saar_i2c_info[] = { | ||
469 | [0] = { | ||
470 | .type = "da9034", | ||
471 | .addr = 0x34, | ||
472 | .platform_data = &saar_da9034_info, | ||
473 | .irq = gpio_to_irq(mfp_to_gpio(MFP_PIN_GPIO83)), | ||
474 | }, | ||
475 | }; | ||
476 | |||
477 | static void __init saar_init_i2c(void) | ||
478 | { | ||
479 | pxa_set_i2c_info(NULL); | ||
480 | i2c_register_board_info(0, ARRAY_AND_SIZE(saar_i2c_info)); | ||
481 | } | ||
482 | #else | ||
483 | static inline void saar_init_i2c(void) {} | ||
484 | #endif | ||
67 | static void __init saar_init(void) | 485 | static void __init saar_init(void) |
68 | { | 486 | { |
69 | /* initialize MFP configurations */ | 487 | /* initialize MFP configurations */ |
70 | pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg)); | 488 | pxa3xx_mfp_config(ARRAY_AND_SIZE(saar_mfp_cfg)); |
71 | 489 | ||
72 | platform_device_register(&smc91x_device); | 490 | platform_device_register(&smc91x_device); |
491 | |||
492 | saar_init_i2c(); | ||
493 | saar_init_lcd(); | ||
73 | } | 494 | } |
74 | 495 | ||
75 | MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)") | 496 | MACHINE_START(SAAR, "PXA930 Handheld Platform (aka SAAR)") |
diff --git a/arch/arm/mach-pxa/smemc.c b/arch/arm/mach-pxa/smemc.c index ad346addc028..d6f6904132a6 100644 --- a/arch/arm/mach-pxa/smemc.c +++ b/arch/arm/mach-pxa/smemc.c | |||
@@ -8,6 +8,8 @@ | |||
8 | #include <linux/io.h> | 8 | #include <linux/io.h> |
9 | #include <linux/sysdev.h> | 9 | #include <linux/sysdev.h> |
10 | 10 | ||
11 | #include <mach/hardware.h> | ||
12 | |||
11 | #define SMEMC_PHYS_BASE (0x4A000000) | 13 | #define SMEMC_PHYS_BASE (0x4A000000) |
12 | #define SMEMC_PHYS_SIZE (0x90) | 14 | #define SMEMC_PHYS_SIZE (0x90) |
13 | 15 | ||
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index 3be76ee2bdbf..7299d87a1cb3 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/leds.h> | 23 | #include <linux/leds.h> |
24 | #include <linux/mmc/host.h> | 24 | #include <linux/mmc/host.h> |
25 | #include <linux/mtd/physmap.h> | ||
25 | #include <linux/pm.h> | 26 | #include <linux/pm.h> |
26 | #include <linux/backlight.h> | 27 | #include <linux/backlight.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
@@ -122,6 +123,10 @@ static unsigned long spitz_pin_config[] __initdata = { | |||
122 | GPIO105_GPIO, /* SPITZ_GPIO_CF_IRQ */ | 123 | GPIO105_GPIO, /* SPITZ_GPIO_CF_IRQ */ |
123 | GPIO106_GPIO, /* SPITZ_GPIO_CF2_IRQ */ | 124 | GPIO106_GPIO, /* SPITZ_GPIO_CF2_IRQ */ |
124 | 125 | ||
126 | /* I2C */ | ||
127 | GPIO117_I2C_SCL, | ||
128 | GPIO118_I2C_SDA, | ||
129 | |||
125 | GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, | 130 | GPIO1_GPIO | WAKEUP_ON_EDGE_RISE, |
126 | }; | 131 | }; |
127 | 132 | ||
@@ -609,10 +614,41 @@ static struct pxafb_mach_info spitz_pxafb_info = { | |||
609 | }; | 614 | }; |
610 | 615 | ||
611 | 616 | ||
617 | static struct mtd_partition sharpsl_rom_parts[] = { | ||
618 | { | ||
619 | .name ="Boot PROM Filesystem", | ||
620 | .offset = 0x00140000, | ||
621 | .size = MTDPART_SIZ_FULL, | ||
622 | }, | ||
623 | }; | ||
624 | |||
625 | static struct physmap_flash_data sharpsl_rom_data = { | ||
626 | .width = 2, | ||
627 | .nr_parts = ARRAY_SIZE(sharpsl_rom_parts), | ||
628 | .parts = sharpsl_rom_parts, | ||
629 | }; | ||
630 | |||
631 | static struct resource sharpsl_rom_resources[] = { | ||
632 | { | ||
633 | .start = 0x00000000, | ||
634 | .end = 0x007fffff, | ||
635 | .flags = IORESOURCE_MEM, | ||
636 | }, | ||
637 | }; | ||
638 | |||
639 | static struct platform_device sharpsl_rom_device = { | ||
640 | .name = "physmap-flash", | ||
641 | .id = -1, | ||
642 | .resource = sharpsl_rom_resources, | ||
643 | .num_resources = ARRAY_SIZE(sharpsl_rom_resources), | ||
644 | .dev.platform_data = &sharpsl_rom_data, | ||
645 | }; | ||
646 | |||
612 | static struct platform_device *devices[] __initdata = { | 647 | static struct platform_device *devices[] __initdata = { |
613 | &spitzscoop_device, | 648 | &spitzscoop_device, |
614 | &spitzkbd_device, | 649 | &spitzkbd_device, |
615 | &spitzled_device, | 650 | &spitzled_device, |
651 | &sharpsl_rom_device, | ||
616 | }; | 652 | }; |
617 | 653 | ||
618 | static void spitz_poweroff(void) | 654 | static void spitz_poweroff(void) |
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c index 2c31ec725688..6f42004db3ed 100644 --- a/arch/arm/mach-pxa/ssp.c +++ b/arch/arm/mach-pxa/ssp.c | |||
@@ -356,7 +356,7 @@ static int __devinit ssp_probe(struct platform_device *pdev, int type) | |||
356 | } | 356 | } |
357 | ssp->pdev = pdev; | 357 | ssp->pdev = pdev; |
358 | 358 | ||
359 | ssp->clk = clk_get(&pdev->dev, "SSPCLK"); | 359 | ssp->clk = clk_get(&pdev->dev, NULL); |
360 | if (IS_ERR(ssp->clk)) { | 360 | if (IS_ERR(ssp->clk)) { |
361 | ret = PTR_ERR(ssp->clk); | 361 | ret = PTR_ERR(ssp->clk); |
362 | goto err_free; | 362 | goto err_free; |
diff --git a/arch/arm/mach-pxa/tavorevb.c b/arch/arm/mach-pxa/tavorevb.c index 589d32b4fc46..58ef08a5224b 100644 --- a/arch/arm/mach-pxa/tavorevb.c +++ b/arch/arm/mach-pxa/tavorevb.c | |||
@@ -18,12 +18,15 @@ | |||
18 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/smc91x.h> | 20 | #include <linux/smc91x.h> |
21 | #include <linux/pwm_backlight.h> | ||
21 | 22 | ||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
25 | #include <mach/pxa3xx-regs.h> | 26 | #include <mach/pxa3xx-regs.h> |
26 | #include <mach/mfp-pxa930.h> | 27 | #include <mach/mfp-pxa930.h> |
28 | #include <mach/pxafb.h> | ||
29 | #include <mach/pxa27x_keypad.h> | ||
27 | 30 | ||
28 | #include "devices.h" | 31 | #include "devices.h" |
29 | #include "generic.h" | 32 | #include "generic.h" |
@@ -33,6 +36,45 @@ static mfp_cfg_t tavorevb_mfp_cfg[] __initdata = { | |||
33 | /* Ethernet */ | 36 | /* Ethernet */ |
34 | DF_nCS1_nCS3, | 37 | DF_nCS1_nCS3, |
35 | GPIO47_GPIO, | 38 | GPIO47_GPIO, |
39 | |||
40 | /* LCD */ | ||
41 | GPIO23_LCD_DD0, | ||
42 | GPIO24_LCD_DD1, | ||
43 | GPIO25_LCD_DD2, | ||
44 | GPIO26_LCD_DD3, | ||
45 | GPIO27_LCD_DD4, | ||
46 | GPIO28_LCD_DD5, | ||
47 | GPIO29_LCD_DD6, | ||
48 | GPIO44_LCD_DD7, | ||
49 | GPIO21_LCD_CS, | ||
50 | GPIO22_LCD_CS2, | ||
51 | |||
52 | GPIO17_LCD_FCLK_RD, | ||
53 | GPIO18_LCD_LCLK_A0, | ||
54 | GPIO19_LCD_PCLK_WR, | ||
55 | |||
56 | /* LCD Backlight */ | ||
57 | GPIO43_PWM3, /* primary backlight */ | ||
58 | GPIO32_PWM0, /* secondary backlight */ | ||
59 | |||
60 | /* Keypad */ | ||
61 | GPIO0_KP_MKIN_0, | ||
62 | GPIO2_KP_MKIN_1, | ||
63 | GPIO4_KP_MKIN_2, | ||
64 | GPIO6_KP_MKIN_3, | ||
65 | GPIO8_KP_MKIN_4, | ||
66 | GPIO10_KP_MKIN_5, | ||
67 | GPIO12_KP_MKIN_6, | ||
68 | GPIO1_KP_MKOUT_0, | ||
69 | GPIO3_KP_MKOUT_1, | ||
70 | GPIO5_KP_MKOUT_2, | ||
71 | GPIO7_KP_MKOUT_3, | ||
72 | GPIO9_KP_MKOUT_4, | ||
73 | GPIO11_KP_MKOUT_5, | ||
74 | GPIO13_KP_MKOUT_6, | ||
75 | |||
76 | GPIO14_KP_DKIN_2, | ||
77 | GPIO15_KP_DKIN_3, | ||
36 | }; | 78 | }; |
37 | 79 | ||
38 | #define TAVOREVB_ETH_PHYS (0x14000000) | 80 | #define TAVOREVB_ETH_PHYS (0x14000000) |
@@ -64,12 +106,382 @@ static struct platform_device smc91x_device = { | |||
64 | }, | 106 | }, |
65 | }; | 107 | }; |
66 | 108 | ||
109 | #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE) | ||
110 | static unsigned int tavorevb_matrix_key_map[] = { | ||
111 | /* KEY(row, col, key_code) */ | ||
112 | KEY(0, 4, KEY_A), KEY(0, 5, KEY_B), KEY(0, 6, KEY_C), | ||
113 | KEY(1, 4, KEY_E), KEY(1, 5, KEY_F), KEY(1, 6, KEY_G), | ||
114 | KEY(2, 4, KEY_I), KEY(2, 5, KEY_J), KEY(2, 6, KEY_K), | ||
115 | KEY(3, 4, KEY_M), KEY(3, 5, KEY_N), KEY(3, 6, KEY_O), | ||
116 | KEY(4, 5, KEY_R), KEY(4, 6, KEY_S), | ||
117 | KEY(5, 4, KEY_U), KEY(5, 4, KEY_V), KEY(5, 6, KEY_W), | ||
118 | |||
119 | KEY(6, 4, KEY_Y), KEY(6, 5, KEY_Z), | ||
120 | |||
121 | KEY(0, 3, KEY_0), KEY(2, 0, KEY_1), KEY(2, 1, KEY_2), KEY(2, 2, KEY_3), | ||
122 | KEY(2, 3, KEY_4), KEY(1, 0, KEY_5), KEY(1, 1, KEY_6), KEY(1, 2, KEY_7), | ||
123 | KEY(1, 3, KEY_8), KEY(0, 2, KEY_9), | ||
124 | |||
125 | KEY(6, 6, KEY_SPACE), | ||
126 | KEY(0, 0, KEY_KPASTERISK), /* * */ | ||
127 | KEY(0, 1, KEY_KPDOT), /* # */ | ||
128 | |||
129 | KEY(4, 1, KEY_UP), | ||
130 | KEY(4, 3, KEY_DOWN), | ||
131 | KEY(4, 0, KEY_LEFT), | ||
132 | KEY(4, 2, KEY_RIGHT), | ||
133 | KEY(6, 0, KEY_HOME), | ||
134 | KEY(3, 2, KEY_END), | ||
135 | KEY(6, 1, KEY_DELETE), | ||
136 | KEY(5, 2, KEY_BACK), | ||
137 | KEY(6, 3, KEY_CAPSLOCK), /* KEY_LEFTSHIFT), */ | ||
138 | |||
139 | KEY(4, 4, KEY_ENTER), /* scroll push */ | ||
140 | KEY(6, 2, KEY_ENTER), /* keypad action */ | ||
141 | |||
142 | KEY(3, 1, KEY_SEND), | ||
143 | KEY(5, 3, KEY_RECORD), | ||
144 | KEY(5, 0, KEY_VOLUMEUP), | ||
145 | KEY(5, 1, KEY_VOLUMEDOWN), | ||
146 | |||
147 | KEY(3, 0, KEY_F22), /* soft1 */ | ||
148 | KEY(3, 3, KEY_F23), /* soft2 */ | ||
149 | }; | ||
150 | |||
151 | static struct pxa27x_keypad_platform_data tavorevb_keypad_info = { | ||
152 | .matrix_key_rows = 7, | ||
153 | .matrix_key_cols = 7, | ||
154 | .matrix_key_map = tavorevb_matrix_key_map, | ||
155 | .matrix_key_map_size = ARRAY_SIZE(tavorevb_matrix_key_map), | ||
156 | .debounce_interval = 30, | ||
157 | }; | ||
158 | |||
159 | static void __init tavorevb_init_keypad(void) | ||
160 | { | ||
161 | pxa_set_keypad_info(&tavorevb_keypad_info); | ||
162 | } | ||
163 | #else | ||
164 | static inline void tavorevb_init_keypad(void) {} | ||
165 | #endif /* CONFIG_KEYBOARD_PXA27x || CONFIG_KEYBOARD_PXA27x_MODULE */ | ||
166 | |||
167 | #if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) | ||
168 | static struct platform_pwm_backlight_data tavorevb_backlight_data[] = { | ||
169 | [0] = { | ||
170 | /* primary backlight */ | ||
171 | .pwm_id = 2, | ||
172 | .max_brightness = 100, | ||
173 | .dft_brightness = 100, | ||
174 | .pwm_period_ns = 100000, | ||
175 | }, | ||
176 | [1] = { | ||
177 | /* secondary backlight */ | ||
178 | .pwm_id = 0, | ||
179 | .max_brightness = 100, | ||
180 | .dft_brightness = 100, | ||
181 | .pwm_period_ns = 100000, | ||
182 | }, | ||
183 | }; | ||
184 | |||
185 | static struct platform_device tavorevb_backlight_devices[] = { | ||
186 | [0] = { | ||
187 | .name = "pwm-backlight", | ||
188 | .id = 0, | ||
189 | .dev = { | ||
190 | .platform_data = &tavorevb_backlight_data[0], | ||
191 | }, | ||
192 | }, | ||
193 | [1] = { | ||
194 | .name = "pwm-backlight", | ||
195 | .id = 1, | ||
196 | .dev = { | ||
197 | .platform_data = &tavorevb_backlight_data[1], | ||
198 | }, | ||
199 | }, | ||
200 | }; | ||
201 | |||
202 | static uint16_t panel_init[] = { | ||
203 | /* DSTB OUT */ | ||
204 | SMART_CMD(0x00), | ||
205 | SMART_CMD_NOOP, | ||
206 | SMART_DELAY(1), | ||
207 | |||
208 | SMART_CMD(0x00), | ||
209 | SMART_CMD_NOOP, | ||
210 | SMART_DELAY(1), | ||
211 | |||
212 | SMART_CMD(0x00), | ||
213 | SMART_CMD_NOOP, | ||
214 | SMART_DELAY(1), | ||
215 | |||
216 | /* STB OUT */ | ||
217 | SMART_CMD(0x00), | ||
218 | SMART_CMD(0x1D), | ||
219 | SMART_DAT(0x00), | ||
220 | SMART_DAT(0x05), | ||
221 | SMART_DELAY(1), | ||
222 | |||
223 | /* P-ON Init sequence */ | ||
224 | SMART_CMD(0x00), /* OSC ON */ | ||
225 | SMART_CMD(0x00), | ||
226 | SMART_DAT(0x00), | ||
227 | SMART_DAT(0x01), | ||
228 | SMART_CMD(0x00), | ||
229 | SMART_CMD(0x01), /* SOURCE DRIVER SHIFT DIRECTION and display RAM setting */ | ||
230 | SMART_DAT(0x01), | ||
231 | SMART_DAT(0x27), | ||
232 | SMART_CMD(0x00), | ||
233 | SMART_CMD(0x02), /* LINE INV */ | ||
234 | SMART_DAT(0x02), | ||
235 | SMART_DAT(0x00), | ||
236 | SMART_CMD(0x00), | ||
237 | SMART_CMD(0x03), /* IF mode(1) */ | ||
238 | SMART_DAT(0x01), /* 8bit smart mode(8-8),high speed write mode */ | ||
239 | SMART_DAT(0x30), | ||
240 | SMART_CMD(0x07), | ||
241 | SMART_CMD(0x00), /* RAM Write Mode */ | ||
242 | SMART_DAT(0x00), | ||
243 | SMART_DAT(0x03), | ||
244 | SMART_CMD(0x00), | ||
245 | |||
246 | /* DISPLAY Setting, 262K, fixed(NO scroll), no split screen */ | ||
247 | SMART_CMD(0x07), | ||
248 | SMART_DAT(0x40), /* 16/18/19 BPP */ | ||
249 | SMART_DAT(0x00), | ||
250 | SMART_CMD(0x00), | ||
251 | SMART_CMD(0x08), /* BP, FP Seting, BP=2H, FP=3H */ | ||
252 | SMART_DAT(0x03), | ||
253 | SMART_DAT(0x02), | ||
254 | SMART_CMD(0x00), | ||
255 | SMART_CMD(0x0C), /* IF mode(2), using internal clock & MPU */ | ||
256 | SMART_DAT(0x00), | ||
257 | SMART_DAT(0x00), | ||
258 | SMART_CMD(0x00), | ||
259 | SMART_CMD(0x0D), /* Frame setting, 1Min. Frequence, 16CLK */ | ||
260 | SMART_DAT(0x00), | ||
261 | SMART_DAT(0x10), | ||
262 | SMART_CMD(0x00), | ||
263 | SMART_CMD(0x12), /* Timing(1),ASW W=4CLK, ASW ST=1CLK */ | ||
264 | SMART_DAT(0x03), | ||
265 | SMART_DAT(0x02), | ||
266 | SMART_CMD(0x00), | ||
267 | SMART_CMD(0x13), /* Timing(2),OEV ST=0.5CLK, OEV ED=1CLK */ | ||
268 | SMART_DAT(0x01), | ||
269 | SMART_DAT(0x02), | ||
270 | SMART_CMD(0x00), | ||
271 | SMART_CMD(0x14), /* Timing(3), ASW HOLD=0.5CLK */ | ||
272 | SMART_DAT(0x00), | ||
273 | SMART_DAT(0x00), | ||
274 | SMART_CMD(0x00), | ||
275 | SMART_CMD(0x15), /* Timing(4), CKV ST=0CLK, CKV ED=1CLK */ | ||
276 | SMART_DAT(0x20), | ||
277 | SMART_DAT(0x00), | ||
278 | SMART_CMD(0x00), | ||
279 | SMART_CMD(0x1C), | ||
280 | SMART_DAT(0x00), | ||
281 | SMART_DAT(0x00), | ||
282 | SMART_CMD(0x03), | ||
283 | SMART_CMD(0x00), | ||
284 | SMART_DAT(0x04), | ||
285 | SMART_DAT(0x03), | ||
286 | SMART_CMD(0x03), | ||
287 | SMART_CMD(0x01), | ||
288 | SMART_DAT(0x03), | ||
289 | SMART_DAT(0x04), | ||
290 | SMART_CMD(0x03), | ||
291 | SMART_CMD(0x02), | ||
292 | SMART_DAT(0x04), | ||
293 | SMART_DAT(0x03), | ||
294 | SMART_CMD(0x03), | ||
295 | SMART_CMD(0x03), | ||
296 | SMART_DAT(0x03), | ||
297 | SMART_DAT(0x03), | ||
298 | SMART_CMD(0x03), | ||
299 | SMART_CMD(0x04), | ||
300 | SMART_DAT(0x01), | ||
301 | SMART_DAT(0x01), | ||
302 | SMART_CMD(0x03), | ||
303 | SMART_CMD(0x05), | ||
304 | SMART_DAT(0x00), | ||
305 | SMART_DAT(0x00), | ||
306 | SMART_CMD(0x04), | ||
307 | SMART_CMD(0x02), | ||
308 | SMART_DAT(0x00), | ||
309 | SMART_DAT(0x00), | ||
310 | SMART_CMD(0x04), | ||
311 | SMART_CMD(0x03), | ||
312 | SMART_DAT(0x01), | ||
313 | SMART_DAT(0x3F), | ||
314 | SMART_DELAY(0), | ||
315 | |||
316 | /* DISP RAM setting: 240*320 */ | ||
317 | SMART_CMD(0x04), /* HADDR, START 0 */ | ||
318 | SMART_CMD(0x06), | ||
319 | SMART_DAT(0x00), | ||
320 | SMART_DAT(0x00), /* x1,3 */ | ||
321 | SMART_CMD(0x04), /* HADDR, END 4 */ | ||
322 | SMART_CMD(0x07), | ||
323 | SMART_DAT(0x00), | ||
324 | SMART_DAT(0xEF), /* x2, 7 */ | ||
325 | SMART_CMD(0x04), /* VADDR, START 8 */ | ||
326 | SMART_CMD(0x08), | ||
327 | SMART_DAT(0x00), /* y1, 10 */ | ||
328 | SMART_DAT(0x00), /* y1, 11 */ | ||
329 | SMART_CMD(0x04), /* VADDR, END 12 */ | ||
330 | SMART_CMD(0x09), | ||
331 | SMART_DAT(0x01), /* y2, 14 */ | ||
332 | SMART_DAT(0x3F), /* y2, 15 */ | ||
333 | SMART_CMD(0x02), /* RAM ADDR SETTING 16 */ | ||
334 | SMART_CMD(0x00), | ||
335 | SMART_DAT(0x00), | ||
336 | SMART_DAT(0x00), /* x1, 19 */ | ||
337 | SMART_CMD(0x02), /* RAM ADDR SETTING 20 */ | ||
338 | SMART_CMD(0x01), | ||
339 | SMART_DAT(0x00), /* y1, 22 */ | ||
340 | SMART_DAT(0x00), /* y1, 23 */ | ||
341 | }; | ||
342 | |||
343 | static uint16_t panel_on[] = { | ||
344 | /* Power-IC ON */ | ||
345 | SMART_CMD(0x01), | ||
346 | SMART_CMD(0x02), | ||
347 | SMART_DAT(0x07), | ||
348 | SMART_DAT(0x7D), | ||
349 | SMART_CMD(0x01), | ||
350 | SMART_CMD(0x03), | ||
351 | SMART_DAT(0x00), | ||
352 | SMART_DAT(0x05), | ||
353 | SMART_CMD(0x01), | ||
354 | SMART_CMD(0x04), | ||
355 | SMART_DAT(0x00), | ||
356 | SMART_DAT(0x00), | ||
357 | SMART_CMD(0x01), | ||
358 | SMART_CMD(0x05), | ||
359 | SMART_DAT(0x00), | ||
360 | SMART_DAT(0x15), | ||
361 | SMART_CMD(0x01), | ||
362 | SMART_CMD(0x00), | ||
363 | SMART_DAT(0xC0), | ||
364 | SMART_DAT(0x10), | ||
365 | SMART_DELAY(30), | ||
366 | |||
367 | /* DISP ON */ | ||
368 | SMART_CMD(0x01), | ||
369 | SMART_CMD(0x01), | ||
370 | SMART_DAT(0x00), | ||
371 | SMART_DAT(0x01), | ||
372 | SMART_CMD(0x01), | ||
373 | SMART_CMD(0x00), | ||
374 | SMART_DAT(0xFF), | ||
375 | SMART_DAT(0xFE), | ||
376 | SMART_DELAY(150), | ||
377 | }; | ||
378 | |||
379 | static uint16_t panel_off[] = { | ||
380 | SMART_CMD(0x00), | ||
381 | SMART_CMD(0x1E), | ||
382 | SMART_DAT(0x00), | ||
383 | SMART_DAT(0x0A), | ||
384 | SMART_CMD(0x01), | ||
385 | SMART_CMD(0x00), | ||
386 | SMART_DAT(0xFF), | ||
387 | SMART_DAT(0xEE), | ||
388 | SMART_CMD(0x01), | ||
389 | SMART_CMD(0x00), | ||
390 | SMART_DAT(0xF8), | ||
391 | SMART_DAT(0x12), | ||
392 | SMART_CMD(0x01), | ||
393 | SMART_CMD(0x00), | ||
394 | SMART_DAT(0xE8), | ||
395 | SMART_DAT(0x11), | ||
396 | SMART_CMD(0x01), | ||
397 | SMART_CMD(0x00), | ||
398 | SMART_DAT(0xC0), | ||
399 | SMART_DAT(0x11), | ||
400 | SMART_CMD(0x01), | ||
401 | SMART_CMD(0x00), | ||
402 | SMART_DAT(0x40), | ||
403 | SMART_DAT(0x11), | ||
404 | SMART_CMD(0x01), | ||
405 | SMART_CMD(0x00), | ||
406 | SMART_DAT(0x00), | ||
407 | SMART_DAT(0x10), | ||
408 | }; | ||
409 | |||
410 | static uint16_t update_framedata[] = { | ||
411 | /* write ram */ | ||
412 | SMART_CMD(0x02), | ||
413 | SMART_CMD(0x02), | ||
414 | |||
415 | /* write frame data */ | ||
416 | SMART_CMD_WRITE_FRAME, | ||
417 | }; | ||
418 | |||
419 | static void ltm020d550_lcd_power(int on, struct fb_var_screeninfo *var) | ||
420 | { | ||
421 | struct fb_info *info = container_of(var, struct fb_info, var); | ||
422 | |||
423 | if (on) { | ||
424 | pxafb_smart_queue(info, ARRAY_AND_SIZE(panel_init)); | ||
425 | pxafb_smart_queue(info, ARRAY_AND_SIZE(panel_on)); | ||
426 | } else { | ||
427 | pxafb_smart_queue(info, ARRAY_AND_SIZE(panel_off)); | ||
428 | } | ||
429 | |||
430 | if (pxafb_smart_flush(info)) | ||
431 | pr_err("%s: timed out\n", __func__); | ||
432 | } | ||
433 | |||
434 | static void ltm020d550_update(struct fb_info *info) | ||
435 | { | ||
436 | pxafb_smart_queue(info, ARRAY_AND_SIZE(update_framedata)); | ||
437 | pxafb_smart_flush(info); | ||
438 | } | ||
439 | |||
440 | static struct pxafb_mode_info toshiba_ltm020d550_modes[] = { | ||
441 | [0] = { | ||
442 | .xres = 240, | ||
443 | .yres = 320, | ||
444 | .bpp = 16, | ||
445 | .a0csrd_set_hld = 30, | ||
446 | .a0cswr_set_hld = 30, | ||
447 | .wr_pulse_width = 30, | ||
448 | .rd_pulse_width = 170, | ||
449 | .op_hold_time = 30, | ||
450 | .cmd_inh_time = 60, | ||
451 | |||
452 | /* L_LCLK_A0 and L_LCLK_RD active low */ | ||
453 | .sync = FB_SYNC_HOR_HIGH_ACT | | ||
454 | FB_SYNC_VERT_HIGH_ACT, | ||
455 | }, | ||
456 | }; | ||
457 | |||
458 | static struct pxafb_mach_info tavorevb_lcd_info = { | ||
459 | .modes = toshiba_ltm020d550_modes, | ||
460 | .num_modes = 1, | ||
461 | .lcd_conn = LCD_SMART_PANEL_8BPP | LCD_PCLK_EDGE_FALL, | ||
462 | .pxafb_lcd_power = ltm020d550_lcd_power, | ||
463 | .smart_update = ltm020d550_update, | ||
464 | }; | ||
465 | |||
466 | static void __init tavorevb_init_lcd(void) | ||
467 | { | ||
468 | platform_device_register(&tavorevb_backlight_devices[0]); | ||
469 | platform_device_register(&tavorevb_backlight_devices[1]); | ||
470 | set_pxa_fb_info(&tavorevb_lcd_info); | ||
471 | } | ||
472 | #else | ||
473 | static inline void tavorevb_init_lcd(void) {} | ||
474 | #endif /* CONFIG_FB_PXA || CONFIG_FB_PXA_MODULE */ | ||
475 | |||
67 | static void __init tavorevb_init(void) | 476 | static void __init tavorevb_init(void) |
68 | { | 477 | { |
69 | /* initialize MFP configurations */ | 478 | /* initialize MFP configurations */ |
70 | pxa3xx_mfp_config(ARRAY_AND_SIZE(tavorevb_mfp_cfg)); | 479 | pxa3xx_mfp_config(ARRAY_AND_SIZE(tavorevb_mfp_cfg)); |
71 | 480 | ||
72 | platform_device_register(&smc91x_device); | 481 | platform_device_register(&smc91x_device); |
482 | |||
483 | tavorevb_init_lcd(); | ||
484 | tavorevb_init_keypad(); | ||
73 | } | 485 | } |
74 | 486 | ||
75 | MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)") | 487 | MACHINE_START(TAVOREVB, "PXA930 Evaluation Board (aka TavorEVB)") |
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index f8a9a62959e5..001624158519 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <asm/div64.h> | 22 | #include <asm/div64.h> |
23 | #include <asm/mach/irq.h> | 23 | #include <asm/mach/irq.h> |
24 | #include <asm/mach/time.h> | 24 | #include <asm/mach/time.h> |
25 | #include <mach/hardware.h> | ||
25 | #include <mach/pxa-regs.h> | 26 | #include <mach/pxa-regs.h> |
26 | #include <asm/mach-types.h> | ||
27 | 27 | ||
28 | /* | 28 | /* |
29 | * This is PXA's sched_clock implementation. This has a resolution | 29 | * This is PXA's sched_clock implementation. This has a resolution |
@@ -150,18 +150,11 @@ static struct irqaction pxa_ost0_irq = { | |||
150 | 150 | ||
151 | static void __init pxa_timer_init(void) | 151 | static void __init pxa_timer_init(void) |
152 | { | 152 | { |
153 | unsigned long clock_tick_rate; | 153 | unsigned long clock_tick_rate = get_clock_tick_rate(); |
154 | 154 | ||
155 | OIER = 0; | 155 | OIER = 0; |
156 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; | 156 | OSSR = OSSR_M0 | OSSR_M1 | OSSR_M2 | OSSR_M3; |
157 | 157 | ||
158 | if (cpu_is_pxa25x()) | ||
159 | clock_tick_rate = 3686400; | ||
160 | else if (machine_is_mainstone()) | ||
161 | clock_tick_rate = 3249600; | ||
162 | else | ||
163 | clock_tick_rate = 3250000; | ||
164 | |||
165 | set_oscr2ns_scale(clock_tick_rate); | 158 | set_oscr2ns_scale(clock_tick_rate); |
166 | 159 | ||
167 | ckevt_pxa_osmr0.mult = | 160 | ckevt_pxa_osmr0.mult = |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 224897a67d15..3332e5d0356c 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mfd/tmio.h> | 25 | #include <linux/mfd/tmio.h> |
26 | #include <linux/mtd/nand.h> | 26 | #include <linux/mtd/nand.h> |
27 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
28 | #include <linux/mtd/physmap.h> | ||
28 | #include <linux/pm.h> | 29 | #include <linux/pm.h> |
29 | #include <linux/gpio_keys.h> | 30 | #include <linux/gpio_keys.h> |
30 | #include <linux/input.h> | 31 | #include <linux/input.h> |
@@ -733,6 +734,45 @@ static void tosa_tc6393xb_teardown(struct platform_device *dev) | |||
733 | gpio_free(TOSA_GPIO_CARD_VCC_ON); | 734 | gpio_free(TOSA_GPIO_CARD_VCC_ON); |
734 | } | 735 | } |
735 | 736 | ||
737 | #ifdef CONFIG_MFD_TC6393XB | ||
738 | static struct fb_videomode tosa_tc6393xb_lcd_mode[] = { | ||
739 | { | ||
740 | .xres = 480, | ||
741 | .yres = 640, | ||
742 | .pixclock = 0x002cdf00,/* PLL divisor */ | ||
743 | .left_margin = 0x004c, | ||
744 | .right_margin = 0x005b, | ||
745 | .upper_margin = 0x0001, | ||
746 | .lower_margin = 0x000d, | ||
747 | .hsync_len = 0x0002, | ||
748 | .vsync_len = 0x0001, | ||
749 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
750 | .vmode = FB_VMODE_NONINTERLACED, | ||
751 | },{ | ||
752 | .xres = 240, | ||
753 | .yres = 320, | ||
754 | .pixclock = 0x00e7f203,/* PLL divisor */ | ||
755 | .left_margin = 0x0024, | ||
756 | .right_margin = 0x002f, | ||
757 | .upper_margin = 0x0001, | ||
758 | .lower_margin = 0x000d, | ||
759 | .hsync_len = 0x0002, | ||
760 | .vsync_len = 0x0001, | ||
761 | .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, | ||
762 | .vmode = FB_VMODE_NONINTERLACED, | ||
763 | } | ||
764 | }; | ||
765 | |||
766 | static struct tmio_fb_data tosa_tc6393xb_fb_config = { | ||
767 | .lcd_set_power = tc6393xb_lcd_set_power, | ||
768 | .lcd_mode = tc6393xb_lcd_mode, | ||
769 | .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode), | ||
770 | .modes = &tosa_tc6393xb_lcd_mode[0], | ||
771 | .height = 82, | ||
772 | .width = 60, | ||
773 | }; | ||
774 | #endif | ||
775 | |||
736 | static struct tc6393xb_platform_data tosa_tc6393xb_data = { | 776 | static struct tc6393xb_platform_data tosa_tc6393xb_data = { |
737 | .scr_pll2cr = 0x0cc1, | 777 | .scr_pll2cr = 0x0cc1, |
738 | .scr_gper = 0x3300, | 778 | .scr_gper = 0x3300, |
@@ -748,6 +788,9 @@ static struct tc6393xb_platform_data tosa_tc6393xb_data = { | |||
748 | .resume = tosa_tc6393xb_resume, | 788 | .resume = tosa_tc6393xb_resume, |
749 | 789 | ||
750 | .nand_data = &tosa_tc6393xb_nand_config, | 790 | .nand_data = &tosa_tc6393xb_nand_config, |
791 | #ifdef CONFIG_MFD_TC6393XB | ||
792 | .fb_data = &tosa_tc6393xb_fb_config, | ||
793 | #endif | ||
751 | 794 | ||
752 | .resume_restore = 1, | 795 | .resume_restore = 1, |
753 | }; | 796 | }; |
@@ -789,6 +832,36 @@ static struct spi_board_info spi_board_info[] __initdata = { | |||
789 | }, | 832 | }, |
790 | }; | 833 | }; |
791 | 834 | ||
835 | static struct mtd_partition sharpsl_rom_parts[] = { | ||
836 | { | ||
837 | .name ="Boot PROM Filesystem", | ||
838 | .offset = 0x00160000, | ||
839 | .size = MTDPART_SIZ_FULL, | ||
840 | }, | ||
841 | }; | ||
842 | |||
843 | static struct physmap_flash_data sharpsl_rom_data = { | ||
844 | .width = 2, | ||
845 | .nr_parts = ARRAY_SIZE(sharpsl_rom_parts), | ||
846 | .parts = sharpsl_rom_parts, | ||
847 | }; | ||
848 | |||
849 | static struct resource sharpsl_rom_resources[] = { | ||
850 | { | ||
851 | .start = 0x00000000, | ||
852 | .end = 0x007fffff, | ||
853 | .flags = IORESOURCE_MEM, | ||
854 | }, | ||
855 | }; | ||
856 | |||
857 | static struct platform_device sharpsl_rom_device = { | ||
858 | .name = "physmap-flash", | ||
859 | .id = -1, | ||
860 | .resource = sharpsl_rom_resources, | ||
861 | .num_resources = ARRAY_SIZE(sharpsl_rom_resources), | ||
862 | .dev.platform_data = &sharpsl_rom_data, | ||
863 | }; | ||
864 | |||
792 | static struct platform_device *devices[] __initdata = { | 865 | static struct platform_device *devices[] __initdata = { |
793 | &tosascoop_device, | 866 | &tosascoop_device, |
794 | &tosascoop_jc_device, | 867 | &tosascoop_jc_device, |
@@ -798,6 +871,7 @@ static struct platform_device *devices[] __initdata = { | |||
798 | &tosa_gpio_keys_device, | 871 | &tosa_gpio_keys_device, |
799 | &tosaled_device, | 872 | &tosaled_device, |
800 | &tosa_bt_device, | 873 | &tosa_bt_device, |
874 | &sharpsl_rom_device, | ||
801 | }; | 875 | }; |
802 | 876 | ||
803 | static void tosa_poweroff(void) | 877 | static void tosa_poweroff(void) |
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c index 813804433466..218d2001f1df 100644 --- a/arch/arm/mach-pxa/zylonite.c +++ b/arch/arm/mach-pxa/zylonite.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/gpio.h> | ||
21 | #include <linux/pwm_backlight.h> | 22 | #include <linux/pwm_backlight.h> |
22 | #include <linux/smc91x.h> | 23 | #include <linux/smc91x.h> |
23 | 24 | ||
@@ -25,7 +26,6 @@ | |||
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
27 | #include <mach/audio.h> | 28 | #include <mach/audio.h> |
28 | #include <mach/gpio.h> | ||
29 | #include <mach/pxafb.h> | 29 | #include <mach/pxafb.h> |
30 | #include <mach/zylonite.h> | 30 | #include <mach/zylonite.h> |
31 | #include <mach/mmc.h> | 31 | #include <mach/mmc.h> |
diff --git a/arch/arm/mach-pxa/zylonite_pxa320.c b/arch/arm/mach-pxa/zylonite_pxa320.c index 0f244744daae..28e4e623780b 100644 --- a/arch/arm/mach-pxa/zylonite_pxa320.c +++ b/arch/arm/mach-pxa/zylonite_pxa320.c | |||
@@ -16,8 +16,8 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/gpio.h> | ||
19 | 20 | ||
20 | #include <mach/gpio.h> | ||
21 | #include <mach/mfp-pxa320.h> | 21 | #include <mach/mfp-pxa320.h> |
22 | #include <mach/zylonite.h> | 22 | #include <mach/zylonite.h> |
23 | 23 | ||
diff --git a/arch/arm/mach-realview/Kconfig b/arch/arm/mach-realview/Kconfig index 5ccde7cf39e8..ad911854eb4c 100644 --- a/arch/arm/mach-realview/Kconfig +++ b/arch/arm/mach-realview/Kconfig | |||
@@ -7,9 +7,17 @@ config MACH_REALVIEW_EB | |||
7 | help | 7 | help |
8 | Include support for the ARM(R) RealView Emulation Baseboard platform. | 8 | Include support for the ARM(R) RealView Emulation Baseboard platform. |
9 | 9 | ||
10 | config REALVIEW_EB_A9MP | ||
11 | bool "Support Multicore Cortex-A9" | ||
12 | depends on MACH_REALVIEW_EB | ||
13 | select CPU_V7 | ||
14 | help | ||
15 | Enable support for the Cortex-A9MPCore tile on the Realview platform. | ||
16 | |||
10 | config REALVIEW_EB_ARM11MP | 17 | config REALVIEW_EB_ARM11MP |
11 | bool "Support ARM11MPCore tile" | 18 | bool "Support ARM11MPCore tile" |
12 | depends on MACH_REALVIEW_EB | 19 | depends on MACH_REALVIEW_EB |
20 | select CPU_V6 | ||
13 | help | 21 | help |
14 | Enable support for the ARM11MPCore tile on the Realview platform. | 22 | Enable support for the ARM11MPCore tile on the Realview platform. |
15 | 23 | ||
@@ -25,6 +33,7 @@ config REALVIEW_EB_ARM11MP_REVB | |||
25 | 33 | ||
26 | config MACH_REALVIEW_PB11MP | 34 | config MACH_REALVIEW_PB11MP |
27 | bool "Support RealView/PB11MPCore platform" | 35 | bool "Support RealView/PB11MPCore platform" |
36 | select CPU_V6 | ||
28 | select ARM_GIC | 37 | select ARM_GIC |
29 | help | 38 | help |
30 | Include support for the ARM(R) RealView MPCore Platform Baseboard. | 39 | Include support for the ARM(R) RealView MPCore Platform Baseboard. |
@@ -33,8 +42,29 @@ config MACH_REALVIEW_PB11MP | |||
33 | 42 | ||
34 | config MACH_REALVIEW_PB1176 | 43 | config MACH_REALVIEW_PB1176 |
35 | bool "Support RealView/PB1176 platform" | 44 | bool "Support RealView/PB1176 platform" |
45 | select CPU_V6 | ||
36 | select ARM_GIC | 46 | select ARM_GIC |
37 | help | 47 | help |
38 | Include support for the ARM(R) RealView ARM1176 Platform Baseboard. | 48 | Include support for the ARM(R) RealView ARM1176 Platform Baseboard. |
39 | 49 | ||
50 | config MACH_REALVIEW_PBA8 | ||
51 | bool "Support RealView/PB-A8 platform" | ||
52 | select CPU_V7 | ||
53 | select ARM_GIC | ||
54 | help | ||
55 | Include support for the ARM(R) RealView Cortex-A8 Platform Baseboard. | ||
56 | PB-A8 is a platform with an on-board Cortex-A8 and has support for | ||
57 | PCI-E and Compact Flash. | ||
58 | |||
59 | config REALVIEW_HIGH_PHYS_OFFSET | ||
60 | bool "High physical base address for the RealView platform" | ||
61 | depends on !MACH_REALVIEW_PB1176 | ||
62 | default y | ||
63 | help | ||
64 | RealView boards other than PB1176 have the RAM available at | ||
65 | 0x70000000, 256MB of which being mirrored at 0x00000000. If | ||
66 | the board supports 512MB of RAM, this option allows the | ||
67 | memory to be accessed contiguously at the high physical | ||
68 | offset. | ||
69 | |||
40 | endmenu | 70 | endmenu |
diff --git a/arch/arm/mach-realview/Makefile b/arch/arm/mach-realview/Makefile index d2ae077431dd..7bea8ffc4b59 100644 --- a/arch/arm/mach-realview/Makefile +++ b/arch/arm/mach-realview/Makefile | |||
@@ -6,5 +6,6 @@ obj-y := core.o clock.o | |||
6 | obj-$(CONFIG_MACH_REALVIEW_EB) += realview_eb.o | 6 | obj-$(CONFIG_MACH_REALVIEW_EB) += realview_eb.o |
7 | obj-$(CONFIG_MACH_REALVIEW_PB11MP) += realview_pb11mp.o | 7 | obj-$(CONFIG_MACH_REALVIEW_PB11MP) += realview_pb11mp.o |
8 | obj-$(CONFIG_MACH_REALVIEW_PB1176) += realview_pb1176.o | 8 | obj-$(CONFIG_MACH_REALVIEW_PB1176) += realview_pb1176.o |
9 | obj-$(CONFIG_MACH_REALVIEW_PBA8) += realview_pba8.o | ||
9 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o | 10 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o localtimer.o |
10 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | 11 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o |
diff --git a/arch/arm/mach-realview/Makefile.boot b/arch/arm/mach-realview/Makefile.boot index c7e75acfe6c9..d97e003d3df4 100644 --- a/arch/arm/mach-realview/Makefile.boot +++ b/arch/arm/mach-realview/Makefile.boot | |||
@@ -1,4 +1,9 @@ | |||
1 | ifeq ($(CONFIG_REALVIEW_HIGH_PHYS_OFFSET),y) | ||
2 | zreladdr-y := 0x70008000 | ||
3 | params_phys-y := 0x70000100 | ||
4 | initrd_phys-y := 0x70800000 | ||
5 | else | ||
1 | zreladdr-y := 0x00008000 | 6 | zreladdr-y := 0x00008000 |
2 | params_phys-y := 0x00000100 | 7 | params_phys-y := 0x00000100 |
3 | initrd_phys-y := 0x00800000 | 8 | initrd_phys-y := 0x00800000 |
4 | 9 | endif | |
diff --git a/arch/arm/mach-realview/clock.c b/arch/arm/mach-realview/clock.c index 3347c4236a60..a7043115de72 100644 --- a/arch/arm/mach-realview/clock.c +++ b/arch/arm/mach-realview/clock.c | |||
@@ -10,9 +10,11 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/device.h> | ||
13 | #include <linux/list.h> | 14 | #include <linux/list.h> |
14 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
17 | #include <linux/string.h> | ||
16 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
17 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
18 | 20 | ||
@@ -20,32 +22,6 @@ | |||
20 | 22 | ||
21 | #include "clock.h" | 23 | #include "clock.h" |
22 | 24 | ||
23 | static LIST_HEAD(clocks); | ||
24 | static DEFINE_MUTEX(clocks_mutex); | ||
25 | |||
26 | struct clk *clk_get(struct device *dev, const char *id) | ||
27 | { | ||
28 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
29 | |||
30 | mutex_lock(&clocks_mutex); | ||
31 | list_for_each_entry(p, &clocks, node) { | ||
32 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
33 | clk = p; | ||
34 | break; | ||
35 | } | ||
36 | } | ||
37 | mutex_unlock(&clocks_mutex); | ||
38 | |||
39 | return clk; | ||
40 | } | ||
41 | EXPORT_SYMBOL(clk_get); | ||
42 | |||
43 | void clk_put(struct clk *clk) | ||
44 | { | ||
45 | module_put(clk->owner); | ||
46 | } | ||
47 | EXPORT_SYMBOL(clk_put); | ||
48 | |||
49 | int clk_enable(struct clk *clk) | 25 | int clk_enable(struct clk *clk) |
50 | { | 26 | { |
51 | return 0; | 27 | return 0; |
@@ -65,7 +41,9 @@ EXPORT_SYMBOL(clk_get_rate); | |||
65 | 41 | ||
66 | long clk_round_rate(struct clk *clk, unsigned long rate) | 42 | long clk_round_rate(struct clk *clk, unsigned long rate) |
67 | { | 43 | { |
68 | return rate; | 44 | struct icst307_vco vco; |
45 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | ||
46 | return icst307_khz(clk->params, vco) * 1000; | ||
69 | } | 47 | } |
70 | EXPORT_SYMBOL(clk_round_rate); | 48 | EXPORT_SYMBOL(clk_round_rate); |
71 | 49 | ||
@@ -78,57 +56,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
78 | 56 | ||
79 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | 57 | vco = icst307_khz_to_vco(clk->params, rate / 1000); |
80 | clk->rate = icst307_khz(clk->params, vco) * 1000; | 58 | clk->rate = icst307_khz(clk->params, vco) * 1000; |
81 | |||
82 | printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", | ||
83 | clk->name, vco.s, vco.r, vco.v); | ||
84 | |||
85 | clk->setvco(clk, vco); | 59 | clk->setvco(clk, vco); |
86 | ret = 0; | 60 | ret = 0; |
87 | } | 61 | } |
88 | return ret; | 62 | return ret; |
89 | } | 63 | } |
90 | EXPORT_SYMBOL(clk_set_rate); | 64 | EXPORT_SYMBOL(clk_set_rate); |
91 | |||
92 | /* | ||
93 | * These are fixed clocks. | ||
94 | */ | ||
95 | static struct clk kmi_clk = { | ||
96 | .name = "KMIREFCLK", | ||
97 | .rate = 24000000, | ||
98 | }; | ||
99 | |||
100 | static struct clk uart_clk = { | ||
101 | .name = "UARTCLK", | ||
102 | .rate = 24000000, | ||
103 | }; | ||
104 | |||
105 | static struct clk mmci_clk = { | ||
106 | .name = "MCLK", | ||
107 | .rate = 24000000, | ||
108 | }; | ||
109 | |||
110 | int clk_register(struct clk *clk) | ||
111 | { | ||
112 | mutex_lock(&clocks_mutex); | ||
113 | list_add(&clk->node, &clocks); | ||
114 | mutex_unlock(&clocks_mutex); | ||
115 | return 0; | ||
116 | } | ||
117 | EXPORT_SYMBOL(clk_register); | ||
118 | |||
119 | void clk_unregister(struct clk *clk) | ||
120 | { | ||
121 | mutex_lock(&clocks_mutex); | ||
122 | list_del(&clk->node); | ||
123 | mutex_unlock(&clocks_mutex); | ||
124 | } | ||
125 | EXPORT_SYMBOL(clk_unregister); | ||
126 | |||
127 | static int __init clk_init(void) | ||
128 | { | ||
129 | clk_register(&kmi_clk); | ||
130 | clk_register(&uart_clk); | ||
131 | clk_register(&mmci_clk); | ||
132 | return 0; | ||
133 | } | ||
134 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-realview/clock.h b/arch/arm/mach-realview/clock.h index dadba695e181..ebbb0f06b600 100644 --- a/arch/arm/mach-realview/clock.h +++ b/arch/arm/mach-realview/clock.h | |||
@@ -12,14 +12,8 @@ struct module; | |||
12 | struct icst307_params; | 12 | struct icst307_params; |
13 | 13 | ||
14 | struct clk { | 14 | struct clk { |
15 | struct list_head node; | ||
16 | unsigned long rate; | 15 | unsigned long rate; |
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | const struct icst307_params *params; | 16 | const struct icst307_params *params; |
20 | void *data; | 17 | void *data; |
21 | void (*setvco)(struct clk *, struct icst307_vco vco); | 18 | void (*setvco)(struct clk *, struct icst307_vco vco); |
22 | }; | 19 | }; |
23 | |||
24 | int clk_register(struct clk *clk); | ||
25 | void clk_unregister(struct clk *clk); | ||
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 2f04d54711e7..5f1d55963ced 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -28,11 +28,14 @@ | |||
28 | #include <linux/clocksource.h> | 28 | #include <linux/clocksource.h> |
29 | #include <linux/clockchips.h> | 29 | #include <linux/clockchips.h> |
30 | #include <linux/io.h> | 30 | #include <linux/io.h> |
31 | #include <linux/smc911x.h> | ||
31 | 32 | ||
33 | #include <asm/clkdev.h> | ||
32 | #include <asm/system.h> | 34 | #include <asm/system.h> |
33 | #include <mach/hardware.h> | 35 | #include <mach/hardware.h> |
34 | #include <asm/irq.h> | 36 | #include <asm/irq.h> |
35 | #include <asm/leds.h> | 37 | #include <asm/leds.h> |
38 | #include <asm/mach-types.h> | ||
36 | #include <asm/hardware/arm_timer.h> | 39 | #include <asm/hardware/arm_timer.h> |
37 | #include <asm/hardware/icst307.h> | 40 | #include <asm/hardware/icst307.h> |
38 | 41 | ||
@@ -49,7 +52,7 @@ | |||
49 | 52 | ||
50 | #define REALVIEW_REFCOUNTER (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_24MHz_OFFSET) | 53 | #define REALVIEW_REFCOUNTER (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_24MHz_OFFSET) |
51 | 54 | ||
52 | /* used by entry-macro.S */ | 55 | /* used by entry-macro.S and platsmp.c */ |
53 | void __iomem *gic_cpu_base_addr; | 56 | void __iomem *gic_cpu_base_addr; |
54 | 57 | ||
55 | /* | 58 | /* |
@@ -124,6 +127,29 @@ int realview_flash_register(struct resource *res, u32 num) | |||
124 | return platform_device_register(&realview_flash_device); | 127 | return platform_device_register(&realview_flash_device); |
125 | } | 128 | } |
126 | 129 | ||
130 | static struct smc911x_platdata realview_smc911x_platdata = { | ||
131 | .flags = SMC911X_USE_32BIT, | ||
132 | .irq_flags = IRQF_SHARED, | ||
133 | .irq_polarity = 1, | ||
134 | }; | ||
135 | |||
136 | static struct platform_device realview_eth_device = { | ||
137 | .name = "smc911x", | ||
138 | .id = 0, | ||
139 | .num_resources = 2, | ||
140 | }; | ||
141 | |||
142 | int realview_eth_register(const char *name, struct resource *res) | ||
143 | { | ||
144 | if (name) | ||
145 | realview_eth_device.name = name; | ||
146 | realview_eth_device.resource = res; | ||
147 | if (strcmp(realview_eth_device.name, "smc911x") == 0) | ||
148 | realview_eth_device.dev.platform_data = &realview_smc911x_platdata; | ||
149 | |||
150 | return platform_device_register(&realview_eth_device); | ||
151 | } | ||
152 | |||
127 | static struct resource realview_i2c_resource = { | 153 | static struct resource realview_i2c_resource = { |
128 | .start = REALVIEW_I2C_BASE, | 154 | .start = REALVIEW_I2C_BASE, |
129 | .end = REALVIEW_I2C_BASE + SZ_4K - 1, | 155 | .end = REALVIEW_I2C_BASE + SZ_4K - 1, |
@@ -177,9 +203,14 @@ static const struct icst307_params realview_oscvco_params = { | |||
177 | static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco) | 203 | static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco) |
178 | { | 204 | { |
179 | void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET; | 205 | void __iomem *sys_lock = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LOCK_OFFSET; |
180 | void __iomem *sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC4_OFFSET; | 206 | void __iomem *sys_osc; |
181 | u32 val; | 207 | u32 val; |
182 | 208 | ||
209 | if (machine_is_realview_pb1176()) | ||
210 | sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC0_OFFSET; | ||
211 | else | ||
212 | sys_osc = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_OSC4_OFFSET; | ||
213 | |||
183 | val = readl(sys_osc) & ~0x7ffff; | 214 | val = readl(sys_osc) & ~0x7ffff; |
184 | val |= vco.v | (vco.r << 9) | (vco.s << 16); | 215 | val |= vco.v | (vco.r << 9) | (vco.s << 16); |
185 | 216 | ||
@@ -188,13 +219,60 @@ static void realview_oscvco_set(struct clk *clk, struct icst307_vco vco) | |||
188 | writel(0, sys_lock); | 219 | writel(0, sys_lock); |
189 | } | 220 | } |
190 | 221 | ||
191 | struct clk realview_clcd_clk = { | 222 | static struct clk oscvco_clk = { |
192 | .name = "CLCDCLK", | ||
193 | .params = &realview_oscvco_params, | 223 | .params = &realview_oscvco_params, |
194 | .setvco = realview_oscvco_set, | 224 | .setvco = realview_oscvco_set, |
195 | }; | 225 | }; |
196 | 226 | ||
197 | /* | 227 | /* |
228 | * These are fixed clocks. | ||
229 | */ | ||
230 | static struct clk ref24_clk = { | ||
231 | .rate = 24000000, | ||
232 | }; | ||
233 | |||
234 | static struct clk_lookup lookups[] = { | ||
235 | { /* UART0 */ | ||
236 | .dev_id = "dev:f1", | ||
237 | .clk = &ref24_clk, | ||
238 | }, { /* UART1 */ | ||
239 | .dev_id = "dev:f2", | ||
240 | .clk = &ref24_clk, | ||
241 | }, { /* UART2 */ | ||
242 | .dev_id = "dev:f3", | ||
243 | .clk = &ref24_clk, | ||
244 | }, { /* UART3 */ | ||
245 | .dev_id = "fpga:09", | ||
246 | .clk = &ref24_clk, | ||
247 | }, { /* KMI0 */ | ||
248 | .dev_id = "fpga:06", | ||
249 | .clk = &ref24_clk, | ||
250 | }, { /* KMI1 */ | ||
251 | .dev_id = "fpga:07", | ||
252 | .clk = &ref24_clk, | ||
253 | }, { /* MMC0 */ | ||
254 | .dev_id = "fpga:05", | ||
255 | .clk = &ref24_clk, | ||
256 | }, { /* EB:CLCD */ | ||
257 | .dev_id = "dev:20", | ||
258 | .clk = &oscvco_clk, | ||
259 | }, { /* PB:CLCD */ | ||
260 | .dev_id = "issp:20", | ||
261 | .clk = &oscvco_clk, | ||
262 | } | ||
263 | }; | ||
264 | |||
265 | static int __init clk_init(void) | ||
266 | { | ||
267 | int i; | ||
268 | |||
269 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | ||
270 | clkdev_add(&lookups[i]); | ||
271 | return 0; | ||
272 | } | ||
273 | arch_initcall(clk_init); | ||
274 | |||
275 | /* | ||
198 | * CLCD support. | 276 | * CLCD support. |
199 | */ | 277 | */ |
200 | #define SYS_CLCD_NLCDIOON (1 << 2) | 278 | #define SYS_CLCD_NLCDIOON (1 << 2) |
@@ -226,7 +304,30 @@ static struct clcd_panel vga = { | |||
226 | .width = -1, | 304 | .width = -1, |
227 | .height = -1, | 305 | .height = -1, |
228 | .tim2 = TIM2_BCD | TIM2_IPC, | 306 | .tim2 = TIM2_BCD | TIM2_IPC, |
229 | .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), | 307 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), |
308 | .bpp = 16, | ||
309 | }; | ||
310 | |||
311 | static struct clcd_panel xvga = { | ||
312 | .mode = { | ||
313 | .name = "XVGA", | ||
314 | .refresh = 60, | ||
315 | .xres = 1024, | ||
316 | .yres = 768, | ||
317 | .pixclock = 15748, | ||
318 | .left_margin = 152, | ||
319 | .right_margin = 48, | ||
320 | .upper_margin = 23, | ||
321 | .lower_margin = 3, | ||
322 | .hsync_len = 104, | ||
323 | .vsync_len = 4, | ||
324 | .sync = 0, | ||
325 | .vmode = FB_VMODE_NONINTERLACED, | ||
326 | }, | ||
327 | .width = -1, | ||
328 | .height = -1, | ||
329 | .tim2 = TIM2_BCD | TIM2_IPC, | ||
330 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), | ||
230 | .bpp = 16, | 331 | .bpp = 16, |
231 | }; | 332 | }; |
232 | 333 | ||
@@ -249,7 +350,7 @@ static struct clcd_panel sanyo_3_8_in = { | |||
249 | .width = -1, | 350 | .width = -1, |
250 | .height = -1, | 351 | .height = -1, |
251 | .tim2 = TIM2_BCD, | 352 | .tim2 = TIM2_BCD, |
252 | .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), | 353 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), |
253 | .bpp = 16, | 354 | .bpp = 16, |
254 | }; | 355 | }; |
255 | 356 | ||
@@ -272,7 +373,7 @@ static struct clcd_panel sanyo_2_5_in = { | |||
272 | .width = -1, | 373 | .width = -1, |
273 | .height = -1, | 374 | .height = -1, |
274 | .tim2 = TIM2_IVS | TIM2_IHS | TIM2_IPC, | 375 | .tim2 = TIM2_IVS | TIM2_IHS | TIM2_IPC, |
275 | .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), | 376 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), |
276 | .bpp = 16, | 377 | .bpp = 16, |
277 | }; | 378 | }; |
278 | 379 | ||
@@ -295,7 +396,7 @@ static struct clcd_panel epson_2_2_in = { | |||
295 | .width = -1, | 396 | .width = -1, |
296 | .height = -1, | 397 | .height = -1, |
297 | .tim2 = TIM2_BCD | TIM2_IPC, | 398 | .tim2 = TIM2_BCD | TIM2_IPC, |
298 | .cntl = CNTL_LCDTFT | CNTL_LCDVCOMP(1), | 399 | .cntl = CNTL_LCDTFT | CNTL_BGR | CNTL_LCDVCOMP(1), |
299 | .bpp = 16, | 400 | .bpp = 16, |
300 | }; | 401 | }; |
301 | 402 | ||
@@ -308,9 +409,15 @@ static struct clcd_panel epson_2_2_in = { | |||
308 | static struct clcd_panel *realview_clcd_panel(void) | 409 | static struct clcd_panel *realview_clcd_panel(void) |
309 | { | 410 | { |
310 | void __iomem *sys_clcd = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_CLCD_OFFSET; | 411 | void __iomem *sys_clcd = __io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_CLCD_OFFSET; |
311 | struct clcd_panel *panel = &vga; | 412 | struct clcd_panel *vga_panel; |
413 | struct clcd_panel *panel; | ||
312 | u32 val; | 414 | u32 val; |
313 | 415 | ||
416 | if (machine_is_realview_eb()) | ||
417 | vga_panel = &vga; | ||
418 | else | ||
419 | vga_panel = &xvga; | ||
420 | |||
314 | val = readl(sys_clcd) & SYS_CLCD_ID_MASK; | 421 | val = readl(sys_clcd) & SYS_CLCD_ID_MASK; |
315 | if (val == SYS_CLCD_ID_SANYO_3_8) | 422 | if (val == SYS_CLCD_ID_SANYO_3_8) |
316 | panel = &sanyo_3_8_in; | 423 | panel = &sanyo_3_8_in; |
@@ -319,11 +426,11 @@ static struct clcd_panel *realview_clcd_panel(void) | |||
319 | else if (val == SYS_CLCD_ID_EPSON_2_2) | 426 | else if (val == SYS_CLCD_ID_EPSON_2_2) |
320 | panel = &epson_2_2_in; | 427 | panel = &epson_2_2_in; |
321 | else if (val == SYS_CLCD_ID_VGA) | 428 | else if (val == SYS_CLCD_ID_VGA) |
322 | panel = &vga; | 429 | panel = vga_panel; |
323 | else { | 430 | else { |
324 | printk(KERN_ERR "CLCD: unknown LCD panel ID 0x%08x, using VGA\n", | 431 | printk(KERN_ERR "CLCD: unknown LCD panel ID 0x%08x, using VGA\n", |
325 | val); | 432 | val); |
326 | panel = &vga; | 433 | panel = vga_panel; |
327 | } | 434 | } |
328 | 435 | ||
329 | return panel; | 436 | return panel; |
@@ -358,12 +465,18 @@ static void realview_clcd_enable(struct clcd_fb *fb) | |||
358 | writel(val, sys_clcd); | 465 | writel(val, sys_clcd); |
359 | } | 466 | } |
360 | 467 | ||
361 | static unsigned long framesize = SZ_1M; | ||
362 | |||
363 | static int realview_clcd_setup(struct clcd_fb *fb) | 468 | static int realview_clcd_setup(struct clcd_fb *fb) |
364 | { | 469 | { |
470 | unsigned long framesize; | ||
365 | dma_addr_t dma; | 471 | dma_addr_t dma; |
366 | 472 | ||
473 | if (machine_is_realview_eb()) | ||
474 | /* VGA, 16bpp */ | ||
475 | framesize = 640 * 480 * 2; | ||
476 | else | ||
477 | /* XVGA, 16bpp */ | ||
478 | framesize = 1024 * 768 * 2; | ||
479 | |||
367 | fb->panel = realview_clcd_panel(); | 480 | fb->panel = realview_clcd_panel(); |
368 | 481 | ||
369 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize, | 482 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize, |
@@ -588,7 +701,7 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
588 | * The dummy clock device has to be registered before the main device | 701 | * The dummy clock device has to be registered before the main device |
589 | * so that the latter will broadcast the clock events | 702 | * so that the latter will broadcast the clock events |
590 | */ | 703 | */ |
591 | local_timer_setup(smp_processor_id()); | 704 | local_timer_setup(); |
592 | #endif | 705 | #endif |
593 | 706 | ||
594 | /* | 707 | /* |
diff --git a/arch/arm/mach-realview/core.h b/arch/arm/mach-realview/core.h index 3cea92c70d8f..63be2abdc19c 100644 --- a/arch/arm/mach-realview/core.h +++ b/arch/arm/mach-realview/core.h | |||
@@ -48,12 +48,10 @@ extern struct platform_device realview_flash_device; | |||
48 | extern struct platform_device realview_i2c_device; | 48 | extern struct platform_device realview_i2c_device; |
49 | extern struct mmc_platform_data realview_mmc0_plat_data; | 49 | extern struct mmc_platform_data realview_mmc0_plat_data; |
50 | extern struct mmc_platform_data realview_mmc1_plat_data; | 50 | extern struct mmc_platform_data realview_mmc1_plat_data; |
51 | extern struct clk realview_clcd_clk; | ||
52 | extern struct clcd_board clcd_plat_data; | 51 | extern struct clcd_board clcd_plat_data; |
53 | extern void __iomem *gic_cpu_base_addr; | 52 | extern void __iomem *gic_cpu_base_addr; |
54 | #ifdef CONFIG_LOCAL_TIMERS | 53 | #ifdef CONFIG_LOCAL_TIMERS |
55 | extern void __iomem *twd_base_addr; | 54 | extern void __iomem *twd_base; |
56 | extern unsigned int twd_size; | ||
57 | #endif | 55 | #endif |
58 | extern void __iomem *timer0_va_base; | 56 | extern void __iomem *timer0_va_base; |
59 | extern void __iomem *timer1_va_base; | 57 | extern void __iomem *timer1_va_base; |
@@ -63,5 +61,6 @@ extern void __iomem *timer3_va_base; | |||
63 | extern void realview_leds_event(led_event_t ledevt); | 61 | extern void realview_leds_event(led_event_t ledevt); |
64 | extern void realview_timer_init(unsigned int timer_irq); | 62 | extern void realview_timer_init(unsigned int timer_irq); |
65 | extern int realview_flash_register(struct resource *res, u32 num); | 63 | extern int realview_flash_register(struct resource *res, u32 num); |
64 | extern int realview_eth_register(const char *name, struct resource *res); | ||
66 | 65 | ||
67 | #endif | 66 | #endif |
diff --git a/arch/arm/mach-realview/hotplug.c b/arch/arm/mach-realview/hotplug.c index 09748cbcd10e..be048e3e8799 100644 --- a/arch/arm/mach-realview/hotplug.c +++ b/arch/arm/mach-realview/hotplug.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
14 | #include <linux/completion.h> | 14 | #include <linux/completion.h> |
15 | 15 | ||
16 | #include <asm/cacheflush.h> | ||
17 | |||
16 | extern volatile int pen_release; | 18 | extern volatile int pen_release; |
17 | 19 | ||
18 | static DECLARE_COMPLETION(cpu_killed); | 20 | static DECLARE_COMPLETION(cpu_killed); |
@@ -21,7 +23,8 @@ static inline void cpu_enter_lowpower(void) | |||
21 | { | 23 | { |
22 | unsigned int v; | 24 | unsigned int v; |
23 | 25 | ||
24 | asm volatile( "mcr p15, 0, %1, c7, c14, 0\n" | 26 | flush_cache_all(); |
27 | asm volatile( | ||
25 | " mcr p15, 0, %1, c7, c5, 0\n" | 28 | " mcr p15, 0, %1, c7, c5, 0\n" |
26 | " mcr p15, 0, %1, c7, c10, 4\n" | 29 | " mcr p15, 0, %1, c7, c10, 4\n" |
27 | /* | 30 | /* |
diff --git a/arch/arm/mach-realview/include/mach/board-eb.h b/arch/arm/mach-realview/include/mach/board-eb.h index 8d699fd324d0..268d7701fa9b 100644 --- a/arch/arm/mach-realview/include/mach/board-eb.h +++ b/arch/arm/mach-realview/include/mach/board-eb.h | |||
@@ -49,16 +49,14 @@ | |||
49 | #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB | 49 | #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB |
50 | #define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */ | 50 | #define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */ |
51 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ | 51 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ |
52 | #define REALVIEW_EB11MP_TWD_BASE 0x10100700 | 52 | #define REALVIEW_EB11MP_TWD_BASE 0x10100600 |
53 | #define REALVIEW_EB11MP_TWD_SIZE 0x00000100 | ||
54 | #define REALVIEW_EB11MP_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */ | 53 | #define REALVIEW_EB11MP_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */ |
55 | #define REALVIEW_EB11MP_L220_BASE 0x10102000 /* L220 registers */ | 54 | #define REALVIEW_EB11MP_L220_BASE 0x10102000 /* L220 registers */ |
56 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */ | 55 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0xD8 /* Register offset for MPCore sysctl */ |
57 | #else | 56 | #else |
58 | #define REALVIEW_EB11MP_SCU_BASE 0x1F000000 /* SCU registers */ | 57 | #define REALVIEW_EB11MP_SCU_BASE 0x1F000000 /* SCU registers */ |
59 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x1F000100 /* Generic interrupt controller CPU interface */ | 58 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x1F000100 /* Generic interrupt controller CPU interface */ |
60 | #define REALVIEW_EB11MP_TWD_BASE 0x1F000700 | 59 | #define REALVIEW_EB11MP_TWD_BASE 0x1F000600 |
61 | #define REALVIEW_EB11MP_TWD_SIZE 0x00000100 | ||
62 | #define REALVIEW_EB11MP_GIC_DIST_BASE 0x1F001000 /* Generic interrupt controller distributor */ | 60 | #define REALVIEW_EB11MP_GIC_DIST_BASE 0x1F001000 /* Generic interrupt controller distributor */ |
63 | #define REALVIEW_EB11MP_L220_BASE 0x1F002000 /* L220 registers */ | 61 | #define REALVIEW_EB11MP_L220_BASE 0x1F002000 /* L220 registers */ |
64 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0x74 /* Register offset for MPCore sysctl */ | 62 | #define REALVIEW_EB11MP_SYS_PLD_CTRL1 0x74 /* Register offset for MPCore sysctl */ |
@@ -163,7 +161,7 @@ | |||
163 | #define NR_IRQS NR_IRQS_EB | 161 | #define NR_IRQS NR_IRQS_EB |
164 | #endif | 162 | #endif |
165 | 163 | ||
166 | #if defined(CONFIG_REALVIEW_EB_ARM11MP) \ | 164 | #if defined(CONFIG_REALVIEW_EB_ARM11MP) || defined(CONFIG_REALVIEW_EB_A9MP) \ |
167 | && (!defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_EB11MP)) | 165 | && (!defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_EB11MP)) |
168 | #undef MAX_GIC_NR | 166 | #undef MAX_GIC_NR |
169 | #define MAX_GIC_NR NR_GIC_EB11MP | 167 | #define MAX_GIC_NR NR_GIC_EB11MP |
@@ -177,6 +175,7 @@ | |||
177 | #define REALVIEW_EB_PROC_ARM9 0x02000000 | 175 | #define REALVIEW_EB_PROC_ARM9 0x02000000 |
178 | #define REALVIEW_EB_PROC_ARM11 0x04000000 | 176 | #define REALVIEW_EB_PROC_ARM11 0x04000000 |
179 | #define REALVIEW_EB_PROC_ARM11MP 0x06000000 | 177 | #define REALVIEW_EB_PROC_ARM11MP 0x06000000 |
178 | #define REALVIEW_EB_PROC_A9MP 0x0C000000 | ||
180 | 179 | ||
181 | #define check_eb_proc(proc_type) \ | 180 | #define check_eb_proc(proc_type) \ |
182 | ((readl(__io_address(REALVIEW_SYS_PROCID)) & REALVIEW_EB_PROC_MASK) \ | 181 | ((readl(__io_address(REALVIEW_SYS_PROCID)) & REALVIEW_EB_PROC_MASK) \ |
@@ -188,4 +187,13 @@ | |||
188 | #define core_tile_eb11mp() 0 | 187 | #define core_tile_eb11mp() 0 |
189 | #endif | 188 | #endif |
190 | 189 | ||
190 | #ifdef CONFIG_REALVIEW_EB_A9MP | ||
191 | #define core_tile_a9mp() check_eb_proc(REALVIEW_EB_PROC_A9MP) | ||
192 | #else | ||
193 | #define core_tile_a9mp() 0 | ||
194 | #endif | ||
195 | |||
196 | #define machine_is_realview_eb_mp() \ | ||
197 | (machine_is_realview_eb() && (core_tile_eb11mp() || core_tile_a9mp())) | ||
198 | |||
191 | #endif /* __ASM_ARCH_BOARD_EB_H */ | 199 | #endif /* __ASM_ARCH_BOARD_EB_H */ |
diff --git a/arch/arm/mach-realview/include/mach/board-pb11mp.h b/arch/arm/mach-realview/include/mach/board-pb11mp.h index ecd80e58631e..53ea0e7a1267 100644 --- a/arch/arm/mach-realview/include/mach/board-pb11mp.h +++ b/arch/arm/mach-realview/include/mach/board-pb11mp.h | |||
@@ -77,8 +77,7 @@ | |||
77 | */ | 77 | */ |
78 | #define REALVIEW_TC11MP_SCU_BASE 0x1F000000 /* IRQ, Test chip */ | 78 | #define REALVIEW_TC11MP_SCU_BASE 0x1F000000 /* IRQ, Test chip */ |
79 | #define REALVIEW_TC11MP_GIC_CPU_BASE 0x1F000100 /* Test chip interrupt controller CPU interface */ | 79 | #define REALVIEW_TC11MP_GIC_CPU_BASE 0x1F000100 /* Test chip interrupt controller CPU interface */ |
80 | #define REALVIEW_TC11MP_TWD_BASE 0x1F000700 | 80 | #define REALVIEW_TC11MP_TWD_BASE 0x1F000600 |
81 | #define REALVIEW_TC11MP_TWD_SIZE 0x00000100 | ||
82 | #define REALVIEW_TC11MP_GIC_DIST_BASE 0x1F001000 /* Test chip interrupt controller distributor */ | 81 | #define REALVIEW_TC11MP_GIC_DIST_BASE 0x1F001000 /* Test chip interrupt controller distributor */ |
83 | #define REALVIEW_TC11MP_L220_BASE 0x1F002000 /* L220 registers */ | 82 | #define REALVIEW_TC11MP_L220_BASE 0x1F002000 /* L220 registers */ |
84 | 83 | ||
diff --git a/arch/arm/mach-realview/include/mach/board-pba8.h b/arch/arm/mach-realview/include/mach/board-pba8.h new file mode 100644 index 000000000000..c8bed8f58bab --- /dev/null +++ b/arch/arm/mach-realview/include/mach/board-pba8.h | |||
@@ -0,0 +1,152 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-realview/board-pba8.h | ||
3 | * | ||
4 | * Copyright (C) 2008 ARM Limited | ||
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 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | * MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_ARCH_BOARD_PBA8_H | ||
22 | #define __ASM_ARCH_BOARD_PBA8_H | ||
23 | |||
24 | #include <mach/platform.h> | ||
25 | |||
26 | /* | ||
27 | * Peripheral addresses | ||
28 | */ | ||
29 | #define REALVIEW_PBA8_UART0_BASE 0x10009000 /* UART 0 */ | ||
30 | #define REALVIEW_PBA8_UART1_BASE 0x1000A000 /* UART 1 */ | ||
31 | #define REALVIEW_PBA8_UART2_BASE 0x1000B000 /* UART 2 */ | ||
32 | #define REALVIEW_PBA8_UART3_BASE 0x1000C000 /* UART 3 */ | ||
33 | #define REALVIEW_PBA8_SSP_BASE 0x1000D000 /* Synchronous Serial Port */ | ||
34 | #define REALVIEW_PBA8_WATCHDOG0_BASE 0x1000F000 /* Watchdog 0 */ | ||
35 | #define REALVIEW_PBA8_WATCHDOG_BASE 0x10010000 /* watchdog interface */ | ||
36 | #define REALVIEW_PBA8_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */ | ||
37 | #define REALVIEW_PBA8_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */ | ||
38 | #define REALVIEW_PBA8_GPIO0_BASE 0x10013000 /* GPIO port 0 */ | ||
39 | #define REALVIEW_PBA8_RTC_BASE 0x10017000 /* Real Time Clock */ | ||
40 | #define REALVIEW_PBA8_TIMER4_5_BASE 0x10018000 /* Timer 4/5 */ | ||
41 | #define REALVIEW_PBA8_TIMER6_7_BASE 0x10019000 /* Timer 6/7 */ | ||
42 | #define REALVIEW_PBA8_SCTL_BASE 0x1001A000 /* System Controller */ | ||
43 | #define REALVIEW_PBA8_CLCD_BASE 0x10020000 /* CLCD */ | ||
44 | #define REALVIEW_PBA8_ONB_SRAM_BASE 0x10060000 /* On-board SRAM */ | ||
45 | #define REALVIEW_PBA8_DMC_BASE 0x100E0000 /* DMC configuration */ | ||
46 | #define REALVIEW_PBA8_SMC_BASE 0x100E1000 /* SMC configuration */ | ||
47 | #define REALVIEW_PBA8_CAN_BASE 0x100E2000 /* CAN bus */ | ||
48 | #define REALVIEW_PBA8_CF_BASE 0x18000000 /* Compact flash */ | ||
49 | #define REALVIEW_PBA8_CF_MEM_BASE 0x18003000 /* SMC for Compact flash */ | ||
50 | #define REALVIEW_PBA8_GIC_CPU_BASE 0x1E000000 /* Generic interrupt controller CPU interface */ | ||
51 | #define REALVIEW_PBA8_FLASH0_BASE 0x40000000 | ||
52 | #define REALVIEW_PBA8_FLASH0_SIZE SZ_64M | ||
53 | #define REALVIEW_PBA8_FLASH1_BASE 0x44000000 | ||
54 | #define REALVIEW_PBA8_FLASH1_SIZE SZ_64M | ||
55 | #define REALVIEW_PBA8_ETH_BASE 0x4E000000 /* Ethernet */ | ||
56 | #define REALVIEW_PBA8_USB_BASE 0x4F000000 /* USB */ | ||
57 | #define REALVIEW_PBA8_GIC_DIST_BASE 0x1E001000 /* Generic interrupt controller distributor */ | ||
58 | #define REALVIEW_PBA8_LT_BASE 0xC0000000 /* Logic Tile expansion */ | ||
59 | #define REALVIEW_PBA8_SDRAM6_BASE 0x70000000 /* SDRAM bank 6 256MB */ | ||
60 | #define REALVIEW_PBA8_SDRAM7_BASE 0x80000000 /* SDRAM bank 7 256MB */ | ||
61 | |||
62 | #define REALVIEW_PBA8_SYS_PLD_CTRL1 0x74 | ||
63 | |||
64 | /* | ||
65 | * PBA8 PCI regions | ||
66 | */ | ||
67 | #define REALVIEW_PBA8_PCI_BASE 0x90040000 /* PCI-X Unit base */ | ||
68 | #define REALVIEW_PBA8_PCI_IO_BASE 0x90050000 /* IO Region on AHB */ | ||
69 | #define REALVIEW_PBA8_PCI_MEM_BASE 0xA0000000 /* MEM Region on AHB */ | ||
70 | |||
71 | #define REALVIEW_PBA8_PCI_BASE_SIZE 0x10000 /* 16 Kb */ | ||
72 | #define REALVIEW_PBA8_PCI_IO_SIZE 0x1000 /* 4 Kb */ | ||
73 | #define REALVIEW_PBA8_PCI_MEM_SIZE 0x20000000 /* 512 MB */ | ||
74 | |||
75 | /* | ||
76 | * Irqs | ||
77 | */ | ||
78 | #define IRQ_PBA8_GIC_START 32 | ||
79 | |||
80 | /* L220 | ||
81 | #define IRQ_PBA8_L220_EVENT (IRQ_PBA8_GIC_START + 29) | ||
82 | #define IRQ_PBA8_L220_SLAVE (IRQ_PBA8_GIC_START + 30) | ||
83 | #define IRQ_PBA8_L220_DECODE (IRQ_PBA8_GIC_START + 31) | ||
84 | */ | ||
85 | |||
86 | /* | ||
87 | * PB-A8 on-board gic irq sources | ||
88 | */ | ||
89 | #define IRQ_PBA8_WATCHDOG (IRQ_PBA8_GIC_START + 0) /* Watchdog timer */ | ||
90 | #define IRQ_PBA8_SOFT (IRQ_PBA8_GIC_START + 1) /* Software interrupt */ | ||
91 | #define IRQ_PBA8_COMMRx (IRQ_PBA8_GIC_START + 2) /* Debug Comm Rx interrupt */ | ||
92 | #define IRQ_PBA8_COMMTx (IRQ_PBA8_GIC_START + 3) /* Debug Comm Tx interrupt */ | ||
93 | #define IRQ_PBA8_TIMER0_1 (IRQ_PBA8_GIC_START + 4) /* Timer 0/1 (default timer) */ | ||
94 | #define IRQ_PBA8_TIMER2_3 (IRQ_PBA8_GIC_START + 5) /* Timer 2/3 */ | ||
95 | #define IRQ_PBA8_GPIO0 (IRQ_PBA8_GIC_START + 6) /* GPIO 0 */ | ||
96 | #define IRQ_PBA8_GPIO1 (IRQ_PBA8_GIC_START + 7) /* GPIO 1 */ | ||
97 | #define IRQ_PBA8_GPIO2 (IRQ_PBA8_GIC_START + 8) /* GPIO 2 */ | ||
98 | /* 9 reserved */ | ||
99 | #define IRQ_PBA8_RTC (IRQ_PBA8_GIC_START + 10) /* Real Time Clock */ | ||
100 | #define IRQ_PBA8_SSP (IRQ_PBA8_GIC_START + 11) /* Synchronous Serial Port */ | ||
101 | #define IRQ_PBA8_UART0 (IRQ_PBA8_GIC_START + 12) /* UART 0 on development chip */ | ||
102 | #define IRQ_PBA8_UART1 (IRQ_PBA8_GIC_START + 13) /* UART 1 on development chip */ | ||
103 | #define IRQ_PBA8_UART2 (IRQ_PBA8_GIC_START + 14) /* UART 2 on development chip */ | ||
104 | #define IRQ_PBA8_UART3 (IRQ_PBA8_GIC_START + 15) /* UART 3 on development chip */ | ||
105 | #define IRQ_PBA8_SCI (IRQ_PBA8_GIC_START + 16) /* Smart Card Interface */ | ||
106 | #define IRQ_PBA8_MMCI0A (IRQ_PBA8_GIC_START + 17) /* Multimedia Card 0A */ | ||
107 | #define IRQ_PBA8_MMCI0B (IRQ_PBA8_GIC_START + 18) /* Multimedia Card 0B */ | ||
108 | #define IRQ_PBA8_AACI (IRQ_PBA8_GIC_START + 19) /* Audio Codec */ | ||
109 | #define IRQ_PBA8_KMI0 (IRQ_PBA8_GIC_START + 20) /* Keyboard/Mouse port 0 */ | ||
110 | #define IRQ_PBA8_KMI1 (IRQ_PBA8_GIC_START + 21) /* Keyboard/Mouse port 1 */ | ||
111 | #define IRQ_PBA8_CHARLCD (IRQ_PBA8_GIC_START + 22) /* Character LCD */ | ||
112 | #define IRQ_PBA8_CLCD (IRQ_PBA8_GIC_START + 23) /* CLCD controller */ | ||
113 | #define IRQ_PBA8_DMAC (IRQ_PBA8_GIC_START + 24) /* DMA controller */ | ||
114 | #define IRQ_PBA8_PWRFAIL (IRQ_PBA8_GIC_START + 25) /* Power failure */ | ||
115 | #define IRQ_PBA8_PISMO (IRQ_PBA8_GIC_START + 26) /* PISMO interface */ | ||
116 | #define IRQ_PBA8_DoC (IRQ_PBA8_GIC_START + 27) /* Disk on Chip memory controller */ | ||
117 | #define IRQ_PBA8_ETH (IRQ_PBA8_GIC_START + 28) /* Ethernet controller */ | ||
118 | #define IRQ_PBA8_USB (IRQ_PBA8_GIC_START + 29) /* USB controller */ | ||
119 | #define IRQ_PBA8_TSPEN (IRQ_PBA8_GIC_START + 30) /* Touchscreen pen */ | ||
120 | #define IRQ_PBA8_TSKPAD (IRQ_PBA8_GIC_START + 31) /* Touchscreen keypad */ | ||
121 | |||
122 | /* ... */ | ||
123 | #define IRQ_PBA8_PCI0 (IRQ_PBA8_GIC_START + 50) | ||
124 | #define IRQ_PBA8_PCI1 (IRQ_PBA8_GIC_START + 51) | ||
125 | #define IRQ_PBA8_PCI2 (IRQ_PBA8_GIC_START + 52) | ||
126 | #define IRQ_PBA8_PCI3 (IRQ_PBA8_GIC_START + 53) | ||
127 | |||
128 | #define IRQ_PBA8_SMC -1 | ||
129 | #define IRQ_PBA8_SCTL -1 | ||
130 | |||
131 | #define NR_GIC_PBA8 1 | ||
132 | |||
133 | /* | ||
134 | * Only define NR_IRQS if less than NR_IRQS_PBA8 | ||
135 | */ | ||
136 | #define NR_IRQS_PBA8 (IRQ_PBA8_GIC_START + 64) | ||
137 | |||
138 | #if defined(CONFIG_MACH_REALVIEW_PBA8) | ||
139 | |||
140 | #if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_PBA8) | ||
141 | #undef NR_IRQS | ||
142 | #define NR_IRQS NR_IRQS_PBA8 | ||
143 | #endif | ||
144 | |||
145 | #if !defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_PBA8) | ||
146 | #undef MAX_GIC_NR | ||
147 | #define MAX_GIC_NR NR_GIC_PBA8 | ||
148 | #endif | ||
149 | |||
150 | #endif /* CONFIG_MACH_REALVIEW_PBA8 */ | ||
151 | |||
152 | #endif /* __ASM_ARCH_BOARD_PBA8_H */ | ||
diff --git a/arch/arm/mach-realview/include/mach/clkdev.h b/arch/arm/mach-realview/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-realview/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-realview/include/mach/debug-macro.S b/arch/arm/mach-realview/include/mach/debug-macro.S index 7196bcadff0c..92dbcb9e1792 100644 --- a/arch/arm/mach-realview/include/mach/debug-macro.S +++ b/arch/arm/mach-realview/include/mach/debug-macro.S | |||
@@ -8,15 +8,36 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | */ |
12 | */ | 12 | |
13 | #if defined(CONFIG_MACH_REALVIEW_EB) || \ | ||
14 | defined(CONFIG_MACH_REALVIEW_PB11MP) || \ | ||
15 | defined(CONFIG_MACH_REALVIEW_PBA8) | ||
16 | #ifndef DEBUG_LL_UART_OFFSET | ||
17 | #define DEBUG_LL_UART_OFFSET 0x00009000 | ||
18 | #elif DEBUG_LL_UART_OFFSET != 0x00009000 | ||
19 | #warning "DEBUG_LL_UART_OFFSET already defined to a different value" | ||
20 | #endif | ||
21 | #endif | ||
22 | |||
23 | #ifdef CONFIG_MACH_REALVIEW_PB1176 | ||
24 | #ifndef DEBUG_LL_UART_OFFSET | ||
25 | #define DEBUG_LL_UART_OFFSET 0x0010c000 | ||
26 | #elif DEBUG_LL_UART_OFFSET != 0x0010c000 | ||
27 | #warning "DEBUG_LL_UART_OFFSET already defined to a different value" | ||
28 | #endif | ||
29 | #endif | ||
30 | |||
31 | #ifndef DEBUG_LL_UART_OFFSET | ||
32 | #error "Unknown RealView platform" | ||
33 | #endif | ||
13 | 34 | ||
14 | .macro addruart,rx | 35 | .macro addruart,rx |
15 | mrc p15, 0, \rx, c1, c0 | 36 | mrc p15, 0, \rx, c1, c0 |
16 | tst \rx, #1 @ MMU enabled? | 37 | tst \rx, #1 @ MMU enabled? |
17 | moveq \rx, #0x10000000 | 38 | moveq \rx, #0x10000000 |
18 | movne \rx, #0xf0000000 @ virtual base | 39 | movne \rx, #0xfb000000 @ virtual base |
19 | orr \rx, \rx, #0x00009000 | 40 | orr \rx, \rx, #DEBUG_LL_UART_OFFSET |
20 | .endm | 41 | .endm |
21 | 42 | ||
22 | #include <asm/hardware/debug-pl01x.S> | 43 | #include <asm/hardware/debug-pl01x.S> |
diff --git a/arch/arm/mach-realview/include/mach/dma.h b/arch/arm/mach-realview/include/mach/dma.h deleted file mode 100644 index f1a5a1a10952..000000000000 --- a/arch/arm/mach-realview/include/mach/dma.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-realview/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited. | ||
5 | * Copyright (C) 1997,1998 Russell King | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
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 | ||
20 | */ | ||
diff --git a/arch/arm/mach-realview/include/mach/hardware.h b/arch/arm/mach-realview/include/mach/hardware.h index 79a93b3dfca9..b42c14f89acb 100644 --- a/arch/arm/mach-realview/include/mach/hardware.h +++ b/arch/arm/mach-realview/include/mach/hardware.h | |||
@@ -25,7 +25,14 @@ | |||
25 | #include <asm/sizes.h> | 25 | #include <asm/sizes.h> |
26 | 26 | ||
27 | /* macro to get at IO space when running virtually */ | 27 | /* macro to get at IO space when running virtually */ |
28 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + 0xf0000000) | 28 | /* |
29 | * Statically mapped addresses: | ||
30 | * | ||
31 | * 10xx xxxx -> fbxx xxxx | ||
32 | * 1exx xxxx -> fdxx xxxx | ||
33 | * 1fxx xxxx -> fexx xxxx | ||
34 | */ | ||
35 | #define IO_ADDRESS(x) (((x) & 0x03ffffff) + 0xfb000000) | ||
29 | #define __io_address(n) __io(IO_ADDRESS(n)) | 36 | #define __io_address(n) __io(IO_ADDRESS(n)) |
30 | 37 | ||
31 | #endif | 38 | #endif |
diff --git a/arch/arm/mach-realview/include/mach/io.h b/arch/arm/mach-realview/include/mach/io.h index aa069424d310..f05bcdf605d8 100644 --- a/arch/arm/mach-realview/include/mach/io.h +++ b/arch/arm/mach-realview/include/mach/io.h | |||
@@ -22,12 +22,7 @@ | |||
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffffffff | 23 | #define IO_SPACE_LIMIT 0xffffffff |
24 | 24 | ||
25 | static inline void __iomem *__io(unsigned long addr) | 25 | #define __io(a) __typesafe_io(a) |
26 | { | 26 | #define __mem_pci(a) (a) |
27 | return (void __iomem *)addr; | ||
28 | } | ||
29 | |||
30 | #define __io(a) __io(a) | ||
31 | #define __mem_pci(a) (a) | ||
32 | 27 | ||
33 | #endif | 28 | #endif |
diff --git a/arch/arm/mach-realview/include/mach/irqs.h b/arch/arm/mach-realview/include/mach/irqs.h index 02a918529db3..fe5cb987aa21 100644 --- a/arch/arm/mach-realview/include/mach/irqs.h +++ b/arch/arm/mach-realview/include/mach/irqs.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <mach/board-eb.h> | 25 | #include <mach/board-eb.h> |
26 | #include <mach/board-pb11mp.h> | 26 | #include <mach/board-pb11mp.h> |
27 | #include <mach/board-pb1176.h> | 27 | #include <mach/board-pb1176.h> |
28 | #include <mach/board-pba8.h> | ||
28 | 29 | ||
29 | #define IRQ_LOCALTIMER 29 | 30 | #define IRQ_LOCALTIMER 29 |
30 | #define IRQ_LOCALWDOG 30 | 31 | #define IRQ_LOCALWDOG 30 |
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h index 0e673483a141..293c30025e7e 100644 --- a/arch/arm/mach-realview/include/mach/memory.h +++ b/arch/arm/mach-realview/include/mach/memory.h | |||
@@ -23,16 +23,10 @@ | |||
23 | /* | 23 | /* |
24 | * Physical DRAM offset. | 24 | * Physical DRAM offset. |
25 | */ | 25 | */ |
26 | #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET | ||
27 | #define PHYS_OFFSET UL(0x70000000) | ||
28 | #else | ||
26 | #define PHYS_OFFSET UL(0x00000000) | 29 | #define PHYS_OFFSET UL(0x00000000) |
27 | 30 | #endif | |
28 | /* | ||
29 | * Virtual view <-> DMA view memory address translations | ||
30 | * virt_to_bus: Used to translate the virtual address to an | ||
31 | * address suitable to be passed to set_dma_addr | ||
32 | * bus_to_virt: Used to convert an address for DMA operations | ||
33 | * to an address that the kernel can use. | ||
34 | */ | ||
35 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET) | ||
36 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET) | ||
37 | 31 | ||
38 | #endif | 32 | #endif |
diff --git a/arch/arm/mach-realview/include/mach/uncompress.h b/arch/arm/mach-realview/include/mach/uncompress.h index 79f50f218e77..415d634d52ab 100644 --- a/arch/arm/mach-realview/include/mach/uncompress.h +++ b/arch/arm/mach-realview/include/mach/uncompress.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <mach/board-eb.h> | 23 | #include <mach/board-eb.h> |
24 | #include <mach/board-pb11mp.h> | 24 | #include <mach/board-pb11mp.h> |
25 | #include <mach/board-pb1176.h> | 25 | #include <mach/board-pb1176.h> |
26 | #include <mach/board-pba8.h> | ||
26 | 27 | ||
27 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) | 28 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) |
28 | #define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c)) | 29 | #define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c)) |
@@ -40,6 +41,8 @@ static inline unsigned long get_uart_base(void) | |||
40 | return REALVIEW_PB11MP_UART0_BASE; | 41 | return REALVIEW_PB11MP_UART0_BASE; |
41 | else if (machine_is_realview_pb1176()) | 42 | else if (machine_is_realview_pb1176()) |
42 | return REALVIEW_PB1176_UART0_BASE; | 43 | return REALVIEW_PB1176_UART0_BASE; |
44 | else if (machine_is_realview_pba8()) | ||
45 | return REALVIEW_PBA8_UART0_BASE; | ||
43 | else | 46 | else |
44 | return 0; | 47 | return 0; |
45 | } | 48 | } |
diff --git a/arch/arm/mach-realview/include/mach/vmalloc.h b/arch/arm/mach-realview/include/mach/vmalloc.h index 48cbcc873db2..fe0de1b507ac 100644 --- a/arch/arm/mach-realview/include/mach/vmalloc.h +++ b/arch/arm/mach-realview/include/mach/vmalloc.h | |||
@@ -18,4 +18,4 @@ | |||
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 | #define VMALLOC_END (PAGE_OFFSET + 0x18000000) | 21 | #define VMALLOC_END 0xf8000000 |
diff --git a/arch/arm/mach-realview/localtimer.c b/arch/arm/mach-realview/localtimer.c index 44d178cd5733..9019ef2e5611 100644 --- a/arch/arm/mach-realview/localtimer.c +++ b/arch/arm/mach-realview/localtimer.c | |||
@@ -38,18 +38,14 @@ void local_timer_interrupt(void) | |||
38 | 38 | ||
39 | #ifdef CONFIG_LOCAL_TIMERS | 39 | #ifdef CONFIG_LOCAL_TIMERS |
40 | 40 | ||
41 | #define TWD_BASE(cpu) (twd_base_addr + (cpu) * twd_size) | ||
42 | |||
43 | /* set up by the platform code */ | 41 | /* set up by the platform code */ |
44 | void __iomem *twd_base_addr; | 42 | void __iomem *twd_base; |
45 | unsigned int twd_size; | ||
46 | 43 | ||
47 | static unsigned long mpcore_timer_rate; | 44 | static unsigned long mpcore_timer_rate; |
48 | 45 | ||
49 | static void local_timer_set_mode(enum clock_event_mode mode, | 46 | static void local_timer_set_mode(enum clock_event_mode mode, |
50 | struct clock_event_device *clk) | 47 | struct clock_event_device *clk) |
51 | { | 48 | { |
52 | void __iomem *base = TWD_BASE(smp_processor_id()); | ||
53 | unsigned long ctrl; | 49 | unsigned long ctrl; |
54 | 50 | ||
55 | switch(mode) { | 51 | switch(mode) { |
@@ -68,17 +64,16 @@ static void local_timer_set_mode(enum clock_event_mode mode, | |||
68 | ctrl = 0; | 64 | ctrl = 0; |
69 | } | 65 | } |
70 | 66 | ||
71 | __raw_writel(ctrl, base + TWD_TIMER_CONTROL); | 67 | __raw_writel(ctrl, twd_base + TWD_TIMER_CONTROL); |
72 | } | 68 | } |
73 | 69 | ||
74 | static int local_timer_set_next_event(unsigned long evt, | 70 | static int local_timer_set_next_event(unsigned long evt, |
75 | struct clock_event_device *unused) | 71 | struct clock_event_device *unused) |
76 | { | 72 | { |
77 | void __iomem *base = TWD_BASE(smp_processor_id()); | 73 | unsigned long ctrl = __raw_readl(twd_base + TWD_TIMER_CONTROL); |
78 | unsigned long ctrl = __raw_readl(base + TWD_TIMER_CONTROL); | ||
79 | 74 | ||
80 | __raw_writel(evt, base + TWD_TIMER_COUNTER); | 75 | __raw_writel(evt, twd_base + TWD_TIMER_COUNTER); |
81 | __raw_writel(ctrl | TWD_TIMER_CONTROL_ENABLE, base + TWD_TIMER_CONTROL); | 76 | __raw_writel(ctrl | TWD_TIMER_CONTROL_ENABLE, twd_base + TWD_TIMER_CONTROL); |
82 | 77 | ||
83 | return 0; | 78 | return 0; |
84 | } | 79 | } |
@@ -91,19 +86,16 @@ static int local_timer_set_next_event(unsigned long evt, | |||
91 | */ | 86 | */ |
92 | int local_timer_ack(void) | 87 | int local_timer_ack(void) |
93 | { | 88 | { |
94 | void __iomem *base = TWD_BASE(smp_processor_id()); | 89 | if (__raw_readl(twd_base + TWD_TIMER_INTSTAT)) { |
95 | 90 | __raw_writel(1, twd_base + TWD_TIMER_INTSTAT); | |
96 | if (__raw_readl(base + TWD_TIMER_INTSTAT)) { | ||
97 | __raw_writel(1, base + TWD_TIMER_INTSTAT); | ||
98 | return 1; | 91 | return 1; |
99 | } | 92 | } |
100 | 93 | ||
101 | return 0; | 94 | return 0; |
102 | } | 95 | } |
103 | 96 | ||
104 | static void __cpuinit twd_calibrate_rate(unsigned int cpu) | 97 | static void __cpuinit twd_calibrate_rate(void) |
105 | { | 98 | { |
106 | void __iomem *base = TWD_BASE(cpu); | ||
107 | unsigned long load, count; | 99 | unsigned long load, count; |
108 | u64 waitjiffies; | 100 | u64 waitjiffies; |
109 | 101 | ||
@@ -124,15 +116,15 @@ static void __cpuinit twd_calibrate_rate(unsigned int cpu) | |||
124 | waitjiffies += 5; | 116 | waitjiffies += 5; |
125 | 117 | ||
126 | /* enable, no interrupt or reload */ | 118 | /* enable, no interrupt or reload */ |
127 | __raw_writel(0x1, base + TWD_TIMER_CONTROL); | 119 | __raw_writel(0x1, twd_base + TWD_TIMER_CONTROL); |
128 | 120 | ||
129 | /* maximum value */ | 121 | /* maximum value */ |
130 | __raw_writel(0xFFFFFFFFU, base + TWD_TIMER_COUNTER); | 122 | __raw_writel(0xFFFFFFFFU, twd_base + TWD_TIMER_COUNTER); |
131 | 123 | ||
132 | while (get_jiffies_64() < waitjiffies) | 124 | while (get_jiffies_64() < waitjiffies) |
133 | udelay(10); | 125 | udelay(10); |
134 | 126 | ||
135 | count = __raw_readl(base + TWD_TIMER_COUNTER); | 127 | count = __raw_readl(twd_base + TWD_TIMER_COUNTER); |
136 | 128 | ||
137 | mpcore_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5); | 129 | mpcore_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5); |
138 | 130 | ||
@@ -142,18 +134,19 @@ static void __cpuinit twd_calibrate_rate(unsigned int cpu) | |||
142 | 134 | ||
143 | load = mpcore_timer_rate / HZ; | 135 | load = mpcore_timer_rate / HZ; |
144 | 136 | ||
145 | __raw_writel(load, base + TWD_TIMER_LOAD); | 137 | __raw_writel(load, twd_base + TWD_TIMER_LOAD); |
146 | } | 138 | } |
147 | 139 | ||
148 | /* | 140 | /* |
149 | * Setup the local clock events for a CPU. | 141 | * Setup the local clock events for a CPU. |
150 | */ | 142 | */ |
151 | void __cpuinit local_timer_setup(unsigned int cpu) | 143 | void __cpuinit local_timer_setup(void) |
152 | { | 144 | { |
145 | unsigned int cpu = smp_processor_id(); | ||
153 | struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); | 146 | struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); |
154 | unsigned long flags; | 147 | unsigned long flags; |
155 | 148 | ||
156 | twd_calibrate_rate(cpu); | 149 | twd_calibrate_rate(); |
157 | 150 | ||
158 | clk->name = "local_timer"; | 151 | clk->name = "local_timer"; |
159 | clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; | 152 | clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT; |
@@ -178,9 +171,9 @@ void __cpuinit local_timer_setup(unsigned int cpu) | |||
178 | /* | 171 | /* |
179 | * take a local timer down | 172 | * take a local timer down |
180 | */ | 173 | */ |
181 | void __cpuexit local_timer_stop(unsigned int cpu) | 174 | void __cpuexit local_timer_stop(void) |
182 | { | 175 | { |
183 | __raw_writel(0, TWD_BASE(cpu) + TWD_TIMER_CONTROL); | 176 | __raw_writel(0, twd_base + TWD_TIMER_CONTROL); |
184 | } | 177 | } |
185 | 178 | ||
186 | #else /* CONFIG_LOCAL_TIMERS */ | 179 | #else /* CONFIG_LOCAL_TIMERS */ |
@@ -190,8 +183,9 @@ static void dummy_timer_set_mode(enum clock_event_mode mode, | |||
190 | { | 183 | { |
191 | } | 184 | } |
192 | 185 | ||
193 | void __cpuinit local_timer_setup(unsigned int cpu) | 186 | void __cpuinit local_timer_setup(void) |
194 | { | 187 | { |
188 | unsigned int cpu = smp_processor_id(); | ||
195 | struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); | 189 | struct clock_event_device *clk = &per_cpu(local_clockevent, cpu); |
196 | 190 | ||
197 | clk->name = "dummy_timer"; | 191 | clk->name = "dummy_timer"; |
diff --git a/arch/arm/mach-realview/platsmp.c b/arch/arm/mach-realview/platsmp.c index e102aeb0f76e..8fce85f33033 100644 --- a/arch/arm/mach-realview/platsmp.c +++ b/arch/arm/mach-realview/platsmp.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include <mach/board-pb11mp.h> | 23 | #include <mach/board-pb11mp.h> |
24 | #include <mach/scu.h> | 24 | #include <mach/scu.h> |
25 | 25 | ||
26 | #include "core.h" | ||
27 | |||
26 | extern void realview_secondary_startup(void); | 28 | extern void realview_secondary_startup(void); |
27 | 29 | ||
28 | /* | 30 | /* |
@@ -31,15 +33,20 @@ extern void realview_secondary_startup(void); | |||
31 | */ | 33 | */ |
32 | volatile int __cpuinitdata pen_release = -1; | 34 | volatile int __cpuinitdata pen_release = -1; |
33 | 35 | ||
36 | static void __iomem *scu_base_addr(void) | ||
37 | { | ||
38 | if (machine_is_realview_eb_mp()) | ||
39 | return __io_address(REALVIEW_EB11MP_SCU_BASE); | ||
40 | else if (machine_is_realview_pb11mp()) | ||
41 | return __io_address(REALVIEW_TC11MP_SCU_BASE); | ||
42 | else | ||
43 | return (void __iomem *)0; | ||
44 | } | ||
45 | |||
34 | static unsigned int __init get_core_count(void) | 46 | static unsigned int __init get_core_count(void) |
35 | { | 47 | { |
36 | unsigned int ncores; | 48 | unsigned int ncores; |
37 | void __iomem *scu_base = 0; | 49 | void __iomem *scu_base = scu_base_addr(); |
38 | |||
39 | if (machine_is_realview_eb() && core_tile_eb11mp()) | ||
40 | scu_base = __io_address(REALVIEW_EB11MP_SCU_BASE); | ||
41 | else if (machine_is_realview_pb11mp()) | ||
42 | scu_base = __io_address(REALVIEW_TC11MP_SCU_BASE); | ||
43 | 50 | ||
44 | if (scu_base) { | 51 | if (scu_base) { |
45 | ncores = __raw_readl(scu_base + SCU_CONFIG); | 52 | ncores = __raw_readl(scu_base + SCU_CONFIG); |
@@ -56,14 +63,7 @@ static unsigned int __init get_core_count(void) | |||
56 | static void scu_enable(void) | 63 | static void scu_enable(void) |
57 | { | 64 | { |
58 | u32 scu_ctrl; | 65 | u32 scu_ctrl; |
59 | void __iomem *scu_base; | 66 | void __iomem *scu_base = scu_base_addr(); |
60 | |||
61 | if (machine_is_realview_eb() && core_tile_eb11mp()) | ||
62 | scu_base = __io_address(REALVIEW_EB11MP_SCU_BASE); | ||
63 | else if (machine_is_realview_pb11mp()) | ||
64 | scu_base = __io_address(REALVIEW_TC11MP_SCU_BASE); | ||
65 | else | ||
66 | BUG(); | ||
67 | 67 | ||
68 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); | 68 | scu_ctrl = __raw_readl(scu_base + SCU_CTRL); |
69 | scu_ctrl |= 1; | 69 | scu_ctrl |= 1; |
@@ -88,10 +88,7 @@ void __cpuinit platform_secondary_init(unsigned int cpu) | |||
88 | * core (e.g. timer irq), then they will not have been enabled | 88 | * core (e.g. timer irq), then they will not have been enabled |
89 | * for us: do so | 89 | * for us: do so |
90 | */ | 90 | */ |
91 | if (machine_is_realview_eb() && core_tile_eb11mp()) | 91 | gic_cpu_init(0, gic_cpu_base_addr); |
92 | gic_cpu_init(0, __io_address(REALVIEW_EB11MP_GIC_CPU_BASE)); | ||
93 | else if (machine_is_realview_pb11mp()) | ||
94 | gic_cpu_init(0, __io_address(REALVIEW_TC11MP_GIC_CPU_BASE)); | ||
95 | 92 | ||
96 | /* | 93 | /* |
97 | * let the primary processor know we're out of the | 94 | * let the primary processor know we're out of the |
@@ -232,9 +229,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
232 | * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in | 229 | * dummy (!CONFIG_LOCAL_TIMERS), it was already registers in |
233 | * realview_timer_init | 230 | * realview_timer_init |
234 | */ | 231 | */ |
235 | if ((machine_is_realview_eb() && core_tile_eb11mp()) || | 232 | local_timer_setup(); |
236 | machine_is_realview_pb11mp()) | ||
237 | local_timer_setup(cpu); | ||
238 | #endif | 233 | #endif |
239 | 234 | ||
240 | /* | 235 | /* |
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c index eb829eb1ebe2..bed39ed97613 100644 --- a/arch/arm/mach-realview/realview_eb.c +++ b/arch/arm/mach-realview/realview_eb.c | |||
@@ -108,7 +108,7 @@ static struct map_desc realview_eb11mp_io_desc[] __initdata = { | |||
108 | static void __init realview_eb_map_io(void) | 108 | static void __init realview_eb_map_io(void) |
109 | { | 109 | { |
110 | iotable_init(realview_eb_io_desc, ARRAY_SIZE(realview_eb_io_desc)); | 110 | iotable_init(realview_eb_io_desc, ARRAY_SIZE(realview_eb_io_desc)); |
111 | if (core_tile_eb11mp()) | 111 | if (core_tile_eb11mp() || core_tile_a9mp()) |
112 | iotable_init(realview_eb11mp_io_desc, ARRAY_SIZE(realview_eb11mp_io_desc)); | 112 | iotable_init(realview_eb11mp_io_desc, ARRAY_SIZE(realview_eb11mp_io_desc)); |
113 | } | 113 | } |
114 | 114 | ||
@@ -242,12 +242,6 @@ static struct resource realview_eb_eth_resources[] = { | |||
242 | }, | 242 | }, |
243 | }; | 243 | }; |
244 | 244 | ||
245 | static struct platform_device realview_eb_eth_device = { | ||
246 | .id = 0, | ||
247 | .num_resources = ARRAY_SIZE(realview_eb_eth_resources), | ||
248 | .resource = realview_eb_eth_resources, | ||
249 | }; | ||
250 | |||
251 | /* | 245 | /* |
252 | * Detect and register the correct Ethernet device. RealView/EB rev D | 246 | * Detect and register the correct Ethernet device. RealView/EB rev D |
253 | * platforms use the newer SMSC LAN9118 Ethernet chip | 247 | * platforms use the newer SMSC LAN9118 Ethernet chip |
@@ -255,26 +249,24 @@ static struct platform_device realview_eb_eth_device = { | |||
255 | static int eth_device_register(void) | 249 | static int eth_device_register(void) |
256 | { | 250 | { |
257 | void __iomem *eth_addr = ioremap(REALVIEW_EB_ETH_BASE, SZ_4K); | 251 | void __iomem *eth_addr = ioremap(REALVIEW_EB_ETH_BASE, SZ_4K); |
252 | const char *name = NULL; | ||
258 | u32 idrev; | 253 | u32 idrev; |
259 | 254 | ||
260 | if (!eth_addr) | 255 | if (!eth_addr) |
261 | return -ENOMEM; | 256 | return -ENOMEM; |
262 | 257 | ||
263 | idrev = readl(eth_addr + 0x50); | 258 | idrev = readl(eth_addr + 0x50); |
264 | if ((idrev & 0xFFFF0000) == 0x01180000) | 259 | if ((idrev & 0xFFFF0000) != 0x01180000) |
265 | /* SMSC LAN9118 chip present */ | 260 | /* SMSC LAN9118 not present, use LAN91C111 instead */ |
266 | realview_eb_eth_device.name = "smc911x"; | 261 | name = "smc91x"; |
267 | else | ||
268 | /* SMSC 91C111 chip present */ | ||
269 | realview_eb_eth_device.name = "smc91x"; | ||
270 | 262 | ||
271 | iounmap(eth_addr); | 263 | iounmap(eth_addr); |
272 | return platform_device_register(&realview_eb_eth_device); | 264 | return realview_eth_register(name, realview_eb_eth_resources); |
273 | } | 265 | } |
274 | 266 | ||
275 | static void __init gic_init_irq(void) | 267 | static void __init gic_init_irq(void) |
276 | { | 268 | { |
277 | if (core_tile_eb11mp()) { | 269 | if (core_tile_eb11mp() || core_tile_a9mp()) { |
278 | unsigned int pldctrl; | 270 | unsigned int pldctrl; |
279 | 271 | ||
280 | /* new irq mode */ | 272 | /* new irq mode */ |
@@ -342,10 +334,9 @@ static void __init realview_eb_timer_init(void) | |||
342 | timer2_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE); | 334 | timer2_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE); |
343 | timer3_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE) + 0x20; | 335 | timer3_va_base = __io_address(REALVIEW_EB_TIMER2_3_BASE) + 0x20; |
344 | 336 | ||
345 | if (core_tile_eb11mp()) { | 337 | if (core_tile_eb11mp() || core_tile_a9mp()) { |
346 | #ifdef CONFIG_LOCAL_TIMERS | 338 | #ifdef CONFIG_LOCAL_TIMERS |
347 | twd_base_addr = __io_address(REALVIEW_EB11MP_TWD_BASE); | 339 | twd_base = __io_address(REALVIEW_EB11MP_TWD_BASE); |
348 | twd_size = REALVIEW_EB11MP_TWD_SIZE; | ||
349 | #endif | 340 | #endif |
350 | timer_irq = IRQ_EB11MP_TIMER0_1; | 341 | timer_irq = IRQ_EB11MP_TIMER0_1; |
351 | } else | 342 | } else |
@@ -362,7 +353,7 @@ static void __init realview_eb_init(void) | |||
362 | { | 353 | { |
363 | int i; | 354 | int i; |
364 | 355 | ||
365 | if (core_tile_eb11mp()) { | 356 | if (core_tile_eb11mp() || core_tile_a9mp()) { |
366 | realview_eb11mp_fixup(); | 357 | realview_eb11mp_fixup(); |
367 | 358 | ||
368 | #ifdef CONFIG_CACHE_L2X0 | 359 | #ifdef CONFIG_CACHE_L2X0 |
@@ -372,8 +363,6 @@ static void __init realview_eb_init(void) | |||
372 | #endif | 363 | #endif |
373 | } | 364 | } |
374 | 365 | ||
375 | clk_register(&realview_clcd_clk); | ||
376 | |||
377 | realview_flash_register(&realview_eb_flash_resource, 1); | 366 | realview_flash_register(&realview_eb_flash_resource, 1); |
378 | platform_device_register(&realview_i2c_device); | 367 | platform_device_register(&realview_i2c_device); |
379 | eth_device_register(); | 368 | eth_device_register(); |
@@ -392,7 +381,7 @@ MACHINE_START(REALVIEW_EB, "ARM-RealView EB") | |||
392 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 381 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
393 | .phys_io = REALVIEW_EB_UART0_BASE, | 382 | .phys_io = REALVIEW_EB_UART0_BASE, |
394 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, | 383 | .io_pg_offst = (IO_ADDRESS(REALVIEW_EB_UART0_BASE) >> 18) & 0xfffc, |
395 | .boot_params = 0x00000100, | 384 | .boot_params = PHYS_OFFSET + 0x00000100, |
396 | .map_io = realview_eb_map_io, | 385 | .map_io = realview_eb_map_io, |
397 | .init_irq = gic_init_irq, | 386 | .init_irq = gic_init_irq, |
398 | .timer = &realview_eb_timer, | 387 | .timer = &realview_eb_timer, |
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c index cccdb3eb90fe..8f0683c22140 100644 --- a/arch/arm/mach-realview/realview_pb1176.c +++ b/arch/arm/mach-realview/realview_pb1176.c | |||
@@ -222,13 +222,6 @@ static struct resource realview_pb1176_smsc911x_resources[] = { | |||
222 | }, | 222 | }, |
223 | }; | 223 | }; |
224 | 224 | ||
225 | static struct platform_device realview_pb1176_smsc911x_device = { | ||
226 | .name = "smc911x", | ||
227 | .id = 0, | ||
228 | .num_resources = ARRAY_SIZE(realview_pb1176_smsc911x_resources), | ||
229 | .resource = realview_pb1176_smsc911x_resources, | ||
230 | }; | ||
231 | |||
232 | static void __init gic_init_irq(void) | 225 | static void __init gic_init_irq(void) |
233 | { | 226 | { |
234 | /* ARM1176 DevChip GIC, primary */ | 227 | /* ARM1176 DevChip GIC, primary */ |
@@ -265,10 +258,8 @@ static void __init realview_pb1176_init(void) | |||
265 | l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff); | 258 | l2x0_init(__io_address(REALVIEW_PB1176_L220_BASE), 0x00730000, 0xfe000fff); |
266 | #endif | 259 | #endif |
267 | 260 | ||
268 | clk_register(&realview_clcd_clk); | ||
269 | |||
270 | realview_flash_register(&realview_pb1176_flash_resource, 1); | 261 | realview_flash_register(&realview_pb1176_flash_resource, 1); |
271 | platform_device_register(&realview_pb1176_smsc911x_device); | 262 | realview_eth_register(NULL, realview_pb1176_smsc911x_resources); |
272 | 263 | ||
273 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | 264 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { |
274 | struct amba_device *d = amba_devs[i]; | 265 | struct amba_device *d = amba_devs[i]; |
@@ -284,7 +275,7 @@ MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176") | |||
284 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 275 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
285 | .phys_io = REALVIEW_PB1176_UART0_BASE, | 276 | .phys_io = REALVIEW_PB1176_UART0_BASE, |
286 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, | 277 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB1176_UART0_BASE) >> 18) & 0xfffc, |
287 | .boot_params = 0x00000100, | 278 | .boot_params = PHYS_OFFSET + 0x00000100, |
288 | .map_io = realview_pb1176_map_io, | 279 | .map_io = realview_pb1176_map_io, |
289 | .init_irq = gic_init_irq, | 280 | .init_irq = gic_init_irq, |
290 | .timer = &realview_pb1176_timer, | 281 | .timer = &realview_pb1176_timer, |
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c index 8b863148ec18..3ebdb2dadd6f 100644 --- a/arch/arm/mach-realview/realview_pb11mp.c +++ b/arch/arm/mach-realview/realview_pb11mp.c | |||
@@ -230,13 +230,6 @@ static struct resource realview_pb11mp_smsc911x_resources[] = { | |||
230 | }, | 230 | }, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static struct platform_device realview_pb11mp_smsc911x_device = { | ||
234 | .name = "smc911x", | ||
235 | .id = 0, | ||
236 | .num_resources = ARRAY_SIZE(realview_pb11mp_smsc911x_resources), | ||
237 | .resource = realview_pb11mp_smsc911x_resources, | ||
238 | }; | ||
239 | |||
240 | struct resource realview_pb11mp_cf_resources[] = { | 233 | struct resource realview_pb11mp_cf_resources[] = { |
241 | [0] = { | 234 | [0] = { |
242 | .start = REALVIEW_PB11MP_CF_BASE, | 235 | .start = REALVIEW_PB11MP_CF_BASE, |
@@ -292,8 +285,7 @@ static void __init realview_pb11mp_timer_init(void) | |||
292 | timer3_va_base = __io_address(REALVIEW_PB11MP_TIMER2_3_BASE) + 0x20; | 285 | timer3_va_base = __io_address(REALVIEW_PB11MP_TIMER2_3_BASE) + 0x20; |
293 | 286 | ||
294 | #ifdef CONFIG_LOCAL_TIMERS | 287 | #ifdef CONFIG_LOCAL_TIMERS |
295 | twd_base_addr = __io_address(REALVIEW_TC11MP_TWD_BASE); | 288 | twd_base = __io_address(REALVIEW_TC11MP_TWD_BASE); |
296 | twd_size = REALVIEW_TC11MP_TWD_SIZE; | ||
297 | #endif | 289 | #endif |
298 | realview_timer_init(IRQ_TC11MP_TIMER0_1); | 290 | realview_timer_init(IRQ_TC11MP_TIMER0_1); |
299 | } | 291 | } |
@@ -312,11 +304,9 @@ static void __init realview_pb11mp_init(void) | |||
312 | l2x0_init(__io_address(REALVIEW_TC11MP_L220_BASE), 0x00790000, 0xfe000fff); | 304 | l2x0_init(__io_address(REALVIEW_TC11MP_L220_BASE), 0x00790000, 0xfe000fff); |
313 | #endif | 305 | #endif |
314 | 306 | ||
315 | clk_register(&realview_clcd_clk); | ||
316 | |||
317 | realview_flash_register(realview_pb11mp_flash_resource, | 307 | realview_flash_register(realview_pb11mp_flash_resource, |
318 | ARRAY_SIZE(realview_pb11mp_flash_resource)); | 308 | ARRAY_SIZE(realview_pb11mp_flash_resource)); |
319 | platform_device_register(&realview_pb11mp_smsc911x_device); | 309 | realview_eth_register(NULL, realview_pb11mp_smsc911x_resources); |
320 | platform_device_register(&realview_i2c_device); | 310 | platform_device_register(&realview_i2c_device); |
321 | platform_device_register(&realview_pb11mp_cf_device); | 311 | platform_device_register(&realview_pb11mp_cf_device); |
322 | 312 | ||
@@ -334,7 +324,7 @@ MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore") | |||
334 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | 324 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ |
335 | .phys_io = REALVIEW_PB11MP_UART0_BASE, | 325 | .phys_io = REALVIEW_PB11MP_UART0_BASE, |
336 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, | 326 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PB11MP_UART0_BASE) >> 18) & 0xfffc, |
337 | .boot_params = 0x00000100, | 327 | .boot_params = PHYS_OFFSET + 0x00000100, |
338 | .map_io = realview_pb11mp_map_io, | 328 | .map_io = realview_pb11mp_map_io, |
339 | .init_irq = gic_init_irq, | 329 | .init_irq = gic_init_irq, |
340 | .timer = &realview_pb11mp_timer, | 330 | .timer = &realview_pb11mp_timer, |
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c new file mode 100644 index 000000000000..34c94435d2d8 --- /dev/null +++ b/arch/arm/mach-realview/realview_pba8.c | |||
@@ -0,0 +1,300 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-realview/realview_pba8.c | ||
3 | * | ||
4 | * Copyright (C) 2008 ARM Limited | ||
5 | * Copyright (C) 2000 Deep Blue Solutions Ltd | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
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 | ||
20 | */ | ||
21 | |||
22 | #include <linux/init.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/sysdev.h> | ||
25 | #include <linux/amba/bus.h> | ||
26 | #include <linux/io.h> | ||
27 | |||
28 | #include <asm/irq.h> | ||
29 | #include <asm/leds.h> | ||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/hardware/gic.h> | ||
32 | #include <asm/hardware/icst307.h> | ||
33 | |||
34 | #include <asm/mach/arch.h> | ||
35 | #include <asm/mach/map.h> | ||
36 | #include <asm/mach/mmc.h> | ||
37 | #include <asm/mach/time.h> | ||
38 | |||
39 | #include <mach/hardware.h> | ||
40 | #include <mach/board-pba8.h> | ||
41 | #include <mach/irqs.h> | ||
42 | |||
43 | #include "core.h" | ||
44 | #include "clock.h" | ||
45 | |||
46 | static struct map_desc realview_pba8_io_desc[] __initdata = { | ||
47 | { | ||
48 | .virtual = IO_ADDRESS(REALVIEW_SYS_BASE), | ||
49 | .pfn = __phys_to_pfn(REALVIEW_SYS_BASE), | ||
50 | .length = SZ_4K, | ||
51 | .type = MT_DEVICE, | ||
52 | }, { | ||
53 | .virtual = IO_ADDRESS(REALVIEW_PBA8_GIC_CPU_BASE), | ||
54 | .pfn = __phys_to_pfn(REALVIEW_PBA8_GIC_CPU_BASE), | ||
55 | .length = SZ_4K, | ||
56 | .type = MT_DEVICE, | ||
57 | }, { | ||
58 | .virtual = IO_ADDRESS(REALVIEW_PBA8_GIC_DIST_BASE), | ||
59 | .pfn = __phys_to_pfn(REALVIEW_PBA8_GIC_DIST_BASE), | ||
60 | .length = SZ_4K, | ||
61 | .type = MT_DEVICE, | ||
62 | }, { | ||
63 | .virtual = IO_ADDRESS(REALVIEW_SCTL_BASE), | ||
64 | .pfn = __phys_to_pfn(REALVIEW_SCTL_BASE), | ||
65 | .length = SZ_4K, | ||
66 | .type = MT_DEVICE, | ||
67 | }, { | ||
68 | .virtual = IO_ADDRESS(REALVIEW_PBA8_TIMER0_1_BASE), | ||
69 | .pfn = __phys_to_pfn(REALVIEW_PBA8_TIMER0_1_BASE), | ||
70 | .length = SZ_4K, | ||
71 | .type = MT_DEVICE, | ||
72 | }, { | ||
73 | .virtual = IO_ADDRESS(REALVIEW_PBA8_TIMER2_3_BASE), | ||
74 | .pfn = __phys_to_pfn(REALVIEW_PBA8_TIMER2_3_BASE), | ||
75 | .length = SZ_4K, | ||
76 | .type = MT_DEVICE, | ||
77 | }, | ||
78 | #ifdef CONFIG_PCI | ||
79 | { | ||
80 | .virtual = PCIX_UNIT_BASE, | ||
81 | .pfn = __phys_to_pfn(REALVIEW_PBA8_PCI_BASE), | ||
82 | .length = REALVIEW_PBA8_PCI_BASE_SIZE, | ||
83 | .type = MT_DEVICE | ||
84 | }, | ||
85 | #endif | ||
86 | #ifdef CONFIG_DEBUG_LL | ||
87 | { | ||
88 | .virtual = IO_ADDRESS(REALVIEW_PBA8_UART0_BASE), | ||
89 | .pfn = __phys_to_pfn(REALVIEW_PBA8_UART0_BASE), | ||
90 | .length = SZ_4K, | ||
91 | .type = MT_DEVICE, | ||
92 | }, | ||
93 | #endif | ||
94 | }; | ||
95 | |||
96 | static void __init realview_pba8_map_io(void) | ||
97 | { | ||
98 | iotable_init(realview_pba8_io_desc, ARRAY_SIZE(realview_pba8_io_desc)); | ||
99 | } | ||
100 | |||
101 | /* | ||
102 | * RealView PBA8Core AMBA devices | ||
103 | */ | ||
104 | |||
105 | #define GPIO2_IRQ { IRQ_PBA8_GPIO2, NO_IRQ } | ||
106 | #define GPIO2_DMA { 0, 0 } | ||
107 | #define GPIO3_IRQ { IRQ_PBA8_GPIO3, NO_IRQ } | ||
108 | #define GPIO3_DMA { 0, 0 } | ||
109 | #define AACI_IRQ { IRQ_PBA8_AACI, NO_IRQ } | ||
110 | #define AACI_DMA { 0x80, 0x81 } | ||
111 | #define MMCI0_IRQ { IRQ_PBA8_MMCI0A, IRQ_PBA8_MMCI0B } | ||
112 | #define MMCI0_DMA { 0x84, 0 } | ||
113 | #define KMI0_IRQ { IRQ_PBA8_KMI0, NO_IRQ } | ||
114 | #define KMI0_DMA { 0, 0 } | ||
115 | #define KMI1_IRQ { IRQ_PBA8_KMI1, NO_IRQ } | ||
116 | #define KMI1_DMA { 0, 0 } | ||
117 | #define PBA8_SMC_IRQ { NO_IRQ, NO_IRQ } | ||
118 | #define PBA8_SMC_DMA { 0, 0 } | ||
119 | #define MPMC_IRQ { NO_IRQ, NO_IRQ } | ||
120 | #define MPMC_DMA { 0, 0 } | ||
121 | #define PBA8_CLCD_IRQ { IRQ_PBA8_CLCD, NO_IRQ } | ||
122 | #define PBA8_CLCD_DMA { 0, 0 } | ||
123 | #define DMAC_IRQ { IRQ_PBA8_DMAC, NO_IRQ } | ||
124 | #define DMAC_DMA { 0, 0 } | ||
125 | #define SCTL_IRQ { NO_IRQ, NO_IRQ } | ||
126 | #define SCTL_DMA { 0, 0 } | ||
127 | #define PBA8_WATCHDOG_IRQ { IRQ_PBA8_WATCHDOG, NO_IRQ } | ||
128 | #define PBA8_WATCHDOG_DMA { 0, 0 } | ||
129 | #define PBA8_GPIO0_IRQ { IRQ_PBA8_GPIO0, NO_IRQ } | ||
130 | #define PBA8_GPIO0_DMA { 0, 0 } | ||
131 | #define GPIO1_IRQ { IRQ_PBA8_GPIO1, NO_IRQ } | ||
132 | #define GPIO1_DMA { 0, 0 } | ||
133 | #define PBA8_RTC_IRQ { IRQ_PBA8_RTC, NO_IRQ } | ||
134 | #define PBA8_RTC_DMA { 0, 0 } | ||
135 | #define SCI_IRQ { IRQ_PBA8_SCI, NO_IRQ } | ||
136 | #define SCI_DMA { 7, 6 } | ||
137 | #define PBA8_UART0_IRQ { IRQ_PBA8_UART0, NO_IRQ } | ||
138 | #define PBA8_UART0_DMA { 15, 14 } | ||
139 | #define PBA8_UART1_IRQ { IRQ_PBA8_UART1, NO_IRQ } | ||
140 | #define PBA8_UART1_DMA { 13, 12 } | ||
141 | #define PBA8_UART2_IRQ { IRQ_PBA8_UART2, NO_IRQ } | ||
142 | #define PBA8_UART2_DMA { 11, 10 } | ||
143 | #define PBA8_UART3_IRQ { IRQ_PBA8_UART3, NO_IRQ } | ||
144 | #define PBA8_UART3_DMA { 0x86, 0x87 } | ||
145 | #define PBA8_SSP_IRQ { IRQ_PBA8_SSP, NO_IRQ } | ||
146 | #define PBA8_SSP_DMA { 9, 8 } | ||
147 | |||
148 | /* FPGA Primecells */ | ||
149 | AMBA_DEVICE(aaci, "fpga:04", AACI, NULL); | ||
150 | AMBA_DEVICE(mmc0, "fpga:05", MMCI0, &realview_mmc0_plat_data); | ||
151 | AMBA_DEVICE(kmi0, "fpga:06", KMI0, NULL); | ||
152 | AMBA_DEVICE(kmi1, "fpga:07", KMI1, NULL); | ||
153 | AMBA_DEVICE(uart3, "fpga:09", PBA8_UART3, NULL); | ||
154 | |||
155 | /* DevChip Primecells */ | ||
156 | AMBA_DEVICE(smc, "dev:00", PBA8_SMC, NULL); | ||
157 | AMBA_DEVICE(sctl, "dev:e0", SCTL, NULL); | ||
158 | AMBA_DEVICE(wdog, "dev:e1", PBA8_WATCHDOG, NULL); | ||
159 | AMBA_DEVICE(gpio0, "dev:e4", PBA8_GPIO0, NULL); | ||
160 | AMBA_DEVICE(gpio1, "dev:e5", GPIO1, NULL); | ||
161 | AMBA_DEVICE(gpio2, "dev:e6", GPIO2, NULL); | ||
162 | AMBA_DEVICE(rtc, "dev:e8", PBA8_RTC, NULL); | ||
163 | AMBA_DEVICE(sci0, "dev:f0", SCI, NULL); | ||
164 | AMBA_DEVICE(uart0, "dev:f1", PBA8_UART0, NULL); | ||
165 | AMBA_DEVICE(uart1, "dev:f2", PBA8_UART1, NULL); | ||
166 | AMBA_DEVICE(uart2, "dev:f3", PBA8_UART2, NULL); | ||
167 | AMBA_DEVICE(ssp0, "dev:f4", PBA8_SSP, NULL); | ||
168 | |||
169 | /* Primecells on the NEC ISSP chip */ | ||
170 | AMBA_DEVICE(clcd, "issp:20", PBA8_CLCD, &clcd_plat_data); | ||
171 | AMBA_DEVICE(dmac, "issp:30", DMAC, NULL); | ||
172 | |||
173 | static struct amba_device *amba_devs[] __initdata = { | ||
174 | &dmac_device, | ||
175 | &uart0_device, | ||
176 | &uart1_device, | ||
177 | &uart2_device, | ||
178 | &uart3_device, | ||
179 | &smc_device, | ||
180 | &clcd_device, | ||
181 | &sctl_device, | ||
182 | &wdog_device, | ||
183 | &gpio0_device, | ||
184 | &gpio1_device, | ||
185 | &gpio2_device, | ||
186 | &rtc_device, | ||
187 | &sci0_device, | ||
188 | &ssp0_device, | ||
189 | &aaci_device, | ||
190 | &mmc0_device, | ||
191 | &kmi0_device, | ||
192 | &kmi1_device, | ||
193 | }; | ||
194 | |||
195 | /* | ||
196 | * RealView PB-A8 platform devices | ||
197 | */ | ||
198 | static struct resource realview_pba8_flash_resource[] = { | ||
199 | [0] = { | ||
200 | .start = REALVIEW_PBA8_FLASH0_BASE, | ||
201 | .end = REALVIEW_PBA8_FLASH0_BASE + REALVIEW_PBA8_FLASH0_SIZE - 1, | ||
202 | .flags = IORESOURCE_MEM, | ||
203 | }, | ||
204 | [1] = { | ||
205 | .start = REALVIEW_PBA8_FLASH1_BASE, | ||
206 | .end = REALVIEW_PBA8_FLASH1_BASE + REALVIEW_PBA8_FLASH1_SIZE - 1, | ||
207 | .flags = IORESOURCE_MEM, | ||
208 | }, | ||
209 | }; | ||
210 | |||
211 | static struct resource realview_pba8_smsc911x_resources[] = { | ||
212 | [0] = { | ||
213 | .start = REALVIEW_PBA8_ETH_BASE, | ||
214 | .end = REALVIEW_PBA8_ETH_BASE + SZ_64K - 1, | ||
215 | .flags = IORESOURCE_MEM, | ||
216 | }, | ||
217 | [1] = { | ||
218 | .start = IRQ_PBA8_ETH, | ||
219 | .end = IRQ_PBA8_ETH, | ||
220 | .flags = IORESOURCE_IRQ, | ||
221 | }, | ||
222 | }; | ||
223 | |||
224 | struct resource realview_pba8_cf_resources[] = { | ||
225 | [0] = { | ||
226 | .start = REALVIEW_PBA8_CF_BASE, | ||
227 | .end = REALVIEW_PBA8_CF_BASE + SZ_4K - 1, | ||
228 | .flags = IORESOURCE_MEM, | ||
229 | }, | ||
230 | [1] = { | ||
231 | .start = REALVIEW_PBA8_CF_MEM_BASE, | ||
232 | .end = REALVIEW_PBA8_CF_MEM_BASE + SZ_4K - 1, | ||
233 | .flags = IORESOURCE_MEM, | ||
234 | }, | ||
235 | [2] = { | ||
236 | .start = -1, /* FIXME: Find correct irq */ | ||
237 | .end = -1, | ||
238 | .flags = IORESOURCE_IRQ, | ||
239 | }, | ||
240 | }; | ||
241 | |||
242 | struct platform_device realview_pba8_cf_device = { | ||
243 | .name = "compactflash", | ||
244 | .id = 0, | ||
245 | .num_resources = ARRAY_SIZE(realview_pba8_cf_resources), | ||
246 | .resource = realview_pba8_cf_resources, | ||
247 | }; | ||
248 | |||
249 | static void __init gic_init_irq(void) | ||
250 | { | ||
251 | /* ARM PB-A8 on-board GIC */ | ||
252 | gic_cpu_base_addr = __io_address(REALVIEW_PBA8_GIC_CPU_BASE); | ||
253 | gic_dist_init(0, __io_address(REALVIEW_PBA8_GIC_DIST_BASE), IRQ_PBA8_GIC_START); | ||
254 | gic_cpu_init(0, __io_address(REALVIEW_PBA8_GIC_CPU_BASE)); | ||
255 | } | ||
256 | |||
257 | static void __init realview_pba8_timer_init(void) | ||
258 | { | ||
259 | timer0_va_base = __io_address(REALVIEW_PBA8_TIMER0_1_BASE); | ||
260 | timer1_va_base = __io_address(REALVIEW_PBA8_TIMER0_1_BASE) + 0x20; | ||
261 | timer2_va_base = __io_address(REALVIEW_PBA8_TIMER2_3_BASE); | ||
262 | timer3_va_base = __io_address(REALVIEW_PBA8_TIMER2_3_BASE) + 0x20; | ||
263 | |||
264 | realview_timer_init(IRQ_PBA8_TIMER0_1); | ||
265 | } | ||
266 | |||
267 | static struct sys_timer realview_pba8_timer = { | ||
268 | .init = realview_pba8_timer_init, | ||
269 | }; | ||
270 | |||
271 | static void __init realview_pba8_init(void) | ||
272 | { | ||
273 | int i; | ||
274 | |||
275 | realview_flash_register(realview_pba8_flash_resource, | ||
276 | ARRAY_SIZE(realview_pba8_flash_resource)); | ||
277 | realview_eth_register(NULL, realview_pba8_smsc911x_resources); | ||
278 | platform_device_register(&realview_i2c_device); | ||
279 | platform_device_register(&realview_pba8_cf_device); | ||
280 | |||
281 | for (i = 0; i < ARRAY_SIZE(amba_devs); i++) { | ||
282 | struct amba_device *d = amba_devs[i]; | ||
283 | amba_device_register(d, &iomem_resource); | ||
284 | } | ||
285 | |||
286 | #ifdef CONFIG_LEDS | ||
287 | leds_event = realview_leds_event; | ||
288 | #endif | ||
289 | } | ||
290 | |||
291 | MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8") | ||
292 | /* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */ | ||
293 | .phys_io = REALVIEW_PBA8_UART0_BASE, | ||
294 | .io_pg_offst = (IO_ADDRESS(REALVIEW_PBA8_UART0_BASE) >> 18) & 0xfffc, | ||
295 | .boot_params = PHYS_OFFSET + 0x00000100, | ||
296 | .map_io = realview_pba8_map_io, | ||
297 | .init_irq = gic_init_irq, | ||
298 | .timer = &realview_pba8_timer, | ||
299 | .init_machine = realview_pba8_init, | ||
300 | MACHINE_END | ||
diff --git a/arch/arm/mach-rpc/include/mach/io.h b/arch/arm/mach-rpc/include/mach/io.h index 9f0553b7ec28..20da7f486e51 100644 --- a/arch/arm/mach-rpc/include/mach/io.h +++ b/arch/arm/mach-rpc/include/mach/io.h | |||
@@ -18,49 +18,6 @@ | |||
18 | #define IO_SPACE_LIMIT 0xffffffff | 18 | #define IO_SPACE_LIMIT 0xffffffff |
19 | 19 | ||
20 | /* | 20 | /* |
21 | * GCC is totally crap at loading/storing data. We try to persuade it | ||
22 | * to do the right thing by using these whereever possible instead of | ||
23 | * the above. | ||
24 | */ | ||
25 | #define __arch_base_getb(b,o) \ | ||
26 | ({ \ | ||
27 | unsigned int __v, __r = (b); \ | ||
28 | __asm__ __volatile__( \ | ||
29 | "ldrb %0, [%1, %2]" \ | ||
30 | : "=r" (__v) \ | ||
31 | : "r" (__r), "Ir" (o)); \ | ||
32 | __v; \ | ||
33 | }) | ||
34 | |||
35 | #define __arch_base_getl(b,o) \ | ||
36 | ({ \ | ||
37 | unsigned int __v, __r = (b); \ | ||
38 | __asm__ __volatile__( \ | ||
39 | "ldr %0, [%1, %2]" \ | ||
40 | : "=r" (__v) \ | ||
41 | : "r" (__r), "Ir" (o)); \ | ||
42 | __v; \ | ||
43 | }) | ||
44 | |||
45 | #define __arch_base_putb(v,b,o) \ | ||
46 | ({ \ | ||
47 | unsigned int __r = (b); \ | ||
48 | __asm__ __volatile__( \ | ||
49 | "strb %0, [%1, %2]" \ | ||
50 | : \ | ||
51 | : "r" (v), "r" (__r), "Ir" (o));\ | ||
52 | }) | ||
53 | |||
54 | #define __arch_base_putl(v,b,o) \ | ||
55 | ({ \ | ||
56 | unsigned int __r = (b); \ | ||
57 | __asm__ __volatile__( \ | ||
58 | "str %0, [%1, %2]" \ | ||
59 | : \ | ||
60 | : "r" (v), "r" (__r), "Ir" (o));\ | ||
61 | }) | ||
62 | |||
63 | /* | ||
64 | * We use two different types of addressing - PC style addresses, and ARM | 21 | * We use two different types of addressing - PC style addresses, and ARM |
65 | * addresses. PC style accesses the PC hardware with the normal PC IO | 22 | * addresses. PC style accesses the PC hardware with the normal PC IO |
66 | * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ | 23 | * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ |
@@ -232,15 +189,13 @@ DECLARE_IO(int,l,"") | |||
232 | result; \ | 189 | result; \ |
233 | }) | 190 | }) |
234 | 191 | ||
235 | #define __ioaddrc(port) __ioaddr(port) | ||
236 | |||
237 | #define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p)) | 192 | #define inb(p) (__builtin_constant_p((p)) ? __inbc(p) : __inb(p)) |
238 | #define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p)) | 193 | #define inw(p) (__builtin_constant_p((p)) ? __inwc(p) : __inw(p)) |
239 | #define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p)) | 194 | #define inl(p) (__builtin_constant_p((p)) ? __inlc(p) : __inl(p)) |
240 | #define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p)) | 195 | #define outb(v,p) (__builtin_constant_p((p)) ? __outbc(v,p) : __outb(v,p)) |
241 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) | 196 | #define outw(v,p) (__builtin_constant_p((p)) ? __outwc(v,p) : __outw(v,p)) |
242 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) | 197 | #define outl(v,p) (__builtin_constant_p((p)) ? __outlc(v,p) : __outl(v,p)) |
243 | #define __ioaddr(p) (__builtin_constant_p((p)) ? __ioaddr(p) : __ioaddrc(p)) | 198 | |
244 | /* the following macro is deprecated */ | 199 | /* the following macro is deprecated */ |
245 | #define ioaddr(port) ((unsigned long)__ioaddr((port))) | 200 | #define ioaddr(port) ((unsigned long)__ioaddr((port))) |
246 | 201 | ||
diff --git a/arch/arm/mach-rpc/include/mach/irqs.h b/arch/arm/mach-rpc/include/mach/irqs.h index 4ce6ca97f669..3d2037496e38 100644 --- a/arch/arm/mach-rpc/include/mach/irqs.h +++ b/arch/arm/mach-rpc/include/mach/irqs.h | |||
@@ -44,3 +44,4 @@ | |||
44 | 44 | ||
45 | #define IRQ_TIMER IRQ_TIMER0 | 45 | #define IRQ_TIMER IRQ_TIMER0 |
46 | 46 | ||
47 | #define NR_IRQS 128 | ||
diff --git a/arch/arm/mach-rpc/include/mach/dma.h b/arch/arm/mach-rpc/include/mach/isa-dma.h index 360b56f8f29f..bad720548587 100644 --- a/arch/arm/mach-rpc/include/mach/dma.h +++ b/arch/arm/mach-rpc/include/mach/isa-dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-rpc/include/mach/dma.h | 2 | * arch/arm/mach-rpc/include/mach/isa-dma.h |
3 | * | 3 | * |
4 | * Copyright (C) 1997 Russell King | 4 | * Copyright (C) 1997 Russell King |
5 | * | 5 | * |
@@ -10,12 +10,6 @@ | |||
10 | #ifndef __ASM_ARCH_DMA_H | 10 | #ifndef __ASM_ARCH_DMA_H |
11 | #define __ASM_ARCH_DMA_H | 11 | #define __ASM_ARCH_DMA_H |
12 | 12 | ||
13 | /* | ||
14 | * This is the maximum DMA address that can be DMAd to. | ||
15 | * There should not be more than (0xd0000000 - 0xc0000000) | ||
16 | * bytes of RAM. | ||
17 | */ | ||
18 | #define MAX_DMA_ADDRESS 0xd0000000 | ||
19 | #define MAX_DMA_CHANNELS 8 | 13 | #define MAX_DMA_CHANNELS 8 |
20 | 14 | ||
21 | #define DMA_0 0 | 15 | #define DMA_0 0 |
diff --git a/arch/arm/mach-rpc/include/mach/memory.h b/arch/arm/mach-rpc/include/mach/memory.h index 9bf7e43e2863..78191bf25192 100644 --- a/arch/arm/mach-rpc/include/mach/memory.h +++ b/arch/arm/mach-rpc/include/mach/memory.h | |||
@@ -24,13 +24,6 @@ | |||
24 | #define PHYS_OFFSET UL(0x10000000) | 24 | #define PHYS_OFFSET UL(0x10000000) |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * These are exactly the same on the RiscPC as the | ||
28 | * physical memory view. | ||
29 | */ | ||
30 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
31 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
32 | |||
33 | /* | ||
34 | * Cache flushing area - ROM | 27 | * Cache flushing area - ROM |
35 | */ | 28 | */ |
36 | #define FLUSH_BASE_PHYS 0x00000000 | 29 | #define FLUSH_BASE_PHYS 0x00000000 |
diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-s3c2400/include/mach/memory.h index 8f4878e4f591..cf5901ffd385 100644 --- a/arch/arm/mach-s3c2400/include/mach/memory.h +++ b/arch/arm/mach-s3c2400/include/mach/memory.h | |||
@@ -17,7 +17,4 @@ | |||
17 | 17 | ||
18 | #define PHYS_OFFSET UL(0x0C000000) | 18 | #define PHYS_OFFSET UL(0x0C000000) |
19 | 19 | ||
20 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
21 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
22 | |||
23 | #endif | 20 | #endif |
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index 99fdc736698c..63a30d1dd425 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -7,6 +7,7 @@ | |||
7 | config CPU_S3C2410 | 7 | config CPU_S3C2410 |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 |
10 | select CPU_ARM920T | ||
10 | select S3C2410_CLOCK | 11 | select S3C2410_CLOCK |
11 | select S3C2410_GPIO | 12 | select S3C2410_GPIO |
12 | select CPU_LLSERIAL_S3C2410 | 13 | select CPU_LLSERIAL_S3C2410 |
@@ -32,11 +33,6 @@ config S3C2410_GPIO | |||
32 | help | 33 | help |
33 | GPIO code for S3C2410 and similar processors | 34 | GPIO code for S3C2410 and similar processors |
34 | 35 | ||
35 | config S3C2410_CLOCK | ||
36 | bool | ||
37 | help | ||
38 | Clock code for the S3C2410, and similar processors | ||
39 | |||
40 | config SIMTEC_NOR | 36 | config SIMTEC_NOR |
41 | bool | 37 | bool |
42 | help | 38 | help |
@@ -84,6 +80,7 @@ config ARCH_BAST | |||
84 | select PM_SIMTEC if PM | 80 | select PM_SIMTEC if PM |
85 | select SIMTEC_NOR | 81 | select SIMTEC_NOR |
86 | select MACH_BAST_IDE | 82 | select MACH_BAST_IDE |
83 | select S3C24XX_DCLK | ||
87 | select ISA | 84 | select ISA |
88 | help | 85 | help |
89 | Say Y here if you are using the Simtec Electronics EB2410ITX | 86 | Say Y here if you are using the Simtec Electronics EB2410ITX |
@@ -121,6 +118,7 @@ config MACH_TCT_HAMMER | |||
121 | config MACH_VR1000 | 118 | config MACH_VR1000 |
122 | bool "Thorcom VR1000" | 119 | bool "Thorcom VR1000" |
123 | select PM_SIMTEC if PM | 120 | select PM_SIMTEC if PM |
121 | select S3C24XX_DCLK | ||
124 | select SIMTEC_NOR | 122 | select SIMTEC_NOR |
125 | select MACH_BAST_IDE | 123 | select MACH_BAST_IDE |
126 | select CPU_S3C2410 | 124 | select CPU_S3C2410 |
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index 00f31f8c4e78..fca02f82711c 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
@@ -15,7 +15,6 @@ obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o | |||
15 | obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o | 15 | obj-$(CONFIG_CPU_S3C2410_DMA) += dma.o |
16 | obj-$(CONFIG_S3C2410_PM) += pm.o sleep.o | 16 | obj-$(CONFIG_S3C2410_PM) += pm.o sleep.o |
17 | obj-$(CONFIG_S3C2410_GPIO) += gpio.o | 17 | obj-$(CONFIG_S3C2410_GPIO) += gpio.o |
18 | obj-$(CONFIG_S3C2410_CLOCK) += clock.o | ||
19 | 18 | ||
20 | # Machine support | 19 | # Machine support |
21 | 20 | ||
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index 7d914a470b6c..552b4c778fdc 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/sysdev.h> | 17 | #include <linux/sysdev.h> |
18 | #include <linux/serial_core.h> | 18 | #include <linux/serial_core.h> |
19 | 19 | ||
20 | #include <asm/dma.h> | ||
21 | #include <mach/dma.h> | 20 | #include <mach/dma.h> |
22 | 21 | ||
23 | #include <plat/cpu.h> | 22 | #include <plat/cpu.h> |
@@ -25,12 +24,12 @@ | |||
25 | 24 | ||
26 | #include <plat/regs-serial.h> | 25 | #include <plat/regs-serial.h> |
27 | #include <mach/regs-gpio.h> | 26 | #include <mach/regs-gpio.h> |
28 | #include <asm/plat-s3c/regs-ac97.h> | 27 | #include <plat/regs-ac97.h> |
29 | #include <mach/regs-mem.h> | 28 | #include <mach/regs-mem.h> |
30 | #include <mach/regs-lcd.h> | 29 | #include <mach/regs-lcd.h> |
31 | #include <mach/regs-sdi.h> | 30 | #include <mach/regs-sdi.h> |
32 | #include <asm/plat-s3c24xx/regs-iis.h> | 31 | #include <asm/plat-s3c24xx/regs-iis.h> |
33 | #include <asm/plat-s3c24xx/regs-spi.h> | 32 | #include <plat/regs-spi.h> |
34 | 33 | ||
35 | static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = { | 34 | static struct s3c24xx_dma_map __initdata s3c2410_dma_mappings[] = { |
36 | [DMACH_XD0] = { | 35 | [DMACH_XD0] = { |
diff --git a/arch/arm/mach-s3c2410/include/mach/dma.h b/arch/arm/mach-s3c2410/include/mach/dma.h index 891b53cd69b8..13358ce2128c 100644 --- a/arch/arm/mach-s3c2410/include/mach/dma.h +++ b/arch/arm/mach-s3c2410/include/mach/dma.h | |||
@@ -16,11 +16,6 @@ | |||
16 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
17 | #include <mach/hardware.h> | 17 | #include <mach/hardware.h> |
18 | 18 | ||
19 | /* | ||
20 | * This is the maximum DMA address(physical address) that can be DMAd to. | ||
21 | * | ||
22 | */ | ||
23 | #define MAX_DMA_ADDRESS 0x40000000 | ||
24 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ | 19 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ |
25 | 20 | ||
26 | /* We use `virtual` dma channels to hide the fact we have only a limited | 21 | /* We use `virtual` dma channels to hide the fact we have only a limited |
@@ -254,7 +249,7 @@ typedef unsigned long dma_device_t; | |||
254 | * request a dma channel exclusivley | 249 | * request a dma channel exclusivley |
255 | */ | 250 | */ |
256 | 251 | ||
257 | extern int s3c2410_dma_request(dmach_t channel, | 252 | extern int s3c2410_dma_request(unsigned int channel, |
258 | struct s3c2410_dma_client *, void *dev); | 253 | struct s3c2410_dma_client *, void *dev); |
259 | 254 | ||
260 | 255 | ||
@@ -263,14 +258,14 @@ extern int s3c2410_dma_request(dmach_t channel, | |||
263 | * change the state of the dma channel | 258 | * change the state of the dma channel |
264 | */ | 259 | */ |
265 | 260 | ||
266 | extern int s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op); | 261 | extern int s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op); |
267 | 262 | ||
268 | /* s3c2410_dma_setflags | 263 | /* s3c2410_dma_setflags |
269 | * | 264 | * |
270 | * set the channel's flags to a given state | 265 | * set the channel's flags to a given state |
271 | */ | 266 | */ |
272 | 267 | ||
273 | extern int s3c2410_dma_setflags(dmach_t channel, | 268 | extern int s3c2410_dma_setflags(unsigned int channel, |
274 | unsigned int flags); | 269 | unsigned int flags); |
275 | 270 | ||
276 | /* s3c2410_dma_free | 271 | /* s3c2410_dma_free |
@@ -278,7 +273,7 @@ extern int s3c2410_dma_setflags(dmach_t channel, | |||
278 | * free the dma channel (will also abort any outstanding operations) | 273 | * free the dma channel (will also abort any outstanding operations) |
279 | */ | 274 | */ |
280 | 275 | ||
281 | extern int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *); | 276 | extern int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *); |
282 | 277 | ||
283 | /* s3c2410_dma_enqueue | 278 | /* s3c2410_dma_enqueue |
284 | * | 279 | * |
@@ -287,7 +282,7 @@ extern int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *); | |||
287 | * drained before the buffer is given to the DMA system. | 282 | * drained before the buffer is given to the DMA system. |
288 | */ | 283 | */ |
289 | 284 | ||
290 | extern int s3c2410_dma_enqueue(dmach_t channel, void *id, | 285 | extern int s3c2410_dma_enqueue(unsigned int channel, void *id, |
291 | dma_addr_t data, int size); | 286 | dma_addr_t data, int size); |
292 | 287 | ||
293 | /* s3c2410_dma_config | 288 | /* s3c2410_dma_config |
@@ -295,7 +290,7 @@ extern int s3c2410_dma_enqueue(dmach_t channel, void *id, | |||
295 | * configure the dma channel | 290 | * configure the dma channel |
296 | */ | 291 | */ |
297 | 292 | ||
298 | extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon); | 293 | extern int s3c2410_dma_config(unsigned int channel, int xferunit, int dcon); |
299 | 294 | ||
300 | /* s3c2410_dma_devconfig | 295 | /* s3c2410_dma_devconfig |
301 | * | 296 | * |
@@ -310,11 +305,11 @@ extern int s3c2410_dma_devconfig(int channel, enum s3c2410_dmasrc source, | |||
310 | * get the position that the dma transfer is currently at | 305 | * get the position that the dma transfer is currently at |
311 | */ | 306 | */ |
312 | 307 | ||
313 | extern int s3c2410_dma_getposition(dmach_t channel, | 308 | extern int s3c2410_dma_getposition(unsigned int channel, |
314 | dma_addr_t *src, dma_addr_t *dest); | 309 | dma_addr_t *src, dma_addr_t *dest); |
315 | 310 | ||
316 | extern int s3c2410_dma_set_opfn(dmach_t, s3c2410_dma_opfn_t rtn); | 311 | extern int s3c2410_dma_set_opfn(unsigned int, s3c2410_dma_opfn_t rtn); |
317 | extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn); | 312 | extern int s3c2410_dma_set_buffdone_fn(unsigned int, s3c2410_dma_cbfn_t rtn); |
318 | 313 | ||
319 | /* DMA Register definitions */ | 314 | /* DMA Register definitions */ |
320 | 315 | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-core.h b/arch/arm/mach-s3c2410/include/mach/gpio-core.h new file mode 100644 index 000000000000..6c9fbb99ef14 --- /dev/null +++ b/arch/arm/mach-s3c2410/include/mach/gpio-core.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* arch/arm/mach-s3c24100/include/mach/gpio-core.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C2410 - GPIO core support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_GPIO_CORE_H | ||
16 | #define __ASM_ARCH_GPIO_CORE_H __FILE__ | ||
17 | |||
18 | #include <plat/gpio-core.h> | ||
19 | #include <mach/regs-gpio.h> | ||
20 | |||
21 | extern struct s3c_gpio_chip s3c24xx_gpios[]; | ||
22 | |||
23 | static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int pin) | ||
24 | { | ||
25 | struct s3c_gpio_chip *chip; | ||
26 | |||
27 | if (pin > S3C2410_GPG10) | ||
28 | return NULL; | ||
29 | |||
30 | chip = &s3c24xx_gpios[pin/32]; | ||
31 | return (S3C2410_GPIO_OFFSET(pin) > chip->chip.ngpio) ? chip : NULL; | ||
32 | } | ||
33 | |||
34 | #endif /* __ASM_ARCH_GPIO_CORE_H */ | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-s3c2410/include/mach/gpio.h index 3b52b86498a6..e0349af8a483 100644 --- a/arch/arm/mach-s3c2410/include/mach/gpio.h +++ b/arch/arm/mach-s3c2410/include/mach/gpio.h | |||
@@ -15,4 +15,10 @@ | |||
15 | #define gpio_set_value __gpio_set_value | 15 | #define gpio_set_value __gpio_set_value |
16 | #define gpio_cansleep __gpio_cansleep | 16 | #define gpio_cansleep __gpio_cansleep |
17 | 17 | ||
18 | /* some boards require extra gpio capacity to support external | ||
19 | * devices that need GPIO. | ||
20 | */ | ||
21 | |||
22 | #define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA) | ||
23 | |||
18 | #include <asm-generic/gpio.h> | 24 | #include <asm-generic/gpio.h> |
diff --git a/arch/arm/mach-s3c2410/include/mach/irqs.h b/arch/arm/mach-s3c2410/include/mach/irqs.h index 950c71bf1489..9565903d490b 100644 --- a/arch/arm/mach-s3c2410/include/mach/irqs.h +++ b/arch/arm/mach-s3c2410/include/mach/irqs.h | |||
@@ -134,6 +134,8 @@ | |||
134 | #define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */ | 134 | #define IRQ_S3C2443_HSMMC S3C2410_IRQ(20) /* IRQ_SDI */ |
135 | #define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */ | 135 | #define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */ |
136 | 136 | ||
137 | #define IRQ_HSMMC0 IRQ_S3C2443_HSMMC | ||
138 | |||
137 | #define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14) | 139 | #define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14) |
138 | #define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15) | 140 | #define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15) |
139 | #define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16) | 141 | #define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16) |
@@ -160,6 +162,12 @@ | |||
160 | #define NR_IRQS (IRQ_S3C2440_AC97+1) | 162 | #define NR_IRQS (IRQ_S3C2440_AC97+1) |
161 | #endif | 163 | #endif |
162 | 164 | ||
165 | /* compatibility define. */ | ||
166 | #define IRQ_UART3 IRQ_S3C2443_UART3 | ||
167 | #define IRQ_S3CUART_RX3 IRQ_S3C2443_RX3 | ||
168 | #define IRQ_S3CUART_TX3 IRQ_S3C2443_TX3 | ||
169 | #define IRQ_S3CUART_ERR3 IRQ_S3C2443_ERR3 | ||
170 | |||
163 | /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */ | 171 | /* Our FIQs are routable from IRQ_EINT0 to IRQ_ADCPARENT */ |
164 | #define FIQ_START IRQ_EINT0 | 172 | #define FIQ_START IRQ_EINT0 |
165 | 173 | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/map.h b/arch/arm/mach-s3c2410/include/mach/map.h index 23c470c2e5b1..255fdfeaf957 100644 --- a/arch/arm/mach-s3c2410/include/mach/map.h +++ b/arch/arm/mach-s3c2410/include/mach/map.h | |||
@@ -13,34 +13,20 @@ | |||
13 | #ifndef __ASM_ARCH_MAP_H | 13 | #ifndef __ASM_ARCH_MAP_H |
14 | #define __ASM_ARCH_MAP_H | 14 | #define __ASM_ARCH_MAP_H |
15 | 15 | ||
16 | #include <plat/map-base.h> | ||
16 | #include <plat/map.h> | 17 | #include <plat/map.h> |
17 | 18 | ||
18 | #define S3C2410_ADDR(x) S3C_ADDR(x) | 19 | #define S3C2410_ADDR(x) S3C_ADDR(x) |
19 | 20 | ||
20 | /* interrupt controller is the first thing we put in, to make | ||
21 | * the assembly code for the irq detection easier | ||
22 | */ | ||
23 | #define S3C24XX_VA_IRQ S3C_VA_IRQ | ||
24 | #define S3C2410_PA_IRQ (0x4A000000) | ||
25 | #define S3C24XX_SZ_IRQ SZ_1M | ||
26 | |||
27 | /* memory controller registers */ | ||
28 | #define S3C24XX_VA_MEMCTRL S3C_VA_MEM | ||
29 | #define S3C2410_PA_MEMCTRL (0x48000000) | ||
30 | #define S3C24XX_SZ_MEMCTRL SZ_1M | ||
31 | |||
32 | /* USB host controller */ | 21 | /* USB host controller */ |
33 | #define S3C2410_PA_USBHOST (0x49000000) | 22 | #define S3C2410_PA_USBHOST (0x49000000) |
34 | #define S3C24XX_SZ_USBHOST SZ_1M | ||
35 | 23 | ||
36 | /* DMA controller */ | 24 | /* DMA controller */ |
37 | #define S3C2410_PA_DMA (0x4B000000) | 25 | #define S3C2410_PA_DMA (0x4B000000) |
38 | #define S3C24XX_SZ_DMA SZ_1M | 26 | #define S3C24XX_SZ_DMA SZ_1M |
39 | 27 | ||
40 | /* Clock and Power management */ | 28 | /* Clock and Power management */ |
41 | #define S3C24XX_VA_CLKPWR S3C_VA_SYS | ||
42 | #define S3C2410_PA_CLKPWR (0x4C000000) | 29 | #define S3C2410_PA_CLKPWR (0x4C000000) |
43 | #define S3C24XX_SZ_CLKPWR SZ_1M | ||
44 | 30 | ||
45 | /* LCD controller */ | 31 | /* LCD controller */ |
46 | #define S3C2410_PA_LCD (0x4D000000) | 32 | #define S3C2410_PA_LCD (0x4D000000) |
@@ -48,48 +34,12 @@ | |||
48 | 34 | ||
49 | /* NAND flash controller */ | 35 | /* NAND flash controller */ |
50 | #define S3C2410_PA_NAND (0x4E000000) | 36 | #define S3C2410_PA_NAND (0x4E000000) |
51 | #define S3C24XX_SZ_NAND SZ_1M | ||
52 | |||
53 | /* UARTs */ | ||
54 | #define S3C24XX_VA_UART S3C_VA_UART | ||
55 | #define S3C2410_PA_UART (0x50000000) | ||
56 | #define S3C24XX_SZ_UART SZ_1M | ||
57 | |||
58 | /* Timers */ | ||
59 | #define S3C24XX_VA_TIMER S3C_VA_TIMER | ||
60 | #define S3C2410_PA_TIMER (0x51000000) | ||
61 | #define S3C24XX_SZ_TIMER SZ_1M | ||
62 | |||
63 | /* USB Device port */ | ||
64 | #define S3C2410_PA_USBDEV (0x52000000) | ||
65 | #define S3C24XX_SZ_USBDEV SZ_1M | ||
66 | |||
67 | /* Watchdog */ | ||
68 | #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG | ||
69 | #define S3C2410_PA_WATCHDOG (0x53000000) | ||
70 | #define S3C24XX_SZ_WATCHDOG SZ_1M | ||
71 | 37 | ||
72 | /* IIC hardware controller */ | 38 | /* IIC hardware controller */ |
73 | #define S3C2410_PA_IIC (0x54000000) | 39 | #define S3C2410_PA_IIC (0x54000000) |
74 | #define S3C24XX_SZ_IIC SZ_1M | ||
75 | 40 | ||
76 | /* IIS controller */ | 41 | /* IIS controller */ |
77 | #define S3C2410_PA_IIS (0x55000000) | 42 | #define S3C2410_PA_IIS (0x55000000) |
78 | #define S3C24XX_SZ_IIS SZ_1M | ||
79 | |||
80 | /* GPIO ports */ | ||
81 | |||
82 | /* the calculation for the VA of this must ensure that | ||
83 | * it is the same distance apart from the UART in the | ||
84 | * phsyical address space, as the initial mapping for the IO | ||
85 | * is done as a 1:1 maping. This puts it (currently) at | ||
86 | * 0xFA800000, which is not in the way of any current mapping | ||
87 | * by the base system. | ||
88 | */ | ||
89 | |||
90 | #define S3C2410_PA_GPIO (0x56000000) | ||
91 | #define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) | ||
92 | #define S3C24XX_SZ_GPIO SZ_1M | ||
93 | 43 | ||
94 | /* RTC */ | 44 | /* RTC */ |
95 | #define S3C2410_PA_RTC (0x57000000) | 45 | #define S3C2410_PA_RTC (0x57000000) |
@@ -97,15 +47,12 @@ | |||
97 | 47 | ||
98 | /* ADC */ | 48 | /* ADC */ |
99 | #define S3C2410_PA_ADC (0x58000000) | 49 | #define S3C2410_PA_ADC (0x58000000) |
100 | #define S3C24XX_SZ_ADC SZ_1M | ||
101 | 50 | ||
102 | /* SPI */ | 51 | /* SPI */ |
103 | #define S3C2410_PA_SPI (0x59000000) | 52 | #define S3C2410_PA_SPI (0x59000000) |
104 | #define S3C24XX_SZ_SPI SZ_1M | ||
105 | 53 | ||
106 | /* SDI */ | 54 | /* SDI */ |
107 | #define S3C2410_PA_SDI (0x5A000000) | 55 | #define S3C2410_PA_SDI (0x5A000000) |
108 | #define S3C24XX_SZ_SDI SZ_1M | ||
109 | 56 | ||
110 | /* CAMIF */ | 57 | /* CAMIF */ |
111 | #define S3C2440_PA_CAMIF (0x4F000000) | 58 | #define S3C2440_PA_CAMIF (0x4F000000) |
@@ -120,13 +67,6 @@ | |||
120 | #define S3C2443_PA_HSMMC (0x4A800000) | 67 | #define S3C2443_PA_HSMMC (0x4A800000) |
121 | #define S3C2443_SZ_HSMMC (256) | 68 | #define S3C2443_SZ_HSMMC (256) |
122 | 69 | ||
123 | /* ISA style IO, for each machine to sort out mappings for, if it | ||
124 | * implements it. We reserve two 16M regions for ISA. | ||
125 | */ | ||
126 | |||
127 | #define S3C24XX_VA_ISA_WORD S3C2410_ADDR(0x02000000) | ||
128 | #define S3C24XX_VA_ISA_BYTE S3C2410_ADDR(0x03000000) | ||
129 | |||
130 | /* physical addresses of all the chip-select areas */ | 70 | /* physical addresses of all the chip-select areas */ |
131 | 71 | ||
132 | #define S3C2410_CS0 (0x00000000) | 72 | #define S3C2410_CS0 (0x00000000) |
@@ -152,27 +92,16 @@ | |||
152 | #define S3C24XX_PA_TIMER S3C2410_PA_TIMER | 92 | #define S3C24XX_PA_TIMER S3C2410_PA_TIMER |
153 | #define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV | 93 | #define S3C24XX_PA_USBDEV S3C2410_PA_USBDEV |
154 | #define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG | 94 | #define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG |
155 | #define S3C24XX_PA_IIC S3C2410_PA_IIC | ||
156 | #define S3C24XX_PA_IIS S3C2410_PA_IIS | 95 | #define S3C24XX_PA_IIS S3C2410_PA_IIS |
157 | #define S3C24XX_PA_GPIO S3C2410_PA_GPIO | 96 | #define S3C24XX_PA_GPIO S3C2410_PA_GPIO |
158 | #define S3C24XX_PA_RTC S3C2410_PA_RTC | 97 | #define S3C24XX_PA_RTC S3C2410_PA_RTC |
159 | #define S3C24XX_PA_ADC S3C2410_PA_ADC | 98 | #define S3C24XX_PA_ADC S3C2410_PA_ADC |
160 | #define S3C24XX_PA_SPI S3C2410_PA_SPI | 99 | #define S3C24XX_PA_SPI S3C2410_PA_SPI |
100 | #define S3C24XX_PA_SDI S3C2410_PA_SDI | ||
101 | #define S3C24XX_PA_NAND S3C2410_PA_NAND | ||
161 | 102 | ||
162 | /* deal with the registers that move under the 2412/2413 */ | 103 | #define S3C_PA_IIC S3C2410_PA_IIC |
163 | 104 | #define S3C_PA_UART S3C24XX_PA_UART | |
164 | #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) | 105 | #define S3C_PA_HSMMC0 S3C2443_PA_HSMMC |
165 | #ifndef __ASSEMBLY__ | ||
166 | extern void __iomem *s3c24xx_va_gpio2; | ||
167 | #endif | ||
168 | #ifdef CONFIG_CPU_S3C2412_ONLY | ||
169 | #define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10) | ||
170 | #else | ||
171 | #define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2 | ||
172 | #endif | ||
173 | #else | ||
174 | #define s3c24xx_va_gpio2 S3C24XX_VA_GPIO | ||
175 | #define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO | ||
176 | #endif | ||
177 | 106 | ||
178 | #endif /* __ASM_ARCH_MAP_H */ | 107 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-s3c2410/include/mach/memory.h index 93782628a786..6f1e5871ae4b 100644 --- a/arch/arm/mach-s3c2410/include/mach/memory.h +++ b/arch/arm/mach-s3c2410/include/mach/memory.h | |||
@@ -13,7 +13,4 @@ | |||
13 | 13 | ||
14 | #define PHYS_OFFSET UL(0x30000000) | 14 | #define PHYS_OFFSET UL(0x30000000) |
15 | 15 | ||
16 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
17 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
18 | |||
19 | #endif | 16 | #endif |
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-clock.h b/arch/arm/mach-s3c2410/include/mach/regs-clock.h index b3f90aa78076..2a5d90e957fb 100644 --- a/arch/arm/mach-s3c2410/include/mach/regs-clock.h +++ b/arch/arm/mach-s3c2410/include/mach/regs-clock.h | |||
@@ -42,13 +42,6 @@ | |||
42 | #define S3C2410_CLKCON_IIS (1<<17) | 42 | #define S3C2410_CLKCON_IIS (1<<17) |
43 | #define S3C2410_CLKCON_SPI (1<<18) | 43 | #define S3C2410_CLKCON_SPI (1<<18) |
44 | 44 | ||
45 | #define S3C2410_PLLCON_MDIVSHIFT 12 | ||
46 | #define S3C2410_PLLCON_PDIVSHIFT 4 | ||
47 | #define S3C2410_PLLCON_SDIVSHIFT 0 | ||
48 | #define S3C2410_PLLCON_MDIVMASK ((1<<(1+(19-12)))-1) | ||
49 | #define S3C2410_PLLCON_PDIVMASK ((1<<5)-1) | ||
50 | #define S3C2410_PLLCON_SDIVMASK 3 | ||
51 | |||
52 | /* DCLKCON register addresses in gpio.h */ | 45 | /* DCLKCON register addresses in gpio.h */ |
53 | 46 | ||
54 | #define S3C2410_DCLKCON_DCLK0EN (1<<0) | 47 | #define S3C2410_DCLKCON_DCLK0EN (1<<0) |
@@ -76,32 +69,6 @@ | |||
76 | #define S3C2410_CLKSLOW_SLOWVAL(x) (x) | 69 | #define S3C2410_CLKSLOW_SLOWVAL(x) (x) |
77 | #define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7) | 70 | #define S3C2410_CLKSLOW_GET_SLOWVAL(x) ((x) & 7) |
78 | 71 | ||
79 | #ifndef __ASSEMBLY__ | ||
80 | |||
81 | #include <asm/div64.h> | ||
82 | |||
83 | static inline unsigned int | ||
84 | s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | ||
85 | { | ||
86 | unsigned int mdiv, pdiv, sdiv; | ||
87 | uint64_t fvco; | ||
88 | |||
89 | mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT; | ||
90 | pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT; | ||
91 | sdiv = pllval >> S3C2410_PLLCON_SDIVSHIFT; | ||
92 | |||
93 | mdiv &= S3C2410_PLLCON_MDIVMASK; | ||
94 | pdiv &= S3C2410_PLLCON_PDIVMASK; | ||
95 | sdiv &= S3C2410_PLLCON_SDIVMASK; | ||
96 | |||
97 | fvco = (uint64_t)baseclk * (mdiv + 8); | ||
98 | do_div(fvco, (pdiv + 2) << sdiv); | ||
99 | |||
100 | return (unsigned int)fvco; | ||
101 | } | ||
102 | |||
103 | #endif /* __ASSEMBLY__ */ | ||
104 | |||
105 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) | 72 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) |
106 | 73 | ||
107 | /* extra registers */ | 74 | /* extra registers */ |
diff --git a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h index 528080ceac44..321077613067 100644 --- a/arch/arm/mach-s3c2410/include/mach/regs-gpio.h +++ b/arch/arm/mach-s3c2410/include/mach/regs-gpio.h | |||
@@ -1053,13 +1053,6 @@ | |||
1053 | #define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C) | 1053 | #define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C) |
1054 | #define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90) | 1054 | #define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90) |
1055 | 1055 | ||
1056 | /* values for S3C2410_EXTINT0/1/2 */ | ||
1057 | #define S3C2410_EXTINT_LOWLEV (0x00) | ||
1058 | #define S3C2410_EXTINT_HILEV (0x01) | ||
1059 | #define S3C2410_EXTINT_FALLEDGE (0x02) | ||
1060 | #define S3C2410_EXTINT_RISEEDGE (0x04) | ||
1061 | #define S3C2410_EXTINT_BOTHEDGE (0x06) | ||
1062 | |||
1063 | /* interrupt filtering conrrol for EINT16..EINT23 */ | 1056 | /* interrupt filtering conrrol for EINT16..EINT23 */ |
1064 | #define S3C2410_EINFLT0 S3C2410_GPIOREG(0x94) | 1057 | #define S3C2410_EINFLT0 S3C2410_GPIOREG(0x94) |
1065 | #define S3C2410_EINFLT1 S3C2410_GPIOREG(0x98) | 1058 | #define S3C2410_EINFLT1 S3C2410_GPIOREG(0x98) |
diff --git a/arch/arm/mach-s3c2410/include/mach/spi.h b/arch/arm/mach-s3c2410/include/mach/spi.h index 46d46f5b99f2..774f3adfe8ad 100644 --- a/arch/arm/mach-s3c2410/include/mach/spi.h +++ b/arch/arm/mach-s3c2410/include/mach/spi.h | |||
@@ -22,5 +22,12 @@ struct s3c2410_spi_info { | |||
22 | void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol); | 22 | void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol); |
23 | }; | 23 | }; |
24 | 24 | ||
25 | /* Standard setup / suspend routines for SPI GPIO pins. */ | ||
26 | |||
27 | extern void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi, | ||
28 | int enable); | ||
29 | |||
30 | extern void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi, | ||
31 | int enable); | ||
25 | 32 | ||
26 | #endif /* __ASM_ARCH_SPI_H */ | 33 | #endif /* __ASM_ARCH_SPI_H */ |
diff --git a/arch/arm/mach-s3c2410/include/mach/system-reset.h b/arch/arm/mach-s3c2410/include/mach/system-reset.h index 43535a0e7186..7613d0a384ba 100644 --- a/arch/arm/mach-s3c2410/include/mach/system-reset.h +++ b/arch/arm/mach-s3c2410/include/mach/system-reset.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <mach/hardware.h> | 13 | #include <mach/hardware.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | 15 | ||
16 | #include <asm/plat-s3c/regs-watchdog.h> | 16 | #include <plat/regs-watchdog.h> |
17 | #include <mach/regs-clock.h> | 17 | #include <mach/regs-clock.h> |
18 | 18 | ||
19 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
diff --git a/arch/arm/mach-s3c2410/include/mach/tick.h b/arch/arm/mach-s3c2410/include/mach/tick.h new file mode 100644 index 000000000000..544da41979db --- /dev/null +++ b/arch/arm/mach-s3c2410/include/mach/tick.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/include/mach/tick.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C2410 - timer tick support | ||
8 | */ | ||
9 | |||
10 | #define SRCPND_TIMER4 (1<<(IRQ_TIMER4 - IRQ_EINT0)) | ||
11 | |||
12 | static inline int s3c24xx_ostimer_pending(void) | ||
13 | { | ||
14 | return __raw_readl(S3C2410_SRCPND) & SRCPND_TIMER4; | ||
15 | } | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/uncompress.h b/arch/arm/mach-s3c2410/include/mach/uncompress.h index ab39491beee2..c9432103750d 100644 --- a/arch/arm/mach-s3c2410/include/mach/uncompress.h +++ b/arch/arm/mach-s3c2410/include/mach/uncompress.h | |||
@@ -1,3 +1,4 @@ | |||
1 | |||
1 | /* arch/arm/mach-s3c2410/include/mach/uncompress.h | 2 | /* arch/arm/mach-s3c2410/include/mach/uncompress.h |
2 | * | 3 | * |
3 | * Copyright (c) 2003, 2007 Simtec Electronics | 4 | * Copyright (c) 2003, 2007 Simtec Electronics |
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c index d061fea01900..6d6995afeb43 100644 --- a/arch/arm/mach-s3c2410/mach-amlm5900.c +++ b/arch/arm/mach-s3c2410/mach-amlm5900.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <mach/regs-lcd.h> | 52 | #include <mach/regs-lcd.h> |
53 | #include <mach/regs-gpio.h> | 53 | #include <mach/regs-gpio.h> |
54 | 54 | ||
55 | #include <plat/iic.h> | ||
55 | #include <plat/devs.h> | 56 | #include <plat/devs.h> |
56 | #include <plat/cpu.h> | 57 | #include <plat/cpu.h> |
57 | 58 | ||
@@ -150,7 +151,7 @@ static struct platform_device *amlm5900_devices[] __initdata = { | |||
150 | #endif | 151 | #endif |
151 | &s3c_device_adc, | 152 | &s3c_device_adc, |
152 | &s3c_device_wdt, | 153 | &s3c_device_wdt, |
153 | &s3c_device_i2c, | 154 | &s3c_device_i2c0, |
154 | &s3c_device_usb, | 155 | &s3c_device_usb, |
155 | &s3c_device_rtc, | 156 | &s3c_device_rtc, |
156 | &s3c_device_usbgadget, | 157 | &s3c_device_usbgadget, |
@@ -233,6 +234,7 @@ static void __init amlm5900_init(void) | |||
233 | #ifdef CONFIG_FB_S3C2410 | 234 | #ifdef CONFIG_FB_S3C2410 |
234 | s3c24xx_fb_set_platdata(&amlm5900_fb_info); | 235 | s3c24xx_fb_set_platdata(&amlm5900_fb_info); |
235 | #endif | 236 | #endif |
237 | s3c_i2c0_set_platdata(NULL); | ||
236 | platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices)); | 238 | platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices)); |
237 | } | 239 | } |
238 | 240 | ||
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index 8db9c700e3c2..01bd76725b92 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -44,8 +44,8 @@ | |||
44 | #include <mach/regs-mem.h> | 44 | #include <mach/regs-mem.h> |
45 | #include <mach/regs-lcd.h> | 45 | #include <mach/regs-lcd.h> |
46 | 46 | ||
47 | #include <asm/plat-s3c/nand.h> | 47 | #include <plat/nand.h> |
48 | #include <asm/plat-s3c/iic.h> | 48 | #include <plat/iic.h> |
49 | #include <mach/fb.h> | 49 | #include <mach/fb.h> |
50 | 50 | ||
51 | #include <linux/mtd/mtd.h> | 51 | #include <linux/mtd/mtd.h> |
@@ -406,7 +406,7 @@ static struct platform_device bast_sio = { | |||
406 | * standard 100KHz i2c bus frequency | 406 | * standard 100KHz i2c bus frequency |
407 | */ | 407 | */ |
408 | 408 | ||
409 | static struct s3c2410_platform_i2c bast_i2c_info = { | 409 | static struct s3c2410_platform_i2c __initdata bast_i2c_info = { |
410 | .flags = 0, | 410 | .flags = 0, |
411 | .slave_addr = 0x10, | 411 | .slave_addr = 0x10, |
412 | .bus_freq = 100*1000, | 412 | .bus_freq = 100*1000, |
@@ -553,7 +553,7 @@ static struct platform_device *bast_devices[] __initdata = { | |||
553 | &s3c_device_usb, | 553 | &s3c_device_usb, |
554 | &s3c_device_lcd, | 554 | &s3c_device_lcd, |
555 | &s3c_device_wdt, | 555 | &s3c_device_wdt, |
556 | &s3c_device_i2c, | 556 | &s3c_device_i2c0, |
557 | &s3c_device_rtc, | 557 | &s3c_device_rtc, |
558 | &s3c_device_nand, | 558 | &s3c_device_nand, |
559 | &bast_device_dm9k, | 559 | &bast_device_dm9k, |
@@ -588,7 +588,8 @@ static void __init bast_map_io(void) | |||
588 | s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); | 588 | s3c24xx_register_clocks(bast_clocks, ARRAY_SIZE(bast_clocks)); |
589 | 589 | ||
590 | s3c_device_nand.dev.platform_data = &bast_nand_info; | 590 | s3c_device_nand.dev.platform_data = &bast_nand_info; |
591 | s3c_device_i2c.dev.platform_data = &bast_i2c_info; | 591 | |
592 | s3c_i2c0_set_platdata(&bast_i2c_info); | ||
592 | 593 | ||
593 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); | 594 | s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc)); |
594 | s3c24xx_init_clocks(0); | 595 | s3c24xx_init_clocks(0); |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 98716d0108e9..821a1668c3ac 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -38,11 +38,13 @@ | |||
38 | #include <mach/h1940.h> | 38 | #include <mach/h1940.h> |
39 | #include <mach/h1940-latch.h> | 39 | #include <mach/h1940-latch.h> |
40 | #include <mach/fb.h> | 40 | #include <mach/fb.h> |
41 | #include <asm/plat-s3c24xx/udc.h> | 41 | #include <plat/udc.h> |
42 | #include <plat/iic.h> | ||
42 | 43 | ||
43 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
44 | #include <plat/devs.h> | 45 | #include <plat/devs.h> |
45 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
47 | #include <plat/pll.h> | ||
46 | #include <plat/pm.h> | 48 | #include <plat/pm.h> |
47 | 49 | ||
48 | static struct map_desc h1940_iodesc[] __initdata = { | 50 | static struct map_desc h1940_iodesc[] __initdata = { |
@@ -183,7 +185,7 @@ static struct platform_device *h1940_devices[] __initdata = { | |||
183 | &s3c_device_usb, | 185 | &s3c_device_usb, |
184 | &s3c_device_lcd, | 186 | &s3c_device_lcd, |
185 | &s3c_device_wdt, | 187 | &s3c_device_wdt, |
186 | &s3c_device_i2c, | 188 | &s3c_device_i2c0, |
187 | &s3c_device_iis, | 189 | &s3c_device_iis, |
188 | &s3c_device_usbgadget, | 190 | &s3c_device_usbgadget, |
189 | &s3c_device_leds, | 191 | &s3c_device_leds, |
@@ -215,6 +217,7 @@ static void __init h1940_init(void) | |||
215 | 217 | ||
216 | s3c24xx_fb_set_platdata(&h1940_fb_info); | 218 | s3c24xx_fb_set_platdata(&h1940_fb_info); |
217 | s3c24xx_udc_set_platdata(&h1940_udc_cfg); | 219 | s3c24xx_udc_set_platdata(&h1940_udc_cfg); |
220 | s3c_i2c0_set_platdata(NULL); | ||
218 | 221 | ||
219 | /* Turn off suspend on both USB ports, and switch the | 222 | /* Turn off suspend on both USB ports, and switch the |
220 | * selectable USB port to USB device mode. */ | 223 | * selectable USB port to USB device mode. */ |
@@ -223,10 +226,9 @@ static void __init h1940_init(void) | |||
223 | S3C2410_MISCCR_USBSUSPND0 | | 226 | S3C2410_MISCCR_USBSUSPND0 | |
224 | S3C2410_MISCCR_USBSUSPND1, 0x0); | 227 | S3C2410_MISCCR_USBSUSPND1, 0x0); |
225 | 228 | ||
226 | tmp = ( | 229 | tmp = (0x78 << S3C24XX_PLLCON_MDIVSHIFT) |
227 | 0x78 << S3C2410_PLLCON_MDIVSHIFT) | 230 | | (0x02 << S3C24XX_PLLCON_PDIVSHIFT) |
228 | | (0x02 << S3C2410_PLLCON_PDIVSHIFT) | 231 | | (0x03 << S3C24XX_PLLCON_SDIVSHIFT); |
229 | | (0x03 << S3C2410_PLLCON_SDIVSHIFT); | ||
230 | writel(tmp, S3C2410_UPLLCON); | 232 | writel(tmp, S3C2410_UPLLCON); |
231 | 233 | ||
232 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); | 234 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); |
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c index 82505517846c..05a5e877b49b 100644 --- a/arch/arm/mach-s3c2410/mach-n30.c +++ b/arch/arm/mach-s3c2410/mach-n30.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | 19 | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/gpio_keys.h> | 20 | #include <linux/gpio_keys.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/input.h> | 22 | #include <linux/input.h> |
@@ -40,14 +39,14 @@ | |||
40 | #include <asm/mach/irq.h> | 39 | #include <asm/mach/irq.h> |
41 | #include <asm/mach/map.h> | 40 | #include <asm/mach/map.h> |
42 | 41 | ||
43 | #include <asm/plat-s3c/iic.h> | 42 | #include <plat/iic.h> |
44 | #include <plat/regs-serial.h> | 43 | #include <plat/regs-serial.h> |
45 | 44 | ||
46 | #include <plat/clock.h> | 45 | #include <plat/clock.h> |
47 | #include <plat/cpu.h> | 46 | #include <plat/cpu.h> |
48 | #include <plat/devs.h> | 47 | #include <plat/devs.h> |
49 | #include <plat/s3c2410.h> | 48 | #include <plat/s3c2410.h> |
50 | #include <asm/plat-s3c24xx/udc.h> | 49 | #include <plat/udc.h> |
51 | 50 | ||
52 | static struct map_desc n30_iodesc[] __initdata = { | 51 | static struct map_desc n30_iodesc[] __initdata = { |
53 | /* nothing here yet */ | 52 | /* nothing here yet */ |
@@ -320,7 +319,7 @@ static struct s3c2410fb_mach_info n30_fb_info __initdata = { | |||
320 | static struct platform_device *n30_devices[] __initdata = { | 319 | static struct platform_device *n30_devices[] __initdata = { |
321 | &s3c_device_lcd, | 320 | &s3c_device_lcd, |
322 | &s3c_device_wdt, | 321 | &s3c_device_wdt, |
323 | &s3c_device_i2c, | 322 | &s3c_device_i2c0, |
324 | &s3c_device_iis, | 323 | &s3c_device_iis, |
325 | &s3c_device_usb, | 324 | &s3c_device_usb, |
326 | &s3c_device_usbgadget, | 325 | &s3c_device_usbgadget, |
@@ -332,7 +331,7 @@ static struct platform_device *n30_devices[] __initdata = { | |||
332 | static struct platform_device *n35_devices[] __initdata = { | 331 | static struct platform_device *n35_devices[] __initdata = { |
333 | &s3c_device_lcd, | 332 | &s3c_device_lcd, |
334 | &s3c_device_wdt, | 333 | &s3c_device_wdt, |
335 | &s3c_device_i2c, | 334 | &s3c_device_i2c0, |
336 | &s3c_device_iis, | 335 | &s3c_device_iis, |
337 | &s3c_device_usbgadget, | 336 | &s3c_device_usbgadget, |
338 | &n35_button_device, | 337 | &n35_button_device, |
@@ -501,7 +500,7 @@ static void __init n30_init_irq(void) | |||
501 | static void __init n30_init(void) | 500 | static void __init n30_init(void) |
502 | { | 501 | { |
503 | s3c24xx_fb_set_platdata(&n30_fb_info); | 502 | s3c24xx_fb_set_platdata(&n30_fb_info); |
504 | s3c_device_i2c.dev.platform_data = &n30_i2ccfg; | 503 | s3c_device_i2c0.dev.platform_data = &n30_i2ccfg; |
505 | s3c24xx_udc_set_platdata(&n30_udc_cfg); | 504 | s3c24xx_udc_set_platdata(&n30_udc_cfg); |
506 | 505 | ||
507 | /* Turn off suspend on both USB ports, and switch the | 506 | /* Turn off suspend on both USB ports, and switch the |
diff --git a/arch/arm/mach-s3c2410/mach-otom.c b/arch/arm/mach-s3c2410/mach-otom.c index d8255cf87e44..f6c7261a4a12 100644 --- a/arch/arm/mach-s3c2410/mach-otom.c +++ b/arch/arm/mach-s3c2410/mach-otom.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <plat/s3c2410.h> | 35 | #include <plat/s3c2410.h> |
36 | #include <plat/clock.h> | 36 | #include <plat/clock.h> |
37 | #include <plat/devs.h> | 37 | #include <plat/devs.h> |
38 | #include <plat/iic.h> | ||
38 | #include <plat/cpu.h> | 39 | #include <plat/cpu.h> |
39 | 40 | ||
40 | static struct map_desc otom11_iodesc[] __initdata = { | 41 | static struct map_desc otom11_iodesc[] __initdata = { |
@@ -94,7 +95,7 @@ static struct platform_device *otom11_devices[] __initdata = { | |||
94 | &s3c_device_usb, | 95 | &s3c_device_usb, |
95 | &s3c_device_lcd, | 96 | &s3c_device_lcd, |
96 | &s3c_device_wdt, | 97 | &s3c_device_wdt, |
97 | &s3c_device_i2c, | 98 | &s3c_device_i2c0, |
98 | &s3c_device_iis, | 99 | &s3c_device_iis, |
99 | &s3c_device_rtc, | 100 | &s3c_device_rtc, |
100 | &otom_device_nor, | 101 | &otom_device_nor, |
@@ -109,6 +110,7 @@ static void __init otom11_map_io(void) | |||
109 | 110 | ||
110 | static void __init otom11_init(void) | 111 | static void __init otom11_init(void) |
111 | { | 112 | { |
113 | s3c_i2c0_set_platdata(NULL); | ||
112 | platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices)); | 114 | platform_add_devices(otom11_devices, ARRAY_SIZE(otom11_devices)); |
113 | } | 115 | } |
114 | 116 | ||
diff --git a/arch/arm/mach-s3c2410/mach-qt2410.c b/arch/arm/mach-s3c2410/mach-qt2410.c index 661807e14e8a..9678a53ceeb1 100644 --- a/arch/arm/mach-s3c2410/mach-qt2410.c +++ b/arch/arm/mach-s3c2410/mach-qt2410.c | |||
@@ -50,10 +50,11 @@ | |||
50 | #include <mach/leds-gpio.h> | 50 | #include <mach/leds-gpio.h> |
51 | #include <plat/regs-serial.h> | 51 | #include <plat/regs-serial.h> |
52 | #include <mach/fb.h> | 52 | #include <mach/fb.h> |
53 | #include <asm/plat-s3c/nand.h> | 53 | #include <plat/nand.h> |
54 | #include <asm/plat-s3c24xx/udc.h> | 54 | #include <plat/udc.h> |
55 | #include <mach/spi.h> | 55 | #include <mach/spi.h> |
56 | #include <mach/spi-gpio.h> | 56 | #include <mach/spi-gpio.h> |
57 | #include <plat/iic.h> | ||
57 | 58 | ||
58 | #include <plat/common-smdk.h> | 59 | #include <plat/common-smdk.h> |
59 | #include <plat/devs.h> | 60 | #include <plat/devs.h> |
@@ -247,7 +248,7 @@ static struct platform_device *qt2410_devices[] __initdata = { | |||
247 | &s3c_device_usb, | 248 | &s3c_device_usb, |
248 | &s3c_device_lcd, | 249 | &s3c_device_lcd, |
249 | &s3c_device_wdt, | 250 | &s3c_device_wdt, |
250 | &s3c_device_i2c, | 251 | &s3c_device_i2c0, |
251 | &s3c_device_iis, | 252 | &s3c_device_iis, |
252 | &s3c_device_sdi, | 253 | &s3c_device_sdi, |
253 | &s3c_device_usbgadget, | 254 | &s3c_device_usbgadget, |
@@ -349,6 +350,7 @@ static void __init qt2410_machine_init(void) | |||
349 | s3c2410_gpio_setpin(S3C2410_GPB0, 1); | 350 | s3c2410_gpio_setpin(S3C2410_GPB0, 1); |
350 | 351 | ||
351 | s3c24xx_udc_set_platdata(&qt2410_udc_cfg); | 352 | s3c24xx_udc_set_platdata(&qt2410_udc_cfg); |
353 | s3c_i2c0_set_platdata(NULL); | ||
352 | 354 | ||
353 | s3c2410_gpio_cfgpin(S3C2410_GPB5, S3C2410_GPIO_OUTPUT); | 355 | s3c2410_gpio_cfgpin(S3C2410_GPB5, S3C2410_GPIO_OUTPUT); |
354 | 356 | ||
diff --git a/arch/arm/mach-s3c2410/mach-smdk2410.c b/arch/arm/mach-s3c2410/mach-smdk2410.c index 152527bb2872..c49126ccb1d5 100644 --- a/arch/arm/mach-s3c2410/mach-smdk2410.c +++ b/arch/arm/mach-s3c2410/mach-smdk2410.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <asm/mach-types.h> | 47 | #include <asm/mach-types.h> |
48 | 48 | ||
49 | #include <plat/regs-serial.h> | 49 | #include <plat/regs-serial.h> |
50 | #include <plat/iic.h> | ||
50 | 51 | ||
51 | #include <plat/devs.h> | 52 | #include <plat/devs.h> |
52 | #include <plat/cpu.h> | 53 | #include <plat/cpu.h> |
@@ -89,7 +90,7 @@ static struct platform_device *smdk2410_devices[] __initdata = { | |||
89 | &s3c_device_usb, | 90 | &s3c_device_usb, |
90 | &s3c_device_lcd, | 91 | &s3c_device_lcd, |
91 | &s3c_device_wdt, | 92 | &s3c_device_wdt, |
92 | &s3c_device_i2c, | 93 | &s3c_device_i2c0, |
93 | &s3c_device_iis, | 94 | &s3c_device_iis, |
94 | }; | 95 | }; |
95 | 96 | ||
@@ -102,6 +103,7 @@ static void __init smdk2410_map_io(void) | |||
102 | 103 | ||
103 | static void __init smdk2410_init(void) | 104 | static void __init smdk2410_init(void) |
104 | { | 105 | { |
106 | s3c_i2c0_set_platdata(NULL); | ||
105 | platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices)); | 107 | platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices)); |
106 | smdk_machine_init(); | 108 | smdk_machine_init(); |
107 | } | 109 | } |
diff --git a/arch/arm/mach-s3c2410/mach-tct_hammer.c b/arch/arm/mach-s3c2410/mach-tct_hammer.c index 309dcf4c870a..8fdb0430bd48 100644 --- a/arch/arm/mach-s3c2410/mach-tct_hammer.c +++ b/arch/arm/mach-s3c2410/mach-tct_hammer.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/mach-types.h> | 45 | #include <asm/mach-types.h> |
46 | 46 | ||
47 | #include <plat/regs-serial.h> | 47 | #include <plat/regs-serial.h> |
48 | #include <plat/iic.h> | ||
48 | #include <plat/devs.h> | 49 | #include <plat/devs.h> |
49 | #include <plat/cpu.h> | 50 | #include <plat/cpu.h> |
50 | 51 | ||
@@ -127,7 +128,7 @@ static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = { | |||
127 | static struct platform_device *tct_hammer_devices[] __initdata = { | 128 | static struct platform_device *tct_hammer_devices[] __initdata = { |
128 | &s3c_device_adc, | 129 | &s3c_device_adc, |
129 | &s3c_device_wdt, | 130 | &s3c_device_wdt, |
130 | &s3c_device_i2c, | 131 | &s3c_device_i2c0, |
131 | &s3c_device_usb, | 132 | &s3c_device_usb, |
132 | &s3c_device_rtc, | 133 | &s3c_device_rtc, |
133 | &s3c_device_usbgadget, | 134 | &s3c_device_usbgadget, |
@@ -146,6 +147,7 @@ static void __init tct_hammer_map_io(void) | |||
146 | 147 | ||
147 | static void __init tct_hammer_init(void) | 148 | static void __init tct_hammer_init(void) |
148 | { | 149 | { |
150 | s3c_i2c0_set_platdata(NULL); | ||
149 | platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices)); | 151 | platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices)); |
150 | } | 152 | } |
151 | 153 | ||
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index 941353af16dc..61a1ea9c5c5c 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <plat/clock.h> | 47 | #include <plat/clock.h> |
48 | #include <plat/devs.h> | 48 | #include <plat/devs.h> |
49 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
50 | #include <plat/iic.h> | ||
50 | 51 | ||
51 | #include "usb-simtec.h" | 52 | #include "usb-simtec.h" |
52 | #include "nor-simtec.h" | 53 | #include "nor-simtec.h" |
@@ -334,7 +335,7 @@ static struct platform_device *vr1000_devices[] __initdata = { | |||
334 | &s3c_device_usb, | 335 | &s3c_device_usb, |
335 | &s3c_device_lcd, | 336 | &s3c_device_lcd, |
336 | &s3c_device_wdt, | 337 | &s3c_device_wdt, |
337 | &s3c_device_i2c, | 338 | &s3c_device_i2c0, |
338 | &s3c_device_adc, | 339 | &s3c_device_adc, |
339 | &serial_device, | 340 | &serial_device, |
340 | &vr1000_dm9k0, | 341 | &vr1000_dm9k0, |
@@ -384,6 +385,7 @@ static void __init vr1000_map_io(void) | |||
384 | 385 | ||
385 | static void __init vr1000_init(void) | 386 | static void __init vr1000_init(void) |
386 | { | 387 | { |
388 | s3c_i2c0_set_platdata(NULL); | ||
387 | platform_add_devices(vr1000_devices, ARRAY_SIZE(vr1000_devices)); | 389 | platform_add_devices(vr1000_devices, ARRAY_SIZE(vr1000_devices)); |
388 | 390 | ||
389 | i2c_register_board_info(0, vr1000_i2c_devs, | 391 | i2c_register_board_info(0, vr1000_i2c_devs, |
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c index ac79b536c4c3..feb141b1f915 100644 --- a/arch/arm/mach-s3c2410/s3c2410.c +++ b/arch/arm/mach-s3c2410/s3c2410.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/clk.h> | ||
19 | #include <linux/sysdev.h> | 20 | #include <linux/sysdev.h> |
20 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
@@ -28,6 +29,8 @@ | |||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
30 | 31 | ||
32 | #include <plat/cpu-freq.h> | ||
33 | |||
31 | #include <mach/regs-clock.h> | 34 | #include <mach/regs-clock.h> |
32 | #include <plat/regs-serial.h> | 35 | #include <plat/regs-serial.h> |
33 | 36 | ||
@@ -35,6 +38,7 @@ | |||
35 | #include <plat/cpu.h> | 38 | #include <plat/cpu.h> |
36 | #include <plat/devs.h> | 39 | #include <plat/devs.h> |
37 | #include <plat/clock.h> | 40 | #include <plat/clock.h> |
41 | #include <plat/pll.h> | ||
38 | 42 | ||
39 | /* Initial IO mappings */ | 43 | /* Initial IO mappings */ |
40 | 44 | ||
@@ -59,25 +63,28 @@ void __init s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
59 | * machine specific initialisation. | 63 | * machine specific initialisation. |
60 | */ | 64 | */ |
61 | 65 | ||
62 | void __init s3c2410_map_io(struct map_desc *mach_desc, int mach_size) | 66 | void __init s3c2410_map_io(void) |
63 | { | 67 | { |
64 | /* register our io-tables */ | ||
65 | |||
66 | iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc)); | 68 | iotable_init(s3c2410_iodesc, ARRAY_SIZE(s3c2410_iodesc)); |
67 | iotable_init(mach_desc, mach_size); | ||
68 | } | 69 | } |
69 | 70 | ||
70 | void __init s3c2410_init_clocks(int xtal) | 71 | void __init_or_cpufreq s3c2410_setup_clocks(void) |
71 | { | 72 | { |
73 | struct clk *xtal_clk; | ||
72 | unsigned long tmp; | 74 | unsigned long tmp; |
75 | unsigned long xtal; | ||
73 | unsigned long fclk; | 76 | unsigned long fclk; |
74 | unsigned long hclk; | 77 | unsigned long hclk; |
75 | unsigned long pclk; | 78 | unsigned long pclk; |
76 | 79 | ||
80 | xtal_clk = clk_get(NULL, "xtal"); | ||
81 | xtal = clk_get_rate(xtal_clk); | ||
82 | clk_put(xtal_clk); | ||
83 | |||
77 | /* now we've got our machine bits initialised, work out what | 84 | /* now we've got our machine bits initialised, work out what |
78 | * clocks we've got */ | 85 | * clocks we've got */ |
79 | 86 | ||
80 | fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal); | 87 | fclk = s3c24xx_get_pll(__raw_readl(S3C2410_MPLLCON), xtal); |
81 | 88 | ||
82 | tmp = __raw_readl(S3C2410_CLKDIVN); | 89 | tmp = __raw_readl(S3C2410_CLKDIVN); |
83 | 90 | ||
@@ -95,7 +102,13 @@ void __init s3c2410_init_clocks(int xtal) | |||
95 | * console to use them | 102 | * console to use them |
96 | */ | 103 | */ |
97 | 104 | ||
98 | s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); | 105 | s3c24xx_setup_clocks(fclk, hclk, pclk); |
106 | } | ||
107 | |||
108 | void __init s3c2410_init_clocks(int xtal) | ||
109 | { | ||
110 | s3c24xx_register_baseclocks(xtal); | ||
111 | s3c2410_setup_clocks(); | ||
99 | s3c2410_baseclk_add(); | 112 | s3c2410_baseclk_add(); |
100 | } | 113 | } |
101 | 114 | ||
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig index c59a9d2ee9a6..ca99564ae4b5 100644 --- a/arch/arm/mach-s3c2412/Kconfig +++ b/arch/arm/mach-s3c2412/Kconfig | |||
@@ -7,6 +7,7 @@ | |||
7 | config CPU_S3C2412 | 7 | config CPU_S3C2412 |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 |
10 | select CPU_ARM926T | ||
10 | select CPU_LLSERIAL_S3C2440 | 11 | select CPU_LLSERIAL_S3C2440 |
11 | select S3C2412_PM if PM | 12 | select S3C2412_PM if PM |
12 | select S3C2412_DMA if S3C2410_DMA | 13 | select S3C2412_DMA if S3C2410_DMA |
diff --git a/arch/arm/mach-s3c2412/clock.c b/arch/arm/mach-s3c2412/clock.c index 96d9eb15424f..a037df5e1c2d 100644 --- a/arch/arm/mach-s3c2412/clock.c +++ b/arch/arm/mach-s3c2412/clock.c | |||
@@ -93,12 +93,6 @@ static int s3c2412_upll_enable(struct clk *clk, int enable) | |||
93 | 93 | ||
94 | /* clock selections */ | 94 | /* clock selections */ |
95 | 95 | ||
96 | /* CPU EXTCLK input */ | ||
97 | static struct clk clk_ext = { | ||
98 | .name = "extclk", | ||
99 | .id = -1, | ||
100 | }; | ||
101 | |||
102 | static struct clk clk_erefclk = { | 96 | static struct clk clk_erefclk = { |
103 | .name = "erefclk", | 97 | .name = "erefclk", |
104 | .id = -1, | 98 | .id = -1, |
@@ -773,5 +767,6 @@ int __init s3c2412_baseclk_add(void) | |||
773 | s3c2412_clkcon_enable(clkp, 0); | 767 | s3c2412_clkcon_enable(clkp, 0); |
774 | } | 768 | } |
775 | 769 | ||
770 | s3c_pwmclk_init(); | ||
776 | return 0; | 771 | return 0; |
777 | } | 772 | } |
diff --git a/arch/arm/mach-s3c2412/dma.c b/arch/arm/mach-s3c2412/dma.c index ba0591e71f32..919856c9433f 100644 --- a/arch/arm/mach-s3c2412/dma.c +++ b/arch/arm/mach-s3c2412/dma.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/serial_core.h> | 18 | #include <linux/serial_core.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | #include <asm/dma.h> | ||
22 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
23 | 22 | ||
24 | #include <plat/dma.h> | 23 | #include <plat/dma.h> |
@@ -26,13 +25,13 @@ | |||
26 | 25 | ||
27 | #include <plat/regs-serial.h> | 26 | #include <plat/regs-serial.h> |
28 | #include <mach/regs-gpio.h> | 27 | #include <mach/regs-gpio.h> |
29 | #include <asm/plat-s3c/regs-ac97.h> | 28 | #include <plat/regs-ac97.h> |
30 | #include <mach/regs-mem.h> | 29 | #include <mach/regs-mem.h> |
31 | #include <mach/regs-lcd.h> | 30 | #include <mach/regs-lcd.h> |
32 | #include <mach/regs-sdi.h> | 31 | #include <mach/regs-sdi.h> |
33 | #include <asm/plat-s3c24xx/regs-s3c2412-iis.h> | 32 | #include <asm/plat-s3c24xx/regs-s3c2412-iis.h> |
34 | #include <asm/plat-s3c24xx/regs-iis.h> | 33 | #include <asm/plat-s3c24xx/regs-iis.h> |
35 | #include <asm/plat-s3c24xx/regs-spi.h> | 34 | #include <plat/regs-spi.h> |
36 | 35 | ||
37 | #define MAP(x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID } | 36 | #define MAP(x) { (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID, (x)| DMA_CH_VALID } |
38 | 37 | ||
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index b08f18c8c47a..ecddbbb34832 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
20 | #include <linux/delay.h> | ||
21 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
22 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
23 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
@@ -31,8 +30,8 @@ | |||
31 | #include <asm/mach/irq.h> | 30 | #include <asm/mach/irq.h> |
32 | 31 | ||
33 | #include <plat/regs-serial.h> | 32 | #include <plat/regs-serial.h> |
34 | #include <asm/plat-s3c/nand.h> | 33 | #include <plat/nand.h> |
35 | #include <asm/plat-s3c/iic.h> | 34 | #include <plat/iic.h> |
36 | 35 | ||
37 | #include <mach/regs-power.h> | 36 | #include <mach/regs-power.h> |
38 | #include <mach/regs-gpio.h> | 37 | #include <mach/regs-gpio.h> |
@@ -52,7 +51,8 @@ | |||
52 | #include <plat/devs.h> | 51 | #include <plat/devs.h> |
53 | #include <plat/cpu.h> | 52 | #include <plat/cpu.h> |
54 | #include <plat/pm.h> | 53 | #include <plat/pm.h> |
55 | #include <asm/plat-s3c24xx/udc.h> | 54 | #include <plat/udc.h> |
55 | #include <plat/iic.h> | ||
56 | 56 | ||
57 | static struct map_desc jive_iodesc[] __initdata = { | 57 | static struct map_desc jive_iodesc[] __initdata = { |
58 | }; | 58 | }; |
@@ -398,11 +398,12 @@ static struct s3c2410_spigpio_info jive_lcd_spi = { | |||
398 | .bus_num = 1, | 398 | .bus_num = 1, |
399 | .pin_clk = S3C2410_GPG8, | 399 | .pin_clk = S3C2410_GPG8, |
400 | .pin_mosi = S3C2410_GPB8, | 400 | .pin_mosi = S3C2410_GPB8, |
401 | .num_chipselect = 1, | ||
401 | .chip_select = jive_lcd_spi_chipselect, | 402 | .chip_select = jive_lcd_spi_chipselect, |
402 | }; | 403 | }; |
403 | 404 | ||
404 | static struct platform_device jive_device_lcdspi = { | 405 | static struct platform_device jive_device_lcdspi = { |
405 | .name = "s3c24xx-spi-gpio", | 406 | .name = "spi_s3c24xx_gpio", |
406 | .id = 1, | 407 | .id = 1, |
407 | .num_resources = 0, | 408 | .num_resources = 0, |
408 | .dev.platform_data = &jive_lcd_spi, | 409 | .dev.platform_data = &jive_lcd_spi, |
@@ -419,11 +420,12 @@ static struct s3c2410_spigpio_info jive_wm8750_spi = { | |||
419 | .bus_num = 2, | 420 | .bus_num = 2, |
420 | .pin_clk = S3C2410_GPB4, | 421 | .pin_clk = S3C2410_GPB4, |
421 | .pin_mosi = S3C2410_GPB9, | 422 | .pin_mosi = S3C2410_GPB9, |
423 | .num_chipselect = 1, | ||
422 | .chip_select = jive_wm8750_chipselect, | 424 | .chip_select = jive_wm8750_chipselect, |
423 | }; | 425 | }; |
424 | 426 | ||
425 | static struct platform_device jive_device_wm8750 = { | 427 | static struct platform_device jive_device_wm8750 = { |
426 | .name = "s3c24xx-spi-gpio", | 428 | .name = "spi_s3c24xx_gpio", |
427 | .id = 2, | 429 | .id = 2, |
428 | .num_resources = 0, | 430 | .num_resources = 0, |
429 | .dev.platform_data = &jive_wm8750_spi, | 431 | .dev.platform_data = &jive_wm8750_spi, |
@@ -450,14 +452,14 @@ static struct spi_board_info __initdata jive_spi_devs[] = { | |||
450 | 452 | ||
451 | /* I2C bus and device configuration. */ | 453 | /* I2C bus and device configuration. */ |
452 | 454 | ||
453 | static struct s3c2410_platform_i2c jive_i2c_cfg = { | 455 | static struct s3c2410_platform_i2c jive_i2c_cfg __initdata = { |
454 | .max_freq = 80 * 1000, | 456 | .max_freq = 80 * 1000, |
455 | .bus_freq = 50 * 1000, | 457 | .bus_freq = 50 * 1000, |
456 | .flags = S3C_IICFLG_FILTER, | 458 | .flags = S3C_IICFLG_FILTER, |
457 | .sda_delay = 2, | 459 | .sda_delay = 2, |
458 | }; | 460 | }; |
459 | 461 | ||
460 | static struct i2c_board_info jive_i2c_devs[] = { | 462 | static struct i2c_board_info jive_i2c_devs[] __initdata = { |
461 | [0] = { | 463 | [0] = { |
462 | I2C_BOARD_INFO("lis302dl", 0x1c), | 464 | I2C_BOARD_INFO("lis302dl", 0x1c), |
463 | .irq = IRQ_EINT14, | 465 | .irq = IRQ_EINT14, |
@@ -470,7 +472,7 @@ static struct platform_device *jive_devices[] __initdata = { | |||
470 | &s3c_device_usb, | 472 | &s3c_device_usb, |
471 | &s3c_device_rtc, | 473 | &s3c_device_rtc, |
472 | &s3c_device_wdt, | 474 | &s3c_device_wdt, |
473 | &s3c_device_i2c, | 475 | &s3c_device_i2c0, |
474 | &s3c_device_lcd, | 476 | &s3c_device_lcd, |
475 | &jive_device_lcdspi, | 477 | &jive_device_lcdspi, |
476 | &jive_device_wm8750, | 478 | &jive_device_wm8750, |
@@ -663,7 +665,7 @@ static void __init jive_machine_init(void) | |||
663 | 665 | ||
664 | spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs)); | 666 | spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs)); |
665 | 667 | ||
666 | s3c_device_i2c.dev.platform_data = &jive_i2c_cfg; | 668 | s3c_i2c0_set_platdata(&jive_i2c_cfg); |
667 | i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs)); | 669 | i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs)); |
668 | 670 | ||
669 | pm_power_off = jive_power_off; | 671 | pm_power_off = jive_power_off; |
diff --git a/arch/arm/mach-s3c2412/mach-smdk2413.c b/arch/arm/mach-s3c2412/mach-smdk2413.c index c719b5a740a9..eba66aa6bd20 100644 --- a/arch/arm/mach-s3c2412/mach-smdk2413.c +++ b/arch/arm/mach-s3c2412/mach-smdk2413.c | |||
@@ -37,7 +37,8 @@ | |||
37 | #include <mach/regs-lcd.h> | 37 | #include <mach/regs-lcd.h> |
38 | 38 | ||
39 | #include <mach/idle.h> | 39 | #include <mach/idle.h> |
40 | #include <asm/plat-s3c24xx/udc.h> | 40 | #include <plat/udc.h> |
41 | #include <plat/iic.h> | ||
41 | #include <mach/fb.h> | 42 | #include <mach/fb.h> |
42 | 43 | ||
43 | #include <plat/s3c2410.h> | 44 | #include <plat/s3c2410.h> |
@@ -105,7 +106,7 @@ static struct platform_device *smdk2413_devices[] __initdata = { | |||
105 | &s3c_device_usb, | 106 | &s3c_device_usb, |
106 | //&s3c_device_lcd, | 107 | //&s3c_device_lcd, |
107 | &s3c_device_wdt, | 108 | &s3c_device_wdt, |
108 | &s3c_device_i2c, | 109 | &s3c_device_i2c0, |
109 | &s3c_device_iis, | 110 | &s3c_device_iis, |
110 | &s3c_device_usbgadget, | 111 | &s3c_device_usbgadget, |
111 | }; | 112 | }; |
@@ -142,6 +143,7 @@ static void __init smdk2413_machine_init(void) | |||
142 | 143 | ||
143 | 144 | ||
144 | s3c24xx_udc_set_platdata(&smdk2413_udc_cfg); | 145 | s3c24xx_udc_set_platdata(&smdk2413_udc_cfg); |
146 | s3c_i2c0_set_platdata(NULL); | ||
145 | 147 | ||
146 | platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices)); | 148 | platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices)); |
147 | smdk_machine_init(); | 149 | smdk_machine_init(); |
diff --git a/arch/arm/mach-s3c2412/mach-vstms.c b/arch/arm/mach-s3c2412/mach-vstms.c index 4cfa19ad9be0..11e8ad49fc7b 100644 --- a/arch/arm/mach-s3c2412/mach-vstms.c +++ b/arch/arm/mach-s3c2412/mach-vstms.c | |||
@@ -39,7 +39,8 @@ | |||
39 | #include <mach/idle.h> | 39 | #include <mach/idle.h> |
40 | #include <mach/fb.h> | 40 | #include <mach/fb.h> |
41 | 41 | ||
42 | #include <asm/plat-s3c/nand.h> | 42 | #include <plat/iic.h> |
43 | #include <plat/nand.h> | ||
43 | 44 | ||
44 | #include <plat/s3c2410.h> | 45 | #include <plat/s3c2410.h> |
45 | #include <plat/s3c2412.h> | 46 | #include <plat/s3c2412.h> |
@@ -122,7 +123,7 @@ static struct s3c2410_platform_nand vstms_nand_info = { | |||
122 | static struct platform_device *vstms_devices[] __initdata = { | 123 | static struct platform_device *vstms_devices[] __initdata = { |
123 | &s3c_device_usb, | 124 | &s3c_device_usb, |
124 | &s3c_device_wdt, | 125 | &s3c_device_wdt, |
125 | &s3c_device_i2c, | 126 | &s3c_device_i2c0, |
126 | &s3c_device_iis, | 127 | &s3c_device_iis, |
127 | &s3c_device_rtc, | 128 | &s3c_device_rtc, |
128 | &s3c_device_nand, | 129 | &s3c_device_nand, |
@@ -151,6 +152,7 @@ static void __init vstms_map_io(void) | |||
151 | 152 | ||
152 | static void __init vstms_init(void) | 153 | static void __init vstms_init(void) |
153 | { | 154 | { |
155 | s3c_i2c0_set_platdata(NULL); | ||
154 | platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices)); | 156 | platform_add_devices(vstms_devices, ARRAY_SIZE(vstms_devices)); |
155 | } | 157 | } |
156 | 158 | ||
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c index 313759c3da69..5b5aba69ec3f 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/list.h> | 16 | #include <linux/list.h> |
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/clk.h> | ||
19 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
20 | #include <linux/sysdev.h> | 21 | #include <linux/sysdev.h> |
21 | #include <linux/serial_core.h> | 22 | #include <linux/serial_core.h> |
@@ -33,13 +34,15 @@ | |||
33 | #include <mach/reset.h> | 34 | #include <mach/reset.h> |
34 | #include <mach/idle.h> | 35 | #include <mach/idle.h> |
35 | 36 | ||
37 | #include <plat/cpu-freq.h> | ||
38 | |||
36 | #include <mach/regs-clock.h> | 39 | #include <mach/regs-clock.h> |
37 | #include <plat/regs-serial.h> | 40 | #include <plat/regs-serial.h> |
38 | #include <mach/regs-power.h> | 41 | #include <mach/regs-power.h> |
39 | #include <mach/regs-gpio.h> | 42 | #include <mach/regs-gpio.h> |
40 | #include <mach/regs-gpioj.h> | 43 | #include <mach/regs-gpioj.h> |
41 | #include <mach/regs-dsc.h> | 44 | #include <mach/regs-dsc.h> |
42 | #include <asm/plat-s3c24xx/regs-spi.h> | 45 | #include <plat/regs-spi.h> |
43 | #include <mach/regs-s3c2412.h> | 46 | #include <mach/regs-s3c2412.h> |
44 | 47 | ||
45 | #include <plat/s3c2412.h> | 48 | #include <plat/s3c2412.h> |
@@ -47,6 +50,7 @@ | |||
47 | #include <plat/devs.h> | 50 | #include <plat/devs.h> |
48 | #include <plat/clock.h> | 51 | #include <plat/clock.h> |
49 | #include <plat/pm.h> | 52 | #include <plat/pm.h> |
53 | #include <plat/pll.h> | ||
50 | 54 | ||
51 | #ifndef CONFIG_CPU_S3C2412_ONLY | 55 | #ifndef CONFIG_CPU_S3C2412_ONLY |
52 | void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; | 56 | void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; |
@@ -136,7 +140,7 @@ static void s3c2412_hard_reset(void) | |||
136 | * machine specific initialisation. | 140 | * machine specific initialisation. |
137 | */ | 141 | */ |
138 | 142 | ||
139 | void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size) | 143 | void __init s3c2412_map_io(void) |
140 | { | 144 | { |
141 | /* move base of IO */ | 145 | /* move base of IO */ |
142 | 146 | ||
@@ -153,20 +157,25 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size) | |||
153 | /* register our io-tables */ | 157 | /* register our io-tables */ |
154 | 158 | ||
155 | iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); | 159 | iotable_init(s3c2412_iodesc, ARRAY_SIZE(s3c2412_iodesc)); |
156 | iotable_init(mach_desc, mach_size); | ||
157 | } | 160 | } |
158 | 161 | ||
159 | void __init s3c2412_init_clocks(int xtal) | 162 | void __init_or_cpufreq s3c2412_setup_clocks(void) |
160 | { | 163 | { |
164 | struct clk *xtal_clk; | ||
161 | unsigned long tmp; | 165 | unsigned long tmp; |
166 | unsigned long xtal; | ||
162 | unsigned long fclk; | 167 | unsigned long fclk; |
163 | unsigned long hclk; | 168 | unsigned long hclk; |
164 | unsigned long pclk; | 169 | unsigned long pclk; |
165 | 170 | ||
171 | xtal_clk = clk_get(NULL, "xtal"); | ||
172 | xtal = clk_get_rate(xtal_clk); | ||
173 | clk_put(xtal_clk); | ||
174 | |||
166 | /* now we've got our machine bits initialised, work out what | 175 | /* now we've got our machine bits initialised, work out what |
167 | * clocks we've got */ | 176 | * clocks we've got */ |
168 | 177 | ||
169 | fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal*2); | 178 | fclk = s3c24xx_get_pll(__raw_readl(S3C2410_MPLLCON), xtal * 2); |
170 | 179 | ||
171 | clk_mpll.rate = fclk; | 180 | clk_mpll.rate = fclk; |
172 | 181 | ||
@@ -183,11 +192,17 @@ void __init s3c2412_init_clocks(int xtal) | |||
183 | printk("S3C2412: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", | 192 | printk("S3C2412: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", |
184 | print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); | 193 | print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); |
185 | 194 | ||
195 | s3c24xx_setup_clocks(fclk, hclk, pclk); | ||
196 | } | ||
197 | |||
198 | void __init s3c2412_init_clocks(int xtal) | ||
199 | { | ||
186 | /* initialise the clocks here, to allow other things like the | 200 | /* initialise the clocks here, to allow other things like the |
187 | * console to use them | 201 | * console to use them |
188 | */ | 202 | */ |
189 | 203 | ||
190 | s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); | 204 | s3c24xx_register_baseclocks(xtal); |
205 | s3c2412_setup_clocks(); | ||
191 | s3c2412_baseclk_add(); | 206 | s3c2412_baseclk_add(); |
192 | } | 207 | } |
193 | 208 | ||
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig index 25de042ab996..cde5ae9a4340 100644 --- a/arch/arm/mach-s3c2440/Kconfig +++ b/arch/arm/mach-s3c2440/Kconfig | |||
@@ -7,6 +7,7 @@ | |||
7 | config CPU_S3C2440 | 7 | config CPU_S3C2440 |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 |
10 | select CPU_ARM920T | ||
10 | select S3C2410_CLOCK | 11 | select S3C2410_CLOCK |
11 | select S3C2410_PM if PM | 12 | select S3C2410_PM if PM |
12 | select S3C2410_GPIO | 13 | select S3C2410_GPIO |
@@ -28,8 +29,10 @@ menu "S3C2440 Machines" | |||
28 | config MACH_ANUBIS | 29 | config MACH_ANUBIS |
29 | bool "Simtec Electronics ANUBIS" | 30 | bool "Simtec Electronics ANUBIS" |
30 | select CPU_S3C2440 | 31 | select CPU_S3C2440 |
32 | select S3C24XX_DCLK | ||
31 | select PM_SIMTEC if PM | 33 | select PM_SIMTEC if PM |
32 | select HAVE_PATA_PLATFORM | 34 | select HAVE_PATA_PLATFORM |
35 | select S3C24XX_GPIO_EXTRA64 | ||
33 | help | 36 | help |
34 | Say Y here if you are using the Simtec Electronics ANUBIS | 37 | Say Y here if you are using the Simtec Electronics ANUBIS |
35 | development system | 38 | development system |
@@ -37,7 +40,9 @@ config MACH_ANUBIS | |||
37 | config MACH_OSIRIS | 40 | config MACH_OSIRIS |
38 | bool "Simtec IM2440D20 (OSIRIS) module" | 41 | bool "Simtec IM2440D20 (OSIRIS) module" |
39 | select CPU_S3C2440 | 42 | select CPU_S3C2440 |
43 | select S3C24XX_DCLK | ||
40 | select PM_SIMTEC if PM | 44 | select PM_SIMTEC if PM |
45 | select S3C24XX_GPIO_EXTRA128 | ||
41 | help | 46 | help |
42 | Say Y here if you are using the Simtec IM2440D20 module, also | 47 | Say Y here if you are using the Simtec IM2440D20 module, also |
43 | known as the Osiris. | 48 | known as the Osiris. |
diff --git a/arch/arm/mach-s3c2440/dma.c b/arch/arm/mach-s3c2440/dma.c index 32303f6a8321..5b5ee0b8f4e0 100644 --- a/arch/arm/mach-s3c2440/dma.c +++ b/arch/arm/mach-s3c2440/dma.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/sysdev.h> | 17 | #include <linux/sysdev.h> |
18 | #include <linux/serial_core.h> | 18 | #include <linux/serial_core.h> |
19 | 19 | ||
20 | #include <asm/dma.h> | ||
21 | #include <mach/dma.h> | 20 | #include <mach/dma.h> |
22 | 21 | ||
23 | #include <plat/dma.h> | 22 | #include <plat/dma.h> |
@@ -25,12 +24,12 @@ | |||
25 | 24 | ||
26 | #include <plat/regs-serial.h> | 25 | #include <plat/regs-serial.h> |
27 | #include <mach/regs-gpio.h> | 26 | #include <mach/regs-gpio.h> |
28 | #include <asm/plat-s3c/regs-ac97.h> | 27 | #include <plat/regs-ac97.h> |
29 | #include <mach/regs-mem.h> | 28 | #include <mach/regs-mem.h> |
30 | #include <mach/regs-lcd.h> | 29 | #include <mach/regs-lcd.h> |
31 | #include <mach/regs-sdi.h> | 30 | #include <mach/regs-sdi.h> |
32 | #include <asm/plat-s3c24xx/regs-iis.h> | 31 | #include <asm/plat-s3c24xx/regs-iis.h> |
33 | #include <asm/plat-s3c24xx/regs-spi.h> | 32 | #include <plat/regs-spi.h> |
34 | 33 | ||
35 | static struct s3c24xx_dma_map __initdata s3c2440_dma_mappings[] = { | 34 | static struct s3c24xx_dma_map __initdata s3c2440_dma_mappings[] = { |
36 | [DMACH_XD0] = { | 35 | [DMACH_XD0] = { |
diff --git a/arch/arm/mach-s3c2440/mach-anubis.c b/arch/arm/mach-s3c2440/mach-anubis.c index e2beca470484..b05d56e230a1 100644 --- a/arch/arm/mach-s3c2440/mach-anubis.c +++ b/arch/arm/mach-s3c2440/mach-anubis.c | |||
@@ -39,7 +39,8 @@ | |||
39 | #include <mach/regs-gpio.h> | 39 | #include <mach/regs-gpio.h> |
40 | #include <mach/regs-mem.h> | 40 | #include <mach/regs-mem.h> |
41 | #include <mach/regs-lcd.h> | 41 | #include <mach/regs-lcd.h> |
42 | #include <asm/plat-s3c/nand.h> | 42 | #include <plat/nand.h> |
43 | #include <plat/iic.h> | ||
43 | 44 | ||
44 | #include <linux/mtd/mtd.h> | 45 | #include <linux/mtd/mtd.h> |
45 | #include <linux/mtd/nand.h> | 46 | #include <linux/mtd/nand.h> |
@@ -366,6 +367,8 @@ static struct sm501_initdata anubis_sm501_initdata = { | |||
366 | .mask = 0, | 367 | .mask = 0, |
367 | }, | 368 | }, |
368 | 369 | ||
370 | .devices = SM501_USE_GPIO, | ||
371 | |||
369 | /* set the SDRAM and bus clocks */ | 372 | /* set the SDRAM and bus clocks */ |
370 | .mclk = 72 * MHZ, | 373 | .mclk = 72 * MHZ, |
371 | .m1xclk = 144 * MHZ, | 374 | .m1xclk = 144 * MHZ, |
@@ -373,10 +376,12 @@ static struct sm501_initdata anubis_sm501_initdata = { | |||
373 | 376 | ||
374 | static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = { | 377 | static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = { |
375 | [0] = { | 378 | [0] = { |
379 | .bus_num = 1, | ||
376 | .pin_scl = 44, | 380 | .pin_scl = 44, |
377 | .pin_sda = 45, | 381 | .pin_sda = 45, |
378 | }, | 382 | }, |
379 | [1] = { | 383 | [1] = { |
384 | .bus_num = 2, | ||
380 | .pin_scl = 40, | 385 | .pin_scl = 40, |
381 | .pin_sda = 41, | 386 | .pin_sda = 41, |
382 | }, | 387 | }, |
@@ -384,6 +389,7 @@ static struct sm501_platdata_gpio_i2c anubis_sm501_gpio_i2c[] = { | |||
384 | 389 | ||
385 | static struct sm501_platdata anubis_sm501_platdata = { | 390 | static struct sm501_platdata anubis_sm501_platdata = { |
386 | .init = &anubis_sm501_initdata, | 391 | .init = &anubis_sm501_initdata, |
392 | .gpio_base = -1, | ||
387 | .gpio_i2c = anubis_sm501_gpio_i2c, | 393 | .gpio_i2c = anubis_sm501_gpio_i2c, |
388 | .gpio_i2c_nr = ARRAY_SIZE(anubis_sm501_gpio_i2c), | 394 | .gpio_i2c_nr = ARRAY_SIZE(anubis_sm501_gpio_i2c), |
389 | }; | 395 | }; |
@@ -404,7 +410,7 @@ static struct platform_device *anubis_devices[] __initdata = { | |||
404 | &s3c_device_usb, | 410 | &s3c_device_usb, |
405 | &s3c_device_wdt, | 411 | &s3c_device_wdt, |
406 | &s3c_device_adc, | 412 | &s3c_device_adc, |
407 | &s3c_device_i2c, | 413 | &s3c_device_i2c0, |
408 | &s3c_device_rtc, | 414 | &s3c_device_rtc, |
409 | &s3c_device_nand, | 415 | &s3c_device_nand, |
410 | &anubis_device_ide0, | 416 | &anubis_device_ide0, |
@@ -468,6 +474,7 @@ static void __init anubis_map_io(void) | |||
468 | 474 | ||
469 | static void __init anubis_init(void) | 475 | static void __init anubis_init(void) |
470 | { | 476 | { |
477 | s3c_i2c0_set_platdata(NULL); | ||
471 | platform_add_devices(anubis_devices, ARRAY_SIZE(anubis_devices)); | 478 | platform_add_devices(anubis_devices, ARRAY_SIZE(anubis_devices)); |
472 | 479 | ||
473 | i2c_register_board_info(0, anubis_i2c_devs, | 480 | i2c_register_board_info(0, anubis_i2c_devs, |
diff --git a/arch/arm/mach-s3c2440/mach-at2440evb.c b/arch/arm/mach-s3c2440/mach-at2440evb.c index 66876c6f2f1c..0a6d0a5d961b 100644 --- a/arch/arm/mach-s3c2440/mach-at2440evb.c +++ b/arch/arm/mach-s3c2440/mach-at2440evb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/mach/irq.h> | 28 | #include <asm/mach/irq.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <mach/fb.h> | ||
31 | #include <asm/irq.h> | 32 | #include <asm/irq.h> |
32 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
33 | 34 | ||
@@ -35,7 +36,8 @@ | |||
35 | #include <mach/regs-gpio.h> | 36 | #include <mach/regs-gpio.h> |
36 | #include <mach/regs-mem.h> | 37 | #include <mach/regs-mem.h> |
37 | #include <mach/regs-lcd.h> | 38 | #include <mach/regs-lcd.h> |
38 | #include <asm/plat-s3c/nand.h> | 39 | #include <plat/nand.h> |
40 | #include <plat/iic.h> | ||
39 | 41 | ||
40 | #include <linux/mtd/mtd.h> | 42 | #include <linux/mtd/mtd.h> |
41 | #include <linux/mtd/nand.h> | 43 | #include <linux/mtd/nand.h> |
@@ -45,6 +47,7 @@ | |||
45 | #include <plat/clock.h> | 47 | #include <plat/clock.h> |
46 | #include <plat/devs.h> | 48 | #include <plat/devs.h> |
47 | #include <plat/cpu.h> | 49 | #include <plat/cpu.h> |
50 | #include <asm/plat-s3c24xx/mci.h> | ||
48 | 51 | ||
49 | static struct map_desc at2440evb_iodesc[] __initdata = { | 52 | static struct map_desc at2440evb_iodesc[] __initdata = { |
50 | /* Nothing here */ | 53 | /* Nothing here */ |
@@ -162,19 +165,60 @@ static struct platform_device at2440evb_device_eth = { | |||
162 | }, | 165 | }, |
163 | }; | 166 | }; |
164 | 167 | ||
168 | static struct s3c24xx_mci_pdata at2440evb_mci_pdata = { | ||
169 | .gpio_detect = S3C2410_GPG10, | ||
170 | }; | ||
171 | |||
172 | /* 7" LCD panel */ | ||
173 | |||
174 | static struct s3c2410fb_display at2440evb_lcd_cfg __initdata = { | ||
175 | |||
176 | .lcdcon5 = S3C2410_LCDCON5_FRM565 | | ||
177 | S3C2410_LCDCON5_INVVLINE | | ||
178 | S3C2410_LCDCON5_INVVFRAME | | ||
179 | S3C2410_LCDCON5_PWREN | | ||
180 | S3C2410_LCDCON5_HWSWP, | ||
181 | |||
182 | .type = S3C2410_LCDCON1_TFT, | ||
183 | |||
184 | .width = 800, | ||
185 | .height = 480, | ||
186 | |||
187 | .pixclock = 33333, /* HCLK 60 MHz, divisor 2 */ | ||
188 | .xres = 800, | ||
189 | .yres = 480, | ||
190 | .bpp = 16, | ||
191 | .left_margin = 88, | ||
192 | .right_margin = 40, | ||
193 | .hsync_len = 128, | ||
194 | .upper_margin = 32, | ||
195 | .lower_margin = 11, | ||
196 | .vsync_len = 2, | ||
197 | }; | ||
198 | |||
199 | static struct s3c2410fb_mach_info at2440evb_fb_info __initdata = { | ||
200 | .displays = &at2440evb_lcd_cfg, | ||
201 | .num_displays = 1, | ||
202 | .default_display = 0, | ||
203 | }; | ||
204 | |||
165 | static struct platform_device *at2440evb_devices[] __initdata = { | 205 | static struct platform_device *at2440evb_devices[] __initdata = { |
166 | &s3c_device_usb, | 206 | &s3c_device_usb, |
167 | &s3c_device_wdt, | 207 | &s3c_device_wdt, |
168 | &s3c_device_adc, | 208 | &s3c_device_adc, |
169 | &s3c_device_i2c, | 209 | &s3c_device_i2c0, |
170 | &s3c_device_rtc, | 210 | &s3c_device_rtc, |
171 | &s3c_device_nand, | 211 | &s3c_device_nand, |
212 | &s3c_device_sdi, | ||
213 | &s3c_device_lcd, | ||
172 | &at2440evb_device_eth, | 214 | &at2440evb_device_eth, |
173 | }; | 215 | }; |
174 | 216 | ||
175 | static void __init at2440evb_map_io(void) | 217 | static void __init at2440evb_map_io(void) |
176 | { | 218 | { |
177 | s3c_device_nand.dev.platform_data = &at2440evb_nand_info; | 219 | s3c_device_nand.dev.platform_data = &at2440evb_nand_info; |
220 | s3c_device_sdi.name = "s3c2440-sdi"; | ||
221 | s3c_device_sdi.dev.platform_data = &at2440evb_mci_pdata; | ||
178 | 222 | ||
179 | s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); | 223 | s3c24xx_init_io(at2440evb_iodesc, ARRAY_SIZE(at2440evb_iodesc)); |
180 | s3c24xx_init_clocks(16934400); | 224 | s3c24xx_init_clocks(16934400); |
@@ -183,6 +227,9 @@ static void __init at2440evb_map_io(void) | |||
183 | 227 | ||
184 | static void __init at2440evb_init(void) | 228 | static void __init at2440evb_init(void) |
185 | { | 229 | { |
230 | s3c24xx_fb_set_platdata(&at2440evb_fb_info); | ||
231 | s3c_i2c0_set_platdata(NULL); | ||
232 | |||
186 | platform_add_devices(at2440evb_devices, ARRAY_SIZE(at2440evb_devices)); | 233 | platform_add_devices(at2440evb_devices, ARRAY_SIZE(at2440evb_devices)); |
187 | } | 234 | } |
188 | 235 | ||
diff --git a/arch/arm/mach-s3c2440/mach-nexcoder.c b/arch/arm/mach-s3c2440/mach-nexcoder.c index a546307fd53d..7aeaa972d7f5 100644 --- a/arch/arm/mach-s3c2440/mach-nexcoder.c +++ b/arch/arm/mach-s3c2440/mach-nexcoder.c | |||
@@ -37,6 +37,7 @@ | |||
37 | //#include <asm/debug-ll.h> | 37 | //#include <asm/debug-ll.h> |
38 | #include <mach/regs-gpio.h> | 38 | #include <mach/regs-gpio.h> |
39 | #include <plat/regs-serial.h> | 39 | #include <plat/regs-serial.h> |
40 | #include <plat/iic.h> | ||
40 | 41 | ||
41 | #include <plat/s3c2410.h> | 42 | #include <plat/s3c2410.h> |
42 | #include <plat/s3c2440.h> | 43 | #include <plat/s3c2440.h> |
@@ -107,7 +108,7 @@ static struct platform_device *nexcoder_devices[] __initdata = { | |||
107 | &s3c_device_usb, | 108 | &s3c_device_usb, |
108 | &s3c_device_lcd, | 109 | &s3c_device_lcd, |
109 | &s3c_device_wdt, | 110 | &s3c_device_wdt, |
110 | &s3c_device_i2c, | 111 | &s3c_device_i2c0, |
111 | &s3c_device_iis, | 112 | &s3c_device_iis, |
112 | &s3c_device_rtc, | 113 | &s3c_device_rtc, |
113 | &s3c_device_camif, | 114 | &s3c_device_camif, |
@@ -142,6 +143,7 @@ static void __init nexcoder_map_io(void) | |||
142 | 143 | ||
143 | static void __init nexcoder_init(void) | 144 | static void __init nexcoder_init(void) |
144 | { | 145 | { |
146 | s3c_i2c0_set_platdata(NULL); | ||
145 | platform_add_devices(nexcoder_devices, ARRAY_SIZE(nexcoder_devices)); | 147 | platform_add_devices(nexcoder_devices, ARRAY_SIZE(nexcoder_devices)); |
146 | }; | 148 | }; |
147 | 149 | ||
diff --git a/arch/arm/mach-s3c2440/mach-osiris.c b/arch/arm/mach-s3c2440/mach-osiris.c index 2361d606abc5..41a00f57e5da 100644 --- a/arch/arm/mach-s3c2440/mach-osiris.c +++ b/arch/arm/mach-s3c2440/mach-osiris.c | |||
@@ -37,7 +37,8 @@ | |||
37 | #include <mach/regs-gpio.h> | 37 | #include <mach/regs-gpio.h> |
38 | #include <mach/regs-mem.h> | 38 | #include <mach/regs-mem.h> |
39 | #include <mach/regs-lcd.h> | 39 | #include <mach/regs-lcd.h> |
40 | #include <asm/plat-s3c/nand.h> | 40 | #include <plat/nand.h> |
41 | #include <plat/iic.h> | ||
41 | 42 | ||
42 | #include <linux/mtd/mtd.h> | 43 | #include <linux/mtd/mtd.h> |
43 | #include <linux/mtd/nand.h> | 44 | #include <linux/mtd/nand.h> |
@@ -335,7 +336,7 @@ static struct i2c_board_info osiris_i2c_devs[] __initdata = { | |||
335 | /* Standard Osiris devices */ | 336 | /* Standard Osiris devices */ |
336 | 337 | ||
337 | static struct platform_device *osiris_devices[] __initdata = { | 338 | static struct platform_device *osiris_devices[] __initdata = { |
338 | &s3c_device_i2c, | 339 | &s3c_device_i2c0, |
339 | &s3c_device_wdt, | 340 | &s3c_device_wdt, |
340 | &s3c_device_nand, | 341 | &s3c_device_nand, |
341 | &osiris_pcmcia, | 342 | &osiris_pcmcia, |
@@ -398,6 +399,8 @@ static void __init osiris_init(void) | |||
398 | sysdev_class_register(&osiris_pm_sysclass); | 399 | sysdev_class_register(&osiris_pm_sysclass); |
399 | sysdev_register(&osiris_pm_sysdev); | 400 | sysdev_register(&osiris_pm_sysdev); |
400 | 401 | ||
402 | s3c_i2c0_set_platdata(NULL); | ||
403 | |||
401 | i2c_register_board_info(0, osiris_i2c_devs, | 404 | i2c_register_board_info(0, osiris_i2c_devs, |
402 | ARRAY_SIZE(osiris_i2c_devs)); | 405 | ARRAY_SIZE(osiris_i2c_devs)); |
403 | 406 | ||
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index 4d14c7cff892..12d378f84ad2 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include <mach/regs-lcd.h> | 42 | #include <mach/regs-lcd.h> |
43 | 43 | ||
44 | #include <mach/h1940.h> | 44 | #include <mach/h1940.h> |
45 | #include <asm/plat-s3c/nand.h> | 45 | #include <plat/nand.h> |
46 | #include <mach/fb.h> | 46 | #include <mach/fb.h> |
47 | 47 | ||
48 | #include <plat/clock.h> | 48 | #include <plat/clock.h> |
@@ -179,7 +179,7 @@ static struct platform_device *rx3715_devices[] __initdata = { | |||
179 | &s3c_device_usb, | 179 | &s3c_device_usb, |
180 | &s3c_device_lcd, | 180 | &s3c_device_lcd, |
181 | &s3c_device_wdt, | 181 | &s3c_device_wdt, |
182 | &s3c_device_i2c, | 182 | &s3c_device_i2c0, |
183 | &s3c_device_iis, | 183 | &s3c_device_iis, |
184 | &s3c_device_nand, | 184 | &s3c_device_nand, |
185 | }; | 185 | }; |
diff --git a/arch/arm/mach-s3c2440/mach-smdk2440.c b/arch/arm/mach-s3c2440/mach-smdk2440.c index fefeaaa4155f..db6eafbd4d90 100644 --- a/arch/arm/mach-s3c2440/mach-smdk2440.c +++ b/arch/arm/mach-s3c2440/mach-smdk2440.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include <mach/idle.h> | 38 | #include <mach/idle.h> |
39 | #include <mach/fb.h> | 39 | #include <mach/fb.h> |
40 | #include <plat/iic.h> | ||
40 | 41 | ||
41 | #include <plat/s3c2410.h> | 42 | #include <plat/s3c2410.h> |
42 | #include <plat/s3c2440.h> | 43 | #include <plat/s3c2440.h> |
@@ -152,7 +153,7 @@ static struct platform_device *smdk2440_devices[] __initdata = { | |||
152 | &s3c_device_usb, | 153 | &s3c_device_usb, |
153 | &s3c_device_lcd, | 154 | &s3c_device_lcd, |
154 | &s3c_device_wdt, | 155 | &s3c_device_wdt, |
155 | &s3c_device_i2c, | 156 | &s3c_device_i2c0, |
156 | &s3c_device_iis, | 157 | &s3c_device_iis, |
157 | }; | 158 | }; |
158 | 159 | ||
@@ -166,6 +167,7 @@ static void __init smdk2440_map_io(void) | |||
166 | static void __init smdk2440_machine_init(void) | 167 | static void __init smdk2440_machine_init(void) |
167 | { | 168 | { |
168 | s3c24xx_fb_set_platdata(&smdk2440_fb_info); | 169 | s3c24xx_fb_set_platdata(&smdk2440_fb_info); |
170 | s3c_i2c0_set_platdata(NULL); | ||
169 | 171 | ||
170 | platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices)); | 172 | platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices)); |
171 | smdk_machine_init(); | 173 | smdk_machine_init(); |
diff --git a/arch/arm/mach-s3c2442/Kconfig b/arch/arm/mach-s3c2442/Kconfig index 26d131a77074..b289d198020e 100644 --- a/arch/arm/mach-s3c2442/Kconfig +++ b/arch/arm/mach-s3c2442/Kconfig | |||
@@ -7,6 +7,7 @@ | |||
7 | config CPU_S3C2442 | 7 | config CPU_S3C2442 |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 |
10 | select CPU_ARM920T | ||
10 | select S3C2410_CLOCK | 11 | select S3C2410_CLOCK |
11 | select S3C2410_GPIO | 12 | select S3C2410_GPIO |
12 | select S3C2410_PM if PM | 13 | select S3C2410_PM if PM |
diff --git a/arch/arm/mach-s3c2443/Kconfig b/arch/arm/mach-s3c2443/Kconfig index 14252f573754..212141baebec 100644 --- a/arch/arm/mach-s3c2443/Kconfig +++ b/arch/arm/mach-s3c2443/Kconfig | |||
@@ -24,6 +24,7 @@ config MACH_SMDK2443 | |||
24 | bool "SMDK2443" | 24 | bool "SMDK2443" |
25 | select CPU_S3C2443 | 25 | select CPU_S3C2443 |
26 | select MACH_SMDK | 26 | select MACH_SMDK |
27 | select S3C_DEV_HSMMC | ||
27 | help | 28 | help |
28 | Say Y here if you are using an SMDK2443 | 29 | Say Y here if you are using an SMDK2443 |
29 | 30 | ||
diff --git a/arch/arm/mach-s3c2443/clock.c b/arch/arm/mach-s3c2443/clock.c index f854e7385e3c..2785d69c95b0 100644 --- a/arch/arm/mach-s3c2443/clock.c +++ b/arch/arm/mach-s3c2443/clock.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/sysdev.h> | 29 | #include <linux/sysdev.h> |
30 | #include <linux/clk.h> | 30 | #include <linux/clk.h> |
31 | #include <linux/mutex.h> | 31 | #include <linux/mutex.h> |
32 | #include <linux/delay.h> | ||
33 | #include <linux/serial_core.h> | 32 | #include <linux/serial_core.h> |
34 | #include <linux/io.h> | 33 | #include <linux/io.h> |
35 | 34 | ||
@@ -39,6 +38,8 @@ | |||
39 | 38 | ||
40 | #include <mach/regs-s3c2443-clock.h> | 39 | #include <mach/regs-s3c2443-clock.h> |
41 | 40 | ||
41 | #include <plat/cpu-freq.h> | ||
42 | |||
42 | #include <plat/s3c2443.h> | 43 | #include <plat/s3c2443.h> |
43 | #include <plat/clock.h> | 44 | #include <plat/clock.h> |
44 | #include <plat/cpu.h> | 45 | #include <plat/cpu.h> |
@@ -145,12 +146,6 @@ static unsigned long s3c2443_roundrate_clksrc256(struct clk *clk, | |||
145 | 146 | ||
146 | /* clock selections */ | 147 | /* clock selections */ |
147 | 148 | ||
148 | /* CPU EXTCLK input */ | ||
149 | static struct clk clk_ext = { | ||
150 | .name = "ext", | ||
151 | .id = -1, | ||
152 | }; | ||
153 | |||
154 | static struct clk clk_mpllref = { | 149 | static struct clk clk_mpllref = { |
155 | .name = "mpllref", | 150 | .name = "mpllref", |
156 | .parent = &clk_xtal, | 151 | .parent = &clk_xtal, |
@@ -165,14 +160,6 @@ static struct clk clk_mpll = { | |||
165 | }; | 160 | }; |
166 | #endif | 161 | #endif |
167 | 162 | ||
168 | static struct clk clk_epllref; | ||
169 | |||
170 | static struct clk clk_epll = { | ||
171 | .name = "epll", | ||
172 | .parent = &clk_epllref, | ||
173 | .id = -1, | ||
174 | }; | ||
175 | |||
176 | static struct clk clk_i2s_ext = { | 163 | static struct clk clk_i2s_ext = { |
177 | .name = "i2s-ext", | 164 | .name = "i2s-ext", |
178 | .id = -1, | 165 | .id = -1, |
@@ -1011,22 +998,20 @@ static struct clk *clks[] __initdata = { | |||
1011 | &clk_prediv, | 998 | &clk_prediv, |
1012 | }; | 999 | }; |
1013 | 1000 | ||
1014 | void __init s3c2443_init_clocks(int xtal) | 1001 | void __init_or_cpufreq s3c2443_setup_clocks(void) |
1015 | { | 1002 | { |
1016 | unsigned long epllcon = __raw_readl(S3C2443_EPLLCON); | ||
1017 | unsigned long mpllcon = __raw_readl(S3C2443_MPLLCON); | 1003 | unsigned long mpllcon = __raw_readl(S3C2443_MPLLCON); |
1018 | unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0); | 1004 | unsigned long clkdiv0 = __raw_readl(S3C2443_CLKDIV0); |
1005 | struct clk *xtal_clk; | ||
1006 | unsigned long xtal; | ||
1019 | unsigned long pll; | 1007 | unsigned long pll; |
1020 | unsigned long fclk; | 1008 | unsigned long fclk; |
1021 | unsigned long hclk; | 1009 | unsigned long hclk; |
1022 | unsigned long pclk; | 1010 | unsigned long pclk; |
1023 | struct clk *clkp; | ||
1024 | int ret; | ||
1025 | int ptr; | ||
1026 | 1011 | ||
1027 | /* s3c2443 parents h and p clocks from prediv */ | 1012 | xtal_clk = clk_get(NULL, "xtal"); |
1028 | clk_h.parent = &clk_prediv; | 1013 | xtal = clk_get_rate(xtal_clk); |
1029 | clk_p.parent = &clk_prediv; | 1014 | clk_put(xtal_clk); |
1030 | 1015 | ||
1031 | pll = s3c2443_get_mpll(mpllcon, xtal); | 1016 | pll = s3c2443_get_mpll(mpllcon, xtal); |
1032 | clk_msysclk.rate = pll; | 1017 | clk_msysclk.rate = pll; |
@@ -1036,13 +1021,29 @@ void __init s3c2443_init_clocks(int xtal) | |||
1036 | hclk /= s3c2443_get_hdiv(clkdiv0); | 1021 | hclk /= s3c2443_get_hdiv(clkdiv0); |
1037 | pclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_PCLK) ? 2 : 1); | 1022 | pclk = hclk / ((clkdiv0 & S3C2443_CLKDIV0_HALF_PCLK) ? 2 : 1); |
1038 | 1023 | ||
1039 | s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); | 1024 | s3c24xx_setup_clocks(fclk, hclk, pclk); |
1040 | 1025 | ||
1041 | printk("S3C2443: mpll %s %ld.%03ld MHz, cpu %ld.%03ld MHz, mem %ld.%03ld MHz, pclk %ld.%03ld MHz\n", | 1026 | printk("S3C2443: mpll %s %ld.%03ld MHz, cpu %ld.%03ld MHz, mem %ld.%03ld MHz, pclk %ld.%03ld MHz\n", |
1042 | (mpllcon & S3C2443_PLLCON_OFF) ? "off":"on", | 1027 | (mpllcon & S3C2443_PLLCON_OFF) ? "off":"on", |
1043 | print_mhz(pll), print_mhz(fclk), | 1028 | print_mhz(pll), print_mhz(fclk), |
1044 | print_mhz(hclk), print_mhz(pclk)); | 1029 | print_mhz(hclk), print_mhz(pclk)); |
1045 | 1030 | ||
1031 | s3c24xx_setup_clocks(fclk, hclk, pclk); | ||
1032 | } | ||
1033 | |||
1034 | void __init s3c2443_init_clocks(int xtal) | ||
1035 | { | ||
1036 | struct clk *clkp; | ||
1037 | unsigned long epllcon = __raw_readl(S3C2443_EPLLCON); | ||
1038 | int ret; | ||
1039 | int ptr; | ||
1040 | |||
1041 | /* s3c2443 parents h and p clocks from prediv */ | ||
1042 | clk_h.parent = &clk_prediv; | ||
1043 | clk_p.parent = &clk_prediv; | ||
1044 | |||
1045 | s3c24xx_register_baseclocks(xtal); | ||
1046 | s3c2443_setup_clocks(); | ||
1046 | s3c2443_clk_initparents(); | 1047 | s3c2443_clk_initparents(); |
1047 | 1048 | ||
1048 | for (ptr = 0; ptr < ARRAY_SIZE(clks); ptr++) { | 1049 | for (ptr = 0; ptr < ARRAY_SIZE(clks); ptr++) { |
@@ -1056,7 +1057,7 @@ void __init s3c2443_init_clocks(int xtal) | |||
1056 | } | 1057 | } |
1057 | 1058 | ||
1058 | clk_epll.rate = s3c2443_get_epll(epllcon, xtal); | 1059 | clk_epll.rate = s3c2443_get_epll(epllcon, xtal); |
1059 | 1060 | clk_epll.parent = &clk_epllref; | |
1060 | clk_usb_bus.parent = &clk_usb_bus_host; | 1061 | clk_usb_bus.parent = &clk_usb_bus_host; |
1061 | 1062 | ||
1062 | /* ensure usb bus clock is within correct rate of 48MHz */ | 1063 | /* ensure usb bus clock is within correct rate of 48MHz */ |
@@ -1105,4 +1106,6 @@ void __init s3c2443_init_clocks(int xtal) | |||
1105 | 1106 | ||
1106 | (clkp->enable)(clkp, 0); | 1107 | (clkp->enable)(clkp, 0); |
1107 | } | 1108 | } |
1109 | |||
1110 | s3c_pwmclk_init(); | ||
1108 | } | 1111 | } |
diff --git a/arch/arm/mach-s3c2443/dma.c b/arch/arm/mach-s3c2443/dma.c index f73ccb25ff94..2a58a4d5aa5a 100644 --- a/arch/arm/mach-s3c2443/dma.c +++ b/arch/arm/mach-s3c2443/dma.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/serial_core.h> | 18 | #include <linux/serial_core.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | 20 | ||
21 | #include <asm/dma.h> | ||
22 | #include <mach/dma.h> | 21 | #include <mach/dma.h> |
23 | 22 | ||
24 | #include <plat/dma.h> | 23 | #include <plat/dma.h> |
@@ -26,12 +25,12 @@ | |||
26 | 25 | ||
27 | #include <plat/regs-serial.h> | 26 | #include <plat/regs-serial.h> |
28 | #include <mach/regs-gpio.h> | 27 | #include <mach/regs-gpio.h> |
29 | #include <asm/plat-s3c/regs-ac97.h> | 28 | #include <plat/regs-ac97.h> |
30 | #include <mach/regs-mem.h> | 29 | #include <mach/regs-mem.h> |
31 | #include <mach/regs-lcd.h> | 30 | #include <mach/regs-lcd.h> |
32 | #include <mach/regs-sdi.h> | 31 | #include <mach/regs-sdi.h> |
33 | #include <asm/plat-s3c24xx/regs-iis.h> | 32 | #include <asm/plat-s3c24xx/regs-iis.h> |
34 | #include <asm/plat-s3c24xx/regs-spi.h> | 33 | #include <plat/regs-spi.h> |
35 | 34 | ||
36 | #define MAP(x) { \ | 35 | #define MAP(x) { \ |
37 | [0] = (x) | DMA_CH_VALID, \ | 36 | [0] = (x) | DMA_CH_VALID, \ |
diff --git a/arch/arm/mach-s3c2443/mach-smdk2443.c b/arch/arm/mach-s3c2443/mach-smdk2443.c index a7fe65f3dcc1..039a46243105 100644 --- a/arch/arm/mach-s3c2443/mach-smdk2443.c +++ b/arch/arm/mach-s3c2443/mach-smdk2443.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include <mach/idle.h> | 38 | #include <mach/idle.h> |
39 | #include <mach/fb.h> | 39 | #include <mach/fb.h> |
40 | #include <plat/iic.h> | ||
40 | 41 | ||
41 | #include <plat/s3c2410.h> | 42 | #include <plat/s3c2410.h> |
42 | #include <plat/s3c2440.h> | 43 | #include <plat/s3c2440.h> |
@@ -103,8 +104,8 @@ static struct s3c2410_uartcfg smdk2443_uartcfgs[] __initdata = { | |||
103 | 104 | ||
104 | static struct platform_device *smdk2443_devices[] __initdata = { | 105 | static struct platform_device *smdk2443_devices[] __initdata = { |
105 | &s3c_device_wdt, | 106 | &s3c_device_wdt, |
106 | &s3c_device_i2c, | 107 | &s3c_device_i2c0, |
107 | &s3c_device_hsmmc, | 108 | &s3c_device_hsmmc0, |
108 | }; | 109 | }; |
109 | 110 | ||
110 | static void __init smdk2443_map_io(void) | 111 | static void __init smdk2443_map_io(void) |
@@ -116,6 +117,7 @@ static void __init smdk2443_map_io(void) | |||
116 | 117 | ||
117 | static void __init smdk2443_machine_init(void) | 118 | static void __init smdk2443_machine_init(void) |
118 | { | 119 | { |
120 | s3c_i2c0_set_platdata(NULL); | ||
119 | platform_add_devices(smdk2443_devices, ARRAY_SIZE(smdk2443_devices)); | 121 | platform_add_devices(smdk2443_devices, ARRAY_SIZE(smdk2443_devices)); |
120 | smdk_machine_init(); | 122 | smdk_machine_init(); |
121 | } | 123 | } |
diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index bbeddf9ddcb1..ce2ec3298930 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c | |||
@@ -81,10 +81,9 @@ void __init s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
81 | * machine specific initialisation. | 81 | * machine specific initialisation. |
82 | */ | 82 | */ |
83 | 83 | ||
84 | void __init s3c2443_map_io(struct map_desc *mach_desc, int mach_size) | 84 | void __init s3c2443_map_io(void) |
85 | { | 85 | { |
86 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); | 86 | iotable_init(s3c2443_iodesc, ARRAY_SIZE(s3c2443_iodesc)); |
87 | iotable_init(mach_desc, mach_size); | ||
88 | } | 87 | } |
89 | 88 | ||
90 | /* need to register class before we actually register the device, and | 89 | /* need to register class before we actually register the device, and |
diff --git a/arch/arm/mach-s3c24a0/include/mach/debug-macro.S b/arch/arm/mach-s3c24a0/include/mach/debug-macro.S new file mode 100644 index 000000000000..f0ef0ab475f6 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/debug-macro.S | |||
@@ -0,0 +1,28 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/debug-macro.S | ||
2 | * | ||
3 | * This program is free software; you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License version 2 as | ||
5 | * published by the Free Software Foundation. | ||
6 | */ | ||
7 | |||
8 | /* pull in the relevant register and map files. */ | ||
9 | |||
10 | #include <mach/map.h> | ||
11 | #include <plat/regs-serial.h> | ||
12 | |||
13 | .macro addruart, rx | ||
14 | mrc p15, 0, \rx, c1, c0 | ||
15 | tst \rx, #1 | ||
16 | ldreq \rx, = S3C24XX_PA_UART | ||
17 | ldrne \rx, = S3C24XX_VA_UART | ||
18 | #if CONFIG_DEBUG_S3C_UART != 0 | ||
19 | add \rx, \rx, #(S3C2410_UART1_OFF * CONFIG_DEBUG_S3C_UART) | ||
20 | #endif | ||
21 | .endm | ||
22 | |||
23 | /* include the reset of the code which will do the work, we're only | ||
24 | * compiling for a single cpu processor type so the default of s3c2440 | ||
25 | * will be fine with us. | ||
26 | */ | ||
27 | |||
28 | #include <plat/debug-macro.S> | ||
diff --git a/arch/arm/mach-s3c24a0/include/mach/irqs.h b/arch/arm/mach-s3c24a0/include/mach/irqs.h new file mode 100644 index 000000000000..ae8c0e359783 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/irqs.h | |||
@@ -0,0 +1,115 @@ | |||
1 | /* linux/arch/arm/mach-s3c24a0/include/mach/irqs.h | ||
2 | * | ||
3 | * Copyright (c) 2003-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
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 | #ifndef __ASM_ARCH_24A0_IRQS_H | ||
13 | #define __ASM_ARCH_24A0_IRQS_H __FILE__ | ||
14 | |||
15 | #define IRQ_EINT0t2 S3C2410_IRQ(0) /* 16 */ | ||
16 | /* for generic entry-macro.S */ | ||
17 | #define IRQ_EINT0 IRQ_EINT0t2 | ||
18 | |||
19 | #define IRQ_EINT3t6 S3C2410_IRQ(1) | ||
20 | #define IRQ_EINT7t10 S3C2410_IRQ(2) | ||
21 | #define IRQ_EINT11t14 S3C2410_IRQ(3) | ||
22 | #define IRQ_EINT15t18 S3C2410_IRQ(4) /* 20 */ | ||
23 | #define IRQ_TICK S3C2410_IRQ(5) | ||
24 | #define IRQ_DCTQ S3C2410_IRQ(6) | ||
25 | #define IRQ_MC S3C2410_IRQ(7) | ||
26 | #define IRQ_ME S3C2410_IRQ(8) /* 24 */ | ||
27 | #define IRQ_KEYPAD S3C2410_IRQ(9) | ||
28 | #define IRQ_TIMER0 S3C2410_IRQ(10) | ||
29 | #define IRQ_TIMER1 S3C2410_IRQ(11) | ||
30 | #define IRQ_TIMER2 S3C2410_IRQ(12) | ||
31 | #define IRQ_TIMER3_4 S3C2410_IRQ(13) | ||
32 | #define IRQ_OS_TIMER IRQ_TIMER3_4 | ||
33 | #define IRQ_LCD S3C2410_IRQ(14) | ||
34 | #define IRQ_CAM_C S3C2410_IRQ(15) | ||
35 | #define IRQ_WDT_BATFLT S3C2410_IRQ(16) /* 32 */ | ||
36 | #define IRQ_UART0 S3C2410_IRQ(17) | ||
37 | #define IRQ_CAM_P S3C2410_IRQ(18) | ||
38 | #define IRQ_MODEM S3C2410_IRQ(19) | ||
39 | #define IRQ_DMA S3C2410_IRQ(20) | ||
40 | #define IRQ_SDI S3C2410_IRQ(21) | ||
41 | #define IRQ_SPI0 S3C2410_IRQ(22) | ||
42 | #define IRQ_UART1 S3C2410_IRQ(23) | ||
43 | #define IRQ_AC97_NFLASH S3C2410_IRQ(24) /* 40 */ | ||
44 | #define IRQ_USBD S3C2410_IRQ(25) | ||
45 | #define IRQ_USBH S3C2410_IRQ(26) | ||
46 | #define IRQ_IIC S3C2410_IRQ(27) | ||
47 | #define IRQ_IRDA_MSTICK S3C2410_IRQ(28) /* 44 */ | ||
48 | #define IRQ_VLX_SPI1 S3C2410_IRQ(29) | ||
49 | #define IRQ_RTC S3C2410_IRQ(30) /* 46 */ | ||
50 | #define IRQ_ADC_PEN S3C2410_IRQ(31) | ||
51 | |||
52 | /* interrupts generated from the external interrupts sources */ | ||
53 | #define IRQ_EINT00 S3C2410_IRQ(32) /* 48 */ | ||
54 | #define IRQ_EINT1 S3C2410_IRQ(33) | ||
55 | #define IRQ_EINT2 S3C2410_IRQ(34) | ||
56 | #define IRQ_EINT3 S3C2410_IRQ(35) | ||
57 | #define IRQ_EINT4 S3C2410_IRQ(36) | ||
58 | #define IRQ_EINT5 S3C2410_IRQ(37) | ||
59 | #define IRQ_EINT6 S3C2410_IRQ(38) | ||
60 | #define IRQ_EINT7 S3C2410_IRQ(39) | ||
61 | #define IRQ_EINT8 S3C2410_IRQ(40) | ||
62 | #define IRQ_EINT9 S3C2410_IRQ(41) | ||
63 | #define IRQ_EINT10 S3C2410_IRQ(42) | ||
64 | #define IRQ_EINT11 S3C2410_IRQ(43) | ||
65 | #define IRQ_EINT12 S3C2410_IRQ(44) | ||
66 | #define IRQ_EINT13 S3C2410_IRQ(45) | ||
67 | #define IRQ_EINT14 S3C2410_IRQ(46) | ||
68 | #define IRQ_EINT15 S3C2410_IRQ(47) | ||
69 | #define IRQ_EINT16 S3C2410_IRQ(48) | ||
70 | #define IRQ_EINT17 S3C2410_IRQ(49) | ||
71 | #define IRQ_EINT18 S3C2410_IRQ(50) | ||
72 | |||
73 | /* SUB IRQS */ | ||
74 | #define IRQ_S3CUART_RX0 S3C2410_IRQ(51) /* 67 */ | ||
75 | #define IRQ_S3CUART_TX0 S3C2410_IRQ(52) | ||
76 | #define IRQ_S3CUART_ERR0 S3C2410_IRQ(53) | ||
77 | |||
78 | #define IRQ_S3CUART_RX1 S3C2410_IRQ(54) | ||
79 | #define IRQ_S3CUART_TX1 S3C2410_IRQ(55) | ||
80 | #define IRQ_S3CUART_ERR1 S3C2410_IRQ(56) | ||
81 | |||
82 | #define IRQ_S3CUART_RX2 (0x0) | ||
83 | #define IRQ_S3CUART_TX2 (0x0) | ||
84 | #define IRQ_S3CUART_ERR2 (0x0) | ||
85 | |||
86 | |||
87 | #define IRQ_IRDA S3C2410_IRQ(57) | ||
88 | #define IRQ_MSTICK S3C2410_IRQ(58) | ||
89 | #define IRQ_RESERVED0 S3C2410_IRQ(59) | ||
90 | #define IRQ_RESERVED1 S3C2410_IRQ(60) | ||
91 | #define IRQ_RESERVED2 S3C2410_IRQ(61) | ||
92 | #define IRQ_TIMER3 S3C2410_IRQ(62) | ||
93 | #define IRQ_TIMER4 S3C2410_IRQ(63) | ||
94 | #define IRQ_WDT S3C2410_IRQ(64) | ||
95 | #define IRQ_BATFLT S3C2410_IRQ(65) | ||
96 | #define IRQ_POST S3C2410_IRQ(66) | ||
97 | #define IRQ_DISP_FIFO S3C2410_IRQ(67) | ||
98 | #define IRQ_PENUP S3C2410_IRQ(68) | ||
99 | #define IRQ_PENDN S3C2410_IRQ(69) | ||
100 | #define IRQ_ADC S3C2410_IRQ(70) | ||
101 | #define IRQ_DISP_FRAME S3C2410_IRQ(71) | ||
102 | #define IRQ_NFLASH S3C2410_IRQ(72) | ||
103 | #define IRQ_AC97 S3C2410_IRQ(73) | ||
104 | #define IRQ_SPI1 S3C2410_IRQ(74) | ||
105 | #define IRQ_VLX S3C2410_IRQ(75) | ||
106 | #define IRQ_DMA0 S3C2410_IRQ(76) | ||
107 | #define IRQ_DMA1 S3C2410_IRQ(77) | ||
108 | #define IRQ_DMA2 S3C2410_IRQ(78) | ||
109 | #define IRQ_DMA3 S3C2410_IRQ(79) | ||
110 | |||
111 | #define IRQ_TC (0x0) | ||
112 | |||
113 | #define NR_IRQS (IRQ_DMA3+1) | ||
114 | |||
115 | #endif /* __ASM_ARCH_24A0_IRQS_H */ | ||
diff --git a/arch/arm/mach-s3c24a0/include/mach/map.h b/arch/arm/mach-s3c24a0/include/mach/map.h new file mode 100644 index 000000000000..a01132717e34 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/map.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* linux/arch/arm/mach-s3c24a0/include/mach/map.h | ||
2 | * | ||
3 | * Copyright 2003,2007 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C24A0 - Memory map definitions | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_24A0_MAP_H | ||
15 | #define __ASM_ARCH_24A0_MAP_H __FILE__ | ||
16 | |||
17 | #include <plat/map-base.h> | ||
18 | #include <plat/map.h> | ||
19 | |||
20 | #define S3C24A0_PA_IO_BASE (0x40000000) | ||
21 | #define S3C24A0_PA_CLKPWR (0x40000000) | ||
22 | #define S3C24A0_PA_IRQ (0x40200000) | ||
23 | #define S3C24A0_PA_DMA (0x40400000) | ||
24 | #define S3C24A0_PA_MEMCTRL (0x40C00000) | ||
25 | #define S3C24A0_PA_NAND (0x40C00000) | ||
26 | #define S3C24A0_PA_SROM (0x40C20000) | ||
27 | #define S3C24A0_PA_SDRAM (0x40C40000) | ||
28 | #define S3C24A0_PA_BUSM (0x40CE0000) | ||
29 | #define S3C24A0_PA_USBHOST (0x41000000) | ||
30 | #define S3C24A0_PA_MODEMIF (0x41180000) | ||
31 | #define S3C24A0_PA_IRDA (0x41800000) | ||
32 | #define S3C24A0_PA_TIMER (0x44000000) | ||
33 | #define S3C24A0_PA_WATCHDOG (0x44100000) | ||
34 | #define S3C24A0_PA_RTC (0x44200000) | ||
35 | #define S3C24A0_PA_UART (0x44400000) | ||
36 | #define S3C24A0_PA_UART0 (S3C24A0_PA_UART) | ||
37 | #define S3C24A0_PA_UART1 (S3C24A0_PA_UART + 0x4000) | ||
38 | #define S3C24A0_PA_SPI (0x44500000) | ||
39 | #define S3C24A0_PA_IIC (0x44600000) | ||
40 | #define S3C24A0_PA_IIS (0x44700000) | ||
41 | #define S3C24A0_PA_GPIO (0x44800000) | ||
42 | #define S3C24A0_PA_KEYIF (0x44900000) | ||
43 | #define S3C24A0_PA_USBDEV (0x44A00000) | ||
44 | #define S3C24A0_PA_AC97 (0x45000000) | ||
45 | #define S3C24A0_PA_ADC (0x45800000) | ||
46 | #define S3C24A0_PA_SDI (0x46000000) | ||
47 | #define S3C24A0_PA_MS (0x46100000) | ||
48 | #define S3C24A0_PA_LCD (0x4A000000) | ||
49 | #define S3C24A0_PA_VPOST (0x4A100000) | ||
50 | |||
51 | /* physical addresses of all the chip-select areas */ | ||
52 | |||
53 | #define S3C24A0_CS0 (0x00000000) | ||
54 | #define S3C24A0_CS1 (0x04000000) | ||
55 | #define S3C24A0_CS2 (0x08000000) | ||
56 | #define S3C24A0_CS3 (0x0C000000) | ||
57 | #define S3C24A0_CS4 (0x10000000) | ||
58 | #define S3C24A0_CS5 (0x40000000) | ||
59 | |||
60 | #define S3C24A0_SDRAM_PA (S3C24A0_CS4) | ||
61 | |||
62 | /* Use a single interface for common resources between S3C24XX cpus */ | ||
63 | |||
64 | #define S3C24XX_PA_IRQ S3C24A0_PA_IRQ | ||
65 | #define S3C24XX_PA_MEMCTRL S3C24A0_PA_MEMCTRL | ||
66 | #define S3C24XX_PA_USBHOST S3C24A0_PA_USBHOST | ||
67 | #define S3C24XX_PA_DMA S3C24A0_PA_DMA | ||
68 | #define S3C24XX_PA_CLKPWR S3C24A0_PA_CLKPWR | ||
69 | #define S3C24XX_PA_LCD S3C24A0_PA_LCD | ||
70 | #define S3C24XX_PA_UART S3C24A0_PA_UART | ||
71 | #define S3C24XX_PA_TIMER S3C24A0_PA_TIMER | ||
72 | #define S3C24XX_PA_USBDEV S3C24A0_PA_USBDEV | ||
73 | #define S3C24XX_PA_WATCHDOG S3C24A0_PA_WATCHDOG | ||
74 | #define S3C24XX_PA_IIS S3C24A0_PA_IIS | ||
75 | #define S3C24XX_PA_GPIO S3C24A0_PA_GPIO | ||
76 | #define S3C24XX_PA_RTC S3C24A0_PA_RTC | ||
77 | #define S3C24XX_PA_ADC S3C24A0_PA_ADC | ||
78 | #define S3C24XX_PA_SPI S3C24A0_PA_SPI | ||
79 | #define S3C24XX_PA_SDI S3C24A0_PA_SDI | ||
80 | #define S3C24XX_PA_NAND S3C24A0_PA_NAND | ||
81 | |||
82 | #define S3C_PA_UART S3C24A0_PA_UART | ||
83 | #define S3C_PA_IIC S3C24A0_PA_IIC | ||
84 | |||
85 | #endif /* __ASM_ARCH_24A0_MAP_H */ | ||
diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-s3c24a0/include/mach/memory.h new file mode 100644 index 000000000000..585211ca0187 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/memory.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* linux/arch/arm/mach-s3c24a0/include/mach/memory.h | ||
2 | * from linux/include/asm-arm/arch-rpc/memory.h | ||
3 | * | ||
4 | * Copyright (C) 1996,1997,1998 Russell King. | ||
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 | #ifndef __ASM_ARCH_24A0_MEMORY_H | ||
12 | #define __ASM_ARCH_24A0_MEMORY_H __FILE__ | ||
13 | |||
14 | #define PHYS_OFFSET UL(0x10000000) | ||
15 | |||
16 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
17 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
18 | |||
19 | #endif | ||
diff --git a/arch/arm/mach-s3c24a0/include/mach/regs-clock.h b/arch/arm/mach-s3c24a0/include/mach/regs-clock.h new file mode 100644 index 000000000000..af2abd756c30 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/regs-clock.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /* linux/arch/arm/mach-s3c24a0/include/mach/regs-clock.h | ||
2 | * | ||
3 | * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://armlinux.simtec.co.uk/ | ||
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 | * S3C24A0 clock register definitions | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_24A0_REGS_CLOCK_H | ||
14 | #define __ASM_ARCH_24A0_REGS_CLOCK_H __FILE__ | ||
15 | |||
16 | #define S3C24A0_MPLLCON S3C2410_CLKREG(0x10) | ||
17 | #define S3C24A0_UPLLCON S3C2410_CLKREG(0x14) | ||
18 | #define S3C24A0_CLKCON S3C2410_CLKREG(0x20) | ||
19 | #define S3C24A0_CLKSRC S3C2410_CLKREG(0x24) | ||
20 | #define S3C24A0_CLKDIVN S3C2410_CLKREG(0x28) | ||
21 | |||
22 | /* CLKCON register bits */ | ||
23 | |||
24 | #define S3C24A0_CLKCON_VLX (1<<29) | ||
25 | #define S3C24A0_CLKCON_VPOST (1<<28) | ||
26 | #define S3C24A0_CLKCON_WDT (1<<27) /* reserved */ | ||
27 | #define S3C24A0_CLKCON_MPEGDCTQ (1<<26) | ||
28 | #define S3C24A0_CLKCON_VPOSTIF (1<<25) | ||
29 | #define S3C24A0_CLKCON_MPEG4IF (1<<24) | ||
30 | #define S3C24A0_CLKCON_CAM_UPLL (1<<23) | ||
31 | #define S3C24A0_CLKCON_LCDC (1<<22) | ||
32 | #define S3C24A0_CLKCON_CAM_HCLK (1<<21) | ||
33 | #define S3C24A0_CLKCON_MPEG4 (1<<20) | ||
34 | #define S3C24A0_CLKCON_KEYPAD (1<<19) | ||
35 | #define S3C24A0_CLKCON_ADC (1<<18) | ||
36 | #define S3C24A0_CLKCON_SDI (1<<17) | ||
37 | #define S3C24A0_CLKCON_MS (1<<16) /* memory stick */ | ||
38 | #define S3C24A0_CLKCON_USBD (1<<15) | ||
39 | #define S3C24A0_CLKCON_GPIO (1<<14) | ||
40 | #define S3C24A0_CLKCON_IIS (1<<13) | ||
41 | #define S3C24A0_CLKCON_IIC (1<<12) | ||
42 | #define S3C24A0_CLKCON_SPI (1<<11) | ||
43 | #define S3C24A0_CLKCON_UART1 (1<<10) | ||
44 | #define S3C24A0_CLKCON_UART0 (1<<9) | ||
45 | #define S3C24A0_CLKCON_PWMT (1<<8) | ||
46 | #define S3C24A0_CLKCON_USBH (1<<7) | ||
47 | #define S3C24A0_CLKCON_AC97 (1<<6) | ||
48 | #define S3C24A0_CLKCON_IrDA (1<<4) | ||
49 | #define S3C24A0_CLKCON_IDLE (1<<2) | ||
50 | #define S3C24A0_CLKCON_MON (1<<1) | ||
51 | #define S3C24A0_CLKCON_STOP (1<<0) | ||
52 | |||
53 | /* CLKSRC register bits */ | ||
54 | |||
55 | #define S3C24A0_CLKSRC_OSC (1<<8) /* CLKSRC */ | ||
56 | #define S3C24A0_CLKSRC_UPLL (1<<7) | ||
57 | #define S3C24A0_CLKSRC_MPLL (1<<5) | ||
58 | #define S3C24A0_CLKSRC_EXT (1<<4) | ||
59 | |||
60 | /* Use a single interface with the common code, for s3c24xx */ | ||
61 | |||
62 | #define S3C2410_MPLLCON S3C24A0_MPLLCON | ||
63 | #define S3C2410_UPLLCON S3C24A0_UPLLCON | ||
64 | #define S3C2410_CLKCON S3C24A0_CLKCON | ||
65 | #define S3C2410_CLKSLOW S3C24A0_CLKSRC | ||
66 | #define S3C2410_CLKDIVN S3C24A0_CLKDIVN | ||
67 | |||
68 | #define S3C2410_CLKCON_IDLE S3C24A0_CLKCON_IDLE | ||
69 | #define S3C2410_CLKCON_POWER S3C24A0_CLKCON_STOP | ||
70 | #define S3C2410_CLKCON_LCDC S3C24A0_CLKCON_LCDC | ||
71 | #define S3C2410_CLKCON_USBH S3C24A0_CLKCON_USBH | ||
72 | #define S3C2410_CLKCON_USBD S3C24A0_CLKCON_USBD | ||
73 | #define S3C2410_CLKCON_PWMT S3C24A0_CLKCON_PWMT | ||
74 | #define S3C2410_CLKCON_SDI S3C24A0_CLKCON_SDI | ||
75 | #define S3C2410_CLKCON_UART0 S3C24A0_CLKCON_UART0 | ||
76 | #define S3C2410_CLKCON_UART1 S3C24A0_CLKCON_UART1 | ||
77 | #define S3C2410_CLKCON_GPIO S3C24A0_CLKCON_GPIO | ||
78 | #define S3C2410_CLKCON_ADC S3C24A0_CLKCON_ADC | ||
79 | #define S3C2410_CLKCON_IIC S3C24A0_CLKCON_IIC | ||
80 | #define S3C2410_CLKCON_IIS S3C24A0_CLKCON_IIS | ||
81 | #define S3C2410_CLKCON_SPI S3C24A0_CLKCON_SPI | ||
82 | |||
83 | #define S3C2410_CLKSLOW_UCLK_OFF S3C24A0_CLKSRC_UPLL | ||
84 | #define S3C2410_CLKSLOW_MPLL_OFF S3C24A0_CLKSRC_MPLL | ||
85 | #define S3C2410_CLKSLOW_SLOW (0xFF) | ||
86 | #define S3C2410_CLKSLOW_GET_SLOWVAL(x) (0x1) | ||
87 | |||
88 | #endif /* __ASM_ARCH_24A0_REGS_CLOCK_H */ | ||
diff --git a/arch/arm/mach-s3c24a0/include/mach/regs-irq.h b/arch/arm/mach-s3c24a0/include/mach/regs-irq.h new file mode 100644 index 000000000000..6086f6f189eb --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/regs-irq.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* linux/arch/arm/mach-s3c24a0/include/mach/regs-irq.h | ||
2 | * | ||
3 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://www.simtec.co.uk/products/SWLINUX/ | ||
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 | #ifndef ___ASM_ARCH_24A0_REGS_IRQ_H | ||
13 | #define ___ASM_ARCH_24A0_REGS_IRQ_H __FILE__ | ||
14 | |||
15 | |||
16 | #define S3C2410_EINTMASK S3C2410_EINTREG(0x034) | ||
17 | #define S3C2410_EINTPEND S3C2410_EINTREG(0X038) | ||
18 | |||
19 | #define S3C24XX_EINTMASK S3C24XX_EINTREG(0x034) | ||
20 | #define S3C24XX_EINTPEND S3C24XX_EINTREG(0X038) | ||
21 | |||
22 | #endif /* __ASM_ARCH_24A0_REGS_IRQ_H */ | ||
23 | |||
24 | |||
25 | |||
diff --git a/arch/arm/mach-s3c24a0/include/mach/system.h b/arch/arm/mach-s3c24a0/include/mach/system.h new file mode 100644 index 000000000000..bd1bd1957656 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/system.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* linux/arch/arm/mach-s3c24a0/include/mach/system.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C24A0 - System function defines and includes | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <mach/hardware.h> | ||
14 | #include <asm/io.h> | ||
15 | |||
16 | #include <mach/map.h> | ||
17 | |||
18 | static void arch_idle(void) | ||
19 | { | ||
20 | /* currently no specific idle support. */ | ||
21 | } | ||
22 | |||
23 | void (*s3c24xx_reset_hook)(void); | ||
24 | |||
25 | #include <asm/plat-s3c24xx/system-reset.h> | ||
diff --git a/arch/arm/mach-s3c24a0/include/mach/tick.h b/arch/arm/mach-s3c24a0/include/mach/tick.h new file mode 100644 index 000000000000..9dea8ba6fb72 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/tick.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* linux/arch/arm/mach-s3c24a0/include/mach/tick.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C24A0 - timer tick support | ||
8 | */ | ||
9 | |||
10 | #define SUBSRC_TIMER4 (1 << (IRQ_TIMER4 - IRQ_S3CUART_RX0)) | ||
11 | |||
12 | static inline int s3c24xx_ostimer_pending(void) | ||
13 | { | ||
14 | return __raw_readl(S3C2410_SUBSRCPND) & SUBSRC_TIMER4; | ||
15 | } | ||
diff --git a/arch/arm/mach-s3c24a0/include/mach/timex.h b/arch/arm/mach-s3c24a0/include/mach/timex.h new file mode 100644 index 000000000000..98573424a016 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/timex.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* linux/arch/arm/mach-s3c24a0/include/mach/timex.h | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C2410 - time parameters | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_TIMEX_H | ||
14 | #define __ASM_ARCH_TIMEX_H | ||
15 | |||
16 | #define CLOCK_TICK_RATE 12000000 | ||
17 | |||
18 | #endif /* __ASM_ARCH_TIMEX_H */ | ||
diff --git a/arch/arm/mach-s3c24a0/include/mach/vmalloc.h b/arch/arm/mach-s3c24a0/include/mach/vmalloc.h new file mode 100644 index 000000000000..4d4fe4849589 --- /dev/null +++ b/arch/arm/mach-s3c24a0/include/mach/vmalloc.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c24ao/vmalloc.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics <linux@simtec.co.uk> | ||
4 | |||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | * | ||
9 | * S3C24A0 vmalloc definition | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_VMALLOC_H | ||
13 | #define __ASM_ARCH_VMALLOC_H | ||
14 | |||
15 | #define VMALLOC_END (0xE0000000) | ||
16 | |||
17 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-s3c6400/Kconfig b/arch/arm/mach-s3c6400/Kconfig new file mode 100644 index 000000000000..6da82b5c09ba --- /dev/null +++ b/arch/arm/mach-s3c6400/Kconfig | |||
@@ -0,0 +1,8 @@ | |||
1 | # arch/arm/mach-s3c6400/Kconfig | ||
2 | # | ||
3 | # Copyright 2008 Openmoko, Inc. | ||
4 | # Simtec Electronics, Ben Dooks <ben@simtec.co.uk> | ||
5 | # | ||
6 | # Licensed under GPLv2 | ||
7 | |||
8 | # Currently nothing here, this will be added later | ||
diff --git a/arch/arm/mach-s3c6400/Makefile b/arch/arm/mach-s3c6400/Makefile new file mode 100644 index 000000000000..8f397db25b87 --- /dev/null +++ b/arch/arm/mach-s3c6400/Makefile | |||
@@ -0,0 +1,15 @@ | |||
1 | # arch/arm/mach-s3c6400/Makefile | ||
2 | # | ||
3 | # Copyright 2008 Openmoko, Inc. | ||
4 | # Copyright 2008 Simtec Electronics | ||
5 | # | ||
6 | # Licensed under GPLv2 | ||
7 | |||
8 | obj-y := | ||
9 | obj-m := | ||
10 | obj-n := | ||
11 | obj- := | ||
12 | |||
13 | # Core support for S3C6400 system | ||
14 | |||
15 | obj-n += blank.o | ||
diff --git a/arch/arm/mach-s3c6400/Makefile.boot b/arch/arm/mach-s3c6400/Makefile.boot new file mode 100644 index 000000000000..ba41fdc0a586 --- /dev/null +++ b/arch/arm/mach-s3c6400/Makefile.boot | |||
@@ -0,0 +1,2 @@ | |||
1 | zreladdr-y := 0x50008000 | ||
2 | params_phys-y := 0x50000100 | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/debug-macro.S b/arch/arm/mach-s3c6400/include/mach/debug-macro.S new file mode 100644 index 000000000000..b18ac5266dfc --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/debug-macro.S | |||
@@ -0,0 +1,39 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/debug-macro.S | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | /* pull in the relevant register and map files. */ | ||
14 | |||
15 | #include <mach/map.h> | ||
16 | #include <plat/regs-serial.h> | ||
17 | |||
18 | /* note, for the boot process to work we have to keep the UART | ||
19 | * virtual address aligned to an 1MiB boundary for the L1 | ||
20 | * mapping the head code makes. We keep the UART virtual address | ||
21 | * aligned and add in the offset when we load the value here. | ||
22 | */ | ||
23 | |||
24 | .macro addruart, rx | ||
25 | mrc p15, 0, \rx, c1, c0 | ||
26 | tst \rx, #1 | ||
27 | ldreq \rx, = S3C_PA_UART | ||
28 | ldrne \rx, = (S3C_VA_UART + S3C_PA_UART & 0xfffff) | ||
29 | #if CONFIG_DEBUG_S3C_UART != 0 | ||
30 | add \rx, \rx, #(0x400 * CONFIG_DEBUG_S3C_UART) | ||
31 | #endif | ||
32 | .endm | ||
33 | |||
34 | /* include the reset of the code which will do the work, we're only | ||
35 | * compiling for a single cpu processor type so the default of s3c2440 | ||
36 | * will be fine with us. | ||
37 | */ | ||
38 | |||
39 | #include <plat/debug-macro.S> | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/dma.h b/arch/arm/mach-s3c6400/include/mach/dma.h new file mode 100644 index 000000000000..9771ac2cb07e --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/dma.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/dma.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C6400 - DMA support | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_DMA_H | ||
12 | #define __ASM_ARCH_DMA_H __FILE__ | ||
13 | |||
14 | /* currently nothing here, placeholder */ | ||
15 | |||
16 | #endif /* __ASM_ARCH_IRQ_H */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/entry-macro.S b/arch/arm/mach-s3c6400/include/mach/entry-macro.S new file mode 100644 index 000000000000..fbd90d2cf355 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/entry-macro.S | |||
@@ -0,0 +1,44 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/entry-macro.S | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * Low-level IRQ helper macros for the Samsung S3C64XX series | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #include <asm/hardware/vic.h> | ||
16 | #include <mach/map.h> | ||
17 | #include <plat/irqs.h> | ||
18 | |||
19 | .macro disable_fiq | ||
20 | .endm | ||
21 | |||
22 | .macro get_irqnr_preamble, base, tmp | ||
23 | ldr \base, =S3C_VA_VIC0 | ||
24 | .endm | ||
25 | |||
26 | .macro arch_ret_to_user, tmp1, tmp2 | ||
27 | .endm | ||
28 | |||
29 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
30 | |||
31 | @ check the vic0 | ||
32 | mov \irqnr, # S3C_IRQ_OFFSET + 31 | ||
33 | ldr \irqstat, [ \base, # VIC_IRQ_STATUS ] | ||
34 | teq \irqstat, #0 | ||
35 | |||
36 | @ otherwise try vic1 | ||
37 | addeq \tmp, \base, #(S3C_VA_VIC1 - S3C_VA_VIC0) | ||
38 | addeq \irqnr, \irqnr, #32 | ||
39 | ldreq \irqstat, [ \tmp, # VIC_IRQ_STATUS ] | ||
40 | teqeq \irqstat, #0 | ||
41 | |||
42 | clzne \irqstat, \irqstat | ||
43 | subne \irqnr, \irqnr, \irqstat | ||
44 | .endm | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/gpio-core.h b/arch/arm/mach-s3c6400/include/mach/gpio-core.h new file mode 100644 index 000000000000..d89aae68b0a5 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/gpio-core.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/gpio-core.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX - GPIO core support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_GPIO_CORE_H | ||
16 | #define __ASM_ARCH_GPIO_CORE_H __FILE__ | ||
17 | |||
18 | /* currently we just include the platform support */ | ||
19 | #include <plat/gpio-core.h> | ||
20 | |||
21 | #endif /* __ASM_ARCH_GPIO_CORE_H */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/gpio.h b/arch/arm/mach-s3c6400/include/mach/gpio.h new file mode 100644 index 000000000000..e8e35e8fe731 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/gpio.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/gpio.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C6400 - GPIO lib support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define gpio_get_value __gpio_get_value | ||
16 | #define gpio_set_value __gpio_set_value | ||
17 | #define gpio_cansleep __gpio_cansleep | ||
18 | #define gpio_to_irq __gpio_to_irq | ||
19 | |||
20 | /* GPIO bank sizes */ | ||
21 | #define S3C64XX_GPIO_A_NR (8) | ||
22 | #define S3C64XX_GPIO_B_NR (7) | ||
23 | #define S3C64XX_GPIO_C_NR (8) | ||
24 | #define S3C64XX_GPIO_D_NR (5) | ||
25 | #define S3C64XX_GPIO_E_NR (5) | ||
26 | #define S3C64XX_GPIO_F_NR (16) | ||
27 | #define S3C64XX_GPIO_G_NR (7) | ||
28 | #define S3C64XX_GPIO_H_NR (10) | ||
29 | #define S3C64XX_GPIO_I_NR (16) | ||
30 | #define S3C64XX_GPIO_J_NR (12) | ||
31 | #define S3C64XX_GPIO_K_NR (16) | ||
32 | #define S3C64XX_GPIO_L_NR (15) | ||
33 | #define S3C64XX_GPIO_M_NR (6) | ||
34 | #define S3C64XX_GPIO_N_NR (16) | ||
35 | #define S3C64XX_GPIO_O_NR (16) | ||
36 | #define S3C64XX_GPIO_P_NR (15) | ||
37 | #define S3C64XX_GPIO_Q_NR (9) | ||
38 | |||
39 | /* GPIO bank numbes */ | ||
40 | |||
41 | /* CONFIG_S3C_GPIO_SPACE allows the user to select extra | ||
42 | * space for debugging purposes so that any accidental | ||
43 | * change from one gpio bank to another can be caught. | ||
44 | */ | ||
45 | |||
46 | #define S3C64XX_GPIO_NEXT(__gpio) \ | ||
47 | ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1) | ||
48 | |||
49 | enum s3c_gpio_number { | ||
50 | S3C64XX_GPIO_A_START = 0, | ||
51 | S3C64XX_GPIO_B_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_A), | ||
52 | S3C64XX_GPIO_C_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_B), | ||
53 | S3C64XX_GPIO_D_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_C), | ||
54 | S3C64XX_GPIO_E_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_D), | ||
55 | S3C64XX_GPIO_F_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_E), | ||
56 | S3C64XX_GPIO_G_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_F), | ||
57 | S3C64XX_GPIO_H_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_G), | ||
58 | S3C64XX_GPIO_I_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_H), | ||
59 | S3C64XX_GPIO_J_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_I), | ||
60 | S3C64XX_GPIO_K_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_J), | ||
61 | S3C64XX_GPIO_L_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_K), | ||
62 | S3C64XX_GPIO_M_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_L), | ||
63 | S3C64XX_GPIO_N_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_M), | ||
64 | S3C64XX_GPIO_O_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_N), | ||
65 | S3C64XX_GPIO_P_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_O), | ||
66 | S3C64XX_GPIO_Q_START = S3C64XX_GPIO_NEXT(S3C64XX_GPIO_P), | ||
67 | }; | ||
68 | |||
69 | /* S3C64XX GPIO number definitions. */ | ||
70 | |||
71 | #define S3C64XX_GPA(_nr) (S3C64XX_GPIO_A_START + (_nr)) | ||
72 | #define S3C64XX_GPB(_nr) (S3C64XX_GPIO_B_START + (_nr)) | ||
73 | #define S3C64XX_GPC(_nr) (S3C64XX_GPIO_C_START + (_nr)) | ||
74 | #define S3C64XX_GPD(_nr) (S3C64XX_GPIO_D_START + (_nr)) | ||
75 | #define S3C64XX_GPE(_nr) (S3C64XX_GPIO_E_START + (_nr)) | ||
76 | #define S3C64XX_GPF(_nr) (S3C64XX_GPIO_F_START + (_nr)) | ||
77 | #define S3C64XX_GPG(_nr) (S3C64XX_GPIO_G_START + (_nr)) | ||
78 | #define S3C64XX_GPH(_nr) (S3C64XX_GPIO_H_START + (_nr)) | ||
79 | #define S3C64XX_GPI(_nr) (S3C64XX_GPIO_I_START + (_nr)) | ||
80 | #define S3C64XX_GPJ(_nr) (S3C64XX_GPIO_J_START + (_nr)) | ||
81 | #define S3C64XX_GPK(_nr) (S3C64XX_GPIO_K_START + (_nr)) | ||
82 | #define S3C64XX_GPL(_nr) (S3C64XX_GPIO_L_START + (_nr)) | ||
83 | #define S3C64XX_GPM(_nr) (S3C64XX_GPIO_M_START + (_nr)) | ||
84 | #define S3C64XX_GPN(_nr) (S3C64XX_GPIO_N_START + (_nr)) | ||
85 | #define S3C64XX_GPO(_nr) (S3C64XX_GPIO_O_START + (_nr)) | ||
86 | #define S3C64XX_GPP(_nr) (S3C64XX_GPIO_P_START + (_nr)) | ||
87 | #define S3C64XX_GPQ(_nr) (S3C64XX_GPIO_Q_START + (_nr)) | ||
88 | |||
89 | /* the end of the S3C64XX specific gpios */ | ||
90 | #define S3C64XX_GPIO_END (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1) | ||
91 | #define S3C_GPIO_END S3C64XX_GPIO_END | ||
92 | |||
93 | /* define the number of gpios we need to the one after the GPQ() range */ | ||
94 | #define ARCH_NR_GPIOS (S3C64XX_GPQ(S3C64XX_GPIO_Q_NR) + 1) | ||
95 | |||
96 | #include <asm-generic/gpio.h> | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/hardware.h b/arch/arm/mach-s3c6400/include/mach/hardware.h new file mode 100644 index 000000000000..862d033e57a4 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/hardware.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/hardware.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C6400 - Hardware support | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_HARDWARE_H | ||
12 | #define __ASM_ARCH_HARDWARE_H __FILE__ | ||
13 | |||
14 | /* currently nothing here, placeholder */ | ||
15 | |||
16 | #endif /* __ASM_ARCH_IRQ_H */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/irqs.h b/arch/arm/mach-s3c6400/include/mach/irqs.h new file mode 100644 index 000000000000..b38c47cffc28 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/irqs.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/irqs.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C6400 - IRQ definitions | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_IRQS_H | ||
12 | #define __ASM_ARCH_IRQS_H __FILE__ | ||
13 | |||
14 | #ifndef __ASM_ARM_IRQ_H | ||
15 | #error "Do not include this directly, instead #include <asm/irq.h>" | ||
16 | #endif | ||
17 | |||
18 | #include <plat/irqs.h> | ||
19 | |||
20 | #endif /* __ASM_ARCH_IRQ_H */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/map.h b/arch/arm/mach-s3c6400/include/mach/map.h new file mode 100644 index 000000000000..cff27d813fc6 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/map.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/map.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C64XX - Memory map definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_MAP_H | ||
16 | #define __ASM_ARCH_MAP_H __FILE__ | ||
17 | |||
18 | #include <plat/map-base.h> | ||
19 | |||
20 | /* HSMMC units */ | ||
21 | #define S3C64XX_PA_HSMMC(x) (0x7C200000 + ((x) * 0x100000)) | ||
22 | #define S3C64XX_PA_HSMMC0 S3C64XX_PA_HSMMC(0) | ||
23 | #define S3C64XX_PA_HSMMC1 S3C64XX_PA_HSMMC(1) | ||
24 | #define S3C64XX_PA_HSMMC2 S3C64XX_PA_HSMMC(2) | ||
25 | |||
26 | #define S3C_PA_UART (0x7F005000) | ||
27 | #define S3C_PA_UART0 (S3C_PA_UART + 0x00) | ||
28 | #define S3C_PA_UART1 (S3C_PA_UART + 0x400) | ||
29 | #define S3C_PA_UART2 (S3C_PA_UART + 0x800) | ||
30 | #define S3C_PA_UART3 (S3C_PA_UART + 0xC00) | ||
31 | #define S3C_UART_OFFSET (0x400) | ||
32 | |||
33 | /* See notes on UART VA mapping in debug-macro.S */ | ||
34 | #define S3C_VA_UARTx(x) (S3C_VA_UART + (S3C_PA_UART & 0xfffff) + ((x) * S3C_UART_OFFSET)) | ||
35 | |||
36 | #define S3C_VA_UART0 S3C_VA_UARTx(0) | ||
37 | #define S3C_VA_UART1 S3C_VA_UARTx(1) | ||
38 | #define S3C_VA_UART2 S3C_VA_UARTx(2) | ||
39 | #define S3C_VA_UART3 S3C_VA_UARTx(3) | ||
40 | |||
41 | #define S3C64XX_PA_FB (0x77100000) | ||
42 | #define S3C64XX_PA_SYSCON (0x7E00F000) | ||
43 | #define S3C64XX_PA_TIMER (0x7F006000) | ||
44 | #define S3C64XX_PA_IIC0 (0x7F004000) | ||
45 | #define S3C64XX_PA_IIC1 (0x7F00F000) | ||
46 | |||
47 | #define S3C64XX_PA_GPIO (0x7F008000) | ||
48 | #define S3C64XX_VA_GPIO S3C_ADDR(0x00500000) | ||
49 | #define S3C64XX_SZ_GPIO SZ_4K | ||
50 | |||
51 | #define S3C64XX_PA_SDRAM (0x50000000) | ||
52 | #define S3C64XX_PA_VIC0 (0x71200000) | ||
53 | #define S3C64XX_PA_VIC1 (0x71300000) | ||
54 | |||
55 | /* place VICs close together */ | ||
56 | #define S3C_VA_VIC0 (S3C_VA_IRQ + 0x00) | ||
57 | #define S3C_VA_VIC1 (S3C_VA_IRQ + 0x10000) | ||
58 | |||
59 | /* compatibiltiy defines. */ | ||
60 | #define S3C_PA_TIMER S3C64XX_PA_TIMER | ||
61 | #define S3C_PA_HSMMC0 S3C64XX_PA_HSMMC0 | ||
62 | #define S3C_PA_HSMMC1 S3C64XX_PA_HSMMC1 | ||
63 | #define S3C_PA_HSMMC2 S3C64XX_PA_HSMMC2 | ||
64 | #define S3C_PA_IIC S3C64XX_PA_IIC0 | ||
65 | #define S3C_PA_IIC1 S3C64XX_PA_IIC1 | ||
66 | #define S3C_PA_FB S3C64XX_PA_FB | ||
67 | |||
68 | #endif /* __ASM_ARCH_6400_MAP_H */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/memory.h b/arch/arm/mach-s3c6400/include/mach/memory.h new file mode 100644 index 000000000000..a3ac84a65480 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/memory.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/memory.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | #define PHYS_OFFSET UL(0x50000000) | ||
17 | |||
18 | #endif | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/pwm-clock.h b/arch/arm/mach-s3c6400/include/mach/pwm-clock.h new file mode 100644 index 000000000000..b25bedee0d52 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/pwm-clock.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/pwm-clock.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64xx - pwm clock and timer support | ||
9 | */ | ||
10 | |||
11 | /** | ||
12 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | ||
13 | * @tcfg: The timer TCFG1 register bits shifted down to 0. | ||
14 | * | ||
15 | * Return true if the given configuration from TCFG1 is a TCLK instead | ||
16 | * any of the TDIV clocks. | ||
17 | */ | ||
18 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | ||
19 | { | ||
20 | return tcfg >= S3C64XX_TCFG1_MUX_TCLK; | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * tcfg_to_divisor() - convert tcfg1 setting to a divisor | ||
25 | * @tcfg1: The tcfg1 setting, shifted down. | ||
26 | * | ||
27 | * Get the divisor value for the given tcfg1 setting. We assume the | ||
28 | * caller has already checked to see if this is not a TCLK source. | ||
29 | */ | ||
30 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | ||
31 | { | ||
32 | return 1 << tcfg1; | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * pwm_tdiv_has_div1() - does the tdiv setting have a /1 | ||
37 | * | ||
38 | * Return true if we have a /1 in the tdiv setting. | ||
39 | */ | ||
40 | static inline unsigned int pwm_tdiv_has_div1(void) | ||
41 | { | ||
42 | return 1; | ||
43 | } | ||
44 | |||
45 | /** | ||
46 | * pwm_tdiv_div_bits() - calculate TCFG1 divisor value. | ||
47 | * @div: The divisor to calculate the bit information for. | ||
48 | * | ||
49 | * Turn a divisor into the necessary bit field for TCFG1. | ||
50 | */ | ||
51 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | ||
52 | { | ||
53 | return ilog2(div); | ||
54 | } | ||
55 | |||
56 | #define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/regs-fb.h b/arch/arm/mach-s3c6400/include/mach/regs-fb.h new file mode 100644 index 000000000000..47019795ce06 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/regs-fb.h | |||
@@ -0,0 +1,259 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/regs-fb.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C64XX - new-style framebuffer register definitions | ||
9 | * | ||
10 | * This is the register set for the new style framebuffer interface | ||
11 | * found from the S3C2443 onwards and specifically the S3C64XX series | ||
12 | * S3C6400 and S3C6410. | ||
13 | * | ||
14 | * The file contains the cpu specific items which change between whichever | ||
15 | * architecture is selected. See <plat/regs-fb.h> for the core definitions | ||
16 | * that are the same. | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or modify | ||
19 | * it under the terms of the GNU General Public License version 2 as | ||
20 | * published by the Free Software Foundation. | ||
21 | */ | ||
22 | |||
23 | /* include the core definitions here, in case we really do need to | ||
24 | * override them at a later date. | ||
25 | */ | ||
26 | |||
27 | #include <plat/regs-fb.h> | ||
28 | |||
29 | #define S3C_FB_MAX_WIN (5) /* number of hardware windows available. */ | ||
30 | #define VIDCON1_FSTATUS_EVEN (1 << 15) | ||
31 | |||
32 | /* Video timing controls */ | ||
33 | #define VIDTCON0 (0x10) | ||
34 | #define VIDTCON1 (0x14) | ||
35 | #define VIDTCON2 (0x18) | ||
36 | |||
37 | /* Window position controls */ | ||
38 | |||
39 | #define WINCON(_win) (0x20 + ((_win) * 4)) | ||
40 | |||
41 | /* OSD1 and OSD4 do not have register D */ | ||
42 | |||
43 | #define VIDOSD_A(_win) (0x40 + ((_win) * 16)) | ||
44 | #define VIDOSD_B(_win) (0x44 + ((_win) * 16)) | ||
45 | #define VIDOSD_C(_win) (0x48 + ((_win) * 16)) | ||
46 | #define VIDOSD_D(_win) (0x4C + ((_win) * 16)) | ||
47 | |||
48 | /* Video buffer addresses */ | ||
49 | |||
50 | #define VIDW_BUF_START(_buff) (0xA0 + ((_buff) * 8)) | ||
51 | #define VIDW_BUF_START1(_buff) (0xA4 + ((_buff) * 8)) | ||
52 | #define VIDW_BUF_END(_buff) (0xD0 + ((_buff) * 8)) | ||
53 | #define VIDW_BUF_END1(_buff) (0xD4 + ((_buff) * 8)) | ||
54 | #define VIDW_BUF_SIZE(_buff) (0x100 + ((_buff) * 4)) | ||
55 | |||
56 | #define VIDINTCON0 (0x130) | ||
57 | |||
58 | #define WxKEYCONy(_win, _con) ((0x140 + ((_win) * 8)) + ((_con) * 4)) | ||
59 | |||
60 | /* WINCONx */ | ||
61 | |||
62 | #define WINCONx_CSCWIDTH_MASK (0x3 << 26) | ||
63 | #define WINCONx_CSCWIDTH_SHIFT (26) | ||
64 | #define WINCONx_CSCWIDTH_WIDE (0x0 << 26) | ||
65 | #define WINCONx_CSCWIDTH_NARROW (0x3 << 26) | ||
66 | |||
67 | #define WINCONx_ENLOCAL (1 << 22) | ||
68 | #define WINCONx_BUFSTATUS (1 << 21) | ||
69 | #define WINCONx_BUFSEL (1 << 20) | ||
70 | #define WINCONx_BUFAUTOEN (1 << 19) | ||
71 | #define WINCONx_YCbCr (1 << 13) | ||
72 | |||
73 | #define WINCON1_LOCALSEL_CAMIF (1 << 23) | ||
74 | |||
75 | #define WINCON2_LOCALSEL_CAMIF (1 << 23) | ||
76 | #define WINCON2_BLD_PIX (1 << 6) | ||
77 | |||
78 | #define WINCON2_ALPHA_SEL (1 << 1) | ||
79 | #define WINCON2_BPPMODE_MASK (0xf << 2) | ||
80 | #define WINCON2_BPPMODE_SHIFT (2) | ||
81 | #define WINCON2_BPPMODE_1BPP (0x0 << 2) | ||
82 | #define WINCON2_BPPMODE_2BPP (0x1 << 2) | ||
83 | #define WINCON2_BPPMODE_4BPP (0x2 << 2) | ||
84 | #define WINCON2_BPPMODE_8BPP_1232 (0x4 << 2) | ||
85 | #define WINCON2_BPPMODE_16BPP_565 (0x5 << 2) | ||
86 | #define WINCON2_BPPMODE_16BPP_A1555 (0x6 << 2) | ||
87 | #define WINCON2_BPPMODE_16BPP_I1555 (0x7 << 2) | ||
88 | #define WINCON2_BPPMODE_18BPP_666 (0x8 << 2) | ||
89 | #define WINCON2_BPPMODE_18BPP_A1665 (0x9 << 2) | ||
90 | #define WINCON2_BPPMODE_19BPP_A1666 (0xa << 2) | ||
91 | #define WINCON2_BPPMODE_24BPP_888 (0xb << 2) | ||
92 | #define WINCON2_BPPMODE_24BPP_A1887 (0xc << 2) | ||
93 | #define WINCON2_BPPMODE_25BPP_A1888 (0xd << 2) | ||
94 | #define WINCON2_BPPMODE_28BPP_A4888 (0xd << 2) | ||
95 | |||
96 | #define WINCON3_BLD_PIX (1 << 6) | ||
97 | |||
98 | #define WINCON3_ALPHA_SEL (1 << 1) | ||
99 | #define WINCON3_BPPMODE_MASK (0xf << 2) | ||
100 | #define WINCON3_BPPMODE_SHIFT (2) | ||
101 | #define WINCON3_BPPMODE_1BPP (0x0 << 2) | ||
102 | #define WINCON3_BPPMODE_2BPP (0x1 << 2) | ||
103 | #define WINCON3_BPPMODE_4BPP (0x2 << 2) | ||
104 | #define WINCON3_BPPMODE_16BPP_565 (0x5 << 2) | ||
105 | #define WINCON3_BPPMODE_16BPP_A1555 (0x6 << 2) | ||
106 | #define WINCON3_BPPMODE_16BPP_I1555 (0x7 << 2) | ||
107 | #define WINCON3_BPPMODE_18BPP_666 (0x8 << 2) | ||
108 | #define WINCON3_BPPMODE_18BPP_A1665 (0x9 << 2) | ||
109 | #define WINCON3_BPPMODE_19BPP_A1666 (0xa << 2) | ||
110 | #define WINCON3_BPPMODE_24BPP_888 (0xb << 2) | ||
111 | #define WINCON3_BPPMODE_24BPP_A1887 (0xc << 2) | ||
112 | #define WINCON3_BPPMODE_25BPP_A1888 (0xd << 2) | ||
113 | #define WINCON3_BPPMODE_28BPP_A4888 (0xd << 2) | ||
114 | |||
115 | #define VIDINTCON0_FIFIOSEL_WINDOW2 (0x10 << 5) | ||
116 | #define VIDINTCON0_FIFIOSEL_WINDOW3 (0x20 << 5) | ||
117 | #define VIDINTCON0_FIFIOSEL_WINDOW4 (0x40 << 5) | ||
118 | |||
119 | #define DITHMODE (0x170) | ||
120 | #define WINxMAP(_win) (0x180 + ((_win) * 4)) | ||
121 | |||
122 | |||
123 | #define DITHMODE_R_POS_MASK (0x3 << 5) | ||
124 | #define DITHMODE_R_POS_SHIFT (5) | ||
125 | #define DITHMODE_R_POS_8BIT (0x0 << 5) | ||
126 | #define DITHMODE_R_POS_6BIT (0x1 << 5) | ||
127 | #define DITHMODE_R_POS_5BIT (0x2 << 5) | ||
128 | |||
129 | #define DITHMODE_G_POS_MASK (0x3 << 3) | ||
130 | #define DITHMODE_G_POS_SHIFT (3) | ||
131 | #define DITHMODE_G_POS_8BIT (0x0 << 3) | ||
132 | #define DITHMODE_G_POS_6BIT (0x1 << 3) | ||
133 | #define DITHMODE_G_POS_5BIT (0x2 << 3) | ||
134 | |||
135 | #define DITHMODE_B_POS_MASK (0x3 << 1) | ||
136 | #define DITHMODE_B_POS_SHIFT (1) | ||
137 | #define DITHMODE_B_POS_8BIT (0x0 << 1) | ||
138 | #define DITHMODE_B_POS_6BIT (0x1 << 1) | ||
139 | #define DITHMODE_B_POS_5BIT (0x2 << 1) | ||
140 | |||
141 | #define DITHMODE_DITH_EN (1 << 0) | ||
142 | |||
143 | #define WPALCON (0x1A0) | ||
144 | |||
145 | #define WPALCON_W4PAL_16BPP_A555 (1 << 8) | ||
146 | #define WPALCON_W3PAL_16BPP_A555 (1 << 7) | ||
147 | #define WPALCON_W2PAL_16BPP_A555 (1 << 6) | ||
148 | |||
149 | /* Palette registers */ | ||
150 | |||
151 | #define WIN2_PAL(_entry) (0x300 + ((_entry) * 2)) | ||
152 | #define WIN3_PAL(_entry) (0x320 + ((_entry) * 2)) | ||
153 | #define WIN4_PAL(_entry) (0x340 + ((_entry) * 2)) | ||
154 | #define WIN0_PAL(_entry) (0x400 + ((_entry) * 4)) | ||
155 | #define WIN1_PAL(_entry) (0x800 + ((_entry) * 4)) | ||
156 | |||
157 | /* system specific implementation code for palette sizes, and other | ||
158 | * information that changes depending on which architecture is being | ||
159 | * compiled. | ||
160 | */ | ||
161 | |||
162 | /* return true if window _win has OSD register D */ | ||
163 | #define s3c_fb_has_osd_d(_win) ((_win) != 4 && (_win) != 0) | ||
164 | |||
165 | static inline unsigned int s3c_fb_win_pal_size(unsigned int win) | ||
166 | { | ||
167 | if (win < 2) | ||
168 | return 256; | ||
169 | if (win < 4) | ||
170 | return 16; | ||
171 | if (win == 4) | ||
172 | return 4; | ||
173 | |||
174 | BUG(); /* shouldn't get here */ | ||
175 | } | ||
176 | |||
177 | static inline int s3c_fb_validate_win_bpp(unsigned int win, unsigned int bpp) | ||
178 | { | ||
179 | /* all windows can do 1/2 bpp */ | ||
180 | |||
181 | if ((bpp == 25 || bpp == 19) && win == 0) | ||
182 | return 0; /* win 0 does not have 19 or 25bpp modes */ | ||
183 | |||
184 | if (bpp == 4 && win == 4) | ||
185 | return 0; | ||
186 | |||
187 | if (bpp == 8 && (win >= 3)) | ||
188 | return 0; /* win 3/4 cannot do 8bpp in any mode */ | ||
189 | |||
190 | return 1; | ||
191 | } | ||
192 | |||
193 | static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg) | ||
194 | { | ||
195 | switch (window) { | ||
196 | case 0: return WIN0_PAL(reg); | ||
197 | case 1: return WIN1_PAL(reg); | ||
198 | case 2: return WIN2_PAL(reg); | ||
199 | case 3: return WIN3_PAL(reg); | ||
200 | case 4: return WIN4_PAL(reg); | ||
201 | } | ||
202 | |||
203 | BUG(); | ||
204 | } | ||
205 | |||
206 | static inline int s3c_fb_pal_is16(unsigned int window) | ||
207 | { | ||
208 | return window > 1; | ||
209 | } | ||
210 | |||
211 | struct s3c_fb_palette { | ||
212 | struct fb_bitfield r; | ||
213 | struct fb_bitfield g; | ||
214 | struct fb_bitfield b; | ||
215 | struct fb_bitfield a; | ||
216 | }; | ||
217 | |||
218 | static inline void s3c_fb_init_palette(unsigned int window, | ||
219 | struct s3c_fb_palette *palette) | ||
220 | { | ||
221 | if (window < 2) { | ||
222 | /* Windows 0/1 are 8/8/8 or A/8/8/8 */ | ||
223 | palette->r.offset = 16; | ||
224 | palette->r.length = 8; | ||
225 | palette->g.offset = 8; | ||
226 | palette->g.length = 8; | ||
227 | palette->b.offset = 0; | ||
228 | palette->b.length = 8; | ||
229 | } else { | ||
230 | /* currently we assume RGB 5/6/5 */ | ||
231 | palette->r.offset = 11; | ||
232 | palette->r.length = 5; | ||
233 | palette->g.offset = 5; | ||
234 | palette->g.length = 6; | ||
235 | palette->b.offset = 0; | ||
236 | palette->b.length = 5; | ||
237 | } | ||
238 | } | ||
239 | |||
240 | /* Notes on per-window bpp settings | ||
241 | * | ||
242 | * Value Win0 Win1 Win2 Win3 Win 4 | ||
243 | * 0000 1(P) 1(P) 1(P) 1(P) 1(P) | ||
244 | * 0001 2(P) 2(P) 2(P) 2(P) 2(P) | ||
245 | * 0010 4(P) 4(P) 4(P) 4(P) -none- | ||
246 | * 0011 8(P) 8(P) -none- -none- -none- | ||
247 | * 0100 -none- 8(A232) 8(A232) -none- -none- | ||
248 | * 0101 16(565) 16(565) 16(565) 16(565) 16(565) | ||
249 | * 0110 -none- 16(A555) 16(A555) 16(A555) 16(A555) | ||
250 | * 0111 16(I555) 16(I565) 16(I555) 16(I555) 16(I555) | ||
251 | * 1000 18(666) 18(666) 18(666) 18(666) 18(666) | ||
252 | * 1001 -none- 18(A665) 18(A665) 18(A665) 16(A665) | ||
253 | * 1010 -none- 19(A666) 19(A666) 19(A666) 19(A666) | ||
254 | * 1011 24(888) 24(888) 24(888) 24(888) 24(888) | ||
255 | * 1100 -none- 24(A887) 24(A887) 24(A887) 24(A887) | ||
256 | * 1101 -none- 25(A888) 25(A888) 25(A888) 25(A888) | ||
257 | * 1110 -none- -none- -none- -none- -none- | ||
258 | * 1111 -none- -none- -none- -none- -none- | ||
259 | */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/regs-irq.h b/arch/arm/mach-s3c6400/include/mach/regs-irq.h new file mode 100644 index 000000000000..bcce68a0bb75 --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/regs-irq.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/regs-irq.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C64XX - IRQ register definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_REGS_IRQ_H | ||
16 | #define __ASM_ARCH_REGS_IRQ_H __FILE__ | ||
17 | |||
18 | #include <asm/hardware/vic.h> | ||
19 | |||
20 | #endif /* __ASM_ARCH_6400_REGS_IRQ_H */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/system.h b/arch/arm/mach-s3c6400/include/mach/system.h new file mode 100644 index 000000000000..652bbc403f0b --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/system.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/system.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C6400 - system implementation | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_SYSTEM_H | ||
12 | #define __ASM_ARCH_SYSTEM_H __FILE__ | ||
13 | |||
14 | static void arch_idle(void) | ||
15 | { | ||
16 | /* nothing here yet */ | ||
17 | } | ||
18 | |||
19 | static void arch_reset(char mode) | ||
20 | { | ||
21 | /* nothing here yet */ | ||
22 | } | ||
23 | |||
24 | #endif /* __ASM_ARCH_IRQ_H */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/tick.h b/arch/arm/mach-s3c6400/include/mach/tick.h new file mode 100644 index 000000000000..d9c0dc7014ec --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/tick.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* linux/arch/arm/mach-s3c6400/include/mach/tick.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C64XX - Timer tick support definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_TICK_H | ||
16 | #define __ASM_ARCH_TICK_H __FILE__ | ||
17 | |||
18 | /* note, the timer interrutps turn up in 2 places, the vic and then | ||
19 | * the timer block. We take the VIC as the base at the moment. | ||
20 | */ | ||
21 | static inline u32 s3c24xx_ostimer_pending(void) | ||
22 | { | ||
23 | u32 pend = __raw_readl(S3C_VA_VIC0 + VIC_RAW_STATUS); | ||
24 | return pend & 1 << (IRQ_TIMER4_VIC - S3C64XX_IRQ_VIC0(0)); | ||
25 | } | ||
26 | |||
27 | #define TICK_MAX (0xffffffff) | ||
28 | |||
29 | #endif /* __ASM_ARCH_6400_TICK_H */ | ||
diff --git a/arch/arm/mach-s3c6400/include/mach/uncompress.h b/arch/arm/mach-s3c6400/include/mach/uncompress.h new file mode 100644 index 000000000000..c6a82a20bf2a --- /dev/null +++ b/arch/arm/mach-s3c6400/include/mach/uncompress.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* arch/arm/mach-s3c6400/include/mach/uncompress.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C6400 - uncompress code | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
16 | #define __ASM_ARCH_UNCOMPRESS_H | ||
17 | |||
18 | #include <mach/map.h> | ||
19 | #include <plat/uncompress.h> | ||
20 | |||
21 | static void arch_detect_cpu(void) | ||
22 | { | ||
23 | /* we do not need to do any cpu detection here at the moment. */ | ||
24 | fifo_mask = S3C2440_UFSTAT_TXMASK; | ||
25 | fifo_max = 63 << S3C2440_UFSTAT_TXSHIFT; | ||
26 | } | ||
27 | |||
28 | #endif /* __ASM_ARCH_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-s3c6410/Kconfig b/arch/arm/mach-s3c6410/Kconfig new file mode 100644 index 000000000000..1d5010070027 --- /dev/null +++ b/arch/arm/mach-s3c6410/Kconfig | |||
@@ -0,0 +1,62 @@ | |||
1 | # arch/arm/mach-s3c6410/Kconfig | ||
2 | # | ||
3 | # Copyright 2008 Openmoko, Inc. | ||
4 | # Copyright 2008 Simtec Electronics | ||
5 | # | ||
6 | # Licensed under GPLv2 | ||
7 | |||
8 | # Configuration options for the S3C6410 CPU | ||
9 | |||
10 | config CPU_S3C6410 | ||
11 | bool | ||
12 | select CPU_S3C6400_INIT | ||
13 | select CPU_S3C6400_CLOCK | ||
14 | help | ||
15 | Enable S3C6410 CPU support | ||
16 | |||
17 | config S3C6410_SETUP_SDHCI | ||
18 | bool | ||
19 | help | ||
20 | Internal helper functions for S3C6410 based SDHCI systems | ||
21 | |||
22 | config MACH_SMDK6410 | ||
23 | bool "SMDK6410" | ||
24 | select CPU_S3C6410 | ||
25 | select S3C_DEV_HSMMC | ||
26 | select S3C_DEV_HSMMC1 | ||
27 | select S3C_DEV_I2C1 | ||
28 | select S3C_DEV_FB | ||
29 | select S3C6410_SETUP_SDHCI | ||
30 | select S3C64XX_SETUP_I2C1 | ||
31 | select S3C64XX_SETUP_FB_24BPP | ||
32 | help | ||
33 | Machine support for the Samsung SMDK6410 | ||
34 | |||
35 | # At least some of the SMDK6410s were shipped with the card detect | ||
36 | # for the MMC/SD slots connected to the same input. This means that | ||
37 | # either the boards need to be altered to have channel0 to an alternate | ||
38 | # configuration or that only one slot can be used. | ||
39 | |||
40 | choice | ||
41 | prompt "SMDK6410 MMC/SD slot setup" | ||
42 | depends on MACH_SMDK6410 | ||
43 | |||
44 | config SMDK6410_SD_CH0 | ||
45 | bool "Use channel 0 only" | ||
46 | depends on MACH_SMDK6410 | ||
47 | help | ||
48 | Select CON7 (channel 0) as the MMC/SD slot, as | ||
49 | at least some SMDK6410 boards come with the | ||
50 | resistors fitted so that the card detects for | ||
51 | channels 0 and 1 are the same. | ||
52 | |||
53 | config SMDK6410_SD_CH1 | ||
54 | bool "Use channel 1 only" | ||
55 | depends on MACH_SMDK6410 | ||
56 | help | ||
57 | Select CON6 (channel 1) as the MMC/SD slot, as | ||
58 | at least some SMDK6410 boards come with the | ||
59 | resistors fitted so that the card detects for | ||
60 | channels 0 and 1 are the same. | ||
61 | |||
62 | endchoice | ||
diff --git a/arch/arm/mach-s3c6410/Makefile b/arch/arm/mach-s3c6410/Makefile new file mode 100644 index 000000000000..2cd4f189036b --- /dev/null +++ b/arch/arm/mach-s3c6410/Makefile | |||
@@ -0,0 +1,23 @@ | |||
1 | # arch/arm/plat-s3c6410/Makefile | ||
2 | # | ||
3 | # Copyright 2008 Openmoko, Inc. | ||
4 | # Copyright 2008 Simtec Electronics | ||
5 | # | ||
6 | # Licensed under GPLv2 | ||
7 | |||
8 | obj-y := | ||
9 | obj-m := | ||
10 | obj-n := | ||
11 | obj- := | ||
12 | |||
13 | # Core support for S3C6410 system | ||
14 | |||
15 | obj-$(CONFIG_CPU_S3C6410) += cpu.o | ||
16 | |||
17 | # Helper and device support | ||
18 | |||
19 | obj-$(CONFIG_S3C6410_SETUP_SDHCI) += setup-sdhci.o | ||
20 | |||
21 | # machine support | ||
22 | |||
23 | obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o | ||
diff --git a/arch/arm/mach-s3c6410/cpu.c b/arch/arm/mach-s3c6410/cpu.c new file mode 100644 index 000000000000..6a73ca6b7a3a --- /dev/null +++ b/arch/arm/mach-s3c6410/cpu.c | |||
@@ -0,0 +1,101 @@ | |||
1 | /* linux/arch/arm/mach-s3c6410/cpu.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/list.h> | ||
17 | #include <linux/timer.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/clk.h> | ||
20 | #include <linux/io.h> | ||
21 | #include <linux/sysdev.h> | ||
22 | #include <linux/serial_core.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | |||
25 | #include <asm/mach/arch.h> | ||
26 | #include <asm/mach/map.h> | ||
27 | #include <asm/mach/irq.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <asm/irq.h> | ||
31 | |||
32 | #include <plat/cpu-freq.h> | ||
33 | #include <plat/regs-serial.h> | ||
34 | |||
35 | #include <plat/cpu.h> | ||
36 | #include <plat/devs.h> | ||
37 | #include <plat/clock.h> | ||
38 | #include <plat/sdhci.h> | ||
39 | #include <plat/iic-core.h> | ||
40 | #include <plat/s3c6400.h> | ||
41 | #include <plat/s3c6410.h> | ||
42 | |||
43 | /* Initial IO mappings */ | ||
44 | |||
45 | static struct map_desc s3c6410_iodesc[] __initdata = { | ||
46 | }; | ||
47 | |||
48 | /* s3c6410_map_io | ||
49 | * | ||
50 | * register the standard cpu IO areas | ||
51 | */ | ||
52 | |||
53 | void __init s3c6410_map_io(void) | ||
54 | { | ||
55 | iotable_init(s3c6410_iodesc, ARRAY_SIZE(s3c6410_iodesc)); | ||
56 | |||
57 | /* initialise device information early */ | ||
58 | s3c6410_default_sdhci0(); | ||
59 | s3c6410_default_sdhci1(); | ||
60 | |||
61 | /* the i2c devices are directly compatible with s3c2440 */ | ||
62 | s3c_i2c0_setname("s3c2440-i2c"); | ||
63 | s3c_i2c1_setname("s3c2440-i2c"); | ||
64 | } | ||
65 | |||
66 | void __init s3c6410_init_clocks(int xtal) | ||
67 | { | ||
68 | printk(KERN_DEBUG "%s: initialising clocks\n", __func__); | ||
69 | s3c24xx_register_baseclocks(xtal); | ||
70 | s3c64xx_register_clocks(); | ||
71 | s3c6400_register_clocks(); | ||
72 | s3c6400_setup_clocks(); | ||
73 | } | ||
74 | |||
75 | void __init s3c6410_init_irq(void) | ||
76 | { | ||
77 | /* VIC0 is missing IRQ7, VIC1 is fully populated. */ | ||
78 | s3c64xx_init_irq(~0 & ~(1 << 7), ~0); | ||
79 | } | ||
80 | |||
81 | struct sysdev_class s3c6410_sysclass = { | ||
82 | .name = "s3c6410-core", | ||
83 | }; | ||
84 | |||
85 | static struct sys_device s3c6410_sysdev = { | ||
86 | .cls = &s3c6410_sysclass, | ||
87 | }; | ||
88 | |||
89 | static int __init s3c6410_core_init(void) | ||
90 | { | ||
91 | return sysdev_class_register(&s3c6410_sysclass); | ||
92 | } | ||
93 | |||
94 | core_initcall(s3c6410_core_init); | ||
95 | |||
96 | int __init s3c6410_init(void) | ||
97 | { | ||
98 | printk("S3C6410: Initialising architecture\n"); | ||
99 | |||
100 | return sysdev_register(&s3c6410_sysdev); | ||
101 | } | ||
diff --git a/arch/arm/mach-s3c6410/mach-smdk6410.c b/arch/arm/mach-s3c6410/mach-smdk6410.c new file mode 100644 index 000000000000..3c4d47145c83 --- /dev/null +++ b/arch/arm/mach-s3c6410/mach-smdk6410.c | |||
@@ -0,0 +1,185 @@ | |||
1 | /* linux/arch/arm/mach-s3c6410/mach-smdk6410.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/list.h> | ||
18 | #include <linux/timer.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/serial_core.h> | ||
21 | #include <linux/platform_device.h> | ||
22 | #include <linux/io.h> | ||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/fb.h> | ||
25 | #include <linux/gpio.h> | ||
26 | #include <linux/delay.h> | ||
27 | |||
28 | #include <video/platform_lcd.h> | ||
29 | |||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/mach/map.h> | ||
32 | #include <asm/mach/irq.h> | ||
33 | |||
34 | #include <mach/hardware.h> | ||
35 | #include <mach/regs-fb.h> | ||
36 | #include <mach/map.h> | ||
37 | |||
38 | #include <asm/irq.h> | ||
39 | #include <asm/mach-types.h> | ||
40 | |||
41 | #include <plat/regs-serial.h> | ||
42 | #include <plat/iic.h> | ||
43 | #include <plat/fb.h> | ||
44 | |||
45 | #include <plat/s3c6410.h> | ||
46 | #include <plat/clock.h> | ||
47 | #include <plat/devs.h> | ||
48 | #include <plat/cpu.h> | ||
49 | |||
50 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | ||
51 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB | ||
52 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE | ||
53 | |||
54 | static struct s3c2410_uartcfg smdk6410_uartcfgs[] __initdata = { | ||
55 | [0] = { | ||
56 | .hwport = 0, | ||
57 | .flags = 0, | ||
58 | .ucon = 0x3c5, | ||
59 | .ulcon = 0x03, | ||
60 | .ufcon = 0x51, | ||
61 | }, | ||
62 | [1] = { | ||
63 | .hwport = 1, | ||
64 | .flags = 0, | ||
65 | .ucon = 0x3c5, | ||
66 | .ulcon = 0x03, | ||
67 | .ufcon = 0x51, | ||
68 | }, | ||
69 | }; | ||
70 | |||
71 | /* framebuffer and LCD setup. */ | ||
72 | |||
73 | /* GPF15 = LCD backlight control | ||
74 | * GPF13 => Panel power | ||
75 | * GPN5 = LCD nRESET signal | ||
76 | * PWM_TOUT1 => backlight brightness | ||
77 | */ | ||
78 | |||
79 | static void smdk6410_lcd_power_set(struct plat_lcd_data *pd, | ||
80 | unsigned int power) | ||
81 | { | ||
82 | if (power) { | ||
83 | gpio_direction_output(S3C64XX_GPF(13), 1); | ||
84 | gpio_direction_output(S3C64XX_GPF(15), 1); | ||
85 | |||
86 | /* fire nRESET on power up */ | ||
87 | gpio_direction_output(S3C64XX_GPN(5), 0); | ||
88 | msleep(10); | ||
89 | gpio_direction_output(S3C64XX_GPN(5), 1); | ||
90 | msleep(1); | ||
91 | } else { | ||
92 | gpio_direction_output(S3C64XX_GPF(15), 0); | ||
93 | gpio_direction_output(S3C64XX_GPF(13), 0); | ||
94 | } | ||
95 | } | ||
96 | |||
97 | static struct plat_lcd_data smdk6410_lcd_power_data = { | ||
98 | .set_power = smdk6410_lcd_power_set, | ||
99 | }; | ||
100 | |||
101 | static struct platform_device smdk6410_lcd_powerdev = { | ||
102 | .name = "platform-lcd", | ||
103 | .dev.parent = &s3c_device_fb.dev, | ||
104 | .dev.platform_data = &smdk6410_lcd_power_data, | ||
105 | }; | ||
106 | |||
107 | static struct s3c_fb_pd_win smdk6410_fb_win0 = { | ||
108 | /* this is to ensure we use win0 */ | ||
109 | .win_mode = { | ||
110 | .pixclock = 41094, | ||
111 | .left_margin = 8, | ||
112 | .right_margin = 13, | ||
113 | .upper_margin = 7, | ||
114 | .lower_margin = 5, | ||
115 | .hsync_len = 3, | ||
116 | .vsync_len = 1, | ||
117 | .xres = 800, | ||
118 | .yres = 480, | ||
119 | }, | ||
120 | .max_bpp = 32, | ||
121 | .default_bpp = 16, | ||
122 | }; | ||
123 | |||
124 | /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */ | ||
125 | static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = { | ||
126 | .setup_gpio = s3c64xx_fb_gpio_setup_24bpp, | ||
127 | .win[0] = &smdk6410_fb_win0, | ||
128 | .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB, | ||
129 | .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, | ||
130 | }; | ||
131 | |||
132 | struct map_desc smdk6410_iodesc[] = {}; | ||
133 | |||
134 | static struct platform_device *smdk6410_devices[] __initdata = { | ||
135 | #ifdef CONFIG_SMDK6410_SD_CH0 | ||
136 | &s3c_device_hsmmc0, | ||
137 | #endif | ||
138 | #ifdef CONFIG_SMDK6410_SD_CH1 | ||
139 | &s3c_device_hsmmc1, | ||
140 | #endif | ||
141 | &s3c_device_i2c0, | ||
142 | &s3c_device_i2c1, | ||
143 | &s3c_device_fb, | ||
144 | &smdk6410_lcd_powerdev, | ||
145 | }; | ||
146 | |||
147 | static struct i2c_board_info i2c_devs0[] __initdata = { | ||
148 | { I2C_BOARD_INFO("24c08", 0x50), }, | ||
149 | { I2C_BOARD_INFO("WM8580", 0X1b), }, | ||
150 | }; | ||
151 | |||
152 | static struct i2c_board_info i2c_devs1[] __initdata = { | ||
153 | { I2C_BOARD_INFO("24c128", 0x57), }, /* Samsung S524AD0XD1 */ | ||
154 | }; | ||
155 | |||
156 | static void __init smdk6410_map_io(void) | ||
157 | { | ||
158 | s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc)); | ||
159 | s3c24xx_init_clocks(12000000); | ||
160 | s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs)); | ||
161 | } | ||
162 | |||
163 | static void __init smdk6410_machine_init(void) | ||
164 | { | ||
165 | s3c_i2c0_set_platdata(NULL); | ||
166 | s3c_i2c1_set_platdata(NULL); | ||
167 | s3c_fb_set_platdata(&smdk6410_lcd_pdata); | ||
168 | |||
169 | i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0)); | ||
170 | i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1)); | ||
171 | |||
172 | platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); | ||
173 | } | ||
174 | |||
175 | MACHINE_START(SMDK6410, "SMDK6410") | ||
176 | /* Maintainer: Ben Dooks <ben@fluff.org> */ | ||
177 | .phys_io = S3C_PA_UART & 0xfff00000, | ||
178 | .io_pg_offst = (((u32)S3C_VA_UART) >> 18) & 0xfffc, | ||
179 | .boot_params = S3C64XX_PA_SDRAM + 0x100, | ||
180 | |||
181 | .init_irq = s3c6410_init_irq, | ||
182 | .map_io = smdk6410_map_io, | ||
183 | .init_machine = smdk6410_machine_init, | ||
184 | .timer = &s3c24xx_timer, | ||
185 | MACHINE_END | ||
diff --git a/arch/arm/mach-s3c6410/setup-sdhci.c b/arch/arm/mach-s3c6410/setup-sdhci.c new file mode 100644 index 000000000000..0b5788bd5985 --- /dev/null +++ b/arch/arm/mach-s3c6410/setup-sdhci.c | |||
@@ -0,0 +1,102 @@ | |||
1 | /* linux/arch/arm/mach-s3c6410/setup-sdhci.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C6410 - Helper functions for settign up SDHCI device(s) (HSMMC) | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/io.h> | ||
20 | |||
21 | #include <linux/mmc/card.h> | ||
22 | #include <linux/mmc/host.h> | ||
23 | |||
24 | #include <mach/gpio.h> | ||
25 | #include <plat/gpio-cfg.h> | ||
26 | #include <plat/regs-sdhci.h> | ||
27 | #include <plat/sdhci.h> | ||
28 | |||
29 | /* clock sources for the mmc bus clock, order as for the ctrl2[5..4] */ | ||
30 | |||
31 | char *s3c6410_hsmmc_clksrcs[4] = { | ||
32 | [0] = "hsmmc", | ||
33 | [1] = "hsmmc", | ||
34 | [2] = "mmc_bus", | ||
35 | /* [3] = "48m", - note not succesfully used yet */ | ||
36 | }; | ||
37 | |||
38 | void s3c6410_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width) | ||
39 | { | ||
40 | unsigned int gpio; | ||
41 | unsigned int end; | ||
42 | |||
43 | end = S3C64XX_GPG(2 + width); | ||
44 | |||
45 | /* Set all the necessary GPG pins to special-function 0 */ | ||
46 | for (gpio = S3C64XX_GPG(0); gpio < end; gpio++) { | ||
47 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
48 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
49 | } | ||
50 | |||
51 | s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); | ||
52 | s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(2)); | ||
53 | } | ||
54 | |||
55 | void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, | ||
56 | void __iomem *r, | ||
57 | struct mmc_ios *ios, | ||
58 | struct mmc_card *card) | ||
59 | { | ||
60 | u32 ctrl2, ctrl3; | ||
61 | |||
62 | /* don't need to alter anything acording to card-type */ | ||
63 | |||
64 | writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA, r + S3C64XX_SDHCI_CONTROL4); | ||
65 | |||
66 | ctrl2 = readl(r + S3C_SDHCI_CONTROL2); | ||
67 | ctrl2 &= S3C_SDHCI_CTRL2_SELBASECLK_MASK; | ||
68 | ctrl2 |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR | | ||
69 | S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK | | ||
70 | S3C_SDHCI_CTRL2_ENFBCLKRX | | ||
71 | S3C_SDHCI_CTRL2_DFCNT_NONE | | ||
72 | S3C_SDHCI_CTRL2_ENCLKOUTHOLD); | ||
73 | |||
74 | if (ios->clock < 25 * 1000000) | ||
75 | ctrl3 = (S3C_SDHCI_CTRL3_FCSEL3 | | ||
76 | S3C_SDHCI_CTRL3_FCSEL2 | | ||
77 | S3C_SDHCI_CTRL3_FCSEL1 | | ||
78 | S3C_SDHCI_CTRL3_FCSEL0); | ||
79 | else | ||
80 | ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0); | ||
81 | |||
82 | printk(KERN_INFO "%s: CTRL 2=%08x, 3=%08x\n", __func__, ctrl2, ctrl3); | ||
83 | writel(ctrl2, r + S3C_SDHCI_CONTROL2); | ||
84 | writel(ctrl3, r + S3C_SDHCI_CONTROL3); | ||
85 | } | ||
86 | |||
87 | void s3c6410_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width) | ||
88 | { | ||
89 | unsigned int gpio; | ||
90 | unsigned int end; | ||
91 | |||
92 | end = S3C64XX_GPH(2 + width); | ||
93 | |||
94 | /* Set all the necessary GPG pins to special-function 0 */ | ||
95 | for (gpio = S3C64XX_GPH(0); gpio < end; gpio++) { | ||
96 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
97 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
98 | } | ||
99 | |||
100 | s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP); | ||
101 | s3c_gpio_cfgpin(S3C64XX_GPG(6), S3C_GPIO_SFN(3)); | ||
102 | } | ||
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c index 43c30f84abf2..dab3c6347a8f 100644 --- a/arch/arm/mach-sa1100/clock.c +++ b/arch/arm/mach-sa1100/clock.c | |||
@@ -3,6 +3,7 @@ | |||
3 | */ | 3 | */ |
4 | #include <linux/module.h> | 4 | #include <linux/module.h> |
5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
6 | #include <linux/device.h> | ||
6 | #include <linux/list.h> | 7 | #include <linux/list.h> |
7 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
8 | #include <linux/err.h> | 9 | #include <linux/err.h> |
@@ -14,36 +15,39 @@ | |||
14 | #include <mach/hardware.h> | 15 | #include <mach/hardware.h> |
15 | 16 | ||
16 | /* | 17 | /* |
17 | * Very simple clock implementation - we only have one clock to | 18 | * Very simple clock implementation - we only have one clock to deal with. |
18 | * deal with at the moment, so we only match using the "name". | ||
19 | */ | 19 | */ |
20 | struct clk { | 20 | struct clk { |
21 | struct list_head node; | ||
22 | unsigned long rate; | ||
23 | const char *name; | ||
24 | unsigned int enabled; | 21 | unsigned int enabled; |
25 | void (*enable)(void); | ||
26 | void (*disable)(void); | ||
27 | }; | 22 | }; |
28 | 23 | ||
29 | static LIST_HEAD(clocks); | 24 | static void clk_gpio27_enable(void) |
30 | static DEFINE_MUTEX(clocks_mutex); | 25 | { |
26 | /* | ||
27 | * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: | ||
28 | * (SA-1110 Developer's Manual, section 9.1.2.1) | ||
29 | */ | ||
30 | GAFR |= GPIO_32_768kHz; | ||
31 | GPDR |= GPIO_32_768kHz; | ||
32 | TUCR = TUCR_3_6864MHz; | ||
33 | } | ||
34 | |||
35 | static void clk_gpio27_disable(void) | ||
36 | { | ||
37 | TUCR = 0; | ||
38 | GPDR &= ~GPIO_32_768kHz; | ||
39 | GAFR &= ~GPIO_32_768kHz; | ||
40 | } | ||
41 | |||
42 | static struct clk clk_gpio27; | ||
43 | |||
31 | static DEFINE_SPINLOCK(clocks_lock); | 44 | static DEFINE_SPINLOCK(clocks_lock); |
32 | 45 | ||
33 | struct clk *clk_get(struct device *dev, const char *id) | 46 | struct clk *clk_get(struct device *dev, const char *id) |
34 | { | 47 | { |
35 | struct clk *p, *clk = ERR_PTR(-ENOENT); | 48 | const char *devname = dev_name(dev); |
36 | |||
37 | mutex_lock(&clocks_mutex); | ||
38 | list_for_each_entry(p, &clocks, node) { | ||
39 | if (strcmp(id, p->name) == 0) { | ||
40 | clk = p; | ||
41 | break; | ||
42 | } | ||
43 | } | ||
44 | mutex_unlock(&clocks_mutex); | ||
45 | 49 | ||
46 | return clk; | 50 | return strcmp(devname, "sa1111.0") ? ERR_PTR(-ENOENT) : &clk_gpio27; |
47 | } | 51 | } |
48 | EXPORT_SYMBOL(clk_get); | 52 | EXPORT_SYMBOL(clk_get); |
49 | 53 | ||
@@ -58,7 +62,7 @@ int clk_enable(struct clk *clk) | |||
58 | 62 | ||
59 | spin_lock_irqsave(&clocks_lock, flags); | 63 | spin_lock_irqsave(&clocks_lock, flags); |
60 | if (clk->enabled++ == 0) | 64 | if (clk->enabled++ == 0) |
61 | clk->enable(); | 65 | clk_gpio27_enable(); |
62 | spin_unlock_irqrestore(&clocks_lock, flags); | 66 | spin_unlock_irqrestore(&clocks_lock, flags); |
63 | return 0; | 67 | return 0; |
64 | } | 68 | } |
@@ -72,63 +76,13 @@ void clk_disable(struct clk *clk) | |||
72 | 76 | ||
73 | spin_lock_irqsave(&clocks_lock, flags); | 77 | spin_lock_irqsave(&clocks_lock, flags); |
74 | if (--clk->enabled == 0) | 78 | if (--clk->enabled == 0) |
75 | clk->disable(); | 79 | clk_gpio27_disable(); |
76 | spin_unlock_irqrestore(&clocks_lock, flags); | 80 | spin_unlock_irqrestore(&clocks_lock, flags); |
77 | } | 81 | } |
78 | EXPORT_SYMBOL(clk_disable); | 82 | EXPORT_SYMBOL(clk_disable); |
79 | 83 | ||
80 | unsigned long clk_get_rate(struct clk *clk) | 84 | unsigned long clk_get_rate(struct clk *clk) |
81 | { | 85 | { |
82 | return clk->rate; | 86 | return 3686400; |
83 | } | 87 | } |
84 | EXPORT_SYMBOL(clk_get_rate); | 88 | EXPORT_SYMBOL(clk_get_rate); |
85 | |||
86 | |||
87 | static void clk_gpio27_enable(void) | ||
88 | { | ||
89 | /* | ||
90 | * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111: | ||
91 | * (SA-1110 Developer's Manual, section 9.1.2.1) | ||
92 | */ | ||
93 | GAFR |= GPIO_32_768kHz; | ||
94 | GPDR |= GPIO_32_768kHz; | ||
95 | TUCR = TUCR_3_6864MHz; | ||
96 | } | ||
97 | |||
98 | static void clk_gpio27_disable(void) | ||
99 | { | ||
100 | TUCR = 0; | ||
101 | GPDR &= ~GPIO_32_768kHz; | ||
102 | GAFR &= ~GPIO_32_768kHz; | ||
103 | } | ||
104 | |||
105 | static struct clk clk_gpio27 = { | ||
106 | .name = "SA1111_CLK", | ||
107 | .rate = 3686400, | ||
108 | .enable = clk_gpio27_enable, | ||
109 | .disable = clk_gpio27_disable, | ||
110 | }; | ||
111 | |||
112 | int clk_register(struct clk *clk) | ||
113 | { | ||
114 | mutex_lock(&clocks_mutex); | ||
115 | list_add(&clk->node, &clocks); | ||
116 | mutex_unlock(&clocks_mutex); | ||
117 | return 0; | ||
118 | } | ||
119 | EXPORT_SYMBOL(clk_register); | ||
120 | |||
121 | void clk_unregister(struct clk *clk) | ||
122 | { | ||
123 | mutex_lock(&clocks_mutex); | ||
124 | list_del(&clk->node); | ||
125 | mutex_unlock(&clocks_mutex); | ||
126 | } | ||
127 | EXPORT_SYMBOL(clk_unregister); | ||
128 | |||
129 | static int __init clk_init(void) | ||
130 | { | ||
131 | clk_register(&clk_gpio27); | ||
132 | return 0; | ||
133 | } | ||
134 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c index fe289997cfaf..2052eb88c961 100644 --- a/arch/arm/mach-sa1100/collie.c +++ b/arch/arm/mach-sa1100/collie.c | |||
@@ -68,23 +68,22 @@ struct platform_device colliescoop_device = { | |||
68 | }; | 68 | }; |
69 | 69 | ||
70 | static struct scoop_pcmcia_dev collie_pcmcia_scoop[] = { | 70 | static struct scoop_pcmcia_dev collie_pcmcia_scoop[] = { |
71 | { | 71 | { |
72 | .dev = &colliescoop_device.dev, | 72 | .dev = &colliescoop_device.dev, |
73 | .irq = COLLIE_IRQ_GPIO_CF_IRQ, | 73 | .irq = COLLIE_IRQ_GPIO_CF_IRQ, |
74 | .cd_irq = COLLIE_IRQ_GPIO_CF_CD, | 74 | .cd_irq = COLLIE_IRQ_GPIO_CF_CD, |
75 | .cd_irq_str = "PCMCIA0 CD", | 75 | .cd_irq_str = "PCMCIA0 CD", |
76 | }, | 76 | }, |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static struct scoop_pcmcia_config collie_pcmcia_config = { | 79 | static struct scoop_pcmcia_config collie_pcmcia_config = { |
80 | .devs = &collie_pcmcia_scoop[0], | 80 | .devs = &collie_pcmcia_scoop[0], |
81 | .num_devs = 1, | 81 | .num_devs = 1, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | |||
85 | static struct mcp_plat_data collie_mcp_data = { | 84 | static struct mcp_plat_data collie_mcp_data = { |
86 | .mccr0 = MCCR0_ADM | MCCR0_ExtClk, | 85 | .mccr0 = MCCR0_ADM | MCCR0_ExtClk, |
87 | .sclk_rate = 9216000, | 86 | .sclk_rate = 9216000, |
88 | }; | 87 | }; |
89 | 88 | ||
90 | #ifdef CONFIG_SHARP_LOCOMO | 89 | #ifdef CONFIG_SHARP_LOCOMO |
@@ -95,14 +94,14 @@ struct platform_device collie_locomo_device; | |||
95 | 94 | ||
96 | static void collie_uart_set_mctrl(struct uart_port *port, u_int mctrl) | 95 | static void collie_uart_set_mctrl(struct uart_port *port, u_int mctrl) |
97 | { | 96 | { |
98 | if (mctrl & TIOCM_RTS) | 97 | if (mctrl & TIOCM_RTS) |
99 | locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_RTS, 0); | 98 | locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_RTS, 0); |
100 | else | 99 | else |
101 | locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_RTS, 1); | 100 | locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_RTS, 1); |
102 | 101 | ||
103 | if (mctrl & TIOCM_DTR) | 102 | if (mctrl & TIOCM_DTR) |
104 | locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_DTR, 0); | 103 | locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_DTR, 0); |
105 | else | 104 | else |
106 | locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_DTR, 1); | 105 | locomo_gpio_write(&collie_locomo_device.dev, LOCOMO_GPIO_DTR, 1); |
107 | } | 106 | } |
108 | 107 | ||
diff --git a/arch/arm/mach-sa1100/collie_pm.c b/arch/arm/mach-sa1100/collie_pm.c index b1161fc80602..b39307f26b52 100644 --- a/arch/arm/mach-sa1100/collie_pm.c +++ b/arch/arm/mach-sa1100/collie_pm.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | #include <asm/hardware/scoop.h> | 28 | #include <asm/hardware/scoop.h> |
29 | #include <asm/dma.h> | 29 | #include <mach/dma.h> |
30 | #include <mach/collie.h> | 30 | #include <mach/collie.h> |
31 | #include <asm/mach/sharpsl_param.h> | 31 | #include <asm/mach/sharpsl_param.h> |
32 | #include <asm/hardware/sharpsl_pm.h> | 32 | #include <asm/hardware/sharpsl_pm.h> |
@@ -263,24 +263,24 @@ static int __init collie_pm_ucb_add(struct ucb1x00_dev *pdev) | |||
263 | } | 263 | } |
264 | 264 | ||
265 | static struct ucb1x00_driver collie_pm_ucb_driver = { | 265 | static struct ucb1x00_driver collie_pm_ucb_driver = { |
266 | .add = collie_pm_ucb_add, | 266 | .add = collie_pm_ucb_add, |
267 | }; | 267 | }; |
268 | 268 | ||
269 | static struct platform_device *collie_pm_device; | 269 | static struct platform_device *collie_pm_device; |
270 | 270 | ||
271 | static int __init collie_pm_init(void) | 271 | static int __init collie_pm_init(void) |
272 | { | 272 | { |
273 | int ret; | 273 | int ret; |
274 | 274 | ||
275 | collie_pm_device = platform_device_alloc("sharpsl-pm", -1); | 275 | collie_pm_device = platform_device_alloc("sharpsl-pm", -1); |
276 | if (!collie_pm_device) | 276 | if (!collie_pm_device) |
277 | return -ENOMEM; | 277 | return -ENOMEM; |
278 | 278 | ||
279 | collie_pm_device->dev.platform_data = &collie_pm_machinfo; | 279 | collie_pm_device->dev.platform_data = &collie_pm_machinfo; |
280 | ret = platform_device_add(collie_pm_device); | 280 | ret = platform_device_add(collie_pm_device); |
281 | 281 | ||
282 | if (ret) | 282 | if (ret) |
283 | platform_device_put(collie_pm_device); | 283 | platform_device_put(collie_pm_device); |
284 | 284 | ||
285 | if (!ret) | 285 | if (!ret) |
286 | ret = ucb1x00_register_driver(&collie_pm_ucb_driver); | 286 | ret = ucb1x00_register_driver(&collie_pm_ucb_driver); |
@@ -291,7 +291,7 @@ static int __init collie_pm_init(void) | |||
291 | static void __exit collie_pm_exit(void) | 291 | static void __exit collie_pm_exit(void) |
292 | { | 292 | { |
293 | ucb1x00_unregister_driver(&collie_pm_ucb_driver); | 293 | ucb1x00_unregister_driver(&collie_pm_ucb_driver); |
294 | platform_device_unregister(collie_pm_device); | 294 | platform_device_unregister(collie_pm_device); |
295 | } | 295 | } |
296 | 296 | ||
297 | module_init(collie_pm_init); | 297 | module_init(collie_pm_init); |
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index 244d5956312c..ef817876a5d6 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c | |||
@@ -3,17 +3,17 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2000 2001, The Delft University of Technology | 4 | * Copyright (C) 2000 2001, The Delft University of Technology |
5 | * | 5 | * |
6 | * Authors: | 6 | * Authors: |
7 | * - Johan Pouwelse (J.A.Pouwelse@its.tudelft.nl): initial version | 7 | * - Johan Pouwelse (J.A.Pouwelse@its.tudelft.nl): initial version |
8 | * - Erik Mouw (J.A.K.Mouw@its.tudelft.nl): | 8 | * - Erik Mouw (J.A.K.Mouw@its.tudelft.nl): |
9 | * - major rewrite for linux-2.3.99 | 9 | * - major rewrite for linux-2.3.99 |
10 | * - rewritten for the more generic power management scheme in | 10 | * - rewritten for the more generic power management scheme in |
11 | * linux-2.4.5-rmk1 | 11 | * linux-2.4.5-rmk1 |
12 | * | 12 | * |
13 | * This software has been developed while working on the LART | 13 | * This software has been developed while working on the LART |
14 | * computing board (http://www.lartmaker.nl/), which is | 14 | * computing board (http://www.lartmaker.nl/), which is |
15 | * sponsored by the Mobile Multi-media Communications | 15 | * sponsored by the Mobile Multi-media Communications |
16 | * (http://www.mmc.tudelft.nl/) and Ubiquitous Communications | 16 | * (http://www.mmc.tudelft.nl/) and Ubiquitous Communications |
17 | * (http://www.ubicom.tudelft.nl/) projects. | 17 | * (http://www.ubicom.tudelft.nl/) projects. |
18 | * | 18 | * |
19 | * The authors can be reached at: | 19 | * The authors can be reached at: |
@@ -36,7 +36,7 @@ | |||
36 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 36 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
37 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 37 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
38 | * GNU General Public License for more details. | 38 | * GNU General Public License for more details. |
39 | * | 39 | * |
40 | * You should have received a copy of the GNU General Public License | 40 | * You should have received a copy of the GNU General Public License |
41 | * along with this program; if not, write to the Free Software | 41 | * along with this program; if not, write to the Free Software |
42 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 42 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
@@ -44,7 +44,7 @@ | |||
44 | * | 44 | * |
45 | * Theory of operations | 45 | * Theory of operations |
46 | * ==================== | 46 | * ==================== |
47 | * | 47 | * |
48 | * Clock scaling can be used to lower the power consumption of the CPU | 48 | * Clock scaling can be used to lower the power consumption of the CPU |
49 | * core. This will give you a somewhat longer running time. | 49 | * core. This will give you a somewhat longer running time. |
50 | * | 50 | * |
@@ -58,11 +58,11 @@ | |||
58 | * MDCNFG 0xA0000000 DRAM config | 58 | * MDCNFG 0xA0000000 DRAM config |
59 | * MDCAS0 0xA0000004 Access waveform | 59 | * MDCAS0 0xA0000004 Access waveform |
60 | * MDCAS1 0xA0000008 Access waveform | 60 | * MDCAS1 0xA0000008 Access waveform |
61 | * MDCAS2 0xA000000C Access waveform | 61 | * MDCAS2 0xA000000C Access waveform |
62 | * | 62 | * |
63 | * Care must be taken to change the DRAM parameters the correct way, | 63 | * Care must be taken to change the DRAM parameters the correct way, |
64 | * because otherwise the DRAM becomes unusable and the kernel will | 64 | * because otherwise the DRAM becomes unusable and the kernel will |
65 | * crash. | 65 | * crash. |
66 | * | 66 | * |
67 | * The simple solution to avoid a kernel crash is to put the actual | 67 | * The simple solution to avoid a kernel crash is to put the actual |
68 | * clock change in ROM and jump to that code from the kernel. The main | 68 | * clock change in ROM and jump to that code from the kernel. The main |
@@ -75,7 +75,7 @@ | |||
75 | * as long as all re-configuration steps yield a valid DRAM | 75 | * as long as all re-configuration steps yield a valid DRAM |
76 | * configuration. The advantages are clear: it will run on all SA-1100 | 76 | * configuration. The advantages are clear: it will run on all SA-1100 |
77 | * platforms, and the code is very simple. | 77 | * platforms, and the code is very simple. |
78 | * | 78 | * |
79 | * If you really want to understand what is going on in | 79 | * If you really want to understand what is going on in |
80 | * sa1100_update_dram_timings(), you'll have to read sections 8.2, | 80 | * sa1100_update_dram_timings(), you'll have to read sections 8.2, |
81 | * 9.5.7.3, and 10.2 from the "Intel StrongARM SA-1100 Microprocessor | 81 | * 9.5.7.3, and 10.2 from the "Intel StrongARM SA-1100 Microprocessor |
@@ -97,7 +97,7 @@ | |||
97 | typedef struct { | 97 | typedef struct { |
98 | int speed; | 98 | int speed; |
99 | u32 mdcnfg; | 99 | u32 mdcnfg; |
100 | u32 mdcas0; | 100 | u32 mdcas0; |
101 | u32 mdcas1; | 101 | u32 mdcas1; |
102 | u32 mdcas2; | 102 | u32 mdcas2; |
103 | } sa1100_dram_regs_t; | 103 | } sa1100_dram_regs_t; |
@@ -147,7 +147,7 @@ static void sa1100_update_dram_timings(int current_speed, int new_speed) | |||
147 | /* No risk, no fun: run with interrupts on! */ | 147 | /* No risk, no fun: run with interrupts on! */ |
148 | if (new_speed > current_speed) { | 148 | if (new_speed > current_speed) { |
149 | /* We're going FASTER, so first relax the memory | 149 | /* We're going FASTER, so first relax the memory |
150 | * timings before changing the core frequency | 150 | * timings before changing the core frequency |
151 | */ | 151 | */ |
152 | 152 | ||
153 | /* Half the memory access clock */ | 153 | /* Half the memory access clock */ |
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c index 3e4fb214eada..63b32b68b296 100644 --- a/arch/arm/mach-sa1100/cpu-sa1110.c +++ b/arch/arm/mach-sa1100/cpu-sa1110.c | |||
@@ -81,14 +81,14 @@ static struct sdram_params sdram_tbl[] __initdata = { | |||
81 | .twr = 9, | 81 | .twr = 9, |
82 | .refresh = 64000, | 82 | .refresh = 64000, |
83 | .cas_latency = 3, | 83 | .cas_latency = 3, |
84 | }, { /* Samsung K4S281632B-1H */ | 84 | }, { /* Samsung K4S281632B-1H */ |
85 | .name = "K4S281632B-1H", | 85 | .name = "K4S281632B-1H", |
86 | .rows = 12, | 86 | .rows = 12, |
87 | .tck = 10, | 87 | .tck = 10, |
88 | .trp = 20, | 88 | .trp = 20, |
89 | .twr = 10, | 89 | .twr = 10, |
90 | .refresh = 64000, | 90 | .refresh = 64000, |
91 | .cas_latency = 3, | 91 | .cas_latency = 3, |
92 | }, { /* Samsung KM416S4030CT */ | 92 | }, { /* Samsung KM416S4030CT */ |
93 | .name = "KM416S4030CT", | 93 | .name = "KM416S4030CT", |
94 | .rows = 13, | 94 | .rows = 13, |
@@ -220,7 +220,7 @@ sdram_update_refresh(u_int cpu_khz, struct sdram_params *sdram) | |||
220 | } | 220 | } |
221 | 221 | ||
222 | /* | 222 | /* |
223 | * Ok, set the CPU frequency. | 223 | * Ok, set the CPU frequency. |
224 | */ | 224 | */ |
225 | static int sa1110_target(struct cpufreq_policy *policy, | 225 | static int sa1110_target(struct cpufreq_policy *policy, |
226 | unsigned int target_freq, | 226 | unsigned int target_freq, |
diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c index f990a3e85846..95f9c5a6d6d5 100644 --- a/arch/arm/mach-sa1100/dma.c +++ b/arch/arm/mach-sa1100/dma.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <asm/system.h> | 19 | #include <asm/system.h> |
20 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
21 | #include <mach/hardware.h> | 21 | #include <mach/hardware.h> |
22 | #include <asm/dma.h> | 22 | #include <mach/dma.h> |
23 | 23 | ||
24 | 24 | ||
25 | #undef DEBUG | 25 | #undef DEBUG |
@@ -113,10 +113,10 @@ int sa1100_request_dma (dma_device_t device, const char *device_id, | |||
113 | } | 113 | } |
114 | } | 114 | } |
115 | if (!err) { | 115 | if (!err) { |
116 | if (dma) | 116 | if (dma) |
117 | dma->device = device; | 117 | dma->device = device; |
118 | else | 118 | else |
119 | err = -ENOSR; | 119 | err = -ENOSR; |
120 | } | 120 | } |
121 | spin_unlock(&dma_list_lock); | 121 | spin_unlock(&dma_list_lock); |
122 | if (err) | 122 | if (err) |
diff --git a/arch/arm/mach-sa1100/include/mach/h3600.h b/arch/arm/mach-sa1100/include/mach/h3600.h index 3ca0ecf095e6..9cc47fddb335 100644 --- a/arch/arm/mach-sa1100/include/mach/h3600.h +++ b/arch/arm/mach-sa1100/include/mach/h3600.h | |||
@@ -32,14 +32,14 @@ typedef int __bitwise pm_request_t; | |||
32 | #define machine_is_h3xxx() (machine_is_h3100() || machine_is_h3600() || machine_is_h3800()) | 32 | #define machine_is_h3xxx() (machine_is_h3100() || machine_is_h3600() || machine_is_h3800()) |
33 | 33 | ||
34 | /* Physical memory regions corresponding to chip selects */ | 34 | /* Physical memory regions corresponding to chip selects */ |
35 | #define H3600_EGPIO_PHYS (SA1100_CS5_PHYS + 0x01000000) | 35 | #define H3600_EGPIO_PHYS (SA1100_CS5_PHYS + 0x01000000) |
36 | #define H3600_BANK_2_PHYS SA1100_CS2_PHYS | 36 | #define H3600_BANK_2_PHYS SA1100_CS2_PHYS |
37 | #define H3600_BANK_4_PHYS SA1100_CS4_PHYS | 37 | #define H3600_BANK_4_PHYS SA1100_CS4_PHYS |
38 | 38 | ||
39 | /* Virtual memory regions corresponding to chip selects 2 & 4 (used on sleeves) */ | 39 | /* Virtual memory regions corresponding to chip selects 2 & 4 (used on sleeves) */ |
40 | #define H3600_EGPIO_VIRT 0xf0000000 | 40 | #define H3600_EGPIO_VIRT 0xf0000000 |
41 | #define H3600_BANK_2_VIRT 0xf1000000 | 41 | #define H3600_BANK_2_VIRT 0xf1000000 |
42 | #define H3600_BANK_4_VIRT 0xf3800000 | 42 | #define H3600_BANK_4_VIRT 0xf3800000 |
43 | 43 | ||
44 | /* | 44 | /* |
45 | Machine-independent GPIO definitions | 45 | Machine-independent GPIO definitions |
diff --git a/arch/arm/mach-sa1100/include/mach/hardware.h b/arch/arm/mach-sa1100/include/mach/hardware.h index b70846c096aa..60711822b125 100644 --- a/arch/arm/mach-sa1100/include/mach/hardware.h +++ b/arch/arm/mach-sa1100/include/mach/hardware.h | |||
@@ -59,6 +59,10 @@ | |||
59 | # define __REG(x) (*((volatile unsigned long *)io_p2v(x))) | 59 | # define __REG(x) (*((volatile unsigned long *)io_p2v(x))) |
60 | # define __PREG(x) (io_v2p((unsigned long)&(x))) | 60 | # define __PREG(x) (io_v2p((unsigned long)&(x))) |
61 | 61 | ||
62 | static inline unsigned long get_clock_tick_rate(void) | ||
63 | { | ||
64 | return 3686400; | ||
65 | } | ||
62 | #else | 66 | #else |
63 | 67 | ||
64 | # define __REG(x) io_p2v(x) | 68 | # define __REG(x) io_p2v(x) |
diff --git a/arch/arm/mach-sa1100/include/mach/io.h b/arch/arm/mach-sa1100/include/mach/io.h index 0c070a6149bc..d8b43f3dcd2d 100644 --- a/arch/arm/mach-sa1100/include/mach/io.h +++ b/arch/arm/mach-sa1100/include/mach/io.h | |||
@@ -16,11 +16,7 @@ | |||
16 | * We don't actually have real ISA nor PCI buses, but there is so many | 16 | * We don't actually have real ISA nor PCI buses, but there is so many |
17 | * drivers out there that might just work if we fake them... | 17 | * drivers out there that might just work if we fake them... |
18 | */ | 18 | */ |
19 | static inline void __iomem *__io(unsigned long addr) | 19 | #define __io(a) __typesafe_io(a) |
20 | { | 20 | #define __mem_pci(a) (a) |
21 | return (void __iomem *)addr; | ||
22 | } | ||
23 | #define __io(a) __io(a) | ||
24 | #define __mem_pci(a) (a) | ||
25 | 21 | ||
26 | #endif | 22 | #endif |
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h index 1c127b68581d..e9f8eed900f5 100644 --- a/arch/arm/mach-sa1100/include/mach/memory.h +++ b/arch/arm/mach-sa1100/include/mach/memory.h | |||
@@ -23,23 +23,12 @@ void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes); | |||
23 | sa1111_adjust_zones(node, size, holes) | 23 | sa1111_adjust_zones(node, size, holes) |
24 | 24 | ||
25 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1) | 25 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1) |
26 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_1M) | ||
26 | 27 | ||
27 | #endif | 28 | #endif |
28 | #endif | 29 | #endif |
29 | 30 | ||
30 | /* | 31 | /* |
31 | * Virtual view <-> DMA view memory address translations | ||
32 | * virt_to_bus: Used to translate the virtual address to an | ||
33 | * address suitable to be passed to set_dma_addr | ||
34 | * bus_to_virt: Used to convert an address for DMA operations | ||
35 | * to an address that the kernel can use. | ||
36 | * | ||
37 | * On the SA1100, bus addresses are equivalent to physical addresses. | ||
38 | */ | ||
39 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
40 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
41 | |||
42 | /* | ||
43 | * Because of the wide memory address space between physical RAM banks on the | 32 | * Because of the wide memory address space between physical RAM banks on the |
44 | * SA1100, it's much convenient to use Linux's SparseMEM support to implement | 33 | * SA1100, it's much convenient to use Linux's SparseMEM support to implement |
45 | * our memory map representation. Assuming all memory nodes have equal access | 34 | * our memory map representation. Assuming all memory nodes have equal access |
diff --git a/arch/arm/mach-sa1100/include/mach/mtd-xip.h b/arch/arm/mach-sa1100/include/mach/mtd-xip.h index eaa09e86ad16..b3d684098fbf 100644 --- a/arch/arm/mach-sa1100/include/mach/mtd-xip.h +++ b/arch/arm/mach-sa1100/include/mach/mtd-xip.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef __ARCH_SA1100_MTD_XIP_H__ | 15 | #ifndef __ARCH_SA1100_MTD_XIP_H__ |
16 | #define __ARCH_SA1100_MTD_XIP_H__ | 16 | #define __ARCH_SA1100_MTD_XIP_H__ |
17 | 17 | ||
18 | #include <mach/hardware.h> | ||
19 | |||
18 | #define xip_irqpending() (ICIP & ICMR) | 20 | #define xip_irqpending() (ICIP & ICMR) |
19 | 21 | ||
20 | /* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */ | 22 | /* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */ |
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c index e45d3a1890bc..e1458bc1868e 100644 --- a/arch/arm/mach-sa1100/pleb.c +++ b/arch/arm/mach-sa1100/pleb.c | |||
@@ -122,12 +122,12 @@ static void __init pleb_map_io(void) | |||
122 | sa1100_map_io(); | 122 | sa1100_map_io(); |
123 | 123 | ||
124 | sa1100_register_uart(0, 3); | 124 | sa1100_register_uart(0, 3); |
125 | sa1100_register_uart(1, 1); | 125 | sa1100_register_uart(1, 1); |
126 | 126 | ||
127 | GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD); | 127 | GAFR |= (GPIO_UART_TXD | GPIO_UART_RXD); |
128 | GPDR |= GPIO_UART_TXD; | 128 | GPDR |= GPIO_UART_TXD; |
129 | GPDR &= ~GPIO_UART_RXD; | 129 | GPDR &= ~GPIO_UART_RXD; |
130 | PPAR |= PPAR_UPR; | 130 | PPAR |= PPAR_UPR; |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * Fix expansion memory timing for network card | 133 | * Fix expansion memory timing for network card |
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c index 9ccdd09cf69f..ddd917d1083d 100644 --- a/arch/arm/mach-sa1100/shannon.c +++ b/arch/arm/mach-sa1100/shannon.c | |||
@@ -33,7 +33,7 @@ static struct mtd_partition shannon_partitions[] = { | |||
33 | .offset = MTDPART_OFS_APPEND, | 33 | .offset = MTDPART_OFS_APPEND, |
34 | .size = 0xe0000 | 34 | .size = 0xe0000 |
35 | }, | 35 | }, |
36 | { | 36 | { |
37 | .name = "initrd", | 37 | .name = "initrd", |
38 | .offset = MTDPART_OFS_APPEND, | 38 | .offset = MTDPART_OFS_APPEND, |
39 | .size = MTDPART_SIZ_FULL | 39 | .size = MTDPART_SIZ_FULL |
diff --git a/arch/arm/mach-sa1100/sleep.S b/arch/arm/mach-sa1100/sleep.S index 171441f96710..80f31bad707c 100644 --- a/arch/arm/mach-sa1100/sleep.S +++ b/arch/arm/mach-sa1100/sleep.S | |||
@@ -100,36 +100,36 @@ ENTRY(sa1100_cpu_suspend) | |||
100 | ldr r1, =MSC1 | 100 | ldr r1, =MSC1 |
101 | ldr r2, =MSC2 | 101 | ldr r2, =MSC2 |
102 | 102 | ||
103 | ldr r3, [r0] | 103 | ldr r3, [r0] |
104 | bic r3, r3, #FMsk(MSC_RT) | 104 | bic r3, r3, #FMsk(MSC_RT) |
105 | bic r3, r3, #FMsk(MSC_RT)<<16 | 105 | bic r3, r3, #FMsk(MSC_RT)<<16 |
106 | 106 | ||
107 | ldr r4, [r1] | 107 | ldr r4, [r1] |
108 | bic r4, r4, #FMsk(MSC_RT) | 108 | bic r4, r4, #FMsk(MSC_RT) |
109 | bic r4, r4, #FMsk(MSC_RT)<<16 | 109 | bic r4, r4, #FMsk(MSC_RT)<<16 |
110 | 110 | ||
111 | ldr r5, [r2] | 111 | ldr r5, [r2] |
112 | bic r5, r5, #FMsk(MSC_RT) | 112 | bic r5, r5, #FMsk(MSC_RT) |
113 | bic r5, r5, #FMsk(MSC_RT)<<16 | 113 | bic r5, r5, #FMsk(MSC_RT)<<16 |
114 | 114 | ||
115 | ldr r6, =MDREFR | 115 | ldr r6, =MDREFR |
116 | 116 | ||
117 | ldr r7, [r6] | 117 | ldr r7, [r6] |
118 | bic r7, r7, #0x0000FF00 | 118 | bic r7, r7, #0x0000FF00 |
119 | bic r7, r7, #0x000000F0 | 119 | bic r7, r7, #0x000000F0 |
120 | orr r8, r7, #MDREFR_SLFRSH | 120 | orr r8, r7, #MDREFR_SLFRSH |
121 | 121 | ||
122 | ldr r9, =MDCNFG | 122 | ldr r9, =MDCNFG |
123 | ldr r10, [r9] | 123 | ldr r10, [r9] |
124 | bic r10, r10, #(MDCNFG_DE0+MDCNFG_DE1) | 124 | bic r10, r10, #(MDCNFG_DE0+MDCNFG_DE1) |
125 | bic r10, r10, #(MDCNFG_DE2+MDCNFG_DE3) | 125 | bic r10, r10, #(MDCNFG_DE2+MDCNFG_DE3) |
126 | 126 | ||
127 | bic r11, r8, #MDREFR_SLFRSH | 127 | bic r11, r8, #MDREFR_SLFRSH |
128 | bic r11, r11, #MDREFR_E1PIN | 128 | bic r11, r11, #MDREFR_E1PIN |
129 | 129 | ||
130 | ldr r12, =PMCR | 130 | ldr r12, =PMCR |
131 | 131 | ||
132 | mov r13, #PMCR_SF | 132 | mov r13, #PMCR_SF |
133 | 133 | ||
134 | b sa1110_sdram_controller_fix | 134 | b sa1110_sdram_controller_fix |
135 | 135 | ||
@@ -188,10 +188,10 @@ ENTRY(sa1100_cpu_resume) | |||
188 | mcr p15, 0, r1, c8, c7, 0 @ flush I+D TLBs | 188 | mcr p15, 0, r1, c8, c7, 0 @ flush I+D TLBs |
189 | mcr p15, 0, r1, c7, c7, 0 @ flush I&D cache | 189 | mcr p15, 0, r1, c7, c7, 0 @ flush I&D cache |
190 | mcr p15, 0, r1, c9, c0, 0 @ invalidate RB | 190 | mcr p15, 0, r1, c9, c0, 0 @ invalidate RB |
191 | mcr p15, 0, r1, c9, c0, 5 @ allow user space to use RB | 191 | mcr p15, 0, r1, c9, c0, 5 @ allow user space to use RB |
192 | 192 | ||
193 | mcr p15, 0, r4, c3, c0, 0 @ domain ID | 193 | mcr p15, 0, r4, c3, c0, 0 @ domain ID |
194 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr | 194 | mcr p15, 0, r5, c2, c0, 0 @ translation table base addr |
195 | mcr p15, 0, r6, c13, c0, 0 @ PID | 195 | mcr p15, 0, r6, c13, c0, 0 @ PID |
196 | b resume_turn_on_mmu @ cache align execution | 196 | b resume_turn_on_mmu @ cache align execution |
197 | 197 | ||
@@ -209,7 +209,7 @@ sleep_save_sp: | |||
209 | 209 | ||
210 | .text | 210 | .text |
211 | resume_after_mmu: | 211 | resume_after_mmu: |
212 | mcr p15, 0, r1, c15, c1, 2 @ enable clock switching | 212 | mcr p15, 0, r1, c15, c1, 2 @ enable clock switching |
213 | ldmfd sp!, {r4 - r12, pc} @ return to caller | 213 | ldmfd sp!, {r4 - r12, pc} @ return to caller |
214 | 214 | ||
215 | 215 | ||
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 24c0a4bae850..8c5e727f3b75 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c | |||
@@ -2,8 +2,8 @@ | |||
2 | * linux/arch/arm/mach-sa1100/time.c | 2 | * linux/arch/arm/mach-sa1100/time.c |
3 | * | 3 | * |
4 | * Copyright (C) 1998 Deborah Wallach. | 4 | * Copyright (C) 1998 Deborah Wallach. |
5 | * Twiddles (C) 1999 Hugo Fiennes <hugo@empeg.com> | 5 | * Twiddles (C) 1999 Hugo Fiennes <hugo@empeg.com> |
6 | * | 6 | * |
7 | * 2000/03/29 (C) Nicolas Pitre <nico@cam.org> | 7 | * 2000/03/29 (C) Nicolas Pitre <nico@cam.org> |
8 | * Rewritten: big cleanup, much simpler, better HZ accuracy. | 8 | * Rewritten: big cleanup, much simpler, better HZ accuracy. |
9 | * | 9 | * |
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index a9400d984451..a23fd3d0163a 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <asm/leds.h> | 16 | #include <asm/leds.h> |
17 | #include <asm/param.h> | 17 | #include <asm/param.h> |
18 | 18 | ||
19 | #include <mach/hardware.h> | ||
20 | |||
19 | #include <asm/mach/map.h> | 21 | #include <asm/mach/map.h> |
20 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
21 | #include <asm/mach/time.h> | 23 | #include <asm/mach/time.h> |
diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h index cb0ee2943c1a..01bf76099ce5 100644 --- a/arch/arm/mach-shark/include/mach/hardware.h +++ b/arch/arm/mach-shark/include/mach/hardware.h | |||
@@ -28,8 +28,6 @@ | |||
28 | #define ROMCARD_SIZE 0x08000000 | 28 | #define ROMCARD_SIZE 0x08000000 |
29 | #define ROMCARD_START 0x10000000 | 29 | #define ROMCARD_START 0x10000000 |
30 | 30 | ||
31 | #define PCIO_BASE 0xe0000000 | ||
32 | |||
33 | 31 | ||
34 | /* defines for the Framebuffer */ | 32 | /* defines for the Framebuffer */ |
35 | #define FB_START 0x06000000 | 33 | #define FB_START 0x06000000 |
diff --git a/arch/arm/mach-shark/include/mach/io.h b/arch/arm/mach-shark/include/mach/io.h index 92475922c068..c5cee829fc87 100644 --- a/arch/arm/mach-shark/include/mach/io.h +++ b/arch/arm/mach-shark/include/mach/io.h | |||
@@ -11,46 +11,10 @@ | |||
11 | #ifndef __ASM_ARM_ARCH_IO_H | 11 | #ifndef __ASM_ARM_ARCH_IO_H |
12 | #define __ASM_ARM_ARCH_IO_H | 12 | #define __ASM_ARM_ARCH_IO_H |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #define PCIO_BASE 0xe0000000 |
15 | #define IO_SPACE_LIMIT 0xffffffff | ||
15 | 16 | ||
16 | #define IO_SPACE_LIMIT 0xffffffff | 17 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) |
17 | 18 | #define __mem_pci(addr) (addr) | |
18 | /* | ||
19 | * We use two different types of addressing - PC style addresses, and ARM | ||
20 | * addresses. PC style accesses the PC hardware with the normal PC IO | ||
21 | * addresses, eg 0x3f8 for serial#1. ARM addresses are 0x80000000+ | ||
22 | * and are translated to the start of IO. | ||
23 | */ | ||
24 | #define __PORT_PCIO(x) (!((x) & 0x80000000)) | ||
25 | |||
26 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) | ||
27 | |||
28 | |||
29 | static inline unsigned int __ioaddr (unsigned int port) \ | ||
30 | { \ | ||
31 | if (__PORT_PCIO(port)) \ | ||
32 | return (unsigned int)(PCIO_BASE + (port)); \ | ||
33 | else \ | ||
34 | return (unsigned int)(IO_BASE + (port)); \ | ||
35 | } | ||
36 | |||
37 | #define __mem_pci(addr) (addr) | ||
38 | |||
39 | /* | ||
40 | * Translated address IO functions | ||
41 | * | ||
42 | * IO address has already been translated to a virtual address | ||
43 | */ | ||
44 | #define outb_t(v,p) \ | ||
45 | (*(volatile unsigned char *)(p) = (v)) | ||
46 | |||
47 | #define inb_t(p) \ | ||
48 | (*(volatile unsigned char *)(p)) | ||
49 | |||
50 | #define outl_t(v,p) \ | ||
51 | (*(volatile unsigned long *)(p) = (v)) | ||
52 | |||
53 | #define inl_t(p) \ | ||
54 | (*(volatile unsigned long *)(p)) | ||
55 | 19 | ||
56 | #endif | 20 | #endif |
diff --git a/arch/arm/mach-shark/include/mach/dma.h b/arch/arm/mach-shark/include/mach/isa-dma.h index c0a29bd2a74f..864298ff3927 100644 --- a/arch/arm/mach-shark/include/mach/dma.h +++ b/arch/arm/mach-shark/include/mach/isa-dma.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * arch/arm/mach-shark/include/mach/dma.h | 2 | * arch/arm/mach-shark/include/mach/isa-dma.h |
3 | * | 3 | * |
4 | * by Alexander Schulz | 4 | * by Alexander Schulz |
5 | */ | 5 | */ |
@@ -10,7 +10,6 @@ | |||
10 | * The rest is not DMAable. See dev / .properties | 10 | * The rest is not DMAable. See dev / .properties |
11 | * in OpenFirmware. | 11 | * in OpenFirmware. |
12 | */ | 12 | */ |
13 | #define MAX_DMA_ADDRESS 0xC0400000 | ||
14 | #define MAX_DMA_CHANNELS 8 | 13 | #define MAX_DMA_CHANNELS 8 |
15 | #define DMA_ISA_CASCADE 4 | 14 | #define DMA_ISA_CASCADE 4 |
16 | 15 | ||
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h index b7874ad9f9f6..c5ab038925d6 100644 --- a/arch/arm/mach-shark/include/mach/memory.h +++ b/arch/arm/mach-shark/include/mach/memory.h | |||
@@ -33,12 +33,10 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig | |||
33 | __arch_adjust_zones(node, size, holes) | 33 | __arch_adjust_zones(node, size, holes) |
34 | 34 | ||
35 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1) | 35 | #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1) |
36 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_4M) | ||
36 | 37 | ||
37 | #endif | 38 | #endif |
38 | 39 | ||
39 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
40 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
41 | |||
42 | /* | 40 | /* |
43 | * Cache flushing area | 41 | * Cache flushing area |
44 | */ | 42 | */ |
diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig index 95096afd5271..c781f30c8368 100644 --- a/arch/arm/mach-versatile/Kconfig +++ b/arch/arm/mach-versatile/Kconfig | |||
@@ -3,12 +3,14 @@ menu "Versatile platform type" | |||
3 | 3 | ||
4 | config ARCH_VERSATILE_PB | 4 | config ARCH_VERSATILE_PB |
5 | bool "Support Versatile/PB platform" | 5 | bool "Support Versatile/PB platform" |
6 | select CPU_ARM926T | ||
6 | default y | 7 | default y |
7 | help | 8 | help |
8 | Include support for the ARM(R) Versatile/PB platform. | 9 | Include support for the ARM(R) Versatile/PB platform. |
9 | 10 | ||
10 | config MACH_VERSATILE_AB | 11 | config MACH_VERSATILE_AB |
11 | bool "Support Versatile/AB platform" | 12 | bool "Support Versatile/AB platform" |
13 | select CPU_ARM926T | ||
12 | help | 14 | help |
13 | Include support for the ARM(R) Versatile/AP platform. | 15 | Include support for the ARM(R) Versatile/AP platform. |
14 | 16 | ||
diff --git a/arch/arm/mach-versatile/clock.c b/arch/arm/mach-versatile/clock.c index 58937f1fb38c..c50a44ea7ee6 100644 --- a/arch/arm/mach-versatile/clock.c +++ b/arch/arm/mach-versatile/clock.c | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/device.h> | ||
13 | #include <linux/list.h> | 14 | #include <linux/list.h> |
14 | #include <linux/errno.h> | 15 | #include <linux/errno.h> |
15 | #include <linux/err.h> | 16 | #include <linux/err.h> |
@@ -17,36 +18,11 @@ | |||
17 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
18 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
19 | 20 | ||
21 | #include <asm/clkdev.h> | ||
20 | #include <asm/hardware/icst307.h> | 22 | #include <asm/hardware/icst307.h> |
21 | 23 | ||
22 | #include "clock.h" | 24 | #include "clock.h" |
23 | 25 | ||
24 | static LIST_HEAD(clocks); | ||
25 | static DEFINE_MUTEX(clocks_mutex); | ||
26 | |||
27 | struct clk *clk_get(struct device *dev, const char *id) | ||
28 | { | ||
29 | struct clk *p, *clk = ERR_PTR(-ENOENT); | ||
30 | |||
31 | mutex_lock(&clocks_mutex); | ||
32 | list_for_each_entry(p, &clocks, node) { | ||
33 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
34 | clk = p; | ||
35 | break; | ||
36 | } | ||
37 | } | ||
38 | mutex_unlock(&clocks_mutex); | ||
39 | |||
40 | return clk; | ||
41 | } | ||
42 | EXPORT_SYMBOL(clk_get); | ||
43 | |||
44 | void clk_put(struct clk *clk) | ||
45 | { | ||
46 | module_put(clk->owner); | ||
47 | } | ||
48 | EXPORT_SYMBOL(clk_put); | ||
49 | |||
50 | int clk_enable(struct clk *clk) | 26 | int clk_enable(struct clk *clk) |
51 | { | 27 | { |
52 | return 0; | 28 | return 0; |
@@ -66,7 +42,9 @@ EXPORT_SYMBOL(clk_get_rate); | |||
66 | 42 | ||
67 | long clk_round_rate(struct clk *clk, unsigned long rate) | 43 | long clk_round_rate(struct clk *clk, unsigned long rate) |
68 | { | 44 | { |
69 | return rate; | 45 | struct icst307_vco vco; |
46 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | ||
47 | return icst307_khz(clk->params, vco) * 1000; | ||
70 | } | 48 | } |
71 | EXPORT_SYMBOL(clk_round_rate); | 49 | EXPORT_SYMBOL(clk_round_rate); |
72 | 50 | ||
@@ -79,57 +57,9 @@ int clk_set_rate(struct clk *clk, unsigned long rate) | |||
79 | 57 | ||
80 | vco = icst307_khz_to_vco(clk->params, rate / 1000); | 58 | vco = icst307_khz_to_vco(clk->params, rate / 1000); |
81 | clk->rate = icst307_khz(clk->params, vco) * 1000; | 59 | clk->rate = icst307_khz(clk->params, vco) * 1000; |
82 | |||
83 | printk("Clock %s: setting VCO reg params: S=%d R=%d V=%d\n", | ||
84 | clk->name, vco.s, vco.r, vco.v); | ||
85 | |||
86 | clk->setvco(clk, vco); | 60 | clk->setvco(clk, vco); |
87 | ret = 0; | 61 | ret = 0; |
88 | } | 62 | } |
89 | return ret; | 63 | return ret; |
90 | } | 64 | } |
91 | EXPORT_SYMBOL(clk_set_rate); | 65 | EXPORT_SYMBOL(clk_set_rate); |
92 | |||
93 | /* | ||
94 | * These are fixed clocks. | ||
95 | */ | ||
96 | static struct clk kmi_clk = { | ||
97 | .name = "KMIREFCLK", | ||
98 | .rate = 24000000, | ||
99 | }; | ||
100 | |||
101 | static struct clk uart_clk = { | ||
102 | .name = "UARTCLK", | ||
103 | .rate = 24000000, | ||
104 | }; | ||
105 | |||
106 | static struct clk mmci_clk = { | ||
107 | .name = "MCLK", | ||
108 | .rate = 24000000, | ||
109 | }; | ||
110 | |||
111 | int clk_register(struct clk *clk) | ||
112 | { | ||
113 | mutex_lock(&clocks_mutex); | ||
114 | list_add(&clk->node, &clocks); | ||
115 | mutex_unlock(&clocks_mutex); | ||
116 | return 0; | ||
117 | } | ||
118 | EXPORT_SYMBOL(clk_register); | ||
119 | |||
120 | void clk_unregister(struct clk *clk) | ||
121 | { | ||
122 | mutex_lock(&clocks_mutex); | ||
123 | list_del(&clk->node); | ||
124 | mutex_unlock(&clocks_mutex); | ||
125 | } | ||
126 | EXPORT_SYMBOL(clk_unregister); | ||
127 | |||
128 | static int __init clk_init(void) | ||
129 | { | ||
130 | clk_register(&kmi_clk); | ||
131 | clk_register(&uart_clk); | ||
132 | clk_register(&mmci_clk); | ||
133 | return 0; | ||
134 | } | ||
135 | arch_initcall(clk_init); | ||
diff --git a/arch/arm/mach-versatile/clock.h b/arch/arm/mach-versatile/clock.h index 8b0b61dd17e4..03468fdc3e58 100644 --- a/arch/arm/mach-versatile/clock.h +++ b/arch/arm/mach-versatile/clock.h | |||
@@ -12,14 +12,9 @@ struct module; | |||
12 | struct icst307_params; | 12 | struct icst307_params; |
13 | 13 | ||
14 | struct clk { | 14 | struct clk { |
15 | struct list_head node; | ||
16 | unsigned long rate; | 15 | unsigned long rate; |
17 | struct module *owner; | ||
18 | const char *name; | ||
19 | const struct icst307_params *params; | 16 | const struct icst307_params *params; |
17 | u32 oscoff; | ||
20 | void *data; | 18 | void *data; |
21 | void (*setvco)(struct clk *, struct icst307_vco vco); | 19 | void (*setvco)(struct clk *, struct icst307_vco vco); |
22 | }; | 20 | }; |
23 | |||
24 | int clk_register(struct clk *clk); | ||
25 | void clk_unregister(struct clk *clk); | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 565e0ba0d67e..df25aa138509 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/cnt32_to_63.h> | 31 | #include <linux/cnt32_to_63.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | 33 | ||
34 | #include <asm/clkdev.h> | ||
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
35 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
36 | #include <asm/irq.h> | 37 | #include <asm/irq.h> |
@@ -373,22 +374,60 @@ static const struct icst307_params versatile_oscvco_params = { | |||
373 | 374 | ||
374 | static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) | 375 | static void versatile_oscvco_set(struct clk *clk, struct icst307_vco vco) |
375 | { | 376 | { |
376 | void __iomem *sys_lock = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LOCK_OFFSET; | 377 | void __iomem *sys = __io_address(VERSATILE_SYS_BASE); |
377 | void __iomem *sys_osc = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET; | 378 | void __iomem *sys_lock = sys + VERSATILE_SYS_LOCK_OFFSET; |
378 | u32 val; | 379 | u32 val; |
379 | 380 | ||
380 | val = readl(sys_osc) & ~0x7ffff; | 381 | val = readl(sys + clk->oscoff) & ~0x7ffff; |
381 | val |= vco.v | (vco.r << 9) | (vco.s << 16); | 382 | val |= vco.v | (vco.r << 9) | (vco.s << 16); |
382 | 383 | ||
383 | writel(0xa05f, sys_lock); | 384 | writel(0xa05f, sys_lock); |
384 | writel(val, sys_osc); | 385 | writel(val, sys + clk->oscoff); |
385 | writel(0, sys_lock); | 386 | writel(0, sys_lock); |
386 | } | 387 | } |
387 | 388 | ||
388 | static struct clk versatile_clcd_clk = { | 389 | static struct clk osc4_clk = { |
389 | .name = "CLCDCLK", | ||
390 | .params = &versatile_oscvco_params, | 390 | .params = &versatile_oscvco_params, |
391 | .setvco = versatile_oscvco_set, | 391 | .oscoff = VERSATILE_SYS_OSCCLCD_OFFSET, |
392 | .setvco = versatile_oscvco_set, | ||
393 | }; | ||
394 | |||
395 | /* | ||
396 | * These are fixed clocks. | ||
397 | */ | ||
398 | static struct clk ref24_clk = { | ||
399 | .rate = 24000000, | ||
400 | }; | ||
401 | |||
402 | static struct clk_lookup lookups[] __initdata = { | ||
403 | { /* UART0 */ | ||
404 | .dev_id = "dev:f1", | ||
405 | .clk = &ref24_clk, | ||
406 | }, { /* UART1 */ | ||
407 | .dev_id = "dev:f2", | ||
408 | .clk = &ref24_clk, | ||
409 | }, { /* UART2 */ | ||
410 | .dev_id = "dev:f3", | ||
411 | .clk = &ref24_clk, | ||
412 | }, { /* UART3 */ | ||
413 | .dev_id = "fpga:09", | ||
414 | .clk = &ref24_clk, | ||
415 | }, { /* KMI0 */ | ||
416 | .dev_id = "fpga:06", | ||
417 | .clk = &ref24_clk, | ||
418 | }, { /* KMI1 */ | ||
419 | .dev_id = "fpga:07", | ||
420 | .clk = &ref24_clk, | ||
421 | }, { /* MMC0 */ | ||
422 | .dev_id = "fpga:05", | ||
423 | .clk = &ref24_clk, | ||
424 | }, { /* MMC1 */ | ||
425 | .dev_id = "fpga:0b", | ||
426 | .clk = &ref24_clk, | ||
427 | }, { /* CLCD */ | ||
428 | .dev_id = "dev:20", | ||
429 | .clk = &osc4_clk, | ||
430 | } | ||
392 | }; | 431 | }; |
393 | 432 | ||
394 | /* | 433 | /* |
@@ -786,7 +825,8 @@ void __init versatile_init(void) | |||
786 | { | 825 | { |
787 | int i; | 826 | int i; |
788 | 827 | ||
789 | clk_register(&versatile_clcd_clk); | 828 | for (i = 0; i < ARRAY_SIZE(lookups); i++) |
829 | clkdev_add(&lookups[i]); | ||
790 | 830 | ||
791 | platform_device_register(&versatile_flash_device); | 831 | platform_device_register(&versatile_flash_device); |
792 | platform_device_register(&versatile_i2c_device); | 832 | platform_device_register(&versatile_i2c_device); |
diff --git a/arch/arm/mach-versatile/include/mach/clkdev.h b/arch/arm/mach-versatile/include/mach/clkdev.h new file mode 100644 index 000000000000..04b37a89801c --- /dev/null +++ b/arch/arm/mach-versatile/include/mach/clkdev.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_CLKDEV_H | ||
2 | #define __ASM_MACH_CLKDEV_H | ||
3 | |||
4 | #define __clk_get(clk) ({ 1; }) | ||
5 | #define __clk_put(clk) do { } while (0) | ||
6 | |||
7 | #endif | ||
diff --git a/arch/arm/mach-versatile/include/mach/dma.h b/arch/arm/mach-versatile/include/mach/dma.h deleted file mode 100644 index 0aabf12c8834..000000000000 --- a/arch/arm/mach-versatile/include/mach/dma.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-versatile/include/mach/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2003 ARM Limited. | ||
5 | * Copyright (C) 1997,1998 Russell King | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
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 | ||
20 | */ | ||
diff --git a/arch/arm/mach-versatile/include/mach/io.h b/arch/arm/mach-versatile/include/mach/io.h index c0b9dd1d0257..f067c14c7182 100644 --- a/arch/arm/mach-versatile/include/mach/io.h +++ b/arch/arm/mach-versatile/include/mach/io.h | |||
@@ -22,11 +22,7 @@ | |||
22 | 22 | ||
23 | #define IO_SPACE_LIMIT 0xffffffff | 23 | #define IO_SPACE_LIMIT 0xffffffff |
24 | 24 | ||
25 | static inline void __iomem *__io(unsigned long addr) | 25 | #define __io(a) __typesafe_io(a) |
26 | { | 26 | #define __mem_pci(a) (a) |
27 | return (void __iomem *)addr; | ||
28 | } | ||
29 | #define __io(a) __io(a) | ||
30 | #define __mem_pci(a) (a) | ||
31 | 27 | ||
32 | #endif | 28 | #endif |
diff --git a/arch/arm/mach-versatile/include/mach/irqs.h b/arch/arm/mach-versatile/include/mach/irqs.h index 216a1312e62e..9bfdb30e1f3f 100644 --- a/arch/arm/mach-versatile/include/mach/irqs.h +++ b/arch/arm/mach-versatile/include/mach/irqs.h | |||
@@ -60,39 +60,6 @@ | |||
60 | #define IRQ_VICSOURCE31 (IRQ_VIC_START + INT_VICSOURCE31) | 60 | #define IRQ_VICSOURCE31 (IRQ_VIC_START + INT_VICSOURCE31) |
61 | #define IRQ_VIC_END (IRQ_VIC_START + 31) | 61 | #define IRQ_VIC_END (IRQ_VIC_START + 31) |
62 | 62 | ||
63 | #define IRQMASK_WDOGINT INTMASK_WDOGINT | ||
64 | #define IRQMASK_SOFTINT INTMASK_SOFTINT | ||
65 | #define IRQMASK_COMMRx INTMASK_COMMRx | ||
66 | #define IRQMASK_COMMTx INTMASK_COMMTx | ||
67 | #define IRQMASK_TIMERINT0_1 INTMASK_TIMERINT0_1 | ||
68 | #define IRQMASK_TIMERINT2_3 INTMASK_TIMERINT2_3 | ||
69 | #define IRQMASK_GPIOINT0 INTMASK_GPIOINT0 | ||
70 | #define IRQMASK_GPIOINT1 INTMASK_GPIOINT1 | ||
71 | #define IRQMASK_GPIOINT2 INTMASK_GPIOINT2 | ||
72 | #define IRQMASK_GPIOINT3 INTMASK_GPIOINT3 | ||
73 | #define IRQMASK_RTCINT INTMASK_RTCINT | ||
74 | #define IRQMASK_SSPINT INTMASK_SSPINT | ||
75 | #define IRQMASK_UARTINT0 INTMASK_UARTINT0 | ||
76 | #define IRQMASK_UARTINT1 INTMASK_UARTINT1 | ||
77 | #define IRQMASK_UARTINT2 INTMASK_UARTINT2 | ||
78 | #define IRQMASK_SCIINT INTMASK_SCIINT | ||
79 | #define IRQMASK_CLCDINT INTMASK_CLCDINT | ||
80 | #define IRQMASK_DMAINT INTMASK_DMAINT | ||
81 | #define IRQMASK_PWRFAILINT INTMASK_PWRFAILINT | ||
82 | #define IRQMASK_MBXINT INTMASK_MBXINT | ||
83 | #define IRQMASK_GNDINT INTMASK_GNDINT | ||
84 | #define IRQMASK_VICSOURCE21 INTMASK_VICSOURCE21 | ||
85 | #define IRQMASK_VICSOURCE22 INTMASK_VICSOURCE22 | ||
86 | #define IRQMASK_VICSOURCE23 INTMASK_VICSOURCE23 | ||
87 | #define IRQMASK_VICSOURCE24 INTMASK_VICSOURCE24 | ||
88 | #define IRQMASK_VICSOURCE25 INTMASK_VICSOURCE25 | ||
89 | #define IRQMASK_VICSOURCE26 INTMASK_VICSOURCE26 | ||
90 | #define IRQMASK_VICSOURCE27 INTMASK_VICSOURCE27 | ||
91 | #define IRQMASK_VICSOURCE28 INTMASK_VICSOURCE28 | ||
92 | #define IRQMASK_VICSOURCE29 INTMASK_VICSOURCE29 | ||
93 | #define IRQMASK_VICSOURCE30 INTMASK_VICSOURCE30 | ||
94 | #define IRQMASK_VICSOURCE31 INTMASK_VICSOURCE31 | ||
95 | |||
96 | /* | 63 | /* |
97 | * FIQ interrupts definitions are the same as the INT definitions. | 64 | * FIQ interrupts definitions are the same as the INT definitions. |
98 | */ | 65 | */ |
@@ -130,39 +97,6 @@ | |||
130 | #define FIQ_VICSOURCE31 INT_VICSOURCE31 | 97 | #define FIQ_VICSOURCE31 INT_VICSOURCE31 |
131 | 98 | ||
132 | 99 | ||
133 | #define FIQMASK_WDOGINT INTMASK_WDOGINT | ||
134 | #define FIQMASK_SOFTINT INTMASK_SOFTINT | ||
135 | #define FIQMASK_COMMRx INTMASK_COMMRx | ||
136 | #define FIQMASK_COMMTx INTMASK_COMMTx | ||
137 | #define FIQMASK_TIMERINT0_1 INTMASK_TIMERINT0_1 | ||
138 | #define FIQMASK_TIMERINT2_3 INTMASK_TIMERINT2_3 | ||
139 | #define FIQMASK_GPIOINT0 INTMASK_GPIOINT0 | ||
140 | #define FIQMASK_GPIOINT1 INTMASK_GPIOINT1 | ||
141 | #define FIQMASK_GPIOINT2 INTMASK_GPIOINT2 | ||
142 | #define FIQMASK_GPIOINT3 INTMASK_GPIOINT3 | ||
143 | #define FIQMASK_RTCINT INTMASK_RTCINT | ||
144 | #define FIQMASK_SSPINT INTMASK_SSPINT | ||
145 | #define FIQMASK_UARTINT0 INTMASK_UARTINT0 | ||
146 | #define FIQMASK_UARTINT1 INTMASK_UARTINT1 | ||
147 | #define FIQMASK_UARTINT2 INTMASK_UARTINT2 | ||
148 | #define FIQMASK_SCIINT INTMASK_SCIINT | ||
149 | #define FIQMASK_CLCDINT INTMASK_CLCDINT | ||
150 | #define FIQMASK_DMAINT INTMASK_DMAINT | ||
151 | #define FIQMASK_PWRFAILINT INTMASK_PWRFAILINT | ||
152 | #define FIQMASK_MBXINT INTMASK_MBXINT | ||
153 | #define FIQMASK_GNDINT INTMASK_GNDINT | ||
154 | #define FIQMASK_VICSOURCE21 INTMASK_VICSOURCE21 | ||
155 | #define FIQMASK_VICSOURCE22 INTMASK_VICSOURCE22 | ||
156 | #define FIQMASK_VICSOURCE23 INTMASK_VICSOURCE23 | ||
157 | #define FIQMASK_VICSOURCE24 INTMASK_VICSOURCE24 | ||
158 | #define FIQMASK_VICSOURCE25 INTMASK_VICSOURCE25 | ||
159 | #define FIQMASK_VICSOURCE26 INTMASK_VICSOURCE26 | ||
160 | #define FIQMASK_VICSOURCE27 INTMASK_VICSOURCE27 | ||
161 | #define FIQMASK_VICSOURCE28 INTMASK_VICSOURCE28 | ||
162 | #define FIQMASK_VICSOURCE29 INTMASK_VICSOURCE29 | ||
163 | #define FIQMASK_VICSOURCE30 INTMASK_VICSOURCE30 | ||
164 | #define FIQMASK_VICSOURCE31 INTMASK_VICSOURCE31 | ||
165 | |||
166 | /* | 100 | /* |
167 | * Secondary interrupt controller | 101 | * Secondary interrupt controller |
168 | */ | 102 | */ |
@@ -188,24 +122,4 @@ | |||
188 | #define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3) | 122 | #define IRQ_SIC_PCI3 (IRQ_SIC_START + SIC_INT_PCI3) |
189 | #define IRQ_SIC_END 63 | 123 | #define IRQ_SIC_END 63 |
190 | 124 | ||
191 | #define SIC_IRQMASK_MMCI0B SIC_INTMASK_MMCI0B | ||
192 | #define SIC_IRQMASK_MMCI1B SIC_INTMASK_MMCI1B | ||
193 | #define SIC_IRQMASK_KMI0 SIC_INTMASK_KMI0 | ||
194 | #define SIC_IRQMASK_KMI1 SIC_INTMASK_KMI1 | ||
195 | #define SIC_IRQMASK_SCI3 SIC_INTMASK_SCI3 | ||
196 | #define SIC_IRQMASK_UART3 SIC_INTMASK_UART3 | ||
197 | #define SIC_IRQMASK_CLCD SIC_INTMASK_CLCD | ||
198 | #define SIC_IRQMASK_TOUCH SIC_INTMASK_TOUCH | ||
199 | #define SIC_IRQMASK_KEYPAD SIC_INTMASK_KEYPAD | ||
200 | #define SIC_IRQMASK_DoC SIC_INTMASK_DoC | ||
201 | #define SIC_IRQMASK_MMCI0A SIC_INTMASK_MMCI0A | ||
202 | #define SIC_IRQMASK_MMCI1A SIC_INTMASK_MMCI1A | ||
203 | #define SIC_IRQMASK_AACI SIC_INTMASK_AACI | ||
204 | #define SIC_IRQMASK_ETH SIC_INTMASK_ETH | ||
205 | #define SIC_IRQMASK_USB SIC_INTMASK_USB | ||
206 | #define SIC_IRQMASK_PCI0 SIC_INTMASK_PCI0 | ||
207 | #define SIC_IRQMASK_PCI1 SIC_INTMASK_PCI1 | ||
208 | #define SIC_IRQMASK_PCI2 SIC_INTMASK_PCI2 | ||
209 | #define SIC_IRQMASK_PCI3 SIC_INTMASK_PCI3 | ||
210 | |||
211 | #define NR_IRQS 64 | 125 | #define NR_IRQS 64 |
diff --git a/arch/arm/mach-versatile/include/mach/memory.h b/arch/arm/mach-versatile/include/mach/memory.h index b6315c0602ac..79aeab86b903 100644 --- a/arch/arm/mach-versatile/include/mach/memory.h +++ b/arch/arm/mach-versatile/include/mach/memory.h | |||
@@ -25,14 +25,4 @@ | |||
25 | */ | 25 | */ |
26 | #define PHYS_OFFSET UL(0x00000000) | 26 | #define PHYS_OFFSET UL(0x00000000) |
27 | 27 | ||
28 | /* | ||
29 | * Virtual view <-> DMA view memory address translations | ||
30 | * virt_to_bus: Used to translate the virtual address to an | ||
31 | * address suitable to be passed to set_dma_addr | ||
32 | * bus_to_virt: Used to convert an address for DMA operations | ||
33 | * to an address that the kernel can use. | ||
34 | */ | ||
35 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET) | ||
36 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET) | ||
37 | |||
38 | #endif | 28 | #endif |
diff --git a/arch/arm/mach-versatile/include/mach/platform.h b/arch/arm/mach-versatile/include/mach/platform.h index f91ba930ca8a..83207395191a 100644 --- a/arch/arm/mach-versatile/include/mach/platform.h +++ b/arch/arm/mach-versatile/include/mach/platform.h | |||
@@ -347,44 +347,6 @@ | |||
347 | #define INT_VICSOURCE30 30 /* PCI 3 */ | 347 | #define INT_VICSOURCE30 30 /* PCI 3 */ |
348 | #define INT_VICSOURCE31 31 /* SIC source */ | 348 | #define INT_VICSOURCE31 31 /* SIC source */ |
349 | 349 | ||
350 | /* | ||
351 | * Interrupt bit positions | ||
352 | * | ||
353 | */ | ||
354 | #define INTMASK_WDOGINT (1 << INT_WDOGINT) | ||
355 | #define INTMASK_SOFTINT (1 << INT_SOFTINT) | ||
356 | #define INTMASK_COMMRx (1 << INT_COMMRx) | ||
357 | #define INTMASK_COMMTx (1 << INT_COMMTx) | ||
358 | #define INTMASK_TIMERINT0_1 (1 << INT_TIMERINT0_1) | ||
359 | #define INTMASK_TIMERINT2_3 (1 << INT_TIMERINT2_3) | ||
360 | #define INTMASK_GPIOINT0 (1 << INT_GPIOINT0) | ||
361 | #define INTMASK_GPIOINT1 (1 << INT_GPIOINT1) | ||
362 | #define INTMASK_GPIOINT2 (1 << INT_GPIOINT2) | ||
363 | #define INTMASK_GPIOINT3 (1 << INT_GPIOINT3) | ||
364 | #define INTMASK_RTCINT (1 << INT_RTCINT) | ||
365 | #define INTMASK_SSPINT (1 << INT_SSPINT) | ||
366 | #define INTMASK_UARTINT0 (1 << INT_UARTINT0) | ||
367 | #define INTMASK_UARTINT1 (1 << INT_UARTINT1) | ||
368 | #define INTMASK_UARTINT2 (1 << INT_UARTINT2) | ||
369 | #define INTMASK_SCIINT (1 << INT_SCIINT) | ||
370 | #define INTMASK_CLCDINT (1 << INT_CLCDINT) | ||
371 | #define INTMASK_DMAINT (1 << INT_DMAINT) | ||
372 | #define INTMASK_PWRFAILINT (1 << INT_PWRFAILINT) | ||
373 | #define INTMASK_MBXINT (1 << INT_MBXINT) | ||
374 | #define INTMASK_GNDINT (1 << INT_GNDINT) | ||
375 | #define INTMASK_VICSOURCE21 (1 << INT_VICSOURCE21) | ||
376 | #define INTMASK_VICSOURCE22 (1 << INT_VICSOURCE22) | ||
377 | #define INTMASK_VICSOURCE23 (1 << INT_VICSOURCE23) | ||
378 | #define INTMASK_VICSOURCE24 (1 << INT_VICSOURCE24) | ||
379 | #define INTMASK_VICSOURCE25 (1 << INT_VICSOURCE25) | ||
380 | #define INTMASK_VICSOURCE26 (1 << INT_VICSOURCE26) | ||
381 | #define INTMASK_VICSOURCE27 (1 << INT_VICSOURCE27) | ||
382 | #define INTMASK_VICSOURCE28 (1 << INT_VICSOURCE28) | ||
383 | #define INTMASK_VICSOURCE29 (1 << INT_VICSOURCE29) | ||
384 | #define INTMASK_VICSOURCE30 (1 << INT_VICSOURCE30) | ||
385 | #define INTMASK_VICSOURCE31 (1 << INT_VICSOURCE31) | ||
386 | |||
387 | |||
388 | #define VERSATILE_SC_VALID_INT 0x003FFFFF | 350 | #define VERSATILE_SC_VALID_INT 0x003FFFFF |
389 | 351 | ||
390 | #define MAXIRQNUM 31 | 352 | #define MAXIRQNUM 31 |
@@ -417,26 +379,6 @@ | |||
417 | #define SIC_INT_PCI3 30 | 379 | #define SIC_INT_PCI3 30 |
418 | 380 | ||
419 | 381 | ||
420 | #define SIC_INTMASK_MMCI0B (1 << SIC_INT_MMCI0B) | ||
421 | #define SIC_INTMASK_MMCI1B (1 << SIC_INT_MMCI1B) | ||
422 | #define SIC_INTMASK_KMI0 (1 << SIC_INT_KMI0) | ||
423 | #define SIC_INTMASK_KMI1 (1 << SIC_INT_KMI1) | ||
424 | #define SIC_INTMASK_SCI3 (1 << SIC_INT_SCI3) | ||
425 | #define SIC_INTMASK_UART3 (1 << SIC_INT_UART3) | ||
426 | #define SIC_INTMASK_CLCD (1 << SIC_INT_CLCD) | ||
427 | #define SIC_INTMASK_TOUCH (1 << SIC_INT_TOUCH) | ||
428 | #define SIC_INTMASK_KEYPAD (1 << SIC_INT_KEYPAD) | ||
429 | #define SIC_INTMASK_DoC (1 << SIC_INT_DoC) | ||
430 | #define SIC_INTMASK_MMCI0A (1 << SIC_INT_MMCI0A) | ||
431 | #define SIC_INTMASK_MMCI1A (1 << SIC_INT_MMCI1A) | ||
432 | #define SIC_INTMASK_AACI (1 << SIC_INT_AACI) | ||
433 | #define SIC_INTMASK_ETH (1 << SIC_INT_ETH) | ||
434 | #define SIC_INTMASK_USB (1 << SIC_INT_USB) | ||
435 | #define SIC_INTMASK_PCI0 (1 << SIC_INT_PCI0) | ||
436 | #define SIC_INTMASK_PCI1 (1 << SIC_INT_PCI1) | ||
437 | #define SIC_INTMASK_PCI2 (1 << SIC_INT_PCI2) | ||
438 | #define SIC_INTMASK_PCI3 (1 << SIC_INT_PCI3) | ||
439 | |||
440 | /* | 382 | /* |
441 | * Clean base - dummy | 383 | * Clean base - dummy |
442 | * | 384 | * |
diff --git a/arch/arm/mach-w90x900/Kconfig b/arch/arm/mach-w90x900/Kconfig new file mode 100644 index 000000000000..8e4178fe5ec2 --- /dev/null +++ b/arch/arm/mach-w90x900/Kconfig | |||
@@ -0,0 +1,19 @@ | |||
1 | if ARCH_W90X900 | ||
2 | |||
3 | config CPU_W90P910 | ||
4 | bool | ||
5 | help | ||
6 | Support for W90P910 of Nuvoton W90X900 CPUs. | ||
7 | |||
8 | menu "W90P910 Machines" | ||
9 | |||
10 | config MACH_W90P910EVB | ||
11 | bool "Nuvoton W90P910 Evaluation Board" | ||
12 | default y | ||
13 | select CPU_W90P910 | ||
14 | help | ||
15 | Say Y here if you are using the Nuvoton W90P910EVB | ||
16 | |||
17 | endmenu | ||
18 | |||
19 | endif | ||
diff --git a/arch/arm/mach-w90x900/Makefile b/arch/arm/mach-w90x900/Makefile new file mode 100644 index 000000000000..0c0c1d63f1c7 --- /dev/null +++ b/arch/arm/mach-w90x900/Makefile | |||
@@ -0,0 +1,15 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Object file lists. | ||
6 | |||
7 | obj-y := irq.o time.o | ||
8 | |||
9 | # W90X900 CPU support files | ||
10 | |||
11 | obj-$(CONFIG_CPU_W90P910) += w90p910.o | ||
12 | |||
13 | # machine support | ||
14 | |||
15 | obj-$(CONFIG_MACH_W90P910EVB) += mach-w90p910evb.o | ||
diff --git a/arch/arm/mach-w90x900/Makefile.boot b/arch/arm/mach-w90x900/Makefile.boot new file mode 100644 index 000000000000..a057b546b6e5 --- /dev/null +++ b/arch/arm/mach-w90x900/Makefile.boot | |||
@@ -0,0 +1,3 @@ | |||
1 | zreladdr-y := 0x00008000 | ||
2 | params_phys-y := 0x00000100 | ||
3 | |||
diff --git a/arch/arm/mach-w90x900/cpu.h b/arch/arm/mach-w90x900/cpu.h new file mode 100644 index 000000000000..40ff40845df0 --- /dev/null +++ b/arch/arm/mach-w90x900/cpu.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/cpu.h | ||
3 | * | ||
4 | * Based on linux/include/asm-arm/plat-s3c24xx/cpu.h by Ben Dooks | ||
5 | * | ||
6 | * Copyright (c) 2008 Nuvoton technology corporation | ||
7 | * All rights reserved. | ||
8 | * | ||
9 | * Header file for W90X900 CPU support | ||
10 | * | ||
11 | * Wan ZongShun <mcuos.com@gmail.com> | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License version 2 as | ||
15 | * published by the Free Software Foundation. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #define IODESC_ENT(y) \ | ||
20 | { \ | ||
21 | .virtual = (unsigned long)W90X900_VA_##y, \ | ||
22 | .pfn = __phys_to_pfn(W90X900_PA_##y), \ | ||
23 | .length = W90X900_SZ_##y, \ | ||
24 | .type = MT_DEVICE, \ | ||
25 | } | ||
26 | |||
27 | /*Cpu identifier register*/ | ||
28 | |||
29 | #define W90X900PDID W90X900_VA_GCR | ||
30 | #define W90P910_CPUID 0x02900910 | ||
31 | #define W90P920_CPUID 0x02900920 | ||
32 | #define W90P950_CPUID 0x02900950 | ||
33 | #define W90N960_CPUID 0x02900960 | ||
34 | |||
35 | struct w90x900_uartcfg; | ||
36 | struct map_desc; | ||
37 | struct sys_timer; | ||
38 | |||
39 | /* core initialisation functions */ | ||
40 | |||
41 | extern void w90x900_init_irq(void); | ||
42 | extern void w90p910_init_io(struct map_desc *mach_desc, int size); | ||
43 | extern void w90p910_init_uarts(struct w90x900_uartcfg *cfg, int no); | ||
44 | extern void w90p910_init_clocks(int xtal); | ||
45 | extern void w90p910_map_io(struct map_desc *mach_desc, int size); | ||
46 | extern struct sys_timer w90x900_timer; | ||
47 | |||
48 | #define W90X900_RES(name) \ | ||
49 | struct resource w90x900_##name##_resource[] = { \ | ||
50 | [0] = { \ | ||
51 | .start = name##_PA, \ | ||
52 | .end = name##_PA + 0x0ff, \ | ||
53 | .flags = IORESOURCE_MEM, \ | ||
54 | }, \ | ||
55 | [1] = { \ | ||
56 | .start = IRQ_##name, \ | ||
57 | .end = IRQ_##name, \ | ||
58 | .flags = IORESOURCE_IRQ, \ | ||
59 | } \ | ||
60 | } | ||
61 | |||
62 | #define W90X900_DEVICE(devname, regname, devid, platdevname) \ | ||
63 | struct platform_device w90x900_##devname = { \ | ||
64 | .name = platdevname, \ | ||
65 | .id = devid, \ | ||
66 | .num_resources = ARRAY_SIZE(w90x900_##regname##_resource), \ | ||
67 | .resource = w90x900_##regname##_resource, \ | ||
68 | } | ||
69 | |||
70 | #define W90X900_UARTCFG(port, flag, uc, ulc, ufc) \ | ||
71 | { \ | ||
72 | .hwport = port, \ | ||
73 | .flags = flag, \ | ||
74 | .ucon = uc, \ | ||
75 | .ulcon = ulc, \ | ||
76 | .ufcon = ufc, \ | ||
77 | } | ||
diff --git a/arch/arm/mach-w90x900/include/mach/entry-macro.S b/arch/arm/mach-w90x900/include/mach/entry-macro.S new file mode 100644 index 000000000000..d39aca5be9ee --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/entry-macro.S | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for W90P910-based platforms | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <mach/hardware.h> | ||
13 | #include <mach/regs-irq.h> | ||
14 | |||
15 | .macro get_irqnr_preamble, base, tmp | ||
16 | .endm | ||
17 | |||
18 | .macro arch_ret_to_user, tmp1, tmp2 | ||
19 | .endm | ||
20 | |||
21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
22 | |||
23 | mov \base, #AIC_BA | ||
24 | |||
25 | ldr \irqnr, [ \base, #AIC_IPER] | ||
26 | ldr \irqnr, [ \base, #AIC_ISNR] | ||
27 | cmp \irqnr, #0 | ||
28 | |||
29 | .endm | ||
30 | |||
31 | /* currently don't need an disable_fiq macro */ | ||
32 | |||
33 | .macro disable_fiq | ||
34 | .endm | ||
diff --git a/arch/arm/mach-w90x900/include/mach/hardware.h b/arch/arm/mach-w90x900/include/mach/hardware.h new file mode 100644 index 000000000000..fe3c6265a466 --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/hardware.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/hardware.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/hardware.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_HARDWARE_H | ||
19 | #define __ASM_ARCH_HARDWARE_H | ||
20 | |||
21 | #include <asm/sizes.h> | ||
22 | #include <mach/map.h> | ||
23 | |||
24 | #endif /* __ASM_ARCH_HARDWARE_H */ | ||
diff --git a/arch/arm/mach-w90x900/include/mach/io.h b/arch/arm/mach-w90x900/include/mach/io.h new file mode 100644 index 000000000000..d96ab99df05b --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/io.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/io.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/io.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARM_ARCH_IO_H | ||
19 | #define __ASM_ARM_ARCH_IO_H | ||
20 | |||
21 | #define IO_SPACE_LIMIT 0xffffffff | ||
22 | |||
23 | /* | ||
24 | * 1:1 mapping for ioremapped regions. | ||
25 | */ | ||
26 | |||
27 | #define __mem_pci(a) (a) | ||
28 | #define __io(a) __typesafe_io(a) | ||
29 | |||
30 | #endif | ||
diff --git a/arch/arm/mach-w90x900/include/mach/irqs.h b/arch/arm/mach-w90x900/include/mach/irqs.h new file mode 100644 index 000000000000..1c583f9cbcde --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/irqs.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/irqs.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/irqs.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_IRQS_H | ||
19 | #define __ASM_ARCH_IRQS_H | ||
20 | |||
21 | /* | ||
22 | * we keep the first set of CPU IRQs out of the range of | ||
23 | * the ISA space, so that the PC104 has them to itself | ||
24 | * and we don't end up having to do horrible things to the | ||
25 | * standard ISA drivers.... | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | #define W90X900_IRQ(x) (x) | ||
30 | |||
31 | /* Main cpu interrupts */ | ||
32 | |||
33 | #define IRQ_WDT W90X900_IRQ(1) | ||
34 | #define IRQ_UART0 W90X900_IRQ(7) | ||
35 | #define IRQ_UART1 W90X900_IRQ(8) | ||
36 | #define IRQ_UART2 W90X900_IRQ(9) | ||
37 | #define IRQ_UART3 W90X900_IRQ(10) | ||
38 | #define IRQ_UART4 W90X900_IRQ(11) | ||
39 | #define IRQ_TIMER0 W90X900_IRQ(12) | ||
40 | #define IRQ_TIMER1 W90X900_IRQ(13) | ||
41 | #define IRQ_T_INT_GROUP W90X900_IRQ(14) | ||
42 | #define IRQ_ADC W90X900_IRQ(31) | ||
43 | #define NR_IRQS (IRQ_ADC+1) | ||
44 | |||
45 | #endif /* __ASM_ARCH_IRQ_H */ | ||
diff --git a/arch/arm/mach-w90x900/include/mach/map.h b/arch/arm/mach-w90x900/include/mach/map.h new file mode 100644 index 000000000000..79320ebe614b --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/map.h | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/map.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/map.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_MAP_H | ||
19 | #define __ASM_ARCH_MAP_H | ||
20 | |||
21 | #ifndef __ASSEMBLY__ | ||
22 | #define W90X900_ADDR(x) ((void __iomem *)(0xF0000000 + (x))) | ||
23 | #else | ||
24 | #define W90X900_ADDR(x) (0xF0000000 + (x)) | ||
25 | #endif | ||
26 | |||
27 | #define AHB_IO_BASE 0xB0000000 | ||
28 | #define APB_IO_BASE 0xB8000000 | ||
29 | #define CLOCKPW_BASE (APB_IO_BASE+0x200) | ||
30 | #define AIC_IO_BASE (APB_IO_BASE+0x2000) | ||
31 | #define TIMER_IO_BASE (APB_IO_BASE+0x1000) | ||
32 | |||
33 | /* | ||
34 | * interrupt controller is the first thing we put in, to make | ||
35 | * the assembly code for the irq detection easier | ||
36 | */ | ||
37 | |||
38 | #define W90X900_VA_IRQ W90X900_ADDR(0x00000000) | ||
39 | #define W90X900_PA_IRQ (0xB8002000) | ||
40 | #define W90X900_SZ_IRQ SZ_4K | ||
41 | |||
42 | #define W90X900_VA_GCR W90X900_ADDR(0x08002000) | ||
43 | #define W90X900_PA_GCR (0xB0000000) | ||
44 | #define W90X900_SZ_GCR SZ_4K | ||
45 | |||
46 | /* Clock and Power management */ | ||
47 | |||
48 | #define W90X900_VA_CLKPWR (W90X900_VA_GCR+0x200) | ||
49 | #define W90X900_PA_CLKPWR (0xB0000200) | ||
50 | #define W90X900_SZ_CLKPWR SZ_4K | ||
51 | |||
52 | /* EBI management */ | ||
53 | |||
54 | #define W90X900_VA_EBI W90X900_ADDR(0x00001000) | ||
55 | #define W90X900_PA_EBI (0xB0001000) | ||
56 | #define W90X900_SZ_EBI SZ_4K | ||
57 | |||
58 | /* UARTs */ | ||
59 | |||
60 | #define W90X900_VA_UART W90X900_ADDR(0x08000000) | ||
61 | #define W90X900_PA_UART (0xB8000000) | ||
62 | #define W90X900_SZ_UART SZ_4K | ||
63 | |||
64 | /* Timers */ | ||
65 | |||
66 | #define W90X900_VA_TIMER W90X900_ADDR(0x08001000) | ||
67 | #define W90X900_PA_TIMER (0xB8001000) | ||
68 | #define W90X900_SZ_TIMER SZ_4K | ||
69 | |||
70 | /* GPIO ports */ | ||
71 | |||
72 | #define W90X900_VA_GPIO W90X900_ADDR(0x08003000) | ||
73 | #define W90X900_PA_GPIO (0xB8003000) | ||
74 | #define W90X900_SZ_GPIO SZ_4K | ||
75 | |||
76 | #endif /* __ASM_ARCH_MAP_H */ | ||
diff --git a/arch/arm/mach-w90x900/include/mach/memory.h b/arch/arm/mach-w90x900/include/mach/memory.h new file mode 100644 index 000000000000..971b80702c27 --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/memory.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/memory.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_MEMORY_H | ||
19 | #define __ASM_ARCH_MEMORY_H | ||
20 | |||
21 | #define PHYS_OFFSET UL(0x00000000) | ||
22 | |||
23 | #endif | ||
diff --git a/arch/arm/mach-w90x900/include/mach/regs-irq.h b/arch/arm/mach-w90x900/include/mach/regs-irq.h new file mode 100644 index 000000000000..8a3185fbc9cf --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/regs-irq.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/regs-irq.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/regs-irq.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef ___ASM_ARCH_REGS_IRQ_H | ||
19 | #define ___ASM_ARCH_REGS_IRQ_H | ||
20 | |||
21 | /* Advance Interrupt Controller (AIC) Registers */ | ||
22 | |||
23 | #define AIC_BA W90X900_VA_IRQ | ||
24 | |||
25 | #define REG_AIC_IRQSC (AIC_BA+0x80) | ||
26 | #define REG_AIC_GEN (AIC_BA+0x84) | ||
27 | #define REG_AIC_GASR (AIC_BA+0x88) | ||
28 | #define REG_AIC_GSCR (AIC_BA+0x8C) | ||
29 | #define REG_AIC_IRSR (AIC_BA+0x100) | ||
30 | #define REG_AIC_IASR (AIC_BA+0x104) | ||
31 | #define REG_AIC_ISR (AIC_BA+0x108) | ||
32 | #define REG_AIC_IPER (AIC_BA+0x10C) | ||
33 | #define REG_AIC_ISNR (AIC_BA+0x110) | ||
34 | #define REG_AIC_IMR (AIC_BA+0x114) | ||
35 | #define REG_AIC_OISR (AIC_BA+0x118) | ||
36 | #define REG_AIC_MECR (AIC_BA+0x120) | ||
37 | #define REG_AIC_MDCR (AIC_BA+0x124) | ||
38 | #define REG_AIC_SSCR (AIC_BA+0x128) | ||
39 | #define REG_AIC_SCCR (AIC_BA+0x12C) | ||
40 | #define REG_AIC_EOSCR (AIC_BA+0x130) | ||
41 | #define AIC_IPER (0x10C) | ||
42 | #define AIC_ISNR (0x110) | ||
43 | |||
44 | /*16-18 bits of REG_AIC_GEN define irq(2-4) group*/ | ||
45 | |||
46 | #define TIMER2_IRQ (1 << 16) | ||
47 | #define TIMER3_IRQ (1 << 17) | ||
48 | #define TIMER4_IRQ (1 << 18) | ||
49 | #define TIME_GROUP_IRQ (TIMER2_IRQ|TIMER3_IRQ|TIMER4_IRQ) | ||
50 | |||
51 | #endif /* ___ASM_ARCH_REGS_IRQ_H */ | ||
diff --git a/arch/arm/mach-w90x900/include/mach/regs-serial.h b/arch/arm/mach-w90x900/include/mach/regs-serial.h new file mode 100644 index 000000000000..f08fa0d75e11 --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/regs-serial.h | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/regs-serial.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/regs-serial.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARM_REGS_SERIAL_H | ||
19 | #define __ASM_ARM_REGS_SERIAL_H | ||
20 | |||
21 | #define UART0_BA W90X900_VA_UART | ||
22 | #define UART1_BA (W90X900_VA_UART+0x100) | ||
23 | #define UART2_BA (W90X900_VA_UART+0x200) | ||
24 | #define UART3_BA (W90X900_VA_UART+0x300) | ||
25 | #define UART4_BA (W90X900_VA_UART+0x400) | ||
26 | |||
27 | #define UART0_PA W90X900_PA_UART | ||
28 | #define UART1_PA (W90X900_PA_UART+0x100) | ||
29 | #define UART2_PA (W90X900_PA_UART+0x200) | ||
30 | #define UART3_PA (W90X900_PA_UART+0x300) | ||
31 | #define UART4_PA (W90X900_PA_UART+0x400) | ||
32 | |||
33 | #ifndef __ASSEMBLY__ | ||
34 | |||
35 | struct w90x900_uart_clksrc { | ||
36 | const char *name; | ||
37 | unsigned int divisor; | ||
38 | unsigned int min_baud; | ||
39 | unsigned int max_baud; | ||
40 | }; | ||
41 | |||
42 | struct w90x900_uartcfg { | ||
43 | unsigned char hwport; | ||
44 | unsigned char unused; | ||
45 | unsigned short flags; | ||
46 | unsigned long uart_flags; | ||
47 | |||
48 | unsigned long ucon; | ||
49 | unsigned long ulcon; | ||
50 | unsigned long ufcon; | ||
51 | |||
52 | struct w90x900_uart_clksrc *clocks; | ||
53 | unsigned int clocks_size; | ||
54 | }; | ||
55 | |||
56 | #endif /* __ASSEMBLY__ */ | ||
57 | |||
58 | #endif /* __ASM_ARM_REGS_SERIAL_H */ | ||
59 | |||
diff --git a/arch/arm/mach-w90x900/include/mach/regs-timer.h b/arch/arm/mach-w90x900/include/mach/regs-timer.h new file mode 100644 index 000000000000..8f390620c0e4 --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/regs-timer.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/regs-timer.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/regs-timer.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_REGS_TIMER_H | ||
19 | #define __ASM_ARCH_REGS_TIMER_H | ||
20 | |||
21 | /* Timer Registers */ | ||
22 | |||
23 | #define TMR_BA W90X900_VA_TIMER | ||
24 | #define REG_TCSR0 (TMR_BA+0x00) | ||
25 | #define REG_TCSR1 (TMR_BA+0x04) | ||
26 | #define REG_TICR0 (TMR_BA+0x08) | ||
27 | #define REG_TICR1 (TMR_BA+0x0C) | ||
28 | #define REG_TDR0 (TMR_BA+0x10) | ||
29 | #define REG_TDR1 (TMR_BA+0x14) | ||
30 | #define REG_TISR (TMR_BA+0x18) | ||
31 | #define REG_WTCR (TMR_BA+0x1C) | ||
32 | #define REG_TCSR2 (TMR_BA+0x20) | ||
33 | #define REG_TCSR3 (TMR_BA+0x24) | ||
34 | #define REG_TICR2 (TMR_BA+0x28) | ||
35 | #define REG_TICR3 (TMR_BA+0x2C) | ||
36 | #define REG_TDR2 (TMR_BA+0x30) | ||
37 | #define REG_TDR3 (TMR_BA+0x34) | ||
38 | #define REG_TCSR4 (TMR_BA+0x40) | ||
39 | #define REG_TICR4 (TMR_BA+0x48) | ||
40 | #define REG_TDR4 (TMR_BA+0x50) | ||
41 | |||
42 | #endif /* __ASM_ARCH_REGS_TIMER_H */ | ||
diff --git a/arch/arm/mach-w90x900/include/mach/system.h b/arch/arm/mach-w90x900/include/mach/system.h new file mode 100644 index 000000000000..93753f922618 --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/system.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/system.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/system.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #include <asm/proc-fns.h> | ||
19 | |||
20 | static void arch_idle(void) | ||
21 | { | ||
22 | } | ||
23 | |||
24 | static void arch_reset(char mode) | ||
25 | { | ||
26 | cpu_reset(0); | ||
27 | } | ||
28 | |||
diff --git a/arch/arm/mach-w90x900/include/mach/timex.h b/arch/arm/mach-w90x900/include/mach/timex.h new file mode 100644 index 000000000000..164dce0b64db --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/timex.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/timex.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/timex.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_TIMEX_H | ||
19 | #define __ASM_ARCH_TIMEX_H | ||
20 | |||
21 | /* CLOCK_TICK_RATE Now, I don't use it. */ | ||
22 | |||
23 | #define CLOCK_TICK_RATE 15000000 | ||
24 | |||
25 | #endif /* __ASM_ARCH_TIMEX_H */ | ||
diff --git a/arch/arm/mach-w90x900/include/mach/uncompress.h b/arch/arm/mach-w90x900/include/mach/uncompress.h new file mode 100644 index 000000000000..050d9fe5ae1b --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/uncompress.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/uncompress.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/uncompress.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
19 | #define __ASM_ARCH_UNCOMPRESS_H | ||
20 | |||
21 | /* Defines for UART registers */ | ||
22 | |||
23 | #include <mach/regs-serial.h> | ||
24 | #include <mach/map.h> | ||
25 | |||
26 | #define arch_decomp_wdog() | ||
27 | |||
28 | static void putc(int ch) | ||
29 | { | ||
30 | } | ||
31 | |||
32 | static inline void flush(void) | ||
33 | { | ||
34 | } | ||
35 | |||
36 | static void arch_decomp_setup(void) | ||
37 | { | ||
38 | } | ||
39 | |||
40 | #endif/* __ASM_W90X900_UNCOMPRESS_H */ | ||
diff --git a/arch/arm/mach-w90x900/include/mach/vmalloc.h b/arch/arm/mach-w90x900/include/mach/vmalloc.h new file mode 100644 index 000000000000..2f9dfb928533 --- /dev/null +++ b/arch/arm/mach-w90x900/include/mach/vmalloc.h | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-w90x900/include/mach/vmalloc.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Nuvoton technology corporation | ||
5 | * All rights reserved. | ||
6 | * | ||
7 | * Wan ZongShun <mcuos.com@gmail.com> | ||
8 | * | ||
9 | * Based on arch/arm/mach-s3c2410/include/mach/vmalloc.h | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_VMALLOC_H | ||
19 | #define __ASM_ARCH_VMALLOC_H | ||
20 | |||
21 | #define VMALLOC_END (0xE0000000) | ||
22 | |||
23 | #endif /* __ASM_ARCH_VMALLOC_H */ | ||
diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c new file mode 100644 index 000000000000..0b4fc194729c --- /dev/null +++ b/arch/arm/mach-w90x900/irq.c | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-w90x900/irq.c | ||
3 | * | ||
4 | * based on linux/arch/arm/plat-s3c24xx/irq.c by Ben Dooks | ||
5 | * | ||
6 | * Copyright (c) 2008 Nuvoton technology corporation | ||
7 | * All rights reserved. | ||
8 | * | ||
9 | * Wan ZongShun <mcuos.com@gmail.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #include <linux/init.h> | ||
19 | #include <linux/module.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/ioport.h> | ||
22 | #include <linux/ptrace.h> | ||
23 | #include <linux/sysdev.h> | ||
24 | #include <linux/io.h> | ||
25 | |||
26 | #include <asm/irq.h> | ||
27 | #include <asm/mach/irq.h> | ||
28 | |||
29 | #include <mach/hardware.h> | ||
30 | #include <mach/regs-irq.h> | ||
31 | |||
32 | static void w90x900_irq_mask(unsigned int irq) | ||
33 | { | ||
34 | __raw_writel(1 << irq, REG_AIC_MDCR); | ||
35 | } | ||
36 | |||
37 | /* | ||
38 | * By the w90p910 spec,any irq,only write 1 | ||
39 | * to REG_AIC_EOSCR for ACK | ||
40 | */ | ||
41 | |||
42 | static void w90x900_irq_ack(unsigned int irq) | ||
43 | { | ||
44 | __raw_writel(0x01, REG_AIC_EOSCR); | ||
45 | } | ||
46 | |||
47 | static void w90x900_irq_unmask(unsigned int irq) | ||
48 | { | ||
49 | unsigned long mask; | ||
50 | |||
51 | if (irq == IRQ_T_INT_GROUP) { | ||
52 | mask = __raw_readl(REG_AIC_GEN); | ||
53 | __raw_writel(TIME_GROUP_IRQ | mask, REG_AIC_GEN); | ||
54 | __raw_writel(1 << IRQ_T_INT_GROUP, REG_AIC_MECR); | ||
55 | } | ||
56 | __raw_writel(1 << irq, REG_AIC_MECR); | ||
57 | } | ||
58 | |||
59 | static struct irq_chip w90x900_irq_chip = { | ||
60 | .ack = w90x900_irq_ack, | ||
61 | .mask = w90x900_irq_mask, | ||
62 | .unmask = w90x900_irq_unmask, | ||
63 | }; | ||
64 | |||
65 | void __init w90x900_init_irq(void) | ||
66 | { | ||
67 | int irqno; | ||
68 | |||
69 | __raw_writel(0xFFFFFFFE, REG_AIC_MDCR); | ||
70 | |||
71 | for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) { | ||
72 | set_irq_chip(irqno, &w90x900_irq_chip); | ||
73 | set_irq_handler(irqno, handle_level_irq); | ||
74 | set_irq_flags(irqno, IRQF_VALID); | ||
75 | } | ||
76 | } | ||
diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c new file mode 100644 index 000000000000..9307a2475438 --- /dev/null +++ b/arch/arm/mach-w90x900/mach-w90p910evb.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-w90x900/mach-w90p910evb.c | ||
3 | * | ||
4 | * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche | ||
5 | * | ||
6 | * Copyright (C) 2008 Nuvoton technology corporation | ||
7 | * All rights reserved. | ||
8 | * | ||
9 | * Wan ZongShun <mcuos.com@gmail.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or | ||
12 | * modify it under the terms of the GNU General Public License as | ||
13 | * published by the Free Software Foundation; either version 2 of | ||
14 | * the License, or (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/types.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/list.h> | ||
22 | #include <linux/timer.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | |||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | #include <asm/mach/irq.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | |||
31 | #include <mach/regs-serial.h> | ||
32 | |||
33 | #include "cpu.h" | ||
34 | |||
35 | static struct map_desc w90p910_iodesc[] __initdata = { | ||
36 | }; | ||
37 | |||
38 | static struct w90x900_uartcfg w90p910_uartcfgs[] = { | ||
39 | W90X900_UARTCFG(0, 0, 0, 0, 0), | ||
40 | W90X900_UARTCFG(1, 0, 0, 0, 0), | ||
41 | W90X900_UARTCFG(2, 0, 0, 0, 0), | ||
42 | W90X900_UARTCFG(3, 0, 0, 0, 0), | ||
43 | W90X900_UARTCFG(4, 0, 0, 0, 0), | ||
44 | }; | ||
45 | |||
46 | /*Here should be your evb resourse,such as LCD*/ | ||
47 | |||
48 | static struct platform_device *w90p910evb_dev[] __initdata = { | ||
49 | }; | ||
50 | |||
51 | static void __init w90p910evb_map_io(void) | ||
52 | { | ||
53 | w90p910_map_io(w90p910_iodesc, ARRAY_SIZE(w90p910_iodesc)); | ||
54 | w90p910_init_clocks(0); | ||
55 | w90p910_init_uarts(w90p910_uartcfgs, ARRAY_SIZE(w90p910_uartcfgs)); | ||
56 | } | ||
57 | |||
58 | static void __init w90p910evb_init(void) | ||
59 | { | ||
60 | platform_add_devices(w90p910evb_dev, ARRAY_SIZE(w90p910evb_dev)); | ||
61 | } | ||
62 | |||
63 | MACHINE_START(W90P910EVB, "W90P910EVB") | ||
64 | /* Maintainer: Wan ZongShun */ | ||
65 | .phys_io = W90X900_PA_UART, | ||
66 | .io_pg_offst = (((u32)W90X900_VA_UART) >> 18) & 0xfffc, | ||
67 | .boot_params = 0, | ||
68 | .map_io = w90p910evb_map_io, | ||
69 | .init_irq = w90x900_init_irq, | ||
70 | .init_machine = w90p910evb_init, | ||
71 | .timer = &w90x900_timer, | ||
72 | MACHINE_END | ||
diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c new file mode 100644 index 000000000000..3a69e381f316 --- /dev/null +++ b/arch/arm/mach-w90x900/time.c | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-w90x900/time.c | ||
3 | * | ||
4 | * Based on linux/arch/arm/plat-s3c24xx/time.c by Ben Dooks | ||
5 | * | ||
6 | * Copyright (c) 2008 Nuvoton technology corporation | ||
7 | * All rights reserved. | ||
8 | * | ||
9 | * Wan ZongShun <mcuos.com@gmail.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or | ||
14 | * (at your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/sched.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/err.h> | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/io.h> | ||
25 | #include <linux/leds.h> | ||
26 | |||
27 | #include <asm/mach-types.h> | ||
28 | #include <asm/mach/irq.h> | ||
29 | #include <asm/mach/time.h> | ||
30 | |||
31 | #include <mach/system.h> | ||
32 | #include <mach/map.h> | ||
33 | #include <mach/regs-timer.h> | ||
34 | |||
35 | static unsigned long w90x900_gettimeoffset(void) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | /*IRQ handler for the timer*/ | ||
41 | |||
42 | static irqreturn_t | ||
43 | w90x900_timer_interrupt(int irq, void *dev_id) | ||
44 | { | ||
45 | timer_tick(); | ||
46 | __raw_writel(0x01, REG_TISR); /* clear TIF0 */ | ||
47 | return IRQ_HANDLED; | ||
48 | } | ||
49 | |||
50 | static struct irqaction w90x900_timer_irq = { | ||
51 | .name = "w90x900 Timer Tick", | ||
52 | .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL, | ||
53 | .handler = w90x900_timer_interrupt, | ||
54 | }; | ||
55 | |||
56 | /*Set up timer reg.*/ | ||
57 | |||
58 | static void w90x900_timer_setup(void) | ||
59 | { | ||
60 | __raw_writel(0, REG_TCSR0); | ||
61 | __raw_writel(0, REG_TCSR1); | ||
62 | __raw_writel(0, REG_TCSR2); | ||
63 | __raw_writel(0, REG_TCSR3); | ||
64 | __raw_writel(0, REG_TCSR4); | ||
65 | __raw_writel(0x1F, REG_TISR); | ||
66 | __raw_writel(15000000/(100 * 100), REG_TICR0); | ||
67 | __raw_writel(0x68000063, REG_TCSR0); | ||
68 | } | ||
69 | |||
70 | static void __init w90x900_timer_init(void) | ||
71 | { | ||
72 | w90x900_timer_setup(); | ||
73 | setup_irq(IRQ_TIMER0, &w90x900_timer_irq); | ||
74 | } | ||
75 | |||
76 | struct sys_timer w90x900_timer = { | ||
77 | .init = w90x900_timer_init, | ||
78 | .offset = w90x900_gettimeoffset, | ||
79 | .resume = w90x900_timer_setup | ||
80 | }; | ||
diff --git a/arch/arm/mach-w90x900/w90p910.c b/arch/arm/mach-w90x900/w90p910.c new file mode 100644 index 000000000000..aa783bc94310 --- /dev/null +++ b/arch/arm/mach-w90x900/w90p910.c | |||
@@ -0,0 +1,134 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-w90x900/w90p910.c | ||
3 | * | ||
4 | * Based on linux/arch/arm/plat-s3c24xx/s3c244x.c by Ben Dooks | ||
5 | * | ||
6 | * Copyright (c) 2008 Nuvoton technology corporation | ||
7 | * All rights reserved. | ||
8 | * | ||
9 | * Wan ZongShun <mcuos.com@gmail.com> | ||
10 | * | ||
11 | * W90P910 cpu support | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify | ||
14 | * it under the terms of the GNU General Public License as published by | ||
15 | * the Free Software Foundation; either version 2 of the License, or | ||
16 | * (at your option) any later version. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/types.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/list.h> | ||
24 | #include <linux/timer.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/platform_device.h> | ||
27 | #include <linux/io.h> | ||
28 | |||
29 | #include <asm/mach/arch.h> | ||
30 | #include <asm/mach/map.h> | ||
31 | #include <asm/mach/irq.h> | ||
32 | #include <asm/irq.h> | ||
33 | |||
34 | #include <mach/hardware.h> | ||
35 | #include <mach/regs-serial.h> | ||
36 | |||
37 | #include "cpu.h" | ||
38 | |||
39 | /*W90P910 has five uarts*/ | ||
40 | |||
41 | #define MAX_UART_COUNT 5 | ||
42 | static int uart_count; | ||
43 | static struct platform_device *uart_devs[MAX_UART_COUNT-1]; | ||
44 | |||
45 | /* Initial IO mappings */ | ||
46 | |||
47 | static struct map_desc w90p910_iodesc[] __initdata = { | ||
48 | IODESC_ENT(IRQ), | ||
49 | IODESC_ENT(GCR), | ||
50 | IODESC_ENT(UART), | ||
51 | IODESC_ENT(TIMER), | ||
52 | IODESC_ENT(EBI), | ||
53 | /*IODESC_ENT(LCD),*/ | ||
54 | }; | ||
55 | |||
56 | /*Init the dev resource*/ | ||
57 | |||
58 | static W90X900_RES(UART0); | ||
59 | static W90X900_RES(UART1); | ||
60 | static W90X900_RES(UART2); | ||
61 | static W90X900_RES(UART3); | ||
62 | static W90X900_RES(UART4); | ||
63 | static W90X900_DEVICE(uart0, UART0, 0, "w90x900-uart"); | ||
64 | static W90X900_DEVICE(uart1, UART1, 1, "w90x900-uart"); | ||
65 | static W90X900_DEVICE(uart2, UART2, 2, "w90x900-uart"); | ||
66 | static W90X900_DEVICE(uart3, UART3, 3, "w90x900-uart"); | ||
67 | static W90X900_DEVICE(uart4, UART4, 4, "w90x900-uart"); | ||
68 | |||
69 | static struct platform_device *uart_devices[] __initdata = { | ||
70 | &w90x900_uart0, | ||
71 | &w90x900_uart1, | ||
72 | &w90x900_uart2, | ||
73 | &w90x900_uart3, | ||
74 | &w90x900_uart4 | ||
75 | }; | ||
76 | |||
77 | /*Init W90P910 uart device*/ | ||
78 | |||
79 | void __init w90p910_init_uarts(struct w90x900_uartcfg *cfg, int no) | ||
80 | { | ||
81 | struct platform_device *platdev; | ||
82 | int uart, uartdev; | ||
83 | |||
84 | /*By min() to judge count of uart be used indeed*/ | ||
85 | |||
86 | uartdev = ARRAY_SIZE(uart_devices); | ||
87 | no = min(uartdev, no); | ||
88 | |||
89 | for (uart = 0; uart < no; uart++, cfg++) { | ||
90 | if (cfg->hwport != uart) | ||
91 | printk(KERN_ERR "w90x900_uartcfg[%d] error\n", uart); | ||
92 | platdev = uart_devices[cfg->hwport]; | ||
93 | uart_devs[uart] = platdev; | ||
94 | platdev->dev.platform_data = cfg; | ||
95 | } | ||
96 | uart_count = uart; | ||
97 | } | ||
98 | |||
99 | /*Init W90P910 evb io*/ | ||
100 | |||
101 | void __init w90p910_map_io(struct map_desc *mach_desc, int mach_size) | ||
102 | { | ||
103 | unsigned long idcode = 0x0; | ||
104 | |||
105 | iotable_init(w90p910_iodesc, ARRAY_SIZE(w90p910_iodesc)); | ||
106 | |||
107 | idcode = __raw_readl(W90X900PDID); | ||
108 | if (idcode != W90P910_CPUID) | ||
109 | printk(KERN_ERR "CPU type 0x%08lx is not W90P910\n", idcode); | ||
110 | } | ||
111 | |||
112 | /*Init W90P910 clock*/ | ||
113 | |||
114 | void __init w90p910_init_clocks(int xtal) | ||
115 | { | ||
116 | } | ||
117 | |||
118 | static int __init w90p910_init_cpu(void) | ||
119 | { | ||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | static int __init w90x900_arch_init(void) | ||
124 | { | ||
125 | int ret; | ||
126 | |||
127 | ret = w90p910_init_cpu(); | ||
128 | if (ret != 0) | ||
129 | return ret; | ||
130 | |||
131 | return platform_add_devices(uart_devs, uart_count); | ||
132 | |||
133 | } | ||
134 | arch_initcall(w90x900_arch_init); | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index ab5f7a21350b..d490f3773c01 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig | |||
@@ -10,8 +10,7 @@ config CPU_32 | |||
10 | 10 | ||
11 | # ARM610 | 11 | # ARM610 |
12 | config CPU_ARM610 | 12 | config CPU_ARM610 |
13 | bool "Support ARM610 processor" | 13 | bool "Support ARM610 processor" if ARCH_RPC |
14 | depends on ARCH_RPC | ||
15 | select CPU_32v3 | 14 | select CPU_32v3 |
16 | select CPU_CACHE_V3 | 15 | select CPU_CACHE_V3 |
17 | select CPU_CACHE_VIVT | 16 | select CPU_CACHE_VIVT |
@@ -43,8 +42,7 @@ config CPU_ARM7TDMI | |||
43 | 42 | ||
44 | # ARM710 | 43 | # ARM710 |
45 | config CPU_ARM710 | 44 | config CPU_ARM710 |
46 | bool "Support ARM710 processor" if !ARCH_CLPS7500 && ARCH_RPC | 45 | bool "Support ARM710 processor" if ARCH_RPC |
47 | default y if ARCH_CLPS7500 | ||
48 | select CPU_32v3 | 46 | select CPU_32v3 |
49 | select CPU_CACHE_V3 | 47 | select CPU_CACHE_V3 |
50 | select CPU_CACHE_VIVT | 48 | select CPU_CACHE_VIVT |
@@ -63,8 +61,7 @@ config CPU_ARM710 | |||
63 | 61 | ||
64 | # ARM720T | 62 | # ARM720T |
65 | config CPU_ARM720T | 63 | config CPU_ARM720T |
66 | bool "Support ARM720T processor" if !ARCH_CLPS711X && !ARCH_L7200 && !ARCH_CDB89712 && ARCH_INTEGRATOR | 64 | bool "Support ARM720T processor" if ARCH_INTEGRATOR |
67 | default y if ARCH_CLPS711X || ARCH_L7200 || ARCH_CDB89712 || ARCH_H720X | ||
68 | select CPU_32v4T | 65 | select CPU_32v4T |
69 | select CPU_ABRT_LV4T | 66 | select CPU_ABRT_LV4T |
70 | select CPU_PABRT_NOIFAR | 67 | select CPU_PABRT_NOIFAR |
@@ -114,9 +111,7 @@ config CPU_ARM9TDMI | |||
114 | 111 | ||
115 | # ARM920T | 112 | # ARM920T |
116 | config CPU_ARM920T | 113 | config CPU_ARM920T |
117 | bool "Support ARM920T processor" | 114 | bool "Support ARM920T processor" if ARCH_INTEGRATOR |
118 | depends on ARCH_EP93XX || ARCH_INTEGRATOR || CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_IMX || ARCH_AAEC2000 || ARCH_AT91RM9200 | ||
119 | default y if CPU_S3C2410 || CPU_S3C2440 || CPU_S3C2442 || ARCH_AT91RM9200 | ||
120 | select CPU_32v4T | 115 | select CPU_32v4T |
121 | select CPU_ABRT_EV4T | 116 | select CPU_ABRT_EV4T |
122 | select CPU_PABRT_NOIFAR | 117 | select CPU_PABRT_NOIFAR |
@@ -138,8 +133,6 @@ config CPU_ARM920T | |||
138 | # ARM922T | 133 | # ARM922T |
139 | config CPU_ARM922T | 134 | config CPU_ARM922T |
140 | bool "Support ARM922T processor" if ARCH_INTEGRATOR | 135 | bool "Support ARM922T processor" if ARCH_INTEGRATOR |
141 | depends on ARCH_LH7A40X || ARCH_INTEGRATOR || ARCH_KS8695 | ||
142 | default y if ARCH_LH7A40X || ARCH_KS8695 | ||
143 | select CPU_32v4T | 136 | select CPU_32v4T |
144 | select CPU_ABRT_EV4T | 137 | select CPU_ABRT_EV4T |
145 | select CPU_PABRT_NOIFAR | 138 | select CPU_PABRT_NOIFAR |
@@ -159,8 +152,6 @@ config CPU_ARM922T | |||
159 | # ARM925T | 152 | # ARM925T |
160 | config CPU_ARM925T | 153 | config CPU_ARM925T |
161 | bool "Support ARM925T processor" if ARCH_OMAP1 | 154 | bool "Support ARM925T processor" if ARCH_OMAP1 |
162 | depends on ARCH_OMAP15XX | ||
163 | default y if ARCH_OMAP15XX | ||
164 | select CPU_32v4T | 155 | select CPU_32v4T |
165 | select CPU_ABRT_EV4T | 156 | select CPU_ABRT_EV4T |
166 | select CPU_PABRT_NOIFAR | 157 | select CPU_PABRT_NOIFAR |
@@ -179,22 +170,7 @@ config CPU_ARM925T | |||
179 | 170 | ||
180 | # ARM926T | 171 | # ARM926T |
181 | config CPU_ARM926T | 172 | config CPU_ARM926T |
182 | bool "Support ARM926T processor" | 173 | bool "Support ARM926T processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB |
183 | depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || \ | ||
184 | MACH_VERSATILE_AB || ARCH_OMAP730 || \ | ||
185 | ARCH_OMAP16XX || MACH_REALVIEW_EB || \ | ||
186 | ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || \ | ||
187 | ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || \ | ||
188 | ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || \ | ||
189 | ARCH_AT91SAM9G20 || ARCH_AT91CAP9 || \ | ||
190 | ARCH_NS9XXX || ARCH_DAVINCI || ARCH_MX2 | ||
191 | default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || \ | ||
192 | ARCH_OMAP730 || ARCH_OMAP16XX || \ | ||
193 | ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || \ | ||
194 | ARCH_AT91SAM9260 || ARCH_AT91SAM9261 || \ | ||
195 | ARCH_AT91SAM9263 || ARCH_AT91SAM9RL || \ | ||
196 | ARCH_AT91SAM9G20 || ARCH_AT91CAP9 || \ | ||
197 | ARCH_NS9XXX || ARCH_DAVINCI || ARCH_MX2 | ||
198 | select CPU_32v5 | 174 | select CPU_32v5 |
199 | select CPU_ABRT_EV5TJ | 175 | select CPU_ABRT_EV5TJ |
200 | select CPU_PABRT_NOIFAR | 176 | select CPU_PABRT_NOIFAR |
@@ -247,8 +223,7 @@ config CPU_ARM946E | |||
247 | 223 | ||
248 | # ARM1020 - needs validating | 224 | # ARM1020 - needs validating |
249 | config CPU_ARM1020 | 225 | config CPU_ARM1020 |
250 | bool "Support ARM1020T (rev 0) processor" | 226 | bool "Support ARM1020T (rev 0) processor" if ARCH_INTEGRATOR |
251 | depends on ARCH_INTEGRATOR | ||
252 | select CPU_32v5 | 227 | select CPU_32v5 |
253 | select CPU_ABRT_EV4T | 228 | select CPU_ABRT_EV4T |
254 | select CPU_PABRT_NOIFAR | 229 | select CPU_PABRT_NOIFAR |
@@ -266,8 +241,7 @@ config CPU_ARM1020 | |||
266 | 241 | ||
267 | # ARM1020E - needs validating | 242 | # ARM1020E - needs validating |
268 | config CPU_ARM1020E | 243 | config CPU_ARM1020E |
269 | bool "Support ARM1020E processor" | 244 | bool "Support ARM1020E processor" if ARCH_INTEGRATOR |
270 | depends on ARCH_INTEGRATOR | ||
271 | select CPU_32v5 | 245 | select CPU_32v5 |
272 | select CPU_ABRT_EV4T | 246 | select CPU_ABRT_EV4T |
273 | select CPU_PABRT_NOIFAR | 247 | select CPU_PABRT_NOIFAR |
@@ -280,8 +254,7 @@ config CPU_ARM1020E | |||
280 | 254 | ||
281 | # ARM1022E | 255 | # ARM1022E |
282 | config CPU_ARM1022 | 256 | config CPU_ARM1022 |
283 | bool "Support ARM1022E processor" | 257 | bool "Support ARM1022E processor" if ARCH_INTEGRATOR |
284 | depends on ARCH_INTEGRATOR | ||
285 | select CPU_32v5 | 258 | select CPU_32v5 |
286 | select CPU_ABRT_EV4T | 259 | select CPU_ABRT_EV4T |
287 | select CPU_PABRT_NOIFAR | 260 | select CPU_PABRT_NOIFAR |
@@ -299,8 +272,7 @@ config CPU_ARM1022 | |||
299 | 272 | ||
300 | # ARM1026EJ-S | 273 | # ARM1026EJ-S |
301 | config CPU_ARM1026 | 274 | config CPU_ARM1026 |
302 | bool "Support ARM1026EJ-S processor" | 275 | bool "Support ARM1026EJ-S processor" if ARCH_INTEGRATOR |
303 | depends on ARCH_INTEGRATOR | ||
304 | select CPU_32v5 | 276 | select CPU_32v5 |
305 | select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 | 277 | select CPU_ABRT_EV5T # But need Jazelle, but EV5TJ ignores bit 10 |
306 | select CPU_PABRT_NOIFAR | 278 | select CPU_PABRT_NOIFAR |
@@ -317,8 +289,7 @@ config CPU_ARM1026 | |||
317 | 289 | ||
318 | # SA110 | 290 | # SA110 |
319 | config CPU_SA110 | 291 | config CPU_SA110 |
320 | bool "Support StrongARM(R) SA-110 processor" if !ARCH_EBSA110 && !FOOTBRIDGE && !ARCH_TBOX && !ARCH_SHARK && !ARCH_NEXUSPCI && ARCH_RPC | 292 | bool "Support StrongARM(R) SA-110 processor" if ARCH_RPC |
321 | default y if ARCH_EBSA110 || FOOTBRIDGE || ARCH_TBOX || ARCH_SHARK || ARCH_NEXUSPCI | ||
322 | select CPU_32v3 if ARCH_RPC | 293 | select CPU_32v3 if ARCH_RPC |
323 | select CPU_32v4 if !ARCH_RPC | 294 | select CPU_32v4 if !ARCH_RPC |
324 | select CPU_ABRT_EV4 | 295 | select CPU_ABRT_EV4 |
@@ -340,8 +311,6 @@ config CPU_SA110 | |||
340 | # SA1100 | 311 | # SA1100 |
341 | config CPU_SA1100 | 312 | config CPU_SA1100 |
342 | bool | 313 | bool |
343 | depends on ARCH_SA1100 | ||
344 | default y | ||
345 | select CPU_32v4 | 314 | select CPU_32v4 |
346 | select CPU_ABRT_EV4 | 315 | select CPU_ABRT_EV4 |
347 | select CPU_PABRT_NOIFAR | 316 | select CPU_PABRT_NOIFAR |
@@ -353,8 +322,6 @@ config CPU_SA1100 | |||
353 | # XScale | 322 | # XScale |
354 | config CPU_XSCALE | 323 | config CPU_XSCALE |
355 | bool | 324 | bool |
356 | depends on ARCH_IOP32X || ARCH_IOP33X || PXA25x || PXA27x || ARCH_IXP4XX || ARCH_IXP2000 | ||
357 | default y | ||
358 | select CPU_32v5 | 325 | select CPU_32v5 |
359 | select CPU_ABRT_EV5T | 326 | select CPU_ABRT_EV5T |
360 | select CPU_PABRT_NOIFAR | 327 | select CPU_PABRT_NOIFAR |
@@ -365,8 +332,6 @@ config CPU_XSCALE | |||
365 | # XScale Core Version 3 | 332 | # XScale Core Version 3 |
366 | config CPU_XSC3 | 333 | config CPU_XSC3 |
367 | bool | 334 | bool |
368 | depends on ARCH_IXP23XX || ARCH_IOP13XX || PXA3xx | ||
369 | default y | ||
370 | select CPU_32v5 | 335 | select CPU_32v5 |
371 | select CPU_ABRT_EV5T | 336 | select CPU_ABRT_EV5T |
372 | select CPU_PABRT_NOIFAR | 337 | select CPU_PABRT_NOIFAR |
@@ -378,8 +343,6 @@ config CPU_XSC3 | |||
378 | # Feroceon | 343 | # Feroceon |
379 | config CPU_FEROCEON | 344 | config CPU_FEROCEON |
380 | bool | 345 | bool |
381 | depends on ARCH_ORION5X || ARCH_LOKI || ARCH_KIRKWOOD || ARCH_MV78XX0 | ||
382 | default y | ||
383 | select CPU_32v5 | 346 | select CPU_32v5 |
384 | select CPU_ABRT_EV5T | 347 | select CPU_ABRT_EV5T |
385 | select CPU_PABRT_NOIFAR | 348 | select CPU_PABRT_NOIFAR |
@@ -399,10 +362,7 @@ config CPU_FEROCEON_OLD_ID | |||
399 | 362 | ||
400 | # ARMv6 | 363 | # ARMv6 |
401 | config CPU_V6 | 364 | config CPU_V6 |
402 | bool "Support ARM V6 processor" | 365 | bool "Support ARM V6 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB |
403 | depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP2 || ARCH_MX3 || ARCH_MSM || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 | ||
404 | default y if ARCH_MX3 | ||
405 | default y if ARCH_MSM | ||
406 | select CPU_32v6 | 366 | select CPU_32v6 |
407 | select CPU_ABRT_EV6 | 367 | select CPU_ABRT_EV6 |
408 | select CPU_PABRT_NOIFAR | 368 | select CPU_PABRT_NOIFAR |
@@ -427,8 +387,7 @@ config CPU_32v6K | |||
427 | 387 | ||
428 | # ARMv7 | 388 | # ARMv7 |
429 | config CPU_V7 | 389 | config CPU_V7 |
430 | bool "Support ARM V7 processor" | 390 | bool "Support ARM V7 processor" if ARCH_INTEGRATOR || MACH_REALVIEW_EB |
431 | depends on ARCH_INTEGRATOR || MACH_REALVIEW_EB || ARCH_OMAP3 | ||
432 | select CPU_32v6K | 391 | select CPU_32v6K |
433 | select CPU_32v7 | 392 | select CPU_32v7 |
434 | select CPU_ABRT_EV7 | 393 | select CPU_ABRT_EV7 |
@@ -745,7 +704,7 @@ config CACHE_FEROCEON_L2_WRITETHROUGH | |||
745 | 704 | ||
746 | config CACHE_L2X0 | 705 | config CACHE_L2X0 |
747 | bool "Enable the L2x0 outer cache controller" | 706 | bool "Enable the L2x0 outer cache controller" |
748 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 | 707 | depends on REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || MACH_REALVIEW_PB1176 || REALVIEW_EB_A9MP |
749 | default y | 708 | default y |
750 | select OUTER_CACHE | 709 | select OUTER_CACHE |
751 | help | 710 | help |
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 2d5884ce0435..3a398befed41 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/string.h> | 17 | #include <linux/string.h> |
18 | #include <linux/proc_fs.h> | 18 | #include <linux/proc_fs.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/sched.h> | ||
20 | #include <linux/uaccess.h> | 21 | #include <linux/uaccess.h> |
21 | 22 | ||
22 | #include <asm/unaligned.h> | 23 | #include <asm/unaligned.h> |
diff --git a/arch/arm/mm/cache-v3.S b/arch/arm/mm/cache-v3.S index 3b3639eb7ca5..8a4abebc478a 100644 --- a/arch/arm/mm/cache-v3.S +++ b/arch/arm/mm/cache-v3.S | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <mach/hardware.h> | ||
13 | #include <asm/page.h> | 12 | #include <asm/page.h> |
14 | #include "proc-macros.S" | 13 | #include "proc-macros.S" |
15 | 14 | ||
diff --git a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S index 5786adf10040..3668611cb400 100644 --- a/arch/arm/mm/cache-v4.S +++ b/arch/arm/mm/cache-v4.S | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <mach/hardware.h> | ||
13 | #include <asm/page.h> | 12 | #include <asm/page.h> |
14 | #include "proc-macros.S" | 13 | #include "proc-macros.S" |
15 | 14 | ||
diff --git a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S index 51a9b0b273b6..c54fa2cc40e6 100644 --- a/arch/arm/mm/cache-v4wt.S +++ b/arch/arm/mm/cache-v4wt.S | |||
@@ -13,7 +13,6 @@ | |||
13 | */ | 13 | */ |
14 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <mach/hardware.h> | ||
17 | #include <asm/page.h> | 16 | #include <asm/page.h> |
18 | #include "proc-macros.S" | 17 | #include "proc-macros.S" |
19 | 18 | ||
diff --git a/arch/arm/mm/cache-v7.S b/arch/arm/mm/cache-v7.S index d19c2bec2b1f..be93ff02a98d 100644 --- a/arch/arm/mm/cache-v7.S +++ b/arch/arm/mm/cache-v7.S | |||
@@ -26,6 +26,7 @@ | |||
26 | * - mm - mm_struct describing address space | 26 | * - mm - mm_struct describing address space |
27 | */ | 27 | */ |
28 | ENTRY(v7_flush_dcache_all) | 28 | ENTRY(v7_flush_dcache_all) |
29 | dmb @ ensure ordering with previous memory accesses | ||
29 | mrc p15, 1, r0, c0, c0, 1 @ read clidr | 30 | mrc p15, 1, r0, c0, c0, 1 @ read clidr |
30 | ands r3, r0, #0x7000000 @ extract loc from clidr | 31 | ands r3, r0, #0x7000000 @ extract loc from clidr |
31 | mov r3, r3, lsr #23 @ left align loc bit field | 32 | mov r3, r3, lsr #23 @ left align loc bit field |
@@ -64,6 +65,7 @@ skip: | |||
64 | finished: | 65 | finished: |
65 | mov r10, #0 @ swith back to cache level 0 | 66 | mov r10, #0 @ swith back to cache level 0 |
66 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr | 67 | mcr p15, 2, r10, c0, c0, 0 @ select current cache level in cssr |
68 | dsb | ||
67 | isb | 69 | isb |
68 | mov pc, lr | 70 | mov pc, lr |
69 | ENDPROC(v7_flush_dcache_all) | 71 | ENDPROC(v7_flush_dcache_all) |
diff --git a/arch/arm/mm/copypage-feroceon.S b/arch/arm/mm/copypage-feroceon.S deleted file mode 100644 index 7eb0d320d240..000000000000 --- a/arch/arm/mm/copypage-feroceon.S +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage-feroceon.S | ||
3 | * | ||
4 | * Copyright (C) 2008 Marvell Semiconductors | ||
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 | * This handles copy_user_page and clear_user_page on Feroceon | ||
11 | * more optimally than the generic implementations. | ||
12 | */ | ||
13 | #include <linux/linkage.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <asm/asm-offsets.h> | ||
16 | |||
17 | .text | ||
18 | .align 5 | ||
19 | |||
20 | ENTRY(feroceon_copy_user_page) | ||
21 | stmfd sp!, {r4-r9, lr} | ||
22 | mov ip, #PAGE_SZ | ||
23 | 1: mov lr, r1 | ||
24 | ldmia r1!, {r2 - r9} | ||
25 | pld [lr, #32] | ||
26 | pld [lr, #64] | ||
27 | pld [lr, #96] | ||
28 | pld [lr, #128] | ||
29 | pld [lr, #160] | ||
30 | pld [lr, #192] | ||
31 | pld [lr, #224] | ||
32 | stmia r0, {r2 - r9} | ||
33 | ldmia r1!, {r2 - r9} | ||
34 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
35 | add r0, r0, #32 | ||
36 | stmia r0, {r2 - r9} | ||
37 | ldmia r1!, {r2 - r9} | ||
38 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
39 | add r0, r0, #32 | ||
40 | stmia r0, {r2 - r9} | ||
41 | ldmia r1!, {r2 - r9} | ||
42 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
43 | add r0, r0, #32 | ||
44 | stmia r0, {r2 - r9} | ||
45 | ldmia r1!, {r2 - r9} | ||
46 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
47 | add r0, r0, #32 | ||
48 | stmia r0, {r2 - r9} | ||
49 | ldmia r1!, {r2 - r9} | ||
50 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
51 | add r0, r0, #32 | ||
52 | stmia r0, {r2 - r9} | ||
53 | ldmia r1!, {r2 - r9} | ||
54 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
55 | add r0, r0, #32 | ||
56 | stmia r0, {r2 - r9} | ||
57 | ldmia r1!, {r2 - r9} | ||
58 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
59 | add r0, r0, #32 | ||
60 | stmia r0, {r2 - r9} | ||
61 | subs ip, ip, #(32 * 8) | ||
62 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
63 | add r0, r0, #32 | ||
64 | bne 1b | ||
65 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | ||
66 | ldmfd sp!, {r4-r9, pc} | ||
67 | |||
68 | .align 5 | ||
69 | |||
70 | ENTRY(feroceon_clear_user_page) | ||
71 | stmfd sp!, {r4-r7, lr} | ||
72 | mov r1, #PAGE_SZ/32 | ||
73 | mov r2, #0 | ||
74 | mov r3, #0 | ||
75 | mov r4, #0 | ||
76 | mov r5, #0 | ||
77 | mov r6, #0 | ||
78 | mov r7, #0 | ||
79 | mov ip, #0 | ||
80 | mov lr, #0 | ||
81 | 1: stmia r0, {r2-r7, ip, lr} | ||
82 | subs r1, r1, #1 | ||
83 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line | ||
84 | add r0, r0, #32 | ||
85 | bne 1b | ||
86 | mcr p15, 0, r1, c7, c10, 4 @ drain WB | ||
87 | ldmfd sp!, {r4-r7, pc} | ||
88 | |||
89 | __INITDATA | ||
90 | |||
91 | .type feroceon_user_fns, #object | ||
92 | ENTRY(feroceon_user_fns) | ||
93 | .long feroceon_clear_user_page | ||
94 | .long feroceon_copy_user_page | ||
95 | .size feroceon_user_fns, . - feroceon_user_fns | ||
diff --git a/arch/arm/mm/copypage-feroceon.c b/arch/arm/mm/copypage-feroceon.c new file mode 100644 index 000000000000..c3ba6a94da0c --- /dev/null +++ b/arch/arm/mm/copypage-feroceon.c | |||
@@ -0,0 +1,111 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/copypage-feroceon.S | ||
3 | * | ||
4 | * Copyright (C) 2008 Marvell Semiconductors | ||
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 | * This handles copy_user_highpage and clear_user_page on Feroceon | ||
11 | * more optimally than the generic implementations. | ||
12 | */ | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/highmem.h> | ||
15 | |||
16 | static void __attribute__((naked)) | ||
17 | feroceon_copy_user_page(void *kto, const void *kfrom) | ||
18 | { | ||
19 | asm("\ | ||
20 | stmfd sp!, {r4-r9, lr} \n\ | ||
21 | mov ip, %0 \n\ | ||
22 | 1: mov lr, r1 \n\ | ||
23 | ldmia r1!, {r2 - r9} \n\ | ||
24 | pld [lr, #32] \n\ | ||
25 | pld [lr, #64] \n\ | ||
26 | pld [lr, #96] \n\ | ||
27 | pld [lr, #128] \n\ | ||
28 | pld [lr, #160] \n\ | ||
29 | pld [lr, #192] \n\ | ||
30 | pld [lr, #224] \n\ | ||
31 | stmia r0, {r2 - r9} \n\ | ||
32 | ldmia r1!, {r2 - r9} \n\ | ||
33 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
34 | add r0, r0, #32 \n\ | ||
35 | stmia r0, {r2 - r9} \n\ | ||
36 | ldmia r1!, {r2 - r9} \n\ | ||
37 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
38 | add r0, r0, #32 \n\ | ||
39 | stmia r0, {r2 - r9} \n\ | ||
40 | ldmia r1!, {r2 - r9} \n\ | ||
41 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
42 | add r0, r0, #32 \n\ | ||
43 | stmia r0, {r2 - r9} \n\ | ||
44 | ldmia r1!, {r2 - r9} \n\ | ||
45 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
46 | add r0, r0, #32 \n\ | ||
47 | stmia r0, {r2 - r9} \n\ | ||
48 | ldmia r1!, {r2 - r9} \n\ | ||
49 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
50 | add r0, r0, #32 \n\ | ||
51 | stmia r0, {r2 - r9} \n\ | ||
52 | ldmia r1!, {r2 - r9} \n\ | ||
53 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
54 | add r0, r0, #32 \n\ | ||
55 | stmia r0, {r2 - r9} \n\ | ||
56 | ldmia r1!, {r2 - r9} \n\ | ||
57 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
58 | add r0, r0, #32 \n\ | ||
59 | stmia r0, {r2 - r9} \n\ | ||
60 | subs ip, ip, #(32 * 8) \n\ | ||
61 | mcr p15, 0, r0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
62 | add r0, r0, #32 \n\ | ||
63 | bne 1b \n\ | ||
64 | mcr p15, 0, ip, c7, c10, 4 @ drain WB\n\ | ||
65 | ldmfd sp!, {r4-r9, pc}" | ||
66 | : | ||
67 | : "I" (PAGE_SIZE)); | ||
68 | } | ||
69 | |||
70 | void feroceon_copy_user_highpage(struct page *to, struct page *from, | ||
71 | unsigned long vaddr) | ||
72 | { | ||
73 | void *kto, *kfrom; | ||
74 | |||
75 | kto = kmap_atomic(to, KM_USER0); | ||
76 | kfrom = kmap_atomic(from, KM_USER1); | ||
77 | feroceon_copy_user_page(kto, kfrom); | ||
78 | kunmap_atomic(kfrom, KM_USER1); | ||
79 | kunmap_atomic(kto, KM_USER0); | ||
80 | } | ||
81 | |||
82 | void feroceon_clear_user_highpage(struct page *page, unsigned long vaddr) | ||
83 | { | ||
84 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); | ||
85 | asm volatile ("\ | ||
86 | mov r1, %2 \n\ | ||
87 | mov r2, #0 \n\ | ||
88 | mov r3, #0 \n\ | ||
89 | mov r4, #0 \n\ | ||
90 | mov r5, #0 \n\ | ||
91 | mov r6, #0 \n\ | ||
92 | mov r7, #0 \n\ | ||
93 | mov ip, #0 \n\ | ||
94 | mov lr, #0 \n\ | ||
95 | 1: stmia %0, {r2-r7, ip, lr} \n\ | ||
96 | subs r1, r1, #1 \n\ | ||
97 | mcr p15, 0, %0, c7, c14, 1 @ clean and invalidate D line\n\ | ||
98 | add %0, %0, #32 \n\ | ||
99 | bne 1b \n\ | ||
100 | mcr p15, 0, r1, c7, c10, 4 @ drain WB" | ||
101 | : "=r" (ptr) | ||
102 | : "0" (kaddr), "I" (PAGE_SIZE / 32) | ||
103 | : "r1", "r2", "r3", "r4", "r5", "r6", "r7", "ip", "lr"); | ||
104 | kunmap_atomic(kaddr, KM_USER0); | ||
105 | } | ||
106 | |||
107 | struct cpu_user_fns feroceon_user_fns __initdata = { | ||
108 | .cpu_clear_user_highpage = feroceon_clear_user_highpage, | ||
109 | .cpu_copy_user_highpage = feroceon_copy_user_highpage, | ||
110 | }; | ||
111 | |||
diff --git a/arch/arm/mm/copypage-v3.S b/arch/arm/mm/copypage-v3.S deleted file mode 100644 index 2ee394b11bcb..000000000000 --- a/arch/arm/mm/copypage-v3.S +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage.S | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
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 | * ASM optimised string functions | ||
11 | */ | ||
12 | #include <linux/linkage.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/assembler.h> | ||
15 | #include <asm/asm-offsets.h> | ||
16 | |||
17 | .text | ||
18 | .align 5 | ||
19 | /* | ||
20 | * ARMv3 optimised copy_user_page | ||
21 | * | ||
22 | * FIXME: do we need to handle cache stuff... | ||
23 | */ | ||
24 | ENTRY(v3_copy_user_page) | ||
25 | stmfd sp!, {r4, lr} @ 2 | ||
26 | mov r2, #PAGE_SZ/64 @ 1 | ||
27 | ldmia r1!, {r3, r4, ip, lr} @ 4+1 | ||
28 | 1: stmia r0!, {r3, r4, ip, lr} @ 4 | ||
29 | ldmia r1!, {r3, r4, ip, lr} @ 4+1 | ||
30 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
31 | ldmia r1!, {r3, r4, ip, lr} @ 4+1 | ||
32 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
33 | ldmia r1!, {r3, r4, ip, lr} @ 4 | ||
34 | subs r2, r2, #1 @ 1 | ||
35 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
36 | ldmneia r1!, {r3, r4, ip, lr} @ 4 | ||
37 | bne 1b @ 1 | ||
38 | ldmfd sp!, {r4, pc} @ 3 | ||
39 | |||
40 | .align 5 | ||
41 | /* | ||
42 | * ARMv3 optimised clear_user_page | ||
43 | * | ||
44 | * FIXME: do we need to handle cache stuff... | ||
45 | */ | ||
46 | ENTRY(v3_clear_user_page) | ||
47 | str lr, [sp, #-4]! | ||
48 | mov r1, #PAGE_SZ/64 @ 1 | ||
49 | mov r2, #0 @ 1 | ||
50 | mov r3, #0 @ 1 | ||
51 | mov ip, #0 @ 1 | ||
52 | mov lr, #0 @ 1 | ||
53 | 1: stmia r0!, {r2, r3, ip, lr} @ 4 | ||
54 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
55 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
56 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
57 | subs r1, r1, #1 @ 1 | ||
58 | bne 1b @ 1 | ||
59 | ldr pc, [sp], #4 | ||
60 | |||
61 | __INITDATA | ||
62 | |||
63 | .type v3_user_fns, #object | ||
64 | ENTRY(v3_user_fns) | ||
65 | .long v3_clear_user_page | ||
66 | .long v3_copy_user_page | ||
67 | .size v3_user_fns, . - v3_user_fns | ||
diff --git a/arch/arm/mm/copypage-v3.c b/arch/arm/mm/copypage-v3.c new file mode 100644 index 000000000000..70ed96c8af8e --- /dev/null +++ b/arch/arm/mm/copypage-v3.c | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/copypage-v3.c | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
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 | #include <linux/init.h> | ||
11 | #include <linux/highmem.h> | ||
12 | |||
13 | /* | ||
14 | * ARMv3 optimised copy_user_highpage | ||
15 | * | ||
16 | * FIXME: do we need to handle cache stuff... | ||
17 | */ | ||
18 | static void __attribute__((naked)) | ||
19 | v3_copy_user_page(void *kto, const void *kfrom) | ||
20 | { | ||
21 | asm("\n\ | ||
22 | stmfd sp!, {r4, lr} @ 2\n\ | ||
23 | mov r2, %2 @ 1\n\ | ||
24 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
25 | 1: stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
26 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
27 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
28 | ldmia %0!, {r3, r4, ip, lr} @ 4+1\n\ | ||
29 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
30 | ldmia %0!, {r3, r4, ip, lr} @ 4\n\ | ||
31 | subs r2, r2, #1 @ 1\n\ | ||
32 | stmia %1!, {r3, r4, ip, lr} @ 4\n\ | ||
33 | ldmneia %0!, {r3, r4, ip, lr} @ 4\n\ | ||
34 | bne 1b @ 1\n\ | ||
35 | ldmfd sp!, {r4, pc} @ 3" | ||
36 | : | ||
37 | : "r" (kfrom), "r" (kto), "I" (PAGE_SIZE / 64)); | ||
38 | } | ||
39 | |||
40 | void v3_copy_user_highpage(struct page *to, struct page *from, | ||
41 | unsigned long vaddr) | ||
42 | { | ||
43 | void *kto, *kfrom; | ||
44 | |||
45 | kto = kmap_atomic(to, KM_USER0); | ||
46 | kfrom = kmap_atomic(from, KM_USER1); | ||
47 | v3_copy_user_page(kto, kfrom); | ||
48 | kunmap_atomic(kfrom, KM_USER1); | ||
49 | kunmap_atomic(kto, KM_USER0); | ||
50 | } | ||
51 | |||
52 | /* | ||
53 | * ARMv3 optimised clear_user_page | ||
54 | * | ||
55 | * FIXME: do we need to handle cache stuff... | ||
56 | */ | ||
57 | void v3_clear_user_highpage(struct page *page, unsigned long vaddr) | ||
58 | { | ||
59 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); | ||
60 | asm volatile("\n\ | ||
61 | mov r1, %2 @ 1\n\ | ||
62 | mov r2, #0 @ 1\n\ | ||
63 | mov r3, #0 @ 1\n\ | ||
64 | mov ip, #0 @ 1\n\ | ||
65 | mov lr, #0 @ 1\n\ | ||
66 | 1: stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
67 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
68 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
69 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
70 | subs r1, r1, #1 @ 1\n\ | ||
71 | bne 1b @ 1" | ||
72 | : "=r" (ptr) | ||
73 | : "0" (kaddr), "I" (PAGE_SIZE / 64) | ||
74 | : "r1", "r2", "r3", "ip", "lr"); | ||
75 | kunmap_atomic(kaddr, KM_USER0); | ||
76 | } | ||
77 | |||
78 | struct cpu_user_fns v3_user_fns __initdata = { | ||
79 | .cpu_clear_user_highpage = v3_clear_user_highpage, | ||
80 | .cpu_copy_user_highpage = v3_copy_user_highpage, | ||
81 | }; | ||
diff --git a/arch/arm/mm/copypage-v4mc.c b/arch/arm/mm/copypage-v4mc.c index 8d33e2549344..bdb5fd983b15 100644 --- a/arch/arm/mm/copypage-v4mc.c +++ b/arch/arm/mm/copypage-v4mc.c | |||
@@ -15,8 +15,8 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/highmem.h> | ||
18 | 19 | ||
19 | #include <asm/page.h> | ||
20 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
21 | #include <asm/tlbflush.h> | 21 | #include <asm/tlbflush.h> |
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
@@ -33,7 +33,7 @@ | |||
33 | static DEFINE_SPINLOCK(minicache_lock); | 33 | static DEFINE_SPINLOCK(minicache_lock); |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * ARMv4 mini-dcache optimised copy_user_page | 36 | * ARMv4 mini-dcache optimised copy_user_highpage |
37 | * | 37 | * |
38 | * We flush the destination cache lines just before we write the data into the | 38 | * We flush the destination cache lines just before we write the data into the |
39 | * corresponding address. Since the Dcache is read-allocate, this removes the | 39 | * corresponding address. Since the Dcache is read-allocate, this removes the |
@@ -42,7 +42,7 @@ static DEFINE_SPINLOCK(minicache_lock); | |||
42 | * | 42 | * |
43 | * Note: We rely on all ARMv4 processors implementing the "invalidate D line" | 43 | * Note: We rely on all ARMv4 processors implementing the "invalidate D line" |
44 | * instruction. If your processor does not supply this, you have to write your | 44 | * instruction. If your processor does not supply this, you have to write your |
45 | * own copy_user_page that does the right thing. | 45 | * own copy_user_highpage that does the right thing. |
46 | */ | 46 | */ |
47 | static void __attribute__((naked)) | 47 | static void __attribute__((naked)) |
48 | mc_copy_user_page(void *from, void *to) | 48 | mc_copy_user_page(void *from, void *to) |
@@ -68,50 +68,53 @@ mc_copy_user_page(void *from, void *to) | |||
68 | : "r" (from), "r" (to), "I" (PAGE_SIZE / 64)); | 68 | : "r" (from), "r" (to), "I" (PAGE_SIZE / 64)); |
69 | } | 69 | } |
70 | 70 | ||
71 | void v4_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) | 71 | void v4_mc_copy_user_highpage(struct page *from, struct page *to, |
72 | unsigned long vaddr) | ||
72 | { | 73 | { |
73 | struct page *page = virt_to_page(kfrom); | 74 | void *kto = kmap_atomic(to, KM_USER1); |
74 | 75 | ||
75 | if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) | 76 | if (test_and_clear_bit(PG_dcache_dirty, &from->flags)) |
76 | __flush_dcache_page(page_mapping(page), page); | 77 | __flush_dcache_page(page_mapping(from), from); |
77 | 78 | ||
78 | spin_lock(&minicache_lock); | 79 | spin_lock(&minicache_lock); |
79 | 80 | ||
80 | set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); | 81 | set_pte_ext(TOP_PTE(0xffff8000), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); |
81 | flush_tlb_kernel_page(0xffff8000); | 82 | flush_tlb_kernel_page(0xffff8000); |
82 | 83 | ||
83 | mc_copy_user_page((void *)0xffff8000, kto); | 84 | mc_copy_user_page((void *)0xffff8000, kto); |
84 | 85 | ||
85 | spin_unlock(&minicache_lock); | 86 | spin_unlock(&minicache_lock); |
87 | |||
88 | kunmap_atomic(kto, KM_USER1); | ||
86 | } | 89 | } |
87 | 90 | ||
88 | /* | 91 | /* |
89 | * ARMv4 optimised clear_user_page | 92 | * ARMv4 optimised clear_user_page |
90 | */ | 93 | */ |
91 | void __attribute__((naked)) | 94 | void v4_mc_clear_user_highpage(struct page *page, unsigned long vaddr) |
92 | v4_mc_clear_user_page(void *kaddr, unsigned long vaddr) | ||
93 | { | 95 | { |
94 | asm volatile( | 96 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); |
95 | "str lr, [sp, #-4]!\n\ | 97 | asm volatile("\ |
96 | mov r1, %0 @ 1\n\ | 98 | mov r1, %2 @ 1\n\ |
97 | mov r2, #0 @ 1\n\ | 99 | mov r2, #0 @ 1\n\ |
98 | mov r3, #0 @ 1\n\ | 100 | mov r3, #0 @ 1\n\ |
99 | mov ip, #0 @ 1\n\ | 101 | mov ip, #0 @ 1\n\ |
100 | mov lr, #0 @ 1\n\ | 102 | mov lr, #0 @ 1\n\ |
101 | 1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\ | 103 | 1: mcr p15, 0, %0, c7, c6, 1 @ 1 invalidate D line\n\ |
102 | stmia r0!, {r2, r3, ip, lr} @ 4\n\ | 104 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ |
103 | stmia r0!, {r2, r3, ip, lr} @ 4\n\ | 105 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ |
104 | mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\ | 106 | mcr p15, 0, %0, c7, c6, 1 @ 1 invalidate D line\n\ |
105 | stmia r0!, {r2, r3, ip, lr} @ 4\n\ | 107 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ |
106 | stmia r0!, {r2, r3, ip, lr} @ 4\n\ | 108 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ |
107 | subs r1, r1, #1 @ 1\n\ | 109 | subs r1, r1, #1 @ 1\n\ |
108 | bne 1b @ 1\n\ | 110 | bne 1b @ 1" |
109 | ldr pc, [sp], #4" | 111 | : "=r" (ptr) |
110 | : | 112 | : "0" (kaddr), "I" (PAGE_SIZE / 64) |
111 | : "I" (PAGE_SIZE / 64)); | 113 | : "r1", "r2", "r3", "ip", "lr"); |
114 | kunmap_atomic(kaddr, KM_USER0); | ||
112 | } | 115 | } |
113 | 116 | ||
114 | struct cpu_user_fns v4_mc_user_fns __initdata = { | 117 | struct cpu_user_fns v4_mc_user_fns __initdata = { |
115 | .cpu_clear_user_page = v4_mc_clear_user_page, | 118 | .cpu_clear_user_highpage = v4_mc_clear_user_highpage, |
116 | .cpu_copy_user_page = v4_mc_copy_user_page, | 119 | .cpu_copy_user_highpage = v4_mc_copy_user_highpage, |
117 | }; | 120 | }; |
diff --git a/arch/arm/mm/copypage-v4wb.S b/arch/arm/mm/copypage-v4wb.S deleted file mode 100644 index 83117354b1cd..000000000000 --- a/arch/arm/mm/copypage-v4wb.S +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage.S | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
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 | * ASM optimised string functions | ||
11 | */ | ||
12 | #include <linux/linkage.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/asm-offsets.h> | ||
15 | |||
16 | .text | ||
17 | .align 5 | ||
18 | /* | ||
19 | * ARMv4 optimised copy_user_page | ||
20 | * | ||
21 | * We flush the destination cache lines just before we write the data into the | ||
22 | * corresponding address. Since the Dcache is read-allocate, this removes the | ||
23 | * Dcache aliasing issue. The writes will be forwarded to the write buffer, | ||
24 | * and merged as appropriate. | ||
25 | * | ||
26 | * Note: We rely on all ARMv4 processors implementing the "invalidate D line" | ||
27 | * instruction. If your processor does not supply this, you have to write your | ||
28 | * own copy_user_page that does the right thing. | ||
29 | */ | ||
30 | ENTRY(v4wb_copy_user_page) | ||
31 | stmfd sp!, {r4, lr} @ 2 | ||
32 | mov r2, #PAGE_SZ/64 @ 1 | ||
33 | ldmia r1!, {r3, r4, ip, lr} @ 4 | ||
34 | 1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line | ||
35 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
36 | ldmia r1!, {r3, r4, ip, lr} @ 4+1 | ||
37 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
38 | ldmia r1!, {r3, r4, ip, lr} @ 4 | ||
39 | mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line | ||
40 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
41 | ldmia r1!, {r3, r4, ip, lr} @ 4 | ||
42 | subs r2, r2, #1 @ 1 | ||
43 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
44 | ldmneia r1!, {r3, r4, ip, lr} @ 4 | ||
45 | bne 1b @ 1 | ||
46 | mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB | ||
47 | ldmfd sp!, {r4, pc} @ 3 | ||
48 | |||
49 | .align 5 | ||
50 | /* | ||
51 | * ARMv4 optimised clear_user_page | ||
52 | * | ||
53 | * Same story as above. | ||
54 | */ | ||
55 | ENTRY(v4wb_clear_user_page) | ||
56 | str lr, [sp, #-4]! | ||
57 | mov r1, #PAGE_SZ/64 @ 1 | ||
58 | mov r2, #0 @ 1 | ||
59 | mov r3, #0 @ 1 | ||
60 | mov ip, #0 @ 1 | ||
61 | mov lr, #0 @ 1 | ||
62 | 1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line | ||
63 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
64 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
65 | mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line | ||
66 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
67 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
68 | subs r1, r1, #1 @ 1 | ||
69 | bne 1b @ 1 | ||
70 | mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB | ||
71 | ldr pc, [sp], #4 | ||
72 | |||
73 | __INITDATA | ||
74 | |||
75 | .type v4wb_user_fns, #object | ||
76 | ENTRY(v4wb_user_fns) | ||
77 | .long v4wb_clear_user_page | ||
78 | .long v4wb_copy_user_page | ||
79 | .size v4wb_user_fns, . - v4wb_user_fns | ||
diff --git a/arch/arm/mm/copypage-v4wb.c b/arch/arm/mm/copypage-v4wb.c new file mode 100644 index 000000000000..3ec93dab7656 --- /dev/null +++ b/arch/arm/mm/copypage-v4wb.c | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/copypage-v4wb.c | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
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 | #include <linux/init.h> | ||
11 | #include <linux/highmem.h> | ||
12 | |||
13 | /* | ||
14 | * ARMv4 optimised copy_user_highpage | ||
15 | * | ||
16 | * We flush the destination cache lines just before we write the data into the | ||
17 | * corresponding address. Since the Dcache is read-allocate, this removes the | ||
18 | * Dcache aliasing issue. The writes will be forwarded to the write buffer, | ||
19 | * and merged as appropriate. | ||
20 | * | ||
21 | * Note: We rely on all ARMv4 processors implementing the "invalidate D line" | ||
22 | * instruction. If your processor does not supply this, you have to write your | ||
23 | * own copy_user_highpage that does the right thing. | ||
24 | */ | ||
25 | static void __attribute__((naked)) | ||
26 | v4wb_copy_user_page(void *kto, const void *kfrom) | ||
27 | { | ||
28 | asm("\ | ||
29 | stmfd sp!, {r4, lr} @ 2\n\ | ||
30 | mov r2, %0 @ 1\n\ | ||
31 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ | ||
32 | 1: mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\ | ||
33 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ | ||
34 | ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\ | ||
35 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ | ||
36 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ | ||
37 | mcr p15, 0, r0, c7, c6, 1 @ 1 invalidate D line\n\ | ||
38 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ | ||
39 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ | ||
40 | subs r2, r2, #1 @ 1\n\ | ||
41 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ | ||
42 | ldmneia r1!, {r3, r4, ip, lr} @ 4\n\ | ||
43 | bne 1b @ 1\n\ | ||
44 | mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB\n\ | ||
45 | ldmfd sp!, {r4, pc} @ 3" | ||
46 | : | ||
47 | : "I" (PAGE_SIZE / 64)); | ||
48 | } | ||
49 | |||
50 | void v4wb_copy_user_highpage(struct page *to, struct page *from, | ||
51 | unsigned long vaddr) | ||
52 | { | ||
53 | void *kto, *kfrom; | ||
54 | |||
55 | kto = kmap_atomic(to, KM_USER0); | ||
56 | kfrom = kmap_atomic(from, KM_USER1); | ||
57 | v4wb_copy_user_page(kto, kfrom); | ||
58 | kunmap_atomic(kfrom, KM_USER1); | ||
59 | kunmap_atomic(kto, KM_USER0); | ||
60 | } | ||
61 | |||
62 | /* | ||
63 | * ARMv4 optimised clear_user_page | ||
64 | * | ||
65 | * Same story as above. | ||
66 | */ | ||
67 | void v4wb_clear_user_highpage(struct page *page, unsigned long vaddr) | ||
68 | { | ||
69 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); | ||
70 | asm volatile("\ | ||
71 | mov r1, %2 @ 1\n\ | ||
72 | mov r2, #0 @ 1\n\ | ||
73 | mov r3, #0 @ 1\n\ | ||
74 | mov ip, #0 @ 1\n\ | ||
75 | mov lr, #0 @ 1\n\ | ||
76 | 1: mcr p15, 0, %0, c7, c6, 1 @ 1 invalidate D line\n\ | ||
77 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
78 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
79 | mcr p15, 0, %0, c7, c6, 1 @ 1 invalidate D line\n\ | ||
80 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
81 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
82 | subs r1, r1, #1 @ 1\n\ | ||
83 | bne 1b @ 1\n\ | ||
84 | mcr p15, 0, r1, c7, c10, 4 @ 1 drain WB" | ||
85 | : "=r" (ptr) | ||
86 | : "0" (kaddr), "I" (PAGE_SIZE / 64) | ||
87 | : "r1", "r2", "r3", "ip", "lr"); | ||
88 | kunmap_atomic(kaddr, KM_USER0); | ||
89 | } | ||
90 | |||
91 | struct cpu_user_fns v4wb_user_fns __initdata = { | ||
92 | .cpu_clear_user_highpage = v4wb_clear_user_highpage, | ||
93 | .cpu_copy_user_highpage = v4wb_copy_user_highpage, | ||
94 | }; | ||
diff --git a/arch/arm/mm/copypage-v4wt.S b/arch/arm/mm/copypage-v4wt.S deleted file mode 100644 index e1f2af28d549..000000000000 --- a/arch/arm/mm/copypage-v4wt.S +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage-v4.S | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
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 | * ASM optimised string functions | ||
11 | * | ||
12 | * This is for CPUs with a writethrough cache and 'flush ID cache' is | ||
13 | * the only supported cache operation. | ||
14 | */ | ||
15 | #include <linux/linkage.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <asm/asm-offsets.h> | ||
18 | |||
19 | .text | ||
20 | .align 5 | ||
21 | /* | ||
22 | * ARMv4 optimised copy_user_page | ||
23 | * | ||
24 | * Since we have writethrough caches, we don't have to worry about | ||
25 | * dirty data in the cache. However, we do have to ensure that | ||
26 | * subsequent reads are up to date. | ||
27 | */ | ||
28 | ENTRY(v4wt_copy_user_page) | ||
29 | stmfd sp!, {r4, lr} @ 2 | ||
30 | mov r2, #PAGE_SZ/64 @ 1 | ||
31 | ldmia r1!, {r3, r4, ip, lr} @ 4 | ||
32 | 1: stmia r0!, {r3, r4, ip, lr} @ 4 | ||
33 | ldmia r1!, {r3, r4, ip, lr} @ 4+1 | ||
34 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
35 | ldmia r1!, {r3, r4, ip, lr} @ 4 | ||
36 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
37 | ldmia r1!, {r3, r4, ip, lr} @ 4 | ||
38 | subs r2, r2, #1 @ 1 | ||
39 | stmia r0!, {r3, r4, ip, lr} @ 4 | ||
40 | ldmneia r1!, {r3, r4, ip, lr} @ 4 | ||
41 | bne 1b @ 1 | ||
42 | mcr p15, 0, r2, c7, c7, 0 @ flush ID cache | ||
43 | ldmfd sp!, {r4, pc} @ 3 | ||
44 | |||
45 | .align 5 | ||
46 | /* | ||
47 | * ARMv4 optimised clear_user_page | ||
48 | * | ||
49 | * Same story as above. | ||
50 | */ | ||
51 | ENTRY(v4wt_clear_user_page) | ||
52 | str lr, [sp, #-4]! | ||
53 | mov r1, #PAGE_SZ/64 @ 1 | ||
54 | mov r2, #0 @ 1 | ||
55 | mov r3, #0 @ 1 | ||
56 | mov ip, #0 @ 1 | ||
57 | mov lr, #0 @ 1 | ||
58 | 1: stmia r0!, {r2, r3, ip, lr} @ 4 | ||
59 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
60 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
61 | stmia r0!, {r2, r3, ip, lr} @ 4 | ||
62 | subs r1, r1, #1 @ 1 | ||
63 | bne 1b @ 1 | ||
64 | mcr p15, 0, r2, c7, c7, 0 @ flush ID cache | ||
65 | ldr pc, [sp], #4 | ||
66 | |||
67 | __INITDATA | ||
68 | |||
69 | .type v4wt_user_fns, #object | ||
70 | ENTRY(v4wt_user_fns) | ||
71 | .long v4wt_clear_user_page | ||
72 | .long v4wt_copy_user_page | ||
73 | .size v4wt_user_fns, . - v4wt_user_fns | ||
diff --git a/arch/arm/mm/copypage-v4wt.c b/arch/arm/mm/copypage-v4wt.c new file mode 100644 index 000000000000..0f1188efae45 --- /dev/null +++ b/arch/arm/mm/copypage-v4wt.c | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/copypage-v4wt.S | ||
3 | * | ||
4 | * Copyright (C) 1995-1999 Russell King | ||
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 | * This is for CPUs with a writethrough cache and 'flush ID cache' is | ||
11 | * the only supported cache operation. | ||
12 | */ | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/highmem.h> | ||
15 | |||
16 | /* | ||
17 | * ARMv4 optimised copy_user_highpage | ||
18 | * | ||
19 | * Since we have writethrough caches, we don't have to worry about | ||
20 | * dirty data in the cache. However, we do have to ensure that | ||
21 | * subsequent reads are up to date. | ||
22 | */ | ||
23 | static void __attribute__((naked)) | ||
24 | v4wt_copy_user_page(void *kto, const void *kfrom) | ||
25 | { | ||
26 | asm("\ | ||
27 | stmfd sp!, {r4, lr} @ 2\n\ | ||
28 | mov r2, %0 @ 1\n\ | ||
29 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ | ||
30 | 1: stmia r0!, {r3, r4, ip, lr} @ 4\n\ | ||
31 | ldmia r1!, {r3, r4, ip, lr} @ 4+1\n\ | ||
32 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ | ||
33 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ | ||
34 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ | ||
35 | ldmia r1!, {r3, r4, ip, lr} @ 4\n\ | ||
36 | subs r2, r2, #1 @ 1\n\ | ||
37 | stmia r0!, {r3, r4, ip, lr} @ 4\n\ | ||
38 | ldmneia r1!, {r3, r4, ip, lr} @ 4\n\ | ||
39 | bne 1b @ 1\n\ | ||
40 | mcr p15, 0, r2, c7, c7, 0 @ flush ID cache\n\ | ||
41 | ldmfd sp!, {r4, pc} @ 3" | ||
42 | : | ||
43 | : "I" (PAGE_SIZE / 64)); | ||
44 | } | ||
45 | |||
46 | void v4wt_copy_user_highpage(struct page *to, struct page *from, | ||
47 | unsigned long vaddr) | ||
48 | { | ||
49 | void *kto, *kfrom; | ||
50 | |||
51 | kto = kmap_atomic(to, KM_USER0); | ||
52 | kfrom = kmap_atomic(from, KM_USER1); | ||
53 | v4wt_copy_user_page(kto, kfrom); | ||
54 | kunmap_atomic(kfrom, KM_USER1); | ||
55 | kunmap_atomic(kto, KM_USER0); | ||
56 | } | ||
57 | |||
58 | /* | ||
59 | * ARMv4 optimised clear_user_page | ||
60 | * | ||
61 | * Same story as above. | ||
62 | */ | ||
63 | void v4wt_clear_user_highpage(struct page *page, unsigned long vaddr) | ||
64 | { | ||
65 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); | ||
66 | asm volatile("\ | ||
67 | mov r1, %2 @ 1\n\ | ||
68 | mov r2, #0 @ 1\n\ | ||
69 | mov r3, #0 @ 1\n\ | ||
70 | mov ip, #0 @ 1\n\ | ||
71 | mov lr, #0 @ 1\n\ | ||
72 | 1: stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
73 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
74 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
75 | stmia %0!, {r2, r3, ip, lr} @ 4\n\ | ||
76 | subs r1, r1, #1 @ 1\n\ | ||
77 | bne 1b @ 1\n\ | ||
78 | mcr p15, 0, r2, c7, c7, 0 @ flush ID cache" | ||
79 | : "=r" (ptr) | ||
80 | : "0" (kaddr), "I" (PAGE_SIZE / 64) | ||
81 | : "r1", "r2", "r3", "ip", "lr"); | ||
82 | kunmap_atomic(kaddr, KM_USER0); | ||
83 | } | ||
84 | |||
85 | struct cpu_user_fns v4wt_user_fns __initdata = { | ||
86 | .cpu_clear_user_highpage = v4wt_clear_user_highpage, | ||
87 | .cpu_copy_user_highpage = v4wt_copy_user_highpage, | ||
88 | }; | ||
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index 0e21c0767580..4127a7bddfe5 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -10,8 +10,8 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/spinlock.h> | 11 | #include <linux/spinlock.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/highmem.h> | ||
13 | 14 | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/pgtable.h> | 15 | #include <asm/pgtable.h> |
16 | #include <asm/shmparam.h> | 16 | #include <asm/shmparam.h> |
17 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
@@ -33,41 +33,56 @@ static DEFINE_SPINLOCK(v6_lock); | |||
33 | * Copy the user page. No aliasing to deal with so we can just | 33 | * Copy the user page. No aliasing to deal with so we can just |
34 | * attack the kernel's existing mapping of these pages. | 34 | * attack the kernel's existing mapping of these pages. |
35 | */ | 35 | */ |
36 | static void v6_copy_user_page_nonaliasing(void *kto, const void *kfrom, unsigned long vaddr) | 36 | static void v6_copy_user_highpage_nonaliasing(struct page *to, |
37 | struct page *from, unsigned long vaddr) | ||
37 | { | 38 | { |
39 | void *kto, *kfrom; | ||
40 | |||
41 | kfrom = kmap_atomic(from, KM_USER0); | ||
42 | kto = kmap_atomic(to, KM_USER1); | ||
38 | copy_page(kto, kfrom); | 43 | copy_page(kto, kfrom); |
44 | kunmap_atomic(kto, KM_USER1); | ||
45 | kunmap_atomic(kfrom, KM_USER0); | ||
39 | } | 46 | } |
40 | 47 | ||
41 | /* | 48 | /* |
42 | * Clear the user page. No aliasing to deal with so we can just | 49 | * Clear the user page. No aliasing to deal with so we can just |
43 | * attack the kernel's existing mapping of this page. | 50 | * attack the kernel's existing mapping of this page. |
44 | */ | 51 | */ |
45 | static void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) | 52 | static void v6_clear_user_highpage_nonaliasing(struct page *page, unsigned long vaddr) |
46 | { | 53 | { |
54 | void *kaddr = kmap_atomic(page, KM_USER0); | ||
47 | clear_page(kaddr); | 55 | clear_page(kaddr); |
56 | kunmap_atomic(kaddr, KM_USER0); | ||
48 | } | 57 | } |
49 | 58 | ||
50 | /* | 59 | /* |
51 | * Copy the page, taking account of the cache colour. | 60 | * Discard data in the kernel mapping for the new page. |
61 | * FIXME: needs this MCRR to be supported. | ||
52 | */ | 62 | */ |
53 | static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) | 63 | static void discard_old_kernel_data(void *kto) |
54 | { | 64 | { |
55 | unsigned int offset = CACHE_COLOUR(vaddr); | ||
56 | unsigned long from, to; | ||
57 | struct page *page = virt_to_page(kfrom); | ||
58 | |||
59 | if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) | ||
60 | __flush_dcache_page(page_mapping(page), page); | ||
61 | |||
62 | /* | ||
63 | * Discard data in the kernel mapping for the new page. | ||
64 | * FIXME: needs this MCRR to be supported. | ||
65 | */ | ||
66 | __asm__("mcrr p15, 0, %1, %0, c6 @ 0xec401f06" | 65 | __asm__("mcrr p15, 0, %1, %0, c6 @ 0xec401f06" |
67 | : | 66 | : |
68 | : "r" (kto), | 67 | : "r" (kto), |
69 | "r" ((unsigned long)kto + PAGE_SIZE - L1_CACHE_BYTES) | 68 | "r" ((unsigned long)kto + PAGE_SIZE - L1_CACHE_BYTES) |
70 | : "cc"); | 69 | : "cc"); |
70 | } | ||
71 | |||
72 | /* | ||
73 | * Copy the page, taking account of the cache colour. | ||
74 | */ | ||
75 | static void v6_copy_user_highpage_aliasing(struct page *to, | ||
76 | struct page *from, unsigned long vaddr) | ||
77 | { | ||
78 | unsigned int offset = CACHE_COLOUR(vaddr); | ||
79 | unsigned long kfrom, kto; | ||
80 | |||
81 | if (test_and_clear_bit(PG_dcache_dirty, &from->flags)) | ||
82 | __flush_dcache_page(page_mapping(from), from); | ||
83 | |||
84 | /* FIXME: not highmem safe */ | ||
85 | discard_old_kernel_data(page_address(to)); | ||
71 | 86 | ||
72 | /* | 87 | /* |
73 | * Now copy the page using the same cache colour as the | 88 | * Now copy the page using the same cache colour as the |
@@ -75,16 +90,16 @@ static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned lo | |||
75 | */ | 90 | */ |
76 | spin_lock(&v6_lock); | 91 | spin_lock(&v6_lock); |
77 | 92 | ||
78 | set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(__pa(kfrom) >> PAGE_SHIFT, PAGE_KERNEL), 0); | 93 | set_pte_ext(TOP_PTE(from_address) + offset, pfn_pte(page_to_pfn(from), PAGE_KERNEL), 0); |
79 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kto) >> PAGE_SHIFT, PAGE_KERNEL), 0); | 94 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(to), PAGE_KERNEL), 0); |
80 | 95 | ||
81 | from = from_address + (offset << PAGE_SHIFT); | 96 | kfrom = from_address + (offset << PAGE_SHIFT); |
82 | to = to_address + (offset << PAGE_SHIFT); | 97 | kto = to_address + (offset << PAGE_SHIFT); |
83 | 98 | ||
84 | flush_tlb_kernel_page(from); | 99 | flush_tlb_kernel_page(kfrom); |
85 | flush_tlb_kernel_page(to); | 100 | flush_tlb_kernel_page(kto); |
86 | 101 | ||
87 | copy_page((void *)to, (void *)from); | 102 | copy_page((void *)kto, (void *)kfrom); |
88 | 103 | ||
89 | spin_unlock(&v6_lock); | 104 | spin_unlock(&v6_lock); |
90 | } | 105 | } |
@@ -94,20 +109,13 @@ static void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned lo | |||
94 | * so remap the kernel page into the same cache colour as the user | 109 | * so remap the kernel page into the same cache colour as the user |
95 | * page. | 110 | * page. |
96 | */ | 111 | */ |
97 | static void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | 112 | static void v6_clear_user_highpage_aliasing(struct page *page, unsigned long vaddr) |
98 | { | 113 | { |
99 | unsigned int offset = CACHE_COLOUR(vaddr); | 114 | unsigned int offset = CACHE_COLOUR(vaddr); |
100 | unsigned long to = to_address + (offset << PAGE_SHIFT); | 115 | unsigned long to = to_address + (offset << PAGE_SHIFT); |
101 | 116 | ||
102 | /* | 117 | /* FIXME: not highmem safe */ |
103 | * Discard data in the kernel mapping for the new page | 118 | discard_old_kernel_data(page_address(page)); |
104 | * FIXME: needs this MCRR to be supported. | ||
105 | */ | ||
106 | __asm__("mcrr p15, 0, %1, %0, c6 @ 0xec401f06" | ||
107 | : | ||
108 | : "r" (kaddr), | ||
109 | "r" ((unsigned long)kaddr + PAGE_SIZE - L1_CACHE_BYTES) | ||
110 | : "cc"); | ||
111 | 119 | ||
112 | /* | 120 | /* |
113 | * Now clear the page using the same cache colour as | 121 | * Now clear the page using the same cache colour as |
@@ -115,7 +123,7 @@ static void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | |||
115 | */ | 123 | */ |
116 | spin_lock(&v6_lock); | 124 | spin_lock(&v6_lock); |
117 | 125 | ||
118 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(__pa(kaddr) >> PAGE_SHIFT, PAGE_KERNEL), 0); | 126 | set_pte_ext(TOP_PTE(to_address) + offset, pfn_pte(page_to_pfn(page), PAGE_KERNEL), 0); |
119 | flush_tlb_kernel_page(to); | 127 | flush_tlb_kernel_page(to); |
120 | clear_page((void *)to); | 128 | clear_page((void *)to); |
121 | 129 | ||
@@ -123,15 +131,15 @@ static void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | |||
123 | } | 131 | } |
124 | 132 | ||
125 | struct cpu_user_fns v6_user_fns __initdata = { | 133 | struct cpu_user_fns v6_user_fns __initdata = { |
126 | .cpu_clear_user_page = v6_clear_user_page_nonaliasing, | 134 | .cpu_clear_user_highpage = v6_clear_user_highpage_nonaliasing, |
127 | .cpu_copy_user_page = v6_copy_user_page_nonaliasing, | 135 | .cpu_copy_user_highpage = v6_copy_user_highpage_nonaliasing, |
128 | }; | 136 | }; |
129 | 137 | ||
130 | static int __init v6_userpage_init(void) | 138 | static int __init v6_userpage_init(void) |
131 | { | 139 | { |
132 | if (cache_is_vipt_aliasing()) { | 140 | if (cache_is_vipt_aliasing()) { |
133 | cpu_user.cpu_clear_user_page = v6_clear_user_page_aliasing; | 141 | cpu_user.cpu_clear_user_highpage = v6_clear_user_highpage_aliasing; |
134 | cpu_user.cpu_copy_user_page = v6_copy_user_page_aliasing; | 142 | cpu_user.cpu_copy_user_highpage = v6_copy_user_highpage_aliasing; |
135 | } | 143 | } |
136 | 144 | ||
137 | return 0; | 145 | return 0; |
diff --git a/arch/arm/mm/copypage-xsc3.S b/arch/arm/mm/copypage-xsc3.S deleted file mode 100644 index 9a2cb4332b4c..000000000000 --- a/arch/arm/mm/copypage-xsc3.S +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage-xsc3.S | ||
3 | * | ||
4 | * Copyright (C) 2004 Intel Corp. | ||
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 | * Adapted for 3rd gen XScale core, no more mini-dcache | ||
11 | * Author: Matt Gilbert (matthew.m.gilbert@intel.com) | ||
12 | */ | ||
13 | |||
14 | #include <linux/linkage.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <asm/asm-offsets.h> | ||
17 | |||
18 | /* | ||
19 | * General note: | ||
20 | * We don't really want write-allocate cache behaviour for these functions | ||
21 | * since that will just eat through 8K of the cache. | ||
22 | */ | ||
23 | |||
24 | .text | ||
25 | .align 5 | ||
26 | /* | ||
27 | * XSC3 optimised copy_user_page | ||
28 | * r0 = destination | ||
29 | * r1 = source | ||
30 | * r2 = virtual user address of ultimate destination page | ||
31 | * | ||
32 | * The source page may have some clean entries in the cache already, but we | ||
33 | * can safely ignore them - break_cow() will flush them out of the cache | ||
34 | * if we eventually end up using our copied page. | ||
35 | * | ||
36 | */ | ||
37 | ENTRY(xsc3_mc_copy_user_page) | ||
38 | stmfd sp!, {r4, r5, lr} | ||
39 | mov lr, #PAGE_SZ/64-1 | ||
40 | |||
41 | pld [r1, #0] | ||
42 | pld [r1, #32] | ||
43 | 1: pld [r1, #64] | ||
44 | pld [r1, #96] | ||
45 | |||
46 | 2: ldrd r2, [r1], #8 | ||
47 | mov ip, r0 | ||
48 | ldrd r4, [r1], #8 | ||
49 | mcr p15, 0, ip, c7, c6, 1 @ invalidate | ||
50 | strd r2, [r0], #8 | ||
51 | ldrd r2, [r1], #8 | ||
52 | strd r4, [r0], #8 | ||
53 | ldrd r4, [r1], #8 | ||
54 | strd r2, [r0], #8 | ||
55 | strd r4, [r0], #8 | ||
56 | ldrd r2, [r1], #8 | ||
57 | mov ip, r0 | ||
58 | ldrd r4, [r1], #8 | ||
59 | mcr p15, 0, ip, c7, c6, 1 @ invalidate | ||
60 | strd r2, [r0], #8 | ||
61 | ldrd r2, [r1], #8 | ||
62 | subs lr, lr, #1 | ||
63 | strd r4, [r0], #8 | ||
64 | ldrd r4, [r1], #8 | ||
65 | strd r2, [r0], #8 | ||
66 | strd r4, [r0], #8 | ||
67 | bgt 1b | ||
68 | beq 2b | ||
69 | |||
70 | ldmfd sp!, {r4, r5, pc} | ||
71 | |||
72 | .align 5 | ||
73 | /* | ||
74 | * XScale optimised clear_user_page | ||
75 | * r0 = destination | ||
76 | * r1 = virtual user address of ultimate destination page | ||
77 | */ | ||
78 | ENTRY(xsc3_mc_clear_user_page) | ||
79 | mov r1, #PAGE_SZ/32 | ||
80 | mov r2, #0 | ||
81 | mov r3, #0 | ||
82 | 1: mcr p15, 0, r0, c7, c6, 1 @ invalidate line | ||
83 | strd r2, [r0], #8 | ||
84 | strd r2, [r0], #8 | ||
85 | strd r2, [r0], #8 | ||
86 | strd r2, [r0], #8 | ||
87 | subs r1, r1, #1 | ||
88 | bne 1b | ||
89 | mov pc, lr | ||
90 | |||
91 | __INITDATA | ||
92 | |||
93 | .type xsc3_mc_user_fns, #object | ||
94 | ENTRY(xsc3_mc_user_fns) | ||
95 | .long xsc3_mc_clear_user_page | ||
96 | .long xsc3_mc_copy_user_page | ||
97 | .size xsc3_mc_user_fns, . - xsc3_mc_user_fns | ||
diff --git a/arch/arm/mm/copypage-xsc3.c b/arch/arm/mm/copypage-xsc3.c new file mode 100644 index 000000000000..39a994542cad --- /dev/null +++ b/arch/arm/mm/copypage-xsc3.c | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/copypage-xsc3.S | ||
3 | * | ||
4 | * Copyright (C) 2004 Intel Corp. | ||
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 | * Adapted for 3rd gen XScale core, no more mini-dcache | ||
11 | * Author: Matt Gilbert (matthew.m.gilbert@intel.com) | ||
12 | */ | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/highmem.h> | ||
15 | |||
16 | /* | ||
17 | * General note: | ||
18 | * We don't really want write-allocate cache behaviour for these functions | ||
19 | * since that will just eat through 8K of the cache. | ||
20 | */ | ||
21 | |||
22 | /* | ||
23 | * XSC3 optimised copy_user_highpage | ||
24 | * r0 = destination | ||
25 | * r1 = source | ||
26 | * | ||
27 | * The source page may have some clean entries in the cache already, but we | ||
28 | * can safely ignore them - break_cow() will flush them out of the cache | ||
29 | * if we eventually end up using our copied page. | ||
30 | * | ||
31 | */ | ||
32 | static void __attribute__((naked)) | ||
33 | xsc3_mc_copy_user_page(void *kto, const void *kfrom) | ||
34 | { | ||
35 | asm("\ | ||
36 | stmfd sp!, {r4, r5, lr} \n\ | ||
37 | mov lr, %0 \n\ | ||
38 | \n\ | ||
39 | pld [r1, #0] \n\ | ||
40 | pld [r1, #32] \n\ | ||
41 | 1: pld [r1, #64] \n\ | ||
42 | pld [r1, #96] \n\ | ||
43 | \n\ | ||
44 | 2: ldrd r2, [r1], #8 \n\ | ||
45 | mov ip, r0 \n\ | ||
46 | ldrd r4, [r1], #8 \n\ | ||
47 | mcr p15, 0, ip, c7, c6, 1 @ invalidate\n\ | ||
48 | strd r2, [r0], #8 \n\ | ||
49 | ldrd r2, [r1], #8 \n\ | ||
50 | strd r4, [r0], #8 \n\ | ||
51 | ldrd r4, [r1], #8 \n\ | ||
52 | strd r2, [r0], #8 \n\ | ||
53 | strd r4, [r0], #8 \n\ | ||
54 | ldrd r2, [r1], #8 \n\ | ||
55 | mov ip, r0 \n\ | ||
56 | ldrd r4, [r1], #8 \n\ | ||
57 | mcr p15, 0, ip, c7, c6, 1 @ invalidate\n\ | ||
58 | strd r2, [r0], #8 \n\ | ||
59 | ldrd r2, [r1], #8 \n\ | ||
60 | subs lr, lr, #1 \n\ | ||
61 | strd r4, [r0], #8 \n\ | ||
62 | ldrd r4, [r1], #8 \n\ | ||
63 | strd r2, [r0], #8 \n\ | ||
64 | strd r4, [r0], #8 \n\ | ||
65 | bgt 1b \n\ | ||
66 | beq 2b \n\ | ||
67 | \n\ | ||
68 | ldmfd sp!, {r4, r5, pc}" | ||
69 | : | ||
70 | : "I" (PAGE_SIZE / 64 - 1)); | ||
71 | } | ||
72 | |||
73 | void xsc3_mc_copy_user_highpage(struct page *to, struct page *from, | ||
74 | unsigned long vaddr) | ||
75 | { | ||
76 | void *kto, *kfrom; | ||
77 | |||
78 | kto = kmap_atomic(to, KM_USER0); | ||
79 | kfrom = kmap_atomic(from, KM_USER1); | ||
80 | xsc3_mc_copy_user_page(kto, kfrom); | ||
81 | kunmap_atomic(kfrom, KM_USER1); | ||
82 | kunmap_atomic(kto, KM_USER0); | ||
83 | } | ||
84 | |||
85 | /* | ||
86 | * XScale optimised clear_user_page | ||
87 | * r0 = destination | ||
88 | * r1 = virtual user address of ultimate destination page | ||
89 | */ | ||
90 | void xsc3_mc_clear_user_highpage(struct page *page, unsigned long vaddr) | ||
91 | { | ||
92 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); | ||
93 | asm volatile ("\ | ||
94 | mov r1, %2 \n\ | ||
95 | mov r2, #0 \n\ | ||
96 | mov r3, #0 \n\ | ||
97 | 1: mcr p15, 0, %0, c7, c6, 1 @ invalidate line\n\ | ||
98 | strd r2, [%0], #8 \n\ | ||
99 | strd r2, [%0], #8 \n\ | ||
100 | strd r2, [%0], #8 \n\ | ||
101 | strd r2, [%0], #8 \n\ | ||
102 | subs r1, r1, #1 \n\ | ||
103 | bne 1b" | ||
104 | : "=r" (ptr) | ||
105 | : "0" (kaddr), "I" (PAGE_SIZE / 32) | ||
106 | : "r1", "r2", "r3"); | ||
107 | kunmap_atomic(kaddr, KM_USER0); | ||
108 | } | ||
109 | |||
110 | struct cpu_user_fns xsc3_mc_user_fns __initdata = { | ||
111 | .cpu_clear_user_highpage = xsc3_mc_clear_user_highpage, | ||
112 | .cpu_copy_user_highpage = xsc3_mc_copy_user_highpage, | ||
113 | }; | ||
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c index bad49331bbf9..d18f2397ee2d 100644 --- a/arch/arm/mm/copypage-xscale.c +++ b/arch/arm/mm/copypage-xscale.c | |||
@@ -15,8 +15,8 @@ | |||
15 | */ | 15 | */ |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/highmem.h> | ||
18 | 19 | ||
19 | #include <asm/page.h> | ||
20 | #include <asm/pgtable.h> | 20 | #include <asm/pgtable.h> |
21 | #include <asm/tlbflush.h> | 21 | #include <asm/tlbflush.h> |
22 | #include <asm/cacheflush.h> | 22 | #include <asm/cacheflush.h> |
@@ -35,7 +35,7 @@ | |||
35 | static DEFINE_SPINLOCK(minicache_lock); | 35 | static DEFINE_SPINLOCK(minicache_lock); |
36 | 36 | ||
37 | /* | 37 | /* |
38 | * XScale mini-dcache optimised copy_user_page | 38 | * XScale mini-dcache optimised copy_user_highpage |
39 | * | 39 | * |
40 | * We flush the destination cache lines just before we write the data into the | 40 | * We flush the destination cache lines just before we write the data into the |
41 | * corresponding address. Since the Dcache is read-allocate, this removes the | 41 | * corresponding address. Since the Dcache is read-allocate, this removes the |
@@ -90,48 +90,53 @@ mc_copy_user_page(void *from, void *to) | |||
90 | : "r" (from), "r" (to), "I" (PAGE_SIZE / 64 - 1)); | 90 | : "r" (from), "r" (to), "I" (PAGE_SIZE / 64 - 1)); |
91 | } | 91 | } |
92 | 92 | ||
93 | void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) | 93 | void xscale_mc_copy_user_highpage(struct page *to, struct page *from, |
94 | unsigned long vaddr) | ||
94 | { | 95 | { |
95 | struct page *page = virt_to_page(kfrom); | 96 | void *kto = kmap_atomic(to, KM_USER1); |
96 | 97 | ||
97 | if (test_and_clear_bit(PG_dcache_dirty, &page->flags)) | 98 | if (test_and_clear_bit(PG_dcache_dirty, &from->flags)) |
98 | __flush_dcache_page(page_mapping(page), page); | 99 | __flush_dcache_page(page_mapping(from), from); |
99 | 100 | ||
100 | spin_lock(&minicache_lock); | 101 | spin_lock(&minicache_lock); |
101 | 102 | ||
102 | set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot), 0); | 103 | set_pte_ext(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(page_to_pfn(from), minicache_pgprot), 0); |
103 | flush_tlb_kernel_page(COPYPAGE_MINICACHE); | 104 | flush_tlb_kernel_page(COPYPAGE_MINICACHE); |
104 | 105 | ||
105 | mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); | 106 | mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); |
106 | 107 | ||
107 | spin_unlock(&minicache_lock); | 108 | spin_unlock(&minicache_lock); |
109 | |||
110 | kunmap_atomic(kto, KM_USER1); | ||
108 | } | 111 | } |
109 | 112 | ||
110 | /* | 113 | /* |
111 | * XScale optimised clear_user_page | 114 | * XScale optimised clear_user_page |
112 | */ | 115 | */ |
113 | void __attribute__((naked)) | 116 | void |
114 | xscale_mc_clear_user_page(void *kaddr, unsigned long vaddr) | 117 | xscale_mc_clear_user_highpage(struct page *page, unsigned long vaddr) |
115 | { | 118 | { |
119 | void *ptr, *kaddr = kmap_atomic(page, KM_USER0); | ||
116 | asm volatile( | 120 | asm volatile( |
117 | "mov r1, %0 \n\ | 121 | "mov r1, %2 \n\ |
118 | mov r2, #0 \n\ | 122 | mov r2, #0 \n\ |
119 | mov r3, #0 \n\ | 123 | mov r3, #0 \n\ |
120 | 1: mov ip, r0 \n\ | 124 | 1: mov ip, %0 \n\ |
121 | strd r2, [r0], #8 \n\ | 125 | strd r2, [%0], #8 \n\ |
122 | strd r2, [r0], #8 \n\ | 126 | strd r2, [%0], #8 \n\ |
123 | strd r2, [r0], #8 \n\ | 127 | strd r2, [%0], #8 \n\ |
124 | strd r2, [r0], #8 \n\ | 128 | strd r2, [%0], #8 \n\ |
125 | mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\ | 129 | mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\ |
126 | subs r1, r1, #1 \n\ | 130 | subs r1, r1, #1 \n\ |
127 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ | 131 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ |
128 | bne 1b \n\ | 132 | bne 1b" |
129 | mov pc, lr" | 133 | : "=r" (ptr) |
130 | : | 134 | : "0" (kaddr), "I" (PAGE_SIZE / 32) |
131 | : "I" (PAGE_SIZE / 32)); | 135 | : "r1", "r2", "r3", "ip"); |
136 | kunmap_atomic(kaddr, KM_USER0); | ||
132 | } | 137 | } |
133 | 138 | ||
134 | struct cpu_user_fns xscale_mc_user_fns __initdata = { | 139 | struct cpu_user_fns xscale_mc_user_fns __initdata = { |
135 | .cpu_clear_user_page = xscale_mc_clear_user_page, | 140 | .cpu_clear_user_highpage = xscale_mc_clear_user_highpage, |
136 | .cpu_copy_user_page = xscale_mc_copy_user_page, | 141 | .cpu_copy_user_highpage = xscale_mc_copy_user_highpage, |
137 | }; | 142 | }; |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 22c9530e91e2..0455557a2899 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/kprobes.h> | 16 | #include <linux/kprobes.h> |
17 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
18 | #include <linux/page-flags.h> | ||
18 | 19 | ||
19 | #include <asm/system.h> | 20 | #include <asm/system.h> |
20 | #include <asm/pgtable.h> | 21 | #include <asm/pgtable.h> |
@@ -84,13 +85,14 @@ void show_pte(struct mm_struct *mm, unsigned long addr) | |||
84 | break; | 85 | break; |
85 | } | 86 | } |
86 | 87 | ||
87 | #ifndef CONFIG_HIGHMEM | ||
88 | /* We must not map this if we have highmem enabled */ | 88 | /* We must not map this if we have highmem enabled */ |
89 | if (PageHighMem(pfn_to_page(pmd_val(*pmd) >> PAGE_SHIFT))) | ||
90 | break; | ||
91 | |||
89 | pte = pte_offset_map(pmd, addr); | 92 | pte = pte_offset_map(pmd, addr); |
90 | printk(", *pte=%08lx", pte_val(*pte)); | 93 | printk(", *pte=%08lx", pte_val(*pte)); |
91 | printk(", *ppte=%08lx", pte_val(pte[-PTRS_PER_PTE])); | 94 | printk(", *ppte=%08lx", pte_val(pte[-PTRS_PER_PTE])); |
92 | pte_unmap(pte); | 95 | pte_unmap(pte); |
93 | #endif | ||
94 | } while(0); | 96 | } while(0); |
95 | 97 | ||
96 | printk("\n"); | 98 | printk("\n"); |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 82c4b4217989..34df4d9d03a6 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/initrd.h> | 17 | #include <linux/initrd.h> |
18 | 18 | ||
19 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
20 | #include <asm/sections.h> | ||
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
21 | #include <asm/sizes.h> | 22 | #include <asm/sizes.h> |
22 | #include <asm/tlb.h> | 23 | #include <asm/tlb.h> |
@@ -64,10 +65,11 @@ static int __init parse_tag_initrd2(const struct tag *tag) | |||
64 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); | 65 | __tagtable(ATAG_INITRD2, parse_tag_initrd2); |
65 | 66 | ||
66 | /* | 67 | /* |
67 | * This is used to pass memory configuration data from paging_init | 68 | * This keeps memory configuration data used by a couple memory |
68 | * to mem_init, and by show_mem() to skip holes in the memory map. | 69 | * initialization functions, as well as show_mem() for the skipping |
70 | * of holes in the memory map. It is populated by arm_add_memory(). | ||
69 | */ | 71 | */ |
70 | static struct meminfo meminfo = { 0, }; | 72 | struct meminfo meminfo; |
71 | 73 | ||
72 | void show_mem(void) | 74 | void show_mem(void) |
73 | { | 75 | { |
@@ -128,7 +130,7 @@ find_bootmap_pfn(int node, struct meminfo *mi, unsigned int bootmap_pages) | |||
128 | { | 130 | { |
129 | unsigned int start_pfn, i, bootmap_pfn; | 131 | unsigned int start_pfn, i, bootmap_pfn; |
130 | 132 | ||
131 | start_pfn = PAGE_ALIGN(__pa(&_end)) >> PAGE_SHIFT; | 133 | start_pfn = PAGE_ALIGN(__pa(_end)) >> PAGE_SHIFT; |
132 | bootmap_pfn = 0; | 134 | bootmap_pfn = 0; |
133 | 135 | ||
134 | for_each_nodebank(i, mi, node) { | 136 | for_each_nodebank(i, mi, node) { |
@@ -331,13 +333,12 @@ static void __init bootmem_free_node(int node, struct meminfo *mi) | |||
331 | free_area_init_node(node, zone_size, start_pfn, zhole_size); | 333 | free_area_init_node(node, zone_size, start_pfn, zhole_size); |
332 | } | 334 | } |
333 | 335 | ||
334 | void __init bootmem_init(struct meminfo *mi) | 336 | void __init bootmem_init(void) |
335 | { | 337 | { |
338 | struct meminfo *mi = &meminfo; | ||
336 | unsigned long memend_pfn = 0; | 339 | unsigned long memend_pfn = 0; |
337 | int node, initrd_node; | 340 | int node, initrd_node; |
338 | 341 | ||
339 | memcpy(&meminfo, mi, sizeof(meminfo)); | ||
340 | |||
341 | /* | 342 | /* |
342 | * Locate which node contains the ramdisk image, if any. | 343 | * Locate which node contains the ramdisk image, if any. |
343 | */ | 344 | */ |
@@ -394,20 +395,22 @@ void __init bootmem_init(struct meminfo *mi) | |||
394 | max_pfn = max_low_pfn = memend_pfn - PHYS_PFN_OFFSET; | 395 | max_pfn = max_low_pfn = memend_pfn - PHYS_PFN_OFFSET; |
395 | } | 396 | } |
396 | 397 | ||
397 | static inline void free_area(unsigned long addr, unsigned long end, char *s) | 398 | static inline int free_area(unsigned long pfn, unsigned long end, char *s) |
398 | { | 399 | { |
399 | unsigned int size = (end - addr) >> 10; | 400 | unsigned int pages = 0, size = (end - pfn) << (PAGE_SHIFT - 10); |
400 | 401 | ||
401 | for (; addr < end; addr += PAGE_SIZE) { | 402 | for (; pfn < end; pfn++) { |
402 | struct page *page = virt_to_page(addr); | 403 | struct page *page = pfn_to_page(pfn); |
403 | ClearPageReserved(page); | 404 | ClearPageReserved(page); |
404 | init_page_count(page); | 405 | init_page_count(page); |
405 | free_page(addr); | 406 | __free_page(page); |
406 | totalram_pages++; | 407 | pages++; |
407 | } | 408 | } |
408 | 409 | ||
409 | if (size && s) | 410 | if (size && s) |
410 | printk(KERN_INFO "Freeing %s memory: %dK\n", s, size); | 411 | printk(KERN_INFO "Freeing %s memory: %dK\n", s, size); |
412 | |||
413 | return pages; | ||
411 | } | 414 | } |
412 | 415 | ||
413 | static inline void | 416 | static inline void |
@@ -478,13 +481,9 @@ static void __init free_unused_memmap_node(int node, struct meminfo *mi) | |||
478 | */ | 481 | */ |
479 | void __init mem_init(void) | 482 | void __init mem_init(void) |
480 | { | 483 | { |
481 | unsigned int codepages, datapages, initpages; | 484 | unsigned int codesize, datasize, initsize; |
482 | int i, node; | 485 | int i, node; |
483 | 486 | ||
484 | codepages = &_etext - &_text; | ||
485 | datapages = &_end - &__data_start; | ||
486 | initpages = &__init_end - &__init_begin; | ||
487 | |||
488 | #ifndef CONFIG_DISCONTIGMEM | 487 | #ifndef CONFIG_DISCONTIGMEM |
489 | max_mapnr = virt_to_page(high_memory) - mem_map; | 488 | max_mapnr = virt_to_page(high_memory) - mem_map; |
490 | #endif | 489 | #endif |
@@ -501,7 +500,8 @@ void __init mem_init(void) | |||
501 | 500 | ||
502 | #ifdef CONFIG_SA1111 | 501 | #ifdef CONFIG_SA1111 |
503 | /* now that our DMA memory is actually so designated, we can free it */ | 502 | /* now that our DMA memory is actually so designated, we can free it */ |
504 | free_area(PAGE_OFFSET, (unsigned long)swapper_pg_dir, NULL); | 503 | totalram_pages += free_area(PHYS_PFN_OFFSET, |
504 | __phys_to_pfn(__pa(swapper_pg_dir)), NULL); | ||
505 | #endif | 505 | #endif |
506 | 506 | ||
507 | /* | 507 | /* |
@@ -509,18 +509,21 @@ void __init mem_init(void) | |||
509 | * real number of pages we have in this system | 509 | * real number of pages we have in this system |
510 | */ | 510 | */ |
511 | printk(KERN_INFO "Memory:"); | 511 | printk(KERN_INFO "Memory:"); |
512 | |||
513 | num_physpages = 0; | 512 | num_physpages = 0; |
514 | for (i = 0; i < meminfo.nr_banks; i++) { | 513 | for (i = 0; i < meminfo.nr_banks; i++) { |
515 | num_physpages += bank_pfn_size(&meminfo.bank[i]); | 514 | num_physpages += bank_pfn_size(&meminfo.bank[i]); |
516 | printk(" %ldMB", bank_phys_size(&meminfo.bank[i]) >> 20); | 515 | printk(" %ldMB", bank_phys_size(&meminfo.bank[i]) >> 20); |
517 | } | 516 | } |
518 | |||
519 | printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT)); | 517 | printk(" = %luMB total\n", num_physpages >> (20 - PAGE_SHIFT)); |
518 | |||
519 | codesize = _etext - _text; | ||
520 | datasize = _end - _data; | ||
521 | initsize = __init_end - __init_begin; | ||
522 | |||
520 | printk(KERN_NOTICE "Memory: %luKB available (%dK code, " | 523 | printk(KERN_NOTICE "Memory: %luKB available (%dK code, " |
521 | "%dK data, %dK init)\n", | 524 | "%dK data, %dK init)\n", |
522 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), | 525 | (unsigned long) nr_free_pages() << (PAGE_SHIFT-10), |
523 | codepages >> 10, datapages >> 10, initpages >> 10); | 526 | codesize >> 10, datasize >> 10, initsize >> 10); |
524 | 527 | ||
525 | if (PAGE_SIZE >= 16384 && num_physpages <= 128) { | 528 | if (PAGE_SIZE >= 16384 && num_physpages <= 128) { |
526 | extern int sysctl_overcommit_memory; | 529 | extern int sysctl_overcommit_memory; |
@@ -535,11 +538,10 @@ void __init mem_init(void) | |||
535 | 538 | ||
536 | void free_initmem(void) | 539 | void free_initmem(void) |
537 | { | 540 | { |
538 | if (!machine_is_integrator() && !machine_is_cintegrator()) { | 541 | if (!machine_is_integrator() && !machine_is_cintegrator()) |
539 | free_area((unsigned long)(&__init_begin), | 542 | totalram_pages += free_area(__phys_to_pfn(__pa(__init_begin)), |
540 | (unsigned long)(&__init_end), | 543 | __phys_to_pfn(__pa(__init_end)), |
541 | "init"); | 544 | "init"); |
542 | } | ||
543 | } | 545 | } |
544 | 546 | ||
545 | #ifdef CONFIG_BLK_DEV_INITRD | 547 | #ifdef CONFIG_BLK_DEV_INITRD |
@@ -549,7 +551,9 @@ static int keep_initrd; | |||
549 | void free_initrd_mem(unsigned long start, unsigned long end) | 551 | void free_initrd_mem(unsigned long start, unsigned long end) |
550 | { | 552 | { |
551 | if (!keep_initrd) | 553 | if (!keep_initrd) |
552 | free_area(start, end, "initrd"); | 554 | totalram_pages += free_area(__phys_to_pfn(__pa(start)), |
555 | __phys_to_pfn(__pa(end)), | ||
556 | "initrd"); | ||
553 | } | 557 | } |
554 | 558 | ||
555 | static int __init keepinitrd_setup(char *__unused) | 559 | static int __init keepinitrd_setup(char *__unused) |
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index 5d9f53907b4e..95bbe112965e 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -32,7 +32,5 @@ struct meminfo; | |||
32 | struct pglist_data; | 32 | struct pglist_data; |
33 | 33 | ||
34 | void __init create_mapping(struct map_desc *md); | 34 | void __init create_mapping(struct map_desc *md); |
35 | void __init bootmem_init(struct meminfo *mi); | 35 | void __init bootmem_init(void); |
36 | void reserve_node_zero(struct pglist_data *pgdat); | 36 | void reserve_node_zero(struct pglist_data *pgdat); |
37 | |||
38 | extern void _text, _stext, _etext, __data_start, _end, __init_begin, __init_end; | ||
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 7f36c825718d..9b36c5cb5e9f 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <asm/cputype.h> | 18 | #include <asm/cputype.h> |
19 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
20 | #include <asm/sections.h> | ||
20 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
21 | #include <asm/sizes.h> | 22 | #include <asm/sizes.h> |
22 | #include <asm/tlb.h> | 23 | #include <asm/tlb.h> |
@@ -646,61 +647,79 @@ static void __init early_vmalloc(char **arg) | |||
646 | "vmalloc area too small, limiting to %luMB\n", | 647 | "vmalloc area too small, limiting to %luMB\n", |
647 | vmalloc_reserve >> 20); | 648 | vmalloc_reserve >> 20); |
648 | } | 649 | } |
650 | |||
651 | if (vmalloc_reserve > VMALLOC_END - (PAGE_OFFSET + SZ_32M)) { | ||
652 | vmalloc_reserve = VMALLOC_END - (PAGE_OFFSET + SZ_32M); | ||
653 | printk(KERN_WARNING | ||
654 | "vmalloc area is too big, limiting to %luMB\n", | ||
655 | vmalloc_reserve >> 20); | ||
656 | } | ||
649 | } | 657 | } |
650 | __early_param("vmalloc=", early_vmalloc); | 658 | __early_param("vmalloc=", early_vmalloc); |
651 | 659 | ||
652 | #define VMALLOC_MIN (void *)(VMALLOC_END - vmalloc_reserve) | 660 | #define VMALLOC_MIN (void *)(VMALLOC_END - vmalloc_reserve) |
653 | 661 | ||
654 | static int __init check_membank_valid(struct membank *mb) | 662 | static void __init sanity_check_meminfo(void) |
655 | { | 663 | { |
656 | /* | 664 | int i, j; |
657 | * Check whether this memory region has non-zero size or | ||
658 | * invalid node number. | ||
659 | */ | ||
660 | if (mb->size == 0 || mb->node >= MAX_NUMNODES) | ||
661 | return 0; | ||
662 | |||
663 | /* | ||
664 | * Check whether this memory region would entirely overlap | ||
665 | * the vmalloc area. | ||
666 | */ | ||
667 | if (phys_to_virt(mb->start) >= VMALLOC_MIN) { | ||
668 | printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx " | ||
669 | "(vmalloc region overlap).\n", | ||
670 | mb->start, mb->start + mb->size - 1); | ||
671 | return 0; | ||
672 | } | ||
673 | |||
674 | /* | ||
675 | * Check whether this memory region would partially overlap | ||
676 | * the vmalloc area. | ||
677 | */ | ||
678 | if (phys_to_virt(mb->start + mb->size) < phys_to_virt(mb->start) || | ||
679 | phys_to_virt(mb->start + mb->size) > VMALLOC_MIN) { | ||
680 | unsigned long newsize = VMALLOC_MIN - phys_to_virt(mb->start); | ||
681 | |||
682 | printk(KERN_NOTICE "Truncating RAM at %.8lx-%.8lx " | ||
683 | "to -%.8lx (vmalloc region overlap).\n", | ||
684 | mb->start, mb->start + mb->size - 1, | ||
685 | mb->start + newsize - 1); | ||
686 | mb->size = newsize; | ||
687 | } | ||
688 | 665 | ||
689 | return 1; | 666 | for (i = 0, j = 0; i < meminfo.nr_banks; i++) { |
690 | } | 667 | struct membank *bank = &meminfo.bank[j]; |
668 | *bank = meminfo.bank[i]; | ||
691 | 669 | ||
692 | static void __init sanity_check_meminfo(struct meminfo *mi) | 670 | #ifdef CONFIG_HIGHMEM |
693 | { | 671 | /* |
694 | int i, j; | 672 | * Split those memory banks which are partially overlapping |
673 | * the vmalloc area greatly simplifying things later. | ||
674 | */ | ||
675 | if (__va(bank->start) < VMALLOC_MIN && | ||
676 | bank->size > VMALLOC_MIN - __va(bank->start)) { | ||
677 | if (meminfo.nr_banks >= NR_BANKS) { | ||
678 | printk(KERN_CRIT "NR_BANKS too low, " | ||
679 | "ignoring high memory\n"); | ||
680 | } else { | ||
681 | memmove(bank + 1, bank, | ||
682 | (meminfo.nr_banks - i) * sizeof(*bank)); | ||
683 | meminfo.nr_banks++; | ||
684 | i++; | ||
685 | bank[1].size -= VMALLOC_MIN - __va(bank->start); | ||
686 | bank[1].start = __pa(VMALLOC_MIN - 1) + 1; | ||
687 | j++; | ||
688 | } | ||
689 | bank->size = VMALLOC_MIN - __va(bank->start); | ||
690 | } | ||
691 | #else | ||
692 | /* | ||
693 | * Check whether this memory bank would entirely overlap | ||
694 | * the vmalloc area. | ||
695 | */ | ||
696 | if (__va(bank->start) >= VMALLOC_MIN) { | ||
697 | printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx " | ||
698 | "(vmalloc region overlap).\n", | ||
699 | bank->start, bank->start + bank->size - 1); | ||
700 | continue; | ||
701 | } | ||
695 | 702 | ||
696 | for (i = 0, j = 0; i < mi->nr_banks; i++) { | 703 | /* |
697 | if (check_membank_valid(&mi->bank[i])) | 704 | * Check whether this memory bank would partially overlap |
698 | mi->bank[j++] = mi->bank[i]; | 705 | * the vmalloc area. |
706 | */ | ||
707 | if (__va(bank->start + bank->size) > VMALLOC_MIN || | ||
708 | __va(bank->start + bank->size) < __va(bank->start)) { | ||
709 | unsigned long newsize = VMALLOC_MIN - __va(bank->start); | ||
710 | printk(KERN_NOTICE "Truncating RAM at %.8lx-%.8lx " | ||
711 | "to -%.8lx (vmalloc region overlap).\n", | ||
712 | bank->start, bank->start + bank->size - 1, | ||
713 | bank->start + newsize - 1); | ||
714 | bank->size = newsize; | ||
715 | } | ||
716 | #endif | ||
717 | j++; | ||
699 | } | 718 | } |
700 | mi->nr_banks = j; | 719 | meminfo.nr_banks = j; |
701 | } | 720 | } |
702 | 721 | ||
703 | static inline void prepare_page_table(struct meminfo *mi) | 722 | static inline void prepare_page_table(void) |
704 | { | 723 | { |
705 | unsigned long addr; | 724 | unsigned long addr; |
706 | 725 | ||
@@ -712,7 +731,7 @@ static inline void prepare_page_table(struct meminfo *mi) | |||
712 | 731 | ||
713 | #ifdef CONFIG_XIP_KERNEL | 732 | #ifdef CONFIG_XIP_KERNEL |
714 | /* The XIP kernel is mapped in the module area -- skip over it */ | 733 | /* The XIP kernel is mapped in the module area -- skip over it */ |
715 | addr = ((unsigned long)&_etext + PGDIR_SIZE - 1) & PGDIR_MASK; | 734 | addr = ((unsigned long)_etext + PGDIR_SIZE - 1) & PGDIR_MASK; |
716 | #endif | 735 | #endif |
717 | for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE) | 736 | for ( ; addr < PAGE_OFFSET; addr += PGDIR_SIZE) |
718 | pmd_clear(pmd_off_k(addr)); | 737 | pmd_clear(pmd_off_k(addr)); |
@@ -721,7 +740,7 @@ static inline void prepare_page_table(struct meminfo *mi) | |||
721 | * Clear out all the kernel space mappings, except for the first | 740 | * Clear out all the kernel space mappings, except for the first |
722 | * memory bank, up to the end of the vmalloc region. | 741 | * memory bank, up to the end of the vmalloc region. |
723 | */ | 742 | */ |
724 | for (addr = __phys_to_virt(mi->bank[0].start + mi->bank[0].size); | 743 | for (addr = __phys_to_virt(bank_phys_end(&meminfo.bank[0])); |
725 | addr < VMALLOC_END; addr += PGDIR_SIZE) | 744 | addr < VMALLOC_END; addr += PGDIR_SIZE) |
726 | pmd_clear(pmd_off_k(addr)); | 745 | pmd_clear(pmd_off_k(addr)); |
727 | } | 746 | } |
@@ -738,10 +757,10 @@ void __init reserve_node_zero(pg_data_t *pgdat) | |||
738 | * Note that this can only be in node 0. | 757 | * Note that this can only be in node 0. |
739 | */ | 758 | */ |
740 | #ifdef CONFIG_XIP_KERNEL | 759 | #ifdef CONFIG_XIP_KERNEL |
741 | reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start, | 760 | reserve_bootmem_node(pgdat, __pa(_data), _end - _data, |
742 | BOOTMEM_DEFAULT); | 761 | BOOTMEM_DEFAULT); |
743 | #else | 762 | #else |
744 | reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext, | 763 | reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext, |
745 | BOOTMEM_DEFAULT); | 764 | BOOTMEM_DEFAULT); |
746 | #endif | 765 | #endif |
747 | 766 | ||
@@ -808,7 +827,6 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
808 | * Allocate the vector page early. | 827 | * Allocate the vector page early. |
809 | */ | 828 | */ |
810 | vectors = alloc_bootmem_low_pages(PAGE_SIZE); | 829 | vectors = alloc_bootmem_low_pages(PAGE_SIZE); |
811 | BUG_ON(!vectors); | ||
812 | 830 | ||
813 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) | 831 | for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) |
814 | pmd_clear(pmd_off_k(addr)); | 832 | pmd_clear(pmd_off_k(addr)); |
@@ -820,7 +838,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
820 | #ifdef CONFIG_XIP_KERNEL | 838 | #ifdef CONFIG_XIP_KERNEL |
821 | map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); | 839 | map.pfn = __phys_to_pfn(CONFIG_XIP_PHYS_ADDR & SECTION_MASK); |
822 | map.virtual = MODULES_VADDR; | 840 | map.virtual = MODULES_VADDR; |
823 | map.length = ((unsigned long)&_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; | 841 | map.length = ((unsigned long)_etext - map.virtual + ~SECTION_MASK) & SECTION_MASK; |
824 | map.type = MT_ROM; | 842 | map.type = MT_ROM; |
825 | create_mapping(&map); | 843 | create_mapping(&map); |
826 | #endif | 844 | #endif |
@@ -880,23 +898,23 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
880 | * paging_init() sets up the page tables, initialises the zone memory | 898 | * paging_init() sets up the page tables, initialises the zone memory |
881 | * maps, and sets up the zero page, bad page and bad page tables. | 899 | * maps, and sets up the zero page, bad page and bad page tables. |
882 | */ | 900 | */ |
883 | void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) | 901 | void __init paging_init(struct machine_desc *mdesc) |
884 | { | 902 | { |
885 | void *zero_page; | 903 | void *zero_page; |
886 | 904 | ||
887 | build_mem_type_table(); | 905 | build_mem_type_table(); |
888 | sanity_check_meminfo(mi); | 906 | sanity_check_meminfo(); |
889 | prepare_page_table(mi); | 907 | prepare_page_table(); |
890 | bootmem_init(mi); | 908 | bootmem_init(); |
891 | devicemaps_init(mdesc); | 909 | devicemaps_init(mdesc); |
892 | 910 | ||
893 | top_pmd = pmd_off_k(0xffff0000); | 911 | top_pmd = pmd_off_k(0xffff0000); |
894 | 912 | ||
895 | /* | 913 | /* |
896 | * allocate the zero page. Note that we count on this going ok. | 914 | * allocate the zero page. Note that this always succeeds and |
915 | * returns a zeroed result. | ||
897 | */ | 916 | */ |
898 | zero_page = alloc_bootmem_low_pages(PAGE_SIZE); | 917 | zero_page = alloc_bootmem_low_pages(PAGE_SIZE); |
899 | memzero(zero_page, PAGE_SIZE); | ||
900 | empty_zero_page = virt_to_page(zero_page); | 918 | empty_zero_page = virt_to_page(zero_page); |
901 | flush_dcache_page(empty_zero_page); | 919 | flush_dcache_page(empty_zero_page); |
902 | } | 920 | } |
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 07b62b238979..ad7bacc693b2 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/io.h> | 10 | #include <linux/io.h> |
11 | 11 | ||
12 | #include <asm/cacheflush.h> | 12 | #include <asm/cacheflush.h> |
13 | #include <asm/sections.h> | ||
13 | #include <asm/page.h> | 14 | #include <asm/page.h> |
14 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
15 | 16 | ||
@@ -25,10 +26,10 @@ void __init reserve_node_zero(pg_data_t *pgdat) | |||
25 | * Note that this can only be in node 0. | 26 | * Note that this can only be in node 0. |
26 | */ | 27 | */ |
27 | #ifdef CONFIG_XIP_KERNEL | 28 | #ifdef CONFIG_XIP_KERNEL |
28 | reserve_bootmem_node(pgdat, __pa(&__data_start), &_end - &__data_start, | 29 | reserve_bootmem_node(pgdat, __pa(_data), _end - _data, |
29 | BOOTMEM_DEFAULT); | 30 | BOOTMEM_DEFAULT); |
30 | #else | 31 | #else |
31 | reserve_bootmem_node(pgdat, __pa(&_stext), &_end - &_stext, | 32 | reserve_bootmem_node(pgdat, __pa(_stext), _end - _stext, |
32 | BOOTMEM_DEFAULT); | 33 | BOOTMEM_DEFAULT); |
33 | #endif | 34 | #endif |
34 | 35 | ||
@@ -41,27 +42,13 @@ void __init reserve_node_zero(pg_data_t *pgdat) | |||
41 | BOOTMEM_DEFAULT); | 42 | BOOTMEM_DEFAULT); |
42 | } | 43 | } |
43 | 44 | ||
44 | static void __init sanity_check_meminfo(struct meminfo *mi) | ||
45 | { | ||
46 | int i, j; | ||
47 | |||
48 | for (i = 0, j = 0; i < mi->nr_banks; i++) { | ||
49 | struct membank *mb = &mi->bank[i]; | ||
50 | |||
51 | if (mb->size != 0 && mb->node < MAX_NUMNODES) | ||
52 | mi->bank[j++] = mi->bank[i]; | ||
53 | } | ||
54 | mi->nr_banks = j; | ||
55 | } | ||
56 | |||
57 | /* | 45 | /* |
58 | * paging_init() sets up the page tables, initialises the zone memory | 46 | * paging_init() sets up the page tables, initialises the zone memory |
59 | * maps, and sets up the zero page, bad page and bad page tables. | 47 | * maps, and sets up the zero page, bad page and bad page tables. |
60 | */ | 48 | */ |
61 | void __init paging_init(struct meminfo *mi, struct machine_desc *mdesc) | 49 | void __init paging_init(struct machine_desc *mdesc) |
62 | { | 50 | { |
63 | sanity_check_meminfo(mi); | 51 | bootmem_init(); |
64 | bootmem_init(mi); | ||
65 | } | 52 | } |
66 | 53 | ||
67 | /* | 54 | /* |
diff --git a/arch/arm/mm/pgd.c b/arch/arm/mm/pgd.c index e0f19ab91163..2690146161ba 100644 --- a/arch/arm/mm/pgd.c +++ b/arch/arm/mm/pgd.c | |||
@@ -31,7 +31,7 @@ pgd_t *get_pgd_slow(struct mm_struct *mm) | |||
31 | if (!new_pgd) | 31 | if (!new_pgd) |
32 | goto no_pgd; | 32 | goto no_pgd; |
33 | 33 | ||
34 | memzero(new_pgd, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); | 34 | memset(new_pgd, 0, FIRST_KERNEL_PGD_NR * sizeof(pgd_t)); |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Copy over the kernel and IO PGD entries | 37 | * Copy over the kernel and IO PGD entries |
diff --git a/arch/arm/mm/proc-syms.c b/arch/arm/mm/proc-syms.c index 2b5ba396e3a6..4ad3bf291ad3 100644 --- a/arch/arm/mm/proc-syms.c +++ b/arch/arm/mm/proc-syms.c | |||
@@ -33,8 +33,8 @@ EXPORT_SYMBOL(cpu_cache); | |||
33 | 33 | ||
34 | #ifdef CONFIG_MMU | 34 | #ifdef CONFIG_MMU |
35 | #ifndef MULTI_USER | 35 | #ifndef MULTI_USER |
36 | EXPORT_SYMBOL(__cpu_clear_user_page); | 36 | EXPORT_SYMBOL(__cpu_clear_user_highpage); |
37 | EXPORT_SYMBOL(__cpu_copy_user_page); | 37 | EXPORT_SYMBOL(__cpu_copy_user_highpage); |
38 | #else | 38 | #else |
39 | EXPORT_SYMBOL(cpu_user); | 39 | EXPORT_SYMBOL(cpu_user); |
40 | #endif | 40 | #endif |
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S index 294943b85973..f0cc599facb7 100644 --- a/arch/arm/mm/proc-v6.S +++ b/arch/arm/mm/proc-v6.S | |||
@@ -71,6 +71,8 @@ ENTRY(cpu_v6_reset) | |||
71 | * IRQs are already disabled. | 71 | * IRQs are already disabled. |
72 | */ | 72 | */ |
73 | ENTRY(cpu_v6_do_idle) | 73 | ENTRY(cpu_v6_do_idle) |
74 | mov r1, #0 | ||
75 | mcr p15, 0, r1, c7, c10, 4 @ DWB - WFI may enter a low-power mode | ||
74 | mcr p15, 0, r1, c7, c0, 4 @ wait for interrupt | 76 | mcr p15, 0, r1, c7, c0, 4 @ wait for interrupt |
75 | mov pc, lr | 77 | mov pc, lr |
76 | 78 | ||
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 4d3c0a73e7fb..d1ebec42521d 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -20,9 +20,17 @@ | |||
20 | 20 | ||
21 | #define TTB_C (1 << 0) | 21 | #define TTB_C (1 << 0) |
22 | #define TTB_S (1 << 1) | 22 | #define TTB_S (1 << 1) |
23 | #define TTB_RGN_NC (0 << 3) | ||
24 | #define TTB_RGN_OC_WBWA (1 << 3) | ||
23 | #define TTB_RGN_OC_WT (2 << 3) | 25 | #define TTB_RGN_OC_WT (2 << 3) |
24 | #define TTB_RGN_OC_WB (3 << 3) | 26 | #define TTB_RGN_OC_WB (3 << 3) |
25 | 27 | ||
28 | #ifndef CONFIG_SMP | ||
29 | #define TTB_FLAGS TTB_C|TTB_RGN_OC_WB @ mark PTWs cacheable, outer WB | ||
30 | #else | ||
31 | #define TTB_FLAGS TTB_C|TTB_S|TTB_RGN_OC_WBWA @ mark PTWs cacheable and shared, outer WBWA | ||
32 | #endif | ||
33 | |||
26 | ENTRY(cpu_v7_proc_init) | 34 | ENTRY(cpu_v7_proc_init) |
27 | mov pc, lr | 35 | mov pc, lr |
28 | ENDPROC(cpu_v7_proc_init) | 36 | ENDPROC(cpu_v7_proc_init) |
@@ -55,6 +63,7 @@ ENDPROC(cpu_v7_reset) | |||
55 | * IRQs are already disabled. | 63 | * IRQs are already disabled. |
56 | */ | 64 | */ |
57 | ENTRY(cpu_v7_do_idle) | 65 | ENTRY(cpu_v7_do_idle) |
66 | dsb @ WFI may enter a low-power mode | ||
58 | wfi | 67 | wfi |
59 | mov pc, lr | 68 | mov pc, lr |
60 | ENDPROC(cpu_v7_do_idle) | 69 | ENDPROC(cpu_v7_do_idle) |
@@ -85,7 +94,7 @@ ENTRY(cpu_v7_switch_mm) | |||
85 | #ifdef CONFIG_MMU | 94 | #ifdef CONFIG_MMU |
86 | mov r2, #0 | 95 | mov r2, #0 |
87 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id | 96 | ldr r1, [r1, #MM_CONTEXT_ID] @ get mm->context.id |
88 | orr r0, r0, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB | 97 | orr r0, r0, #TTB_FLAGS |
89 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID | 98 | mcr p15, 0, r2, c13, c0, 1 @ set reserved context ID |
90 | isb | 99 | isb |
91 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 | 100 | 1: mcr p15, 0, r0, c2, c0, 0 @ set TTB 0 |
@@ -162,6 +171,11 @@ cpu_v7_name: | |||
162 | * - cache type register is implemented | 171 | * - cache type register is implemented |
163 | */ | 172 | */ |
164 | __v7_setup: | 173 | __v7_setup: |
174 | #ifdef CONFIG_SMP | ||
175 | mrc p15, 0, r0, c1, c0, 1 @ Enable SMP/nAMP mode | ||
176 | orr r0, r0, #(0x1 << 6) | ||
177 | mcr p15, 0, r0, c1, c0, 1 | ||
178 | #endif | ||
165 | adr r12, __v7_setup_stack @ the local stack | 179 | adr r12, __v7_setup_stack @ the local stack |
166 | stmia r12, {r0-r5, r7, r9, r11, lr} | 180 | stmia r12, {r0-r5, r7, r9, r11, lr} |
167 | bl v7_flush_dcache_all | 181 | bl v7_flush_dcache_all |
@@ -174,8 +188,7 @@ __v7_setup: | |||
174 | #ifdef CONFIG_MMU | 188 | #ifdef CONFIG_MMU |
175 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs | 189 | mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs |
176 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register | 190 | mcr p15, 0, r10, c2, c0, 2 @ TTB control register |
177 | orr r4, r4, #TTB_RGN_OC_WB @ mark PTWs outer cacheable, WB | 191 | orr r4, r4, #TTB_FLAGS |
178 | mcr p15, 0, r4, c2, c0, 0 @ load TTB0 | ||
179 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 | 192 | mcr p15, 0, r4, c2, c0, 1 @ load TTB1 |
180 | mov r10, #0x1f @ domains 0, 1 = manager | 193 | mov r10, #0x1f @ domains 0, 1 = manager |
181 | mcr p15, 0, r10, c3, c0, 0 @ load domain access register | 194 | mcr p15, 0, r10, c3, c0, 0 @ load domain access register |
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S index 8f6cf56c11c0..33515c214b92 100644 --- a/arch/arm/mm/proc-xsc3.S +++ b/arch/arm/mm/proc-xsc3.S | |||
@@ -481,3 +481,28 @@ __xsc3_proc_info: | |||
481 | .long xsc3_mc_user_fns | 481 | .long xsc3_mc_user_fns |
482 | .long xsc3_cache_fns | 482 | .long xsc3_cache_fns |
483 | .size __xsc3_proc_info, . - __xsc3_proc_info | 483 | .size __xsc3_proc_info, . - __xsc3_proc_info |
484 | |||
485 | /* Note: PXA935 changed its implementor ID from Intel to Marvell */ | ||
486 | |||
487 | .type __xsc3_pxa935_proc_info,#object | ||
488 | __xsc3_pxa935_proc_info: | ||
489 | .long 0x56056000 | ||
490 | .long 0xffffe000 | ||
491 | .long PMD_TYPE_SECT | \ | ||
492 | PMD_SECT_BUFFERABLE | \ | ||
493 | PMD_SECT_CACHEABLE | \ | ||
494 | PMD_SECT_AP_WRITE | \ | ||
495 | PMD_SECT_AP_READ | ||
496 | .long PMD_TYPE_SECT | \ | ||
497 | PMD_SECT_AP_WRITE | \ | ||
498 | PMD_SECT_AP_READ | ||
499 | b __xsc3_setup | ||
500 | .long cpu_arch_name | ||
501 | .long cpu_elf_name | ||
502 | .long HWCAP_SWP|HWCAP_HALF|HWCAP_THUMB|HWCAP_FAST_MULT|HWCAP_EDSP | ||
503 | .long cpu_xsc3_name | ||
504 | .long xsc3_processor_functions | ||
505 | .long v4wbi_tlb_fns | ||
506 | .long xsc3_mc_user_fns | ||
507 | .long xsc3_cache_fns | ||
508 | .size __xsc3_pxa935_proc_info, . - __xsc3_pxa935_proc_info | ||
diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig index b2a7e3fad117..9cc2b16fdf79 100644 --- a/arch/arm/plat-mxc/Kconfig +++ b/arch/arm/plat-mxc/Kconfig | |||
@@ -6,18 +6,27 @@ choice | |||
6 | prompt "MXC/iMX Base Type" | 6 | prompt "MXC/iMX Base Type" |
7 | default ARCH_MX3 | 7 | default ARCH_MX3 |
8 | 8 | ||
9 | config ARCH_MX1 | ||
10 | bool "MX1-based" | ||
11 | select CPU_ARM920T | ||
12 | help | ||
13 | This enables support for systems based on the Freescale i.MX1 family | ||
14 | |||
9 | config ARCH_MX2 | 15 | config ARCH_MX2 |
10 | bool "MX2-based" | 16 | bool "MX2-based" |
17 | select CPU_ARM926T | ||
11 | help | 18 | help |
12 | This enables support for systems based on the Freescale i.MX2 family | 19 | This enables support for systems based on the Freescale i.MX2 family |
13 | 20 | ||
14 | config ARCH_MX3 | 21 | config ARCH_MX3 |
15 | bool "MX3-based" | 22 | bool "MX3-based" |
23 | select CPU_V6 | ||
16 | help | 24 | help |
17 | This enables support for systems based on the Freescale i.MX3 family | 25 | This enables support for systems based on the Freescale i.MX3 family |
18 | 26 | ||
19 | endchoice | 27 | endchoice |
20 | 28 | ||
29 | source "arch/arm/mach-mx1/Kconfig" | ||
21 | source "arch/arm/mach-mx2/Kconfig" | 30 | source "arch/arm/mach-mx2/Kconfig" |
22 | source "arch/arm/mach-mx3/Kconfig" | 31 | source "arch/arm/mach-mx3/Kconfig" |
23 | 32 | ||
diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile index 067556f7c91f..db74a929179d 100644 --- a/arch/arm/plat-mxc/Makefile +++ b/arch/arm/plat-mxc/Makefile | |||
@@ -5,4 +5,5 @@ | |||
5 | # Common support | 5 | # Common support |
6 | obj-y := irq.o clock.o gpio.o time.o devices.o | 6 | obj-y := irq.o clock.o gpio.o time.o devices.o |
7 | 7 | ||
8 | obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o | ||
8 | obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o | 9 | obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o |
diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/plat-mxc/dma-mx1-mx2.c index b296f19fd89a..2905ec758758 100644 --- a/arch/arm/plat-mxc/dma-mx1-mx2.c +++ b/arch/arm/plat-mxc/dma-mx1-mx2.c | |||
@@ -34,7 +34,6 @@ | |||
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
36 | #include <mach/hardware.h> | 36 | #include <mach/hardware.h> |
37 | #include <asm/dma.h> | ||
38 | #include <mach/dma-mx1-mx2.h> | 37 | #include <mach/dma-mx1-mx2.h> |
39 | 38 | ||
40 | #define DMA_DCR 0x00 /* Control Register */ | 39 | #define DMA_DCR 0x00 /* Control Register */ |
@@ -114,7 +113,7 @@ struct imx_dma_channel { | |||
114 | void (*err_handler) (int, void *, int errcode); | 113 | void (*err_handler) (int, void *, int errcode); |
115 | void (*prog_handler) (int, void *, struct scatterlist *); | 114 | void (*prog_handler) (int, void *, struct scatterlist *); |
116 | void *data; | 115 | void *data; |
117 | dmamode_t dma_mode; | 116 | unsigned int dma_mode; |
118 | struct scatterlist *sg; | 117 | struct scatterlist *sg; |
119 | unsigned int resbytes; | 118 | unsigned int resbytes; |
120 | int dma_num; | 119 | int dma_num; |
@@ -193,7 +192,7 @@ static inline int imx_dma_sg_next(int channel, struct scatterlist *sg) | |||
193 | int | 192 | int |
194 | imx_dma_setup_single(int channel, dma_addr_t dma_address, | 193 | imx_dma_setup_single(int channel, dma_addr_t dma_address, |
195 | unsigned int dma_length, unsigned int dev_addr, | 194 | unsigned int dma_length, unsigned int dev_addr, |
196 | dmamode_t dmamode) | 195 | unsigned int dmamode) |
197 | { | 196 | { |
198 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; | 197 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; |
199 | 198 | ||
@@ -288,7 +287,7 @@ int | |||
288 | imx_dma_setup_sg(int channel, | 287 | imx_dma_setup_sg(int channel, |
289 | struct scatterlist *sg, unsigned int sgcount, | 288 | struct scatterlist *sg, unsigned int sgcount, |
290 | unsigned int dma_length, unsigned int dev_addr, | 289 | unsigned int dma_length, unsigned int dev_addr, |
291 | dmamode_t dmamode) | 290 | unsigned int dmamode) |
292 | { | 291 | { |
293 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; | 292 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; |
294 | 293 | ||
@@ -512,6 +511,7 @@ void imx_dma_disable(int channel) | |||
512 | } | 511 | } |
513 | EXPORT_SYMBOL(imx_dma_disable); | 512 | EXPORT_SYMBOL(imx_dma_disable); |
514 | 513 | ||
514 | #ifdef CONFIG_ARCH_MX2 | ||
515 | static void imx_dma_watchdog(unsigned long chno) | 515 | static void imx_dma_watchdog(unsigned long chno) |
516 | { | 516 | { |
517 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; | 517 | struct imx_dma_channel *imxdma = &imx_dma_channels[chno]; |
@@ -523,6 +523,7 @@ static void imx_dma_watchdog(unsigned long chno) | |||
523 | if (imxdma->err_handler) | 523 | if (imxdma->err_handler) |
524 | imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); | 524 | imxdma->err_handler(chno, imxdma->data, IMX_DMA_ERR_TIMEOUT); |
525 | } | 525 | } |
526 | #endif | ||
526 | 527 | ||
527 | static irqreturn_t dma_err_handler(int irq, void *dev_id) | 528 | static irqreturn_t dma_err_handler(int irq, void *dev_id) |
528 | { | 529 | { |
@@ -675,7 +676,7 @@ int imx_dma_request(int channel, const char *name) | |||
675 | { | 676 | { |
676 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; | 677 | struct imx_dma_channel *imxdma = &imx_dma_channels[channel]; |
677 | unsigned long flags; | 678 | unsigned long flags; |
678 | int ret; | 679 | int ret = 0; |
679 | 680 | ||
680 | /* basic sanity checks */ | 681 | /* basic sanity checks */ |
681 | if (!name) | 682 | if (!name) |
@@ -697,6 +698,7 @@ int imx_dma_request(int channel, const char *name) | |||
697 | ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA", | 698 | ret = request_irq(MXC_INT_DMACH0 + channel, dma_irq_handler, 0, "DMA", |
698 | NULL); | 699 | NULL); |
699 | if (ret) { | 700 | if (ret) { |
701 | local_irq_restore(flags); | ||
700 | printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n", | 702 | printk(KERN_CRIT "Can't register IRQ %d for DMA channel %d\n", |
701 | MXC_INT_DMACH0 + channel, channel); | 703 | MXC_INT_DMACH0 + channel, channel); |
702 | return ret; | 704 | return ret; |
@@ -713,7 +715,7 @@ int imx_dma_request(int channel, const char *name) | |||
713 | imxdma->sg = NULL; | 715 | imxdma->sg = NULL; |
714 | 716 | ||
715 | local_irq_restore(flags); | 717 | local_irq_restore(flags); |
716 | return 0; | 718 | return ret; |
717 | } | 719 | } |
718 | EXPORT_SYMBOL(imx_dma_request); | 720 | EXPORT_SYMBOL(imx_dma_request); |
719 | 721 | ||
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index de5c4747453f..ccbd94adc668 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c | |||
@@ -115,8 +115,8 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat) | |||
115 | } | 115 | } |
116 | } | 116 | } |
117 | 117 | ||
118 | #ifdef CONFIG_ARCH_MX3 | 118 | #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1) |
119 | /* MX3 has one interrupt *per* gpio port */ | 119 | /* MX1 and MX3 has one interrupt *per* gpio port */ |
120 | static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) | 120 | static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) |
121 | { | 121 | { |
122 | u32 irq_stat; | 122 | u32 irq_stat; |
@@ -237,7 +237,7 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt) | |||
237 | /* its a serious configuration bug when it fails */ | 237 | /* its a serious configuration bug when it fails */ |
238 | BUG_ON( gpiochip_add(&port[i].chip) < 0 ); | 238 | BUG_ON( gpiochip_add(&port[i].chip) < 0 ); |
239 | 239 | ||
240 | #ifdef CONFIG_ARCH_MX3 | 240 | #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1) |
241 | /* setup one handler for each entry */ | 241 | /* setup one handler for each entry */ |
242 | set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler); | 242 | set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler); |
243 | set_irq_data(port[i].irq, &port[i]); | 243 | set_irq_data(port[i].irq, &port[i]); |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx27ads.h b/arch/arm/plat-mxc/include/mach/board-mx27ads.h index 61e66dac90ef..8f34a05afc87 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx27ads.h +++ b/arch/arm/plat-mxc/include/mach/board-mx27ads.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #define __ASM_ARCH_MXC_BOARD_MX27ADS_H__ | 15 | #define __ASM_ARCH_MXC_BOARD_MX27ADS_H__ |
16 | 16 | ||
17 | /* external interrupt multiplexer */ | 17 | /* external interrupt multiplexer */ |
18 | #define MXC_EXP_IO_BASE (MXC_GPIO_BASE + MXC_MAX_GPIO_LINES) | 18 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) |
19 | 19 | ||
20 | #define MXC_VIRTUAL_INTS_BASE (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES) | 20 | #define MXC_VIRTUAL_INTS_BASE (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES) |
21 | #define MXC_SDIO1_CARD_IRQ MXC_VIRTUAL_INTS_BASE | 21 | #define MXC_SDIO1_CARD_IRQ MXC_VIRTUAL_INTS_BASE |
@@ -28,11 +28,6 @@ | |||
28 | /* | 28 | /* |
29 | * MXC UART EVB board level configurations | 29 | * MXC UART EVB board level configurations |
30 | */ | 30 | */ |
31 | |||
32 | #define MXC_LL_EXTUART_PADDR (CS4_BASE_ADDR + 0x20000) | ||
33 | #define MXC_LL_EXTUART_VADDR (CS4_BASE_ADDR_VIRT + 0x20000) | ||
34 | #define MXC_LL_EXTUART_16BIT_BUS | ||
35 | |||
36 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | 31 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR |
37 | #define MXC_LL_UART_VADDR AIPI_IO_ADDRESS(UART1_BASE_ADDR) | 32 | #define MXC_LL_UART_VADDR AIPI_IO_ADDRESS(UART1_BASE_ADDR) |
38 | 33 | ||
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31ads.h b/arch/arm/plat-mxc/include/mach/board-mx31ads.h index 745b48864f93..451d510d08c3 100644 --- a/arch/arm/plat-mxc/include/mach/board-mx31ads.h +++ b/arch/arm/plat-mxc/include/mach/board-mx31ads.h | |||
@@ -90,7 +90,7 @@ | |||
90 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) | 90 | #define PBC_INTMASK_CLEAR_REG (PBC_INTMASK_CLEAR + PBC_BASE_ADDRESS) |
91 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) | 91 | #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_4) |
92 | 92 | ||
93 | #define MXC_EXP_IO_BASE (MXC_MAX_INT_LINES + MXC_MAX_GPIO_LINES) | 93 | #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START) |
94 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | 94 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) |
95 | 95 | ||
96 | #define EXPIO_INT_LOW_BAT (MXC_EXP_IO_BASE + 0) | 96 | #define EXPIO_INT_LOW_BAT (MXC_EXP_IO_BASE + 0) |
diff --git a/arch/arm/plat-mxc/include/mach/board-mx31pdk.h b/arch/arm/plat-mxc/include/mach/board-mx31pdk.h new file mode 100644 index 000000000000..2b6b316d0f51 --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/board-mx31pdk.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | #ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__ | ||
12 | #define __ASM_ARCH_MXC_BOARD_MX31PDK_H__ | ||
13 | |||
14 | /* mandatory for CONFIG_LL_DEBUG */ | ||
15 | |||
16 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | ||
17 | #define MXC_LL_UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | ||
18 | |||
19 | #endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/debug-macro.S b/arch/arm/plat-mxc/include/mach/debug-macro.S index b9907bebba3b..602768b427e2 100644 --- a/arch/arm/plat-mxc/include/mach/debug-macro.S +++ b/arch/arm/plat-mxc/include/mach/debug-macro.S | |||
@@ -28,6 +28,9 @@ | |||
28 | #ifdef CONFIG_MACH_PCM038 | 28 | #ifdef CONFIG_MACH_PCM038 |
29 | #include <mach/board-pcm038.h> | 29 | #include <mach/board-pcm038.h> |
30 | #endif | 30 | #endif |
31 | #ifdef CONFIG_MACH_MX31_3DS | ||
32 | #include <mach/board-mx31pdk.h> | ||
33 | #endif | ||
31 | .macro addruart,rx | 34 | .macro addruart,rx |
32 | mrc p15, 0, \rx, c1, c0 | 35 | mrc p15, 0, \rx, c1, c0 |
33 | tst \rx, #1 @ MMU enabled? | 36 | tst \rx, #1 @ MMU enabled? |
diff --git a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h index e85fd946116c..b3876cc238ca 100644 --- a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h +++ b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h | |||
@@ -22,13 +22,15 @@ | |||
22 | * MA 02110-1301, USA. | 22 | * MA 02110-1301, USA. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <asm/dma.h> | ||
26 | |||
27 | #ifndef __ASM_ARCH_MXC_DMA_H | 25 | #ifndef __ASM_ARCH_MXC_DMA_H |
28 | #define __ASM_ARCH_MXC_DMA_H | 26 | #define __ASM_ARCH_MXC_DMA_H |
29 | 27 | ||
30 | #define IMX_DMA_CHANNELS 16 | 28 | #define IMX_DMA_CHANNELS 16 |
31 | 29 | ||
30 | #define DMA_MODE_READ 0 | ||
31 | #define DMA_MODE_WRITE 1 | ||
32 | #define DMA_MODE_MASK 1 | ||
33 | |||
32 | #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) | 34 | #define DMA_BASE IO_ADDRESS(DMA_BASE_ADDR) |
33 | 35 | ||
34 | #define IMX_DMA_MEMSIZE_32 (0 << 4) | 36 | #define IMX_DMA_MEMSIZE_32 (0 << 4) |
@@ -54,12 +56,12 @@ imx_dma_config_burstlen(int channel, unsigned int burstlen); | |||
54 | int | 56 | int |
55 | imx_dma_setup_single(int channel, dma_addr_t dma_address, | 57 | imx_dma_setup_single(int channel, dma_addr_t dma_address, |
56 | unsigned int dma_length, unsigned int dev_addr, | 58 | unsigned int dma_length, unsigned int dev_addr, |
57 | dmamode_t dmamode); | 59 | unsigned int dmamode); |
58 | 60 | ||
59 | int | 61 | int |
60 | imx_dma_setup_sg(int channel, struct scatterlist *sg, | 62 | imx_dma_setup_sg(int channel, struct scatterlist *sg, |
61 | unsigned int sgcount, unsigned int dma_length, | 63 | unsigned int sgcount, unsigned int dma_length, |
62 | unsigned int dev_addr, dmamode_t dmamode); | 64 | unsigned int dev_addr, unsigned int dmamode); |
63 | 65 | ||
64 | int | 66 | int |
65 | imx_dma_setup_handlers(int channel, | 67 | imx_dma_setup_handlers(int channel, |
diff --git a/arch/arm/plat-mxc/include/mach/dma.h b/arch/arm/plat-mxc/include/mach/dma.h deleted file mode 100644 index c822d569a05e..000000000000 --- a/arch/arm/plat-mxc/include/mach/dma.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | */ | ||
4 | |||
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 | #ifndef __ASM_ARCH_MXC_DMA_H__ | ||
12 | #define __ASM_ARCH_MXC_DMA_H__ | ||
13 | |||
14 | #endif | ||
diff --git a/arch/arm/plat-mxc/include/mach/entry-macro.S b/arch/arm/plat-mxc/include/mach/entry-macro.S index 11632028f7d1..5f01d60da845 100644 --- a/arch/arm/plat-mxc/include/mach/entry-macro.S +++ b/arch/arm/plat-mxc/include/mach/entry-macro.S | |||
@@ -9,6 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <mach/hardware.h> | ||
13 | |||
12 | #define AVIC_NIMASK 0x04 | 14 | #define AVIC_NIMASK 0x04 |
13 | 15 | ||
14 | @ this macro disables fast irq (not implemented) | 16 | @ this macro disables fast irq (not implemented) |
diff --git a/arch/arm/plat-mxc/include/mach/gpio.h b/arch/arm/plat-mxc/include/mach/gpio.h index 65eedc0d196f..ea509f1090fb 100644 --- a/arch/arm/plat-mxc/include/mach/gpio.h +++ b/arch/arm/plat-mxc/include/mach/gpio.h | |||
@@ -27,8 +27,8 @@ | |||
27 | #define gpio_set_value __gpio_set_value | 27 | #define gpio_set_value __gpio_set_value |
28 | #define gpio_cansleep __gpio_cansleep | 28 | #define gpio_cansleep __gpio_cansleep |
29 | 29 | ||
30 | #define gpio_to_irq(gpio) (MXC_MAX_INT_LINES + (gpio)) | 30 | #define gpio_to_irq(gpio) (MXC_GPIO_IRQ_START + (gpio)) |
31 | #define irq_to_gpio(irq) ((irq) - MXC_MAX_INT_LINES) | 31 | #define irq_to_gpio(irq) ((irq) - MXC_GPIO_IRQ_START) |
32 | 32 | ||
33 | struct mxc_gpio_port { | 33 | struct mxc_gpio_port { |
34 | void __iomem *base; | 34 | void __iomem *base; |
diff --git a/arch/arm/plat-mxc/include/mach/hardware.h b/arch/arm/plat-mxc/include/mach/hardware.h index 3caadeeda701..a612d8bb73c8 100644 --- a/arch/arm/plat-mxc/include/mach/hardware.h +++ b/arch/arm/plat-mxc/include/mach/hardware.h | |||
@@ -32,6 +32,10 @@ | |||
32 | # endif | 32 | # endif |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #ifdef CONFIG_ARCH_MX1 | ||
36 | # include <mach/mx1.h> | ||
37 | #endif | ||
38 | |||
35 | #include <mach/mxc.h> | 39 | #include <mach/mxc.h> |
36 | 40 | ||
37 | #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ | 41 | #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/io.h b/arch/arm/plat-mxc/include/mach/io.h index 5d4cb1196441..b4f2de769466 100644 --- a/arch/arm/plat-mxc/include/mach/io.h +++ b/arch/arm/plat-mxc/include/mach/io.h | |||
@@ -25,8 +25,8 @@ __mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) | |||
25 | /* Access all peripherals below 0x80000000 as nonshared device | 25 | /* Access all peripherals below 0x80000000 as nonshared device |
26 | * but leave l2cc alone. | 26 | * but leave l2cc alone. |
27 | */ | 27 | */ |
28 | if ((phys_addr < 0x80000000) && ((phys_addr < L2CC_BASE_ADDR) || | 28 | if ((phys_addr < 0x80000000) && ((phys_addr < 0x30000000) || |
29 | (phys_addr >= L2CC_BASE_ADDR + L2CC_SIZE))) | 29 | (phys_addr >= 0x30000000 + SZ_1M))) |
30 | mtype = MT_DEVICE_NONSHARED; | 30 | mtype = MT_DEVICE_NONSHARED; |
31 | } | 31 | } |
32 | 32 | ||
@@ -35,8 +35,8 @@ __mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype) | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | /* io address mapping macro */ | 37 | /* io address mapping macro */ |
38 | #define __io(a) ((void __iomem *)(a)) | 38 | #define __io(a) __typesafe_io(a) |
39 | 39 | ||
40 | #define __mem_pci(a) (a) | 40 | #define __mem_pci(a) (a) |
41 | 41 | ||
42 | #endif | 42 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h index 3d09bfd6c53d..95a383be628e 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx1-mx2.h | |||
@@ -21,12 +21,6 @@ | |||
21 | 21 | ||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | 23 | ||
24 | #define MXC_GPIO_ALLOC_MODE_NORMAL 0 | ||
25 | #define MXC_GPIO_ALLOC_MODE_NO_ALLOC 1 | ||
26 | #define MXC_GPIO_ALLOC_MODE_TRY_ALLOC 2 | ||
27 | #define MXC_GPIO_ALLOC_MODE_ALLOC_ONLY 4 | ||
28 | #define MXC_GPIO_ALLOC_MODE_RELEASE 8 | ||
29 | |||
30 | /* | 24 | /* |
31 | * GPIO Module and I/O Multiplexer | 25 | * GPIO Module and I/O Multiplexer |
32 | * x = 0..3 for reg_A, reg_B, reg_C, reg_D | 26 | * x = 0..3 for reg_A, reg_B, reg_C, reg_D |
@@ -103,7 +97,8 @@ | |||
103 | 97 | ||
104 | extern void mxc_gpio_mode(int gpio_mode); | 98 | extern void mxc_gpio_mode(int gpio_mode); |
105 | extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | 99 | extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, |
106 | int alloc_mode, const char *label); | 100 | const char *label); |
101 | extern void mxc_gpio_release_multiple_pins(const int *pin_list, int count); | ||
107 | 102 | ||
108 | /*-------------------------------------------------------------------------*/ | 103 | /*-------------------------------------------------------------------------*/ |
109 | 104 | ||
@@ -113,9 +108,9 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
113 | * missing on some (many) pins | 108 | * missing on some (many) pins |
114 | */ | 109 | */ |
115 | #ifdef CONFIG_ARCH_MX1 | 110 | #ifdef CONFIG_ARCH_MX1 |
116 | #define PA0_AIN_SPI2_CLK (GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 0) | 111 | #define PA0_AIN_SPI2_CLK (GPIO_PORTA | GPIO_OUT | 0) |
117 | #define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0) | 112 | #define PA0_AF_ETMTRACESYNC (GPIO_PORTA | GPIO_AF | 0) |
118 | #define PA1_AOUT_SPI2_RXD (GPIO_GIUS | GPIO_PORTA | GPIO_IN | 1) | 113 | #define PA1_AOUT_SPI2_RXD (GPIO_PORTA | GPIO_IN | 1) |
119 | #define PA1_PF_TIN (GPIO_PORTA | GPIO_PF | 1) | 114 | #define PA1_PF_TIN (GPIO_PORTA | GPIO_PF | 1) |
120 | #define PA2_PF_PWM0 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 2) | 115 | #define PA2_PF_PWM0 (GPIO_PORTA | GPIO_OUT | GPIO_PF | 2) |
121 | #define PA3_PF_CSI_MCLK (GPIO_PORTA | GPIO_PF | 3) | 116 | #define PA3_PF_CSI_MCLK (GPIO_PORTA | GPIO_PF | 3) |
@@ -133,7 +128,7 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
133 | #define PA15_PF_I2C_SDA (GPIO_PORTA | GPIO_OUT | GPIO_PF | 15) | 128 | #define PA15_PF_I2C_SDA (GPIO_PORTA | GPIO_OUT | GPIO_PF | 15) |
134 | #define PA16_PF_I2C_SCL (GPIO_PORTA | GPIO_OUT | GPIO_PF | 16) | 129 | #define PA16_PF_I2C_SCL (GPIO_PORTA | GPIO_OUT | GPIO_PF | 16) |
135 | #define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17) | 130 | #define PA17_AF_ETMTRACEPKT4 (GPIO_PORTA | GPIO_AF | 17) |
136 | #define PA17_AIN_SPI2_SS (GPIO_GIUS | GPIO_PORTA | GPIO_OUT | 17) | 131 | #define PA17_AIN_SPI2_SS (GPIO_PORTA | GPIO_OUT | 17) |
137 | #define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18) | 132 | #define PA18_AF_ETMTRACEPKT5 (GPIO_PORTA | GPIO_AF | 18) |
138 | #define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19) | 133 | #define PA19_AF_ETMTRACEPKT6 (GPIO_PORTA | GPIO_AF | 19) |
139 | #define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20) | 134 | #define PA20_AF_ETMTRACEPKT7 (GPIO_PORTA | GPIO_AF | 20) |
@@ -201,27 +196,27 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
201 | #define PC15_PF_SPI1_SS (GPIO_PORTC | GPIO_PF | 15) | 196 | #define PC15_PF_SPI1_SS (GPIO_PORTC | GPIO_PF | 15) |
202 | #define PC16_PF_SPI1_MISO (GPIO_PORTC | GPIO_PF | 16) | 197 | #define PC16_PF_SPI1_MISO (GPIO_PORTC | GPIO_PF | 16) |
203 | #define PC17_PF_SPI1_MOSI (GPIO_PORTC | GPIO_PF | 17) | 198 | #define PC17_PF_SPI1_MOSI (GPIO_PORTC | GPIO_PF | 17) |
204 | #define PC24_BIN_UART3_RI (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24) | 199 | #define PC24_BIN_UART3_RI (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 24) |
205 | #define PC25_BIN_UART3_DSR (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25) | 200 | #define PC25_BIN_UART3_DSR (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 25) |
206 | #define PC26_AOUT_UART3_DTR (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 26) | 201 | #define PC26_AOUT_UART3_DTR (GPIO_PORTC | GPIO_IN | 26) |
207 | #define PC27_BIN_UART3_DCD (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27) | 202 | #define PC27_BIN_UART3_DCD (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 27) |
208 | #define PC28_BIN_UART3_CTS (GPIO_GIUS | GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28) | 203 | #define PC28_BIN_UART3_CTS (GPIO_PORTC | GPIO_OUT | GPIO_BIN | 28) |
209 | #define PC29_AOUT_UART3_RTS (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 29) | 204 | #define PC29_AOUT_UART3_RTS (GPIO_PORTC | GPIO_IN | 29) |
210 | #define PC30_BIN_UART3_TX (GPIO_GIUS | GPIO_PORTC | GPIO_BIN | 30) | 205 | #define PC30_BIN_UART3_TX (GPIO_PORTC | GPIO_BIN | 30) |
211 | #define PC31_AOUT_UART3_RX (GPIO_GIUS | GPIO_PORTC | GPIO_IN | 31) | 206 | #define PC31_AOUT_UART3_RX (GPIO_PORTC | GPIO_IN | 31) |
212 | #define PD6_PF_LSCLK (GPIO_PORTD | GPIO_OUT | GPIO_PF | 6) | 207 | #define PD6_PF_LSCLK (GPIO_PORTD | GPIO_OUT | GPIO_PF | 6) |
213 | #define PD7_PF_REV (GPIO_PORTD | GPIO_PF | 7) | 208 | #define PD7_PF_REV (GPIO_PORTD | GPIO_PF | 7) |
214 | #define PD7_AF_UART2_DTR (GPIO_GIUS | GPIO_PORTD | GPIO_IN | GPIO_AF | 7) | 209 | #define PD7_AF_UART2_DTR (GPIO_PORTD | GPIO_IN | GPIO_AF | 7) |
215 | #define PD7_AIN_SPI2_SCLK (GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 7) | 210 | #define PD7_AIN_SPI2_SCLK (GPIO_PORTD | GPIO_AIN | 7) |
216 | #define PD8_PF_CLS (GPIO_PORTD | GPIO_PF | 8) | 211 | #define PD8_PF_CLS (GPIO_PORTD | GPIO_PF | 8) |
217 | #define PD8_AF_UART2_DCD (GPIO_PORTD | GPIO_OUT | GPIO_AF | 8) | 212 | #define PD8_AF_UART2_DCD (GPIO_PORTD | GPIO_OUT | GPIO_AF | 8) |
218 | #define PD8_AIN_SPI2_SS (GPIO_GIUS | GPIO_PORTD | GPIO_AIN | 8) | 213 | #define PD8_AIN_SPI2_SS (GPIO_PORTD | GPIO_AIN | 8) |
219 | #define PD9_PF_PS (GPIO_PORTD | GPIO_PF | 9) | 214 | #define PD9_PF_PS (GPIO_PORTD | GPIO_PF | 9) |
220 | #define PD9_AF_UART2_RI (GPIO_PORTD | GPIO_OUT | GPIO_AF | 9) | 215 | #define PD9_AF_UART2_RI (GPIO_PORTD | GPIO_OUT | GPIO_AF | 9) |
221 | #define PD9_AOUT_SPI2_RXD (GPIO_GIUS | GPIO_PORTD | GPIO_IN | 9) | 216 | #define PD9_AOUT_SPI2_RXD (GPIO_PORTD | GPIO_IN | 9) |
222 | #define PD10_PF_SPL_SPR (GPIO_PORTD | GPIO_OUT | GPIO_PF | 10) | 217 | #define PD10_PF_SPL_SPR (GPIO_PORTD | GPIO_OUT | GPIO_PF | 10) |
223 | #define PD10_AF_UART2_DSR (GPIO_PORTD | GPIO_OUT | GPIO_AF | 10) | 218 | #define PD10_AF_UART2_DSR (GPIO_PORTD | GPIO_OUT | GPIO_AF | 10) |
224 | #define PD10_AIN_SPI2_TXD (GPIO_GIUS | GPIO_PORTD | GPIO_OUT | 10) | 219 | #define PD10_AIN_SPI2_TXD (GPIO_PORTD | GPIO_OUT | 10) |
225 | #define PD11_PF_CONTRAST (GPIO_PORTD | GPIO_OUT | GPIO_PF | 11) | 220 | #define PD11_PF_CONTRAST (GPIO_PORTD | GPIO_OUT | GPIO_PF | 11) |
226 | #define PD12_PF_ACD_OE (GPIO_PORTD | GPIO_OUT | GPIO_PF | 12) | 221 | #define PD12_PF_ACD_OE (GPIO_PORTD | GPIO_OUT | GPIO_PF | 12) |
227 | #define PD13_PF_LP_HSYNC (GPIO_PORTD | GPIO_OUT | GPIO_PF | 13) | 222 | #define PD13_PF_LP_HSYNC (GPIO_PORTD | GPIO_OUT | GPIO_PF | 13) |
@@ -243,7 +238,7 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
243 | #define PD29_PF_LD14 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 29) | 238 | #define PD29_PF_LD14 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 29) |
244 | #define PD30_PF_LD15 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 30) | 239 | #define PD30_PF_LD15 (GPIO_PORTD | GPIO_OUT | GPIO_PF | 30) |
245 | #define PD31_PF_TMR2OUT (GPIO_PORTD | GPIO_PF | 31) | 240 | #define PD31_PF_TMR2OUT (GPIO_PORTD | GPIO_PF | 31) |
246 | #define PD31_BIN_SPI2_TXD (GPIO_GIUS | GPIO_PORTD | GPIO_BIN | 31) | 241 | #define PD31_BIN_SPI2_TXD (GPIO_PORTD | GPIO_BIN | 31) |
247 | #endif | 242 | #endif |
248 | 243 | ||
249 | #ifdef CONFIG_ARCH_MX2 | 244 | #ifdef CONFIG_ARCH_MX2 |
@@ -279,6 +274,12 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
279 | #define PA29_PF_VSYNC (GPIO_PORTA | GPIO_OUT | GPIO_PF | 29) | 274 | #define PA29_PF_VSYNC (GPIO_PORTA | GPIO_OUT | GPIO_PF | 29) |
280 | #define PA30_PF_CONTRAST (GPIO_PORTA | GPIO_OUT | GPIO_PF | 30) | 275 | #define PA30_PF_CONTRAST (GPIO_PORTA | GPIO_OUT | GPIO_PF | 30) |
281 | #define PA31_PF_OE_ACD (GPIO_PORTA | GPIO_OUT | GPIO_PF | 31) | 276 | #define PA31_PF_OE_ACD (GPIO_PORTA | GPIO_OUT | GPIO_PF | 31) |
277 | #define PB4_PF_SD2_D0 (GPIO_PORTB | GPIO_PF | 4) | ||
278 | #define PB5_PF_SD2_D1 (GPIO_PORTB | GPIO_PF | 5) | ||
279 | #define PB6_PF_SD2_D2 (GPIO_PORTB | GPIO_PF | 6) | ||
280 | #define PB7_PF_SD2_D3 (GPIO_PORTB | GPIO_PF | 7) | ||
281 | #define PB8_PF_SD2_CMD (GPIO_PORTB | GPIO_PF | 8) | ||
282 | #define PB9_PF_SD2_CLK (GPIO_PORTB | GPIO_PF | 9) | ||
282 | #define PB10_PF_CSI_D0 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 10) | 283 | #define PB10_PF_CSI_D0 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 10) |
283 | #define PB10_AF_UART6_TXD (GPIO_PORTB | GPIO_OUT | GPIO_AF | 10) | 284 | #define PB10_AF_UART6_TXD (GPIO_PORTB | GPIO_OUT | GPIO_AF | 10) |
284 | #define PB11_PF_CSI_D1 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 11) | 285 | #define PB11_PF_CSI_D1 (GPIO_PORTB | GPIO_OUT | GPIO_PF | 11) |
@@ -315,6 +316,13 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
315 | #define PB31_AF_UART4_RXD (GPIO_PORTB | GPIO_IN | GPIO_AF | 31) | 316 | #define PB31_AF_UART4_RXD (GPIO_PORTB | GPIO_IN | GPIO_AF | 31) |
316 | #define PC5_PF_I2C2_SDA (GPIO_PORTC | GPIO_IN | GPIO_PF | 5) | 317 | #define PC5_PF_I2C2_SDA (GPIO_PORTC | GPIO_IN | GPIO_PF | 5) |
317 | #define PC6_PF_I2C2_SCL (GPIO_PORTC | GPIO_IN | GPIO_PF | 6) | 318 | #define PC6_PF_I2C2_SCL (GPIO_PORTC | GPIO_IN | GPIO_PF | 6) |
319 | #define PC7_PF_USBOTG_DATA5 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 7) | ||
320 | #define PC8_PF_USBOTG_DATA6 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 8) | ||
321 | #define PC9_PF_USBOTG_DATA0 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 9) | ||
322 | #define PC10_PF_USBOTG_DATA2 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 10) | ||
323 | #define PC11_PF_USBOTG_DATA1 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 11) | ||
324 | #define PC12_PF_USBOTG_DATA4 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 12) | ||
325 | #define PC13_PF_USBOTG_DATA3 (GPIO_PORTC | GPIO_OUT | GPIO_PF | 13) | ||
318 | #define PC16_PF_SSI4_FS (GPIO_PORTC | GPIO_IN | GPIO_PF | 16) | 326 | #define PC16_PF_SSI4_FS (GPIO_PORTC | GPIO_IN | GPIO_PF | 16) |
319 | #define PC17_PF_SSI4_RXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 17) | 327 | #define PC17_PF_SSI4_RXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 17) |
320 | #define PC18_PF_SSI4_TXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 18) | 328 | #define PC18_PF_SSI4_TXD (GPIO_PORTC | GPIO_IN | GPIO_PF | 18) |
@@ -365,6 +373,9 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
365 | #define PD30_PF_CSPI1_MISO (GPIO_PORTD | GPIO_IN | GPIO_PF | 30) | 373 | #define PD30_PF_CSPI1_MISO (GPIO_PORTD | GPIO_IN | GPIO_PF | 30) |
366 | #define PD31_PF_CSPI1_MOSI (GPIO_PORTD | GPIO_OUT | GPIO_PF | 31) | 374 | #define PD31_PF_CSPI1_MOSI (GPIO_PORTD | GPIO_OUT | GPIO_PF | 31) |
367 | #define PF23_AIN_FEC_TX_EN (GPIO_PORTF | GPIO_OUT | GPIO_AIN | 23) | 375 | #define PF23_AIN_FEC_TX_EN (GPIO_PORTF | GPIO_OUT | GPIO_AIN | 23) |
376 | #define PE0_PF_USBOTG_NXT (GPIO_PORTE | GPIO_OUT | GPIO_PF | 0) | ||
377 | #define PE1_PF_USBOTG_STP (GPIO_PORTE | GPIO_OUT | GPIO_PF | 1) | ||
378 | #define PE2_PF_USBOTG_DIR (GPIO_PORTE | GPIO_OUT | GPIO_PF | 2) | ||
368 | #define PE3_PF_UART2_CTS (GPIO_PORTE | GPIO_OUT | GPIO_PF | 3) | 379 | #define PE3_PF_UART2_CTS (GPIO_PORTE | GPIO_OUT | GPIO_PF | 3) |
369 | #define PE4_PF_UART2_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 4) | 380 | #define PE4_PF_UART2_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 4) |
370 | #define PE6_PF_UART2_TXD (GPIO_PORTE | GPIO_OUT | GPIO_PF | 6) | 381 | #define PE6_PF_UART2_TXD (GPIO_PORTE | GPIO_OUT | GPIO_PF | 6) |
@@ -379,18 +390,27 @@ extern int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
379 | #define PE15_PF_UART1_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 15) | 390 | #define PE15_PF_UART1_RTS (GPIO_PORTE | GPIO_IN | GPIO_PF | 15) |
380 | #define PE16_AF_RTCK (GPIO_PORTE | GPIO_OUT | GPIO_AF | 16) | 391 | #define PE16_AF_RTCK (GPIO_PORTE | GPIO_OUT | GPIO_AF | 16) |
381 | #define PE16_PF_RTCK (GPIO_PORTE | GPIO_OUT | GPIO_PF | 16) | 392 | #define PE16_PF_RTCK (GPIO_PORTE | GPIO_OUT | GPIO_PF | 16) |
393 | #define PE18_PF_SDHC1_D0 (GPIO_PORTE | GPIO_PF | 18) | ||
382 | #define PE18_AF_CSPI3_MISO (GPIO_PORTE | GPIO_IN | GPIO_AF | 18) | 394 | #define PE18_AF_CSPI3_MISO (GPIO_PORTE | GPIO_IN | GPIO_AF | 18) |
395 | #define PE19_PF_SDHC1_D1 (GPIO_PORTE | GPIO_PF | 19) | ||
396 | #define PE20_PF_SDHC1_D2 (GPIO_PORTE | GPIO_PF | 20) | ||
397 | #define PE21_PF_SDHC1_D3 (GPIO_PORTE | GPIO_PF | 21) | ||
383 | #define PE21_AF_CSPI3_SS (GPIO_PORTE | GPIO_OUT | GPIO_AF | 21) | 398 | #define PE21_AF_CSPI3_SS (GPIO_PORTE | GPIO_OUT | GPIO_AF | 21) |
399 | #define PE22_PF_SDHC1_CMD (GPIO_PORTE | GPIO_PF | 22) | ||
384 | #define PE22_AF_CSPI3_MOSI (GPIO_PORTE | GPIO_OUT | GPIO_AF | 22) | 400 | #define PE22_AF_CSPI3_MOSI (GPIO_PORTE | GPIO_OUT | GPIO_AF | 22) |
401 | #define PE22_PF_SDHC1_CLK (GPIO_PORTE | GPIO_PF | 23) | ||
385 | #define PE23_AF_CSPI3_SCLK (GPIO_PORTE | GPIO_OUT | GPIO_AF | 23) | 402 | #define PE23_AF_CSPI3_SCLK (GPIO_PORTE | GPIO_OUT | GPIO_AF | 23) |
403 | #define PE24_PF_USBOTG_CLK (GPIO_PORTE | GPIO_OUT | GPIO_PF | 24) | ||
404 | #define PE25_PF_USBOTG_DATA7 (GPIO_PORTE | GPIO_OUT | GPIO_PF | 25) | ||
386 | #endif | 405 | #endif |
387 | 406 | ||
388 | /* decode irq number to use with IMR(x), ISR(x) and friends */ | 407 | /* decode irq number to use with IMR(x), ISR(x) and friends */ |
389 | #define IRQ_TO_REG(irq) ((irq - MXC_MAX_INT_LINES) >> 5) | 408 | #define IRQ_TO_REG(irq) ((irq - MXC_INTERNAL_IRQS) >> 5) |
390 | 409 | ||
391 | #define IRQ_GPIOA(x) (MXC_MAX_INT_LINES + x) | 410 | #define IRQ_GPIOA(x) (MXC_GPIO_IRQ_START + x) |
392 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) | 411 | #define IRQ_GPIOB(x) (IRQ_GPIOA(32) + x) |
393 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) | 412 | #define IRQ_GPIOC(x) (IRQ_GPIOB(32) + x) |
394 | #define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x) | 413 | #define IRQ_GPIOD(x) (IRQ_GPIOC(32) + x) |
414 | #define IRQ_GPIOE(x) (IRQ_GPIOD(32) + x) | ||
395 | 415 | ||
396 | #endif /* _MXC_GPIO_MX1_MX2_H */ | 416 | #endif /* _MXC_GPIO_MX1_MX2_H */ |
diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h index c9f39c2fb8c6..c9198c0aea18 100644 --- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h +++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h | |||
@@ -141,7 +141,7 @@ void mxc_iomux_set_gpr(enum iomux_gp_func, bool); | |||
141 | ((iomux_pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT) | 141 | ((iomux_pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT) |
142 | #define IOMUX_TO_IRQ(iomux_pin) \ | 142 | #define IOMUX_TO_IRQ(iomux_pin) \ |
143 | (((iomux_pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT) + \ | 143 | (((iomux_pin & IOMUX_GPIONUM_MASK) >> IOMUX_GPIONUM_SHIFT) + \ |
144 | MXC_GPIO_INT_BASE) | 144 | MXC_GPIO_IRQ_START) |
145 | 145 | ||
146 | /* | 146 | /* |
147 | * This enumeration is constructed based on the Section | 147 | * This enumeration is constructed based on the Section |
@@ -491,6 +491,14 @@ enum iomux_pins { | |||
491 | #define MX31_PIN_RTS1__RTS1 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_FUNC) | 491 | #define MX31_PIN_RTS1__RTS1 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_FUNC) |
492 | #define MX31_PIN_TXD1__TXD1 IOMUX_MODE(MX31_PIN_TXD1, IOMUX_CONFIG_FUNC) | 492 | #define MX31_PIN_TXD1__TXD1 IOMUX_MODE(MX31_PIN_TXD1, IOMUX_CONFIG_FUNC) |
493 | #define MX31_PIN_RXD1__RXD1 IOMUX_MODE(MX31_PIN_RXD1, IOMUX_CONFIG_FUNC) | 493 | #define MX31_PIN_RXD1__RXD1 IOMUX_MODE(MX31_PIN_RXD1, IOMUX_CONFIG_FUNC) |
494 | #define MX31_PIN_CTS2__CTS2 IOMUX_MODE(MX31_PIN_CTS2, IOMUX_CONFIG_FUNC) | ||
495 | #define MX31_PIN_RTS2__RTS2 IOMUX_MODE(MX31_PIN_RTS2, IOMUX_CONFIG_FUNC) | ||
496 | #define MX31_PIN_TXD2__TXD2 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_FUNC) | ||
497 | #define MX31_PIN_RXD2__RXD2 IOMUX_MODE(MX31_PIN_RXD2, IOMUX_CONFIG_FUNC) | ||
498 | #define MX31_PIN_PC_RST__CTS5 IOMUX_MODE(MX31_PIN_PC_RST, IOMUX_CONFIG_ALT2) | ||
499 | #define MX31_PIN_PC_VS2__RTS5 IOMUX_MODE(MX31_PIN_PC_VS2, IOMUX_CONFIG_ALT2) | ||
500 | #define MX31_PIN_PC_BVD2__TXD5 IOMUX_MODE(MX31_PIN_PC_BVD2, IOMUX_CONFIG_ALT2) | ||
501 | #define MX31_PIN_PC_BVD1__RXD5 IOMUX_MODE(MX31_PIN_PC_BVD1, IOMUX_CONFIG_ALT2) | ||
494 | #define MX31_PIN_CSPI1_MOSI__MOSI IOMUX_MODE(MX31_PIN_CSPI1_MOSI, IOMUX_CONFIG_FUNC) | 502 | #define MX31_PIN_CSPI1_MOSI__MOSI IOMUX_MODE(MX31_PIN_CSPI1_MOSI, IOMUX_CONFIG_FUNC) |
495 | #define MX31_PIN_CSPI1_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI1_MISO, IOMUX_CONFIG_FUNC) | 503 | #define MX31_PIN_CSPI1_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI1_MISO, IOMUX_CONFIG_FUNC) |
496 | #define MX31_PIN_CSPI1_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI1_SCLK, IOMUX_CONFIG_FUNC) | 504 | #define MX31_PIN_CSPI1_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI1_SCLK, IOMUX_CONFIG_FUNC) |
@@ -509,6 +517,15 @@ enum iomux_pins { | |||
509 | #define MX31_PIN_CSPI3_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI3_MISO, IOMUX_CONFIG_FUNC) | 517 | #define MX31_PIN_CSPI3_MISO__MISO IOMUX_MODE(MX31_PIN_CSPI3_MISO, IOMUX_CONFIG_FUNC) |
510 | #define MX31_PIN_CSPI3_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI3_SCLK, IOMUX_CONFIG_FUNC) | 518 | #define MX31_PIN_CSPI3_SCLK__SCLK IOMUX_MODE(MX31_PIN_CSPI3_SCLK, IOMUX_CONFIG_FUNC) |
511 | #define MX31_PIN_CSPI3_SPI_RDY__SPI_RDY IOMUX_MODE(MX31_PIN_CSPI3_SPI_RDY, IOMUX_CONFIG_FUNC) | 519 | #define MX31_PIN_CSPI3_SPI_RDY__SPI_RDY IOMUX_MODE(MX31_PIN_CSPI3_SPI_RDY, IOMUX_CONFIG_FUNC) |
520 | #define MX31_PIN_BATT_LINE__OWIRE IOMUX_MODE(MX31_PIN_BATT_LINE, IOMUX_CONFIG_FUNC) | ||
521 | #define MX31_PIN_CS4__CS4 IOMUX_MODE(MX31_PIN_CS4, IOMUX_CONFIG_FUNC) | ||
522 | #define MX31_PIN_SD1_DATA3__SD1_DATA3 IOMUX_MODE(MX31_PIN_SD1_DATA3, IOMUX_CONFIG_FUNC) | ||
523 | #define MX31_PIN_SD1_DATA2__SD1_DATA2 IOMUX_MODE(MX31_PIN_SD1_DATA2, IOMUX_CONFIG_FUNC) | ||
524 | #define MX31_PIN_SD1_DATA1__SD1_DATA1 IOMUX_MODE(MX31_PIN_SD1_DATA1, IOMUX_CONFIG_FUNC) | ||
525 | #define MX31_PIN_SD1_DATA0__SD1_DATA0 IOMUX_MODE(MX31_PIN_SD1_DATA0, IOMUX_CONFIG_FUNC) | ||
526 | #define MX31_PIN_SD1_CLK__SD1_CLK IOMUX_MODE(MX31_PIN_SD1_CLK, IOMUX_CONFIG_FUNC) | ||
527 | #define MX31_PIN_SD1_CMD__SD1_CMD IOMUX_MODE(MX31_PIN_SD1_CMD, IOMUX_CONFIG_FUNC) | ||
528 | |||
512 | /*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0 | 529 | /*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0 |
513 | * cspi1_ss1*/ | 530 | * cspi1_ss1*/ |
514 | 531 | ||
diff --git a/arch/arm/plat-mxc/include/mach/irqs.h b/arch/arm/plat-mxc/include/mach/irqs.h index b55bba35e18a..e06d3cb0ee11 100644 --- a/arch/arm/plat-mxc/include/mach/irqs.h +++ b/arch/arm/plat-mxc/include/mach/irqs.h | |||
@@ -11,7 +11,37 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_IRQS_H__ | 11 | #ifndef __ASM_ARCH_MXC_IRQS_H__ |
12 | #define __ASM_ARCH_MXC_IRQS_H__ | 12 | #define __ASM_ARCH_MXC_IRQS_H__ |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | /* |
15 | * So far all i.MX SoCs have 64 internal interrupts | ||
16 | */ | ||
17 | #define MXC_INTERNAL_IRQS 64 | ||
18 | |||
19 | #define MXC_GPIO_IRQ_START MXC_INTERNAL_IRQS | ||
20 | |||
21 | #if defined CONFIG_ARCH_MX1 | ||
22 | #define MXC_GPIO_IRQS (32 * 4) | ||
23 | #elif defined CONFIG_ARCH_MX2 | ||
24 | #define MXC_GPIO_IRQS (32 * 6) | ||
25 | #elif defined CONFIG_ARCH_MX3 | ||
26 | #define MXC_GPIO_IRQS (32 * 3) | ||
27 | #endif | ||
28 | |||
29 | /* | ||
30 | * The next 16 interrupts are for board specific purposes. Since | ||
31 | * the kernel can only run on one machine at a time, we can re-use | ||
32 | * these. If you need more, increase MXC_BOARD_IRQS, but keep it | ||
33 | * within sensible limits. | ||
34 | */ | ||
35 | #define MXC_BOARD_IRQ_START (MXC_INTERNAL_IRQS + MXC_GPIO_IRQS) | ||
36 | #define MXC_BOARD_IRQS 16 | ||
37 | |||
38 | #define NR_IRQS (MXC_BOARD_IRQ_START + MXC_BOARD_IRQS) | ||
39 | |||
15 | extern void imx_irq_set_priority(unsigned char irq, unsigned char prio); | 40 | extern void imx_irq_set_priority(unsigned char irq, unsigned char prio); |
16 | 41 | ||
42 | /* all normal IRQs can be FIQs */ | ||
43 | #define FIQ_START 0 | ||
44 | /* switch betwean IRQ and FIQ */ | ||
45 | extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type); | ||
46 | |||
17 | #endif /* __ASM_ARCH_MXC_IRQS_H__ */ | 47 | #endif /* __ASM_ARCH_MXC_IRQS_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/memory.h b/arch/arm/plat-mxc/include/mach/memory.h index d7a8d3ebed57..0b808399097f 100644 --- a/arch/arm/plat-mxc/include/mach/memory.h +++ b/arch/arm/plat-mxc/include/mach/memory.h | |||
@@ -11,19 +11,12 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_MEMORY_H__ | 11 | #ifndef __ASM_ARCH_MXC_MEMORY_H__ |
12 | #define __ASM_ARCH_MXC_MEMORY_H__ | 12 | #define __ASM_ARCH_MXC_MEMORY_H__ |
13 | 13 | ||
14 | #include <mach/hardware.h> | 14 | #if defined CONFIG_ARCH_MX1 |
15 | 15 | #define PHYS_OFFSET UL(0x08000000) | |
16 | /* | 16 | #elif defined CONFIG_ARCH_MX2 |
17 | * Virtual view <-> DMA view memory address translations | 17 | #define PHYS_OFFSET UL(0xA0000000) |
18 | * This macro is used to translate the virtual address to an address | 18 | #elif defined CONFIG_ARCH_MX3 |
19 | * suitable to be passed to set_dma_addr() | 19 | #define PHYS_OFFSET UL(0x80000000) |
20 | */ | 20 | #endif |
21 | #define __virt_to_bus(a) __virt_to_phys(a) | ||
22 | |||
23 | /* | ||
24 | * Used to convert an address for DMA operations to an address that the | ||
25 | * kernel can use. | ||
26 | */ | ||
27 | #define __bus_to_virt(a) __phys_to_virt(a) | ||
28 | 21 | ||
29 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ | 22 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mtd-xip.h b/arch/arm/plat-mxc/include/mach/mtd-xip.h new file mode 100644 index 000000000000..1ab1bba5688d --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mtd-xip.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * MTD primitives for XIP support. Architecture specific functions | ||
3 | * | ||
4 | * Do not include this file directly. It's included from linux/mtd/xip.h | ||
5 | * | ||
6 | * Copyright (C) 2008 Darius Augulis <augulis.darius@gmail.com>, Teltonika, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #include <mach/mxc_timer.h> | ||
15 | |||
16 | #ifndef __ARCH_IMX_MTD_XIP_H__ | ||
17 | #define __ARCH_IMX_MTD_XIP_H__ | ||
18 | |||
19 | #ifdef CONFIG_ARCH_MX1 | ||
20 | /* AITC registers */ | ||
21 | #define AITC_BASE IO_ADDRESS(AVIC_BASE_ADDR) | ||
22 | #define NIPNDH (AITC_BASE + 0x58) | ||
23 | #define NIPNDL (AITC_BASE + 0x5C) | ||
24 | #define INTENABLEH (AITC_BASE + 0x10) | ||
25 | #define INTENABLEL (AITC_BASE + 0x14) | ||
26 | /* MTD macros */ | ||
27 | #define xip_irqpending() ((__raw_readl(INTENABLEH) & __raw_readl(NIPNDH)) \ | ||
28 | || (__raw_readl(INTENABLEL) & __raw_readl(NIPNDL))) | ||
29 | #define xip_currtime() (__raw_readl(TIMER_BASE + MXC_TCN)) | ||
30 | #define xip_elapsed_since(x) (signed)((__raw_readl(TIMER_BASE + MXC_TCN) - (x)) / 96) | ||
31 | #define xip_cpu_idle() asm volatile ("mcr p15, 0, %0, c7, c0, 4" :: "r" (0)) | ||
32 | #endif /* CONFIG_ARCH_MX1 */ | ||
33 | |||
34 | #endif /* __ARCH_IMX_MTD_XIP_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/plat-mxc/include/mach/mx1.h new file mode 100644 index 000000000000..b92e02324d8e --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mx1.h | |||
@@ -0,0 +1,186 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1997,1998 Russell King | ||
3 | * Copyright (C) 1999 ARM Limited | ||
4 | * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. | ||
5 | * Copyright (c) 2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_MXC_MX1_H__ | ||
13 | #define __ASM_ARCH_MXC_MX1_H__ | ||
14 | |||
15 | #ifndef __ASM_ARCH_MXC_HARDWARE_H__ | ||
16 | #error "Do not include directly." | ||
17 | #endif | ||
18 | |||
19 | #include <mach/vmalloc.h> | ||
20 | |||
21 | /* | ||
22 | * Memory map | ||
23 | */ | ||
24 | #define IMX_IO_PHYS 0x00200000 | ||
25 | #define IMX_IO_SIZE 0x00100000 | ||
26 | #define IMX_IO_BASE VMALLOC_END | ||
27 | |||
28 | #define IMX_CS0_PHYS 0x10000000 | ||
29 | #define IMX_CS0_SIZE 0x02000000 | ||
30 | |||
31 | #define IMX_CS1_PHYS 0x12000000 | ||
32 | #define IMX_CS1_SIZE 0x01000000 | ||
33 | |||
34 | #define IMX_CS2_PHYS 0x13000000 | ||
35 | #define IMX_CS2_SIZE 0x01000000 | ||
36 | |||
37 | #define IMX_CS3_PHYS 0x14000000 | ||
38 | #define IMX_CS3_SIZE 0x01000000 | ||
39 | |||
40 | #define IMX_CS4_PHYS 0x15000000 | ||
41 | #define IMX_CS4_SIZE 0x01000000 | ||
42 | |||
43 | #define IMX_CS5_PHYS 0x16000000 | ||
44 | #define IMX_CS5_SIZE 0x01000000 | ||
45 | |||
46 | /* | ||
47 | * Register BASEs, based on OFFSETs | ||
48 | */ | ||
49 | #define AIPI1_BASE_ADDR (0x00000 + IMX_IO_PHYS) | ||
50 | #define WDT_BASE_ADDR (0x01000 + IMX_IO_PHYS) | ||
51 | #define TIM1_BASE_ADDR (0x02000 + IMX_IO_PHYS) | ||
52 | #define TIM2_BASE_ADDR (0x03000 + IMX_IO_PHYS) | ||
53 | #define RTC_BASE_ADDR (0x04000 + IMX_IO_PHYS) | ||
54 | #define LCDC_BASE_ADDR (0x05000 + IMX_IO_PHYS) | ||
55 | #define UART1_BASE_ADDR (0x06000 + IMX_IO_PHYS) | ||
56 | #define UART2_BASE_ADDR (0x07000 + IMX_IO_PHYS) | ||
57 | #define PWM_BASE_ADDR (0x08000 + IMX_IO_PHYS) | ||
58 | #define DMA_BASE_ADDR (0x09000 + IMX_IO_PHYS) | ||
59 | #define AIPI2_BASE_ADDR (0x10000 + IMX_IO_PHYS) | ||
60 | #define SIM_BASE_ADDR (0x11000 + IMX_IO_PHYS) | ||
61 | #define USBD_BASE_ADDR (0x12000 + IMX_IO_PHYS) | ||
62 | #define SPI1_BASE_ADDR (0x13000 + IMX_IO_PHYS) | ||
63 | #define MMC_BASE_ADDR (0x14000 + IMX_IO_PHYS) | ||
64 | #define ASP_BASE_ADDR (0x15000 + IMX_IO_PHYS) | ||
65 | #define BTA_BASE_ADDR (0x16000 + IMX_IO_PHYS) | ||
66 | #define I2C_BASE_ADDR (0x17000 + IMX_IO_PHYS) | ||
67 | #define SSI_BASE_ADDR (0x18000 + IMX_IO_PHYS) | ||
68 | #define SPI2_BASE_ADDR (0x19000 + IMX_IO_PHYS) | ||
69 | #define MSHC_BASE_ADDR (0x1A000 + IMX_IO_PHYS) | ||
70 | #define CCM_BASE_ADDR (0x1B000 + IMX_IO_PHYS) | ||
71 | #define SCM_BASE_ADDR (0x1B804 + IMX_IO_PHYS) | ||
72 | #define GPIO_BASE_ADDR (0x1C000 + IMX_IO_PHYS) | ||
73 | #define EIM_BASE_ADDR (0x20000 + IMX_IO_PHYS) | ||
74 | #define SDRAMC_BASE_ADDR (0x21000 + IMX_IO_PHYS) | ||
75 | #define MMA_BASE_ADDR (0x22000 + IMX_IO_PHYS) | ||
76 | #define AVIC_BASE_ADDR (0x23000 + IMX_IO_PHYS) | ||
77 | #define CSI_BASE_ADDR (0x24000 + IMX_IO_PHYS) | ||
78 | |||
79 | /* macro to get at IO space when running virtually */ | ||
80 | #define IO_ADDRESS(x) ((x) - IMX_IO_PHYS + IMX_IO_BASE) | ||
81 | |||
82 | /* define macros needed for entry-macro.S */ | ||
83 | #define AVIC_IO_ADDRESS(x) IO_ADDRESS(x) | ||
84 | |||
85 | /* fixed interrput numbers */ | ||
86 | #define INT_SOFTINT 0 | ||
87 | #define CSI_INT 6 | ||
88 | #define DSPA_MAC_INT 7 | ||
89 | #define DSPA_INT 8 | ||
90 | #define COMP_INT 9 | ||
91 | #define MSHC_XINT 10 | ||
92 | #define GPIO_INT_PORTA 11 | ||
93 | #define GPIO_INT_PORTB 12 | ||
94 | #define GPIO_INT_PORTC 13 | ||
95 | #define LCDC_INT 14 | ||
96 | #define SIM_INT 15 | ||
97 | #define SIM_DATA_INT 16 | ||
98 | #define RTC_INT 17 | ||
99 | #define RTC_SAMINT 18 | ||
100 | #define UART2_MINT_PFERR 19 | ||
101 | #define UART2_MINT_RTS 20 | ||
102 | #define UART2_MINT_DTR 21 | ||
103 | #define UART2_MINT_UARTC 22 | ||
104 | #define UART2_MINT_TX 23 | ||
105 | #define UART2_MINT_RX 24 | ||
106 | #define UART1_MINT_PFERR 25 | ||
107 | #define UART1_MINT_RTS 26 | ||
108 | #define UART1_MINT_DTR 27 | ||
109 | #define UART1_MINT_UARTC 28 | ||
110 | #define UART1_MINT_TX 29 | ||
111 | #define UART1_MINT_RX 30 | ||
112 | #define VOICE_DAC_INT 31 | ||
113 | #define VOICE_ADC_INT 32 | ||
114 | #define PEN_DATA_INT 33 | ||
115 | #define PWM_INT 34 | ||
116 | #define SDHC_INT 35 | ||
117 | #define I2C_INT 39 | ||
118 | #define CSPI_INT 41 | ||
119 | #define SSI_TX_INT 42 | ||
120 | #define SSI_TX_ERR_INT 43 | ||
121 | #define SSI_RX_INT 44 | ||
122 | #define SSI_RX_ERR_INT 45 | ||
123 | #define TOUCH_INT 46 | ||
124 | #define USBD_INT0 47 | ||
125 | #define USBD_INT1 48 | ||
126 | #define USBD_INT2 49 | ||
127 | #define USBD_INT3 50 | ||
128 | #define USBD_INT4 51 | ||
129 | #define USBD_INT5 52 | ||
130 | #define USBD_INT6 53 | ||
131 | #define BTSYS_INT 55 | ||
132 | #define BTTIM_INT 56 | ||
133 | #define BTWUI_INT 57 | ||
134 | #define TIM2_INT 58 | ||
135 | #define TIM1_INT 59 | ||
136 | #define DMA_ERR 60 | ||
137 | #define DMA_INT 61 | ||
138 | #define GPIO_INT_PORTD 62 | ||
139 | #define WDT_INT 63 | ||
140 | |||
141 | /* gpio and gpio based interrupt handling */ | ||
142 | #define GPIO_DR 0x1C | ||
143 | #define GPIO_GDIR 0x00 | ||
144 | #define GPIO_PSR 0x24 | ||
145 | #define GPIO_ICR1 0x28 | ||
146 | #define GPIO_ICR2 0x2C | ||
147 | #define GPIO_IMR 0x30 | ||
148 | #define GPIO_ISR 0x34 | ||
149 | #define GPIO_INT_LOW_LEV 0x3 | ||
150 | #define GPIO_INT_HIGH_LEV 0x2 | ||
151 | #define GPIO_INT_RISE_EDGE 0x0 | ||
152 | #define GPIO_INT_FALL_EDGE 0x1 | ||
153 | #define GPIO_INT_NONE 0x4 | ||
154 | |||
155 | /* DMA */ | ||
156 | #define DMA_REQ_UART3_T 2 | ||
157 | #define DMA_REQ_UART3_R 3 | ||
158 | #define DMA_REQ_SSI2_T 4 | ||
159 | #define DMA_REQ_SSI2_R 5 | ||
160 | #define DMA_REQ_CSI_STAT 6 | ||
161 | #define DMA_REQ_CSI_R 7 | ||
162 | #define DMA_REQ_MSHC 8 | ||
163 | #define DMA_REQ_DSPA_DCT_DOUT 9 | ||
164 | #define DMA_REQ_DSPA_DCT_DIN 10 | ||
165 | #define DMA_REQ_DSPA_MAC 11 | ||
166 | #define DMA_REQ_EXT 12 | ||
167 | #define DMA_REQ_SDHC 13 | ||
168 | #define DMA_REQ_SPI1_R 14 | ||
169 | #define DMA_REQ_SPI1_T 15 | ||
170 | #define DMA_REQ_SSI_T 16 | ||
171 | #define DMA_REQ_SSI_R 17 | ||
172 | #define DMA_REQ_ASP_DAC 18 | ||
173 | #define DMA_REQ_ASP_ADC 19 | ||
174 | #define DMA_REQ_USP_EP(x) (20 + (x)) | ||
175 | #define DMA_REQ_SPI2_R 26 | ||
176 | #define DMA_REQ_SPI2_T 27 | ||
177 | #define DMA_REQ_UART2_T 28 | ||
178 | #define DMA_REQ_UART2_R 29 | ||
179 | #define DMA_REQ_UART1_T 30 | ||
180 | #define DMA_REQ_UART1_R 31 | ||
181 | |||
182 | /* mandatory for CONFIG_LL_DEBUG */ | ||
183 | #define MXC_LL_UART_PADDR UART1_BASE_ADDR | ||
184 | #define MXC_LL_UART_VADDR IO_ADDRESS(UART1_BASE_ADDR) | ||
185 | |||
186 | #endif /* __ASM_ARCH_MXC_MX1_H__ */ | ||
diff --git a/arch/arm/plat-mxc/include/mach/mx27.h b/arch/arm/plat-mxc/include/mach/mx27.h index a86db64744a1..0313be720552 100644 --- a/arch/arm/plat-mxc/include/mach/mx27.h +++ b/arch/arm/plat-mxc/include/mach/mx27.h | |||
@@ -72,7 +72,8 @@ | |||
72 | /* for mx27*/ | 72 | /* for mx27*/ |
73 | #define OTG_BASE_ADDR USBOTG_BASE_ADDR | 73 | #define OTG_BASE_ADDR USBOTG_BASE_ADDR |
74 | #define SAHARA_BASE_ADDR (AIPI_BASE_ADDR + 0x25000) | 74 | #define SAHARA_BASE_ADDR (AIPI_BASE_ADDR + 0x25000) |
75 | #define EMMA_BASE_ADDR (AIPI_BASE_ADDR + 0x26400) | 75 | #define EMMA_PP_BASE_ADDR (AIPI_BASE_ADDR + 0x26000) |
76 | #define EMMA_PRP_BASE_ADDR (AIPI_BASE_ADDR + 0x26400) | ||
76 | #define CCM_BASE_ADDR (AIPI_BASE_ADDR + 0x27000) | 77 | #define CCM_BASE_ADDR (AIPI_BASE_ADDR + 0x27000) |
77 | #define SYSCTRL_BASE_ADDR (AIPI_BASE_ADDR + 0x27800) | 78 | #define SYSCTRL_BASE_ADDR (AIPI_BASE_ADDR + 0x27800) |
78 | #define IIM_BASE_ADDR (AIPI_BASE_ADDR + 0x28000) | 79 | #define IIM_BASE_ADDR (AIPI_BASE_ADDR + 0x28000) |
@@ -288,16 +289,4 @@ extern int mx27_revision(void); | |||
288 | /* this CPU supports up to 192 GPIOs (don't forget the baseboard!) */ | 289 | /* this CPU supports up to 192 GPIOs (don't forget the baseboard!) */ |
289 | #define ARCH_NR_GPIOS (192 + 16) | 290 | #define ARCH_NR_GPIOS (192 + 16) |
290 | 291 | ||
291 | /* OS clock tick rate */ | ||
292 | #define CLOCK_TICK_RATE 13300000 | ||
293 | |||
294 | /* Start of RAM */ | ||
295 | #define PHYS_OFFSET SDRAM_BASE_ADDR | ||
296 | |||
297 | /* max interrupt lines count */ | ||
298 | #define NR_IRQS 256 | ||
299 | |||
300 | /* count of internal interrupt sources */ | ||
301 | #define MXC_MAX_INT_LINES 64 | ||
302 | |||
303 | #endif /* __ASM_ARCH_MXC_MX27_H__ */ | 292 | #endif /* __ASM_ARCH_MXC_MX27_H__ */ |
diff --git a/arch/arm/plat-mxc/include/mach/mx31.h b/arch/arm/plat-mxc/include/mach/mx31.h index 0536f8917bc0..de026654b00e 100644 --- a/arch/arm/plat-mxc/include/mach/mx31.h +++ b/arch/arm/plat-mxc/include/mach/mx31.h | |||
@@ -15,11 +15,6 @@ | |||
15 | #error "Do not include directly." | 15 | #error "Do not include directly." |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | /*! | ||
19 | * defines the hardware clock tick rate | ||
20 | */ | ||
21 | #define CLOCK_TICK_RATE 16625000 | ||
22 | |||
23 | /* | 18 | /* |
24 | * MX31 memory map: | 19 | * MX31 memory map: |
25 | * | 20 | * |
@@ -244,9 +239,6 @@ | |||
244 | #define PCMCIA_IO_ADDRESS(x) \ | 239 | #define PCMCIA_IO_ADDRESS(x) \ |
245 | (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT) | 240 | (((x) - X_MEMC_BASE_ADDR) + X_MEMC_BASE_ADDR_VIRT) |
246 | 241 | ||
247 | /* Start of physical RAM - On many MX31 platforms, this is the first SDRAM bank (CSD0) */ | ||
248 | #define PHYS_OFFSET CSD0_BASE_ADDR | ||
249 | |||
250 | /* | 242 | /* |
251 | * Interrupt numbers | 243 | * Interrupt numbers |
252 | */ | 244 | */ |
@@ -315,23 +307,6 @@ | |||
315 | #define MXC_INT_EXT_WDOG 62 | 307 | #define MXC_INT_EXT_WDOG 62 |
316 | #define MXC_INT_EXT_TV 63 | 308 | #define MXC_INT_EXT_TV 63 |
317 | 309 | ||
318 | #define MXC_MAX_INT_LINES 64 | ||
319 | |||
320 | #define MXC_GPIO_INT_BASE MXC_MAX_INT_LINES | ||
321 | #define MXC_MAX_GPIO_LINES (GPIO_NUM_PIN * GPIO_PORT_NUM) | ||
322 | #define MXC_MAX_VIRTUAL_INTS 16 | ||
323 | |||
324 | #define NR_IRQS (MXC_MAX_INT_LINES + MXC_MAX_GPIO_LINES + MXC_MAX_VIRTUAL_INTS) | ||
325 | |||
326 | /*! | ||
327 | * Number of GPIO port as defined in the IC Spec | ||
328 | */ | ||
329 | #define GPIO_PORT_NUM 3 | ||
330 | /*! | ||
331 | * Number of GPIO pins per port | ||
332 | */ | ||
333 | #define GPIO_NUM_PIN 32 | ||
334 | |||
335 | #define PROD_SIGNATURE 0x1 /* For MX31 */ | 310 | #define PROD_SIGNATURE 0x1 /* For MX31 */ |
336 | 311 | ||
337 | /* silicon revisions specific to i.MX31 */ | 312 | /* silicon revisions specific to i.MX31 */ |
diff --git a/arch/arm/plat-mxc/include/mach/mxc_timer.h b/arch/arm/plat-mxc/include/mach/mxc_timer.h index 130aebfbe168..6c19a134744b 100644 --- a/arch/arm/plat-mxc/include/mach/mxc_timer.h +++ b/arch/arm/plat-mxc/include/mach/mxc_timer.h | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
27 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
28 | 28 | ||
29 | #ifdef CONFIG_ARCH_IMX | 29 | #ifdef CONFIG_ARCH_MX1 |
30 | #define TIMER_BASE IO_ADDRESS(TIM1_BASE_ADDR) | 30 | #define TIMER_BASE IO_ADDRESS(TIM1_BASE_ADDR) |
31 | #define TIMER_INTERRUPT TIM1_INT | 31 | #define TIMER_INTERRUPT TIM1_INT |
32 | 32 | ||
@@ -65,7 +65,7 @@ static void gpt_irq_acknowledge(void) | |||
65 | { | 65 | { |
66 | __raw_writel(0, TIMER_BASE + MXC_TSTAT); | 66 | __raw_writel(0, TIMER_BASE + MXC_TSTAT); |
67 | } | 67 | } |
68 | #endif /* CONFIG_ARCH_IMX */ | 68 | #endif /* CONFIG_ARCH_MX1 */ |
69 | 69 | ||
70 | #ifdef CONFIG_ARCH_MX2 | 70 | #ifdef CONFIG_ARCH_MX2 |
71 | #define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR) | 71 | #define TIMER_BASE IO_ADDRESS(GPT1_BASE_ADDR) |
diff --git a/arch/arm/plat-mxc/include/mach/timex.h b/arch/arm/plat-mxc/include/mach/timex.h index 0b0af0253e91..07b4a73c9d2f 100644 --- a/arch/arm/plat-mxc/include/mach/timex.h +++ b/arch/arm/plat-mxc/include/mach/timex.h | |||
@@ -20,6 +20,12 @@ | |||
20 | #ifndef __ASM_ARCH_MXC_TIMEX_H__ | 20 | #ifndef __ASM_ARCH_MXC_TIMEX_H__ |
21 | #define __ASM_ARCH_MXC_TIMEX_H__ | 21 | #define __ASM_ARCH_MXC_TIMEX_H__ |
22 | 22 | ||
23 | #include <mach/hardware.h> /* for CLOCK_TICK_RATE */ | 23 | #if defined CONFIG_ARCH_MX1 |
24 | #define CLOCK_TICK_RATE 16000000 | ||
25 | #elif defined CONFIG_ARCH_MX2 | ||
26 | #define CLOCK_TICK_RATE 13300000 | ||
27 | #elif defined CONFIG_ARCH_MX3 | ||
28 | #define CLOCK_TICK_RATE 16625000 | ||
29 | #endif | ||
24 | 30 | ||
25 | #endif /* __ASM_ARCH_MXC_TIMEX_H__ */ | 31 | #endif /* __ASM_ARCH_MXC_TIMEX_H__ */ |
diff --git a/arch/arm/plat-mxc/iomux-mx1-mx2.c b/arch/arm/plat-mxc/iomux-mx1-mx2.c index d97387aa9a42..df6f18395686 100644 --- a/arch/arm/plat-mxc/iomux-mx1-mx2.c +++ b/arch/arm/plat-mxc/iomux-mx1-mx2.c | |||
@@ -110,12 +110,13 @@ void mxc_gpio_mode(int gpio_mode) | |||
110 | EXPORT_SYMBOL(mxc_gpio_mode); | 110 | EXPORT_SYMBOL(mxc_gpio_mode); |
111 | 111 | ||
112 | int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | 112 | int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, |
113 | int alloc_mode, const char *label) | 113 | const char *label) |
114 | { | 114 | { |
115 | const int *p = pin_list; | 115 | const int *p = pin_list; |
116 | int i; | 116 | int i; |
117 | unsigned gpio; | 117 | unsigned gpio; |
118 | unsigned mode; | 118 | unsigned mode; |
119 | int ret = -EINVAL; | ||
119 | 120 | ||
120 | for (i = 0; i < count; i++) { | 121 | for (i = 0; i < count; i++) { |
121 | gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); | 122 | gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); |
@@ -124,33 +125,33 @@ int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count, | |||
124 | if (gpio >= (GPIO_PORT_MAX + 1) * 32) | 125 | if (gpio >= (GPIO_PORT_MAX + 1) * 32) |
125 | goto setup_error; | 126 | goto setup_error; |
126 | 127 | ||
127 | if (alloc_mode & MXC_GPIO_ALLOC_MODE_RELEASE) | 128 | ret = gpio_request(gpio, label); |
128 | gpio_free(gpio); | 129 | if (ret) |
129 | else if (!(alloc_mode & MXC_GPIO_ALLOC_MODE_NO_ALLOC)) | 130 | goto setup_error; |
130 | if (gpio_request(gpio, label) | ||
131 | && !(alloc_mode & MXC_GPIO_ALLOC_MODE_TRY_ALLOC)) | ||
132 | goto setup_error; | ||
133 | 131 | ||
134 | if (!(alloc_mode & (MXC_GPIO_ALLOC_MODE_ALLOC_ONLY | | 132 | mxc_gpio_mode(gpio | mode); |
135 | MXC_GPIO_ALLOC_MODE_RELEASE))) | ||
136 | mxc_gpio_mode(gpio | mode); | ||
137 | 133 | ||
138 | p++; | 134 | p++; |
139 | } | 135 | } |
140 | return 0; | 136 | return 0; |
141 | 137 | ||
142 | setup_error: | 138 | setup_error: |
143 | if (alloc_mode & (MXC_GPIO_ALLOC_MODE_NO_ALLOC | | 139 | mxc_gpio_release_multiple_pins(pin_list, i); |
144 | MXC_GPIO_ALLOC_MODE_TRY_ALLOC)) | 140 | return ret; |
145 | return -EINVAL; | 141 | } |
142 | EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins); | ||
146 | 143 | ||
147 | while (p != pin_list) { | 144 | void mxc_gpio_release_multiple_pins(const int *pin_list, int count) |
148 | p--; | 145 | { |
149 | gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); | 146 | const int *p = pin_list; |
147 | int i; | ||
148 | |||
149 | for (i = 0; i < count; i++) { | ||
150 | unsigned gpio = *p & (GPIO_PIN_MASK | GPIO_PORT_MASK); | ||
150 | gpio_free(gpio); | 151 | gpio_free(gpio); |
152 | p++; | ||
151 | } | 153 | } |
152 | 154 | ||
153 | return -EINVAL; | ||
154 | } | 155 | } |
155 | EXPORT_SYMBOL(mxc_gpio_setup_multiple_pins); | 156 | EXPORT_SYMBOL(mxc_gpio_release_multiple_pins); |
156 | 157 | ||
diff --git a/arch/arm/plat-mxc/irq.c b/arch/arm/plat-mxc/irq.c index d862c9e5f8db..6e7578a3514b 100644 --- a/arch/arm/plat-mxc/irq.c +++ b/arch/arm/plat-mxc/irq.c | |||
@@ -17,9 +17,12 @@ | |||
17 | * MA 02110-1301, USA. | 17 | * MA 02110-1301, USA. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/module.h> | ||
20 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
22 | #include <mach/common.h> | 23 | #include <mach/common.h> |
24 | #include <asm/mach/irq.h> | ||
25 | #include <mach/hardware.h> | ||
23 | 26 | ||
24 | #define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR) | 27 | #define AVIC_BASE IO_ADDRESS(AVIC_BASE_ADDR) |
25 | #define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */ | 28 | #define AVIC_INTCNTL (AVIC_BASE + 0x00) /* int control reg */ |
@@ -65,6 +68,28 @@ void imx_irq_set_priority(unsigned char irq, unsigned char prio) | |||
65 | EXPORT_SYMBOL(imx_irq_set_priority); | 68 | EXPORT_SYMBOL(imx_irq_set_priority); |
66 | #endif | 69 | #endif |
67 | 70 | ||
71 | #ifdef CONFIG_FIQ | ||
72 | int mxc_set_irq_fiq(unsigned int irq, unsigned int type) | ||
73 | { | ||
74 | unsigned int irqt; | ||
75 | |||
76 | if (irq >= MXC_INTERNAL_IRQS) | ||
77 | return -EINVAL; | ||
78 | |||
79 | if (irq < MXC_INTERNAL_IRQS / 2) { | ||
80 | irqt = __raw_readl(AVIC_INTTYPEL) & ~(1 << irq); | ||
81 | __raw_writel(irqt | (!!type << irq), AVIC_INTTYPEL); | ||
82 | } else { | ||
83 | irq -= MXC_INTERNAL_IRQS / 2; | ||
84 | irqt = __raw_readl(AVIC_INTTYPEH) & ~(1 << irq); | ||
85 | __raw_writel(irqt | (!!type << irq), AVIC_INTTYPEH); | ||
86 | } | ||
87 | |||
88 | return 0; | ||
89 | } | ||
90 | EXPORT_SYMBOL(mxc_set_irq_fiq); | ||
91 | #endif /* CONFIG_FIQ */ | ||
92 | |||
68 | /* Disable interrupt number "irq" in the AVIC */ | 93 | /* Disable interrupt number "irq" in the AVIC */ |
69 | static void mxc_mask_irq(unsigned int irq) | 94 | static void mxc_mask_irq(unsigned int irq) |
70 | { | 95 | { |
@@ -91,7 +116,6 @@ static struct irq_chip mxc_avic_chip = { | |||
91 | void __init mxc_init_irq(void) | 116 | void __init mxc_init_irq(void) |
92 | { | 117 | { |
93 | int i; | 118 | int i; |
94 | u32 reg; | ||
95 | 119 | ||
96 | /* put the AVIC into the reset value with | 120 | /* put the AVIC into the reset value with |
97 | * all interrupts disabled | 121 | * all interrupts disabled |
@@ -106,7 +130,7 @@ void __init mxc_init_irq(void) | |||
106 | /* all IRQ no FIQ */ | 130 | /* all IRQ no FIQ */ |
107 | __raw_writel(0, AVIC_INTTYPEH); | 131 | __raw_writel(0, AVIC_INTTYPEH); |
108 | __raw_writel(0, AVIC_INTTYPEL); | 132 | __raw_writel(0, AVIC_INTTYPEL); |
109 | for (i = 0; i < MXC_MAX_INT_LINES; i++) { | 133 | for (i = 0; i < MXC_INTERNAL_IRQS; i++) { |
110 | set_irq_chip(i, &mxc_avic_chip); | 134 | set_irq_chip(i, &mxc_avic_chip); |
111 | set_irq_handler(i, handle_level_irq); | 135 | set_irq_handler(i, handle_level_irq); |
112 | set_irq_flags(i, IRQF_VALID); | 136 | set_irq_flags(i, IRQF_VALID); |
@@ -119,5 +143,10 @@ void __init mxc_init_irq(void) | |||
119 | /* init architectures chained interrupt handler */ | 143 | /* init architectures chained interrupt handler */ |
120 | mxc_register_gpios(); | 144 | mxc_register_gpios(); |
121 | 145 | ||
146 | #ifdef CONFIG_FIQ | ||
147 | /* Initialize FIQ */ | ||
148 | init_FIQ(); | ||
149 | #endif | ||
150 | |||
122 | printk(KERN_INFO "MXC IRQ initialized\n"); | 151 | printk(KERN_INFO "MXC IRQ initialized\n"); |
123 | } | 152 | } |
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig index a94f0c44ebc8..46d3b0b9ce69 100644 --- a/arch/arm/plat-omap/Kconfig +++ b/arch/arm/plat-omap/Kconfig | |||
@@ -14,9 +14,11 @@ config ARCH_OMAP1 | |||
14 | 14 | ||
15 | config ARCH_OMAP2 | 15 | config ARCH_OMAP2 |
16 | bool "TI OMAP2" | 16 | bool "TI OMAP2" |
17 | select CPU_V6 | ||
17 | 18 | ||
18 | config ARCH_OMAP3 | 19 | config ARCH_OMAP3 |
19 | bool "TI OMAP3" | 20 | bool "TI OMAP3" |
21 | select CPU_V7 | ||
20 | 22 | ||
21 | endchoice | 23 | endchoice |
22 | 24 | ||
diff --git a/arch/arm/plat-omap/debug-devices.c b/arch/arm/plat-omap/debug-devices.c index e31154b15d9e..f6684832ca8f 100644 --- a/arch/arm/plat-omap/debug-devices.c +++ b/arch/arm/plat-omap/debug-devices.c | |||
@@ -69,15 +69,15 @@ int __init debug_card_init(u32 addr, unsigned gpio) | |||
69 | smc91x_resources[0].start = addr + 0x300; | 69 | smc91x_resources[0].start = addr + 0x300; |
70 | smc91x_resources[0].end = addr + 0x30f; | 70 | smc91x_resources[0].end = addr + 0x30f; |
71 | 71 | ||
72 | smc91x_resources[1].start = OMAP_GPIO_IRQ(gpio); | 72 | smc91x_resources[1].start = gpio_to_irq(gpio); |
73 | smc91x_resources[1].end = OMAP_GPIO_IRQ(gpio); | 73 | smc91x_resources[1].end = gpio_to_irq(gpio); |
74 | 74 | ||
75 | status = omap_request_gpio(gpio); | 75 | status = gpio_request(gpio, "SMC91x irq"); |
76 | if (status < 0) { | 76 | if (status < 0) { |
77 | printk(KERN_ERR "GPIO%d unavailable for smc91x IRQ\n", gpio); | 77 | printk(KERN_ERR "GPIO%d unavailable for smc91x IRQ\n", gpio); |
78 | return status; | 78 | return status; |
79 | } | 79 | } |
80 | omap_set_gpio_direction(gpio, 1); | 80 | gpio_direction_input(gpio); |
81 | 81 | ||
82 | led_resources[0].start = addr; | 82 | led_resources[0].start = addr; |
83 | led_resources[0].end = addr + SZ_4K - 1; | 83 | led_resources[0].end = addr + SZ_4K - 1; |
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c index 2f4c0cabfd34..be4eefda4767 100644 --- a/arch/arm/plat-omap/debug-leds.c +++ b/arch/arm/plat-omap/debug-leds.c | |||
@@ -83,8 +83,8 @@ static void h2p2_dbg_leds_event(led_event_t evt) | |||
83 | /* all leds off during suspend or shutdown */ | 83 | /* all leds off during suspend or shutdown */ |
84 | 84 | ||
85 | if (!(machine_is_omap_perseus2() || machine_is_omap_h4())) { | 85 | if (!(machine_is_omap_perseus2() || machine_is_omap_h4())) { |
86 | omap_set_gpio_dataout(GPIO_TIMER, 0); | 86 | gpio_set_value(GPIO_TIMER, 0); |
87 | omap_set_gpio_dataout(GPIO_IDLE, 0); | 87 | gpio_set_value(GPIO_IDLE, 0); |
88 | } | 88 | } |
89 | 89 | ||
90 | __raw_writew(~0, &fpga->leds); | 90 | __raw_writew(~0, &fpga->leds); |
@@ -107,7 +107,7 @@ static void h2p2_dbg_leds_event(led_event_t evt) | |||
107 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) | 107 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) |
108 | hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER; | 108 | hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER; |
109 | else { | 109 | else { |
110 | omap_set_gpio_dataout(GPIO_TIMER, | 110 | gpio_set_value(GPIO_TIMER, |
111 | led_state & LED_TIMER_ON); | 111 | led_state & LED_TIMER_ON); |
112 | goto done; | 112 | goto done; |
113 | } | 113 | } |
@@ -121,7 +121,7 @@ static void h2p2_dbg_leds_event(led_event_t evt) | |||
121 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) | 121 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) |
122 | hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE; | 122 | hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE; |
123 | else { | 123 | else { |
124 | omap_set_gpio_dataout(GPIO_IDLE, 1); | 124 | gpio_set_value(GPIO_IDLE, 1); |
125 | goto done; | 125 | goto done; |
126 | } | 126 | } |
127 | 127 | ||
@@ -131,7 +131,7 @@ static void h2p2_dbg_leds_event(led_event_t evt) | |||
131 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) | 131 | if (machine_is_omap_perseus2() || machine_is_omap_h4()) |
132 | hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE; | 132 | hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE; |
133 | else { | 133 | else { |
134 | omap_set_gpio_dataout(GPIO_IDLE, 0); | 134 | gpio_set_value(GPIO_IDLE, 0); |
135 | goto done; | 135 | goto done; |
136 | } | 136 | } |
137 | 137 | ||
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 0cb2b22388e9..ac15c23fd5da 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -192,202 +192,48 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, | |||
192 | 192 | ||
193 | /*-------------------------------------------------------------------------*/ | 193 | /*-------------------------------------------------------------------------*/ |
194 | 194 | ||
195 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ | 195 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ |
196 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | 196 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) |
197 | 197 | ||
198 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) | 198 | #define OMAP_MMC_NR_RES 2 |
199 | #define OMAP_MMC1_BASE 0x4809c000 | ||
200 | #define OMAP_MMC1_END (OMAP_MMC1_BASE + 0x1fc) | ||
201 | #define OMAP_MMC1_INT INT_24XX_MMC_IRQ | ||
202 | 199 | ||
203 | #define OMAP_MMC2_BASE 0x480b4000 | 200 | /* |
204 | #define OMAP_MMC2_END (OMAP_MMC2_BASE + 0x1fc) | 201 | * Register MMC devices. Called from mach-omap1 and mach-omap2 device init. |
205 | #define OMAP_MMC2_INT INT_24XX_MMC2_IRQ | 202 | */ |
206 | 203 | int __init omap_mmc_add(int id, unsigned long base, unsigned long size, | |
207 | #else | 204 | unsigned int irq, struct omap_mmc_platform_data *data) |
208 | |||
209 | #define OMAP_MMC1_BASE 0xfffb7800 | ||
210 | #define OMAP_MMC1_END (OMAP_MMC1_BASE + 0x7f) | ||
211 | #define OMAP_MMC1_INT INT_MMC | ||
212 | |||
213 | #define OMAP_MMC2_BASE 0xfffb7c00 /* omap16xx only */ | ||
214 | #define OMAP_MMC2_END (OMAP_MMC2_BASE + 0x7f) | ||
215 | #define OMAP_MMC2_INT INT_1610_MMC2 | ||
216 | |||
217 | #endif | ||
218 | |||
219 | static struct omap_mmc_platform_data mmc1_data; | ||
220 | |||
221 | static u64 mmc1_dmamask = 0xffffffff; | ||
222 | |||
223 | static struct resource mmc1_resources[] = { | ||
224 | { | ||
225 | .start = OMAP_MMC1_BASE, | ||
226 | .end = OMAP_MMC1_END, | ||
227 | .flags = IORESOURCE_MEM, | ||
228 | }, | ||
229 | { | ||
230 | .start = OMAP_MMC1_INT, | ||
231 | .flags = IORESOURCE_IRQ, | ||
232 | }, | ||
233 | }; | ||
234 | |||
235 | static struct platform_device mmc_omap_device1 = { | ||
236 | .name = "mmci-omap", | ||
237 | .id = 1, | ||
238 | .dev = { | ||
239 | .dma_mask = &mmc1_dmamask, | ||
240 | .platform_data = &mmc1_data, | ||
241 | }, | ||
242 | .num_resources = ARRAY_SIZE(mmc1_resources), | ||
243 | .resource = mmc1_resources, | ||
244 | }; | ||
245 | |||
246 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \ | ||
247 | defined(CONFIG_ARCH_OMAP34XX) | ||
248 | |||
249 | static struct omap_mmc_platform_data mmc2_data; | ||
250 | |||
251 | static u64 mmc2_dmamask = 0xffffffff; | ||
252 | |||
253 | static struct resource mmc2_resources[] = { | ||
254 | { | ||
255 | .start = OMAP_MMC2_BASE, | ||
256 | .end = OMAP_MMC2_END, | ||
257 | .flags = IORESOURCE_MEM, | ||
258 | }, | ||
259 | { | ||
260 | .start = OMAP_MMC2_INT, | ||
261 | .flags = IORESOURCE_IRQ, | ||
262 | }, | ||
263 | }; | ||
264 | |||
265 | static struct platform_device mmc_omap_device2 = { | ||
266 | .name = "mmci-omap", | ||
267 | .id = 2, | ||
268 | .dev = { | ||
269 | .dma_mask = &mmc2_dmamask, | ||
270 | .platform_data = &mmc2_data, | ||
271 | }, | ||
272 | .num_resources = ARRAY_SIZE(mmc2_resources), | ||
273 | .resource = mmc2_resources, | ||
274 | }; | ||
275 | #endif | ||
276 | |||
277 | static inline void omap_init_mmc_conf(const struct omap_mmc_config *mmc_conf) | ||
278 | { | ||
279 | if (cpu_is_omap2430() || cpu_is_omap34xx()) | ||
280 | return; | ||
281 | |||
282 | if (mmc_conf->mmc[0].enabled) { | ||
283 | if (cpu_is_omap24xx()) { | ||
284 | omap_cfg_reg(H18_24XX_MMC_CMD); | ||
285 | omap_cfg_reg(H15_24XX_MMC_CLKI); | ||
286 | omap_cfg_reg(G19_24XX_MMC_CLKO); | ||
287 | omap_cfg_reg(F20_24XX_MMC_DAT0); | ||
288 | omap_cfg_reg(F19_24XX_MMC_DAT_DIR0); | ||
289 | omap_cfg_reg(G18_24XX_MMC_CMD_DIR); | ||
290 | } else { | ||
291 | omap_cfg_reg(MMC_CMD); | ||
292 | omap_cfg_reg(MMC_CLK); | ||
293 | omap_cfg_reg(MMC_DAT0); | ||
294 | if (cpu_is_omap1710()) { | ||
295 | omap_cfg_reg(M15_1710_MMC_CLKI); | ||
296 | omap_cfg_reg(P19_1710_MMC_CMDDIR); | ||
297 | omap_cfg_reg(P20_1710_MMC_DATDIR0); | ||
298 | } | ||
299 | } | ||
300 | if (mmc_conf->mmc[0].wire4) { | ||
301 | if (cpu_is_omap24xx()) { | ||
302 | omap_cfg_reg(H14_24XX_MMC_DAT1); | ||
303 | omap_cfg_reg(E19_24XX_MMC_DAT2); | ||
304 | omap_cfg_reg(D19_24XX_MMC_DAT3); | ||
305 | omap_cfg_reg(E20_24XX_MMC_DAT_DIR1); | ||
306 | omap_cfg_reg(F18_24XX_MMC_DAT_DIR2); | ||
307 | omap_cfg_reg(E18_24XX_MMC_DAT_DIR3); | ||
308 | } else { | ||
309 | omap_cfg_reg(MMC_DAT1); | ||
310 | /* NOTE: DAT2 can be on W10 (here) or M15 */ | ||
311 | if (!mmc_conf->mmc[0].nomux) | ||
312 | omap_cfg_reg(MMC_DAT2); | ||
313 | omap_cfg_reg(MMC_DAT3); | ||
314 | } | ||
315 | } | ||
316 | } | ||
317 | |||
318 | #ifdef CONFIG_ARCH_OMAP16XX | ||
319 | /* block 2 is on newer chips, and has many pinout options */ | ||
320 | if (mmc_conf->mmc[1].enabled) { | ||
321 | if (!mmc_conf->mmc[1].nomux) { | ||
322 | omap_cfg_reg(Y8_1610_MMC2_CMD); | ||
323 | omap_cfg_reg(Y10_1610_MMC2_CLK); | ||
324 | omap_cfg_reg(R18_1610_MMC2_CLKIN); | ||
325 | omap_cfg_reg(W8_1610_MMC2_DAT0); | ||
326 | if (mmc_conf->mmc[1].wire4) { | ||
327 | omap_cfg_reg(V8_1610_MMC2_DAT1); | ||
328 | omap_cfg_reg(W15_1610_MMC2_DAT2); | ||
329 | omap_cfg_reg(R10_1610_MMC2_DAT3); | ||
330 | } | ||
331 | |||
332 | /* These are needed for the level shifter */ | ||
333 | omap_cfg_reg(V9_1610_MMC2_CMDDIR); | ||
334 | omap_cfg_reg(V5_1610_MMC2_DATDIR0); | ||
335 | omap_cfg_reg(W19_1610_MMC2_DATDIR1); | ||
336 | } | ||
337 | |||
338 | /* Feedback clock must be set on OMAP-1710 MMC2 */ | ||
339 | if (cpu_is_omap1710()) | ||
340 | omap_writel(omap_readl(MOD_CONF_CTRL_1) | (1 << 24), | ||
341 | MOD_CONF_CTRL_1); | ||
342 | } | ||
343 | #endif | ||
344 | } | ||
345 | |||
346 | static void __init omap_init_mmc(void) | ||
347 | { | 205 | { |
348 | const struct omap_mmc_config *mmc_conf; | 206 | struct platform_device *pdev; |
349 | 207 | struct resource res[OMAP_MMC_NR_RES]; | |
350 | /* NOTE: assumes MMC was never (wrongly) enabled */ | 208 | int ret; |
351 | mmc_conf = omap_get_config(OMAP_TAG_MMC, struct omap_mmc_config); | 209 | |
352 | if (!mmc_conf) | 210 | pdev = platform_device_alloc("mmci-omap", id); |
353 | return; | 211 | if (!pdev) |
354 | 212 | return -ENOMEM; | |
355 | omap_init_mmc_conf(mmc_conf); | 213 | |
356 | 214 | memset(res, 0, OMAP_MMC_NR_RES * sizeof(struct resource)); | |
357 | if (mmc_conf->mmc[0].enabled) { | 215 | res[0].start = base; |
358 | mmc1_data.conf = mmc_conf->mmc[0]; | 216 | res[0].end = base + size - 1; |
359 | (void) platform_device_register(&mmc_omap_device1); | 217 | res[0].flags = IORESOURCE_MEM; |
360 | } | 218 | res[1].start = res[1].end = irq; |
361 | 219 | res[1].flags = IORESOURCE_IRQ; | |
362 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \ | 220 | |
363 | defined(CONFIG_ARCH_OMAP34XX) | 221 | ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res)); |
364 | if (mmc_conf->mmc[1].enabled) { | 222 | if (ret == 0) |
365 | mmc2_data.conf = mmc_conf->mmc[1]; | 223 | ret = platform_device_add_data(pdev, data, sizeof(*data)); |
366 | (void) platform_device_register(&mmc_omap_device2); | 224 | if (ret) |
367 | } | 225 | goto fail; |
368 | #endif | 226 | |
369 | } | 227 | ret = platform_device_add(pdev); |
228 | if (ret) | ||
229 | goto fail; | ||
230 | return 0; | ||
370 | 231 | ||
371 | void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info) | 232 | fail: |
372 | { | 233 | platform_device_put(pdev); |
373 | switch (host) { | 234 | return ret; |
374 | case 1: | ||
375 | mmc1_data = *info; | ||
376 | break; | ||
377 | #if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \ | ||
378 | defined(CONFIG_ARCH_OMAP34XX) | ||
379 | case 2: | ||
380 | mmc2_data = *info; | ||
381 | break; | ||
382 | #endif | ||
383 | default: | ||
384 | BUG(); | ||
385 | } | ||
386 | } | 235 | } |
387 | 236 | ||
388 | #else | ||
389 | static inline void omap_init_mmc(void) {} | ||
390 | void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info) {} | ||
391 | #endif | 237 | #endif |
392 | 238 | ||
393 | /*-------------------------------------------------------------------------*/ | 239 | /*-------------------------------------------------------------------------*/ |
@@ -532,7 +378,6 @@ static int __init omap_init_devices(void) | |||
532 | */ | 378 | */ |
533 | omap_init_dsp(); | 379 | omap_init_dsp(); |
534 | omap_init_kp(); | 380 | omap_init_kp(); |
535 | omap_init_mmc(); | ||
536 | omap_init_uwire(); | 381 | omap_init_uwire(); |
537 | omap_init_wdt(); | 382 | omap_init_wdt(); |
538 | omap_init_rng(); | 383 | omap_init_rng(); |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 50f8b4ad9a09..692d2b495af3 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <mach/hardware.h> | 31 | #include <mach/hardware.h> |
32 | #include <asm/dma.h> | 32 | #include <mach/dma.h> |
33 | 33 | ||
34 | #include <mach/tc.h> | 34 | #include <mach/tc.h> |
35 | 35 | ||
@@ -1848,9 +1848,22 @@ static int omap2_dma_handle_ch(int ch) | |||
1848 | printk(KERN_INFO | 1848 | printk(KERN_INFO |
1849 | "DMA synchronization event drop occurred with device " | 1849 | "DMA synchronization event drop occurred with device " |
1850 | "%d\n", dma_chan[ch].dev_id); | 1850 | "%d\n", dma_chan[ch].dev_id); |
1851 | if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) | 1851 | if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) { |
1852 | printk(KERN_INFO "DMA transaction error with device %d\n", | 1852 | printk(KERN_INFO "DMA transaction error with device %d\n", |
1853 | dma_chan[ch].dev_id); | 1853 | dma_chan[ch].dev_id); |
1854 | if (cpu_class_is_omap2()) { | ||
1855 | /* Errata: sDMA Channel is not disabled | ||
1856 | * after a transaction error. So we explicitely | ||
1857 | * disable the channel | ||
1858 | */ | ||
1859 | u32 ccr; | ||
1860 | |||
1861 | ccr = dma_read(CCR(ch)); | ||
1862 | ccr &= ~OMAP_DMA_CCR_EN; | ||
1863 | dma_write(ccr, CCR(ch)); | ||
1864 | dma_chan[ch].flags &= ~OMAP_DMA_ACTIVE; | ||
1865 | } | ||
1866 | } | ||
1854 | if (unlikely(status & OMAP2_DMA_SECURE_ERR_IRQ)) | 1867 | if (unlikely(status & OMAP2_DMA_SECURE_ERR_IRQ)) |
1855 | printk(KERN_INFO "DMA secure error with device %d\n", | 1868 | printk(KERN_INFO "DMA secure error with device %d\n", |
1856 | dma_chan[ch].dev_id); | 1869 | dma_chan[ch].dev_id); |
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 963c31cd1541..e4f0ce04ba92 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -539,10 +539,6 @@ void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, | |||
539 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 539 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
540 | omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); | 540 | omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); |
541 | 541 | ||
542 | /* REVISIT: hw feature, ttgr overtaking tldr? */ | ||
543 | while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff))) | ||
544 | cpu_relax(); | ||
545 | |||
546 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); | 542 | omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); |
547 | } | 543 | } |
548 | 544 | ||
@@ -553,14 +549,15 @@ void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload, | |||
553 | u32 l; | 549 | u32 l; |
554 | 550 | ||
555 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | 551 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); |
556 | if (autoreload) | 552 | if (autoreload) { |
557 | l |= OMAP_TIMER_CTRL_AR; | 553 | l |= OMAP_TIMER_CTRL_AR; |
558 | else | 554 | omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); |
555 | } else { | ||
559 | l &= ~OMAP_TIMER_CTRL_AR; | 556 | l &= ~OMAP_TIMER_CTRL_AR; |
557 | } | ||
560 | l |= OMAP_TIMER_CTRL_ST; | 558 | l |= OMAP_TIMER_CTRL_ST; |
561 | 559 | ||
562 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load); | 560 | omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load); |
563 | omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); | ||
564 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 561 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
565 | } | 562 | } |
566 | 563 | ||
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 424049d83fbe..07b6968a7d16 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -152,6 +152,7 @@ struct gpio_bank { | |||
152 | u32 level_mask; | 152 | u32 level_mask; |
153 | spinlock_t lock; | 153 | spinlock_t lock; |
154 | struct gpio_chip chip; | 154 | struct gpio_chip chip; |
155 | struct clk *dbck; | ||
155 | }; | 156 | }; |
156 | 157 | ||
157 | #define METHOD_MPUIO 0 | 158 | #define METHOD_MPUIO 0 |
@@ -244,6 +245,8 @@ static inline struct gpio_bank *get_gpio_bank(int gpio) | |||
244 | return &gpio_bank[gpio >> 5]; | 245 | return &gpio_bank[gpio >> 5]; |
245 | if (cpu_is_omap34xx()) | 246 | if (cpu_is_omap34xx()) |
246 | return &gpio_bank[gpio >> 5]; | 247 | return &gpio_bank[gpio >> 5]; |
248 | BUG(); | ||
249 | return NULL; | ||
247 | } | 250 | } |
248 | 251 | ||
249 | static inline int get_gpio_index(int gpio) | 252 | static inline int get_gpio_index(int gpio) |
@@ -332,19 +335,6 @@ static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input) | |||
332 | __raw_writel(l, reg); | 335 | __raw_writel(l, reg); |
333 | } | 336 | } |
334 | 337 | ||
335 | void omap_set_gpio_direction(int gpio, int is_input) | ||
336 | { | ||
337 | struct gpio_bank *bank; | ||
338 | unsigned long flags; | ||
339 | |||
340 | if (check_gpio(gpio) < 0) | ||
341 | return; | ||
342 | bank = get_gpio_bank(gpio); | ||
343 | spin_lock_irqsave(&bank->lock, flags); | ||
344 | _set_gpio_direction(bank, get_gpio_index(gpio), is_input); | ||
345 | spin_unlock_irqrestore(&bank->lock, flags); | ||
346 | } | ||
347 | |||
348 | static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) | 338 | static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) |
349 | { | 339 | { |
350 | void __iomem *reg = bank->base; | 340 | void __iomem *reg = bank->base; |
@@ -406,20 +396,7 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) | |||
406 | __raw_writel(l, reg); | 396 | __raw_writel(l, reg); |
407 | } | 397 | } |
408 | 398 | ||
409 | void omap_set_gpio_dataout(int gpio, int enable) | 399 | static int __omap_get_gpio_datain(int gpio) |
410 | { | ||
411 | struct gpio_bank *bank; | ||
412 | unsigned long flags; | ||
413 | |||
414 | if (check_gpio(gpio) < 0) | ||
415 | return; | ||
416 | bank = get_gpio_bank(gpio); | ||
417 | spin_lock_irqsave(&bank->lock, flags); | ||
418 | _set_gpio_dataout(bank, get_gpio_index(gpio), enable); | ||
419 | spin_unlock_irqrestore(&bank->lock, flags); | ||
420 | } | ||
421 | |||
422 | int omap_get_gpio_datain(int gpio) | ||
423 | { | 400 | { |
424 | struct gpio_bank *bank; | 401 | struct gpio_bank *bank; |
425 | void __iomem *reg; | 402 | void __iomem *reg; |
@@ -473,6 +450,7 @@ void omap_set_gpio_debounce(int gpio, int enable) | |||
473 | { | 450 | { |
474 | struct gpio_bank *bank; | 451 | struct gpio_bank *bank; |
475 | void __iomem *reg; | 452 | void __iomem *reg; |
453 | unsigned long flags; | ||
476 | u32 val, l = 1 << get_gpio_index(gpio); | 454 | u32 val, l = 1 << get_gpio_index(gpio); |
477 | 455 | ||
478 | if (cpu_class_is_omap1()) | 456 | if (cpu_class_is_omap1()) |
@@ -480,16 +458,28 @@ void omap_set_gpio_debounce(int gpio, int enable) | |||
480 | 458 | ||
481 | bank = get_gpio_bank(gpio); | 459 | bank = get_gpio_bank(gpio); |
482 | reg = bank->base; | 460 | reg = bank->base; |
483 | |||
484 | reg += OMAP24XX_GPIO_DEBOUNCE_EN; | 461 | reg += OMAP24XX_GPIO_DEBOUNCE_EN; |
462 | |||
463 | spin_lock_irqsave(&bank->lock, flags); | ||
485 | val = __raw_readl(reg); | 464 | val = __raw_readl(reg); |
486 | 465 | ||
487 | if (enable) | 466 | if (enable && !(val & l)) |
488 | val |= l; | 467 | val |= l; |
489 | else | 468 | else if (!enable && (val & l)) |
490 | val &= ~l; | 469 | val &= ~l; |
470 | else | ||
471 | goto done; | ||
472 | |||
473 | if (cpu_is_omap34xx()) { | ||
474 | if (enable) | ||
475 | clk_enable(bank->dbck); | ||
476 | else | ||
477 | clk_disable(bank->dbck); | ||
478 | } | ||
491 | 479 | ||
492 | __raw_writel(val, reg); | 480 | __raw_writel(val, reg); |
481 | done: | ||
482 | spin_unlock_irqrestore(&bank->lock, flags); | ||
493 | } | 483 | } |
494 | EXPORT_SYMBOL(omap_set_gpio_debounce); | 484 | EXPORT_SYMBOL(omap_set_gpio_debounce); |
495 | 485 | ||
@@ -906,26 +896,17 @@ static int gpio_wake_enable(unsigned int irq, unsigned int enable) | |||
906 | return retval; | 896 | return retval; |
907 | } | 897 | } |
908 | 898 | ||
909 | int omap_request_gpio(int gpio) | 899 | static int omap_gpio_request(struct gpio_chip *chip, unsigned offset) |
910 | { | 900 | { |
911 | struct gpio_bank *bank; | 901 | struct gpio_bank *bank = container_of(chip, struct gpio_bank, chip); |
912 | unsigned long flags; | 902 | unsigned long flags; |
913 | int status; | ||
914 | |||
915 | if (check_gpio(gpio) < 0) | ||
916 | return -EINVAL; | ||
917 | 903 | ||
918 | status = gpio_request(gpio, NULL); | ||
919 | if (status < 0) | ||
920 | return status; | ||
921 | |||
922 | bank = get_gpio_bank(gpio); | ||
923 | spin_lock_irqsave(&bank->lock, flags); | 904 | spin_lock_irqsave(&bank->lock, flags); |
924 | 905 | ||
925 | /* Set trigger to none. You need to enable the desired trigger with | 906 | /* Set trigger to none. You need to enable the desired trigger with |
926 | * request_irq() or set_irq_type(). | 907 | * request_irq() or set_irq_type(). |
927 | */ | 908 | */ |
928 | _set_gpio_triggering(bank, get_gpio_index(gpio), IRQ_TYPE_NONE); | 909 | _set_gpio_triggering(bank, offset, IRQ_TYPE_NONE); |
929 | 910 | ||
930 | #ifdef CONFIG_ARCH_OMAP15XX | 911 | #ifdef CONFIG_ARCH_OMAP15XX |
931 | if (bank->method == METHOD_GPIO_1510) { | 912 | if (bank->method == METHOD_GPIO_1510) { |
@@ -933,7 +914,7 @@ int omap_request_gpio(int gpio) | |||
933 | 914 | ||
934 | /* Claim the pin for MPU */ | 915 | /* Claim the pin for MPU */ |
935 | reg = bank->base + OMAP1510_GPIO_PIN_CONTROL; | 916 | reg = bank->base + OMAP1510_GPIO_PIN_CONTROL; |
936 | __raw_writel(__raw_readl(reg) | (1 << get_gpio_index(gpio)), reg); | 917 | __raw_writel(__raw_readl(reg) | (1 << offset), reg); |
937 | } | 918 | } |
938 | #endif | 919 | #endif |
939 | spin_unlock_irqrestore(&bank->lock, flags); | 920 | spin_unlock_irqrestore(&bank->lock, flags); |
@@ -941,39 +922,28 @@ int omap_request_gpio(int gpio) | |||
941 | return 0; | 922 | return 0; |
942 | } | 923 | } |
943 | 924 | ||
944 | void omap_free_gpio(int gpio) | 925 | static void omap_gpio_free(struct gpio_chip *chip, unsigned offset) |
945 | { | 926 | { |
946 | struct gpio_bank *bank; | 927 | struct gpio_bank *bank = container_of(chip, struct gpio_bank, chip); |
947 | unsigned long flags; | 928 | unsigned long flags; |
948 | 929 | ||
949 | if (check_gpio(gpio) < 0) | ||
950 | return; | ||
951 | bank = get_gpio_bank(gpio); | ||
952 | spin_lock_irqsave(&bank->lock, flags); | 930 | spin_lock_irqsave(&bank->lock, flags); |
953 | if (unlikely(!gpiochip_is_requested(&bank->chip, | ||
954 | get_gpio_index(gpio)))) { | ||
955 | spin_unlock_irqrestore(&bank->lock, flags); | ||
956 | printk(KERN_ERR "omap-gpio: GPIO %d wasn't reserved!\n", gpio); | ||
957 | dump_stack(); | ||
958 | return; | ||
959 | } | ||
960 | #ifdef CONFIG_ARCH_OMAP16XX | 931 | #ifdef CONFIG_ARCH_OMAP16XX |
961 | if (bank->method == METHOD_GPIO_1610) { | 932 | if (bank->method == METHOD_GPIO_1610) { |
962 | /* Disable wake-up during idle for dynamic tick */ | 933 | /* Disable wake-up during idle for dynamic tick */ |
963 | void __iomem *reg = bank->base + OMAP1610_GPIO_CLEAR_WAKEUPENA; | 934 | void __iomem *reg = bank->base + OMAP1610_GPIO_CLEAR_WAKEUPENA; |
964 | __raw_writel(1 << get_gpio_index(gpio), reg); | 935 | __raw_writel(1 << offset, reg); |
965 | } | 936 | } |
966 | #endif | 937 | #endif |
967 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) | 938 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) |
968 | if (bank->method == METHOD_GPIO_24XX) { | 939 | if (bank->method == METHOD_GPIO_24XX) { |
969 | /* Disable wake-up during idle for dynamic tick */ | 940 | /* Disable wake-up during idle for dynamic tick */ |
970 | void __iomem *reg = bank->base + OMAP24XX_GPIO_CLEARWKUENA; | 941 | void __iomem *reg = bank->base + OMAP24XX_GPIO_CLEARWKUENA; |
971 | __raw_writel(1 << get_gpio_index(gpio), reg); | 942 | __raw_writel(1 << offset, reg); |
972 | } | 943 | } |
973 | #endif | 944 | #endif |
974 | _reset_gpio(bank, gpio); | 945 | _reset_gpio(bank, bank->chip.base + offset); |
975 | spin_unlock_irqrestore(&bank->lock, flags); | 946 | spin_unlock_irqrestore(&bank->lock, flags); |
976 | gpio_free(gpio); | ||
977 | } | 947 | } |
978 | 948 | ||
979 | /* | 949 | /* |
@@ -1252,7 +1222,7 @@ static int gpio_input(struct gpio_chip *chip, unsigned offset) | |||
1252 | 1222 | ||
1253 | static int gpio_get(struct gpio_chip *chip, unsigned offset) | 1223 | static int gpio_get(struct gpio_chip *chip, unsigned offset) |
1254 | { | 1224 | { |
1255 | return omap_get_gpio_datain(chip->base + offset); | 1225 | return __omap_get_gpio_datain(chip->base + offset); |
1256 | } | 1226 | } |
1257 | 1227 | ||
1258 | static int gpio_output(struct gpio_chip *chip, unsigned offset, int value) | 1228 | static int gpio_output(struct gpio_chip *chip, unsigned offset, int value) |
@@ -1279,6 +1249,14 @@ static void gpio_set(struct gpio_chip *chip, unsigned offset, int value) | |||
1279 | spin_unlock_irqrestore(&bank->lock, flags); | 1249 | spin_unlock_irqrestore(&bank->lock, flags); |
1280 | } | 1250 | } |
1281 | 1251 | ||
1252 | static int gpio_2irq(struct gpio_chip *chip, unsigned offset) | ||
1253 | { | ||
1254 | struct gpio_bank *bank; | ||
1255 | |||
1256 | bank = container_of(chip, struct gpio_bank, chip); | ||
1257 | return bank->virtual_irq_start + offset; | ||
1258 | } | ||
1259 | |||
1282 | /*---------------------------------------------------------------------*/ | 1260 | /*---------------------------------------------------------------------*/ |
1283 | 1261 | ||
1284 | static int initialized; | 1262 | static int initialized; |
@@ -1296,7 +1274,6 @@ static struct clk * gpio5_fck; | |||
1296 | #endif | 1274 | #endif |
1297 | 1275 | ||
1298 | #if defined(CONFIG_ARCH_OMAP3) | 1276 | #if defined(CONFIG_ARCH_OMAP3) |
1299 | static struct clk *gpio_fclks[OMAP34XX_NR_GPIOS]; | ||
1300 | static struct clk *gpio_iclks[OMAP34XX_NR_GPIOS]; | 1277 | static struct clk *gpio_iclks[OMAP34XX_NR_GPIOS]; |
1301 | #endif | 1278 | #endif |
1302 | 1279 | ||
@@ -1310,9 +1287,7 @@ static int __init _omap_gpio_init(void) | |||
1310 | int i; | 1287 | int i; |
1311 | int gpio = 0; | 1288 | int gpio = 0; |
1312 | struct gpio_bank *bank; | 1289 | struct gpio_bank *bank; |
1313 | #if defined(CONFIG_ARCH_OMAP3) | ||
1314 | char clk_name[11]; | 1290 | char clk_name[11]; |
1315 | #endif | ||
1316 | 1291 | ||
1317 | initialized = 1; | 1292 | initialized = 1; |
1318 | 1293 | ||
@@ -1367,12 +1342,6 @@ static int __init _omap_gpio_init(void) | |||
1367 | printk(KERN_ERR "Could not get %s\n", clk_name); | 1342 | printk(KERN_ERR "Could not get %s\n", clk_name); |
1368 | else | 1343 | else |
1369 | clk_enable(gpio_iclks[i]); | 1344 | clk_enable(gpio_iclks[i]); |
1370 | sprintf(clk_name, "gpio%d_fck", i + 1); | ||
1371 | gpio_fclks[i] = clk_get(NULL, clk_name); | ||
1372 | if (IS_ERR(gpio_fclks[i])) | ||
1373 | printk(KERN_ERR "Could not get %s\n", clk_name); | ||
1374 | else | ||
1375 | clk_enable(gpio_fclks[i]); | ||
1376 | } | 1345 | } |
1377 | } | 1346 | } |
1378 | #endif | 1347 | #endif |
@@ -1479,10 +1448,13 @@ static int __init _omap_gpio_init(void) | |||
1479 | /* REVISIT eventually switch from OMAP-specific gpio structs | 1448 | /* REVISIT eventually switch from OMAP-specific gpio structs |
1480 | * over to the generic ones | 1449 | * over to the generic ones |
1481 | */ | 1450 | */ |
1451 | bank->chip.request = omap_gpio_request; | ||
1452 | bank->chip.free = omap_gpio_free; | ||
1482 | bank->chip.direction_input = gpio_input; | 1453 | bank->chip.direction_input = gpio_input; |
1483 | bank->chip.get = gpio_get; | 1454 | bank->chip.get = gpio_get; |
1484 | bank->chip.direction_output = gpio_output; | 1455 | bank->chip.direction_output = gpio_output; |
1485 | bank->chip.set = gpio_set; | 1456 | bank->chip.set = gpio_set; |
1457 | bank->chip.to_irq = gpio_2irq; | ||
1486 | if (bank_is_mpuio(bank)) { | 1458 | if (bank_is_mpuio(bank)) { |
1487 | bank->chip.label = "mpuio"; | 1459 | bank->chip.label = "mpuio"; |
1488 | #ifdef CONFIG_ARCH_OMAP16XX | 1460 | #ifdef CONFIG_ARCH_OMAP16XX |
@@ -1511,6 +1483,13 @@ static int __init _omap_gpio_init(void) | |||
1511 | } | 1483 | } |
1512 | set_irq_chained_handler(bank->irq, gpio_irq_handler); | 1484 | set_irq_chained_handler(bank->irq, gpio_irq_handler); |
1513 | set_irq_data(bank->irq, bank); | 1485 | set_irq_data(bank->irq, bank); |
1486 | |||
1487 | if (cpu_is_omap34xx()) { | ||
1488 | sprintf(clk_name, "gpio%d_dbck", i + 1); | ||
1489 | bank->dbck = clk_get(NULL, clk_name); | ||
1490 | if (IS_ERR(bank->dbck)) | ||
1491 | printk(KERN_ERR "Could not get %s\n", clk_name); | ||
1492 | } | ||
1514 | } | 1493 | } |
1515 | 1494 | ||
1516 | /* Enable system clock for GPIO module. | 1495 | /* Enable system clock for GPIO module. |
@@ -1739,12 +1718,6 @@ static int __init omap_gpio_sysinit(void) | |||
1739 | return ret; | 1718 | return ret; |
1740 | } | 1719 | } |
1741 | 1720 | ||
1742 | EXPORT_SYMBOL(omap_request_gpio); | ||
1743 | EXPORT_SYMBOL(omap_free_gpio); | ||
1744 | EXPORT_SYMBOL(omap_set_gpio_direction); | ||
1745 | EXPORT_SYMBOL(omap_set_gpio_dataout); | ||
1746 | EXPORT_SYMBOL(omap_get_gpio_datain); | ||
1747 | |||
1748 | arch_initcall(omap_gpio_sysinit); | 1721 | arch_initcall(omap_gpio_sysinit); |
1749 | 1722 | ||
1750 | 1723 | ||
@@ -1801,14 +1774,14 @@ static int dbg_gpio_show(struct seq_file *s, void *unused) | |||
1801 | continue; | 1774 | continue; |
1802 | 1775 | ||
1803 | irq = bank->virtual_irq_start + j; | 1776 | irq = bank->virtual_irq_start + j; |
1804 | value = omap_get_gpio_datain(gpio); | 1777 | value = gpio_get_value(gpio); |
1805 | is_in = gpio_is_input(bank, mask); | 1778 | is_in = gpio_is_input(bank, mask); |
1806 | 1779 | ||
1807 | if (bank_is_mpuio(bank)) | 1780 | if (bank_is_mpuio(bank)) |
1808 | seq_printf(s, "MPUIO %2d ", j); | 1781 | seq_printf(s, "MPUIO %2d ", j); |
1809 | else | 1782 | else |
1810 | seq_printf(s, "GPIO %3d ", gpio); | 1783 | seq_printf(s, "GPIO %3d ", gpio); |
1811 | seq_printf(s, "(%10s): %s %s", | 1784 | seq_printf(s, "(%-20.20s): %s %s", |
1812 | label, | 1785 | label, |
1813 | is_in ? "in " : "out", | 1786 | is_in ? "in " : "out", |
1814 | value ? "hi" : "lo"); | 1787 | value ? "hi" : "lo"); |
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 0e6d147ab6f8..89a6ab0b7db8 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c | |||
@@ -79,26 +79,43 @@ static struct platform_device omap_i2c_devices[] = { | |||
79 | #endif | 79 | #endif |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static void __init omap_i2c_mux_pins(int bus_id) | 82 | #if defined(CONFIG_ARCH_OMAP24XX) |
83 | static const int omap24xx_pins[][2] = { | ||
84 | { M19_24XX_I2C1_SCL, L15_24XX_I2C1_SDA }, | ||
85 | { J15_24XX_I2C2_SCL, H19_24XX_I2C2_SDA }, | ||
86 | }; | ||
87 | #else | ||
88 | static const int omap24xx_pins[][2] = {}; | ||
89 | #endif | ||
90 | #if defined(CONFIG_ARCH_OMAP34XX) | ||
91 | static const int omap34xx_pins[][2] = { | ||
92 | { K21_34XX_I2C1_SCL, J21_34XX_I2C1_SDA}, | ||
93 | { AF15_34XX_I2C2_SCL, AE15_34XX_I2C2_SDA}, | ||
94 | { AF14_34XX_I2C3_SCL, AG14_34XX_I2C3_SDA}, | ||
95 | }; | ||
96 | #else | ||
97 | static const int omap34xx_pins[][2] = {}; | ||
98 | #endif | ||
99 | |||
100 | static void __init omap_i2c_mux_pins(int bus) | ||
83 | { | 101 | { |
84 | /* TODO: Muxing for OMAP3 */ | 102 | int scl, sda; |
85 | switch (bus_id) { | 103 | |
86 | case 1: | 104 | if (cpu_class_is_omap1()) { |
87 | if (cpu_class_is_omap1()) { | 105 | scl = I2C_SCL; |
88 | omap_cfg_reg(I2C_SCL); | 106 | sda = I2C_SDA; |
89 | omap_cfg_reg(I2C_SDA); | 107 | } else if (cpu_is_omap24xx()) { |
90 | } else if (cpu_is_omap24xx()) { | 108 | scl = omap24xx_pins[bus][0]; |
91 | omap_cfg_reg(M19_24XX_I2C1_SCL); | 109 | sda = omap24xx_pins[bus][1]; |
92 | omap_cfg_reg(L15_24XX_I2C1_SDA); | 110 | } else if (cpu_is_omap34xx()) { |
93 | } | 111 | scl = omap34xx_pins[bus][0]; |
94 | break; | 112 | sda = omap34xx_pins[bus][1]; |
95 | case 2: | 113 | } else { |
96 | if (cpu_is_omap24xx()) { | 114 | return; |
97 | omap_cfg_reg(J15_24XX_I2C2_SCL); | ||
98 | omap_cfg_reg(H19_24XX_I2C2_SDA); | ||
99 | } | ||
100 | break; | ||
101 | } | 115 | } |
116 | |||
117 | omap_cfg_reg(sda); | ||
118 | omap_cfg_reg(scl); | ||
102 | } | 119 | } |
103 | 120 | ||
104 | int __init omap_register_i2c_bus(int bus_id, u32 clkrate, | 121 | int __init omap_register_i2c_bus(int bus_id, u32 clkrate, |
@@ -142,6 +159,6 @@ int __init omap_register_i2c_bus(int bus_id, u32 clkrate, | |||
142 | res[1].start = irq; | 159 | res[1].start = irq; |
143 | } | 160 | } |
144 | 161 | ||
145 | omap_i2c_mux_pins(bus_id); | 162 | omap_i2c_mux_pins(bus_id - 1); |
146 | return platform_device_register(pdev); | 163 | return platform_device_register(pdev); |
147 | } | 164 | } |
diff --git a/arch/arm/plat-omap/include/mach/board-apollon.h b/arch/arm/plat-omap/include/mach/board-apollon.h index 731c858cf3fe..61bd5e8f09b1 100644 --- a/arch/arm/plat-omap/include/mach/board-apollon.h +++ b/arch/arm/plat-omap/include/mach/board-apollon.h | |||
@@ -29,12 +29,14 @@ | |||
29 | #ifndef __ASM_ARCH_OMAP_APOLLON_H | 29 | #ifndef __ASM_ARCH_OMAP_APOLLON_H |
30 | #define __ASM_ARCH_OMAP_APOLLON_H | 30 | #define __ASM_ARCH_OMAP_APOLLON_H |
31 | 31 | ||
32 | #include <mach/cpu.h> | ||
33 | |||
32 | extern void apollon_mmc_init(void); | 34 | extern void apollon_mmc_init(void); |
33 | 35 | ||
34 | static inline int apollon_plus(void) | 36 | static inline int apollon_plus(void) |
35 | { | 37 | { |
36 | /* The apollon plus has IDCODE revision 5 */ | 38 | /* The apollon plus has IDCODE revision 5 */ |
37 | return system_rev & 0xc0; | 39 | return omap_rev() & 0xc0; |
38 | } | 40 | } |
39 | 41 | ||
40 | /* Placeholder for APOLLON specific defines */ | 42 | /* Placeholder for APOLLON specific defines */ |
diff --git a/arch/arm/plat-omap/include/mach/board-h2.h b/arch/arm/plat-omap/include/mach/board-h2.h index 2a050e9be65f..15531c8dc0e6 100644 --- a/arch/arm/plat-omap/include/mach/board-h2.h +++ b/arch/arm/plat-omap/include/mach/board-h2.h | |||
@@ -29,13 +29,13 @@ | |||
29 | #ifndef __ASM_ARCH_OMAP_H2_H | 29 | #ifndef __ASM_ARCH_OMAP_H2_H |
30 | #define __ASM_ARCH_OMAP_H2_H | 30 | #define __ASM_ARCH_OMAP_H2_H |
31 | 31 | ||
32 | /* Placeholder for H2 specific defines */ | ||
33 | |||
34 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ | 32 | /* At OMAP1610 Innovator the Ethernet is directly connected to CS1 */ |
35 | #define OMAP1610_ETHR_START 0x04000300 | 33 | #define OMAP1610_ETHR_START 0x04000300 |
36 | 34 | ||
35 | #define H2_TPS_GPIO_BASE (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */) | ||
36 | # define H2_TPS_GPIO_MMC_PWR_EN (H2_TPS_GPIO_BASE + 3) | ||
37 | |||
37 | extern void h2_mmc_init(void); | 38 | extern void h2_mmc_init(void); |
38 | extern void h2_mmc_slot_cover_handler(void *arg, int state); | ||
39 | 39 | ||
40 | #endif /* __ASM_ARCH_OMAP_H2_H */ | 40 | #endif /* __ASM_ARCH_OMAP_H2_H */ |
41 | 41 | ||
diff --git a/arch/arm/plat-omap/include/mach/board-ldp.h b/arch/arm/plat-omap/include/mach/board-ldp.h index 66e2746c04ca..f23399665212 100644 --- a/arch/arm/plat-omap/include/mach/board-ldp.h +++ b/arch/arm/plat-omap/include/mach/board-ldp.h | |||
@@ -32,5 +32,8 @@ | |||
32 | extern void twl4030_bci_battery_init(void); | 32 | extern void twl4030_bci_battery_init(void); |
33 | 33 | ||
34 | #define TWL4030_IRQNUM INT_34XX_SYS_NIRQ | 34 | #define TWL4030_IRQNUM INT_34XX_SYS_NIRQ |
35 | 35 | #define LDP_SMC911X_CS 1 | |
36 | #define LDP_SMC911X_GPIO 152 | ||
37 | #define DEBUG_BASE 0x08000000 | ||
38 | #define OMAP34XX_ETHR_START DEBUG_BASE | ||
36 | #endif /* __ASM_ARCH_OMAP_LDP_H */ | 39 | #endif /* __ASM_ARCH_OMAP_LDP_H */ |
diff --git a/arch/arm/plat-omap/include/mach/board.h b/arch/arm/plat-omap/include/mach/board.h index c23c12ccb353..9466772fc7c8 100644 --- a/arch/arm/plat-omap/include/mach/board.h +++ b/arch/arm/plat-omap/include/mach/board.h | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | /* Different peripheral ids */ | 17 | /* Different peripheral ids */ |
18 | #define OMAP_TAG_CLOCK 0x4f01 | 18 | #define OMAP_TAG_CLOCK 0x4f01 |
19 | #define OMAP_TAG_MMC 0x4f02 | ||
20 | #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 | 19 | #define OMAP_TAG_SERIAL_CONSOLE 0x4f03 |
21 | #define OMAP_TAG_USB 0x4f04 | 20 | #define OMAP_TAG_USB 0x4f04 |
22 | #define OMAP_TAG_LCD 0x4f05 | 21 | #define OMAP_TAG_LCD 0x4f05 |
@@ -35,27 +34,6 @@ struct omap_clock_config { | |||
35 | u8 system_clock_type; | 34 | u8 system_clock_type; |
36 | }; | 35 | }; |
37 | 36 | ||
38 | struct omap_mmc_conf { | ||
39 | unsigned enabled:1; | ||
40 | /* nomux means "standard" muxing is wrong on this board, and that | ||
41 | * board-specific code handled it before common init logic. | ||
42 | */ | ||
43 | unsigned nomux:1; | ||
44 | /* switch pin can be for card detect (default) or card cover */ | ||
45 | unsigned cover:1; | ||
46 | /* 4 wire signaling is optional, and is only used for SD/SDIO */ | ||
47 | unsigned wire4:1; | ||
48 | /* use the internal clock */ | ||
49 | unsigned internal_clock:1; | ||
50 | s16 power_pin; | ||
51 | s16 switch_pin; | ||
52 | s16 wp_pin; | ||
53 | }; | ||
54 | |||
55 | struct omap_mmc_config { | ||
56 | struct omap_mmc_conf mmc[2]; | ||
57 | }; | ||
58 | |||
59 | struct omap_serial_console_config { | 37 | struct omap_serial_console_config { |
60 | u8 console_uart; | 38 | u8 console_uart; |
61 | u32 console_speed; | 39 | u32 console_speed; |
diff --git a/arch/arm/plat-omap/include/mach/control.h b/arch/arm/plat-omap/include/mach/control.h index dc9886760577..269147f3836f 100644 --- a/arch/arm/plat-omap/include/mach/control.h +++ b/arch/arm/plat-omap/include/mach/control.h | |||
@@ -74,6 +74,7 @@ | |||
74 | #define OMAP243X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | 74 | #define OMAP243X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) |
75 | #define OMAP243X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | 75 | #define OMAP243X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) |
76 | #define OMAP243X_CONTROL_IVA2_GEMCFG (OMAP2_CONTROL_GENERAL + 0x0198) | 76 | #define OMAP243X_CONTROL_IVA2_GEMCFG (OMAP2_CONTROL_GENERAL + 0x0198) |
77 | #define OMAP243X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x0230) | ||
77 | 78 | ||
78 | /* 24xx-only CONTROL_GENERAL register offsets */ | 79 | /* 24xx-only CONTROL_GENERAL register offsets */ |
79 | #define OMAP24XX_CONTROL_DEBOBS (OMAP2_CONTROL_GENERAL + 0x0000) | 80 | #define OMAP24XX_CONTROL_DEBOBS (OMAP2_CONTROL_GENERAL + 0x0000) |
@@ -140,6 +141,7 @@ | |||
140 | #define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc) | 141 | #define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc) |
141 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | 142 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) |
142 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | 143 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) |
144 | #define OMAP343X_CONTROL_PBIAS_LITE (OMAP2_CONTROL_GENERAL + 0x02b0) | ||
143 | #define OMAP343X_CONTROL_TEMP_SENSOR (OMAP2_CONTROL_GENERAL + 0x02b4) | 145 | #define OMAP343X_CONTROL_TEMP_SENSOR (OMAP2_CONTROL_GENERAL + 0x02b4) |
144 | 146 | ||
145 | /* | 147 | /* |
@@ -154,11 +156,14 @@ | |||
154 | * and the security mode (secure, non-secure, don't care) | 156 | * and the security mode (secure, non-secure, don't care) |
155 | */ | 157 | */ |
156 | /* CONTROL_DEVCONF0 bits */ | 158 | /* CONTROL_DEVCONF0 bits */ |
159 | #define OMAP2_MMCSDIO1ADPCLKISEL (1 << 24) /* MMC1 loop back clock */ | ||
157 | #define OMAP24XX_USBSTANDBYCTRL (1 << 15) | 160 | #define OMAP24XX_USBSTANDBYCTRL (1 << 15) |
158 | #define OMAP2_MCBSP2_CLKS_MASK (1 << 6) | 161 | #define OMAP2_MCBSP2_CLKS_MASK (1 << 6) |
159 | #define OMAP2_MCBSP1_CLKS_MASK (1 << 2) | 162 | #define OMAP2_MCBSP1_CLKS_MASK (1 << 2) |
160 | 163 | ||
161 | /* CONTROL_DEVCONF1 bits */ | 164 | /* CONTROL_DEVCONF1 bits */ |
165 | #define OMAP243X_MMC1_ACTIVE_OVERWRITE (1 << 31) | ||
166 | #define OMAP2_MMCSDIO2ADPCLKISEL (1 << 6) /* MMC2 loop back clock */ | ||
162 | #define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */ | 167 | #define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */ |
163 | #define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */ | 168 | #define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */ |
164 | #define OMAP2_MCBSP3_CLKS_MASK (1 << 0) /* > 242x */ | 169 | #define OMAP2_MCBSP3_CLKS_MASK (1 << 0) /* > 242x */ |
@@ -172,6 +177,18 @@ | |||
172 | #define OMAP2_SYSBOOT_1_MASK (1 << 1) | 177 | #define OMAP2_SYSBOOT_1_MASK (1 << 1) |
173 | #define OMAP2_SYSBOOT_0_MASK (1 << 0) | 178 | #define OMAP2_SYSBOOT_0_MASK (1 << 0) |
174 | 179 | ||
180 | /* CONTROL_PBIAS_LITE bits */ | ||
181 | #define OMAP343X_PBIASLITESUPPLY_HIGH1 (1 << 15) | ||
182 | #define OMAP343X_PBIASLITEVMODEERROR1 (1 << 11) | ||
183 | #define OMAP343X_PBIASSPEEDCTRL1 (1 << 10) | ||
184 | #define OMAP343X_PBIASLITEPWRDNZ1 (1 << 9) | ||
185 | #define OMAP343X_PBIASLITEVMODE1 (1 << 8) | ||
186 | #define OMAP343X_PBIASLITESUPPLY_HIGH0 (1 << 7) | ||
187 | #define OMAP343X_PBIASLITEVMODEERROR0 (1 << 3) | ||
188 | #define OMAP2_PBIASSPEEDCTRL0 (1 << 2) | ||
189 | #define OMAP2_PBIASLITEPWRDNZ0 (1 << 1) | ||
190 | #define OMAP2_PBIASLITEVMODE0 (1 << 0) | ||
191 | |||
175 | #ifndef __ASSEMBLY__ | 192 | #ifndef __ASSEMBLY__ |
176 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 193 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
177 | extern void __iomem *omap_ctrl_base_get(void); | 194 | extern void __iomem *omap_ctrl_base_get(void); |
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h index e0464187209d..b2062f1175de 100644 --- a/arch/arm/plat-omap/include/mach/cpu.h +++ b/arch/arm/plat-omap/include/mach/cpu.h | |||
@@ -28,13 +28,18 @@ | |||
28 | 28 | ||
29 | struct omap_chip_id { | 29 | struct omap_chip_id { |
30 | u8 oc; | 30 | u8 oc; |
31 | u8 type; | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | #define OMAP_CHIP_INIT(x) { .oc = x } | 34 | #define OMAP_CHIP_INIT(x) { .oc = x } |
34 | 35 | ||
35 | extern unsigned int system_rev; | 36 | /* |
36 | 37 | * omap_rev bits: | |
37 | #define omap2_cpu_rev() ((system_rev >> 12) & 0x0f) | 38 | * CPU id bits (0730, 1510, 1710, 2422...) [31:16] |
39 | * CPU revision (See _REV_ defined in cpu.h) [15:08] | ||
40 | * CPU class bits (15xx, 16xx, 24xx, 34xx...) [07:00] | ||
41 | */ | ||
42 | unsigned int omap_rev(void); | ||
38 | 43 | ||
39 | /* | 44 | /* |
40 | * Test if multicore OMAP support is needed | 45 | * Test if multicore OMAP support is needed |
@@ -108,7 +113,7 @@ extern unsigned int system_rev; | |||
108 | * cpu_is_omap243x(): True for OMAP2430 | 113 | * cpu_is_omap243x(): True for OMAP2430 |
109 | * cpu_is_omap343x(): True for OMAP3430 | 114 | * cpu_is_omap343x(): True for OMAP3430 |
110 | */ | 115 | */ |
111 | #define GET_OMAP_CLASS ((system_rev >> 24) & 0xff) | 116 | #define GET_OMAP_CLASS (omap_rev() & 0xff) |
112 | 117 | ||
113 | #define IS_OMAP_CLASS(class, id) \ | 118 | #define IS_OMAP_CLASS(class, id) \ |
114 | static inline int is_omap ##class (void) \ | 119 | static inline int is_omap ##class (void) \ |
@@ -116,7 +121,7 @@ static inline int is_omap ##class (void) \ | |||
116 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ | 121 | return (GET_OMAP_CLASS == (id)) ? 1 : 0; \ |
117 | } | 122 | } |
118 | 123 | ||
119 | #define GET_OMAP_SUBCLASS ((system_rev >> 20) & 0x0fff) | 124 | #define GET_OMAP_SUBCLASS ((omap_rev() >> 20) & 0x0fff) |
120 | 125 | ||
121 | #define IS_OMAP_SUBCLASS(subclass, id) \ | 126 | #define IS_OMAP_SUBCLASS(subclass, id) \ |
122 | static inline int is_omap ##subclass (void) \ | 127 | static inline int is_omap ##subclass (void) \ |
@@ -226,7 +231,7 @@ IS_OMAP_SUBCLASS(343x, 0x343) | |||
226 | * cpu_is_omap2430(): True for OMAP2430 | 231 | * cpu_is_omap2430(): True for OMAP2430 |
227 | * cpu_is_omap3430(): True for OMAP3430 | 232 | * cpu_is_omap3430(): True for OMAP3430 |
228 | */ | 233 | */ |
229 | #define GET_OMAP_TYPE ((system_rev >> 16) & 0xffff) | 234 | #define GET_OMAP_TYPE ((omap_rev() >> 16) & 0xffff) |
230 | 235 | ||
231 | #define IS_OMAP_TYPE(type, id) \ | 236 | #define IS_OMAP_TYPE(type, id) \ |
232 | static inline int is_omap ##type (void) \ | 237 | static inline int is_omap ##type (void) \ |
@@ -320,44 +325,20 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
320 | #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx()) | 325 | #define cpu_class_is_omap2() (cpu_is_omap24xx() || cpu_is_omap34xx()) |
321 | 326 | ||
322 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | 327 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
323 | /* | ||
324 | * Macros to detect silicon revision of OMAP2/3 processors. | ||
325 | * is_sil_rev_greater_than: true if passed cpu type & its rev is greater. | ||
326 | * is_sil_rev_lesser_than: true if passed cpu type & its rev is lesser. | ||
327 | * is_sil_rev_equal_to: true if passed cpu type & its rev is equal. | ||
328 | * get_sil_rev: return the silicon rev value. | ||
329 | */ | ||
330 | #define get_sil_omap_type(rev) ((rev & 0xffff0000) >> 16) | ||
331 | #define get_sil_revision(rev) ((rev & 0x0000f000) >> 12) | ||
332 | 328 | ||
333 | #define is_sil_rev_greater_than(rev) \ | 329 | /* Various silicon revisions for omap2 */ |
334 | ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \ | 330 | #define OMAP242X_CLASS 0x24200024 |
335 | (get_sil_revision(system_rev) > get_sil_revision(rev))) | 331 | #define OMAP2420_REV_ES1_0 0x24200024 |
332 | #define OMAP2420_REV_ES2_0 0x24201024 | ||
336 | 333 | ||
337 | #define is_sil_rev_less_than(rev) \ | 334 | #define OMAP243X_CLASS 0x24300024 |
338 | ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \ | 335 | #define OMAP2430_REV_ES1_0 0x24300024 |
339 | (get_sil_revision(system_rev) < get_sil_revision(rev))) | ||
340 | 336 | ||
341 | #define is_sil_rev_equal_to(rev) \ | 337 | #define OMAP343X_CLASS 0x34300034 |
342 | ((get_sil_omap_type(system_rev) == get_sil_omap_type(rev)) && \ | 338 | #define OMAP3430_REV_ES1_0 0x34300034 |
343 | (get_sil_revision(system_rev) == get_sil_revision(rev))) | 339 | #define OMAP3430_REV_ES2_0 0x34301034 |
344 | 340 | #define OMAP3430_REV_ES2_1 0x34302034 | |
345 | #define get_sil_rev() \ | 341 | #define OMAP3430_REV_ES3_0 0x34303034 |
346 | get_sil_revision(system_rev) | ||
347 | |||
348 | /* Various silicon macros defined here */ | ||
349 | #define OMAP242X_CLASS 0x24200000 | ||
350 | #define OMAP2420_REV_ES1_0 0x24200000 | ||
351 | #define OMAP2420_REV_ES2_0 0x24201000 | ||
352 | |||
353 | #define OMAP243X_CLASS 0x24300000 | ||
354 | #define OMAP2430_REV_ES1_0 0x24300000 | ||
355 | |||
356 | #define OMAP343X_CLASS 0x34300000 | ||
357 | #define OMAP3430_REV_ES1_0 0x34300000 | ||
358 | #define OMAP3430_REV_ES2_0 0x34301000 | ||
359 | #define OMAP3430_REV_ES2_1 0x34302000 | ||
360 | #define OMAP3430_REV_ES2_2 0x34303000 | ||
361 | 342 | ||
362 | /* | 343 | /* |
363 | * omap_chip bits | 344 | * omap_chip bits |
@@ -382,23 +363,16 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
382 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) | 363 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) |
383 | 364 | ||
384 | int omap_chip_is(struct omap_chip_id oci); | 365 | int omap_chip_is(struct omap_chip_id oci); |
385 | 366 | int omap_type(void); | |
386 | 367 | ||
387 | /* | 368 | /* |
388 | * Macro to detect device type i.e. EMU/HS/TST/GP/BAD | 369 | * Macro to detect device type i.e. EMU/HS/TST/GP/BAD |
389 | */ | 370 | */ |
390 | #define DEVICE_TYPE_TEST 0 | 371 | #define OMAP2_DEVICE_TYPE_TEST 0 |
391 | #define DEVICE_TYPE_EMU 1 | 372 | #define OMAP2_DEVICE_TYPE_EMU 1 |
392 | #define DEVICE_TYPE_SEC 2 | 373 | #define OMAP2_DEVICE_TYPE_SEC 2 |
393 | #define DEVICE_TYPE_GP 3 | 374 | #define OMAP2_DEVICE_TYPE_GP 3 |
394 | #define DEVICE_TYPE_BAD 4 | 375 | #define OMAP2_DEVICE_TYPE_BAD 4 |
395 | |||
396 | #define get_device_type() ((system_rev & 0x700) >> 8) | ||
397 | #define is_device_type_test() (get_device_type() == DEVICE_TYPE_TEST) | ||
398 | #define is_device_type_emu() (get_device_type() == DEVICE_TYPE_EMU) | ||
399 | #define is_device_type_sec() (get_device_type() == DEVICE_TYPE_SEC) | ||
400 | #define is_device_type_gp() (get_device_type() == DEVICE_TYPE_GP) | ||
401 | #define is_device_type_bad() (get_device_type() == DEVICE_TYPE_BAD) | ||
402 | 376 | ||
403 | void omap2_check_revision(void); | 377 | void omap2_check_revision(void); |
404 | 378 | ||
diff --git a/arch/arm/plat-omap/include/mach/gpio.h b/arch/arm/plat-omap/include/mach/gpio.h index 98e9008b7e9d..04e68e88f134 100644 --- a/arch/arm/plat-omap/include/mach/gpio.h +++ b/arch/arm/plat-omap/include/mach/gpio.h | |||
@@ -71,11 +71,6 @@ | |||
71 | IH_GPIO_BASE + (nr)) | 71 | IH_GPIO_BASE + (nr)) |
72 | 72 | ||
73 | extern int omap_gpio_init(void); /* Call from board init only */ | 73 | extern int omap_gpio_init(void); /* Call from board init only */ |
74 | extern int omap_request_gpio(int gpio); | ||
75 | extern void omap_free_gpio(int gpio); | ||
76 | extern void omap_set_gpio_direction(int gpio, int is_input); | ||
77 | extern void omap_set_gpio_dataout(int gpio, int enable); | ||
78 | extern int omap_get_gpio_datain(int gpio); | ||
79 | extern void omap2_gpio_prepare_for_retention(void); | 74 | extern void omap2_gpio_prepare_for_retention(void); |
80 | extern void omap2_gpio_resume_after_retention(void); | 75 | extern void omap2_gpio_resume_after_retention(void); |
81 | extern void omap_set_gpio_debounce(int gpio, int enable); | 76 | extern void omap_set_gpio_debounce(int gpio, int enable); |
@@ -92,6 +87,16 @@ extern void omap_set_gpio_debounce_time(int gpio, int enable); | |||
92 | #include <linux/errno.h> | 87 | #include <linux/errno.h> |
93 | #include <asm-generic/gpio.h> | 88 | #include <asm-generic/gpio.h> |
94 | 89 | ||
90 | static inline int omap_request_gpio(int gpio) | ||
91 | { | ||
92 | return gpio_request(gpio, "FIXME"); | ||
93 | } | ||
94 | |||
95 | static inline void omap_free_gpio(int gpio) | ||
96 | { | ||
97 | gpio_free(gpio); | ||
98 | } | ||
99 | |||
95 | static inline int gpio_get_value(unsigned gpio) | 100 | static inline int gpio_get_value(unsigned gpio) |
96 | { | 101 | { |
97 | return __gpio_get_value(gpio); | 102 | return __gpio_get_value(gpio); |
@@ -109,16 +114,24 @@ static inline int gpio_cansleep(unsigned gpio) | |||
109 | 114 | ||
110 | static inline int gpio_to_irq(unsigned gpio) | 115 | static inline int gpio_to_irq(unsigned gpio) |
111 | { | 116 | { |
112 | if (gpio < (OMAP_MAX_GPIO_LINES + 16)) | 117 | return __gpio_to_irq(gpio); |
113 | return OMAP_GPIO_IRQ(gpio); | ||
114 | return -EINVAL; | ||
115 | } | 118 | } |
116 | 119 | ||
117 | static inline int irq_to_gpio(unsigned irq) | 120 | static inline int irq_to_gpio(unsigned irq) |
118 | { | 121 | { |
122 | int tmp; | ||
123 | |||
124 | /* omap1 SOC mpuio */ | ||
119 | if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16))) | 125 | if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16))) |
120 | return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES; | 126 | return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES; |
121 | return irq - IH_GPIO_BASE; | 127 | |
128 | /* SOC gpio */ | ||
129 | tmp = irq - IH_GPIO_BASE; | ||
130 | if (tmp < OMAP_MAX_GPIO_LINES) | ||
131 | return tmp; | ||
132 | |||
133 | /* we don't supply reverse mappings for non-SOC gpios */ | ||
134 | return -EIO; | ||
122 | } | 135 | } |
123 | 136 | ||
124 | #endif | 137 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/io.h b/arch/arm/plat-omap/include/mach/io.h index adc83b7b8205..d92bf7964481 100644 --- a/arch/arm/plat-omap/include/mach/io.h +++ b/arch/arm/plat-omap/include/mach/io.h | |||
@@ -42,8 +42,8 @@ | |||
42 | * We don't actually have real ISA nor PCI buses, but there is so many | 42 | * We don't actually have real ISA nor PCI buses, but there is so many |
43 | * drivers out there that might just work if we fake them... | 43 | * drivers out there that might just work if we fake them... |
44 | */ | 44 | */ |
45 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) | 45 | #define __io(a) __typesafe_io(a) |
46 | #define __mem_pci(a) (a) | 46 | #define __mem_pci(a) (a) |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * ---------------------------------------------------------------------------- | 49 | * ---------------------------------------------------------------------------- |
@@ -51,8 +51,6 @@ | |||
51 | * ---------------------------------------------------------------------------- | 51 | * ---------------------------------------------------------------------------- |
52 | */ | 52 | */ |
53 | 53 | ||
54 | #define PCIO_BASE 0 | ||
55 | |||
56 | #if defined(CONFIG_ARCH_OMAP1) | 54 | #if defined(CONFIG_ARCH_OMAP1) |
57 | 55 | ||
58 | #define IO_PHYS 0xFFFB0000 | 56 | #define IO_PHYS 0xFFFB0000 |
diff --git a/arch/arm/plat-omap/include/mach/memory.h b/arch/arm/plat-omap/include/mach/memory.h index d40cac60b959..211c9f6619e9 100644 --- a/arch/arm/plat-omap/include/mach/memory.h +++ b/arch/arm/plat-omap/include/mach/memory.h | |||
@@ -43,18 +43,7 @@ | |||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Conversion between SDRAM and fake PCI bus, used by USB | ||
47 | * NOTE: Physical address must be converted to Local Bus address | ||
48 | * on OMAP-1510 only | ||
49 | */ | ||
50 | |||
51 | /* | ||
52 | * Bus address is physical address, except for OMAP-1510 Local Bus. | 46 | * Bus address is physical address, except for OMAP-1510 Local Bus. |
53 | */ | ||
54 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
55 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
56 | |||
57 | /* | ||
58 | * OMAP-1510 bus address is translated into a Local Bus address if the | 47 | * OMAP-1510 bus address is translated into a Local Bus address if the |
59 | * OMAP bus type is lbus. We do the address translation based on the | 48 | * OMAP bus type is lbus. We do the address translation based on the |
60 | * device overriding the defaults used in the dma-mapping API. | 49 | * device overriding the defaults used in the dma-mapping API. |
@@ -74,16 +63,16 @@ | |||
74 | 63 | ||
75 | #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ | 64 | #define __arch_page_to_dma(dev, page) ({is_lbus_device(dev) ? \ |
76 | (dma_addr_t)virt_to_lbus(page_address(page)) : \ | 65 | (dma_addr_t)virt_to_lbus(page_address(page)) : \ |
77 | (dma_addr_t)__virt_to_bus(page_address(page));}) | 66 | (dma_addr_t)__virt_to_phys(page_address(page));}) |
78 | 67 | ||
79 | #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ | 68 | #define __arch_dma_to_virt(dev, addr) ({ (void *) (is_lbus_device(dev) ? \ |
80 | lbus_to_virt(addr) : \ | 69 | lbus_to_virt(addr) : \ |
81 | __bus_to_virt(addr)); }) | 70 | __phys_to_virt(addr)); }) |
82 | 71 | ||
83 | #define __arch_virt_to_dma(dev, addr) ({ unsigned long __addr = (unsigned long)(addr); \ | 72 | #define __arch_virt_to_dma(dev, addr) ({ unsigned long __addr = (unsigned long)(addr); \ |
84 | (dma_addr_t) (is_lbus_device(dev) ? \ | 73 | (dma_addr_t) (is_lbus_device(dev) ? \ |
85 | virt_to_lbus(__addr) : \ | 74 | virt_to_lbus(__addr) : \ |
86 | __virt_to_bus(__addr)); }) | 75 | __virt_to_phys(__addr)); }) |
87 | 76 | ||
88 | #endif /* CONFIG_ARCH_OMAP15XX */ | 77 | #endif /* CONFIG_ARCH_OMAP15XX */ |
89 | 78 | ||
diff --git a/arch/arm/plat-omap/include/mach/mmc.h b/arch/arm/plat-omap/include/mach/mmc.h index fc15d13058fc..031250f02805 100644 --- a/arch/arm/plat-omap/include/mach/mmc.h +++ b/arch/arm/plat-omap/include/mach/mmc.h | |||
@@ -17,12 +17,28 @@ | |||
17 | 17 | ||
18 | #include <mach/board.h> | 18 | #include <mach/board.h> |
19 | 19 | ||
20 | #define OMAP15XX_NR_MMC 1 | ||
21 | #define OMAP16XX_NR_MMC 2 | ||
22 | #define OMAP1_MMC_SIZE 0x080 | ||
23 | #define OMAP1_MMC1_BASE 0xfffb7800 | ||
24 | #define OMAP1_MMC2_BASE 0xfffb7c00 /* omap16xx only */ | ||
25 | |||
26 | #define OMAP24XX_NR_MMC 2 | ||
27 | #define OMAP34XX_NR_MMC 3 | ||
28 | #define OMAP2420_MMC_SIZE OMAP1_MMC_SIZE | ||
29 | #define HSMMC_SIZE 0x200 | ||
30 | #define OMAP2_MMC1_BASE 0x4809c000 | ||
31 | #define OMAP2_MMC2_BASE 0x480b4000 | ||
32 | #define OMAP3_MMC3_BASE 0x480ad000 | ||
33 | #define HSMMC3 (1 << 2) | ||
34 | #define HSMMC2 (1 << 1) | ||
35 | #define HSMMC1 (1 << 0) | ||
36 | |||
20 | #define OMAP_MMC_MAX_SLOTS 2 | 37 | #define OMAP_MMC_MAX_SLOTS 2 |
21 | 38 | ||
22 | struct omap_mmc_platform_data { | 39 | struct omap_mmc_platform_data { |
23 | struct omap_mmc_conf conf; | ||
24 | 40 | ||
25 | /* number of slots on board */ | 41 | /* number of slots per controller */ |
26 | unsigned nr_slots:2; | 42 | unsigned nr_slots:2; |
27 | 43 | ||
28 | /* set if your board has components or wiring that limits the | 44 | /* set if your board has components or wiring that limits the |
@@ -41,7 +57,31 @@ struct omap_mmc_platform_data { | |||
41 | int (*suspend)(struct device *dev, int slot); | 57 | int (*suspend)(struct device *dev, int slot); |
42 | int (*resume)(struct device *dev, int slot); | 58 | int (*resume)(struct device *dev, int slot); |
43 | 59 | ||
60 | u64 dma_mask; | ||
61 | |||
44 | struct omap_mmc_slot_data { | 62 | struct omap_mmc_slot_data { |
63 | |||
64 | /* 4 wire signaling is optional, and is used for SD/SDIO/HSMMC; | ||
65 | * 8 wire signaling is also optional, and is used with HSMMC | ||
66 | */ | ||
67 | u8 wires; | ||
68 | |||
69 | /* | ||
70 | * nomux means "standard" muxing is wrong on this board, and | ||
71 | * that board-specific code handled it before common init logic. | ||
72 | */ | ||
73 | unsigned nomux:1; | ||
74 | |||
75 | /* switch pin can be for card detect (default) or card cover */ | ||
76 | unsigned cover:1; | ||
77 | |||
78 | /* use the internal clock */ | ||
79 | unsigned internal_clock:1; | ||
80 | s16 power_pin; | ||
81 | |||
82 | int switch_pin; /* gpio (card detect) */ | ||
83 | int gpio_wp; /* gpio (write protect) */ | ||
84 | |||
45 | int (* set_bus_mode)(struct device *dev, int slot, int bus_mode); | 85 | int (* set_bus_mode)(struct device *dev, int slot, int bus_mode); |
46 | int (* set_power)(struct device *dev, int slot, int power_on, int vdd); | 86 | int (* set_power)(struct device *dev, int slot, int power_on, int vdd); |
47 | int (* get_ro)(struct device *dev, int slot); | 87 | int (* get_ro)(struct device *dev, int slot); |
@@ -49,8 +89,8 @@ struct omap_mmc_platform_data { | |||
49 | /* return MMC cover switch state, can be NULL if not supported. | 89 | /* return MMC cover switch state, can be NULL if not supported. |
50 | * | 90 | * |
51 | * possible return values: | 91 | * possible return values: |
52 | * 0 - open | 92 | * 0 - closed |
53 | * 1 - closed | 93 | * 1 - open |
54 | */ | 94 | */ |
55 | int (* get_cover_state)(struct device *dev, int slot); | 95 | int (* get_cover_state)(struct device *dev, int slot); |
56 | 96 | ||
@@ -66,9 +106,31 @@ struct omap_mmc_platform_data { | |||
66 | } slots[OMAP_MMC_MAX_SLOTS]; | 106 | } slots[OMAP_MMC_MAX_SLOTS]; |
67 | }; | 107 | }; |
68 | 108 | ||
69 | extern void omap_set_mmc_info(int host, const struct omap_mmc_platform_data *info); | ||
70 | |||
71 | /* called from board-specific card detection service routine */ | 109 | /* called from board-specific card detection service routine */ |
72 | extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed); | 110 | extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed); |
73 | 111 | ||
112 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \ | ||
113 | defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE) | ||
114 | void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
115 | int nr_controllers); | ||
116 | void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
117 | int nr_controllers); | ||
118 | int omap_mmc_add(int id, unsigned long base, unsigned long size, | ||
119 | unsigned int irq, struct omap_mmc_platform_data *data); | ||
120 | #else | ||
121 | static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
122 | int nr_controllers) | ||
123 | { | ||
124 | } | ||
125 | static inline void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | ||
126 | int nr_controllers) | ||
127 | { | ||
128 | } | ||
129 | static inline int omap_mmc_add(int id, unsigned long base, unsigned long size, | ||
130 | unsigned int irq, struct omap_mmc_platform_data *data) | ||
131 | { | ||
132 | return 0; | ||
133 | } | ||
134 | |||
135 | #endif | ||
74 | #endif | 136 | #endif |
diff --git a/arch/arm/plat-omap/include/mach/mux.h b/arch/arm/plat-omap/include/mach/mux.h index 6bbf1789bed5..f4362b8682c7 100644 --- a/arch/arm/plat-omap/include/mach/mux.h +++ b/arch/arm/plat-omap/include/mach/mux.h | |||
@@ -632,6 +632,15 @@ enum omap24xx_index { | |||
632 | AC7_2430_USB0HS_DATA7, | 632 | AC7_2430_USB0HS_DATA7, |
633 | 633 | ||
634 | /* 2430 McBSP */ | 634 | /* 2430 McBSP */ |
635 | AD6_2430_MCBSP_CLKS, | ||
636 | |||
637 | AB2_2430_MCBSP1_CLKR, | ||
638 | AD5_2430_MCBSP1_FSR, | ||
639 | AA1_2430_MCBSP1_DX, | ||
640 | AF3_2430_MCBSP1_DR, | ||
641 | AB3_2430_MCBSP1_FSX, | ||
642 | Y9_2430_MCBSP1_CLKX, | ||
643 | |||
635 | AC10_2430_MCBSP2_FSX, | 644 | AC10_2430_MCBSP2_FSX, |
636 | AD16_2430_MCBSP2_CLX, | 645 | AD16_2430_MCBSP2_CLX, |
637 | AE13_2430_MCBSP2_DX, | 646 | AE13_2430_MCBSP2_DX, |
@@ -641,6 +650,30 @@ enum omap24xx_index { | |||
641 | AE13_2430_MCBSP2_DX_OFF, | 650 | AE13_2430_MCBSP2_DX_OFF, |
642 | AD13_2430_MCBSP2_DR_OFF, | 651 | AD13_2430_MCBSP2_DR_OFF, |
643 | 652 | ||
653 | AC9_2430_MCBSP3_CLKX, | ||
654 | AE4_2430_MCBSP3_FSX, | ||
655 | AE2_2430_MCBSP3_DR, | ||
656 | AF4_2430_MCBSP3_DX, | ||
657 | |||
658 | N3_2430_MCBSP4_CLKX, | ||
659 | AD23_2430_MCBSP4_DR, | ||
660 | AB25_2430_MCBSP4_DX, | ||
661 | AC25_2430_MCBSP4_FSX, | ||
662 | |||
663 | AE16_2430_MCBSP5_CLKX, | ||
664 | AF12_2430_MCBSP5_FSX, | ||
665 | K7_2430_MCBSP5_DX, | ||
666 | M1_2430_MCBSP5_DR, | ||
667 | |||
668 | /* 2430 McSPI*/ | ||
669 | Y18_2430_MCSPI1_CLK, | ||
670 | AD15_2430_MCSPI1_SIMO, | ||
671 | AE17_2430_MCSPI1_SOMI, | ||
672 | U1_2430_MCSPI1_CS0, | ||
673 | |||
674 | /* Touchscreen GPIO */ | ||
675 | AF19_2430_GPIO_85, | ||
676 | |||
644 | }; | 677 | }; |
645 | 678 | ||
646 | enum omap34xx_index { | 679 | enum omap34xx_index { |
@@ -749,6 +782,14 @@ enum omap34xx_index { | |||
749 | AD2_3430_USB3FS_PHY_MM3_TXDAT, | 782 | AD2_3430_USB3FS_PHY_MM3_TXDAT, |
750 | AC1_3430_USB3FS_PHY_MM3_TXEN_N, | 783 | AC1_3430_USB3FS_PHY_MM3_TXEN_N, |
751 | 784 | ||
785 | /* 34xx GPIO | ||
786 | * - normally these are bidirectional, no internal pullup/pulldown | ||
787 | * - "_UP" suffix (GPIO3_UP) if internal pullup is configured | ||
788 | * - "_DOWN" suffix (GPIO3_DOWN) with internal pulldown | ||
789 | * - "_OUT" suffix (GPIO3_OUT) for output-only pins (unlike 24xx) | ||
790 | */ | ||
791 | AH8_34XX_GPIO29, | ||
792 | J25_34XX_GPIO170, | ||
752 | }; | 793 | }; |
753 | 794 | ||
754 | struct omap_mux_cfg { | 795 | struct omap_mux_cfg { |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index dcd9d16da2e9..be7bcaf2b832 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <mach/sram.h> | 25 | #include <mach/sram.h> |
26 | #include <mach/board.h> | 26 | #include <mach/board.h> |
27 | #include <mach/cpu.h> | ||
27 | 28 | ||
28 | #include <mach/control.h> | 29 | #include <mach/control.h> |
29 | 30 | ||
@@ -87,7 +88,7 @@ static int is_sram_locked(void) | |||
87 | int type = 0; | 88 | int type = 0; |
88 | 89 | ||
89 | if (cpu_is_omap242x()) | 90 | if (cpu_is_omap242x()) |
90 | type = system_rev & OMAP2_DEVICETYPE_MASK; | 91 | type = omap_rev() & OMAP2_DEVICETYPE_MASK; |
91 | 92 | ||
92 | if (type == GP_DEVICE) { | 93 | if (type == GP_DEVICE) { |
93 | /* RAMFW: R/W access to all initiators for all qualifier sets */ | 94 | /* RAMFW: R/W access to all initiators for all qualifier sets */ |
diff --git a/arch/arm/plat-orion/Makefile b/arch/arm/plat-orion/Makefile index 198f3dde2be3..56021a72e10c 100644 --- a/arch/arm/plat-orion/Makefile +++ b/arch/arm/plat-orion/Makefile | |||
@@ -6,3 +6,5 @@ obj-y := irq.o pcie.o time.o | |||
6 | obj-m := | 6 | obj-m := |
7 | obj-n := | 7 | obj-n := |
8 | obj- := | 8 | obj- := |
9 | |||
10 | obj-$(CONFIG_GENERIC_GPIO) += gpio.o | ||
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c new file mode 100644 index 000000000000..967186425ca1 --- /dev/null +++ b/arch/arm/plat-orion/gpio.c | |||
@@ -0,0 +1,415 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-orion/gpio.c | ||
3 | * | ||
4 | * Marvell Orion SoC GPIO handling. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/irq.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/spinlock.h> | ||
16 | #include <linux/bitops.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <asm/gpio.h> | ||
19 | |||
20 | static DEFINE_SPINLOCK(gpio_lock); | ||
21 | static const char *gpio_label[GPIO_MAX]; /* non null for allocated GPIOs */ | ||
22 | static unsigned long gpio_valid[BITS_TO_LONGS(GPIO_MAX)]; | ||
23 | |||
24 | static inline void __set_direction(unsigned pin, int input) | ||
25 | { | ||
26 | u32 u; | ||
27 | |||
28 | u = readl(GPIO_IO_CONF(pin)); | ||
29 | if (input) | ||
30 | u |= 1 << (pin & 31); | ||
31 | else | ||
32 | u &= ~(1 << (pin & 31)); | ||
33 | writel(u, GPIO_IO_CONF(pin)); | ||
34 | } | ||
35 | |||
36 | static void __set_level(unsigned pin, int high) | ||
37 | { | ||
38 | u32 u; | ||
39 | |||
40 | u = readl(GPIO_OUT(pin)); | ||
41 | if (high) | ||
42 | u |= 1 << (pin & 31); | ||
43 | else | ||
44 | u &= ~(1 << (pin & 31)); | ||
45 | writel(u, GPIO_OUT(pin)); | ||
46 | } | ||
47 | |||
48 | |||
49 | /* | ||
50 | * GENERIC_GPIO primitives. | ||
51 | */ | ||
52 | int gpio_direction_input(unsigned pin) | ||
53 | { | ||
54 | unsigned long flags; | ||
55 | |||
56 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | ||
57 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
58 | return -EINVAL; | ||
59 | } | ||
60 | |||
61 | spin_lock_irqsave(&gpio_lock, flags); | ||
62 | |||
63 | /* | ||
64 | * Some callers might not have used gpio_request(), | ||
65 | * so flag this pin as requested now. | ||
66 | */ | ||
67 | if (gpio_label[pin] == NULL) | ||
68 | gpio_label[pin] = "?"; | ||
69 | |||
70 | /* | ||
71 | * Configure GPIO direction. | ||
72 | */ | ||
73 | __set_direction(pin, 1); | ||
74 | |||
75 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
76 | |||
77 | return 0; | ||
78 | } | ||
79 | EXPORT_SYMBOL(gpio_direction_input); | ||
80 | |||
81 | int gpio_direction_output(unsigned pin, int value) | ||
82 | { | ||
83 | unsigned long flags; | ||
84 | u32 u; | ||
85 | |||
86 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | ||
87 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
88 | return -EINVAL; | ||
89 | } | ||
90 | |||
91 | spin_lock_irqsave(&gpio_lock, flags); | ||
92 | |||
93 | /* | ||
94 | * Some callers might not have used gpio_request(), | ||
95 | * so flag this pin as requested now. | ||
96 | */ | ||
97 | if (gpio_label[pin] == NULL) | ||
98 | gpio_label[pin] = "?"; | ||
99 | |||
100 | /* | ||
101 | * Disable blinking. | ||
102 | */ | ||
103 | u = readl(GPIO_BLINK_EN(pin)); | ||
104 | u &= ~(1 << (pin & 31)); | ||
105 | writel(u, GPIO_BLINK_EN(pin)); | ||
106 | |||
107 | /* | ||
108 | * Configure GPIO output value. | ||
109 | */ | ||
110 | __set_level(pin, value); | ||
111 | |||
112 | /* | ||
113 | * Configure GPIO direction. | ||
114 | */ | ||
115 | __set_direction(pin, 0); | ||
116 | |||
117 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
118 | |||
119 | return 0; | ||
120 | } | ||
121 | EXPORT_SYMBOL(gpio_direction_output); | ||
122 | |||
123 | int gpio_get_value(unsigned pin) | ||
124 | { | ||
125 | int val; | ||
126 | |||
127 | if (readl(GPIO_IO_CONF(pin)) & (1 << (pin & 31))) | ||
128 | val = readl(GPIO_DATA_IN(pin)) ^ readl(GPIO_IN_POL(pin)); | ||
129 | else | ||
130 | val = readl(GPIO_OUT(pin)); | ||
131 | |||
132 | return (val >> (pin & 31)) & 1; | ||
133 | } | ||
134 | EXPORT_SYMBOL(gpio_get_value); | ||
135 | |||
136 | void gpio_set_value(unsigned pin, int value) | ||
137 | { | ||
138 | unsigned long flags; | ||
139 | u32 u; | ||
140 | |||
141 | spin_lock_irqsave(&gpio_lock, flags); | ||
142 | |||
143 | /* | ||
144 | * Disable blinking. | ||
145 | */ | ||
146 | u = readl(GPIO_BLINK_EN(pin)); | ||
147 | u &= ~(1 << (pin & 31)); | ||
148 | writel(u, GPIO_BLINK_EN(pin)); | ||
149 | |||
150 | /* | ||
151 | * Configure GPIO output value. | ||
152 | */ | ||
153 | __set_level(pin, value); | ||
154 | |||
155 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
156 | } | ||
157 | EXPORT_SYMBOL(gpio_set_value); | ||
158 | |||
159 | int gpio_request(unsigned pin, const char *label) | ||
160 | { | ||
161 | unsigned long flags; | ||
162 | int ret; | ||
163 | |||
164 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | ||
165 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
166 | return -EINVAL; | ||
167 | } | ||
168 | |||
169 | spin_lock_irqsave(&gpio_lock, flags); | ||
170 | if (gpio_label[pin] == NULL) { | ||
171 | gpio_label[pin] = label ? label : "?"; | ||
172 | ret = 0; | ||
173 | } else { | ||
174 | pr_debug("%s: GPIO %d already used as %s\n", | ||
175 | __func__, pin, gpio_label[pin]); | ||
176 | ret = -EBUSY; | ||
177 | } | ||
178 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
179 | |||
180 | return ret; | ||
181 | } | ||
182 | EXPORT_SYMBOL(gpio_request); | ||
183 | |||
184 | void gpio_free(unsigned pin) | ||
185 | { | ||
186 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | ||
187 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); | ||
188 | return; | ||
189 | } | ||
190 | |||
191 | if (gpio_label[pin] == NULL) | ||
192 | pr_warning("%s: GPIO %d already freed\n", __func__, pin); | ||
193 | else | ||
194 | gpio_label[pin] = NULL; | ||
195 | } | ||
196 | EXPORT_SYMBOL(gpio_free); | ||
197 | |||
198 | |||
199 | /* | ||
200 | * Orion-specific GPIO API extensions. | ||
201 | */ | ||
202 | void __init orion_gpio_set_unused(unsigned pin) | ||
203 | { | ||
204 | /* | ||
205 | * Configure as output, drive low. | ||
206 | */ | ||
207 | __set_level(pin, 0); | ||
208 | __set_direction(pin, 0); | ||
209 | } | ||
210 | |||
211 | void __init orion_gpio_set_valid(unsigned pin, int valid) | ||
212 | { | ||
213 | if (valid) | ||
214 | __set_bit(pin, gpio_valid); | ||
215 | else | ||
216 | __clear_bit(pin, gpio_valid); | ||
217 | } | ||
218 | |||
219 | void orion_gpio_set_blink(unsigned pin, int blink) | ||
220 | { | ||
221 | unsigned long flags; | ||
222 | u32 u; | ||
223 | |||
224 | spin_lock_irqsave(&gpio_lock, flags); | ||
225 | |||
226 | /* | ||
227 | * Set output value to zero. | ||
228 | */ | ||
229 | __set_level(pin, 0); | ||
230 | |||
231 | u = readl(GPIO_BLINK_EN(pin)); | ||
232 | if (blink) | ||
233 | u |= 1 << (pin & 31); | ||
234 | else | ||
235 | u &= ~(1 << (pin & 31)); | ||
236 | writel(u, GPIO_BLINK_EN(pin)); | ||
237 | |||
238 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
239 | } | ||
240 | EXPORT_SYMBOL(orion_gpio_set_blink); | ||
241 | |||
242 | |||
243 | /***************************************************************************** | ||
244 | * Orion GPIO IRQ | ||
245 | * | ||
246 | * GPIO_IN_POL register controls whether GPIO_DATA_IN will hold the same | ||
247 | * value of the line or the opposite value. | ||
248 | * | ||
249 | * Level IRQ handlers: DATA_IN is used directly as cause register. | ||
250 | * Interrupt are masked by LEVEL_MASK registers. | ||
251 | * Edge IRQ handlers: Change in DATA_IN are latched in EDGE_CAUSE. | ||
252 | * Interrupt are masked by EDGE_MASK registers. | ||
253 | * Both-edge handlers: Similar to regular Edge handlers, but also swaps | ||
254 | * the polarity to catch the next line transaction. | ||
255 | * This is a race condition that might not perfectly | ||
256 | * work on some use cases. | ||
257 | * | ||
258 | * Every eight GPIO lines are grouped (OR'ed) before going up to main | ||
259 | * cause register. | ||
260 | * | ||
261 | * EDGE cause mask | ||
262 | * data-in /--------| |-----| |----\ | ||
263 | * -----| |----- ---- to main cause reg | ||
264 | * X \----------------| |----/ | ||
265 | * polarity LEVEL mask | ||
266 | * | ||
267 | ****************************************************************************/ | ||
268 | static void gpio_irq_edge_ack(u32 irq) | ||
269 | { | ||
270 | int pin = irq_to_gpio(irq); | ||
271 | |||
272 | writel(~(1 << (pin & 31)), GPIO_EDGE_CAUSE(pin)); | ||
273 | } | ||
274 | |||
275 | static void gpio_irq_edge_mask(u32 irq) | ||
276 | { | ||
277 | int pin = irq_to_gpio(irq); | ||
278 | u32 u; | ||
279 | |||
280 | u = readl(GPIO_EDGE_MASK(pin)); | ||
281 | u &= ~(1 << (pin & 31)); | ||
282 | writel(u, GPIO_EDGE_MASK(pin)); | ||
283 | } | ||
284 | |||
285 | static void gpio_irq_edge_unmask(u32 irq) | ||
286 | { | ||
287 | int pin = irq_to_gpio(irq); | ||
288 | u32 u; | ||
289 | |||
290 | u = readl(GPIO_EDGE_MASK(pin)); | ||
291 | u |= 1 << (pin & 31); | ||
292 | writel(u, GPIO_EDGE_MASK(pin)); | ||
293 | } | ||
294 | |||
295 | static void gpio_irq_level_mask(u32 irq) | ||
296 | { | ||
297 | int pin = irq_to_gpio(irq); | ||
298 | u32 u; | ||
299 | |||
300 | u = readl(GPIO_LEVEL_MASK(pin)); | ||
301 | u &= ~(1 << (pin & 31)); | ||
302 | writel(u, GPIO_LEVEL_MASK(pin)); | ||
303 | } | ||
304 | |||
305 | static void gpio_irq_level_unmask(u32 irq) | ||
306 | { | ||
307 | int pin = irq_to_gpio(irq); | ||
308 | u32 u; | ||
309 | |||
310 | u = readl(GPIO_LEVEL_MASK(pin)); | ||
311 | u |= 1 << (pin & 31); | ||
312 | writel(u, GPIO_LEVEL_MASK(pin)); | ||
313 | } | ||
314 | |||
315 | static int gpio_irq_set_type(u32 irq, u32 type) | ||
316 | { | ||
317 | int pin = irq_to_gpio(irq); | ||
318 | struct irq_desc *desc; | ||
319 | u32 u; | ||
320 | |||
321 | u = readl(GPIO_IO_CONF(pin)) & (1 << (pin & 31)); | ||
322 | if (!u) { | ||
323 | printk(KERN_ERR "orion gpio_irq_set_type failed " | ||
324 | "(irq %d, pin %d).\n", irq, pin); | ||
325 | return -EINVAL; | ||
326 | } | ||
327 | |||
328 | desc = irq_desc + irq; | ||
329 | |||
330 | /* | ||
331 | * Set edge/level type. | ||
332 | */ | ||
333 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { | ||
334 | desc->chip = &orion_gpio_irq_edge_chip; | ||
335 | } else if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { | ||
336 | desc->chip = &orion_gpio_irq_level_chip; | ||
337 | } else { | ||
338 | printk(KERN_ERR "failed to set irq=%d (type=%d)\n", irq, type); | ||
339 | return -EINVAL; | ||
340 | } | ||
341 | |||
342 | /* | ||
343 | * Configure interrupt polarity. | ||
344 | */ | ||
345 | if (type == IRQ_TYPE_EDGE_RISING || type == IRQ_TYPE_LEVEL_HIGH) { | ||
346 | u = readl(GPIO_IN_POL(pin)); | ||
347 | u &= ~(1 << (pin & 31)); | ||
348 | writel(u, GPIO_IN_POL(pin)); | ||
349 | } else if (type == IRQ_TYPE_EDGE_FALLING || type == IRQ_TYPE_LEVEL_LOW) { | ||
350 | u = readl(GPIO_IN_POL(pin)); | ||
351 | u |= 1 << (pin & 31); | ||
352 | writel(u, GPIO_IN_POL(pin)); | ||
353 | } else if (type == IRQ_TYPE_EDGE_BOTH) { | ||
354 | u32 v; | ||
355 | |||
356 | v = readl(GPIO_IN_POL(pin)) ^ readl(GPIO_DATA_IN(pin)); | ||
357 | |||
358 | /* | ||
359 | * set initial polarity based on current input level | ||
360 | */ | ||
361 | u = readl(GPIO_IN_POL(pin)); | ||
362 | if (v & (1 << (pin & 31))) | ||
363 | u |= 1 << (pin & 31); /* falling */ | ||
364 | else | ||
365 | u &= ~(1 << (pin & 31)); /* rising */ | ||
366 | writel(u, GPIO_IN_POL(pin)); | ||
367 | } | ||
368 | |||
369 | desc->status = (desc->status & ~IRQ_TYPE_SENSE_MASK) | type; | ||
370 | |||
371 | return 0; | ||
372 | } | ||
373 | |||
374 | struct irq_chip orion_gpio_irq_edge_chip = { | ||
375 | .name = "orion_gpio_irq_edge", | ||
376 | .ack = gpio_irq_edge_ack, | ||
377 | .mask = gpio_irq_edge_mask, | ||
378 | .unmask = gpio_irq_edge_unmask, | ||
379 | .set_type = gpio_irq_set_type, | ||
380 | }; | ||
381 | |||
382 | struct irq_chip orion_gpio_irq_level_chip = { | ||
383 | .name = "orion_gpio_irq_level", | ||
384 | .mask = gpio_irq_level_mask, | ||
385 | .mask_ack = gpio_irq_level_mask, | ||
386 | .unmask = gpio_irq_level_unmask, | ||
387 | .set_type = gpio_irq_set_type, | ||
388 | }; | ||
389 | |||
390 | void orion_gpio_irq_handler(int pinoff) | ||
391 | { | ||
392 | u32 cause; | ||
393 | int pin; | ||
394 | |||
395 | cause = readl(GPIO_DATA_IN(pinoff)) & readl(GPIO_LEVEL_MASK(pinoff)); | ||
396 | cause |= readl(GPIO_EDGE_CAUSE(pinoff)) & readl(GPIO_EDGE_MASK(pinoff)); | ||
397 | |||
398 | for (pin = pinoff; pin < pinoff + 8; pin++) { | ||
399 | int irq = gpio_to_irq(pin); | ||
400 | struct irq_desc *desc = irq_desc + irq; | ||
401 | |||
402 | if (!(cause & (1 << (pin & 31)))) | ||
403 | continue; | ||
404 | |||
405 | if ((desc->status & IRQ_TYPE_SENSE_MASK) == IRQ_TYPE_EDGE_BOTH) { | ||
406 | /* Swap polarity (race with GPIO line) */ | ||
407 | u32 polarity; | ||
408 | |||
409 | polarity = readl(GPIO_IN_POL(pin)); | ||
410 | polarity ^= 1 << (pin & 31); | ||
411 | writel(polarity, GPIO_IN_POL(pin)); | ||
412 | } | ||
413 | desc_handle_irq(irq, desc); | ||
414 | } | ||
415 | } | ||
diff --git a/arch/arm/plat-orion/include/plat/ehci-orion.h b/arch/arm/plat-orion/include/plat/ehci-orion.h index 64343051095a..4ec668e77460 100644 --- a/arch/arm/plat-orion/include/plat/ehci-orion.h +++ b/arch/arm/plat-orion/include/plat/ehci-orion.h | |||
@@ -11,8 +11,16 @@ | |||
11 | 11 | ||
12 | #include <linux/mbus.h> | 12 | #include <linux/mbus.h> |
13 | 13 | ||
14 | enum orion_ehci_phy_ver { | ||
15 | EHCI_PHY_ORION, | ||
16 | EHCI_PHY_DD, | ||
17 | EHCI_PHY_KW, | ||
18 | EHCI_PHY_NA, | ||
19 | }; | ||
20 | |||
14 | struct orion_ehci_data { | 21 | struct orion_ehci_data { |
15 | struct mbus_dram_target_info *dram; | 22 | struct mbus_dram_target_info *dram; |
23 | enum orion_ehci_phy_ver phy_version; | ||
16 | }; | 24 | }; |
17 | 25 | ||
18 | 26 | ||
diff --git a/arch/arm/plat-orion/include/plat/gpio.h b/arch/arm/plat-orion/include/plat/gpio.h new file mode 100644 index 000000000000..54deaf274b52 --- /dev/null +++ b/arch/arm/plat-orion/include/plat/gpio.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-orion/include/plat/gpio.h | ||
3 | * | ||
4 | * Marvell Orion SoC GPIO handling. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __PLAT_GPIO_H | ||
12 | #define __PLAT_GPIO_H | ||
13 | |||
14 | /* | ||
15 | * GENERIC_GPIO primitives. | ||
16 | */ | ||
17 | int gpio_request(unsigned pin, const char *label); | ||
18 | void gpio_free(unsigned pin); | ||
19 | int gpio_direction_input(unsigned pin); | ||
20 | int gpio_direction_output(unsigned pin, int value); | ||
21 | int gpio_get_value(unsigned pin); | ||
22 | void gpio_set_value(unsigned pin, int value); | ||
23 | |||
24 | /* | ||
25 | * Orion-specific GPIO API extensions. | ||
26 | */ | ||
27 | void orion_gpio_set_unused(unsigned pin); | ||
28 | void orion_gpio_set_valid(unsigned pin, int valid); | ||
29 | void orion_gpio_set_blink(unsigned pin, int blink); | ||
30 | |||
31 | /* | ||
32 | * GPIO interrupt handling. | ||
33 | */ | ||
34 | extern struct irq_chip orion_gpio_irq_edge_chip; | ||
35 | extern struct irq_chip orion_gpio_irq_level_chip; | ||
36 | void orion_gpio_irq_handler(int irqoff); | ||
37 | |||
38 | |||
39 | #endif | ||
diff --git a/arch/arm/plat-s3c/Kconfig b/arch/arm/plat-s3c/Kconfig index 31656c33e05e..de9383814e5e 100644 --- a/arch/arm/plat-s3c/Kconfig +++ b/arch/arm/plat-s3c/Kconfig | |||
@@ -6,34 +6,32 @@ | |||
6 | 6 | ||
7 | config PLAT_S3C | 7 | config PLAT_S3C |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 || ARCH_S3C24A0 || ARCH_S3C64XX |
10 | default y if ARCH_S3C2410 | 10 | default y |
11 | select NO_IOPORT | 11 | select NO_IOPORT |
12 | help | 12 | help |
13 | Base platform code for any Samsung S3C device | 13 | Base platform code for any Samsung S3C device |
14 | 14 | ||
15 | # low-level serial option nodes | 15 | # low-level serial option nodes |
16 | 16 | ||
17 | if PLAT_S3C | ||
18 | |||
17 | config CPU_LLSERIAL_S3C2410_ONLY | 19 | config CPU_LLSERIAL_S3C2410_ONLY |
18 | bool | 20 | bool |
19 | depends on ARCH_S3C2410 | ||
20 | default y if CPU_LLSERIAL_S3C2410 && !CPU_LLSERIAL_S3C2440 | 21 | default y if CPU_LLSERIAL_S3C2410 && !CPU_LLSERIAL_S3C2440 |
21 | 22 | ||
22 | config CPU_LLSERIAL_S3C2440_ONLY | 23 | config CPU_LLSERIAL_S3C2440_ONLY |
23 | bool | 24 | bool |
24 | depends on ARCH_S3C2410 | ||
25 | default y if CPU_LLSERIAL_S3C2440 && !CPU_LLSERIAL_S3C2410 | 25 | default y if CPU_LLSERIAL_S3C2440 && !CPU_LLSERIAL_S3C2410 |
26 | 26 | ||
27 | config CPU_LLSERIAL_S3C2410 | 27 | config CPU_LLSERIAL_S3C2410 |
28 | bool | 28 | bool |
29 | depends on ARCH_S3C2410 | ||
30 | help | 29 | help |
31 | Selected if there is an S3C2410 (or register compatible) serial | 30 | Selected if there is an S3C2410 (or register compatible) serial |
32 | low-level implementation needed | 31 | low-level implementation needed |
33 | 32 | ||
34 | config CPU_LLSERIAL_S3C2440 | 33 | config CPU_LLSERIAL_S3C2440 |
35 | bool | 34 | bool |
36 | depends on ARCH_S3C2410 | ||
37 | help | 35 | help |
38 | Selected if there is an S3C2440 (or register compatible) serial | 36 | Selected if there is an S3C2440 (or register compatible) serial |
39 | low-level implementation needed | 37 | low-level implementation needed |
@@ -44,7 +42,7 @@ comment "Boot options" | |||
44 | 42 | ||
45 | config S3C_BOOT_WATCHDOG | 43 | config S3C_BOOT_WATCHDOG |
46 | bool "S3C Initialisation watchdog" | 44 | bool "S3C Initialisation watchdog" |
47 | depends on PLAT_S3C && S3C2410_WATCHDOG | 45 | depends on S3C2410_WATCHDOG |
48 | help | 46 | help |
49 | Say y to enable the watchdog during the kernel decompression | 47 | Say y to enable the watchdog during the kernel decompression |
50 | stage. If the kernel fails to uncompress, then the watchdog | 48 | stage. If the kernel fails to uncompress, then the watchdog |
@@ -52,16 +50,22 @@ config S3C_BOOT_WATCHDOG | |||
52 | 50 | ||
53 | config S3C_BOOT_ERROR_RESET | 51 | config S3C_BOOT_ERROR_RESET |
54 | bool "S3C Reboot on decompression error" | 52 | bool "S3C Reboot on decompression error" |
55 | depends on PLAT_S3C | ||
56 | help | 53 | help |
57 | Say y here to use the watchdog to reset the system if the | 54 | Say y here to use the watchdog to reset the system if the |
58 | kernel decompressor detects an error during decompression. | 55 | kernel decompressor detects an error during decompression. |
59 | 56 | ||
57 | config S3C_BOOT_UART_FORCE_FIFO | ||
58 | bool "Force UART FIFO on during boot process" | ||
59 | default y | ||
60 | help | ||
61 | Say Y here to force the UART FIFOs on during the kernel | ||
62 | uncompressor | ||
63 | |||
60 | comment "Power management" | 64 | comment "Power management" |
61 | 65 | ||
62 | config S3C2410_PM_DEBUG | 66 | config S3C2410_PM_DEBUG |
63 | bool "S3C2410 PM Suspend debug" | 67 | bool "S3C2410 PM Suspend debug" |
64 | depends on PLAT_S3C && PM | 68 | depends on PM |
65 | help | 69 | help |
66 | Say Y here if you want verbose debugging from the PM Suspend and | 70 | Say Y here if you want verbose debugging from the PM Suspend and |
67 | Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> | 71 | Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt> |
@@ -69,7 +73,7 @@ config S3C2410_PM_DEBUG | |||
69 | 73 | ||
70 | config S3C2410_PM_CHECK | 74 | config S3C2410_PM_CHECK |
71 | bool "S3C2410 PM Suspend Memory CRC" | 75 | bool "S3C2410 PM Suspend Memory CRC" |
72 | depends on PLAT_S3C && PM && CRC32 | 76 | depends on PM && CRC32 |
73 | help | 77 | help |
74 | Enable the PM code's memory area checksum over sleep. This option | 78 | Enable the PM code's memory area checksum over sleep. This option |
75 | will generate CRCs of all blocks of memory, and store them before | 79 | will generate CRCs of all blocks of memory, and store them before |
@@ -83,7 +87,7 @@ config S3C2410_PM_CHECK | |||
83 | 87 | ||
84 | config S3C2410_PM_CHECK_CHUNKSIZE | 88 | config S3C2410_PM_CHECK_CHUNKSIZE |
85 | int "S3C2410 PM Suspend CRC Chunksize (KiB)" | 89 | int "S3C2410 PM Suspend CRC Chunksize (KiB)" |
86 | depends on PLAT_S3C && PM && S3C2410_PM_CHECK | 90 | depends on PM && S3C2410_PM_CHECK |
87 | default 64 | 91 | default 64 |
88 | help | 92 | help |
89 | Set the chunksize in Kilobytes of the CRC for checking memory | 93 | Set the chunksize in Kilobytes of the CRC for checking memory |
@@ -95,10 +99,77 @@ config S3C2410_PM_CHECK_CHUNKSIZE | |||
95 | 99 | ||
96 | config S3C_LOWLEVEL_UART_PORT | 100 | config S3C_LOWLEVEL_UART_PORT |
97 | int "S3C UART to use for low-level messages" | 101 | int "S3C UART to use for low-level messages" |
98 | depends on PLAT_S3C | ||
99 | default 0 | 102 | default 0 |
100 | help | 103 | help |
101 | Choice of which UART port to use for the low-level messages, | 104 | Choice of which UART port to use for the low-level messages, |
102 | such as the `Uncompressing...` at start time. The value of | 105 | such as the `Uncompressing...` at start time. The value of |
103 | this configuration should be between zero and two. The port | 106 | this configuration should be between zero and two. The port |
104 | must have been initialised by the boot-loader before use. | 107 | must have been initialised by the boot-loader before use. |
108 | |||
109 | # options for gpiolib support | ||
110 | |||
111 | config S3C_GPIO_SPACE | ||
112 | int "Space between gpio banks" | ||
113 | default 0 | ||
114 | help | ||
115 | Add a number of spare GPIO entries between each bank for debugging | ||
116 | purposes. This allows any problems where an counter overflows from | ||
117 | one bank to another to be caught, at the expense of using a little | ||
118 | more memory. | ||
119 | |||
120 | config S3C_GPIO_TRACK | ||
121 | bool | ||
122 | help | ||
123 | Internal configuration option to enable the s3c specific gpio | ||
124 | chip tracking if the platform requires it. | ||
125 | |||
126 | config S3C_GPIO_PULL_UPDOWN | ||
127 | bool | ||
128 | help | ||
129 | Internal configuration to enable the correct GPIO pull helper | ||
130 | |||
131 | config S3C_GPIO_PULL_DOWN | ||
132 | bool | ||
133 | help | ||
134 | Internal configuration to enable the correct GPIO pull helper | ||
135 | |||
136 | config S3C_GPIO_PULL_UP | ||
137 | bool | ||
138 | help | ||
139 | Internal configuration to enable the correct GPIO pull helper | ||
140 | |||
141 | config S3C_GPIO_CFG_S3C24XX | ||
142 | bool | ||
143 | help | ||
144 | Internal configuration to enable S3C24XX style GPIO configuration | ||
145 | functions. | ||
146 | |||
147 | config S3C_GPIO_CFG_S3C64XX | ||
148 | bool | ||
149 | help | ||
150 | Internal configuration to enable S3C64XX style GPIO configuration | ||
151 | functions. | ||
152 | |||
153 | # device definitions to compile in | ||
154 | |||
155 | config S3C_DEV_HSMMC | ||
156 | bool | ||
157 | help | ||
158 | Compile in platform device definitions for HSMMC code | ||
159 | |||
160 | config S3C_DEV_HSMMC1 | ||
161 | bool | ||
162 | help | ||
163 | Compile in platform device definitions for HSMMC channel 1 | ||
164 | |||
165 | config S3C_DEV_I2C1 | ||
166 | bool | ||
167 | help | ||
168 | Compile in platform device definitions for I2C channel 1 | ||
169 | |||
170 | config S3C_DEV_FB | ||
171 | bool | ||
172 | help | ||
173 | Compile in platform device definition for framebuffer | ||
174 | |||
175 | endif | ||
diff --git a/arch/arm/plat-s3c/Makefile b/arch/arm/plat-s3c/Makefile index f03d7b35ba37..39195f972d5e 100644 --- a/arch/arm/plat-s3c/Makefile +++ b/arch/arm/plat-s3c/Makefile | |||
@@ -1,3 +1,27 @@ | |||
1 | # dummy makefile, currently just including asm/arm/plat-s3c/include/plat | 1 | # arch/arm/plat-s3c/Makefile |
2 | # | ||
3 | # Copyright 2008 Simtec Electronics | ||
4 | # | ||
5 | # Licensed under GPLv2 | ||
2 | 6 | ||
3 | obj-n := dummy.o | 7 | obj-y := |
8 | obj-m := | ||
9 | obj-n := | ||
10 | obj- := | ||
11 | |||
12 | # Core support for all Samsung SoCs | ||
13 | |||
14 | obj-y += init.o | ||
15 | obj-y += time.o | ||
16 | obj-y += clock.o | ||
17 | obj-y += pwm-clock.o | ||
18 | obj-y += gpio.o | ||
19 | obj-y += gpio-config.o | ||
20 | |||
21 | # devices | ||
22 | |||
23 | obj-$(CONFIG_S3C_DEV_HSMMC) += dev-hsmmc.o | ||
24 | obj-$(CONFIG_S3C_DEV_HSMMC1) += dev-hsmmc1.o | ||
25 | obj-y += dev-i2c0.o | ||
26 | obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o | ||
27 | obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o | ||
diff --git a/arch/arm/plat-s3c/clock.c b/arch/arm/plat-s3c/clock.c new file mode 100644 index 000000000000..b6be76e2fe51 --- /dev/null +++ b/arch/arm/plat-s3c/clock.c | |||
@@ -0,0 +1,368 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/clock.c | ||
2 | * | ||
3 | * Copyright (c) 2004-2005 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C24XX Core clock control support | ||
7 | * | ||
8 | * Based on, and code from linux/arch/arm/mach-versatile/clock.c | ||
9 | ** | ||
10 | ** Copyright (C) 2004 ARM Limited. | ||
11 | ** Written by Deep Blue Solutions Limited. | ||
12 | * | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation; either version 2 of the License, or | ||
17 | * (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
27 | */ | ||
28 | |||
29 | #include <linux/init.h> | ||
30 | #include <linux/module.h> | ||
31 | #include <linux/kernel.h> | ||
32 | #include <linux/list.h> | ||
33 | #include <linux/errno.h> | ||
34 | #include <linux/err.h> | ||
35 | #include <linux/platform_device.h> | ||
36 | #include <linux/sysdev.h> | ||
37 | #include <linux/interrupt.h> | ||
38 | #include <linux/ioport.h> | ||
39 | #include <linux/clk.h> | ||
40 | #include <linux/spinlock.h> | ||
41 | #include <linux/io.h> | ||
42 | |||
43 | #include <mach/hardware.h> | ||
44 | #include <asm/irq.h> | ||
45 | |||
46 | #include <plat/cpu-freq.h> | ||
47 | |||
48 | #include <plat/clock.h> | ||
49 | #include <plat/cpu.h> | ||
50 | |||
51 | /* clock information */ | ||
52 | |||
53 | static LIST_HEAD(clocks); | ||
54 | |||
55 | /* We originally used an mutex here, but some contexts (see resume) | ||
56 | * are calling functions such as clk_set_parent() with IRQs disabled | ||
57 | * causing an BUG to be triggered. | ||
58 | */ | ||
59 | DEFINE_SPINLOCK(clocks_lock); | ||
60 | |||
61 | /* enable and disable calls for use with the clk struct */ | ||
62 | |||
63 | static int clk_null_enable(struct clk *clk, int enable) | ||
64 | { | ||
65 | return 0; | ||
66 | } | ||
67 | |||
68 | /* Clock API calls */ | ||
69 | |||
70 | struct clk *clk_get(struct device *dev, const char *id) | ||
71 | { | ||
72 | struct clk *p; | ||
73 | struct clk *clk = ERR_PTR(-ENOENT); | ||
74 | int idno; | ||
75 | |||
76 | if (dev == NULL || dev->bus != &platform_bus_type) | ||
77 | idno = -1; | ||
78 | else | ||
79 | idno = to_platform_device(dev)->id; | ||
80 | |||
81 | spin_lock(&clocks_lock); | ||
82 | |||
83 | list_for_each_entry(p, &clocks, list) { | ||
84 | if (p->id == idno && | ||
85 | strcmp(id, p->name) == 0 && | ||
86 | try_module_get(p->owner)) { | ||
87 | clk = p; | ||
88 | break; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | /* check for the case where a device was supplied, but the | ||
93 | * clock that was being searched for is not device specific */ | ||
94 | |||
95 | if (IS_ERR(clk)) { | ||
96 | list_for_each_entry(p, &clocks, list) { | ||
97 | if (p->id == -1 && strcmp(id, p->name) == 0 && | ||
98 | try_module_get(p->owner)) { | ||
99 | clk = p; | ||
100 | break; | ||
101 | } | ||
102 | } | ||
103 | } | ||
104 | |||
105 | spin_unlock(&clocks_lock); | ||
106 | return clk; | ||
107 | } | ||
108 | |||
109 | void clk_put(struct clk *clk) | ||
110 | { | ||
111 | module_put(clk->owner); | ||
112 | } | ||
113 | |||
114 | int clk_enable(struct clk *clk) | ||
115 | { | ||
116 | if (IS_ERR(clk) || clk == NULL) | ||
117 | return -EINVAL; | ||
118 | |||
119 | clk_enable(clk->parent); | ||
120 | |||
121 | spin_lock(&clocks_lock); | ||
122 | |||
123 | if ((clk->usage++) == 0) | ||
124 | (clk->enable)(clk, 1); | ||
125 | |||
126 | spin_unlock(&clocks_lock); | ||
127 | return 0; | ||
128 | } | ||
129 | |||
130 | void clk_disable(struct clk *clk) | ||
131 | { | ||
132 | if (IS_ERR(clk) || clk == NULL) | ||
133 | return; | ||
134 | |||
135 | spin_lock(&clocks_lock); | ||
136 | |||
137 | if ((--clk->usage) == 0) | ||
138 | (clk->enable)(clk, 0); | ||
139 | |||
140 | spin_unlock(&clocks_lock); | ||
141 | clk_disable(clk->parent); | ||
142 | } | ||
143 | |||
144 | |||
145 | unsigned long clk_get_rate(struct clk *clk) | ||
146 | { | ||
147 | if (IS_ERR(clk)) | ||
148 | return 0; | ||
149 | |||
150 | if (clk->rate != 0) | ||
151 | return clk->rate; | ||
152 | |||
153 | if (clk->get_rate != NULL) | ||
154 | return (clk->get_rate)(clk); | ||
155 | |||
156 | if (clk->parent != NULL) | ||
157 | return clk_get_rate(clk->parent); | ||
158 | |||
159 | return clk->rate; | ||
160 | } | ||
161 | |||
162 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
163 | { | ||
164 | if (!IS_ERR(clk) && clk->round_rate) | ||
165 | return (clk->round_rate)(clk, rate); | ||
166 | |||
167 | return rate; | ||
168 | } | ||
169 | |||
170 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
171 | { | ||
172 | int ret; | ||
173 | |||
174 | if (IS_ERR(clk)) | ||
175 | return -EINVAL; | ||
176 | |||
177 | /* We do not default just do a clk->rate = rate as | ||
178 | * the clock may have been made this way by choice. | ||
179 | */ | ||
180 | |||
181 | WARN_ON(clk->set_rate == NULL); | ||
182 | |||
183 | if (clk->set_rate == NULL) | ||
184 | return -EINVAL; | ||
185 | |||
186 | spin_lock(&clocks_lock); | ||
187 | ret = (clk->set_rate)(clk, rate); | ||
188 | spin_unlock(&clocks_lock); | ||
189 | |||
190 | return ret; | ||
191 | } | ||
192 | |||
193 | struct clk *clk_get_parent(struct clk *clk) | ||
194 | { | ||
195 | return clk->parent; | ||
196 | } | ||
197 | |||
198 | int clk_set_parent(struct clk *clk, struct clk *parent) | ||
199 | { | ||
200 | int ret = 0; | ||
201 | |||
202 | if (IS_ERR(clk)) | ||
203 | return -EINVAL; | ||
204 | |||
205 | spin_lock(&clocks_lock); | ||
206 | |||
207 | if (clk->set_parent) | ||
208 | ret = (clk->set_parent)(clk, parent); | ||
209 | |||
210 | spin_unlock(&clocks_lock); | ||
211 | |||
212 | return ret; | ||
213 | } | ||
214 | |||
215 | EXPORT_SYMBOL(clk_get); | ||
216 | EXPORT_SYMBOL(clk_put); | ||
217 | EXPORT_SYMBOL(clk_enable); | ||
218 | EXPORT_SYMBOL(clk_disable); | ||
219 | EXPORT_SYMBOL(clk_get_rate); | ||
220 | EXPORT_SYMBOL(clk_round_rate); | ||
221 | EXPORT_SYMBOL(clk_set_rate); | ||
222 | EXPORT_SYMBOL(clk_get_parent); | ||
223 | EXPORT_SYMBOL(clk_set_parent); | ||
224 | |||
225 | /* base clocks */ | ||
226 | |||
227 | static int clk_default_setrate(struct clk *clk, unsigned long rate) | ||
228 | { | ||
229 | clk->rate = rate; | ||
230 | return 0; | ||
231 | } | ||
232 | |||
233 | struct clk clk_xtal = { | ||
234 | .name = "xtal", | ||
235 | .id = -1, | ||
236 | .rate = 0, | ||
237 | .parent = NULL, | ||
238 | .ctrlbit = 0, | ||
239 | }; | ||
240 | |||
241 | struct clk clk_ext = { | ||
242 | .name = "ext", | ||
243 | .id = -1, | ||
244 | }; | ||
245 | |||
246 | struct clk clk_epll = { | ||
247 | .name = "epll", | ||
248 | .id = -1, | ||
249 | }; | ||
250 | |||
251 | struct clk clk_mpll = { | ||
252 | .name = "mpll", | ||
253 | .id = -1, | ||
254 | .set_rate = clk_default_setrate, | ||
255 | }; | ||
256 | |||
257 | struct clk clk_upll = { | ||
258 | .name = "upll", | ||
259 | .id = -1, | ||
260 | .parent = NULL, | ||
261 | .ctrlbit = 0, | ||
262 | }; | ||
263 | |||
264 | struct clk clk_f = { | ||
265 | .name = "fclk", | ||
266 | .id = -1, | ||
267 | .rate = 0, | ||
268 | .parent = &clk_mpll, | ||
269 | .ctrlbit = 0, | ||
270 | .set_rate = clk_default_setrate, | ||
271 | }; | ||
272 | |||
273 | struct clk clk_h = { | ||
274 | .name = "hclk", | ||
275 | .id = -1, | ||
276 | .rate = 0, | ||
277 | .parent = NULL, | ||
278 | .ctrlbit = 0, | ||
279 | .set_rate = clk_default_setrate, | ||
280 | }; | ||
281 | |||
282 | struct clk clk_p = { | ||
283 | .name = "pclk", | ||
284 | .id = -1, | ||
285 | .rate = 0, | ||
286 | .parent = NULL, | ||
287 | .ctrlbit = 0, | ||
288 | .set_rate = clk_default_setrate, | ||
289 | }; | ||
290 | |||
291 | struct clk clk_usb_bus = { | ||
292 | .name = "usb-bus", | ||
293 | .id = -1, | ||
294 | .rate = 0, | ||
295 | .parent = &clk_upll, | ||
296 | }; | ||
297 | |||
298 | |||
299 | |||
300 | struct clk s3c24xx_uclk = { | ||
301 | .name = "uclk", | ||
302 | .id = -1, | ||
303 | }; | ||
304 | |||
305 | /* initialise the clock system */ | ||
306 | |||
307 | int s3c24xx_register_clock(struct clk *clk) | ||
308 | { | ||
309 | clk->owner = THIS_MODULE; | ||
310 | |||
311 | if (clk->enable == NULL) | ||
312 | clk->enable = clk_null_enable; | ||
313 | |||
314 | /* add to the list of available clocks */ | ||
315 | |||
316 | /* Quick check to see if this clock has already been registered. */ | ||
317 | BUG_ON(clk->list.prev != clk->list.next); | ||
318 | |||
319 | spin_lock(&clocks_lock); | ||
320 | list_add(&clk->list, &clocks); | ||
321 | spin_unlock(&clocks_lock); | ||
322 | |||
323 | return 0; | ||
324 | } | ||
325 | |||
326 | int s3c24xx_register_clocks(struct clk **clks, int nr_clks) | ||
327 | { | ||
328 | int fails = 0; | ||
329 | |||
330 | for (; nr_clks > 0; nr_clks--, clks++) { | ||
331 | if (s3c24xx_register_clock(*clks) < 0) | ||
332 | fails++; | ||
333 | } | ||
334 | |||
335 | return fails; | ||
336 | } | ||
337 | |||
338 | /* initalise all the clocks */ | ||
339 | |||
340 | int __init s3c24xx_register_baseclocks(unsigned long xtal) | ||
341 | { | ||
342 | printk(KERN_INFO "S3C24XX Clocks, (c) 2004 Simtec Electronics\n"); | ||
343 | |||
344 | clk_xtal.rate = xtal; | ||
345 | |||
346 | /* register our clocks */ | ||
347 | |||
348 | if (s3c24xx_register_clock(&clk_xtal) < 0) | ||
349 | printk(KERN_ERR "failed to register master xtal\n"); | ||
350 | |||
351 | if (s3c24xx_register_clock(&clk_mpll) < 0) | ||
352 | printk(KERN_ERR "failed to register mpll clock\n"); | ||
353 | |||
354 | if (s3c24xx_register_clock(&clk_upll) < 0) | ||
355 | printk(KERN_ERR "failed to register upll clock\n"); | ||
356 | |||
357 | if (s3c24xx_register_clock(&clk_f) < 0) | ||
358 | printk(KERN_ERR "failed to register cpu fclk\n"); | ||
359 | |||
360 | if (s3c24xx_register_clock(&clk_h) < 0) | ||
361 | printk(KERN_ERR "failed to register cpu hclk\n"); | ||
362 | |||
363 | if (s3c24xx_register_clock(&clk_p) < 0) | ||
364 | printk(KERN_ERR "failed to register cpu pclk\n"); | ||
365 | |||
366 | return 0; | ||
367 | } | ||
368 | |||
diff --git a/arch/arm/plat-s3c/dev-fb.c b/arch/arm/plat-s3c/dev-fb.c new file mode 100644 index 000000000000..0454b8ec02e2 --- /dev/null +++ b/arch/arm/plat-s3c/dev-fb.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-fb.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C series device definition for framebuffer device | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/string.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/fb.h> | ||
18 | |||
19 | #include <mach/map.h> | ||
20 | #include <mach/regs-fb.h> | ||
21 | |||
22 | #include <plat/fb.h> | ||
23 | #include <plat/devs.h> | ||
24 | #include <plat/cpu.h> | ||
25 | |||
26 | static struct resource s3c_fb_resource[] = { | ||
27 | [0] = { | ||
28 | .start = S3C_PA_FB, | ||
29 | .end = S3C_PA_FB + SZ_16K - 1, | ||
30 | .flags = IORESOURCE_MEM, | ||
31 | }, | ||
32 | [1] = { | ||
33 | .start = IRQ_LCD_VSYNC, | ||
34 | .end = IRQ_LCD_VSYNC, | ||
35 | .flags = IORESOURCE_IRQ, | ||
36 | }, | ||
37 | [2] = { | ||
38 | .start = IRQ_LCD_FIFO, | ||
39 | .end = IRQ_LCD_FIFO, | ||
40 | .flags = IORESOURCE_IRQ, | ||
41 | }, | ||
42 | [3] = { | ||
43 | .start = IRQ_LCD_SYSTEM, | ||
44 | .end = IRQ_LCD_SYSTEM, | ||
45 | .flags = IORESOURCE_IRQ, | ||
46 | }, | ||
47 | }; | ||
48 | |||
49 | struct platform_device s3c_device_fb = { | ||
50 | .name = "s3c-fb", | ||
51 | .id = -1, | ||
52 | .num_resources = ARRAY_SIZE(s3c_fb_resource), | ||
53 | .resource = s3c_fb_resource, | ||
54 | .dev.dma_mask = &s3c_device_fb.dev.coherent_dma_mask, | ||
55 | .dev.coherent_dma_mask = 0xffffffffUL, | ||
56 | }; | ||
57 | |||
58 | void __init s3c_fb_set_platdata(struct s3c_fb_platdata *pd) | ||
59 | { | ||
60 | struct s3c_fb_platdata *npd; | ||
61 | |||
62 | if (!pd) { | ||
63 | printk(KERN_ERR "%s: no platform data\n", __func__); | ||
64 | return; | ||
65 | } | ||
66 | |||
67 | npd = kmemdup(pd, sizeof(struct s3c_fb_platdata), GFP_KERNEL); | ||
68 | if (!npd) | ||
69 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
70 | |||
71 | s3c_device_fb.dev.platform_data = npd; | ||
72 | } | ||
diff --git a/arch/arm/plat-s3c/dev-hsmmc.c b/arch/arm/plat-s3c/dev-hsmmc.c new file mode 100644 index 000000000000..4c05b39810e2 --- /dev/null +++ b/arch/arm/plat-s3c/dev-hsmmc.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-hsmmc.c | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C series device definition for hsmmc devices | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/mmc/host.h> | ||
17 | |||
18 | #include <mach/map.h> | ||
19 | #include <plat/sdhci.h> | ||
20 | #include <plat/devs.h> | ||
21 | #include <plat/cpu.h> | ||
22 | |||
23 | #define S3C_SZ_HSMMC (0x1000) | ||
24 | |||
25 | static struct resource s3c_hsmmc_resource[] = { | ||
26 | [0] = { | ||
27 | .start = S3C_PA_HSMMC0, | ||
28 | .end = S3C_PA_HSMMC0 + S3C_SZ_HSMMC - 1, | ||
29 | .flags = IORESOURCE_MEM, | ||
30 | }, | ||
31 | [1] = { | ||
32 | .start = IRQ_HSMMC0, | ||
33 | .end = IRQ_HSMMC0, | ||
34 | .flags = IORESOURCE_IRQ, | ||
35 | } | ||
36 | }; | ||
37 | |||
38 | static u64 s3c_device_hsmmc_dmamask = 0xffffffffUL; | ||
39 | |||
40 | struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata = { | ||
41 | .max_width = 4, | ||
42 | .host_caps = (MMC_CAP_4_BIT_DATA | | ||
43 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | ||
44 | }; | ||
45 | |||
46 | struct platform_device s3c_device_hsmmc0 = { | ||
47 | .name = "s3c-sdhci", | ||
48 | .id = 0, | ||
49 | .num_resources = ARRAY_SIZE(s3c_hsmmc_resource), | ||
50 | .resource = s3c_hsmmc_resource, | ||
51 | .dev = { | ||
52 | .dma_mask = &s3c_device_hsmmc_dmamask, | ||
53 | .coherent_dma_mask = 0xffffffffUL, | ||
54 | .platform_data = &s3c_hsmmc0_def_platdata, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd) | ||
59 | { | ||
60 | struct s3c_sdhci_platdata *set = &s3c_hsmmc0_def_platdata; | ||
61 | |||
62 | set->max_width = pd->max_width; | ||
63 | |||
64 | if (pd->cfg_gpio) | ||
65 | set->cfg_gpio = pd->cfg_gpio; | ||
66 | if (pd->cfg_card) | ||
67 | set->cfg_card = pd->cfg_card; | ||
68 | } | ||
diff --git a/arch/arm/plat-s3c/dev-hsmmc1.c b/arch/arm/plat-s3c/dev-hsmmc1.c new file mode 100644 index 000000000000..e49bc4cd0ee6 --- /dev/null +++ b/arch/arm/plat-s3c/dev-hsmmc1.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-hsmmc1.c | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C series device definition for hsmmc device 1 | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/mmc/host.h> | ||
17 | |||
18 | #include <mach/map.h> | ||
19 | #include <plat/sdhci.h> | ||
20 | #include <plat/devs.h> | ||
21 | #include <plat/cpu.h> | ||
22 | |||
23 | #define S3C_SZ_HSMMC (0x1000) | ||
24 | |||
25 | static struct resource s3c_hsmmc1_resource[] = { | ||
26 | [0] = { | ||
27 | .start = S3C_PA_HSMMC1, | ||
28 | .end = S3C_PA_HSMMC1 + S3C_SZ_HSMMC - 1, | ||
29 | .flags = IORESOURCE_MEM, | ||
30 | }, | ||
31 | [1] = { | ||
32 | .start = IRQ_HSMMC1, | ||
33 | .end = IRQ_HSMMC1, | ||
34 | .flags = IORESOURCE_IRQ, | ||
35 | } | ||
36 | }; | ||
37 | |||
38 | static u64 s3c_device_hsmmc1_dmamask = 0xffffffffUL; | ||
39 | |||
40 | struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata = { | ||
41 | .max_width = 4, | ||
42 | .host_caps = (MMC_CAP_4_BIT_DATA | | ||
43 | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), | ||
44 | }; | ||
45 | |||
46 | struct platform_device s3c_device_hsmmc1 = { | ||
47 | .name = "s3c-sdhci", | ||
48 | .id = 1, | ||
49 | .num_resources = ARRAY_SIZE(s3c_hsmmc1_resource), | ||
50 | .resource = s3c_hsmmc1_resource, | ||
51 | .dev = { | ||
52 | .dma_mask = &s3c_device_hsmmc1_dmamask, | ||
53 | .coherent_dma_mask = 0xffffffffUL, | ||
54 | .platform_data = &s3c_hsmmc1_def_platdata, | ||
55 | }, | ||
56 | }; | ||
57 | |||
58 | void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd) | ||
59 | { | ||
60 | struct s3c_sdhci_platdata *set = &s3c_hsmmc1_def_platdata; | ||
61 | |||
62 | set->max_width = pd->max_width; | ||
63 | |||
64 | if (pd->cfg_gpio) | ||
65 | set->cfg_gpio = pd->cfg_gpio; | ||
66 | if (pd->cfg_card) | ||
67 | set->cfg_card = pd->cfg_card; | ||
68 | } | ||
diff --git a/arch/arm/plat-s3c/dev-i2c0.c b/arch/arm/plat-s3c/dev-i2c0.c new file mode 100644 index 000000000000..2c0128c77c6e --- /dev/null +++ b/arch/arm/plat-s3c/dev-i2c0.c | |||
@@ -0,0 +1,71 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-i2c0.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C series device definition for i2c device 0 | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/string.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | #include <mach/map.h> | ||
19 | |||
20 | #include <plat/regs-iic.h> | ||
21 | #include <plat/iic.h> | ||
22 | #include <plat/devs.h> | ||
23 | #include <plat/cpu.h> | ||
24 | |||
25 | static struct resource s3c_i2c_resource[] = { | ||
26 | [0] = { | ||
27 | .start = S3C_PA_IIC, | ||
28 | .end = S3C_PA_IIC + SZ_4K - 1, | ||
29 | .flags = IORESOURCE_MEM, | ||
30 | }, | ||
31 | [1] = { | ||
32 | .start = IRQ_IIC, | ||
33 | .end = IRQ_IIC, | ||
34 | .flags = IORESOURCE_IRQ, | ||
35 | }, | ||
36 | }; | ||
37 | |||
38 | struct platform_device s3c_device_i2c0 = { | ||
39 | .name = "s3c2410-i2c", | ||
40 | #ifdef CONFIG_S3C_DEV_I2C1 | ||
41 | .id = 0, | ||
42 | #else | ||
43 | .id = -1, | ||
44 | #endif | ||
45 | .num_resources = ARRAY_SIZE(s3c_i2c_resource), | ||
46 | .resource = s3c_i2c_resource, | ||
47 | }; | ||
48 | |||
49 | static struct s3c2410_platform_i2c default_i2c_data0 __initdata = { | ||
50 | .flags = 0, | ||
51 | .slave_addr = 0x10, | ||
52 | .bus_freq = 100*1000, | ||
53 | .max_freq = 400*1000, | ||
54 | .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON, | ||
55 | }; | ||
56 | |||
57 | void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd) | ||
58 | { | ||
59 | struct s3c2410_platform_i2c *npd; | ||
60 | |||
61 | if (!pd) | ||
62 | pd = &default_i2c_data0; | ||
63 | |||
64 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | ||
65 | if (!npd) | ||
66 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
67 | else if (!npd->cfg_gpio) | ||
68 | npd->cfg_gpio = s3c_i2c0_cfg_gpio; | ||
69 | |||
70 | s3c_device_i2c0.dev.platform_data = npd; | ||
71 | } | ||
diff --git a/arch/arm/plat-s3c/dev-i2c1.c b/arch/arm/plat-s3c/dev-i2c1.c new file mode 100644 index 000000000000..9658fb0aec95 --- /dev/null +++ b/arch/arm/plat-s3c/dev-i2c1.c | |||
@@ -0,0 +1,68 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-i2c1.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C series device definition for i2c device 1 | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/string.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | #include <mach/map.h> | ||
19 | |||
20 | #include <plat/regs-iic.h> | ||
21 | #include <plat/iic.h> | ||
22 | #include <plat/devs.h> | ||
23 | #include <plat/cpu.h> | ||
24 | |||
25 | static struct resource s3c_i2c_resource[] = { | ||
26 | [0] = { | ||
27 | .start = S3C_PA_IIC1, | ||
28 | .end = S3C_PA_IIC1 + SZ_4K - 1, | ||
29 | .flags = IORESOURCE_MEM, | ||
30 | }, | ||
31 | [1] = { | ||
32 | .start = IRQ_IIC1, | ||
33 | .end = IRQ_IIC1, | ||
34 | .flags = IORESOURCE_IRQ, | ||
35 | }, | ||
36 | }; | ||
37 | |||
38 | struct platform_device s3c_device_i2c1 = { | ||
39 | .name = "s3c2410-i2c", | ||
40 | .id = 1, | ||
41 | .num_resources = ARRAY_SIZE(s3c_i2c_resource), | ||
42 | .resource = s3c_i2c_resource, | ||
43 | }; | ||
44 | |||
45 | static struct s3c2410_platform_i2c default_i2c_data1 __initdata = { | ||
46 | .flags = 0, | ||
47 | .bus_num = 1, | ||
48 | .slave_addr = 0x10, | ||
49 | .bus_freq = 100*1000, | ||
50 | .max_freq = 400*1000, | ||
51 | .sda_delay = S3C2410_IICLC_SDA_DELAY5 | S3C2410_IICLC_FILTER_ON, | ||
52 | }; | ||
53 | |||
54 | void __init s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *pd) | ||
55 | { | ||
56 | struct s3c2410_platform_i2c *npd; | ||
57 | |||
58 | if (!pd) | ||
59 | pd = &default_i2c_data1; | ||
60 | |||
61 | npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); | ||
62 | if (!npd) | ||
63 | printk(KERN_ERR "%s: no memory for platform data\n", __func__); | ||
64 | else if (!npd->cfg_gpio) | ||
65 | npd->cfg_gpio = s3c_i2c1_cfg_gpio; | ||
66 | |||
67 | s3c_device_i2c1.dev.platform_data = npd; | ||
68 | } | ||
diff --git a/arch/arm/plat-s3c/gpio-config.c b/arch/arm/plat-s3c/gpio-config.c new file mode 100644 index 000000000000..7642b975a998 --- /dev/null +++ b/arch/arm/plat-s3c/gpio-config.c | |||
@@ -0,0 +1,163 @@ | |||
1 | /* linux/arch/arm/plat-s3c/gpio-config.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C series GPIO configuration core | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <mach/gpio-core.h> | ||
20 | #include <plat/gpio-cfg.h> | ||
21 | #include <plat/gpio-cfg-helpers.h> | ||
22 | |||
23 | int s3c_gpio_cfgpin(unsigned int pin, unsigned int config) | ||
24 | { | ||
25 | struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin); | ||
26 | unsigned long flags; | ||
27 | int offset; | ||
28 | int ret; | ||
29 | |||
30 | if (!chip) | ||
31 | return -EINVAL; | ||
32 | |||
33 | offset = pin - chip->chip.base; | ||
34 | |||
35 | local_irq_save(flags); | ||
36 | ret = s3c_gpio_do_setcfg(chip, offset, config); | ||
37 | local_irq_restore(flags); | ||
38 | |||
39 | return ret; | ||
40 | } | ||
41 | |||
42 | int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull) | ||
43 | { | ||
44 | struct s3c_gpio_chip *chip = s3c_gpiolib_getchip(pin); | ||
45 | unsigned long flags; | ||
46 | int offset, ret; | ||
47 | |||
48 | if (!chip) | ||
49 | return -EINVAL; | ||
50 | |||
51 | offset = pin - chip->chip.base; | ||
52 | |||
53 | local_irq_save(flags); | ||
54 | ret = s3c_gpio_do_setpull(chip, offset, pull); | ||
55 | local_irq_restore(flags); | ||
56 | |||
57 | return ret; | ||
58 | } | ||
59 | |||
60 | #ifdef CONFIG_S3C_GPIO_CFG_S3C24XX | ||
61 | int s3c_gpio_setcfg_s3c24xx_banka(struct s3c_gpio_chip *chip, | ||
62 | unsigned int off, unsigned int cfg) | ||
63 | { | ||
64 | void __iomem *reg = chip->base; | ||
65 | unsigned int shift = off; | ||
66 | u32 con; | ||
67 | |||
68 | if (s3c_gpio_is_cfg_special(cfg)) { | ||
69 | cfg &= 0xf; | ||
70 | |||
71 | /* Map output to 0, and SFN2 to 1 */ | ||
72 | cfg -= 1; | ||
73 | if (cfg > 1) | ||
74 | return -EINVAL; | ||
75 | |||
76 | cfg <<= shift; | ||
77 | } | ||
78 | |||
79 | con = __raw_readl(reg); | ||
80 | con &= ~(0x1 << shift); | ||
81 | con |= cfg; | ||
82 | __raw_writel(con, reg); | ||
83 | |||
84 | return 0; | ||
85 | } | ||
86 | |||
87 | int s3c_gpio_setcfg_s3c24xx(struct s3c_gpio_chip *chip, | ||
88 | unsigned int off, unsigned int cfg) | ||
89 | { | ||
90 | void __iomem *reg = chip->base; | ||
91 | unsigned int shift = off * 2; | ||
92 | u32 con; | ||
93 | |||
94 | if (s3c_gpio_is_cfg_special(cfg)) { | ||
95 | cfg &= 0xf; | ||
96 | if (cfg > 3) | ||
97 | return -EINVAL; | ||
98 | |||
99 | cfg <<= shift; | ||
100 | } | ||
101 | |||
102 | con = __raw_readl(reg); | ||
103 | con &= ~(0x3 << shift); | ||
104 | con |= cfg; | ||
105 | __raw_writel(con, reg); | ||
106 | |||
107 | return 0; | ||
108 | } | ||
109 | #endif | ||
110 | |||
111 | #ifdef CONFIG_S3C_GPIO_CFG_S3C64XX | ||
112 | int s3c_gpio_setcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip, | ||
113 | unsigned int off, unsigned int cfg) | ||
114 | { | ||
115 | void __iomem *reg = chip->base; | ||
116 | unsigned int shift = (off & 7) * 4; | ||
117 | u32 con; | ||
118 | |||
119 | if (off < 8 && chip->chip.ngpio >= 8) | ||
120 | reg -= 4; | ||
121 | |||
122 | if (s3c_gpio_is_cfg_special(cfg)) { | ||
123 | cfg &= 0xf; | ||
124 | cfg <<= shift; | ||
125 | } | ||
126 | |||
127 | con = __raw_readl(reg); | ||
128 | con &= ~(0xf << shift); | ||
129 | con |= cfg; | ||
130 | __raw_writel(con, reg); | ||
131 | |||
132 | return 0; | ||
133 | } | ||
134 | #endif /* CONFIG_S3C_GPIO_CFG_S3C64XX */ | ||
135 | |||
136 | #ifdef CONFIG_S3C_GPIO_PULL_UPDOWN | ||
137 | int s3c_gpio_setpull_updown(struct s3c_gpio_chip *chip, | ||
138 | unsigned int off, s3c_gpio_pull_t pull) | ||
139 | { | ||
140 | void __iomem *reg = chip->base + 0x08; | ||
141 | int shift = off * 2; | ||
142 | u32 pup; | ||
143 | |||
144 | pup = __raw_readl(reg); | ||
145 | pup &= ~(3 << shift); | ||
146 | pup |= pull << shift; | ||
147 | __raw_writel(pup, reg); | ||
148 | |||
149 | return 0; | ||
150 | } | ||
151 | |||
152 | s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip, | ||
153 | unsigned int off) | ||
154 | { | ||
155 | void __iomem *reg = chip->base + 0x08; | ||
156 | int shift = off * 2; | ||
157 | u32 pup = __raw_readl(reg); | ||
158 | |||
159 | pup >>= shift; | ||
160 | pup &= 0x3; | ||
161 | return (__force s3c_gpio_pull_t)pup; | ||
162 | } | ||
163 | #endif | ||
diff --git a/arch/arm/plat-s3c/gpio.c b/arch/arm/plat-s3c/gpio.c new file mode 100644 index 000000000000..d71dd6d9ce5c --- /dev/null +++ b/arch/arm/plat-s3c/gpio.c | |||
@@ -0,0 +1,147 @@ | |||
1 | /* linux/arch/arm/plat-s3c/gpio.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C series GPIO core | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/io.h> | ||
17 | #include <linux/gpio.h> | ||
18 | |||
19 | #include <plat/gpio-core.h> | ||
20 | |||
21 | #ifdef CONFIG_S3C_GPIO_TRACK | ||
22 | struct s3c_gpio_chip *s3c_gpios[S3C_GPIO_END]; | ||
23 | |||
24 | static __init void s3c_gpiolib_track(struct s3c_gpio_chip *chip) | ||
25 | { | ||
26 | unsigned int gpn; | ||
27 | int i; | ||
28 | |||
29 | gpn = chip->chip.base; | ||
30 | for (i = 0; i < chip->chip.ngpio; i++, gpn++) { | ||
31 | BUG_ON(gpn > ARRAY_SIZE(s3c_gpios)); | ||
32 | s3c_gpios[gpn] = chip; | ||
33 | } | ||
34 | } | ||
35 | #endif /* CONFIG_S3C_GPIO_TRACK */ | ||
36 | |||
37 | /* Default routines for controlling GPIO, based on the original S3C24XX | ||
38 | * GPIO functions which deal with the case where each gpio bank of the | ||
39 | * chip is as following: | ||
40 | * | ||
41 | * base + 0x00: Control register, 2 bits per gpio | ||
42 | * gpio n: 2 bits starting at (2*n) | ||
43 | * 00 = input, 01 = output, others mean special-function | ||
44 | * base + 0x04: Data register, 1 bit per gpio | ||
45 | * bit n: data bit n | ||
46 | */ | ||
47 | |||
48 | static int s3c_gpiolib_input(struct gpio_chip *chip, unsigned offset) | ||
49 | { | ||
50 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); | ||
51 | void __iomem *base = ourchip->base; | ||
52 | unsigned long flags; | ||
53 | unsigned long con; | ||
54 | |||
55 | local_irq_save(flags); | ||
56 | |||
57 | con = __raw_readl(base + 0x00); | ||
58 | con &= ~(3 << (offset * 2)); | ||
59 | |||
60 | __raw_writel(con, base + 0x00); | ||
61 | |||
62 | local_irq_restore(flags); | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | static int s3c_gpiolib_output(struct gpio_chip *chip, | ||
67 | unsigned offset, int value) | ||
68 | { | ||
69 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); | ||
70 | void __iomem *base = ourchip->base; | ||
71 | unsigned long flags; | ||
72 | unsigned long dat; | ||
73 | unsigned long con; | ||
74 | |||
75 | local_irq_save(flags); | ||
76 | |||
77 | dat = __raw_readl(base + 0x04); | ||
78 | dat &= ~(1 << offset); | ||
79 | if (value) | ||
80 | dat |= 1 << offset; | ||
81 | __raw_writel(dat, base + 0x04); | ||
82 | |||
83 | con = __raw_readl(base + 0x00); | ||
84 | con &= ~(3 << (offset * 2)); | ||
85 | con |= 1 << (offset * 2); | ||
86 | |||
87 | __raw_writel(con, base + 0x00); | ||
88 | __raw_writel(dat, base + 0x04); | ||
89 | |||
90 | local_irq_restore(flags); | ||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | static void s3c_gpiolib_set(struct gpio_chip *chip, | ||
95 | unsigned offset, int value) | ||
96 | { | ||
97 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); | ||
98 | void __iomem *base = ourchip->base; | ||
99 | unsigned long flags; | ||
100 | unsigned long dat; | ||
101 | |||
102 | local_irq_save(flags); | ||
103 | |||
104 | dat = __raw_readl(base + 0x04); | ||
105 | dat &= ~(1 << offset); | ||
106 | if (value) | ||
107 | dat |= 1 << offset; | ||
108 | __raw_writel(dat, base + 0x04); | ||
109 | |||
110 | local_irq_restore(flags); | ||
111 | } | ||
112 | |||
113 | static int s3c_gpiolib_get(struct gpio_chip *chip, unsigned offset) | ||
114 | { | ||
115 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); | ||
116 | unsigned long val; | ||
117 | |||
118 | val = __raw_readl(ourchip->base + 0x04); | ||
119 | val >>= offset; | ||
120 | val &= 1; | ||
121 | |||
122 | return val; | ||
123 | } | ||
124 | |||
125 | __init void s3c_gpiolib_add(struct s3c_gpio_chip *chip) | ||
126 | { | ||
127 | struct gpio_chip *gc = &chip->chip; | ||
128 | int ret; | ||
129 | |||
130 | BUG_ON(!chip->base); | ||
131 | BUG_ON(!gc->label); | ||
132 | BUG_ON(!gc->ngpio); | ||
133 | |||
134 | if (!gc->direction_input) | ||
135 | gc->direction_input = s3c_gpiolib_input; | ||
136 | if (!gc->direction_output) | ||
137 | gc->direction_output = s3c_gpiolib_output; | ||
138 | if (!gc->set) | ||
139 | gc->set = s3c_gpiolib_set; | ||
140 | if (!gc->get) | ||
141 | gc->get = s3c_gpiolib_get; | ||
142 | |||
143 | /* gpiochip_add() prints own failure message on error. */ | ||
144 | ret = gpiochip_add(gc); | ||
145 | if (ret >= 0) | ||
146 | s3c_gpiolib_track(chip); | ||
147 | } | ||
diff --git a/arch/arm/plat-s3c/include/mach/io.h b/arch/arm/plat-s3c/include/mach/io.h new file mode 100644 index 000000000000..f6a53631b665 --- /dev/null +++ b/arch/arm/plat-s3c/include/mach/io.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* arch/arm/plat-s3c/include/mach/io.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben-linux@fluff.org> | ||
5 | * | ||
6 | * Default IO routines for plat-s3c based systems, such as S3C24A0 | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARM_ARCH_IO_H | ||
10 | #define __ASM_ARM_ARCH_IO_H | ||
11 | |||
12 | /* No current ISA/PCI bus support. */ | ||
13 | #define __io(a) __typesafe_io(a) | ||
14 | #define __mem_pci(a) (a) | ||
15 | |||
16 | #define IO_SPACE_LIMIT (0xFFFFFFFF) | ||
17 | |||
18 | #endif | ||
diff --git a/arch/arm/mach-s3c2410/include/mach/timex.h b/arch/arm/plat-s3c/include/mach/timex.h index 2a425ed0a7e0..2a425ed0a7e0 100644 --- a/arch/arm/mach-s3c2410/include/mach/timex.h +++ b/arch/arm/plat-s3c/include/mach/timex.h | |||
diff --git a/arch/arm/mach-s3c2410/include/mach/vmalloc.h b/arch/arm/plat-s3c/include/mach/vmalloc.h index 315b0078a34d..bfd2ca6e3074 100644 --- a/arch/arm/mach-s3c2410/include/mach/vmalloc.h +++ b/arch/arm/plat-s3c/include/mach/vmalloc.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/vmalloc.h | 1 | /* arch/arm/plat-s3c/include/mach/vmalloc.h |
2 | * | 2 | * |
3 | * from arch/arm/mach-iop3xx/include/mach/vmalloc.h | 3 | * from arch/arm/mach-iop3xx/include/mach/vmalloc.h |
4 | * | 4 | * |
diff --git a/arch/arm/plat-s3c/include/plat/adc.h b/arch/arm/plat-s3c/include/plat/adc.h new file mode 100644 index 000000000000..43df2a404b0b --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/adc.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* arch/arm/plat-s3c/include/plat/adc.h | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * http://armlinux.simnte.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C24XX ADC driver information | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_PLAT_ADC_H | ||
15 | #define __ASM_PLAT_ADC_H __FILE__ | ||
16 | |||
17 | struct s3c_adc_client; | ||
18 | |||
19 | extern int s3c_adc_start(struct s3c_adc_client *client, | ||
20 | unsigned int channel, unsigned int nr_samples); | ||
21 | |||
22 | extern struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev, | ||
23 | void (*select)(unsigned selected), | ||
24 | void (*conv)(unsigned d0, unsigned d1), | ||
25 | unsigned int is_ts); | ||
26 | |||
27 | extern void s3c_adc_release(struct s3c_adc_client *client); | ||
28 | |||
29 | #endif /* __ASM_PLAT_ADC_H */ | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/clock.h b/arch/arm/plat-s3c/include/plat/clock.h index 235b753cd877..a10622eed43a 100644 --- a/arch/arm/plat-s3c24xx/include/plat/clock.h +++ b/arch/arm/plat-s3c/include/plat/clock.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/clock.h | 1 | /* linux/arch/arm/plat-s3c/include/plat/clock.h |
2 | * linux/arch/arm/mach-s3c2410/clock.h | ||
3 | * | 2 | * |
4 | * Copyright (c) 2004-2005 Simtec Electronics | 3 | * Copyright (c) 2004-2005 Simtec Electronics |
5 | * http://www.simtec.co.uk/products/SWLINUX/ | 4 | * http://www.simtec.co.uk/products/SWLINUX/ |
@@ -10,6 +9,8 @@ | |||
10 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
11 | */ | 10 | */ |
12 | 11 | ||
12 | #include <linux/spinlock.h> | ||
13 | |||
13 | struct clk { | 14 | struct clk { |
14 | struct list_head list; | 15 | struct list_head list; |
15 | struct module *owner; | 16 | struct module *owner; |
@@ -44,21 +45,44 @@ extern struct clk clk_h; | |||
44 | extern struct clk clk_p; | 45 | extern struct clk clk_p; |
45 | extern struct clk clk_mpll; | 46 | extern struct clk clk_mpll; |
46 | extern struct clk clk_upll; | 47 | extern struct clk clk_upll; |
48 | extern struct clk clk_epll; | ||
47 | extern struct clk clk_xtal; | 49 | extern struct clk clk_xtal; |
50 | extern struct clk clk_ext; | ||
51 | |||
52 | /* S3C64XX specific clocks */ | ||
53 | extern struct clk clk_27m; | ||
54 | extern struct clk clk_48m; | ||
48 | 55 | ||
49 | /* exports for arch/arm/mach-s3c2410 | 56 | /* exports for arch/arm/mach-s3c2410 |
50 | * | 57 | * |
51 | * Please DO NOT use these outside of arch/arm/mach-s3c2410 | 58 | * Please DO NOT use these outside of arch/arm/mach-s3c2410 |
52 | */ | 59 | */ |
53 | 60 | ||
54 | extern struct mutex clocks_mutex; | 61 | extern spinlock_t clocks_lock; |
55 | 62 | ||
56 | extern int s3c2410_clkcon_enable(struct clk *clk, int enable); | 63 | extern int s3c2410_clkcon_enable(struct clk *clk, int enable); |
57 | 64 | ||
58 | extern int s3c24xx_register_clock(struct clk *clk); | 65 | extern int s3c24xx_register_clock(struct clk *clk); |
59 | extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks); | 66 | extern int s3c24xx_register_clocks(struct clk **clk, int nr_clks); |
60 | 67 | ||
61 | extern int s3c24xx_setup_clocks(unsigned long xtal, | 68 | extern int s3c24xx_register_baseclocks(unsigned long xtal); |
62 | unsigned long fclk, | 69 | |
63 | unsigned long hclk, | 70 | extern void s3c64xx_register_clocks(void); |
64 | unsigned long pclk); | 71 | |
72 | extern void s3c24xx_setup_clocks(unsigned long fclk, | ||
73 | unsigned long hclk, | ||
74 | unsigned long pclk); | ||
75 | |||
76 | extern void s3c2410_setup_clocks(void); | ||
77 | extern void s3c2412_setup_clocks(void); | ||
78 | extern void s3c244x_setup_clocks(void); | ||
79 | extern void s3c2443_setup_clocks(void); | ||
80 | |||
81 | /* S3C64XX specific functions and clocks */ | ||
82 | |||
83 | extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable); | ||
84 | |||
85 | /* Init for pwm clock code */ | ||
86 | |||
87 | extern void s3c_pwmclk_init(void); | ||
88 | |||
diff --git a/arch/arm/plat-s3c/include/plat/cpu-freq.h b/arch/arm/plat-s3c/include/plat/cpu-freq.h new file mode 100644 index 000000000000..c86a13307e90 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/cpu-freq.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* arch/arm/plat-s3c/include/plat/cpu-freq.h | ||
2 | * | ||
3 | * Copyright (c) 2006,2007 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C CPU frequency scaling support - driver and board | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/cpufreq.h> | ||
15 | |||
16 | struct s3c_cpufreq_info; | ||
17 | struct s3c_cpufreq_board; | ||
18 | struct s3c_iotimings; | ||
19 | |||
20 | struct s3c_freq { | ||
21 | unsigned long fclk; | ||
22 | unsigned long armclk; | ||
23 | unsigned long hclk_tns; /* in 10ths of ns */ | ||
24 | unsigned long hclk; | ||
25 | unsigned long pclk; | ||
26 | }; | ||
27 | |||
28 | /* wrapper 'struct cpufreq_freqs' so that any drivers receiving the | ||
29 | * notification can use this information that is not provided by just | ||
30 | * having the core frequency alone. | ||
31 | */ | ||
32 | |||
33 | struct s3c_cpufreq_freqs { | ||
34 | struct cpufreq_freqs freqs; | ||
35 | struct s3c_freq old; | ||
36 | struct s3c_freq new; | ||
37 | }; | ||
38 | |||
39 | #define to_s3c_cpufreq(_cf) container_of(_cf, struct s3c_cpufreq_freqs, freqs) | ||
40 | |||
41 | struct s3c_clkdivs { | ||
42 | int p_divisor; /* fclk / pclk */ | ||
43 | int h_divisor; /* fclk / hclk */ | ||
44 | int arm_divisor; /* not all cpus have this. */ | ||
45 | unsigned char dvs; /* using dvs mode to arm. */ | ||
46 | }; | ||
47 | |||
48 | #define PLLVAL(_m, _p, _s) (((_m) << 12) | ((_p) << 4) | (_s)) | ||
49 | |||
50 | struct s3c_pllval { | ||
51 | unsigned long freq; | ||
52 | unsigned long pll_reg; | ||
53 | }; | ||
54 | |||
55 | struct s3c_cpufreq_config { | ||
56 | struct s3c_freq freq; | ||
57 | struct s3c_pllval pll; | ||
58 | struct s3c_clkdivs divs; | ||
59 | struct s3c_cpufreq_info *info; /* for core, not drivers */ | ||
60 | struct s3c_cpufreq_board *board; | ||
61 | }; | ||
62 | |||
63 | /* s3c_cpufreq_board | ||
64 | * | ||
65 | * per-board configuraton information, such as memory refresh and | ||
66 | * how to initialise IO timings. | ||
67 | */ | ||
68 | struct s3c_cpufreq_board { | ||
69 | unsigned int refresh; /* refresh period in ns */ | ||
70 | unsigned int auto_io:1; /* automatically init io timings. */ | ||
71 | unsigned int need_io:1; /* set if needs io timing support. */ | ||
72 | |||
73 | /* any non-zero field in here is taken as an upper limit. */ | ||
74 | struct s3c_freq max; /* frequency limits */ | ||
75 | }; | ||
76 | |||
77 | /* Things depending on frequency scaling. */ | ||
78 | #ifdef CONFIG_CPU_FREQ_S3C | ||
79 | #define __init_or_cpufreq | ||
80 | #else | ||
81 | #define __init_or_cpufreq __init | ||
82 | #endif | ||
83 | |||
84 | /* Board functions */ | ||
85 | |||
86 | #ifdef CONFIG_CPU_FREQ_S3C | ||
87 | extern int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board); | ||
88 | #else | ||
89 | |||
90 | static inline int s3c_cpufreq_setboard(struct s3c_cpufreq_board *board) | ||
91 | { | ||
92 | return 0; | ||
93 | } | ||
94 | #endif /* CONFIG_CPU_FREQ_S3C */ | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/cpu.h b/arch/arm/plat-s3c/include/plat/cpu.h index 23e420e8bd5b..e62ae0fcfe56 100644 --- a/arch/arm/plat-s3c24xx/include/plat/cpu.h +++ b/arch/arm/plat-s3c/include/plat/cpu.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/cpu.h | 1 | /* linux/arch/arm/plat-s3c/include/plat/cpu.h |
2 | * | 2 | * |
3 | * Copyright (c) 2004-2005 Simtec Electronics | 3 | * Copyright (c) 2004-2005 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
@@ -18,7 +18,7 @@ | |||
18 | #define MHZ (1000*1000) | 18 | #define MHZ (1000*1000) |
19 | #endif | 19 | #endif |
20 | 20 | ||
21 | #define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000) | 21 | #define print_mhz(m) ((m) / MHZ), (((m) / 1000) % 1000) |
22 | 22 | ||
23 | /* forward declaration */ | 23 | /* forward declaration */ |
24 | struct s3c24xx_uart_resources; | 24 | struct s3c24xx_uart_resources; |
@@ -26,11 +26,28 @@ struct platform_device; | |||
26 | struct s3c2410_uartcfg; | 26 | struct s3c2410_uartcfg; |
27 | struct map_desc; | 27 | struct map_desc; |
28 | 28 | ||
29 | /* per-cpu initialisation function table. */ | ||
30 | |||
31 | struct cpu_table { | ||
32 | unsigned long idcode; | ||
33 | unsigned long idmask; | ||
34 | void (*map_io)(void); | ||
35 | void (*init_uarts)(struct s3c2410_uartcfg *cfg, int no); | ||
36 | void (*init_clocks)(int xtal); | ||
37 | int (*init)(void); | ||
38 | const char *name; | ||
39 | }; | ||
40 | |||
41 | extern void s3c_init_cpu(unsigned long idcode, | ||
42 | struct cpu_table *cpus, unsigned int cputab_size); | ||
43 | |||
29 | /* core initialisation functions */ | 44 | /* core initialisation functions */ |
30 | 45 | ||
31 | extern void s3c24xx_init_irq(void); | 46 | extern void s3c24xx_init_irq(void); |
47 | extern void s3c64xx_init_irq(u32 vic0, u32 vic1); | ||
32 | 48 | ||
33 | extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); | 49 | extern void s3c24xx_init_io(struct map_desc *mach_desc, int size); |
50 | extern void s3c64xx_init_io(struct map_desc *mach_desc, int size); | ||
34 | 51 | ||
35 | extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 52 | extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
36 | 53 | ||
diff --git a/arch/arm/plat-s3c/include/plat/debug-macro.S b/arch/arm/plat-s3c/include/plat/debug-macro.S index 4aa7e2e6c001..3634d4e3708b 100644 --- a/arch/arm/plat-s3c/include/plat/debug-macro.S +++ b/arch/arm/plat-s3c/include/plat/debug-macro.S | |||
@@ -20,7 +20,7 @@ | |||
20 | .endm | 20 | .endm |
21 | 21 | ||
22 | #ifndef fifo_level | 22 | #ifndef fifo_level |
23 | #define fifo_level fifo_level_s3c2410 | 23 | #define fifo_level fifo_level_s3c2440 |
24 | #endif | 24 | #endif |
25 | 25 | ||
26 | .macro fifo_full_s3c2440 rd, rx | 26 | .macro fifo_full_s3c2440 rd, rx |
diff --git a/arch/arm/plat-s3c24xx/include/plat/devs.h b/arch/arm/plat-s3c/include/plat/devs.h index badaac9d64a8..6b1b5231511c 100644 --- a/arch/arm/plat-s3c24xx/include/plat/devs.h +++ b/arch/arm/plat-s3c/include/plat/devs.h | |||
@@ -17,21 +17,26 @@ struct s3c24xx_uart_resources { | |||
17 | }; | 17 | }; |
18 | 18 | ||
19 | extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; | 19 | extern struct s3c24xx_uart_resources s3c2410_uart_resources[]; |
20 | extern struct s3c24xx_uart_resources s3c64xx_uart_resources[]; | ||
20 | 21 | ||
21 | extern struct platform_device *s3c24xx_uart_devs[]; | 22 | extern struct platform_device *s3c24xx_uart_devs[]; |
22 | extern struct platform_device *s3c24xx_uart_src[]; | 23 | extern struct platform_device *s3c24xx_uart_src[]; |
23 | 24 | ||
24 | extern struct platform_device s3c_device_timer[]; | 25 | extern struct platform_device s3c_device_timer[]; |
25 | 26 | ||
27 | extern struct platform_device s3c_device_fb; | ||
26 | extern struct platform_device s3c_device_usb; | 28 | extern struct platform_device s3c_device_usb; |
27 | extern struct platform_device s3c_device_lcd; | 29 | extern struct platform_device s3c_device_lcd; |
28 | extern struct platform_device s3c_device_wdt; | 30 | extern struct platform_device s3c_device_wdt; |
29 | extern struct platform_device s3c_device_i2c; | 31 | extern struct platform_device s3c_device_i2c0; |
32 | extern struct platform_device s3c_device_i2c1; | ||
30 | extern struct platform_device s3c_device_iis; | 33 | extern struct platform_device s3c_device_iis; |
31 | extern struct platform_device s3c_device_rtc; | 34 | extern struct platform_device s3c_device_rtc; |
32 | extern struct platform_device s3c_device_adc; | 35 | extern struct platform_device s3c_device_adc; |
33 | extern struct platform_device s3c_device_sdi; | 36 | extern struct platform_device s3c_device_sdi; |
34 | extern struct platform_device s3c_device_hsmmc; | 37 | extern struct platform_device s3c_device_hsmmc0; |
38 | extern struct platform_device s3c_device_hsmmc1; | ||
39 | extern struct platform_device s3c_device_hsmmc2; | ||
35 | 40 | ||
36 | extern struct platform_device s3c_device_spi0; | 41 | extern struct platform_device s3c_device_spi0; |
37 | extern struct platform_device s3c_device_spi1; | 42 | extern struct platform_device s3c_device_spi1; |
diff --git a/arch/arm/plat-s3c/include/plat/fb.h b/arch/arm/plat-s3c/include/plat/fb.h new file mode 100644 index 000000000000..214ff561b0dd --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/fb.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/fb.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C - FB platform data definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __PLAT_S3C_FB_H | ||
16 | #define __PLAT_S3C_FB_H __FILE__ | ||
17 | |||
18 | /** | ||
19 | * struct s3c_fb_pd_win - per window setup data | ||
20 | * @win_mode: The display parameters to initialise (not for window 0) | ||
21 | * @virtual_x: The virtual X size. | ||
22 | * @virtual_y: The virtual Y size. | ||
23 | */ | ||
24 | struct s3c_fb_pd_win { | ||
25 | struct fb_videomode win_mode; | ||
26 | |||
27 | unsigned short default_bpp; | ||
28 | unsigned short max_bpp; | ||
29 | unsigned short virtual_x; | ||
30 | unsigned short virtual_y; | ||
31 | }; | ||
32 | |||
33 | /** | ||
34 | * struct s3c_fb_platdata - S3C driver platform specific information | ||
35 | * @setup_gpio: Setup the external GPIO pins to the right state to transfer | ||
36 | * the data from the display system to the connected display | ||
37 | * device. | ||
38 | * @vidcon0: The base vidcon0 values to control the panel data format. | ||
39 | * @vidcon1: The base vidcon1 values to control the panel data output. | ||
40 | * @win: The setup data for each hardware window, or NULL for unused. | ||
41 | * @display_mode: The LCD output display mode. | ||
42 | * | ||
43 | * The platform data supplies the video driver with all the information | ||
44 | * it requires to work with the display(s) attached to the machine. It | ||
45 | * controls the initial mode, the number of display windows (0 is always | ||
46 | * the base framebuffer) that are initialised etc. | ||
47 | * | ||
48 | */ | ||
49 | struct s3c_fb_platdata { | ||
50 | void (*setup_gpio)(void); | ||
51 | |||
52 | struct s3c_fb_pd_win *win[S3C_FB_MAX_WIN]; | ||
53 | |||
54 | u32 vidcon0; | ||
55 | u32 vidcon1; | ||
56 | }; | ||
57 | |||
58 | /** | ||
59 | * s3c_fb_set_platdata() - Setup the FB device with platform data. | ||
60 | * @pd: The platform data to set. The data is copied from the passed structure | ||
61 | * so the machine data can mark the data __initdata so that any unused | ||
62 | * machines will end up dumping their data at runtime. | ||
63 | */ | ||
64 | extern void s3c_fb_set_platdata(struct s3c_fb_platdata *pd); | ||
65 | |||
66 | /** | ||
67 | * s3c64xx_fb_gpio_setup_24bpp() - S3C64XX setup function for 24bpp LCD | ||
68 | * | ||
69 | * Initialise the GPIO for an 24bpp LCD display on the RGB interface. | ||
70 | */ | ||
71 | extern void s3c64xx_fb_gpio_setup_24bpp(void); | ||
72 | |||
73 | #endif /* __PLAT_S3C_FB_H */ | ||
diff --git a/arch/arm/plat-s3c/include/plat/gpio-cfg-helpers.h b/arch/arm/plat-s3c/include/plat/gpio-cfg-helpers.h new file mode 100644 index 000000000000..652e2bbdaa20 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/gpio-cfg-helpers.h | |||
@@ -0,0 +1,176 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/gpio-cfg-helper.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C Platform - GPIO pin configuration helper definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | /* This is meant for core cpu support, machine or other driver files | ||
16 | * should not be including this header. | ||
17 | */ | ||
18 | |||
19 | #ifndef __PLAT_GPIO_CFG_HELPERS_H | ||
20 | #define __PLAT_GPIO_CFG_HELPERS_H __FILE__ | ||
21 | |||
22 | /* As a note, all gpio configuration functions are entered exclusively, either | ||
23 | * with the relevant lock held or the system prevented from doing anything else | ||
24 | * by disabling interrupts. | ||
25 | */ | ||
26 | |||
27 | static inline int s3c_gpio_do_setcfg(struct s3c_gpio_chip *chip, | ||
28 | unsigned int off, unsigned int config) | ||
29 | { | ||
30 | return (chip->config->set_config)(chip, off, config); | ||
31 | } | ||
32 | |||
33 | static inline int s3c_gpio_do_setpull(struct s3c_gpio_chip *chip, | ||
34 | unsigned int off, s3c_gpio_pull_t pull) | ||
35 | { | ||
36 | return (chip->config->set_pull)(chip, off, pull); | ||
37 | } | ||
38 | |||
39 | /** | ||
40 | * s3c_gpio_setcfg_s3c24xx - S3C24XX style GPIO configuration. | ||
41 | * @chip: The gpio chip that is being configured. | ||
42 | * @off: The offset for the GPIO being configured. | ||
43 | * @cfg: The configuration value to set. | ||
44 | * | ||
45 | * This helper deal with the GPIO cases where the control register | ||
46 | * has two bits of configuration per gpio, which have the following | ||
47 | * functions: | ||
48 | * 00 = input | ||
49 | * 01 = output | ||
50 | * 1x = special function | ||
51 | */ | ||
52 | extern int s3c_gpio_setcfg_s3c24xx(struct s3c_gpio_chip *chip, | ||
53 | unsigned int off, unsigned int cfg); | ||
54 | |||
55 | /** | ||
56 | * s3c_gpio_setcfg_s3c24xx_a - S3C24XX style GPIO configuration (Bank A) | ||
57 | * @chip: The gpio chip that is being configured. | ||
58 | * @off: The offset for the GPIO being configured. | ||
59 | * @cfg: The configuration value to set. | ||
60 | * | ||
61 | * This helper deal with the GPIO cases where the control register | ||
62 | * has one bit of configuration for the gpio, where setting the bit | ||
63 | * means the pin is in special function mode and unset means output. | ||
64 | */ | ||
65 | extern int s3c_gpio_setcfg_s3c24xx_a(struct s3c_gpio_chip *chip, | ||
66 | unsigned int off, unsigned int cfg); | ||
67 | |||
68 | /** | ||
69 | * s3c_gpio_setcfg_s3c64xx_4bit - S3C64XX 4bit single register GPIO config. | ||
70 | * @chip: The gpio chip that is being configured. | ||
71 | * @off: The offset for the GPIO being configured. | ||
72 | * @cfg: The configuration value to set. | ||
73 | * | ||
74 | * This helper deal with the GPIO cases where the control register has 4 bits | ||
75 | * of control per GPIO, generally in the form of: | ||
76 | * 0000 = Input | ||
77 | * 0001 = Output | ||
78 | * others = Special functions (dependant on bank) | ||
79 | * | ||
80 | * Note, since the code to deal with the case where there are two control | ||
81 | * registers instead of one, we do not have a seperate set of functions for | ||
82 | * each case. | ||
83 | */ | ||
84 | extern int s3c_gpio_setcfg_s3c64xx_4bit(struct s3c_gpio_chip *chip, | ||
85 | unsigned int off, unsigned int cfg); | ||
86 | |||
87 | |||
88 | /* Pull-{up,down} resistor controls. | ||
89 | * | ||
90 | * S3C2410,S3C2440,S3C24A0 = Pull-UP, | ||
91 | * S3C2412,S3C2413 = Pull-Down | ||
92 | * S3C6400,S3C6410 = Pull-Both [None,Down,Up,Undef] | ||
93 | * S3C2443 = Pull-Both [not same as S3C6400] | ||
94 | */ | ||
95 | |||
96 | /** | ||
97 | * s3c_gpio_setpull_1up() - Pull configuration for choice of up or none. | ||
98 | * @chip: The gpio chip that is being configured. | ||
99 | * @off: The offset for the GPIO being configured. | ||
100 | * @param: pull: The pull mode being requested. | ||
101 | * | ||
102 | * This is a helper function for the case where we have GPIOs with one | ||
103 | * bit configuring the presence of a pull-up resistor. | ||
104 | */ | ||
105 | extern int s3c_gpio_setpull_1up(struct s3c_gpio_chip *chip, | ||
106 | unsigned int off, s3c_gpio_pull_t pull); | ||
107 | |||
108 | /** | ||
109 | * s3c_gpio_setpull_1down() - Pull configuration for choice of down or none | ||
110 | * @chip: The gpio chip that is being configured | ||
111 | * @off: The offset for the GPIO being configured | ||
112 | * @param: pull: The pull mode being requested | ||
113 | * | ||
114 | * This is a helper function for the case where we have GPIOs with one | ||
115 | * bit configuring the presence of a pull-down resistor. | ||
116 | */ | ||
117 | extern int s3c_gpio_setpull_1down(struct s3c_gpio_chip *chip, | ||
118 | unsigned int off, s3c_gpio_pull_t pull); | ||
119 | |||
120 | /** | ||
121 | * s3c_gpio_setpull_upown() - Pull configuration for choice of up, down or none | ||
122 | * @chip: The gpio chip that is being configured. | ||
123 | * @off: The offset for the GPIO being configured. | ||
124 | * @param: pull: The pull mode being requested. | ||
125 | * | ||
126 | * This is a helper function for the case where we have GPIOs with two | ||
127 | * bits configuring the presence of a pull resistor, in the following | ||
128 | * order: | ||
129 | * 00 = No pull resistor connected | ||
130 | * 01 = Pull-up resistor connected | ||
131 | * 10 = Pull-down resistor connected | ||
132 | */ | ||
133 | extern int s3c_gpio_setpull_updown(struct s3c_gpio_chip *chip, | ||
134 | unsigned int off, s3c_gpio_pull_t pull); | ||
135 | |||
136 | |||
137 | /** | ||
138 | * s3c_gpio_getpull_updown() - Get configuration for choice of up, down or none | ||
139 | * @chip: The gpio chip that the GPIO pin belongs to | ||
140 | * @off: The offset to the pin to get the configuration of. | ||
141 | * | ||
142 | * This helper function reads the state of the pull-{up,down} resistor for the | ||
143 | * given GPIO in the same case as s3c_gpio_setpull_upown. | ||
144 | */ | ||
145 | extern s3c_gpio_pull_t s3c_gpio_getpull_updown(struct s3c_gpio_chip *chip, | ||
146 | unsigned int off); | ||
147 | |||
148 | /** | ||
149 | * s3c_gpio_setpull_s3c2443() - Pull configuration for s3c2443. | ||
150 | * @chip: The gpio chip that is being configured. | ||
151 | * @off: The offset for the GPIO being configured. | ||
152 | * @param: pull: The pull mode being requested. | ||
153 | * | ||
154 | * This is a helper function for the case where we have GPIOs with two | ||
155 | * bits configuring the presence of a pull resistor, in the following | ||
156 | * order: | ||
157 | * 00 = Pull-up resistor connected | ||
158 | * 10 = Pull-down resistor connected | ||
159 | * x1 = No pull up resistor | ||
160 | */ | ||
161 | extern int s3c_gpio_setpull_s3c2443(struct s3c_gpio_chip *chip, | ||
162 | unsigned int off, s3c_gpio_pull_t pull); | ||
163 | |||
164 | /** | ||
165 | * s3c_gpio_getpull_s3c2443() - Get configuration for s3c2443 pull resistors | ||
166 | * @chip: The gpio chip that the GPIO pin belongs to. | ||
167 | * @off: The offset to the pin to get the configuration of. | ||
168 | * | ||
169 | * This helper function reads the state of the pull-{up,down} resistor for the | ||
170 | * given GPIO in the same case as s3c_gpio_setpull_upown. | ||
171 | */ | ||
172 | extern s3c_gpio_pull_t s3c_gpio_getpull_s3c24xx(struct s3c_gpio_chip *chip, | ||
173 | unsigned int off); | ||
174 | |||
175 | #endif /* __PLAT_GPIO_CFG_HELPERS_H */ | ||
176 | |||
diff --git a/arch/arm/plat-s3c/include/plat/gpio-cfg.h b/arch/arm/plat-s3c/include/plat/gpio-cfg.h new file mode 100644 index 000000000000..29cd6a86cade --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/gpio-cfg.h | |||
@@ -0,0 +1,110 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/gpio-cfg.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C Platform - GPIO pin configuration | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | /* This file contains the necessary definitions to get the basic gpio | ||
16 | * pin configuration done such as setting a pin to input or output or | ||
17 | * changing the pull-{up,down} configurations. | ||
18 | */ | ||
19 | |||
20 | /* Note, this interface is being added to the s3c64xx arch first and will | ||
21 | * be added to the s3c24xx systems later. | ||
22 | */ | ||
23 | |||
24 | #ifndef __PLAT_GPIO_CFG_H | ||
25 | #define __PLAT_GPIO_CFG_H __FILE__ | ||
26 | |||
27 | typedef unsigned int __bitwise__ s3c_gpio_pull_t; | ||
28 | |||
29 | /* forward declaration if gpio-core.h hasn't been included */ | ||
30 | struct s3c_gpio_chip; | ||
31 | |||
32 | /** | ||
33 | * struct s3c_gpio_cfg GPIO configuration | ||
34 | * @cfg_eint: Configuration setting when used for external interrupt source | ||
35 | * @get_pull: Read the current pull configuration for the GPIO | ||
36 | * @set_pull: Set the current pull configuraiton for the GPIO | ||
37 | * @set_config: Set the current configuration for the GPIO | ||
38 | * @get_config: Read the current configuration for the GPIO | ||
39 | * | ||
40 | * Each chip can have more than one type of GPIO bank available and some | ||
41 | * have different capabilites even when they have the same control register | ||
42 | * layouts. Provide an point to vector control routine and provide any | ||
43 | * per-bank configuration information that other systems such as the | ||
44 | * external interrupt code will need. | ||
45 | */ | ||
46 | struct s3c_gpio_cfg { | ||
47 | unsigned int cfg_eint; | ||
48 | |||
49 | s3c_gpio_pull_t (*get_pull)(struct s3c_gpio_chip *chip, unsigned offs); | ||
50 | int (*set_pull)(struct s3c_gpio_chip *chip, unsigned offs, | ||
51 | s3c_gpio_pull_t pull); | ||
52 | |||
53 | unsigned (*get_config)(struct s3c_gpio_chip *chip, unsigned offs); | ||
54 | int (*set_config)(struct s3c_gpio_chip *chip, unsigned offs, | ||
55 | unsigned config); | ||
56 | }; | ||
57 | |||
58 | #define S3C_GPIO_SPECIAL_MARK (0xfffffff0) | ||
59 | #define S3C_GPIO_SPECIAL(x) (S3C_GPIO_SPECIAL_MARK | (x)) | ||
60 | |||
61 | /* Defines for generic pin configurations */ | ||
62 | #define S3C_GPIO_INPUT (S3C_GPIO_SPECIAL(0)) | ||
63 | #define S3C_GPIO_OUTPUT (S3C_GPIO_SPECIAL(1)) | ||
64 | #define S3C_GPIO_SFN(x) (S3C_GPIO_SPECIAL(x)) | ||
65 | |||
66 | #define s3c_gpio_is_cfg_special(_cfg) \ | ||
67 | (((_cfg) & S3C_GPIO_SPECIAL_MARK) == S3C_GPIO_SPECIAL_MARK) | ||
68 | |||
69 | /** | ||
70 | * s3c_gpio_cfgpin() - Change the GPIO function of a pin. | ||
71 | * @pin pin The pin number to configure. | ||
72 | * @pin to The configuration for the pin's function. | ||
73 | * | ||
74 | * Configure which function is actually connected to the external | ||
75 | * pin, such as an gpio input, output or some form of special function | ||
76 | * connected to an internal peripheral block. | ||
77 | */ | ||
78 | extern int s3c_gpio_cfgpin(unsigned int pin, unsigned int to); | ||
79 | |||
80 | /* Define values for the pull-{up,down} available for each gpio pin. | ||
81 | * | ||
82 | * These values control the state of the weak pull-{up,down} resistors | ||
83 | * available on most pins on the S3C series. Not all chips support both | ||
84 | * up or down settings, and it may be dependant on the chip that is being | ||
85 | * used to whether the particular mode is available. | ||
86 | */ | ||
87 | #define S3C_GPIO_PULL_NONE ((__force s3c_gpio_pull_t)0x00) | ||
88 | #define S3C_GPIO_PULL_DOWN ((__force s3c_gpio_pull_t)0x01) | ||
89 | #define S3C_GPIO_PULL_UP ((__force s3c_gpio_pull_t)0x02) | ||
90 | |||
91 | /** | ||
92 | * s3c_gpio_setpull() - set the state of a gpio pin pull resistor | ||
93 | * @pin: The pin number to configure the pull resistor. | ||
94 | * @pull: The configuration for the pull resistor. | ||
95 | * | ||
96 | * This function sets the state of the pull-{up,down} resistor for the | ||
97 | * specified pin. It will return 0 if successfull, or a negative error | ||
98 | * code if the pin cannot support the requested pull setting. | ||
99 | */ | ||
100 | extern int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull); | ||
101 | |||
102 | /** | ||
103 | * s3c_gpio_getpull() - get the pull resistor state of a gpio pin | ||
104 | * @pin: The pin number to get the settings for | ||
105 | * | ||
106 | * Read the pull resistor value for the specified pin. | ||
107 | */ | ||
108 | extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin); | ||
109 | |||
110 | #endif /* __PLAT_GPIO_CFG_H */ | ||
diff --git a/arch/arm/plat-s3c/include/plat/gpio-core.h b/arch/arm/plat-s3c/include/plat/gpio-core.h new file mode 100644 index 000000000000..2fc60a580ac8 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/gpio-core.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/gpio-core.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C Platform - GPIO core | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | /* Define the core gpiolib support functions that the s3c platforms may | ||
15 | * need to extend or change depending on the hardware and the s3c chip | ||
16 | * selected at build or found at run time. | ||
17 | * | ||
18 | * These definitions are not intended for driver inclusion, there is | ||
19 | * nothing here that should not live outside the platform and core | ||
20 | * specific code. | ||
21 | */ | ||
22 | |||
23 | struct s3c_gpio_cfg; | ||
24 | |||
25 | /** | ||
26 | * struct s3c_gpio_chip - wrapper for specific implementation of gpio | ||
27 | * @chip: The chip structure to be exported via gpiolib. | ||
28 | * @base: The base pointer to the gpio configuration registers. | ||
29 | * @config: special function and pull-resistor control information. | ||
30 | * | ||
31 | * This wrapper provides the necessary information for the Samsung | ||
32 | * specific gpios being registered with gpiolib. | ||
33 | */ | ||
34 | struct s3c_gpio_chip { | ||
35 | struct gpio_chip chip; | ||
36 | struct s3c_gpio_cfg *config; | ||
37 | void __iomem *base; | ||
38 | }; | ||
39 | |||
40 | static inline struct s3c_gpio_chip *to_s3c_gpio(struct gpio_chip *gpc) | ||
41 | { | ||
42 | return container_of(gpc, struct s3c_gpio_chip, chip); | ||
43 | } | ||
44 | |||
45 | /** s3c_gpiolib_add() - add the s3c specific version of a gpio_chip. | ||
46 | * @chip: The chip to register | ||
47 | * | ||
48 | * This is a wrapper to gpiochip_add() that takes our specific gpio chip | ||
49 | * information and makes the necessary alterations for the platform and | ||
50 | * notes the information for use with the configuration systems and any | ||
51 | * other parts of the system. | ||
52 | */ | ||
53 | extern void s3c_gpiolib_add(struct s3c_gpio_chip *chip); | ||
54 | |||
55 | /* CONFIG_S3C_GPIO_TRACK enables the tracking of the s3c specific gpios | ||
56 | * for use with the configuration calls, and other parts of the s3c gpiolib | ||
57 | * support code. | ||
58 | * | ||
59 | * Not all s3c support code will need this, as some configurations of cpu | ||
60 | * may only support one or two different configuration options and have an | ||
61 | * easy gpio to s3c_gpio_chip mapping function. If this is the case, then | ||
62 | * the machine support file should provide its own s3c_gpiolib_getchip() | ||
63 | * and any other necessary functions. | ||
64 | */ | ||
65 | |||
66 | #ifdef CONFIG_S3C_GPIO_TRACK | ||
67 | extern struct s3c_gpio_chip *s3c_gpios[S3C_GPIO_END]; | ||
68 | |||
69 | static inline struct s3c_gpio_chip *s3c_gpiolib_getchip(unsigned int chip) | ||
70 | { | ||
71 | return (chip < S3C_GPIO_END) ? s3c_gpios[chip] : NULL; | ||
72 | } | ||
73 | #else | ||
74 | /* machine specific code should provide s3c_gpiolib_getchip */ | ||
75 | |||
76 | static inline void s3c_gpiolib_track(struct s3c_gpio_chip *chip) { } | ||
77 | #endif | ||
diff --git a/arch/arm/plat-s3c/include/plat/iic-core.h b/arch/arm/plat-s3c/include/plat/iic-core.h new file mode 100644 index 000000000000..36397ca20962 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/iic-core.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* arch/arm/mach-s3c2410/include/mach/iic-core.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C - I2C Controller core functions | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_IIC_CORE_H | ||
15 | #define __ASM_ARCH_IIC_CORE_H __FILE__ | ||
16 | |||
17 | /* These functions are only for use with the core support code, such as | ||
18 | * the cpu specific initialisation code | ||
19 | */ | ||
20 | |||
21 | /* re-define device name depending on support. */ | ||
22 | static inline void s3c_i2c0_setname(char *name) | ||
23 | { | ||
24 | /* currently this device is always compiled in */ | ||
25 | s3c_device_i2c0.name = name; | ||
26 | } | ||
27 | |||
28 | static inline void s3c_i2c1_setname(char *name) | ||
29 | { | ||
30 | #ifdef CONFIG_S3C_DEV_I2C1 | ||
31 | s3c_device_i2c1.name = name; | ||
32 | #endif | ||
33 | } | ||
34 | |||
35 | #endif /* __ASM_ARCH_IIC_H */ | ||
diff --git a/include/asm-arm/plat-s3c/iic.h b/arch/arm/plat-s3c/include/plat/iic.h index 5106acaa1d0e..dc1dfcb9bc6c 100644 --- a/include/asm-arm/plat-s3c/iic.h +++ b/arch/arm/plat-s3c/include/plat/iic.h | |||
@@ -28,6 +28,30 @@ struct s3c2410_platform_i2c { | |||
28 | unsigned long max_freq; /* max frequency for the bus */ | 28 | unsigned long max_freq; /* max frequency for the bus */ |
29 | unsigned long min_freq; /* min frequency for the bus */ | 29 | unsigned long min_freq; /* min frequency for the bus */ |
30 | unsigned int sda_delay; /* pclks (s3c2440 only) */ | 30 | unsigned int sda_delay; /* pclks (s3c2440 only) */ |
31 | |||
32 | void (*cfg_gpio)(struct platform_device *dev); | ||
31 | }; | 33 | }; |
32 | 34 | ||
35 | /** | ||
36 | * s3c_i2c0_set_platdata - set platform data for i2c0 device | ||
37 | * @i2c: The platform data to set, or NULL for default data. | ||
38 | * | ||
39 | * Register the given platform data for use with the i2c0 device. This | ||
40 | * call copies the platform data, so the caller can use __initdata for | ||
41 | * their copy. | ||
42 | * | ||
43 | * This call will set cfg_gpio if is null to the default platform | ||
44 | * implementation. | ||
45 | * | ||
46 | * Any user of s3c_device_i2c0 should call this, even if it is with | ||
47 | * NULL to ensure that the device is given the default platform data | ||
48 | * as the driver will no longer carry defaults. | ||
49 | */ | ||
50 | extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
51 | extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c); | ||
52 | |||
53 | /* defined by architecture to configure gpio */ | ||
54 | extern void s3c_i2c0_cfg_gpio(struct platform_device *dev); | ||
55 | extern void s3c_i2c1_cfg_gpio(struct platform_device *dev); | ||
56 | |||
33 | #endif /* __ASM_ARCH_IIC_H */ | 57 | #endif /* __ASM_ARCH_IIC_H */ |
diff --git a/arch/arm/plat-s3c/include/plat/map.h b/arch/arm/plat-s3c/include/plat/map-base.h index b84289d32a54..b84289d32a54 100644 --- a/arch/arm/plat-s3c/include/plat/map.h +++ b/arch/arm/plat-s3c/include/plat/map-base.h | |||
diff --git a/include/asm-arm/plat-s3c/nand.h b/arch/arm/plat-s3c/include/plat/nand.h index f4dcd14af059..f4dcd14af059 100644 --- a/include/asm-arm/plat-s3c/nand.h +++ b/arch/arm/plat-s3c/include/plat/nand.h | |||
diff --git a/include/asm-arm/plat-s3c/regs-ac97.h b/arch/arm/plat-s3c/include/plat/regs-ac97.h index c3878f7acb83..c3878f7acb83 100644 --- a/include/asm-arm/plat-s3c/regs-ac97.h +++ b/arch/arm/plat-s3c/include/plat/regs-ac97.h | |||
diff --git a/arch/arm/plat-s3c/include/plat/regs-fb.h b/arch/arm/plat-s3c/include/plat/regs-fb.h new file mode 100644 index 000000000000..e9ee599d430e --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/regs-fb.h | |||
@@ -0,0 +1,366 @@ | |||
1 | /* arch/arm/plat-s3c/include/plat/regs-fb.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C Platform - new-style framebuffer register definitions | ||
9 | * | ||
10 | * This is the register set for the new style framebuffer interface | ||
11 | * found from the S3C2443 onwards into the S3C2416, S3C2450 and the | ||
12 | * S3C64XX series such as the S3C6400 and S3C6410. | ||
13 | * | ||
14 | * The file does not contain the cpu specific items which are based on | ||
15 | * whichever architecture is selected, it only contains the core of the | ||
16 | * register set. See <mach/regs-fb.h> to get the specifics. | ||
17 | * | ||
18 | * Note, we changed to using regs-fb.h as it avoids any clashes with | ||
19 | * the original regs-lcd.h so out of the way of regs-lcd.h as well as | ||
20 | * indicating the newer block is much more than just an LCD interface. | ||
21 | * | ||
22 | * This program is free software; you can redistribute it and/or modify | ||
23 | * it under the terms of the GNU General Public License version 2 as | ||
24 | * published by the Free Software Foundation. | ||
25 | */ | ||
26 | |||
27 | /* Please do not include this file directly, use <mach/regs-fb.h> to | ||
28 | * ensure all the localised SoC support is included as necessary. | ||
29 | */ | ||
30 | |||
31 | /* VIDCON0 */ | ||
32 | |||
33 | #define VIDCON0 (0x00) | ||
34 | #define VIDCON0_INTERLACE (1 << 29) | ||
35 | #define VIDCON0_VIDOUT_MASK (0x3 << 26) | ||
36 | #define VIDCON0_VIDOUT_SHIFT (26) | ||
37 | #define VIDCON0_VIDOUT_RGB (0x0 << 26) | ||
38 | #define VIDCON0_VIDOUT_TV (0x1 << 26) | ||
39 | #define VIDCON0_VIDOUT_I80_LDI0 (0x2 << 26) | ||
40 | #define VIDCON0_VIDOUT_I80_LDI1 (0x3 << 26) | ||
41 | |||
42 | #define VIDCON0_L1_DATA_MASK (0x7 << 23) | ||
43 | #define VIDCON0_L1_DATA_SHIFT (23) | ||
44 | #define VIDCON0_L1_DATA_16BPP (0x0 << 23) | ||
45 | #define VIDCON0_L1_DATA_18BPP16 (0x1 << 23) | ||
46 | #define VIDCON0_L1_DATA_18BPP9 (0x2 << 23) | ||
47 | #define VIDCON0_L1_DATA_24BPP (0x3 << 23) | ||
48 | #define VIDCON0_L1_DATA_18BPP (0x4 << 23) | ||
49 | #define VIDCON0_L1_DATA_16BPP8 (0x5 << 23) | ||
50 | |||
51 | #define VIDCON0_L0_DATA_MASK (0x7 << 20) | ||
52 | #define VIDCON0_L0_DATA_SHIFT (20) | ||
53 | #define VIDCON0_L0_DATA_16BPP (0x0 << 20) | ||
54 | #define VIDCON0_L0_DATA_18BPP16 (0x1 << 20) | ||
55 | #define VIDCON0_L0_DATA_18BPP9 (0x2 << 20) | ||
56 | #define VIDCON0_L0_DATA_24BPP (0x3 << 20) | ||
57 | #define VIDCON0_L0_DATA_18BPP (0x4 << 20) | ||
58 | #define VIDCON0_L0_DATA_16BPP8 (0x5 << 20) | ||
59 | |||
60 | #define VIDCON0_PNRMODE_MASK (0x3 << 17) | ||
61 | #define VIDCON0_PNRMODE_SHIFT (17) | ||
62 | #define VIDCON0_PNRMODE_RGB (0x0 << 17) | ||
63 | #define VIDCON0_PNRMODE_BGR (0x1 << 17) | ||
64 | #define VIDCON0_PNRMODE_SERIAL_RGB (0x2 << 17) | ||
65 | #define VIDCON0_PNRMODE_SERIAL_BGR (0x3 << 17) | ||
66 | |||
67 | #define VIDCON0_CLKVALUP (1 << 16) | ||
68 | #define VIDCON0_CLKVAL_F_MASK (0xff << 6) | ||
69 | #define VIDCON0_CLKVAL_F_SHIFT (6) | ||
70 | #define VIDCON0_CLKVAL_F_LIMIT (0xff) | ||
71 | #define VIDCON0_CLKVAL_F(_x) ((_x) << 6) | ||
72 | #define VIDCON0_VLCKFREE (1 << 5) | ||
73 | #define VIDCON0_CLKDIR (1 << 4) | ||
74 | |||
75 | #define VIDCON0_CLKSEL_MASK (0x3 << 2) | ||
76 | #define VIDCON0_CLKSEL_SHIFT (2) | ||
77 | #define VIDCON0_CLKSEL_HCLK (0x0 << 2) | ||
78 | #define VIDCON0_CLKSEL_LCD (0x1 << 2) | ||
79 | #define VIDCON0_CLKSEL_27M (0x3 << 2) | ||
80 | |||
81 | #define VIDCON0_ENVID (1 << 1) | ||
82 | #define VIDCON0_ENVID_F (1 << 0) | ||
83 | |||
84 | #define VIDCON1 (0x04) | ||
85 | #define VIDCON1_LINECNT_MASK (0x7ff << 16) | ||
86 | #define VIDCON1_LINECNT_SHIFT (16) | ||
87 | #define VIDCON1_LINECNT_GET(_v) (((_v) >> 16) & 0x7ff) | ||
88 | #define VIDCON1_VSTATUS_MASK (0x3 << 13) | ||
89 | #define VIDCON1_VSTATUS_SHIFT (13) | ||
90 | #define VIDCON1_VSTATUS_VSYNC (0x0 << 13) | ||
91 | #define VIDCON1_VSTATUS_BACKPORCH (0x1 << 13) | ||
92 | #define VIDCON1_VSTATUS_ACTIVE (0x2 << 13) | ||
93 | #define VIDCON1_VSTATUS_FRONTPORCH (0x0 << 13) | ||
94 | |||
95 | #define VIDCON1_INV_VCLK (1 << 7) | ||
96 | #define VIDCON1_INV_HSYNC (1 << 6) | ||
97 | #define VIDCON1_INV_VSYNC (1 << 5) | ||
98 | #define VIDCON1_INV_VDEN (1 << 4) | ||
99 | |||
100 | /* VIDCON2 */ | ||
101 | |||
102 | #define VIDCON2 (0x08) | ||
103 | #define VIDCON2_EN601 (1 << 23) | ||
104 | #define VIDCON2_TVFMTSEL_SW (1 << 14) | ||
105 | |||
106 | #define VIDCON2_TVFMTSEL1_MASK (0x3 << 12) | ||
107 | #define VIDCON2_TVFMTSEL1_SHIFT (12) | ||
108 | #define VIDCON2_TVFMTSEL1_RGB (0x0 << 12) | ||
109 | #define VIDCON2_TVFMTSEL1_YUV422 (0x1 << 12) | ||
110 | #define VIDCON2_TVFMTSEL1_YUV444 (0x2 << 12) | ||
111 | |||
112 | #define VIDCON2_ORGYCbCr (1 << 8) | ||
113 | #define VIDCON2_YUVORDCrCb (1 << 7) | ||
114 | |||
115 | /* VIDTCON0 */ | ||
116 | |||
117 | #define VIDTCON0_VBPDE_MASK (0xff << 24) | ||
118 | #define VIDTCON0_VBPDE_SHIFT (24) | ||
119 | #define VIDTCON0_VBPDE_LIMIT (0xff) | ||
120 | #define VIDTCON0_VBPDE(_x) ((_x) << 24) | ||
121 | |||
122 | #define VIDTCON0_VBPD_MASK (0xff << 16) | ||
123 | #define VIDTCON0_VBPD_SHIFT (16) | ||
124 | #define VIDTCON0_VBPD_LIMIT (0xff) | ||
125 | #define VIDTCON0_VBPD(_x) ((_x) << 16) | ||
126 | |||
127 | #define VIDTCON0_VFPD_MASK (0xff << 8) | ||
128 | #define VIDTCON0_VFPD_SHIFT (8) | ||
129 | #define VIDTCON0_VFPD_LIMIT (0xff) | ||
130 | #define VIDTCON0_VFPD(_x) ((_x) << 8) | ||
131 | |||
132 | #define VIDTCON0_VSPW_MASK (0xff << 0) | ||
133 | #define VIDTCON0_VSPW_SHIFT (0) | ||
134 | #define VIDTCON0_VSPW_LIMIT (0xff) | ||
135 | #define VIDTCON0_VSPW(_x) ((_x) << 0) | ||
136 | |||
137 | /* VIDTCON1 */ | ||
138 | |||
139 | #define VIDTCON1_VFPDE_MASK (0xff << 24) | ||
140 | #define VIDTCON1_VFPDE_SHIFT (24) | ||
141 | #define VIDTCON1_VFPDE_LIMIT (0xff) | ||
142 | #define VIDTCON1_VFPDE(_x) ((_x) << 24) | ||
143 | |||
144 | #define VIDTCON1_HBPD_MASK (0xff << 16) | ||
145 | #define VIDTCON1_HBPD_SHIFT (16) | ||
146 | #define VIDTCON1_HBPD_LIMIT (0xff) | ||
147 | #define VIDTCON1_HBPD(_x) ((_x) << 16) | ||
148 | |||
149 | #define VIDTCON1_HFPD_MASK (0xff << 8) | ||
150 | #define VIDTCON1_HFPD_SHIFT (8) | ||
151 | #define VIDTCON1_HFPD_LIMIT (0xff) | ||
152 | #define VIDTCON1_HFPD(_x) ((_x) << 8) | ||
153 | |||
154 | #define VIDTCON1_HSPW_MASK (0xff << 0) | ||
155 | #define VIDTCON1_HSPW_SHIFT (0) | ||
156 | #define VIDTCON1_HSPW_LIMIT (0xff) | ||
157 | #define VIDTCON1_HSPW(_x) ((_x) << 0) | ||
158 | |||
159 | #define VIDTCON2 (0x18) | ||
160 | #define VIDTCON2_LINEVAL_MASK (0x7ff << 11) | ||
161 | #define VIDTCON2_LINEVAL_SHIFT (11) | ||
162 | #define VIDTCON2_LINEVAL_LIMIT (0x7ff) | ||
163 | #define VIDTCON2_LINEVAL(_x) ((_x) << 11) | ||
164 | |||
165 | #define VIDTCON2_HOZVAL_MASK (0x7ff << 0) | ||
166 | #define VIDTCON2_HOZVAL_SHIFT (0) | ||
167 | #define VIDTCON2_HOZVAL_LIMIT (0x7ff) | ||
168 | #define VIDTCON2_HOZVAL(_x) ((_x) << 0) | ||
169 | |||
170 | /* WINCONx */ | ||
171 | |||
172 | |||
173 | #define WINCONx_BITSWP (1 << 18) | ||
174 | #define WINCONx_BYTSWP (1 << 17) | ||
175 | #define WINCONx_HAWSWP (1 << 16) | ||
176 | #define WINCONx_BURSTLEN_MASK (0x3 << 9) | ||
177 | #define WINCONx_BURSTLEN_SHIFT (9) | ||
178 | #define WINCONx_BURSTLEN_16WORD (0x0 << 9) | ||
179 | #define WINCONx_BURSTLEN_8WORD (0x1 << 9) | ||
180 | #define WINCONx_BURSTLEN_4WORD (0x2 << 9) | ||
181 | |||
182 | #define WINCONx_ENWIN (1 << 0) | ||
183 | #define WINCON0_BPPMODE_MASK (0xf << 2) | ||
184 | #define WINCON0_BPPMODE_SHIFT (2) | ||
185 | #define WINCON0_BPPMODE_1BPP (0x0 << 2) | ||
186 | #define WINCON0_BPPMODE_2BPP (0x1 << 2) | ||
187 | #define WINCON0_BPPMODE_4BPP (0x2 << 2) | ||
188 | #define WINCON0_BPPMODE_8BPP_PALETTE (0x3 << 2) | ||
189 | #define WINCON0_BPPMODE_16BPP_565 (0x5 << 2) | ||
190 | #define WINCON0_BPPMODE_16BPP_1555 (0x7 << 2) | ||
191 | #define WINCON0_BPPMODE_18BPP_666 (0x8 << 2) | ||
192 | #define WINCON0_BPPMODE_24BPP_888 (0xb << 2) | ||
193 | |||
194 | #define WINCON1_BLD_PIX (1 << 6) | ||
195 | |||
196 | #define WINCON1_ALPHA_SEL (1 << 1) | ||
197 | #define WINCON1_BPPMODE_MASK (0xf << 2) | ||
198 | #define WINCON1_BPPMODE_SHIFT (2) | ||
199 | #define WINCON1_BPPMODE_1BPP (0x0 << 2) | ||
200 | #define WINCON1_BPPMODE_2BPP (0x1 << 2) | ||
201 | #define WINCON1_BPPMODE_4BPP (0x2 << 2) | ||
202 | #define WINCON1_BPPMODE_8BPP_PALETTE (0x3 << 2) | ||
203 | #define WINCON1_BPPMODE_8BPP_1232 (0x4 << 2) | ||
204 | #define WINCON1_BPPMODE_16BPP_565 (0x5 << 2) | ||
205 | #define WINCON1_BPPMODE_16BPP_A1555 (0x6 << 2) | ||
206 | #define WINCON1_BPPMODE_16BPP_I1555 (0x7 << 2) | ||
207 | #define WINCON1_BPPMODE_18BPP_666 (0x8 << 2) | ||
208 | #define WINCON1_BPPMODE_18BPP_A1665 (0x9 << 2) | ||
209 | #define WINCON1_BPPMODE_19BPP_A1666 (0xa << 2) | ||
210 | #define WINCON1_BPPMODE_24BPP_888 (0xb << 2) | ||
211 | #define WINCON1_BPPMODE_24BPP_A1887 (0xc << 2) | ||
212 | #define WINCON1_BPPMODE_25BPP_A1888 (0xd << 2) | ||
213 | #define WINCON1_BPPMODE_28BPP_A4888 (0xd << 2) | ||
214 | |||
215 | |||
216 | #define VIDOSDxA_TOPLEFT_X_MASK (0x7ff << 11) | ||
217 | #define VIDOSDxA_TOPLEFT_X_SHIFT (11) | ||
218 | #define VIDOSDxA_TOPLEFT_X_LIMIT (0x7ff) | ||
219 | #define VIDOSDxA_TOPLEFT_X(_x) ((_x) << 11) | ||
220 | |||
221 | #define VIDOSDxA_TOPLEFT_Y_MASK (0x7ff << 0) | ||
222 | #define VIDOSDxA_TOPLEFT_Y_SHIFT (0) | ||
223 | #define VIDOSDxA_TOPLEFT_Y_LIMIT (0x7ff) | ||
224 | #define VIDOSDxA_TOPLEFT_Y(_x) ((_x) << 0) | ||
225 | |||
226 | #define VIDOSDxB_BOTRIGHT_X_MASK (0x7ff << 11) | ||
227 | #define VIDOSDxB_BOTRIGHT_X_SHIFT (11) | ||
228 | #define VIDOSDxB_BOTRIGHT_X_LIMIT (0x7ff) | ||
229 | #define VIDOSDxB_BOTRIGHT_X(_x) ((_x) << 11) | ||
230 | |||
231 | #define VIDOSDxB_BOTRIGHT_Y_MASK (0x7ff << 0) | ||
232 | #define VIDOSDxB_BOTRIGHT_Y_SHIFT (0) | ||
233 | #define VIDOSDxB_BOTRIGHT_Y_LIMIT (0x7ff) | ||
234 | #define VIDOSDxB_BOTRIGHT_Y(_x) ((_x) << 0) | ||
235 | |||
236 | /* For VIDOSD[1..4]C */ | ||
237 | #define VIDISD14C_ALPHA0_R(_x) ((_x) << 20) | ||
238 | #define VIDISD14C_ALPHA0_G_MASK (0xf << 16) | ||
239 | #define VIDISD14C_ALPHA0_G_SHIFT (16) | ||
240 | #define VIDISD14C_ALPHA0_G_LIMIT (0xf) | ||
241 | #define VIDISD14C_ALPHA0_G(_x) ((_x) << 16) | ||
242 | #define VIDISD14C_ALPHA0_B_MASK (0xf << 12) | ||
243 | #define VIDISD14C_ALPHA0_B_SHIFT (12) | ||
244 | #define VIDISD14C_ALPHA0_B_LIMIT (0xf) | ||
245 | #define VIDISD14C_ALPHA0_B(_x) ((_x) << 12) | ||
246 | #define VIDISD14C_ALPHA1_R_MASK (0xf << 8) | ||
247 | #define VIDISD14C_ALPHA1_R_SHIFT (8) | ||
248 | #define VIDISD14C_ALPHA1_R_LIMIT (0xf) | ||
249 | #define VIDISD14C_ALPHA1_R(_x) ((_x) << 8) | ||
250 | #define VIDISD14C_ALPHA1_G_MASK (0xf << 4) | ||
251 | #define VIDISD14C_ALPHA1_G_SHIFT (4) | ||
252 | #define VIDISD14C_ALPHA1_G_LIMIT (0xf) | ||
253 | #define VIDISD14C_ALPHA1_G(_x) ((_x) << 4) | ||
254 | #define VIDISD14C_ALPHA1_B_MASK (0xf << 0) | ||
255 | #define VIDISD14C_ALPHA1_B_SHIFT (0) | ||
256 | #define VIDISD14C_ALPHA1_B_LIMIT (0xf) | ||
257 | #define VIDISD14C_ALPHA1_B(_x) ((_x) << 0) | ||
258 | |||
259 | /* Video buffer addresses */ | ||
260 | #define VIDW_BUF_START(_buff) (0xA0 + ((_buff) * 8)) | ||
261 | #define VIDW_BUF_START1(_buff) (0xA4 + ((_buff) * 8)) | ||
262 | #define VIDW_BUF_END(_buff) (0xD0 + ((_buff) * 8)) | ||
263 | #define VIDW_BUF_END1(_buff) (0xD4 + ((_buff) * 8)) | ||
264 | #define VIDW_BUF_SIZE(_buff) (0x100 + ((_buff) * 4)) | ||
265 | |||
266 | #define VIDW_BUF_SIZE_OFFSET_MASK (0x1fff << 13) | ||
267 | #define VIDW_BUF_SIZE_OFFSET_SHIFT (13) | ||
268 | #define VIDW_BUF_SIZE_OFFSET_LIMIT (0x1fff) | ||
269 | #define VIDW_BUF_SIZE_OFFSET(_x) ((_x) << 13) | ||
270 | |||
271 | #define VIDW_BUF_SIZE_PAGEWIDTH_MASK (0x1fff << 0) | ||
272 | #define VIDW_BUF_SIZE_PAGEWIDTH_SHIFT (0) | ||
273 | #define VIDW_BUF_SIZE_PAGEWIDTH_LIMIT (0x1fff) | ||
274 | #define VIDW_BUF_SIZE_PAGEWIDTH(_x) ((_x) << 0) | ||
275 | |||
276 | /* Interrupt controls and status */ | ||
277 | |||
278 | #define VIDINTCON0_FIFOINTERVAL_MASK (0x3f << 20) | ||
279 | #define VIDINTCON0_FIFOINTERVAL_SHIFT (20) | ||
280 | #define VIDINTCON0_FIFOINTERVAL_LIMIT (0x3f) | ||
281 | #define VIDINTCON0_FIFOINTERVAL(_x) ((_x) << 20) | ||
282 | |||
283 | #define VIDINTCON0_INT_SYSMAINCON (1 << 19) | ||
284 | #define VIDINTCON0_INT_SYSSUBCON (1 << 18) | ||
285 | #define VIDINTCON0_INT_I80IFDONE (1 << 17) | ||
286 | |||
287 | #define VIDINTCON0_FRAMESEL0_MASK (0x3 << 15) | ||
288 | #define VIDINTCON0_FRAMESEL0_SHIFT (15) | ||
289 | #define VIDINTCON0_FRAMESEL0_BACKPORCH (0x0 << 15) | ||
290 | #define VIDINTCON0_FRAMESEL0_VSYNC (0x1 << 15) | ||
291 | #define VIDINTCON0_FRAMESEL0_ACTIVE (0x2 << 15) | ||
292 | #define VIDINTCON0_FRAMESEL0_FRONTPORCH (0x3 << 15) | ||
293 | |||
294 | #define VIDINTCON0_FRAMESEL1 (1 << 14) | ||
295 | #define VIDINTCON0_FRAMESEL1_NONE (0x0 << 14) | ||
296 | #define VIDINTCON0_FRAMESEL1_BACKPORCH (0x1 << 14) | ||
297 | #define VIDINTCON0_FRAMESEL1_VSYNC (0x2 << 14) | ||
298 | #define VIDINTCON0_FRAMESEL1_FRONTPORCH (0x3 << 14) | ||
299 | |||
300 | #define VIDINTCON0_INT_FRAME (1 << 12) | ||
301 | #define VIDINTCON0_FIFIOSEL_MASK (0x7f << 5) | ||
302 | #define VIDINTCON0_FIFIOSEL_SHIFT (5) | ||
303 | #define VIDINTCON0_FIFIOSEL_WINDOW0 (0x1 << 5) | ||
304 | #define VIDINTCON0_FIFIOSEL_WINDOW1 (0x2 << 5) | ||
305 | |||
306 | #define VIDINTCON0_FIFOLEVEL_MASK (0x7 << 2) | ||
307 | #define VIDINTCON0_FIFOLEVEL_SHIFT (2) | ||
308 | #define VIDINTCON0_FIFOLEVEL_TO25PC (0x0 << 2) | ||
309 | #define VIDINTCON0_FIFOLEVEL_TO50PC (0x1 << 2) | ||
310 | #define VIDINTCON0_FIFOLEVEL_TO75PC (0x2 << 2) | ||
311 | #define VIDINTCON0_FIFOLEVEL_EMPTY (0x3 << 2) | ||
312 | #define VIDINTCON0_FIFOLEVEL_FULL (0x4 << 2) | ||
313 | |||
314 | #define VIDINTCON0_INT_FIFO_MASK (0x3 << 0) | ||
315 | #define VIDINTCON0_INT_FIFO_SHIFT (0) | ||
316 | #define VIDINTCON0_INT_ENABLE (1 << 0) | ||
317 | |||
318 | #define VIDINTCON1 (0x134) | ||
319 | #define VIDINTCON1_INT_I180 (1 << 2) | ||
320 | #define VIDINTCON1_INT_FRAME (1 << 1) | ||
321 | #define VIDINTCON1_INT_FIFO (1 << 0) | ||
322 | |||
323 | /* Window colour-key control registers */ | ||
324 | |||
325 | #define WxKEYCON0_KEYBL_EN (1 << 26) | ||
326 | #define WxKEYCON0_KEYEN_F (1 << 25) | ||
327 | #define WxKEYCON0_DIRCON (1 << 24) | ||
328 | #define WxKEYCON0_COMPKEY_MASK (0xffffff << 0) | ||
329 | #define WxKEYCON0_COMPKEY_SHIFT (0) | ||
330 | #define WxKEYCON0_COMPKEY_LIMIT (0xffffff) | ||
331 | #define WxKEYCON0_COMPKEY(_x) ((_x) << 0) | ||
332 | #define WxKEYCON1_COLVAL_MASK (0xffffff << 0) | ||
333 | #define WxKEYCON1_COLVAL_SHIFT (0) | ||
334 | #define WxKEYCON1_COLVAL_LIMIT (0xffffff) | ||
335 | #define WxKEYCON1_COLVAL(_x) ((_x) << 0) | ||
336 | |||
337 | |||
338 | /* Window blanking (MAP) */ | ||
339 | |||
340 | #define WINxMAP_MAP (1 << 24) | ||
341 | #define WINxMAP_MAP_COLOUR_MASK (0xffffff << 0) | ||
342 | #define WINxMAP_MAP_COLOUR_SHIFT (0) | ||
343 | #define WINxMAP_MAP_COLOUR_LIMIT (0xffffff) | ||
344 | #define WINxMAP_MAP_COLOUR(_x) ((_x) << 0) | ||
345 | |||
346 | #define WPALCON_PAL_UPDATE (1 << 9) | ||
347 | #define WPALCON_W1PAL_MASK (0x7 << 3) | ||
348 | #define WPALCON_W1PAL_SHIFT (3) | ||
349 | #define WPALCON_W1PAL_25BPP_A888 (0x0 << 3) | ||
350 | #define WPALCON_W1PAL_24BPP (0x1 << 3) | ||
351 | #define WPALCON_W1PAL_19BPP_A666 (0x2 << 3) | ||
352 | #define WPALCON_W1PAL_18BPP_A665 (0x3 << 3) | ||
353 | #define WPALCON_W1PAL_18BPP (0x4 << 3) | ||
354 | #define WPALCON_W1PAL_16BPP_A555 (0x5 << 3) | ||
355 | #define WPALCON_W1PAL_16BPP_565 (0x6 << 3) | ||
356 | |||
357 | #define WPALCON_W0PAL_MASK (0x7 << 0) | ||
358 | #define WPALCON_W0PAL_SHIFT (0) | ||
359 | #define WPALCON_W0PAL_25BPP_A888 (0x0 << 0) | ||
360 | #define WPALCON_W0PAL_24BPP (0x1 << 0) | ||
361 | #define WPALCON_W0PAL_19BPP_A666 (0x2 << 0) | ||
362 | #define WPALCON_W0PAL_18BPP_A665 (0x3 << 0) | ||
363 | #define WPALCON_W0PAL_18BPP (0x4 << 0) | ||
364 | #define WPALCON_W0PAL_16BPP_A555 (0x5 << 0) | ||
365 | #define WPALCON_W0PAL_16BPP_565 (0x6 << 0) | ||
366 | |||
diff --git a/include/asm-arm/plat-s3c/regs-iic.h b/arch/arm/plat-s3c/include/plat/regs-iic.h index 2f7c17de8ac8..2f7c17de8ac8 100644 --- a/include/asm-arm/plat-s3c/regs-iic.h +++ b/arch/arm/plat-s3c/include/plat/regs-iic.h | |||
diff --git a/arch/arm/plat-s3c/include/plat/regs-irqtype.h b/arch/arm/plat-s3c/include/plat/regs-irqtype.h new file mode 100644 index 000000000000..c63cd3fc5ad3 --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/regs-irqtype.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* arch/arm/plat-s3c/include/plat/regs-irqtype.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C - IRQ detection types. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | /* values for S3C2410_EXTINT0/1/2 and other cpus in the series, including | ||
15 | * the S3C64XX | ||
16 | */ | ||
17 | #define S3C2410_EXTINT_LOWLEV (0x00) | ||
18 | #define S3C2410_EXTINT_HILEV (0x01) | ||
19 | #define S3C2410_EXTINT_FALLEDGE (0x02) | ||
20 | #define S3C2410_EXTINT_RISEEDGE (0x04) | ||
21 | #define S3C2410_EXTINT_BOTHEDGE (0x06) | ||
diff --git a/include/asm-arm/plat-s3c/regs-nand.h b/arch/arm/plat-s3c/include/plat/regs-nand.h index b2caa4bca270..b2caa4bca270 100644 --- a/include/asm-arm/plat-s3c/regs-nand.h +++ b/arch/arm/plat-s3c/include/plat/regs-nand.h | |||
diff --git a/include/asm-arm/plat-s3c/regs-rtc.h b/arch/arm/plat-s3c/include/plat/regs-rtc.h index d5837cf8e402..d5837cf8e402 100644 --- a/include/asm-arm/plat-s3c/regs-rtc.h +++ b/arch/arm/plat-s3c/include/plat/regs-rtc.h | |||
diff --git a/arch/arm/plat-s3c/include/plat/regs-sdhci.h b/arch/arm/plat-s3c/include/plat/regs-sdhci.h new file mode 100644 index 000000000000..e34049ad44cc --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/regs-sdhci.h | |||
@@ -0,0 +1,87 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/regs-sdhci.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C Platform - SDHCI (HSMMC) register definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __PLAT_S3C_SDHCI_REGS_H | ||
16 | #define __PLAT_S3C_SDHCI_REGS_H __FILE__ | ||
17 | |||
18 | #define S3C_SDHCI_CONTROL2 (0x80) | ||
19 | #define S3C_SDHCI_CONTROL3 (0x84) | ||
20 | #define S3C64XX_SDHCI_CONTROL4 (0x8C) | ||
21 | |||
22 | #define S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR (1 << 31) | ||
23 | #define S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK (1 << 30) | ||
24 | #define S3C_SDHCI_CTRL2_CDINVRXD3 (1 << 29) | ||
25 | #define S3C_SDHCI_CTRL2_SLCARDOUT (1 << 28) | ||
26 | |||
27 | #define S3C_SDHCI_CTRL2_FLTCLKSEL_MASK (0xf << 24) | ||
28 | #define S3C_SDHCI_CTRL2_FLTCLKSEL_SHIFT (24) | ||
29 | #define S3C_SDHCI_CTRL2_FLTCLKSEL(_x) ((_x) << 24) | ||
30 | |||
31 | #define S3C_SDHCI_CTRL2_LVLDAT_MASK (0xff << 16) | ||
32 | #define S3C_SDHCI_CTRL2_LVLDAT_SHIFT (16) | ||
33 | #define S3C_SDHCI_CTRL2_LVLDAT(_x) ((_x) << 16) | ||
34 | |||
35 | #define S3C_SDHCI_CTRL2_ENFBCLKTX (1 << 15) | ||
36 | #define S3C_SDHCI_CTRL2_ENFBCLKRX (1 << 14) | ||
37 | #define S3C_SDHCI_CTRL2_SDCDSEL (1 << 13) | ||
38 | #define S3C_SDHCI_CTRL2_SDSIGPC (1 << 12) | ||
39 | #define S3C_SDHCI_CTRL2_ENBUSYCHKTXSTART (1 << 11) | ||
40 | |||
41 | #define S3C_SDHCI_CTRL2_DFCNT_MASK (0x3 << 9) | ||
42 | #define S3C_SDHCI_CTRL2_DFCNT_SHIFT (9) | ||
43 | #define S3C_SDHCI_CTRL2_DFCNT_NONE (0x0 << 9) | ||
44 | #define S3C_SDHCI_CTRL2_DFCNT_4SDCLK (0x1 << 9) | ||
45 | #define S3C_SDHCI_CTRL2_DFCNT_16SDCLK (0x2 << 9) | ||
46 | #define S3C_SDHCI_CTRL2_DFCNT_64SDCLK (0x3 << 9) | ||
47 | |||
48 | #define S3C_SDHCI_CTRL2_ENCLKOUTHOLD (1 << 8) | ||
49 | #define S3C_SDHCI_CTRL2_RWAITMODE (1 << 7) | ||
50 | #define S3C_SDHCI_CTRL2_DISBUFRD (1 << 6) | ||
51 | #define S3C_SDHCI_CTRL2_SELBASECLK_MASK (0x3 << 4) | ||
52 | #define S3C_SDHCI_CTRL2_SELBASECLK_SHIFT (4) | ||
53 | #define S3C_SDHCI_CTRL2_PWRSYNC (1 << 3) | ||
54 | #define S3C_SDHCI_CTRL2_ENCLKOUTMSKCON (1 << 1) | ||
55 | #define S3C_SDHCI_CTRL2_HWINITFIN (1 << 0) | ||
56 | |||
57 | #define S3C_SDHCI_CTRL3_FCSEL3 (1 << 31) | ||
58 | #define S3C_SDHCI_CTRL3_FCSEL2 (1 << 23) | ||
59 | #define S3C_SDHCI_CTRL3_FCSEL1 (1 << 15) | ||
60 | #define S3C_SDHCI_CTRL3_FCSEL0 (1 << 7) | ||
61 | |||
62 | #define S3C_SDHCI_CTRL3_FIA3_MASK (0x7f << 24) | ||
63 | #define S3C_SDHCI_CTRL3_FIA3_SHIFT (24) | ||
64 | #define S3C_SDHCI_CTRL3_FIA3(_x) ((_x) << 24) | ||
65 | |||
66 | #define S3C_SDHCI_CTRL3_FIA2_MASK (0x7f << 16) | ||
67 | #define S3C_SDHCI_CTRL3_FIA2_SHIFT (16) | ||
68 | #define S3C_SDHCI_CTRL3_FIA2(_x) ((_x) << 16) | ||
69 | |||
70 | #define S3C_SDHCI_CTRL3_FIA1_MASK (0x7f << 8) | ||
71 | #define S3C_SDHCI_CTRL3_FIA1_SHIFT (8) | ||
72 | #define S3C_SDHCI_CTRL3_FIA1(_x) ((_x) << 8) | ||
73 | |||
74 | #define S3C_SDHCI_CTRL3_FIA0_MASK (0x7f << 0) | ||
75 | #define S3C_SDHCI_CTRL3_FIA0_SHIFT (0) | ||
76 | #define S3C_SDHCI_CTRL3_FIA0(_x) ((_x) << 0) | ||
77 | |||
78 | #define S3C64XX_SDHCI_CONTROL4_DRIVE_MASK (0x3 << 16) | ||
79 | #define S3C64XX_SDHCI_CONTROL4_DRIVE_SHIFT (16) | ||
80 | #define S3C64XX_SDHCI_CONTROL4_DRIVE_2mA (0x0 << 16) | ||
81 | #define S3C64XX_SDHCI_CONTROL4_DRIVE_4mA (0x1 << 16) | ||
82 | #define S3C64XX_SDHCI_CONTROL4_DRIVE_7mA (0x2 << 16) | ||
83 | #define S3C64XX_SDHCI_CONTROL4_DRIVE_9mA (0x3 << 16) | ||
84 | |||
85 | #define S3C64XX_SDHCI_CONTROL4_BUSY (1) | ||
86 | |||
87 | #endif /* __PLAT_S3C_SDHCI_REGS_H */ | ||
diff --git a/arch/arm/plat-s3c/include/plat/regs-serial.h b/arch/arm/plat-s3c/include/plat/regs-serial.h index a0daa647b92c..487d7d2a7e1d 100644 --- a/arch/arm/plat-s3c/include/plat/regs-serial.h +++ b/arch/arm/plat-s3c/include/plat/regs-serial.h | |||
@@ -77,6 +77,12 @@ | |||
77 | #define S3C2440_UCON_FCLK (3<<10) | 77 | #define S3C2440_UCON_FCLK (3<<10) |
78 | #define S3C2443_UCON_EPLL (3<<10) | 78 | #define S3C2443_UCON_EPLL (3<<10) |
79 | 79 | ||
80 | #define S3C6400_UCON_CLKMASK (3<<10) | ||
81 | #define S3C6400_UCON_PCLK (0<<10) | ||
82 | #define S3C6400_UCON_PCLK2 (2<<10) | ||
83 | #define S3C6400_UCON_UCLK0 (1<<10) | ||
84 | #define S3C6400_UCON_UCLK1 (3<<10) | ||
85 | |||
80 | #define S3C2440_UCON2_FCLK_EN (1<<15) | 86 | #define S3C2440_UCON2_FCLK_EN (1<<15) |
81 | #define S3C2440_UCON0_DIVMASK (15 << 12) | 87 | #define S3C2440_UCON0_DIVMASK (15 << 12) |
82 | #define S3C2440_UCON1_DIVMASK (15 << 12) | 88 | #define S3C2440_UCON1_DIVMASK (15 << 12) |
@@ -149,6 +155,14 @@ | |||
149 | #define S3C2410_UFSTAT_RXMASK (15<<0) | 155 | #define S3C2410_UFSTAT_RXMASK (15<<0) |
150 | #define S3C2410_UFSTAT_RXSHIFT (0) | 156 | #define S3C2410_UFSTAT_RXSHIFT (0) |
151 | 157 | ||
158 | /* UFSTAT S3C24A0 */ | ||
159 | #define S3C24A0_UFSTAT_TXFULL (1 << 14) | ||
160 | #define S3C24A0_UFSTAT_RXFULL (1 << 6) | ||
161 | #define S3C24A0_UFSTAT_TXMASK (63 << 8) | ||
162 | #define S3C24A0_UFSTAT_TXSHIFT (8) | ||
163 | #define S3C24A0_UFSTAT_RXMASK (63) | ||
164 | #define S3C24A0_UFSTAT_RXSHIFT (0) | ||
165 | |||
152 | /* UFSTAT S3C2443 same as S3C2440 */ | 166 | /* UFSTAT S3C2443 same as S3C2440 */ |
153 | #define S3C2440_UFSTAT_TXFULL (1<<14) | 167 | #define S3C2440_UFSTAT_TXFULL (1<<14) |
154 | #define S3C2440_UFSTAT_RXFULL (1<<6) | 168 | #define S3C2440_UFSTAT_RXFULL (1<<6) |
@@ -224,7 +238,7 @@ struct s3c2410_uartcfg { | |||
224 | * or platform_add_device() before the console_initcall() | 238 | * or platform_add_device() before the console_initcall() |
225 | */ | 239 | */ |
226 | 240 | ||
227 | extern struct platform_device *s3c24xx_uart_devs[3]; | 241 | extern struct platform_device *s3c24xx_uart_devs[4]; |
228 | 242 | ||
229 | #endif /* __ASSEMBLY__ */ | 243 | #endif /* __ASSEMBLY__ */ |
230 | 244 | ||
diff --git a/arch/arm/plat-s3c/include/plat/regs-timer.h b/arch/arm/plat-s3c/include/plat/regs-timer.h index cc0eedd53e38..d097d92f8cc7 100644 --- a/arch/arm/plat-s3c/include/plat/regs-timer.h +++ b/arch/arm/plat-s3c/include/plat/regs-timer.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * S3C2410 Timer configuration | 10 | * S3C2410 Timer configuration |
11 | */ | 11 | */ |
12 | 12 | ||
13 | |||
14 | #ifndef __ASM_ARCH_REGS_TIMER_H | 13 | #ifndef __ASM_ARCH_REGS_TIMER_H |
15 | #define __ASM_ARCH_REGS_TIMER_H | 14 | #define __ASM_ARCH_REGS_TIMER_H |
16 | 15 | ||
@@ -21,6 +20,8 @@ | |||
21 | #define S3C2410_TCFG1 S3C_TIMERREG(0x04) | 20 | #define S3C2410_TCFG1 S3C_TIMERREG(0x04) |
22 | #define S3C2410_TCON S3C_TIMERREG(0x08) | 21 | #define S3C2410_TCON S3C_TIMERREG(0x08) |
23 | 22 | ||
23 | #define S3C64XX_TINT_CSTAT S3C_TIMERREG(0x44) | ||
24 | |||
24 | #define S3C2410_TCFG_PRESCALER0_MASK (255<<0) | 25 | #define S3C2410_TCFG_PRESCALER0_MASK (255<<0) |
25 | #define S3C2410_TCFG_PRESCALER1_MASK (255<<8) | 26 | #define S3C2410_TCFG_PRESCALER1_MASK (255<<8) |
26 | #define S3C2410_TCFG_PRESCALER1_SHIFT (8) | 27 | #define S3C2410_TCFG_PRESCALER1_SHIFT (8) |
@@ -72,6 +73,14 @@ | |||
72 | #define S3C2410_TCFG1_MUX_TCLK (4<<0) | 73 | #define S3C2410_TCFG1_MUX_TCLK (4<<0) |
73 | #define S3C2410_TCFG1_MUX_MASK (15<<0) | 74 | #define S3C2410_TCFG1_MUX_MASK (15<<0) |
74 | 75 | ||
76 | #define S3C64XX_TCFG1_MUX_DIV1 (0<<0) | ||
77 | #define S3C64XX_TCFG1_MUX_DIV2 (1<<0) | ||
78 | #define S3C64XX_TCFG1_MUX_DIV4 (2<<0) | ||
79 | #define S3C64XX_TCFG1_MUX_DIV8 (3<<0) | ||
80 | #define S3C64XX_TCFG1_MUX_DIV16 (4<<0) | ||
81 | #define S3C64XX_TCFG1_MUX_TCLK (5<<0) /* 3 sets of TCLK */ | ||
82 | #define S3C64XX_TCFG1_MUX_MASK (15<<0) | ||
83 | |||
75 | #define S3C2410_TCFG1_SHIFT(x) ((x) * 4) | 84 | #define S3C2410_TCFG1_SHIFT(x) ((x) * 4) |
76 | 85 | ||
77 | /* for each timer, we have an count buffer, an compare buffer and | 86 | /* for each timer, we have an count buffer, an compare buffer and |
diff --git a/include/asm-arm/plat-s3c/regs-watchdog.h b/arch/arm/plat-s3c/include/plat/regs-watchdog.h index 4938492470f7..4938492470f7 100644 --- a/include/asm-arm/plat-s3c/regs-watchdog.h +++ b/arch/arm/plat-s3c/include/plat/regs-watchdog.h | |||
diff --git a/arch/arm/plat-s3c/include/plat/sdhci.h b/arch/arm/plat-s3c/include/plat/sdhci.h new file mode 100644 index 000000000000..c4ca3920ca4b --- /dev/null +++ b/arch/arm/plat-s3c/include/plat/sdhci.h | |||
@@ -0,0 +1,108 @@ | |||
1 | /* linux/arch/arm/plat-s3c/include/plat/sdhci.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * Ben Dooks <ben@simtec.co.uk> | ||
7 | * | ||
8 | * S3C Platform - SDHCI (HSMMC) platform data definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __PLAT_S3C_SDHCI_H | ||
16 | #define __PLAT_S3C_SDHCI_H __FILE__ | ||
17 | |||
18 | struct platform_device; | ||
19 | struct mmc_host; | ||
20 | struct mmc_card; | ||
21 | struct mmc_ios; | ||
22 | |||
23 | /** | ||
24 | * struct s3c_sdhci_platdata() - Platform device data for Samsung SDHCI | ||
25 | * @max_width: The maximum number of data bits supported. | ||
26 | * @host_caps: Standard MMC host capabilities bit field. | ||
27 | * @cfg_gpio: Configure the GPIO for a specific card bit-width | ||
28 | * @cfg_card: Configure the interface for a specific card and speed. This | ||
29 | * is necessary the controllers and/or GPIO blocks require the | ||
30 | * changing of driver-strength and other controls dependant on | ||
31 | * the card and speed of operation. | ||
32 | * | ||
33 | * Initialisation data specific to either the machine or the platform | ||
34 | * for the device driver to use or call-back when configuring gpio or | ||
35 | * card speed information. | ||
36 | */ | ||
37 | struct s3c_sdhci_platdata { | ||
38 | unsigned int max_width; | ||
39 | unsigned int host_caps; | ||
40 | |||
41 | char **clocks; /* set of clock sources */ | ||
42 | |||
43 | void (*cfg_gpio)(struct platform_device *dev, int width); | ||
44 | void (*cfg_card)(struct platform_device *dev, | ||
45 | void __iomem *regbase, | ||
46 | struct mmc_ios *ios, | ||
47 | struct mmc_card *card); | ||
48 | }; | ||
49 | |||
50 | /** | ||
51 | * s3c_sdhci0_set_platdata - Set platform data for S3C SDHCI device. | ||
52 | * @pd: Platform data to register to device. | ||
53 | * | ||
54 | * Register the given platform data for use withe S3C SDHCI device. | ||
55 | * The call will copy the platform data, so the board definitions can | ||
56 | * make the structure itself __initdata. | ||
57 | */ | ||
58 | extern void s3c_sdhci0_set_platdata(struct s3c_sdhci_platdata *pd); | ||
59 | extern void s3c_sdhci1_set_platdata(struct s3c_sdhci_platdata *pd); | ||
60 | |||
61 | /* Default platform data, exported so that per-cpu initialisation can | ||
62 | * set the correct one when there are more than one cpu type selected. | ||
63 | */ | ||
64 | |||
65 | extern struct s3c_sdhci_platdata s3c_hsmmc0_def_platdata; | ||
66 | extern struct s3c_sdhci_platdata s3c_hsmmc1_def_platdata; | ||
67 | |||
68 | /* Helper function availablity */ | ||
69 | |||
70 | #ifdef CONFIG_S3C6410_SETUP_SDHCI | ||
71 | extern char *s3c6410_hsmmc_clksrcs[4]; | ||
72 | |||
73 | extern void s3c6410_setup_sdhci0_cfg_gpio(struct platform_device *, int w); | ||
74 | extern void s3c6410_setup_sdhci1_cfg_gpio(struct platform_device *, int w); | ||
75 | |||
76 | extern void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev, | ||
77 | void __iomem *r, | ||
78 | struct mmc_ios *ios, | ||
79 | struct mmc_card *card); | ||
80 | |||
81 | #ifdef CONFIG_S3C_DEV_HSMMC | ||
82 | static inline void s3c6410_default_sdhci0(void) | ||
83 | { | ||
84 | s3c_hsmmc0_def_platdata.clocks = s3c6410_hsmmc_clksrcs; | ||
85 | s3c_hsmmc0_def_platdata.cfg_gpio = s3c6410_setup_sdhci0_cfg_gpio; | ||
86 | s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; | ||
87 | } | ||
88 | #else | ||
89 | static inline void s3c6410_default_sdhci0(void) { } | ||
90 | #endif /* CONFIG_S3C_DEV_HSMMC */ | ||
91 | |||
92 | #ifdef CONFIG_S3C_DEV_HSMMC1 | ||
93 | static inline void s3c6410_default_sdhci1(void) | ||
94 | { | ||
95 | s3c_hsmmc1_def_platdata.clocks = s3c6410_hsmmc_clksrcs; | ||
96 | s3c_hsmmc1_def_platdata.cfg_gpio = s3c6410_setup_sdhci1_cfg_gpio; | ||
97 | s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci0_cfg_card; | ||
98 | } | ||
99 | #else | ||
100 | static inline void s3c6410_default_sdhci1(void) { } | ||
101 | #endif /* CONFIG_S3C_DEV_HSMMC1 */ | ||
102 | |||
103 | #else | ||
104 | static inline void s3c6410_default_sdhci0(void) { } | ||
105 | static inline void s3c6410_default_sdhci1(void) { } | ||
106 | #endif /* CONFIG_S3C6410_SETUP_SDHCI */ | ||
107 | |||
108 | #endif /* __PLAT_S3C_SDHCI_H */ | ||
diff --git a/arch/arm/plat-s3c/include/plat/uncompress.h b/arch/arm/plat-s3c/include/plat/uncompress.h index 4df006b9cc10..6061de87f225 100644 --- a/arch/arm/plat-s3c/include/plat/uncompress.h +++ b/arch/arm/plat-s3c/include/plat/uncompress.h | |||
@@ -28,7 +28,7 @@ static void arch_detect_cpu(void); | |||
28 | /* defines for UART registers */ | 28 | /* defines for UART registers */ |
29 | 29 | ||
30 | #include <plat/regs-serial.h> | 30 | #include <plat/regs-serial.h> |
31 | #include <asm/plat-s3c/regs-watchdog.h> | 31 | #include <plat/regs-watchdog.h> |
32 | 32 | ||
33 | /* working in physical space... */ | 33 | /* working in physical space... */ |
34 | #undef S3C2410_WDOGREG | 34 | #undef S3C2410_WDOGREG |
@@ -37,7 +37,7 @@ static void arch_detect_cpu(void); | |||
37 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ | 37 | /* how many bytes we allow into the FIFO at a time in FIFO mode */ |
38 | #define FIFO_MAX (14) | 38 | #define FIFO_MAX (14) |
39 | 39 | ||
40 | #define uart_base S3C24XX_PA_UART + (0x4000*CONFIG_S3C_LOWLEVEL_UART_PORT) | 40 | #define uart_base S3C_PA_UART + (S3C_UART_OFFSET * CONFIG_S3C_LOWLEVEL_UART_PORT) |
41 | 41 | ||
42 | static __inline__ void | 42 | static __inline__ void |
43 | uart_wr(unsigned int reg, unsigned int val) | 43 | uart_wr(unsigned int reg, unsigned int val) |
@@ -139,6 +139,28 @@ static void arch_decomp_error(const char *x) | |||
139 | 139 | ||
140 | static void error(char *err); | 140 | static void error(char *err); |
141 | 141 | ||
142 | #ifdef CONFIG_S3C_BOOT_UART_FORCE_FIFO | ||
143 | static inline void arch_enable_uart_fifo(void) | ||
144 | { | ||
145 | u32 fifocon = uart_rd(S3C2410_UFCON); | ||
146 | |||
147 | if (!(fifocon & S3C2410_UFCON_FIFOMODE)) { | ||
148 | fifocon |= S3C2410_UFCON_RESETBOTH; | ||
149 | uart_wr(S3C2410_UFCON, fifocon); | ||
150 | |||
151 | /* wait for fifo reset to complete */ | ||
152 | while (1) { | ||
153 | fifocon = uart_rd(S3C2410_UFCON); | ||
154 | if (!(fifocon & S3C2410_UFCON_RESETBOTH)) | ||
155 | break; | ||
156 | } | ||
157 | } | ||
158 | } | ||
159 | #else | ||
160 | #define arch_enable_uart_fifo() do { } while(0) | ||
161 | #endif | ||
162 | |||
163 | |||
142 | static void | 164 | static void |
143 | arch_decomp_setup(void) | 165 | arch_decomp_setup(void) |
144 | { | 166 | { |
@@ -149,6 +171,12 @@ arch_decomp_setup(void) | |||
149 | 171 | ||
150 | arch_detect_cpu(); | 172 | arch_detect_cpu(); |
151 | arch_decomp_wdog_start(); | 173 | arch_decomp_wdog_start(); |
174 | |||
175 | /* Enable the UART FIFOs if they where not enabled and our | ||
176 | * configuration says we should turn them on. | ||
177 | */ | ||
178 | |||
179 | arch_enable_uart_fifo(); | ||
152 | } | 180 | } |
153 | 181 | ||
154 | 182 | ||
diff --git a/arch/arm/plat-s3c/init.c b/arch/arm/plat-s3c/init.c new file mode 100644 index 000000000000..6790edfaca6f --- /dev/null +++ b/arch/arm/plat-s3c/init.c | |||
@@ -0,0 +1,160 @@ | |||
1 | /* linux/arch/arm/plat-s3c/init.c | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C series CPU initialisation | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/ioport.h> | ||
18 | #include <linux/serial_core.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | |||
21 | #include <mach/hardware.h> | ||
22 | |||
23 | #include <asm/mach/arch.h> | ||
24 | #include <asm/mach/map.h> | ||
25 | |||
26 | #include <plat/cpu.h> | ||
27 | #include <plat/devs.h> | ||
28 | #include <plat/clock.h> | ||
29 | |||
30 | #include <plat/regs-serial.h> | ||
31 | |||
32 | static struct cpu_table *cpu; | ||
33 | |||
34 | static struct cpu_table * __init s3c_lookup_cpu(unsigned long idcode, | ||
35 | struct cpu_table *tab, | ||
36 | unsigned int count) | ||
37 | { | ||
38 | for (; count != 0; count--, tab++) { | ||
39 | if ((idcode & tab->idmask) == tab->idcode) | ||
40 | return tab; | ||
41 | } | ||
42 | |||
43 | return NULL; | ||
44 | } | ||
45 | |||
46 | void __init s3c_init_cpu(unsigned long idcode, | ||
47 | struct cpu_table *cputab, unsigned int cputab_size) | ||
48 | { | ||
49 | cpu = s3c_lookup_cpu(idcode, cputab, cputab_size); | ||
50 | |||
51 | if (cpu == NULL) { | ||
52 | printk(KERN_ERR "Unknown CPU type 0x%08lx\n", idcode); | ||
53 | panic("Unknown S3C24XX CPU"); | ||
54 | } | ||
55 | |||
56 | printk("CPU %s (id 0x%08lx)\n", cpu->name, idcode); | ||
57 | |||
58 | if (cpu->map_io == NULL || cpu->init == NULL) { | ||
59 | printk(KERN_ERR "CPU %s support not enabled\n", cpu->name); | ||
60 | panic("Unsupported Samsung CPU"); | ||
61 | } | ||
62 | |||
63 | cpu->map_io(); | ||
64 | } | ||
65 | |||
66 | /* s3c24xx_init_clocks | ||
67 | * | ||
68 | * Initialise the clock subsystem and associated information from the | ||
69 | * given master crystal value. | ||
70 | * | ||
71 | * xtal = 0 -> use default PLL crystal value (normally 12MHz) | ||
72 | * != 0 -> PLL crystal value in Hz | ||
73 | */ | ||
74 | |||
75 | void __init s3c24xx_init_clocks(int xtal) | ||
76 | { | ||
77 | if (xtal == 0) | ||
78 | xtal = 12*1000*1000; | ||
79 | |||
80 | if (cpu == NULL) | ||
81 | panic("s3c24xx_init_clocks: no cpu setup?\n"); | ||
82 | |||
83 | if (cpu->init_clocks == NULL) | ||
84 | panic("s3c24xx_init_clocks: cpu has no clock init\n"); | ||
85 | else | ||
86 | (cpu->init_clocks)(xtal); | ||
87 | } | ||
88 | |||
89 | /* uart management */ | ||
90 | |||
91 | static int nr_uarts __initdata = 0; | ||
92 | |||
93 | static struct s3c2410_uartcfg uart_cfgs[CONFIG_SERIAL_SAMSUNG_UARTS]; | ||
94 | |||
95 | /* s3c24xx_init_uartdevs | ||
96 | * | ||
97 | * copy the specified platform data and configuration into our central | ||
98 | * set of devices, before the data is thrown away after the init process. | ||
99 | * | ||
100 | * This also fills in the array passed to the serial driver for the | ||
101 | * early initialisation of the console. | ||
102 | */ | ||
103 | |||
104 | void __init s3c24xx_init_uartdevs(char *name, | ||
105 | struct s3c24xx_uart_resources *res, | ||
106 | struct s3c2410_uartcfg *cfg, int no) | ||
107 | { | ||
108 | struct platform_device *platdev; | ||
109 | struct s3c2410_uartcfg *cfgptr = uart_cfgs; | ||
110 | struct s3c24xx_uart_resources *resp; | ||
111 | int uart; | ||
112 | |||
113 | memcpy(cfgptr, cfg, sizeof(struct s3c2410_uartcfg) * no); | ||
114 | |||
115 | for (uart = 0; uart < no; uart++, cfg++, cfgptr++) { | ||
116 | platdev = s3c24xx_uart_src[cfgptr->hwport]; | ||
117 | |||
118 | resp = res + cfgptr->hwport; | ||
119 | |||
120 | s3c24xx_uart_devs[uart] = platdev; | ||
121 | |||
122 | platdev->name = name; | ||
123 | platdev->resource = resp->resources; | ||
124 | platdev->num_resources = resp->nr_resources; | ||
125 | |||
126 | platdev->dev.platform_data = cfgptr; | ||
127 | } | ||
128 | |||
129 | nr_uarts = no; | ||
130 | } | ||
131 | |||
132 | void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
133 | { | ||
134 | if (cpu == NULL) | ||
135 | return; | ||
136 | |||
137 | if (cpu->init_uarts == NULL) { | ||
138 | printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n"); | ||
139 | } else | ||
140 | (cpu->init_uarts)(cfg, no); | ||
141 | } | ||
142 | |||
143 | static int __init s3c_arch_init(void) | ||
144 | { | ||
145 | int ret; | ||
146 | |||
147 | // do the correct init for cpu | ||
148 | |||
149 | if (cpu == NULL) | ||
150 | panic("s3c_arch_init: NULL cpu\n"); | ||
151 | |||
152 | ret = (cpu->init)(); | ||
153 | if (ret != 0) | ||
154 | return ret; | ||
155 | |||
156 | ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts); | ||
157 | return ret; | ||
158 | } | ||
159 | |||
160 | arch_initcall(s3c_arch_init); | ||
diff --git a/arch/arm/plat-s3c24xx/pwm-clock.c b/arch/arm/plat-s3c/pwm-clock.c index 3fad68a1e6bc..a318215ab535 100644 --- a/arch/arm/plat-s3c24xx/pwm-clock.c +++ b/arch/arm/plat-s3c/pwm-clock.c | |||
@@ -14,20 +14,20 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
17 | #include <linux/log2.h> | ||
17 | #include <linux/clk.h> | 18 | #include <linux/clk.h> |
18 | #include <linux/err.h> | 19 | #include <linux/err.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
20 | 21 | ||
21 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <mach/map.h> | ||
22 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
23 | 25 | ||
24 | #include <mach/regs-clock.h> | ||
25 | #include <mach/regs-gpio.h> | ||
26 | |||
27 | #include <plat/clock.h> | 26 | #include <plat/clock.h> |
28 | #include <plat/cpu.h> | 27 | #include <plat/cpu.h> |
29 | 28 | ||
30 | #include <plat/regs-timer.h> | 29 | #include <plat/regs-timer.h> |
30 | #include <mach/pwm-clock.h> | ||
31 | 31 | ||
32 | /* Each of the timers 0 through 5 go through the following | 32 | /* Each of the timers 0 through 5 go through the following |
33 | * clock tree, with the inputs depending on the timers. | 33 | * clock tree, with the inputs depending on the timers. |
@@ -73,11 +73,13 @@ | |||
73 | * tclk -------------------------/ | 73 | * tclk -------------------------/ |
74 | */ | 74 | */ |
75 | 75 | ||
76 | static unsigned long clk_pwm_scaler_getrate(struct clk *clk) | 76 | static struct clk clk_timer_scaler[]; |
77 | |||
78 | static unsigned long clk_pwm_scaler_get_rate(struct clk *clk) | ||
77 | { | 79 | { |
78 | unsigned long tcfg0 = __raw_readl(S3C2410_TCFG0); | 80 | unsigned long tcfg0 = __raw_readl(S3C2410_TCFG0); |
79 | 81 | ||
80 | if (clk->id == 1) { | 82 | if (clk == &clk_timer_scaler[1]) { |
81 | tcfg0 &= S3C2410_TCFG_PRESCALER1_MASK; | 83 | tcfg0 &= S3C2410_TCFG_PRESCALER1_MASK; |
82 | tcfg0 >>= S3C2410_TCFG_PRESCALER1_SHIFT; | 84 | tcfg0 >>= S3C2410_TCFG_PRESCALER1_SHIFT; |
83 | } else { | 85 | } else { |
@@ -87,18 +89,61 @@ static unsigned long clk_pwm_scaler_getrate(struct clk *clk) | |||
87 | return clk_get_rate(clk->parent) / (tcfg0 + 1); | 89 | return clk_get_rate(clk->parent) / (tcfg0 + 1); |
88 | } | 90 | } |
89 | 91 | ||
90 | /* TODO - add set rate calls. */ | 92 | static unsigned long clk_pwm_scaler_round_rate(struct clk *clk, |
93 | unsigned long rate) | ||
94 | { | ||
95 | unsigned long parent_rate = clk_get_rate(clk->parent); | ||
96 | unsigned long divisor = parent_rate / rate; | ||
97 | |||
98 | if (divisor > 256) | ||
99 | divisor = 256; | ||
100 | else if (divisor < 2) | ||
101 | divisor = 2; | ||
102 | |||
103 | return parent_rate / divisor; | ||
104 | } | ||
105 | |||
106 | static int clk_pwm_scaler_set_rate(struct clk *clk, unsigned long rate) | ||
107 | { | ||
108 | unsigned long round = clk_pwm_scaler_round_rate(clk, rate); | ||
109 | unsigned long tcfg0; | ||
110 | unsigned long divisor; | ||
111 | unsigned long flags; | ||
112 | |||
113 | divisor = clk_get_rate(clk->parent) / round; | ||
114 | divisor--; | ||
115 | |||
116 | local_irq_save(flags); | ||
117 | tcfg0 = __raw_readl(S3C2410_TCFG0); | ||
118 | |||
119 | if (clk == &clk_timer_scaler[1]) { | ||
120 | tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK; | ||
121 | tcfg0 |= divisor << S3C2410_TCFG_PRESCALER1_SHIFT; | ||
122 | } else { | ||
123 | tcfg0 &= ~S3C2410_TCFG_PRESCALER0_MASK; | ||
124 | tcfg0 |= divisor; | ||
125 | } | ||
126 | |||
127 | __raw_writel(tcfg0, S3C2410_TCFG0); | ||
128 | local_irq_restore(flags); | ||
129 | |||
130 | return 0; | ||
131 | } | ||
91 | 132 | ||
92 | static struct clk clk_timer_scaler[] = { | 133 | static struct clk clk_timer_scaler[] = { |
93 | [0] = { | 134 | [0] = { |
94 | .name = "pwm-scaler0", | 135 | .name = "pwm-scaler0", |
95 | .id = -1, | 136 | .id = -1, |
96 | .get_rate = clk_pwm_scaler_getrate, | 137 | .get_rate = clk_pwm_scaler_get_rate, |
138 | .set_rate = clk_pwm_scaler_set_rate, | ||
139 | .round_rate = clk_pwm_scaler_round_rate, | ||
97 | }, | 140 | }, |
98 | [1] = { | 141 | [1] = { |
99 | .name = "pwm-scaler1", | 142 | .name = "pwm-scaler1", |
100 | .id = -1, | 143 | .id = -1, |
101 | .get_rate = clk_pwm_scaler_getrate, | 144 | .get_rate = clk_pwm_scaler_get_rate, |
145 | .set_rate = clk_pwm_scaler_set_rate, | ||
146 | .round_rate = clk_pwm_scaler_round_rate, | ||
102 | }, | 147 | }, |
103 | }; | 148 | }; |
104 | 149 | ||
@@ -123,11 +168,6 @@ static inline struct pwm_tdiv_clk *to_tdiv(struct clk *clk) | |||
123 | return container_of(clk, struct pwm_tdiv_clk, clk); | 168 | return container_of(clk, struct pwm_tdiv_clk, clk); |
124 | } | 169 | } |
125 | 170 | ||
126 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | ||
127 | { | ||
128 | return 1 << (1 + tcfg1); | ||
129 | } | ||
130 | |||
131 | static unsigned long clk_pwm_tdiv_get_rate(struct clk *clk) | 171 | static unsigned long clk_pwm_tdiv_get_rate(struct clk *clk) |
132 | { | 172 | { |
133 | unsigned long tcfg1 = __raw_readl(S3C2410_TCFG1); | 173 | unsigned long tcfg1 = __raw_readl(S3C2410_TCFG1); |
@@ -136,7 +176,7 @@ static unsigned long clk_pwm_tdiv_get_rate(struct clk *clk) | |||
136 | tcfg1 >>= S3C2410_TCFG1_SHIFT(clk->id); | 176 | tcfg1 >>= S3C2410_TCFG1_SHIFT(clk->id); |
137 | tcfg1 &= S3C2410_TCFG1_MUX_MASK; | 177 | tcfg1 &= S3C2410_TCFG1_MUX_MASK; |
138 | 178 | ||
139 | if (tcfg1 == S3C2410_TCFG1_MUX_TCLK) | 179 | if (pwm_cfg_src_is_tclk(tcfg1)) |
140 | divisor = to_tdiv(clk)->divisor; | 180 | divisor = to_tdiv(clk)->divisor; |
141 | else | 181 | else |
142 | divisor = tcfg_to_divisor(tcfg1); | 182 | divisor = tcfg_to_divisor(tcfg1); |
@@ -153,7 +193,9 @@ static unsigned long clk_pwm_tdiv_round_rate(struct clk *clk, | |||
153 | parent_rate = clk_get_rate(clk->parent); | 193 | parent_rate = clk_get_rate(clk->parent); |
154 | divisor = parent_rate / rate; | 194 | divisor = parent_rate / rate; |
155 | 195 | ||
156 | if (divisor <= 2) | 196 | if (divisor <= 1 && pwm_tdiv_has_div1()) |
197 | divisor = 1; | ||
198 | else if (divisor <= 2) | ||
157 | divisor = 2; | 199 | divisor = 2; |
158 | else if (divisor <= 4) | 200 | else if (divisor <= 4) |
159 | divisor = 4; | 201 | divisor = 4; |
@@ -167,25 +209,7 @@ static unsigned long clk_pwm_tdiv_round_rate(struct clk *clk, | |||
167 | 209 | ||
168 | static unsigned long clk_pwm_tdiv_bits(struct pwm_tdiv_clk *divclk) | 210 | static unsigned long clk_pwm_tdiv_bits(struct pwm_tdiv_clk *divclk) |
169 | { | 211 | { |
170 | unsigned long bits; | 212 | return pwm_tdiv_div_bits(divclk->divisor); |
171 | |||
172 | switch (divclk->divisor) { | ||
173 | case 2: | ||
174 | bits = S3C2410_TCFG1_MUX_DIV2; | ||
175 | break; | ||
176 | case 4: | ||
177 | bits = S3C2410_TCFG1_MUX_DIV4; | ||
178 | break; | ||
179 | case 8: | ||
180 | bits = S3C2410_TCFG1_MUX_DIV8; | ||
181 | break; | ||
182 | case 16: | ||
183 | default: | ||
184 | bits = S3C2410_TCFG1_MUX_DIV16; | ||
185 | break; | ||
186 | } | ||
187 | |||
188 | return bits; | ||
189 | } | 213 | } |
190 | 214 | ||
191 | static void clk_pwm_tdiv_update(struct pwm_tdiv_clk *divclk) | 215 | static void clk_pwm_tdiv_update(struct pwm_tdiv_clk *divclk) |
@@ -226,7 +250,7 @@ static int clk_pwm_tdiv_set_rate(struct clk *clk, unsigned long rate) | |||
226 | /* Update the current MUX settings if we are currently | 250 | /* Update the current MUX settings if we are currently |
227 | * selected as the clock source for this clock. */ | 251 | * selected as the clock source for this clock. */ |
228 | 252 | ||
229 | if (tcfg1 != S3C2410_TCFG1_MUX_TCLK) | 253 | if (!pwm_cfg_src_is_tclk(tcfg1)) |
230 | clk_pwm_tdiv_update(divclk); | 254 | clk_pwm_tdiv_update(divclk); |
231 | 255 | ||
232 | return 0; | 256 | return 0; |
@@ -313,7 +337,7 @@ static int clk_pwm_tin_set_parent(struct clk *clk, struct clk *parent) | |||
313 | unsigned long shift = S3C2410_TCFG1_SHIFT(id); | 337 | unsigned long shift = S3C2410_TCFG1_SHIFT(id); |
314 | 338 | ||
315 | if (parent == s3c24xx_pwmclk_tclk(id)) | 339 | if (parent == s3c24xx_pwmclk_tclk(id)) |
316 | bits = S3C2410_TCFG1_MUX_TCLK << shift; | 340 | bits = S3C_TCFG1_MUX_TCLK << shift; |
317 | else if (parent == s3c24xx_pwmclk_tdiv(id)) | 341 | else if (parent == s3c24xx_pwmclk_tdiv(id)) |
318 | bits = clk_pwm_tdiv_bits(to_tdiv(parent)) << shift; | 342 | bits = clk_pwm_tdiv_bits(to_tdiv(parent)) << shift; |
319 | else | 343 | else |
@@ -375,7 +399,7 @@ static __init int clk_pwm_tin_register(struct clk *pwm) | |||
375 | tcfg1 >>= S3C2410_TCFG1_SHIFT(id); | 399 | tcfg1 >>= S3C2410_TCFG1_SHIFT(id); |
376 | tcfg1 &= S3C2410_TCFG1_MUX_MASK; | 400 | tcfg1 &= S3C2410_TCFG1_MUX_MASK; |
377 | 401 | ||
378 | if (tcfg1 == S3C2410_TCFG1_MUX_TCLK) | 402 | if (pwm_cfg_src_is_tclk(tcfg1)) |
379 | parent = s3c24xx_pwmclk_tclk(id); | 403 | parent = s3c24xx_pwmclk_tclk(id); |
380 | else | 404 | else |
381 | parent = s3c24xx_pwmclk_tdiv(id); | 405 | parent = s3c24xx_pwmclk_tdiv(id); |
@@ -383,7 +407,16 @@ static __init int clk_pwm_tin_register(struct clk *pwm) | |||
383 | return clk_set_parent(pwm, parent); | 407 | return clk_set_parent(pwm, parent); |
384 | } | 408 | } |
385 | 409 | ||
386 | static __init int s3c24xx_pwmclk_init(void) | 410 | /** |
411 | * s3c_pwmclk_init() - initialise pwm clocks | ||
412 | * | ||
413 | * Initialise and register the clocks which provide the inputs for the | ||
414 | * pwm timer blocks. | ||
415 | * | ||
416 | * Note, this call is required by the time core, so must be called after | ||
417 | * the base clocks are added and before any of the initcalls are run. | ||
418 | */ | ||
419 | __init void s3c_pwmclk_init(void) | ||
387 | { | 420 | { |
388 | struct clk *clk_timers; | 421 | struct clk *clk_timers; |
389 | unsigned int clk; | 422 | unsigned int clk; |
@@ -392,7 +425,7 @@ static __init int s3c24xx_pwmclk_init(void) | |||
392 | clk_timers = clk_get(NULL, "timers"); | 425 | clk_timers = clk_get(NULL, "timers"); |
393 | if (IS_ERR(clk_timers)) { | 426 | if (IS_ERR(clk_timers)) { |
394 | printk(KERN_ERR "%s: no parent clock\n", __func__); | 427 | printk(KERN_ERR "%s: no parent clock\n", __func__); |
395 | return -EINVAL; | 428 | return; |
396 | } | 429 | } |
397 | 430 | ||
398 | for (clk = 0; clk < ARRAY_SIZE(clk_timer_scaler); clk++) { | 431 | for (clk = 0; clk < ARRAY_SIZE(clk_timer_scaler); clk++) { |
@@ -400,7 +433,7 @@ static __init int s3c24xx_pwmclk_init(void) | |||
400 | ret = s3c24xx_register_clock(&clk_timer_scaler[clk]); | 433 | ret = s3c24xx_register_clock(&clk_timer_scaler[clk]); |
401 | if (ret < 0) { | 434 | if (ret < 0) { |
402 | printk(KERN_ERR "error adding pwm scaler%d clock\n", clk); | 435 | printk(KERN_ERR "error adding pwm scaler%d clock\n", clk); |
403 | goto err; | 436 | return; |
404 | } | 437 | } |
405 | } | 438 | } |
406 | 439 | ||
@@ -408,7 +441,7 @@ static __init int s3c24xx_pwmclk_init(void) | |||
408 | ret = s3c24xx_register_clock(&clk_timer_tclk[clk]); | 441 | ret = s3c24xx_register_clock(&clk_timer_tclk[clk]); |
409 | if (ret < 0) { | 442 | if (ret < 0) { |
410 | printk(KERN_ERR "error adding pww tclk%d\n", clk); | 443 | printk(KERN_ERR "error adding pww tclk%d\n", clk); |
411 | goto err; | 444 | return; |
412 | } | 445 | } |
413 | } | 446 | } |
414 | 447 | ||
@@ -416,7 +449,7 @@ static __init int s3c24xx_pwmclk_init(void) | |||
416 | ret = clk_pwm_tdiv_register(clk); | 449 | ret = clk_pwm_tdiv_register(clk); |
417 | if (ret < 0) { | 450 | if (ret < 0) { |
418 | printk(KERN_ERR "error adding pwm%d tdiv clock\n", clk); | 451 | printk(KERN_ERR "error adding pwm%d tdiv clock\n", clk); |
419 | goto err; | 452 | return; |
420 | } | 453 | } |
421 | } | 454 | } |
422 | 455 | ||
@@ -424,14 +457,7 @@ static __init int s3c24xx_pwmclk_init(void) | |||
424 | ret = clk_pwm_tin_register(&clk_tin[clk]); | 457 | ret = clk_pwm_tin_register(&clk_tin[clk]); |
425 | if (ret < 0) { | 458 | if (ret < 0) { |
426 | printk(KERN_ERR "error adding pwm%d tin clock\n", clk); | 459 | printk(KERN_ERR "error adding pwm%d tin clock\n", clk); |
427 | goto err; | 460 | return; |
428 | } | 461 | } |
429 | } | 462 | } |
430 | |||
431 | return 0; | ||
432 | |||
433 | err: | ||
434 | return ret; | ||
435 | } | 463 | } |
436 | |||
437 | arch_initcall(s3c24xx_pwmclk_init); | ||
diff --git a/arch/arm/plat-s3c24xx/time.c b/arch/arm/plat-s3c/time.c index c51916236ac0..3b27b29da478 100644 --- a/arch/arm/plat-s3c24xx/time.c +++ b/arch/arm/plat-s3c/time.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/err.h> | 26 | #include <linux/err.h> |
27 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
28 | #include <linux/io.h> | 28 | #include <linux/io.h> |
29 | #include <linux/platform_device.h> | ||
29 | 30 | ||
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
31 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
@@ -36,6 +37,7 @@ | |||
36 | #include <plat/regs-timer.h> | 37 | #include <plat/regs-timer.h> |
37 | #include <mach/regs-irq.h> | 38 | #include <mach/regs-irq.h> |
38 | #include <asm/mach/time.h> | 39 | #include <asm/mach/time.h> |
40 | #include <mach/tick.h> | ||
39 | 41 | ||
40 | #include <plat/clock.h> | 42 | #include <plat/clock.h> |
41 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
@@ -43,6 +45,10 @@ | |||
43 | static unsigned long timer_startval; | 45 | static unsigned long timer_startval; |
44 | static unsigned long timer_usec_ticks; | 46 | static unsigned long timer_usec_ticks; |
45 | 47 | ||
48 | #ifndef TICK_MAX | ||
49 | #define TICK_MAX (0xffff) | ||
50 | #endif | ||
51 | |||
46 | #define TIMER_USEC_SHIFT 16 | 52 | #define TIMER_USEC_SHIFT 16 |
47 | 53 | ||
48 | /* we use the shifted arithmetic to work out the ratio of timer ticks | 54 | /* we use the shifted arithmetic to work out the ratio of timer ticks |
@@ -91,23 +97,19 @@ static inline unsigned long timer_ticks_to_usec(unsigned long ticks) | |||
91 | * IRQs are disabled before entering here from do_gettimeofday() | 97 | * IRQs are disabled before entering here from do_gettimeofday() |
92 | */ | 98 | */ |
93 | 99 | ||
94 | #define SRCPND_TIMER4 (1<<(IRQ_TIMER4 - IRQ_EINT0)) | ||
95 | |||
96 | static unsigned long s3c2410_gettimeoffset (void) | 100 | static unsigned long s3c2410_gettimeoffset (void) |
97 | { | 101 | { |
98 | unsigned long tdone; | 102 | unsigned long tdone; |
99 | unsigned long irqpend; | ||
100 | unsigned long tval; | 103 | unsigned long tval; |
101 | 104 | ||
102 | /* work out how many ticks have gone since last timer interrupt */ | 105 | /* work out how many ticks have gone since last timer interrupt */ |
103 | 106 | ||
104 | tval = __raw_readl(S3C2410_TCNTO(4)); | 107 | tval = __raw_readl(S3C2410_TCNTO(4)); |
105 | tdone = timer_startval - tval; | 108 | tdone = timer_startval - tval; |
106 | 109 | ||
107 | /* check to see if there is an interrupt pending */ | 110 | /* check to see if there is an interrupt pending */ |
108 | 111 | ||
109 | irqpend = __raw_readl(S3C2410_SRCPND); | 112 | if (s3c24xx_ostimer_pending()) { |
110 | if (irqpend & SRCPND_TIMER4) { | ||
111 | /* re-read the timer, and try and fix up for the missed | 113 | /* re-read the timer, and try and fix up for the missed |
112 | * interrupt. Note, the interrupt may go off before the | 114 | * interrupt. Note, the interrupt may go off before the |
113 | * timer has re-loaded from wrapping. | 115 | * timer has re-loaded from wrapping. |
@@ -144,7 +146,11 @@ static struct irqaction s3c2410_timer_irq = { | |||
144 | machine_is_bast() || \ | 146 | machine_is_bast() || \ |
145 | machine_is_vr1000() || \ | 147 | machine_is_vr1000() || \ |
146 | machine_is_anubis() || \ | 148 | machine_is_anubis() || \ |
147 | machine_is_osiris() ) | 149 | machine_is_osiris()) |
150 | |||
151 | static struct clk *tin; | ||
152 | static struct clk *tdiv; | ||
153 | static struct clk *timerclk; | ||
148 | 154 | ||
149 | /* | 155 | /* |
150 | * Set up timer interrupt, and return the current time in seconds. | 156 | * Set up timer interrupt, and return the current time in seconds. |
@@ -159,13 +165,7 @@ static void s3c2410_timer_setup (void) | |||
159 | unsigned long tcfg1; | 165 | unsigned long tcfg1; |
160 | unsigned long tcfg0; | 166 | unsigned long tcfg0; |
161 | 167 | ||
162 | tcnt = 0xffff; /* default value for tcnt */ | 168 | tcnt = TICK_MAX; /* default value for tcnt */ |
163 | |||
164 | /* read the current timer configuration bits */ | ||
165 | |||
166 | tcon = __raw_readl(S3C2410_TCON); | ||
167 | tcfg1 = __raw_readl(S3C2410_TCFG1); | ||
168 | tcfg0 = __raw_readl(S3C2410_TCFG0); | ||
169 | 169 | ||
170 | /* configure the system for whichever machine is in use */ | 170 | /* configure the system for whichever machine is in use */ |
171 | 171 | ||
@@ -174,11 +174,13 @@ static void s3c2410_timer_setup (void) | |||
174 | timer_usec_ticks = timer_mask_usec_ticks(1, 12000000); | 174 | timer_usec_ticks = timer_mask_usec_ticks(1, 12000000); |
175 | tcnt = 12000000 / HZ; | 175 | tcnt = 12000000 / HZ; |
176 | 176 | ||
177 | tcfg1 = __raw_readl(S3C2410_TCFG1); | ||
177 | tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; | 178 | tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; |
178 | tcfg1 |= S3C2410_TCFG1_MUX4_TCLK1; | 179 | tcfg1 |= S3C2410_TCFG1_MUX4_TCLK1; |
180 | __raw_writel(tcfg1, S3C2410_TCFG1); | ||
179 | } else { | 181 | } else { |
180 | unsigned long pclk; | 182 | unsigned long pclk; |
181 | struct clk *clk; | 183 | struct clk *tscaler; |
182 | 184 | ||
183 | /* for the h1940 (and others), we use the pclk from the core | 185 | /* for the h1940 (and others), we use the pclk from the core |
184 | * to generate the timer values. since values around 50 to | 186 | * to generate the timer values. since values around 50 to |
@@ -189,38 +191,34 @@ static void s3c2410_timer_setup (void) | |||
189 | * (8.45 ticks per usec) | 191 | * (8.45 ticks per usec) |
190 | */ | 192 | */ |
191 | 193 | ||
192 | /* this is used as default if no other timer can be found */ | 194 | pclk = clk_get_rate(timerclk); |
193 | |||
194 | clk = clk_get(NULL, "timers"); | ||
195 | if (IS_ERR(clk)) | ||
196 | panic("failed to get clock for system timer"); | ||
197 | |||
198 | clk_enable(clk); | ||
199 | |||
200 | pclk = clk_get_rate(clk); | ||
201 | 195 | ||
202 | /* configure clock tick */ | 196 | /* configure clock tick */ |
203 | 197 | ||
204 | timer_usec_ticks = timer_mask_usec_ticks(6, pclk); | 198 | timer_usec_ticks = timer_mask_usec_ticks(6, pclk); |
205 | 199 | ||
206 | tcfg1 &= ~S3C2410_TCFG1_MUX4_MASK; | 200 | tscaler = clk_get_parent(tdiv); |
207 | tcfg1 |= S3C2410_TCFG1_MUX4_DIV2; | ||
208 | 201 | ||
209 | tcfg0 &= ~S3C2410_TCFG_PRESCALER1_MASK; | 202 | clk_set_rate(tscaler, pclk / 3); |
210 | tcfg0 |= ((6 - 1) / 2) << S3C2410_TCFG_PRESCALER1_SHIFT; | 203 | clk_set_rate(tdiv, pclk / 6); |
204 | clk_set_parent(tin, tdiv); | ||
211 | 205 | ||
212 | tcnt = (pclk / 6) / HZ; | 206 | tcnt = clk_get_rate(tin) / HZ; |
213 | } | 207 | } |
214 | 208 | ||
209 | tcon = __raw_readl(S3C2410_TCON); | ||
210 | tcfg0 = __raw_readl(S3C2410_TCFG0); | ||
211 | tcfg1 = __raw_readl(S3C2410_TCFG1); | ||
212 | |||
215 | /* timers reload after counting zero, so reduce the count by 1 */ | 213 | /* timers reload after counting zero, so reduce the count by 1 */ |
216 | 214 | ||
217 | tcnt--; | 215 | tcnt--; |
218 | 216 | ||
219 | printk("timer tcon=%08lx, tcnt %04lx, tcfg %08lx,%08lx, usec %08lx\n", | 217 | printk(KERN_DEBUG "timer tcon=%08lx, tcnt %04lx, tcfg %08lx,%08lx, usec %08lx\n", |
220 | tcon, tcnt, tcfg0, tcfg1, timer_usec_ticks); | 218 | tcon, tcnt, tcfg0, tcfg1, timer_usec_ticks); |
221 | 219 | ||
222 | /* check to see if timer is within 16bit range... */ | 220 | /* check to see if timer is within 16bit range... */ |
223 | if (tcnt > 0xffff) { | 221 | if (tcnt > TICK_MAX) { |
224 | panic("setup_timer: HZ is too small, cannot configure timer!"); | 222 | panic("setup_timer: HZ is too small, cannot configure timer!"); |
225 | return; | 223 | return; |
226 | } | 224 | } |
@@ -247,8 +245,35 @@ static void s3c2410_timer_setup (void) | |||
247 | __raw_writel(tcon, S3C2410_TCON); | 245 | __raw_writel(tcon, S3C2410_TCON); |
248 | } | 246 | } |
249 | 247 | ||
250 | static void __init s3c2410_timer_init (void) | 248 | static void __init s3c2410_timer_resources(void) |
249 | { | ||
250 | struct platform_device tmpdev; | ||
251 | |||
252 | tmpdev.dev.bus = &platform_bus_type; | ||
253 | tmpdev.id = 4; | ||
254 | |||
255 | timerclk = clk_get(NULL, "timers"); | ||
256 | if (IS_ERR(timerclk)) | ||
257 | panic("failed to get clock for system timer"); | ||
258 | |||
259 | clk_enable(timerclk); | ||
260 | |||
261 | if (!use_tclk1_12()) { | ||
262 | tin = clk_get(&tmpdev.dev, "pwm-tin"); | ||
263 | if (IS_ERR(tin)) | ||
264 | panic("failed to get pwm-tin clock for system timer"); | ||
265 | |||
266 | tdiv = clk_get(&tmpdev.dev, "pwm-tdiv"); | ||
267 | if (IS_ERR(tdiv)) | ||
268 | panic("failed to get pwm-tdiv clock for system timer"); | ||
269 | } | ||
270 | |||
271 | clk_enable(tin); | ||
272 | } | ||
273 | |||
274 | static void __init s3c2410_timer_init(void) | ||
251 | { | 275 | { |
276 | s3c2410_timer_resources(); | ||
252 | s3c2410_timer_setup(); | 277 | s3c2410_timer_setup(); |
253 | setup_irq(IRQ_TIMER4, &s3c2410_timer_irq); | 278 | setup_irq(IRQ_TIMER4, &s3c2410_timer_irq); |
254 | } | 279 | } |
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig index 0af3872fb763..2c8a2f5d75ff 100644 --- a/arch/arm/plat-s3c24xx/Kconfig +++ b/arch/arm/plat-s3c24xx/Kconfig | |||
@@ -6,8 +6,8 @@ | |||
6 | 6 | ||
7 | config PLAT_S3C24XX | 7 | config PLAT_S3C24XX |
8 | bool | 8 | bool |
9 | depends on ARCH_S3C2410 | 9 | depends on ARCH_S3C2410 || ARCH_S3C24A0 |
10 | default y if ARCH_S3C2410 | 10 | default y |
11 | select NO_IOPORT | 11 | select NO_IOPORT |
12 | select ARCH_REQUIRE_GPIOLIB | 12 | select ARCH_REQUIRE_GPIOLIB |
13 | help | 13 | help |
@@ -15,6 +15,19 @@ config PLAT_S3C24XX | |||
15 | 15 | ||
16 | if PLAT_S3C24XX | 16 | if PLAT_S3C24XX |
17 | 17 | ||
18 | # code that is shared between a number of the s3c24xx implementations | ||
19 | |||
20 | config S3C2410_CLOCK | ||
21 | bool | ||
22 | help | ||
23 | Clock code for the S3C2410, and similar processors which | ||
24 | is currently includes the S3C2410, S3C2440, S3C2442. | ||
25 | |||
26 | config S3C24XX_DCLK | ||
27 | bool | ||
28 | help | ||
29 | Clock code for supporting DCLK/CLKOUT on S3C24XX architectures | ||
30 | |||
18 | config CPU_S3C244X | 31 | config CPU_S3C244X |
19 | bool | 32 | bool |
20 | depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442) | 33 | depends on ARCH_S3C2410 && (CPU_S3C2440 || CPU_S3C2442) |
@@ -28,6 +41,27 @@ config S3C24XX_PWM | |||
28 | Support for exporting the PWM timer blocks via the pwm device | 41 | Support for exporting the PWM timer blocks via the pwm device |
29 | system. | 42 | system. |
30 | 43 | ||
44 | |||
45 | # gpio configurations | ||
46 | |||
47 | config S3C24XX_GPIO_EXTRA | ||
48 | int | ||
49 | default 128 if S3C24XX_GPIO_EXTRA128 | ||
50 | default 64 if S3C24XX_GPIO_EXTRA64 | ||
51 | default 0 | ||
52 | |||
53 | config S3C24XX_GPIO_EXTRA64 | ||
54 | bool | ||
55 | help | ||
56 | Add an extra 64 gpio numbers to the available GPIO pool. This is | ||
57 | available for boards that need extra gpios for external devices. | ||
58 | |||
59 | config S3C24XX_GPIO_EXTRA128 | ||
60 | bool | ||
61 | help | ||
62 | Add an extra 128 gpio numbers to the available GPIO pool. This is | ||
63 | available for boards that need extra gpios for external devices. | ||
64 | |||
31 | config PM_SIMTEC | 65 | config PM_SIMTEC |
32 | bool | 66 | bool |
33 | help | 67 | help |
@@ -49,6 +83,29 @@ config S3C2410_DMA_DEBUG | |||
49 | Enable debugging output for the DMA code. This option sends info | 83 | Enable debugging output for the DMA code. This option sends info |
50 | to the kernel log, at priority KERN_DEBUG. | 84 | to the kernel log, at priority KERN_DEBUG. |
51 | 85 | ||
86 | config S3C24XX_ADC | ||
87 | bool "ADC common driver support" | ||
88 | help | ||
89 | Core support for the ADC block found in the S3C24XX SoC systems | ||
90 | for drivers such as the touchscreen and hwmon to use to share | ||
91 | this resource. | ||
92 | |||
93 | # SPI default pin configuration code | ||
94 | |||
95 | config S3C24XX_SPI_BUS0_GPE11_GPE12_GPE13 | ||
96 | bool | ||
97 | help | ||
98 | SPI GPIO configuration code for BUS0 when connected to | ||
99 | GPE11, GPE12 and GPE13. | ||
100 | |||
101 | config S3C24XX_SPI_BUS1_GPG5_GPG6_GPG7 | ||
102 | bool | ||
103 | help | ||
104 | SPI GPIO configuration code for BUS 1 when connected to | ||
105 | GPG5, GPG6 and GPG7. | ||
106 | |||
107 | # common code for s3c24xx based machines, such as the SMDKs. | ||
108 | |||
52 | config MACH_SMDK | 109 | config MACH_SMDK |
53 | bool | 110 | bool |
54 | help | 111 | help |
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile index d82767b2b833..1e0767b266b8 100644 --- a/arch/arm/plat-s3c24xx/Makefile +++ b/arch/arm/plat-s3c24xx/Makefile | |||
@@ -17,9 +17,8 @@ obj-y += irq.o | |||
17 | obj-y += devs.o | 17 | obj-y += devs.o |
18 | obj-y += gpio.o | 18 | obj-y += gpio.o |
19 | obj-y += gpiolib.o | 19 | obj-y += gpiolib.o |
20 | obj-y += time.o | ||
21 | obj-y += clock.o | 20 | obj-y += clock.o |
22 | obj-y += pwm-clock.o | 21 | obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o |
23 | 22 | ||
24 | # Architecture dependant builds | 23 | # Architecture dependant builds |
25 | 24 | ||
@@ -30,5 +29,18 @@ obj-$(CONFIG_PM_SIMTEC) += pm-simtec.o | |||
30 | obj-$(CONFIG_PM) += pm.o | 29 | obj-$(CONFIG_PM) += pm.o |
31 | obj-$(CONFIG_PM) += sleep.o | 30 | obj-$(CONFIG_PM) += sleep.o |
32 | obj-$(CONFIG_HAVE_PWM) += pwm.o | 31 | obj-$(CONFIG_HAVE_PWM) += pwm.o |
32 | obj-$(CONFIG_S3C2410_CLOCK) += s3c2410-clock.o | ||
33 | obj-$(CONFIG_S3C2410_DMA) += dma.o | 33 | obj-$(CONFIG_S3C2410_DMA) += dma.o |
34 | obj-$(CONFIG_S3C24XX_ADC) += adc.o | ||
35 | |||
36 | # device specific setup and/or initialisation | ||
37 | obj-$(CONFIG_ARCH_S3C2410) += setup-i2c.o | ||
38 | |||
39 | # SPI gpio central GPIO functions | ||
40 | |||
41 | obj-$(CONFIG_S3C24XX_SPI_BUS0_GPE11_GPE12_GPE13) += spi-bus0-gpe11_12_13.o | ||
42 | obj-$(CONFIG_S3C24XX_SPI_BUS1_GPG5_GPG6_GPG7) += spi-bus1-gpg5_6_7.o | ||
43 | |||
44 | # machine common support | ||
45 | |||
34 | obj-$(CONFIG_MACH_SMDK) += common-smdk.o | 46 | obj-$(CONFIG_MACH_SMDK) += common-smdk.o |
diff --git a/arch/arm/plat-s3c24xx/adc.c b/arch/arm/plat-s3c24xx/adc.c new file mode 100644 index 000000000000..9a5c767e0a42 --- /dev/null +++ b/arch/arm/plat-s3c24xx/adc.c | |||
@@ -0,0 +1,372 @@ | |||
1 | /* arch/arm/plat-s3c24xx/adc.c | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk>, <ben-linux@fluff.org> | ||
6 | * | ||
7 | * S3C24XX ADC device core | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License. | ||
12 | */ | ||
13 | |||
14 | #include <linux/module.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/list.h> | ||
18 | #include <linux/err.h> | ||
19 | #include <linux/clk.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/io.h> | ||
22 | |||
23 | #include <plat/regs-adc.h> | ||
24 | #include <plat/adc.h> | ||
25 | |||
26 | /* This driver is designed to control the usage of the ADC block between | ||
27 | * the touchscreen and any other drivers that may need to use it, such as | ||
28 | * the hwmon driver. | ||
29 | * | ||
30 | * Priority will be given to the touchscreen driver, but as this itself is | ||
31 | * rate limited it should not starve other requests which are processed in | ||
32 | * order that they are received. | ||
33 | * | ||
34 | * Each user registers to get a client block which uniquely identifies it | ||
35 | * and stores information such as the necessary functions to callback when | ||
36 | * action is required. | ||
37 | */ | ||
38 | |||
39 | struct s3c_adc_client { | ||
40 | struct platform_device *pdev; | ||
41 | struct list_head pend; | ||
42 | |||
43 | unsigned int nr_samples; | ||
44 | unsigned char is_ts; | ||
45 | unsigned char channel; | ||
46 | |||
47 | void (*select_cb)(unsigned selected); | ||
48 | void (*convert_cb)(unsigned val1, unsigned val2); | ||
49 | }; | ||
50 | |||
51 | struct adc_device { | ||
52 | struct platform_device *pdev; | ||
53 | struct platform_device *owner; | ||
54 | struct clk *clk; | ||
55 | struct s3c_adc_client *cur; | ||
56 | struct s3c_adc_client *ts_pend; | ||
57 | void __iomem *regs; | ||
58 | |||
59 | unsigned int prescale; | ||
60 | |||
61 | int irq; | ||
62 | }; | ||
63 | |||
64 | static struct adc_device *adc_dev; | ||
65 | |||
66 | static LIST_HEAD(adc_pending); | ||
67 | |||
68 | #define adc_dbg(_adc, msg...) dev_dbg(&(_adc)->pdev->dev, msg) | ||
69 | |||
70 | static inline void s3c_adc_convert(struct adc_device *adc) | ||
71 | { | ||
72 | unsigned con = readl(adc->regs + S3C2410_ADCCON); | ||
73 | |||
74 | con |= S3C2410_ADCCON_ENABLE_START; | ||
75 | writel(con, adc->regs + S3C2410_ADCCON); | ||
76 | } | ||
77 | |||
78 | static inline void s3c_adc_select(struct adc_device *adc, | ||
79 | struct s3c_adc_client *client) | ||
80 | { | ||
81 | unsigned con = readl(adc->regs + S3C2410_ADCCON); | ||
82 | |||
83 | client->select_cb(1); | ||
84 | |||
85 | con &= ~S3C2410_ADCCON_MUXMASK; | ||
86 | con &= ~S3C2410_ADCCON_STDBM; | ||
87 | con &= ~S3C2410_ADCCON_STARTMASK; | ||
88 | |||
89 | if (!client->is_ts) | ||
90 | con |= S3C2410_ADCCON_SELMUX(client->channel); | ||
91 | |||
92 | writel(con, adc->regs + S3C2410_ADCCON); | ||
93 | } | ||
94 | |||
95 | static void s3c_adc_dbgshow(struct adc_device *adc) | ||
96 | { | ||
97 | adc_dbg(adc, "CON=%08x, TSC=%08x, DLY=%08x\n", | ||
98 | readl(adc->regs + S3C2410_ADCCON), | ||
99 | readl(adc->regs + S3C2410_ADCTSC), | ||
100 | readl(adc->regs + S3C2410_ADCDLY)); | ||
101 | } | ||
102 | |||
103 | void s3c_adc_try(struct adc_device *adc) | ||
104 | { | ||
105 | struct s3c_adc_client *next = adc->ts_pend; | ||
106 | |||
107 | if (!next && !list_empty(&adc_pending)) { | ||
108 | next = list_first_entry(&adc_pending, | ||
109 | struct s3c_adc_client, pend); | ||
110 | list_del(&next->pend); | ||
111 | } else | ||
112 | adc->ts_pend = NULL; | ||
113 | |||
114 | if (next) { | ||
115 | adc_dbg(adc, "new client is %p\n", next); | ||
116 | adc->cur = next; | ||
117 | s3c_adc_select(adc, next); | ||
118 | s3c_adc_convert(adc); | ||
119 | s3c_adc_dbgshow(adc); | ||
120 | } | ||
121 | } | ||
122 | |||
123 | int s3c_adc_start(struct s3c_adc_client *client, | ||
124 | unsigned int channel, unsigned int nr_samples) | ||
125 | { | ||
126 | struct adc_device *adc = adc_dev; | ||
127 | unsigned long flags; | ||
128 | |||
129 | if (!adc) { | ||
130 | printk(KERN_ERR "%s: failed to find adc\n", __func__); | ||
131 | return -EINVAL; | ||
132 | } | ||
133 | |||
134 | if (client->is_ts && adc->ts_pend) | ||
135 | return -EAGAIN; | ||
136 | |||
137 | local_irq_save(flags); | ||
138 | |||
139 | client->channel = channel; | ||
140 | client->nr_samples = nr_samples; | ||
141 | |||
142 | if (client->is_ts) | ||
143 | adc->ts_pend = client; | ||
144 | else | ||
145 | list_add_tail(&client->pend, &adc_pending); | ||
146 | |||
147 | if (!adc->cur) | ||
148 | s3c_adc_try(adc); | ||
149 | local_irq_restore(flags); | ||
150 | |||
151 | return 0; | ||
152 | } | ||
153 | EXPORT_SYMBOL_GPL(s3c_adc_start); | ||
154 | |||
155 | static void s3c_adc_default_select(unsigned select) | ||
156 | { | ||
157 | } | ||
158 | |||
159 | struct s3c_adc_client *s3c_adc_register(struct platform_device *pdev, | ||
160 | void (*select)(unsigned int selected), | ||
161 | void (*conv)(unsigned d0, unsigned d1), | ||
162 | unsigned int is_ts) | ||
163 | { | ||
164 | struct s3c_adc_client *client; | ||
165 | |||
166 | WARN_ON(!pdev); | ||
167 | WARN_ON(!conv); | ||
168 | |||
169 | if (!select) | ||
170 | select = s3c_adc_default_select; | ||
171 | |||
172 | if (!conv || !pdev) | ||
173 | return ERR_PTR(-EINVAL); | ||
174 | |||
175 | client = kzalloc(sizeof(struct s3c_adc_client), GFP_KERNEL); | ||
176 | if (!client) { | ||
177 | dev_err(&pdev->dev, "no memory for adc client\n"); | ||
178 | return ERR_PTR(-ENOMEM); | ||
179 | } | ||
180 | |||
181 | client->pdev = pdev; | ||
182 | client->is_ts = is_ts; | ||
183 | client->select_cb = select; | ||
184 | client->convert_cb = conv; | ||
185 | |||
186 | return client; | ||
187 | } | ||
188 | EXPORT_SYMBOL_GPL(s3c_adc_register); | ||
189 | |||
190 | void s3c_adc_release(struct s3c_adc_client *client) | ||
191 | { | ||
192 | /* We should really check that nothing is in progress. */ | ||
193 | kfree(client); | ||
194 | } | ||
195 | EXPORT_SYMBOL_GPL(s3c_adc_release); | ||
196 | |||
197 | static irqreturn_t s3c_adc_irq(int irq, void *pw) | ||
198 | { | ||
199 | struct adc_device *adc = pw; | ||
200 | struct s3c_adc_client *client = adc->cur; | ||
201 | unsigned long flags; | ||
202 | unsigned data0, data1; | ||
203 | |||
204 | if (!client) { | ||
205 | dev_warn(&adc->pdev->dev, "%s: no adc pending\n", __func__); | ||
206 | return IRQ_HANDLED; | ||
207 | } | ||
208 | |||
209 | data0 = readl(adc->regs + S3C2410_ADCDAT0); | ||
210 | data1 = readl(adc->regs + S3C2410_ADCDAT1); | ||
211 | adc_dbg(adc, "read %d: 0x%04x, 0x%04x\n", client->nr_samples, data0, data1); | ||
212 | |||
213 | (client->convert_cb)(data0 & 0x3ff, data1 & 0x3ff); | ||
214 | |||
215 | if (--client->nr_samples > 0) { | ||
216 | /* fire another conversion for this */ | ||
217 | |||
218 | client->select_cb(1); | ||
219 | s3c_adc_convert(adc); | ||
220 | } else { | ||
221 | local_irq_save(flags); | ||
222 | (client->select_cb)(0); | ||
223 | adc->cur = NULL; | ||
224 | |||
225 | s3c_adc_try(adc); | ||
226 | local_irq_restore(flags); | ||
227 | } | ||
228 | |||
229 | return IRQ_HANDLED; | ||
230 | } | ||
231 | |||
232 | static int s3c_adc_probe(struct platform_device *pdev) | ||
233 | { | ||
234 | struct device *dev = &pdev->dev; | ||
235 | struct adc_device *adc; | ||
236 | struct resource *regs; | ||
237 | int ret; | ||
238 | |||
239 | adc = kzalloc(sizeof(struct adc_device), GFP_KERNEL); | ||
240 | if (adc == NULL) { | ||
241 | dev_err(dev, "failed to allocate adc_device\n"); | ||
242 | return -ENOMEM; | ||
243 | } | ||
244 | |||
245 | adc->pdev = pdev; | ||
246 | adc->prescale = S3C2410_ADCCON_PRSCVL(49); | ||
247 | |||
248 | adc->irq = platform_get_irq(pdev, 1); | ||
249 | if (adc->irq <= 0) { | ||
250 | dev_err(dev, "failed to get adc irq\n"); | ||
251 | ret = -ENOENT; | ||
252 | goto err_alloc; | ||
253 | } | ||
254 | |||
255 | ret = request_irq(adc->irq, s3c_adc_irq, 0, dev_name(dev), adc); | ||
256 | if (ret < 0) { | ||
257 | dev_err(dev, "failed to attach adc irq\n"); | ||
258 | goto err_alloc; | ||
259 | } | ||
260 | |||
261 | adc->clk = clk_get(dev, "adc"); | ||
262 | if (IS_ERR(adc->clk)) { | ||
263 | dev_err(dev, "failed to get adc clock\n"); | ||
264 | ret = PTR_ERR(adc->clk); | ||
265 | goto err_irq; | ||
266 | } | ||
267 | |||
268 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
269 | if (!regs) { | ||
270 | dev_err(dev, "failed to find registers\n"); | ||
271 | ret = -ENXIO; | ||
272 | goto err_clk; | ||
273 | } | ||
274 | |||
275 | adc->regs = ioremap(regs->start, resource_size(regs)); | ||
276 | if (!adc->regs) { | ||
277 | dev_err(dev, "failed to map registers\n"); | ||
278 | ret = -ENXIO; | ||
279 | goto err_clk; | ||
280 | } | ||
281 | |||
282 | clk_enable(adc->clk); | ||
283 | |||
284 | writel(adc->prescale | S3C2410_ADCCON_PRSCEN, | ||
285 | adc->regs + S3C2410_ADCCON); | ||
286 | |||
287 | dev_info(dev, "attached adc driver\n"); | ||
288 | |||
289 | platform_set_drvdata(pdev, adc); | ||
290 | adc_dev = adc; | ||
291 | |||
292 | return 0; | ||
293 | |||
294 | err_clk: | ||
295 | clk_put(adc->clk); | ||
296 | |||
297 | err_irq: | ||
298 | free_irq(adc->irq, adc); | ||
299 | |||
300 | err_alloc: | ||
301 | kfree(adc); | ||
302 | return ret; | ||
303 | } | ||
304 | |||
305 | static int s3c_adc_remove(struct platform_device *pdev) | ||
306 | { | ||
307 | struct adc_device *adc = platform_get_drvdata(pdev); | ||
308 | |||
309 | iounmap(adc->regs); | ||
310 | free_irq(adc->irq, adc); | ||
311 | clk_disable(adc->clk); | ||
312 | clk_put(adc->clk); | ||
313 | kfree(adc); | ||
314 | |||
315 | return 0; | ||
316 | } | ||
317 | |||
318 | #ifdef CONFIG_PM | ||
319 | static int s3c_adc_suspend(struct platform_device *pdev, pm_message_t state) | ||
320 | { | ||
321 | struct adc_device *adc = platform_get_drvdata(pdev); | ||
322 | u32 con; | ||
323 | |||
324 | con = readl(adc->regs + S3C2410_ADCCON); | ||
325 | con |= S3C2410_ADCCON_STDBM; | ||
326 | writel(con, adc->regs + S3C2410_ADCCON); | ||
327 | |||
328 | clk_disable(adc->clk); | ||
329 | |||
330 | return 0; | ||
331 | } | ||
332 | |||
333 | static int s3c_adc_resume(struct platform_device *pdev) | ||
334 | { | ||
335 | struct adc_device *adc = platform_get_drvdata(pdev); | ||
336 | |||
337 | clk_enable(adc->clk); | ||
338 | |||
339 | writel(adc->prescale | S3C2410_ADCCON_PRSCEN, | ||
340 | adc->regs + S3C2410_ADCCON); | ||
341 | |||
342 | return 0; | ||
343 | } | ||
344 | |||
345 | #else | ||
346 | #define s3c_adc_suspend NULL | ||
347 | #define s3c_adc_resume NULL | ||
348 | #endif | ||
349 | |||
350 | static struct platform_driver s3c_adc_driver = { | ||
351 | .driver = { | ||
352 | .name = "s3c24xx-adc", | ||
353 | .owner = THIS_MODULE, | ||
354 | }, | ||
355 | .probe = s3c_adc_probe, | ||
356 | .remove = __devexit_p(s3c_adc_remove), | ||
357 | .suspend = s3c_adc_suspend, | ||
358 | .resume = s3c_adc_resume, | ||
359 | }; | ||
360 | |||
361 | static int __init adc_init(void) | ||
362 | { | ||
363 | int ret; | ||
364 | |||
365 | ret = platform_driver_register(&s3c_adc_driver); | ||
366 | if (ret) | ||
367 | printk(KERN_ERR "%s: failed to add adc driver\n", __func__); | ||
368 | |||
369 | return ret; | ||
370 | } | ||
371 | |||
372 | arch_initcall(adc_init); | ||
diff --git a/arch/arm/plat-s3c24xx/clock-dclk.c b/arch/arm/plat-s3c24xx/clock-dclk.c new file mode 100644 index 000000000000..5b75a797b5ab --- /dev/null +++ b/arch/arm/plat-s3c24xx/clock-dclk.c | |||
@@ -0,0 +1,194 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/clock-dclk.c | ||
2 | * | ||
3 | * Copyright (c) 2004,2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * S3C24XX - definitions for DCLK and CLKOUT registers | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/errno.h> | ||
16 | #include <linux/clk.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <mach/regs-clock.h> | ||
20 | #include <mach/regs-gpio.h> | ||
21 | |||
22 | #include <plat/clock.h> | ||
23 | #include <plat/cpu.h> | ||
24 | |||
25 | /* clocks that could be registered by external code */ | ||
26 | |||
27 | static int s3c24xx_dclk_enable(struct clk *clk, int enable) | ||
28 | { | ||
29 | unsigned long dclkcon = __raw_readl(S3C24XX_DCLKCON); | ||
30 | |||
31 | if (enable) | ||
32 | dclkcon |= clk->ctrlbit; | ||
33 | else | ||
34 | dclkcon &= ~clk->ctrlbit; | ||
35 | |||
36 | __raw_writel(dclkcon, S3C24XX_DCLKCON); | ||
37 | |||
38 | return 0; | ||
39 | } | ||
40 | |||
41 | static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) | ||
42 | { | ||
43 | unsigned long dclkcon; | ||
44 | unsigned int uclk; | ||
45 | |||
46 | if (parent == &clk_upll) | ||
47 | uclk = 1; | ||
48 | else if (parent == &clk_p) | ||
49 | uclk = 0; | ||
50 | else | ||
51 | return -EINVAL; | ||
52 | |||
53 | clk->parent = parent; | ||
54 | |||
55 | dclkcon = __raw_readl(S3C24XX_DCLKCON); | ||
56 | |||
57 | if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) { | ||
58 | if (uclk) | ||
59 | dclkcon |= S3C2410_DCLKCON_DCLK0_UCLK; | ||
60 | else | ||
61 | dclkcon &= ~S3C2410_DCLKCON_DCLK0_UCLK; | ||
62 | } else { | ||
63 | if (uclk) | ||
64 | dclkcon |= S3C2410_DCLKCON_DCLK1_UCLK; | ||
65 | else | ||
66 | dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK; | ||
67 | } | ||
68 | |||
69 | __raw_writel(dclkcon, S3C24XX_DCLKCON); | ||
70 | |||
71 | return 0; | ||
72 | } | ||
73 | static unsigned long s3c24xx_calc_div(struct clk *clk, unsigned long rate) | ||
74 | { | ||
75 | unsigned long div; | ||
76 | |||
77 | if ((rate == 0) || !clk->parent) | ||
78 | return 0; | ||
79 | |||
80 | div = clk_get_rate(clk->parent) / rate; | ||
81 | if (div < 2) | ||
82 | div = 2; | ||
83 | else if (div > 16) | ||
84 | div = 16; | ||
85 | |||
86 | return div; | ||
87 | } | ||
88 | |||
89 | static unsigned long s3c24xx_round_dclk_rate(struct clk *clk, | ||
90 | unsigned long rate) | ||
91 | { | ||
92 | unsigned long div = s3c24xx_calc_div(clk, rate); | ||
93 | |||
94 | if (div == 0) | ||
95 | return 0; | ||
96 | |||
97 | return clk_get_rate(clk->parent) / div; | ||
98 | } | ||
99 | |||
100 | static int s3c24xx_set_dclk_rate(struct clk *clk, unsigned long rate) | ||
101 | { | ||
102 | unsigned long mask, data, div = s3c24xx_calc_div(clk, rate); | ||
103 | |||
104 | if (div == 0) | ||
105 | return -EINVAL; | ||
106 | |||
107 | if (clk == &s3c24xx_dclk0) { | ||
108 | mask = S3C2410_DCLKCON_DCLK0_DIV_MASK | | ||
109 | S3C2410_DCLKCON_DCLK0_CMP_MASK; | ||
110 | data = S3C2410_DCLKCON_DCLK0_DIV(div) | | ||
111 | S3C2410_DCLKCON_DCLK0_CMP((div + 1) / 2); | ||
112 | } else if (clk == &s3c24xx_dclk1) { | ||
113 | mask = S3C2410_DCLKCON_DCLK1_DIV_MASK | | ||
114 | S3C2410_DCLKCON_DCLK1_CMP_MASK; | ||
115 | data = S3C2410_DCLKCON_DCLK1_DIV(div) | | ||
116 | S3C2410_DCLKCON_DCLK1_CMP((div + 1) / 2); | ||
117 | } else | ||
118 | return -EINVAL; | ||
119 | |||
120 | clk->rate = clk_get_rate(clk->parent) / div; | ||
121 | __raw_writel(((__raw_readl(S3C24XX_DCLKCON) & ~mask) | data), | ||
122 | S3C24XX_DCLKCON); | ||
123 | return clk->rate; | ||
124 | } | ||
125 | static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent) | ||
126 | { | ||
127 | unsigned long mask; | ||
128 | unsigned long source; | ||
129 | |||
130 | /* calculate the MISCCR setting for the clock */ | ||
131 | |||
132 | if (parent == &clk_xtal) | ||
133 | source = S3C2410_MISCCR_CLK0_MPLL; | ||
134 | else if (parent == &clk_upll) | ||
135 | source = S3C2410_MISCCR_CLK0_UPLL; | ||
136 | else if (parent == &clk_f) | ||
137 | source = S3C2410_MISCCR_CLK0_FCLK; | ||
138 | else if (parent == &clk_h) | ||
139 | source = S3C2410_MISCCR_CLK0_HCLK; | ||
140 | else if (parent == &clk_p) | ||
141 | source = S3C2410_MISCCR_CLK0_PCLK; | ||
142 | else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0) | ||
143 | source = S3C2410_MISCCR_CLK0_DCLK0; | ||
144 | else if (clk == &s3c24xx_clkout1 && parent == &s3c24xx_dclk1) | ||
145 | source = S3C2410_MISCCR_CLK0_DCLK0; | ||
146 | else | ||
147 | return -EINVAL; | ||
148 | |||
149 | clk->parent = parent; | ||
150 | |||
151 | if (clk == &s3c24xx_clkout0) | ||
152 | mask = S3C2410_MISCCR_CLK0_MASK; | ||
153 | else { | ||
154 | source <<= 4; | ||
155 | mask = S3C2410_MISCCR_CLK1_MASK; | ||
156 | } | ||
157 | |||
158 | s3c2410_modify_misccr(mask, source); | ||
159 | return 0; | ||
160 | } | ||
161 | |||
162 | /* external clock definitions */ | ||
163 | |||
164 | struct clk s3c24xx_dclk0 = { | ||
165 | .name = "dclk0", | ||
166 | .id = -1, | ||
167 | .ctrlbit = S3C2410_DCLKCON_DCLK0EN, | ||
168 | .enable = s3c24xx_dclk_enable, | ||
169 | .set_parent = s3c24xx_dclk_setparent, | ||
170 | .set_rate = s3c24xx_set_dclk_rate, | ||
171 | .round_rate = s3c24xx_round_dclk_rate, | ||
172 | }; | ||
173 | |||
174 | struct clk s3c24xx_dclk1 = { | ||
175 | .name = "dclk1", | ||
176 | .id = -1, | ||
177 | .ctrlbit = S3C2410_DCLKCON_DCLK1EN, | ||
178 | .enable = s3c24xx_dclk_enable, | ||
179 | .set_parent = s3c24xx_dclk_setparent, | ||
180 | .set_rate = s3c24xx_set_dclk_rate, | ||
181 | .round_rate = s3c24xx_round_dclk_rate, | ||
182 | }; | ||
183 | |||
184 | struct clk s3c24xx_clkout0 = { | ||
185 | .name = "clkout0", | ||
186 | .id = -1, | ||
187 | .set_parent = s3c24xx_clkout_setparent, | ||
188 | }; | ||
189 | |||
190 | struct clk s3c24xx_clkout1 = { | ||
191 | .name = "clkout1", | ||
192 | .id = -1, | ||
193 | .set_parent = s3c24xx_clkout_setparent, | ||
194 | }; | ||
diff --git a/arch/arm/plat-s3c24xx/clock.c b/arch/arm/plat-s3c24xx/clock.c index a005ddbd9ef3..8474d05274bd 100644 --- a/arch/arm/plat-s3c24xx/clock.c +++ b/arch/arm/plat-s3c24xx/clock.c | |||
@@ -27,18 +27,8 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/module.h> | ||
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/list.h> | ||
33 | #include <linux/errno.h> | ||
34 | #include <linux/err.h> | ||
35 | #include <linux/platform_device.h> | ||
36 | #include <linux/sysdev.h> | ||
37 | #include <linux/interrupt.h> | ||
38 | #include <linux/ioport.h> | ||
39 | #include <linux/clk.h> | 31 | #include <linux/clk.h> |
40 | #include <linux/mutex.h> | ||
41 | #include <linux/delay.h> | ||
42 | #include <linux/io.h> | 32 | #include <linux/io.h> |
43 | 33 | ||
44 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
@@ -47,490 +37,23 @@ | |||
47 | #include <mach/regs-clock.h> | 37 | #include <mach/regs-clock.h> |
48 | #include <mach/regs-gpio.h> | 38 | #include <mach/regs-gpio.h> |
49 | 39 | ||
40 | #include <plat/cpu-freq.h> | ||
41 | |||
50 | #include <plat/clock.h> | 42 | #include <plat/clock.h> |
51 | #include <plat/cpu.h> | 43 | #include <plat/cpu.h> |
52 | 44 | #include <plat/pll.h> | |
53 | /* clock information */ | ||
54 | |||
55 | static LIST_HEAD(clocks); | ||
56 | |||
57 | DEFINE_MUTEX(clocks_mutex); | ||
58 | |||
59 | /* enable and disable calls for use with the clk struct */ | ||
60 | |||
61 | static int clk_null_enable(struct clk *clk, int enable) | ||
62 | { | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | /* Clock API calls */ | ||
67 | |||
68 | struct clk *clk_get(struct device *dev, const char *id) | ||
69 | { | ||
70 | struct clk *p; | ||
71 | struct clk *clk = ERR_PTR(-ENOENT); | ||
72 | int idno; | ||
73 | |||
74 | if (dev == NULL || dev->bus != &platform_bus_type) | ||
75 | idno = -1; | ||
76 | else | ||
77 | idno = to_platform_device(dev)->id; | ||
78 | |||
79 | mutex_lock(&clocks_mutex); | ||
80 | |||
81 | list_for_each_entry(p, &clocks, list) { | ||
82 | if (p->id == idno && | ||
83 | strcmp(id, p->name) == 0 && | ||
84 | try_module_get(p->owner)) { | ||
85 | clk = p; | ||
86 | break; | ||
87 | } | ||
88 | } | ||
89 | |||
90 | /* check for the case where a device was supplied, but the | ||
91 | * clock that was being searched for is not device specific */ | ||
92 | |||
93 | if (IS_ERR(clk)) { | ||
94 | list_for_each_entry(p, &clocks, list) { | ||
95 | if (p->id == -1 && strcmp(id, p->name) == 0 && | ||
96 | try_module_get(p->owner)) { | ||
97 | clk = p; | ||
98 | break; | ||
99 | } | ||
100 | } | ||
101 | } | ||
102 | |||
103 | mutex_unlock(&clocks_mutex); | ||
104 | return clk; | ||
105 | } | ||
106 | |||
107 | void clk_put(struct clk *clk) | ||
108 | { | ||
109 | module_put(clk->owner); | ||
110 | } | ||
111 | |||
112 | int clk_enable(struct clk *clk) | ||
113 | { | ||
114 | if (IS_ERR(clk) || clk == NULL) | ||
115 | return -EINVAL; | ||
116 | |||
117 | clk_enable(clk->parent); | ||
118 | |||
119 | mutex_lock(&clocks_mutex); | ||
120 | |||
121 | if ((clk->usage++) == 0) | ||
122 | (clk->enable)(clk, 1); | ||
123 | |||
124 | mutex_unlock(&clocks_mutex); | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | void clk_disable(struct clk *clk) | ||
129 | { | ||
130 | if (IS_ERR(clk) || clk == NULL) | ||
131 | return; | ||
132 | |||
133 | mutex_lock(&clocks_mutex); | ||
134 | |||
135 | if ((--clk->usage) == 0) | ||
136 | (clk->enable)(clk, 0); | ||
137 | |||
138 | mutex_unlock(&clocks_mutex); | ||
139 | clk_disable(clk->parent); | ||
140 | } | ||
141 | |||
142 | |||
143 | unsigned long clk_get_rate(struct clk *clk) | ||
144 | { | ||
145 | if (IS_ERR(clk)) | ||
146 | return 0; | ||
147 | |||
148 | if (clk->rate != 0) | ||
149 | return clk->rate; | ||
150 | |||
151 | if (clk->get_rate != NULL) | ||
152 | return (clk->get_rate)(clk); | ||
153 | |||
154 | if (clk->parent != NULL) | ||
155 | return clk_get_rate(clk->parent); | ||
156 | |||
157 | return clk->rate; | ||
158 | } | ||
159 | |||
160 | long clk_round_rate(struct clk *clk, unsigned long rate) | ||
161 | { | ||
162 | if (!IS_ERR(clk) && clk->round_rate) | ||
163 | return (clk->round_rate)(clk, rate); | ||
164 | |||
165 | return rate; | ||
166 | } | ||
167 | |||
168 | int clk_set_rate(struct clk *clk, unsigned long rate) | ||
169 | { | ||
170 | int ret; | ||
171 | |||
172 | if (IS_ERR(clk)) | ||
173 | return -EINVAL; | ||
174 | |||
175 | /* We do not default just do a clk->rate = rate as | ||
176 | * the clock may have been made this way by choice. | ||
177 | */ | ||
178 | |||
179 | WARN_ON(clk->set_rate == NULL); | ||
180 | |||
181 | if (clk->set_rate == NULL) | ||
182 | return -EINVAL; | ||
183 | |||
184 | mutex_lock(&clocks_mutex); | ||
185 | ret = (clk->set_rate)(clk, rate); | ||
186 | mutex_unlock(&clocks_mutex); | ||
187 | |||
188 | return ret; | ||
189 | } | ||
190 | |||
191 | struct clk *clk_get_parent(struct clk *clk) | ||
192 | { | ||
193 | return clk->parent; | ||
194 | } | ||
195 | |||
196 | int clk_set_parent(struct clk *clk, struct clk *parent) | ||
197 | { | ||
198 | int ret = 0; | ||
199 | |||
200 | if (IS_ERR(clk)) | ||
201 | return -EINVAL; | ||
202 | |||
203 | mutex_lock(&clocks_mutex); | ||
204 | |||
205 | if (clk->set_parent) | ||
206 | ret = (clk->set_parent)(clk, parent); | ||
207 | |||
208 | mutex_unlock(&clocks_mutex); | ||
209 | |||
210 | return ret; | ||
211 | } | ||
212 | |||
213 | EXPORT_SYMBOL(clk_get); | ||
214 | EXPORT_SYMBOL(clk_put); | ||
215 | EXPORT_SYMBOL(clk_enable); | ||
216 | EXPORT_SYMBOL(clk_disable); | ||
217 | EXPORT_SYMBOL(clk_get_rate); | ||
218 | EXPORT_SYMBOL(clk_round_rate); | ||
219 | EXPORT_SYMBOL(clk_set_rate); | ||
220 | EXPORT_SYMBOL(clk_get_parent); | ||
221 | EXPORT_SYMBOL(clk_set_parent); | ||
222 | |||
223 | /* base clocks */ | ||
224 | |||
225 | static int clk_default_setrate(struct clk *clk, unsigned long rate) | ||
226 | { | ||
227 | clk->rate = rate; | ||
228 | return 0; | ||
229 | } | ||
230 | |||
231 | struct clk clk_xtal = { | ||
232 | .name = "xtal", | ||
233 | .id = -1, | ||
234 | .rate = 0, | ||
235 | .parent = NULL, | ||
236 | .ctrlbit = 0, | ||
237 | }; | ||
238 | |||
239 | struct clk clk_mpll = { | ||
240 | .name = "mpll", | ||
241 | .id = -1, | ||
242 | .set_rate = clk_default_setrate, | ||
243 | }; | ||
244 | |||
245 | struct clk clk_upll = { | ||
246 | .name = "upll", | ||
247 | .id = -1, | ||
248 | .parent = NULL, | ||
249 | .ctrlbit = 0, | ||
250 | }; | ||
251 | |||
252 | struct clk clk_f = { | ||
253 | .name = "fclk", | ||
254 | .id = -1, | ||
255 | .rate = 0, | ||
256 | .parent = &clk_mpll, | ||
257 | .ctrlbit = 0, | ||
258 | .set_rate = clk_default_setrate, | ||
259 | }; | ||
260 | |||
261 | struct clk clk_h = { | ||
262 | .name = "hclk", | ||
263 | .id = -1, | ||
264 | .rate = 0, | ||
265 | .parent = NULL, | ||
266 | .ctrlbit = 0, | ||
267 | .set_rate = clk_default_setrate, | ||
268 | }; | ||
269 | |||
270 | struct clk clk_p = { | ||
271 | .name = "pclk", | ||
272 | .id = -1, | ||
273 | .rate = 0, | ||
274 | .parent = NULL, | ||
275 | .ctrlbit = 0, | ||
276 | .set_rate = clk_default_setrate, | ||
277 | }; | ||
278 | |||
279 | struct clk clk_usb_bus = { | ||
280 | .name = "usb-bus", | ||
281 | .id = -1, | ||
282 | .rate = 0, | ||
283 | .parent = &clk_upll, | ||
284 | }; | ||
285 | |||
286 | /* clocks that could be registered by external code */ | ||
287 | |||
288 | static int s3c24xx_dclk_enable(struct clk *clk, int enable) | ||
289 | { | ||
290 | unsigned long dclkcon = __raw_readl(S3C24XX_DCLKCON); | ||
291 | |||
292 | if (enable) | ||
293 | dclkcon |= clk->ctrlbit; | ||
294 | else | ||
295 | dclkcon &= ~clk->ctrlbit; | ||
296 | |||
297 | __raw_writel(dclkcon, S3C24XX_DCLKCON); | ||
298 | |||
299 | return 0; | ||
300 | } | ||
301 | |||
302 | static int s3c24xx_dclk_setparent(struct clk *clk, struct clk *parent) | ||
303 | { | ||
304 | unsigned long dclkcon; | ||
305 | unsigned int uclk; | ||
306 | |||
307 | if (parent == &clk_upll) | ||
308 | uclk = 1; | ||
309 | else if (parent == &clk_p) | ||
310 | uclk = 0; | ||
311 | else | ||
312 | return -EINVAL; | ||
313 | |||
314 | clk->parent = parent; | ||
315 | |||
316 | dclkcon = __raw_readl(S3C24XX_DCLKCON); | ||
317 | |||
318 | if (clk->ctrlbit == S3C2410_DCLKCON_DCLK0EN) { | ||
319 | if (uclk) | ||
320 | dclkcon |= S3C2410_DCLKCON_DCLK0_UCLK; | ||
321 | else | ||
322 | dclkcon &= ~S3C2410_DCLKCON_DCLK0_UCLK; | ||
323 | } else { | ||
324 | if (uclk) | ||
325 | dclkcon |= S3C2410_DCLKCON_DCLK1_UCLK; | ||
326 | else | ||
327 | dclkcon &= ~S3C2410_DCLKCON_DCLK1_UCLK; | ||
328 | } | ||
329 | |||
330 | __raw_writel(dclkcon, S3C24XX_DCLKCON); | ||
331 | |||
332 | return 0; | ||
333 | } | ||
334 | |||
335 | static unsigned long s3c24xx_calc_div(struct clk *clk, unsigned long rate) | ||
336 | { | ||
337 | unsigned long div; | ||
338 | |||
339 | if ((rate == 0) || !clk->parent) | ||
340 | return 0; | ||
341 | |||
342 | div = clk_get_rate(clk->parent) / rate; | ||
343 | if (div < 2) | ||
344 | div = 2; | ||
345 | else if (div > 16) | ||
346 | div = 16; | ||
347 | |||
348 | return div; | ||
349 | } | ||
350 | |||
351 | static unsigned long s3c24xx_round_dclk_rate(struct clk *clk, | ||
352 | unsigned long rate) | ||
353 | { | ||
354 | unsigned long div = s3c24xx_calc_div(clk, rate); | ||
355 | |||
356 | if (div == 0) | ||
357 | return 0; | ||
358 | |||
359 | return clk_get_rate(clk->parent) / div; | ||
360 | } | ||
361 | |||
362 | static int s3c24xx_set_dclk_rate(struct clk *clk, unsigned long rate) | ||
363 | { | ||
364 | unsigned long mask, data, div = s3c24xx_calc_div(clk, rate); | ||
365 | |||
366 | if (div == 0) | ||
367 | return -EINVAL; | ||
368 | |||
369 | if (clk == &s3c24xx_dclk0) { | ||
370 | mask = S3C2410_DCLKCON_DCLK0_DIV_MASK | | ||
371 | S3C2410_DCLKCON_DCLK0_CMP_MASK; | ||
372 | data = S3C2410_DCLKCON_DCLK0_DIV(div) | | ||
373 | S3C2410_DCLKCON_DCLK0_CMP((div + 1) / 2); | ||
374 | } else if (clk == &s3c24xx_dclk1) { | ||
375 | mask = S3C2410_DCLKCON_DCLK1_DIV_MASK | | ||
376 | S3C2410_DCLKCON_DCLK1_CMP_MASK; | ||
377 | data = S3C2410_DCLKCON_DCLK1_DIV(div) | | ||
378 | S3C2410_DCLKCON_DCLK1_CMP((div + 1) / 2); | ||
379 | } else | ||
380 | return -EINVAL; | ||
381 | |||
382 | clk->rate = clk_get_rate(clk->parent) / div; | ||
383 | __raw_writel(((__raw_readl(S3C24XX_DCLKCON) & ~mask) | data), | ||
384 | S3C24XX_DCLKCON); | ||
385 | return clk->rate; | ||
386 | } | ||
387 | |||
388 | static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent) | ||
389 | { | ||
390 | unsigned long mask; | ||
391 | unsigned long source; | ||
392 | |||
393 | /* calculate the MISCCR setting for the clock */ | ||
394 | |||
395 | if (parent == &clk_xtal) | ||
396 | source = S3C2410_MISCCR_CLK0_MPLL; | ||
397 | else if (parent == &clk_upll) | ||
398 | source = S3C2410_MISCCR_CLK0_UPLL; | ||
399 | else if (parent == &clk_f) | ||
400 | source = S3C2410_MISCCR_CLK0_FCLK; | ||
401 | else if (parent == &clk_h) | ||
402 | source = S3C2410_MISCCR_CLK0_HCLK; | ||
403 | else if (parent == &clk_p) | ||
404 | source = S3C2410_MISCCR_CLK0_PCLK; | ||
405 | else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0) | ||
406 | source = S3C2410_MISCCR_CLK0_DCLK0; | ||
407 | else if (clk == &s3c24xx_clkout1 && parent == &s3c24xx_dclk1) | ||
408 | source = S3C2410_MISCCR_CLK0_DCLK0; | ||
409 | else | ||
410 | return -EINVAL; | ||
411 | |||
412 | clk->parent = parent; | ||
413 | |||
414 | if (clk == &s3c24xx_clkout0) | ||
415 | mask = S3C2410_MISCCR_CLK0_MASK; | ||
416 | else { | ||
417 | source <<= 4; | ||
418 | mask = S3C2410_MISCCR_CLK1_MASK; | ||
419 | } | ||
420 | |||
421 | s3c2410_modify_misccr(mask, source); | ||
422 | return 0; | ||
423 | } | ||
424 | |||
425 | /* external clock definitions */ | ||
426 | |||
427 | struct clk s3c24xx_dclk0 = { | ||
428 | .name = "dclk0", | ||
429 | .id = -1, | ||
430 | .ctrlbit = S3C2410_DCLKCON_DCLK0EN, | ||
431 | .enable = s3c24xx_dclk_enable, | ||
432 | .set_parent = s3c24xx_dclk_setparent, | ||
433 | .set_rate = s3c24xx_set_dclk_rate, | ||
434 | .round_rate = s3c24xx_round_dclk_rate, | ||
435 | }; | ||
436 | |||
437 | struct clk s3c24xx_dclk1 = { | ||
438 | .name = "dclk1", | ||
439 | .id = -1, | ||
440 | .ctrlbit = S3C2410_DCLKCON_DCLK1EN, | ||
441 | .enable = s3c24xx_dclk_enable, | ||
442 | .set_parent = s3c24xx_dclk_setparent, | ||
443 | .set_rate = s3c24xx_set_dclk_rate, | ||
444 | .round_rate = s3c24xx_round_dclk_rate, | ||
445 | }; | ||
446 | |||
447 | struct clk s3c24xx_clkout0 = { | ||
448 | .name = "clkout0", | ||
449 | .id = -1, | ||
450 | .set_parent = s3c24xx_clkout_setparent, | ||
451 | }; | ||
452 | |||
453 | struct clk s3c24xx_clkout1 = { | ||
454 | .name = "clkout1", | ||
455 | .id = -1, | ||
456 | .set_parent = s3c24xx_clkout_setparent, | ||
457 | }; | ||
458 | |||
459 | struct clk s3c24xx_uclk = { | ||
460 | .name = "uclk", | ||
461 | .id = -1, | ||
462 | }; | ||
463 | |||
464 | /* initialise the clock system */ | ||
465 | |||
466 | int s3c24xx_register_clock(struct clk *clk) | ||
467 | { | ||
468 | clk->owner = THIS_MODULE; | ||
469 | |||
470 | if (clk->enable == NULL) | ||
471 | clk->enable = clk_null_enable; | ||
472 | |||
473 | /* add to the list of available clocks */ | ||
474 | |||
475 | mutex_lock(&clocks_mutex); | ||
476 | list_add(&clk->list, &clocks); | ||
477 | mutex_unlock(&clocks_mutex); | ||
478 | |||
479 | return 0; | ||
480 | } | ||
481 | |||
482 | int s3c24xx_register_clocks(struct clk **clks, int nr_clks) | ||
483 | { | ||
484 | int fails = 0; | ||
485 | |||
486 | for (; nr_clks > 0; nr_clks--, clks++) { | ||
487 | if (s3c24xx_register_clock(*clks) < 0) | ||
488 | fails++; | ||
489 | } | ||
490 | |||
491 | return fails; | ||
492 | } | ||
493 | 45 | ||
494 | /* initalise all the clocks */ | 46 | /* initalise all the clocks */ |
495 | 47 | ||
496 | int __init s3c24xx_setup_clocks(unsigned long xtal, | 48 | void __init_or_cpufreq s3c24xx_setup_clocks(unsigned long fclk, |
497 | unsigned long fclk, | 49 | unsigned long hclk, |
498 | unsigned long hclk, | 50 | unsigned long pclk) |
499 | unsigned long pclk) | ||
500 | { | 51 | { |
501 | printk(KERN_INFO "S3C24XX Clocks, (c) 2004 Simtec Electronics\n"); | 52 | clk_upll.rate = s3c24xx_get_pll(__raw_readl(S3C2410_UPLLCON), |
502 | 53 | clk_xtal.rate); | |
503 | /* initialise the main system clocks */ | ||
504 | |||
505 | clk_xtal.rate = xtal; | ||
506 | clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); | ||
507 | 54 | ||
508 | clk_mpll.rate = fclk; | 55 | clk_mpll.rate = fclk; |
509 | clk_h.rate = hclk; | 56 | clk_h.rate = hclk; |
510 | clk_p.rate = pclk; | 57 | clk_p.rate = pclk; |
511 | clk_f.rate = fclk; | 58 | clk_f.rate = fclk; |
512 | |||
513 | /* assume uart clocks are correctly setup */ | ||
514 | |||
515 | /* register our clocks */ | ||
516 | |||
517 | if (s3c24xx_register_clock(&clk_xtal) < 0) | ||
518 | printk(KERN_ERR "failed to register master xtal\n"); | ||
519 | |||
520 | if (s3c24xx_register_clock(&clk_mpll) < 0) | ||
521 | printk(KERN_ERR "failed to register mpll clock\n"); | ||
522 | |||
523 | if (s3c24xx_register_clock(&clk_upll) < 0) | ||
524 | printk(KERN_ERR "failed to register upll clock\n"); | ||
525 | |||
526 | if (s3c24xx_register_clock(&clk_f) < 0) | ||
527 | printk(KERN_ERR "failed to register cpu fclk\n"); | ||
528 | |||
529 | if (s3c24xx_register_clock(&clk_h) < 0) | ||
530 | printk(KERN_ERR "failed to register cpu hclk\n"); | ||
531 | |||
532 | if (s3c24xx_register_clock(&clk_p) < 0) | ||
533 | printk(KERN_ERR "failed to register cpu pclk\n"); | ||
534 | |||
535 | return 0; | ||
536 | } | 59 | } |
diff --git a/arch/arm/plat-s3c24xx/common-smdk.c b/arch/arm/plat-s3c24xx/common-smdk.c index 3098736c65d9..3d4837021ac7 100644 --- a/arch/arm/plat-s3c24xx/common-smdk.c +++ b/arch/arm/plat-s3c24xx/common-smdk.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include <mach/regs-gpio.h> | 38 | #include <mach/regs-gpio.h> |
39 | #include <mach/leds-gpio.h> | 39 | #include <mach/leds-gpio.h> |
40 | 40 | ||
41 | #include <asm/plat-s3c/nand.h> | 41 | #include <plat/nand.h> |
42 | 42 | ||
43 | #include <plat/common-smdk.h> | 43 | #include <plat/common-smdk.h> |
44 | #include <plat/devs.h> | 44 | #include <plat/devs.h> |
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c index 22a329513c0f..542062f8cbc1 100644 --- a/arch/arm/plat-s3c24xx/cpu.c +++ b/arch/arm/plat-s3c24xx/cpu.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
32 | #include <linux/io.h> | 32 | #include <linux/io.h> |
33 | #include <linux/delay.h> | ||
34 | 33 | ||
35 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
36 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -55,16 +54,6 @@ | |||
55 | #include <plat/s3c2442.h> | 54 | #include <plat/s3c2442.h> |
56 | #include <plat/s3c2443.h> | 55 | #include <plat/s3c2443.h> |
57 | 56 | ||
58 | struct cpu_table { | ||
59 | unsigned long idcode; | ||
60 | unsigned long idmask; | ||
61 | void (*map_io)(struct map_desc *mach_desc, int size); | ||
62 | void (*init_uarts)(struct s3c2410_uartcfg *cfg, int no); | ||
63 | void (*init_clocks)(int xtal); | ||
64 | int (*init)(void); | ||
65 | const char *name; | ||
66 | }; | ||
67 | |||
68 | /* table of supported CPUs */ | 57 | /* table of supported CPUs */ |
69 | 58 | ||
70 | static const char name_s3c2400[] = "S3C2400"; | 59 | static const char name_s3c2400[] = "S3C2400"; |
@@ -169,23 +158,7 @@ static struct map_desc s3c_iodesc[] __initdata = { | |||
169 | IODESC_ENT(UART) | 158 | IODESC_ENT(UART) |
170 | }; | 159 | }; |
171 | 160 | ||
172 | static struct cpu_table * __init s3c_lookup_cpu(unsigned long idcode) | 161 | /* read cpu identificaiton code */ |
173 | { | ||
174 | struct cpu_table *tab; | ||
175 | int count; | ||
176 | |||
177 | tab = cpu_ids; | ||
178 | for (count = 0; count < ARRAY_SIZE(cpu_ids); count++, tab++) { | ||
179 | if ((idcode & tab->idmask) == tab->idcode) | ||
180 | return tab; | ||
181 | } | ||
182 | |||
183 | return NULL; | ||
184 | } | ||
185 | |||
186 | /* cpu information */ | ||
187 | |||
188 | static struct cpu_table *cpu; | ||
189 | 162 | ||
190 | static unsigned long s3c24xx_read_idcode_v5(void) | 163 | static unsigned long s3c24xx_read_idcode_v5(void) |
191 | { | 164 | { |
@@ -231,6 +204,7 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) | |||
231 | unsigned long idcode = 0x0; | 204 | unsigned long idcode = 0x0; |
232 | 205 | ||
233 | /* initialise the io descriptors we need for initialisation */ | 206 | /* initialise the io descriptors we need for initialisation */ |
207 | iotable_init(mach_desc, size); | ||
234 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); | 208 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); |
235 | 209 | ||
236 | if (cpu_architecture() >= CPU_ARCH_ARMv5) { | 210 | if (cpu_architecture() >= CPU_ARCH_ARMv5) { |
@@ -239,117 +213,7 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) | |||
239 | idcode = s3c24xx_read_idcode_v4(); | 213 | idcode = s3c24xx_read_idcode_v4(); |
240 | } | 214 | } |
241 | 215 | ||
242 | cpu = s3c_lookup_cpu(idcode); | ||
243 | |||
244 | if (cpu == NULL) { | ||
245 | printk(KERN_ERR "Unknown CPU type 0x%08lx\n", idcode); | ||
246 | panic("Unknown S3C24XX CPU"); | ||
247 | } | ||
248 | |||
249 | printk("CPU %s (id 0x%08lx)\n", cpu->name, idcode); | ||
250 | |||
251 | if (cpu->map_io == NULL || cpu->init == NULL) { | ||
252 | printk(KERN_ERR "CPU %s support not enabled\n", cpu->name); | ||
253 | panic("Unsupported S3C24XX CPU"); | ||
254 | } | ||
255 | |||
256 | arm_pm_restart = s3c24xx_pm_restart; | 216 | arm_pm_restart = s3c24xx_pm_restart; |
257 | 217 | ||
258 | (cpu->map_io)(mach_desc, size); | 218 | s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); |
259 | } | ||
260 | |||
261 | /* s3c24xx_init_clocks | ||
262 | * | ||
263 | * Initialise the clock subsystem and associated information from the | ||
264 | * given master crystal value. | ||
265 | * | ||
266 | * xtal = 0 -> use default PLL crystal value (normally 12MHz) | ||
267 | * != 0 -> PLL crystal value in Hz | ||
268 | */ | ||
269 | |||
270 | void __init s3c24xx_init_clocks(int xtal) | ||
271 | { | ||
272 | if (xtal == 0) | ||
273 | xtal = 12*1000*1000; | ||
274 | |||
275 | if (cpu == NULL) | ||
276 | panic("s3c24xx_init_clocks: no cpu setup?\n"); | ||
277 | |||
278 | if (cpu->init_clocks == NULL) | ||
279 | panic("s3c24xx_init_clocks: cpu has no clock init\n"); | ||
280 | else | ||
281 | (cpu->init_clocks)(xtal); | ||
282 | } | 219 | } |
283 | |||
284 | /* uart management */ | ||
285 | |||
286 | static int nr_uarts __initdata = 0; | ||
287 | |||
288 | static struct s3c2410_uartcfg uart_cfgs[3]; | ||
289 | |||
290 | /* s3c24xx_init_uartdevs | ||
291 | * | ||
292 | * copy the specified platform data and configuration into our central | ||
293 | * set of devices, before the data is thrown away after the init process. | ||
294 | * | ||
295 | * This also fills in the array passed to the serial driver for the | ||
296 | * early initialisation of the console. | ||
297 | */ | ||
298 | |||
299 | void __init s3c24xx_init_uartdevs(char *name, | ||
300 | struct s3c24xx_uart_resources *res, | ||
301 | struct s3c2410_uartcfg *cfg, int no) | ||
302 | { | ||
303 | struct platform_device *platdev; | ||
304 | struct s3c2410_uartcfg *cfgptr = uart_cfgs; | ||
305 | struct s3c24xx_uart_resources *resp; | ||
306 | int uart; | ||
307 | |||
308 | memcpy(cfgptr, cfg, sizeof(struct s3c2410_uartcfg) * no); | ||
309 | |||
310 | for (uart = 0; uart < no; uart++, cfg++, cfgptr++) { | ||
311 | platdev = s3c24xx_uart_src[cfgptr->hwport]; | ||
312 | |||
313 | resp = res + cfgptr->hwport; | ||
314 | |||
315 | s3c24xx_uart_devs[uart] = platdev; | ||
316 | |||
317 | platdev->name = name; | ||
318 | platdev->resource = resp->resources; | ||
319 | platdev->num_resources = resp->nr_resources; | ||
320 | |||
321 | platdev->dev.platform_data = cfgptr; | ||
322 | } | ||
323 | |||
324 | nr_uarts = no; | ||
325 | } | ||
326 | |||
327 | void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
328 | { | ||
329 | if (cpu == NULL) | ||
330 | return; | ||
331 | |||
332 | if (cpu->init_uarts == NULL) { | ||
333 | printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n"); | ||
334 | } else | ||
335 | (cpu->init_uarts)(cfg, no); | ||
336 | } | ||
337 | |||
338 | static int __init s3c_arch_init(void) | ||
339 | { | ||
340 | int ret; | ||
341 | |||
342 | // do the correct init for cpu | ||
343 | |||
344 | if (cpu == NULL) | ||
345 | panic("s3c_arch_init: NULL cpu\n"); | ||
346 | |||
347 | ret = (cpu->init)(); | ||
348 | if (ret != 0) | ||
349 | return ret; | ||
350 | |||
351 | ret = platform_add_devices(s3c24xx_uart_devs, nr_uarts); | ||
352 | return ret; | ||
353 | } | ||
354 | |||
355 | arch_initcall(s3c_arch_init); | ||
diff --git a/arch/arm/plat-s3c24xx/devs.c b/arch/arm/plat-s3c24xx/devs.c index e93f8bf6d338..16ac01d9b8ab 100644 --- a/arch/arm/plat-s3c24xx/devs.c +++ b/arch/arm/plat-s3c24xx/devs.c | |||
@@ -29,11 +29,11 @@ | |||
29 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
30 | 30 | ||
31 | #include <plat/regs-serial.h> | 31 | #include <plat/regs-serial.h> |
32 | #include <asm/plat-s3c24xx/udc.h> | 32 | #include <plat/udc.h> |
33 | 33 | ||
34 | #include <plat/devs.h> | 34 | #include <plat/devs.h> |
35 | #include <plat/cpu.h> | 35 | #include <plat/cpu.h> |
36 | #include <asm/plat-s3c24xx/regs-spi.h> | 36 | #include <plat/regs-spi.h> |
37 | 37 | ||
38 | /* Serial port registrations */ | 38 | /* Serial port registrations */ |
39 | 39 | ||
@@ -76,6 +76,19 @@ static struct resource s3c2410_uart2_resource[] = { | |||
76 | } | 76 | } |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static struct resource s3c2410_uart3_resource[] = { | ||
80 | [0] = { | ||
81 | .start = S3C2443_PA_UART3, | ||
82 | .end = S3C2443_PA_UART3 + 0x3fff, | ||
83 | .flags = IORESOURCE_MEM, | ||
84 | }, | ||
85 | [1] = { | ||
86 | .start = IRQ_S3CUART_RX3, | ||
87 | .end = IRQ_S3CUART_ERR3, | ||
88 | .flags = IORESOURCE_IRQ, | ||
89 | }, | ||
90 | }; | ||
91 | |||
79 | struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { | 92 | struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { |
80 | [0] = { | 93 | [0] = { |
81 | .resources = s3c2410_uart0_resource, | 94 | .resources = s3c2410_uart0_resource, |
@@ -89,6 +102,10 @@ struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { | |||
89 | .resources = s3c2410_uart2_resource, | 102 | .resources = s3c2410_uart2_resource, |
90 | .nr_resources = ARRAY_SIZE(s3c2410_uart2_resource), | 103 | .nr_resources = ARRAY_SIZE(s3c2410_uart2_resource), |
91 | }, | 104 | }, |
105 | [3] = { | ||
106 | .resources = s3c2410_uart3_resource, | ||
107 | .nr_resources = ARRAY_SIZE(s3c2410_uart3_resource), | ||
108 | }, | ||
92 | }; | 109 | }; |
93 | 110 | ||
94 | /* yart devices */ | 111 | /* yart devices */ |
@@ -105,13 +122,18 @@ static struct platform_device s3c24xx_uart_device2 = { | |||
105 | .id = 2, | 122 | .id = 2, |
106 | }; | 123 | }; |
107 | 124 | ||
108 | struct platform_device *s3c24xx_uart_src[3] = { | 125 | static struct platform_device s3c24xx_uart_device3 = { |
126 | .id = 3, | ||
127 | }; | ||
128 | |||
129 | struct platform_device *s3c24xx_uart_src[4] = { | ||
109 | &s3c24xx_uart_device0, | 130 | &s3c24xx_uart_device0, |
110 | &s3c24xx_uart_device1, | 131 | &s3c24xx_uart_device1, |
111 | &s3c24xx_uart_device2, | 132 | &s3c24xx_uart_device2, |
133 | &s3c24xx_uart_device3, | ||
112 | }; | 134 | }; |
113 | 135 | ||
114 | struct platform_device *s3c24xx_uart_devs[3] = { | 136 | struct platform_device *s3c24xx_uart_devs[4] = { |
115 | }; | 137 | }; |
116 | 138 | ||
117 | /* USB Host Controller */ | 139 | /* USB Host Controller */ |
@@ -192,8 +214,8 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) | |||
192 | 214 | ||
193 | static struct resource s3c_nand_resource[] = { | 215 | static struct resource s3c_nand_resource[] = { |
194 | [0] = { | 216 | [0] = { |
195 | .start = S3C2410_PA_NAND, | 217 | .start = S3C24XX_PA_NAND, |
196 | .end = S3C2410_PA_NAND + S3C24XX_SZ_NAND - 1, | 218 | .end = S3C24XX_PA_NAND + S3C24XX_SZ_NAND - 1, |
197 | .flags = IORESOURCE_MEM, | 219 | .flags = IORESOURCE_MEM, |
198 | } | 220 | } |
199 | }; | 221 | }; |
@@ -271,31 +293,6 @@ struct platform_device s3c_device_wdt = { | |||
271 | 293 | ||
272 | EXPORT_SYMBOL(s3c_device_wdt); | 294 | EXPORT_SYMBOL(s3c_device_wdt); |
273 | 295 | ||
274 | /* I2C */ | ||
275 | |||
276 | static struct resource s3c_i2c_resource[] = { | ||
277 | [0] = { | ||
278 | .start = S3C24XX_PA_IIC, | ||
279 | .end = S3C24XX_PA_IIC + S3C24XX_SZ_IIC - 1, | ||
280 | .flags = IORESOURCE_MEM, | ||
281 | }, | ||
282 | [1] = { | ||
283 | .start = IRQ_IIC, | ||
284 | .end = IRQ_IIC, | ||
285 | .flags = IORESOURCE_IRQ, | ||
286 | } | ||
287 | |||
288 | }; | ||
289 | |||
290 | struct platform_device s3c_device_i2c = { | ||
291 | .name = "s3c2410-i2c", | ||
292 | .id = -1, | ||
293 | .num_resources = ARRAY_SIZE(s3c_i2c_resource), | ||
294 | .resource = s3c_i2c_resource, | ||
295 | }; | ||
296 | |||
297 | EXPORT_SYMBOL(s3c_device_i2c); | ||
298 | |||
299 | /* IIS */ | 296 | /* IIS */ |
300 | 297 | ||
301 | static struct resource s3c_iis_resource[] = { | 298 | static struct resource s3c_iis_resource[] = { |
@@ -372,18 +369,26 @@ static struct resource s3c_adc_resource[] = { | |||
372 | }; | 369 | }; |
373 | 370 | ||
374 | struct platform_device s3c_device_adc = { | 371 | struct platform_device s3c_device_adc = { |
375 | .name = "s3c2410-adc", | 372 | .name = "s3c24xx-adc", |
376 | .id = -1, | 373 | .id = -1, |
377 | .num_resources = ARRAY_SIZE(s3c_adc_resource), | 374 | .num_resources = ARRAY_SIZE(s3c_adc_resource), |
378 | .resource = s3c_adc_resource, | 375 | .resource = s3c_adc_resource, |
379 | }; | 376 | }; |
380 | 377 | ||
378 | /* HWMON */ | ||
379 | |||
380 | struct platform_device s3c_device_hwmon = { | ||
381 | .name = "s3c24xx-hwmon", | ||
382 | .id = -1, | ||
383 | .dev.parent = &s3c_device_adc.dev, | ||
384 | }; | ||
385 | |||
381 | /* SDI */ | 386 | /* SDI */ |
382 | 387 | ||
383 | static struct resource s3c_sdi_resource[] = { | 388 | static struct resource s3c_sdi_resource[] = { |
384 | [0] = { | 389 | [0] = { |
385 | .start = S3C2410_PA_SDI, | 390 | .start = S3C24XX_PA_SDI, |
386 | .end = S3C2410_PA_SDI + S3C24XX_SZ_SDI - 1, | 391 | .end = S3C24XX_PA_SDI + S3C24XX_SZ_SDI - 1, |
387 | .flags = IORESOURCE_MEM, | 392 | .flags = IORESOURCE_MEM, |
388 | }, | 393 | }, |
389 | [1] = { | 394 | [1] = { |
@@ -403,36 +408,6 @@ struct platform_device s3c_device_sdi = { | |||
403 | 408 | ||
404 | EXPORT_SYMBOL(s3c_device_sdi); | 409 | EXPORT_SYMBOL(s3c_device_sdi); |
405 | 410 | ||
406 | /* High-speed MMC/SD */ | ||
407 | |||
408 | static struct resource s3c_hsmmc_resource[] = { | ||
409 | [0] = { | ||
410 | .start = S3C2443_PA_HSMMC, | ||
411 | .end = S3C2443_PA_HSMMC + S3C2443_SZ_HSMMC - 1, | ||
412 | .flags = IORESOURCE_MEM, | ||
413 | }, | ||
414 | [1] = { | ||
415 | .start = IRQ_S3C2443_HSMMC, | ||
416 | .end = IRQ_S3C2443_HSMMC, | ||
417 | .flags = IORESOURCE_IRQ, | ||
418 | } | ||
419 | }; | ||
420 | |||
421 | static u64 s3c_device_hsmmc_dmamask = 0xffffffffUL; | ||
422 | |||
423 | struct platform_device s3c_device_hsmmc = { | ||
424 | .name = "s3c-sdhci", | ||
425 | .id = -1, | ||
426 | .num_resources = ARRAY_SIZE(s3c_hsmmc_resource), | ||
427 | .resource = s3c_hsmmc_resource, | ||
428 | .dev = { | ||
429 | .dma_mask = &s3c_device_hsmmc_dmamask, | ||
430 | .coherent_dma_mask = 0xffffffffUL | ||
431 | } | ||
432 | }; | ||
433 | |||
434 | |||
435 | |||
436 | /* SPI (0) */ | 411 | /* SPI (0) */ |
437 | 412 | ||
438 | static struct resource s3c_spi0_resource[] = { | 413 | static struct resource s3c_spi0_resource[] = { |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index 1baf941d1930..aee2aeb46c60 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -25,15 +25,13 @@ | |||
25 | #include <linux/sysdev.h> | 25 | #include <linux/sysdev.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/errno.h> | 27 | #include <linux/errno.h> |
28 | #include <linux/delay.h> | ||
29 | #include <linux/io.h> | 28 | #include <linux/io.h> |
30 | 29 | ||
31 | #include <asm/system.h> | 30 | #include <asm/system.h> |
32 | #include <asm/irq.h> | 31 | #include <asm/irq.h> |
33 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
34 | #include <asm/dma.h> | 33 | #include <mach/dma.h> |
35 | 34 | ||
36 | #include <asm/mach/dma.h> | ||
37 | #include <mach/map.h> | 35 | #include <mach/map.h> |
38 | 36 | ||
39 | #include <plat/dma.h> | 37 | #include <plat/dma.h> |
@@ -804,7 +802,7 @@ EXPORT_SYMBOL(s3c2410_dma_request); | |||
804 | * allowed to go through. | 802 | * allowed to go through. |
805 | */ | 803 | */ |
806 | 804 | ||
807 | int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client) | 805 | int s3c2410_dma_free(unsigned int channel, struct s3c2410_dma_client *client) |
808 | { | 806 | { |
809 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); | 807 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); |
810 | unsigned long flags; | 808 | unsigned long flags; |
@@ -995,7 +993,7 @@ static int s3c2410_dma_started(struct s3c2410_dma_chan *chan) | |||
995 | } | 993 | } |
996 | 994 | ||
997 | int | 995 | int |
998 | s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op) | 996 | s3c2410_dma_ctrl(unsigned int channel, enum s3c2410_chan_op op) |
999 | { | 997 | { |
1000 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); | 998 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); |
1001 | 999 | ||
@@ -1043,7 +1041,7 @@ EXPORT_SYMBOL(s3c2410_dma_ctrl); | |||
1043 | * dcon: base value of the DCONx register | 1041 | * dcon: base value of the DCONx register |
1044 | */ | 1042 | */ |
1045 | 1043 | ||
1046 | int s3c2410_dma_config(dmach_t channel, | 1044 | int s3c2410_dma_config(unsigned int channel, |
1047 | int xferunit, | 1045 | int xferunit, |
1048 | int dcon) | 1046 | int dcon) |
1049 | { | 1047 | { |
@@ -1092,7 +1090,7 @@ int s3c2410_dma_config(dmach_t channel, | |||
1092 | 1090 | ||
1093 | EXPORT_SYMBOL(s3c2410_dma_config); | 1091 | EXPORT_SYMBOL(s3c2410_dma_config); |
1094 | 1092 | ||
1095 | int s3c2410_dma_setflags(dmach_t channel, unsigned int flags) | 1093 | int s3c2410_dma_setflags(unsigned int channel, unsigned int flags) |
1096 | { | 1094 | { |
1097 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); | 1095 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); |
1098 | 1096 | ||
@@ -1113,7 +1111,7 @@ EXPORT_SYMBOL(s3c2410_dma_setflags); | |||
1113 | * irq? | 1111 | * irq? |
1114 | */ | 1112 | */ |
1115 | 1113 | ||
1116 | int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn) | 1114 | int s3c2410_dma_set_opfn(unsigned int channel, s3c2410_dma_opfn_t rtn) |
1117 | { | 1115 | { |
1118 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); | 1116 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); |
1119 | 1117 | ||
@@ -1129,7 +1127,7 @@ int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn) | |||
1129 | 1127 | ||
1130 | EXPORT_SYMBOL(s3c2410_dma_set_opfn); | 1128 | EXPORT_SYMBOL(s3c2410_dma_set_opfn); |
1131 | 1129 | ||
1132 | int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn) | 1130 | int s3c2410_dma_set_buffdone_fn(unsigned int channel, s3c2410_dma_cbfn_t rtn) |
1133 | { | 1131 | { |
1134 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); | 1132 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); |
1135 | 1133 | ||
@@ -1219,7 +1217,7 @@ EXPORT_SYMBOL(s3c2410_dma_devconfig); | |||
1219 | * returns the current transfer points for the dma source and destination | 1217 | * returns the current transfer points for the dma source and destination |
1220 | */ | 1218 | */ |
1221 | 1219 | ||
1222 | int s3c2410_dma_getposition(dmach_t channel, dma_addr_t *src, dma_addr_t *dst) | 1220 | int s3c2410_dma_getposition(unsigned int channel, dma_addr_t *src, dma_addr_t *dst) |
1223 | { | 1221 | { |
1224 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); | 1222 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); |
1225 | 1223 | ||
diff --git a/arch/arm/plat-s3c24xx/gpiolib.c b/arch/arm/plat-s3c24xx/gpiolib.c index 3caec6bad3eb..f95c6c9d9f1a 100644 --- a/arch/arm/plat-s3c24xx/gpiolib.c +++ b/arch/arm/plat-s3c24xx/gpiolib.c | |||
@@ -19,104 +19,12 @@ | |||
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | 21 | ||
22 | #include <plat/gpio-core.h> | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/irq.h> | 24 | #include <asm/irq.h> |
24 | 25 | ||
25 | #include <mach/regs-gpio.h> | 26 | #include <mach/regs-gpio.h> |
26 | 27 | ||
27 | struct s3c24xx_gpio_chip { | ||
28 | struct gpio_chip chip; | ||
29 | void __iomem *base; | ||
30 | }; | ||
31 | |||
32 | static inline struct s3c24xx_gpio_chip *to_s3c_chip(struct gpio_chip *gpc) | ||
33 | { | ||
34 | return container_of(gpc, struct s3c24xx_gpio_chip, chip); | ||
35 | } | ||
36 | |||
37 | /* these routines are exported for use by other parts of the platform | ||
38 | * and system support, but are not intended to be used directly by the | ||
39 | * drivers themsevles. | ||
40 | */ | ||
41 | |||
42 | static int s3c24xx_gpiolib_input(struct gpio_chip *chip, unsigned offset) | ||
43 | { | ||
44 | struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); | ||
45 | void __iomem *base = ourchip->base; | ||
46 | unsigned long flags; | ||
47 | unsigned long con; | ||
48 | |||
49 | local_irq_save(flags); | ||
50 | |||
51 | con = __raw_readl(base + 0x00); | ||
52 | con &= ~(3 << (offset * 2)); | ||
53 | con |= (S3C2410_GPIO_OUTPUT & 0xf) << (offset * 2); | ||
54 | |||
55 | __raw_writel(con, base + 0x00); | ||
56 | |||
57 | local_irq_restore(flags); | ||
58 | return 0; | ||
59 | } | ||
60 | |||
61 | static int s3c24xx_gpiolib_output(struct gpio_chip *chip, | ||
62 | unsigned offset, int value) | ||
63 | { | ||
64 | struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); | ||
65 | void __iomem *base = ourchip->base; | ||
66 | unsigned long flags; | ||
67 | unsigned long dat; | ||
68 | unsigned long con; | ||
69 | |||
70 | local_irq_save(flags); | ||
71 | |||
72 | dat = __raw_readl(base + 0x04); | ||
73 | dat &= ~(1 << offset); | ||
74 | if (value) | ||
75 | dat |= 1 << offset; | ||
76 | __raw_writel(dat, base + 0x04); | ||
77 | |||
78 | con = __raw_readl(base + 0x00); | ||
79 | con &= ~(3 << (offset * 2)); | ||
80 | con |= (S3C2410_GPIO_OUTPUT & 0xf) << (offset * 2); | ||
81 | |||
82 | __raw_writel(con, base + 0x00); | ||
83 | __raw_writel(dat, base + 0x04); | ||
84 | |||
85 | local_irq_restore(flags); | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | static void s3c24xx_gpiolib_set(struct gpio_chip *chip, | ||
90 | unsigned offset, int value) | ||
91 | { | ||
92 | struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); | ||
93 | void __iomem *base = ourchip->base; | ||
94 | unsigned long flags; | ||
95 | unsigned long dat; | ||
96 | |||
97 | local_irq_save(flags); | ||
98 | |||
99 | dat = __raw_readl(base + 0x04); | ||
100 | dat &= ~(1 << offset); | ||
101 | if (value) | ||
102 | dat |= 1 << offset; | ||
103 | __raw_writel(dat, base + 0x04); | ||
104 | |||
105 | local_irq_restore(flags); | ||
106 | } | ||
107 | |||
108 | static int s3c24xx_gpiolib_get(struct gpio_chip *chip, unsigned offset) | ||
109 | { | ||
110 | struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); | ||
111 | unsigned long val; | ||
112 | |||
113 | val = __raw_readl(ourchip->base + 0x04); | ||
114 | val >>= offset; | ||
115 | val &= 1; | ||
116 | |||
117 | return val; | ||
118 | } | ||
119 | |||
120 | static int s3c24xx_gpiolib_banka_input(struct gpio_chip *chip, unsigned offset) | 28 | static int s3c24xx_gpiolib_banka_input(struct gpio_chip *chip, unsigned offset) |
121 | { | 29 | { |
122 | return -EINVAL; | 30 | return -EINVAL; |
@@ -125,7 +33,7 @@ static int s3c24xx_gpiolib_banka_input(struct gpio_chip *chip, unsigned offset) | |||
125 | static int s3c24xx_gpiolib_banka_output(struct gpio_chip *chip, | 33 | static int s3c24xx_gpiolib_banka_output(struct gpio_chip *chip, |
126 | unsigned offset, int value) | 34 | unsigned offset, int value) |
127 | { | 35 | { |
128 | struct s3c24xx_gpio_chip *ourchip = to_s3c_chip(chip); | 36 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); |
129 | void __iomem *base = ourchip->base; | 37 | void __iomem *base = ourchip->base; |
130 | unsigned long flags; | 38 | unsigned long flags; |
131 | unsigned long dat; | 39 | unsigned long dat; |
@@ -151,7 +59,7 @@ static int s3c24xx_gpiolib_banka_output(struct gpio_chip *chip, | |||
151 | return 0; | 59 | return 0; |
152 | } | 60 | } |
153 | 61 | ||
154 | static struct s3c24xx_gpio_chip gpios[] = { | 62 | struct s3c_gpio_chip s3c24xx_gpios[] = { |
155 | [0] = { | 63 | [0] = { |
156 | .base = S3C24XX_GPIO_BASE(S3C2410_GPA0), | 64 | .base = S3C24XX_GPIO_BASE(S3C2410_GPA0), |
157 | .chip = { | 65 | .chip = { |
@@ -161,8 +69,6 @@ static struct s3c24xx_gpio_chip gpios[] = { | |||
161 | .ngpio = 24, | 69 | .ngpio = 24, |
162 | .direction_input = s3c24xx_gpiolib_banka_input, | 70 | .direction_input = s3c24xx_gpiolib_banka_input, |
163 | .direction_output = s3c24xx_gpiolib_banka_output, | 71 | .direction_output = s3c24xx_gpiolib_banka_output, |
164 | .set = s3c24xx_gpiolib_set, | ||
165 | .get = s3c24xx_gpiolib_get, | ||
166 | }, | 72 | }, |
167 | }, | 73 | }, |
168 | [1] = { | 74 | [1] = { |
@@ -172,10 +78,6 @@ static struct s3c24xx_gpio_chip gpios[] = { | |||
172 | .owner = THIS_MODULE, | 78 | .owner = THIS_MODULE, |
173 | .label = "GPIOB", | 79 | .label = "GPIOB", |
174 | .ngpio = 16, | 80 | .ngpio = 16, |
175 | .direction_input = s3c24xx_gpiolib_input, | ||
176 | .direction_output = s3c24xx_gpiolib_output, | ||
177 | .set = s3c24xx_gpiolib_set, | ||
178 | .get = s3c24xx_gpiolib_get, | ||
179 | }, | 81 | }, |
180 | }, | 82 | }, |
181 | [2] = { | 83 | [2] = { |
@@ -185,10 +87,6 @@ static struct s3c24xx_gpio_chip gpios[] = { | |||
185 | .owner = THIS_MODULE, | 87 | .owner = THIS_MODULE, |
186 | .label = "GPIOC", | 88 | .label = "GPIOC", |
187 | .ngpio = 16, | 89 | .ngpio = 16, |
188 | .direction_input = s3c24xx_gpiolib_input, | ||
189 | .direction_output = s3c24xx_gpiolib_output, | ||
190 | .set = s3c24xx_gpiolib_set, | ||
191 | .get = s3c24xx_gpiolib_get, | ||
192 | }, | 90 | }, |
193 | }, | 91 | }, |
194 | [3] = { | 92 | [3] = { |
@@ -198,10 +96,6 @@ static struct s3c24xx_gpio_chip gpios[] = { | |||
198 | .owner = THIS_MODULE, | 96 | .owner = THIS_MODULE, |
199 | .label = "GPIOD", | 97 | .label = "GPIOD", |
200 | .ngpio = 16, | 98 | .ngpio = 16, |
201 | .direction_input = s3c24xx_gpiolib_input, | ||
202 | .direction_output = s3c24xx_gpiolib_output, | ||
203 | .set = s3c24xx_gpiolib_set, | ||
204 | .get = s3c24xx_gpiolib_get, | ||
205 | }, | 99 | }, |
206 | }, | 100 | }, |
207 | [4] = { | 101 | [4] = { |
@@ -211,10 +105,6 @@ static struct s3c24xx_gpio_chip gpios[] = { | |||
211 | .label = "GPIOE", | 105 | .label = "GPIOE", |
212 | .owner = THIS_MODULE, | 106 | .owner = THIS_MODULE, |
213 | .ngpio = 16, | 107 | .ngpio = 16, |
214 | .direction_input = s3c24xx_gpiolib_input, | ||
215 | .direction_output = s3c24xx_gpiolib_output, | ||
216 | .set = s3c24xx_gpiolib_set, | ||
217 | .get = s3c24xx_gpiolib_get, | ||
218 | }, | 108 | }, |
219 | }, | 109 | }, |
220 | [5] = { | 110 | [5] = { |
@@ -224,10 +114,6 @@ static struct s3c24xx_gpio_chip gpios[] = { | |||
224 | .owner = THIS_MODULE, | 114 | .owner = THIS_MODULE, |
225 | .label = "GPIOF", | 115 | .label = "GPIOF", |
226 | .ngpio = 8, | 116 | .ngpio = 8, |
227 | .direction_input = s3c24xx_gpiolib_input, | ||
228 | .direction_output = s3c24xx_gpiolib_output, | ||
229 | .set = s3c24xx_gpiolib_set, | ||
230 | .get = s3c24xx_gpiolib_get, | ||
231 | }, | 117 | }, |
232 | }, | 118 | }, |
233 | [6] = { | 119 | [6] = { |
@@ -237,21 +123,17 @@ static struct s3c24xx_gpio_chip gpios[] = { | |||
237 | .owner = THIS_MODULE, | 123 | .owner = THIS_MODULE, |
238 | .label = "GPIOG", | 124 | .label = "GPIOG", |
239 | .ngpio = 10, | 125 | .ngpio = 10, |
240 | .direction_input = s3c24xx_gpiolib_input, | ||
241 | .direction_output = s3c24xx_gpiolib_output, | ||
242 | .set = s3c24xx_gpiolib_set, | ||
243 | .get = s3c24xx_gpiolib_get, | ||
244 | }, | 126 | }, |
245 | }, | 127 | }, |
246 | }; | 128 | }; |
247 | 129 | ||
248 | static __init int s3c24xx_gpiolib_init(void) | 130 | static __init int s3c24xx_gpiolib_init(void) |
249 | { | 131 | { |
250 | struct s3c24xx_gpio_chip *chip = gpios; | 132 | struct s3c_gpio_chip *chip = s3c24xx_gpios; |
251 | int gpn; | 133 | int gpn; |
252 | 134 | ||
253 | for (gpn = 0; gpn < ARRAY_SIZE(gpios); gpn++, chip++) | 135 | for (gpn = 0; gpn < ARRAY_SIZE(s3c24xx_gpios); gpn++, chip++) |
254 | gpiochip_add(&chip->chip); | 136 | s3c_gpiolib_add(chip); |
255 | 137 | ||
256 | return 0; | 138 | return 0; |
257 | } | 139 | } |
diff --git a/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h b/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h new file mode 100644 index 000000000000..a087de21bc20 --- /dev/null +++ b/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C24xx - pwm clock and timer support | ||
8 | */ | ||
9 | |||
10 | /** | ||
11 | * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk | ||
12 | * @cfg: The timer TCFG1 register bits shifted down to 0. | ||
13 | * | ||
14 | * Return true if the given configuration from TCFG1 is a TCLK instead | ||
15 | * any of the TDIV clocks. | ||
16 | */ | ||
17 | static inline int pwm_cfg_src_is_tclk(unsigned long tcfg) | ||
18 | { | ||
19 | return tcfg == S3C2410_TCFG1_MUX_TCLK; | ||
20 | } | ||
21 | |||
22 | /** | ||
23 | * tcfg_to_divisor() - convert tcfg1 setting to a divisor | ||
24 | * @tcfg1: The tcfg1 setting, shifted down. | ||
25 | * | ||
26 | * Get the divisor value for the given tcfg1 setting. We assume the | ||
27 | * caller has already checked to see if this is not a TCLK source. | ||
28 | */ | ||
29 | static inline unsigned long tcfg_to_divisor(unsigned long tcfg1) | ||
30 | { | ||
31 | return 1 << (1 + tcfg1); | ||
32 | } | ||
33 | |||
34 | /** | ||
35 | * pwm_tdiv_has_div1() - does the tdiv setting have a /1 | ||
36 | * | ||
37 | * Return true if we have a /1 in the tdiv setting. | ||
38 | */ | ||
39 | static inline unsigned int pwm_tdiv_has_div1(void) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | /** | ||
45 | * pwm_tdiv_div_bits() - calculate TCFG1 divisor value. | ||
46 | * @div: The divisor to calculate the bit information for. | ||
47 | * | ||
48 | * Turn a divisor into the necessary bit field for TCFG1. | ||
49 | */ | ||
50 | static inline unsigned long pwm_tdiv_div_bits(unsigned int div) | ||
51 | { | ||
52 | return ilog2(div) - 1; | ||
53 | } | ||
54 | |||
55 | #define S3C_TCFG1_MUX_TCLK S3C2410_TCFG1_MUX_TCLK | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/map.h b/arch/arm/plat-s3c24xx/include/plat/map.h new file mode 100644 index 000000000000..fef8ea8b8e1e --- /dev/null +++ b/arch/arm/plat-s3c24xx/include/plat/map.h | |||
@@ -0,0 +1,99 @@ | |||
1 | /* linux/include/asm-arm/plat-s3c24xx/map.h | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C24XX - Memory map definitions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_PLAT_S3C24XX_MAP_H | ||
14 | #define __ASM_PLAT_S3C24XX_MAP_H | ||
15 | |||
16 | /* interrupt controller is the first thing we put in, to make | ||
17 | * the assembly code for the irq detection easier | ||
18 | */ | ||
19 | #define S3C24XX_VA_IRQ S3C_VA_IRQ | ||
20 | #define S3C2410_PA_IRQ (0x4A000000) | ||
21 | #define S3C24XX_SZ_IRQ SZ_1M | ||
22 | |||
23 | /* memory controller registers */ | ||
24 | #define S3C24XX_VA_MEMCTRL S3C_VA_MEM | ||
25 | #define S3C2410_PA_MEMCTRL (0x48000000) | ||
26 | #define S3C24XX_SZ_MEMCTRL SZ_1M | ||
27 | |||
28 | /* UARTs */ | ||
29 | #define S3C24XX_VA_UART S3C_VA_UART | ||
30 | #define S3C2410_PA_UART (0x50000000) | ||
31 | #define S3C24XX_SZ_UART SZ_1M | ||
32 | #define S3C_UART_OFFSET (0x4000) | ||
33 | |||
34 | /* Timers */ | ||
35 | #define S3C24XX_VA_TIMER S3C_VA_TIMER | ||
36 | #define S3C2410_PA_TIMER (0x51000000) | ||
37 | #define S3C24XX_SZ_TIMER SZ_1M | ||
38 | |||
39 | /* Clock and Power management */ | ||
40 | #define S3C24XX_VA_CLKPWR S3C_VA_SYS | ||
41 | #define S3C24XX_SZ_CLKPWR SZ_1M | ||
42 | |||
43 | /* USB Device port */ | ||
44 | #define S3C2410_PA_USBDEV (0x52000000) | ||
45 | #define S3C24XX_SZ_USBDEV SZ_1M | ||
46 | |||
47 | /* Watchdog */ | ||
48 | #define S3C24XX_VA_WATCHDOG S3C_VA_WATCHDOG | ||
49 | #define S3C2410_PA_WATCHDOG (0x53000000) | ||
50 | #define S3C24XX_SZ_WATCHDOG SZ_1M | ||
51 | |||
52 | /* Standard size definitions for peripheral blocks. */ | ||
53 | |||
54 | #define S3C24XX_SZ_IIS SZ_1M | ||
55 | #define S3C24XX_SZ_ADC SZ_1M | ||
56 | #define S3C24XX_SZ_SPI SZ_1M | ||
57 | #define S3C24XX_SZ_SDI SZ_1M | ||
58 | #define S3C24XX_SZ_NAND SZ_1M | ||
59 | #define S3C24XX_SZ_USBHOST SZ_1M | ||
60 | |||
61 | /* GPIO ports */ | ||
62 | |||
63 | /* the calculation for the VA of this must ensure that | ||
64 | * it is the same distance apart from the UART in the | ||
65 | * phsyical address space, as the initial mapping for the IO | ||
66 | * is done as a 1:1 maping. This puts it (currently) at | ||
67 | * 0xFA800000, which is not in the way of any current mapping | ||
68 | * by the base system. | ||
69 | */ | ||
70 | |||
71 | #define S3C2410_PA_GPIO (0x56000000) | ||
72 | #define S3C24XX_VA_GPIO ((S3C24XX_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) | ||
73 | #define S3C24XX_SZ_GPIO SZ_1M | ||
74 | |||
75 | |||
76 | /* ISA style IO, for each machine to sort out mappings for, if it | ||
77 | * implements it. We reserve two 16M regions for ISA. | ||
78 | */ | ||
79 | |||
80 | #define S3C24XX_VA_ISA_WORD S3C2410_ADDR(0x02000000) | ||
81 | #define S3C24XX_VA_ISA_BYTE S3C2410_ADDR(0x03000000) | ||
82 | |||
83 | /* deal with the registers that move under the 2412/2413 */ | ||
84 | |||
85 | #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) | ||
86 | #ifndef __ASSEMBLY__ | ||
87 | extern void __iomem *s3c24xx_va_gpio2; | ||
88 | #endif | ||
89 | #ifdef CONFIG_CPU_S3C2412_ONLY | ||
90 | #define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10) | ||
91 | #else | ||
92 | #define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2 | ||
93 | #endif | ||
94 | #else | ||
95 | #define s3c24xx_va_gpio2 S3C24XX_VA_GPIO | ||
96 | #define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO | ||
97 | #endif | ||
98 | |||
99 | #endif /* __ASM_PLAT_S3C24XX_MAP_H */ | ||
diff --git a/include/asm-arm/plat-s3c24xx/mci.h b/arch/arm/plat-s3c24xx/include/plat/mci.h index 2d0852ac3b27..2d0852ac3b27 100644 --- a/include/asm-arm/plat-s3c24xx/mci.h +++ b/arch/arm/plat-s3c24xx/include/plat/mci.h | |||
diff --git a/arch/arm/plat-s3c24xx/include/plat/pll.h b/arch/arm/plat-s3c24xx/include/plat/pll.h new file mode 100644 index 000000000000..7ea8bffa7a9c --- /dev/null +++ b/arch/arm/plat-s3c24xx/include/plat/pll.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/include/plat/pll.h | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * S3C24xx - common pll registers and code | ||
8 | */ | ||
9 | |||
10 | #define S3C24XX_PLLCON_MDIVSHIFT 12 | ||
11 | #define S3C24XX_PLLCON_PDIVSHIFT 4 | ||
12 | #define S3C24XX_PLLCON_SDIVSHIFT 0 | ||
13 | #define S3C24XX_PLLCON_MDIVMASK ((1<<(1+(19-12)))-1) | ||
14 | #define S3C24XX_PLLCON_PDIVMASK ((1<<5)-1) | ||
15 | #define S3C24XX_PLLCON_SDIVMASK 3 | ||
16 | |||
17 | #include <asm/div64.h> | ||
18 | |||
19 | static inline unsigned int | ||
20 | s3c24xx_get_pll(unsigned int pllval, unsigned int baseclk) | ||
21 | { | ||
22 | unsigned int mdiv, pdiv, sdiv; | ||
23 | uint64_t fvco; | ||
24 | |||
25 | mdiv = pllval >> S3C24XX_PLLCON_MDIVSHIFT; | ||
26 | pdiv = pllval >> S3C24XX_PLLCON_PDIVSHIFT; | ||
27 | sdiv = pllval >> S3C24XX_PLLCON_SDIVSHIFT; | ||
28 | |||
29 | mdiv &= S3C24XX_PLLCON_MDIVMASK; | ||
30 | pdiv &= S3C24XX_PLLCON_PDIVMASK; | ||
31 | sdiv &= S3C24XX_PLLCON_SDIVMASK; | ||
32 | |||
33 | fvco = (uint64_t)baseclk * (mdiv + 8); | ||
34 | do_div(fvco, (pdiv + 2) << sdiv); | ||
35 | |||
36 | return (unsigned int)fvco; | ||
37 | } | ||
diff --git a/include/asm-arm/plat-s3c24xx/regs-spi.h b/arch/arm/plat-s3c24xx/include/plat/regs-spi.h index 2b35479ee35c..2b35479ee35c 100644 --- a/include/asm-arm/plat-s3c24xx/regs-spi.h +++ b/arch/arm/plat-s3c24xx/include/plat/regs-spi.h | |||
diff --git a/include/asm-arm/plat-s3c24xx/regs-udc.h b/arch/arm/plat-s3c24xx/include/plat/regs-udc.h index f0dd4a41b37b..f0dd4a41b37b 100644 --- a/include/asm-arm/plat-s3c24xx/regs-udc.h +++ b/arch/arm/plat-s3c24xx/include/plat/regs-udc.h | |||
diff --git a/arch/arm/plat-s3c24xx/include/plat/s3c2400.h b/arch/arm/plat-s3c24xx/include/plat/s3c2400.h index 3a5a16821af8..b3feaea5c70b 100644 --- a/arch/arm/plat-s3c24xx/include/plat/s3c2400.h +++ b/arch/arm/plat-s3c24xx/include/plat/s3c2400.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | extern int s3c2400_init(void); | 18 | extern int s3c2400_init(void); |
19 | 19 | ||
20 | extern void s3c2400_map_io(struct map_desc *mach_desc, int size); | 20 | extern void s3c2400_map_io(void); |
21 | 21 | ||
22 | extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 22 | extern void s3c2400_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
23 | 23 | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/s3c2410.h b/arch/arm/plat-s3c24xx/include/plat/s3c2410.h index 3cd1ec677b3f..a9ac9e29759e 100644 --- a/arch/arm/plat-s3c24xx/include/plat/s3c2410.h +++ b/arch/arm/plat-s3c24xx/include/plat/s3c2410.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | extern int s3c2410_init(void); | 16 | extern int s3c2410_init(void); |
17 | 17 | ||
18 | extern void s3c2410_map_io(struct map_desc *mach_desc, int size); | 18 | extern void s3c2410_map_io(void); |
19 | 19 | ||
20 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 20 | extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
21 | 21 | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/s3c2412.h b/arch/arm/plat-s3c24xx/include/plat/s3c2412.h index 3ec97685e781..bb15d3b68be5 100644 --- a/arch/arm/plat-s3c24xx/include/plat/s3c2412.h +++ b/arch/arm/plat-s3c24xx/include/plat/s3c2412.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | extern int s3c2412_init(void); | 15 | extern int s3c2412_init(void); |
16 | 16 | ||
17 | extern void s3c2412_map_io(struct map_desc *mach_desc, int size); | 17 | extern void s3c2412_map_io(void); |
18 | 18 | ||
19 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 19 | extern void s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
20 | 20 | ||
diff --git a/arch/arm/plat-s3c24xx/include/plat/s3c2443.h b/arch/arm/plat-s3c24xx/include/plat/s3c2443.h index 11d83b5c84e6..815b107ed890 100644 --- a/arch/arm/plat-s3c24xx/include/plat/s3c2443.h +++ b/arch/arm/plat-s3c24xx/include/plat/s3c2443.h | |||
@@ -16,7 +16,7 @@ struct s3c2410_uartcfg; | |||
16 | 16 | ||
17 | extern int s3c2443_init(void); | 17 | extern int s3c2443_init(void); |
18 | 18 | ||
19 | extern void s3c2443_map_io(struct map_desc *mach_desc, int size); | 19 | extern void s3c2443_map_io(void); |
20 | 20 | ||
21 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 21 | extern void s3c2443_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
22 | 22 | ||
diff --git a/include/asm-arm/plat-s3c24xx/udc.h b/arch/arm/plat-s3c24xx/include/plat/udc.h index 546bb4008f49..546bb4008f49 100644 --- a/include/asm-arm/plat-s3c24xx/udc.h +++ b/arch/arm/plat-s3c24xx/include/plat/udc.h | |||
diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index 963f7a4f26f2..0192ecdc1442 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c | |||
@@ -62,6 +62,7 @@ | |||
62 | 62 | ||
63 | #include <asm/mach/irq.h> | 63 | #include <asm/mach/irq.h> |
64 | 64 | ||
65 | #include <plat/regs-irqtype.h> | ||
65 | #include <mach/regs-irq.h> | 66 | #include <mach/regs-irq.h> |
66 | #include <mach/regs-gpio.h> | 67 | #include <mach/regs-gpio.h> |
67 | 68 | ||
diff --git a/arch/arm/plat-s3c24xx/pm.c b/arch/arm/plat-s3c24xx/pm.c index 8efb57ad5019..34ef18e5b2a1 100644 --- a/arch/arm/plat-s3c24xx/pm.c +++ b/arch/arm/plat-s3c24xx/pm.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
34 | #include <linux/crc32.h> | 34 | #include <linux/crc32.h> |
35 | #include <linux/ioport.h> | 35 | #include <linux/ioport.h> |
36 | #include <linux/delay.h> | ||
37 | #include <linux/serial_core.h> | 36 | #include <linux/serial_core.h> |
38 | #include <linux/io.h> | 37 | #include <linux/io.h> |
39 | 38 | ||
@@ -76,11 +75,13 @@ static struct sleep_save core_save[] = { | |||
76 | SAVE_ITEM(S3C2410_BANKCON4), | 75 | SAVE_ITEM(S3C2410_BANKCON4), |
77 | SAVE_ITEM(S3C2410_BANKCON5), | 76 | SAVE_ITEM(S3C2410_BANKCON5), |
78 | 77 | ||
78 | #ifndef CONFIG_CPU_FREQ | ||
79 | SAVE_ITEM(S3C2410_CLKDIVN), | 79 | SAVE_ITEM(S3C2410_CLKDIVN), |
80 | SAVE_ITEM(S3C2410_MPLLCON), | 80 | SAVE_ITEM(S3C2410_MPLLCON), |
81 | SAVE_ITEM(S3C2410_REFRESH), | ||
82 | #endif | ||
81 | SAVE_ITEM(S3C2410_UPLLCON), | 83 | SAVE_ITEM(S3C2410_UPLLCON), |
82 | SAVE_ITEM(S3C2410_CLKSLOW), | 84 | SAVE_ITEM(S3C2410_CLKSLOW), |
83 | SAVE_ITEM(S3C2410_REFRESH), | ||
84 | }; | 85 | }; |
85 | 86 | ||
86 | static struct gpio_sleep { | 87 | static struct gpio_sleep { |
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/plat-s3c24xx/s3c2410-clock.c index 4e07943c1e29..b61bdb793734 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/plat-s3c24xx/s3c2410-clock.c | |||
@@ -272,5 +272,6 @@ int __init s3c2410_baseclk_add(void) | |||
272 | (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on", | 272 | (clkslow & S3C2410_CLKSLOW_MPLL_OFF) ? "off" : "on", |
273 | (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on"); | 273 | (clkslow & S3C2410_CLKSLOW_UCLK_OFF) ? "off" : "on"); |
274 | 274 | ||
275 | s3c_pwmclk_init(); | ||
275 | return 0; | 276 | return 0; |
276 | } | 277 | } |
diff --git a/arch/arm/plat-s3c24xx/s3c244x-clock.c b/arch/arm/plat-s3c24xx/s3c244x-clock.c index 7c09773ff9fc..dde41f171aff 100644 --- a/arch/arm/plat-s3c24xx/s3c244x-clock.c +++ b/arch/arm/plat-s3c24xx/s3c244x-clock.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/sysdev.h> | 31 | #include <linux/sysdev.h> |
32 | #include <linux/interrupt.h> | 32 | #include <linux/interrupt.h> |
33 | #include <linux/ioport.h> | 33 | #include <linux/ioport.h> |
34 | #include <linux/mutex.h> | ||
35 | #include <linux/clk.h> | 34 | #include <linux/clk.h> |
36 | #include <linux/io.h> | 35 | #include <linux/io.h> |
37 | 36 | ||
@@ -102,13 +101,13 @@ static int s3c244x_clk_add(struct sys_device *sysdev) | |||
102 | if (clk_get_rate(clock_upll) > (94 * MHZ)) { | 101 | if (clk_get_rate(clock_upll) > (94 * MHZ)) { |
103 | clk_usb_bus.rate = clk_get_rate(clock_upll) / 2; | 102 | clk_usb_bus.rate = clk_get_rate(clock_upll) / 2; |
104 | 103 | ||
105 | mutex_lock(&clocks_mutex); | 104 | spin_lock(&clocks_lock); |
106 | 105 | ||
107 | clkdivn = __raw_readl(S3C2410_CLKDIVN); | 106 | clkdivn = __raw_readl(S3C2410_CLKDIVN); |
108 | clkdivn |= S3C2440_CLKDIVN_UCLK; | 107 | clkdivn |= S3C2440_CLKDIVN_UCLK; |
109 | __raw_writel(clkdivn, S3C2410_CLKDIVN); | 108 | __raw_writel(clkdivn, S3C2410_CLKDIVN); |
110 | 109 | ||
111 | mutex_unlock(&clocks_mutex); | 110 | spin_unlock(&clocks_lock); |
112 | } | 111 | } |
113 | 112 | ||
114 | return 0; | 113 | return 0; |
diff --git a/arch/arm/plat-s3c24xx/s3c244x.c b/arch/arm/plat-s3c24xx/s3c244x.c index c0344fac4a94..c1de6bb0101b 100644 --- a/arch/arm/plat-s3c24xx/s3c244x.c +++ b/arch/arm/plat-s3c24xx/s3c244x.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | #include <asm/irq.h> | 30 | #include <asm/irq.h> |
31 | 31 | ||
32 | #include <plat/cpu-freq.h> | ||
33 | |||
32 | #include <mach/regs-clock.h> | 34 | #include <mach/regs-clock.h> |
33 | #include <plat/regs-serial.h> | 35 | #include <plat/regs-serial.h> |
34 | #include <mach/regs-gpio.h> | 36 | #include <mach/regs-gpio.h> |
@@ -42,6 +44,7 @@ | |||
42 | #include <plat/devs.h> | 44 | #include <plat/devs.h> |
43 | #include <plat/cpu.h> | 45 | #include <plat/cpu.h> |
44 | #include <plat/pm.h> | 46 | #include <plat/pm.h> |
47 | #include <plat/pll.h> | ||
45 | 48 | ||
46 | static struct map_desc s3c244x_iodesc[] __initdata = { | 49 | static struct map_desc s3c244x_iodesc[] __initdata = { |
47 | IODESC_ENT(CLKPWR), | 50 | IODESC_ENT(CLKPWR), |
@@ -56,32 +59,34 @@ void __init s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
56 | s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no); | 59 | s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no); |
57 | } | 60 | } |
58 | 61 | ||
59 | void __init s3c244x_map_io(struct map_desc *mach_desc, int size) | 62 | void __init s3c244x_map_io(void) |
60 | { | 63 | { |
61 | /* register our io-tables */ | 64 | /* register our io-tables */ |
62 | 65 | ||
63 | iotable_init(s3c244x_iodesc, ARRAY_SIZE(s3c244x_iodesc)); | 66 | iotable_init(s3c244x_iodesc, ARRAY_SIZE(s3c244x_iodesc)); |
64 | iotable_init(mach_desc, size); | ||
65 | 67 | ||
66 | /* rename any peripherals used differing from the s3c2410 */ | 68 | /* rename any peripherals used differing from the s3c2410 */ |
67 | 69 | ||
68 | s3c_device_sdi.name = "s3c2440-sdi"; | 70 | s3c_device_sdi.name = "s3c2440-sdi"; |
69 | s3c_device_i2c.name = "s3c2440-i2c"; | 71 | s3c_device_i2c0.name = "s3c2440-i2c"; |
70 | s3c_device_nand.name = "s3c2440-nand"; | 72 | s3c_device_nand.name = "s3c2440-nand"; |
71 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; | 73 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; |
72 | } | 74 | } |
73 | 75 | ||
74 | void __init s3c244x_init_clocks(int xtal) | 76 | void __init_or_cpufreq s3c244x_setup_clocks(void) |
75 | { | 77 | { |
78 | struct clk *xtal_clk; | ||
76 | unsigned long clkdiv; | 79 | unsigned long clkdiv; |
77 | unsigned long camdiv; | 80 | unsigned long camdiv; |
81 | unsigned long xtal; | ||
78 | unsigned long hclk, fclk, pclk; | 82 | unsigned long hclk, fclk, pclk; |
79 | int hdiv = 1; | 83 | int hdiv = 1; |
80 | 84 | ||
81 | /* now we've got our machine bits initialised, work out what | 85 | xtal_clk = clk_get(NULL, "xtal"); |
82 | * clocks we've got */ | 86 | xtal = clk_get_rate(xtal_clk); |
87 | clk_put(xtal_clk); | ||
83 | 88 | ||
84 | fclk = s3c2410_get_pll(__raw_readl(S3C2410_MPLLCON), xtal) * 2; | 89 | fclk = s3c24xx_get_pll(__raw_readl(S3C2410_MPLLCON), xtal) * 2; |
85 | 90 | ||
86 | clkdiv = __raw_readl(S3C2410_CLKDIVN); | 91 | clkdiv = __raw_readl(S3C2410_CLKDIVN); |
87 | camdiv = __raw_readl(S3C2440_CAMDIVN); | 92 | camdiv = __raw_readl(S3C2440_CAMDIVN); |
@@ -107,18 +112,24 @@ void __init s3c244x_init_clocks(int xtal) | |||
107 | } | 112 | } |
108 | 113 | ||
109 | hclk = fclk / hdiv; | 114 | hclk = fclk / hdiv; |
110 | pclk = hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1); | 115 | pclk = hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN) ? 2 : 1); |
111 | 116 | ||
112 | /* print brief summary of clocks, etc */ | 117 | /* print brief summary of clocks, etc */ |
113 | 118 | ||
114 | printk("S3C244X: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", | 119 | printk("S3C244X: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n", |
115 | print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); | 120 | print_mhz(fclk), print_mhz(hclk), print_mhz(pclk)); |
116 | 121 | ||
122 | s3c24xx_setup_clocks(fclk, hclk, pclk); | ||
123 | } | ||
124 | |||
125 | void __init s3c244x_init_clocks(int xtal) | ||
126 | { | ||
117 | /* initialise the clocks here, to allow other things like the | 127 | /* initialise the clocks here, to allow other things like the |
118 | * console to use them, and to add new ones after the initialisation | 128 | * console to use them, and to add new ones after the initialisation |
119 | */ | 129 | */ |
120 | 130 | ||
121 | s3c24xx_setup_clocks(xtal, fclk, hclk, pclk); | 131 | s3c24xx_register_baseclocks(xtal); |
132 | s3c244x_setup_clocks(); | ||
122 | s3c2410_baseclk_add(); | 133 | s3c2410_baseclk_add(); |
123 | } | 134 | } |
124 | 135 | ||
diff --git a/arch/arm/plat-s3c24xx/s3c244x.h b/arch/arm/plat-s3c24xx/s3c244x.h index f8ed17676a35..6aab5eaae2b4 100644 --- a/arch/arm/plat-s3c24xx/s3c244x.h +++ b/arch/arm/plat-s3c24xx/s3c244x.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) | 13 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) |
14 | 14 | ||
15 | extern void s3c244x_map_io(struct map_desc *mach_desc, int size); | 15 | extern void s3c244x_map_io(void); |
16 | 16 | ||
17 | extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); | 17 | extern void s3c244x_init_uarts(struct s3c2410_uartcfg *cfg, int no); |
18 | 18 | ||
diff --git a/arch/arm/plat-s3c24xx/setup-i2c.c b/arch/arm/plat-s3c24xx/setup-i2c.c new file mode 100644 index 000000000000..d62b7e7fb355 --- /dev/null +++ b/arch/arm/plat-s3c24xx/setup-i2c.c | |||
@@ -0,0 +1,25 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/setup-i2c.c | ||
2 | * | ||
3 | * Copyright 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C24XX Base setup for i2c device | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | |||
15 | struct platform_device; | ||
16 | |||
17 | #include <plat/iic.h> | ||
18 | #include <mach/hardware.h> | ||
19 | #include <mach/regs-gpio.h> | ||
20 | |||
21 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | ||
22 | { | ||
23 | s3c2410_gpio_cfgpin(S3C2410_GPE15, S3C2410_GPE15_IICSDA); | ||
24 | s3c2410_gpio_cfgpin(S3C2410_GPE14, S3C2410_GPE14_IICSCL); | ||
25 | } | ||
diff --git a/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c b/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c new file mode 100644 index 000000000000..8b403cbb53d2 --- /dev/null +++ b/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c | |||
@@ -0,0 +1,37 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C24XX SPI - gpio configuration for bus 0 on gpe11,12,13 | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | |||
16 | #include <mach/hardware.h> | ||
17 | |||
18 | #include <mach/spi.h> | ||
19 | #include <mach/regs-gpio.h> | ||
20 | |||
21 | void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi, | ||
22 | int enable) | ||
23 | { | ||
24 | if (enable) { | ||
25 | s3c2410_gpio_cfgpin(S3C2410_GPE13, S3C2410_GPE13_SPICLK0); | ||
26 | s3c2410_gpio_cfgpin(S3C2410_GPE12, S3C2410_GPE12_SPIMOSI0); | ||
27 | s3c2410_gpio_cfgpin(S3C2410_GPE11, S3C2410_GPE11_SPIMISO0); | ||
28 | s3c2410_gpio_pullup(S3C2410_GPE11, 0); | ||
29 | s3c2410_gpio_pullup(S3C2410_GPE13, 0); | ||
30 | } else { | ||
31 | s3c2410_gpio_cfgpin(S3C2410_GPE13, S3C2410_GPIO_INPUT); | ||
32 | s3c2410_gpio_cfgpin(S3C2410_GPE11, S3C2410_GPIO_INPUT); | ||
33 | s3c2410_gpio_pullup(S3C2410_GPE11, 1); | ||
34 | s3c2410_gpio_pullup(S3C2410_GPE12, 1); | ||
35 | s3c2410_gpio_pullup(S3C2410_GPE13, 1); | ||
36 | } | ||
37 | } | ||
diff --git a/arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c b/arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c new file mode 100644 index 000000000000..8fccd4e549f0 --- /dev/null +++ b/arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c | |||
@@ -0,0 +1,37 @@ | |||
1 | /* linux/arch/arm/plat-s3c24xx/spi-bus0-gpg5_6_7.c | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * http://armlinux.simtec.co.uk/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * S3C24XX SPI - gpio configuration for bus 1 on gpg5,6,7 | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License. | ||
12 | */ | ||
13 | |||
14 | #include <linux/kernel.h> | ||
15 | |||
16 | #include <mach/hardware.h> | ||
17 | |||
18 | #include <mach/spi.h> | ||
19 | #include <mach/regs-gpio.h> | ||
20 | |||
21 | void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi, | ||
22 | int enable) | ||
23 | { | ||
24 | if (enable) { | ||
25 | s3c2410_gpio_cfgpin(S3C2410_GPG7, S3C2410_GPG7_SPICLK1); | ||
26 | s3c2410_gpio_cfgpin(S3C2410_GPG6, S3C2410_GPG6_SPIMOSI1); | ||
27 | s3c2410_gpio_cfgpin(S3C2410_GPG5, S3C2410_GPG5_SPIMISO1); | ||
28 | s3c2410_gpio_pullup(S3C2410_GPG5, 0); | ||
29 | s3c2410_gpio_pullup(S3C2410_GPG6, 0); | ||
30 | } else { | ||
31 | s3c2410_gpio_cfgpin(S3C2410_GPG7, S3C2410_GPIO_INPUT); | ||
32 | s3c2410_gpio_cfgpin(S3C2410_GPG5, S3C2410_GPIO_INPUT); | ||
33 | s3c2410_gpio_pullup(S3C2410_GPG5, 1); | ||
34 | s3c2410_gpio_pullup(S3C2410_GPG6, 1); | ||
35 | s3c2410_gpio_pullup(S3C2410_GPG7, 1); | ||
36 | } | ||
37 | } | ||
diff --git a/arch/arm/plat-s3c64xx/Kconfig b/arch/arm/plat-s3c64xx/Kconfig new file mode 100644 index 000000000000..54375a00a7d2 --- /dev/null +++ b/arch/arm/plat-s3c64xx/Kconfig | |||
@@ -0,0 +1,62 @@ | |||
1 | # arch/arm/plat-s3c64xx/Kconfig | ||
2 | # | ||
3 | # Copyright 2008 Openmoko, Inc. | ||
4 | # Copyright 2008 Simtec Electronics | ||
5 | # Ben Dooks <ben@simtec.co.uk> | ||
6 | # | ||
7 | # Licensed under GPLv2 | ||
8 | |||
9 | config PLAT_S3C64XX | ||
10 | bool | ||
11 | depends on ARCH_S3C64XX | ||
12 | default y | ||
13 | select CPU_V6 | ||
14 | select PLAT_S3C | ||
15 | select ARM_VIC | ||
16 | select NO_IOPORT | ||
17 | select ARCH_REQUIRE_GPIOLIB | ||
18 | select S3C_GPIO_TRACK | ||
19 | select S3C_GPIO_PULL_UPDOWN | ||
20 | select S3C_GPIO_CFG_S3C24XX | ||
21 | select S3C_GPIO_CFG_S3C64XX | ||
22 | help | ||
23 | Base platform code for any Samsung S3C64XX device | ||
24 | |||
25 | if PLAT_S3C64XX | ||
26 | |||
27 | # Configuration options shared by all S3C64XX implementations | ||
28 | |||
29 | config CPU_S3C6400_INIT | ||
30 | bool | ||
31 | help | ||
32 | Common initialisation code for the S3C6400 that is shared | ||
33 | by other CPUs in the series, such as the S3C6410. | ||
34 | |||
35 | config CPU_S3C6400_CLOCK | ||
36 | bool | ||
37 | help | ||
38 | Common clock support code for the S3C6400 that is shared | ||
39 | by other CPUs in the series, such as the S3C6410. | ||
40 | |||
41 | # platform specific device setup | ||
42 | |||
43 | config S3C64XX_SETUP_I2C0 | ||
44 | bool | ||
45 | default y | ||
46 | help | ||
47 | Common setup code for i2c bus 0. | ||
48 | |||
49 | Note, currently since i2c0 is always compiled, this setup helper | ||
50 | is always compiled with it. | ||
51 | |||
52 | config S3C64XX_SETUP_I2C1 | ||
53 | bool | ||
54 | help | ||
55 | Common setup code for i2c bus 1. | ||
56 | |||
57 | config S3C64XX_SETUP_FB_24BPP | ||
58 | bool | ||
59 | help | ||
60 | Common setup code for S3C64XX with an 24bpp RGB display helper. | ||
61 | |||
62 | endif | ||
diff --git a/arch/arm/plat-s3c64xx/Makefile b/arch/arm/plat-s3c64xx/Makefile new file mode 100644 index 000000000000..2e6d79bf8f33 --- /dev/null +++ b/arch/arm/plat-s3c64xx/Makefile | |||
@@ -0,0 +1,31 @@ | |||
1 | # arch/arm/plat-s3c64xx/Makefile | ||
2 | # | ||
3 | # Copyright 2008 Openmoko, Inc. | ||
4 | # Copyright 2008 Simtec Electronics | ||
5 | # | ||
6 | # Licensed under GPLv2 | ||
7 | |||
8 | obj-y := | ||
9 | obj-m := | ||
10 | obj-n := dummy.o | ||
11 | obj- := | ||
12 | |||
13 | # Core files | ||
14 | |||
15 | obj-y += dev-uart.o | ||
16 | obj-y += cpu.o | ||
17 | obj-y += irq.o | ||
18 | obj-y += irq-eint.o | ||
19 | obj-y += clock.o | ||
20 | obj-y += gpiolib.o | ||
21 | |||
22 | # CPU support | ||
23 | |||
24 | obj-$(CONFIG_CPU_S3C6400_INIT) += s3c6400-init.o | ||
25 | obj-$(CONFIG_CPU_S3C6400_CLOCK) += s3c6400-clock.o | ||
26 | |||
27 | # Device setup | ||
28 | |||
29 | obj-$(CONFIG_S3C64XX_SETUP_I2C0) += setup-i2c0.o | ||
30 | obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o | ||
31 | obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o | ||
diff --git a/arch/arm/plat-s3c64xx/clock.c b/arch/arm/plat-s3c64xx/clock.c new file mode 100644 index 000000000000..136c982c68e1 --- /dev/null +++ b/arch/arm/plat-s3c64xx/clock.c | |||
@@ -0,0 +1,281 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/clock.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX Base clock support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/io.h> | ||
20 | |||
21 | #include <mach/hardware.h> | ||
22 | #include <mach/map.h> | ||
23 | |||
24 | #include <plat/regs-sys.h> | ||
25 | #include <plat/regs-clock.h> | ||
26 | #include <plat/cpu.h> | ||
27 | #include <plat/devs.h> | ||
28 | #include <plat/clock.h> | ||
29 | |||
30 | struct clk clk_27m = { | ||
31 | .name = "clk_27m", | ||
32 | .id = -1, | ||
33 | .rate = 27000000, | ||
34 | }; | ||
35 | |||
36 | static int clk_48m_ctrl(struct clk *clk, int enable) | ||
37 | { | ||
38 | unsigned long flags; | ||
39 | u32 val; | ||
40 | |||
41 | /* can't rely on clock lock, this register has other usages */ | ||
42 | local_irq_save(flags); | ||
43 | |||
44 | val = __raw_readl(S3C64XX_OTHERS); | ||
45 | if (enable) | ||
46 | val |= S3C64XX_OTHERS_USBMASK; | ||
47 | else | ||
48 | val &= ~S3C64XX_OTHERS_USBMASK; | ||
49 | |||
50 | __raw_writel(val, S3C64XX_OTHERS); | ||
51 | local_irq_restore(flags); | ||
52 | |||
53 | return 0; | ||
54 | } | ||
55 | |||
56 | struct clk clk_48m = { | ||
57 | .name = "clk_48m", | ||
58 | .id = -1, | ||
59 | .rate = 48000000, | ||
60 | .enable = clk_48m_ctrl, | ||
61 | }; | ||
62 | |||
63 | static int inline s3c64xx_gate(void __iomem *reg, | ||
64 | struct clk *clk, | ||
65 | int enable) | ||
66 | { | ||
67 | unsigned int ctrlbit = clk->ctrlbit; | ||
68 | u32 con; | ||
69 | |||
70 | con = __raw_readl(reg); | ||
71 | |||
72 | if (enable) | ||
73 | con |= ctrlbit; | ||
74 | else | ||
75 | con &= ~ctrlbit; | ||
76 | |||
77 | __raw_writel(con, reg); | ||
78 | return 0; | ||
79 | } | ||
80 | |||
81 | static int s3c64xx_pclk_ctrl(struct clk *clk, int enable) | ||
82 | { | ||
83 | return s3c64xx_gate(S3C_PCLK_GATE, clk, enable); | ||
84 | } | ||
85 | |||
86 | static int s3c64xx_hclk_ctrl(struct clk *clk, int enable) | ||
87 | { | ||
88 | return s3c64xx_gate(S3C_HCLK_GATE, clk, enable); | ||
89 | } | ||
90 | |||
91 | int s3c64xx_sclk_ctrl(struct clk *clk, int enable) | ||
92 | { | ||
93 | return s3c64xx_gate(S3C_SCLK_GATE, clk, enable); | ||
94 | } | ||
95 | |||
96 | static struct clk init_clocks_disable[] = { | ||
97 | { | ||
98 | .name = "nand", | ||
99 | .id = -1, | ||
100 | .parent = &clk_h, | ||
101 | }, { | ||
102 | .name = "adc", | ||
103 | .id = -1, | ||
104 | .parent = &clk_p, | ||
105 | .enable = s3c64xx_pclk_ctrl, | ||
106 | .ctrlbit = S3C_CLKCON_PCLK_TSADC, | ||
107 | }, { | ||
108 | .name = "i2c", | ||
109 | .id = -1, | ||
110 | .parent = &clk_p, | ||
111 | .enable = s3c64xx_pclk_ctrl, | ||
112 | .ctrlbit = S3C_CLKCON_PCLK_IIC, | ||
113 | }, { | ||
114 | .name = "iis", | ||
115 | .id = 0, | ||
116 | .parent = &clk_p, | ||
117 | .enable = s3c64xx_pclk_ctrl, | ||
118 | .ctrlbit = S3C_CLKCON_PCLK_IIS0, | ||
119 | }, { | ||
120 | .name = "iis", | ||
121 | .id = 1, | ||
122 | .parent = &clk_p, | ||
123 | .enable = s3c64xx_pclk_ctrl, | ||
124 | .ctrlbit = S3C_CLKCON_PCLK_IIS1, | ||
125 | }, { | ||
126 | .name = "spi", | ||
127 | .id = 0, | ||
128 | .parent = &clk_p, | ||
129 | .enable = s3c64xx_pclk_ctrl, | ||
130 | .ctrlbit = S3C_CLKCON_PCLK_SPI0, | ||
131 | }, { | ||
132 | .name = "spi", | ||
133 | .id = 1, | ||
134 | .parent = &clk_p, | ||
135 | .enable = s3c64xx_pclk_ctrl, | ||
136 | .ctrlbit = S3C_CLKCON_PCLK_SPI1, | ||
137 | }, { | ||
138 | .name = "48m", | ||
139 | .id = 0, | ||
140 | .parent = &clk_48m, | ||
141 | .enable = s3c64xx_sclk_ctrl, | ||
142 | .ctrlbit = S3C_CLKCON_SCLK_MMC0_48, | ||
143 | }, { | ||
144 | .name = "48m", | ||
145 | .id = 1, | ||
146 | .parent = &clk_48m, | ||
147 | .enable = s3c64xx_sclk_ctrl, | ||
148 | .ctrlbit = S3C_CLKCON_SCLK_MMC1_48, | ||
149 | }, { | ||
150 | .name = "48m", | ||
151 | .id = 2, | ||
152 | .parent = &clk_48m, | ||
153 | .enable = s3c64xx_sclk_ctrl, | ||
154 | .ctrlbit = S3C_CLKCON_SCLK_MMC2_48, | ||
155 | }, | ||
156 | }; | ||
157 | |||
158 | static struct clk init_clocks[] = { | ||
159 | { | ||
160 | .name = "lcd", | ||
161 | .id = -1, | ||
162 | .parent = &clk_h, | ||
163 | .enable = s3c64xx_hclk_ctrl, | ||
164 | .ctrlbit = S3C_CLKCON_HCLK_LCD, | ||
165 | }, { | ||
166 | .name = "gpio", | ||
167 | .id = -1, | ||
168 | .parent = &clk_p, | ||
169 | .enable = s3c64xx_pclk_ctrl, | ||
170 | .ctrlbit = S3C_CLKCON_PCLK_GPIO, | ||
171 | }, { | ||
172 | .name = "usb-host", | ||
173 | .id = -1, | ||
174 | .parent = &clk_h, | ||
175 | .enable = s3c64xx_hclk_ctrl, | ||
176 | .ctrlbit = S3C_CLKCON_SCLK_UHOST, | ||
177 | }, { | ||
178 | .name = "hsmmc", | ||
179 | .id = 0, | ||
180 | .parent = &clk_h, | ||
181 | .enable = s3c64xx_hclk_ctrl, | ||
182 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC0, | ||
183 | }, { | ||
184 | .name = "hsmmc", | ||
185 | .id = 1, | ||
186 | .parent = &clk_h, | ||
187 | .enable = s3c64xx_hclk_ctrl, | ||
188 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC1, | ||
189 | }, { | ||
190 | .name = "hsmmc", | ||
191 | .id = 2, | ||
192 | .parent = &clk_h, | ||
193 | .enable = s3c64xx_hclk_ctrl, | ||
194 | .ctrlbit = S3C_CLKCON_HCLK_HSMMC2, | ||
195 | }, { | ||
196 | .name = "timers", | ||
197 | .id = -1, | ||
198 | .parent = &clk_p, | ||
199 | .enable = s3c64xx_pclk_ctrl, | ||
200 | .ctrlbit = S3C_CLKCON_PCLK_PWM, | ||
201 | }, { | ||
202 | .name = "uart", | ||
203 | .id = 0, | ||
204 | .parent = &clk_p, | ||
205 | .enable = s3c64xx_pclk_ctrl, | ||
206 | .ctrlbit = S3C_CLKCON_PCLK_UART0, | ||
207 | }, { | ||
208 | .name = "uart", | ||
209 | .id = 1, | ||
210 | .parent = &clk_p, | ||
211 | .enable = s3c64xx_pclk_ctrl, | ||
212 | .ctrlbit = S3C_CLKCON_PCLK_UART1, | ||
213 | }, { | ||
214 | .name = "uart", | ||
215 | .id = 2, | ||
216 | .parent = &clk_p, | ||
217 | .enable = s3c64xx_pclk_ctrl, | ||
218 | .ctrlbit = S3C_CLKCON_PCLK_UART2, | ||
219 | }, { | ||
220 | .name = "uart", | ||
221 | .id = 3, | ||
222 | .parent = &clk_p, | ||
223 | .enable = s3c64xx_pclk_ctrl, | ||
224 | .ctrlbit = S3C_CLKCON_PCLK_UART3, | ||
225 | }, { | ||
226 | .name = "rtc", | ||
227 | .id = -1, | ||
228 | .parent = &clk_p, | ||
229 | .enable = s3c64xx_pclk_ctrl, | ||
230 | .ctrlbit = S3C_CLKCON_PCLK_RTC, | ||
231 | }, { | ||
232 | .name = "watchdog", | ||
233 | .id = -1, | ||
234 | .parent = &clk_p, | ||
235 | .ctrlbit = S3C_CLKCON_PCLK_WDT, | ||
236 | }, { | ||
237 | .name = "ac97", | ||
238 | .id = -1, | ||
239 | .parent = &clk_p, | ||
240 | .ctrlbit = S3C_CLKCON_PCLK_AC97, | ||
241 | } | ||
242 | }; | ||
243 | |||
244 | static struct clk *clks[] __initdata = { | ||
245 | &clk_ext, | ||
246 | &clk_epll, | ||
247 | &clk_27m, | ||
248 | &clk_48m, | ||
249 | }; | ||
250 | |||
251 | void s3c64xx_register_clocks(void) | ||
252 | { | ||
253 | struct clk *clkp; | ||
254 | int ret; | ||
255 | int ptr; | ||
256 | |||
257 | s3c24xx_register_clocks(clks, ARRAY_SIZE(clks)); | ||
258 | |||
259 | clkp = init_clocks; | ||
260 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks); ptr++, clkp++) { | ||
261 | ret = s3c24xx_register_clock(clkp); | ||
262 | if (ret < 0) { | ||
263 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
264 | clkp->name, ret); | ||
265 | } | ||
266 | } | ||
267 | |||
268 | clkp = init_clocks_disable; | ||
269 | for (ptr = 0; ptr < ARRAY_SIZE(init_clocks_disable); ptr++, clkp++) { | ||
270 | |||
271 | ret = s3c24xx_register_clock(clkp); | ||
272 | if (ret < 0) { | ||
273 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
274 | clkp->name, ret); | ||
275 | } | ||
276 | |||
277 | (clkp->enable)(clkp, 0); | ||
278 | } | ||
279 | |||
280 | s3c_pwmclk_init(); | ||
281 | } | ||
diff --git a/arch/arm/plat-s3c64xx/cpu.c b/arch/arm/plat-s3c64xx/cpu.c new file mode 100644 index 000000000000..fbde183a4560 --- /dev/null +++ b/arch/arm/plat-s3c64xx/cpu.c | |||
@@ -0,0 +1,114 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/cpu.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX CPU Support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/serial_core.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | |||
23 | #include <mach/hardware.h> | ||
24 | #include <mach/map.h> | ||
25 | |||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | |||
29 | #include <plat/regs-serial.h> | ||
30 | |||
31 | #include <plat/cpu.h> | ||
32 | #include <plat/devs.h> | ||
33 | #include <plat/clock.h> | ||
34 | |||
35 | #include <plat/s3c6400.h> | ||
36 | #include <plat/s3c6410.h> | ||
37 | |||
38 | /* table of supported CPUs */ | ||
39 | |||
40 | static const char name_s3c6400[] = "S3C6400"; | ||
41 | static const char name_s3c6410[] = "S3C6410"; | ||
42 | |||
43 | static struct cpu_table cpu_ids[] __initdata = { | ||
44 | { | ||
45 | .idcode = 0x36400000, | ||
46 | .idmask = 0xfffff000, | ||
47 | .map_io = s3c6400_map_io, | ||
48 | .init_clocks = s3c6400_init_clocks, | ||
49 | .init_uarts = s3c6400_init_uarts, | ||
50 | .init = s3c6400_init, | ||
51 | .name = name_s3c6400, | ||
52 | }, { | ||
53 | .idcode = 0x36410100, | ||
54 | .idmask = 0xffffff00, | ||
55 | .map_io = s3c6410_map_io, | ||
56 | .init_clocks = s3c6410_init_clocks, | ||
57 | .init_uarts = s3c6410_init_uarts, | ||
58 | .init = s3c6410_init, | ||
59 | .name = name_s3c6410, | ||
60 | }, | ||
61 | }; | ||
62 | |||
63 | /* minimal IO mapping */ | ||
64 | |||
65 | /* see notes on uart map in arch/arm/mach-s3c6400/include/mach/debug-macro.S */ | ||
66 | #define UART_OFFS (S3C_PA_UART & 0xfffff) | ||
67 | |||
68 | static struct map_desc s3c_iodesc[] __initdata = { | ||
69 | { | ||
70 | .virtual = (unsigned long)S3C_VA_SYS, | ||
71 | .pfn = __phys_to_pfn(S3C64XX_PA_SYSCON), | ||
72 | .length = SZ_4K, | ||
73 | .type = MT_DEVICE, | ||
74 | }, { | ||
75 | .virtual = (unsigned long)(S3C_VA_UART + UART_OFFS), | ||
76 | .pfn = __phys_to_pfn(S3C_PA_UART), | ||
77 | .length = SZ_4K, | ||
78 | .type = MT_DEVICE, | ||
79 | }, { | ||
80 | .virtual = (unsigned long)S3C_VA_VIC0, | ||
81 | .pfn = __phys_to_pfn(S3C64XX_PA_VIC0), | ||
82 | .length = SZ_16K, | ||
83 | .type = MT_DEVICE, | ||
84 | }, { | ||
85 | .virtual = (unsigned long)S3C_VA_VIC1, | ||
86 | .pfn = __phys_to_pfn(S3C64XX_PA_VIC1), | ||
87 | .length = SZ_16K, | ||
88 | .type = MT_DEVICE, | ||
89 | }, { | ||
90 | .virtual = (unsigned long)S3C_VA_TIMER, | ||
91 | .pfn = __phys_to_pfn(S3C_PA_TIMER), | ||
92 | .length = SZ_16K, | ||
93 | .type = MT_DEVICE, | ||
94 | }, { | ||
95 | .virtual = (unsigned long)S3C64XX_VA_GPIO, | ||
96 | .pfn = __phys_to_pfn(S3C64XX_PA_GPIO), | ||
97 | .length = SZ_4K, | ||
98 | .type = MT_DEVICE, | ||
99 | }, | ||
100 | }; | ||
101 | |||
102 | /* read cpu identification code */ | ||
103 | |||
104 | void __init s3c64xx_init_io(struct map_desc *mach_desc, int size) | ||
105 | { | ||
106 | unsigned long idcode; | ||
107 | |||
108 | /* initialise the io descriptors we need for initialisation */ | ||
109 | iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc)); | ||
110 | iotable_init(mach_desc, size); | ||
111 | |||
112 | idcode = __raw_readl(S3C_VA_SYS + 0x118); | ||
113 | s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids)); | ||
114 | } | ||
diff --git a/arch/arm/plat-s3c64xx/dev-uart.c b/arch/arm/plat-s3c64xx/dev-uart.c new file mode 100644 index 000000000000..62c11a6fc7ba --- /dev/null +++ b/arch/arm/plat-s3c64xx/dev-uart.c | |||
@@ -0,0 +1,176 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/dev-uart.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * Base S3C64XX UART resource and device definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/list.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | |||
22 | #include <asm/mach/arch.h> | ||
23 | #include <asm/mach/irq.h> | ||
24 | #include <mach/hardware.h> | ||
25 | #include <mach/map.h> | ||
26 | |||
27 | #include <plat/devs.h> | ||
28 | |||
29 | /* Serial port registrations */ | ||
30 | |||
31 | /* 64xx uarts are closer together */ | ||
32 | |||
33 | static struct resource s3c64xx_uart0_resource[] = { | ||
34 | [0] = { | ||
35 | .start = S3C_PA_UART0, | ||
36 | .end = S3C_PA_UART0 + 0x100, | ||
37 | .flags = IORESOURCE_MEM, | ||
38 | }, | ||
39 | [1] = { | ||
40 | .start = IRQ_S3CUART_RX0, | ||
41 | .end = IRQ_S3CUART_RX0, | ||
42 | .flags = IORESOURCE_IRQ, | ||
43 | }, | ||
44 | [2] = { | ||
45 | .start = IRQ_S3CUART_TX0, | ||
46 | .end = IRQ_S3CUART_TX0, | ||
47 | .flags = IORESOURCE_IRQ, | ||
48 | |||
49 | }, | ||
50 | [3] = { | ||
51 | .start = IRQ_S3CUART_ERR0, | ||
52 | .end = IRQ_S3CUART_ERR0, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | } | ||
55 | }; | ||
56 | |||
57 | static struct resource s3c64xx_uart1_resource[] = { | ||
58 | [0] = { | ||
59 | .start = S3C_PA_UART1, | ||
60 | .end = S3C_PA_UART1 + 0x100, | ||
61 | .flags = IORESOURCE_MEM, | ||
62 | }, | ||
63 | [1] = { | ||
64 | .start = IRQ_S3CUART_RX1, | ||
65 | .end = IRQ_S3CUART_RX1, | ||
66 | .flags = IORESOURCE_IRQ, | ||
67 | }, | ||
68 | [2] = { | ||
69 | .start = IRQ_S3CUART_TX1, | ||
70 | .end = IRQ_S3CUART_TX1, | ||
71 | .flags = IORESOURCE_IRQ, | ||
72 | |||
73 | }, | ||
74 | [3] = { | ||
75 | .start = IRQ_S3CUART_ERR1, | ||
76 | .end = IRQ_S3CUART_ERR1, | ||
77 | .flags = IORESOURCE_IRQ, | ||
78 | }, | ||
79 | }; | ||
80 | |||
81 | static struct resource s3c6xx_uart2_resource[] = { | ||
82 | [0] = { | ||
83 | .start = S3C_PA_UART2, | ||
84 | .end = S3C_PA_UART2 + 0x100, | ||
85 | .flags = IORESOURCE_MEM, | ||
86 | }, | ||
87 | [1] = { | ||
88 | .start = IRQ_S3CUART_RX2, | ||
89 | .end = IRQ_S3CUART_RX2, | ||
90 | .flags = IORESOURCE_IRQ, | ||
91 | }, | ||
92 | [2] = { | ||
93 | .start = IRQ_S3CUART_TX2, | ||
94 | .end = IRQ_S3CUART_TX2, | ||
95 | .flags = IORESOURCE_IRQ, | ||
96 | |||
97 | }, | ||
98 | [3] = { | ||
99 | .start = IRQ_S3CUART_ERR2, | ||
100 | .end = IRQ_S3CUART_ERR2, | ||
101 | .flags = IORESOURCE_IRQ, | ||
102 | }, | ||
103 | }; | ||
104 | |||
105 | static struct resource s3c64xx_uart3_resource[] = { | ||
106 | [0] = { | ||
107 | .start = S3C_PA_UART3, | ||
108 | .end = S3C_PA_UART3 + 0x100, | ||
109 | .flags = IORESOURCE_MEM, | ||
110 | }, | ||
111 | [1] = { | ||
112 | .start = IRQ_S3CUART_RX3, | ||
113 | .end = IRQ_S3CUART_RX3, | ||
114 | .flags = IORESOURCE_IRQ, | ||
115 | }, | ||
116 | [2] = { | ||
117 | .start = IRQ_S3CUART_TX3, | ||
118 | .end = IRQ_S3CUART_TX3, | ||
119 | .flags = IORESOURCE_IRQ, | ||
120 | |||
121 | }, | ||
122 | [3] = { | ||
123 | .start = IRQ_S3CUART_ERR3, | ||
124 | .end = IRQ_S3CUART_ERR3, | ||
125 | .flags = IORESOURCE_IRQ, | ||
126 | }, | ||
127 | }; | ||
128 | |||
129 | |||
130 | struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = { | ||
131 | [0] = { | ||
132 | .resources = s3c64xx_uart0_resource, | ||
133 | .nr_resources = ARRAY_SIZE(s3c64xx_uart0_resource), | ||
134 | }, | ||
135 | [1] = { | ||
136 | .resources = s3c64xx_uart1_resource, | ||
137 | .nr_resources = ARRAY_SIZE(s3c64xx_uart1_resource), | ||
138 | }, | ||
139 | [2] = { | ||
140 | .resources = s3c6xx_uart2_resource, | ||
141 | .nr_resources = ARRAY_SIZE(s3c6xx_uart2_resource), | ||
142 | }, | ||
143 | [3] = { | ||
144 | .resources = s3c64xx_uart3_resource, | ||
145 | .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource), | ||
146 | }, | ||
147 | }; | ||
148 | |||
149 | /* uart devices */ | ||
150 | |||
151 | static struct platform_device s3c24xx_uart_device0 = { | ||
152 | .id = 0, | ||
153 | }; | ||
154 | |||
155 | static struct platform_device s3c24xx_uart_device1 = { | ||
156 | .id = 1, | ||
157 | }; | ||
158 | |||
159 | static struct platform_device s3c24xx_uart_device2 = { | ||
160 | .id = 2, | ||
161 | }; | ||
162 | |||
163 | static struct platform_device s3c24xx_uart_device3 = { | ||
164 | .id = 3, | ||
165 | }; | ||
166 | |||
167 | struct platform_device *s3c24xx_uart_src[4] = { | ||
168 | &s3c24xx_uart_device0, | ||
169 | &s3c24xx_uart_device1, | ||
170 | &s3c24xx_uart_device2, | ||
171 | &s3c24xx_uart_device3, | ||
172 | }; | ||
173 | |||
174 | struct platform_device *s3c24xx_uart_devs[4] = { | ||
175 | }; | ||
176 | |||
diff --git a/arch/arm/plat-s3c64xx/gpiolib.c b/arch/arm/plat-s3c64xx/gpiolib.c new file mode 100644 index 000000000000..cc62941d7b5c --- /dev/null +++ b/arch/arm/plat-s3c64xx/gpiolib.c | |||
@@ -0,0 +1,420 @@ | |||
1 | /* arch/arm/plat-s3c64xx/gpiolib.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX - GPIOlib support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <linux/io.h> | ||
18 | |||
19 | #include <mach/map.h> | ||
20 | #include <mach/gpio.h> | ||
21 | #include <mach/gpio-core.h> | ||
22 | |||
23 | #include <plat/gpio-cfg.h> | ||
24 | #include <plat/gpio-cfg-helpers.h> | ||
25 | #include <plat/regs-gpio.h> | ||
26 | |||
27 | /* GPIO bank summary: | ||
28 | * | ||
29 | * Bank GPIOs Style SlpCon ExtInt Group | ||
30 | * A 8 4Bit Yes 1 | ||
31 | * B 7 4Bit Yes 1 | ||
32 | * C 8 4Bit Yes 2 | ||
33 | * D 5 4Bit Yes 3 | ||
34 | * E 5 4Bit Yes None | ||
35 | * F 16 2Bit Yes 4 [1] | ||
36 | * G 7 4Bit Yes 5 | ||
37 | * H 10 4Bit[2] Yes 6 | ||
38 | * I 16 2Bit Yes None | ||
39 | * J 12 2Bit Yes None | ||
40 | * K 16 4Bit[2] No None | ||
41 | * L 15 4Bit[2] No None | ||
42 | * M 6 4Bit No IRQ_EINT | ||
43 | * N 16 2Bit No IRQ_EINT | ||
44 | * O 16 2Bit Yes 7 | ||
45 | * P 15 2Bit Yes 8 | ||
46 | * Q 9 2Bit Yes 9 | ||
47 | * | ||
48 | * [1] BANKF pins 14,15 do not form part of the external interrupt sources | ||
49 | * [2] BANK has two control registers, GPxCON0 and GPxCON1 | ||
50 | */ | ||
51 | |||
52 | #define OFF_GPCON (0x00) | ||
53 | #define OFF_GPDAT (0x04) | ||
54 | |||
55 | #define con_4bit_shift(__off) ((__off) * 4) | ||
56 | |||
57 | #if 1 | ||
58 | #define gpio_dbg(x...) do { } while(0) | ||
59 | #else | ||
60 | #define gpio_dbg(x...) printk(KERN_DEBUG ## x) | ||
61 | #endif | ||
62 | |||
63 | /* The s3c64xx_gpiolib_4bit routines are to control the gpio banks where | ||
64 | * the gpio configuration register (GPxCON) has 4 bits per GPIO, as the | ||
65 | * following example: | ||
66 | * | ||
67 | * base + 0x00: Control register, 4 bits per gpio | ||
68 | * gpio n: 4 bits starting at (4*n) | ||
69 | * 0000 = input, 0001 = output, others mean special-function | ||
70 | * base + 0x04: Data register, 1 bit per gpio | ||
71 | * bit n: data bit n | ||
72 | * | ||
73 | * Note, since the data register is one bit per gpio and is at base + 0x4 | ||
74 | * we can use s3c_gpiolib_get and s3c_gpiolib_set to change the state of | ||
75 | * the output. | ||
76 | */ | ||
77 | |||
78 | static int s3c64xx_gpiolib_4bit_input(struct gpio_chip *chip, unsigned offset) | ||
79 | { | ||
80 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); | ||
81 | void __iomem *base = ourchip->base; | ||
82 | unsigned long con; | ||
83 | |||
84 | con = __raw_readl(base + OFF_GPCON); | ||
85 | con &= ~(0xf << con_4bit_shift(offset)); | ||
86 | __raw_writel(con, base + OFF_GPCON); | ||
87 | |||
88 | gpio_dbg("%s: %p: CON now %08lx\n", __func__, base, con); | ||
89 | |||
90 | return 0; | ||
91 | } | ||
92 | |||
93 | static int s3c64xx_gpiolib_4bit_output(struct gpio_chip *chip, | ||
94 | unsigned offset, int value) | ||
95 | { | ||
96 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); | ||
97 | void __iomem *base = ourchip->base; | ||
98 | unsigned long con; | ||
99 | unsigned long dat; | ||
100 | |||
101 | con = __raw_readl(base + OFF_GPCON); | ||
102 | con &= ~(0xf << con_4bit_shift(offset)); | ||
103 | con |= 0x1 << con_4bit_shift(offset); | ||
104 | |||
105 | dat = __raw_readl(base + OFF_GPDAT); | ||
106 | if (value) | ||
107 | dat |= 1 << offset; | ||
108 | else | ||
109 | dat &= ~(1 << offset); | ||
110 | |||
111 | __raw_writel(dat, base + OFF_GPDAT); | ||
112 | __raw_writel(con, base + OFF_GPCON); | ||
113 | __raw_writel(dat, base + OFF_GPDAT); | ||
114 | |||
115 | gpio_dbg("%s: %p: CON %08lx, DAT %08lx\n", __func__, base, con, dat); | ||
116 | |||
117 | return 0; | ||
118 | } | ||
119 | |||
120 | /* The next set of routines are for the case where the GPIO configuration | ||
121 | * registers are 4 bits per GPIO but there is more than one register (the | ||
122 | * bank has more than 8 GPIOs. | ||
123 | * | ||
124 | * This case is the similar to the 4 bit case, but the registers are as | ||
125 | * follows: | ||
126 | * | ||
127 | * base + 0x00: Control register, 4 bits per gpio (lower 8 GPIOs) | ||
128 | * gpio n: 4 bits starting at (4*n) | ||
129 | * 0000 = input, 0001 = output, others mean special-function | ||
130 | * base + 0x04: Control register, 4 bits per gpio (up to 8 additions GPIOs) | ||
131 | * gpio n: 4 bits starting at (4*n) | ||
132 | * 0000 = input, 0001 = output, others mean special-function | ||
133 | * base + 0x08: Data register, 1 bit per gpio | ||
134 | * bit n: data bit n | ||
135 | * | ||
136 | * To allow us to use the s3c_gpiolib_get and s3c_gpiolib_set routines we | ||
137 | * store the 'base + 0x4' address so that these routines see the data | ||
138 | * register at ourchip->base + 0x04. | ||
139 | */ | ||
140 | |||
141 | static int s3c64xx_gpiolib_4bit2_input(struct gpio_chip *chip, unsigned offset) | ||
142 | { | ||
143 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); | ||
144 | void __iomem *base = ourchip->base; | ||
145 | void __iomem *regcon = base; | ||
146 | unsigned long con; | ||
147 | |||
148 | if (offset > 7) | ||
149 | offset -= 8; | ||
150 | else | ||
151 | regcon -= 4; | ||
152 | |||
153 | con = __raw_readl(regcon); | ||
154 | con &= ~(0xf << con_4bit_shift(offset)); | ||
155 | __raw_writel(con, regcon); | ||
156 | |||
157 | gpio_dbg("%s: %p: CON %08lx\n", __func__, base, con); | ||
158 | |||
159 | return 0; | ||
160 | |||
161 | } | ||
162 | |||
163 | static int s3c64xx_gpiolib_4bit2_output(struct gpio_chip *chip, | ||
164 | unsigned offset, int value) | ||
165 | { | ||
166 | struct s3c_gpio_chip *ourchip = to_s3c_gpio(chip); | ||
167 | void __iomem *base = ourchip->base; | ||
168 | void __iomem *regcon = base; | ||
169 | unsigned long con; | ||
170 | unsigned long dat; | ||
171 | |||
172 | if (offset > 7) | ||
173 | offset -= 8; | ||
174 | else | ||
175 | regcon -= 4; | ||
176 | |||
177 | con = __raw_readl(regcon); | ||
178 | con &= ~(0xf << con_4bit_shift(offset)); | ||
179 | con |= 0x1 << con_4bit_shift(offset); | ||
180 | |||
181 | dat = __raw_readl(base + OFF_GPDAT); | ||
182 | if (value) | ||
183 | dat |= 1 << offset; | ||
184 | else | ||
185 | dat &= ~(1 << offset); | ||
186 | |||
187 | __raw_writel(dat, base + OFF_GPDAT); | ||
188 | __raw_writel(con, regcon); | ||
189 | __raw_writel(dat, base + OFF_GPDAT); | ||
190 | |||
191 | gpio_dbg("%s: %p: CON %08lx, DAT %08lx\n", __func__, base, con, dat); | ||
192 | |||
193 | return 0; | ||
194 | } | ||
195 | |||
196 | static struct s3c_gpio_cfg gpio_4bit_cfg_noint = { | ||
197 | .set_config = s3c_gpio_setcfg_s3c64xx_4bit, | ||
198 | .set_pull = s3c_gpio_setpull_updown, | ||
199 | .get_pull = s3c_gpio_getpull_updown, | ||
200 | }; | ||
201 | |||
202 | static struct s3c_gpio_cfg gpio_4bit_cfg_eint0111 = { | ||
203 | .cfg_eint = 7, | ||
204 | .set_config = s3c_gpio_setcfg_s3c64xx_4bit, | ||
205 | .set_pull = s3c_gpio_setpull_updown, | ||
206 | .get_pull = s3c_gpio_getpull_updown, | ||
207 | }; | ||
208 | |||
209 | static struct s3c_gpio_cfg gpio_4bit_cfg_eint0011 = { | ||
210 | .cfg_eint = 3, | ||
211 | .set_config = s3c_gpio_setcfg_s3c64xx_4bit, | ||
212 | .set_pull = s3c_gpio_setpull_updown, | ||
213 | .get_pull = s3c_gpio_getpull_updown, | ||
214 | }; | ||
215 | |||
216 | static struct s3c_gpio_chip gpio_4bit[] = { | ||
217 | { | ||
218 | .base = S3C64XX_GPA_BASE, | ||
219 | .config = &gpio_4bit_cfg_eint0111, | ||
220 | .chip = { | ||
221 | .base = S3C64XX_GPA(0), | ||
222 | .ngpio = S3C64XX_GPIO_A_NR, | ||
223 | .label = "GPA", | ||
224 | }, | ||
225 | }, { | ||
226 | .base = S3C64XX_GPB_BASE, | ||
227 | .config = &gpio_4bit_cfg_eint0111, | ||
228 | .chip = { | ||
229 | .base = S3C64XX_GPB(0), | ||
230 | .ngpio = S3C64XX_GPIO_B_NR, | ||
231 | .label = "GPB", | ||
232 | }, | ||
233 | }, { | ||
234 | .base = S3C64XX_GPC_BASE, | ||
235 | .config = &gpio_4bit_cfg_eint0111, | ||
236 | .chip = { | ||
237 | .base = S3C64XX_GPC(0), | ||
238 | .ngpio = S3C64XX_GPIO_C_NR, | ||
239 | .label = "GPC", | ||
240 | }, | ||
241 | }, { | ||
242 | .base = S3C64XX_GPD_BASE, | ||
243 | .config = &gpio_4bit_cfg_eint0111, | ||
244 | .chip = { | ||
245 | .base = S3C64XX_GPD(0), | ||
246 | .ngpio = S3C64XX_GPIO_D_NR, | ||
247 | .label = "GPD", | ||
248 | }, | ||
249 | }, { | ||
250 | .base = S3C64XX_GPE_BASE, | ||
251 | .config = &gpio_4bit_cfg_noint, | ||
252 | .chip = { | ||
253 | .base = S3C64XX_GPE(0), | ||
254 | .ngpio = S3C64XX_GPIO_E_NR, | ||
255 | .label = "GPE", | ||
256 | }, | ||
257 | }, { | ||
258 | .base = S3C64XX_GPG_BASE, | ||
259 | .config = &gpio_4bit_cfg_eint0111, | ||
260 | .chip = { | ||
261 | .base = S3C64XX_GPG(0), | ||
262 | .ngpio = S3C64XX_GPIO_G_NR, | ||
263 | .label = "GPG", | ||
264 | }, | ||
265 | }, { | ||
266 | .base = S3C64XX_GPM_BASE, | ||
267 | .config = &gpio_4bit_cfg_eint0011, | ||
268 | .chip = { | ||
269 | .base = S3C64XX_GPM(0), | ||
270 | .ngpio = S3C64XX_GPIO_M_NR, | ||
271 | .label = "GPM", | ||
272 | }, | ||
273 | }, | ||
274 | }; | ||
275 | |||
276 | static struct s3c_gpio_chip gpio_4bit2[] = { | ||
277 | { | ||
278 | .base = S3C64XX_GPH_BASE + 0x4, | ||
279 | .config = &gpio_4bit_cfg_eint0111, | ||
280 | .chip = { | ||
281 | .base = S3C64XX_GPH(0), | ||
282 | .ngpio = S3C64XX_GPIO_H_NR, | ||
283 | .label = "GPH", | ||
284 | }, | ||
285 | }, { | ||
286 | .base = S3C64XX_GPK_BASE + 0x4, | ||
287 | .config = &gpio_4bit_cfg_noint, | ||
288 | .chip = { | ||
289 | .base = S3C64XX_GPK(0), | ||
290 | .ngpio = S3C64XX_GPIO_K_NR, | ||
291 | .label = "GPK", | ||
292 | }, | ||
293 | }, { | ||
294 | .base = S3C64XX_GPL_BASE + 0x4, | ||
295 | .config = &gpio_4bit_cfg_eint0011, | ||
296 | .chip = { | ||
297 | .base = S3C64XX_GPL(0), | ||
298 | .ngpio = S3C64XX_GPIO_L_NR, | ||
299 | .label = "GPL", | ||
300 | }, | ||
301 | }, | ||
302 | }; | ||
303 | |||
304 | static struct s3c_gpio_cfg gpio_2bit_cfg_noint = { | ||
305 | .set_config = s3c_gpio_setcfg_s3c24xx, | ||
306 | .set_pull = s3c_gpio_setpull_updown, | ||
307 | .get_pull = s3c_gpio_getpull_updown, | ||
308 | }; | ||
309 | |||
310 | static struct s3c_gpio_cfg gpio_2bit_cfg_eint10 = { | ||
311 | .cfg_eint = 2, | ||
312 | .set_config = s3c_gpio_setcfg_s3c24xx, | ||
313 | .set_pull = s3c_gpio_setpull_updown, | ||
314 | .get_pull = s3c_gpio_getpull_updown, | ||
315 | }; | ||
316 | |||
317 | static struct s3c_gpio_cfg gpio_2bit_cfg_eint11 = { | ||
318 | .cfg_eint = 3, | ||
319 | .set_config = s3c_gpio_setcfg_s3c24xx, | ||
320 | .set_pull = s3c_gpio_setpull_updown, | ||
321 | .get_pull = s3c_gpio_getpull_updown, | ||
322 | }; | ||
323 | |||
324 | static struct s3c_gpio_chip gpio_2bit[] = { | ||
325 | { | ||
326 | .base = S3C64XX_GPF_BASE, | ||
327 | .config = &gpio_2bit_cfg_eint11, | ||
328 | .chip = { | ||
329 | .base = S3C64XX_GPF(0), | ||
330 | .ngpio = S3C64XX_GPIO_F_NR, | ||
331 | .label = "GPF", | ||
332 | }, | ||
333 | }, { | ||
334 | .base = S3C64XX_GPI_BASE, | ||
335 | .config = &gpio_2bit_cfg_noint, | ||
336 | .chip = { | ||
337 | .base = S3C64XX_GPI(0), | ||
338 | .ngpio = S3C64XX_GPIO_I_NR, | ||
339 | .label = "GPI", | ||
340 | }, | ||
341 | }, { | ||
342 | .base = S3C64XX_GPJ_BASE, | ||
343 | .config = &gpio_2bit_cfg_noint, | ||
344 | .chip = { | ||
345 | .base = S3C64XX_GPJ(0), | ||
346 | .ngpio = S3C64XX_GPIO_J_NR, | ||
347 | .label = "GPJ", | ||
348 | }, | ||
349 | }, { | ||
350 | .base = S3C64XX_GPN_BASE, | ||
351 | .config = &gpio_2bit_cfg_eint10, | ||
352 | .chip = { | ||
353 | .base = S3C64XX_GPN(0), | ||
354 | .ngpio = S3C64XX_GPIO_N_NR, | ||
355 | .label = "GPN", | ||
356 | }, | ||
357 | }, { | ||
358 | .base = S3C64XX_GPO_BASE, | ||
359 | .config = &gpio_2bit_cfg_eint11, | ||
360 | .chip = { | ||
361 | .base = S3C64XX_GPO(0), | ||
362 | .ngpio = S3C64XX_GPIO_O_NR, | ||
363 | .label = "GPO", | ||
364 | }, | ||
365 | }, { | ||
366 | .base = S3C64XX_GPP_BASE, | ||
367 | .config = &gpio_2bit_cfg_eint11, | ||
368 | .chip = { | ||
369 | .base = S3C64XX_GPP(0), | ||
370 | .ngpio = S3C64XX_GPIO_P_NR, | ||
371 | .label = "GPP", | ||
372 | }, | ||
373 | }, { | ||
374 | .base = S3C64XX_GPQ_BASE, | ||
375 | .config = &gpio_2bit_cfg_eint11, | ||
376 | .chip = { | ||
377 | .base = S3C64XX_GPQ(0), | ||
378 | .ngpio = S3C64XX_GPIO_Q_NR, | ||
379 | .label = "GPQ", | ||
380 | }, | ||
381 | }, | ||
382 | }; | ||
383 | |||
384 | static __init void s3c64xx_gpiolib_add_4bit(struct s3c_gpio_chip *chip) | ||
385 | { | ||
386 | chip->chip.direction_input = s3c64xx_gpiolib_4bit_input; | ||
387 | chip->chip.direction_output = s3c64xx_gpiolib_4bit_output; | ||
388 | } | ||
389 | |||
390 | static __init void s3c64xx_gpiolib_add_4bit2(struct s3c_gpio_chip *chip) | ||
391 | { | ||
392 | chip->chip.direction_input = s3c64xx_gpiolib_4bit2_input; | ||
393 | chip->chip.direction_output = s3c64xx_gpiolib_4bit2_output; | ||
394 | } | ||
395 | |||
396 | static __init void s3c64xx_gpiolib_add(struct s3c_gpio_chip *chips, | ||
397 | int nr_chips, | ||
398 | void (*fn)(struct s3c_gpio_chip *)) | ||
399 | { | ||
400 | for (; nr_chips > 0; nr_chips--, chips++) { | ||
401 | if (fn) | ||
402 | (fn)(chips); | ||
403 | s3c_gpiolib_add(chips); | ||
404 | } | ||
405 | } | ||
406 | |||
407 | static __init int s3c64xx_gpiolib_init(void) | ||
408 | { | ||
409 | s3c64xx_gpiolib_add(gpio_4bit, ARRAY_SIZE(gpio_4bit), | ||
410 | s3c64xx_gpiolib_add_4bit); | ||
411 | |||
412 | s3c64xx_gpiolib_add(gpio_4bit2, ARRAY_SIZE(gpio_4bit2), | ||
413 | s3c64xx_gpiolib_add_4bit2); | ||
414 | |||
415 | s3c64xx_gpiolib_add(gpio_2bit, ARRAY_SIZE(gpio_2bit), NULL); | ||
416 | |||
417 | return 0; | ||
418 | } | ||
419 | |||
420 | arch_initcall(s3c64xx_gpiolib_init); | ||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-a.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-a.h new file mode 100644 index 000000000000..9aa0e427d113 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-a.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-a.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank A register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPACON (S3C64XX_GPA_BASE + 0x00) | ||
16 | #define S3C64XX_GPADAT (S3C64XX_GPA_BASE + 0x04) | ||
17 | #define S3C64XX_GPAPUD (S3C64XX_GPA_BASE + 0x08) | ||
18 | #define S3C64XX_GPACONSLP (S3C64XX_GPA_BASE + 0x0c) | ||
19 | #define S3C64XX_GPAPUDSLP (S3C64XX_GPA_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPA_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPA_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPA_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPA0_UART_RXD0 (0x02 << 0) | ||
26 | #define S3C64XX_GPA0_EINT_G1_0 (0x07 << 0) | ||
27 | |||
28 | #define S3C64XX_GPA1_UART_TXD0 (0x02 << 4) | ||
29 | #define S3C64XX_GPA1_EINT_G1_1 (0x07 << 4) | ||
30 | |||
31 | #define S3C64XX_GPA2_UART_nCTS0 (0x02 << 8) | ||
32 | #define S3C64XX_GPA2_EINT_G1_2 (0x07 << 8) | ||
33 | |||
34 | #define S3C64XX_GPA3_UART_nRTS0 (0x02 << 12) | ||
35 | #define S3C64XX_GPA3_EINT_G1_3 (0x07 << 12) | ||
36 | |||
37 | #define S3C64XX_GPA4_UART_RXD1 (0x02 << 16) | ||
38 | #define S3C64XX_GPA4_EINT_G1_4 (0x07 << 16) | ||
39 | |||
40 | #define S3C64XX_GPA5_UART_TXD1 (0x02 << 20) | ||
41 | #define S3C64XX_GPA5_EINT_G1_5 (0x07 << 20) | ||
42 | |||
43 | #define S3C64XX_GPA6_UART_nCTS1 (0x02 << 24) | ||
44 | #define S3C64XX_GPA6_EINT_G1_6 (0x07 << 24) | ||
45 | |||
46 | #define S3C64XX_GPA7_UART_nRTS1 (0x02 << 28) | ||
47 | #define S3C64XX_GPA7_EINT_G1_7 (0x07 << 28) | ||
48 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-b.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-b.h new file mode 100644 index 000000000000..3933adb4d50a --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-b.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-b.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank B register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPBCON (S3C64XX_GPB_BASE + 0x00) | ||
16 | #define S3C64XX_GPBDAT (S3C64XX_GPB_BASE + 0x04) | ||
17 | #define S3C64XX_GPBPUD (S3C64XX_GPB_BASE + 0x08) | ||
18 | #define S3C64XX_GPBCONSLP (S3C64XX_GPB_BASE + 0x0c) | ||
19 | #define S3C64XX_GPBPUDSLP (S3C64XX_GPB_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPB_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPB_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPB_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPB0_UART_RXD2 (0x02 << 0) | ||
26 | #define S3C64XX_GPB0_EXTDMA_REQ (0x03 << 0) | ||
27 | #define S3C64XX_GPB0_IrDA_RXD (0x04 << 0) | ||
28 | #define S3C64XX_GPB0_ADDR_CF0 (0x05 << 0) | ||
29 | #define S3C64XX_GPB0_EINT_G1_8 (0x07 << 0) | ||
30 | |||
31 | #define S3C64XX_GPB1_UART_TXD2 (0x02 << 4) | ||
32 | #define S3C64XX_GPB1_EXTDMA_ACK (0x03 << 4) | ||
33 | #define S3C64XX_GPB1_IrDA_TXD (0x04 << 4) | ||
34 | #define S3C64XX_GPB1_ADDR_CF1 (0x05 << 4) | ||
35 | #define S3C64XX_GPB1_EINT_G1_9 (0x07 << 4) | ||
36 | |||
37 | #define S3C64XX_GPB2_UART_RXD3 (0x02 << 8) | ||
38 | #define S3C64XX_GPB2_IrDA_RXD (0x03 << 8) | ||
39 | #define S3C64XX_GPB2_EXTDMA_REQ (0x04 << 8) | ||
40 | #define S3C64XX_GPB2_ADDR_CF2 (0x05 << 8) | ||
41 | #define S3C64XX_GPB2_I2C_SCL1 (0x06 << 8) | ||
42 | #define S3C64XX_GPB2_EINT_G1_10 (0x07 << 8) | ||
43 | |||
44 | #define S3C64XX_GPB3_UART_TXD3 (0x02 << 12) | ||
45 | #define S3C64XX_GPB3_IrDA_TXD (0x03 << 12) | ||
46 | #define S3C64XX_GPB3_EXTDMA_ACK (0x04 << 12) | ||
47 | #define S3C64XX_GPB3_I2C_SDA1 (0x06 << 12) | ||
48 | #define S3C64XX_GPB3_EINT_G1_11 (0x07 << 12) | ||
49 | |||
50 | #define S3C64XX_GPB4_IrDA_SDBW (0x02 << 16) | ||
51 | #define S3C64XX_GPB4_CAM_FIELD (0x03 << 16) | ||
52 | #define S3C64XX_GPB4_CF_DATA_DIR (0x04 << 16) | ||
53 | #define S3C64XX_GPB4_EINT_G1_12 (0x07 << 16) | ||
54 | |||
55 | #define S3C64XX_GPB5_I2C_SCL0 (0x02 << 20) | ||
56 | #define S3C64XX_GPB5_EINT_G1_13 (0x07 << 20) | ||
57 | |||
58 | #define S3C64XX_GPB6_I2C_SDA0 (0x02 << 24) | ||
59 | #define S3C64XX_GPB6_EINT_G1_14 (0x07 << 24) | ||
60 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h new file mode 100644 index 000000000000..c47daf7e2723 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h | |||
@@ -0,0 +1,53 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-c.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank C register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPCCON (S3C64XX_GPC_BASE + 0x00) | ||
16 | #define S3C64XX_GPCDAT (S3C64XX_GPC_BASE + 0x04) | ||
17 | #define S3C64XX_GPCPUD (S3C64XX_GPC_BASE + 0x08) | ||
18 | #define S3C64XX_GPCCONSLP (S3C64XX_GPC_BASE + 0x0c) | ||
19 | #define S3C64XX_GPCPUDSLP (S3C64XX_GPC_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPC_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPC_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPC_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPC0_SPI_MISO0 (0x02 << 0) | ||
26 | #define S3C64XX_GPC0_EINT_G2_0 (0x07 << 0) | ||
27 | |||
28 | #define S3C64XX_GPC1_SPI_CLKO (0x02 << 4) | ||
29 | #define S3C64XX_GPC1_EINT_G2_1 (0x07 << 4) | ||
30 | |||
31 | #define S3C64XX_GPC2_SPI_MOSIO (0x02 << 8) | ||
32 | #define S3C64XX_GPC2_EINT_G2_2 (0x07 << 8) | ||
33 | |||
34 | #define S3C64XX_GPC3_SPI_nCSO (0x02 << 12) | ||
35 | #define S3C64XX_GPC3_EINT_G2_3 (0x07 << 12) | ||
36 | |||
37 | #define S3C64XX_GPC4_SPI_MISO1 (0x02 << 16) | ||
38 | #define S3C64XX_GPC4_MMC2_CMD (0x03 << 16) | ||
39 | #define S3C64XX_GPC4_I2S0_V40_DO (0x05 << 16) | ||
40 | #define S3C64XX_GPC4_EINT_G2_4 (0x07 << 16) | ||
41 | |||
42 | #define S3C64XX_GPC5_SPI_CLK1 (0x02 << 20) | ||
43 | #define S3C64XX_GPC5_MMC2_CLK (0x03 << 20) | ||
44 | #define S3C64XX_GPC5_I2S1_V40_DO (0x05 << 20) | ||
45 | #define S3C64XX_GPC5_EINT_G2_5 (0x07 << 20) | ||
46 | |||
47 | #define S3C64XX_GPC6_SPI_MOSI1 (0x02 << 24) | ||
48 | #define S3C64XX_GPC6_EINT_G2_6 (0x07 << 24) | ||
49 | |||
50 | #define S3C64XX_GPC7_SPI_nCS1 (0x02 << 28) | ||
51 | #define S3C64XX_GPC7_I2S2_V40_DO (0x05 << 28) | ||
52 | #define S3C64XX_GPC7_EINT_G2_7 (0x07 << 28) | ||
53 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-d.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-d.h new file mode 100644 index 000000000000..6fe4a49c26f0 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-d.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-d.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank D register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPDCON (S3C64XX_GPD_BASE + 0x00) | ||
16 | #define S3C64XX_GPDDAT (S3C64XX_GPD_BASE + 0x04) | ||
17 | #define S3C64XX_GPDPUD (S3C64XX_GPD_BASE + 0x08) | ||
18 | #define S3C64XX_GPDCONSLP (S3C64XX_GPD_BASE + 0x0c) | ||
19 | #define S3C64XX_GPDPUDSLP (S3C64XX_GPD_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPD_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPD_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPD_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPD0_PCM0_SCLK (0x02 << 0) | ||
26 | #define S3C64XX_GPD0_I2S0_CLK (0x03 << 0) | ||
27 | #define S3C64XX_GPD0_AC97_BITCLK (0x04 << 0) | ||
28 | #define S3C64XX_GPD0_EINT_G3_0 (0x07 << 0) | ||
29 | |||
30 | #define S3C64XX_GPD1_PCM0_EXTCLK (0x02 << 4) | ||
31 | #define S3C64XX_GPD1_I2S0_CDCLK (0x03 << 4) | ||
32 | #define S3C64XX_GPD1_AC97_nRESET (0x04 << 4) | ||
33 | #define S3C64XX_GPD1_EINT_G3_1 (0x07 << 4) | ||
34 | |||
35 | #define S3C64XX_GPD2_PCM0_FSYNC (0x02 << 8) | ||
36 | #define S3C64XX_GPD2_I2S0_LRCLK (0x03 << 8) | ||
37 | #define S3C64XX_GPD2_AC97_SYNC (0x04 << 8) | ||
38 | #define S3C64XX_GPD2_EINT_G3_2 (0x07 << 8) | ||
39 | |||
40 | #define S3C64XX_GPD3_PCM0_SIN (0x02 << 12) | ||
41 | #define S3C64XX_GPD3_I2S0_DI (0x03 << 12) | ||
42 | #define S3C64XX_GPD3_AC97_SDI (0x04 << 12) | ||
43 | #define S3C64XX_GPD3_EINT_G3_3 (0x07 << 12) | ||
44 | |||
45 | #define S3C64XX_GPD4_PCM0_SOUT (0x02 << 16) | ||
46 | #define S3C64XX_GPD4_I2S0_D0 (0x03 << 16) | ||
47 | #define S3C64XX_GPD4_AC97_SDO (0x04 << 16) | ||
48 | #define S3C64XX_GPD4_EINT_G3_4 (0x07 << 16) | ||
49 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-e.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-e.h new file mode 100644 index 000000000000..7fcf3d8e0a48 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-e.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-e.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank E register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPECON (S3C64XX_GPE_BASE + 0x00) | ||
16 | #define S3C64XX_GPEDAT (S3C64XX_GPE_BASE + 0x04) | ||
17 | #define S3C64XX_GPEPUD (S3C64XX_GPE_BASE + 0x08) | ||
18 | #define S3C64XX_GPECONSLP (S3C64XX_GPE_BASE + 0x0c) | ||
19 | #define S3C64XX_GPEPUDSLP (S3C64XX_GPE_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPE_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPE_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPE_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPE0_PCM1_SCLK (0x02 << 0) | ||
26 | #define S3C64XX_GPE0_I2S1_CLK (0x03 << 0) | ||
27 | #define S3C64XX_GPE0_AC97_BITCLK (0x04 << 0) | ||
28 | |||
29 | #define S3C64XX_GPE1_PCM1_EXTCLK (0x02 << 4) | ||
30 | #define S3C64XX_GPE1_I2S1_CDCLK (0x03 << 4) | ||
31 | #define S3C64XX_GPE1_AC97_nRESET (0x04 << 4) | ||
32 | |||
33 | #define S3C64XX_GPE2_PCM1_FSYNC (0x02 << 8) | ||
34 | #define S3C64XX_GPE2_I2S1_LRCLK (0x03 << 8) | ||
35 | #define S3C64XX_GPE2_AC97_SYNC (0x04 << 8) | ||
36 | |||
37 | #define S3C64XX_GPE3_PCM1_SIN (0x02 << 12) | ||
38 | #define S3C64XX_GPE3_I2S1_DI (0x03 << 12) | ||
39 | #define S3C64XX_GPE3_AC97_SDI (0x04 << 12) | ||
40 | |||
41 | #define S3C64XX_GPE4_PCM1_SOUT (0x02 << 16) | ||
42 | #define S3C64XX_GPE4_I2S1_D0 (0x03 << 16) | ||
43 | #define S3C64XX_GPE4_AC97_SDO (0x04 << 16) | ||
44 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-f.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-f.h new file mode 100644 index 000000000000..f3faff974a18 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-f.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-f.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank F register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPFCON (S3C64XX_GPF_BASE + 0x00) | ||
16 | #define S3C64XX_GPFDAT (S3C64XX_GPF_BASE + 0x04) | ||
17 | #define S3C64XX_GPFPUD (S3C64XX_GPF_BASE + 0x08) | ||
18 | #define S3C64XX_GPFCONSLP (S3C64XX_GPF_BASE + 0x0c) | ||
19 | #define S3C64XX_GPFPUDSLP (S3C64XX_GPF_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPF_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPF_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPF_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPF0_CAMIF_CLK (0x02 << 0) | ||
26 | #define S3C64XX_GPF0_EINT_G4_0 (0x03 << 0) | ||
27 | |||
28 | #define S3C64XX_GPF1_CAMIF_HREF (0x02 << 2) | ||
29 | #define S3C64XX_GPF1_EINT_G4_1 (0x03 << 2) | ||
30 | |||
31 | #define S3C64XX_GPF2_CAMIF_PCLK (0x02 << 4) | ||
32 | #define S3C64XX_GPF2_EINT_G4_2 (0x03 << 4) | ||
33 | |||
34 | #define S3C64XX_GPF3_CAMIF_nRST (0x02 << 6) | ||
35 | #define S3C64XX_GPF3_EINT_G4_3 (0x03 << 6) | ||
36 | |||
37 | #define S3C64XX_GPF4_CAMIF_VSYNC (0x02 << 8) | ||
38 | #define S3C64XX_GPF4_EINT_G4_4 (0x03 << 8) | ||
39 | |||
40 | #define S3C64XX_GPF5_CAMIF_YDATA0 (0x02 << 10) | ||
41 | #define S3C64XX_GPF5_EINT_G4_5 (0x03 << 10) | ||
42 | |||
43 | #define S3C64XX_GPF6_CAMIF_YDATA1 (0x02 << 12) | ||
44 | #define S3C64XX_GPF6_EINT_G4_6 (0x03 << 12) | ||
45 | |||
46 | #define S3C64XX_GPF7_CAMIF_YDATA2 (0x02 << 14) | ||
47 | #define S3C64XX_GPF7_EINT_G4_7 (0x03 << 14) | ||
48 | |||
49 | #define S3C64XX_GPF8_CAMIF_YDATA3 (0x02 << 16) | ||
50 | #define S3C64XX_GPF8_EINT_G4_8 (0x03 << 16) | ||
51 | |||
52 | #define S3C64XX_GPF9_CAMIF_YDATA4 (0x02 << 18) | ||
53 | #define S3C64XX_GPF9_EINT_G4_9 (0x03 << 18) | ||
54 | |||
55 | #define S3C64XX_GPF10_CAMIF_YDATA5 (0x02 << 20) | ||
56 | #define S3C64XX_GPF10_EINT_G4_10 (0x03 << 20) | ||
57 | |||
58 | #define S3C64XX_GPF11_CAMIF_YDATA6 (0x02 << 22) | ||
59 | #define S3C64XX_GPF11_EINT_G4_11 (0x03 << 22) | ||
60 | |||
61 | #define S3C64XX_GPF12_CAMIF_YDATA7 (0x02 << 24) | ||
62 | #define S3C64XX_GPF12_EINT_G4_12 (0x03 << 24) | ||
63 | |||
64 | #define S3C64XX_GPF13_PWM_ECLK (0x02 << 26) | ||
65 | #define S3C64XX_GPF13_EINT_G4_13 (0x03 << 26) | ||
66 | |||
67 | #define S3C64XX_GPF14_PWM_TOUT0 (0x02 << 28) | ||
68 | #define S3C64XX_GPF14_CLKOUT0 (0x03 << 28) | ||
69 | |||
70 | #define S3C64XX_GPF15_PWM_TOUT1 (0x02 << 30) | ||
71 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-g.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-g.h new file mode 100644 index 000000000000..35bbd2378e55 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-g.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-g.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank G register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPGCON (S3C64XX_GPG_BASE + 0x00) | ||
16 | #define S3C64XX_GPGDAT (S3C64XX_GPG_BASE + 0x04) | ||
17 | #define S3C64XX_GPGPUD (S3C64XX_GPG_BASE + 0x08) | ||
18 | #define S3C64XX_GPGCONSLP (S3C64XX_GPG_BASE + 0x0c) | ||
19 | #define S3C64XX_GPGPUDSLP (S3C64XX_GPG_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPG_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
22 | #define S3C64XX_GPG_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPG_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
24 | |||
25 | #define S3C64XX_GPG0_MMC0_CLK (0x02 << 0) | ||
26 | #define S3C64XX_GPG0_EINT_G5_0 (0x07 << 0) | ||
27 | |||
28 | #define S3C64XX_GPG1_MMC0_CMD (0x02 << 4) | ||
29 | #define S3C64XX_GPG1_EINT_G5_1 (0x07 << 4) | ||
30 | |||
31 | #define S3C64XX_GPG2_MMC0_DATA0 (0x02 << 8) | ||
32 | #define S3C64XX_GPG2_EINT_G5_2 (0x07 << 8) | ||
33 | |||
34 | #define S3C64XX_GPG3_MMC0_DATA1 (0x02 << 12) | ||
35 | #define S3C64XX_GPG3_EINT_G5_3 (0x07 << 12) | ||
36 | |||
37 | #define S3C64XX_GPG4_MMC0_DATA2 (0x02 << 16) | ||
38 | #define S3C64XX_GPG4_EINT_G5_4 (0x07 << 16) | ||
39 | |||
40 | #define S3C64XX_GPG5_MMC0_DATA3 (0x02 << 20) | ||
41 | #define S3C64XX_GPG5_EINT_G5_5 (0x07 << 20) | ||
42 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-h.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-h.h new file mode 100644 index 000000000000..81549516572f --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-h.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-h.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank H register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPHCON0 (S3C64XX_GPH_BASE + 0x00) | ||
16 | #define S3C64XX_GPHCON1 (S3C64XX_GPH_BASE + 0x04) | ||
17 | #define S3C64XX_GPHDAT (S3C64XX_GPH_BASE + 0x08) | ||
18 | #define S3C64XX_GPHPUD (S3C64XX_GPH_BASE + 0x0c) | ||
19 | #define S3C64XX_GPHCONSLP (S3C64XX_GPH_BASE + 0x10) | ||
20 | #define S3C64XX_GPHPUDSLP (S3C64XX_GPH_BASE + 0x14) | ||
21 | |||
22 | #define S3C64XX_GPH_CONMASK(__gpio) (0xf << ((__gpio) * 4)) | ||
23 | #define S3C64XX_GPH_INPUT(__gpio) (0x0 << ((__gpio) * 4)) | ||
24 | #define S3C64XX_GPH_OUTPUT(__gpio) (0x1 << ((__gpio) * 4)) | ||
25 | |||
26 | #define S3C64XX_GPH0_MMC1_CLK (0x02 << 0) | ||
27 | #define S3C64XX_GPH0_KP_COL0 (0x04 << 0) | ||
28 | #define S3C64XX_GPH0_EINT_G6_0 (0x07 << 0) | ||
29 | |||
30 | #define S3C64XX_GPH1_MMC1_CMD (0x02 << 4) | ||
31 | #define S3C64XX_GPH1_KP_COL1 (0x04 << 4) | ||
32 | #define S3C64XX_GPH1_EINT_G6_1 (0x07 << 4) | ||
33 | |||
34 | #define S3C64XX_GPH2_MMC1_DATA0 (0x02 << 8) | ||
35 | #define S3C64XX_GPH2_KP_COL2 (0x04 << 8) | ||
36 | #define S3C64XX_GPH2_EINT_G6_2 (0x07 << 8) | ||
37 | |||
38 | #define S3C64XX_GPH3_MMC1_DATA1 (0x02 << 12) | ||
39 | #define S3C64XX_GPH3_KP_COL3 (0x04 << 12) | ||
40 | #define S3C64XX_GPH3_EINT_G6_3 (0x07 << 12) | ||
41 | |||
42 | #define S3C64XX_GPH4_MMC1_DATA2 (0x02 << 16) | ||
43 | #define S3C64XX_GPH4_KP_COL4 (0x04 << 16) | ||
44 | #define S3C64XX_GPH4_EINT_G6_4 (0x07 << 16) | ||
45 | |||
46 | #define S3C64XX_GPH5_MMC1_DATA3 (0x02 << 20) | ||
47 | #define S3C64XX_GPH5_KP_COL5 (0x04 << 20) | ||
48 | #define S3C64XX_GPH5_EINT_G6_5 (0x07 << 20) | ||
49 | |||
50 | #define S3C64XX_GPH6_MMC1_DATA4 (0x02 << 24) | ||
51 | #define S3C64XX_GPH6_MMC2_DATA0 (0x03 << 24) | ||
52 | #define S3C64XX_GPH6_KP_COL6 (0x04 << 24) | ||
53 | #define S3C64XX_GPH6_I2S_V40_BCLK (0x05 << 24) | ||
54 | #define S3C64XX_GPH6_ADDR_CF0 (0x06 << 24) | ||
55 | #define S3C64XX_GPH6_EINT_G6_6 (0x07 << 24) | ||
56 | |||
57 | #define S3C64XX_GPH7_MMC1_DATA5 (0x02 << 28) | ||
58 | #define S3C64XX_GPH7_MMC2_DATA1 (0x03 << 28) | ||
59 | #define S3C64XX_GPH7_KP_COL7 (0x04 << 28) | ||
60 | #define S3C64XX_GPH7_I2S_V40_CDCLK (0x05 << 28) | ||
61 | #define S3C64XX_GPH7_ADDR_CF1 (0x06 << 28) | ||
62 | #define S3C64XX_GPH7_EINT_G6_7 (0x07 << 28) | ||
63 | |||
64 | #define S3C64XX_GPH8_MMC1_DATA6 (0x02 << 32) | ||
65 | #define S3C64XX_GPH8_MMC2_DATA2 (0x03 << 32) | ||
66 | #define S3C64XX_GPH8_I2S_V40_LRCLK (0x05 << 32) | ||
67 | #define S3C64XX_GPH8_ADDR_CF2 (0x06 << 32) | ||
68 | #define S3C64XX_GPH8_EINT_G6_8 (0x07 << 32) | ||
69 | |||
70 | #define S3C64XX_GPH9_MMC1_DATA7 (0x02 << 36) | ||
71 | #define S3C64XX_GPH9_MMC2_DATA3 (0x03 << 36) | ||
72 | #define S3C64XX_GPH9_I2S_V40_DI (0x05 << 36) | ||
73 | #define S3C64XX_GPH9_EINT_G6_9 (0x07 << 36) | ||
74 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-i.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-i.h new file mode 100644 index 000000000000..ce9ebe335566 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-i.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-i.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank I register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPICON (S3C64XX_GPI_BASE + 0x00) | ||
16 | #define S3C64XX_GPIDAT (S3C64XX_GPI_BASE + 0x04) | ||
17 | #define S3C64XX_GPIPUD (S3C64XX_GPI_BASE + 0x08) | ||
18 | #define S3C64XX_GPICONSLP (S3C64XX_GPI_BASE + 0x0c) | ||
19 | #define S3C64XX_GPIPUDSLP (S3C64XX_GPI_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPI_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPI_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPI_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPI0_VD0 (0x02 << 0) | ||
26 | #define S3C64XX_GPI1_VD1 (0x02 << 2) | ||
27 | #define S3C64XX_GPI2_VD2 (0x02 << 4) | ||
28 | #define S3C64XX_GPI3_VD3 (0x02 << 6) | ||
29 | #define S3C64XX_GPI4_VD4 (0x02 << 8) | ||
30 | #define S3C64XX_GPI5_VD5 (0x02 << 10) | ||
31 | #define S3C64XX_GPI6_VD6 (0x02 << 12) | ||
32 | #define S3C64XX_GPI7_VD7 (0x02 << 14) | ||
33 | #define S3C64XX_GPI8_VD8 (0x02 << 16) | ||
34 | #define S3C64XX_GPI9_VD9 (0x02 << 18) | ||
35 | #define S3C64XX_GPI10_VD10 (0x02 << 20) | ||
36 | #define S3C64XX_GPI11_VD11 (0x02 << 22) | ||
37 | #define S3C64XX_GPI12_VD12 (0x02 << 24) | ||
38 | #define S3C64XX_GPI13_VD13 (0x02 << 26) | ||
39 | #define S3C64XX_GPI14_VD14 (0x02 << 28) | ||
40 | #define S3C64XX_GPI15_VD15 (0x02 << 30) | ||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-j.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-j.h new file mode 100644 index 000000000000..21a906299d30 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-j.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-j.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank J register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPJCON (S3C64XX_GPJ_BASE + 0x00) | ||
16 | #define S3C64XX_GPJDAT (S3C64XX_GPJ_BASE + 0x04) | ||
17 | #define S3C64XX_GPJPUD (S3C64XX_GPJ_BASE + 0x08) | ||
18 | #define S3C64XX_GPJCONSLP (S3C64XX_GPJ_BASE + 0x0c) | ||
19 | #define S3C64XX_GPJPUDSLP (S3C64XX_GPJ_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPJ_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPJ_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPJ_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPJ0_VD16 (0x02 << 0) | ||
26 | #define S3C64XX_GPJ1_VD17 (0x02 << 2) | ||
27 | #define S3C64XX_GPJ2_VD18 (0x02 << 4) | ||
28 | #define S3C64XX_GPJ3_VD19 (0x02 << 6) | ||
29 | #define S3C64XX_GPJ4_VD20 (0x02 << 8) | ||
30 | #define S3C64XX_GPJ5_VD21 (0x02 << 10) | ||
31 | #define S3C64XX_GPJ6_VD22 (0x02 << 12) | ||
32 | #define S3C64XX_GPJ7_VD23 (0x02 << 14) | ||
33 | #define S3C64XX_GPJ8_LCD_HSYNC (0x02 << 16) | ||
34 | #define S3C64XX_GPJ9_LCD_VSYNC (0x02 << 18) | ||
35 | #define S3C64XX_GPJ10_LCD_VDEN (0x02 << 20) | ||
36 | #define S3C64XX_GPJ11_LCD_VCLK (0x02 << 22) | ||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-n.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-n.h new file mode 100644 index 000000000000..569e76120881 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-n.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-n.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank N register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPNCON (S3C64XX_GPN_BASE + 0x00) | ||
16 | #define S3C64XX_GPNDAT (S3C64XX_GPN_BASE + 0x04) | ||
17 | #define S3C64XX_GPNPUD (S3C64XX_GPN_BASE + 0x08) | ||
18 | |||
19 | #define S3C64XX_GPN_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
20 | #define S3C64XX_GPN_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
21 | #define S3C64XX_GPN_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
22 | |||
23 | #define S3C64XX_GPN0_EINT0 (0x02 << 0) | ||
24 | #define S3C64XX_GPN0_KP_ROW0 (0x03 << 0) | ||
25 | |||
26 | #define S3C64XX_GPN1_EINT1 (0x02 << 2) | ||
27 | #define S3C64XX_GPN1_KP_ROW1 (0x03 << 2) | ||
28 | |||
29 | #define S3C64XX_GPN2_EINT2 (0x02 << 4) | ||
30 | #define S3C64XX_GPN2_KP_ROW2 (0x03 << 4) | ||
31 | |||
32 | #define S3C64XX_GPN3_EINT3 (0x02 << 6) | ||
33 | #define S3C64XX_GPN3_KP_ROW3 (0x03 << 6) | ||
34 | |||
35 | #define S3C64XX_GPN4_EINT4 (0x02 << 8) | ||
36 | #define S3C64XX_GPN4_KP_ROW4 (0x03 << 8) | ||
37 | |||
38 | #define S3C64XX_GPN5_EINT5 (0x02 << 10) | ||
39 | #define S3C64XX_GPN5_KP_ROW5 (0x03 << 10) | ||
40 | |||
41 | #define S3C64XX_GPN6_EINT6 (0x02 << 12) | ||
42 | #define S3C64XX_GPN6_KP_ROW6 (0x03 << 12) | ||
43 | |||
44 | #define S3C64XX_GPN7_EINT7 (0x02 << 14) | ||
45 | #define S3C64XX_GPN7_KP_ROW7 (0x03 << 14) | ||
46 | |||
47 | #define S3C64XX_GPN8_EINT8 (0x02 << 16) | ||
48 | #define S3C64XX_GPN9_EINT9 (0x02 << 18) | ||
49 | #define S3C64XX_GPN10_EINT10 (0x02 << 20) | ||
50 | #define S3C64XX_GPN11_EINT11 (0x02 << 22) | ||
51 | #define S3C64XX_GPN12_EINT12 (0x02 << 24) | ||
52 | #define S3C64XX_GPN13_EINT13 (0x02 << 26) | ||
53 | #define S3C64XX_GPN14_EINT14 (0x02 << 28) | ||
54 | #define S3C64XX_GPN15_EINT15 (0x02 << 30) | ||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-o.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-o.h new file mode 100644 index 000000000000..b09e12954b57 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-o.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-o.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank O register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPOCON (S3C64XX_GPO_BASE + 0x00) | ||
16 | #define S3C64XX_GPODAT (S3C64XX_GPO_BASE + 0x04) | ||
17 | #define S3C64XX_GPOPUD (S3C64XX_GPO_BASE + 0x08) | ||
18 | #define S3C64XX_GPOCONSLP (S3C64XX_GPO_BASE + 0x0c) | ||
19 | #define S3C64XX_GPOPUDSLP (S3C64XX_GPO_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPO_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPO_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPO_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPO0_MEM0_nCS2 (0x02 << 0) | ||
26 | #define S3C64XX_GPO0_EINT_G7_0 (0x03 << 0) | ||
27 | |||
28 | #define S3C64XX_GPO1_MEM0_nCS3 (0x02 << 2) | ||
29 | #define S3C64XX_GPO1_EINT_G7_1 (0x03 << 2) | ||
30 | |||
31 | #define S3C64XX_GPO2_MEM0_nCS4 (0x02 << 4) | ||
32 | #define S3C64XX_GPO2_EINT_G7_2 (0x03 << 4) | ||
33 | |||
34 | #define S3C64XX_GPO3_MEM0_nCS5 (0x02 << 6) | ||
35 | #define S3C64XX_GPO3_EINT_G7_3 (0x03 << 6) | ||
36 | |||
37 | #define S3C64XX_GPO4_EINT_G7_4 (0x03 << 8) | ||
38 | |||
39 | #define S3C64XX_GPO5_EINT_G7_5 (0x03 << 10) | ||
40 | |||
41 | #define S3C64XX_GPO6_MEM0_ADDR6 (0x02 << 12) | ||
42 | #define S3C64XX_GPO6_EINT_G7_6 (0x03 << 12) | ||
43 | |||
44 | #define S3C64XX_GPO7_MEM0_ADDR7 (0x02 << 14) | ||
45 | #define S3C64XX_GPO7_EINT_G7_7 (0x03 << 14) | ||
46 | |||
47 | #define S3C64XX_GPO8_MEM0_ADDR8 (0x02 << 16) | ||
48 | #define S3C64XX_GPO8_EINT_G7_8 (0x03 << 16) | ||
49 | |||
50 | #define S3C64XX_GPO9_MEM0_ADDR9 (0x02 << 18) | ||
51 | #define S3C64XX_GPO9_EINT_G7_9 (0x03 << 18) | ||
52 | |||
53 | #define S3C64XX_GPO10_MEM0_ADDR10 (0x02 << 20) | ||
54 | #define S3C64XX_GPO10_EINT_G7_10 (0x03 << 20) | ||
55 | |||
56 | #define S3C64XX_GPO11_MEM0_ADDR11 (0x02 << 22) | ||
57 | #define S3C64XX_GPO11_EINT_G7_11 (0x03 << 22) | ||
58 | |||
59 | #define S3C64XX_GPO12_MEM0_ADDR12 (0x02 << 24) | ||
60 | #define S3C64XX_GPO12_EINT_G7_12 (0x03 << 24) | ||
61 | |||
62 | #define S3C64XX_GPO13_MEM0_ADDR13 (0x02 << 26) | ||
63 | #define S3C64XX_GPO13_EINT_G7_13 (0x03 << 26) | ||
64 | |||
65 | #define S3C64XX_GPO14_MEM0_ADDR14 (0x02 << 28) | ||
66 | #define S3C64XX_GPO14_EINT_G7_14 (0x03 << 28) | ||
67 | |||
68 | #define S3C64XX_GPO15_MEM0_ADDR15 (0x02 << 30) | ||
69 | #define S3C64XX_GPO15_EINT_G7_15 (0x03 << 30) | ||
70 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-p.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-p.h new file mode 100644 index 000000000000..92f00517926b --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-p.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-p.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank P register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPPCON (S3C64XX_GPP_BASE + 0x00) | ||
16 | #define S3C64XX_GPPDAT (S3C64XX_GPP_BASE + 0x04) | ||
17 | #define S3C64XX_GPPPUD (S3C64XX_GPP_BASE + 0x08) | ||
18 | #define S3C64XX_GPPCONSLP (S3C64XX_GPP_BASE + 0x0c) | ||
19 | #define S3C64XX_GPPPUDSLP (S3C64XX_GPP_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPP_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPP_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPP_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPP0_MEM0_ADDRV (0x02 << 0) | ||
26 | #define S3C64XX_GPP0_EINT_G8_0 (0x03 << 0) | ||
27 | |||
28 | #define S3C64XX_GPP1_MEM0_SMCLK (0x02 << 2) | ||
29 | #define S3C64XX_GPP1_EINT_G8_1 (0x03 << 2) | ||
30 | |||
31 | #define S3C64XX_GPP2_MEM0_nWAIT (0x02 << 4) | ||
32 | #define S3C64XX_GPP2_EINT_G8_2 (0x03 << 4) | ||
33 | |||
34 | #define S3C64XX_GPP3_MEM0_RDY0_ALE (0x02 << 6) | ||
35 | #define S3C64XX_GPP3_EINT_G8_3 (0x03 << 6) | ||
36 | |||
37 | #define S3C64XX_GPP4_MEM0_RDY1_CLE (0x02 << 8) | ||
38 | #define S3C64XX_GPP4_EINT_G8_4 (0x03 << 8) | ||
39 | |||
40 | #define S3C64XX_GPP5_MEM0_INTsm0_FWE (0x02 << 10) | ||
41 | #define S3C64XX_GPP5_EINT_G8_5 (0x03 << 10) | ||
42 | |||
43 | #define S3C64XX_GPP6_MEM0_(null) (0x02 << 12) | ||
44 | #define S3C64XX_GPP6_EINT_G8_6 (0x03 << 12) | ||
45 | |||
46 | #define S3C64XX_GPP7_MEM0_INTsm1_FRE (0x02 << 14) | ||
47 | #define S3C64XX_GPP7_EINT_G8_7 (0x03 << 14) | ||
48 | |||
49 | #define S3C64XX_GPP8_MEM0_RPn_RnB (0x02 << 16) | ||
50 | #define S3C64XX_GPP8_EINT_G8_8 (0x03 << 16) | ||
51 | |||
52 | #define S3C64XX_GPP9_MEM0_ATA_RESET (0x02 << 18) | ||
53 | #define S3C64XX_GPP9_EINT_G8_9 (0x03 << 18) | ||
54 | |||
55 | #define S3C64XX_GPP10_MEM0_ATA_INPACK (0x02 << 20) | ||
56 | #define S3C64XX_GPP10_EINT_G8_10 (0x03 << 20) | ||
57 | |||
58 | #define S3C64XX_GPP11_MEM0_ATA_REG (0x02 << 22) | ||
59 | #define S3C64XX_GPP11_EINT_G8_11 (0x03 << 22) | ||
60 | |||
61 | #define S3C64XX_GPP12_MEM0_ATA_WE (0x02 << 24) | ||
62 | #define S3C64XX_GPP12_EINT_G8_12 (0x03 << 24) | ||
63 | |||
64 | #define S3C64XX_GPP13_MEM0_ATA_OE (0x02 << 26) | ||
65 | #define S3C64XX_GPP13_EINT_G8_13 (0x03 << 26) | ||
66 | |||
67 | #define S3C64XX_GPP14_MEM0_ATA_CD (0x02 << 28) | ||
68 | #define S3C64XX_GPP14_EINT_G8_14 (0x03 << 28) | ||
69 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/gpio-bank-q.h b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-q.h new file mode 100644 index 000000000000..565e60aaee47 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/gpio-bank-q.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/plat/gpio-bank-q.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * GPIO Bank Q register and configuration definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C64XX_GPQCON (S3C64XX_GPQ_BASE + 0x00) | ||
16 | #define S3C64XX_GPQDAT (S3C64XX_GPQ_BASE + 0x04) | ||
17 | #define S3C64XX_GPQPUD (S3C64XX_GPQ_BASE + 0x08) | ||
18 | #define S3C64XX_GPQCONSLP (S3C64XX_GPQ_BASE + 0x0c) | ||
19 | #define S3C64XX_GPQPUDSLP (S3C64XX_GPQ_BASE + 0x10) | ||
20 | |||
21 | #define S3C64XX_GPQ_CONMASK(__gpio) (0x3 << ((__gpio) * 2)) | ||
22 | #define S3C64XX_GPQ_INPUT(__gpio) (0x0 << ((__gpio) * 2)) | ||
23 | #define S3C64XX_GPQ_OUTPUT(__gpio) (0x1 << ((__gpio) * 2)) | ||
24 | |||
25 | #define S3C64XX_GPQ0_MEM0_ADDR18_RAS (0x02 << 0) | ||
26 | #define S3C64XX_GPQ0_EINT_G9_0 (0x03 << 0) | ||
27 | |||
28 | #define S3C64XX_GPQ1_MEM0_ADDR19_CAS (0x02 << 2) | ||
29 | #define S3C64XX_GPQ1_EINT_G9_1 (0x03 << 2) | ||
30 | |||
31 | #define S3C64XX_GPQ2_EINT_G9_2 (0x03 << 4) | ||
32 | |||
33 | #define S3C64XX_GPQ3_EINT_G9_3 (0x03 << 6) | ||
34 | |||
35 | #define S3C64XX_GPQ4_EINT_G9_4 (0x03 << 8) | ||
36 | |||
37 | #define S3C64XX_GPQ5_EINT_G9_5 (0x03 << 10) | ||
38 | |||
39 | #define S3C64XX_GPQ6_EINT_G9_6 (0x03 << 12) | ||
40 | |||
41 | #define S3C64XX_GPQ7_MEM0_ADDR17_WENDMC (0x02 << 14) | ||
42 | #define S3C64XX_GPQ7_EINT_G9_7 (0x03 << 14) | ||
43 | |||
44 | #define S3C64XX_GPQ8_MEM0_ADDR16_APDMC (0x02 << 16) | ||
45 | #define S3C64XX_GPQ8_EINT_G9_8 (0x03 << 16) | ||
46 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/irqs.h b/arch/arm/plat-s3c64xx/include/plat/irqs.h new file mode 100644 index 000000000000..02e8dd4c97d5 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/irqs.h | |||
@@ -0,0 +1,201 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/mach/irqs.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX - Common IRQ support | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_PLAT_S3C64XX_IRQS_H | ||
12 | #define __ASM_PLAT_S3C64XX_IRQS_H __FILE__ | ||
13 | |||
14 | /* we keep the first set of CPU IRQs out of the range of | ||
15 | * the ISA space, so that the PC104 has them to itself | ||
16 | * and we don't end up having to do horrible things to the | ||
17 | * standard ISA drivers.... | ||
18 | * | ||
19 | * note, since we're using the VICs, our start must be a | ||
20 | * mulitple of 32 to allow the common code to work | ||
21 | */ | ||
22 | |||
23 | #define S3C_IRQ_OFFSET (32) | ||
24 | |||
25 | #define S3C_IRQ(x) ((x) + S3C_IRQ_OFFSET) | ||
26 | |||
27 | #define S3C_VIC0_BASE S3C_IRQ(0) | ||
28 | #define S3C_VIC1_BASE S3C_IRQ(32) | ||
29 | |||
30 | /* UART interrupts, each UART has 4 intterupts per channel so | ||
31 | * use the space between the ISA and S3C main interrupts. Note, these | ||
32 | * are not in the same order as the S3C24XX series! */ | ||
33 | |||
34 | #define IRQ_S3CUART_BASE0 (16) | ||
35 | #define IRQ_S3CUART_BASE1 (20) | ||
36 | #define IRQ_S3CUART_BASE2 (24) | ||
37 | #define IRQ_S3CUART_BASE3 (28) | ||
38 | |||
39 | #define UART_IRQ_RXD (0) | ||
40 | #define UART_IRQ_ERR (1) | ||
41 | #define UART_IRQ_TXD (2) | ||
42 | #define UART_IRQ_MODEM (3) | ||
43 | |||
44 | #define IRQ_S3CUART_RX0 (IRQ_S3CUART_BASE0 + UART_IRQ_RXD) | ||
45 | #define IRQ_S3CUART_TX0 (IRQ_S3CUART_BASE0 + UART_IRQ_TXD) | ||
46 | #define IRQ_S3CUART_ERR0 (IRQ_S3CUART_BASE0 + UART_IRQ_ERR) | ||
47 | |||
48 | #define IRQ_S3CUART_RX1 (IRQ_S3CUART_BASE1 + UART_IRQ_RXD) | ||
49 | #define IRQ_S3CUART_TX1 (IRQ_S3CUART_BASE1 + UART_IRQ_TXD) | ||
50 | #define IRQ_S3CUART_ERR1 (IRQ_S3CUART_BASE1 + UART_IRQ_ERR) | ||
51 | |||
52 | #define IRQ_S3CUART_RX2 (IRQ_S3CUART_BASE2 + UART_IRQ_RXD) | ||
53 | #define IRQ_S3CUART_TX2 (IRQ_S3CUART_BASE2 + UART_IRQ_TXD) | ||
54 | #define IRQ_S3CUART_ERR2 (IRQ_S3CUART_BASE2 + UART_IRQ_ERR) | ||
55 | |||
56 | #define IRQ_S3CUART_RX3 (IRQ_S3CUART_BASE3 + UART_IRQ_RXD) | ||
57 | #define IRQ_S3CUART_TX3 (IRQ_S3CUART_BASE3 + UART_IRQ_TXD) | ||
58 | #define IRQ_S3CUART_ERR3 (IRQ_S3CUART_BASE3 + UART_IRQ_ERR) | ||
59 | |||
60 | /* VIC based IRQs */ | ||
61 | |||
62 | #define S3C64XX_IRQ_VIC0(x) (S3C_VIC0_BASE + (x)) | ||
63 | #define S3C64XX_IRQ_VIC1(x) (S3C_VIC1_BASE + (x)) | ||
64 | |||
65 | /* VIC0 */ | ||
66 | |||
67 | #define IRQ_EINT0_3 S3C64XX_IRQ_VIC0(0) | ||
68 | #define IRQ_EINT4_11 S3C64XX_IRQ_VIC0(1) | ||
69 | #define IRQ_RTC_TIC S3C64XX_IRQ_VIC0(2) | ||
70 | #define IRQ_CAMIF_C S3C64XX_IRQ_VIC0(3) | ||
71 | #define IRQ_CAMIF_P S3C64XX_IRQ_VIC0(4) | ||
72 | #define IRQ_CAMIF_MC S3C64XX_IRQ_VIC0(5) | ||
73 | #define IRQ_S3C6410_IIC1 S3C64XX_IRQ_VIC0(5) | ||
74 | #define IRQ_S3C6410_IIS S3C64XX_IRQ_VIC0(6) | ||
75 | #define IRQ_S3C6400_CAMIF_MP S3C64XX_IRQ_VIC0(6) | ||
76 | #define IRQ_CAMIF_WE_C S3C64XX_IRQ_VIC0(7) | ||
77 | #define IRQ_S3C6410_G3D S3C64XX_IRQ_VIC0(8) | ||
78 | #define IRQ_S3C6400_CAMIF_WE_P S3C64XX_IRQ_VIC0(8) | ||
79 | #define IRQ_POST0 S3C64XX_IRQ_VIC0(9) | ||
80 | #define IRQ_ROTATOR S3C64XX_IRQ_VIC0(10) | ||
81 | #define IRQ_2D S3C64XX_IRQ_VIC0(11) | ||
82 | #define IRQ_TVENC S3C64XX_IRQ_VIC0(12) | ||
83 | #define IRQ_SCALER S3C64XX_IRQ_VIC0(13) | ||
84 | #define IRQ_BATF S3C64XX_IRQ_VIC0(14) | ||
85 | #define IRQ_JPEG S3C64XX_IRQ_VIC0(15) | ||
86 | #define IRQ_MFC S3C64XX_IRQ_VIC0(16) | ||
87 | #define IRQ_SDMA0 S3C64XX_IRQ_VIC0(17) | ||
88 | #define IRQ_SDMA1 S3C64XX_IRQ_VIC0(18) | ||
89 | #define IRQ_ARM_DMAERR S3C64XX_IRQ_VIC0(19) | ||
90 | #define IRQ_ARM_DMA S3C64XX_IRQ_VIC0(20) | ||
91 | #define IRQ_ARM_DMAS S3C64XX_IRQ_VIC0(21) | ||
92 | #define IRQ_KEYPAD S3C64XX_IRQ_VIC0(22) | ||
93 | #define IRQ_TIMER0_VIC S3C64XX_IRQ_VIC0(23) | ||
94 | #define IRQ_TIMER1_VIC S3C64XX_IRQ_VIC0(24) | ||
95 | #define IRQ_TIMER2_VIC S3C64XX_IRQ_VIC0(25) | ||
96 | #define IRQ_WDT S3C64XX_IRQ_VIC0(26) | ||
97 | #define IRQ_TIMER3_VIC S3C64XX_IRQ_VIC0(27) | ||
98 | #define IRQ_TIMER4_VIC S3C64XX_IRQ_VIC0(28) | ||
99 | #define IRQ_LCD_FIFO S3C64XX_IRQ_VIC0(29) | ||
100 | #define IRQ_LCD_VSYNC S3C64XX_IRQ_VIC0(30) | ||
101 | #define IRQ_LCD_SYSTEM S3C64XX_IRQ_VIC0(31) | ||
102 | |||
103 | /* VIC1 */ | ||
104 | |||
105 | #define IRQ_EINT12_19 S3C64XX_IRQ_VIC1(0) | ||
106 | #define IRQ_EINT20_27 S3C64XX_IRQ_VIC1(1) | ||
107 | #define IRQ_PCM0 S3C64XX_IRQ_VIC1(2) | ||
108 | #define IRQ_PCM1 S3C64XX_IRQ_VIC1(3) | ||
109 | #define IRQ_AC97 S3C64XX_IRQ_VIC1(4) | ||
110 | #define IRQ_UART0 S3C64XX_IRQ_VIC1(5) | ||
111 | #define IRQ_UART1 S3C64XX_IRQ_VIC1(6) | ||
112 | #define IRQ_UART2 S3C64XX_IRQ_VIC1(7) | ||
113 | #define IRQ_UART3 S3C64XX_IRQ_VIC1(8) | ||
114 | #define IRQ_DMA0 S3C64XX_IRQ_VIC1(9) | ||
115 | #define IRQ_DMA1 S3C64XX_IRQ_VIC1(10) | ||
116 | #define IRQ_ONENAND0 S3C64XX_IRQ_VIC1(11) | ||
117 | #define IRQ_ONENAND1 S3C64XX_IRQ_VIC1(12) | ||
118 | #define IRQ_NFC S3C64XX_IRQ_VIC1(13) | ||
119 | #define IRQ_CFCON S3C64XX_IRQ_VIC1(14) | ||
120 | #define IRQ_UHOST S3C64XX_IRQ_VIC1(15) | ||
121 | #define IRQ_SPI0 S3C64XX_IRQ_VIC1(16) | ||
122 | #define IRQ_SPI1 S3C64XX_IRQ_VIC1(17) | ||
123 | #define IRQ_IIC S3C64XX_IRQ_VIC1(18) | ||
124 | #define IRQ_HSItx S3C64XX_IRQ_VIC1(19) | ||
125 | #define IRQ_HSIrx S3C64XX_IRQ_VIC1(20) | ||
126 | #define IRQ_RESERVED S3C64XX_IRQ_VIC1(21) | ||
127 | #define IRQ_MSM S3C64XX_IRQ_VIC1(22) | ||
128 | #define IRQ_HOSTIF S3C64XX_IRQ_VIC1(23) | ||
129 | #define IRQ_HSMMC0 S3C64XX_IRQ_VIC1(24) | ||
130 | #define IRQ_HSMMC1 S3C64XX_IRQ_VIC1(25) | ||
131 | #define IRQ_HSMMC2 IRQ_SPI1 /* shared with SPI1 */ | ||
132 | #define IRQ_OTG S3C64XX_IRQ_VIC1(26) | ||
133 | #define IRQ_IRDA S3C64XX_IRQ_VIC1(27) | ||
134 | #define IRQ_RTC_ALARM S3C64XX_IRQ_VIC1(28) | ||
135 | #define IRQ_SEC S3C64XX_IRQ_VIC1(29) | ||
136 | #define IRQ_PENDN S3C64XX_IRQ_VIC1(30) | ||
137 | #define IRQ_TC IRQ_PENDN | ||
138 | #define IRQ_ADC S3C64XX_IRQ_VIC1(31) | ||
139 | |||
140 | #define S3C64XX_TIMER_IRQ(x) S3C_IRQ(64 + (x)) | ||
141 | |||
142 | #define IRQ_TIMER0 S3C64XX_TIMER_IRQ(0) | ||
143 | #define IRQ_TIMER1 S3C64XX_TIMER_IRQ(1) | ||
144 | #define IRQ_TIMER2 S3C64XX_TIMER_IRQ(2) | ||
145 | #define IRQ_TIMER3 S3C64XX_TIMER_IRQ(3) | ||
146 | #define IRQ_TIMER4 S3C64XX_TIMER_IRQ(4) | ||
147 | |||
148 | /* compatibility for device defines */ | ||
149 | |||
150 | #define IRQ_IIC1 IRQ_S3C6410_IIC1 | ||
151 | |||
152 | /* Since the IRQ_EINT(x) are a linear mapping on current s3c64xx series | ||
153 | * we just defined them as an IRQ_EINT(x) macro from S3C_IRQ_EINT_BASE | ||
154 | * which we place after the pair of VICs. */ | ||
155 | |||
156 | #define S3C_IRQ_EINT_BASE S3C_IRQ(64+5) | ||
157 | |||
158 | #define S3C_EINT(x) ((x) + S3C_IRQ_EINT_BASE) | ||
159 | #define IRQ_EINT(x) S3C_EINT(x) | ||
160 | |||
161 | /* Next the external interrupt groups. These are similar to the IRQ_EINT(x) | ||
162 | * that they are sourced from the GPIO pins but with a different scheme for | ||
163 | * priority and source indication. | ||
164 | * | ||
165 | * The IRQ_EINT(x) can be thought of as 'group 0' of the available GPIO | ||
166 | * interrupts, but for historical reasons they are kept apart from these | ||
167 | * next interrupts. | ||
168 | * | ||
169 | * Use IRQ_EINT_GROUP(group, offset) to get the number for use in the | ||
170 | * machine specific support files. | ||
171 | */ | ||
172 | |||
173 | #define IRQ_EINT_GROUP1_NR (15) | ||
174 | #define IRQ_EINT_GROUP2_NR (8) | ||
175 | #define IRQ_EINT_GROUP3_NR (5) | ||
176 | #define IRQ_EINT_GROUP4_NR (14) | ||
177 | #define IRQ_EINT_GROUP5_NR (7) | ||
178 | #define IRQ_EINT_GROUP6_NR (10) | ||
179 | #define IRQ_EINT_GROUP7_NR (16) | ||
180 | #define IRQ_EINT_GROUP8_NR (15) | ||
181 | #define IRQ_EINT_GROUP9_NR (9) | ||
182 | |||
183 | #define IRQ_EINT_GROUP_BASE S3C_EINT(28) | ||
184 | #define IRQ_EINT_GROUP1_BASE (IRQ_EINT_GROUP_BASE + 0x00) | ||
185 | #define IRQ_EINT_GROUP2_BASE (IRQ_EINT_GROUP1_BASE + IRQ_EINT_GROUP1_NR) | ||
186 | #define IRQ_EINT_GROUP3_BASE (IRQ_EINT_GROUP2_BASE + IRQ_EINT_GROUP2_NR) | ||
187 | #define IRQ_EINT_GROUP4_BASE (IRQ_EINT_GROUP3_BASE + IRQ_EINT_GROUP3_NR) | ||
188 | #define IRQ_EINT_GROUP5_BASE (IRQ_EINT_GROUP4_BASE + IRQ_EINT_GROUP4_NR) | ||
189 | #define IRQ_EINT_GROUP6_BASE (IRQ_EINT_GROUP5_BASE + IRQ_EINT_GROUP5_NR) | ||
190 | #define IRQ_EINT_GROUP7_BASE (IRQ_EINT_GROUP6_BASE + IRQ_EINT_GROUP6_NR) | ||
191 | #define IRQ_EINT_GROUP8_BASE (IRQ_EINT_GROUP7_BASE + IRQ_EINT_GROUP7_NR) | ||
192 | #define IRQ_EINT_GROUP9_BASE (IRQ_EINT_GROUP8_BASE + IRQ_EINT_GROUP8_NR) | ||
193 | |||
194 | #define IRQ_EINT_GROUP(group, no) (IRQ_EINT_GROUP##group##__BASE + (x)) | ||
195 | |||
196 | /* Set the default NR_IRQS */ | ||
197 | |||
198 | #define NR_IRQS (IRQ_EINT_GROUP9_BASE + IRQ_EINT_GROUP9_NR + 1) | ||
199 | |||
200 | #endif /* __ASM_PLAT_S3C64XX_IRQS_H */ | ||
201 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/pll.h b/arch/arm/plat-s3c64xx/include/plat/pll.h new file mode 100644 index 000000000000..90bbd72fdc4e --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/pll.h | |||
@@ -0,0 +1,74 @@ | |||
1 | /* arch/arm/plat-s3c64xx/include/plat/pll.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX PLL code | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #define S3C6400_PLL_MDIV_MASK ((1 << (25-16+1)) - 1) | ||
16 | #define S3C6400_PLL_PDIV_MASK ((1 << (13-8+1)) - 1) | ||
17 | #define S3C6400_PLL_SDIV_MASK ((1 << (2-0+1)) - 1) | ||
18 | #define S3C6400_PLL_MDIV_SHIFT (16) | ||
19 | #define S3C6400_PLL_PDIV_SHIFT (8) | ||
20 | #define S3C6400_PLL_SDIV_SHIFT (0) | ||
21 | |||
22 | #include <asm/div64.h> | ||
23 | |||
24 | static inline unsigned long s3c6400_get_pll(unsigned long baseclk, | ||
25 | u32 pllcon) | ||
26 | { | ||
27 | u32 mdiv, pdiv, sdiv; | ||
28 | u64 fvco = baseclk; | ||
29 | |||
30 | mdiv = (pllcon >> S3C6400_PLL_MDIV_SHIFT) & S3C6400_PLL_MDIV_MASK; | ||
31 | pdiv = (pllcon >> S3C6400_PLL_PDIV_SHIFT) & S3C6400_PLL_PDIV_MASK; | ||
32 | sdiv = (pllcon >> S3C6400_PLL_SDIV_SHIFT) & S3C6400_PLL_SDIV_MASK; | ||
33 | |||
34 | fvco *= mdiv; | ||
35 | do_div(fvco, (pdiv << sdiv)); | ||
36 | |||
37 | return (unsigned long)fvco; | ||
38 | } | ||
39 | |||
40 | #define S3C6400_EPLL_MDIV_MASK ((1 << (23-16)) - 1) | ||
41 | #define S3C6400_EPLL_PDIV_MASK ((1 << (13-8)) - 1) | ||
42 | #define S3C6400_EPLL_SDIV_MASK ((1 << (2-0)) - 1) | ||
43 | #define S3C6400_EPLL_MDIV_SHIFT (16) | ||
44 | #define S3C6400_EPLL_PDIV_SHIFT (8) | ||
45 | #define S3C6400_EPLL_SDIV_SHIFT (0) | ||
46 | #define S3C6400_EPLL_KDIV_MASK (0xffff) | ||
47 | |||
48 | static inline unsigned long s3c6400_get_epll(unsigned long baseclk) | ||
49 | { | ||
50 | unsigned long result; | ||
51 | u32 epll0 = __raw_readl(S3C_EPLL_CON0); | ||
52 | u32 epll1 = __raw_readl(S3C_EPLL_CON1); | ||
53 | u32 mdiv, pdiv, sdiv, kdiv; | ||
54 | u64 tmp; | ||
55 | |||
56 | mdiv = (epll0 >> S3C6400_EPLL_MDIV_SHIFT) & S3C6400_EPLL_MDIV_MASK; | ||
57 | pdiv = (epll0 >> S3C6400_EPLL_PDIV_SHIFT) & S3C6400_EPLL_PDIV_MASK; | ||
58 | sdiv = (epll0 >> S3C6400_EPLL_SDIV_SHIFT) & S3C6400_EPLL_SDIV_MASK; | ||
59 | kdiv = epll1 & S3C6400_EPLL_KDIV_MASK; | ||
60 | |||
61 | /* We need to multiple baseclk by mdiv (the integer part) and kdiv | ||
62 | * which is in 2^16ths, so shift mdiv up (does not overflow) and | ||
63 | * add kdiv before multiplying. The use of tmp is to avoid any | ||
64 | * overflows before shifting bac down into result when multipling | ||
65 | * by the mdiv and kdiv pair. | ||
66 | */ | ||
67 | |||
68 | tmp = baseclk; | ||
69 | tmp *= (mdiv << 16) + kdiv; | ||
70 | do_div(tmp, (pdiv << sdiv)); | ||
71 | result = tmp >> 16; | ||
72 | |||
73 | return result; | ||
74 | } | ||
diff --git a/arch/arm/plat-s3c64xx/include/plat/regs-clock.h b/arch/arm/plat-s3c64xx/include/plat/regs-clock.h new file mode 100644 index 000000000000..b1082c163247 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/regs-clock.h | |||
@@ -0,0 +1,224 @@ | |||
1 | /* arch/arm/plat-s3c64xx/include/plat/regs-clock.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX clock register definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __PLAT_REGS_CLOCK_H | ||
16 | #define __PLAT_REGS_CLOCK_H __FILE__ | ||
17 | |||
18 | #define S3C_CLKREG(x) (S3C_VA_SYS + (x)) | ||
19 | |||
20 | #define S3C_APLL_LOCK S3C_CLKREG(0x00) | ||
21 | #define S3C_MPLL_LOCK S3C_CLKREG(0x04) | ||
22 | #define S3C_EPLL_LOCK S3C_CLKREG(0x08) | ||
23 | #define S3C_APLL_CON S3C_CLKREG(0x0C) | ||
24 | #define S3C_MPLL_CON S3C_CLKREG(0x10) | ||
25 | #define S3C_EPLL_CON0 S3C_CLKREG(0x14) | ||
26 | #define S3C_EPLL_CON1 S3C_CLKREG(0x18) | ||
27 | #define S3C_CLK_SRC S3C_CLKREG(0x1C) | ||
28 | #define S3C_CLK_DIV0 S3C_CLKREG(0x20) | ||
29 | #define S3C_CLK_DIV1 S3C_CLKREG(0x24) | ||
30 | #define S3C_CLK_DIV2 S3C_CLKREG(0x28) | ||
31 | #define S3C_CLK_OUT S3C_CLKREG(0x2C) | ||
32 | #define S3C_HCLK_GATE S3C_CLKREG(0x30) | ||
33 | #define S3C_PCLK_GATE S3C_CLKREG(0x34) | ||
34 | #define S3C_SCLK_GATE S3C_CLKREG(0x38) | ||
35 | |||
36 | /* CLKDIV0 */ | ||
37 | #define S3C6400_CLKDIV0_MFC_MASK (0xf << 28) | ||
38 | #define S3C6400_CLKDIV0_MFC_SHIFT (28) | ||
39 | #define S3C6400_CLKDIV0_JPEG_MASK (0xf << 24) | ||
40 | #define S3C6400_CLKDIV0_JPEG_SHIFT (24) | ||
41 | #define S3C6400_CLKDIV0_CAM_MASK (0xf << 20) | ||
42 | #define S3C6400_CLKDIV0_CAM_SHIFT (20) | ||
43 | #define S3C6400_CLKDIV0_SECURITY_MASK (0x3 << 18) | ||
44 | #define S3C6400_CLKDIV0_SECURITY_SHIFT (18) | ||
45 | #define S3C6400_CLKDIV0_PCLK_MASK (0xf << 12) | ||
46 | #define S3C6400_CLKDIV0_PCLK_SHIFT (12) | ||
47 | #define S3C6400_CLKDIV0_HCLK2_MASK (0x7 << 9) | ||
48 | #define S3C6400_CLKDIV0_HCLK2_SHIFT (9) | ||
49 | #define S3C6400_CLKDIV0_HCLK_MASK (0x1 << 8) | ||
50 | #define S3C6400_CLKDIV0_HCLK_SHIFT (8) | ||
51 | #define S3C6400_CLKDIV0_MPLL_MASK (0x1 << 4) | ||
52 | #define S3C6400_CLKDIV0_MPLL_SHIFT (4) | ||
53 | #define S3C6400_CLKDIV0_ARM_MASK (0x3 << 0) | ||
54 | #define S3C6410_CLKDIV0_ARM_MASK (0x7 << 0) | ||
55 | #define S3C6400_CLKDIV0_ARM_SHIFT (0) | ||
56 | |||
57 | /* CLKDIV1 */ | ||
58 | #define S3C6410_CLKDIV1_FIMC_MASK (0xf << 24) | ||
59 | #define S3C6410_CLKDIV1_FIMC_SHIFT (24) | ||
60 | #define S3C6400_CLKDIV1_UHOST_MASK (0xf << 20) | ||
61 | #define S3C6400_CLKDIV1_UHOST_SHIFT (20) | ||
62 | #define S3C6400_CLKDIV1_SCALER_MASK (0xf << 16) | ||
63 | #define S3C6400_CLKDIV1_SCALER_SHIFT (16) | ||
64 | #define S3C6400_CLKDIV1_LCD_MASK (0xf << 12) | ||
65 | #define S3C6400_CLKDIV1_LCD_SHIFT (12) | ||
66 | #define S3C6400_CLKDIV1_MMC2_MASK (0xf << 8) | ||
67 | #define S3C6400_CLKDIV1_MMC2_SHIFT (8) | ||
68 | #define S3C6400_CLKDIV1_MMC1_MASK (0xf << 4) | ||
69 | #define S3C6400_CLKDIV1_MMC1_SHIFT (4) | ||
70 | #define S3C6400_CLKDIV1_MMC0_MASK (0xf << 0) | ||
71 | #define S3C6400_CLKDIV1_MMC0_SHIFT (0) | ||
72 | |||
73 | /* CLKDIV2 */ | ||
74 | #define S3C6410_CLKDIV2_AUDIO2_MASK (0xf << 24) | ||
75 | #define S3C6410_CLKDIV2_AUDIO2_SHIFT (24) | ||
76 | #define S3C6400_CLKDIV2_IRDA_MASK (0xf << 20) | ||
77 | #define S3C6400_CLKDIV2_IRDA_SHIFT (20) | ||
78 | #define S3C6400_CLKDIV2_UART_MASK (0xf << 16) | ||
79 | #define S3C6400_CLKDIV2_UART_SHIFT (16) | ||
80 | #define S3C6400_CLKDIV2_AUDIO1_MASK (0xf << 12) | ||
81 | #define S3C6400_CLKDIV2_AUDIO1_SHIFT (12) | ||
82 | #define S3C6400_CLKDIV2_AUDIO0_MASK (0xf << 8) | ||
83 | #define S3C6400_CLKDIV2_AUDIO0_SHIFT (8) | ||
84 | #define S3C6400_CLKDIV2_SPI1_MASK (0xf << 4) | ||
85 | #define S3C6400_CLKDIV2_SPI1_SHIFT (4) | ||
86 | #define S3C6400_CLKDIV2_SPI0_MASK (0xf << 0) | ||
87 | #define S3C6400_CLKDIV2_SPI0_SHIFT (0) | ||
88 | |||
89 | /* HCLK GATE Registers */ | ||
90 | #define S3C_CLKCON_HCLK_BUS (1<<30) | ||
91 | #define S3C_CLKCON_HCLK_SECUR (1<<29) | ||
92 | #define S3C_CLKCON_HCLK_SDMA1 (1<<28) | ||
93 | #define S3C_CLKCON_HCLK_SDMA2 (1<<27) | ||
94 | #define S3C_CLKCON_HCLK_UHOST (1<<26) | ||
95 | #define S3C_CLKCON_HCLK_IROM (1<<25) | ||
96 | #define S3C_CLKCON_HCLK_DDR1 (1<<24) | ||
97 | #define S3C_CLKCON_HCLK_DDR0 (1<<23) | ||
98 | #define S3C_CLKCON_HCLK_MEM1 (1<<22) | ||
99 | #define S3C_CLKCON_HCLK_MEM0 (1<<21) | ||
100 | #define S3C_CLKCON_HCLK_USB (1<<20) | ||
101 | #define S3C_CLKCON_HCLK_HSMMC2 (1<<19) | ||
102 | #define S3C_CLKCON_HCLK_HSMMC1 (1<<18) | ||
103 | #define S3C_CLKCON_HCLK_HSMMC0 (1<<17) | ||
104 | #define S3C_CLKCON_HCLK_MDP (1<<16) | ||
105 | #define S3C_CLKCON_HCLK_DHOST (1<<15) | ||
106 | #define S3C_CLKCON_HCLK_IHOST (1<<14) | ||
107 | #define S3C_CLKCON_HCLK_DMA1 (1<<13) | ||
108 | #define S3C_CLKCON_HCLK_DMA0 (1<<12) | ||
109 | #define S3C_CLKCON_HCLK_JPEG (1<<11) | ||
110 | #define S3C_CLKCON_HCLK_CAMIF (1<<10) | ||
111 | #define S3C_CLKCON_HCLK_SCALER (1<<9) | ||
112 | #define S3C_CLKCON_HCLK_2D (1<<8) | ||
113 | #define S3C_CLKCON_HCLK_TV (1<<7) | ||
114 | #define S3C_CLKCON_HCLK_POST0 (1<<5) | ||
115 | #define S3C_CLKCON_HCLK_ROT (1<<4) | ||
116 | #define S3C_CLKCON_HCLK_LCD (1<<3) | ||
117 | #define S3C_CLKCON_HCLK_TZIC (1<<2) | ||
118 | #define S3C_CLKCON_HCLK_INTC (1<<1) | ||
119 | #define S3C_CLKCON_HCLK_MFC (1<<0) | ||
120 | |||
121 | /* PCLK GATE Registers */ | ||
122 | #define S3C6410_CLKCON_PCLK_I2C1 (1<<27) | ||
123 | #define S3C6410_CLKCON_PCLK_IIS2 (1<<26) | ||
124 | #define S3C_CLKCON_PCLK_SKEY (1<<24) | ||
125 | #define S3C_CLKCON_PCLK_CHIPID (1<<23) | ||
126 | #define S3C_CLKCON_PCLK_SPI1 (1<<22) | ||
127 | #define S3C_CLKCON_PCLK_SPI0 (1<<21) | ||
128 | #define S3C_CLKCON_PCLK_HSIRX (1<<20) | ||
129 | #define S3C_CLKCON_PCLK_HSITX (1<<19) | ||
130 | #define S3C_CLKCON_PCLK_GPIO (1<<18) | ||
131 | #define S3C_CLKCON_PCLK_IIC (1<<17) | ||
132 | #define S3C_CLKCON_PCLK_IIS1 (1<<16) | ||
133 | #define S3C_CLKCON_PCLK_IIS0 (1<<15) | ||
134 | #define S3C_CLKCON_PCLK_AC97 (1<<14) | ||
135 | #define S3C_CLKCON_PCLK_TZPC (1<<13) | ||
136 | #define S3C_CLKCON_PCLK_TSADC (1<<12) | ||
137 | #define S3C_CLKCON_PCLK_KEYPAD (1<<11) | ||
138 | #define S3C_CLKCON_PCLK_IRDA (1<<10) | ||
139 | #define S3C_CLKCON_PCLK_PCM1 (1<<9) | ||
140 | #define S3C_CLKCON_PCLK_PCM0 (1<<8) | ||
141 | #define S3C_CLKCON_PCLK_PWM (1<<7) | ||
142 | #define S3C_CLKCON_PCLK_RTC (1<<6) | ||
143 | #define S3C_CLKCON_PCLK_WDT (1<<5) | ||
144 | #define S3C_CLKCON_PCLK_UART3 (1<<4) | ||
145 | #define S3C_CLKCON_PCLK_UART2 (1<<3) | ||
146 | #define S3C_CLKCON_PCLK_UART1 (1<<2) | ||
147 | #define S3C_CLKCON_PCLK_UART0 (1<<1) | ||
148 | #define S3C_CLKCON_PCLK_MFC (1<<0) | ||
149 | |||
150 | /* SCLK GATE Registers */ | ||
151 | #define S3C_CLKCON_SCLK_UHOST (1<<30) | ||
152 | #define S3C_CLKCON_SCLK_MMC2_48 (1<<29) | ||
153 | #define S3C_CLKCON_SCLK_MMC1_48 (1<<28) | ||
154 | #define S3C_CLKCON_SCLK_MMC0_48 (1<<27) | ||
155 | #define S3C_CLKCON_SCLK_MMC2 (1<<26) | ||
156 | #define S3C_CLKCON_SCLK_MMC1 (1<<25) | ||
157 | #define S3C_CLKCON_SCLK_MMC0 (1<<24) | ||
158 | #define S3C_CLKCON_SCLK_SPI1_48 (1<<23) | ||
159 | #define S3C_CLKCON_SCLK_SPI0_48 (1<<22) | ||
160 | #define S3C_CLKCON_SCLK_SPI1 (1<<21) | ||
161 | #define S3C_CLKCON_SCLK_SPI0 (1<<20) | ||
162 | #define S3C_CLKCON_SCLK_DAC27 (1<<19) | ||
163 | #define S3C_CLKCON_SCLK_TV27 (1<<18) | ||
164 | #define S3C_CLKCON_SCLK_SCALER27 (1<<17) | ||
165 | #define S3C_CLKCON_SCLK_SCALER (1<<16) | ||
166 | #define S3C_CLKCON_SCLK_LCD27 (1<<15) | ||
167 | #define S3C_CLKCON_SCLK_LCD (1<<14) | ||
168 | #define S3C6400_CLKCON_SCLK_POST1_27 (1<<13) | ||
169 | #define S3C6410_CLKCON_FIMC (1<<13) | ||
170 | #define S3C_CLKCON_SCLK_POST0_27 (1<<12) | ||
171 | #define S3C6400_CLKCON_SCLK_POST1 (1<<11) | ||
172 | #define S3C6410_CLKCON_SCLK_AUDIO2 (1<<11) | ||
173 | #define S3C_CLKCON_SCLK_POST0 (1<<10) | ||
174 | #define S3C_CLKCON_SCLK_AUDIO1 (1<<9) | ||
175 | #define S3C_CLKCON_SCLK_AUDIO0 (1<<8) | ||
176 | #define S3C_CLKCON_SCLK_SECUR (1<<7) | ||
177 | #define S3C_CLKCON_SCLK_IRDA (1<<6) | ||
178 | #define S3C_CLKCON_SCLK_UART (1<<5) | ||
179 | #define S3C_CLKCON_SCLK_ONENAND (1<<4) | ||
180 | #define S3C_CLKCON_SCLK_MFC (1<<3) | ||
181 | #define S3C_CLKCON_SCLK_CAM (1<<2) | ||
182 | #define S3C_CLKCON_SCLK_JPEG (1<<1) | ||
183 | |||
184 | /* CLKSRC */ | ||
185 | |||
186 | #define S3C6400_CLKSRC_APLL_MOUT (1 << 0) | ||
187 | #define S3C6400_CLKSRC_MPLL_MOUT (1 << 1) | ||
188 | #define S3C6400_CLKSRC_EPLL_MOUT (1 << 2) | ||
189 | #define S3C6400_CLKSRC_APLL_MOUT_SHIFT (0) | ||
190 | #define S3C6400_CLKSRC_MPLL_MOUT_SHIFT (1) | ||
191 | #define S3C6400_CLKSRC_EPLL_MOUT_SHIFT (2) | ||
192 | #define S3C6400_CLKSRC_MFC (1 << 4) | ||
193 | |||
194 | #define S3C6410_CLKSRC_TV27_MASK (0x1 << 31) | ||
195 | #define S3C6410_CLKSRC_TV27_SHIFT (31) | ||
196 | #define S3C6410_CLKSRC_DAC27_MASK (0x1 << 30) | ||
197 | #define S3C6410_CLKSRC_DAC27_SHIFT (30) | ||
198 | #define S3C6400_CLKSRC_SCALER_MASK (0x3 << 28) | ||
199 | #define S3C6400_CLKSRC_SCALER_SHIFT (28) | ||
200 | #define S3C6400_CLKSRC_LCD_MASK (0x3 << 26) | ||
201 | #define S3C6400_CLKSRC_LCD_SHIFT (26) | ||
202 | #define S3C6400_CLKSRC_IRDA_MASK (0x3 << 24) | ||
203 | #define S3C6400_CLKSRC_IRDA_SHIFT (24) | ||
204 | #define S3C6400_CLKSRC_MMC2_MASK (0x3 << 22) | ||
205 | #define S3C6400_CLKSRC_MMC2_SHIFT (22) | ||
206 | #define S3C6400_CLKSRC_MMC1_MASK (0x3 << 20) | ||
207 | #define S3C6400_CLKSRC_MMC1_SHIFT (20) | ||
208 | #define S3C6400_CLKSRC_MMC0_MASK (0x3 << 18) | ||
209 | #define S3C6400_CLKSRC_MMC0_SHIFT (18) | ||
210 | #define S3C6400_CLKSRC_SPI1_MASK (0x3 << 16) | ||
211 | #define S3C6400_CLKSRC_SPI1_SHIFT (16) | ||
212 | #define S3C6400_CLKSRC_SPI0_MASK (0x3 << 14) | ||
213 | #define S3C6400_CLKSRC_SPI0_SHIFT (14) | ||
214 | #define S3C6400_CLKSRC_UART_MASK (0x1 << 13) | ||
215 | #define S3C6400_CLKSRC_UART_SHIFT (13) | ||
216 | #define S3C6400_CLKSRC_AUDIO1_MASK (0x7 << 10) | ||
217 | #define S3C6400_CLKSRC_AUDIO1_SHIFT (10) | ||
218 | #define S3C6400_CLKSRC_AUDIO0_MASK (0x7 << 7) | ||
219 | #define S3C6400_CLKSRC_AUDIO0_SHIFT (7) | ||
220 | #define S3C6400_CLKSRC_UHOST_MASK (0x3 << 5) | ||
221 | #define S3C6400_CLKSRC_UHOST_SHIFT (5) | ||
222 | |||
223 | |||
224 | #endif /* _PLAT_REGS_CLOCK_H */ | ||
diff --git a/arch/arm/plat-s3c64xx/include/plat/regs-gpio.h b/arch/arm/plat-s3c64xx/include/plat/regs-gpio.h new file mode 100644 index 000000000000..75b873d82808 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/regs-gpio.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/include/mach/regs-gpio.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX - GPIO register definitions | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_PLAT_S3C64XX_REGS_GPIO_H | ||
12 | #define __ASM_PLAT_S3C64XX_REGS_GPIO_H __FILE__ | ||
13 | |||
14 | /* Base addresses for each of the banks */ | ||
15 | |||
16 | #define S3C64XX_GPA_BASE (S3C64XX_VA_GPIO + 0x0000) | ||
17 | #define S3C64XX_GPB_BASE (S3C64XX_VA_GPIO + 0x0020) | ||
18 | #define S3C64XX_GPC_BASE (S3C64XX_VA_GPIO + 0x0040) | ||
19 | #define S3C64XX_GPD_BASE (S3C64XX_VA_GPIO + 0x0060) | ||
20 | #define S3C64XX_GPE_BASE (S3C64XX_VA_GPIO + 0x0080) | ||
21 | #define S3C64XX_GPF_BASE (S3C64XX_VA_GPIO + 0x00A0) | ||
22 | #define S3C64XX_GPG_BASE (S3C64XX_VA_GPIO + 0x00C0) | ||
23 | #define S3C64XX_GPH_BASE (S3C64XX_VA_GPIO + 0x00E0) | ||
24 | #define S3C64XX_GPI_BASE (S3C64XX_VA_GPIO + 0x0100) | ||
25 | #define S3C64XX_GPJ_BASE (S3C64XX_VA_GPIO + 0x0120) | ||
26 | #define S3C64XX_GPK_BASE (S3C64XX_VA_GPIO + 0x0800) | ||
27 | #define S3C64XX_GPL_BASE (S3C64XX_VA_GPIO + 0x0810) | ||
28 | #define S3C64XX_GPM_BASE (S3C64XX_VA_GPIO + 0x0820) | ||
29 | #define S3C64XX_GPN_BASE (S3C64XX_VA_GPIO + 0x0830) | ||
30 | #define S3C64XX_GPO_BASE (S3C64XX_VA_GPIO + 0x0140) | ||
31 | #define S3C64XX_GPP_BASE (S3C64XX_VA_GPIO + 0x0160) | ||
32 | #define S3C64XX_GPQ_BASE (S3C64XX_VA_GPIO + 0x0180) | ||
33 | |||
34 | #endif /* __ASM_PLAT_S3C64XX_REGS_GPIO_H */ | ||
35 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/regs-sys.h b/arch/arm/plat-s3c64xx/include/plat/regs-sys.h new file mode 100644 index 000000000000..d8ed82917096 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/regs-sys.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* arch/arm/plat-s3c64xx/include/plat/regs-sys.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX system register definitions | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __PLAT_REGS_SYS_H | ||
16 | #define __PLAT_REGS_SYS_H __FILE__ | ||
17 | |||
18 | #define S3C_SYSREG(x) (S3C_VA_SYS + (x)) | ||
19 | |||
20 | #define S3C64XX_OTHERS S3C_SYSREG(0x900) | ||
21 | |||
22 | #define S3C64XX_OTHERS_USBMASK (1 << 16) | ||
23 | |||
24 | #endif /* _PLAT_REGS_SYS_H */ | ||
diff --git a/arch/arm/plat-s3c64xx/include/plat/s3c6400.h b/arch/arm/plat-s3c64xx/include/plat/s3c6400.h new file mode 100644 index 000000000000..571eaa2e54f1 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/s3c6400.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* arch/arm/plat-s3c64xx/include/plat/s3c6400.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * Header file for s3c6400 cpu support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | /* Common init code for S3C6400 related SoCs */ | ||
16 | |||
17 | extern void s3c6400_common_init_uarts(struct s3c2410_uartcfg *cfg, int no); | ||
18 | extern void s3c6400_register_clocks(void); | ||
19 | extern void s3c6400_setup_clocks(void); | ||
20 | |||
21 | #ifdef CONFIG_CPU_S3C6400 | ||
22 | |||
23 | extern int s3c6400_init(void); | ||
24 | extern void s3c6400_map_io(void); | ||
25 | extern void s3c6400_init_clocks(int xtal); | ||
26 | |||
27 | #define s3c6400_init_uarts s3c6400_common_init_uarts | ||
28 | |||
29 | #else | ||
30 | #define s3c6400_init_clocks NULL | ||
31 | #define s3c6400_init_uarts NULL | ||
32 | #define s3c6400_map_io NULL | ||
33 | #define s3c6400_init NULL | ||
34 | #endif | ||
35 | |||
diff --git a/arch/arm/plat-s3c64xx/include/plat/s3c6410.h b/arch/arm/plat-s3c64xx/include/plat/s3c6410.h new file mode 100644 index 000000000000..50dcdd6f6800 --- /dev/null +++ b/arch/arm/plat-s3c64xx/include/plat/s3c6410.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* arch/arm/plat-s3c64xx/include/plat/s3c6410.h | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * Header file for s3c6410 cpu support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifdef CONFIG_CPU_S3C6410 | ||
16 | |||
17 | extern int s3c6410_init(void); | ||
18 | extern void s3c6410_init_irq(void); | ||
19 | extern void s3c6410_map_io(void); | ||
20 | extern void s3c6410_init_clocks(int xtal); | ||
21 | |||
22 | #define s3c6410_init_uarts s3c6400_common_init_uarts | ||
23 | |||
24 | #else | ||
25 | #define s3c6410_init_clocks NULL | ||
26 | #define s3c6410_init_uarts NULL | ||
27 | #define s3c6410_map_io NULL | ||
28 | #define s3c6410_init NULL | ||
29 | #endif | ||
diff --git a/arch/arm/plat-s3c64xx/irq-eint.c b/arch/arm/plat-s3c64xx/irq-eint.c new file mode 100644 index 000000000000..1f7cc0067f5c --- /dev/null +++ b/arch/arm/plat-s3c64xx/irq-eint.c | |||
@@ -0,0 +1,202 @@ | |||
1 | /* arch/arm/plat-s3c64xx/irq-eint.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX - Interrupt handling for IRQ_EINT(x) | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/irq.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include <asm/hardware/vic.h> | ||
21 | |||
22 | #include <plat/regs-irqtype.h> | ||
23 | |||
24 | #include <mach/map.h> | ||
25 | #include <plat/cpu.h> | ||
26 | |||
27 | /* GPIO is 0x7F008xxx, */ | ||
28 | #define S3C64XX_GPIOREG(x) (S3C64XX_VA_GPIO + (x)) | ||
29 | |||
30 | #define S3C64XX_EINT0CON0 S3C64XX_GPIOREG(0x900) | ||
31 | #define S3C64XX_EINT0CON1 S3C64XX_GPIOREG(0x904) | ||
32 | #define S3C64XX_EINT0FLTCON0 S3C64XX_GPIOREG(0x910) | ||
33 | #define S3C64XX_EINT0FLTCON1 S3C64XX_GPIOREG(0x914) | ||
34 | #define S3C64XX_EINT0FLTCON2 S3C64XX_GPIOREG(0x918) | ||
35 | #define S3C64XX_EINT0FLTCON3 S3C64XX_GPIOREG(0x91C) | ||
36 | |||
37 | #define S3C64XX_EINT0MASK S3C64XX_GPIOREG(0x920) | ||
38 | #define S3C64XX_EINT0PEND S3C64XX_GPIOREG(0x924) | ||
39 | |||
40 | |||
41 | #define eint_offset(irq) ((irq) - IRQ_EINT(0)) | ||
42 | #define eint_irq_to_bit(irq) (1 << eint_offset(irq)) | ||
43 | |||
44 | static inline void s3c_irq_eint_mask(unsigned int irq) | ||
45 | { | ||
46 | u32 mask; | ||
47 | |||
48 | mask = __raw_readl(S3C64XX_EINT0MASK); | ||
49 | mask |= eint_irq_to_bit(irq); | ||
50 | __raw_writel(mask, S3C64XX_EINT0MASK); | ||
51 | } | ||
52 | |||
53 | static void s3c_irq_eint_unmask(unsigned int irq) | ||
54 | { | ||
55 | u32 mask; | ||
56 | |||
57 | mask = __raw_readl(S3C64XX_EINT0MASK); | ||
58 | mask |= eint_irq_to_bit(irq); | ||
59 | __raw_writel(mask, S3C64XX_EINT0MASK); | ||
60 | } | ||
61 | |||
62 | static inline void s3c_irq_eint_ack(unsigned int irq) | ||
63 | { | ||
64 | __raw_writel(eint_irq_to_bit(irq), S3C64XX_EINT0PEND); | ||
65 | } | ||
66 | |||
67 | static void s3c_irq_eint_maskack(unsigned int irq) | ||
68 | { | ||
69 | /* compiler should in-line these */ | ||
70 | s3c_irq_eint_mask(irq); | ||
71 | s3c_irq_eint_ack(irq); | ||
72 | } | ||
73 | |||
74 | static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type) | ||
75 | { | ||
76 | int offs = eint_offset(irq); | ||
77 | int shift; | ||
78 | u32 ctrl, mask; | ||
79 | u32 newvalue = 0; | ||
80 | void __iomem *reg; | ||
81 | |||
82 | if (offs > 27) | ||
83 | return -EINVAL; | ||
84 | |||
85 | if (offs <= 15) | ||
86 | reg = S3C64XX_EINT0CON0; | ||
87 | else | ||
88 | reg = S3C64XX_EINT0CON1; | ||
89 | |||
90 | switch (type) { | ||
91 | case IRQ_TYPE_NONE: | ||
92 | printk(KERN_WARNING "No edge setting!\n"); | ||
93 | break; | ||
94 | |||
95 | case IRQ_TYPE_EDGE_RISING: | ||
96 | newvalue = S3C2410_EXTINT_RISEEDGE; | ||
97 | break; | ||
98 | |||
99 | case IRQ_TYPE_EDGE_FALLING: | ||
100 | newvalue = S3C2410_EXTINT_FALLEDGE; | ||
101 | break; | ||
102 | |||
103 | case IRQ_TYPE_EDGE_BOTH: | ||
104 | newvalue = S3C2410_EXTINT_BOTHEDGE; | ||
105 | break; | ||
106 | |||
107 | case IRQ_TYPE_LEVEL_LOW: | ||
108 | newvalue = S3C2410_EXTINT_LOWLEV; | ||
109 | break; | ||
110 | |||
111 | case IRQ_TYPE_LEVEL_HIGH: | ||
112 | newvalue = S3C2410_EXTINT_HILEV; | ||
113 | break; | ||
114 | |||
115 | default: | ||
116 | printk(KERN_ERR "No such irq type %d", type); | ||
117 | return -1; | ||
118 | } | ||
119 | |||
120 | shift = (offs / 2) * 4; | ||
121 | mask = 0x7 << shift; | ||
122 | |||
123 | ctrl = __raw_readl(reg); | ||
124 | ctrl &= ~mask; | ||
125 | ctrl |= newvalue << shift; | ||
126 | __raw_writel(ctrl, reg); | ||
127 | |||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | static struct irq_chip s3c_irq_eint = { | ||
132 | .name = "s3c-eint", | ||
133 | .mask = s3c_irq_eint_mask, | ||
134 | .unmask = s3c_irq_eint_unmask, | ||
135 | .mask_ack = s3c_irq_eint_maskack, | ||
136 | .ack = s3c_irq_eint_ack, | ||
137 | .set_type = s3c_irq_eint_set_type, | ||
138 | }; | ||
139 | |||
140 | /* s3c_irq_demux_eint | ||
141 | * | ||
142 | * This function demuxes the IRQ from the group0 external interrupts, | ||
143 | * from IRQ_EINT(0) to IRQ_EINT(27). It is designed to be inlined into | ||
144 | * the specific handlers s3c_irq_demux_eintX_Y. | ||
145 | */ | ||
146 | static inline void s3c_irq_demux_eint(unsigned int start, unsigned int end) | ||
147 | { | ||
148 | u32 status = __raw_readl(S3C64XX_EINT0PEND); | ||
149 | u32 mask = __raw_readl(S3C64XX_EINT0MASK); | ||
150 | unsigned int irq; | ||
151 | |||
152 | status &= ~mask; | ||
153 | status >>= start; | ||
154 | status &= (1 << (end - start + 1)) - 1; | ||
155 | |||
156 | for (irq = IRQ_EINT(start); irq <= IRQ_EINT(end); irq++) { | ||
157 | if (status & 1) | ||
158 | generic_handle_irq(irq); | ||
159 | |||
160 | status >>= 1; | ||
161 | } | ||
162 | } | ||
163 | |||
164 | static void s3c_irq_demux_eint0_3(unsigned int irq, struct irq_desc *desc) | ||
165 | { | ||
166 | s3c_irq_demux_eint(0, 3); | ||
167 | } | ||
168 | |||
169 | static void s3c_irq_demux_eint4_11(unsigned int irq, struct irq_desc *desc) | ||
170 | { | ||
171 | s3c_irq_demux_eint(4, 11); | ||
172 | } | ||
173 | |||
174 | static void s3c_irq_demux_eint12_19(unsigned int irq, struct irq_desc *desc) | ||
175 | { | ||
176 | s3c_irq_demux_eint(12, 19); | ||
177 | } | ||
178 | |||
179 | static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc) | ||
180 | { | ||
181 | s3c_irq_demux_eint(20, 27); | ||
182 | } | ||
183 | |||
184 | int __init s3c64xx_init_irq_eint(void) | ||
185 | { | ||
186 | int irq; | ||
187 | |||
188 | for (irq = IRQ_EINT(0); irq <= IRQ_EINT(27); irq++) { | ||
189 | set_irq_chip(irq, &s3c_irq_eint); | ||
190 | set_irq_handler(irq, handle_level_irq); | ||
191 | set_irq_flags(irq, IRQF_VALID); | ||
192 | } | ||
193 | |||
194 | set_irq_chained_handler(IRQ_EINT0_3, s3c_irq_demux_eint0_3); | ||
195 | set_irq_chained_handler(IRQ_EINT4_11, s3c_irq_demux_eint4_11); | ||
196 | set_irq_chained_handler(IRQ_EINT12_19, s3c_irq_demux_eint12_19); | ||
197 | set_irq_chained_handler(IRQ_EINT20_27, s3c_irq_demux_eint20_27); | ||
198 | |||
199 | return 0; | ||
200 | } | ||
201 | |||
202 | arch_initcall(s3c64xx_init_irq_eint); | ||
diff --git a/arch/arm/plat-s3c64xx/irq.c b/arch/arm/plat-s3c64xx/irq.c new file mode 100644 index 000000000000..a94f1d5e819d --- /dev/null +++ b/arch/arm/plat-s3c64xx/irq.c | |||
@@ -0,0 +1,257 @@ | |||
1 | /* arch/arm/plat-s3c64xx/irq.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C64XX - Interrupt handling | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/irq.h> | ||
18 | #include <linux/io.h> | ||
19 | |||
20 | #include <asm/hardware/vic.h> | ||
21 | |||
22 | #include <mach/map.h> | ||
23 | #include <plat/regs-timer.h> | ||
24 | #include <plat/cpu.h> | ||
25 | |||
26 | /* Timer interrupt handling */ | ||
27 | |||
28 | static void s3c_irq_demux_timer(unsigned int base_irq, unsigned int sub_irq) | ||
29 | { | ||
30 | generic_handle_irq(sub_irq); | ||
31 | } | ||
32 | |||
33 | static void s3c_irq_demux_timer0(unsigned int irq, struct irq_desc *desc) | ||
34 | { | ||
35 | s3c_irq_demux_timer(irq, IRQ_TIMER0); | ||
36 | } | ||
37 | |||
38 | static void s3c_irq_demux_timer1(unsigned int irq, struct irq_desc *desc) | ||
39 | { | ||
40 | s3c_irq_demux_timer(irq, IRQ_TIMER1); | ||
41 | } | ||
42 | |||
43 | static void s3c_irq_demux_timer2(unsigned int irq, struct irq_desc *desc) | ||
44 | { | ||
45 | s3c_irq_demux_timer(irq, IRQ_TIMER2); | ||
46 | } | ||
47 | |||
48 | static void s3c_irq_demux_timer3(unsigned int irq, struct irq_desc *desc) | ||
49 | { | ||
50 | s3c_irq_demux_timer(irq, IRQ_TIMER3); | ||
51 | } | ||
52 | |||
53 | static void s3c_irq_demux_timer4(unsigned int irq, struct irq_desc *desc) | ||
54 | { | ||
55 | s3c_irq_demux_timer(irq, IRQ_TIMER4); | ||
56 | } | ||
57 | |||
58 | /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ | ||
59 | |||
60 | static void s3c_irq_timer_mask(unsigned int irq) | ||
61 | { | ||
62 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); | ||
63 | |||
64 | reg &= 0x1f; /* mask out pending interrupts */ | ||
65 | reg &= ~(1 << (irq - IRQ_TIMER0)); | ||
66 | __raw_writel(reg, S3C64XX_TINT_CSTAT); | ||
67 | } | ||
68 | |||
69 | static void s3c_irq_timer_unmask(unsigned int irq) | ||
70 | { | ||
71 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); | ||
72 | |||
73 | reg &= 0x1f; /* mask out pending interrupts */ | ||
74 | reg |= 1 << (irq - IRQ_TIMER0); | ||
75 | __raw_writel(reg, S3C64XX_TINT_CSTAT); | ||
76 | } | ||
77 | |||
78 | static void s3c_irq_timer_ack(unsigned int irq) | ||
79 | { | ||
80 | u32 reg = __raw_readl(S3C64XX_TINT_CSTAT); | ||
81 | |||
82 | reg &= 0x1f; | ||
83 | reg |= (1 << 5) << (irq - IRQ_TIMER0); | ||
84 | __raw_writel(reg, S3C64XX_TINT_CSTAT); | ||
85 | } | ||
86 | |||
87 | static struct irq_chip s3c_irq_timer = { | ||
88 | .name = "s3c-timer", | ||
89 | .mask = s3c_irq_timer_mask, | ||
90 | .unmask = s3c_irq_timer_unmask, | ||
91 | .ack = s3c_irq_timer_ack, | ||
92 | }; | ||
93 | |||
94 | struct uart_irq { | ||
95 | void __iomem *regs; | ||
96 | unsigned int base_irq; | ||
97 | unsigned int parent_irq; | ||
98 | }; | ||
99 | |||
100 | /* Note, we make use of the fact that the parent IRQs, IRQ_UART[0..3] | ||
101 | * are consecutive when looking up the interrupt in the demux routines. | ||
102 | */ | ||
103 | static struct uart_irq uart_irqs[] = { | ||
104 | [0] = { | ||
105 | .regs = S3C_VA_UART0, | ||
106 | .base_irq = IRQ_S3CUART_BASE0, | ||
107 | .parent_irq = IRQ_UART0, | ||
108 | }, | ||
109 | [1] = { | ||
110 | .regs = S3C_VA_UART1, | ||
111 | .base_irq = IRQ_S3CUART_BASE1, | ||
112 | .parent_irq = IRQ_UART1, | ||
113 | }, | ||
114 | [2] = { | ||
115 | .regs = S3C_VA_UART2, | ||
116 | .base_irq = IRQ_S3CUART_BASE2, | ||
117 | .parent_irq = IRQ_UART2, | ||
118 | }, | ||
119 | [3] = { | ||
120 | .regs = S3C_VA_UART3, | ||
121 | .base_irq = IRQ_S3CUART_BASE3, | ||
122 | .parent_irq = IRQ_UART3, | ||
123 | }, | ||
124 | }; | ||
125 | |||
126 | static inline void __iomem *s3c_irq_uart_base(unsigned int irq) | ||
127 | { | ||
128 | struct uart_irq *uirq = get_irq_chip_data(irq); | ||
129 | return uirq->regs; | ||
130 | } | ||
131 | |||
132 | static inline unsigned int s3c_irq_uart_bit(unsigned int irq) | ||
133 | { | ||
134 | return irq & 3; | ||
135 | } | ||
136 | |||
137 | /* UART interrupt registers, not worth adding to seperate include header */ | ||
138 | #define S3C64XX_UINTP 0x30 | ||
139 | #define S3C64XX_UINTSP 0x34 | ||
140 | #define S3C64XX_UINTM 0x38 | ||
141 | |||
142 | static void s3c_irq_uart_mask(unsigned int irq) | ||
143 | { | ||
144 | void __iomem *regs = s3c_irq_uart_base(irq); | ||
145 | unsigned int bit = s3c_irq_uart_bit(irq); | ||
146 | u32 reg; | ||
147 | |||
148 | reg = __raw_readl(regs + S3C64XX_UINTM); | ||
149 | reg |= (1 << bit); | ||
150 | __raw_writel(reg, regs + S3C64XX_UINTM); | ||
151 | } | ||
152 | |||
153 | static void s3c_irq_uart_maskack(unsigned int irq) | ||
154 | { | ||
155 | void __iomem *regs = s3c_irq_uart_base(irq); | ||
156 | unsigned int bit = s3c_irq_uart_bit(irq); | ||
157 | u32 reg; | ||
158 | |||
159 | reg = __raw_readl(regs + S3C64XX_UINTM); | ||
160 | reg |= (1 << bit); | ||
161 | __raw_writel(reg, regs + S3C64XX_UINTM); | ||
162 | __raw_writel(1 << bit, regs + S3C64XX_UINTP); | ||
163 | } | ||
164 | |||
165 | static void s3c_irq_uart_unmask(unsigned int irq) | ||
166 | { | ||
167 | void __iomem *regs = s3c_irq_uart_base(irq); | ||
168 | unsigned int bit = s3c_irq_uart_bit(irq); | ||
169 | u32 reg; | ||
170 | |||
171 | reg = __raw_readl(regs + S3C64XX_UINTM); | ||
172 | reg &= ~(1 << bit); | ||
173 | __raw_writel(reg, regs + S3C64XX_UINTM); | ||
174 | } | ||
175 | |||
176 | static void s3c_irq_uart_ack(unsigned int irq) | ||
177 | { | ||
178 | void __iomem *regs = s3c_irq_uart_base(irq); | ||
179 | unsigned int bit = s3c_irq_uart_bit(irq); | ||
180 | |||
181 | __raw_writel(1 << bit, regs + S3C64XX_UINTP); | ||
182 | } | ||
183 | |||
184 | static void s3c_irq_demux_uart(unsigned int irq, struct irq_desc *desc) | ||
185 | { | ||
186 | struct uart_irq *uirq = &uart_irqs[irq - IRQ_UART0]; | ||
187 | u32 pend = __raw_readl(uirq->regs + S3C64XX_UINTP); | ||
188 | int base = uirq->base_irq; | ||
189 | |||
190 | if (pend & (1 << 0)) | ||
191 | generic_handle_irq(base); | ||
192 | if (pend & (1 << 1)) | ||
193 | generic_handle_irq(base + 1); | ||
194 | if (pend & (1 << 2)) | ||
195 | generic_handle_irq(base + 2); | ||
196 | if (pend & (1 << 3)) | ||
197 | generic_handle_irq(base + 3); | ||
198 | } | ||
199 | |||
200 | static struct irq_chip s3c_irq_uart = { | ||
201 | .name = "s3c-uart", | ||
202 | .mask = s3c_irq_uart_mask, | ||
203 | .unmask = s3c_irq_uart_unmask, | ||
204 | .mask_ack = s3c_irq_uart_maskack, | ||
205 | .ack = s3c_irq_uart_ack, | ||
206 | }; | ||
207 | |||
208 | static void __init s3c64xx_uart_irq(struct uart_irq *uirq) | ||
209 | { | ||
210 | void *reg_base = uirq->regs; | ||
211 | unsigned int irq; | ||
212 | int offs; | ||
213 | |||
214 | /* mask all interrupts at the start. */ | ||
215 | __raw_writel(0xf, reg_base + S3C64XX_UINTM); | ||
216 | |||
217 | for (offs = 0; offs < 3; offs++) { | ||
218 | irq = uirq->base_irq + offs; | ||
219 | |||
220 | set_irq_chip(irq, &s3c_irq_uart); | ||
221 | set_irq_chip_data(irq, uirq); | ||
222 | set_irq_handler(irq, handle_level_irq); | ||
223 | set_irq_flags(irq, IRQF_VALID); | ||
224 | } | ||
225 | |||
226 | set_irq_chained_handler(uirq->parent_irq, s3c_irq_demux_uart); | ||
227 | } | ||
228 | |||
229 | void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid) | ||
230 | { | ||
231 | int uart, irq; | ||
232 | |||
233 | printk(KERN_DEBUG "%s: initialising interrupts\n", __func__); | ||
234 | |||
235 | /* initialise the pair of VICs */ | ||
236 | vic_init(S3C_VA_VIC0, S3C_VIC0_BASE, vic0_valid); | ||
237 | vic_init(S3C_VA_VIC1, S3C_VIC1_BASE, vic1_valid); | ||
238 | |||
239 | /* add the timer sub-irqs */ | ||
240 | |||
241 | set_irq_chained_handler(IRQ_TIMER0_VIC, s3c_irq_demux_timer0); | ||
242 | set_irq_chained_handler(IRQ_TIMER1_VIC, s3c_irq_demux_timer1); | ||
243 | set_irq_chained_handler(IRQ_TIMER2_VIC, s3c_irq_demux_timer2); | ||
244 | set_irq_chained_handler(IRQ_TIMER3_VIC, s3c_irq_demux_timer3); | ||
245 | set_irq_chained_handler(IRQ_TIMER4_VIC, s3c_irq_demux_timer4); | ||
246 | |||
247 | for (irq = IRQ_TIMER0; irq <= IRQ_TIMER4; irq++) { | ||
248 | set_irq_chip(irq, &s3c_irq_timer); | ||
249 | set_irq_handler(irq, handle_level_irq); | ||
250 | set_irq_flags(irq, IRQF_VALID); | ||
251 | } | ||
252 | |||
253 | for (uart = 0; uart < ARRAY_SIZE(uart_irqs); uart++) | ||
254 | s3c64xx_uart_irq(&uart_irqs[uart]); | ||
255 | } | ||
256 | |||
257 | |||
diff --git a/arch/arm/plat-s3c64xx/s3c6400-clock.c b/arch/arm/plat-s3c64xx/s3c6400-clock.c new file mode 100644 index 000000000000..8d9a0cada668 --- /dev/null +++ b/arch/arm/plat-s3c64xx/s3c6400-clock.c | |||
@@ -0,0 +1,655 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/s3c6400-clock.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C6400 based common clock support | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/init.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/list.h> | ||
19 | #include <linux/errno.h> | ||
20 | #include <linux/err.h> | ||
21 | #include <linux/clk.h> | ||
22 | #include <linux/sysdev.h> | ||
23 | #include <linux/io.h> | ||
24 | |||
25 | #include <mach/hardware.h> | ||
26 | #include <mach/map.h> | ||
27 | |||
28 | #include <plat/cpu-freq.h> | ||
29 | |||
30 | #include <plat/regs-clock.h> | ||
31 | #include <plat/clock.h> | ||
32 | #include <plat/cpu.h> | ||
33 | #include <plat/pll.h> | ||
34 | |||
35 | /* fin_apll, fin_mpll and fin_epll are all the same clock, which we call | ||
36 | * ext_xtal_mux for want of an actual name from the manual. | ||
37 | */ | ||
38 | |||
39 | struct clk clk_ext_xtal_mux = { | ||
40 | .name = "ext_xtal", | ||
41 | .id = -1, | ||
42 | }; | ||
43 | |||
44 | #define clk_fin_apll clk_ext_xtal_mux | ||
45 | #define clk_fin_mpll clk_ext_xtal_mux | ||
46 | #define clk_fin_epll clk_ext_xtal_mux | ||
47 | |||
48 | #define clk_fout_mpll clk_mpll | ||
49 | |||
50 | struct clk_sources { | ||
51 | unsigned int nr_sources; | ||
52 | struct clk **sources; | ||
53 | }; | ||
54 | |||
55 | struct clksrc_clk { | ||
56 | struct clk clk; | ||
57 | unsigned int mask; | ||
58 | unsigned int shift; | ||
59 | |||
60 | struct clk_sources *sources; | ||
61 | |||
62 | unsigned int divider_shift; | ||
63 | void __iomem *reg_divider; | ||
64 | }; | ||
65 | |||
66 | struct clk clk_fout_apll = { | ||
67 | .name = "fout_apll", | ||
68 | .id = -1, | ||
69 | }; | ||
70 | |||
71 | static struct clk *clk_src_apll_list[] = { | ||
72 | [0] = &clk_fin_apll, | ||
73 | [1] = &clk_fout_apll, | ||
74 | }; | ||
75 | |||
76 | static struct clk_sources clk_src_apll = { | ||
77 | .sources = clk_src_apll_list, | ||
78 | .nr_sources = ARRAY_SIZE(clk_src_apll_list), | ||
79 | }; | ||
80 | |||
81 | struct clksrc_clk clk_mout_apll = { | ||
82 | .clk = { | ||
83 | .name = "mout_apll", | ||
84 | .id = -1, | ||
85 | }, | ||
86 | .shift = S3C6400_CLKSRC_APLL_MOUT_SHIFT, | ||
87 | .mask = S3C6400_CLKSRC_APLL_MOUT, | ||
88 | .sources = &clk_src_apll, | ||
89 | }; | ||
90 | |||
91 | struct clk clk_fout_epll = { | ||
92 | .name = "fout_epll", | ||
93 | .id = -1, | ||
94 | }; | ||
95 | |||
96 | static struct clk *clk_src_epll_list[] = { | ||
97 | [0] = &clk_fin_epll, | ||
98 | [1] = &clk_fout_epll, | ||
99 | }; | ||
100 | |||
101 | static struct clk_sources clk_src_epll = { | ||
102 | .sources = clk_src_epll_list, | ||
103 | .nr_sources = ARRAY_SIZE(clk_src_epll_list), | ||
104 | }; | ||
105 | |||
106 | struct clksrc_clk clk_mout_epll = { | ||
107 | .clk = { | ||
108 | .name = "mout_epll", | ||
109 | .id = -1, | ||
110 | }, | ||
111 | .shift = S3C6400_CLKSRC_EPLL_MOUT_SHIFT, | ||
112 | .mask = S3C6400_CLKSRC_EPLL_MOUT, | ||
113 | .sources = &clk_src_epll, | ||
114 | }; | ||
115 | |||
116 | static struct clk *clk_src_mpll_list[] = { | ||
117 | [0] = &clk_fin_mpll, | ||
118 | [1] = &clk_fout_mpll, | ||
119 | }; | ||
120 | |||
121 | static struct clk_sources clk_src_mpll = { | ||
122 | .sources = clk_src_mpll_list, | ||
123 | .nr_sources = ARRAY_SIZE(clk_src_mpll_list), | ||
124 | }; | ||
125 | |||
126 | struct clksrc_clk clk_mout_mpll = { | ||
127 | .clk = { | ||
128 | .name = "mout_mpll", | ||
129 | .id = -1, | ||
130 | }, | ||
131 | .shift = S3C6400_CLKSRC_MPLL_MOUT_SHIFT, | ||
132 | .mask = S3C6400_CLKSRC_MPLL_MOUT, | ||
133 | .sources = &clk_src_mpll, | ||
134 | }; | ||
135 | |||
136 | static unsigned long s3c64xx_clk_doutmpll_get_rate(struct clk *clk) | ||
137 | { | ||
138 | unsigned long rate = clk_get_rate(clk->parent); | ||
139 | |||
140 | printk(KERN_DEBUG "%s: parent is %ld\n", __func__, rate); | ||
141 | |||
142 | if (__raw_readl(S3C_CLK_DIV0) & S3C6400_CLKDIV0_MPLL_MASK) | ||
143 | rate /= 2; | ||
144 | |||
145 | return rate; | ||
146 | } | ||
147 | |||
148 | struct clk clk_dout_mpll = { | ||
149 | .name = "dout_mpll", | ||
150 | .id = -1, | ||
151 | .parent = &clk_mout_mpll.clk, | ||
152 | .get_rate = s3c64xx_clk_doutmpll_get_rate, | ||
153 | }; | ||
154 | |||
155 | static struct clk *clkset_spi_mmc_list[] = { | ||
156 | &clk_mout_epll.clk, | ||
157 | &clk_dout_mpll, | ||
158 | &clk_fin_epll, | ||
159 | &clk_27m, | ||
160 | }; | ||
161 | |||
162 | static struct clk_sources clkset_spi_mmc = { | ||
163 | .sources = clkset_spi_mmc_list, | ||
164 | .nr_sources = ARRAY_SIZE(clkset_spi_mmc_list), | ||
165 | }; | ||
166 | |||
167 | static struct clk *clkset_irda_list[] = { | ||
168 | &clk_mout_epll.clk, | ||
169 | &clk_dout_mpll, | ||
170 | NULL, | ||
171 | &clk_27m, | ||
172 | }; | ||
173 | |||
174 | static struct clk_sources clkset_irda = { | ||
175 | .sources = clkset_irda_list, | ||
176 | .nr_sources = ARRAY_SIZE(clkset_irda_list), | ||
177 | }; | ||
178 | |||
179 | static struct clk *clkset_uart_list[] = { | ||
180 | &clk_mout_epll.clk, | ||
181 | &clk_dout_mpll, | ||
182 | NULL, | ||
183 | NULL | ||
184 | }; | ||
185 | |||
186 | static struct clk_sources clkset_uart = { | ||
187 | .sources = clkset_uart_list, | ||
188 | .nr_sources = ARRAY_SIZE(clkset_uart_list), | ||
189 | }; | ||
190 | |||
191 | static struct clk *clkset_uhost_list[] = { | ||
192 | &clk_mout_epll.clk, | ||
193 | &clk_dout_mpll, | ||
194 | &clk_fin_epll, | ||
195 | &clk_48m, | ||
196 | }; | ||
197 | |||
198 | static struct clk_sources clkset_uhost = { | ||
199 | .sources = clkset_uhost_list, | ||
200 | .nr_sources = ARRAY_SIZE(clkset_uhost_list), | ||
201 | }; | ||
202 | |||
203 | |||
204 | /* The peripheral clocks are all controlled via clocksource followed | ||
205 | * by an optional divider and gate stage. We currently roll this into | ||
206 | * one clock which hides the intermediate clock from the mux. | ||
207 | * | ||
208 | * Note, the JPEG clock can only be an even divider... | ||
209 | * | ||
210 | * The scaler and LCD clocks depend on the S3C64XX version, and also | ||
211 | * have a common parent divisor so are not included here. | ||
212 | */ | ||
213 | |||
214 | static inline struct clksrc_clk *to_clksrc(struct clk *clk) | ||
215 | { | ||
216 | return container_of(clk, struct clksrc_clk, clk); | ||
217 | } | ||
218 | |||
219 | static unsigned long s3c64xx_getrate_clksrc(struct clk *clk) | ||
220 | { | ||
221 | struct clksrc_clk *sclk = to_clksrc(clk); | ||
222 | unsigned long rate = clk_get_rate(clk->parent); | ||
223 | u32 clkdiv = __raw_readl(sclk->reg_divider); | ||
224 | |||
225 | clkdiv >>= sclk->divider_shift; | ||
226 | clkdiv &= 0xf; | ||
227 | clkdiv++; | ||
228 | |||
229 | rate /= clkdiv; | ||
230 | return rate; | ||
231 | } | ||
232 | |||
233 | static int s3c64xx_setrate_clksrc(struct clk *clk, unsigned long rate) | ||
234 | { | ||
235 | struct clksrc_clk *sclk = to_clksrc(clk); | ||
236 | void __iomem *reg = sclk->reg_divider; | ||
237 | unsigned int div; | ||
238 | u32 val; | ||
239 | |||
240 | rate = clk_round_rate(clk, rate); | ||
241 | div = clk_get_rate(clk->parent) / rate; | ||
242 | |||
243 | val = __raw_readl(reg); | ||
244 | val &= ~sclk->mask; | ||
245 | val |= (rate - 1) << sclk->shift; | ||
246 | __raw_writel(val, reg); | ||
247 | |||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static int s3c64xx_setparent_clksrc(struct clk *clk, struct clk *parent) | ||
252 | { | ||
253 | struct clksrc_clk *sclk = to_clksrc(clk); | ||
254 | struct clk_sources *srcs = sclk->sources; | ||
255 | u32 clksrc = __raw_readl(S3C_CLK_SRC); | ||
256 | int src_nr = -1; | ||
257 | int ptr; | ||
258 | |||
259 | for (ptr = 0; ptr < srcs->nr_sources; ptr++) | ||
260 | if (srcs->sources[ptr] == parent) { | ||
261 | src_nr = ptr; | ||
262 | break; | ||
263 | } | ||
264 | |||
265 | if (src_nr >= 0) { | ||
266 | clksrc &= ~sclk->mask; | ||
267 | clksrc |= src_nr << sclk->shift; | ||
268 | |||
269 | __raw_writel(clksrc, S3C_CLK_SRC); | ||
270 | return 0; | ||
271 | } | ||
272 | |||
273 | return -EINVAL; | ||
274 | } | ||
275 | |||
276 | static unsigned long s3c64xx_roundrate_clksrc(struct clk *clk, | ||
277 | unsigned long rate) | ||
278 | { | ||
279 | unsigned long parent_rate = clk_get_rate(clk->parent); | ||
280 | int div; | ||
281 | |||
282 | if (rate > parent_rate) | ||
283 | rate = parent_rate; | ||
284 | else { | ||
285 | div = rate / parent_rate; | ||
286 | |||
287 | if (div == 0) | ||
288 | div = 1; | ||
289 | if (div > 16) | ||
290 | div = 16; | ||
291 | |||
292 | rate = parent_rate / div; | ||
293 | } | ||
294 | |||
295 | return rate; | ||
296 | } | ||
297 | |||
298 | static struct clksrc_clk clk_mmc0 = { | ||
299 | .clk = { | ||
300 | .name = "mmc_bus", | ||
301 | .id = 0, | ||
302 | .ctrlbit = S3C_CLKCON_SCLK_MMC0, | ||
303 | .enable = s3c64xx_sclk_ctrl, | ||
304 | .set_parent = s3c64xx_setparent_clksrc, | ||
305 | .get_rate = s3c64xx_getrate_clksrc, | ||
306 | .set_rate = s3c64xx_setrate_clksrc, | ||
307 | .round_rate = s3c64xx_roundrate_clksrc, | ||
308 | }, | ||
309 | .shift = S3C6400_CLKSRC_MMC0_SHIFT, | ||
310 | .mask = S3C6400_CLKSRC_MMC0_MASK, | ||
311 | .sources = &clkset_spi_mmc, | ||
312 | .divider_shift = S3C6400_CLKDIV1_MMC0_SHIFT, | ||
313 | .reg_divider = S3C_CLK_DIV1, | ||
314 | }; | ||
315 | |||
316 | static struct clksrc_clk clk_mmc1 = { | ||
317 | .clk = { | ||
318 | .name = "mmc_bus", | ||
319 | .id = 1, | ||
320 | .ctrlbit = S3C_CLKCON_SCLK_MMC1, | ||
321 | .enable = s3c64xx_sclk_ctrl, | ||
322 | .get_rate = s3c64xx_getrate_clksrc, | ||
323 | .set_rate = s3c64xx_setrate_clksrc, | ||
324 | .set_parent = s3c64xx_setparent_clksrc, | ||
325 | .round_rate = s3c64xx_roundrate_clksrc, | ||
326 | }, | ||
327 | .shift = S3C6400_CLKSRC_MMC1_SHIFT, | ||
328 | .mask = S3C6400_CLKSRC_MMC1_MASK, | ||
329 | .sources = &clkset_spi_mmc, | ||
330 | .divider_shift = S3C6400_CLKDIV1_MMC1_SHIFT, | ||
331 | .reg_divider = S3C_CLK_DIV1, | ||
332 | }; | ||
333 | |||
334 | static struct clksrc_clk clk_mmc2 = { | ||
335 | .clk = { | ||
336 | .name = "mmc_bus", | ||
337 | .id = 2, | ||
338 | .ctrlbit = S3C_CLKCON_SCLK_MMC2, | ||
339 | .enable = s3c64xx_sclk_ctrl, | ||
340 | .get_rate = s3c64xx_getrate_clksrc, | ||
341 | .set_rate = s3c64xx_setrate_clksrc, | ||
342 | .set_parent = s3c64xx_setparent_clksrc, | ||
343 | .round_rate = s3c64xx_roundrate_clksrc, | ||
344 | }, | ||
345 | .shift = S3C6400_CLKSRC_MMC2_SHIFT, | ||
346 | .mask = S3C6400_CLKSRC_MMC2_MASK, | ||
347 | .sources = &clkset_spi_mmc, | ||
348 | .divider_shift = S3C6400_CLKDIV1_MMC2_SHIFT, | ||
349 | .reg_divider = S3C_CLK_DIV1, | ||
350 | }; | ||
351 | |||
352 | static struct clksrc_clk clk_usbhost = { | ||
353 | .clk = { | ||
354 | .name = "usb-host-bus", | ||
355 | .id = -1, | ||
356 | .ctrlbit = S3C_CLKCON_SCLK_UHOST, | ||
357 | .enable = s3c64xx_sclk_ctrl, | ||
358 | .set_parent = s3c64xx_setparent_clksrc, | ||
359 | .get_rate = s3c64xx_getrate_clksrc, | ||
360 | .set_rate = s3c64xx_setrate_clksrc, | ||
361 | .round_rate = s3c64xx_roundrate_clksrc, | ||
362 | }, | ||
363 | .shift = S3C6400_CLKSRC_UHOST_SHIFT, | ||
364 | .mask = S3C6400_CLKSRC_UHOST_MASK, | ||
365 | .sources = &clkset_uhost, | ||
366 | .divider_shift = S3C6400_CLKDIV1_UHOST_SHIFT, | ||
367 | .reg_divider = S3C_CLK_DIV1, | ||
368 | }; | ||
369 | |||
370 | static struct clksrc_clk clk_uart_uclk1 = { | ||
371 | .clk = { | ||
372 | .name = "uclk1", | ||
373 | .id = -1, | ||
374 | .ctrlbit = S3C_CLKCON_SCLK_UART, | ||
375 | .enable = s3c64xx_sclk_ctrl, | ||
376 | .set_parent = s3c64xx_setparent_clksrc, | ||
377 | .get_rate = s3c64xx_getrate_clksrc, | ||
378 | .set_rate = s3c64xx_setrate_clksrc, | ||
379 | .round_rate = s3c64xx_roundrate_clksrc, | ||
380 | }, | ||
381 | .shift = S3C6400_CLKSRC_UART_SHIFT, | ||
382 | .mask = S3C6400_CLKSRC_UART_MASK, | ||
383 | .sources = &clkset_uart, | ||
384 | .divider_shift = S3C6400_CLKDIV2_UART_SHIFT, | ||
385 | .reg_divider = S3C_CLK_DIV2, | ||
386 | }; | ||
387 | |||
388 | /* Where does UCLK0 come from? */ | ||
389 | |||
390 | static struct clksrc_clk clk_spi0 = { | ||
391 | .clk = { | ||
392 | .name = "spi-bus", | ||
393 | .id = 0, | ||
394 | .ctrlbit = S3C_CLKCON_SCLK_SPI0, | ||
395 | .enable = s3c64xx_sclk_ctrl, | ||
396 | .set_parent = s3c64xx_setparent_clksrc, | ||
397 | .get_rate = s3c64xx_getrate_clksrc, | ||
398 | .set_rate = s3c64xx_setrate_clksrc, | ||
399 | .round_rate = s3c64xx_roundrate_clksrc, | ||
400 | }, | ||
401 | .shift = S3C6400_CLKSRC_SPI0_SHIFT, | ||
402 | .mask = S3C6400_CLKSRC_SPI0_MASK, | ||
403 | .sources = &clkset_spi_mmc, | ||
404 | .divider_shift = S3C6400_CLKDIV2_SPI0_SHIFT, | ||
405 | .reg_divider = S3C_CLK_DIV2, | ||
406 | }; | ||
407 | |||
408 | static struct clksrc_clk clk_spi1 = { | ||
409 | .clk = { | ||
410 | .name = "spi-bus", | ||
411 | .id = 1, | ||
412 | .ctrlbit = S3C_CLKCON_SCLK_SPI1, | ||
413 | .enable = s3c64xx_sclk_ctrl, | ||
414 | .set_parent = s3c64xx_setparent_clksrc, | ||
415 | .get_rate = s3c64xx_getrate_clksrc, | ||
416 | .set_rate = s3c64xx_setrate_clksrc, | ||
417 | .round_rate = s3c64xx_roundrate_clksrc, | ||
418 | }, | ||
419 | .shift = S3C6400_CLKSRC_SPI1_SHIFT, | ||
420 | .mask = S3C6400_CLKSRC_SPI1_MASK, | ||
421 | .sources = &clkset_spi_mmc, | ||
422 | .divider_shift = S3C6400_CLKDIV2_SPI1_SHIFT, | ||
423 | .reg_divider = S3C_CLK_DIV2, | ||
424 | }; | ||
425 | |||
426 | static struct clk clk_iis_cd0 = { | ||
427 | .name = "iis_cdclk0", | ||
428 | .id = -1, | ||
429 | }; | ||
430 | |||
431 | static struct clk clk_iis_cd1 = { | ||
432 | .name = "iis_cdclk1", | ||
433 | .id = -1, | ||
434 | }; | ||
435 | |||
436 | static struct clk clk_pcm_cd = { | ||
437 | .name = "pcm_cdclk", | ||
438 | .id = -1, | ||
439 | }; | ||
440 | |||
441 | static struct clk *clkset_audio0_list[] = { | ||
442 | [0] = &clk_mout_epll.clk, | ||
443 | [1] = &clk_dout_mpll, | ||
444 | [2] = &clk_fin_epll, | ||
445 | [3] = &clk_iis_cd0, | ||
446 | [4] = &clk_pcm_cd, | ||
447 | }; | ||
448 | |||
449 | static struct clk_sources clkset_audio0 = { | ||
450 | .sources = clkset_audio0_list, | ||
451 | .nr_sources = ARRAY_SIZE(clkset_audio0_list), | ||
452 | }; | ||
453 | |||
454 | static struct clksrc_clk clk_audio0 = { | ||
455 | .clk = { | ||
456 | .name = "audio-bus", | ||
457 | .id = 0, | ||
458 | .ctrlbit = S3C_CLKCON_SCLK_AUDIO0, | ||
459 | .enable = s3c64xx_sclk_ctrl, | ||
460 | .set_parent = s3c64xx_setparent_clksrc, | ||
461 | .get_rate = s3c64xx_getrate_clksrc, | ||
462 | .set_rate = s3c64xx_setrate_clksrc, | ||
463 | .round_rate = s3c64xx_roundrate_clksrc, | ||
464 | }, | ||
465 | .shift = S3C6400_CLKSRC_AUDIO0_SHIFT, | ||
466 | .mask = S3C6400_CLKSRC_AUDIO0_MASK, | ||
467 | .sources = &clkset_audio0, | ||
468 | .divider_shift = S3C6400_CLKDIV2_AUDIO0_SHIFT, | ||
469 | .reg_divider = S3C_CLK_DIV2, | ||
470 | }; | ||
471 | |||
472 | static struct clk *clkset_audio1_list[] = { | ||
473 | [0] = &clk_mout_epll.clk, | ||
474 | [1] = &clk_dout_mpll, | ||
475 | [2] = &clk_fin_epll, | ||
476 | [3] = &clk_iis_cd1, | ||
477 | [4] = &clk_pcm_cd, | ||
478 | }; | ||
479 | |||
480 | static struct clk_sources clkset_audio1 = { | ||
481 | .sources = clkset_audio1_list, | ||
482 | .nr_sources = ARRAY_SIZE(clkset_audio1_list), | ||
483 | }; | ||
484 | |||
485 | static struct clksrc_clk clk_audio1 = { | ||
486 | .clk = { | ||
487 | .name = "audio-bus", | ||
488 | .id = 1, | ||
489 | .ctrlbit = S3C_CLKCON_SCLK_AUDIO1, | ||
490 | .enable = s3c64xx_sclk_ctrl, | ||
491 | .set_parent = s3c64xx_setparent_clksrc, | ||
492 | .get_rate = s3c64xx_getrate_clksrc, | ||
493 | .set_rate = s3c64xx_setrate_clksrc, | ||
494 | .round_rate = s3c64xx_roundrate_clksrc, | ||
495 | }, | ||
496 | .shift = S3C6400_CLKSRC_AUDIO1_SHIFT, | ||
497 | .mask = S3C6400_CLKSRC_AUDIO1_MASK, | ||
498 | .sources = &clkset_audio1, | ||
499 | .divider_shift = S3C6400_CLKDIV2_AUDIO1_SHIFT, | ||
500 | .reg_divider = S3C_CLK_DIV2, | ||
501 | }; | ||
502 | |||
503 | static struct clksrc_clk clk_irda = { | ||
504 | .clk = { | ||
505 | .name = "irda-bus", | ||
506 | .id = 0, | ||
507 | .ctrlbit = S3C_CLKCON_SCLK_IRDA, | ||
508 | .enable = s3c64xx_sclk_ctrl, | ||
509 | .set_parent = s3c64xx_setparent_clksrc, | ||
510 | .get_rate = s3c64xx_getrate_clksrc, | ||
511 | .set_rate = s3c64xx_setrate_clksrc, | ||
512 | .round_rate = s3c64xx_roundrate_clksrc, | ||
513 | }, | ||
514 | .shift = S3C6400_CLKSRC_IRDA_SHIFT, | ||
515 | .mask = S3C6400_CLKSRC_IRDA_MASK, | ||
516 | .sources = &clkset_irda, | ||
517 | .divider_shift = S3C6400_CLKDIV2_IRDA_SHIFT, | ||
518 | .reg_divider = S3C_CLK_DIV2, | ||
519 | }; | ||
520 | |||
521 | /* Clock initialisation code */ | ||
522 | |||
523 | static struct clksrc_clk *init_parents[] = { | ||
524 | &clk_mout_apll, | ||
525 | &clk_mout_epll, | ||
526 | &clk_mout_mpll, | ||
527 | &clk_mmc0, | ||
528 | &clk_mmc1, | ||
529 | &clk_mmc2, | ||
530 | &clk_usbhost, | ||
531 | &clk_uart_uclk1, | ||
532 | &clk_spi0, | ||
533 | &clk_spi1, | ||
534 | &clk_audio0, | ||
535 | &clk_audio1, | ||
536 | &clk_irda, | ||
537 | }; | ||
538 | |||
539 | static void __init_or_cpufreq s3c6400_set_clksrc(struct clksrc_clk *clk) | ||
540 | { | ||
541 | struct clk_sources *srcs = clk->sources; | ||
542 | u32 clksrc = __raw_readl(S3C_CLK_SRC); | ||
543 | |||
544 | clksrc &= clk->mask; | ||
545 | clksrc >>= clk->shift; | ||
546 | |||
547 | if (clksrc > srcs->nr_sources || !srcs->sources[clksrc]) { | ||
548 | printk(KERN_ERR "%s: bad source %d\n", | ||
549 | clk->clk.name, clksrc); | ||
550 | return; | ||
551 | } | ||
552 | |||
553 | clk->clk.parent = srcs->sources[clksrc]; | ||
554 | |||
555 | printk(KERN_INFO "%s: source is %s (%d), rate is %ld\n", | ||
556 | clk->clk.name, clk->clk.parent->name, clksrc, | ||
557 | clk_get_rate(&clk->clk)); | ||
558 | } | ||
559 | |||
560 | #define GET_DIV(clk, field) ((((clk) & field##_MASK) >> field##_SHIFT) + 1) | ||
561 | |||
562 | void __init_or_cpufreq s3c6400_setup_clocks(void) | ||
563 | { | ||
564 | struct clk *xtal_clk; | ||
565 | unsigned long xtal; | ||
566 | unsigned long fclk; | ||
567 | unsigned long hclk; | ||
568 | unsigned long hclk2; | ||
569 | unsigned long pclk; | ||
570 | unsigned long epll; | ||
571 | unsigned long apll; | ||
572 | unsigned long mpll; | ||
573 | unsigned int ptr; | ||
574 | u32 clkdiv0; | ||
575 | |||
576 | printk(KERN_DEBUG "%s: registering clocks\n", __func__); | ||
577 | |||
578 | clkdiv0 = __raw_readl(S3C_CLK_DIV0); | ||
579 | printk(KERN_DEBUG "%s: clkdiv0 = %08x\n", __func__, clkdiv0); | ||
580 | |||
581 | xtal_clk = clk_get(NULL, "xtal"); | ||
582 | BUG_ON(IS_ERR(xtal_clk)); | ||
583 | |||
584 | xtal = clk_get_rate(xtal_clk); | ||
585 | clk_put(xtal_clk); | ||
586 | |||
587 | printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal); | ||
588 | |||
589 | epll = s3c6400_get_epll(xtal); | ||
590 | mpll = s3c6400_get_pll(xtal, __raw_readl(S3C_MPLL_CON)); | ||
591 | apll = s3c6400_get_pll(xtal, __raw_readl(S3C_APLL_CON)); | ||
592 | |||
593 | fclk = mpll; | ||
594 | |||
595 | printk(KERN_INFO "S3C64XX: PLL settings, A=%ld, M=%ld, E=%ld\n", | ||
596 | apll, mpll, epll); | ||
597 | |||
598 | hclk2 = mpll / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK2); | ||
599 | hclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_HCLK); | ||
600 | pclk = hclk2 / GET_DIV(clkdiv0, S3C6400_CLKDIV0_PCLK); | ||
601 | |||
602 | printk(KERN_INFO "S3C64XX: HCLK2=%ld, HCLK=%ld, PCLK=%ld\n", | ||
603 | hclk2, hclk, pclk); | ||
604 | |||
605 | clk_fout_mpll.rate = mpll; | ||
606 | clk_fout_epll.rate = epll; | ||
607 | clk_fout_apll.rate = apll; | ||
608 | |||
609 | clk_h.rate = hclk; | ||
610 | clk_p.rate = pclk; | ||
611 | clk_f.rate = fclk; | ||
612 | |||
613 | for (ptr = 0; ptr < ARRAY_SIZE(init_parents); ptr++) | ||
614 | s3c6400_set_clksrc(init_parents[ptr]); | ||
615 | } | ||
616 | |||
617 | static struct clk *clks[] __initdata = { | ||
618 | &clk_ext_xtal_mux, | ||
619 | &clk_iis_cd0, | ||
620 | &clk_iis_cd1, | ||
621 | &clk_pcm_cd, | ||
622 | &clk_mout_epll.clk, | ||
623 | &clk_fout_epll, | ||
624 | &clk_mout_mpll.clk, | ||
625 | &clk_dout_mpll, | ||
626 | &clk_mmc0.clk, | ||
627 | &clk_mmc1.clk, | ||
628 | &clk_mmc2.clk, | ||
629 | &clk_usbhost.clk, | ||
630 | &clk_uart_uclk1.clk, | ||
631 | &clk_spi0.clk, | ||
632 | &clk_spi1.clk, | ||
633 | &clk_audio0.clk, | ||
634 | &clk_audio1.clk, | ||
635 | &clk_irda.clk, | ||
636 | }; | ||
637 | |||
638 | void __init s3c6400_register_clocks(void) | ||
639 | { | ||
640 | struct clk *clkp; | ||
641 | int ret; | ||
642 | int ptr; | ||
643 | |||
644 | for (ptr = 0; ptr < ARRAY_SIZE(clks); ptr++) { | ||
645 | clkp = clks[ptr]; | ||
646 | ret = s3c24xx_register_clock(clkp); | ||
647 | if (ret < 0) { | ||
648 | printk(KERN_ERR "Failed to register clock %s (%d)\n", | ||
649 | clkp->name, ret); | ||
650 | } | ||
651 | } | ||
652 | |||
653 | clk_mpll.parent = &clk_mout_mpll.clk; | ||
654 | clk_epll.parent = &clk_mout_epll.clk; | ||
655 | } | ||
diff --git a/arch/arm/plat-s3c64xx/s3c6400-init.c b/arch/arm/plat-s3c64xx/s3c6400-init.c new file mode 100644 index 000000000000..6c28f39df097 --- /dev/null +++ b/arch/arm/plat-s3c64xx/s3c6400-init.c | |||
@@ -0,0 +1,29 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/s3c6400-init.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * S3C6400 - CPU initialisation (common with other S3C64XX chips) | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/init.h> | ||
18 | |||
19 | #include <plat/cpu.h> | ||
20 | #include <plat/devs.h> | ||
21 | #include <plat/s3c6400.h> | ||
22 | #include <plat/s3c6410.h> | ||
23 | |||
24 | /* uart registration process */ | ||
25 | |||
26 | void __init s3c6400_common_init_uarts(struct s3c2410_uartcfg *cfg, int no) | ||
27 | { | ||
28 | s3c24xx_init_uartdevs("s3c6400-uart", s3c64xx_uart_resources, cfg, no); | ||
29 | } | ||
diff --git a/arch/arm/plat-s3c64xx/setup-fb-24bpp.c b/arch/arm/plat-s3c64xx/setup-fb-24bpp.c new file mode 100644 index 000000000000..8e28e448dd20 --- /dev/null +++ b/arch/arm/plat-s3c64xx/setup-fb-24bpp.c | |||
@@ -0,0 +1,37 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/setup-fb-24bpp.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * Base S3C64XX setup information for 24bpp LCD framebuffer | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/fb.h> | ||
18 | |||
19 | #include <mach/regs-fb.h> | ||
20 | #include <mach/gpio.h> | ||
21 | #include <plat/fb.h> | ||
22 | #include <plat/gpio-cfg.h> | ||
23 | |||
24 | extern void s3c64xx_fb_gpio_setup_24bpp(void) | ||
25 | { | ||
26 | unsigned int gpio; | ||
27 | |||
28 | for (gpio = S3C64XX_GPI(0); gpio <= S3C64XX_GPI(15); gpio++) { | ||
29 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
30 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
31 | } | ||
32 | |||
33 | for (gpio = S3C64XX_GPJ(0); gpio <= S3C64XX_GPJ(11); gpio++) { | ||
34 | s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); | ||
35 | s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); | ||
36 | } | ||
37 | } | ||
diff --git a/arch/arm/plat-s3c64xx/setup-i2c0.c b/arch/arm/plat-s3c64xx/setup-i2c0.c new file mode 100644 index 000000000000..364480763728 --- /dev/null +++ b/arch/arm/plat-s3c64xx/setup-i2c0.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/setup-i2c0.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * Base S3C64XX I2C bus 0 gpio configuration | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | |||
18 | struct platform_device; /* don't need the contents */ | ||
19 | |||
20 | #include <mach/gpio.h> | ||
21 | #include <plat/iic.h> | ||
22 | #include <plat/gpio-bank-b.h> | ||
23 | #include <plat/gpio-cfg.h> | ||
24 | |||
25 | void s3c_i2c0_cfg_gpio(struct platform_device *dev) | ||
26 | { | ||
27 | s3c_gpio_cfgpin(S3C64XX_GPB(5), S3C64XX_GPB5_I2C_SCL0); | ||
28 | s3c_gpio_cfgpin(S3C64XX_GPB(6), S3C64XX_GPB6_I2C_SDA0); | ||
29 | s3c_gpio_setpull(S3C64XX_GPB(5), S3C_GPIO_PULL_UP); | ||
30 | s3c_gpio_setpull(S3C64XX_GPB(6), S3C_GPIO_PULL_UP); | ||
31 | } | ||
diff --git a/arch/arm/plat-s3c64xx/setup-i2c1.c b/arch/arm/plat-s3c64xx/setup-i2c1.c new file mode 100644 index 000000000000..bbe229bd90ca --- /dev/null +++ b/arch/arm/plat-s3c64xx/setup-i2c1.c | |||
@@ -0,0 +1,31 @@ | |||
1 | /* linux/arch/arm/plat-s3c64xx/setup-i2c1.c | ||
2 | * | ||
3 | * Copyright 2008 Openmoko, Inc. | ||
4 | * Copyright 2008 Simtec Electronics | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * http://armlinux.simtec.co.uk/ | ||
7 | * | ||
8 | * Base S3C64XX I2C bus 1 gpio configuration | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/types.h> | ||
17 | |||
18 | struct platform_device; /* don't need the contents */ | ||
19 | |||
20 | #include <mach/gpio.h> | ||
21 | #include <plat/iic.h> | ||
22 | #include <plat/gpio-bank-b.h> | ||
23 | #include <plat/gpio-cfg.h> | ||
24 | |||
25 | void s3c_i2c1_cfg_gpio(struct platform_device *dev) | ||
26 | { | ||
27 | s3c_gpio_cfgpin(S3C64XX_GPB(2), S3C64XX_GPB2_I2C_SCL1); | ||
28 | s3c_gpio_cfgpin(S3C64XX_GPB(3), S3C64XX_GPB3_I2C_SDA1); | ||
29 | s3c_gpio_setpull(S3C64XX_GPB(2), S3C_GPIO_PULL_UP); | ||
30 | s3c_gpio_setpull(S3C64XX_GPB(3), S3C_GPIO_PULL_UP); | ||
31 | } | ||
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 43aa2020f85c..fd23c0e9e698 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Thu Sep 25 10:10:50 2008 | 15 | # Last update: Sun Nov 30 16:39:36 2008 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -1380,7 +1380,7 @@ holon MACH_HOLON HOLON 1377 | |||
1380 | olip8 MACH_OLIP8 OLIP8 1378 | 1380 | olip8 MACH_OLIP8 OLIP8 1378 |
1381 | ghi270hg MACH_GHI270HG GHI270HG 1379 | 1381 | ghi270hg MACH_GHI270HG GHI270HG 1379 |
1382 | davinci_dm6467_evm MACH_DAVINCI_DM6467_EVM DAVINCI_DM6467_EVM 1380 | 1382 | davinci_dm6467_evm MACH_DAVINCI_DM6467_EVM DAVINCI_DM6467_EVM 1380 |
1383 | davinci_dm355_evm MACH_DAVINCI_DM350_EVM DAVINCI_DM350_EVM 1381 | 1383 | davinci_dm355_evm MACH_DAVINCI_DM355_EVM DAVINCI_DM355_EVM 1381 |
1384 | blackriver MACH_BLACKRIVER BLACKRIVER 1383 | 1384 | blackriver MACH_BLACKRIVER BLACKRIVER 1383 |
1385 | sandgate_wp MACH_SANDGATEWP SANDGATEWP 1384 | 1385 | sandgate_wp MACH_SANDGATEWP SANDGATEWP 1384 |
1386 | cdotbwsg MACH_CDOTBWSG CDOTBWSG 1385 | 1386 | cdotbwsg MACH_CDOTBWSG CDOTBWSG 1385 |
@@ -1771,7 +1771,7 @@ axs_ultrax MACH_AXS_ULTRAX AXS_ULTRAX 1779 | |||
1771 | at572d940deb MACH_AT572D940DEB AT572D940DEB 1780 | 1771 | at572d940deb MACH_AT572D940DEB AT572D940DEB 1780 |
1772 | davinci_da8xx_evm MACH_DAVINCI_DA8XX_EVM DAVINCI_DA8XX_EVM 1781 | 1772 | davinci_da8xx_evm MACH_DAVINCI_DA8XX_EVM DAVINCI_DA8XX_EVM 1781 |
1773 | ep9302 MACH_EP9302 EP9302 1782 | 1773 | ep9302 MACH_EP9302 EP9302 1782 |
1774 | at572d940hfeb MACH_AT572D940HFEB AT572D940HFEB 1783 | 1774 | at572d940hfek MACH_AT572D940HFEB AT572D940HFEB 1783 |
1775 | cybook3 MACH_CYBOOK3 CYBOOK3 1784 | 1775 | cybook3 MACH_CYBOOK3 CYBOOK3 1784 |
1776 | wdg002 MACH_WDG002 WDG002 1785 | 1776 | wdg002 MACH_WDG002 WDG002 1785 |
1777 | sg560adsl MACH_SG560ADSL SG560ADSL 1786 | 1777 | sg560adsl MACH_SG560ADSL SG560ADSL 1786 |
@@ -1899,3 +1899,98 @@ rut100 MACH_RUT100 RUT100 1908 | |||
1899 | asusp535 MACH_ASUSP535 ASUSP535 1909 | 1899 | asusp535 MACH_ASUSP535 ASUSP535 1909 |
1900 | htcraphael MACH_HTCRAPHAEL HTCRAPHAEL 1910 | 1900 | htcraphael MACH_HTCRAPHAEL HTCRAPHAEL 1910 |
1901 | sygdg1 MACH_SYGDG1 SYGDG1 1911 | 1901 | sygdg1 MACH_SYGDG1 SYGDG1 1911 |
1902 | sygdg2 MACH_SYGDG2 SYGDG2 1912 | ||
1903 | seoul MACH_SEOUL SEOUL 1913 | ||
1904 | salerno MACH_SALERNO SALERNO 1914 | ||
1905 | ucn_s3c64xx MACH_UCN_S3C64XX UCN_S3C64XX 1915 | ||
1906 | msm7201a MACH_MSM7201A MSM7201A 1916 | ||
1907 | lpr1 MACH_LPR1 LPR1 1917 | ||
1908 | armadillo500fx MACH_ARMADILLO500FX ARMADILLO500FX 1918 | ||
1909 | g3evm MACH_G3EVM G3EVM 1919 | ||
1910 | z3_dm355 MACH_Z3_DM355 Z3_DM355 1920 | ||
1911 | w90p910evb MACH_W90P910EVB W90P910EVB 1921 | ||
1912 | w90p920evb MACH_W90P920EVB W90P920EVB 1922 | ||
1913 | w90p950evb MACH_W90P950EVB W90P950EVB 1923 | ||
1914 | w90n960evb MACH_W90N960EVB W90N960EVB 1924 | ||
1915 | camhd MACH_CAMHD CAMHD 1925 | ||
1916 | mvc100 MACH_MVC100 MVC100 1926 | ||
1917 | electrum_200 MACH_ELECTRUM_200 ELECTRUM_200 1927 | ||
1918 | htcjade MACH_HTCJADE HTCJADE 1928 | ||
1919 | memphis MACH_MEMPHIS MEMPHIS 1929 | ||
1920 | imx27sbc MACH_IMX27SBC IMX27SBC 1930 | ||
1921 | lextar MACH_LEXTAR LEXTAR 1931 | ||
1922 | mv88f6281gtw_ge MACH_MV88F6281GTW_GE MV88F6281GTW_GE 1932 | ||
1923 | ncp MACH_NCP NCP 1933 | ||
1924 | z32an_series MACH_Z32AN Z32AN 1934 | ||
1925 | tmq_capd MACH_TMQ_CAPD TMQ_CAPD 1935 | ||
1926 | omap3_wl MACH_OMAP3_WL OMAP3_WL 1936 | ||
1927 | chumby MACH_CHUMBY CHUMBY 1937 | ||
1928 | atsarm9 MACH_ATSARM9 ATSARM9 1938 | ||
1929 | davinci_dm365_evm MACH_DAVINCI_DM365_EVM DAVINCI_DM365_EVM 1939 | ||
1930 | bahamas MACH_BAHAMAS BAHAMAS 1940 | ||
1931 | das MACH_DAS DAS 1941 | ||
1932 | minidas MACH_MINIDAS MINIDAS 1942 | ||
1933 | vk1000 MACH_VK1000 VK1000 1943 | ||
1934 | centro MACH_CENTRO CENTRO 1944 | ||
1935 | ctera_2bay MACH_CTERA_2BAY CTERA_2BAY 1945 | ||
1936 | edgeconnect MACH_EDGECONNECT EDGECONNECT 1946 | ||
1937 | nd27000 MACH_ND27000 ND27000 1947 | ||
1938 | cobra MACH_GEMALTO_COBRA GEMALTO_COBRA 1948 | ||
1939 | ingelabs_comet MACH_INGELABS_COMET INGELABS_COMET 1949 | ||
1940 | pollux_wiz MACH_POLLUX_WIZ POLLUX_WIZ 1950 | ||
1941 | blackstone MACH_BLACKSTONE BLACKSTONE 1951 | ||
1942 | topaz MACH_TOPAZ TOPAZ 1952 | ||
1943 | aixle MACH_AIXLE AIXLE 1953 | ||
1944 | mw998 MACH_MW998 MW998 1954 | ||
1945 | nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955 | ||
1946 | vsc5605ev MACH_VSC5605EV VSC5605EV 1956 | ||
1947 | nt98700dk MACH_NT98700DK NT98700DK 1957 | ||
1948 | icontact MACH_ICONTACT ICONTACT 1958 | ||
1949 | swarco_frcpu MACH_SWARCO_FRCPU SWARCO_FRCPU 1959 | ||
1950 | swarco_scpu MACH_SWARCO_SCPU SWARCO_SCPU 1960 | ||
1951 | bbox_p16 MACH_BBOX_P16 BBOX_P16 1961 | ||
1952 | bstd MACH_BSTD BSTD 1962 | ||
1953 | sbc2440ii MACH_SBC2440II SBC2440II 1963 | ||
1954 | pcm034 MACH_PCM034 PCM034 1964 | ||
1955 | neso MACH_NESO NESO 1965 | ||
1956 | wlnx_9g20 MACH_WLNX_9G20 WLNX_9G20 1966 | ||
1957 | omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967 | ||
1958 | totemnova MACH_TOTEMNOVA TOTEMNOVA 1968 | ||
1959 | c5000 MACH_C5000 C5000 1969 | ||
1960 | unipo_at91sam9263 MACH_UNIPO_AT91SAM9263 UNIPO_AT91SAM9263 1970 | ||
1961 | ethernut5 MACH_ETHERNUT5 ETHERNUT5 1971 | ||
1962 | arm11 MACH_ARM11 ARM11 1972 | ||
1963 | cpuat9260 MACH_CPUAT9260 CPUAT9260 1973 | ||
1964 | cpupxa255 MACH_CPUPXA255 CPUPXA255 1974 | ||
1965 | cpuimx27 MACH_CPUIMX27 CPUIMX27 1975 | ||
1966 | cheflux MACH_CHEFLUX CHEFLUX 1976 | ||
1967 | eb_cpux9k2 MACH_EB_CPUX9K2 EB_CPUX9K2 1977 | ||
1968 | opcotec MACH_OPCOTEC OPCOTEC 1978 | ||
1969 | yt MACH_YT YT 1979 | ||
1970 | motoq MACH_MOTOQ MOTOQ 1980 | ||
1971 | bsb1 MACH_BSB1 BSB1 1981 | ||
1972 | acs5k MACH_ACS5K ACS5K 1982 | ||
1973 | milan MACH_MILAN MILAN 1983 | ||
1974 | quartzv2 MACH_QUARTZV2 QUARTZV2 1984 | ||
1975 | rsvp MACH_RSVP RSVP 1985 | ||
1976 | rmp200 MACH_RMP200 RMP200 1986 | ||
1977 | snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987 | ||
1978 | dsm320 MACH_DSM320 DSM320 1988 | ||
1979 | adsgcm MACH_ADSGCM ADSGCM 1989 | ||
1980 | ase2_400 MACH_ASE2_400 ASE2_400 1990 | ||
1981 | pizza MACH_PIZZA PIZZA 1991 | ||
1982 | spot_ngpl MACH_SPOT_NGPL SPOT_NGPL 1992 | ||
1983 | armata MACH_ARMATA ARMATA 1993 | ||
1984 | exeda MACH_EXEDA EXEDA 1994 | ||
1985 | mx31sf005 MACH_MX31SF005 MX31SF005 1995 | ||
1986 | f5d8231_4_v2 MACH_F5D8231_4_V2 F5D8231_4_V2 1996 | ||
1987 | q2440 MACH_Q2440 Q2440 1997 | ||
1988 | qq2440 MACH_QQ2440 QQ2440 1998 | ||
1989 | mini2440 MACH_MINI2440 MINI2440 1999 | ||
1990 | colibri300 MACH_COLIBRI300 COLIBRI300 2000 | ||
1991 | jades MACH_JADES JADES 2001 | ||
1992 | spark MACH_SPARK SPARK 2002 | ||
1993 | benzina MACH_BENZINA BENZINA 2003 | ||
1994 | blaze MACH_BLAZE BLAZE 2004 | ||
1995 | linkstation_ls_hgl MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL 2005 | ||
1996 | htcvenus MACH_HTCVENUS HTCVENUS 2006 | ||
diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index c85860bad585..8de86e4feada 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h | |||
@@ -377,6 +377,6 @@ struct op { | |||
377 | u32 flags; | 377 | u32 flags; |
378 | }; | 378 | }; |
379 | 379 | ||
380 | #ifdef CONFIG_SMP | 380 | #if defined(CONFIG_SMP) || defined(CONFIG_PM) |
381 | extern void vfp_save_state(void *location, u32 fpexc); | 381 | extern void vfp_save_state(void *location, u32 fpexc); |
382 | #endif | 382 | #endif |
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index a62dcf7098ba..c92a08bd6a86 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
@@ -101,9 +101,12 @@ ENTRY(vfp_support_entry) | |||
101 | VFPFSTMIA r4, r5 @ save the working registers | 101 | VFPFSTMIA r4, r5 @ save the working registers |
102 | VFPFMRX r5, FPSCR @ current status | 102 | VFPFMRX r5, FPSCR @ current status |
103 | tst r1, #FPEXC_EX @ is there additional state to save? | 103 | tst r1, #FPEXC_EX @ is there additional state to save? |
104 | VFPFMRX r6, FPINST, NE @ FPINST (only if FPEXC.EX is set) | 104 | beq 1f |
105 | tstne r1, #FPEXC_FP2V @ is there an FPINST2 to read? | 105 | VFPFMRX r6, FPINST @ FPINST (only if FPEXC.EX is set) |
106 | VFPFMRX r8, FPINST2, NE @ FPINST2 if needed (and present) | 106 | tst r1, #FPEXC_FP2V @ is there an FPINST2 to read? |
107 | beq 1f | ||
108 | VFPFMRX r8, FPINST2 @ FPINST2 if needed (and present) | ||
109 | 1: | ||
107 | stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 | 110 | stmia r4, {r1, r5, r6, r8} @ save FPEXC, FPSCR, FPINST, FPINST2 |
108 | @ and point r4 at the word at the | 111 | @ and point r4 at the word at the |
109 | @ start of the register dump | 112 | @ start of the register dump |
@@ -117,9 +120,12 @@ no_old_VFP_process: | |||
117 | @ FPEXC is in a safe state | 120 | @ FPEXC is in a safe state |
118 | ldmia r10, {r1, r5, r6, r8} @ load FPEXC, FPSCR, FPINST, FPINST2 | 121 | ldmia r10, {r1, r5, r6, r8} @ load FPEXC, FPSCR, FPINST, FPINST2 |
119 | tst r1, #FPEXC_EX @ is there additional state to restore? | 122 | tst r1, #FPEXC_EX @ is there additional state to restore? |
120 | VFPFMXR FPINST, r6, NE @ restore FPINST (only if FPEXC.EX is set) | 123 | beq 1f |
121 | tstne r1, #FPEXC_FP2V @ is there an FPINST2 to write? | 124 | VFPFMXR FPINST, r6 @ restore FPINST (only if FPEXC.EX is set) |
122 | VFPFMXR FPINST2, r8, NE @ FPINST2 if needed (and present) | 125 | tst r1, #FPEXC_FP2V @ is there an FPINST2 to write? |
126 | beq 1f | ||
127 | VFPFMXR FPINST2, r8 @ FPINST2 if needed (and present) | ||
128 | 1: | ||
123 | VFPFMXR FPSCR, r5 @ restore status | 129 | VFPFMXR FPSCR, r5 @ restore status |
124 | 130 | ||
125 | check_for_exception: | 131 | check_for_exception: |
@@ -166,7 +172,7 @@ process_exception: | |||
166 | @ retry the faulted instruction | 172 | @ retry the faulted instruction |
167 | ENDPROC(vfp_support_entry) | 173 | ENDPROC(vfp_support_entry) |
168 | 174 | ||
169 | #ifdef CONFIG_SMP | 175 | #if defined(CONFIG_SMP) || defined(CONFIG_PM) |
170 | ENTRY(vfp_save_state) | 176 | ENTRY(vfp_save_state) |
171 | @ Save the current VFP state | 177 | @ Save the current VFP state |
172 | @ r0 - save location | 178 | @ r0 - save location |
@@ -175,9 +181,12 @@ ENTRY(vfp_save_state) | |||
175 | VFPFSTMIA r0, r2 @ save the working registers | 181 | VFPFSTMIA r0, r2 @ save the working registers |
176 | VFPFMRX r2, FPSCR @ current status | 182 | VFPFMRX r2, FPSCR @ current status |
177 | tst r1, #FPEXC_EX @ is there additional state to save? | 183 | tst r1, #FPEXC_EX @ is there additional state to save? |
178 | VFPFMRX r3, FPINST, NE @ FPINST (only if FPEXC.EX is set) | 184 | beq 1f |
179 | tstne r1, #FPEXC_FP2V @ is there an FPINST2 to read? | 185 | VFPFMRX r3, FPINST @ FPINST (only if FPEXC.EX is set) |
180 | VFPFMRX r12, FPINST2, NE @ FPINST2 if needed (and present) | 186 | tst r1, #FPEXC_FP2V @ is there an FPINST2 to read? |
187 | beq 1f | ||
188 | VFPFMRX r12, FPINST2 @ FPINST2 if needed (and present) | ||
189 | 1: | ||
181 | stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2 | 190 | stmia r0, {r1, r2, r3, r12} @ save FPEXC, FPSCR, FPINST, FPINST2 |
182 | mov pc, lr | 191 | mov pc, lr |
183 | ENDPROC(vfp_save_state) | 192 | ENDPROC(vfp_save_state) |
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index c0d2c9bb952b..9f476a1be2ca 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c | |||
@@ -322,6 +322,61 @@ static void vfp_enable(void *unused) | |||
322 | set_copro_access(access | CPACC_FULL(10) | CPACC_FULL(11)); | 322 | set_copro_access(access | CPACC_FULL(10) | CPACC_FULL(11)); |
323 | } | 323 | } |
324 | 324 | ||
325 | #ifdef CONFIG_PM | ||
326 | #include <linux/sysdev.h> | ||
327 | |||
328 | static int vfp_pm_suspend(struct sys_device *dev, pm_message_t state) | ||
329 | { | ||
330 | struct thread_info *ti = current_thread_info(); | ||
331 | u32 fpexc = fmrx(FPEXC); | ||
332 | |||
333 | /* if vfp is on, then save state for resumption */ | ||
334 | if (fpexc & FPEXC_EN) { | ||
335 | printk(KERN_DEBUG "%s: saving vfp state\n", __func__); | ||
336 | vfp_save_state(&ti->vfpstate, fpexc); | ||
337 | |||
338 | /* disable, just in case */ | ||
339 | fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); | ||
340 | } | ||
341 | |||
342 | /* clear any information we had about last context state */ | ||
343 | memset(last_VFP_context, 0, sizeof(last_VFP_context)); | ||
344 | |||
345 | return 0; | ||
346 | } | ||
347 | |||
348 | static int vfp_pm_resume(struct sys_device *dev) | ||
349 | { | ||
350 | /* ensure we have access to the vfp */ | ||
351 | vfp_enable(NULL); | ||
352 | |||
353 | /* and disable it to ensure the next usage restores the state */ | ||
354 | fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN); | ||
355 | |||
356 | return 0; | ||
357 | } | ||
358 | |||
359 | static struct sysdev_class vfp_pm_sysclass = { | ||
360 | .name = "vfp", | ||
361 | .suspend = vfp_pm_suspend, | ||
362 | .resume = vfp_pm_resume, | ||
363 | }; | ||
364 | |||
365 | static struct sys_device vfp_pm_sysdev = { | ||
366 | .cls = &vfp_pm_sysclass, | ||
367 | }; | ||
368 | |||
369 | static void vfp_pm_init(void) | ||
370 | { | ||
371 | sysdev_class_register(&vfp_pm_sysclass); | ||
372 | sysdev_register(&vfp_pm_sysdev); | ||
373 | } | ||
374 | |||
375 | |||
376 | #else | ||
377 | static inline void vfp_pm_init(void) { } | ||
378 | #endif /* CONFIG_PM */ | ||
379 | |||
325 | #include <linux/smp.h> | 380 | #include <linux/smp.h> |
326 | 381 | ||
327 | /* | 382 | /* |
@@ -365,12 +420,22 @@ static int __init vfp_init(void) | |||
365 | vfp_vector = vfp_support_entry; | 420 | vfp_vector = vfp_support_entry; |
366 | 421 | ||
367 | thread_register_notifier(&vfp_notifier_block); | 422 | thread_register_notifier(&vfp_notifier_block); |
423 | vfp_pm_init(); | ||
368 | 424 | ||
369 | /* | 425 | /* |
370 | * We detected VFP, and the support code is | 426 | * We detected VFP, and the support code is |
371 | * in place; report VFP support to userspace. | 427 | * in place; report VFP support to userspace. |
372 | */ | 428 | */ |
373 | elf_hwcap |= HWCAP_VFP; | 429 | elf_hwcap |= HWCAP_VFP; |
430 | #ifdef CONFIG_NEON | ||
431 | /* | ||
432 | * Check for the presence of the Advanced SIMD | ||
433 | * load/store instructions, integer and single | ||
434 | * precision floating point operations. | ||
435 | */ | ||
436 | if ((fmrx(MVFR1) & 0x000fff00) == 0x00011100) | ||
437 | elf_hwcap |= HWCAP_NEON; | ||
438 | #endif | ||
374 | } | 439 | } |
375 | return 0; | 440 | return 0; |
376 | } | 441 | } |
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 74e9cd81b5b2..61f0146e215d 100644 --- a/drivers/char/ds1620.c +++ b/drivers/char/ds1620.c | |||
@@ -43,52 +43,51 @@ static const char *fan_state[] = { "off", "on", "on (hardwired)" }; | |||
43 | * chance that the WaveArtist driver could touch these bits to | 43 | * chance that the WaveArtist driver could touch these bits to |
44 | * enable or disable the speaker. | 44 | * enable or disable the speaker. |
45 | */ | 45 | */ |
46 | extern spinlock_t gpio_lock; | ||
47 | extern unsigned int system_rev; | 46 | extern unsigned int system_rev; |
48 | 47 | ||
49 | static inline void netwinder_ds1620_set_clk(int clk) | 48 | static inline void netwinder_ds1620_set_clk(int clk) |
50 | { | 49 | { |
51 | gpio_modify_op(GPIO_DSCLK, clk ? GPIO_DSCLK : 0); | 50 | nw_gpio_modify_op(GPIO_DSCLK, clk ? GPIO_DSCLK : 0); |
52 | } | 51 | } |
53 | 52 | ||
54 | static inline void netwinder_ds1620_set_data(int dat) | 53 | static inline void netwinder_ds1620_set_data(int dat) |
55 | { | 54 | { |
56 | gpio_modify_op(GPIO_DATA, dat ? GPIO_DATA : 0); | 55 | nw_gpio_modify_op(GPIO_DATA, dat ? GPIO_DATA : 0); |
57 | } | 56 | } |
58 | 57 | ||
59 | static inline int netwinder_ds1620_get_data(void) | 58 | static inline int netwinder_ds1620_get_data(void) |
60 | { | 59 | { |
61 | return gpio_read() & GPIO_DATA; | 60 | return nw_gpio_read() & GPIO_DATA; |
62 | } | 61 | } |
63 | 62 | ||
64 | static inline void netwinder_ds1620_set_data_dir(int dir) | 63 | static inline void netwinder_ds1620_set_data_dir(int dir) |
65 | { | 64 | { |
66 | gpio_modify_io(GPIO_DATA, dir ? GPIO_DATA : 0); | 65 | nw_gpio_modify_io(GPIO_DATA, dir ? GPIO_DATA : 0); |
67 | } | 66 | } |
68 | 67 | ||
69 | static inline void netwinder_ds1620_reset(void) | 68 | static inline void netwinder_ds1620_reset(void) |
70 | { | 69 | { |
71 | cpld_modify(CPLD_DS_ENABLE, 0); | 70 | nw_cpld_modify(CPLD_DS_ENABLE, 0); |
72 | cpld_modify(CPLD_DS_ENABLE, CPLD_DS_ENABLE); | 71 | nw_cpld_modify(CPLD_DS_ENABLE, CPLD_DS_ENABLE); |
73 | } | 72 | } |
74 | 73 | ||
75 | static inline void netwinder_lock(unsigned long *flags) | 74 | static inline void netwinder_lock(unsigned long *flags) |
76 | { | 75 | { |
77 | spin_lock_irqsave(&gpio_lock, *flags); | 76 | spin_lock_irqsave(&nw_gpio_lock, *flags); |
78 | } | 77 | } |
79 | 78 | ||
80 | static inline void netwinder_unlock(unsigned long *flags) | 79 | static inline void netwinder_unlock(unsigned long *flags) |
81 | { | 80 | { |
82 | spin_unlock_irqrestore(&gpio_lock, *flags); | 81 | spin_unlock_irqrestore(&nw_gpio_lock, *flags); |
83 | } | 82 | } |
84 | 83 | ||
85 | static inline void netwinder_set_fan(int i) | 84 | static inline void netwinder_set_fan(int i) |
86 | { | 85 | { |
87 | unsigned long flags; | 86 | unsigned long flags; |
88 | 87 | ||
89 | spin_lock_irqsave(&gpio_lock, flags); | 88 | spin_lock_irqsave(&nw_gpio_lock, flags); |
90 | gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0); | 89 | nw_gpio_modify_op(GPIO_FAN, i ? GPIO_FAN : 0); |
91 | spin_unlock_irqrestore(&gpio_lock, flags); | 90 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
92 | } | 91 | } |
93 | 92 | ||
94 | static inline int netwinder_get_fan(void) | 93 | static inline int netwinder_get_fan(void) |
@@ -96,7 +95,7 @@ static inline int netwinder_get_fan(void) | |||
96 | if ((system_rev & 0xf000) == 0x4000) | 95 | if ((system_rev & 0xf000) == 0x4000) |
97 | return FAN_ALWAYS_ON; | 96 | return FAN_ALWAYS_ON; |
98 | 97 | ||
99 | return (gpio_read() & GPIO_FAN) ? FAN_ON : FAN_OFF; | 98 | return (nw_gpio_read() & GPIO_FAN) ? FAN_ON : FAN_OFF; |
100 | } | 99 | } |
101 | 100 | ||
102 | /* | 101 | /* |
diff --git a/drivers/char/nwflash.c b/drivers/char/nwflash.c index 006be92ee3f3..8c7df5ba088f 100644 --- a/drivers/char/nwflash.c +++ b/drivers/char/nwflash.c | |||
@@ -58,8 +58,6 @@ static volatile unsigned char *FLASH_BASE; | |||
58 | static int gbFlashSize = KFLASH_SIZE; | 58 | static int gbFlashSize = KFLASH_SIZE; |
59 | static DEFINE_MUTEX(nwflash_mutex); | 59 | static DEFINE_MUTEX(nwflash_mutex); |
60 | 60 | ||
61 | extern spinlock_t gpio_lock; | ||
62 | |||
63 | static int get_flash_id(void) | 61 | static int get_flash_id(void) |
64 | { | 62 | { |
65 | volatile unsigned int c1, c2; | 63 | volatile unsigned int c1, c2; |
@@ -616,9 +614,9 @@ static void kick_open(void) | |||
616 | * we want to write a bit pattern XXX1 to Xilinx to enable | 614 | * we want to write a bit pattern XXX1 to Xilinx to enable |
617 | * the write gate, which will be open for about the next 2ms. | 615 | * the write gate, which will be open for about the next 2ms. |
618 | */ | 616 | */ |
619 | spin_lock_irqsave(&gpio_lock, flags); | 617 | spin_lock_irqsave(&nw_gpio_lock, flags); |
620 | cpld_modify(1, 1); | 618 | nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE); |
621 | spin_unlock_irqrestore(&gpio_lock, flags); | 619 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
622 | 620 | ||
623 | /* | 621 | /* |
624 | * let the ISA bus to catch on... | 622 | * let the ISA bus to catch on... |
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 906f9b9d715d..587f5b2380d4 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c | |||
@@ -1016,7 +1016,7 @@ static int i2c_pxa_probe(struct platform_device *dev) | |||
1016 | snprintf(i2c->adap.name, sizeof(i2c->adap.name), "pxa_i2c-i2c.%u", | 1016 | snprintf(i2c->adap.name, sizeof(i2c->adap.name), "pxa_i2c-i2c.%u", |
1017 | i2c->adap.nr); | 1017 | i2c->adap.nr); |
1018 | 1018 | ||
1019 | i2c->clk = clk_get(&dev->dev, "I2CCLK"); | 1019 | i2c->clk = clk_get(&dev->dev, NULL); |
1020 | if (IS_ERR(i2c->clk)) { | 1020 | if (IS_ERR(i2c->clk)) { |
1021 | ret = PTR_ERR(i2c->clk); | 1021 | ret = PTR_ERR(i2c->clk); |
1022 | goto eclk; | 1022 | goto eclk; |
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index b7434d24904e..c39079f9c73f 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -40,8 +40,8 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #include <mach/regs-gpio.h> | 42 | #include <mach/regs-gpio.h> |
43 | #include <asm/plat-s3c/regs-iic.h> | 43 | #include <plat/regs-iic.h> |
44 | #include <asm/plat-s3c/iic.h> | 44 | #include <plat/iic.h> |
45 | 45 | ||
46 | /* i2c controller state */ | 46 | /* i2c controller state */ |
47 | 47 | ||
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index 7a0a84b042c9..c9f21e3d4ead 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -727,7 +727,7 @@ config BLK_DEV_IDE_TX4939 | |||
727 | 727 | ||
728 | config IDE_ARM | 728 | config IDE_ARM |
729 | tristate "ARM IDE support" | 729 | tristate "ARM IDE support" |
730 | depends on ARM && (ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK) | 730 | depends on ARM && (ARCH_RPC || ARCH_SHARK) |
731 | default y | 731 | default y |
732 | 732 | ||
733 | config BLK_DEV_IDE_ICSIDE | 733 | config BLK_DEV_IDE_ICSIDE |
diff --git a/drivers/ide/ide_arm.c b/drivers/ide/ide_arm.c index f728f2927b5a..bdcac94d7c1f 100644 --- a/drivers/ide/ide_arm.c +++ b/drivers/ide/ide_arm.c | |||
@@ -15,15 +15,8 @@ | |||
15 | 15 | ||
16 | #define DRV_NAME "ide_arm" | 16 | #define DRV_NAME "ide_arm" |
17 | 17 | ||
18 | #ifdef CONFIG_ARCH_CLPS7500 | 18 | #define IDE_ARM_IO 0x1f0 |
19 | # include <mach/hardware.h> | 19 | #define IDE_ARM_IRQ IRQ_HARDDISK |
20 | # | ||
21 | # define IDE_ARM_IO (ISASLOT_IO + 0x1f0) | ||
22 | # define IDE_ARM_IRQ IRQ_ISA_14 | ||
23 | #else | ||
24 | # define IDE_ARM_IO 0x1f0 | ||
25 | # define IDE_ARM_IRQ IRQ_HARDDISK | ||
26 | #endif | ||
27 | 20 | ||
28 | static int __init ide_arm_init(void) | 21 | static int __init ide_arm_init(void) |
29 | { | 22 | { |
diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index 69e674ecf19a..db22fd9b4cf2 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c | |||
@@ -101,7 +101,7 @@ static irqreturn_t omap_kp_interrupt(int irq, void *dev_id) | |||
101 | if (cpu_is_omap24xx()) { | 101 | if (cpu_is_omap24xx()) { |
102 | int i; | 102 | int i; |
103 | for (i = 0; i < omap_kp->rows; i++) | 103 | for (i = 0; i < omap_kp->rows; i++) |
104 | disable_irq(OMAP_GPIO_IRQ(row_gpios[i])); | 104 | disable_irq(gpio_to_irq(row_gpios[i])); |
105 | } else | 105 | } else |
106 | /* disable keyboard interrupt and schedule for handling */ | 106 | /* disable keyboard interrupt and schedule for handling */ |
107 | omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 107 | omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |
@@ -224,7 +224,7 @@ static void omap_kp_tasklet(unsigned long data) | |||
224 | if (cpu_is_omap24xx()) { | 224 | if (cpu_is_omap24xx()) { |
225 | int i; | 225 | int i; |
226 | for (i = 0; i < omap_kp_data->rows; i++) | 226 | for (i = 0; i < omap_kp_data->rows; i++) |
227 | enable_irq(OMAP_GPIO_IRQ(row_gpios[i])); | 227 | enable_irq(gpio_to_irq(row_gpios[i])); |
228 | } else { | 228 | } else { |
229 | omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 229 | omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |
230 | kp_cur_group = -1; | 230 | kp_cur_group = -1; |
@@ -397,7 +397,7 @@ static int __init omap_kp_probe(struct platform_device *pdev) | |||
397 | omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 397 | omap_writew(0, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |
398 | } else { | 398 | } else { |
399 | for (irq_idx = 0; irq_idx < omap_kp->rows; irq_idx++) { | 399 | for (irq_idx = 0; irq_idx < omap_kp->rows; irq_idx++) { |
400 | if (request_irq(OMAP_GPIO_IRQ(row_gpios[irq_idx]), | 400 | if (request_irq(gpio_to_irq(row_gpios[irq_idx]), |
401 | omap_kp_interrupt, | 401 | omap_kp_interrupt, |
402 | IRQF_TRIGGER_FALLING, | 402 | IRQF_TRIGGER_FALLING, |
403 | "omap-keypad", omap_kp) < 0) | 403 | "omap-keypad", omap_kp) < 0) |
@@ -438,7 +438,7 @@ static int omap_kp_remove(struct platform_device *pdev) | |||
438 | gpio_free(col_gpios[i]); | 438 | gpio_free(col_gpios[i]); |
439 | for (i = 0; i < omap_kp->rows; i++) { | 439 | for (i = 0; i < omap_kp->rows; i++) { |
440 | gpio_free(row_gpios[i]); | 440 | gpio_free(row_gpios[i]); |
441 | free_irq(OMAP_GPIO_IRQ(row_gpios[i]), 0); | 441 | free_irq(gpio_to_irq(row_gpios[i]), 0); |
442 | } | 442 | } |
443 | } else { | 443 | } else { |
444 | omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); | 444 | omap_writew(1, OMAP_MPUIO_BASE + OMAP_MPUIO_KBD_MASKIT); |
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 6d30c6d334c3..0d2fc64a5e1c 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -475,7 +475,7 @@ static int __devinit pxa27x_keypad_probe(struct platform_device *pdev) | |||
475 | goto failed_free_mem; | 475 | goto failed_free_mem; |
476 | } | 476 | } |
477 | 477 | ||
478 | keypad->clk = clk_get(&pdev->dev, "KBDCLK"); | 478 | keypad->clk = clk_get(&pdev->dev, NULL); |
479 | if (IS_ERR(keypad->clk)) { | 479 | if (IS_ERR(keypad->clk)) { |
480 | dev_err(&pdev->dev, "failed to get keypad clock\n"); | 480 | dev_err(&pdev->dev, "failed to get keypad clock\n"); |
481 | error = PTR_ERR(keypad->clk); | 481 | error = PTR_ERR(keypad->clk); |
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 27d70d326ff3..da3c3a5d2689 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -79,7 +79,7 @@ config SERIO_PARKBD | |||
79 | 79 | ||
80 | config SERIO_RPCKBD | 80 | config SERIO_RPCKBD |
81 | tristate "Acorn RiscPC keyboard controller" | 81 | tristate "Acorn RiscPC keyboard controller" |
82 | depends on ARCH_ACORN || ARCH_CLPS7500 | 82 | depends on ARCH_ACORN |
83 | default y | 83 | default y |
84 | help | 84 | help |
85 | Say Y here if you have the Acorn RiscPC and want to use an AT | 85 | Say Y here if you have the Acorn RiscPC and want to use an AT |
diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c index ba648750a8d9..1d11e2be9ef8 100644 --- a/drivers/input/touchscreen/mainstone-wm97xx.c +++ b/drivers/input/touchscreen/mainstone-wm97xx.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/interrupt.h> | 31 | #include <linux/interrupt.h> |
32 | #include <linux/wm97xx.h> | 32 | #include <linux/wm97xx.h> |
33 | #include <linux/io.h> | 33 | #include <linux/io.h> |
34 | #include <mach/pxa-regs.h> | 34 | #include <mach/regs-ac97.h> |
35 | 35 | ||
36 | #define VERSION "0.13" | 36 | #define VERSION "0.13" |
37 | 37 | ||
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index eb6be5802928..70a77625107d 100644 --- a/drivers/media/video/pxa_camera.c +++ b/drivers/media/video/pxa_camera.c | |||
@@ -39,6 +39,8 @@ | |||
39 | #include <mach/pxa-regs.h> | 39 | #include <mach/pxa-regs.h> |
40 | #include <mach/camera.h> | 40 | #include <mach/camera.h> |
41 | 41 | ||
42 | #include "pxa_camera.h" | ||
43 | |||
42 | #define PXA_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5) | 44 | #define PXA_CAM_VERSION_CODE KERNEL_VERSION(0, 0, 5) |
43 | #define PXA_CAM_DRV_NAME "pxa27x-camera" | 45 | #define PXA_CAM_DRV_NAME "pxa27x-camera" |
44 | 46 | ||
@@ -1071,7 +1073,7 @@ static int pxa_camera_probe(struct platform_device *pdev) | |||
1071 | goto exit; | 1073 | goto exit; |
1072 | } | 1074 | } |
1073 | 1075 | ||
1074 | pcdev->clk = clk_get(&pdev->dev, "CAMCLK"); | 1076 | pcdev->clk = clk_get(&pdev->dev, NULL); |
1075 | if (IS_ERR(pcdev->clk)) { | 1077 | if (IS_ERR(pcdev->clk)) { |
1076 | err = PTR_ERR(pcdev->clk); | 1078 | err = PTR_ERR(pcdev->clk); |
1077 | goto exit_kfree; | 1079 | goto exit_kfree; |
diff --git a/drivers/media/video/pxa_camera.h b/drivers/media/video/pxa_camera.h new file mode 100644 index 000000000000..89cbfc9a35c5 --- /dev/null +++ b/drivers/media/video/pxa_camera.h | |||
@@ -0,0 +1,95 @@ | |||
1 | /* Camera Interface */ | ||
2 | #define CICR0 __REG(0x50000000) | ||
3 | #define CICR1 __REG(0x50000004) | ||
4 | #define CICR2 __REG(0x50000008) | ||
5 | #define CICR3 __REG(0x5000000C) | ||
6 | #define CICR4 __REG(0x50000010) | ||
7 | #define CISR __REG(0x50000014) | ||
8 | #define CIFR __REG(0x50000018) | ||
9 | #define CITOR __REG(0x5000001C) | ||
10 | #define CIBR0 __REG(0x50000028) | ||
11 | #define CIBR1 __REG(0x50000030) | ||
12 | #define CIBR2 __REG(0x50000038) | ||
13 | |||
14 | #define CICR0_DMAEN (1 << 31) /* DMA request enable */ | ||
15 | #define CICR0_PAR_EN (1 << 30) /* Parity enable */ | ||
16 | #define CICR0_SL_CAP_EN (1 << 29) /* Capture enable for slave mode */ | ||
17 | #define CICR0_ENB (1 << 28) /* Camera interface enable */ | ||
18 | #define CICR0_DIS (1 << 27) /* Camera interface disable */ | ||
19 | #define CICR0_SIM (0x7 << 24) /* Sensor interface mode mask */ | ||
20 | #define CICR0_TOM (1 << 9) /* Time-out mask */ | ||
21 | #define CICR0_RDAVM (1 << 8) /* Receive-data-available mask */ | ||
22 | #define CICR0_FEM (1 << 7) /* FIFO-empty mask */ | ||
23 | #define CICR0_EOLM (1 << 6) /* End-of-line mask */ | ||
24 | #define CICR0_PERRM (1 << 5) /* Parity-error mask */ | ||
25 | #define CICR0_QDM (1 << 4) /* Quick-disable mask */ | ||
26 | #define CICR0_CDM (1 << 3) /* Disable-done mask */ | ||
27 | #define CICR0_SOFM (1 << 2) /* Start-of-frame mask */ | ||
28 | #define CICR0_EOFM (1 << 1) /* End-of-frame mask */ | ||
29 | #define CICR0_FOM (1 << 0) /* FIFO-overrun mask */ | ||
30 | |||
31 | #define CICR1_TBIT (1 << 31) /* Transparency bit */ | ||
32 | #define CICR1_RGBT_CONV (0x3 << 29) /* RGBT conversion mask */ | ||
33 | #define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */ | ||
34 | #define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */ | ||
35 | #define CICR1_RGB_F (1 << 11) /* RGB format */ | ||
36 | #define CICR1_YCBCR_F (1 << 10) /* YCbCr format */ | ||
37 | #define CICR1_RGB_BPP (0x7 << 7) /* RGB bis per pixel mask */ | ||
38 | #define CICR1_RAW_BPP (0x3 << 5) /* Raw bis per pixel mask */ | ||
39 | #define CICR1_COLOR_SP (0x3 << 3) /* Color space mask */ | ||
40 | #define CICR1_DW (0x7 << 0) /* Data width mask */ | ||
41 | |||
42 | #define CICR2_BLW (0xff << 24) /* Beginning-of-line pixel clock | ||
43 | wait count mask */ | ||
44 | #define CICR2_ELW (0xff << 16) /* End-of-line pixel clock | ||
45 | wait count mask */ | ||
46 | #define CICR2_HSW (0x3f << 10) /* Horizontal sync pulse width mask */ | ||
47 | #define CICR2_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock | ||
48 | wait count mask */ | ||
49 | #define CICR2_FSW (0x7 << 0) /* Frame stabilization | ||
50 | wait count mask */ | ||
51 | |||
52 | #define CICR3_BFW (0xff << 24) /* Beginning-of-frame line clock | ||
53 | wait count mask */ | ||
54 | #define CICR3_EFW (0xff << 16) /* End-of-frame line clock | ||
55 | wait count mask */ | ||
56 | #define CICR3_VSW (0x3f << 10) /* Vertical sync pulse width mask */ | ||
57 | #define CICR3_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock | ||
58 | wait count mask */ | ||
59 | #define CICR3_LPF (0x7ff << 0) /* Lines per frame mask */ | ||
60 | |||
61 | #define CICR4_MCLK_DLY (0x3 << 24) /* MCLK Data Capture Delay mask */ | ||
62 | #define CICR4_PCLK_EN (1 << 23) /* Pixel clock enable */ | ||
63 | #define CICR4_PCP (1 << 22) /* Pixel clock polarity */ | ||
64 | #define CICR4_HSP (1 << 21) /* Horizontal sync polarity */ | ||
65 | #define CICR4_VSP (1 << 20) /* Vertical sync polarity */ | ||
66 | #define CICR4_MCLK_EN (1 << 19) /* MCLK enable */ | ||
67 | #define CICR4_FR_RATE (0x7 << 8) /* Frame rate mask */ | ||
68 | #define CICR4_DIV (0xff << 0) /* Clock divisor mask */ | ||
69 | |||
70 | #define CISR_FTO (1 << 15) /* FIFO time-out */ | ||
71 | #define CISR_RDAV_2 (1 << 14) /* Channel 2 receive data available */ | ||
72 | #define CISR_RDAV_1 (1 << 13) /* Channel 1 receive data available */ | ||
73 | #define CISR_RDAV_0 (1 << 12) /* Channel 0 receive data available */ | ||
74 | #define CISR_FEMPTY_2 (1 << 11) /* Channel 2 FIFO empty */ | ||
75 | #define CISR_FEMPTY_1 (1 << 10) /* Channel 1 FIFO empty */ | ||
76 | #define CISR_FEMPTY_0 (1 << 9) /* Channel 0 FIFO empty */ | ||
77 | #define CISR_EOL (1 << 8) /* End of line */ | ||
78 | #define CISR_PAR_ERR (1 << 7) /* Parity error */ | ||
79 | #define CISR_CQD (1 << 6) /* Camera interface quick disable */ | ||
80 | #define CISR_CDD (1 << 5) /* Camera interface disable done */ | ||
81 | #define CISR_SOF (1 << 4) /* Start of frame */ | ||
82 | #define CISR_EOF (1 << 3) /* End of frame */ | ||
83 | #define CISR_IFO_2 (1 << 2) /* FIFO overrun for Channel 2 */ | ||
84 | #define CISR_IFO_1 (1 << 1) /* FIFO overrun for Channel 1 */ | ||
85 | #define CISR_IFO_0 (1 << 0) /* FIFO overrun for Channel 0 */ | ||
86 | |||
87 | #define CIFR_FLVL2 (0x7f << 23) /* FIFO 2 level mask */ | ||
88 | #define CIFR_FLVL1 (0x7f << 16) /* FIFO 1 level mask */ | ||
89 | #define CIFR_FLVL0 (0xff << 8) /* FIFO 0 level mask */ | ||
90 | #define CIFR_THL_0 (0x3 << 4) /* Threshold Level for Channel 0 FIFO */ | ||
91 | #define CIFR_RESET_F (1 << 3) /* Reset input FIFOs */ | ||
92 | #define CIFR_FEN2 (1 << 2) /* FIFO enable for channel 2 */ | ||
93 | #define CIFR_FEN1 (1 << 1) /* FIFO enable for channel 1 */ | ||
94 | #define CIFR_FEN0 (1 << 0) /* FIFO enable for channel 0 */ | ||
95 | |||
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index e4c0db4dc7b1..9e485459f63b 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -474,9 +474,9 @@ static __init int asic3_gpio_probe(struct platform_device *pdev, | |||
474 | u16 dir_reg[ASIC3_NUM_GPIO_BANKS]; | 474 | u16 dir_reg[ASIC3_NUM_GPIO_BANKS]; |
475 | int i; | 475 | int i; |
476 | 476 | ||
477 | memzero(alt_reg, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); | 477 | memset(alt_reg, 0, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); |
478 | memzero(out_reg, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); | 478 | memset(out_reg, 0, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); |
479 | memzero(dir_reg, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); | 479 | memset(dir_reg, 0, ASIC3_NUM_GPIO_BANKS * sizeof(u16)); |
480 | 480 | ||
481 | /* Enable all GPIOs */ | 481 | /* Enable all GPIOs */ |
482 | asic3_write_register(asic, ASIC3_GPIO_OFFSET(A, MASK), 0xffff); | 482 | asic3_write_register(asic, ASIC3_GPIO_OFFSET(A, MASK), 0xffff); |
diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c index b4ed57e02729..6063dc2b52e8 100644 --- a/drivers/mfd/mcp-core.c +++ b/drivers/mfd/mcp-core.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/string.h> | 19 | #include <linux/string.h> |
20 | 20 | ||
21 | #include <asm/dma.h> | 21 | #include <mach/dma.h> |
22 | #include <asm/system.h> | 22 | #include <asm/system.h> |
23 | 23 | ||
24 | #include "mcp.h" | 24 | #include "mcp.h" |
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c index 28380b20bc70..62b32dabf629 100644 --- a/drivers/mfd/mcp-sa11x0.c +++ b/drivers/mfd/mcp-sa11x0.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | 22 | ||
23 | #include <asm/dma.h> | 23 | #include <mach/dma.h> |
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
26 | #include <asm/system.h> | 26 | #include <asm/system.h> |
diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c index 61aeaf79640d..86fed4870f93 100644 --- a/drivers/mfd/ucb1x00-assabet.c +++ b/drivers/mfd/ucb1x00-assabet.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
16 | #include <linux/device.h> | 16 | #include <linux/device.h> |
17 | 17 | ||
18 | #include <asm/dma.h> | 18 | #include <mach/dma.h> |
19 | 19 | ||
20 | #include "ucb1x00.h" | 20 | #include "ucb1x00.h" |
21 | 21 | ||
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index a316f1b75933..6860c924f364 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | 27 | ||
28 | #include <asm/dma.h> | 28 | #include <mach/dma.h> |
29 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
30 | 30 | ||
31 | #include "ucb1x00.h" | 31 | #include "ucb1x00.h" |
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c index 44762ca86a8d..61b7d3eb9a2f 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/kthread.h> | 32 | #include <linux/kthread.h> |
33 | 33 | ||
34 | #include <asm/dma.h> | 34 | #include <mach/dma.h> |
35 | #include <mach/collie.h> | 35 | #include <mach/collie.h> |
36 | #include <asm/mach-types.h> | 36 | #include <asm/mach-types.h> |
37 | 37 | ||
diff --git a/drivers/mmc/host/imxmmc.c b/drivers/mmc/host/imxmmc.c index 2f0fcdb869b7..eb29b1d933ac 100644 --- a/drivers/mmc/host/imxmmc.c +++ b/drivers/mmc/host/imxmmc.c | |||
@@ -10,20 +10,6 @@ | |||
10 | * it under the terms of the GNU General Public License version 2 as | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | 12 | * |
13 | * 2005-04-17 Pavel Pisa <pisa@cmp.felk.cvut.cz> | ||
14 | * Changed to conform redesigned i.MX scatter gather DMA interface | ||
15 | * | ||
16 | * 2005-11-04 Pavel Pisa <pisa@cmp.felk.cvut.cz> | ||
17 | * Updated for 2.6.14 kernel | ||
18 | * | ||
19 | * 2005-12-13 Jay Monkman <jtm@smoothsmoothie.com> | ||
20 | * Found and corrected problems in the write path | ||
21 | * | ||
22 | * 2005-12-30 Pavel Pisa <pisa@cmp.felk.cvut.cz> | ||
23 | * The event handling rewritten right way in softirq. | ||
24 | * Added many ugly hacks and delays to overcome SDHC | ||
25 | * deficiencies | ||
26 | * | ||
27 | */ | 13 | */ |
28 | 14 | ||
29 | #include <linux/module.h> | 15 | #include <linux/module.h> |
@@ -37,9 +23,9 @@ | |||
37 | #include <linux/mmc/card.h> | 23 | #include <linux/mmc/card.h> |
38 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
39 | #include <linux/clk.h> | 25 | #include <linux/clk.h> |
26 | #include <linux/io.h> | ||
40 | 27 | ||
41 | #include <asm/dma.h> | 28 | #include <asm/dma.h> |
42 | #include <asm/io.h> | ||
43 | #include <asm/irq.h> | 29 | #include <asm/irq.h> |
44 | #include <asm/sizes.h> | 30 | #include <asm/sizes.h> |
45 | #include <mach/mmc.h> | 31 | #include <mach/mmc.h> |
@@ -50,17 +36,16 @@ | |||
50 | #define DRIVER_NAME "imx-mmc" | 36 | #define DRIVER_NAME "imx-mmc" |
51 | 37 | ||
52 | #define IMXMCI_INT_MASK_DEFAULT (INT_MASK_BUF_READY | INT_MASK_DATA_TRAN | \ | 38 | #define IMXMCI_INT_MASK_DEFAULT (INT_MASK_BUF_READY | INT_MASK_DATA_TRAN | \ |
53 | INT_MASK_WRITE_OP_DONE | INT_MASK_END_CMD_RES | \ | 39 | INT_MASK_WRITE_OP_DONE | INT_MASK_END_CMD_RES | \ |
54 | INT_MASK_AUTO_CARD_DETECT | INT_MASK_DAT0_EN | INT_MASK_SDIO) | 40 | INT_MASK_AUTO_CARD_DETECT | INT_MASK_DAT0_EN | INT_MASK_SDIO) |
55 | 41 | ||
56 | struct imxmci_host { | 42 | struct imxmci_host { |
57 | struct mmc_host *mmc; | 43 | struct mmc_host *mmc; |
58 | spinlock_t lock; | 44 | spinlock_t lock; |
59 | struct resource *res; | 45 | struct resource *res; |
46 | void __iomem *base; | ||
60 | int irq; | 47 | int irq; |
61 | imx_dmach_t dma; | 48 | imx_dmach_t dma; |
62 | unsigned int clkrt; | ||
63 | unsigned int cmdat; | ||
64 | volatile unsigned int imask; | 49 | volatile unsigned int imask; |
65 | unsigned int power_mode; | 50 | unsigned int power_mode; |
66 | unsigned int present; | 51 | unsigned int present; |
@@ -74,7 +59,7 @@ struct imxmci_host { | |||
74 | struct tasklet_struct tasklet; | 59 | struct tasklet_struct tasklet; |
75 | unsigned int status_reg; | 60 | unsigned int status_reg; |
76 | unsigned long pending_events; | 61 | unsigned long pending_events; |
77 | /* Next to fields are there for CPU driven transfers to overcome SDHC deficiencies */ | 62 | /* Next two fields are there for CPU driven transfers to overcome SDHC deficiencies */ |
78 | u16 *data_ptr; | 63 | u16 *data_ptr; |
79 | unsigned int data_cnt; | 64 | unsigned int data_cnt; |
80 | atomic_t stuck_timeout; | 65 | atomic_t stuck_timeout; |
@@ -114,14 +99,22 @@ struct imxmci_host { | |||
114 | static void imxmci_stop_clock(struct imxmci_host *host) | 99 | static void imxmci_stop_clock(struct imxmci_host *host) |
115 | { | 100 | { |
116 | int i = 0; | 101 | int i = 0; |
117 | MMC_STR_STP_CLK &= ~STR_STP_CLK_START_CLK; | 102 | u16 reg; |
118 | while(i < 0x1000) { | 103 | |
119 | if(!(i & 0x7f)) | 104 | reg = readw(host->base + MMC_REG_STR_STP_CLK); |
120 | MMC_STR_STP_CLK |= STR_STP_CLK_STOP_CLK; | 105 | writew(reg & ~STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK); |
106 | while (i < 0x1000) { | ||
107 | if (!(i & 0x7f)) { | ||
108 | reg = readw(host->base + MMC_REG_STR_STP_CLK); | ||
109 | writew(reg | STR_STP_CLK_STOP_CLK, | ||
110 | host->base + MMC_REG_STR_STP_CLK); | ||
111 | } | ||
121 | 112 | ||
122 | if(!(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN)) { | 113 | reg = readw(host->base + MMC_REG_STATUS); |
114 | if (!(reg & STATUS_CARD_BUS_CLK_RUN)) { | ||
123 | /* Check twice before cut */ | 115 | /* Check twice before cut */ |
124 | if(!(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN)) | 116 | reg = readw(host->base + MMC_REG_STATUS); |
117 | if (!(reg & STATUS_CARD_BUS_CLK_RUN)) | ||
125 | return; | 118 | return; |
126 | } | 119 | } |
127 | 120 | ||
@@ -135,8 +128,10 @@ static int imxmci_start_clock(struct imxmci_host *host) | |||
135 | unsigned int trials = 0; | 128 | unsigned int trials = 0; |
136 | unsigned int delay_limit = 128; | 129 | unsigned int delay_limit = 128; |
137 | unsigned long flags; | 130 | unsigned long flags; |
131 | u16 reg; | ||
138 | 132 | ||
139 | MMC_STR_STP_CLK &= ~STR_STP_CLK_STOP_CLK; | 133 | reg = readw(host->base + MMC_REG_STR_STP_CLK); |
134 | writew(reg & ~STR_STP_CLK_STOP_CLK, host->base + MMC_REG_STR_STP_CLK); | ||
140 | 135 | ||
141 | clear_bit(IMXMCI_PEND_STARTED_b, &host->pending_events); | 136 | clear_bit(IMXMCI_PEND_STARTED_b, &host->pending_events); |
142 | 137 | ||
@@ -145,18 +140,21 @@ static int imxmci_start_clock(struct imxmci_host *host) | |||
145 | * then 6 delay loops, but during card detection (low clockrate) | 140 | * then 6 delay loops, but during card detection (low clockrate) |
146 | * it takes up to 5000 delay loops and sometimes fails for the first time | 141 | * it takes up to 5000 delay loops and sometimes fails for the first time |
147 | */ | 142 | */ |
148 | MMC_STR_STP_CLK |= STR_STP_CLK_START_CLK; | 143 | reg = readw(host->base + MMC_REG_STR_STP_CLK); |
144 | writew(reg | STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK); | ||
149 | 145 | ||
150 | do { | 146 | do { |
151 | unsigned int delay = delay_limit; | 147 | unsigned int delay = delay_limit; |
152 | 148 | ||
153 | while(delay--){ | 149 | while (delay--) { |
154 | if(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN) | 150 | reg = readw(host->base + MMC_REG_STATUS); |
151 | if (reg & STATUS_CARD_BUS_CLK_RUN) | ||
155 | /* Check twice before cut */ | 152 | /* Check twice before cut */ |
156 | if(MMC_STATUS & STATUS_CARD_BUS_CLK_RUN) | 153 | reg = readw(host->base + MMC_REG_STATUS); |
154 | if (reg & STATUS_CARD_BUS_CLK_RUN) | ||
157 | return 0; | 155 | return 0; |
158 | 156 | ||
159 | if(test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) | 157 | if (test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) |
160 | return 0; | 158 | return 0; |
161 | } | 159 | } |
162 | 160 | ||
@@ -167,58 +165,59 @@ static int imxmci_start_clock(struct imxmci_host *host) | |||
167 | * IRQ or schedule delays this function execution and the clocks has | 165 | * IRQ or schedule delays this function execution and the clocks has |
168 | * been already stopped by other means (response processing, SDHC HW) | 166 | * been already stopped by other means (response processing, SDHC HW) |
169 | */ | 167 | */ |
170 | if(!test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) | 168 | if (!test_bit(IMXMCI_PEND_STARTED_b, &host->pending_events)) { |
171 | MMC_STR_STP_CLK |= STR_STP_CLK_START_CLK; | 169 | reg = readw(host->base + MMC_REG_STR_STP_CLK); |
170 | writew(reg | STR_STP_CLK_START_CLK, | ||
171 | host->base + MMC_REG_STR_STP_CLK); | ||
172 | } | ||
172 | local_irq_restore(flags); | 173 | local_irq_restore(flags); |
173 | 174 | ||
174 | } while(++trials<256); | 175 | } while (++trials < 256); |
175 | 176 | ||
176 | dev_err(mmc_dev(host->mmc), "imxmci_start_clock blocked, no luck\n"); | 177 | dev_err(mmc_dev(host->mmc), "imxmci_start_clock blocked, no luck\n"); |
177 | 178 | ||
178 | return -1; | 179 | return -1; |
179 | } | 180 | } |
180 | 181 | ||
181 | static void imxmci_softreset(void) | 182 | static void imxmci_softreset(struct imxmci_host *host) |
182 | { | 183 | { |
184 | int i; | ||
185 | |||
183 | /* reset sequence */ | 186 | /* reset sequence */ |
184 | MMC_STR_STP_CLK = 0x8; | 187 | writew(0x08, host->base + MMC_REG_STR_STP_CLK); |
185 | MMC_STR_STP_CLK = 0xD; | 188 | writew(0x0D, host->base + MMC_REG_STR_STP_CLK); |
186 | MMC_STR_STP_CLK = 0x5; | 189 | |
187 | MMC_STR_STP_CLK = 0x5; | 190 | for (i = 0; i < 8; i++) |
188 | MMC_STR_STP_CLK = 0x5; | 191 | writew(0x05, host->base + MMC_REG_STR_STP_CLK); |
189 | MMC_STR_STP_CLK = 0x5; | 192 | |
190 | MMC_STR_STP_CLK = 0x5; | 193 | writew(0xff, host->base + MMC_REG_RES_TO); |
191 | MMC_STR_STP_CLK = 0x5; | 194 | writew(512, host->base + MMC_REG_BLK_LEN); |
192 | MMC_STR_STP_CLK = 0x5; | 195 | writew(1, host->base + MMC_REG_NOB); |
193 | MMC_STR_STP_CLK = 0x5; | ||
194 | |||
195 | MMC_RES_TO = 0xff; | ||
196 | MMC_BLK_LEN = 512; | ||
197 | MMC_NOB = 1; | ||
198 | } | 196 | } |
199 | 197 | ||
200 | static int imxmci_busy_wait_for_status(struct imxmci_host *host, | 198 | static int imxmci_busy_wait_for_status(struct imxmci_host *host, |
201 | unsigned int *pstat, unsigned int stat_mask, | 199 | unsigned int *pstat, unsigned int stat_mask, |
202 | int timeout, const char *where) | 200 | int timeout, const char *where) |
203 | { | 201 | { |
204 | int loops=0; | 202 | int loops = 0; |
205 | while(!(*pstat & stat_mask)) { | 203 | |
206 | loops+=2; | 204 | while (!(*pstat & stat_mask)) { |
207 | if(loops >= timeout) { | 205 | loops += 2; |
206 | if (loops >= timeout) { | ||
208 | dev_dbg(mmc_dev(host->mmc), "busy wait timeout in %s, STATUS = 0x%x (0x%x)\n", | 207 | dev_dbg(mmc_dev(host->mmc), "busy wait timeout in %s, STATUS = 0x%x (0x%x)\n", |
209 | where, *pstat, stat_mask); | 208 | where, *pstat, stat_mask); |
210 | return -1; | 209 | return -1; |
211 | } | 210 | } |
212 | udelay(2); | 211 | udelay(2); |
213 | *pstat |= MMC_STATUS; | 212 | *pstat |= readw(host->base + MMC_REG_STATUS); |
214 | } | 213 | } |
215 | if(!loops) | 214 | if (!loops) |
216 | return 0; | 215 | return 0; |
217 | 216 | ||
218 | /* The busy-wait is expected there for clock <8MHz due to SDHC hardware flaws */ | 217 | /* The busy-wait is expected there for clock <8MHz due to SDHC hardware flaws */ |
219 | if(!(stat_mask & STATUS_END_CMD_RESP) || (host->mmc->ios.clock>=8000000)) | 218 | if (!(stat_mask & STATUS_END_CMD_RESP) || (host->mmc->ios.clock >= 8000000)) |
220 | dev_info(mmc_dev(host->mmc), "busy wait for %d usec in %s, STATUS = 0x%x (0x%x)\n", | 219 | dev_info(mmc_dev(host->mmc), "busy wait for %d usec in %s, STATUS = 0x%x (0x%x)\n", |
221 | loops, where, *pstat, stat_mask); | 220 | loops, where, *pstat, stat_mask); |
222 | return loops; | 221 | return loops; |
223 | } | 222 | } |
224 | 223 | ||
@@ -235,8 +234,8 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
235 | host->data = data; | 234 | host->data = data; |
236 | data->bytes_xfered = 0; | 235 | data->bytes_xfered = 0; |
237 | 236 | ||
238 | MMC_NOB = nob; | 237 | writew(nob, host->base + MMC_REG_NOB); |
239 | MMC_BLK_LEN = blksz; | 238 | writew(blksz, host->base + MMC_REG_BLK_LEN); |
240 | 239 | ||
241 | /* | 240 | /* |
242 | * DMA cannot be used for small block sizes, we have to use CPU driven transfers otherwise. | 241 | * DMA cannot be used for small block sizes, we have to use CPU driven transfers otherwise. |
@@ -252,14 +251,14 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
252 | host->dma_dir = DMA_FROM_DEVICE; | 251 | host->dma_dir = DMA_FROM_DEVICE; |
253 | 252 | ||
254 | /* Hack to enable read SCR */ | 253 | /* Hack to enable read SCR */ |
255 | MMC_NOB = 1; | 254 | writew(1, host->base + MMC_REG_NOB); |
256 | MMC_BLK_LEN = 512; | 255 | writew(512, host->base + MMC_REG_BLK_LEN); |
257 | } else { | 256 | } else { |
258 | host->dma_dir = DMA_TO_DEVICE; | 257 | host->dma_dir = DMA_TO_DEVICE; |
259 | } | 258 | } |
260 | 259 | ||
261 | /* Convert back to virtual address */ | 260 | /* Convert back to virtual address */ |
262 | host->data_ptr = (u16*)sg_virt(data->sg); | 261 | host->data_ptr = (u16 *)sg_virt(data->sg); |
263 | host->data_cnt = 0; | 262 | host->data_cnt = 0; |
264 | 263 | ||
265 | clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events); | 264 | clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events); |
@@ -271,10 +270,11 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
271 | if (data->flags & MMC_DATA_READ) { | 270 | if (data->flags & MMC_DATA_READ) { |
272 | host->dma_dir = DMA_FROM_DEVICE; | 271 | host->dma_dir = DMA_FROM_DEVICE; |
273 | host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, | 272 | host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, |
274 | data->sg_len, host->dma_dir); | 273 | data->sg_len, host->dma_dir); |
275 | 274 | ||
276 | imx_dma_setup_sg(host->dma, data->sg, data->sg_len, datasz, | 275 | imx_dma_setup_sg(host->dma, data->sg, data->sg_len, datasz, |
277 | host->res->start + MMC_BUFFER_ACCESS_OFS, DMA_MODE_READ); | 276 | host->res->start + MMC_REG_BUFFER_ACCESS, |
277 | DMA_MODE_READ); | ||
278 | 278 | ||
279 | /*imx_dma_setup_mem2dev_ccr(host->dma, DMA_MODE_READ, IMX_DMA_WIDTH_16, CCR_REN);*/ | 279 | /*imx_dma_setup_mem2dev_ccr(host->dma, DMA_MODE_READ, IMX_DMA_WIDTH_16, CCR_REN);*/ |
280 | CCR(host->dma) = CCR_DMOD_LINEAR | CCR_DSIZ_32 | CCR_SMOD_FIFO | CCR_SSIZ_16 | CCR_REN; | 280 | CCR(host->dma) = CCR_DMOD_LINEAR | CCR_DSIZ_32 | CCR_SMOD_FIFO | CCR_SSIZ_16 | CCR_REN; |
@@ -282,10 +282,11 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
282 | host->dma_dir = DMA_TO_DEVICE; | 282 | host->dma_dir = DMA_TO_DEVICE; |
283 | 283 | ||
284 | host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, | 284 | host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, |
285 | data->sg_len, host->dma_dir); | 285 | data->sg_len, host->dma_dir); |
286 | 286 | ||
287 | imx_dma_setup_sg(host->dma, data->sg, data->sg_len, datasz, | 287 | imx_dma_setup_sg(host->dma, data->sg, data->sg_len, datasz, |
288 | host->res->start + MMC_BUFFER_ACCESS_OFS, DMA_MODE_WRITE); | 288 | host->res->start + MMC_REG_BUFFER_ACCESS, |
289 | DMA_MODE_WRITE); | ||
289 | 290 | ||
290 | /*imx_dma_setup_mem2dev_ccr(host->dma, DMA_MODE_WRITE, IMX_DMA_WIDTH_16, CCR_REN);*/ | 291 | /*imx_dma_setup_mem2dev_ccr(host->dma, DMA_MODE_WRITE, IMX_DMA_WIDTH_16, CCR_REN);*/ |
291 | CCR(host->dma) = CCR_SMOD_LINEAR | CCR_SSIZ_32 | CCR_DMOD_FIFO | CCR_DSIZ_16 | CCR_REN; | 292 | CCR(host->dma) = CCR_SMOD_LINEAR | CCR_SSIZ_32 | CCR_DMOD_FIFO | CCR_DSIZ_16 | CCR_REN; |
@@ -293,12 +294,12 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
293 | 294 | ||
294 | #if 1 /* This code is there only for consistency checking and can be disabled in future */ | 295 | #if 1 /* This code is there only for consistency checking and can be disabled in future */ |
295 | host->dma_size = 0; | 296 | host->dma_size = 0; |
296 | for(i=0; i<host->dma_nents; i++) | 297 | for (i = 0; i < host->dma_nents; i++) |
297 | host->dma_size+=data->sg[i].length; | 298 | host->dma_size += data->sg[i].length; |
298 | 299 | ||
299 | if (datasz > host->dma_size) { | 300 | if (datasz > host->dma_size) { |
300 | dev_err(mmc_dev(host->mmc), "imxmci_setup_data datasz 0x%x > 0x%x dm_size\n", | 301 | dev_err(mmc_dev(host->mmc), "imxmci_setup_data datasz 0x%x > 0x%x dm_size\n", |
301 | datasz, host->dma_size); | 302 | datasz, host->dma_size); |
302 | } | 303 | } |
303 | #endif | 304 | #endif |
304 | 305 | ||
@@ -306,7 +307,7 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
306 | 307 | ||
307 | wmb(); | 308 | wmb(); |
308 | 309 | ||
309 | if(host->actual_bus_width == MMC_BUS_WIDTH_4) | 310 | if (host->actual_bus_width == MMC_BUS_WIDTH_4) |
310 | BLR(host->dma) = 0; /* burst 64 byte read / 64 bytes write */ | 311 | BLR(host->dma) = 0; /* burst 64 byte read / 64 bytes write */ |
311 | else | 312 | else |
312 | BLR(host->dma) = 16; /* burst 16 byte read / 16 bytes write */ | 313 | BLR(host->dma) = 16; /* burst 16 byte read / 16 bytes write */ |
@@ -317,9 +318,8 @@ static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | |||
317 | clear_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events); | 318 | clear_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events); |
318 | 319 | ||
319 | /* start DMA engine for read, write is delayed after initial response */ | 320 | /* start DMA engine for read, write is delayed after initial response */ |
320 | if (host->dma_dir == DMA_FROM_DEVICE) { | 321 | if (host->dma_dir == DMA_FROM_DEVICE) |
321 | imx_dma_enable(host->dma); | 322 | imx_dma_enable(host->dma); |
322 | } | ||
323 | } | 323 | } |
324 | 324 | ||
325 | static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd, unsigned int cmdat) | 325 | static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd, unsigned int cmdat) |
@@ -351,16 +351,16 @@ static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd, | |||
351 | break; | 351 | break; |
352 | } | 352 | } |
353 | 353 | ||
354 | if ( test_and_clear_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events) ) | 354 | if (test_and_clear_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events)) |
355 | cmdat |= CMD_DAT_CONT_INIT; /* This command needs init */ | 355 | cmdat |= CMD_DAT_CONT_INIT; /* This command needs init */ |
356 | 356 | ||
357 | if ( host->actual_bus_width == MMC_BUS_WIDTH_4 ) | 357 | if (host->actual_bus_width == MMC_BUS_WIDTH_4) |
358 | cmdat |= CMD_DAT_CONT_BUS_WIDTH_4; | 358 | cmdat |= CMD_DAT_CONT_BUS_WIDTH_4; |
359 | 359 | ||
360 | MMC_CMD = cmd->opcode; | 360 | writew(cmd->opcode, host->base + MMC_REG_CMD); |
361 | MMC_ARGH = cmd->arg >> 16; | 361 | writew(cmd->arg >> 16, host->base + MMC_REG_ARGH); |
362 | MMC_ARGL = cmd->arg & 0xffff; | 362 | writew(cmd->arg & 0xffff, host->base + MMC_REG_ARGL); |
363 | MMC_CMD_DAT_CONT = cmdat; | 363 | writew(cmdat, host->base + MMC_REG_CMD_DAT_CONT); |
364 | 364 | ||
365 | atomic_set(&host->stuck_timeout, 0); | 365 | atomic_set(&host->stuck_timeout, 0); |
366 | set_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events); | 366 | set_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events); |
@@ -368,18 +368,18 @@ static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd, | |||
368 | 368 | ||
369 | imask = IMXMCI_INT_MASK_DEFAULT; | 369 | imask = IMXMCI_INT_MASK_DEFAULT; |
370 | imask &= ~INT_MASK_END_CMD_RES; | 370 | imask &= ~INT_MASK_END_CMD_RES; |
371 | if ( cmdat & CMD_DAT_CONT_DATA_ENABLE ) { | 371 | if (cmdat & CMD_DAT_CONT_DATA_ENABLE) { |
372 | /*imask &= ~INT_MASK_BUF_READY;*/ | 372 | /* imask &= ~INT_MASK_BUF_READY; */ |
373 | imask &= ~INT_MASK_DATA_TRAN; | 373 | imask &= ~INT_MASK_DATA_TRAN; |
374 | if ( cmdat & CMD_DAT_CONT_WRITE ) | 374 | if (cmdat & CMD_DAT_CONT_WRITE) |
375 | imask &= ~INT_MASK_WRITE_OP_DONE; | 375 | imask &= ~INT_MASK_WRITE_OP_DONE; |
376 | if(test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) | 376 | if (test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) |
377 | imask &= ~INT_MASK_BUF_READY; | 377 | imask &= ~INT_MASK_BUF_READY; |
378 | } | 378 | } |
379 | 379 | ||
380 | spin_lock_irqsave(&host->lock, flags); | 380 | spin_lock_irqsave(&host->lock, flags); |
381 | host->imask = imask; | 381 | host->imask = imask; |
382 | MMC_INT_MASK = host->imask; | 382 | writew(host->imask, host->base + MMC_REG_INT_MASK); |
383 | spin_unlock_irqrestore(&host->lock, flags); | 383 | spin_unlock_irqrestore(&host->lock, flags); |
384 | 384 | ||
385 | dev_dbg(mmc_dev(host->mmc), "CMD%02d (0x%02x) mask set to 0x%04x\n", | 385 | dev_dbg(mmc_dev(host->mmc), "CMD%02d (0x%02x) mask set to 0x%04x\n", |
@@ -395,14 +395,14 @@ static void imxmci_finish_request(struct imxmci_host *host, struct mmc_request * | |||
395 | spin_lock_irqsave(&host->lock, flags); | 395 | spin_lock_irqsave(&host->lock, flags); |
396 | 396 | ||
397 | host->pending_events &= ~(IMXMCI_PEND_WAIT_RESP_m | IMXMCI_PEND_DMA_END_m | | 397 | host->pending_events &= ~(IMXMCI_PEND_WAIT_RESP_m | IMXMCI_PEND_DMA_END_m | |
398 | IMXMCI_PEND_DMA_DATA_m | IMXMCI_PEND_CPU_DATA_m); | 398 | IMXMCI_PEND_DMA_DATA_m | IMXMCI_PEND_CPU_DATA_m); |
399 | 399 | ||
400 | host->imask = IMXMCI_INT_MASK_DEFAULT; | 400 | host->imask = IMXMCI_INT_MASK_DEFAULT; |
401 | MMC_INT_MASK = host->imask; | 401 | writew(host->imask, host->base + MMC_REG_INT_MASK); |
402 | 402 | ||
403 | spin_unlock_irqrestore(&host->lock, flags); | 403 | spin_unlock_irqrestore(&host->lock, flags); |
404 | 404 | ||
405 | if(req && req->cmd) | 405 | if (req && req->cmd) |
406 | host->prev_cmd_code = req->cmd->opcode; | 406 | host->prev_cmd_code = req->cmd->opcode; |
407 | 407 | ||
408 | host->req = NULL; | 408 | host->req = NULL; |
@@ -416,17 +416,17 @@ static int imxmci_finish_data(struct imxmci_host *host, unsigned int stat) | |||
416 | struct mmc_data *data = host->data; | 416 | struct mmc_data *data = host->data; |
417 | int data_error; | 417 | int data_error; |
418 | 418 | ||
419 | if(test_and_clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)){ | 419 | if (test_and_clear_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) { |
420 | imx_dma_disable(host->dma); | 420 | imx_dma_disable(host->dma); |
421 | dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_nents, | 421 | dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_nents, |
422 | host->dma_dir); | 422 | host->dma_dir); |
423 | } | 423 | } |
424 | 424 | ||
425 | if ( stat & STATUS_ERR_MASK ) { | 425 | if (stat & STATUS_ERR_MASK) { |
426 | dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n",stat); | 426 | dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n", stat); |
427 | if(stat & (STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR)) | 427 | if (stat & (STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR)) |
428 | data->error = -EILSEQ; | 428 | data->error = -EILSEQ; |
429 | else if(stat & STATUS_TIME_OUT_READ) | 429 | else if (stat & STATUS_TIME_OUT_READ) |
430 | data->error = -ETIMEDOUT; | 430 | data->error = -ETIMEDOUT; |
431 | else | 431 | else |
432 | data->error = -EIO; | 432 | data->error = -EIO; |
@@ -445,7 +445,7 @@ static int imxmci_cmd_done(struct imxmci_host *host, unsigned int stat) | |||
445 | { | 445 | { |
446 | struct mmc_command *cmd = host->cmd; | 446 | struct mmc_command *cmd = host->cmd; |
447 | int i; | 447 | int i; |
448 | u32 a,b,c; | 448 | u32 a, b, c; |
449 | struct mmc_data *data = host->data; | 449 | struct mmc_data *data = host->data; |
450 | 450 | ||
451 | if (!cmd) | 451 | if (!cmd) |
@@ -461,18 +461,18 @@ static int imxmci_cmd_done(struct imxmci_host *host, unsigned int stat) | |||
461 | cmd->error = -EILSEQ; | 461 | cmd->error = -EILSEQ; |
462 | } | 462 | } |
463 | 463 | ||
464 | if(cmd->flags & MMC_RSP_PRESENT) { | 464 | if (cmd->flags & MMC_RSP_PRESENT) { |
465 | if(cmd->flags & MMC_RSP_136) { | 465 | if (cmd->flags & MMC_RSP_136) { |
466 | for (i = 0; i < 4; i++) { | 466 | for (i = 0; i < 4; i++) { |
467 | u32 a = MMC_RES_FIFO & 0xffff; | 467 | a = readw(host->base + MMC_REG_RES_FIFO); |
468 | u32 b = MMC_RES_FIFO & 0xffff; | 468 | b = readw(host->base + MMC_REG_RES_FIFO); |
469 | cmd->resp[i] = a<<16 | b; | 469 | cmd->resp[i] = a << 16 | b; |
470 | } | 470 | } |
471 | } else { | 471 | } else { |
472 | a = MMC_RES_FIFO & 0xffff; | 472 | a = readw(host->base + MMC_REG_RES_FIFO); |
473 | b = MMC_RES_FIFO & 0xffff; | 473 | b = readw(host->base + MMC_REG_RES_FIFO); |
474 | c = MMC_RES_FIFO & 0xffff; | 474 | c = readw(host->base + MMC_REG_RES_FIFO); |
475 | cmd->resp[0] = a<<24 | b<<8 | c>>8; | 475 | cmd->resp[0] = a << 24 | b << 8 | c >> 8; |
476 | } | 476 | } |
477 | } | 477 | } |
478 | 478 | ||
@@ -484,36 +484,34 @@ static int imxmci_cmd_done(struct imxmci_host *host, unsigned int stat) | |||
484 | 484 | ||
485 | /* Wait for FIFO to be empty before starting DMA write */ | 485 | /* Wait for FIFO to be empty before starting DMA write */ |
486 | 486 | ||
487 | stat = MMC_STATUS; | 487 | stat = readw(host->base + MMC_REG_STATUS); |
488 | if(imxmci_busy_wait_for_status(host, &stat, | 488 | if (imxmci_busy_wait_for_status(host, &stat, |
489 | STATUS_APPL_BUFF_FE, | 489 | STATUS_APPL_BUFF_FE, |
490 | 40, "imxmci_cmd_done DMA WR") < 0) { | 490 | 40, "imxmci_cmd_done DMA WR") < 0) { |
491 | cmd->error = -EIO; | 491 | cmd->error = -EIO; |
492 | imxmci_finish_data(host, stat); | 492 | imxmci_finish_data(host, stat); |
493 | if(host->req) | 493 | if (host->req) |
494 | imxmci_finish_request(host, host->req); | 494 | imxmci_finish_request(host, host->req); |
495 | dev_warn(mmc_dev(host->mmc), "STATUS = 0x%04x\n", | 495 | dev_warn(mmc_dev(host->mmc), "STATUS = 0x%04x\n", |
496 | stat); | 496 | stat); |
497 | return 0; | 497 | return 0; |
498 | } | 498 | } |
499 | 499 | ||
500 | if(test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) { | 500 | if (test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) |
501 | imx_dma_enable(host->dma); | 501 | imx_dma_enable(host->dma); |
502 | } | ||
503 | } | 502 | } |
504 | } else { | 503 | } else { |
505 | struct mmc_request *req; | 504 | struct mmc_request *req; |
506 | imxmci_stop_clock(host); | 505 | imxmci_stop_clock(host); |
507 | req = host->req; | 506 | req = host->req; |
508 | 507 | ||
509 | if(data) | 508 | if (data) |
510 | imxmci_finish_data(host, stat); | 509 | imxmci_finish_data(host, stat); |
511 | 510 | ||
512 | if( req ) { | 511 | if (req) |
513 | imxmci_finish_request(host, req); | 512 | imxmci_finish_request(host, req); |
514 | } else { | 513 | else |
515 | dev_warn(mmc_dev(host->mmc), "imxmci_cmd_done: no request to finish\n"); | 514 | dev_warn(mmc_dev(host->mmc), "imxmci_cmd_done: no request to finish\n"); |
516 | } | ||
517 | } | 515 | } |
518 | 516 | ||
519 | return 1; | 517 | return 1; |
@@ -535,11 +533,10 @@ static int imxmci_data_done(struct imxmci_host *host, unsigned int stat) | |||
535 | } else { | 533 | } else { |
536 | struct mmc_request *req; | 534 | struct mmc_request *req; |
537 | req = host->req; | 535 | req = host->req; |
538 | if( req ) { | 536 | if (req) |
539 | imxmci_finish_request(host, req); | 537 | imxmci_finish_request(host, req); |
540 | } else { | 538 | else |
541 | dev_warn(mmc_dev(host->mmc), "imxmci_data_done: no request to finish\n"); | 539 | dev_warn(mmc_dev(host->mmc), "imxmci_data_done: no request to finish\n"); |
542 | } | ||
543 | } | 540 | } |
544 | 541 | ||
545 | return 1; | 542 | return 1; |
@@ -552,7 +549,7 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
552 | int trans_done = 0; | 549 | int trans_done = 0; |
553 | unsigned int stat = *pstat; | 550 | unsigned int stat = *pstat; |
554 | 551 | ||
555 | if(host->actual_bus_width != MMC_BUS_WIDTH_4) | 552 | if (host->actual_bus_width != MMC_BUS_WIDTH_4) |
556 | burst_len = 16; | 553 | burst_len = 16; |
557 | else | 554 | else |
558 | burst_len = 64; | 555 | burst_len = 64; |
@@ -563,44 +560,44 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
563 | 560 | ||
564 | udelay(20); /* required for clocks < 8MHz*/ | 561 | udelay(20); /* required for clocks < 8MHz*/ |
565 | 562 | ||
566 | if(host->dma_dir == DMA_FROM_DEVICE) { | 563 | if (host->dma_dir == DMA_FROM_DEVICE) { |
567 | imxmci_busy_wait_for_status(host, &stat, | 564 | imxmci_busy_wait_for_status(host, &stat, |
568 | STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE | | 565 | STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE | |
569 | STATUS_TIME_OUT_READ, | 566 | STATUS_TIME_OUT_READ, |
570 | 50, "imxmci_cpu_driven_data read"); | 567 | 50, "imxmci_cpu_driven_data read"); |
571 | 568 | ||
572 | while((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && | 569 | while ((stat & (STATUS_APPL_BUFF_FF | STATUS_DATA_TRANS_DONE)) && |
573 | !(stat & STATUS_TIME_OUT_READ) && | 570 | !(stat & STATUS_TIME_OUT_READ) && |
574 | (host->data_cnt < 512)) { | 571 | (host->data_cnt < 512)) { |
575 | 572 | ||
576 | udelay(20); /* required for clocks < 8MHz*/ | 573 | udelay(20); /* required for clocks < 8MHz*/ |
577 | 574 | ||
578 | for(i = burst_len; i>=2 ; i-=2) { | 575 | for (i = burst_len; i >= 2 ; i -= 2) { |
579 | u16 data; | 576 | u16 data; |
580 | data = MMC_BUFFER_ACCESS; | 577 | data = readw(host->base + MMC_REG_BUFFER_ACCESS); |
581 | udelay(10); /* required for clocks < 8MHz*/ | 578 | udelay(10); /* required for clocks < 8MHz*/ |
582 | if(host->data_cnt+2 <= host->dma_size) { | 579 | if (host->data_cnt+2 <= host->dma_size) { |
583 | *(host->data_ptr++) = data; | 580 | *(host->data_ptr++) = data; |
584 | } else { | 581 | } else { |
585 | if(host->data_cnt < host->dma_size) | 582 | if (host->data_cnt < host->dma_size) |
586 | *(u8*)(host->data_ptr) = data; | 583 | *(u8 *)(host->data_ptr) = data; |
587 | } | 584 | } |
588 | host->data_cnt += 2; | 585 | host->data_cnt += 2; |
589 | } | 586 | } |
590 | 587 | ||
591 | stat = MMC_STATUS; | 588 | stat = readw(host->base + MMC_REG_STATUS); |
592 | 589 | ||
593 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n", | 590 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read %d burst %d STATUS = 0x%x\n", |
594 | host->data_cnt, burst_len, stat); | 591 | host->data_cnt, burst_len, stat); |
595 | } | 592 | } |
596 | 593 | ||
597 | if((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) | 594 | if ((stat & STATUS_DATA_TRANS_DONE) && (host->data_cnt >= 512)) |
598 | trans_done = 1; | 595 | trans_done = 1; |
599 | 596 | ||
600 | if(host->dma_size & 0x1ff) | 597 | if (host->dma_size & 0x1ff) |
601 | stat &= ~STATUS_CRC_READ_ERR; | 598 | stat &= ~STATUS_CRC_READ_ERR; |
602 | 599 | ||
603 | if(stat & STATUS_TIME_OUT_READ) { | 600 | if (stat & STATUS_TIME_OUT_READ) { |
604 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read timeout STATUS = 0x%x\n", | 601 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data read timeout STATUS = 0x%x\n", |
605 | stat); | 602 | stat); |
606 | trans_done = -1; | 603 | trans_done = -1; |
@@ -608,12 +605,12 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
608 | 605 | ||
609 | } else { | 606 | } else { |
610 | imxmci_busy_wait_for_status(host, &stat, | 607 | imxmci_busy_wait_for_status(host, &stat, |
611 | STATUS_APPL_BUFF_FE, | 608 | STATUS_APPL_BUFF_FE, |
612 | 20, "imxmci_cpu_driven_data write"); | 609 | 20, "imxmci_cpu_driven_data write"); |
613 | 610 | ||
614 | while((stat & STATUS_APPL_BUFF_FE) && | 611 | while ((stat & STATUS_APPL_BUFF_FE) && |
615 | (host->data_cnt < host->dma_size)) { | 612 | (host->data_cnt < host->dma_size)) { |
616 | if(burst_len >= host->dma_size - host->data_cnt) { | 613 | if (burst_len >= host->dma_size - host->data_cnt) { |
617 | burst_len = host->dma_size - host->data_cnt; | 614 | burst_len = host->dma_size - host->data_cnt; |
618 | host->data_cnt = host->dma_size; | 615 | host->data_cnt = host->dma_size; |
619 | trans_done = 1; | 616 | trans_done = 1; |
@@ -621,10 +618,10 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
621 | host->data_cnt += burst_len; | 618 | host->data_cnt += burst_len; |
622 | } | 619 | } |
623 | 620 | ||
624 | for(i = burst_len; i>0 ; i-=2) | 621 | for (i = burst_len; i > 0 ; i -= 2) |
625 | MMC_BUFFER_ACCESS = *(host->data_ptr++); | 622 | writew(*(host->data_ptr++), host->base + MMC_REG_BUFFER_ACCESS); |
626 | 623 | ||
627 | stat = MMC_STATUS; | 624 | stat = readw(host->base + MMC_REG_STATUS); |
628 | 625 | ||
629 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data write burst %d STATUS = 0x%x\n", | 626 | dev_dbg(mmc_dev(host->mmc), "imxmci_cpu_driven_data write burst %d STATUS = 0x%x\n", |
630 | burst_len, stat); | 627 | burst_len, stat); |
@@ -639,7 +636,7 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat) | |||
639 | static void imxmci_dma_irq(int dma, void *devid) | 636 | static void imxmci_dma_irq(int dma, void *devid) |
640 | { | 637 | { |
641 | struct imxmci_host *host = devid; | 638 | struct imxmci_host *host = devid; |
642 | uint32_t stat = MMC_STATUS; | 639 | u32 stat = readw(host->base + MMC_REG_STATUS); |
643 | 640 | ||
644 | atomic_set(&host->stuck_timeout, 0); | 641 | atomic_set(&host->stuck_timeout, 0); |
645 | host->status_reg = stat; | 642 | host->status_reg = stat; |
@@ -650,10 +647,11 @@ static void imxmci_dma_irq(int dma, void *devid) | |||
650 | static irqreturn_t imxmci_irq(int irq, void *devid) | 647 | static irqreturn_t imxmci_irq(int irq, void *devid) |
651 | { | 648 | { |
652 | struct imxmci_host *host = devid; | 649 | struct imxmci_host *host = devid; |
653 | uint32_t stat = MMC_STATUS; | 650 | u32 stat = readw(host->base + MMC_REG_STATUS); |
654 | int handled = 1; | 651 | int handled = 1; |
655 | 652 | ||
656 | MMC_INT_MASK = host->imask | INT_MASK_SDIO | INT_MASK_AUTO_CARD_DETECT; | 653 | writew(host->imask | INT_MASK_SDIO | INT_MASK_AUTO_CARD_DETECT, |
654 | host->base + MMC_REG_INT_MASK); | ||
657 | 655 | ||
658 | atomic_set(&host->stuck_timeout, 0); | 656 | atomic_set(&host->stuck_timeout, 0); |
659 | host->status_reg = stat; | 657 | host->status_reg = stat; |
@@ -671,10 +669,10 @@ static void imxmci_tasklet_fnc(unsigned long data) | |||
671 | unsigned int data_dir_mask = 0; /* STATUS_WR_CRC_ERROR_CODE_MASK */ | 669 | unsigned int data_dir_mask = 0; /* STATUS_WR_CRC_ERROR_CODE_MASK */ |
672 | int timeout = 0; | 670 | int timeout = 0; |
673 | 671 | ||
674 | if(atomic_read(&host->stuck_timeout) > 4) { | 672 | if (atomic_read(&host->stuck_timeout) > 4) { |
675 | char *what; | 673 | char *what; |
676 | timeout = 1; | 674 | timeout = 1; |
677 | stat = MMC_STATUS; | 675 | stat = readw(host->base + MMC_REG_STATUS); |
678 | host->status_reg = stat; | 676 | host->status_reg = stat; |
679 | if (test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) | 677 | if (test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) |
680 | if (test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) | 678 | if (test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) |
@@ -683,29 +681,37 @@ static void imxmci_tasklet_fnc(unsigned long data) | |||
683 | what = "RESP"; | 681 | what = "RESP"; |
684 | else | 682 | else |
685 | if (test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) | 683 | if (test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) |
686 | if(test_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events)) | 684 | if (test_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events)) |
687 | what = "DATA"; | 685 | what = "DATA"; |
688 | else | 686 | else |
689 | what = "DMA"; | 687 | what = "DMA"; |
690 | else | 688 | else |
691 | what = "???"; | 689 | what = "???"; |
692 | 690 | ||
693 | dev_err(mmc_dev(host->mmc), "%s TIMEOUT, hardware stucked STATUS = 0x%04x IMASK = 0x%04x\n", | 691 | dev_err(mmc_dev(host->mmc), |
694 | what, stat, MMC_INT_MASK); | 692 | "%s TIMEOUT, hardware stucked STATUS = 0x%04x IMASK = 0x%04x\n", |
695 | dev_err(mmc_dev(host->mmc), "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", | 693 | what, stat, |
696 | MMC_CMD_DAT_CONT, MMC_BLK_LEN, MMC_NOB, CCR(host->dma)); | 694 | readw(host->base + MMC_REG_INT_MASK)); |
695 | dev_err(mmc_dev(host->mmc), | ||
696 | "CMD_DAT_CONT = 0x%04x, MMC_BLK_LEN = 0x%04x, MMC_NOB = 0x%04x, DMA_CCR = 0x%08x\n", | ||
697 | readw(host->base + MMC_REG_CMD_DAT_CONT), | ||
698 | readw(host->base + MMC_REG_BLK_LEN), | ||
699 | readw(host->base + MMC_REG_NOB), | ||
700 | CCR(host->dma)); | ||
697 | dev_err(mmc_dev(host->mmc), "CMD%d, prevCMD%d, bus %d-bit, dma_size = 0x%x\n", | 701 | dev_err(mmc_dev(host->mmc), "CMD%d, prevCMD%d, bus %d-bit, dma_size = 0x%x\n", |
698 | host->cmd?host->cmd->opcode:0, host->prev_cmd_code, 1<<host->actual_bus_width, host->dma_size); | 702 | host->cmd ? host->cmd->opcode : 0, |
703 | host->prev_cmd_code, | ||
704 | 1 << host->actual_bus_width, host->dma_size); | ||
699 | } | 705 | } |
700 | 706 | ||
701 | if(!host->present || timeout) | 707 | if (!host->present || timeout) |
702 | host->status_reg = STATUS_TIME_OUT_RESP | STATUS_TIME_OUT_READ | | 708 | host->status_reg = STATUS_TIME_OUT_RESP | STATUS_TIME_OUT_READ | |
703 | STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR; | 709 | STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR; |
704 | 710 | ||
705 | if(test_bit(IMXMCI_PEND_IRQ_b, &host->pending_events) || timeout) { | 711 | if (test_bit(IMXMCI_PEND_IRQ_b, &host->pending_events) || timeout) { |
706 | clear_bit(IMXMCI_PEND_IRQ_b, &host->pending_events); | 712 | clear_bit(IMXMCI_PEND_IRQ_b, &host->pending_events); |
707 | 713 | ||
708 | stat = MMC_STATUS; | 714 | stat = readw(host->base + MMC_REG_STATUS); |
709 | /* | 715 | /* |
710 | * This is not required in theory, but there is chance to miss some flag | 716 | * This is not required in theory, but there is chance to miss some flag |
711 | * which clears automatically by mask write, FreeScale original code keeps | 717 | * which clears automatically by mask write, FreeScale original code keeps |
@@ -713,63 +719,62 @@ static void imxmci_tasklet_fnc(unsigned long data) | |||
713 | */ | 719 | */ |
714 | stat |= host->status_reg; | 720 | stat |= host->status_reg; |
715 | 721 | ||
716 | if(test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) | 722 | if (test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) |
717 | stat &= ~STATUS_CRC_READ_ERR; | 723 | stat &= ~STATUS_CRC_READ_ERR; |
718 | 724 | ||
719 | if(test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { | 725 | if (test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { |
720 | imxmci_busy_wait_for_status(host, &stat, | 726 | imxmci_busy_wait_for_status(host, &stat, |
721 | STATUS_END_CMD_RESP | STATUS_ERR_MASK, | 727 | STATUS_END_CMD_RESP | STATUS_ERR_MASK, |
722 | 20, "imxmci_tasklet_fnc resp (ERRATUM #4)"); | 728 | 20, "imxmci_tasklet_fnc resp (ERRATUM #4)"); |
723 | } | 729 | } |
724 | 730 | ||
725 | if(stat & (STATUS_END_CMD_RESP | STATUS_ERR_MASK)) { | 731 | if (stat & (STATUS_END_CMD_RESP | STATUS_ERR_MASK)) { |
726 | if(test_and_clear_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) | 732 | if (test_and_clear_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) |
727 | imxmci_cmd_done(host, stat); | 733 | imxmci_cmd_done(host, stat); |
728 | if(host->data && (stat & STATUS_ERR_MASK)) | 734 | if (host->data && (stat & STATUS_ERR_MASK)) |
729 | imxmci_data_done(host, stat); | 735 | imxmci_data_done(host, stat); |
730 | } | 736 | } |
731 | 737 | ||
732 | if(test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) { | 738 | if (test_bit(IMXMCI_PEND_CPU_DATA_b, &host->pending_events)) { |
733 | stat |= MMC_STATUS; | 739 | stat |= readw(host->base + MMC_REG_STATUS); |
734 | if(imxmci_cpu_driven_data(host, &stat)){ | 740 | if (imxmci_cpu_driven_data(host, &stat)) { |
735 | if(test_and_clear_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) | 741 | if (test_and_clear_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) |
736 | imxmci_cmd_done(host, stat); | 742 | imxmci_cmd_done(host, stat); |
737 | atomic_clear_mask(IMXMCI_PEND_IRQ_m|IMXMCI_PEND_CPU_DATA_m, | 743 | atomic_clear_mask(IMXMCI_PEND_IRQ_m|IMXMCI_PEND_CPU_DATA_m, |
738 | &host->pending_events); | 744 | &host->pending_events); |
739 | imxmci_data_done(host, stat); | 745 | imxmci_data_done(host, stat); |
740 | } | 746 | } |
741 | } | 747 | } |
742 | } | 748 | } |
743 | 749 | ||
744 | if(test_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events) && | 750 | if (test_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events) && |
745 | !test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { | 751 | !test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events)) { |
746 | 752 | ||
747 | stat = MMC_STATUS; | 753 | stat = readw(host->base + MMC_REG_STATUS); |
748 | /* Same as above */ | 754 | /* Same as above */ |
749 | stat |= host->status_reg; | 755 | stat |= host->status_reg; |
750 | 756 | ||
751 | if(host->dma_dir == DMA_TO_DEVICE) { | 757 | if (host->dma_dir == DMA_TO_DEVICE) |
752 | data_dir_mask = STATUS_WRITE_OP_DONE; | 758 | data_dir_mask = STATUS_WRITE_OP_DONE; |
753 | } else { | 759 | else |
754 | data_dir_mask = STATUS_DATA_TRANS_DONE; | 760 | data_dir_mask = STATUS_DATA_TRANS_DONE; |
755 | } | ||
756 | 761 | ||
757 | if(stat & data_dir_mask) { | 762 | if (stat & data_dir_mask) { |
758 | clear_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events); | 763 | clear_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events); |
759 | imxmci_data_done(host, stat); | 764 | imxmci_data_done(host, stat); |
760 | } | 765 | } |
761 | } | 766 | } |
762 | 767 | ||
763 | if(test_and_clear_bit(IMXMCI_PEND_CARD_XCHG_b, &host->pending_events)) { | 768 | if (test_and_clear_bit(IMXMCI_PEND_CARD_XCHG_b, &host->pending_events)) { |
764 | 769 | ||
765 | if(host->cmd) | 770 | if (host->cmd) |
766 | imxmci_cmd_done(host, STATUS_TIME_OUT_RESP); | 771 | imxmci_cmd_done(host, STATUS_TIME_OUT_RESP); |
767 | 772 | ||
768 | if(host->data) | 773 | if (host->data) |
769 | imxmci_data_done(host, STATUS_TIME_OUT_READ | | 774 | imxmci_data_done(host, STATUS_TIME_OUT_READ | |
770 | STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR); | 775 | STATUS_CRC_READ_ERR | STATUS_CRC_WRITE_ERR); |
771 | 776 | ||
772 | if(host->req) | 777 | if (host->req) |
773 | imxmci_finish_request(host, host->req); | 778 | imxmci_finish_request(host, host->req); |
774 | 779 | ||
775 | mmc_detect_change(host->mmc, msecs_to_jiffies(100)); | 780 | mmc_detect_change(host->mmc, msecs_to_jiffies(100)); |
@@ -796,9 +801,8 @@ static void imxmci_request(struct mmc_host *mmc, struct mmc_request *req) | |||
796 | if (req->data->flags & MMC_DATA_WRITE) | 801 | if (req->data->flags & MMC_DATA_WRITE) |
797 | cmdat |= CMD_DAT_CONT_WRITE; | 802 | cmdat |= CMD_DAT_CONT_WRITE; |
798 | 803 | ||
799 | if (req->data->flags & MMC_DATA_STREAM) { | 804 | if (req->data->flags & MMC_DATA_STREAM) |
800 | cmdat |= CMD_DAT_CONT_STREAM_BLOCK; | 805 | cmdat |= CMD_DAT_CONT_STREAM_BLOCK; |
801 | } | ||
802 | } | 806 | } |
803 | 807 | ||
804 | imxmci_start_cmd(host, req->cmd, cmdat); | 808 | imxmci_start_cmd(host, req->cmd, cmdat); |
@@ -811,36 +815,37 @@ static void imxmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
811 | struct imxmci_host *host = mmc_priv(mmc); | 815 | struct imxmci_host *host = mmc_priv(mmc); |
812 | int prescaler; | 816 | int prescaler; |
813 | 817 | ||
814 | if( ios->bus_width==MMC_BUS_WIDTH_4 ) { | 818 | if (ios->bus_width == MMC_BUS_WIDTH_4) { |
815 | host->actual_bus_width = MMC_BUS_WIDTH_4; | 819 | host->actual_bus_width = MMC_BUS_WIDTH_4; |
816 | imx_gpio_mode(PB11_PF_SD_DAT3); | 820 | imx_gpio_mode(PB11_PF_SD_DAT3); |
817 | }else{ | 821 | } else { |
818 | host->actual_bus_width = MMC_BUS_WIDTH_1; | 822 | host->actual_bus_width = MMC_BUS_WIDTH_1; |
819 | imx_gpio_mode(GPIO_PORTB | GPIO_IN | GPIO_PUEN | 11); | 823 | imx_gpio_mode(GPIO_PORTB | GPIO_IN | GPIO_PUEN | 11); |
820 | } | 824 | } |
821 | 825 | ||
822 | if ( host->power_mode != ios->power_mode ) { | 826 | if (host->power_mode != ios->power_mode) { |
823 | switch (ios->power_mode) { | 827 | switch (ios->power_mode) { |
824 | case MMC_POWER_OFF: | 828 | case MMC_POWER_OFF: |
825 | break; | 829 | break; |
826 | case MMC_POWER_UP: | 830 | case MMC_POWER_UP: |
827 | set_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events); | 831 | set_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events); |
828 | break; | 832 | break; |
829 | case MMC_POWER_ON: | 833 | case MMC_POWER_ON: |
830 | break; | 834 | break; |
831 | } | 835 | } |
832 | host->power_mode = ios->power_mode; | 836 | host->power_mode = ios->power_mode; |
833 | } | 837 | } |
834 | 838 | ||
835 | if ( ios->clock ) { | 839 | if (ios->clock) { |
836 | unsigned int clk; | 840 | unsigned int clk; |
841 | u16 reg; | ||
837 | 842 | ||
838 | /* The prescaler is 5 for PERCLK2 equal to 96MHz | 843 | /* The prescaler is 5 for PERCLK2 equal to 96MHz |
839 | * then 96MHz / 5 = 19.2 MHz | 844 | * then 96MHz / 5 = 19.2 MHz |
840 | */ | 845 | */ |
841 | clk = clk_get_rate(host->clk); | 846 | clk = clk_get_rate(host->clk); |
842 | prescaler=(clk+(CLK_RATE*7)/8)/CLK_RATE; | 847 | prescaler = (clk + (CLK_RATE * 7) / 8) / CLK_RATE; |
843 | switch(prescaler) { | 848 | switch (prescaler) { |
844 | case 0: | 849 | case 0: |
845 | case 1: prescaler = 0; | 850 | case 1: prescaler = 0; |
846 | break; | 851 | break; |
@@ -858,24 +863,29 @@ static void imxmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
858 | dev_dbg(mmc_dev(host->mmc), "PERCLK2 %d MHz -> prescaler %d\n", | 863 | dev_dbg(mmc_dev(host->mmc), "PERCLK2 %d MHz -> prescaler %d\n", |
859 | clk, prescaler); | 864 | clk, prescaler); |
860 | 865 | ||
861 | for(clk=0; clk<8; clk++) { | 866 | for (clk = 0; clk < 8; clk++) { |
862 | int x; | 867 | int x; |
863 | x = CLK_RATE / (1<<clk); | 868 | x = CLK_RATE / (1 << clk); |
864 | if( x <= ios->clock) | 869 | if (x <= ios->clock) |
865 | break; | 870 | break; |
866 | } | 871 | } |
867 | 872 | ||
868 | MMC_STR_STP_CLK |= STR_STP_CLK_ENABLE; /* enable controller */ | 873 | /* enable controller */ |
874 | reg = readw(host->base + MMC_REG_STR_STP_CLK); | ||
875 | writew(reg | STR_STP_CLK_ENABLE, | ||
876 | host->base + MMC_REG_STR_STP_CLK); | ||
869 | 877 | ||
870 | imxmci_stop_clock(host); | 878 | imxmci_stop_clock(host); |
871 | MMC_CLK_RATE = (prescaler<<3) | clk; | 879 | writew((prescaler << 3) | clk, host->base + MMC_REG_CLK_RATE); |
872 | /* | 880 | /* |
873 | * Under my understanding, clock should not be started there, because it would | 881 | * Under my understanding, clock should not be started there, because it would |
874 | * initiate SDHC sequencer and send last or random command into card | 882 | * initiate SDHC sequencer and send last or random command into card |
875 | */ | 883 | */ |
876 | /*imxmci_start_clock(host);*/ | 884 | /* imxmci_start_clock(host); */ |
877 | 885 | ||
878 | dev_dbg(mmc_dev(host->mmc), "MMC_CLK_RATE: 0x%08x\n", MMC_CLK_RATE); | 886 | dev_dbg(mmc_dev(host->mmc), |
887 | "MMC_CLK_RATE: 0x%08x\n", | ||
888 | readw(host->base + MMC_REG_CLK_RATE)); | ||
879 | } else { | 889 | } else { |
880 | imxmci_stop_clock(host); | 890 | imxmci_stop_clock(host); |
881 | } | 891 | } |
@@ -915,10 +925,10 @@ static void imxmci_check_status(unsigned long data) | |||
915 | tasklet_schedule(&host->tasklet); | 925 | tasklet_schedule(&host->tasklet); |
916 | } | 926 | } |
917 | 927 | ||
918 | if(test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events) || | 928 | if (test_bit(IMXMCI_PEND_WAIT_RESP_b, &host->pending_events) || |
919 | test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) { | 929 | test_bit(IMXMCI_PEND_DMA_DATA_b, &host->pending_events)) { |
920 | atomic_inc(&host->stuck_timeout); | 930 | atomic_inc(&host->stuck_timeout); |
921 | if(atomic_read(&host->stuck_timeout) > 4) | 931 | if (atomic_read(&host->stuck_timeout) > 4) |
922 | tasklet_schedule(&host->tasklet); | 932 | tasklet_schedule(&host->tasklet); |
923 | } else { | 933 | } else { |
924 | atomic_set(&host->stuck_timeout, 0); | 934 | atomic_set(&host->stuck_timeout, 0); |
@@ -934,6 +944,7 @@ static int imxmci_probe(struct platform_device *pdev) | |||
934 | struct imxmci_host *host = NULL; | 944 | struct imxmci_host *host = NULL; |
935 | struct resource *r; | 945 | struct resource *r; |
936 | int ret = 0, irq; | 946 | int ret = 0, irq; |
947 | u16 rev_no; | ||
937 | 948 | ||
938 | printk(KERN_INFO "i.MX mmc driver\n"); | 949 | printk(KERN_INFO "i.MX mmc driver\n"); |
939 | 950 | ||
@@ -942,7 +953,8 @@ static int imxmci_probe(struct platform_device *pdev) | |||
942 | if (!r || irq < 0) | 953 | if (!r || irq < 0) |
943 | return -ENXIO; | 954 | return -ENXIO; |
944 | 955 | ||
945 | if (!request_mem_region(r->start, 0x100, pdev->name)) | 956 | r = request_mem_region(r->start, resource_size(r), pdev->name); |
957 | if (!r) | ||
946 | return -EBUSY; | 958 | return -EBUSY; |
947 | 959 | ||
948 | mmc = mmc_alloc_host(sizeof(struct imxmci_host), &pdev->dev); | 960 | mmc = mmc_alloc_host(sizeof(struct imxmci_host), &pdev->dev); |
@@ -966,6 +978,12 @@ static int imxmci_probe(struct platform_device *pdev) | |||
966 | mmc->max_blk_count = 65535; | 978 | mmc->max_blk_count = 65535; |
967 | 979 | ||
968 | host = mmc_priv(mmc); | 980 | host = mmc_priv(mmc); |
981 | host->base = ioremap(r->start, resource_size(r)); | ||
982 | if (!host->base) { | ||
983 | ret = -ENOMEM; | ||
984 | goto out; | ||
985 | } | ||
986 | |||
969 | host->mmc = mmc; | 987 | host->mmc = mmc; |
970 | host->dma_allocated = 0; | 988 | host->dma_allocated = 0; |
971 | host->pdata = pdev->dev.platform_data; | 989 | host->pdata = pdev->dev.platform_data; |
@@ -993,18 +1011,20 @@ static int imxmci_probe(struct platform_device *pdev) | |||
993 | imx_gpio_mode(PB12_PF_SD_CLK); | 1011 | imx_gpio_mode(PB12_PF_SD_CLK); |
994 | imx_gpio_mode(PB13_PF_SD_CMD); | 1012 | imx_gpio_mode(PB13_PF_SD_CMD); |
995 | 1013 | ||
996 | imxmci_softreset(); | 1014 | imxmci_softreset(host); |
997 | 1015 | ||
998 | if ( MMC_REV_NO != 0x390 ) { | 1016 | rev_no = readw(host->base + MMC_REG_REV_NO); |
1017 | if (rev_no != 0x390) { | ||
999 | dev_err(mmc_dev(host->mmc), "wrong rev.no. 0x%08x. aborting.\n", | 1018 | dev_err(mmc_dev(host->mmc), "wrong rev.no. 0x%08x. aborting.\n", |
1000 | MMC_REV_NO); | 1019 | readw(host->base + MMC_REG_REV_NO)); |
1001 | goto out; | 1020 | goto out; |
1002 | } | 1021 | } |
1003 | 1022 | ||
1004 | MMC_READ_TO = 0x2db4; /* recommended in data sheet */ | 1023 | /* recommended in data sheet */ |
1024 | writew(0x2db4, host->base + MMC_REG_READ_TO); | ||
1005 | 1025 | ||
1006 | host->imask = IMXMCI_INT_MASK_DEFAULT; | 1026 | host->imask = IMXMCI_INT_MASK_DEFAULT; |
1007 | MMC_INT_MASK = host->imask; | 1027 | writew(host->imask, host->base + MMC_REG_INT_MASK); |
1008 | 1028 | ||
1009 | host->dma = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_LOW); | 1029 | host->dma = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_LOW); |
1010 | if(host->dma < 0) { | 1030 | if(host->dma < 0) { |
@@ -1012,7 +1032,7 @@ static int imxmci_probe(struct platform_device *pdev) | |||
1012 | ret = -EBUSY; | 1032 | ret = -EBUSY; |
1013 | goto out; | 1033 | goto out; |
1014 | } | 1034 | } |
1015 | host->dma_allocated=1; | 1035 | host->dma_allocated = 1; |
1016 | imx_dma_setup_handlers(host->dma, imxmci_dma_irq, NULL, host); | 1036 | imx_dma_setup_handlers(host->dma, imxmci_dma_irq, NULL, host); |
1017 | 1037 | ||
1018 | tasklet_init(&host->tasklet, imxmci_tasklet_fnc, (unsigned long)host); | 1038 | tasklet_init(&host->tasklet, imxmci_tasklet_fnc, (unsigned long)host); |
@@ -1032,7 +1052,7 @@ static int imxmci_probe(struct platform_device *pdev) | |||
1032 | host->timer.data = (unsigned long)host; | 1052 | host->timer.data = (unsigned long)host; |
1033 | host->timer.function = imxmci_check_status; | 1053 | host->timer.function = imxmci_check_status; |
1034 | add_timer(&host->timer); | 1054 | add_timer(&host->timer); |
1035 | mod_timer(&host->timer, jiffies + (HZ>>1)); | 1055 | mod_timer(&host->timer, jiffies + (HZ >> 1)); |
1036 | 1056 | ||
1037 | platform_set_drvdata(pdev, mmc); | 1057 | platform_set_drvdata(pdev, mmc); |
1038 | 1058 | ||
@@ -1042,18 +1062,20 @@ static int imxmci_probe(struct platform_device *pdev) | |||
1042 | 1062 | ||
1043 | out: | 1063 | out: |
1044 | if (host) { | 1064 | if (host) { |
1045 | if(host->dma_allocated){ | 1065 | if (host->dma_allocated) { |
1046 | imx_dma_free(host->dma); | 1066 | imx_dma_free(host->dma); |
1047 | host->dma_allocated=0; | 1067 | host->dma_allocated = 0; |
1048 | } | 1068 | } |
1049 | if (host->clk) { | 1069 | if (host->clk) { |
1050 | clk_disable(host->clk); | 1070 | clk_disable(host->clk); |
1051 | clk_put(host->clk); | 1071 | clk_put(host->clk); |
1052 | } | 1072 | } |
1073 | if (host->base) | ||
1074 | iounmap(host->base); | ||
1053 | } | 1075 | } |
1054 | if (mmc) | 1076 | if (mmc) |
1055 | mmc_free_host(mmc); | 1077 | mmc_free_host(mmc); |
1056 | release_mem_region(r->start, 0x100); | 1078 | release_mem_region(r->start, resource_size(r)); |
1057 | return ret; | 1079 | return ret; |
1058 | } | 1080 | } |
1059 | 1081 | ||
@@ -1072,9 +1094,10 @@ static int imxmci_remove(struct platform_device *pdev) | |||
1072 | mmc_remove_host(mmc); | 1094 | mmc_remove_host(mmc); |
1073 | 1095 | ||
1074 | free_irq(host->irq, host); | 1096 | free_irq(host->irq, host); |
1075 | if(host->dma_allocated){ | 1097 | iounmap(host->base); |
1098 | if (host->dma_allocated) { | ||
1076 | imx_dma_free(host->dma); | 1099 | imx_dma_free(host->dma); |
1077 | host->dma_allocated=0; | 1100 | host->dma_allocated = 0; |
1078 | } | 1101 | } |
1079 | 1102 | ||
1080 | tasklet_kill(&host->tasklet); | 1103 | tasklet_kill(&host->tasklet); |
@@ -1082,7 +1105,7 @@ static int imxmci_remove(struct platform_device *pdev) | |||
1082 | clk_disable(host->clk); | 1105 | clk_disable(host->clk); |
1083 | clk_put(host->clk); | 1106 | clk_put(host->clk); |
1084 | 1107 | ||
1085 | release_mem_region(host->res->start, 0x100); | 1108 | release_mem_region(host->res->start, resource_size(host->res)); |
1086 | 1109 | ||
1087 | mmc_free_host(mmc); | 1110 | mmc_free_host(mmc); |
1088 | } | 1111 | } |
@@ -1109,7 +1132,7 @@ static int imxmci_resume(struct platform_device *dev) | |||
1109 | 1132 | ||
1110 | if (mmc) { | 1133 | if (mmc) { |
1111 | host = mmc_priv(mmc); | 1134 | host = mmc_priv(mmc); |
1112 | if(host) | 1135 | if (host) |
1113 | set_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events); | 1136 | set_bit(IMXMCI_PEND_SET_INIT_b, &host->pending_events); |
1114 | ret = mmc_resume_host(mmc); | 1137 | ret = mmc_resume_host(mmc); |
1115 | } | 1138 | } |
diff --git a/drivers/mmc/host/imxmmc.h b/drivers/mmc/host/imxmmc.h index e5339e334dbb..09d5d4ee3a77 100644 --- a/drivers/mmc/host/imxmmc.h +++ b/drivers/mmc/host/imxmmc.h | |||
@@ -1,24 +1,21 @@ | |||
1 | #define MMC_REG_STR_STP_CLK 0x00 | ||
2 | #define MMC_REG_STATUS 0x04 | ||
3 | #define MMC_REG_CLK_RATE 0x08 | ||
4 | #define MMC_REG_CMD_DAT_CONT 0x0C | ||
5 | #define MMC_REG_RES_TO 0x10 | ||
6 | #define MMC_REG_READ_TO 0x14 | ||
7 | #define MMC_REG_BLK_LEN 0x18 | ||
8 | #define MMC_REG_NOB 0x1C | ||
9 | #define MMC_REG_REV_NO 0x20 | ||
10 | #define MMC_REG_INT_MASK 0x24 | ||
11 | #define MMC_REG_CMD 0x28 | ||
12 | #define MMC_REG_ARGH 0x2C | ||
13 | #define MMC_REG_ARGL 0x30 | ||
14 | #define MMC_REG_RES_FIFO 0x34 | ||
15 | #define MMC_REG_BUFFER_ACCESS 0x38 | ||
1 | 16 | ||
2 | # define __REG16(x) (*((volatile u16 *)IO_ADDRESS(x))) | 17 | #define STR_STP_CLK_IPG_CLK_GATE_DIS (1<<15) |
3 | 18 | #define STR_STP_CLK_IPG_PERCLK_GATE_DIS (1<<14) | |
4 | #define MMC_STR_STP_CLK __REG16(IMX_MMC_BASE + 0x00) | ||
5 | #define MMC_STATUS __REG16(IMX_MMC_BASE + 0x04) | ||
6 | #define MMC_CLK_RATE __REG16(IMX_MMC_BASE + 0x08) | ||
7 | #define MMC_CMD_DAT_CONT __REG16(IMX_MMC_BASE + 0x0C) | ||
8 | #define MMC_RES_TO __REG16(IMX_MMC_BASE + 0x10) | ||
9 | #define MMC_READ_TO __REG16(IMX_MMC_BASE + 0x14) | ||
10 | #define MMC_BLK_LEN __REG16(IMX_MMC_BASE + 0x18) | ||
11 | #define MMC_NOB __REG16(IMX_MMC_BASE + 0x1C) | ||
12 | #define MMC_REV_NO __REG16(IMX_MMC_BASE + 0x20) | ||
13 | #define MMC_INT_MASK __REG16(IMX_MMC_BASE + 0x24) | ||
14 | #define MMC_CMD __REG16(IMX_MMC_BASE + 0x28) | ||
15 | #define MMC_ARGH __REG16(IMX_MMC_BASE + 0x2C) | ||
16 | #define MMC_ARGL __REG16(IMX_MMC_BASE + 0x30) | ||
17 | #define MMC_RES_FIFO __REG16(IMX_MMC_BASE + 0x34) | ||
18 | #define MMC_BUFFER_ACCESS __REG16(IMX_MMC_BASE + 0x38) | ||
19 | #define MMC_BUFFER_ACCESS_OFS 0x38 | ||
20 | |||
21 | |||
22 | #define STR_STP_CLK_ENDIAN (1<<5) | 19 | #define STR_STP_CLK_ENDIAN (1<<5) |
23 | #define STR_STP_CLK_RESET (1<<3) | 20 | #define STR_STP_CLK_RESET (1<<3) |
24 | #define STR_STP_CLK_ENABLE (1<<2) | 21 | #define STR_STP_CLK_ENABLE (1<<2) |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 2fadf323c696..1bcbdd6763ac 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -500,7 +500,7 @@ static int mmci_probe(struct amba_device *dev, void *id) | |||
500 | } | 500 | } |
501 | 501 | ||
502 | host = mmc_priv(mmc); | 502 | host = mmc_priv(mmc); |
503 | host->clk = clk_get(&dev->dev, "MCLK"); | 503 | host->clk = clk_get(&dev->dev, NULL); |
504 | if (IS_ERR(host->clk)) { | 504 | if (IS_ERR(host->clk)) { |
505 | ret = PTR_ERR(host->clk); | 505 | ret = PTR_ERR(host->clk); |
506 | host->clk = NULL; | 506 | host->clk = NULL; |
diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index 1b9fc3c6b875..67d7b7fef084 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c | |||
@@ -1015,7 +1015,7 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data | |||
1015 | } | 1015 | } |
1016 | 1016 | ||
1017 | if (is_read) { | 1017 | if (is_read) { |
1018 | if (host->id == 1) { | 1018 | if (host->id == 0) { |
1019 | sync_dev = OMAP_DMA_MMC_RX; | 1019 | sync_dev = OMAP_DMA_MMC_RX; |
1020 | dma_dev_name = "MMC1 read"; | 1020 | dma_dev_name = "MMC1 read"; |
1021 | } else { | 1021 | } else { |
@@ -1023,7 +1023,7 @@ static int mmc_omap_get_dma_channel(struct mmc_omap_host *host, struct mmc_data | |||
1023 | dma_dev_name = "MMC2 read"; | 1023 | dma_dev_name = "MMC2 read"; |
1024 | } | 1024 | } |
1025 | } else { | 1025 | } else { |
1026 | if (host->id == 1) { | 1026 | if (host->id == 0) { |
1027 | sync_dev = OMAP_DMA_MMC_TX; | 1027 | sync_dev = OMAP_DMA_MMC_TX; |
1028 | dma_dev_name = "MMC1 write"; | 1028 | dma_dev_name = "MMC1 write"; |
1029 | } else { | 1029 | } else { |
@@ -1317,7 +1317,7 @@ static int __init mmc_omap_new_slot(struct mmc_omap_host *host, int id) | |||
1317 | host->slots[id] = slot; | 1317 | host->slots[id] = slot; |
1318 | 1318 | ||
1319 | mmc->caps = 0; | 1319 | mmc->caps = 0; |
1320 | if (host->pdata->conf.wire4) | 1320 | if (host->pdata->slots[id].wires >= 4) |
1321 | mmc->caps |= MMC_CAP_4_BIT_DATA; | 1321 | mmc->caps |= MMC_CAP_4_BIT_DATA; |
1322 | 1322 | ||
1323 | mmc->ops = &mmc_omap_ops; | 1323 | mmc->ops = &mmc_omap_ops; |
@@ -1451,6 +1451,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev) | |||
1451 | host->irq = irq; | 1451 | host->irq = irq; |
1452 | 1452 | ||
1453 | host->use_dma = 1; | 1453 | host->use_dma = 1; |
1454 | host->dev->dma_mask = &pdata->dma_mask; | ||
1454 | host->dma_ch = -1; | 1455 | host->dma_ch = -1; |
1455 | 1456 | ||
1456 | host->irq = irq; | 1457 | host->irq = irq; |
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index ebfaa9960939..f88cc7406354 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c | |||
@@ -26,11 +26,12 @@ | |||
26 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
27 | #include <linux/err.h> | 27 | #include <linux/err.h> |
28 | #include <linux/mmc/host.h> | 28 | #include <linux/mmc/host.h> |
29 | #include <linux/io.h> | ||
29 | 30 | ||
30 | #include <asm/dma.h> | ||
31 | #include <asm/io.h> | ||
32 | #include <asm/sizes.h> | 31 | #include <asm/sizes.h> |
33 | 32 | ||
33 | #include <mach/dma.h> | ||
34 | #include <mach/hardware.h> | ||
34 | #include <mach/pxa-regs.h> | 35 | #include <mach/pxa-regs.h> |
35 | #include <mach/mmc.h> | 36 | #include <mach/mmc.h> |
36 | 37 | ||
@@ -533,7 +534,7 @@ static int pxamci_probe(struct platform_device *pdev) | |||
533 | host->pdata = pdev->dev.platform_data; | 534 | host->pdata = pdev->dev.platform_data; |
534 | host->clkrt = CLKRT_OFF; | 535 | host->clkrt = CLKRT_OFF; |
535 | 536 | ||
536 | host->clk = clk_get(&pdev->dev, "MMCCLK"); | 537 | host->clk = clk_get(&pdev->dev, NULL); |
537 | if (IS_ERR(host->clk)) { | 538 | if (IS_ERR(host->clk)) { |
538 | ret = PTR_ERR(host->clk); | 539 | ret = PTR_ERR(host->clk); |
539 | host->clk = NULL; | 540 | host->clk = NULL; |
diff --git a/drivers/mmc/host/s3cmci.c b/drivers/mmc/host/s3cmci.c index 3b2085b57769..fcc98a4cce3c 100644 --- a/drivers/mmc/host/s3cmci.c +++ b/drivers/mmc/host/s3cmci.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <mach/regs-sdi.h> | 25 | #include <mach/regs-sdi.h> |
26 | #include <mach/regs-gpio.h> | 26 | #include <mach/regs-gpio.h> |
27 | 27 | ||
28 | #include <asm/plat-s3c24xx/mci.h> | 28 | #include <plat/mci.h> |
29 | 29 | ||
30 | #include "s3cmci.h" | 30 | #include "s3cmci.h" |
31 | 31 | ||
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index 3aa018c092f8..42969fe051b2 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c | |||
@@ -32,16 +32,15 @@ static struct mtd_info *dc21285_mtd; | |||
32 | */ | 32 | */ |
33 | static void nw_en_write(void) | 33 | static void nw_en_write(void) |
34 | { | 34 | { |
35 | extern spinlock_t gpio_lock; | ||
36 | unsigned long flags; | 35 | unsigned long flags; |
37 | 36 | ||
38 | /* | 37 | /* |
39 | * we want to write a bit pattern XXX1 to Xilinx to enable | 38 | * we want to write a bit pattern XXX1 to Xilinx to enable |
40 | * the write gate, which will be open for about the next 2ms. | 39 | * the write gate, which will be open for about the next 2ms. |
41 | */ | 40 | */ |
42 | spin_lock_irqsave(&gpio_lock, flags); | 41 | spin_lock_irqsave(&nw_gpio_lock, flags); |
43 | cpld_modify(1, 1); | 42 | nw_cpld_modify(CPLD_FLASH_WR_ENABLE, CPLD_FLASH_WR_ENABLE); |
44 | spin_unlock_irqrestore(&gpio_lock, flags); | 43 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
45 | 44 | ||
46 | /* | 45 | /* |
47 | * let the ISA bus to catch on... | 46 | * let the ISA bus to catch on... |
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index dcdb1f17577d..3ea1de9be720 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c | |||
@@ -170,7 +170,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
170 | err = -ENOMEM; | 170 | err = -ENOMEM; |
171 | goto Error; | 171 | goto Error; |
172 | } | 172 | } |
173 | memzero(info, sizeof(struct ixp2000_flash_info)); | 173 | memset(info, 0, sizeof(struct ixp2000_flash_info)); |
174 | 174 | ||
175 | platform_set_drvdata(dev, info); | 175 | platform_set_drvdata(dev, info); |
176 | 176 | ||
diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c index 9c7a5fbd4e51..16555cbeaea4 100644 --- a/drivers/mtd/maps/ixp4xx.c +++ b/drivers/mtd/maps/ixp4xx.c | |||
@@ -201,7 +201,7 @@ static int ixp4xx_flash_probe(struct platform_device *dev) | |||
201 | err = -ENOMEM; | 201 | err = -ENOMEM; |
202 | goto Error; | 202 | goto Error; |
203 | } | 203 | } |
204 | memzero(info, sizeof(struct ixp4xx_flash_info)); | 204 | memset(info, 0, sizeof(struct ixp4xx_flash_info)); |
205 | 205 | ||
206 | platform_set_drvdata(dev, info); | 206 | platform_set_drvdata(dev, info); |
207 | 207 | ||
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 1c2e9450d663..f8ae0400c49c 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -408,7 +408,7 @@ config MTD_NAND_FSL_UPM | |||
408 | 408 | ||
409 | config MTD_NAND_MXC | 409 | config MTD_NAND_MXC |
410 | tristate "MXC NAND support" | 410 | tristate "MXC NAND support" |
411 | depends on ARCH_MX2 | 411 | depends on ARCH_MX2 || ARCH_MX3 |
412 | help | 412 | help |
413 | This enables the driver for the NAND flash controller on the | 413 | This enables the driver for the NAND flash controller on the |
414 | MXC processors. | 414 | MXC processors. |
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 15f0a26730ae..fc4144495610 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/mtd/partitions.h> | 20 | #include <linux/mtd/partitions.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <asm/dma.h> | ||
24 | 23 | ||
24 | #include <mach/dma.h> | ||
25 | #include <mach/pxa-regs.h> | 25 | #include <mach/pxa-regs.h> |
26 | #include <mach/pxa3xx_nand.h> | 26 | #include <mach/pxa3xx_nand.h> |
27 | 27 | ||
@@ -1080,7 +1080,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) | |||
1080 | this = &info->nand_chip; | 1080 | this = &info->nand_chip; |
1081 | mtd->priv = info; | 1081 | mtd->priv = info; |
1082 | 1082 | ||
1083 | info->clk = clk_get(&pdev->dev, "NANDCLK"); | 1083 | info->clk = clk_get(&pdev->dev, NULL); |
1084 | if (IS_ERR(info->clk)) { | 1084 | if (IS_ERR(info->clk)) { |
1085 | dev_err(&pdev->dev, "failed to get nand clock\n"); | 1085 | dev_err(&pdev->dev, "failed to get nand clock\n"); |
1086 | ret = PTR_ERR(info->clk); | 1086 | ret = PTR_ERR(info->clk); |
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index 556139ed1fdf..8e375d5fe231 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c | |||
@@ -45,8 +45,8 @@ | |||
45 | 45 | ||
46 | #include <asm/io.h> | 46 | #include <asm/io.h> |
47 | 47 | ||
48 | #include <asm/plat-s3c/regs-nand.h> | 48 | #include <plat/regs-nand.h> |
49 | #include <asm/plat-s3c/nand.h> | 49 | #include <plat/nand.h> |
50 | 50 | ||
51 | #ifdef CONFIG_MTD_NAND_S3C2410_HWECC | 51 | #ifdef CONFIG_MTD_NAND_S3C2410_HWECC |
52 | static int hardware_ecc = 1; | 52 | static int hardware_ecc = 1; |
@@ -818,7 +818,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, | |||
818 | goto exit_error; | 818 | goto exit_error; |
819 | } | 819 | } |
820 | 820 | ||
821 | memzero(info, sizeof(*info)); | 821 | memset(info, 0, sizeof(*info)); |
822 | platform_set_drvdata(pdev, info); | 822 | platform_set_drvdata(pdev, info); |
823 | 823 | ||
824 | spin_lock_init(&info->controller.lock); | 824 | spin_lock_init(&info->controller.lock); |
@@ -883,7 +883,7 @@ static int s3c24xx_nand_probe(struct platform_device *pdev, | |||
883 | goto exit_error; | 883 | goto exit_error; |
884 | } | 884 | } |
885 | 885 | ||
886 | memzero(info->mtds, size); | 886 | memset(info->mtds, 0, size); |
887 | 887 | ||
888 | /* initialise all possible chips */ | 888 | /* initialise all possible chips */ |
889 | 889 | ||
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index a7e4d985f5ef..d1e0b8e7224b 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c | |||
@@ -149,7 +149,7 @@ static int omap2_onenand_wait(struct mtd_info *mtd, int state) | |||
149 | 149 | ||
150 | INIT_COMPLETION(c->irq_done); | 150 | INIT_COMPLETION(c->irq_done); |
151 | if (c->gpio_irq) { | 151 | if (c->gpio_irq) { |
152 | result = omap_get_gpio_datain(c->gpio_irq); | 152 | result = gpio_get_value(c->gpio_irq); |
153 | if (result == -1) { | 153 | if (result == -1) { |
154 | ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS); | 154 | ctrl = read_reg(c, ONENAND_REG_CTRL_STATUS); |
155 | intr = read_reg(c, ONENAND_REG_INTERRUPT); | 155 | intr = read_reg(c, ONENAND_REG_INTERRUPT); |
@@ -634,9 +634,9 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) | |||
634 | "OneNAND\n", c->gpio_irq); | 634 | "OneNAND\n", c->gpio_irq); |
635 | goto err_iounmap; | 635 | goto err_iounmap; |
636 | } | 636 | } |
637 | omap_set_gpio_direction(c->gpio_irq, 1); | 637 | gpio_direction_input(c->gpio_irq); |
638 | 638 | ||
639 | if ((r = request_irq(OMAP_GPIO_IRQ(c->gpio_irq), | 639 | if ((r = request_irq(gpio_to_irq(c->gpio_irq), |
640 | omap2_onenand_interrupt, IRQF_TRIGGER_RISING, | 640 | omap2_onenand_interrupt, IRQF_TRIGGER_RISING, |
641 | pdev->dev.driver->name, c)) < 0) | 641 | pdev->dev.driver->name, c)) < 0) |
642 | goto err_release_gpio; | 642 | goto err_release_gpio; |
@@ -723,7 +723,7 @@ err_release_dma: | |||
723 | if (c->dma_channel != -1) | 723 | if (c->dma_channel != -1) |
724 | omap_free_dma(c->dma_channel); | 724 | omap_free_dma(c->dma_channel); |
725 | if (c->gpio_irq) | 725 | if (c->gpio_irq) |
726 | free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c); | 726 | free_irq(gpio_to_irq(c->gpio_irq), c); |
727 | err_release_gpio: | 727 | err_release_gpio: |
728 | if (c->gpio_irq) | 728 | if (c->gpio_irq) |
729 | omap_free_gpio(c->gpio_irq); | 729 | omap_free_gpio(c->gpio_irq); |
@@ -760,7 +760,7 @@ static int __devexit omap2_onenand_remove(struct platform_device *pdev) | |||
760 | omap2_onenand_shutdown(pdev); | 760 | omap2_onenand_shutdown(pdev); |
761 | platform_set_drvdata(pdev, NULL); | 761 | platform_set_drvdata(pdev, NULL); |
762 | if (c->gpio_irq) { | 762 | if (c->gpio_irq) { |
763 | free_irq(OMAP_GPIO_IRQ(c->gpio_irq), c); | 763 | free_irq(gpio_to_irq(c->gpio_irq), c); |
764 | omap_free_gpio(c->gpio_irq); | 764 | omap_free_gpio(c->gpio_irq); |
765 | } | 765 | } |
766 | iounmap(c->onenand.base); | 766 | iounmap(c->onenand.base); |
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index d548a45d59d5..ff6497658a45 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -170,11 +170,7 @@ static char version[] __initdata = | |||
170 | /* The cs8900 has 4 IRQ pins, software selectable. cs8900_irq_map maps | 170 | /* The cs8900 has 4 IRQ pins, software selectable. cs8900_irq_map maps |
171 | them to system IRQ numbers. This mapping is card specific and is set to | 171 | them to system IRQ numbers. This mapping is card specific and is set to |
172 | the configuration of the Cirrus Eval board for this chip. */ | 172 | the configuration of the Cirrus Eval board for this chip. */ |
173 | #ifdef CONFIG_ARCH_CLPS7500 | 173 | #if defined(CONFIG_SH_HICOSH4) |
174 | static unsigned int netcard_portlist[] __used __initdata = | ||
175 | { 0x80090303, 0x300, 0x320, 0x340, 0x360, 0x200, 0x220, 0x240, 0x260, 0x280, 0x2a0, 0x2c0, 0x2e0, 0}; | ||
176 | static unsigned int cs8900_irq_map[] = {12,0,0,0}; | ||
177 | #elif defined(CONFIG_SH_HICOSH4) | ||
178 | static unsigned int netcard_portlist[] __used __initdata = | 174 | static unsigned int netcard_portlist[] __used __initdata = |
179 | { 0x0300, 0}; | 175 | { 0x0300, 0}; |
180 | static unsigned int cs8900_irq_map[] = {1,0,0,0}; | 176 | static unsigned int cs8900_irq_map[] = {1,0,0,0}; |
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c index a0ee05318155..004a9aab3a50 100644 --- a/drivers/net/irda/pxaficp_ir.c +++ b/drivers/net/irda/pxaficp_ir.c | |||
@@ -22,9 +22,53 @@ | |||
22 | #include <net/irda/wrapper.h> | 22 | #include <net/irda/wrapper.h> |
23 | #include <net/irda/irda_device.h> | 23 | #include <net/irda/irda_device.h> |
24 | 24 | ||
25 | #include <asm/dma.h> | 25 | #include <mach/dma.h> |
26 | #include <mach/irda.h> | 26 | #include <mach/irda.h> |
27 | #include <mach/hardware.h> | ||
27 | #include <mach/pxa-regs.h> | 28 | #include <mach/pxa-regs.h> |
29 | #include <mach/regs-uart.h> | ||
30 | |||
31 | #define FICP __REG(0x40800000) /* Start of FICP area */ | ||
32 | #define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */ | ||
33 | #define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */ | ||
34 | #define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */ | ||
35 | #define ICDR __REG(0x4080000c) /* ICP Data Register */ | ||
36 | #define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */ | ||
37 | #define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */ | ||
38 | |||
39 | #define ICCR0_AME (1 << 7) /* Address match enable */ | ||
40 | #define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */ | ||
41 | #define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */ | ||
42 | #define ICCR0_RXE (1 << 4) /* Receive enable */ | ||
43 | #define ICCR0_TXE (1 << 3) /* Transmit enable */ | ||
44 | #define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */ | ||
45 | #define ICCR0_LBM (1 << 1) /* Loopback mode */ | ||
46 | #define ICCR0_ITR (1 << 0) /* IrDA transmission */ | ||
47 | |||
48 | #define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */ | ||
49 | #define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */ | ||
50 | #define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */ | ||
51 | #define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */ | ||
52 | #define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */ | ||
53 | #define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */ | ||
54 | |||
55 | #ifdef CONFIG_PXA27x | ||
56 | #define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */ | ||
57 | #endif | ||
58 | #define ICSR0_FRE (1 << 5) /* Framing error */ | ||
59 | #define ICSR0_RFS (1 << 4) /* Receive FIFO service request */ | ||
60 | #define ICSR0_TFS (1 << 3) /* Transnit FIFO service request */ | ||
61 | #define ICSR0_RAB (1 << 2) /* Receiver abort */ | ||
62 | #define ICSR0_TUR (1 << 1) /* Trunsmit FIFO underun */ | ||
63 | #define ICSR0_EIF (1 << 0) /* End/Error in FIFO */ | ||
64 | |||
65 | #define ICSR1_ROR (1 << 6) /* Receiver FIFO underrun */ | ||
66 | #define ICSR1_CRE (1 << 5) /* CRC error */ | ||
67 | #define ICSR1_EOF (1 << 4) /* End of frame */ | ||
68 | #define ICSR1_TNF (1 << 3) /* Transmit FIFO not full */ | ||
69 | #define ICSR1_RNE (1 << 2) /* Receive FIFO not empty */ | ||
70 | #define ICSR1_TBY (1 << 1) /* Tramsmiter busy flag */ | ||
71 | #define ICSR1_RSY (1 << 0) /* Recevier synchronized flag */ | ||
28 | 72 | ||
29 | #define IrSR_RXPL_NEG_IS_ZERO (1<<4) | 73 | #define IrSR_RXPL_NEG_IS_ZERO (1<<4) |
30 | #define IrSR_RXPL_POS_IS_ZERO 0x0 | 74 | #define IrSR_RXPL_POS_IS_ZERO 0x0 |
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c index ccde5829ba21..d302bcf4c148 100644 --- a/drivers/net/irda/sa1100_ir.c +++ b/drivers/net/irda/sa1100_ir.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <net/irda/irda_device.h> | 36 | #include <net/irda/irda_device.h> |
37 | 37 | ||
38 | #include <asm/irq.h> | 38 | #include <asm/irq.h> |
39 | #include <asm/dma.h> | 39 | #include <mach/dma.h> |
40 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
41 | #include <asm/mach/irda.h> | 41 | #include <asm/mach/irda.h> |
42 | 42 | ||
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index cc7d85bdfb3e..870b4c33f108 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h | |||
@@ -200,6 +200,9 @@ static inline void SMC_outsl(struct smc911x_local *lp, int reg, | |||
200 | 200 | ||
201 | 201 | ||
202 | #ifdef SMC_USE_PXA_DMA | 202 | #ifdef SMC_USE_PXA_DMA |
203 | |||
204 | #include <mach/dma.h> | ||
205 | |||
203 | /* | 206 | /* |
204 | * Define the request and free functions | 207 | * Define the request and free functions |
205 | * These are unfortunately architecture specific as no generic allocation | 208 | * These are unfortunately architecture specific as no generic allocation |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 3e7c6a3cbc65..c4ccd121bc9c 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -493,7 +493,8 @@ struct smc_local { | |||
493 | * as RX which can overrun memory and lose packets. | 493 | * as RX which can overrun memory and lose packets. |
494 | */ | 494 | */ |
495 | #include <linux/dma-mapping.h> | 495 | #include <linux/dma-mapping.h> |
496 | #include <asm/dma.h> | 496 | #include <mach/dma.h> |
497 | #include <mach/hardware.h> | ||
497 | #include <mach/pxa-regs.h> | 498 | #include <mach/pxa-regs.h> |
498 | 499 | ||
499 | #ifdef SMC_insl | 500 | #ifdef SMC_insl |
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index 222904411a13..276473543982 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig | |||
@@ -217,7 +217,7 @@ config PCMCIA_PXA2XX | |||
217 | depends on ARM && ARCH_PXA && PCMCIA | 217 | depends on ARM && ARCH_PXA && PCMCIA |
218 | depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \ | 218 | depends on (ARCH_LUBBOCK || MACH_MAINSTONE || PXA_SHARPSL \ |
219 | || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \ | 219 | || MACH_ARMCORE || ARCH_PXA_PALM || TRIZEPS_PCMCIA \ |
220 | || ARCH_VIPER) | 220 | || ARCH_VIPER || ARCH_PXA_ESERIES) |
221 | help | 221 | help |
222 | Say Y here to include support for the PXA2xx PCMCIA controller | 222 | Say Y here to include support for the PXA2xx PCMCIA controller |
223 | 223 | ||
diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile index 238629ad7f7c..bbac46327227 100644 --- a/drivers/pcmcia/Makefile +++ b/drivers/pcmcia/Makefile | |||
@@ -72,5 +72,6 @@ pxa2xx-obj-$(CONFIG_ARCH_VIPER) += pxa2xx_viper.o | |||
72 | pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA) += pxa2xx_trizeps4.o | 72 | pxa2xx-obj-$(CONFIG_TRIZEPS_PCMCIA) += pxa2xx_trizeps4.o |
73 | pxa2xx-obj-$(CONFIG_MACH_PALMTX) += pxa2xx_palmtx.o | 73 | pxa2xx-obj-$(CONFIG_MACH_PALMTX) += pxa2xx_palmtx.o |
74 | pxa2xx-obj-$(CONFIG_MACH_PALMLD) += pxa2xx_palmld.o | 74 | pxa2xx-obj-$(CONFIG_MACH_PALMLD) += pxa2xx_palmld.o |
75 | pxa2xx-obj-$(CONFIG_MACH_E740) += pxa2xx_e740.o | ||
75 | 76 | ||
76 | obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_core.o $(pxa2xx-obj-y) | 77 | obj-$(CONFIG_PCMCIA_PXA2XX) += pxa2xx_core.o $(pxa2xx-obj-y) |
diff --git a/drivers/pcmcia/pxa2xx_e740.c b/drivers/pcmcia/pxa2xx_e740.c new file mode 100644 index 000000000000..f663a011bf4a --- /dev/null +++ b/drivers/pcmcia/pxa2xx_e740.c | |||
@@ -0,0 +1,176 @@ | |||
1 | /* | ||
2 | * Toshiba e740 PCMCIA specific routines. | ||
3 | * | ||
4 | * (c) 2004 Ian Molton <spyro@f2s.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 version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/init.h> | ||
12 | #include <linux/module.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/errno.h> | ||
15 | #include <linux/gpio.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | |||
19 | #include <mach/hardware.h> | ||
20 | #include <mach/pxa-regs.h> | ||
21 | #include <mach/eseries-gpio.h> | ||
22 | |||
23 | #include <asm/irq.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | |||
26 | #include "soc_common.h" | ||
27 | |||
28 | static struct pcmcia_irqs cd_irqs[] = { | ||
29 | { | ||
30 | .sock = 0, | ||
31 | .irq = IRQ_GPIO(GPIO_E740_PCMCIA_CD0), | ||
32 | .str = "CF card detect" | ||
33 | }, | ||
34 | { | ||
35 | .sock = 1, | ||
36 | .irq = IRQ_GPIO(GPIO_E740_PCMCIA_CD1), | ||
37 | .str = "Wifi switch" | ||
38 | }, | ||
39 | }; | ||
40 | |||
41 | static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | ||
42 | { | ||
43 | skt->irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) : | ||
44 | IRQ_GPIO(GPIO_E740_PCMCIA_RDY1); | ||
45 | |||
46 | return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1); | ||
47 | } | ||
48 | |||
49 | /* | ||
50 | * Release all resources. | ||
51 | */ | ||
52 | static void e740_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | ||
53 | { | ||
54 | soc_pcmcia_free_irqs(skt, &cd_irqs[skt->nr], 1); | ||
55 | } | ||
56 | |||
57 | static void e740_pcmcia_socket_state(struct soc_pcmcia_socket *skt, | ||
58 | struct pcmcia_state *state) | ||
59 | { | ||
60 | if (skt->nr == 0) { | ||
61 | state->detect = gpio_get_value(GPIO_E740_PCMCIA_CD0) ? 0 : 1; | ||
62 | state->ready = gpio_get_value(GPIO_E740_PCMCIA_RDY0) ? 1 : 0; | ||
63 | } else { | ||
64 | state->detect = gpio_get_value(GPIO_E740_PCMCIA_CD1) ? 0 : 1; | ||
65 | state->ready = gpio_get_value(GPIO_E740_PCMCIA_RDY1) ? 1 : 0; | ||
66 | } | ||
67 | |||
68 | state->vs_3v = 1; | ||
69 | state->bvd1 = 1; | ||
70 | state->bvd2 = 1; | ||
71 | state->wrprot = 0; | ||
72 | state->vs_Xv = 0; | ||
73 | } | ||
74 | |||
75 | static int e740_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | ||
76 | const socket_state_t *state) | ||
77 | { | ||
78 | if (state->flags & SS_RESET) { | ||
79 | if (skt->nr == 0) | ||
80 | gpio_set_value(GPIO_E740_PCMCIA_RST0, 1); | ||
81 | else | ||
82 | gpio_set_value(GPIO_E740_PCMCIA_RST1, 1); | ||
83 | } else { | ||
84 | if (skt->nr == 0) | ||
85 | gpio_set_value(GPIO_E740_PCMCIA_RST0, 0); | ||
86 | else | ||
87 | gpio_set_value(GPIO_E740_PCMCIA_RST1, 0); | ||
88 | } | ||
89 | |||
90 | switch (state->Vcc) { | ||
91 | case 0: /* Socket off */ | ||
92 | if (skt->nr == 0) | ||
93 | gpio_set_value(GPIO_E740_PCMCIA_PWR0, 0); | ||
94 | else | ||
95 | gpio_set_value(GPIO_E740_PCMCIA_PWR1, 1); | ||
96 | break; | ||
97 | case 50: | ||
98 | case 33: /* socket on */ | ||
99 | if (skt->nr == 0) | ||
100 | gpio_set_value(GPIO_E740_PCMCIA_PWR0, 1); | ||
101 | else | ||
102 | gpio_set_value(GPIO_E740_PCMCIA_PWR1, 0); | ||
103 | break; | ||
104 | default: | ||
105 | printk(KERN_ERR "e740_cs: Unsupported Vcc: %d\n", state->Vcc); | ||
106 | } | ||
107 | |||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | /* | ||
112 | * Enable card status IRQs on (re-)initialisation. This can | ||
113 | * be called at initialisation, power management event, or | ||
114 | * pcmcia event. | ||
115 | */ | ||
116 | static void e740_pcmcia_socket_init(struct soc_pcmcia_socket *skt) | ||
117 | { | ||
118 | soc_pcmcia_enable_irqs(skt, cd_irqs, ARRAY_SIZE(cd_irqs)); | ||
119 | } | ||
120 | |||
121 | /* | ||
122 | * Disable card status IRQs on suspend. | ||
123 | */ | ||
124 | static void e740_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt) | ||
125 | { | ||
126 | soc_pcmcia_disable_irqs(skt, cd_irqs, ARRAY_SIZE(cd_irqs)); | ||
127 | } | ||
128 | |||
129 | static struct pcmcia_low_level e740_pcmcia_ops = { | ||
130 | .owner = THIS_MODULE, | ||
131 | .hw_init = e740_pcmcia_hw_init, | ||
132 | .hw_shutdown = e740_pcmcia_hw_shutdown, | ||
133 | .socket_state = e740_pcmcia_socket_state, | ||
134 | .configure_socket = e740_pcmcia_configure_socket, | ||
135 | .socket_init = e740_pcmcia_socket_init, | ||
136 | .socket_suspend = e740_pcmcia_socket_suspend, | ||
137 | .nr = 2, | ||
138 | }; | ||
139 | |||
140 | static struct platform_device *e740_pcmcia_device; | ||
141 | |||
142 | static int __init e740_pcmcia_init(void) | ||
143 | { | ||
144 | int ret; | ||
145 | |||
146 | if (!machine_is_e740()) | ||
147 | return -ENODEV; | ||
148 | |||
149 | e740_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); | ||
150 | if (!e740_pcmcia_device) | ||
151 | return -ENOMEM; | ||
152 | |||
153 | ret = platform_device_add_data(e740_pcmcia_device, &e740_pcmcia_ops, | ||
154 | sizeof(e740_pcmcia_ops)); | ||
155 | |||
156 | if (!ret) | ||
157 | ret = platform_device_add(e740_pcmcia_device); | ||
158 | |||
159 | if (ret) | ||
160 | platform_device_put(e740_pcmcia_device); | ||
161 | |||
162 | return ret; | ||
163 | } | ||
164 | |||
165 | static void __exit e740_pcmcia_exit(void) | ||
166 | { | ||
167 | platform_device_unregister(e740_pcmcia_device); | ||
168 | } | ||
169 | |||
170 | module_init(e740_pcmcia_init); | ||
171 | module_exit(e740_pcmcia_exit); | ||
172 | |||
173 | MODULE_LICENSE("GPL v2"); | ||
174 | MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); | ||
175 | MODULE_ALIAS("platform:pxa2xx-pcmcia"); | ||
176 | MODULE_DESCRIPTION("e740 PCMCIA platform support"); | ||
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index 2133f37906f2..d5e4e637ddec 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <mach/board.h> | 22 | #include <mach/board.h> |
23 | #include <mach/at91_rtt.h> | 23 | #include <mach/at91_rtt.h> |
24 | #include <mach/cpu.h> | ||
24 | 25 | ||
25 | 26 | ||
26 | /* | 27 | /* |
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index f59277bbedaa..7a568beba3f0 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <asm/uaccess.h> | 26 | #include <asm/uaccess.h> |
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | #include <asm/plat-s3c/regs-rtc.h> | 29 | #include <plat/regs-rtc.h> |
30 | 30 | ||
31 | /* I have yet to find an S3C implementation with more than one | 31 | /* I have yet to find an S3C implementation with more than one |
32 | * of these rtc blocks in */ | 32 | * of these rtc blocks in */ |
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c index 66a9bb85bbe8..d26a5f82aaba 100644 --- a/drivers/rtc/rtc-sa1100.c +++ b/drivers/rtc/rtc-sa1100.c | |||
@@ -38,11 +38,11 @@ | |||
38 | #include <mach/pxa-regs.h> | 38 | #include <mach/pxa-regs.h> |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #define TIMER_FREQ CLOCK_TICK_RATE | ||
42 | #define RTC_DEF_DIVIDER 32768 - 1 | 41 | #define RTC_DEF_DIVIDER 32768 - 1 |
43 | #define RTC_DEF_TRIM 0 | 42 | #define RTC_DEF_TRIM 0 |
44 | 43 | ||
45 | static unsigned long rtc_freq = 1024; | 44 | static unsigned long rtc_freq = 1024; |
45 | static unsigned long timer_freq; | ||
46 | static struct rtc_time rtc_alarm; | 46 | static struct rtc_time rtc_alarm; |
47 | static DEFINE_SPINLOCK(sa1100_rtc_lock); | 47 | static DEFINE_SPINLOCK(sa1100_rtc_lock); |
48 | 48 | ||
@@ -157,7 +157,7 @@ static irqreturn_t timer1_interrupt(int irq, void *dev_id) | |||
157 | rtc_update_irq(rtc, rtc_timer1_count, RTC_PF | RTC_IRQF); | 157 | rtc_update_irq(rtc, rtc_timer1_count, RTC_PF | RTC_IRQF); |
158 | 158 | ||
159 | if (rtc_timer1_count == 1) | 159 | if (rtc_timer1_count == 1) |
160 | rtc_timer1_count = (rtc_freq * ((1<<30)/(TIMER_FREQ>>2))); | 160 | rtc_timer1_count = (rtc_freq * ((1 << 30) / (timer_freq >> 2))); |
161 | 161 | ||
162 | return IRQ_HANDLED; | 162 | return IRQ_HANDLED; |
163 | } | 163 | } |
@@ -166,7 +166,7 @@ static int sa1100_rtc_read_callback(struct device *dev, int data) | |||
166 | { | 166 | { |
167 | if (data & RTC_PF) { | 167 | if (data & RTC_PF) { |
168 | /* interpolate missed periods and set match for the next */ | 168 | /* interpolate missed periods and set match for the next */ |
169 | unsigned long period = TIMER_FREQ/rtc_freq; | 169 | unsigned long period = timer_freq / rtc_freq; |
170 | unsigned long oscr = OSCR; | 170 | unsigned long oscr = OSCR; |
171 | unsigned long osmr1 = OSMR1; | 171 | unsigned long osmr1 = OSMR1; |
172 | unsigned long missed = (oscr - osmr1)/period; | 172 | unsigned long missed = (oscr - osmr1)/period; |
@@ -263,7 +263,7 @@ static int sa1100_rtc_ioctl(struct device *dev, unsigned int cmd, | |||
263 | return 0; | 263 | return 0; |
264 | case RTC_PIE_ON: | 264 | case RTC_PIE_ON: |
265 | spin_lock_irq(&sa1100_rtc_lock); | 265 | spin_lock_irq(&sa1100_rtc_lock); |
266 | OSMR1 = TIMER_FREQ/rtc_freq + OSCR; | 266 | OSMR1 = timer_freq / rtc_freq + OSCR; |
267 | OIER |= OIER_E1; | 267 | OIER |= OIER_E1; |
268 | rtc_timer1_count = 1; | 268 | rtc_timer1_count = 1; |
269 | spin_unlock_irq(&sa1100_rtc_lock); | 269 | spin_unlock_irq(&sa1100_rtc_lock); |
@@ -271,7 +271,7 @@ static int sa1100_rtc_ioctl(struct device *dev, unsigned int cmd, | |||
271 | case RTC_IRQP_READ: | 271 | case RTC_IRQP_READ: |
272 | return put_user(rtc_freq, (unsigned long *)arg); | 272 | return put_user(rtc_freq, (unsigned long *)arg); |
273 | case RTC_IRQP_SET: | 273 | case RTC_IRQP_SET: |
274 | if (arg < 1 || arg > TIMER_FREQ) | 274 | if (arg < 1 || arg > timer_freq) |
275 | return -EINVAL; | 275 | return -EINVAL; |
276 | rtc_freq = arg; | 276 | rtc_freq = arg; |
277 | return 0; | 277 | return 0; |
@@ -352,6 +352,8 @@ static int sa1100_rtc_probe(struct platform_device *pdev) | |||
352 | { | 352 | { |
353 | struct rtc_device *rtc; | 353 | struct rtc_device *rtc; |
354 | 354 | ||
355 | timer_freq = get_clock_tick_rate(); | ||
356 | |||
355 | /* | 357 | /* |
356 | * According to the manual we should be able to let RTTR be zero | 358 | * According to the manual we should be able to let RTTR be zero |
357 | * and then a default diviser for a 32.768KHz clock is used. | 359 | * and then a default diviser for a 32.768KHz clock is used. |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 579d63a81aa2..b695ab3142d8 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -447,7 +447,7 @@ config SERIAL_CLPS711X_CONSOLE | |||
447 | 447 | ||
448 | config SERIAL_SAMSUNG | 448 | config SERIAL_SAMSUNG |
449 | tristate "Samsung SoC serial support" | 449 | tristate "Samsung SoC serial support" |
450 | depends on ARM && PLAT_S3C24XX | 450 | depends on ARM && PLAT_S3C |
451 | select SERIAL_CORE | 451 | select SERIAL_CORE |
452 | help | 452 | help |
453 | Support for the on-chip UARTs on the Samsung S3C24XX series CPUs, | 453 | Support for the on-chip UARTs on the Samsung S3C24XX series CPUs, |
@@ -455,6 +455,16 @@ config SERIAL_SAMSUNG | |||
455 | provide all of these ports, depending on how the serial port | 455 | provide all of these ports, depending on how the serial port |
456 | pins are configured. | 456 | pins are configured. |
457 | 457 | ||
458 | config SERIAL_SAMSUNG_UARTS | ||
459 | int | ||
460 | depends on SERIAL_SAMSUNG | ||
461 | default 2 if ARCH_S3C2400 | ||
462 | default 4 if ARCH_S3C64XX || CPU_S3C2443 | ||
463 | default 3 | ||
464 | help | ||
465 | Select the number of available UART ports for the Samsung S3C | ||
466 | serial driver | ||
467 | |||
458 | config SERIAL_SAMSUNG_DEBUG | 468 | config SERIAL_SAMSUNG_DEBUG |
459 | bool "Samsung SoC serial debug" | 469 | bool "Samsung SoC serial debug" |
460 | depends on SERIAL_SAMSUNG && DEBUG_LL | 470 | depends on SERIAL_SAMSUNG && DEBUG_LL |
@@ -508,7 +518,20 @@ config SERIAL_S3C2440 | |||
508 | help | 518 | help |
509 | Serial port support for the Samsung S3C2440 and S3C2442 SoC | 519 | Serial port support for the Samsung S3C2440 and S3C2442 SoC |
510 | 520 | ||
521 | config SERIAL_S3C24A0 | ||
522 | tristate "Samsung S3C24A0 Serial port support" | ||
523 | depends on SERIAL_SAMSUNG && CPU_S3C24A0 | ||
524 | default y if CPU_S3C24A0 | ||
525 | help | ||
526 | Serial port support for the Samsung S3C24A0 SoC | ||
511 | 527 | ||
528 | config SERIAL_S3C6400 | ||
529 | tristate "Samsung S3C6400/S3C6410 Serial port support" | ||
530 | depends on SERIAL_SAMSUNG && (CPU_S3C600 || CPU_S3C6410) | ||
531 | default y | ||
532 | help | ||
533 | Serial port support for the Samsung S3C6400 and S3C6410 | ||
534 | SoCs | ||
512 | 535 | ||
513 | config SERIAL_DZ | 536 | config SERIAL_DZ |
514 | bool "DECstation DZ serial driver" | 537 | bool "DECstation DZ serial driver" |
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile index 0c17c8ddb19d..dfe775ac45b2 100644 --- a/drivers/serial/Makefile +++ b/drivers/serial/Makefile | |||
@@ -41,6 +41,8 @@ obj-$(CONFIG_SERIAL_S3C2400) += s3c2400.o | |||
41 | obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o | 41 | obj-$(CONFIG_SERIAL_S3C2410) += s3c2410.o |
42 | obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o | 42 | obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o |
43 | obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o | 43 | obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o |
44 | obj-$(CONFIG_SERIAL_S3C24A0) += s3c24a0.o | ||
45 | obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o | ||
44 | obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o | 46 | obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o |
45 | obj-$(CONFIG_SERIAL_MUX) += mux.o | 47 | obj-$(CONFIG_SERIAL_MUX) += mux.o |
46 | obj-$(CONFIG_SERIAL_68328) += 68328serial.o | 48 | obj-$(CONFIG_SERIAL_68328) += 68328serial.o |
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c index 71562689116f..e3a5ad5ef1d6 100644 --- a/drivers/serial/amba-pl010.c +++ b/drivers/serial/amba-pl010.c | |||
@@ -692,7 +692,7 @@ static int pl010_probe(struct amba_device *dev, void *id) | |||
692 | goto free; | 692 | goto free; |
693 | } | 693 | } |
694 | 694 | ||
695 | uap->clk = clk_get(&dev->dev, "UARTCLK"); | 695 | uap->clk = clk_get(&dev->dev, NULL); |
696 | if (IS_ERR(uap->clk)) { | 696 | if (IS_ERR(uap->clk)) { |
697 | ret = PTR_ERR(uap->clk); | 697 | ret = PTR_ERR(uap->clk); |
698 | goto unmap; | 698 | goto unmap; |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index b7180046f8db..8b2b9700f3e4 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -756,7 +756,7 @@ static int pl011_probe(struct amba_device *dev, void *id) | |||
756 | goto free; | 756 | goto free; |
757 | } | 757 | } |
758 | 758 | ||
759 | uap->clk = clk_get(&dev->dev, "UARTCLK"); | 759 | uap->clk = clk_get(&dev->dev, NULL); |
760 | if (IS_ERR(uap->clk)) { | 760 | if (IS_ERR(uap->clk)) { |
761 | ret = PTR_ERR(uap->clk); | 761 | ret = PTR_ERR(uap->clk); |
762 | goto unmap; | 762 | goto unmap; |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 3f90f1bbbbcd..a50954612b60 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -66,7 +66,7 @@ | |||
66 | #define ONEMS 0xb0 /* One Millisecond register */ | 66 | #define ONEMS 0xb0 /* One Millisecond register */ |
67 | #define UTS 0xb4 /* UART Test Register */ | 67 | #define UTS 0xb4 /* UART Test Register */ |
68 | #endif | 68 | #endif |
69 | #ifdef CONFIG_ARCH_IMX | 69 | #if defined(CONFIG_ARCH_IMX) || defined(CONFIG_ARCH_MX1) |
70 | #define BIPR1 0xb0 /* Incremental Preset Register 1 */ | 70 | #define BIPR1 0xb0 /* Incremental Preset Register 1 */ |
71 | #define BIPR2 0xb4 /* Incremental Preset Register 2 */ | 71 | #define BIPR2 0xb4 /* Incremental Preset Register 2 */ |
72 | #define BIPR3 0xb8 /* Incremental Preset Register 3 */ | 72 | #define BIPR3 0xb8 /* Incremental Preset Register 3 */ |
@@ -96,7 +96,7 @@ | |||
96 | #define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */ | 96 | #define UCR1_RTSDEN (1<<5) /* RTS delta interrupt enable */ |
97 | #define UCR1_SNDBRK (1<<4) /* Send break */ | 97 | #define UCR1_SNDBRK (1<<4) /* Send break */ |
98 | #define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */ | 98 | #define UCR1_TDMAEN (1<<3) /* Transmitter ready DMA enable */ |
99 | #ifdef CONFIG_ARCH_IMX | 99 | #if defined(CONFIG_ARCH_IMX) || defined(CONFIG_ARCH_MX1) |
100 | #define UCR1_UARTCLKEN (1<<2) /* UART clock enabled */ | 100 | #define UCR1_UARTCLKEN (1<<2) /* UART clock enabled */ |
101 | #endif | 101 | #endif |
102 | #if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2 | 102 | #if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2 |
@@ -187,11 +187,11 @@ | |||
187 | #define MAX_INTERNAL_IRQ IMX_IRQS | 187 | #define MAX_INTERNAL_IRQ IMX_IRQS |
188 | #endif | 188 | #endif |
189 | 189 | ||
190 | #if defined CONFIG_ARCH_MX3 || defined CONFIG_ARCH_MX2 | 190 | #ifdef CONFIG_ARCH_MXC |
191 | #define SERIAL_IMX_MAJOR 207 | 191 | #define SERIAL_IMX_MAJOR 207 |
192 | #define MINOR_START 16 | 192 | #define MINOR_START 16 |
193 | #define DEV_NAME "ttymxc" | 193 | #define DEV_NAME "ttymxc" |
194 | #define MAX_INTERNAL_IRQ MXC_MAX_INT_LINES | 194 | #define MAX_INTERNAL_IRQ MXC_INTERNAL_IRQS |
195 | #endif | 195 | #endif |
196 | 196 | ||
197 | /* | 197 | /* |
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index abc00be55433..f6e3b86bb0be 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <mach/hardware.h> | 48 | #include <mach/hardware.h> |
49 | #include <asm/irq.h> | 49 | #include <asm/irq.h> |
50 | #include <mach/pxa-regs.h> | 50 | #include <mach/pxa-regs.h> |
51 | #include <mach/regs-uart.h> | ||
51 | 52 | ||
52 | 53 | ||
53 | struct uart_pxa_port { | 54 | struct uart_pxa_port { |
@@ -766,7 +767,7 @@ static int serial_pxa_probe(struct platform_device *dev) | |||
766 | if (!sport) | 767 | if (!sport) |
767 | return -ENOMEM; | 768 | return -ENOMEM; |
768 | 769 | ||
769 | sport->clk = clk_get(&dev->dev, "UARTCLK"); | 770 | sport->clk = clk_get(&dev->dev, NULL); |
770 | if (IS_ERR(sport->clk)) { | 771 | if (IS_ERR(sport->clk)) { |
771 | ret = PTR_ERR(sport->clk); | 772 | ret = PTR_ERR(sport->clk); |
772 | goto err_free; | 773 | goto err_free; |
diff --git a/drivers/serial/s3c24a0.c b/drivers/serial/s3c24a0.c new file mode 100644 index 000000000000..ebf2fd3c8f7d --- /dev/null +++ b/drivers/serial/s3c24a0.c | |||
@@ -0,0 +1,118 @@ | |||
1 | /* linux/drivers/serial/s3c24a0.c | ||
2 | * | ||
3 | * Driver for Samsung S3C24A0 SoC onboard UARTs. | ||
4 | * | ||
5 | * Based on drivers/serial/s3c2410.c | ||
6 | * | ||
7 | * Author: Sandeep Patil <sandeep.patil@azingo.com> | ||
8 | * | ||
9 | * Ben Dooks, Copyright (c) 2003-2005,2008 Simtec Electronics | ||
10 | * http://armlinux.simtec.co.uk/ | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #include <linux/module.h> | ||
18 | #include <linux/ioport.h> | ||
19 | #include <linux/platform_device.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/serial_core.h> | ||
22 | #include <linux/serial.h> | ||
23 | #include <linux/io.h> | ||
24 | #include <linux/irq.h> | ||
25 | |||
26 | #include <mach/hardware.h> | ||
27 | |||
28 | #include <plat/regs-serial.h> | ||
29 | #include <mach/regs-gpio.h> | ||
30 | |||
31 | #include "samsung.h" | ||
32 | |||
33 | static int s3c24a0_serial_setsource(struct uart_port *port, | ||
34 | struct s3c24xx_uart_clksrc *clk) | ||
35 | { | ||
36 | unsigned long ucon = rd_regl(port, S3C2410_UCON); | ||
37 | |||
38 | if (strcmp(clk->name, "uclk") == 0) | ||
39 | ucon |= S3C2410_UCON_UCLK; | ||
40 | else | ||
41 | ucon &= ~S3C2410_UCON_UCLK; | ||
42 | |||
43 | wr_regl(port, S3C2410_UCON, ucon); | ||
44 | return 0; | ||
45 | } | ||
46 | |||
47 | static int s3c24a0_serial_getsource(struct uart_port *port, | ||
48 | struct s3c24xx_uart_clksrc *clk) | ||
49 | { | ||
50 | unsigned long ucon = rd_regl(port, S3C2410_UCON); | ||
51 | |||
52 | clk->divisor = 1; | ||
53 | clk->name = (ucon & S3C2410_UCON_UCLK) ? "uclk" : "pclk"; | ||
54 | |||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | static int s3c24a0_serial_resetport(struct uart_port *port, | ||
59 | struct s3c2410_uartcfg *cfg) | ||
60 | { | ||
61 | dbg("s3c24a0_serial_resetport: port=%p (%08lx), cfg=%p\n", | ||
62 | port, port->mapbase, cfg); | ||
63 | |||
64 | wr_regl(port, S3C2410_UCON, cfg->ucon); | ||
65 | wr_regl(port, S3C2410_ULCON, cfg->ulcon); | ||
66 | |||
67 | /* reset both fifos */ | ||
68 | |||
69 | wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); | ||
70 | wr_regl(port, S3C2410_UFCON, cfg->ufcon); | ||
71 | |||
72 | return 0; | ||
73 | } | ||
74 | |||
75 | static struct s3c24xx_uart_info s3c24a0_uart_inf = { | ||
76 | .name = "Samsung S3C24A0 UART", | ||
77 | .type = PORT_S3C2410, | ||
78 | .fifosize = 16, | ||
79 | .rx_fifomask = S3C24A0_UFSTAT_RXMASK, | ||
80 | .rx_fifoshift = S3C24A0_UFSTAT_RXSHIFT, | ||
81 | .rx_fifofull = S3C24A0_UFSTAT_RXFULL, | ||
82 | .tx_fifofull = S3C24A0_UFSTAT_TXFULL, | ||
83 | .tx_fifomask = S3C24A0_UFSTAT_TXMASK, | ||
84 | .tx_fifoshift = S3C24A0_UFSTAT_TXSHIFT, | ||
85 | .get_clksrc = s3c24a0_serial_getsource, | ||
86 | .set_clksrc = s3c24a0_serial_setsource, | ||
87 | .reset_port = s3c24a0_serial_resetport, | ||
88 | }; | ||
89 | |||
90 | static int s3c24a0_serial_probe(struct platform_device *dev) | ||
91 | { | ||
92 | return s3c24xx_serial_probe(dev, &s3c24a0_uart_inf); | ||
93 | } | ||
94 | |||
95 | static struct platform_driver s3c24a0_serial_drv = { | ||
96 | .probe = s3c24a0_serial_probe, | ||
97 | .remove = s3c24xx_serial_remove, | ||
98 | .driver = { | ||
99 | .name = "s3c24a0-uart", | ||
100 | .owner = THIS_MODULE, | ||
101 | }, | ||
102 | }; | ||
103 | |||
104 | s3c24xx_console_init(&s3c24a0_serial_drv, &s3c24a0_uart_inf); | ||
105 | |||
106 | static int __init s3c24a0_serial_init(void) | ||
107 | { | ||
108 | return s3c24xx_serial_init(&s3c24a0_serial_drv, &s3c24a0_uart_inf); | ||
109 | } | ||
110 | |||
111 | static void __exit s3c24a0_serial_exit(void) | ||
112 | { | ||
113 | platform_driver_unregister(&s3c24a0_serial_drv); | ||
114 | } | ||
115 | |||
116 | module_init(s3c24a0_serial_init); | ||
117 | module_exit(s3c24a0_serial_exit); | ||
118 | |||
diff --git a/drivers/serial/s3c6400.c b/drivers/serial/s3c6400.c new file mode 100644 index 000000000000..06936d13393f --- /dev/null +++ b/drivers/serial/s3c6400.c | |||
@@ -0,0 +1,151 @@ | |||
1 | /* linux/drivers/serial/s3c6400.c | ||
2 | * | ||
3 | * Driver for Samsung S3C6400 and S3C6410 SoC onboard UARTs. | ||
4 | * | ||
5 | * Copyright 2008 Openmoko, Inc. | ||
6 | * Copyright 2008 Simtec Electronics | ||
7 | * Ben Dooks <ben@simtec.co.uk> | ||
8 | * http://armlinux.simtec.co.uk/ | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/module.h> | ||
16 | #include <linux/ioport.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/serial_core.h> | ||
21 | #include <linux/serial.h> | ||
22 | |||
23 | #include <asm/irq.h> | ||
24 | #include <mach/hardware.h> | ||
25 | |||
26 | #include <plat/regs-serial.h> | ||
27 | |||
28 | #include "samsung.h" | ||
29 | |||
30 | static int s3c6400_serial_setsource(struct uart_port *port, | ||
31 | struct s3c24xx_uart_clksrc *clk) | ||
32 | { | ||
33 | unsigned long ucon = rd_regl(port, S3C2410_UCON); | ||
34 | |||
35 | if (strcmp(clk->name, "uclk0") == 0) { | ||
36 | ucon &= ~S3C6400_UCON_CLKMASK; | ||
37 | ucon |= S3C6400_UCON_UCLK0; | ||
38 | } else if (strcmp(clk->name, "uclk1") == 0) | ||
39 | ucon |= S3C6400_UCON_UCLK1; | ||
40 | else if (strcmp(clk->name, "pclk") == 0) { | ||
41 | /* See notes about transitioning from UCLK to PCLK */ | ||
42 | ucon &= ~S3C6400_UCON_UCLK0; | ||
43 | } else { | ||
44 | printk(KERN_ERR "unknown clock source %s\n", clk->name); | ||
45 | return -EINVAL; | ||
46 | } | ||
47 | |||
48 | wr_regl(port, S3C2410_UCON, ucon); | ||
49 | return 0; | ||
50 | } | ||
51 | |||
52 | |||
53 | static int s3c6400_serial_getsource(struct uart_port *port, | ||
54 | struct s3c24xx_uart_clksrc *clk) | ||
55 | { | ||
56 | u32 ucon = rd_regl(port, S3C2410_UCON); | ||
57 | |||
58 | clk->divisor = 1; | ||
59 | |||
60 | switch (ucon & S3C6400_UCON_CLKMASK) { | ||
61 | case S3C6400_UCON_UCLK0: | ||
62 | clk->name = "uclk0"; | ||
63 | break; | ||
64 | |||
65 | case S3C6400_UCON_UCLK1: | ||
66 | clk->name = "uclk1"; | ||
67 | break; | ||
68 | |||
69 | case S3C6400_UCON_PCLK: | ||
70 | case S3C6400_UCON_PCLK2: | ||
71 | clk->name = "pclk"; | ||
72 | break; | ||
73 | } | ||
74 | |||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | static int s3c6400_serial_resetport(struct uart_port *port, | ||
79 | struct s3c2410_uartcfg *cfg) | ||
80 | { | ||
81 | unsigned long ucon = rd_regl(port, S3C2410_UCON); | ||
82 | |||
83 | dbg("s3c6400_serial_resetport: port=%p (%08lx), cfg=%p\n", | ||
84 | port, port->mapbase, cfg); | ||
85 | |||
86 | /* ensure we don't change the clock settings... */ | ||
87 | |||
88 | ucon &= S3C6400_UCON_CLKMASK; | ||
89 | |||
90 | wr_regl(port, S3C2410_UCON, ucon | cfg->ucon); | ||
91 | wr_regl(port, S3C2410_ULCON, cfg->ulcon); | ||
92 | |||
93 | /* reset both fifos */ | ||
94 | |||
95 | wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH); | ||
96 | wr_regl(port, S3C2410_UFCON, cfg->ufcon); | ||
97 | |||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | static struct s3c24xx_uart_info s3c6400_uart_inf = { | ||
102 | .name = "Samsung S3C6400 UART", | ||
103 | .type = PORT_S3C6400, | ||
104 | .fifosize = 64, | ||
105 | .rx_fifomask = S3C2440_UFSTAT_RXMASK, | ||
106 | .rx_fifoshift = S3C2440_UFSTAT_RXSHIFT, | ||
107 | .rx_fifofull = S3C2440_UFSTAT_RXFULL, | ||
108 | .tx_fifofull = S3C2440_UFSTAT_TXFULL, | ||
109 | .tx_fifomask = S3C2440_UFSTAT_TXMASK, | ||
110 | .tx_fifoshift = S3C2440_UFSTAT_TXSHIFT, | ||
111 | .get_clksrc = s3c6400_serial_getsource, | ||
112 | .set_clksrc = s3c6400_serial_setsource, | ||
113 | .reset_port = s3c6400_serial_resetport, | ||
114 | }; | ||
115 | |||
116 | /* device management */ | ||
117 | |||
118 | static int s3c6400_serial_probe(struct platform_device *dev) | ||
119 | { | ||
120 | dbg("s3c6400_serial_probe: dev=%p\n", dev); | ||
121 | return s3c24xx_serial_probe(dev, &s3c6400_uart_inf); | ||
122 | } | ||
123 | |||
124 | static struct platform_driver s3c6400_serial_drv = { | ||
125 | .probe = s3c6400_serial_probe, | ||
126 | .remove = s3c24xx_serial_remove, | ||
127 | .driver = { | ||
128 | .name = "s3c6400-uart", | ||
129 | .owner = THIS_MODULE, | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | s3c24xx_console_init(&s3c6400_serial_drv, &s3c6400_uart_inf); | ||
134 | |||
135 | static int __init s3c6400_serial_init(void) | ||
136 | { | ||
137 | return s3c24xx_serial_init(&s3c6400_serial_drv, &s3c6400_uart_inf); | ||
138 | } | ||
139 | |||
140 | static void __exit s3c6400_serial_exit(void) | ||
141 | { | ||
142 | platform_driver_unregister(&s3c6400_serial_drv); | ||
143 | } | ||
144 | |||
145 | module_init(s3c6400_serial_init); | ||
146 | module_exit(s3c6400_serial_exit); | ||
147 | |||
148 | MODULE_DESCRIPTION("Samsung S3C6400,S3C6410 SoC Serial port driver"); | ||
149 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); | ||
150 | MODULE_LICENSE("GPL v2"); | ||
151 | MODULE_ALIAS("platform:s3c6400-uart"); | ||
diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c index 1e219d3d0352..41ac94872b8d 100644 --- a/drivers/serial/samsung.c +++ b/drivers/serial/samsung.c | |||
@@ -42,13 +42,14 @@ | |||
42 | #include <linux/serial.h> | 42 | #include <linux/serial.h> |
43 | #include <linux/delay.h> | 43 | #include <linux/delay.h> |
44 | #include <linux/clk.h> | 44 | #include <linux/clk.h> |
45 | #include <linux/cpufreq.h> | ||
45 | 46 | ||
46 | #include <asm/irq.h> | 47 | #include <asm/irq.h> |
47 | 48 | ||
48 | #include <mach/hardware.h> | 49 | #include <mach/hardware.h> |
50 | #include <mach/map.h> | ||
49 | 51 | ||
50 | #include <plat/regs-serial.h> | 52 | #include <plat/regs-serial.h> |
51 | #include <mach/regs-gpio.h> | ||
52 | 53 | ||
53 | #include "samsung.h" | 54 | #include "samsung.h" |
54 | 55 | ||
@@ -58,19 +59,6 @@ | |||
58 | #define S3C24XX_SERIAL_MAJOR 204 | 59 | #define S3C24XX_SERIAL_MAJOR 204 |
59 | #define S3C24XX_SERIAL_MINOR 64 | 60 | #define S3C24XX_SERIAL_MINOR 64 |
60 | 61 | ||
61 | /* we can support 3 uarts, but not always use them */ | ||
62 | |||
63 | #ifdef CONFIG_CPU_S3C2400 | ||
64 | #define NR_PORTS (2) | ||
65 | #else | ||
66 | #define NR_PORTS (3) | ||
67 | #endif | ||
68 | |||
69 | /* port irq numbers */ | ||
70 | |||
71 | #define TX_IRQ(port) ((port)->irq + 1) | ||
72 | #define RX_IRQ(port) ((port)->irq) | ||
73 | |||
74 | /* macros to change one thing to another */ | 62 | /* macros to change one thing to another */ |
75 | 63 | ||
76 | #define tx_enabled(port) ((port)->unused[0]) | 64 | #define tx_enabled(port) ((port)->unused[0]) |
@@ -136,8 +124,10 @@ static void s3c24xx_serial_rx_disable(struct uart_port *port) | |||
136 | 124 | ||
137 | static void s3c24xx_serial_stop_tx(struct uart_port *port) | 125 | static void s3c24xx_serial_stop_tx(struct uart_port *port) |
138 | { | 126 | { |
127 | struct s3c24xx_uart_port *ourport = to_ourport(port); | ||
128 | |||
139 | if (tx_enabled(port)) { | 129 | if (tx_enabled(port)) { |
140 | disable_irq(TX_IRQ(port)); | 130 | disable_irq(ourport->tx_irq); |
141 | tx_enabled(port) = 0; | 131 | tx_enabled(port) = 0; |
142 | if (port->flags & UPF_CONS_FLOW) | 132 | if (port->flags & UPF_CONS_FLOW) |
143 | s3c24xx_serial_rx_enable(port); | 133 | s3c24xx_serial_rx_enable(port); |
@@ -146,11 +136,13 @@ static void s3c24xx_serial_stop_tx(struct uart_port *port) | |||
146 | 136 | ||
147 | static void s3c24xx_serial_start_tx(struct uart_port *port) | 137 | static void s3c24xx_serial_start_tx(struct uart_port *port) |
148 | { | 138 | { |
139 | struct s3c24xx_uart_port *ourport = to_ourport(port); | ||
140 | |||
149 | if (!tx_enabled(port)) { | 141 | if (!tx_enabled(port)) { |
150 | if (port->flags & UPF_CONS_FLOW) | 142 | if (port->flags & UPF_CONS_FLOW) |
151 | s3c24xx_serial_rx_disable(port); | 143 | s3c24xx_serial_rx_disable(port); |
152 | 144 | ||
153 | enable_irq(TX_IRQ(port)); | 145 | enable_irq(ourport->tx_irq); |
154 | tx_enabled(port) = 1; | 146 | tx_enabled(port) = 1; |
155 | } | 147 | } |
156 | } | 148 | } |
@@ -158,9 +150,11 @@ static void s3c24xx_serial_start_tx(struct uart_port *port) | |||
158 | 150 | ||
159 | static void s3c24xx_serial_stop_rx(struct uart_port *port) | 151 | static void s3c24xx_serial_stop_rx(struct uart_port *port) |
160 | { | 152 | { |
153 | struct s3c24xx_uart_port *ourport = to_ourport(port); | ||
154 | |||
161 | if (rx_enabled(port)) { | 155 | if (rx_enabled(port)) { |
162 | dbg("s3c24xx_serial_stop_rx: port=%p\n", port); | 156 | dbg("s3c24xx_serial_stop_rx: port=%p\n", port); |
163 | disable_irq(RX_IRQ(port)); | 157 | disable_irq(ourport->rx_irq); |
164 | rx_enabled(port) = 0; | 158 | rx_enabled(port) = 0; |
165 | } | 159 | } |
166 | } | 160 | } |
@@ -384,13 +378,13 @@ static void s3c24xx_serial_shutdown(struct uart_port *port) | |||
384 | struct s3c24xx_uart_port *ourport = to_ourport(port); | 378 | struct s3c24xx_uart_port *ourport = to_ourport(port); |
385 | 379 | ||
386 | if (ourport->tx_claimed) { | 380 | if (ourport->tx_claimed) { |
387 | free_irq(TX_IRQ(port), ourport); | 381 | free_irq(ourport->tx_irq, ourport); |
388 | tx_enabled(port) = 0; | 382 | tx_enabled(port) = 0; |
389 | ourport->tx_claimed = 0; | 383 | ourport->tx_claimed = 0; |
390 | } | 384 | } |
391 | 385 | ||
392 | if (ourport->rx_claimed) { | 386 | if (ourport->rx_claimed) { |
393 | free_irq(RX_IRQ(port), ourport); | 387 | free_irq(ourport->rx_irq, ourport); |
394 | ourport->rx_claimed = 0; | 388 | ourport->rx_claimed = 0; |
395 | rx_enabled(port) = 0; | 389 | rx_enabled(port) = 0; |
396 | } | 390 | } |
@@ -407,12 +401,11 @@ static int s3c24xx_serial_startup(struct uart_port *port) | |||
407 | 401 | ||
408 | rx_enabled(port) = 1; | 402 | rx_enabled(port) = 1; |
409 | 403 | ||
410 | ret = request_irq(RX_IRQ(port), | 404 | ret = request_irq(ourport->rx_irq, s3c24xx_serial_rx_chars, 0, |
411 | s3c24xx_serial_rx_chars, 0, | ||
412 | s3c24xx_serial_portname(port), ourport); | 405 | s3c24xx_serial_portname(port), ourport); |
413 | 406 | ||
414 | if (ret != 0) { | 407 | if (ret != 0) { |
415 | printk(KERN_ERR "cannot get irq %d\n", RX_IRQ(port)); | 408 | printk(KERN_ERR "cannot get irq %d\n", ourport->rx_irq); |
416 | return ret; | 409 | return ret; |
417 | } | 410 | } |
418 | 411 | ||
@@ -422,12 +415,11 @@ static int s3c24xx_serial_startup(struct uart_port *port) | |||
422 | 415 | ||
423 | tx_enabled(port) = 1; | 416 | tx_enabled(port) = 1; |
424 | 417 | ||
425 | ret = request_irq(TX_IRQ(port), | 418 | ret = request_irq(ourport->tx_irq, s3c24xx_serial_tx_chars, 0, |
426 | s3c24xx_serial_tx_chars, 0, | ||
427 | s3c24xx_serial_portname(port), ourport); | 419 | s3c24xx_serial_portname(port), ourport); |
428 | 420 | ||
429 | if (ret) { | 421 | if (ret) { |
430 | printk(KERN_ERR "cannot get irq %d\n", TX_IRQ(port)); | 422 | printk(KERN_ERR "cannot get irq %d\n", ourport->tx_irq); |
431 | goto err; | 423 | goto err; |
432 | } | 424 | } |
433 | 425 | ||
@@ -452,6 +444,8 @@ static void s3c24xx_serial_pm(struct uart_port *port, unsigned int level, | |||
452 | { | 444 | { |
453 | struct s3c24xx_uart_port *ourport = to_ourport(port); | 445 | struct s3c24xx_uart_port *ourport = to_ourport(port); |
454 | 446 | ||
447 | ourport->pm_level = level; | ||
448 | |||
455 | switch (level) { | 449 | switch (level) { |
456 | case 3: | 450 | case 3: |
457 | if (!IS_ERR(ourport->baudclk) && ourport->baudclk != NULL) | 451 | if (!IS_ERR(ourport->baudclk) && ourport->baudclk != NULL) |
@@ -661,6 +655,7 @@ static void s3c24xx_serial_set_termios(struct uart_port *port, | |||
661 | 655 | ||
662 | ourport->clksrc = clksrc; | 656 | ourport->clksrc = clksrc; |
663 | ourport->baudclk = clk; | 657 | ourport->baudclk = clk; |
658 | ourport->baudclk_rate = clk ? clk_get_rate(clk) : 0; | ||
664 | } | 659 | } |
665 | 660 | ||
666 | switch (termios->c_cflag & CSIZE) { | 661 | switch (termios->c_cflag & CSIZE) { |
@@ -752,6 +747,8 @@ static const char *s3c24xx_serial_type(struct uart_port *port) | |||
752 | return "S3C2440"; | 747 | return "S3C2440"; |
753 | case PORT_S3C2412: | 748 | case PORT_S3C2412: |
754 | return "S3C2412"; | 749 | return "S3C2412"; |
750 | case PORT_S3C6400: | ||
751 | return "S3C6400/10"; | ||
755 | default: | 752 | default: |
756 | return NULL; | 753 | return NULL; |
757 | } | 754 | } |
@@ -827,14 +824,14 @@ static struct uart_ops s3c24xx_serial_ops = { | |||
827 | static struct uart_driver s3c24xx_uart_drv = { | 824 | static struct uart_driver s3c24xx_uart_drv = { |
828 | .owner = THIS_MODULE, | 825 | .owner = THIS_MODULE, |
829 | .dev_name = "s3c2410_serial", | 826 | .dev_name = "s3c2410_serial", |
830 | .nr = 3, | 827 | .nr = CONFIG_SERIAL_SAMSUNG_UARTS, |
831 | .cons = S3C24XX_SERIAL_CONSOLE, | 828 | .cons = S3C24XX_SERIAL_CONSOLE, |
832 | .driver_name = S3C24XX_SERIAL_NAME, | 829 | .driver_name = S3C24XX_SERIAL_NAME, |
833 | .major = S3C24XX_SERIAL_MAJOR, | 830 | .major = S3C24XX_SERIAL_MAJOR, |
834 | .minor = S3C24XX_SERIAL_MINOR, | 831 | .minor = S3C24XX_SERIAL_MINOR, |
835 | }; | 832 | }; |
836 | 833 | ||
837 | static struct s3c24xx_uart_port s3c24xx_serial_ports[NR_PORTS] = { | 834 | static struct s3c24xx_uart_port s3c24xx_serial_ports[CONFIG_SERIAL_SAMSUNG_UARTS] = { |
838 | [0] = { | 835 | [0] = { |
839 | .port = { | 836 | .port = { |
840 | .lock = __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[0].port.lock), | 837 | .lock = __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[0].port.lock), |
@@ -859,7 +856,7 @@ static struct s3c24xx_uart_port s3c24xx_serial_ports[NR_PORTS] = { | |||
859 | .line = 1, | 856 | .line = 1, |
860 | } | 857 | } |
861 | }, | 858 | }, |
862 | #if NR_PORTS > 2 | 859 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 2 |
863 | 860 | ||
864 | [2] = { | 861 | [2] = { |
865 | .port = { | 862 | .port = { |
@@ -872,6 +869,20 @@ static struct s3c24xx_uart_port s3c24xx_serial_ports[NR_PORTS] = { | |||
872 | .flags = UPF_BOOT_AUTOCONF, | 869 | .flags = UPF_BOOT_AUTOCONF, |
873 | .line = 2, | 870 | .line = 2, |
874 | } | 871 | } |
872 | }, | ||
873 | #endif | ||
874 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 3 | ||
875 | [3] = { | ||
876 | .port = { | ||
877 | .lock = __SPIN_LOCK_UNLOCKED(s3c24xx_serial_ports[3].port.lock), | ||
878 | .iotype = UPIO_MEM, | ||
879 | .irq = IRQ_S3CUART_RX3, | ||
880 | .uartclk = 0, | ||
881 | .fifosize = 16, | ||
882 | .ops = &s3c24xx_serial_ops, | ||
883 | .flags = UPF_BOOT_AUTOCONF, | ||
884 | .line = 3, | ||
885 | } | ||
875 | } | 886 | } |
876 | #endif | 887 | #endif |
877 | }; | 888 | }; |
@@ -890,6 +901,89 @@ static inline int s3c24xx_serial_resetport(struct uart_port *port, | |||
890 | return (info->reset_port)(port, cfg); | 901 | return (info->reset_port)(port, cfg); |
891 | } | 902 | } |
892 | 903 | ||
904 | |||
905 | #ifdef CONFIG_CPU_FREQ | ||
906 | |||
907 | static int s3c24xx_serial_cpufreq_transition(struct notifier_block *nb, | ||
908 | unsigned long val, void *data) | ||
909 | { | ||
910 | struct s3c24xx_uart_port *port; | ||
911 | struct uart_port *uport; | ||
912 | |||
913 | port = container_of(nb, struct s3c24xx_uart_port, freq_transition); | ||
914 | uport = &port->port; | ||
915 | |||
916 | /* check to see if port is enabled */ | ||
917 | |||
918 | if (port->pm_level != 0) | ||
919 | return 0; | ||
920 | |||
921 | /* try and work out if the baudrate is changing, we can detect | ||
922 | * a change in rate, but we do not have support for detecting | ||
923 | * a disturbance in the clock-rate over the change. | ||
924 | */ | ||
925 | |||
926 | if (IS_ERR(port->clk)) | ||
927 | goto exit; | ||
928 | |||
929 | if (port->baudclk_rate == clk_get_rate(port->clk)) | ||
930 | goto exit; | ||
931 | |||
932 | if (val == CPUFREQ_PRECHANGE) { | ||
933 | /* we should really shut the port down whilst the | ||
934 | * frequency change is in progress. */ | ||
935 | |||
936 | } else if (val == CPUFREQ_POSTCHANGE) { | ||
937 | struct ktermios *termios; | ||
938 | struct tty_struct *tty; | ||
939 | |||
940 | if (uport->info == NULL) | ||
941 | goto exit; | ||
942 | |||
943 | tty = uport->info->port.tty; | ||
944 | |||
945 | if (tty == NULL) | ||
946 | goto exit; | ||
947 | |||
948 | termios = tty->termios; | ||
949 | |||
950 | if (termios == NULL) { | ||
951 | printk(KERN_WARNING "%s: no termios?\n", __func__); | ||
952 | goto exit; | ||
953 | } | ||
954 | |||
955 | s3c24xx_serial_set_termios(uport, termios, NULL); | ||
956 | } | ||
957 | |||
958 | exit: | ||
959 | return 0; | ||
960 | } | ||
961 | |||
962 | static inline int s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) | ||
963 | { | ||
964 | port->freq_transition.notifier_call = s3c24xx_serial_cpufreq_transition; | ||
965 | |||
966 | return cpufreq_register_notifier(&port->freq_transition, | ||
967 | CPUFREQ_TRANSITION_NOTIFIER); | ||
968 | } | ||
969 | |||
970 | static inline void s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) | ||
971 | { | ||
972 | cpufreq_unregister_notifier(&port->freq_transition, | ||
973 | CPUFREQ_TRANSITION_NOTIFIER); | ||
974 | } | ||
975 | |||
976 | #else | ||
977 | static inline int s3c24xx_serial_cpufreq_register(struct s3c24xx_uart_port *port) | ||
978 | { | ||
979 | return 0; | ||
980 | } | ||
981 | |||
982 | static inline void s3c24xx_serial_cpufreq_deregister(struct s3c24xx_uart_port *port) | ||
983 | { | ||
984 | } | ||
985 | #endif | ||
986 | |||
893 | /* s3c24xx_serial_init_port | 987 | /* s3c24xx_serial_init_port |
894 | * | 988 | * |
895 | * initialise a single serial port from the platform device given | 989 | * initialise a single serial port from the platform device given |
@@ -914,8 +1008,11 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, | |||
914 | if (port->mapbase != 0) | 1008 | if (port->mapbase != 0) |
915 | return 0; | 1009 | return 0; |
916 | 1010 | ||
917 | if (cfg->hwport > 3) | 1011 | if (cfg->hwport > CONFIG_SERIAL_SAMSUNG_UARTS) { |
918 | return -EINVAL; | 1012 | printk(KERN_ERR "%s: port %d bigger than %d\n", __func__, |
1013 | cfg->hwport, CONFIG_SERIAL_SAMSUNG_UARTS); | ||
1014 | return -ERANGE; | ||
1015 | } | ||
919 | 1016 | ||
920 | /* setup info for port */ | 1017 | /* setup info for port */ |
921 | port->dev = &platdev->dev; | 1018 | port->dev = &platdev->dev; |
@@ -943,18 +1040,26 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, | |||
943 | 1040 | ||
944 | dbg("resource %p (%lx..%lx)\n", res, res->start, res->end); | 1041 | dbg("resource %p (%lx..%lx)\n", res, res->start, res->end); |
945 | 1042 | ||
946 | port->mapbase = res->start; | 1043 | port->mapbase = res->start; |
947 | port->membase = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART); | 1044 | port->membase = S3C_VA_UART + res->start - (S3C_PA_UART & 0xfff00000); |
948 | ret = platform_get_irq(platdev, 0); | 1045 | ret = platform_get_irq(platdev, 0); |
949 | if (ret < 0) | 1046 | if (ret < 0) |
950 | port->irq = 0; | 1047 | port->irq = 0; |
951 | else | 1048 | else { |
952 | port->irq = ret; | 1049 | port->irq = ret; |
1050 | ourport->rx_irq = ret; | ||
1051 | ourport->tx_irq = ret + 1; | ||
1052 | } | ||
1053 | |||
1054 | ret = platform_get_irq(platdev, 1); | ||
1055 | if (ret > 0) | ||
1056 | ourport->tx_irq = ret; | ||
953 | 1057 | ||
954 | ourport->clk = clk_get(&platdev->dev, "uart"); | 1058 | ourport->clk = clk_get(&platdev->dev, "uart"); |
955 | 1059 | ||
956 | dbg("port: map=%08x, mem=%08x, irq=%d, clock=%ld\n", | 1060 | dbg("port: map=%08x, mem=%08x, irq=%d (%d,%d), clock=%ld\n", |
957 | port->mapbase, port->membase, port->irq, port->uartclk); | 1061 | port->mapbase, port->membase, port->irq, |
1062 | ourport->rx_irq, ourport->tx_irq, port->uartclk); | ||
958 | 1063 | ||
959 | /* reset the fifos (and setup the uart) */ | 1064 | /* reset the fifos (and setup the uart) */ |
960 | s3c24xx_serial_resetport(port, cfg); | 1065 | s3c24xx_serial_resetport(port, cfg); |
@@ -1002,6 +1107,10 @@ int s3c24xx_serial_probe(struct platform_device *dev, | |||
1002 | if (ret < 0) | 1107 | if (ret < 0) |
1003 | printk(KERN_ERR "%s: failed to add clksrc attr.\n", __func__); | 1108 | printk(KERN_ERR "%s: failed to add clksrc attr.\n", __func__); |
1004 | 1109 | ||
1110 | ret = s3c24xx_serial_cpufreq_register(ourport); | ||
1111 | if (ret < 0) | ||
1112 | dev_err(&dev->dev, "failed to add cpufreq notifier\n"); | ||
1113 | |||
1005 | return 0; | 1114 | return 0; |
1006 | 1115 | ||
1007 | probe_err: | 1116 | probe_err: |
@@ -1015,6 +1124,7 @@ int s3c24xx_serial_remove(struct platform_device *dev) | |||
1015 | struct uart_port *port = s3c24xx_dev_to_port(&dev->dev); | 1124 | struct uart_port *port = s3c24xx_dev_to_port(&dev->dev); |
1016 | 1125 | ||
1017 | if (port) { | 1126 | if (port) { |
1127 | s3c24xx_serial_cpufreq_deregister(to_ourport(port)); | ||
1018 | device_remove_file(&dev->dev, &dev_attr_clock_source); | 1128 | device_remove_file(&dev->dev, &dev_attr_clock_source); |
1019 | uart_remove_one_port(&s3c24xx_uart_drv, port); | 1129 | uart_remove_one_port(&s3c24xx_uart_drv, port); |
1020 | } | 1130 | } |
@@ -1219,7 +1329,7 @@ static int s3c24xx_serial_init_ports(struct s3c24xx_uart_info *info) | |||
1219 | 1329 | ||
1220 | platdev_ptr = s3c24xx_uart_devs; | 1330 | platdev_ptr = s3c24xx_uart_devs; |
1221 | 1331 | ||
1222 | for (i = 0; i < NR_PORTS; i++, ptr++, platdev_ptr++) { | 1332 | for (i = 0; i < CONFIG_SERIAL_SAMSUNG_UARTS; i++, ptr++, platdev_ptr++) { |
1223 | s3c24xx_serial_init_port(ptr, info, *platdev_ptr); | 1333 | s3c24xx_serial_init_port(ptr, info, *platdev_ptr); |
1224 | } | 1334 | } |
1225 | 1335 | ||
@@ -1240,7 +1350,7 @@ s3c24xx_serial_console_setup(struct console *co, char *options) | |||
1240 | 1350 | ||
1241 | /* is this a valid port */ | 1351 | /* is this a valid port */ |
1242 | 1352 | ||
1243 | if (co->index == -1 || co->index >= NR_PORTS) | 1353 | if (co->index == -1 || co->index >= CONFIG_SERIAL_SAMSUNG_UARTS) |
1244 | co->index = 0; | 1354 | co->index = 0; |
1245 | 1355 | ||
1246 | port = &s3c24xx_serial_ports[co->index].port; | 1356 | port = &s3c24xx_serial_ports[co->index].port; |
diff --git a/drivers/serial/samsung.h b/drivers/serial/samsung.h index 5c92ebbe7d9e..571d6b90d206 100644 --- a/drivers/serial/samsung.h +++ b/drivers/serial/samsung.h | |||
@@ -33,12 +33,21 @@ struct s3c24xx_uart_info { | |||
33 | struct s3c24xx_uart_port { | 33 | struct s3c24xx_uart_port { |
34 | unsigned char rx_claimed; | 34 | unsigned char rx_claimed; |
35 | unsigned char tx_claimed; | 35 | unsigned char tx_claimed; |
36 | unsigned int pm_level; | ||
37 | unsigned long baudclk_rate; | ||
38 | |||
39 | unsigned int rx_irq; | ||
40 | unsigned int tx_irq; | ||
36 | 41 | ||
37 | struct s3c24xx_uart_info *info; | 42 | struct s3c24xx_uart_info *info; |
38 | struct s3c24xx_uart_clksrc *clksrc; | 43 | struct s3c24xx_uart_clksrc *clksrc; |
39 | struct clk *clk; | 44 | struct clk *clk; |
40 | struct clk *baudclk; | 45 | struct clk *baudclk; |
41 | struct uart_port port; | 46 | struct uart_port port; |
47 | |||
48 | #ifdef CONFIG_CPU_FREQ | ||
49 | struct notifier_block freq_transition; | ||
50 | #endif | ||
42 | }; | 51 | }; |
43 | 52 | ||
44 | /* conversion functions */ | 53 | /* conversion functions */ |
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c index 61dc8b3daa26..a7bf024a8286 100644 --- a/drivers/serial/serial_lh7a40x.c +++ b/drivers/serial/serial_lh7a40x.c | |||
@@ -41,9 +41,10 @@ | |||
41 | #include <linux/tty_flip.h> | 41 | #include <linux/tty_flip.h> |
42 | #include <linux/serial_core.h> | 42 | #include <linux/serial_core.h> |
43 | #include <linux/serial.h> | 43 | #include <linux/serial.h> |
44 | #include <linux/io.h> | ||
44 | 45 | ||
45 | #include <asm/io.h> | ||
46 | #include <asm/irq.h> | 46 | #include <asm/irq.h> |
47 | #include <mach/hardware.h> | ||
47 | 48 | ||
48 | #define DEV_MAJOR 204 | 49 | #define DEV_MAJOR 204 |
49 | #define DEV_MINOR 16 | 50 | #define DEV_MINOR 16 |
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index cf12f2d84be2..6104f461a3cd 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
@@ -32,8 +32,8 @@ | |||
32 | #include <asm/io.h> | 32 | #include <asm/io.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | #include <asm/delay.h> | 34 | #include <asm/delay.h> |
35 | #include <asm/dma.h> | ||
36 | 35 | ||
36 | #include <mach/dma.h> | ||
37 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
38 | #include <mach/pxa-regs.h> | 38 | #include <mach/pxa-regs.h> |
39 | #include <mach/regs-ssp.h> | 39 | #include <mach/regs-ssp.h> |
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c index c252cbac00f1..256d18395a23 100644 --- a/drivers/spi/spi_s3c24xx.c +++ b/drivers/spi/spi_s3c24xx.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | 29 | ||
30 | #include <mach/regs-gpio.h> | 30 | #include <mach/regs-gpio.h> |
31 | #include <asm/plat-s3c24xx/regs-spi.h> | 31 | #include <plat/regs-spi.h> |
32 | #include <mach/spi.h> | 32 | #include <mach/spi.h> |
33 | 33 | ||
34 | struct s3c24xx_spi { | 34 | struct s3c24xx_spi { |
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c index 2dbc0db0b46c..8c5026be79d4 100644 --- a/drivers/usb/gadget/pxa25x_udc.c +++ b/drivers/usb/gadget/pxa25x_udc.c | |||
@@ -2145,7 +2145,7 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev) | |||
2145 | if (irq < 0) | 2145 | if (irq < 0) |
2146 | return -ENODEV; | 2146 | return -ENODEV; |
2147 | 2147 | ||
2148 | dev->clk = clk_get(&pdev->dev, "UDCCLK"); | 2148 | dev->clk = clk_get(&pdev->dev, NULL); |
2149 | if (IS_ERR(dev->clk)) { | 2149 | if (IS_ERR(dev->clk)) { |
2150 | retval = PTR_ERR(dev->clk); | 2150 | retval = PTR_ERR(dev->clk); |
2151 | goto err_clk; | 2151 | goto err_clk; |
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c index caa37c95802c..944e4ff641df 100644 --- a/drivers/usb/gadget/pxa27x_udc.c +++ b/drivers/usb/gadget/pxa27x_udc.c | |||
@@ -2226,7 +2226,7 @@ static int __init pxa_udc_probe(struct platform_device *pdev) | |||
2226 | udc->dev = &pdev->dev; | 2226 | udc->dev = &pdev->dev; |
2227 | udc->mach = pdev->dev.platform_data; | 2227 | udc->mach = pdev->dev.platform_data; |
2228 | 2228 | ||
2229 | udc->clk = clk_get(&pdev->dev, "UDCCLK"); | 2229 | udc->clk = clk_get(&pdev->dev, NULL); |
2230 | if (IS_ERR(udc->clk)) { | 2230 | if (IS_ERR(udc->clk)) { |
2231 | retval = PTR_ERR(udc->clk); | 2231 | retval = PTR_ERR(udc->clk); |
2232 | goto err_clk; | 2232 | goto err_clk; |
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c index 00ba06b44752..8d8d65165983 100644 --- a/drivers/usb/gadget/s3c2410_udc.c +++ b/drivers/usb/gadget/s3c2410_udc.c | |||
@@ -53,8 +53,8 @@ | |||
53 | #include <mach/hardware.h> | 53 | #include <mach/hardware.h> |
54 | #include <mach/regs-gpio.h> | 54 | #include <mach/regs-gpio.h> |
55 | 55 | ||
56 | #include <asm/plat-s3c24xx/regs-udc.h> | 56 | #include <plat/regs-udc.h> |
57 | #include <asm/plat-s3c24xx/udc.h> | 57 | #include <plat/udc.h> |
58 | 58 | ||
59 | 59 | ||
60 | #include "s3c2410_udc.h" | 60 | #include "s3c2410_udc.h" |
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 5416cf969005..9d487908012e 100644 --- a/drivers/usb/host/ehci-orion.c +++ b/drivers/usb/host/ehci-orion.c | |||
@@ -33,8 +33,9 @@ | |||
33 | /* | 33 | /* |
34 | * Implement Orion USB controller specification guidelines | 34 | * Implement Orion USB controller specification guidelines |
35 | */ | 35 | */ |
36 | static void orion_usb_setup(struct usb_hcd *hcd) | 36 | static void orion_usb_phy_v1_setup(struct usb_hcd *hcd) |
37 | { | 37 | { |
38 | /* The below GLs are according to the Orion Errata document */ | ||
38 | /* | 39 | /* |
39 | * Clear interrupt cause and mask | 40 | * Clear interrupt cause and mask |
40 | */ | 41 | */ |
@@ -258,9 +259,19 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) | |||
258 | ehci_orion_conf_mbus_windows(hcd, pd->dram); | 259 | ehci_orion_conf_mbus_windows(hcd, pd->dram); |
259 | 260 | ||
260 | /* | 261 | /* |
261 | * setup Orion USB controller | 262 | * setup Orion USB controller. |
262 | */ | 263 | */ |
263 | orion_usb_setup(hcd); | 264 | switch (pd->phy_version) { |
265 | case EHCI_PHY_NA: /* dont change USB phy settings */ | ||
266 | break; | ||
267 | case EHCI_PHY_ORION: | ||
268 | orion_usb_phy_v1_setup(hcd); | ||
269 | break; | ||
270 | case EHCI_PHY_DD: | ||
271 | case EHCI_PHY_KW: | ||
272 | default: | ||
273 | printk(KERN_WARNING "Orion ehci -USB phy version isn't supported.\n"); | ||
274 | } | ||
264 | 275 | ||
265 | err = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_DISABLED); | 276 | err = usb_add_hcd(hcd, irq, IRQF_SHARED | IRQF_DISABLED); |
266 | if (err) | 277 | if (err) |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 91697bdb399f..4bbddb73abd9 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/jiffies.h> | 18 | #include <linux/jiffies.h> |
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/gpio.h> | ||
21 | 22 | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
@@ -25,7 +26,6 @@ | |||
25 | 26 | ||
26 | #include <mach/mux.h> | 27 | #include <mach/mux.h> |
27 | #include <mach/irqs.h> | 28 | #include <mach/irqs.h> |
28 | #include <mach/gpio.h> | ||
29 | #include <mach/fpga.h> | 29 | #include <mach/fpga.h> |
30 | #include <mach/usb.h> | 30 | #include <mach/usb.h> |
31 | 31 | ||
@@ -254,8 +254,8 @@ static int ohci_omap_init(struct usb_hcd *hcd) | |||
254 | 254 | ||
255 | /* gpio9 for overcurrent detction */ | 255 | /* gpio9 for overcurrent detction */ |
256 | omap_cfg_reg(W8_1610_GPIO9); | 256 | omap_cfg_reg(W8_1610_GPIO9); |
257 | omap_request_gpio(9); | 257 | gpio_request(9, "OHCI overcurrent"); |
258 | omap_set_gpio_direction(9, 1 /* IN */); | 258 | gpio_direction_input(9); |
259 | 259 | ||
260 | /* for paranoia's sake: disable USB.PUEN */ | 260 | /* for paranoia's sake: disable USB.PUEN */ |
261 | omap_cfg_reg(W4_USB_HIGHZ); | 261 | omap_cfg_reg(W4_USB_HIGHZ); |
@@ -407,7 +407,7 @@ usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) | |||
407 | put_device(ohci->transceiver->dev); | 407 | put_device(ohci->transceiver->dev); |
408 | } | 408 | } |
409 | if (machine_is_omap_osk()) | 409 | if (machine_is_omap_osk()) |
410 | omap_free_gpio(9); | 410 | gpio_free(9); |
411 | iounmap(hcd->regs); | 411 | iounmap(hcd->regs); |
412 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | 412 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
413 | usb_put_hcd(hcd); | 413 | usb_put_hcd(hcd); |
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index e294d430733b..e44dc2cbca24 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -296,7 +296,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device | |||
296 | return -ENXIO; | 296 | return -ENXIO; |
297 | } | 297 | } |
298 | 298 | ||
299 | usb_clk = clk_get(&pdev->dev, "USBCLK"); | 299 | usb_clk = clk_get(&pdev->dev, NULL); |
300 | if (IS_ERR(usb_clk)) | 300 | if (IS_ERR(usb_clk)) |
301 | return PTR_ERR(usb_clk); | 301 | return PTR_ERR(usb_clk); |
302 | 302 | ||
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index d0c821992a99..6372f8b17b45 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -362,7 +362,7 @@ endchoice | |||
362 | 362 | ||
363 | config FB_ACORN | 363 | config FB_ACORN |
364 | bool "Acorn VIDC support" | 364 | bool "Acorn VIDC support" |
365 | depends on (FB = y) && ARM && (ARCH_ACORN || ARCH_CLPS7500) | 365 | depends on (FB = y) && ARM && ARCH_ACORN |
366 | select FB_CFB_FILLRECT | 366 | select FB_CFB_FILLRECT |
367 | select FB_CFB_COPYAREA | 367 | select FB_CFB_COPYAREA |
368 | select FB_CFB_IMAGEBLIT | 368 | select FB_CFB_IMAGEBLIT |
@@ -1817,6 +1817,11 @@ config FB_PXA | |||
1817 | 1817 | ||
1818 | If unsure, say N. | 1818 | If unsure, say N. |
1819 | 1819 | ||
1820 | config FB_PXA_OVERLAY | ||
1821 | bool "Support PXA27x/PXA3xx Overlay(s) as framebuffer" | ||
1822 | default n | ||
1823 | depends on FB_PXA && (PXA27x || PXA3xx) | ||
1824 | |||
1820 | config FB_PXA_SMARTPANEL | 1825 | config FB_PXA_SMARTPANEL |
1821 | bool "PXA Smartpanel LCD support" | 1826 | bool "PXA Smartpanel LCD support" |
1822 | default n | 1827 | default n |
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index a7a1c891bfa2..2ac52fd8cc11 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c | |||
@@ -343,14 +343,14 @@ static int clcdfb_register(struct clcd_fb *fb) | |||
343 | { | 343 | { |
344 | int ret; | 344 | int ret; |
345 | 345 | ||
346 | fb->clk = clk_get(&fb->dev->dev, "CLCDCLK"); | 346 | fb->clk = clk_get(&fb->dev->dev, NULL); |
347 | if (IS_ERR(fb->clk)) { | 347 | if (IS_ERR(fb->clk)) { |
348 | ret = PTR_ERR(fb->clk); | 348 | ret = PTR_ERR(fb->clk); |
349 | goto out; | 349 | goto out; |
350 | } | 350 | } |
351 | 351 | ||
352 | fb->fb.fix.mmio_start = fb->dev->res.start; | 352 | fb->fb.fix.mmio_start = fb->dev->res.start; |
353 | fb->fb.fix.mmio_len = SZ_4K; | 353 | fb->fb.fix.mmio_len = 4096; |
354 | 354 | ||
355 | fb->regs = ioremap(fb->fb.fix.mmio_start, fb->fb.fix.mmio_len); | 355 | fb->regs = ioremap(fb->fb.fix.mmio_start, fb->fb.fix.mmio_len); |
356 | if (!fb->regs) { | 356 | if (!fb->regs) { |
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c index ccd986140c95..d58c68cd456e 100644 --- a/drivers/video/imxfb.c +++ b/drivers/video/imxfb.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/imxfb.c | ||
3 | * | ||
4 | * Freescale i.MX Frame Buffer device driver | 2 | * Freescale i.MX Frame Buffer device driver |
5 | * | 3 | * |
6 | * Copyright (C) 2004 Sascha Hauer, Pengutronix | 4 | * Copyright (C) 2004 Sascha Hauer, Pengutronix |
@@ -16,7 +14,6 @@ | |||
16 | * linux-arm-kernel@lists.arm.linux.org.uk | 14 | * linux-arm-kernel@lists.arm.linux.org.uk |
17 | */ | 15 | */ |
18 | 16 | ||
19 | //#define DEBUG 1 | ||
20 | 17 | ||
21 | #include <linux/module.h> | 18 | #include <linux/module.h> |
22 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
@@ -32,9 +29,8 @@ | |||
32 | #include <linux/cpufreq.h> | 29 | #include <linux/cpufreq.h> |
33 | #include <linux/platform_device.h> | 30 | #include <linux/platform_device.h> |
34 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
32 | #include <linux/io.h> | ||
35 | 33 | ||
36 | #include <mach/hardware.h> | ||
37 | #include <asm/io.h> | ||
38 | #include <mach/imxfb.h> | 34 | #include <mach/imxfb.h> |
39 | 35 | ||
40 | /* | 36 | /* |
@@ -42,23 +38,150 @@ | |||
42 | */ | 38 | */ |
43 | #define DEBUG_VAR 1 | 39 | #define DEBUG_VAR 1 |
44 | 40 | ||
45 | #include "imxfb.h" | 41 | #define DRIVER_NAME "imx-fb" |
42 | |||
43 | #define LCDC_SSA 0x00 | ||
44 | |||
45 | #define LCDC_SIZE 0x04 | ||
46 | #define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20) | ||
47 | #define SIZE_YMAX(y) ((y) & 0x1ff) | ||
48 | |||
49 | #define LCDC_VPW 0x08 | ||
50 | #define VPW_VPW(x) ((x) & 0x3ff) | ||
51 | |||
52 | #define LCDC_CPOS 0x0C | ||
53 | #define CPOS_CC1 (1<<31) | ||
54 | #define CPOS_CC0 (1<<30) | ||
55 | #define CPOS_OP (1<<28) | ||
56 | #define CPOS_CXP(x) (((x) & 3ff) << 16) | ||
57 | #define CPOS_CYP(y) ((y) & 0x1ff) | ||
58 | |||
59 | #define LCDC_LCWHB 0x10 | ||
60 | #define LCWHB_BK_EN (1<<31) | ||
61 | #define LCWHB_CW(w) (((w) & 0x1f) << 24) | ||
62 | #define LCWHB_CH(h) (((h) & 0x1f) << 16) | ||
63 | #define LCWHB_BD(x) ((x) & 0xff) | ||
64 | |||
65 | #define LCDC_LCHCC 0x14 | ||
66 | #define LCHCC_CUR_COL_R(r) (((r) & 0x1f) << 11) | ||
67 | #define LCHCC_CUR_COL_G(g) (((g) & 0x3f) << 5) | ||
68 | #define LCHCC_CUR_COL_B(b) ((b) & 0x1f) | ||
69 | |||
70 | #define LCDC_PCR 0x18 | ||
71 | |||
72 | #define LCDC_HCR 0x1C | ||
73 | #define HCR_H_WIDTH(x) (((x) & 0x3f) << 26) | ||
74 | #define HCR_H_WAIT_1(x) (((x) & 0xff) << 8) | ||
75 | #define HCR_H_WAIT_2(x) ((x) & 0xff) | ||
76 | |||
77 | #define LCDC_VCR 0x20 | ||
78 | #define VCR_V_WIDTH(x) (((x) & 0x3f) << 26) | ||
79 | #define VCR_V_WAIT_1(x) (((x) & 0xff) << 8) | ||
80 | #define VCR_V_WAIT_2(x) ((x) & 0xff) | ||
81 | |||
82 | #define LCDC_POS 0x24 | ||
83 | #define POS_POS(x) ((x) & 1f) | ||
84 | |||
85 | #define LCDC_LSCR1 0x28 | ||
86 | /* bit fields in imxfb.h */ | ||
87 | |||
88 | #define LCDC_PWMR 0x2C | ||
89 | /* bit fields in imxfb.h */ | ||
90 | |||
91 | #define LCDC_DMACR 0x30 | ||
92 | /* bit fields in imxfb.h */ | ||
93 | |||
94 | #define LCDC_RMCR 0x34 | ||
95 | #define RMCR_LCDC_EN (1<<1) | ||
96 | #define RMCR_SELF_REF (1<<0) | ||
97 | |||
98 | #define LCDC_LCDICR 0x38 | ||
99 | #define LCDICR_INT_SYN (1<<2) | ||
100 | #define LCDICR_INT_CON (1) | ||
101 | |||
102 | #define LCDC_LCDISR 0x40 | ||
103 | #define LCDISR_UDR_ERR (1<<3) | ||
104 | #define LCDISR_ERR_RES (1<<2) | ||
105 | #define LCDISR_EOF (1<<1) | ||
106 | #define LCDISR_BOF (1<<0) | ||
107 | |||
108 | /* | ||
109 | * These are the bitfields for each | ||
110 | * display depth that we support. | ||
111 | */ | ||
112 | struct imxfb_rgb { | ||
113 | struct fb_bitfield red; | ||
114 | struct fb_bitfield green; | ||
115 | struct fb_bitfield blue; | ||
116 | struct fb_bitfield transp; | ||
117 | }; | ||
118 | |||
119 | struct imxfb_info { | ||
120 | struct platform_device *pdev; | ||
121 | void __iomem *regs; | ||
46 | 122 | ||
47 | static struct imxfb_rgb def_rgb_16 = { | 123 | u_int max_bpp; |
48 | .red = { .offset = 8, .length = 4, }, | 124 | u_int max_xres; |
49 | .green = { .offset = 4, .length = 4, }, | 125 | u_int max_yres; |
50 | .blue = { .offset = 0, .length = 4, }, | 126 | |
51 | .transp = { .offset = 0, .length = 0, }, | 127 | /* |
128 | * These are the addresses we mapped | ||
129 | * the framebuffer memory region to. | ||
130 | */ | ||
131 | dma_addr_t map_dma; | ||
132 | u_char *map_cpu; | ||
133 | u_int map_size; | ||
134 | |||
135 | u_char *screen_cpu; | ||
136 | dma_addr_t screen_dma; | ||
137 | u_int palette_size; | ||
138 | |||
139 | dma_addr_t dbar1; | ||
140 | dma_addr_t dbar2; | ||
141 | |||
142 | u_int pcr; | ||
143 | u_int pwmr; | ||
144 | u_int lscr1; | ||
145 | u_int dmacr; | ||
146 | u_int cmap_inverse:1, | ||
147 | cmap_static:1, | ||
148 | unused:30; | ||
149 | |||
150 | void (*lcd_power)(int); | ||
151 | void (*backlight_power)(int); | ||
152 | }; | ||
153 | |||
154 | #define IMX_NAME "IMX" | ||
155 | |||
156 | /* | ||
157 | * Minimum X and Y resolutions | ||
158 | */ | ||
159 | #define MIN_XRES 64 | ||
160 | #define MIN_YRES 64 | ||
161 | |||
162 | static struct imxfb_rgb def_rgb_16_tft = { | ||
163 | .red = {.offset = 11, .length = 5,}, | ||
164 | .green = {.offset = 5, .length = 6,}, | ||
165 | .blue = {.offset = 0, .length = 5,}, | ||
166 | .transp = {.offset = 0, .length = 0,}, | ||
167 | }; | ||
168 | |||
169 | static struct imxfb_rgb def_rgb_16_stn = { | ||
170 | .red = {.offset = 8, .length = 4,}, | ||
171 | .green = {.offset = 4, .length = 4,}, | ||
172 | .blue = {.offset = 0, .length = 4,}, | ||
173 | .transp = {.offset = 0, .length = 0,}, | ||
52 | }; | 174 | }; |
53 | 175 | ||
54 | static struct imxfb_rgb def_rgb_8 = { | 176 | static struct imxfb_rgb def_rgb_8 = { |
55 | .red = { .offset = 0, .length = 8, }, | 177 | .red = {.offset = 0, .length = 8,}, |
56 | .green = { .offset = 0, .length = 8, }, | 178 | .green = {.offset = 0, .length = 8,}, |
57 | .blue = { .offset = 0, .length = 8, }, | 179 | .blue = {.offset = 0, .length = 8,}, |
58 | .transp = { .offset = 0, .length = 0, }, | 180 | .transp = {.offset = 0, .length = 0,}, |
59 | }; | 181 | }; |
60 | 182 | ||
61 | static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info); | 183 | static int imxfb_activate_var(struct fb_var_screeninfo *var, |
184 | struct fb_info *info); | ||
62 | 185 | ||
63 | static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf) | 186 | static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf) |
64 | { | 187 | { |
@@ -67,10 +190,8 @@ static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf) | |||
67 | return chan << bf->offset; | 190 | return chan << bf->offset; |
68 | } | 191 | } |
69 | 192 | ||
70 | #define LCDC_PALETTE(x) __REG2(IMX_LCDC_BASE+0x800, (x)<<2) | 193 | static int imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue, |
71 | static int | 194 | u_int trans, struct fb_info *info) |
72 | imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue, | ||
73 | u_int trans, struct fb_info *info) | ||
74 | { | 195 | { |
75 | struct imxfb_info *fbi = info->par; | 196 | struct imxfb_info *fbi = info->par; |
76 | u_int val, ret = 1; | 197 | u_int val, ret = 1; |
@@ -81,14 +202,13 @@ imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue, | |||
81 | (CNVT_TOHW(green,4) << 4) | | 202 | (CNVT_TOHW(green,4) << 4) | |
82 | CNVT_TOHW(blue, 4); | 203 | CNVT_TOHW(blue, 4); |
83 | 204 | ||
84 | LCDC_PALETTE(regno) = val; | 205 | writel(val, fbi->regs + 0x800 + (regno << 2)); |
85 | ret = 0; | 206 | ret = 0; |
86 | } | 207 | } |
87 | return ret; | 208 | return ret; |
88 | } | 209 | } |
89 | 210 | ||
90 | static int | 211 | static int imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, |
91 | imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | ||
92 | u_int trans, struct fb_info *info) | 212 | u_int trans, struct fb_info *info) |
93 | { | 213 | { |
94 | struct imxfb_info *fbi = info->par; | 214 | struct imxfb_info *fbi = info->par; |
@@ -148,11 +268,10 @@ imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
148 | * yres, xres_virtual, yres_virtual, xoffset, yoffset, grayscale, | 268 | * yres, xres_virtual, yres_virtual, xoffset, yoffset, grayscale, |
149 | * bitfields, horizontal timing, vertical timing. | 269 | * bitfields, horizontal timing, vertical timing. |
150 | */ | 270 | */ |
151 | static int | 271 | static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) |
152 | imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | ||
153 | { | 272 | { |
154 | struct imxfb_info *fbi = info->par; | 273 | struct imxfb_info *fbi = info->par; |
155 | int rgbidx; | 274 | struct imxfb_rgb *rgb; |
156 | 275 | ||
157 | if (var->xres < MIN_XRES) | 276 | if (var->xres < MIN_XRES) |
158 | var->xres = MIN_XRES; | 277 | var->xres = MIN_XRES; |
@@ -168,23 +287,25 @@ imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
168 | pr_debug("var->bits_per_pixel=%d\n", var->bits_per_pixel); | 287 | pr_debug("var->bits_per_pixel=%d\n", var->bits_per_pixel); |
169 | switch (var->bits_per_pixel) { | 288 | switch (var->bits_per_pixel) { |
170 | case 16: | 289 | case 16: |
171 | rgbidx = RGB_16; | 290 | default: |
291 | if (readl(fbi->regs + LCDC_PCR) & PCR_TFT) | ||
292 | rgb = &def_rgb_16_tft; | ||
293 | else | ||
294 | rgb = &def_rgb_16_stn; | ||
172 | break; | 295 | break; |
173 | case 8: | 296 | case 8: |
174 | rgbidx = RGB_8; | 297 | rgb = &def_rgb_8; |
175 | break; | 298 | break; |
176 | default: | ||
177 | rgbidx = RGB_16; | ||
178 | } | 299 | } |
179 | 300 | ||
180 | /* | 301 | /* |
181 | * Copy the RGB parameters for this display | 302 | * Copy the RGB parameters for this display |
182 | * from the machine specific parameters. | 303 | * from the machine specific parameters. |
183 | */ | 304 | */ |
184 | var->red = fbi->rgb[rgbidx]->red; | 305 | var->red = rgb->red; |
185 | var->green = fbi->rgb[rgbidx]->green; | 306 | var->green = rgb->green; |
186 | var->blue = fbi->rgb[rgbidx]->blue; | 307 | var->blue = rgb->blue; |
187 | var->transp = fbi->rgb[rgbidx]->transp; | 308 | var->transp = rgb->transp; |
188 | 309 | ||
189 | pr_debug("RGBT length = %d:%d:%d:%d\n", | 310 | pr_debug("RGBT length = %d:%d:%d:%d\n", |
190 | var->red.length, var->green.length, var->blue.length, | 311 | var->red.length, var->green.length, var->blue.length, |
@@ -221,8 +342,7 @@ static int imxfb_set_par(struct fb_info *info) | |||
221 | info->fix.visual = FB_VISUAL_STATIC_PSEUDOCOLOR; | 342 | info->fix.visual = FB_VISUAL_STATIC_PSEUDOCOLOR; |
222 | } | 343 | } |
223 | 344 | ||
224 | info->fix.line_length = var->xres_virtual * | 345 | info->fix.line_length = var->xres_virtual * var->bits_per_pixel / 8; |
225 | var->bits_per_pixel / 8; | ||
226 | fbi->palette_size = var->bits_per_pixel == 8 ? 256 : 16; | 346 | fbi->palette_size = var->bits_per_pixel == 8 ? 256 : 16; |
227 | 347 | ||
228 | imxfb_activate_var(var, info); | 348 | imxfb_activate_var(var, info); |
@@ -235,22 +355,27 @@ static void imxfb_enable_controller(struct imxfb_info *fbi) | |||
235 | pr_debug("Enabling LCD controller\n"); | 355 | pr_debug("Enabling LCD controller\n"); |
236 | 356 | ||
237 | /* initialize LCDC */ | 357 | /* initialize LCDC */ |
238 | LCDC_RMCR &= ~RMCR_LCDC_EN; /* just to be safe... */ | 358 | writel(readl(fbi->regs + LCDC_RMCR) & ~RMCR_LCDC_EN, |
359 | fbi->regs + LCDC_RMCR); /* just to be safe... */ | ||
360 | |||
361 | writel(fbi->screen_dma, fbi->regs + LCDC_SSA); | ||
239 | 362 | ||
240 | LCDC_SSA = fbi->screen_dma; | ||
241 | /* physical screen start address */ | 363 | /* physical screen start address */ |
242 | LCDC_VPW = VPW_VPW(fbi->max_xres * fbi->max_bpp / 8 / 4); | 364 | writel(VPW_VPW(fbi->max_xres * fbi->max_bpp / 8 / 4), |
365 | fbi->regs + LCDC_VPW); | ||
243 | 366 | ||
244 | LCDC_POS = 0x00000000; /* panning offset 0 (0 pixel offset) */ | 367 | /* panning offset 0 (0 pixel offset) */ |
368 | writel(0x00000000, fbi->regs + LCDC_POS); | ||
245 | 369 | ||
246 | /* disable hardware cursor */ | 370 | /* disable hardware cursor */ |
247 | LCDC_CPOS &= ~(CPOS_CC0 | CPOS_CC1); | 371 | writel(readl(fbi->regs + LCDC_CPOS) & ~(CPOS_CC0 | CPOS_CC1), |
372 | fbi->regs + LCDC_CPOS); | ||
248 | 373 | ||
249 | LCDC_RMCR = RMCR_LCDC_EN; | 374 | writel(RMCR_LCDC_EN, fbi->regs + LCDC_RMCR); |
250 | 375 | ||
251 | if(fbi->backlight_power) | 376 | if (fbi->backlight_power) |
252 | fbi->backlight_power(1); | 377 | fbi->backlight_power(1); |
253 | if(fbi->lcd_power) | 378 | if (fbi->lcd_power) |
254 | fbi->lcd_power(1); | 379 | fbi->lcd_power(1); |
255 | } | 380 | } |
256 | 381 | ||
@@ -258,12 +383,12 @@ static void imxfb_disable_controller(struct imxfb_info *fbi) | |||
258 | { | 383 | { |
259 | pr_debug("Disabling LCD controller\n"); | 384 | pr_debug("Disabling LCD controller\n"); |
260 | 385 | ||
261 | if(fbi->backlight_power) | 386 | if (fbi->backlight_power) |
262 | fbi->backlight_power(0); | 387 | fbi->backlight_power(0); |
263 | if(fbi->lcd_power) | 388 | if (fbi->lcd_power) |
264 | fbi->lcd_power(0); | 389 | fbi->lcd_power(0); |
265 | 390 | ||
266 | LCDC_RMCR = 0; | 391 | writel(0, fbi->regs + LCDC_RMCR); |
267 | } | 392 | } |
268 | 393 | ||
269 | static int imxfb_blank(int blank, struct fb_info *info) | 394 | static int imxfb_blank(int blank, struct fb_info *info) |
@@ -340,74 +465,26 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf | |||
340 | info->fix.id, var->lower_margin); | 465 | info->fix.id, var->lower_margin); |
341 | #endif | 466 | #endif |
342 | 467 | ||
343 | LCDC_HCR = HCR_H_WIDTH(var->hsync_len) | | 468 | writel(HCR_H_WIDTH(var->hsync_len) | |
344 | HCR_H_WAIT_1(var->left_margin) | | 469 | HCR_H_WAIT_1(var->right_margin) | |
345 | HCR_H_WAIT_2(var->right_margin); | 470 | HCR_H_WAIT_2(var->left_margin), |
471 | fbi->regs + LCDC_HCR); | ||
346 | 472 | ||
347 | LCDC_VCR = VCR_V_WIDTH(var->vsync_len) | | 473 | writel(VCR_V_WIDTH(var->vsync_len) | |
348 | VCR_V_WAIT_1(var->upper_margin) | | 474 | VCR_V_WAIT_1(var->lower_margin) | |
349 | VCR_V_WAIT_2(var->lower_margin); | 475 | VCR_V_WAIT_2(var->upper_margin), |
476 | fbi->regs + LCDC_VCR); | ||
350 | 477 | ||
351 | LCDC_SIZE = SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres); | 478 | writel(SIZE_XMAX(var->xres) | SIZE_YMAX(var->yres), |
352 | LCDC_PCR = fbi->pcr; | 479 | fbi->regs + LCDC_SIZE); |
353 | LCDC_PWMR = fbi->pwmr; | 480 | writel(fbi->pcr, fbi->regs + LCDC_PCR); |
354 | LCDC_LSCR1 = fbi->lscr1; | 481 | writel(fbi->pwmr, fbi->regs + LCDC_PWMR); |
355 | LCDC_DMACR = fbi->dmacr; | 482 | writel(fbi->lscr1, fbi->regs + LCDC_LSCR1); |
483 | writel(fbi->dmacr, fbi->regs + LCDC_DMACR); | ||
356 | 484 | ||
357 | return 0; | 485 | return 0; |
358 | } | 486 | } |
359 | 487 | ||
360 | static void imxfb_setup_gpio(struct imxfb_info *fbi) | ||
361 | { | ||
362 | int width; | ||
363 | |||
364 | LCDC_RMCR &= ~(RMCR_LCDC_EN | RMCR_SELF_REF); | ||
365 | |||
366 | if( fbi->pcr & PCR_TFT ) | ||
367 | width = 16; | ||
368 | else | ||
369 | width = 1 << ((fbi->pcr >> 28) & 0x3); | ||
370 | |||
371 | switch(width) { | ||
372 | case 16: | ||
373 | imx_gpio_mode(PD30_PF_LD15); | ||
374 | imx_gpio_mode(PD29_PF_LD14); | ||
375 | imx_gpio_mode(PD28_PF_LD13); | ||
376 | imx_gpio_mode(PD27_PF_LD12); | ||
377 | imx_gpio_mode(PD26_PF_LD11); | ||
378 | imx_gpio_mode(PD25_PF_LD10); | ||
379 | imx_gpio_mode(PD24_PF_LD9); | ||
380 | imx_gpio_mode(PD23_PF_LD8); | ||
381 | case 8: | ||
382 | imx_gpio_mode(PD22_PF_LD7); | ||
383 | imx_gpio_mode(PD21_PF_LD6); | ||
384 | imx_gpio_mode(PD20_PF_LD5); | ||
385 | imx_gpio_mode(PD19_PF_LD4); | ||
386 | case 4: | ||
387 | imx_gpio_mode(PD18_PF_LD3); | ||
388 | imx_gpio_mode(PD17_PF_LD2); | ||
389 | case 2: | ||
390 | imx_gpio_mode(PD16_PF_LD1); | ||
391 | case 1: | ||
392 | imx_gpio_mode(PD15_PF_LD0); | ||
393 | } | ||
394 | |||
395 | /* initialize GPIOs */ | ||
396 | imx_gpio_mode(PD6_PF_LSCLK); | ||
397 | imx_gpio_mode(PD11_PF_CONTRAST); | ||
398 | imx_gpio_mode(PD14_PF_FLM_VSYNC); | ||
399 | imx_gpio_mode(PD13_PF_LP_HSYNC); | ||
400 | imx_gpio_mode(PD12_PF_ACD_OE); | ||
401 | |||
402 | /* These are only needed for Sharp HR TFT displays */ | ||
403 | if (fbi->pcr & PCR_SHARP) { | ||
404 | imx_gpio_mode(PD7_PF_REV); | ||
405 | imx_gpio_mode(PD8_PF_CLS); | ||
406 | imx_gpio_mode(PD9_PF_PS); | ||
407 | imx_gpio_mode(PD10_PF_SPL_SPR); | ||
408 | } | ||
409 | } | ||
410 | |||
411 | #ifdef CONFIG_PM | 488 | #ifdef CONFIG_PM |
412 | /* | 489 | /* |
413 | * Power management hooks. Note that we won't be called from IRQ context, | 490 | * Power management hooks. Note that we won't be called from IRQ context, |
@@ -416,7 +493,8 @@ static void imxfb_setup_gpio(struct imxfb_info *fbi) | |||
416 | static int imxfb_suspend(struct platform_device *dev, pm_message_t state) | 493 | static int imxfb_suspend(struct platform_device *dev, pm_message_t state) |
417 | { | 494 | { |
418 | struct imxfb_info *fbi = platform_get_drvdata(dev); | 495 | struct imxfb_info *fbi = platform_get_drvdata(dev); |
419 | pr_debug("%s\n",__func__); | 496 | |
497 | pr_debug("%s\n", __func__); | ||
420 | 498 | ||
421 | imxfb_disable_controller(fbi); | 499 | imxfb_disable_controller(fbi); |
422 | return 0; | 500 | return 0; |
@@ -425,7 +503,8 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state) | |||
425 | static int imxfb_resume(struct platform_device *dev) | 503 | static int imxfb_resume(struct platform_device *dev) |
426 | { | 504 | { |
427 | struct imxfb_info *fbi = platform_get_drvdata(dev); | 505 | struct imxfb_info *fbi = platform_get_drvdata(dev); |
428 | pr_debug("%s\n",__func__); | 506 | |
507 | pr_debug("%s\n", __func__); | ||
429 | 508 | ||
430 | imxfb_enable_controller(fbi); | 509 | imxfb_enable_controller(fbi); |
431 | return 0; | 510 | return 0; |
@@ -435,149 +514,136 @@ static int imxfb_resume(struct platform_device *dev) | |||
435 | #define imxfb_resume NULL | 514 | #define imxfb_resume NULL |
436 | #endif | 515 | #endif |
437 | 516 | ||
438 | static int __init imxfb_init_fbinfo(struct device *dev) | 517 | static int __init imxfb_init_fbinfo(struct platform_device *pdev) |
439 | { | 518 | { |
440 | struct imxfb_mach_info *inf = dev->platform_data; | 519 | struct imx_fb_platform_data *pdata = pdev->dev.platform_data; |
441 | struct fb_info *info = dev_get_drvdata(dev); | 520 | struct fb_info *info = dev_get_drvdata(&pdev->dev); |
442 | struct imxfb_info *fbi = info->par; | 521 | struct imxfb_info *fbi = info->par; |
443 | 522 | ||
444 | pr_debug("%s\n",__func__); | 523 | pr_debug("%s\n",__func__); |
445 | 524 | ||
446 | info->pseudo_palette = kmalloc( sizeof(u32) * 16, GFP_KERNEL); | 525 | info->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL); |
447 | if (!info->pseudo_palette) | 526 | if (!info->pseudo_palette) |
448 | return -ENOMEM; | 527 | return -ENOMEM; |
449 | 528 | ||
450 | memset(fbi, 0, sizeof(struct imxfb_info)); | 529 | memset(fbi, 0, sizeof(struct imxfb_info)); |
451 | fbi->dev = dev; | ||
452 | 530 | ||
453 | strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id)); | 531 | strlcpy(info->fix.id, IMX_NAME, sizeof(info->fix.id)); |
454 | 532 | ||
455 | info->fix.type = FB_TYPE_PACKED_PIXELS; | 533 | info->fix.type = FB_TYPE_PACKED_PIXELS; |
456 | info->fix.type_aux = 0; | 534 | info->fix.type_aux = 0; |
457 | info->fix.xpanstep = 0; | 535 | info->fix.xpanstep = 0; |
458 | info->fix.ypanstep = 0; | 536 | info->fix.ypanstep = 0; |
459 | info->fix.ywrapstep = 0; | 537 | info->fix.ywrapstep = 0; |
460 | info->fix.accel = FB_ACCEL_NONE; | 538 | info->fix.accel = FB_ACCEL_NONE; |
461 | 539 | ||
462 | info->var.nonstd = 0; | 540 | info->var.nonstd = 0; |
463 | info->var.activate = FB_ACTIVATE_NOW; | 541 | info->var.activate = FB_ACTIVATE_NOW; |
464 | info->var.height = -1; | 542 | info->var.height = -1; |
465 | info->var.width = -1; | 543 | info->var.width = -1; |
466 | info->var.accel_flags = 0; | 544 | info->var.accel_flags = 0; |
467 | info->var.vmode = FB_VMODE_NONINTERLACED; | 545 | info->var.vmode = FB_VMODE_NONINTERLACED; |
468 | 546 | ||
469 | info->fbops = &imxfb_ops; | 547 | info->fbops = &imxfb_ops; |
470 | info->flags = FBINFO_FLAG_DEFAULT | FBINFO_READS_FAST; | 548 | info->flags = FBINFO_FLAG_DEFAULT | |
471 | 549 | FBINFO_READS_FAST; | |
472 | fbi->rgb[RGB_16] = &def_rgb_16; | 550 | |
473 | fbi->rgb[RGB_8] = &def_rgb_8; | 551 | fbi->max_xres = pdata->xres; |
474 | 552 | info->var.xres = pdata->xres; | |
475 | fbi->max_xres = inf->xres; | 553 | info->var.xres_virtual = pdata->xres; |
476 | info->var.xres = inf->xres; | 554 | fbi->max_yres = pdata->yres; |
477 | info->var.xres_virtual = inf->xres; | 555 | info->var.yres = pdata->yres; |
478 | fbi->max_yres = inf->yres; | 556 | info->var.yres_virtual = pdata->yres; |
479 | info->var.yres = inf->yres; | 557 | fbi->max_bpp = pdata->bpp; |
480 | info->var.yres_virtual = inf->yres; | 558 | info->var.bits_per_pixel = pdata->bpp; |
481 | fbi->max_bpp = inf->bpp; | 559 | info->var.nonstd = pdata->nonstd; |
482 | info->var.bits_per_pixel = inf->bpp; | 560 | info->var.pixclock = pdata->pixclock; |
483 | info->var.nonstd = inf->nonstd; | 561 | info->var.hsync_len = pdata->hsync_len; |
484 | info->var.pixclock = inf->pixclock; | 562 | info->var.left_margin = pdata->left_margin; |
485 | info->var.hsync_len = inf->hsync_len; | 563 | info->var.right_margin = pdata->right_margin; |
486 | info->var.left_margin = inf->left_margin; | 564 | info->var.vsync_len = pdata->vsync_len; |
487 | info->var.right_margin = inf->right_margin; | 565 | info->var.upper_margin = pdata->upper_margin; |
488 | info->var.vsync_len = inf->vsync_len; | 566 | info->var.lower_margin = pdata->lower_margin; |
489 | info->var.upper_margin = inf->upper_margin; | 567 | info->var.sync = pdata->sync; |
490 | info->var.lower_margin = inf->lower_margin; | 568 | info->var.grayscale = pdata->cmap_greyscale; |
491 | info->var.sync = inf->sync; | 569 | fbi->cmap_inverse = pdata->cmap_inverse; |
492 | info->var.grayscale = inf->cmap_greyscale; | 570 | fbi->cmap_static = pdata->cmap_static; |
493 | fbi->cmap_inverse = inf->cmap_inverse; | 571 | fbi->pcr = pdata->pcr; |
494 | fbi->cmap_static = inf->cmap_static; | 572 | fbi->lscr1 = pdata->lscr1; |
495 | fbi->pcr = inf->pcr; | 573 | fbi->dmacr = pdata->dmacr; |
496 | fbi->lscr1 = inf->lscr1; | 574 | fbi->pwmr = pdata->pwmr; |
497 | fbi->dmacr = inf->dmacr; | 575 | fbi->lcd_power = pdata->lcd_power; |
498 | fbi->pwmr = inf->pwmr; | 576 | fbi->backlight_power = pdata->backlight_power; |
499 | fbi->lcd_power = inf->lcd_power; | ||
500 | fbi->backlight_power = inf->backlight_power; | ||
501 | info->fix.smem_len = fbi->max_xres * fbi->max_yres * | 577 | info->fix.smem_len = fbi->max_xres * fbi->max_yres * |
502 | fbi->max_bpp / 8; | 578 | fbi->max_bpp / 8; |
503 | 579 | ||
504 | return 0; | 580 | return 0; |
505 | } | 581 | } |
506 | 582 | ||
507 | /* | ||
508 | * Allocates the DRAM memory for the frame buffer. This buffer is | ||
509 | * remapped into a non-cached, non-buffered, memory region to | ||
510 | * allow pixel writes to occur without flushing the cache. | ||
511 | * Once this area is remapped, all virtual memory access to the | ||
512 | * video memory should occur at the new region. | ||
513 | */ | ||
514 | static int __init imxfb_map_video_memory(struct fb_info *info) | ||
515 | { | ||
516 | struct imxfb_info *fbi = info->par; | ||
517 | |||
518 | fbi->map_size = PAGE_ALIGN(info->fix.smem_len); | ||
519 | fbi->map_cpu = dma_alloc_writecombine(fbi->dev, fbi->map_size, | ||
520 | &fbi->map_dma,GFP_KERNEL); | ||
521 | |||
522 | if (fbi->map_cpu) { | ||
523 | info->screen_base = fbi->map_cpu; | ||
524 | fbi->screen_cpu = fbi->map_cpu; | ||
525 | fbi->screen_dma = fbi->map_dma; | ||
526 | info->fix.smem_start = fbi->screen_dma; | ||
527 | } | ||
528 | |||
529 | return fbi->map_cpu ? 0 : -ENOMEM; | ||
530 | } | ||
531 | |||
532 | static int __init imxfb_probe(struct platform_device *pdev) | 583 | static int __init imxfb_probe(struct platform_device *pdev) |
533 | { | 584 | { |
534 | struct imxfb_info *fbi; | 585 | struct imxfb_info *fbi; |
535 | struct fb_info *info; | 586 | struct fb_info *info; |
536 | struct imxfb_mach_info *inf; | 587 | struct imx_fb_platform_data *pdata; |
537 | struct resource *res; | 588 | struct resource *res; |
538 | int ret; | 589 | int ret; |
539 | 590 | ||
540 | printk("i.MX Framebuffer driver\n"); | 591 | printk("i.MX Framebuffer driver\n"); |
541 | 592 | ||
542 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 593 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
543 | if(!res) | 594 | if (!res) |
544 | return -ENODEV; | 595 | return -ENODEV; |
545 | 596 | ||
546 | inf = pdev->dev.platform_data; | 597 | pdata = pdev->dev.platform_data; |
547 | if(!inf) { | 598 | if (!pdata) { |
548 | dev_err(&pdev->dev,"No platform_data available\n"); | 599 | dev_err(&pdev->dev,"No platform_data available\n"); |
549 | return -ENOMEM; | 600 | return -ENOMEM; |
550 | } | 601 | } |
551 | 602 | ||
552 | info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev); | 603 | info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev); |
553 | if(!info) | 604 | if (!info) |
554 | return -ENOMEM; | 605 | return -ENOMEM; |
555 | 606 | ||
556 | fbi = info->par; | 607 | fbi = info->par; |
557 | 608 | ||
558 | platform_set_drvdata(pdev, info); | 609 | platform_set_drvdata(pdev, info); |
559 | 610 | ||
560 | ret = imxfb_init_fbinfo(&pdev->dev); | 611 | ret = imxfb_init_fbinfo(pdev); |
561 | if( ret < 0 ) | 612 | if (ret < 0) |
562 | goto failed_init; | 613 | goto failed_init; |
563 | 614 | ||
564 | res = request_mem_region(res->start, res->end - res->start + 1, "IMXFB"); | 615 | res = request_mem_region(res->start, resource_size(res), |
616 | DRIVER_NAME); | ||
565 | if (!res) { | 617 | if (!res) { |
566 | ret = -EBUSY; | 618 | ret = -EBUSY; |
567 | goto failed_regs; | 619 | goto failed_req; |
620 | } | ||
621 | |||
622 | fbi->regs = ioremap(res->start, resource_size(res)); | ||
623 | if (fbi->regs == NULL) { | ||
624 | printk(KERN_ERR"Cannot map frame buffer registers\n"); | ||
625 | goto failed_ioremap; | ||
568 | } | 626 | } |
569 | 627 | ||
570 | if (!inf->fixed_screen_cpu) { | 628 | if (!pdata->fixed_screen_cpu) { |
571 | ret = imxfb_map_video_memory(info); | 629 | fbi->map_size = PAGE_ALIGN(info->fix.smem_len); |
572 | if (ret) { | 630 | fbi->map_cpu = dma_alloc_writecombine(&pdev->dev, |
631 | fbi->map_size, &fbi->map_dma, GFP_KERNEL); | ||
632 | |||
633 | if (!fbi->map_cpu) { | ||
573 | dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret); | 634 | dev_err(&pdev->dev, "Failed to allocate video RAM: %d\n", ret); |
574 | ret = -ENOMEM; | 635 | ret = -ENOMEM; |
575 | goto failed_map; | 636 | goto failed_map; |
576 | } | 637 | } |
638 | |||
639 | info->screen_base = fbi->map_cpu; | ||
640 | fbi->screen_cpu = fbi->map_cpu; | ||
641 | fbi->screen_dma = fbi->map_dma; | ||
642 | info->fix.smem_start = fbi->screen_dma; | ||
577 | } else { | 643 | } else { |
578 | /* Fixed framebuffer mapping enables location of the screen in eSRAM */ | 644 | /* Fixed framebuffer mapping enables location of the screen in eSRAM */ |
579 | fbi->map_cpu = inf->fixed_screen_cpu; | 645 | fbi->map_cpu = pdata->fixed_screen_cpu; |
580 | fbi->map_dma = inf->fixed_screen_dma; | 646 | fbi->map_dma = pdata->fixed_screen_dma; |
581 | info->screen_base = fbi->map_cpu; | 647 | info->screen_base = fbi->map_cpu; |
582 | fbi->screen_cpu = fbi->map_cpu; | 648 | fbi->screen_cpu = fbi->map_cpu; |
583 | fbi->screen_dma = fbi->map_dma; | 649 | fbi->screen_dma = fbi->map_dma; |
@@ -590,12 +656,10 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
590 | */ | 656 | */ |
591 | imxfb_check_var(&info->var, info); | 657 | imxfb_check_var(&info->var, info); |
592 | 658 | ||
593 | ret = fb_alloc_cmap(&info->cmap, 1<<info->var.bits_per_pixel, 0); | 659 | ret = fb_alloc_cmap(&info->cmap, 1 << info->var.bits_per_pixel, 0); |
594 | if (ret < 0) | 660 | if (ret < 0) |
595 | goto failed_cmap; | 661 | goto failed_cmap; |
596 | 662 | ||
597 | imxfb_setup_gpio(fbi); | ||
598 | |||
599 | imxfb_set_par(info); | 663 | imxfb_set_par(info); |
600 | ret = register_framebuffer(info); | 664 | ret = register_framebuffer(info); |
601 | if (ret < 0) { | 665 | if (ret < 0) { |
@@ -610,20 +674,22 @@ static int __init imxfb_probe(struct platform_device *pdev) | |||
610 | failed_register: | 674 | failed_register: |
611 | fb_dealloc_cmap(&info->cmap); | 675 | fb_dealloc_cmap(&info->cmap); |
612 | failed_cmap: | 676 | failed_cmap: |
613 | if (!inf->fixed_screen_cpu) | 677 | if (!pdata->fixed_screen_cpu) |
614 | dma_free_writecombine(&pdev->dev,fbi->map_size,fbi->map_cpu, | 678 | dma_free_writecombine(&pdev->dev,fbi->map_size,fbi->map_cpu, |
615 | fbi->map_dma); | 679 | fbi->map_dma); |
616 | failed_map: | 680 | failed_map: |
617 | kfree(info->pseudo_palette); | 681 | iounmap(fbi->regs); |
618 | failed_regs: | 682 | failed_ioremap: |
619 | release_mem_region(res->start, res->end - res->start); | 683 | release_mem_region(res->start, res->end - res->start); |
684 | failed_req: | ||
685 | kfree(info->pseudo_palette); | ||
620 | failed_init: | 686 | failed_init: |
621 | platform_set_drvdata(pdev, NULL); | 687 | platform_set_drvdata(pdev, NULL); |
622 | framebuffer_release(info); | 688 | framebuffer_release(info); |
623 | return ret; | 689 | return ret; |
624 | } | 690 | } |
625 | 691 | ||
626 | static int imxfb_remove(struct platform_device *pdev) | 692 | static int __devexit imxfb_remove(struct platform_device *pdev) |
627 | { | 693 | { |
628 | struct fb_info *info = platform_get_drvdata(pdev); | 694 | struct fb_info *info = platform_get_drvdata(pdev); |
629 | struct imxfb_info *fbi = info->par; | 695 | struct imxfb_info *fbi = info->par; |
@@ -639,6 +705,7 @@ static int imxfb_remove(struct platform_device *pdev) | |||
639 | kfree(info->pseudo_palette); | 705 | kfree(info->pseudo_palette); |
640 | framebuffer_release(info); | 706 | framebuffer_release(info); |
641 | 707 | ||
708 | iounmap(fbi->regs); | ||
642 | release_mem_region(res->start, res->end - res->start + 1); | 709 | release_mem_region(res->start, res->end - res->start + 1); |
643 | platform_set_drvdata(pdev, NULL); | 710 | platform_set_drvdata(pdev, NULL); |
644 | 711 | ||
@@ -653,19 +720,18 @@ void imxfb_shutdown(struct platform_device * dev) | |||
653 | } | 720 | } |
654 | 721 | ||
655 | static struct platform_driver imxfb_driver = { | 722 | static struct platform_driver imxfb_driver = { |
656 | .probe = imxfb_probe, | ||
657 | .suspend = imxfb_suspend, | 723 | .suspend = imxfb_suspend, |
658 | .resume = imxfb_resume, | 724 | .resume = imxfb_resume, |
659 | .remove = imxfb_remove, | 725 | .remove = __devexit_p(imxfb_remove), |
660 | .shutdown = imxfb_shutdown, | 726 | .shutdown = imxfb_shutdown, |
661 | .driver = { | 727 | .driver = { |
662 | .name = "imx-fb", | 728 | .name = DRIVER_NAME, |
663 | }, | 729 | }, |
664 | }; | 730 | }; |
665 | 731 | ||
666 | int __init imxfb_init(void) | 732 | int __init imxfb_init(void) |
667 | { | 733 | { |
668 | return platform_driver_register(&imxfb_driver); | 734 | return platform_driver_probe(&imxfb_driver, imxfb_probe); |
669 | } | 735 | } |
670 | 736 | ||
671 | static void __exit imxfb_cleanup(void) | 737 | static void __exit imxfb_cleanup(void) |
diff --git a/drivers/video/imxfb.h b/drivers/video/imxfb.h deleted file mode 100644 index e837a8b48eb8..000000000000 --- a/drivers/video/imxfb.h +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * linux/drivers/video/imxfb.h | ||
3 | * | ||
4 | * Freescale i.MX Frame Buffer device driver | ||
5 | * | ||
6 | * Copyright (C) 2004 S.Hauer, Pengutronix | ||
7 | * | ||
8 | * Copyright (C) 1999 Eric A. Thomas | ||
9 | * Based on acornfb.c Copyright (C) Russell King. | ||
10 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | ||
12 | * License. See the file COPYING in the main directory of this archive | ||
13 | * for more details. | ||
14 | */ | ||
15 | |||
16 | /* | ||
17 | * These are the bitfields for each | ||
18 | * display depth that we support. | ||
19 | */ | ||
20 | struct imxfb_rgb { | ||
21 | struct fb_bitfield red; | ||
22 | struct fb_bitfield green; | ||
23 | struct fb_bitfield blue; | ||
24 | struct fb_bitfield transp; | ||
25 | }; | ||
26 | |||
27 | #define RGB_16 (0) | ||
28 | #define RGB_8 (1) | ||
29 | #define NR_RGB 2 | ||
30 | |||
31 | struct imxfb_info { | ||
32 | struct device *dev; | ||
33 | struct imxfb_rgb *rgb[NR_RGB]; | ||
34 | |||
35 | u_int max_bpp; | ||
36 | u_int max_xres; | ||
37 | u_int max_yres; | ||
38 | |||
39 | /* | ||
40 | * These are the addresses we mapped | ||
41 | * the framebuffer memory region to. | ||
42 | */ | ||
43 | dma_addr_t map_dma; | ||
44 | u_char * map_cpu; | ||
45 | u_int map_size; | ||
46 | |||
47 | u_char * screen_cpu; | ||
48 | dma_addr_t screen_dma; | ||
49 | u_int palette_size; | ||
50 | |||
51 | dma_addr_t dbar1; | ||
52 | dma_addr_t dbar2; | ||
53 | |||
54 | u_int pcr; | ||
55 | u_int pwmr; | ||
56 | u_int lscr1; | ||
57 | u_int dmacr; | ||
58 | u_int cmap_inverse:1, | ||
59 | cmap_static:1, | ||
60 | unused:30; | ||
61 | |||
62 | void (*lcd_power)(int); | ||
63 | void (*backlight_power)(int); | ||
64 | }; | ||
65 | |||
66 | #define IMX_NAME "IMX" | ||
67 | |||
68 | /* | ||
69 | * Minimum X and Y resolutions | ||
70 | */ | ||
71 | #define MIN_XRES 64 | ||
72 | #define MIN_YRES 64 | ||
73 | |||
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c index cc59c52e1103..48ff701d3a72 100644 --- a/drivers/video/pxafb.c +++ b/drivers/video/pxafb.c | |||
@@ -20,6 +20,16 @@ | |||
20 | * | 20 | * |
21 | * linux-arm-kernel@lists.arm.linux.org.uk | 21 | * linux-arm-kernel@lists.arm.linux.org.uk |
22 | * | 22 | * |
23 | * Add support for overlay1 and overlay2 based on pxafb_overlay.c: | ||
24 | * | ||
25 | * Copyright (C) 2004, Intel Corporation | ||
26 | * | ||
27 | * 2003/08/27: <yu.tang@intel.com> | ||
28 | * 2004/03/10: <stanley.cai@intel.com> | ||
29 | * 2004/10/28: <yan.yin@intel.com> | ||
30 | * | ||
31 | * Copyright (C) 2006-2008 Marvell International Ltd. | ||
32 | * All Rights Reserved | ||
23 | */ | 33 | */ |
24 | 34 | ||
25 | #include <linux/module.h> | 35 | #include <linux/module.h> |
@@ -50,7 +60,6 @@ | |||
50 | #include <asm/irq.h> | 60 | #include <asm/irq.h> |
51 | #include <asm/div64.h> | 61 | #include <asm/div64.h> |
52 | #include <mach/pxa-regs.h> | 62 | #include <mach/pxa-regs.h> |
53 | #include <mach/pxa2xx-gpio.h> | ||
54 | #include <mach/bitfield.h> | 63 | #include <mach/bitfield.h> |
55 | #include <mach/pxafb.h> | 64 | #include <mach/pxafb.h> |
56 | 65 | ||
@@ -67,14 +76,16 @@ | |||
67 | LCCR0_SFM | LCCR0_LDM | LCCR0_ENB) | 76 | LCCR0_SFM | LCCR0_LDM | LCCR0_ENB) |
68 | 77 | ||
69 | #define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP | LCCR3_VSP |\ | 78 | #define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP | LCCR3_VSP |\ |
70 | LCCR3_PCD | LCCR3_BPP) | 79 | LCCR3_PCD | LCCR3_BPP(0xf)) |
71 | |||
72 | static void (*pxafb_backlight_power)(int); | ||
73 | static void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *); | ||
74 | 80 | ||
75 | static int pxafb_activate_var(struct fb_var_screeninfo *var, | 81 | static int pxafb_activate_var(struct fb_var_screeninfo *var, |
76 | struct pxafb_info *); | 82 | struct pxafb_info *); |
77 | static void set_ctrlr_state(struct pxafb_info *fbi, u_int state); | 83 | static void set_ctrlr_state(struct pxafb_info *fbi, u_int state); |
84 | static void setup_base_frame(struct pxafb_info *fbi, int branch); | ||
85 | static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, | ||
86 | unsigned long offset, size_t size); | ||
87 | |||
88 | static unsigned long video_mem_size = 0; | ||
78 | 89 | ||
79 | static inline unsigned long | 90 | static inline unsigned long |
80 | lcd_readl(struct pxafb_info *fbi, unsigned int off) | 91 | lcd_readl(struct pxafb_info *fbi, unsigned int off) |
@@ -156,6 +167,12 @@ pxafb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue, | |||
156 | val |= ((blue >> 8) & 0x000000fc); | 167 | val |= ((blue >> 8) & 0x000000fc); |
157 | ((u32 *)(fbi->palette_cpu))[regno] = val; | 168 | ((u32 *)(fbi->palette_cpu))[regno] = val; |
158 | break; | 169 | break; |
170 | case LCCR4_PAL_FOR_3: | ||
171 | val = ((red << 8) & 0x00ff0000); | ||
172 | val |= ((green >> 0) & 0x0000ff00); | ||
173 | val |= ((blue >> 8) & 0x000000ff); | ||
174 | ((u32 *)(fbi->palette_cpu))[regno] = val; | ||
175 | break; | ||
159 | } | 176 | } |
160 | 177 | ||
161 | return 0; | 178 | return 0; |
@@ -216,37 +233,110 @@ pxafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
216 | return ret; | 233 | return ret; |
217 | } | 234 | } |
218 | 235 | ||
219 | /* | 236 | /* calculate pixel depth, transparency bit included, >=16bpp formats _only_ */ |
220 | * pxafb_bpp_to_lccr3(): | 237 | static inline int var_to_depth(struct fb_var_screeninfo *var) |
221 | * Convert a bits per pixel value to the correct bit pattern for LCCR3 | ||
222 | */ | ||
223 | static int pxafb_bpp_to_lccr3(struct fb_var_screeninfo *var) | ||
224 | { | 238 | { |
225 | int ret = 0; | 239 | return var->red.length + var->green.length + |
240 | var->blue.length + var->transp.length; | ||
241 | } | ||
242 | |||
243 | /* calculate 4-bit BPP value for LCCR3 and OVLxC1 */ | ||
244 | static int pxafb_var_to_bpp(struct fb_var_screeninfo *var) | ||
245 | { | ||
246 | int bpp = -EINVAL; | ||
247 | |||
226 | switch (var->bits_per_pixel) { | 248 | switch (var->bits_per_pixel) { |
227 | case 1: ret = LCCR3_1BPP; break; | 249 | case 1: bpp = 0; break; |
228 | case 2: ret = LCCR3_2BPP; break; | 250 | case 2: bpp = 1; break; |
229 | case 4: ret = LCCR3_4BPP; break; | 251 | case 4: bpp = 2; break; |
230 | case 8: ret = LCCR3_8BPP; break; | 252 | case 8: bpp = 3; break; |
231 | case 16: ret = LCCR3_16BPP; break; | 253 | case 16: bpp = 4; break; |
232 | case 24: | 254 | case 24: |
233 | switch (var->red.length + var->green.length + | 255 | switch (var_to_depth(var)) { |
234 | var->blue.length + var->transp.length) { | 256 | case 18: bpp = 6; break; /* 18-bits/pixel packed */ |
235 | case 18: ret = LCCR3_18BPP_P | LCCR3_PDFOR_3; break; | 257 | case 19: bpp = 8; break; /* 19-bits/pixel packed */ |
236 | case 19: ret = LCCR3_19BPP_P; break; | 258 | case 24: bpp = 9; break; |
237 | } | 259 | } |
238 | break; | 260 | break; |
239 | case 32: | 261 | case 32: |
240 | switch (var->red.length + var->green.length + | 262 | switch (var_to_depth(var)) { |
241 | var->blue.length + var->transp.length) { | 263 | case 18: bpp = 5; break; /* 18-bits/pixel unpacked */ |
242 | case 18: ret = LCCR3_18BPP | LCCR3_PDFOR_3; break; | 264 | case 19: bpp = 7; break; /* 19-bits/pixel unpacked */ |
243 | case 19: ret = LCCR3_19BPP; break; | 265 | case 25: bpp = 10; break; |
244 | case 24: ret = LCCR3_24BPP | LCCR3_PDFOR_3; break; | ||
245 | case 25: ret = LCCR3_25BPP; break; | ||
246 | } | 266 | } |
247 | break; | 267 | break; |
248 | } | 268 | } |
249 | return ret; | 269 | return bpp; |
270 | } | ||
271 | |||
272 | /* | ||
273 | * pxafb_var_to_lccr3(): | ||
274 | * Convert a bits per pixel value to the correct bit pattern for LCCR3 | ||
275 | * | ||
276 | * NOTE: for PXA27x with overlays support, the LCCR3_PDFOR_x bits have an | ||
277 | * implication of the acutal use of transparency bit, which we handle it | ||
278 | * here separatedly. See PXA27x Developer's Manual, Section <<7.4.6 Pixel | ||
279 | * Formats>> for the valid combination of PDFOR, PAL_FOR for various BPP. | ||
280 | * | ||
281 | * Transparency for palette pixel formats is not supported at the moment. | ||
282 | */ | ||
283 | static uint32_t pxafb_var_to_lccr3(struct fb_var_screeninfo *var) | ||
284 | { | ||
285 | int bpp = pxafb_var_to_bpp(var); | ||
286 | uint32_t lccr3; | ||
287 | |||
288 | if (bpp < 0) | ||
289 | return 0; | ||
290 | |||
291 | lccr3 = LCCR3_BPP(bpp); | ||
292 | |||
293 | switch (var_to_depth(var)) { | ||
294 | case 16: lccr3 |= var->transp.length ? LCCR3_PDFOR_3 : 0; break; | ||
295 | case 18: lccr3 |= LCCR3_PDFOR_3; break; | ||
296 | case 24: lccr3 |= var->transp.length ? LCCR3_PDFOR_2 : LCCR3_PDFOR_3; | ||
297 | break; | ||
298 | case 19: | ||
299 | case 25: lccr3 |= LCCR3_PDFOR_0; break; | ||
300 | } | ||
301 | return lccr3; | ||
302 | } | ||
303 | |||
304 | #define SET_PIXFMT(v, r, g, b, t) \ | ||
305 | ({ \ | ||
306 | (v)->transp.offset = (t) ? (r) + (g) + (b) : 0; \ | ||
307 | (v)->transp.length = (t) ? (t) : 0; \ | ||
308 | (v)->blue.length = (b); (v)->blue.offset = 0; \ | ||
309 | (v)->green.length = (g); (v)->green.offset = (b); \ | ||
310 | (v)->red.length = (r); (v)->red.offset = (b) + (g); \ | ||
311 | }) | ||
312 | |||
313 | /* set the RGBT bitfields of fb_var_screeninf according to | ||
314 | * var->bits_per_pixel and given depth | ||
315 | */ | ||
316 | static void pxafb_set_pixfmt(struct fb_var_screeninfo *var, int depth) | ||
317 | { | ||
318 | if (depth == 0) | ||
319 | depth = var->bits_per_pixel; | ||
320 | |||
321 | if (var->bits_per_pixel < 16) { | ||
322 | /* indexed pixel formats */ | ||
323 | var->red.offset = 0; var->red.length = 8; | ||
324 | var->green.offset = 0; var->green.length = 8; | ||
325 | var->blue.offset = 0; var->blue.length = 8; | ||
326 | var->transp.offset = 0; var->transp.length = 8; | ||
327 | } | ||
328 | |||
329 | switch (depth) { | ||
330 | case 16: var->transp.length ? | ||
331 | SET_PIXFMT(var, 5, 5, 5, 1) : /* RGBT555 */ | ||
332 | SET_PIXFMT(var, 5, 6, 5, 0); break; /* RGB565 */ | ||
333 | case 18: SET_PIXFMT(var, 6, 6, 6, 0); break; /* RGB666 */ | ||
334 | case 19: SET_PIXFMT(var, 6, 6, 6, 1); break; /* RGBT666 */ | ||
335 | case 24: var->transp.length ? | ||
336 | SET_PIXFMT(var, 8, 8, 7, 1) : /* RGBT887 */ | ||
337 | SET_PIXFMT(var, 8, 8, 8, 0); break; /* RGB888 */ | ||
338 | case 25: SET_PIXFMT(var, 8, 8, 8, 1); break; /* RGBT888 */ | ||
339 | } | ||
250 | } | 340 | } |
251 | 341 | ||
252 | #ifdef CONFIG_CPU_FREQ | 342 | #ifdef CONFIG_CPU_FREQ |
@@ -308,8 +398,49 @@ static void pxafb_setmode(struct fb_var_screeninfo *var, | |||
308 | var->lower_margin = mode->lower_margin; | 398 | var->lower_margin = mode->lower_margin; |
309 | var->sync = mode->sync; | 399 | var->sync = mode->sync; |
310 | var->grayscale = mode->cmap_greyscale; | 400 | var->grayscale = mode->cmap_greyscale; |
311 | var->xres_virtual = var->xres; | 401 | |
312 | var->yres_virtual = var->yres; | 402 | /* set the initial RGBA bitfields */ |
403 | pxafb_set_pixfmt(var, mode->depth); | ||
404 | } | ||
405 | |||
406 | static int pxafb_adjust_timing(struct pxafb_info *fbi, | ||
407 | struct fb_var_screeninfo *var) | ||
408 | { | ||
409 | int line_length; | ||
410 | |||
411 | var->xres = max_t(int, var->xres, MIN_XRES); | ||
412 | var->yres = max_t(int, var->yres, MIN_YRES); | ||
413 | |||
414 | if (!(fbi->lccr0 & LCCR0_LCDT)) { | ||
415 | clamp_val(var->hsync_len, 1, 64); | ||
416 | clamp_val(var->vsync_len, 1, 64); | ||
417 | clamp_val(var->left_margin, 1, 255); | ||
418 | clamp_val(var->right_margin, 1, 255); | ||
419 | clamp_val(var->upper_margin, 1, 255); | ||
420 | clamp_val(var->lower_margin, 1, 255); | ||
421 | } | ||
422 | |||
423 | /* make sure each line is aligned on word boundary */ | ||
424 | line_length = var->xres * var->bits_per_pixel / 8; | ||
425 | line_length = ALIGN(line_length, 4); | ||
426 | var->xres = line_length * 8 / var->bits_per_pixel; | ||
427 | |||
428 | /* we don't support xpan, force xres_virtual to be equal to xres */ | ||
429 | var->xres_virtual = var->xres; | ||
430 | |||
431 | if (var->accel_flags & FB_ACCELF_TEXT) | ||
432 | var->yres_virtual = fbi->fb.fix.smem_len / line_length; | ||
433 | else | ||
434 | var->yres_virtual = max(var->yres_virtual, var->yres); | ||
435 | |||
436 | /* check for limits */ | ||
437 | if (var->xres > MAX_XRES || var->yres > MAX_YRES) | ||
438 | return -EINVAL; | ||
439 | |||
440 | if (var->yres > var->yres_virtual) | ||
441 | return -EINVAL; | ||
442 | |||
443 | return 0; | ||
313 | } | 444 | } |
314 | 445 | ||
315 | /* | 446 | /* |
@@ -325,11 +456,7 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
325 | { | 456 | { |
326 | struct pxafb_info *fbi = (struct pxafb_info *)info; | 457 | struct pxafb_info *fbi = (struct pxafb_info *)info; |
327 | struct pxafb_mach_info *inf = fbi->dev->platform_data; | 458 | struct pxafb_mach_info *inf = fbi->dev->platform_data; |
328 | 459 | int err; | |
329 | if (var->xres < MIN_XRES) | ||
330 | var->xres = MIN_XRES; | ||
331 | if (var->yres < MIN_YRES) | ||
332 | var->yres = MIN_YRES; | ||
333 | 460 | ||
334 | if (inf->fixed_modes) { | 461 | if (inf->fixed_modes) { |
335 | struct pxafb_mode_info *mode; | 462 | struct pxafb_mode_info *mode; |
@@ -338,74 +465,18 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
338 | if (!mode) | 465 | if (!mode) |
339 | return -EINVAL; | 466 | return -EINVAL; |
340 | pxafb_setmode(var, mode); | 467 | pxafb_setmode(var, mode); |
341 | } else { | ||
342 | if (var->xres > inf->modes->xres) | ||
343 | return -EINVAL; | ||
344 | if (var->yres > inf->modes->yres) | ||
345 | return -EINVAL; | ||
346 | if (var->bits_per_pixel > inf->modes->bpp) | ||
347 | return -EINVAL; | ||
348 | } | 468 | } |
349 | 469 | ||
350 | var->xres_virtual = | 470 | /* do a test conversion to BPP fields to check the color formats */ |
351 | max(var->xres_virtual, var->xres); | 471 | err = pxafb_var_to_bpp(var); |
352 | var->yres_virtual = | 472 | if (err < 0) |
353 | max(var->yres_virtual, var->yres); | 473 | return err; |
354 | 474 | ||
355 | /* | 475 | pxafb_set_pixfmt(var, var_to_depth(var)); |
356 | * Setup the RGB parameters for this display. | ||
357 | * | ||
358 | * The pixel packing format is described on page 7-11 of the | ||
359 | * PXA2XX Developer's Manual. | ||
360 | */ | ||
361 | if (var->bits_per_pixel == 16) { | ||
362 | var->red.offset = 11; var->red.length = 5; | ||
363 | var->green.offset = 5; var->green.length = 6; | ||
364 | var->blue.offset = 0; var->blue.length = 5; | ||
365 | var->transp.offset = var->transp.length = 0; | ||
366 | } else if (var->bits_per_pixel > 16) { | ||
367 | struct pxafb_mode_info *mode; | ||
368 | 476 | ||
369 | mode = pxafb_getmode(inf, var); | 477 | err = pxafb_adjust_timing(fbi, var); |
370 | if (!mode) | 478 | if (err) |
371 | return -EINVAL; | 479 | return err; |
372 | |||
373 | switch (mode->depth) { | ||
374 | case 18: /* RGB666 */ | ||
375 | var->transp.offset = var->transp.length = 0; | ||
376 | var->red.offset = 12; var->red.length = 6; | ||
377 | var->green.offset = 6; var->green.length = 6; | ||
378 | var->blue.offset = 0; var->blue.length = 6; | ||
379 | break; | ||
380 | case 19: /* RGBT666 */ | ||
381 | var->transp.offset = 18; var->transp.length = 1; | ||
382 | var->red.offset = 12; var->red.length = 6; | ||
383 | var->green.offset = 6; var->green.length = 6; | ||
384 | var->blue.offset = 0; var->blue.length = 6; | ||
385 | break; | ||
386 | case 24: /* RGB888 */ | ||
387 | var->transp.offset = var->transp.length = 0; | ||
388 | var->red.offset = 16; var->red.length = 8; | ||
389 | var->green.offset = 8; var->green.length = 8; | ||
390 | var->blue.offset = 0; var->blue.length = 8; | ||
391 | break; | ||
392 | case 25: /* RGBT888 */ | ||
393 | var->transp.offset = 24; var->transp.length = 1; | ||
394 | var->red.offset = 16; var->red.length = 8; | ||
395 | var->green.offset = 8; var->green.length = 8; | ||
396 | var->blue.offset = 0; var->blue.length = 8; | ||
397 | break; | ||
398 | default: | ||
399 | return -EINVAL; | ||
400 | } | ||
401 | } else { | ||
402 | var->red.offset = var->green.offset = 0; | ||
403 | var->blue.offset = var->transp.offset = 0; | ||
404 | var->red.length = 8; | ||
405 | var->green.length = 8; | ||
406 | var->blue.length = 8; | ||
407 | var->transp.length = 0; | ||
408 | } | ||
409 | 480 | ||
410 | #ifdef CONFIG_CPU_FREQ | 481 | #ifdef CONFIG_CPU_FREQ |
411 | pr_debug("pxafb: dma period = %d ps\n", | 482 | pr_debug("pxafb: dma period = %d ps\n", |
@@ -415,11 +486,6 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
415 | return 0; | 486 | return 0; |
416 | } | 487 | } |
417 | 488 | ||
418 | static inline void pxafb_set_truecolor(u_int is_true_color) | ||
419 | { | ||
420 | /* do your machine-specific setup if needed */ | ||
421 | } | ||
422 | |||
423 | /* | 489 | /* |
424 | * pxafb_set_par(): | 490 | * pxafb_set_par(): |
425 | * Set the user defined part of the display for the specified console | 491 | * Set the user defined part of the display for the specified console |
@@ -452,11 +518,6 @@ static int pxafb_set_par(struct fb_info *info) | |||
452 | 518 | ||
453 | fbi->palette_cpu = (u16 *)&fbi->dma_buff->palette[0]; | 519 | fbi->palette_cpu = (u16 *)&fbi->dma_buff->palette[0]; |
454 | 520 | ||
455 | /* | ||
456 | * Set (any) board control register to handle new color depth | ||
457 | */ | ||
458 | pxafb_set_truecolor(fbi->fb.fix.visual == FB_VISUAL_TRUECOLOR); | ||
459 | |||
460 | if (fbi->fb.var.bits_per_pixel >= 16) | 521 | if (fbi->fb.var.bits_per_pixel >= 16) |
461 | fb_dealloc_cmap(&fbi->fb.cmap); | 522 | fb_dealloc_cmap(&fbi->fb.cmap); |
462 | else | 523 | else |
@@ -467,6 +528,24 @@ static int pxafb_set_par(struct fb_info *info) | |||
467 | return 0; | 528 | return 0; |
468 | } | 529 | } |
469 | 530 | ||
531 | static int pxafb_pan_display(struct fb_var_screeninfo *var, | ||
532 | struct fb_info *info) | ||
533 | { | ||
534 | struct pxafb_info *fbi = (struct pxafb_info *)info; | ||
535 | int dma = DMA_MAX + DMA_BASE; | ||
536 | |||
537 | if (fbi->state != C_ENABLE) | ||
538 | return 0; | ||
539 | |||
540 | setup_base_frame(fbi, 1); | ||
541 | |||
542 | if (fbi->lccr0 & LCCR0_SDS) | ||
543 | lcd_writel(fbi, FBR1, fbi->fdadr[dma + 1] | 0x1); | ||
544 | |||
545 | lcd_writel(fbi, FBR0, fbi->fdadr[dma] | 0x1); | ||
546 | return 0; | ||
547 | } | ||
548 | |||
470 | /* | 549 | /* |
471 | * pxafb_blank(): | 550 | * pxafb_blank(): |
472 | * Blank the display by setting all palette values to zero. Note, the | 551 | * Blank the display by setting all palette values to zero. Note, the |
@@ -502,32 +581,342 @@ static int pxafb_blank(int blank, struct fb_info *info) | |||
502 | return 0; | 581 | return 0; |
503 | } | 582 | } |
504 | 583 | ||
505 | static int pxafb_mmap(struct fb_info *info, | ||
506 | struct vm_area_struct *vma) | ||
507 | { | ||
508 | struct pxafb_info *fbi = (struct pxafb_info *)info; | ||
509 | unsigned long off = vma->vm_pgoff << PAGE_SHIFT; | ||
510 | |||
511 | if (off < info->fix.smem_len) { | ||
512 | vma->vm_pgoff += fbi->video_offset / PAGE_SIZE; | ||
513 | return dma_mmap_writecombine(fbi->dev, vma, fbi->map_cpu, | ||
514 | fbi->map_dma, fbi->map_size); | ||
515 | } | ||
516 | return -EINVAL; | ||
517 | } | ||
518 | |||
519 | static struct fb_ops pxafb_ops = { | 584 | static struct fb_ops pxafb_ops = { |
520 | .owner = THIS_MODULE, | 585 | .owner = THIS_MODULE, |
521 | .fb_check_var = pxafb_check_var, | 586 | .fb_check_var = pxafb_check_var, |
522 | .fb_set_par = pxafb_set_par, | 587 | .fb_set_par = pxafb_set_par, |
588 | .fb_pan_display = pxafb_pan_display, | ||
523 | .fb_setcolreg = pxafb_setcolreg, | 589 | .fb_setcolreg = pxafb_setcolreg, |
524 | .fb_fillrect = cfb_fillrect, | 590 | .fb_fillrect = cfb_fillrect, |
525 | .fb_copyarea = cfb_copyarea, | 591 | .fb_copyarea = cfb_copyarea, |
526 | .fb_imageblit = cfb_imageblit, | 592 | .fb_imageblit = cfb_imageblit, |
527 | .fb_blank = pxafb_blank, | 593 | .fb_blank = pxafb_blank, |
528 | .fb_mmap = pxafb_mmap, | ||
529 | }; | 594 | }; |
530 | 595 | ||
596 | #ifdef CONFIG_FB_PXA_OVERLAY | ||
597 | static void overlay1fb_setup(struct pxafb_layer *ofb) | ||
598 | { | ||
599 | int size = ofb->fb.fix.line_length * ofb->fb.var.yres_virtual; | ||
600 | unsigned long start = ofb->video_mem_phys; | ||
601 | setup_frame_dma(ofb->fbi, DMA_OV1, PAL_NONE, start, size); | ||
602 | } | ||
603 | |||
604 | /* Depending on the enable status of overlay1/2, the DMA should be | ||
605 | * updated from FDADRx (when disabled) or FBRx (when enabled). | ||
606 | */ | ||
607 | static void overlay1fb_enable(struct pxafb_layer *ofb) | ||
608 | { | ||
609 | int enabled = lcd_readl(ofb->fbi, OVL1C1) & OVLxC1_OEN; | ||
610 | uint32_t fdadr1 = ofb->fbi->fdadr[DMA_OV1] | (enabled ? 0x1 : 0); | ||
611 | |||
612 | lcd_writel(ofb->fbi, enabled ? FBR1 : FDADR1, fdadr1); | ||
613 | lcd_writel(ofb->fbi, OVL1C2, ofb->control[1]); | ||
614 | lcd_writel(ofb->fbi, OVL1C1, ofb->control[0] | OVLxC1_OEN); | ||
615 | } | ||
616 | |||
617 | static void overlay1fb_disable(struct pxafb_layer *ofb) | ||
618 | { | ||
619 | uint32_t lccr5 = lcd_readl(ofb->fbi, LCCR5); | ||
620 | |||
621 | lcd_writel(ofb->fbi, OVL1C1, ofb->control[0] & ~OVLxC1_OEN); | ||
622 | |||
623 | lcd_writel(ofb->fbi, LCSR1, LCSR1_BS(1)); | ||
624 | lcd_writel(ofb->fbi, LCCR5, lccr5 & ~LCSR1_BS(1)); | ||
625 | lcd_writel(ofb->fbi, FBR1, ofb->fbi->fdadr[DMA_OV1] | 0x3); | ||
626 | |||
627 | if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0) | ||
628 | pr_warning("%s: timeout disabling overlay1\n", __func__); | ||
629 | |||
630 | lcd_writel(ofb->fbi, LCCR5, lccr5); | ||
631 | } | ||
632 | |||
633 | static void overlay2fb_setup(struct pxafb_layer *ofb) | ||
634 | { | ||
635 | int size, div = 1, pfor = NONSTD_TO_PFOR(ofb->fb.var.nonstd); | ||
636 | unsigned long start[3] = { ofb->video_mem_phys, 0, 0 }; | ||
637 | |||
638 | if (pfor == OVERLAY_FORMAT_RGB || pfor == OVERLAY_FORMAT_YUV444_PACKED) { | ||
639 | size = ofb->fb.fix.line_length * ofb->fb.var.yres_virtual; | ||
640 | setup_frame_dma(ofb->fbi, DMA_OV2_Y, -1, start[0], size); | ||
641 | } else { | ||
642 | size = ofb->fb.var.xres_virtual * ofb->fb.var.yres_virtual; | ||
643 | switch (pfor) { | ||
644 | case OVERLAY_FORMAT_YUV444_PLANAR: div = 1; break; | ||
645 | case OVERLAY_FORMAT_YUV422_PLANAR: div = 2; break; | ||
646 | case OVERLAY_FORMAT_YUV420_PLANAR: div = 4; break; | ||
647 | } | ||
648 | start[1] = start[0] + size; | ||
649 | start[2] = start[1] + size / div; | ||
650 | setup_frame_dma(ofb->fbi, DMA_OV2_Y, -1, start[0], size); | ||
651 | setup_frame_dma(ofb->fbi, DMA_OV2_Cb, -1, start[1], size / div); | ||
652 | setup_frame_dma(ofb->fbi, DMA_OV2_Cr, -1, start[2], size / div); | ||
653 | } | ||
654 | } | ||
655 | |||
656 | static void overlay2fb_enable(struct pxafb_layer *ofb) | ||
657 | { | ||
658 | int pfor = NONSTD_TO_PFOR(ofb->fb.var.nonstd); | ||
659 | int enabled = lcd_readl(ofb->fbi, OVL2C1) & OVLxC1_OEN; | ||
660 | uint32_t fdadr2 = ofb->fbi->fdadr[DMA_OV2_Y] | (enabled ? 0x1 : 0); | ||
661 | uint32_t fdadr3 = ofb->fbi->fdadr[DMA_OV2_Cb] | (enabled ? 0x1 : 0); | ||
662 | uint32_t fdadr4 = ofb->fbi->fdadr[DMA_OV2_Cr] | (enabled ? 0x1 : 0); | ||
663 | |||
664 | if (pfor == OVERLAY_FORMAT_RGB || pfor == OVERLAY_FORMAT_YUV444_PACKED) | ||
665 | lcd_writel(ofb->fbi, enabled ? FBR2 : FDADR2, fdadr2); | ||
666 | else { | ||
667 | lcd_writel(ofb->fbi, enabled ? FBR2 : FDADR2, fdadr2); | ||
668 | lcd_writel(ofb->fbi, enabled ? FBR3 : FDADR3, fdadr3); | ||
669 | lcd_writel(ofb->fbi, enabled ? FBR4 : FDADR4, fdadr4); | ||
670 | } | ||
671 | lcd_writel(ofb->fbi, OVL2C2, ofb->control[1]); | ||
672 | lcd_writel(ofb->fbi, OVL2C1, ofb->control[0] | OVLxC1_OEN); | ||
673 | } | ||
674 | |||
675 | static void overlay2fb_disable(struct pxafb_layer *ofb) | ||
676 | { | ||
677 | uint32_t lccr5 = lcd_readl(ofb->fbi, LCCR5); | ||
678 | |||
679 | lcd_writel(ofb->fbi, OVL2C1, ofb->control[0] & ~OVLxC1_OEN); | ||
680 | |||
681 | lcd_writel(ofb->fbi, LCSR1, LCSR1_BS(2)); | ||
682 | lcd_writel(ofb->fbi, LCCR5, lccr5 & ~LCSR1_BS(2)); | ||
683 | lcd_writel(ofb->fbi, FBR2, ofb->fbi->fdadr[DMA_OV2_Y] | 0x3); | ||
684 | lcd_writel(ofb->fbi, FBR3, ofb->fbi->fdadr[DMA_OV2_Cb] | 0x3); | ||
685 | lcd_writel(ofb->fbi, FBR4, ofb->fbi->fdadr[DMA_OV2_Cr] | 0x3); | ||
686 | |||
687 | if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0) | ||
688 | pr_warning("%s: timeout disabling overlay2\n", __func__); | ||
689 | } | ||
690 | |||
691 | static struct pxafb_layer_ops ofb_ops[] = { | ||
692 | [0] = { | ||
693 | .enable = overlay1fb_enable, | ||
694 | .disable = overlay1fb_disable, | ||
695 | .setup = overlay1fb_setup, | ||
696 | }, | ||
697 | [1] = { | ||
698 | .enable = overlay2fb_enable, | ||
699 | .disable = overlay2fb_disable, | ||
700 | .setup = overlay2fb_setup, | ||
701 | }, | ||
702 | }; | ||
703 | |||
704 | static int overlayfb_open(struct fb_info *info, int user) | ||
705 | { | ||
706 | struct pxafb_layer *ofb = (struct pxafb_layer *)info; | ||
707 | |||
708 | /* no support for framebuffer console on overlay */ | ||
709 | if (user == 0) | ||
710 | return -ENODEV; | ||
711 | |||
712 | /* allow only one user at a time */ | ||
713 | if (atomic_inc_and_test(&ofb->usage)) | ||
714 | return -EBUSY; | ||
715 | |||
716 | /* unblank the base framebuffer */ | ||
717 | fb_blank(&ofb->fbi->fb, FB_BLANK_UNBLANK); | ||
718 | return 0; | ||
719 | } | ||
720 | |||
721 | static int overlayfb_release(struct fb_info *info, int user) | ||
722 | { | ||
723 | struct pxafb_layer *ofb = (struct pxafb_layer*) info; | ||
724 | |||
725 | atomic_dec(&ofb->usage); | ||
726 | ofb->ops->disable(ofb); | ||
727 | |||
728 | free_pages_exact(ofb->video_mem, ofb->video_mem_size); | ||
729 | ofb->video_mem = NULL; | ||
730 | ofb->video_mem_size = 0; | ||
731 | return 0; | ||
732 | } | ||
733 | |||
734 | static int overlayfb_check_var(struct fb_var_screeninfo *var, | ||
735 | struct fb_info *info) | ||
736 | { | ||
737 | struct pxafb_layer *ofb = (struct pxafb_layer *)info; | ||
738 | struct fb_var_screeninfo *base_var = &ofb->fbi->fb.var; | ||
739 | int xpos, ypos, pfor, bpp; | ||
740 | |||
741 | xpos = NONSTD_TO_XPOS(var->nonstd); | ||
742 | ypos = NONSTD_TO_XPOS(var->nonstd); | ||
743 | pfor = NONSTD_TO_PFOR(var->nonstd); | ||
744 | |||
745 | bpp = pxafb_var_to_bpp(var); | ||
746 | if (bpp < 0) | ||
747 | return -EINVAL; | ||
748 | |||
749 | /* no support for YUV format on overlay1 */ | ||
750 | if (ofb->id == OVERLAY1 && pfor != 0) | ||
751 | return -EINVAL; | ||
752 | |||
753 | /* for YUV packed formats, bpp = 'minimum bpp of YUV components' */ | ||
754 | switch (pfor) { | ||
755 | case OVERLAY_FORMAT_RGB: | ||
756 | bpp = pxafb_var_to_bpp(var); | ||
757 | if (bpp < 0) | ||
758 | return -EINVAL; | ||
759 | |||
760 | pxafb_set_pixfmt(var, var_to_depth(var)); | ||
761 | break; | ||
762 | case OVERLAY_FORMAT_YUV444_PACKED: bpp = 24; break; | ||
763 | case OVERLAY_FORMAT_YUV444_PLANAR: bpp = 8; break; | ||
764 | case OVERLAY_FORMAT_YUV422_PLANAR: bpp = 4; break; | ||
765 | case OVERLAY_FORMAT_YUV420_PLANAR: bpp = 2; break; | ||
766 | default: | ||
767 | return -EINVAL; | ||
768 | } | ||
769 | |||
770 | /* each line must start at a 32-bit word boundary */ | ||
771 | if ((xpos * bpp) % 32) | ||
772 | return -EINVAL; | ||
773 | |||
774 | /* xres must align on 32-bit word boundary */ | ||
775 | var->xres = roundup(var->xres * bpp, 32) / bpp; | ||
776 | |||
777 | if ((xpos + var->xres > base_var->xres) || | ||
778 | (ypos + var->yres > base_var->yres)) | ||
779 | return -EINVAL; | ||
780 | |||
781 | var->xres_virtual = var->xres; | ||
782 | var->yres_virtual = max(var->yres, var->yres_virtual); | ||
783 | return 0; | ||
784 | } | ||
785 | |||
786 | static int overlayfb_map_video_memory(struct pxafb_layer *ofb) | ||
787 | { | ||
788 | struct fb_var_screeninfo *var = &ofb->fb.var; | ||
789 | int pfor = NONSTD_TO_PFOR(var->nonstd); | ||
790 | int size, bpp = 0; | ||
791 | |||
792 | switch (pfor) { | ||
793 | case OVERLAY_FORMAT_RGB: bpp = var->bits_per_pixel; break; | ||
794 | case OVERLAY_FORMAT_YUV444_PACKED: bpp = 24; break; | ||
795 | case OVERLAY_FORMAT_YUV444_PLANAR: bpp = 24; break; | ||
796 | case OVERLAY_FORMAT_YUV422_PLANAR: bpp = 16; break; | ||
797 | case OVERLAY_FORMAT_YUV420_PLANAR: bpp = 12; break; | ||
798 | } | ||
799 | |||
800 | ofb->fb.fix.line_length = var->xres_virtual * bpp / 8; | ||
801 | |||
802 | size = PAGE_ALIGN(ofb->fb.fix.line_length * var->yres_virtual); | ||
803 | |||
804 | /* don't re-allocate if the original video memory is enough */ | ||
805 | if (ofb->video_mem) { | ||
806 | if (ofb->video_mem_size >= size) | ||
807 | return 0; | ||
808 | |||
809 | free_pages_exact(ofb->video_mem, ofb->video_mem_size); | ||
810 | } | ||
811 | |||
812 | ofb->video_mem = alloc_pages_exact(size, GFP_KERNEL | __GFP_ZERO); | ||
813 | if (ofb->video_mem == NULL) | ||
814 | return -ENOMEM; | ||
815 | |||
816 | ofb->video_mem_phys = virt_to_phys(ofb->video_mem); | ||
817 | ofb->video_mem_size = size; | ||
818 | |||
819 | ofb->fb.fix.smem_start = ofb->video_mem_phys; | ||
820 | ofb->fb.fix.smem_len = ofb->fb.fix.line_length * var->yres_virtual; | ||
821 | ofb->fb.screen_base = ofb->video_mem; | ||
822 | return 0; | ||
823 | } | ||
824 | |||
825 | static int overlayfb_set_par(struct fb_info *info) | ||
826 | { | ||
827 | struct pxafb_layer *ofb = (struct pxafb_layer *)info; | ||
828 | struct fb_var_screeninfo *var = &info->var; | ||
829 | int xpos, ypos, pfor, bpp, ret; | ||
830 | |||
831 | ret = overlayfb_map_video_memory(ofb); | ||
832 | if (ret) | ||
833 | return ret; | ||
834 | |||
835 | bpp = pxafb_var_to_bpp(var); | ||
836 | xpos = NONSTD_TO_XPOS(var->nonstd); | ||
837 | ypos = NONSTD_TO_XPOS(var->nonstd); | ||
838 | pfor = NONSTD_TO_PFOR(var->nonstd); | ||
839 | |||
840 | ofb->control[0] = OVLxC1_PPL(var->xres) | OVLxC1_LPO(var->yres) | | ||
841 | OVLxC1_BPP(bpp); | ||
842 | ofb->control[1] = OVLxC2_XPOS(xpos) | OVLxC2_YPOS(ypos); | ||
843 | |||
844 | if (ofb->id == OVERLAY2) | ||
845 | ofb->control[1] |= OVL2C2_PFOR(pfor); | ||
846 | |||
847 | ofb->ops->setup(ofb); | ||
848 | ofb->ops->enable(ofb); | ||
849 | return 0; | ||
850 | } | ||
851 | |||
852 | static struct fb_ops overlay_fb_ops = { | ||
853 | .owner = THIS_MODULE, | ||
854 | .fb_open = overlayfb_open, | ||
855 | .fb_release = overlayfb_release, | ||
856 | .fb_check_var = overlayfb_check_var, | ||
857 | .fb_set_par = overlayfb_set_par, | ||
858 | }; | ||
859 | |||
860 | static void __devinit init_pxafb_overlay(struct pxafb_info *fbi, | ||
861 | struct pxafb_layer *ofb, int id) | ||
862 | { | ||
863 | sprintf(ofb->fb.fix.id, "overlay%d", id + 1); | ||
864 | |||
865 | ofb->fb.fix.type = FB_TYPE_PACKED_PIXELS; | ||
866 | ofb->fb.fix.xpanstep = 0; | ||
867 | ofb->fb.fix.ypanstep = 1; | ||
868 | |||
869 | ofb->fb.var.activate = FB_ACTIVATE_NOW; | ||
870 | ofb->fb.var.height = -1; | ||
871 | ofb->fb.var.width = -1; | ||
872 | ofb->fb.var.vmode = FB_VMODE_NONINTERLACED; | ||
873 | |||
874 | ofb->fb.fbops = &overlay_fb_ops; | ||
875 | ofb->fb.flags = FBINFO_FLAG_DEFAULT; | ||
876 | ofb->fb.node = -1; | ||
877 | ofb->fb.pseudo_palette = NULL; | ||
878 | |||
879 | ofb->id = id; | ||
880 | ofb->ops = &ofb_ops[id]; | ||
881 | atomic_set(&ofb->usage, 0); | ||
882 | ofb->fbi = fbi; | ||
883 | init_completion(&ofb->branch_done); | ||
884 | } | ||
885 | |||
886 | static int __devinit pxafb_overlay_init(struct pxafb_info *fbi) | ||
887 | { | ||
888 | int i, ret; | ||
889 | |||
890 | for (i = 0; i < 2; i++) { | ||
891 | init_pxafb_overlay(fbi, &fbi->overlay[i], i); | ||
892 | ret = register_framebuffer(&fbi->overlay[i].fb); | ||
893 | if (ret) { | ||
894 | dev_err(fbi->dev, "failed to register overlay %d\n", i); | ||
895 | return ret; | ||
896 | } | ||
897 | } | ||
898 | |||
899 | /* mask all IU/BS/EOF/SOF interrupts */ | ||
900 | lcd_writel(fbi, LCCR5, ~0); | ||
901 | |||
902 | /* place overlay(s) on top of base */ | ||
903 | fbi->lccr0 |= LCCR0_OUC; | ||
904 | pr_info("PXA Overlay driver loaded successfully!\n"); | ||
905 | return 0; | ||
906 | } | ||
907 | |||
908 | static void __devexit pxafb_overlay_exit(struct pxafb_info *fbi) | ||
909 | { | ||
910 | int i; | ||
911 | |||
912 | for (i = 0; i < 2; i++) | ||
913 | unregister_framebuffer(&fbi->overlay[i].fb); | ||
914 | } | ||
915 | #else | ||
916 | static inline void pxafb_overlay_init(struct pxafb_info *fbi) {} | ||
917 | static inline void pxafb_overlay_exit(struct pxafb_info *fbi) {} | ||
918 | #endif /* CONFIG_FB_PXA_OVERLAY */ | ||
919 | |||
531 | /* | 920 | /* |
532 | * Calculate the PCD value from the clock rate (in picoseconds). | 921 | * Calculate the PCD value from the clock rate (in picoseconds). |
533 | * We take account of the PPCR clock setting. | 922 | * We take account of the PPCR clock setting. |
@@ -607,22 +996,22 @@ unsigned long pxafb_get_hsync_time(struct device *dev) | |||
607 | EXPORT_SYMBOL(pxafb_get_hsync_time); | 996 | EXPORT_SYMBOL(pxafb_get_hsync_time); |
608 | 997 | ||
609 | static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, | 998 | static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, |
610 | unsigned int offset, size_t size) | 999 | unsigned long start, size_t size) |
611 | { | 1000 | { |
612 | struct pxafb_dma_descriptor *dma_desc, *pal_desc; | 1001 | struct pxafb_dma_descriptor *dma_desc, *pal_desc; |
613 | unsigned int dma_desc_off, pal_desc_off; | 1002 | unsigned int dma_desc_off, pal_desc_off; |
614 | 1003 | ||
615 | if (dma < 0 || dma >= DMA_MAX) | 1004 | if (dma < 0 || dma >= DMA_MAX * 2) |
616 | return -EINVAL; | 1005 | return -EINVAL; |
617 | 1006 | ||
618 | dma_desc = &fbi->dma_buff->dma_desc[dma]; | 1007 | dma_desc = &fbi->dma_buff->dma_desc[dma]; |
619 | dma_desc_off = offsetof(struct pxafb_dma_buff, dma_desc[dma]); | 1008 | dma_desc_off = offsetof(struct pxafb_dma_buff, dma_desc[dma]); |
620 | 1009 | ||
621 | dma_desc->fsadr = fbi->screen_dma + offset; | 1010 | dma_desc->fsadr = start; |
622 | dma_desc->fidr = 0; | 1011 | dma_desc->fidr = 0; |
623 | dma_desc->ldcmd = size; | 1012 | dma_desc->ldcmd = size; |
624 | 1013 | ||
625 | if (pal < 0 || pal >= PAL_MAX) { | 1014 | if (pal < 0 || pal >= PAL_MAX * 2) { |
626 | dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off; | 1015 | dma_desc->fdadr = fbi->dma_buff_phys + dma_desc_off; |
627 | fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off; | 1016 | fbi->fdadr[dma] = fbi->dma_buff_phys + dma_desc_off; |
628 | } else { | 1017 | } else { |
@@ -648,6 +1037,27 @@ static int setup_frame_dma(struct pxafb_info *fbi, int dma, int pal, | |||
648 | return 0; | 1037 | return 0; |
649 | } | 1038 | } |
650 | 1039 | ||
1040 | static void setup_base_frame(struct pxafb_info *fbi, int branch) | ||
1041 | { | ||
1042 | struct fb_var_screeninfo *var = &fbi->fb.var; | ||
1043 | struct fb_fix_screeninfo *fix = &fbi->fb.fix; | ||
1044 | int nbytes, dma, pal, bpp = var->bits_per_pixel; | ||
1045 | unsigned long offset; | ||
1046 | |||
1047 | dma = DMA_BASE + (branch ? DMA_MAX : 0); | ||
1048 | pal = (bpp >= 16) ? PAL_NONE : PAL_BASE + (branch ? PAL_MAX : 0); | ||
1049 | |||
1050 | nbytes = fix->line_length * var->yres; | ||
1051 | offset = fix->line_length * var->yoffset + fbi->video_mem_phys; | ||
1052 | |||
1053 | if (fbi->lccr0 & LCCR0_SDS) { | ||
1054 | nbytes = nbytes / 2; | ||
1055 | setup_frame_dma(fbi, dma + 1, PAL_NONE, offset + nbytes, nbytes); | ||
1056 | } | ||
1057 | |||
1058 | setup_frame_dma(fbi, dma, pal, offset, nbytes); | ||
1059 | } | ||
1060 | |||
651 | #ifdef CONFIG_FB_PXA_SMARTPANEL | 1061 | #ifdef CONFIG_FB_PXA_SMARTPANEL |
652 | static int setup_smart_dma(struct pxafb_info *fbi) | 1062 | static int setup_smart_dma(struct pxafb_info *fbi) |
653 | { | 1063 | { |
@@ -701,6 +1111,7 @@ int pxafb_smart_flush(struct fb_info *info) | |||
701 | lcd_writel(fbi, LCCR1, fbi->reg_lccr1); | 1111 | lcd_writel(fbi, LCCR1, fbi->reg_lccr1); |
702 | lcd_writel(fbi, LCCR2, fbi->reg_lccr2); | 1112 | lcd_writel(fbi, LCCR2, fbi->reg_lccr2); |
703 | lcd_writel(fbi, LCCR3, fbi->reg_lccr3); | 1113 | lcd_writel(fbi, LCCR3, fbi->reg_lccr3); |
1114 | lcd_writel(fbi, LCCR4, fbi->reg_lccr4); | ||
704 | lcd_writel(fbi, FDADR0, fbi->fdadr[0]); | 1115 | lcd_writel(fbi, FDADR0, fbi->fdadr[0]); |
705 | lcd_writel(fbi, FDADR6, fbi->fdadr[6]); | 1116 | lcd_writel(fbi, FDADR6, fbi->fdadr[6]); |
706 | 1117 | ||
@@ -727,12 +1138,19 @@ int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int n_cmds) | |||
727 | int i; | 1138 | int i; |
728 | struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); | 1139 | struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb); |
729 | 1140 | ||
730 | /* leave 2 commands for INTERRUPT and WAIT_FOR_SYNC */ | 1141 | for (i = 0; i < n_cmds; i++, cmds++) { |
731 | for (i = 0; i < n_cmds; i++) { | 1142 | /* if it is a software delay, flush and delay */ |
1143 | if ((*cmds & 0xff00) == SMART_CMD_DELAY) { | ||
1144 | pxafb_smart_flush(info); | ||
1145 | mdelay(*cmds & 0xff); | ||
1146 | continue; | ||
1147 | } | ||
1148 | |||
1149 | /* leave 2 commands for INTERRUPT and WAIT_FOR_SYNC */ | ||
732 | if (fbi->n_smart_cmds == CMD_BUFF_SIZE - 8) | 1150 | if (fbi->n_smart_cmds == CMD_BUFF_SIZE - 8) |
733 | pxafb_smart_flush(info); | 1151 | pxafb_smart_flush(info); |
734 | 1152 | ||
735 | fbi->smart_cmds[fbi->n_smart_cmds++] = *cmds++; | 1153 | fbi->smart_cmds[fbi->n_smart_cmds++] = *cmds; |
736 | } | 1154 | } |
737 | 1155 | ||
738 | return 0; | 1156 | return 0; |
@@ -764,7 +1182,9 @@ static void setup_smart_timing(struct pxafb_info *fbi, | |||
764 | LCCR1_HorSnchWdth(__smart_timing(t3, lclk)); | 1182 | LCCR1_HorSnchWdth(__smart_timing(t3, lclk)); |
765 | 1183 | ||
766 | fbi->reg_lccr2 = LCCR2_DisHght(var->yres); | 1184 | fbi->reg_lccr2 = LCCR2_DisHght(var->yres); |
767 | fbi->reg_lccr3 = LCCR3_PixClkDiv(__smart_timing(t4, lclk)); | 1185 | fbi->reg_lccr3 = fbi->lccr3 | LCCR3_PixClkDiv(__smart_timing(t4, lclk)); |
1186 | fbi->reg_lccr3 |= (var->sync & FB_SYNC_HOR_HIGH_ACT) ? LCCR3_HSP : 0; | ||
1187 | fbi->reg_lccr3 |= (var->sync & FB_SYNC_VERT_HIGH_ACT) ? LCCR3_VSP : 0; | ||
768 | 1188 | ||
769 | /* FIXME: make this configurable */ | 1189 | /* FIXME: make this configurable */ |
770 | fbi->reg_cmdcr = 1; | 1190 | fbi->reg_cmdcr = 1; |
@@ -789,11 +1209,15 @@ static int pxafb_smart_thread(void *arg) | |||
789 | if (try_to_freeze()) | 1209 | if (try_to_freeze()) |
790 | continue; | 1210 | continue; |
791 | 1211 | ||
1212 | mutex_lock(&fbi->ctrlr_lock); | ||
1213 | |||
792 | if (fbi->state == C_ENABLE) { | 1214 | if (fbi->state == C_ENABLE) { |
793 | inf->smart_update(&fbi->fb); | 1215 | inf->smart_update(&fbi->fb); |
794 | complete(&fbi->refresh_done); | 1216 | complete(&fbi->refresh_done); |
795 | } | 1217 | } |
796 | 1218 | ||
1219 | mutex_unlock(&fbi->ctrlr_lock); | ||
1220 | |||
797 | set_current_state(TASK_INTERRUPTIBLE); | 1221 | set_current_state(TASK_INTERRUPTIBLE); |
798 | schedule_timeout(30 * HZ / 1000); | 1222 | schedule_timeout(30 * HZ / 1000); |
799 | } | 1223 | } |
@@ -804,16 +1228,22 @@ static int pxafb_smart_thread(void *arg) | |||
804 | 1228 | ||
805 | static int pxafb_smart_init(struct pxafb_info *fbi) | 1229 | static int pxafb_smart_init(struct pxafb_info *fbi) |
806 | { | 1230 | { |
807 | if (!(fbi->lccr0 | LCCR0_LCDT)) | 1231 | if (!(fbi->lccr0 & LCCR0_LCDT)) |
808 | return 0; | 1232 | return 0; |
809 | 1233 | ||
1234 | fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; | ||
1235 | fbi->n_smart_cmds = 0; | ||
1236 | |||
1237 | init_completion(&fbi->command_done); | ||
1238 | init_completion(&fbi->refresh_done); | ||
1239 | |||
810 | fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi, | 1240 | fbi->smart_thread = kthread_run(pxafb_smart_thread, fbi, |
811 | "lcd_refresh"); | 1241 | "lcd_refresh"); |
812 | if (IS_ERR(fbi->smart_thread)) { | 1242 | if (IS_ERR(fbi->smart_thread)) { |
813 | printk(KERN_ERR "%s: unable to create kernel thread\n", | 1243 | pr_err("%s: unable to create kernel thread\n", __func__); |
814 | __func__); | ||
815 | return PTR_ERR(fbi->smart_thread); | 1244 | return PTR_ERR(fbi->smart_thread); |
816 | } | 1245 | } |
1246 | |||
817 | return 0; | 1247 | return 0; |
818 | } | 1248 | } |
819 | #else | 1249 | #else |
@@ -826,7 +1256,9 @@ int pxafb_smart_flush(struct fb_info *info) | |||
826 | { | 1256 | { |
827 | return 0; | 1257 | return 0; |
828 | } | 1258 | } |
829 | #endif /* CONFIG_FB_SMART_PANEL */ | 1259 | |
1260 | static inline int pxafb_smart_init(struct pxafb_info *fbi) { return 0; } | ||
1261 | #endif /* CONFIG_FB_PXA_SMARTPANEL */ | ||
830 | 1262 | ||
831 | static void setup_parallel_timing(struct pxafb_info *fbi, | 1263 | static void setup_parallel_timing(struct pxafb_info *fbi, |
832 | struct fb_var_screeninfo *var) | 1264 | struct fb_var_screeninfo *var) |
@@ -874,51 +1306,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, | |||
874 | struct pxafb_info *fbi) | 1306 | struct pxafb_info *fbi) |
875 | { | 1307 | { |
876 | u_long flags; | 1308 | u_long flags; |
877 | size_t nbytes; | ||
878 | |||
879 | #if DEBUG_VAR | ||
880 | if (!(fbi->lccr0 & LCCR0_LCDT)) { | ||
881 | if (var->xres < 16 || var->xres > 1024) | ||
882 | printk(KERN_ERR "%s: invalid xres %d\n", | ||
883 | fbi->fb.fix.id, var->xres); | ||
884 | switch (var->bits_per_pixel) { | ||
885 | case 1: | ||
886 | case 2: | ||
887 | case 4: | ||
888 | case 8: | ||
889 | case 16: | ||
890 | case 24: | ||
891 | case 32: | ||
892 | break; | ||
893 | default: | ||
894 | printk(KERN_ERR "%s: invalid bit depth %d\n", | ||
895 | fbi->fb.fix.id, var->bits_per_pixel); | ||
896 | break; | ||
897 | } | ||
898 | 1309 | ||
899 | if (var->hsync_len < 1 || var->hsync_len > 64) | ||
900 | printk(KERN_ERR "%s: invalid hsync_len %d\n", | ||
901 | fbi->fb.fix.id, var->hsync_len); | ||
902 | if (var->left_margin < 1 || var->left_margin > 255) | ||
903 | printk(KERN_ERR "%s: invalid left_margin %d\n", | ||
904 | fbi->fb.fix.id, var->left_margin); | ||
905 | if (var->right_margin < 1 || var->right_margin > 255) | ||
906 | printk(KERN_ERR "%s: invalid right_margin %d\n", | ||
907 | fbi->fb.fix.id, var->right_margin); | ||
908 | if (var->yres < 1 || var->yres > 1024) | ||
909 | printk(KERN_ERR "%s: invalid yres %d\n", | ||
910 | fbi->fb.fix.id, var->yres); | ||
911 | if (var->vsync_len < 1 || var->vsync_len > 64) | ||
912 | printk(KERN_ERR "%s: invalid vsync_len %d\n", | ||
913 | fbi->fb.fix.id, var->vsync_len); | ||
914 | if (var->upper_margin < 0 || var->upper_margin > 255) | ||
915 | printk(KERN_ERR "%s: invalid upper_margin %d\n", | ||
916 | fbi->fb.fix.id, var->upper_margin); | ||
917 | if (var->lower_margin < 0 || var->lower_margin > 255) | ||
918 | printk(KERN_ERR "%s: invalid lower_margin %d\n", | ||
919 | fbi->fb.fix.id, var->lower_margin); | ||
920 | } | ||
921 | #endif | ||
922 | /* Update shadow copy atomically */ | 1310 | /* Update shadow copy atomically */ |
923 | local_irq_save(flags); | 1311 | local_irq_save(flags); |
924 | 1312 | ||
@@ -929,23 +1317,13 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, | |||
929 | #endif | 1317 | #endif |
930 | setup_parallel_timing(fbi, var); | 1318 | setup_parallel_timing(fbi, var); |
931 | 1319 | ||
1320 | setup_base_frame(fbi, 0); | ||
1321 | |||
932 | fbi->reg_lccr0 = fbi->lccr0 | | 1322 | fbi->reg_lccr0 = fbi->lccr0 | |
933 | (LCCR0_LDM | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | | 1323 | (LCCR0_LDM | LCCR0_SFM | LCCR0_IUM | LCCR0_EFM | |
934 | LCCR0_QDM | LCCR0_BM | LCCR0_OUM); | 1324 | LCCR0_QDM | LCCR0_BM | LCCR0_OUM); |
935 | 1325 | ||
936 | fbi->reg_lccr3 |= pxafb_bpp_to_lccr3(var); | 1326 | fbi->reg_lccr3 |= pxafb_var_to_lccr3(var); |
937 | |||
938 | nbytes = var->yres * fbi->fb.fix.line_length; | ||
939 | |||
940 | if ((fbi->lccr0 & LCCR0_SDS) == LCCR0_Dual) { | ||
941 | nbytes = nbytes / 2; | ||
942 | setup_frame_dma(fbi, DMA_LOWER, PAL_NONE, nbytes, nbytes); | ||
943 | } | ||
944 | |||
945 | if ((var->bits_per_pixel >= 16) || (fbi->lccr0 & LCCR0_LCDT)) | ||
946 | setup_frame_dma(fbi, DMA_BASE, PAL_NONE, 0, nbytes); | ||
947 | else | ||
948 | setup_frame_dma(fbi, DMA_BASE, PAL_BASE, 0, nbytes); | ||
949 | 1327 | ||
950 | fbi->reg_lccr4 = lcd_readl(fbi, LCCR4) & ~LCCR4_PAL_FOR_MASK; | 1328 | fbi->reg_lccr4 = lcd_readl(fbi, LCCR4) & ~LCCR4_PAL_FOR_MASK; |
951 | fbi->reg_lccr4 |= (fbi->lccr4 & LCCR4_PAL_FOR_MASK); | 1329 | fbi->reg_lccr4 |= (fbi->lccr4 & LCCR4_PAL_FOR_MASK); |
@@ -959,6 +1337,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, | |||
959 | (lcd_readl(fbi, LCCR1) != fbi->reg_lccr1) || | 1337 | (lcd_readl(fbi, LCCR1) != fbi->reg_lccr1) || |
960 | (lcd_readl(fbi, LCCR2) != fbi->reg_lccr2) || | 1338 | (lcd_readl(fbi, LCCR2) != fbi->reg_lccr2) || |
961 | (lcd_readl(fbi, LCCR3) != fbi->reg_lccr3) || | 1339 | (lcd_readl(fbi, LCCR3) != fbi->reg_lccr3) || |
1340 | (lcd_readl(fbi, LCCR4) != fbi->reg_lccr4) || | ||
962 | (lcd_readl(fbi, FDADR0) != fbi->fdadr[0]) || | 1341 | (lcd_readl(fbi, FDADR0) != fbi->fdadr[0]) || |
963 | (lcd_readl(fbi, FDADR1) != fbi->fdadr[1])) | 1342 | (lcd_readl(fbi, FDADR1) != fbi->fdadr[1])) |
964 | pxafb_schedule_work(fbi, C_REENABLE); | 1343 | pxafb_schedule_work(fbi, C_REENABLE); |
@@ -976,67 +1355,16 @@ static inline void __pxafb_backlight_power(struct pxafb_info *fbi, int on) | |||
976 | { | 1355 | { |
977 | pr_debug("pxafb: backlight o%s\n", on ? "n" : "ff"); | 1356 | pr_debug("pxafb: backlight o%s\n", on ? "n" : "ff"); |
978 | 1357 | ||
979 | if (pxafb_backlight_power) | 1358 | if (fbi->backlight_power) |
980 | pxafb_backlight_power(on); | 1359 | fbi->backlight_power(on); |
981 | } | 1360 | } |
982 | 1361 | ||
983 | static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on) | 1362 | static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on) |
984 | { | 1363 | { |
985 | pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff"); | 1364 | pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff"); |
986 | 1365 | ||
987 | if (pxafb_lcd_power) | 1366 | if (fbi->lcd_power) |
988 | pxafb_lcd_power(on, &fbi->fb.var); | 1367 | fbi->lcd_power(on, &fbi->fb.var); |
989 | } | ||
990 | |||
991 | static void pxafb_setup_gpio(struct pxafb_info *fbi) | ||
992 | { | ||
993 | int gpio, ldd_bits; | ||
994 | unsigned int lccr0 = fbi->lccr0; | ||
995 | |||
996 | /* | ||
997 | * setup is based on type of panel supported | ||
998 | */ | ||
999 | |||
1000 | /* 4 bit interface */ | ||
1001 | if ((lccr0 & LCCR0_CMS) == LCCR0_Mono && | ||
1002 | (lccr0 & LCCR0_SDS) == LCCR0_Sngl && | ||
1003 | (lccr0 & LCCR0_DPD) == LCCR0_4PixMono) | ||
1004 | ldd_bits = 4; | ||
1005 | |||
1006 | /* 8 bit interface */ | ||
1007 | else if (((lccr0 & LCCR0_CMS) == LCCR0_Mono && | ||
1008 | ((lccr0 & LCCR0_SDS) == LCCR0_Dual || | ||
1009 | (lccr0 & LCCR0_DPD) == LCCR0_8PixMono)) || | ||
1010 | ((lccr0 & LCCR0_CMS) == LCCR0_Color && | ||
1011 | (lccr0 & LCCR0_PAS) == LCCR0_Pas && | ||
1012 | (lccr0 & LCCR0_SDS) == LCCR0_Sngl)) | ||
1013 | ldd_bits = 8; | ||
1014 | |||
1015 | /* 16 bit interface */ | ||
1016 | else if ((lccr0 & LCCR0_CMS) == LCCR0_Color && | ||
1017 | ((lccr0 & LCCR0_SDS) == LCCR0_Dual || | ||
1018 | (lccr0 & LCCR0_PAS) == LCCR0_Act)) | ||
1019 | ldd_bits = 16; | ||
1020 | |||
1021 | else { | ||
1022 | printk(KERN_ERR "pxafb_setup_gpio: unable to determine " | ||
1023 | "bits per pixel\n"); | ||
1024 | return; | ||
1025 | } | ||
1026 | |||
1027 | for (gpio = 58; ldd_bits; gpio++, ldd_bits--) | ||
1028 | pxa_gpio_mode(gpio | GPIO_ALT_FN_2_OUT); | ||
1029 | /* 18 bit interface */ | ||
1030 | if (fbi->fb.var.bits_per_pixel > 16) { | ||
1031 | pxa_gpio_mode(86 | GPIO_ALT_FN_2_OUT); | ||
1032 | pxa_gpio_mode(87 | GPIO_ALT_FN_2_OUT); | ||
1033 | } | ||
1034 | pxa_gpio_mode(GPIO74_LCD_FCLK_MD); | ||
1035 | pxa_gpio_mode(GPIO75_LCD_LCLK_MD); | ||
1036 | pxa_gpio_mode(GPIO76_LCD_PCLK_MD); | ||
1037 | |||
1038 | if ((lccr0 & LCCR0_PAS) == 0) | ||
1039 | pxa_gpio_mode(GPIO77_LCD_ACBIAS_MD); | ||
1040 | } | 1368 | } |
1041 | 1369 | ||
1042 | static void pxafb_enable_controller(struct pxafb_info *fbi) | 1370 | static void pxafb_enable_controller(struct pxafb_info *fbi) |
@@ -1056,6 +1384,7 @@ static void pxafb_enable_controller(struct pxafb_info *fbi) | |||
1056 | return; | 1384 | return; |
1057 | 1385 | ||
1058 | /* Sequence from 11.7.10 */ | 1386 | /* Sequence from 11.7.10 */ |
1387 | lcd_writel(fbi, LCCR4, fbi->reg_lccr4); | ||
1059 | lcd_writel(fbi, LCCR3, fbi->reg_lccr3); | 1388 | lcd_writel(fbi, LCCR3, fbi->reg_lccr3); |
1060 | lcd_writel(fbi, LCCR2, fbi->reg_lccr2); | 1389 | lcd_writel(fbi, LCCR2, fbi->reg_lccr2); |
1061 | lcd_writel(fbi, LCCR1, fbi->reg_lccr1); | 1390 | lcd_writel(fbi, LCCR1, fbi->reg_lccr1); |
@@ -1097,8 +1426,9 @@ static void pxafb_disable_controller(struct pxafb_info *fbi) | |||
1097 | static irqreturn_t pxafb_handle_irq(int irq, void *dev_id) | 1426 | static irqreturn_t pxafb_handle_irq(int irq, void *dev_id) |
1098 | { | 1427 | { |
1099 | struct pxafb_info *fbi = dev_id; | 1428 | struct pxafb_info *fbi = dev_id; |
1100 | unsigned int lccr0, lcsr = lcd_readl(fbi, LCSR); | 1429 | unsigned int lccr0, lcsr, lcsr1; |
1101 | 1430 | ||
1431 | lcsr = lcd_readl(fbi, LCSR); | ||
1102 | if (lcsr & LCSR_LDD) { | 1432 | if (lcsr & LCSR_LDD) { |
1103 | lccr0 = lcd_readl(fbi, LCCR0); | 1433 | lccr0 = lcd_readl(fbi, LCCR0); |
1104 | lcd_writel(fbi, LCCR0, lccr0 | LCCR0_LDM); | 1434 | lcd_writel(fbi, LCCR0, lccr0 | LCCR0_LDM); |
@@ -1109,8 +1439,18 @@ static irqreturn_t pxafb_handle_irq(int irq, void *dev_id) | |||
1109 | if (lcsr & LCSR_CMD_INT) | 1439 | if (lcsr & LCSR_CMD_INT) |
1110 | complete(&fbi->command_done); | 1440 | complete(&fbi->command_done); |
1111 | #endif | 1441 | #endif |
1112 | |||
1113 | lcd_writel(fbi, LCSR, lcsr); | 1442 | lcd_writel(fbi, LCSR, lcsr); |
1443 | |||
1444 | #ifdef CONFIG_FB_PXA_OVERLAY | ||
1445 | lcsr1 = lcd_readl(fbi, LCSR1); | ||
1446 | if (lcsr1 & LCSR1_BS(1)) | ||
1447 | complete(&fbi->overlay[0].branch_done); | ||
1448 | |||
1449 | if (lcsr1 & LCSR1_BS(2)) | ||
1450 | complete(&fbi->overlay[1].branch_done); | ||
1451 | |||
1452 | lcd_writel(fbi, LCSR1, lcsr1); | ||
1453 | #endif | ||
1114 | return IRQ_HANDLED; | 1454 | return IRQ_HANDLED; |
1115 | } | 1455 | } |
1116 | 1456 | ||
@@ -1181,7 +1521,6 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) | |||
1181 | if (old_state == C_ENABLE) { | 1521 | if (old_state == C_ENABLE) { |
1182 | __pxafb_lcd_power(fbi, 0); | 1522 | __pxafb_lcd_power(fbi, 0); |
1183 | pxafb_disable_controller(fbi); | 1523 | pxafb_disable_controller(fbi); |
1184 | pxafb_setup_gpio(fbi); | ||
1185 | pxafb_enable_controller(fbi); | 1524 | pxafb_enable_controller(fbi); |
1186 | __pxafb_lcd_power(fbi, 1); | 1525 | __pxafb_lcd_power(fbi, 1); |
1187 | } | 1526 | } |
@@ -1204,7 +1543,6 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state) | |||
1204 | */ | 1543 | */ |
1205 | if (old_state != C_ENABLE) { | 1544 | if (old_state != C_ENABLE) { |
1206 | fbi->state = C_ENABLE; | 1545 | fbi->state = C_ENABLE; |
1207 | pxafb_setup_gpio(fbi); | ||
1208 | pxafb_enable_controller(fbi); | 1546 | pxafb_enable_controller(fbi); |
1209 | __pxafb_lcd_power(fbi, 1); | 1547 | __pxafb_lcd_power(fbi, 1); |
1210 | __pxafb_backlight_power(fbi, 1); | 1548 | __pxafb_backlight_power(fbi, 1); |
@@ -1303,77 +1641,34 @@ static int pxafb_resume(struct platform_device *dev) | |||
1303 | #define pxafb_resume NULL | 1641 | #define pxafb_resume NULL |
1304 | #endif | 1642 | #endif |
1305 | 1643 | ||
1306 | /* | 1644 | static int __devinit pxafb_init_video_memory(struct pxafb_info *fbi) |
1307 | * pxafb_map_video_memory(): | ||
1308 | * Allocates the DRAM memory for the frame buffer. This buffer is | ||
1309 | * remapped into a non-cached, non-buffered, memory region to | ||
1310 | * allow palette and pixel writes to occur without flushing the | ||
1311 | * cache. Once this area is remapped, all virtual memory | ||
1312 | * access to the video memory should occur at the new region. | ||
1313 | */ | ||
1314 | static int __devinit pxafb_map_video_memory(struct pxafb_info *fbi) | ||
1315 | { | 1645 | { |
1316 | /* | 1646 | int size = PAGE_ALIGN(fbi->video_mem_size); |
1317 | * We reserve one page for the palette, plus the size | ||
1318 | * of the framebuffer. | ||
1319 | */ | ||
1320 | fbi->video_offset = PAGE_ALIGN(sizeof(struct pxafb_dma_buff)); | ||
1321 | fbi->map_size = PAGE_ALIGN(fbi->fb.fix.smem_len + fbi->video_offset); | ||
1322 | fbi->map_cpu = dma_alloc_writecombine(fbi->dev, fbi->map_size, | ||
1323 | &fbi->map_dma, GFP_KERNEL); | ||
1324 | |||
1325 | if (fbi->map_cpu) { | ||
1326 | /* prevent initial garbage on screen */ | ||
1327 | memset(fbi->map_cpu, 0, fbi->map_size); | ||
1328 | fbi->fb.screen_base = fbi->map_cpu + fbi->video_offset; | ||
1329 | fbi->screen_dma = fbi->map_dma + fbi->video_offset; | ||
1330 | |||
1331 | /* | ||
1332 | * FIXME: this is actually the wrong thing to place in | ||
1333 | * smem_start. But fbdev suffers from the problem that | ||
1334 | * it needs an API which doesn't exist (in this case, | ||
1335 | * dma_writecombine_mmap) | ||
1336 | */ | ||
1337 | fbi->fb.fix.smem_start = fbi->screen_dma; | ||
1338 | fbi->palette_size = fbi->fb.var.bits_per_pixel == 8 ? 256 : 16; | ||
1339 | |||
1340 | fbi->dma_buff = (void *) fbi->map_cpu; | ||
1341 | fbi->dma_buff_phys = fbi->map_dma; | ||
1342 | fbi->palette_cpu = (u16 *) fbi->dma_buff->palette; | ||
1343 | 1647 | ||
1344 | pr_debug("pxafb: palette_mem_size = 0x%08x\n", fbi->palette_size*sizeof(u16)); | 1648 | fbi->video_mem = alloc_pages_exact(size, GFP_KERNEL | __GFP_ZERO); |
1649 | if (fbi->video_mem == NULL) | ||
1650 | return -ENOMEM; | ||
1345 | 1651 | ||
1346 | #ifdef CONFIG_FB_PXA_SMARTPANEL | 1652 | fbi->video_mem_phys = virt_to_phys(fbi->video_mem); |
1347 | fbi->smart_cmds = (uint16_t *) fbi->dma_buff->cmd_buff; | 1653 | fbi->video_mem_size = size; |
1348 | fbi->n_smart_cmds = 0; | ||
1349 | #endif | ||
1350 | } | ||
1351 | |||
1352 | return fbi->map_cpu ? 0 : -ENOMEM; | ||
1353 | } | ||
1354 | 1654 | ||
1355 | static void pxafb_decode_mode_info(struct pxafb_info *fbi, | 1655 | fbi->fb.fix.smem_start = fbi->video_mem_phys; |
1356 | struct pxafb_mode_info *modes, | 1656 | fbi->fb.fix.smem_len = fbi->video_mem_size; |
1357 | unsigned int num_modes) | 1657 | fbi->fb.screen_base = fbi->video_mem; |
1358 | { | ||
1359 | unsigned int i, smemlen; | ||
1360 | |||
1361 | pxafb_setmode(&fbi->fb.var, &modes[0]); | ||
1362 | 1658 | ||
1363 | for (i = 0; i < num_modes; i++) { | 1659 | return fbi->video_mem ? 0 : -ENOMEM; |
1364 | smemlen = modes[i].xres * modes[i].yres * modes[i].bpp / 8; | ||
1365 | if (smemlen > fbi->fb.fix.smem_len) | ||
1366 | fbi->fb.fix.smem_len = smemlen; | ||
1367 | } | ||
1368 | } | 1660 | } |
1369 | 1661 | ||
1370 | static void pxafb_decode_mach_info(struct pxafb_info *fbi, | 1662 | static void pxafb_decode_mach_info(struct pxafb_info *fbi, |
1371 | struct pxafb_mach_info *inf) | 1663 | struct pxafb_mach_info *inf) |
1372 | { | 1664 | { |
1373 | unsigned int lcd_conn = inf->lcd_conn; | 1665 | unsigned int lcd_conn = inf->lcd_conn; |
1666 | struct pxafb_mode_info *m; | ||
1667 | int i; | ||
1374 | 1668 | ||
1375 | fbi->cmap_inverse = inf->cmap_inverse; | 1669 | fbi->cmap_inverse = inf->cmap_inverse; |
1376 | fbi->cmap_static = inf->cmap_static; | 1670 | fbi->cmap_static = inf->cmap_static; |
1671 | fbi->lccr4 = inf->lccr4; | ||
1377 | 1672 | ||
1378 | switch (lcd_conn & LCD_TYPE_MASK) { | 1673 | switch (lcd_conn & LCD_TYPE_MASK) { |
1379 | case LCD_TYPE_MONO_STN: | 1674 | case LCD_TYPE_MONO_STN: |
@@ -1398,7 +1693,6 @@ static void pxafb_decode_mach_info(struct pxafb_info *fbi, | |||
1398 | /* fall back to backward compatibility way */ | 1693 | /* fall back to backward compatibility way */ |
1399 | fbi->lccr0 = inf->lccr0; | 1694 | fbi->lccr0 = inf->lccr0; |
1400 | fbi->lccr3 = inf->lccr3; | 1695 | fbi->lccr3 = inf->lccr3; |
1401 | fbi->lccr4 = inf->lccr4; | ||
1402 | goto decode_mode; | 1696 | goto decode_mode; |
1403 | } | 1697 | } |
1404 | 1698 | ||
@@ -1412,7 +1706,22 @@ static void pxafb_decode_mach_info(struct pxafb_info *fbi, | |||
1412 | fbi->lccr3 |= (lcd_conn & LCD_PCLK_EDGE_FALL) ? LCCR3_PCP : 0; | 1706 | fbi->lccr3 |= (lcd_conn & LCD_PCLK_EDGE_FALL) ? LCCR3_PCP : 0; |
1413 | 1707 | ||
1414 | decode_mode: | 1708 | decode_mode: |
1415 | pxafb_decode_mode_info(fbi, inf->modes, inf->num_modes); | 1709 | pxafb_setmode(&fbi->fb.var, &inf->modes[0]); |
1710 | |||
1711 | /* decide video memory size as follows: | ||
1712 | * 1. default to mode of maximum resolution | ||
1713 | * 2. allow platform to override | ||
1714 | * 3. allow module parameter to override | ||
1715 | */ | ||
1716 | for (i = 0, m = &inf->modes[0]; i < inf->num_modes; i++, m++) | ||
1717 | fbi->video_mem_size = max_t(size_t, fbi->video_mem_size, | ||
1718 | m->xres * m->yres * m->bpp / 8); | ||
1719 | |||
1720 | if (inf->video_mem_size > fbi->video_mem_size) | ||
1721 | fbi->video_mem_size = inf->video_mem_size; | ||
1722 | |||
1723 | if (video_mem_size > fbi->video_mem_size) | ||
1724 | fbi->video_mem_size = video_mem_size; | ||
1416 | } | 1725 | } |
1417 | 1726 | ||
1418 | static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | 1727 | static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) |
@@ -1429,7 +1738,7 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | |||
1429 | memset(fbi, 0, sizeof(struct pxafb_info)); | 1738 | memset(fbi, 0, sizeof(struct pxafb_info)); |
1430 | fbi->dev = dev; | 1739 | fbi->dev = dev; |
1431 | 1740 | ||
1432 | fbi->clk = clk_get(dev, "LCDCLK"); | 1741 | fbi->clk = clk_get(dev, NULL); |
1433 | if (IS_ERR(fbi->clk)) { | 1742 | if (IS_ERR(fbi->clk)) { |
1434 | kfree(fbi); | 1743 | kfree(fbi); |
1435 | return NULL; | 1744 | return NULL; |
@@ -1440,7 +1749,7 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | |||
1440 | fbi->fb.fix.type = FB_TYPE_PACKED_PIXELS; | 1749 | fbi->fb.fix.type = FB_TYPE_PACKED_PIXELS; |
1441 | fbi->fb.fix.type_aux = 0; | 1750 | fbi->fb.fix.type_aux = 0; |
1442 | fbi->fb.fix.xpanstep = 0; | 1751 | fbi->fb.fix.xpanstep = 0; |
1443 | fbi->fb.fix.ypanstep = 0; | 1752 | fbi->fb.fix.ypanstep = 1; |
1444 | fbi->fb.fix.ywrapstep = 0; | 1753 | fbi->fb.fix.ywrapstep = 0; |
1445 | fbi->fb.fix.accel = FB_ACCEL_NONE; | 1754 | fbi->fb.fix.accel = FB_ACCEL_NONE; |
1446 | 1755 | ||
@@ -1448,7 +1757,7 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | |||
1448 | fbi->fb.var.activate = FB_ACTIVATE_NOW; | 1757 | fbi->fb.var.activate = FB_ACTIVATE_NOW; |
1449 | fbi->fb.var.height = -1; | 1758 | fbi->fb.var.height = -1; |
1450 | fbi->fb.var.width = -1; | 1759 | fbi->fb.var.width = -1; |
1451 | fbi->fb.var.accel_flags = 0; | 1760 | fbi->fb.var.accel_flags = FB_ACCELF_TEXT; |
1452 | fbi->fb.var.vmode = FB_VMODE_NONINTERLACED; | 1761 | fbi->fb.var.vmode = FB_VMODE_NONINTERLACED; |
1453 | 1762 | ||
1454 | fbi->fb.fbops = &pxafb_ops; | 1763 | fbi->fb.fbops = &pxafb_ops; |
@@ -1468,10 +1777,6 @@ static struct pxafb_info * __devinit pxafb_init_fbinfo(struct device *dev) | |||
1468 | INIT_WORK(&fbi->task, pxafb_task); | 1777 | INIT_WORK(&fbi->task, pxafb_task); |
1469 | mutex_init(&fbi->ctrlr_lock); | 1778 | mutex_init(&fbi->ctrlr_lock); |
1470 | init_completion(&fbi->disable_done); | 1779 | init_completion(&fbi->disable_done); |
1471 | #ifdef CONFIG_FB_PXA_SMARTPANEL | ||
1472 | init_completion(&fbi->command_done); | ||
1473 | init_completion(&fbi->refresh_done); | ||
1474 | #endif | ||
1475 | 1780 | ||
1476 | return fbi; | 1781 | return fbi; |
1477 | } | 1782 | } |
@@ -1544,7 +1849,9 @@ static int __devinit parse_opt(struct device *dev, char *this_opt) | |||
1544 | 1849 | ||
1545 | s[0] = '\0'; | 1850 | s[0] = '\0'; |
1546 | 1851 | ||
1547 | if (!strncmp(this_opt, "mode:", 5)) { | 1852 | if (!strncmp(this_opt, "vmem:", 5)) { |
1853 | video_mem_size = memparse(this_opt + 5, NULL); | ||
1854 | } else if (!strncmp(this_opt, "mode:", 5)) { | ||
1548 | return parse_opt_mode(dev, this_opt); | 1855 | return parse_opt_mode(dev, this_opt); |
1549 | } else if (!strncmp(this_opt, "pixclock:", 9)) { | 1856 | } else if (!strncmp(this_opt, "pixclock:", 9)) { |
1550 | mode->pixclock = simple_strtoul(this_opt+9, NULL, 0); | 1857 | mode->pixclock = simple_strtoul(this_opt+9, NULL, 0); |
@@ -1748,8 +2055,7 @@ static int __devinit pxafb_probe(struct platform_device *dev) | |||
1748 | ret = -EINVAL; | 2055 | ret = -EINVAL; |
1749 | goto failed; | 2056 | goto failed; |
1750 | } | 2057 | } |
1751 | pxafb_backlight_power = inf->pxafb_backlight_power; | 2058 | |
1752 | pxafb_lcd_power = inf->pxafb_lcd_power; | ||
1753 | fbi = pxafb_init_fbinfo(&dev->dev); | 2059 | fbi = pxafb_init_fbinfo(&dev->dev); |
1754 | if (!fbi) { | 2060 | if (!fbi) { |
1755 | /* only reason for pxafb_init_fbinfo to fail is kmalloc */ | 2061 | /* only reason for pxafb_init_fbinfo to fail is kmalloc */ |
@@ -1758,6 +2064,9 @@ static int __devinit pxafb_probe(struct platform_device *dev) | |||
1758 | goto failed; | 2064 | goto failed; |
1759 | } | 2065 | } |
1760 | 2066 | ||
2067 | fbi->backlight_power = inf->pxafb_backlight_power; | ||
2068 | fbi->lcd_power = inf->pxafb_lcd_power; | ||
2069 | |||
1761 | r = platform_get_resource(dev, IORESOURCE_MEM, 0); | 2070 | r = platform_get_resource(dev, IORESOURCE_MEM, 0); |
1762 | if (r == NULL) { | 2071 | if (r == NULL) { |
1763 | dev_err(&dev->dev, "no I/O memory resource defined\n"); | 2072 | dev_err(&dev->dev, "no I/O memory resource defined\n"); |
@@ -1779,12 +2088,20 @@ static int __devinit pxafb_probe(struct platform_device *dev) | |||
1779 | goto failed_free_res; | 2088 | goto failed_free_res; |
1780 | } | 2089 | } |
1781 | 2090 | ||
1782 | /* Initialize video memory */ | 2091 | fbi->dma_buff_size = PAGE_ALIGN(sizeof(struct pxafb_dma_buff)); |
1783 | ret = pxafb_map_video_memory(fbi); | 2092 | fbi->dma_buff = dma_alloc_coherent(fbi->dev, fbi->dma_buff_size, |
2093 | &fbi->dma_buff_phys, GFP_KERNEL); | ||
2094 | if (fbi->dma_buff == NULL) { | ||
2095 | dev_err(&dev->dev, "failed to allocate memory for DMA\n"); | ||
2096 | ret = -ENOMEM; | ||
2097 | goto failed_free_io; | ||
2098 | } | ||
2099 | |||
2100 | ret = pxafb_init_video_memory(fbi); | ||
1784 | if (ret) { | 2101 | if (ret) { |
1785 | dev_err(&dev->dev, "Failed to allocate video RAM: %d\n", ret); | 2102 | dev_err(&dev->dev, "Failed to allocate video RAM: %d\n", ret); |
1786 | ret = -ENOMEM; | 2103 | ret = -ENOMEM; |
1787 | goto failed_free_io; | 2104 | goto failed_free_dma; |
1788 | } | 2105 | } |
1789 | 2106 | ||
1790 | irq = platform_get_irq(dev, 0); | 2107 | irq = platform_get_irq(dev, 0); |
@@ -1801,13 +2118,12 @@ static int __devinit pxafb_probe(struct platform_device *dev) | |||
1801 | goto failed_free_mem; | 2118 | goto failed_free_mem; |
1802 | } | 2119 | } |
1803 | 2120 | ||
1804 | #ifdef CONFIG_FB_PXA_SMARTPANEL | ||
1805 | ret = pxafb_smart_init(fbi); | 2121 | ret = pxafb_smart_init(fbi); |
1806 | if (ret) { | 2122 | if (ret) { |
1807 | dev_err(&dev->dev, "failed to initialize smartpanel\n"); | 2123 | dev_err(&dev->dev, "failed to initialize smartpanel\n"); |
1808 | goto failed_free_irq; | 2124 | goto failed_free_irq; |
1809 | } | 2125 | } |
1810 | #endif | 2126 | |
1811 | /* | 2127 | /* |
1812 | * This makes sure that our colour bitfield | 2128 | * This makes sure that our colour bitfield |
1813 | * descriptors are correctly initialised. | 2129 | * descriptors are correctly initialised. |
@@ -1833,6 +2149,8 @@ static int __devinit pxafb_probe(struct platform_device *dev) | |||
1833 | goto failed_free_cmap; | 2149 | goto failed_free_cmap; |
1834 | } | 2150 | } |
1835 | 2151 | ||
2152 | pxafb_overlay_init(fbi); | ||
2153 | |||
1836 | #ifdef CONFIG_CPU_FREQ | 2154 | #ifdef CONFIG_CPU_FREQ |
1837 | fbi->freq_transition.notifier_call = pxafb_freq_transition; | 2155 | fbi->freq_transition.notifier_call = pxafb_freq_transition; |
1838 | fbi->freq_policy.notifier_call = pxafb_freq_policy; | 2156 | fbi->freq_policy.notifier_call = pxafb_freq_policy; |
@@ -1855,8 +2173,10 @@ failed_free_cmap: | |||
1855 | failed_free_irq: | 2173 | failed_free_irq: |
1856 | free_irq(irq, fbi); | 2174 | free_irq(irq, fbi); |
1857 | failed_free_mem: | 2175 | failed_free_mem: |
1858 | dma_free_writecombine(&dev->dev, fbi->map_size, | 2176 | free_pages_exact(fbi->video_mem, fbi->video_mem_size); |
1859 | fbi->map_cpu, fbi->map_dma); | 2177 | failed_free_dma: |
2178 | dma_free_coherent(&dev->dev, fbi->dma_buff_size, | ||
2179 | fbi->dma_buff, fbi->dma_buff_phys); | ||
1860 | failed_free_io: | 2180 | failed_free_io: |
1861 | iounmap(fbi->mmio_base); | 2181 | iounmap(fbi->mmio_base); |
1862 | failed_free_res: | 2182 | failed_free_res: |
@@ -1881,6 +2201,7 @@ static int __devexit pxafb_remove(struct platform_device *dev) | |||
1881 | 2201 | ||
1882 | info = &fbi->fb; | 2202 | info = &fbi->fb; |
1883 | 2203 | ||
2204 | pxafb_overlay_exit(fbi); | ||
1884 | unregister_framebuffer(info); | 2205 | unregister_framebuffer(info); |
1885 | 2206 | ||
1886 | pxafb_disable_controller(fbi); | 2207 | pxafb_disable_controller(fbi); |
@@ -1891,8 +2212,10 @@ static int __devexit pxafb_remove(struct platform_device *dev) | |||
1891 | irq = platform_get_irq(dev, 0); | 2212 | irq = platform_get_irq(dev, 0); |
1892 | free_irq(irq, fbi); | 2213 | free_irq(irq, fbi); |
1893 | 2214 | ||
1894 | dma_free_writecombine(&dev->dev, fbi->map_size, | 2215 | free_pages_exact(fbi->video_mem, fbi->video_mem_size); |
1895 | fbi->map_cpu, fbi->map_dma); | 2216 | |
2217 | dma_free_writecombine(&dev->dev, fbi->dma_buff_size, | ||
2218 | fbi->dma_buff, fbi->dma_buff_phys); | ||
1896 | 2219 | ||
1897 | iounmap(fbi->mmio_base); | 2220 | iounmap(fbi->mmio_base); |
1898 | 2221 | ||
diff --git a/drivers/video/pxafb.h b/drivers/video/pxafb.h index 31541b86f13d..2353521c5c8c 100644 --- a/drivers/video/pxafb.h +++ b/drivers/video/pxafb.h | |||
@@ -54,11 +54,55 @@ enum { | |||
54 | #define PALETTE_SIZE (256 * 4) | 54 | #define PALETTE_SIZE (256 * 4) |
55 | #define CMD_BUFF_SIZE (1024 * 50) | 55 | #define CMD_BUFF_SIZE (1024 * 50) |
56 | 56 | ||
57 | /* NOTE: the palette and frame dma descriptors are doubled to allow | ||
58 | * the 2nd set for branch settings (FBRx) | ||
59 | */ | ||
57 | struct pxafb_dma_buff { | 60 | struct pxafb_dma_buff { |
58 | unsigned char palette[PAL_MAX * PALETTE_SIZE]; | 61 | unsigned char palette[PAL_MAX * PALETTE_SIZE]; |
59 | uint16_t cmd_buff[CMD_BUFF_SIZE]; | 62 | uint16_t cmd_buff[CMD_BUFF_SIZE]; |
60 | struct pxafb_dma_descriptor pal_desc[PAL_MAX]; | 63 | struct pxafb_dma_descriptor pal_desc[PAL_MAX * 2]; |
61 | struct pxafb_dma_descriptor dma_desc[DMA_MAX]; | 64 | struct pxafb_dma_descriptor dma_desc[DMA_MAX * 2]; |
65 | }; | ||
66 | |||
67 | enum { | ||
68 | OVERLAY1, | ||
69 | OVERLAY2, | ||
70 | }; | ||
71 | |||
72 | enum { | ||
73 | OVERLAY_FORMAT_RGB = 0, | ||
74 | OVERLAY_FORMAT_YUV444_PACKED, | ||
75 | OVERLAY_FORMAT_YUV444_PLANAR, | ||
76 | OVERLAY_FORMAT_YUV422_PLANAR, | ||
77 | OVERLAY_FORMAT_YUV420_PLANAR, | ||
78 | }; | ||
79 | |||
80 | #define NONSTD_TO_XPOS(x) (((x) >> 0) & 0x3ff) | ||
81 | #define NONSTD_TO_YPOS(x) (((x) >> 10) & 0x3ff) | ||
82 | #define NONSTD_TO_PFOR(x) (((x) >> 20) & 0x7) | ||
83 | |||
84 | struct pxafb_layer; | ||
85 | |||
86 | struct pxafb_layer_ops { | ||
87 | void (*enable)(struct pxafb_layer *); | ||
88 | void (*disable)(struct pxafb_layer *); | ||
89 | void (*setup)(struct pxafb_layer *); | ||
90 | }; | ||
91 | |||
92 | struct pxafb_layer { | ||
93 | struct fb_info fb; | ||
94 | int id; | ||
95 | atomic_t usage; | ||
96 | uint32_t control[2]; | ||
97 | |||
98 | struct pxafb_layer_ops *ops; | ||
99 | |||
100 | void __iomem *video_mem; | ||
101 | unsigned long video_mem_phys; | ||
102 | size_t video_mem_size; | ||
103 | struct completion branch_done; | ||
104 | |||
105 | struct pxafb_info *fbi; | ||
62 | }; | 106 | }; |
63 | 107 | ||
64 | struct pxafb_info { | 108 | struct pxafb_info { |
@@ -69,24 +113,15 @@ struct pxafb_info { | |||
69 | void __iomem *mmio_base; | 113 | void __iomem *mmio_base; |
70 | 114 | ||
71 | struct pxafb_dma_buff *dma_buff; | 115 | struct pxafb_dma_buff *dma_buff; |
116 | size_t dma_buff_size; | ||
72 | dma_addr_t dma_buff_phys; | 117 | dma_addr_t dma_buff_phys; |
73 | dma_addr_t fdadr[DMA_MAX]; | 118 | dma_addr_t fdadr[DMA_MAX * 2]; |
74 | 119 | ||
75 | /* | 120 | void __iomem *video_mem; /* virtual address of frame buffer */ |
76 | * These are the addresses we mapped | 121 | unsigned long video_mem_phys; /* physical address of frame buffer */ |
77 | * the framebuffer memory region to. | 122 | size_t video_mem_size; /* size of the frame buffer */ |
78 | */ | ||
79 | /* raw memory addresses */ | ||
80 | dma_addr_t map_dma; /* physical */ | ||
81 | u_char * map_cpu; /* virtual */ | ||
82 | u_int map_size; | ||
83 | |||
84 | /* addresses of pieces placed in raw buffer */ | ||
85 | u_char * screen_cpu; /* virtual address of frame buffer */ | ||
86 | dma_addr_t screen_dma; /* physical address of frame buffer */ | ||
87 | u16 * palette_cpu; /* virtual address of palette memory */ | 123 | u16 * palette_cpu; /* virtual address of palette memory */ |
88 | u_int palette_size; | 124 | u_int palette_size; |
89 | ssize_t video_offset; | ||
90 | 125 | ||
91 | u_int lccr0; | 126 | u_int lccr0; |
92 | u_int lccr3; | 127 | u_int lccr3; |
@@ -120,10 +155,17 @@ struct pxafb_info { | |||
120 | struct task_struct *smart_thread; | 155 | struct task_struct *smart_thread; |
121 | #endif | 156 | #endif |
122 | 157 | ||
158 | #ifdef CONFIG_FB_PXA_OVERLAY | ||
159 | struct pxafb_layer overlay[2]; | ||
160 | #endif | ||
161 | |||
123 | #ifdef CONFIG_CPU_FREQ | 162 | #ifdef CONFIG_CPU_FREQ |
124 | struct notifier_block freq_transition; | 163 | struct notifier_block freq_transition; |
125 | struct notifier_block freq_policy; | 164 | struct notifier_block freq_policy; |
126 | #endif | 165 | #endif |
166 | |||
167 | void (*lcd_power)(int, struct fb_var_screeninfo *); | ||
168 | void (*backlight_power)(int); | ||
127 | }; | 169 | }; |
128 | 170 | ||
129 | #define TO_INF(ptr,member) container_of(ptr,struct pxafb_info,member) | 171 | #define TO_INF(ptr,member) container_of(ptr,struct pxafb_info,member) |
@@ -148,4 +190,10 @@ struct pxafb_info { | |||
148 | #define MIN_XRES 64 | 190 | #define MIN_XRES 64 |
149 | #define MIN_YRES 64 | 191 | #define MIN_YRES 64 |
150 | 192 | ||
193 | /* maximum X and Y resolutions - note these are limits from the register | ||
194 | * bits length instead of the real ones | ||
195 | */ | ||
196 | #define MAX_XRES 1024 | ||
197 | #define MAX_YRES 1024 | ||
198 | |||
151 | #endif /* __PXAFB_H__ */ | 199 | #endif /* __PXAFB_H__ */ |
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index c052bd4c0b06..076f946fa0f5 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -114,7 +114,7 @@ | |||
114 | * - convert dma address types to dma_addr_t | 114 | * - convert dma address types to dma_addr_t |
115 | * - remove unused 'montype' stuff | 115 | * - remove unused 'montype' stuff |
116 | * - remove redundant zero inits of init_var after the initial | 116 | * - remove redundant zero inits of init_var after the initial |
117 | * memzero. | 117 | * memset. |
118 | * - remove allow_modeset (acornfb idea does not belong here) | 118 | * - remove allow_modeset (acornfb idea does not belong here) |
119 | * | 119 | * |
120 | * 2001/05/28: <rmk@arm.linux.org.uk> | 120 | * 2001/05/28: <rmk@arm.linux.org.uk> |
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index f7f6ce82a5e2..e31925ee8346 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #undef S3C_VA_WATCHDOG | 42 | #undef S3C_VA_WATCHDOG |
43 | #define S3C_VA_WATCHDOG (0) | 43 | #define S3C_VA_WATCHDOG (0) |
44 | 44 | ||
45 | #include <asm/plat-s3c/regs-watchdog.h> | 45 | #include <plat/regs-watchdog.h> |
46 | 46 | ||
47 | #define PFX "s3c2410-wdt: " | 47 | #define PFX "s3c2410-wdt: " |
48 | 48 | ||
diff --git a/drivers/watchdog/sa1100_wdt.c b/drivers/watchdog/sa1100_wdt.c index ed01e4c2beff..e19b45794717 100644 --- a/drivers/watchdog/sa1100_wdt.c +++ b/drivers/watchdog/sa1100_wdt.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/bitops.h> | 28 | #include <linux/bitops.h> |
29 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
30 | #include <linux/timex.h> | ||
30 | 31 | ||
31 | #ifdef CONFIG_ARCH_PXA | 32 | #ifdef CONFIG_ARCH_PXA |
32 | #include <mach/pxa-regs.h> | 33 | #include <mach/pxa-regs.h> |
@@ -35,8 +36,7 @@ | |||
35 | #include <mach/reset.h> | 36 | #include <mach/reset.h> |
36 | #include <mach/hardware.h> | 37 | #include <mach/hardware.h> |
37 | 38 | ||
38 | #define OSCR_FREQ CLOCK_TICK_RATE | 39 | static unsigned long oscr_freq; |
39 | |||
40 | static unsigned long sa1100wdt_users; | 40 | static unsigned long sa1100wdt_users; |
41 | static int pre_margin; | 41 | static int pre_margin; |
42 | static int boot_status; | 42 | static int boot_status; |
@@ -123,12 +123,12 @@ static long sa1100dog_ioctl(struct file *file, unsigned int cmd, | |||
123 | break; | 123 | break; |
124 | } | 124 | } |
125 | 125 | ||
126 | pre_margin = OSCR_FREQ * time; | 126 | pre_margin = oscr_freq * time; |
127 | OSMR3 = OSCR + pre_margin; | 127 | OSMR3 = OSCR + pre_margin; |
128 | /*fall through*/ | 128 | /*fall through*/ |
129 | 129 | ||
130 | case WDIOC_GETTIMEOUT: | 130 | case WDIOC_GETTIMEOUT: |
131 | ret = put_user(pre_margin / OSCR_FREQ, p); | 131 | ret = put_user(pre_margin / oscr_freq, p); |
132 | break; | 132 | break; |
133 | } | 133 | } |
134 | return ret; | 134 | return ret; |
@@ -155,6 +155,8 @@ static int __init sa1100dog_init(void) | |||
155 | { | 155 | { |
156 | int ret; | 156 | int ret; |
157 | 157 | ||
158 | oscr_freq = get_clock_tick_rate(); | ||
159 | |||
158 | /* | 160 | /* |
159 | * Read the reset status, and save it for later. If | 161 | * Read the reset status, and save it for later. If |
160 | * we suspend, RCSR will be cleared, and the watchdog | 162 | * we suspend, RCSR will be cleared, and the watchdog |
@@ -162,7 +164,7 @@ static int __init sa1100dog_init(void) | |||
162 | */ | 164 | */ |
163 | boot_status = (reset_status & RESET_STATUS_WATCHDOG) ? | 165 | boot_status = (reset_status & RESET_STATUS_WATCHDOG) ? |
164 | WDIOF_CARDRESET : 0; | 166 | WDIOF_CARDRESET : 0; |
165 | pre_margin = OSCR_FREQ * margin; | 167 | pre_margin = oscr_freq * margin; |
166 | 168 | ||
167 | ret = misc_register(&sa1100dog_miscdev); | 169 | ret = misc_register(&sa1100dog_miscdev); |
168 | if (ret == 0) | 170 | if (ret == 0) |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 4e4f1277f3bf..feb3b939ec4b 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -158,6 +158,8 @@ | |||
158 | /* SH-SCI */ | 158 | /* SH-SCI */ |
159 | #define PORT_SCIFA 83 | 159 | #define PORT_SCIFA 83 |
160 | 160 | ||
161 | #define PORT_S3C6400 84 | ||
162 | |||
161 | #ifdef __KERNEL__ | 163 | #ifdef __KERNEL__ |
162 | 164 | ||
163 | #include <linux/compiler.h> | 165 | #include <linux/compiler.h> |
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c index 34c1d94f921e..ef6539eea579 100644 --- a/sound/arm/pxa2xx-ac97-lib.c +++ b/sound/arm/pxa2xx-ac97-lib.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
24 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
25 | #include <mach/pxa-regs.h> | 25 | #include <mach/regs-ac97.h> |
26 | #include <mach/pxa2xx-gpio.h> | 26 | #include <mach/pxa2xx-gpio.h> |
27 | #include <mach/audio.h> | 27 | #include <mach/audio.h> |
28 | 28 | ||
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index c2635beb4c88..85cf591d4e11 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
24 | #include <mach/pxa-regs.h> | 24 | #include <mach/pxa-regs.h> |
25 | #include <mach/regs-ac97.h> | ||
25 | #include <mach/audio.h> | 26 | #include <mach/audio.h> |
26 | 27 | ||
27 | #include "pxa2xx-pcm.h" | 28 | #include "pxa2xx-pcm.h" |
diff --git a/sound/arm/pxa2xx-pcm.h b/sound/arm/pxa2xx-pcm.h index 5c4a4d38a083..65f86b56ba42 100644 --- a/sound/arm/pxa2xx-pcm.h +++ b/sound/arm/pxa2xx-pcm.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * it under the terms of the GNU General Public License version 2 as | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | #include <asm/dma.h> | 12 | #include <mach/dma.h> |
13 | 13 | ||
14 | struct pxa2xx_runtime_data { | 14 | struct pxa2xx_runtime_data { |
15 | int dma_ch; | 15 | int dma_ch; |
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c index c47842fad657..2c63bb9da74a 100644 --- a/sound/oss/waveartist.c +++ b/sound/oss/waveartist.c | |||
@@ -1483,16 +1483,14 @@ static void __exit unload_waveartist(struct address_info *hw) | |||
1483 | #define VNC_HANDSET_DETECT 0x40 | 1483 | #define VNC_HANDSET_DETECT 0x40 |
1484 | #define VNC_DISABLE_AUTOSWITCH 0x80 | 1484 | #define VNC_DISABLE_AUTOSWITCH 0x80 |
1485 | 1485 | ||
1486 | extern spinlock_t gpio_lock; | ||
1487 | |||
1488 | static inline void | 1486 | static inline void |
1489 | vnc_mute_spkr(wavnc_info *devc) | 1487 | vnc_mute_spkr(wavnc_info *devc) |
1490 | { | 1488 | { |
1491 | unsigned long flags; | 1489 | unsigned long flags; |
1492 | 1490 | ||
1493 | spin_lock_irqsave(&gpio_lock, flags); | 1491 | spin_lock_irqsave(&nw_gpio_lock, flags); |
1494 | cpld_modify(CPLD_UNMUTE, devc->spkr_mute_state ? 0 : CPLD_UNMUTE); | 1492 | nw_cpld_modify(CPLD_UNMUTE, devc->spkr_mute_state ? 0 : CPLD_UNMUTE); |
1495 | spin_unlock_irqrestore(&gpio_lock, flags); | 1493 | spin_unlock_irqrestore(&nw_gpio_lock, flags); |
1496 | } | 1494 | } |
1497 | 1495 | ||
1498 | static void | 1496 | static void |
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c index 780db6757ad2..812c2b4d3e07 100644 --- a/sound/soc/pxa/pxa2xx-ac97.c +++ b/sound/soc/pxa/pxa2xx-ac97.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include <mach/hardware.h> | 22 | #include <mach/hardware.h> |
23 | #include <mach/pxa-regs.h> | 23 | #include <mach/pxa-regs.h> |
24 | #include <mach/regs-ac97.h> | ||
24 | 25 | ||
25 | #include "pxa2xx-pcm.h" | 26 | #include "pxa2xx-pcm.h" |
26 | #include "pxa2xx-ac97.h" | 27 | #include "pxa2xx-ac97.h" |
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c index 1bfce40bb2e4..5822d2dd49ba 100644 --- a/sound/soc/s3c24xx/s3c2443-ac97.c +++ b/sound/soc/s3c24xx/s3c2443-ac97.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <sound/soc.h> | 28 | #include <sound/soc.h> |
29 | 29 | ||
30 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
31 | #include <asm/plat-s3c/regs-ac97.h> | 31 | #include <plat/regs-ac97.h> |
32 | #include <mach/regs-gpio.h> | 32 | #include <mach/regs-gpio.h> |
33 | #include <mach/regs-clock.h> | 33 | #include <mach/regs-clock.h> |
34 | #include <mach/audio.h> | 34 | #include <mach/audio.h> |