13 #include <linux/module.h>
14 #include <linux/kernel.h>
23 #include <video/sa1100fb.h>
25 #include <asm/div64.h>
29 #include <asm/system_misc.h>
31 #include <mach/hardware.h>
32 #include <mach/irqs.h>
44 static const unsigned short cclk_frequency_100khz[
NR_FREQS] = {
71 if (cclk_frequency_100khz[i] >= khz)
79 unsigned int freq = 0;
81 freq = cclk_frequency_100khz[
idx] * 100;
95 cpufreq_verify_within_limits(policy, policy->
cpuinfo.min_freq, policy->
cpuinfo.max_freq);
99 if (tmp > policy->
max)
102 cpufreq_verify_within_limits(policy, policy->
cpuinfo.min_freq, policy->
cpuinfo.max_freq);
111 return cclk_frequency_100khz[
PPCR & 0xf] * 100;
117 static void sa1100_power_off(
void)
156 static struct resource sa11x0udc_resources[] = {
161 static u64 sa11x0udc_dma_mask = 0xffffffff
UL;
164 .name =
"sa11x0-udc",
167 .dma_mask = &sa11x0udc_dma_mask,
168 .coherent_dma_mask = 0xffffffff,
170 .num_resources =
ARRAY_SIZE(sa11x0udc_resources),
171 .resource = sa11x0udc_resources,
174 static struct resource sa11x0uart1_resources[] = {
180 .name =
"sa11x0-uart",
182 .num_resources =
ARRAY_SIZE(sa11x0uart1_resources),
183 .resource = sa11x0uart1_resources,
186 static struct resource sa11x0uart3_resources[] = {
192 .name =
"sa11x0-uart",
194 .num_resources =
ARRAY_SIZE(sa11x0uart3_resources),
195 .resource = sa11x0uart3_resources,
198 static struct resource sa11x0mcp_resources[] = {
204 static u64 sa11x0mcp_dma_mask = 0xffffffff
UL;
207 .name =
"sa11x0-mcp",
210 .dma_mask = &sa11x0mcp_dma_mask,
211 .coherent_dma_mask = 0xffffffff,
213 .num_resources =
ARRAY_SIZE(sa11x0mcp_resources),
214 .resource = sa11x0mcp_resources,
229 sa11x0_register_device(&sa11x0mcp_device, data);
232 static struct resource sa11x0ssp_resources[] = {
237 static u64 sa11x0ssp_dma_mask = 0xffffffff
UL;
240 .name =
"sa11x0-ssp",
243 .dma_mask = &sa11x0ssp_dma_mask,
244 .coherent_dma_mask = 0xffffffff,
246 .num_resources =
ARRAY_SIZE(sa11x0ssp_resources),
247 .resource = sa11x0ssp_resources,
250 static struct resource sa11x0fb_resources[] = {
259 .coherent_dma_mask = 0xffffffff,
261 .num_resources =
ARRAY_SIZE(sa11x0fb_resources),
262 .resource = sa11x0fb_resources,
267 sa11x0_register_device(&sa11x0fb_device, inf);
271 .name =
"sa11x0-pcmcia",
276 .name =
"sa1100-mtd",
283 flash->
name =
"sa1100";
286 sa11x0_register_device(&sa11x0mtd_device, flash);
289 static struct resource sa11x0ir_resources[] = {
299 .num_resources =
ARRAY_SIZE(sa11x0ir_resources),
300 .resource = sa11x0ir_resources,
305 sa11x0_register_device(&sa11x0ir_device, irda);
308 static struct resource sa1100_rtc_resources[] = {
315 .name =
"sa1100-rtc",
317 .num_resources =
ARRAY_SIZE(sa1100_rtc_resources),
318 .resource = sa1100_rtc_resources,
321 static struct resource sa11x0dma_resources[] = {
334 .name =
"sa11x0-dma",
337 .dma_mask = &sa11x0dma_dma_mask,
338 .coherent_dma_mask = 0xffffffff,
340 .num_resources =
ARRAY_SIZE(sa11x0dma_resources),
341 .resource = sa11x0dma_resources,
349 &sa11x0pcmcia_device,
354 static int __init sa1100_init(
void)
385 static struct map_desc standard_io_desc[] __initdata = {
389 .length = 0x00100000,
392 .virtual = 0xfa000000,
394 .length = 0x00100000,
397 .virtual = 0xfc000000,
399 .length = 0x00100000,
402 .virtual = 0xfe000000,
404 .length = 0x00200000,