aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-06 19:58:11 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-06 19:58:11 -0500
commitb54a063df48cb1296f744b5ba456c45ce7efff35 (patch)
tree72e71bfb6008f460f887a208d046cd82e5545ff5 /arch/arm/mach-pxa
parent085f20e481190cd0597d72ec49bffc07bda4c9be (diff)
parent1555972231f3202f00e04f7c42d2db858e11b874 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/Kconfig9
-rw-r--r--arch/arm/mach-pxa/Makefile1
-rw-r--r--arch/arm/mach-pxa/pm.c16
-rw-r--r--arch/arm/mach-pxa/tosa.c162
4 files changed, 182 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 3e5f69bb5ac4..b380a438e68f 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -27,7 +27,8 @@ config PXA_SHARPSL
27 Say Y here if you intend to run this kernel on a 27 Say Y here if you intend to run this kernel on a
28 Sharp Zaurus SL-5600 (Poodle), SL-C700 (Corgi), 28 Sharp Zaurus SL-5600 (Poodle), SL-C700 (Corgi),
29 SL-C750 (Shepherd), SL-C760 (Husky), SL-C1000 (Akita), 29 SL-C750 (Shepherd), SL-C760 (Husky), SL-C1000 (Akita),
30 SL-C3000 (Spitz) or SL-C3100 (Borzoi) handheld computer. 30 SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa)
31 handheld computer.
31 32
32endchoice 33endchoice
33 34
@@ -37,7 +38,7 @@ choice
37 prompt "Select target Sharp Zaurus device range" 38 prompt "Select target Sharp Zaurus device range"
38 39
39config PXA_SHARPSL_25x 40config PXA_SHARPSL_25x
40 bool "Sharp PXA25x models (SL-5600 and SL-C7xx)" 41 bool "Sharp PXA25x models (SL-5600, SL-C7xx and SL-C6000x)"
41 select PXA25x 42 select PXA25x
42 43
43config PXA_SHARPSL_27x 44config PXA_SHARPSL_27x
@@ -80,6 +81,10 @@ config MACH_BORZOI
80 depends PXA_SHARPSL_27x 81 depends PXA_SHARPSL_27x
81 select PXA_SHARP_Cxx00 82 select PXA_SHARP_Cxx00
82 83
84config MACH_TOSA
85 bool "Enable Sharp SL-6000x (Tosa) Support"
86 depends PXA_SHARPSL
87
83config PXA25x 88config PXA25x
84 bool 89 bool
85 help 90 help
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index f609a0f232cb..8bc72d07cea8 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
14obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o ssp.o 14obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o ssp.o
15obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o ssp.o 15obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o ssp.o
16obj-$(CONFIG_MACH_POODLE) += poodle.o 16obj-$(CONFIG_MACH_POODLE) += poodle.o
17obj-$(CONFIG_MACH_TOSA) += tosa.o
17 18
18# Support for blinky lights 19# Support for blinky lights
19led-y := leds.o 20led-y := leds.o
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index ac4dd4336160..f74b9af112dc 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -12,6 +12,7 @@
12 */ 12 */
13#include <linux/config.h> 13#include <linux/config.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/module.h>
15#include <linux/suspend.h> 16#include <linux/suspend.h>
16#include <linux/errno.h> 17#include <linux/errno.h>
17#include <linux/time.h> 18#include <linux/time.h>
@@ -19,6 +20,7 @@
19#include <asm/hardware.h> 20#include <asm/hardware.h>
20#include <asm/memory.h> 21#include <asm/memory.h>
21#include <asm/system.h> 22#include <asm/system.h>
23#include <asm/arch/pm.h>
22#include <asm/arch/pxa-regs.h> 24#include <asm/arch/pxa-regs.h>
23#include <asm/arch/lubbock.h> 25#include <asm/arch/lubbock.h>
24#include <asm/mach/time.h> 26#include <asm/mach/time.h>
@@ -72,7 +74,7 @@ enum { SLEEP_SAVE_START = 0,
72}; 74};
73 75
74 76
75static int pxa_pm_enter(suspend_state_t state) 77int pxa_pm_enter(suspend_state_t state)
76{ 78{
77 unsigned long sleep_save[SLEEP_SAVE_SIZE]; 79 unsigned long sleep_save[SLEEP_SAVE_SIZE];
78 unsigned long checksum = 0; 80 unsigned long checksum = 0;
@@ -191,6 +193,8 @@ static int pxa_pm_enter(suspend_state_t state)
191 return 0; 193 return 0;
192} 194}
193 195
196EXPORT_SYMBOL_GPL(pxa_pm_enter);
197
194unsigned long sleep_phys_sp(void *sp) 198unsigned long sleep_phys_sp(void *sp)
195{ 199{
196 return virt_to_phys(sp); 200 return virt_to_phys(sp);
@@ -199,21 +203,25 @@ unsigned long sleep_phys_sp(void *sp)
199/* 203/*
200 * Called after processes are frozen, but before we shut down devices. 204 * Called after processes are frozen, but before we shut down devices.
201 */ 205 */
202static int pxa_pm_prepare(suspend_state_t state) 206int pxa_pm_prepare(suspend_state_t state)
203{ 207{
204 extern int pxa_cpu_pm_prepare(suspend_state_t state); 208 extern int pxa_cpu_pm_prepare(suspend_state_t state);
205 209
206 return pxa_cpu_pm_prepare(state); 210 return pxa_cpu_pm_prepare(state);
207} 211}
208 212
213EXPORT_SYMBOL_GPL(pxa_pm_prepare);
214
209/* 215/*
210 * Called after devices are re-setup, but before processes are thawed. 216 * Called after devices are re-setup, but before processes are thawed.
211 */ 217 */
212static int pxa_pm_finish(suspend_state_t state) 218int pxa_pm_finish(suspend_state_t state)
213{ 219{
214 return 0; 220 return 0;
215} 221}
216 222
223EXPORT_SYMBOL_GPL(pxa_pm_finish);
224
217/* 225/*
218 * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk. 226 * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
219 */ 227 */
@@ -230,4 +238,4 @@ static int __init pxa_pm_init(void)
230 return 0; 238 return 0;
231} 239}
232 240
233late_initcall(pxa_pm_init); 241device_initcall(pxa_pm_init);
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
new file mode 100644
index 000000000000..400609f8b6a8
--- /dev/null
+++ b/arch/arm/mach-pxa/tosa.c
@@ -0,0 +1,162 @@
1/*
2 * Support for Sharp SL-C6000x PDAs
3 * Model: (Tosa)
4 *
5 * Copyright (c) 2005 Dirk Opfer
6 *
7 * Based on code written by Sharp/Lineo for 2.4 kernels
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
15#include <linux/kernel.h>
16#include <linux/init.h>
17#include <linux/device.h>
18#include <linux/major.h>
19#include <linux/fs.h>
20#include <linux/interrupt.h>
21#include <linux/mmc/host.h>
22
23#include <asm/setup.h>
24#include <asm/memory.h>
25#include <asm/mach-types.h>
26#include <asm/hardware.h>
27#include <asm/irq.h>
28#include <asm/arch/irda.h>
29#include <asm/arch/mmc.h>
30#include <asm/arch/udc.h>
31
32#include <asm/mach/arch.h>
33#include <asm/mach/map.h>
34#include <asm/mach/irq.h>
35
36#include <asm/arch/pxa-regs.h>
37#include <asm/arch/irq.h>
38#include <asm/arch/tosa.h>
39
40#include <asm/hardware/scoop.h>
41#include <asm/mach/sharpsl_param.h>
42
43#include "generic.h"
44
45
46/*
47 * SCOOP Device
48 */
49static struct resource tosa_scoop_resources[] = {
50 [0] = {
51 .start = TOSA_CF_PHYS,
52 .end = TOSA_CF_PHYS + 0xfff,
53 .flags = IORESOURCE_MEM,
54 },
55};
56
57static struct scoop_config tosa_scoop_setup = {
58 .io_dir = TOSA_SCOOP_IO_DIR,
59 .io_out = TOSA_SCOOP_IO_OUT,
60
61};
62
63struct platform_device tosascoop_device = {
64 .name = "sharp-scoop",
65 .id = 0,
66 .dev = {
67 .platform_data = &tosa_scoop_setup,
68 },
69 .num_resources = ARRAY_SIZE(tosa_scoop_resources),
70 .resource = tosa_scoop_resources,
71};
72
73
74/*
75 * SCOOP Device Jacket
76 */
77static struct resource tosa_scoop_jc_resources[] = {
78 [0] = {
79 .start = TOSA_SCOOP_PHYS + 0x40,
80 .end = TOSA_SCOOP_PHYS + 0xfff,
81 .flags = IORESOURCE_MEM,
82 },
83};
84
85static struct scoop_config tosa_scoop_jc_setup = {
86 .io_dir = TOSA_SCOOP_JC_IO_DIR,
87 .io_out = TOSA_SCOOP_JC_IO_OUT,
88};
89
90struct platform_device tosascoop_jc_device = {
91 .name = "sharp-scoop",
92 .id = 1,
93 .dev = {
94 .platform_data = &tosa_scoop_jc_setup,
95 .parent = &tosascoop_device.dev,
96 },
97 .num_resources = ARRAY_SIZE(tosa_scoop_jc_resources),
98 .resource = tosa_scoop_jc_resources,
99};
100
101static struct scoop_pcmcia_dev tosa_pcmcia_scoop[] = {
102{
103 .dev = &tosascoop_device.dev,
104 .irq = TOSA_IRQ_GPIO_CF_IRQ,
105 .cd_irq = TOSA_IRQ_GPIO_CF_CD,
106 .cd_irq_str = "PCMCIA0 CD",
107},{
108 .dev = &tosascoop_jc_device.dev,
109 .irq = TOSA_IRQ_GPIO_JC_CF_IRQ,
110 .cd_irq = -1,
111},
112};
113
114
115static struct platform_device *devices[] __initdata = {
116 &tosascoop_device,
117 &tosascoop_jc_device,
118};
119
120static void __init tosa_init(void)
121{
122 pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
123 pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN);
124
125 /* setup sleep mode values */
126 PWER = 0x00000002;
127 PFER = 0x00000000;
128 PRER = 0x00000002;
129 PGSR0 = 0x00000000;
130 PGSR1 = 0x00FF0002;
131 PGSR2 = 0x00014000;
132 PCFR |= PCFR_OPDE;
133
134 // enable batt_fault
135 PMCR = 0x01;
136
137 platform_add_devices(devices, ARRAY_SIZE(devices));
138
139 scoop_num = 2;
140 scoop_devs = &tosa_pcmcia_scoop[0];
141}
142
143static void __init fixup_tosa(struct machine_desc *desc,
144 struct tag *tags, char **cmdline, struct meminfo *mi)
145{
146 sharpsl_save_param();
147 mi->nr_banks=1;
148 mi->bank[0].start = 0xa0000000;
149 mi->bank[0].node = 0;
150 mi->bank[0].size = (64*1024*1024);
151}
152
153MACHINE_START(TOSA, "SHARP Tosa")
154 .phys_ram = 0xa0000000,
155 .phys_io = 0x40000000,
156 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
157 .fixup = fixup_tosa,
158 .map_io = pxa_map_io,
159 .init_irq = pxa_init_irq,
160 .init_machine = tosa_init,
161 .timer = &pxa_timer,
162MACHINE_END