aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 20:52:36 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 20:52:36 -0400
commit050335db2a777ffaa859d77beb05fffe9e8c5ae9 (patch)
tree6f1fb3e3477de613b4adac8c46bd6e86301ed8ae
parenta4cfae13cef6a700a04b13ba1d819c0641b1b26f (diff)
parent905f14672e6d0552bfde954d5f7adb5f2c7a7960 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (42 commits) [ARM] Fix tosa build error [ARM] 3610/1: Make reboot work on Versatile [ARM] 3609/1: S3C24XX: defconfig update for s3c2410_defconfig [ARM] 3591/1: Anubis: IDE device definitions [ARM] Include asm/hardware.h not asm/arch/hardware.h [ARM] 3594/1: Poodle: Add touchscreen support + other updates [ARM] 3564/1: sharpsl_pm: Abstract some machine specific parameters [ARM] 3561/1: Poodle: Correct the MMC/SD power control [ARM] 3593/1: Add reboot and shutdown handlers for Zaurus handhelds [ARM] 3599/1: AT91RM9200 remove global variables [ARM] 3607/1: AT91RM9200 misc fixes [ARM] 3605/1: AT91RM9200 Power Management [ARM] 3604/1: AT91RM9200 New boards [ARM] 3603/1: AT91RM9200 remove old files [ARM] 3592/1: AT91RM9200 Serial driver update [ARM] 3590/1: AT91RM9200 Platform devices support [ARM] 3589/1: AT91RM9200 DK/EK board update [ARM] 3588/1: AT91RM9200 CSB337/637 board update [ARM] 3587/1: AT91RM9200 hardware headers [ARM] 3586/1: AT91RM9200 header update ...
-rw-r--r--arch/arm/Kconfig108
-rw-r--r--arch/arm/Makefile1
-rw-r--r--arch/arm/boot/compressed/head-at91rm9200.S12
-rw-r--r--arch/arm/common/sharpsl_pm.c28
-rw-r--r--arch/arm/configs/ateb9200_defconfig1312
-rw-r--r--arch/arm/configs/carmeva_defconfig723
-rw-r--r--arch/arm/configs/kafa_defconfig884
-rw-r--r--arch/arm/configs/kb9202_defconfig780
-rw-r--r--arch/arm/configs/netx_defconfig926
-rw-r--r--arch/arm/configs/s3c2410_defconfig76
-rw-r--r--arch/arm/kernel/process.c61
-rw-r--r--arch/arm/mach-at91rm9200/Kconfig12
-rw-r--r--arch/arm/mach-at91rm9200/Makefile17
-rw-r--r--arch/arm/mach-at91rm9200/board-carmeva.c131
-rw-r--r--arch/arm/mach-at91rm9200/board-csb337.c45
-rw-r--r--arch/arm/mach-at91rm9200/board-csb637.c32
-rw-r--r--arch/arm/mach-at91rm9200/board-dk.c59
-rw-r--r--arch/arm/mach-at91rm9200/board-eb9200.c130
-rw-r--r--arch/arm/mach-at91rm9200/board-ek.c49
-rw-r--r--arch/arm/mach-at91rm9200/board-kafa.c116
-rw-r--r--arch/arm/mach-at91rm9200/board-kb9202.c125
-rw-r--r--arch/arm/mach-at91rm9200/clock.c126
-rw-r--r--arch/arm/mach-at91rm9200/common.c19
-rw-r--r--arch/arm/mach-at91rm9200/devices.c406
-rw-r--r--arch/arm/mach-at91rm9200/generic.h7
-rw-r--r--arch/arm/mach-at91rm9200/gpio.c89
-rw-r--r--arch/arm/mach-at91rm9200/irq.c44
-rw-r--r--arch/arm/mach-at91rm9200/pm.c225
-rw-r--r--arch/arm/mach-at91rm9200/time.c57
-rw-r--r--arch/arm/mach-netx/Kconfig24
-rw-r--r--arch/arm/mach-netx/Makefile15
-rw-r--r--arch/arm/mach-netx/Makefile.boot2
-rw-r--r--arch/arm/mach-netx/fb.c114
-rw-r--r--arch/arm/mach-netx/fb.h24
-rw-r--r--arch/arm/mach-netx/generic.c193
-rw-r--r--arch/arm/mach-netx/generic.h24
-rw-r--r--arch/arm/mach-netx/nxdb500.c210
-rw-r--r--arch/arm/mach-netx/nxdkn.c103
-rw-r--r--arch/arm/mach-netx/nxeb500hmi.c187
-rw-r--r--arch/arm/mach-netx/pfifo.c68
-rw-r--r--arch/arm/mach-netx/time.c88
-rw-r--r--arch/arm/mach-netx/xc.c255
-rw-r--r--arch/arm/mach-pnx4008/serial.c2
-rw-r--r--arch/arm/mach-pxa/Kconfig1
-rw-r--r--arch/arm/mach-pxa/Makefile2
-rw-r--r--arch/arm/mach-pxa/corgi.c25
-rw-r--r--arch/arm/mach-pxa/corgi_pm.c23
-rw-r--r--arch/arm/mach-pxa/corgi_ssp.c42
-rw-r--r--arch/arm/mach-pxa/poodle.c108
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c7
-rw-r--r--arch/arm/mach-pxa/spitz.c25
-rw-r--r--arch/arm/mach-pxa/spitz_pm.c15
-rw-r--r--arch/arm/mach-pxa/tosa.c26
-rw-r--r--arch/arm/mach-s3c2410/mach-anubis.c50
-rw-r--r--arch/arm/mm/Kconfig4
-rw-r--r--drivers/leds/leds-locomo.c2
-rw-r--r--drivers/pcmcia/sa1100_badge4.c4
-rw-r--r--drivers/serial/Kconfig17
-rw-r--r--drivers/serial/at91_serial.c463
-rw-r--r--include/asm-arm/arch-at91rm9200/at91rm9200_spi.h81
-rw-r--r--include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h96
-rw-r--r--include/asm-arm/arch-at91rm9200/at91rm9200_sys.h11
-rw-r--r--include/asm-arm/arch-at91rm9200/at91rm9200_tc.h146
-rw-r--r--include/asm-arm/arch-at91rm9200/at91rm9200_udp.h77
-rw-r--r--include/asm-arm/arch-at91rm9200/board.h30
-rw-r--r--include/asm-arm/arch-at91rm9200/gpio.h5
-rw-r--r--include/asm-arm/arch-at91rm9200/hardware.h9
-rw-r--r--include/asm-arm/arch-at91rm9200/io.h1
-rw-r--r--include/asm-arm/arch-at91rm9200/irqs.h2
-rw-r--r--include/asm-arm/arch-at91rm9200/memory.h2
-rw-r--r--include/asm-arm/arch-at91rm9200/pio.h115
-rw-r--r--include/asm-arm/arch-at91rm9200/system.h10
-rw-r--r--include/asm-arm/arch-at91rm9200/timex.h2
-rw-r--r--include/asm-arm/arch-at91rm9200/uncompress.h2
-rw-r--r--include/asm-arm/arch-at91rm9200/vmalloc.h2
-rw-r--r--include/asm-arm/arch-ixp23xx/entry-macro.S2
-rw-r--r--include/asm-arm/arch-ixp23xx/ixp23xx.h2
-rw-r--r--include/asm-arm/arch-netx/debug-macro.S38
-rw-r--r--include/asm-arm/arch-netx/dma.h21
-rw-r--r--include/asm-arm/arch-netx/entry-macro.S35
-rw-r--r--include/asm-arm/arch-netx/hardware.h39
-rw-r--r--include/asm-arm/arch-netx/io.h29
-rw-r--r--include/asm-arm/arch-netx/irqs.h70
-rw-r--r--include/asm-arm/arch-netx/memory.h36
-rw-r--r--include/asm-arm/arch-netx/netx-regs.h410
-rw-r--r--include/asm-arm/arch-netx/param.h18
-rw-r--r--include/asm-arm/arch-netx/pfifo.h54
-rw-r--r--include/asm-arm/arch-netx/system.h38
-rw-r--r--include/asm-arm/arch-netx/timex.h20
-rw-r--r--include/asm-arm/arch-netx/uncompress.h76
-rw-r--r--include/asm-arm/arch-netx/vmalloc.h19
-rw-r--r--include/asm-arm/arch-netx/xc.h42
-rw-r--r--include/asm-arm/arch-pxa/poodle.h4
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h18
-rw-r--r--include/asm-arm/arch-pxa/system.h1
-rw-r--r--include/asm-arm/arch-versatile/system.h16
-rw-r--r--include/asm-arm/byteorder.h10
-rw-r--r--include/asm-arm/hardware/sharpsl_pm.h11
-rw-r--r--include/asm-arm/mach/serial_at91.h (renamed from include/asm-arm/mach/serial_at91rm9200.h)8
-rw-r--r--include/asm-arm/system.h3
-rw-r--r--include/linux/serial_core.h4
101 files changed, 9670 insertions, 668 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f47cf9af3bc8..1b7e5c2e90ef 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -93,15 +93,49 @@ choice
93 prompt "ARM system type" 93 prompt "ARM system type"
94 default ARCH_VERSATILE 94 default ARCH_VERSATILE
95 95
96config ARCH_AAEC2000
97 bool "Agilent AAEC-2000 based"
98 select ARM_AMBA
99 help
100 This enables support for systems based on the Agilent AAEC-2000
101
102config ARCH_INTEGRATOR
103 bool "ARM Ltd. Integrator family"
104 select ARM_AMBA
105 select ICST525
106 help
107 Support for ARM's Integrator platform.
108
109config ARCH_REALVIEW
110 bool "ARM Ltd. RealView family"
111 select ARM_AMBA
112 select ICST307
113 help
114 This enables support for ARM Ltd RealView boards.
115
116config ARCH_VERSATILE
117 bool "ARM Ltd. Versatile family"
118 select ARM_AMBA
119 select ARM_VIC
120 select ICST307
121 help
122 This enables support for ARM Ltd Versatile board.
123
124config ARCH_AT91RM9200
125 bool "Atmel AT91RM9200"
126 help
127 Say Y here if you intend to run this kernel on an Atmel
128 AT91RM9200-based board.
129
96config ARCH_CLPS7500 130config ARCH_CLPS7500
97 bool "Cirrus-CL-PS7500FE" 131 bool "Cirrus CL-PS7500FE"
98 select TIMER_ACORN 132 select TIMER_ACORN
99 select ISA 133 select ISA
100 help 134 help
101 Support for the Cirrus Logic PS7500FE system-on-a-chip. 135 Support for the Cirrus Logic PS7500FE system-on-a-chip.
102 136
103config ARCH_CLPS711X 137config ARCH_CLPS711X
104 bool "CLPS711x/EP721x-based" 138 bool "Cirrus Logic CLPS711x/EP721x-based"
105 help 139 help
106 Support for Cirrus Logic 711x/721x based boards. 140 Support for Cirrus Logic 711x/721x based boards.
107 141
@@ -135,12 +169,22 @@ config ARCH_FOOTBRIDGE
135 Support for systems based on the DC21285 companion chip 169 Support for systems based on the DC21285 companion chip
136 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder. 170 ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
137 171
138config ARCH_INTEGRATOR 172config ARCH_NETX
139 bool "Integrator" 173 bool "Hilscher NetX based"
140 select ARM_AMBA 174 select ARM_VIC
141 select ICST525
142 help 175 help
143 Support for ARM's Integrator platform. 176 This enables support for systems based on the Hilscher NetX Soc
177
178config ARCH_H720X
179 bool "Hynix HMS720x-based"
180 select ISA_DMA_API
181 help
182 This enables support for systems based on the Hynix HMS720x
183
184config ARCH_IMX
185 bool "IMX"
186 help
187 Support for Motorola's i.MX family of processors (MX1, MXL).
144 188
145config ARCH_IOP3XX 189config ARCH_IOP3XX
146 bool "IOP3xx-based" 190 bool "IOP3xx-based"
@@ -178,6 +222,11 @@ config ARCH_L7200
178 If you have any questions or comments about the Linux kernel port 222 If you have any questions or comments about the Linux kernel port
179 to this board, send e-mail to <sjhill@cotw.com>. 223 to this board, send e-mail to <sjhill@cotw.com>.
180 224
225config ARCH_PNX4008
226 bool "Philips Nexperia PNX4008 Mobile"
227 help
228 This enables support for Philips PNX4008 mobile platform.
229
181config ARCH_PXA 230config ARCH_PXA
182 bool "PXA2xx-based" 231 bool "PXA2xx-based"
183 select ARCH_MTD_XIP 232 select ARCH_MTD_XIP
@@ -232,49 +281,6 @@ config ARCH_OMAP
232 help 281 help
233 Support for TI's OMAP platform (OMAP1 and OMAP2). 282 Support for TI's OMAP platform (OMAP1 and OMAP2).
234 283
235config ARCH_VERSATILE
236 bool "Versatile"
237 select ARM_AMBA
238 select ARM_VIC
239 select ICST307
240 help
241 This enables support for ARM Ltd Versatile board.
242
243config ARCH_REALVIEW
244 bool "RealView"
245 select ARM_AMBA
246 select ICST307
247 help
248 This enables support for ARM Ltd RealView boards.
249
250config ARCH_IMX
251 bool "IMX"
252 help
253 Support for Motorola's i.MX family of processors (MX1, MXL).
254
255config ARCH_H720X
256 bool "Hynix-HMS720x-based"
257 select ISA_DMA_API
258 help
259 This enables support for systems based on the Hynix HMS720x
260
261config ARCH_AAEC2000
262 bool "Agilent AAEC-2000 based"
263 select ARM_AMBA
264 help
265 This enables support for systems based on the Agilent AAEC-2000
266
267config ARCH_AT91RM9200
268 bool "AT91RM9200"
269 help
270 Say Y here if you intend to run this kernel on an Atmel
271 AT91RM9200-based board.
272
273config ARCH_PNX4008
274 bool "Philips Nexperia PNX4008 Mobile"
275 help
276 This enables support for Philips PNX4008 mobile platform.
277
278endchoice 284endchoice
279 285
280source "arch/arm/mach-clps711x/Kconfig" 286source "arch/arm/mach-clps711x/Kconfig"
@@ -319,6 +325,8 @@ source "arch/arm/mach-realview/Kconfig"
319 325
320source "arch/arm/mach-at91rm9200/Kconfig" 326source "arch/arm/mach-at91rm9200/Kconfig"
321 327
328source "arch/arm/mach-netx/Kconfig"
329
322# Definitions to make life easier 330# Definitions to make life easier
323config ARCH_ACORN 331config ARCH_ACORN
324 bool 332 bool
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 6c97aa70d3bc..282b14e2f464 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -117,6 +117,7 @@ endif
117 machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 117 machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200
118 machine-$(CONFIG_ARCH_EP93XX) := ep93xx 118 machine-$(CONFIG_ARCH_EP93XX) := ep93xx
119 machine-$(CONFIG_ARCH_PNX4008) := pnx4008 119 machine-$(CONFIG_ARCH_PNX4008) := pnx4008
120 machine-$(CONFIG_ARCH_NETX) := netx
120 121
121ifeq ($(CONFIG_ARCH_EBSA110),y) 122ifeq ($(CONFIG_ARCH_EBSA110),y)
122# This is what happens if you forget the IOCS16 line. 123# This is what happens if you forget the IOCS16 line.
diff --git a/arch/arm/boot/compressed/head-at91rm9200.S b/arch/arm/boot/compressed/head-at91rm9200.S
index 2119ea62b547..57a3b163b2cb 100644
--- a/arch/arm/boot/compressed/head-at91rm9200.S
+++ b/arch/arm/boot/compressed/head-at91rm9200.S
@@ -49,6 +49,18 @@
49 cmp r7, r3 49 cmp r7, r3
50 beq 99f 50 beq 99f
51 51
52 @ Embest ATEB9200 : 923
53 mov r3, #(MACH_TYPE_ATEB9200 & 0xff)
54 orr r3, r3, #(MACH_TYPE_ATEB9200 & 0xff00)
55 cmp r7, r3
56 beq 99f
57
58 @ Sperry-Sun KAFA : 662
59 mov r3, #(MACH_TYPE_KAFA & 0xff)
60 orr r3, r3, #(MACH_TYPE_KAFA & 0xff00)
61 cmp r7, r3
62 beq 99f
63
52 @ Unknown board, use the AT91RM9200DK board 64 @ Unknown board, use the AT91RM9200DK board
53 @ mov r7, #MACH_TYPE_AT91RM9200 65 @ mov r7, #MACH_TYPE_AT91RM9200
54 mov r7, #(MACH_TYPE_AT91RM9200DK & 0xff) 66 mov r7, #(MACH_TYPE_AT91RM9200DK & 0xff)
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index 3cd8c9ee4510..045e37e07330 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -49,13 +49,6 @@
49#define SHARPSL_CHARGE_CO_CHECK_TIME 5 /* 5 msec */ 49#define SHARPSL_CHARGE_CO_CHECK_TIME 5 /* 5 msec */
50#define SHARPSL_CHARGE_RETRY_CNT 1 /* eqv. 10 min */ 50#define SHARPSL_CHARGE_RETRY_CNT 1 /* eqv. 10 min */
51 51
52#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
53#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */
54#define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b /* 6V */
55#define SHARPSL_CHARGE_ON_ACIN_LOW 0x34 /* 2V */
56#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */
57#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */
58
59/* 52/*
60 * Prototypes 53 * Prototypes
61 */ 54 */
@@ -82,12 +75,13 @@ DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger);
82static int get_percentage(int voltage) 75static int get_percentage(int voltage)
83{ 76{
84 int i = sharpsl_pm.machinfo->bat_levels - 1; 77 int i = sharpsl_pm.machinfo->bat_levels - 1;
78 int bl_status = sharpsl_pm.machinfo->backlight_get_status ? sharpsl_pm.machinfo->backlight_get_status() : 0;
85 struct battery_thresh *thresh; 79 struct battery_thresh *thresh;
86 80
87 if (sharpsl_pm.charge_mode == CHRG_ON) 81 if (sharpsl_pm.charge_mode == CHRG_ON)
88 thresh=sharpsl_pm.machinfo->bat_levels_acin; 82 thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_acin_bl : sharpsl_pm.machinfo->bat_levels_acin;
89 else 83 else
90 thresh=sharpsl_pm.machinfo->bat_levels_noac; 84 thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_noac_bl : sharpsl_pm.machinfo->bat_levels_noac;
91 85
92 while (i > 0 && (voltage > thresh[i].voltage)) 86 while (i > 0 && (voltage > thresh[i].voltage))
93 i--; 87 i--;
@@ -131,7 +125,7 @@ static void sharpsl_battery_thread(void *private_)
131 sharpsl_pm.battstat.ac_status = (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN) ? APM_AC_ONLINE : APM_AC_OFFLINE); 125 sharpsl_pm.battstat.ac_status = (sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_ACIN) ? APM_AC_ONLINE : APM_AC_OFFLINE);
132 126
133 /* Corgi cannot confirm when battery fully charged so periodically kick! */ 127 /* Corgi cannot confirm when battery fully charged so periodically kick! */
134 if (machine_is_corgi() && (sharpsl_pm.charge_mode == CHRG_ON) 128 if (!sharpsl_pm.machinfo->batfull_irq && (sharpsl_pm.charge_mode == CHRG_ON)
135 && time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL)) 129 && time_after(jiffies, sharpsl_pm.charge_start_time + SHARPSL_CHARGE_ON_TIME_INTERVAL))
136 schedule_work(&toggle_charger); 130 schedule_work(&toggle_charger);
137 131
@@ -166,11 +160,11 @@ static void sharpsl_battery_thread(void *private_)
166 && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) || 160 && ((sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_LOW) ||
167 (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL))) { 161 (sharpsl_pm.battstat.mainbat_status == APM_BATTERY_STATUS_CRITICAL))) {
168 if (!(sharpsl_pm.flags & SHARPSL_BL_LIMIT)) { 162 if (!(sharpsl_pm.flags & SHARPSL_BL_LIMIT)) {
169 corgibl_limit_intensity(1); 163 sharpsl_pm.machinfo->backlight_limit(1);
170 sharpsl_pm.flags |= SHARPSL_BL_LIMIT; 164 sharpsl_pm.flags |= SHARPSL_BL_LIMIT;
171 } 165 }
172 } else if (sharpsl_pm.flags & SHARPSL_BL_LIMIT) { 166 } else if (sharpsl_pm.flags & SHARPSL_BL_LIMIT) {
173 corgibl_limit_intensity(0); 167 sharpsl_pm.machinfo->backlight_limit(0);
174 sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT; 168 sharpsl_pm.flags &= ~SHARPSL_BL_LIMIT;
175 } 169 }
176 170
@@ -418,7 +412,7 @@ static int sharpsl_check_battery_temp(void)
418 val = get_select_val(buff); 412 val = get_select_val(buff);
419 413
420 dev_dbg(sharpsl_pm.dev, "Temperature: %d\n", val); 414 dev_dbg(sharpsl_pm.dev, "Temperature: %d\n", val);
421 if (val > SHARPSL_CHARGE_ON_TEMP) 415 if (val > sharpsl_pm.machinfo->charge_on_temp)
422 return -1; 416 return -1;
423 417
424 return 0; 418 return 0;
@@ -450,7 +444,7 @@ static int sharpsl_check_battery_voltage(void)
450 val = get_select_val(buff); 444 val = get_select_val(buff);
451 dev_dbg(sharpsl_pm.dev, "Battery Voltage: %d\n", val); 445 dev_dbg(sharpsl_pm.dev, "Battery Voltage: %d\n", val);
452 446
453 if (val < SHARPSL_CHARGE_ON_VOLT) 447 if (val < sharpsl_pm.machinfo->charge_on_volt)
454 return -1; 448 return -1;
455 449
456 return 0; 450 return 0;
@@ -468,7 +462,7 @@ static int sharpsl_ac_check(void)
468 temp = get_select_val(buff); 462 temp = get_select_val(buff);
469 dev_dbg(sharpsl_pm.dev, "AC Voltage: %d\n",temp); 463 dev_dbg(sharpsl_pm.dev, "AC Voltage: %d\n",temp);
470 464
471 if ((temp > SHARPSL_CHARGE_ON_ACIN_HIGH) || (temp < SHARPSL_CHARGE_ON_ACIN_LOW)) { 465 if ((temp > sharpsl_pm.machinfo->charge_acin_high) || (temp < sharpsl_pm.machinfo->charge_acin_low)) {
472 dev_err(sharpsl_pm.dev, "Error: AC check failed.\n"); 466 dev_err(sharpsl_pm.dev, "Error: AC check failed.\n");
473 return -1; 467 return -1;
474 } 468 }
@@ -627,8 +621,8 @@ static int sharpsl_fatal_check(void)
627 temp = get_select_val(buff); 621 temp = get_select_val(buff);
628 dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %d\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT)); 622 dev_dbg(sharpsl_pm.dev, "sharpsl_fatal_check: acin: %d, discharge voltage: %d, no discharge: %d\n", acin, temp, sharpsl_pm.machinfo->read_devdata(SHARPSL_BATT_VOLT));
629 623
630 if ((acin && (temp < SHARPSL_FATAL_ACIN_VOLT)) || 624 if ((acin && (temp < sharpsl_pm.machinfo->fatal_acin_volt)) ||
631 (!acin && (temp < SHARPSL_FATAL_NOACIN_VOLT))) 625 (!acin && (temp < sharpsl_pm.machinfo->fatal_noacin_volt)))
632 return -1; 626 return -1;
633 return 0; 627 return 0;
634} 628}
diff --git a/arch/arm/configs/ateb9200_defconfig b/arch/arm/configs/ateb9200_defconfig
new file mode 100644
index 000000000000..69c39e098743
--- /dev/null
+++ b/arch/arm/configs/ateb9200_defconfig
@@ -0,0 +1,1312 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc3
4# Sun May 7 16:53:18 2006
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_VECTORS_BASE=0xffff0000
12
13#
14# Code maturity level options
15#
16CONFIG_EXPERIMENTAL=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20
21#
22# General setup
23#
24CONFIG_LOCALVERSION=""
25CONFIG_LOCALVERSION_AUTO=y
26CONFIG_SWAP=y
27CONFIG_SYSVIPC=y
28# CONFIG_POSIX_MQUEUE is not set
29# CONFIG_BSD_PROCESS_ACCT is not set
30CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set
32# CONFIG_IKCONFIG is not set
33# CONFIG_RELAY is not set
34CONFIG_INITRAMFS_SOURCE=""
35CONFIG_UID16=y
36CONFIG_CC_OPTIMIZE_FOR_SIZE=y
37CONFIG_EMBEDDED=y
38CONFIG_KALLSYMS=y
39# CONFIG_KALLSYMS_EXTRA_PASS is not set
40CONFIG_HOTPLUG=y
41CONFIG_PRINTK=y
42CONFIG_BUG=y
43CONFIG_ELF_CORE=y
44CONFIG_BASE_FULL=y
45CONFIG_FUTEX=y
46CONFIG_EPOLL=y
47CONFIG_SHMEM=y
48CONFIG_SLAB=y
49# CONFIG_TINY_SHMEM is not set
50CONFIG_BASE_SMALL=0
51# CONFIG_SLOB is not set
52
53#
54# Loadable module support
55#
56CONFIG_MODULES=y
57CONFIG_MODULE_UNLOAD=y
58# CONFIG_MODULE_FORCE_UNLOAD is not set
59# CONFIG_MODVERSIONS is not set
60# CONFIG_MODULE_SRCVERSION_ALL is not set
61CONFIG_KMOD=y
62
63#
64# Block layer
65#
66# CONFIG_BLK_DEV_IO_TRACE is not set
67
68#
69# IO Schedulers
70#
71CONFIG_IOSCHED_NOOP=y
72CONFIG_IOSCHED_AS=y
73CONFIG_IOSCHED_DEADLINE=y
74CONFIG_IOSCHED_CFQ=y
75CONFIG_DEFAULT_AS=y
76# CONFIG_DEFAULT_DEADLINE is not set
77# CONFIG_DEFAULT_CFQ is not set
78# CONFIG_DEFAULT_NOOP is not set
79CONFIG_DEFAULT_IOSCHED="anticipatory"
80
81#
82# System Type
83#
84# CONFIG_ARCH_CLPS7500 is not set
85# CONFIG_ARCH_CLPS711X is not set
86# CONFIG_ARCH_CO285 is not set
87# CONFIG_ARCH_EBSA110 is not set
88# CONFIG_ARCH_EP93XX is not set
89# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set
92# CONFIG_ARCH_IXP4XX is not set
93# CONFIG_ARCH_IXP2000 is not set
94# CONFIG_ARCH_IXP23XX is not set
95# CONFIG_ARCH_L7200 is not set
96# CONFIG_ARCH_PXA is not set
97# CONFIG_ARCH_RPC is not set
98# CONFIG_ARCH_SA1100 is not set
99# CONFIG_ARCH_S3C2410 is not set
100# CONFIG_ARCH_SHARK is not set
101# CONFIG_ARCH_LH7A40X is not set
102# CONFIG_ARCH_OMAP is not set
103# CONFIG_ARCH_VERSATILE is not set
104# CONFIG_ARCH_REALVIEW is not set
105# CONFIG_ARCH_IMX is not set
106# CONFIG_ARCH_H720X is not set
107# CONFIG_ARCH_AAEC2000 is not set
108CONFIG_ARCH_AT91RM9200=y
109
110#
111# AT91RM9200 Implementations
112#
113
114#
115# AT91RM9200 Board Type
116#
117# CONFIG_ARCH_AT91RM9200DK is not set
118# CONFIG_MACH_AT91RM9200EK is not set
119# CONFIG_MACH_CSB337 is not set
120# CONFIG_MACH_CSB637 is not set
121# CONFIG_MACH_CARMEVA is not set
122# CONFIG_MACH_KB9200 is not set
123CONFIG_MACH_ATEB9200=y
124# CONFIG_MACH_KAFA is not set
125
126#
127# AT91 Feature Selections
128#
129# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
130
131#
132# Processor Type
133#
134CONFIG_CPU_32=y
135CONFIG_CPU_ARM920T=y
136CONFIG_CPU_32v4=y
137CONFIG_CPU_ABRT_EV4T=y
138CONFIG_CPU_CACHE_V4WT=y
139CONFIG_CPU_CACHE_VIVT=y
140CONFIG_CPU_COPY_V4WB=y
141CONFIG_CPU_TLB_V4WBI=y
142
143#
144# Processor Features
145#
146CONFIG_ARM_THUMB=y
147# CONFIG_CPU_ICACHE_DISABLE is not set
148# CONFIG_CPU_DCACHE_DISABLE is not set
149# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
150
151#
152# Bus support
153#
154
155#
156# PCCARD (PCMCIA/CardBus) support
157#
158CONFIG_PCCARD=m
159# CONFIG_PCMCIA_DEBUG is not set
160CONFIG_PCMCIA=m
161CONFIG_PCMCIA_LOAD_CIS=y
162CONFIG_PCMCIA_IOCTL=y
163
164#
165# PC-card bridges
166#
167CONFIG_AT91_CF=m
168
169#
170# Kernel Features
171#
172CONFIG_PREEMPT=y
173CONFIG_NO_IDLE_HZ=y
174CONFIG_HZ=100
175# CONFIG_AEABI is not set
176# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
177CONFIG_SELECT_MEMORY_MODEL=y
178CONFIG_FLATMEM_MANUAL=y
179# CONFIG_DISCONTIGMEM_MANUAL is not set
180# CONFIG_SPARSEMEM_MANUAL is not set
181CONFIG_FLATMEM=y
182CONFIG_FLAT_NODE_MEM_MAP=y
183# CONFIG_SPARSEMEM_STATIC is not set
184CONFIG_SPLIT_PTLOCK_CPUS=4096
185# CONFIG_LEDS is not set
186CONFIG_ALIGNMENT_TRAP=y
187
188#
189# Boot options
190#
191CONFIG_ZBOOT_ROM_TEXT=0x0
192CONFIG_ZBOOT_ROM_BSS=0x0
193CONFIG_CMDLINE=""
194# CONFIG_XIP_KERNEL is not set
195
196#
197# Floating point emulation
198#
199
200#
201# At least one emulation must be selected
202#
203CONFIG_FPE_NWFPE=y
204# CONFIG_FPE_NWFPE_XP is not set
205# CONFIG_FPE_FASTFPE is not set
206
207#
208# Userspace binary formats
209#
210CONFIG_BINFMT_ELF=y
211# CONFIG_BINFMT_AOUT is not set
212# CONFIG_BINFMT_MISC is not set
213# CONFIG_ARTHUR is not set
214
215#
216# Power management options
217#
218CONFIG_PM=y
219CONFIG_PM_LEGACY=y
220# CONFIG_PM_DEBUG is not set
221# CONFIG_APM is not set
222
223#
224# Networking
225#
226CONFIG_NET=y
227
228#
229# Networking options
230#
231# CONFIG_NETDEBUG is not set
232CONFIG_PACKET=y
233# CONFIG_PACKET_MMAP is not set
234CONFIG_UNIX=y
235CONFIG_XFRM=y
236# CONFIG_XFRM_USER is not set
237CONFIG_NET_KEY=y
238CONFIG_INET=y
239# CONFIG_IP_MULTICAST is not set
240# CONFIG_IP_ADVANCED_ROUTER is not set
241CONFIG_IP_FIB_HASH=y
242# CONFIG_IP_PNP is not set
243# CONFIG_NET_IPIP is not set
244# CONFIG_NET_IPGRE is not set
245# CONFIG_ARPD is not set
246# CONFIG_SYN_COOKIES is not set
247# CONFIG_INET_AH is not set
248# CONFIG_INET_ESP is not set
249# CONFIG_INET_IPCOMP is not set
250# CONFIG_INET_XFRM_TUNNEL is not set
251# CONFIG_INET_TUNNEL is not set
252CONFIG_INET_DIAG=y
253CONFIG_INET_TCP_DIAG=y
254# CONFIG_TCP_CONG_ADVANCED is not set
255CONFIG_TCP_CONG_BIC=y
256# CONFIG_IPV6 is not set
257# CONFIG_INET6_XFRM_TUNNEL is not set
258# CONFIG_INET6_TUNNEL is not set
259# CONFIG_NETFILTER is not set
260
261#
262# DCCP Configuration (EXPERIMENTAL)
263#
264# CONFIG_IP_DCCP is not set
265
266#
267# SCTP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_SCTP is not set
270
271#
272# TIPC Configuration (EXPERIMENTAL)
273#
274# CONFIG_TIPC is not set
275# CONFIG_ATM is not set
276CONFIG_BRIDGE=m
277CONFIG_VLAN_8021Q=m
278# CONFIG_DECNET is not set
279CONFIG_LLC=m
280# CONFIG_LLC2 is not set
281# CONFIG_IPX is not set
282# CONFIG_ATALK is not set
283# CONFIG_X25 is not set
284# CONFIG_LAPB is not set
285# CONFIG_NET_DIVERT is not set
286# CONFIG_ECONET is not set
287# CONFIG_WAN_ROUTER is not set
288
289#
290# QoS and/or fair queueing
291#
292# CONFIG_NET_SCHED is not set
293
294#
295# Network testing
296#
297# CONFIG_NET_PKTGEN is not set
298# CONFIG_HAMRADIO is not set
299# CONFIG_IRDA is not set
300# CONFIG_BT is not set
301CONFIG_IEEE80211=m
302# CONFIG_IEEE80211_DEBUG is not set
303CONFIG_IEEE80211_CRYPT_WEP=m
304CONFIG_IEEE80211_CRYPT_CCMP=m
305CONFIG_IEEE80211_CRYPT_TKIP=m
306# CONFIG_IEEE80211_SOFTMAC is not set
307CONFIG_WIRELESS_EXT=y
308
309#
310# Device Drivers
311#
312
313#
314# Generic Driver Options
315#
316CONFIG_STANDALONE=y
317CONFIG_PREVENT_FIRMWARE_BUILD=y
318CONFIG_FW_LOADER=y
319
320#
321# Connector - unified userspace <-> kernelspace linker
322#
323# CONFIG_CONNECTOR is not set
324
325#
326# Memory Technology Devices (MTD)
327#
328CONFIG_MTD=y
329# CONFIG_MTD_DEBUG is not set
330# CONFIG_MTD_CONCAT is not set
331CONFIG_MTD_PARTITIONS=y
332# CONFIG_MTD_REDBOOT_PARTS is not set
333CONFIG_MTD_CMDLINE_PARTS=y
334# CONFIG_MTD_AFS_PARTS is not set
335
336#
337# User Modules And Translation Layers
338#
339CONFIG_MTD_CHAR=y
340# CONFIG_MTD_BLOCK is not set
341CONFIG_MTD_BLOCK_RO=y
342# CONFIG_FTL is not set
343# CONFIG_NFTL is not set
344# CONFIG_INFTL is not set
345# CONFIG_RFD_FTL is not set
346
347#
348# RAM/ROM/Flash chip drivers
349#
350# CONFIG_MTD_CFI is not set
351# CONFIG_MTD_JEDECPROBE is not set
352CONFIG_MTD_MAP_BANK_WIDTH_1=y
353CONFIG_MTD_MAP_BANK_WIDTH_2=y
354CONFIG_MTD_MAP_BANK_WIDTH_4=y
355# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
356# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
357# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
358CONFIG_MTD_CFI_I1=y
359CONFIG_MTD_CFI_I2=y
360# CONFIG_MTD_CFI_I4 is not set
361# CONFIG_MTD_CFI_I8 is not set
362# CONFIG_MTD_RAM is not set
363# CONFIG_MTD_ROM is not set
364# CONFIG_MTD_ABSENT is not set
365# CONFIG_MTD_OBSOLETE_CHIPS is not set
366
367#
368# Mapping drivers for chip access
369#
370# CONFIG_MTD_COMPLEX_MAPPINGS is not set
371# CONFIG_MTD_PLATRAM is not set
372
373#
374# Self-contained MTD device drivers
375#
376# CONFIG_MTD_SLRAM is not set
377# CONFIG_MTD_PHRAM is not set
378# CONFIG_MTD_MTDRAM is not set
379# CONFIG_MTD_BLOCK2MTD is not set
380
381#
382# Disk-On-Chip Device Drivers
383#
384# CONFIG_MTD_DOC2000 is not set
385# CONFIG_MTD_DOC2001 is not set
386# CONFIG_MTD_DOC2001PLUS is not set
387CONFIG_MTD_AT91_DATAFLASH=y
388# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
389
390#
391# NAND Flash Device Drivers
392#
393# CONFIG_MTD_NAND is not set
394
395#
396# OneNAND Flash Device Drivers
397#
398# CONFIG_MTD_ONENAND is not set
399
400#
401# Parallel port support
402#
403# CONFIG_PARPORT is not set
404
405#
406# Plug and Play support
407#
408
409#
410# Block devices
411#
412# CONFIG_BLK_DEV_COW_COMMON is not set
413CONFIG_BLK_DEV_LOOP=m
414# CONFIG_BLK_DEV_CRYPTOLOOP is not set
415CONFIG_BLK_DEV_NBD=m
416# CONFIG_BLK_DEV_UB is not set
417# CONFIG_BLK_DEV_RAM is not set
418# CONFIG_BLK_DEV_INITRD is not set
419# CONFIG_CDROM_PKTCDVD is not set
420# CONFIG_ATA_OVER_ETH is not set
421
422#
423# ATA/ATAPI/MFM/RLL support
424#
425# CONFIG_IDE is not set
426
427#
428# SCSI device support
429#
430# CONFIG_RAID_ATTRS is not set
431CONFIG_SCSI=m
432CONFIG_SCSI_PROC_FS=y
433
434#
435# SCSI support type (disk, tape, CD-ROM)
436#
437CONFIG_BLK_DEV_SD=m
438# CONFIG_CHR_DEV_ST is not set
439# CONFIG_CHR_DEV_OSST is not set
440CONFIG_BLK_DEV_SR=m
441CONFIG_BLK_DEV_SR_VENDOR=y
442CONFIG_CHR_DEV_SG=m
443# CONFIG_CHR_DEV_SCH is not set
444
445#
446# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
447#
448CONFIG_SCSI_MULTI_LUN=y
449# CONFIG_SCSI_CONSTANTS is not set
450# CONFIG_SCSI_LOGGING is not set
451
452#
453# SCSI Transport Attributes
454#
455# CONFIG_SCSI_SPI_ATTRS is not set
456# CONFIG_SCSI_FC_ATTRS is not set
457# CONFIG_SCSI_ISCSI_ATTRS is not set
458# CONFIG_SCSI_SAS_ATTRS is not set
459
460#
461# SCSI low-level drivers
462#
463# CONFIG_ISCSI_TCP is not set
464# CONFIG_SCSI_SATA is not set
465# CONFIG_SCSI_DEBUG is not set
466
467#
468# PCMCIA SCSI adapter support
469#
470# CONFIG_PCMCIA_AHA152X is not set
471# CONFIG_PCMCIA_FDOMAIN is not set
472# CONFIG_PCMCIA_NINJA_SCSI is not set
473# CONFIG_PCMCIA_QLOGIC is not set
474# CONFIG_PCMCIA_SYM53C500 is not set
475
476#
477# Multi-device support (RAID and LVM)
478#
479# CONFIG_MD is not set
480
481#
482# Fusion MPT device support
483#
484# CONFIG_FUSION is not set
485
486#
487# IEEE 1394 (FireWire) support
488#
489
490#
491# I2O device support
492#
493
494#
495# Network device support
496#
497CONFIG_NETDEVICES=y
498CONFIG_DUMMY=m
499# CONFIG_BONDING is not set
500# CONFIG_EQUALIZER is not set
501CONFIG_TUN=m
502
503#
504# PHY device support
505#
506CONFIG_PHYLIB=y
507
508#
509# MII PHY device drivers
510#
511# CONFIG_MARVELL_PHY is not set
512CONFIG_DAVICOM_PHY=y
513# CONFIG_QSEMI_PHY is not set
514# CONFIG_LXT_PHY is not set
515# CONFIG_CICADA_PHY is not set
516
517#
518# Ethernet (10 or 100Mbit)
519#
520CONFIG_NET_ETHERNET=y
521CONFIG_MII=y
522CONFIG_ARM_AT91_ETHER=y
523# CONFIG_SMC91X is not set
524# CONFIG_DM9000 is not set
525
526#
527# Ethernet (1000 Mbit)
528#
529
530#
531# Ethernet (10000 Mbit)
532#
533
534#
535# Token Ring devices
536#
537
538#
539# Wireless LAN (non-hamradio)
540#
541CONFIG_NET_RADIO=y
542# CONFIG_NET_WIRELESS_RTNETLINK is not set
543
544#
545# Obsolete Wireless cards support (pre-802.11)
546#
547# CONFIG_STRIP is not set
548# CONFIG_PCMCIA_WAVELAN is not set
549# CONFIG_PCMCIA_NETWAVE is not set
550
551#
552# Wireless 802.11 Frequency Hopping cards support
553#
554# CONFIG_PCMCIA_RAYCS is not set
555
556#
557# Wireless 802.11b ISA/PCI cards support
558#
559# CONFIG_HERMES is not set
560# CONFIG_ATMEL is not set
561
562#
563# Wireless 802.11b Pcmcia/Cardbus cards support
564#
565# CONFIG_AIRO_CS is not set
566# CONFIG_PCMCIA_WL3501 is not set
567# CONFIG_HOSTAP is not set
568CONFIG_NET_WIRELESS=y
569
570#
571# PCMCIA network device support
572#
573# CONFIG_NET_PCMCIA is not set
574
575#
576# Wan interfaces
577#
578# CONFIG_WAN is not set
579CONFIG_PPP=m
580# CONFIG_PPP_MULTILINK is not set
581# CONFIG_PPP_FILTER is not set
582CONFIG_PPP_ASYNC=m
583CONFIG_PPP_SYNC_TTY=m
584CONFIG_PPP_DEFLATE=m
585CONFIG_PPP_BSDCOMP=m
586# CONFIG_PPP_MPPE is not set
587CONFIG_PPPOE=m
588# CONFIG_SLIP is not set
589# CONFIG_SHAPER is not set
590# CONFIG_NETCONSOLE is not set
591# CONFIG_NETPOLL is not set
592# CONFIG_NET_POLL_CONTROLLER is not set
593
594#
595# ISDN subsystem
596#
597# CONFIG_ISDN is not set
598
599#
600# Input device support
601#
602CONFIG_INPUT=y
603
604#
605# Userland interfaces
606#
607CONFIG_INPUT_MOUSEDEV=y
608CONFIG_INPUT_MOUSEDEV_PSAUX=y
609CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
610CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
611# CONFIG_INPUT_JOYDEV is not set
612# CONFIG_INPUT_TSDEV is not set
613# CONFIG_INPUT_EVDEV is not set
614# CONFIG_INPUT_EVBUG is not set
615
616#
617# Input Device Drivers
618#
619CONFIG_INPUT_KEYBOARD=y
620CONFIG_KEYBOARD_ATKBD=y
621# CONFIG_KEYBOARD_SUNKBD is not set
622# CONFIG_KEYBOARD_LKKBD is not set
623# CONFIG_KEYBOARD_XTKBD is not set
624# CONFIG_KEYBOARD_NEWTON is not set
625CONFIG_INPUT_MOUSE=y
626CONFIG_MOUSE_PS2=y
627# CONFIG_MOUSE_SERIAL is not set
628# CONFIG_MOUSE_VSXXXAA is not set
629# CONFIG_INPUT_JOYSTICK is not set
630# CONFIG_INPUT_TOUCHSCREEN is not set
631# CONFIG_INPUT_MISC is not set
632
633#
634# Hardware I/O ports
635#
636CONFIG_SERIO=y
637CONFIG_SERIO_SERPORT=y
638CONFIG_SERIO_LIBPS2=y
639# CONFIG_SERIO_RAW is not set
640# CONFIG_GAMEPORT is not set
641
642#
643# Character devices
644#
645CONFIG_VT=y
646CONFIG_VT_CONSOLE=y
647CONFIG_HW_CONSOLE=y
648# CONFIG_SERIAL_NONSTANDARD is not set
649
650#
651# Serial drivers
652#
653# CONFIG_SERIAL_8250 is not set
654
655#
656# Non-8250 serial port support
657#
658CONFIG_SERIAL_AT91=y
659CONFIG_SERIAL_AT91_CONSOLE=y
660# CONFIG_SERIAL_AT91_TTYAT is not set
661CONFIG_SERIAL_CORE=y
662CONFIG_SERIAL_CORE_CONSOLE=y
663CONFIG_UNIX98_PTYS=y
664CONFIG_LEGACY_PTYS=y
665CONFIG_LEGACY_PTY_COUNT=256
666
667#
668# IPMI
669#
670# CONFIG_IPMI_HANDLER is not set
671
672#
673# Watchdog Cards
674#
675# CONFIG_WATCHDOG is not set
676# CONFIG_NVRAM is not set
677# CONFIG_DTLK is not set
678# CONFIG_R3964 is not set
679
680#
681# Ftape, the floppy tape device driver
682#
683
684#
685# PCMCIA character devices
686#
687# CONFIG_SYNCLINK_CS is not set
688# CONFIG_CARDMAN_4000 is not set
689# CONFIG_CARDMAN_4040 is not set
690# CONFIG_RAW_DRIVER is not set
691
692#
693# TPM devices
694#
695# CONFIG_TCG_TPM is not set
696# CONFIG_TELCLOCK is not set
697CONFIG_AT91_SPI=y
698CONFIG_AT91_SPIDEV=y
699
700#
701# I2C support
702#
703CONFIG_I2C=m
704CONFIG_I2C_CHARDEV=m
705
706#
707# I2C Algorithms
708#
709CONFIG_I2C_ALGOBIT=m
710CONFIG_I2C_ALGOPCF=m
711CONFIG_I2C_ALGOPCA=m
712
713#
714# I2C Hardware Bus support
715#
716CONFIG_I2C_AT91=m
717# CONFIG_I2C_PARPORT_LIGHT is not set
718# CONFIG_I2C_STUB is not set
719# CONFIG_I2C_PCA_ISA is not set
720
721#
722# Miscellaneous I2C Chip support
723#
724# CONFIG_SENSORS_DS1337 is not set
725# CONFIG_SENSORS_DS1374 is not set
726# CONFIG_SENSORS_EEPROM is not set
727# CONFIG_SENSORS_PCF8574 is not set
728# CONFIG_SENSORS_PCA9539 is not set
729# CONFIG_SENSORS_PCF8591 is not set
730# CONFIG_SENSORS_MAX6875 is not set
731# CONFIG_I2C_DEBUG_CORE is not set
732# CONFIG_I2C_DEBUG_ALGO is not set
733# CONFIG_I2C_DEBUG_BUS is not set
734# CONFIG_I2C_DEBUG_CHIP is not set
735
736#
737# SPI support
738#
739# CONFIG_SPI is not set
740# CONFIG_SPI_MASTER is not set
741
742#
743# Dallas's 1-wire bus
744#
745# CONFIG_W1 is not set
746
747#
748# Hardware Monitoring support
749#
750CONFIG_HWMON=y
751# CONFIG_HWMON_VID is not set
752# CONFIG_SENSORS_ADM1021 is not set
753# CONFIG_SENSORS_ADM1025 is not set
754# CONFIG_SENSORS_ADM1026 is not set
755# CONFIG_SENSORS_ADM1031 is not set
756# CONFIG_SENSORS_ADM9240 is not set
757# CONFIG_SENSORS_ASB100 is not set
758# CONFIG_SENSORS_ATXP1 is not set
759# CONFIG_SENSORS_DS1621 is not set
760# CONFIG_SENSORS_F71805F is not set
761# CONFIG_SENSORS_FSCHER is not set
762# CONFIG_SENSORS_FSCPOS is not set
763# CONFIG_SENSORS_GL518SM is not set
764# CONFIG_SENSORS_GL520SM is not set
765# CONFIG_SENSORS_IT87 is not set
766# CONFIG_SENSORS_LM63 is not set
767# CONFIG_SENSORS_LM75 is not set
768# CONFIG_SENSORS_LM77 is not set
769# CONFIG_SENSORS_LM78 is not set
770# CONFIG_SENSORS_LM80 is not set
771# CONFIG_SENSORS_LM83 is not set
772# CONFIG_SENSORS_LM85 is not set
773# CONFIG_SENSORS_LM87 is not set
774# CONFIG_SENSORS_LM90 is not set
775# CONFIG_SENSORS_LM92 is not set
776# CONFIG_SENSORS_MAX1619 is not set
777# CONFIG_SENSORS_PC87360 is not set
778# CONFIG_SENSORS_SMSC47M1 is not set
779# CONFIG_SENSORS_SMSC47B397 is not set
780# CONFIG_SENSORS_W83781D is not set
781# CONFIG_SENSORS_W83792D is not set
782# CONFIG_SENSORS_W83L785TS is not set
783# CONFIG_SENSORS_W83627HF is not set
784# CONFIG_SENSORS_W83627EHF is not set
785# CONFIG_HWMON_DEBUG_CHIP is not set
786
787#
788# Misc devices
789#
790
791#
792# LED devices
793#
794# CONFIG_NEW_LEDS is not set
795
796#
797# LED drivers
798#
799
800#
801# LED Triggers
802#
803
804#
805# Multimedia devices
806#
807# CONFIG_VIDEO_DEV is not set
808
809#
810# Digital Video Broadcasting Devices
811#
812# CONFIG_DVB is not set
813# CONFIG_USB_DABUSB is not set
814
815#
816# Graphics support
817#
818# CONFIG_FB is not set
819
820#
821# Console display driver support
822#
823# CONFIG_VGA_CONSOLE is not set
824CONFIG_DUMMY_CONSOLE=y
825
826#
827# Sound
828#
829CONFIG_SOUND=y
830
831#
832# Advanced Linux Sound Architecture
833#
834# CONFIG_SND is not set
835
836#
837# Open Sound System
838#
839# CONFIG_SOUND_PRIME is not set
840
841#
842# USB support
843#
844CONFIG_USB_ARCH_HAS_HCD=y
845CONFIG_USB_ARCH_HAS_OHCI=y
846# CONFIG_USB_ARCH_HAS_EHCI is not set
847CONFIG_USB=y
848# CONFIG_USB_DEBUG is not set
849
850#
851# Miscellaneous USB options
852#
853CONFIG_USB_DEVICEFS=y
854# CONFIG_USB_BANDWIDTH is not set
855# CONFIG_USB_DYNAMIC_MINORS is not set
856# CONFIG_USB_SUSPEND is not set
857# CONFIG_USB_OTG is not set
858
859#
860# USB Host Controller Drivers
861#
862# CONFIG_USB_ISP116X_HCD is not set
863CONFIG_USB_OHCI_HCD=y
864# CONFIG_USB_OHCI_BIG_ENDIAN is not set
865CONFIG_USB_OHCI_LITTLE_ENDIAN=y
866# CONFIG_USB_SL811_HCD is not set
867
868#
869# USB Device Class drivers
870#
871CONFIG_USB_ACM=m
872CONFIG_USB_PRINTER=m
873
874#
875# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
876#
877
878#
879# may also be needed; see USB_STORAGE Help for more information
880#
881CONFIG_USB_STORAGE=m
882# CONFIG_USB_STORAGE_DEBUG is not set
883CONFIG_USB_STORAGE_DATAFAB=y
884CONFIG_USB_STORAGE_FREECOM=y
885CONFIG_USB_STORAGE_DPCM=y
886CONFIG_USB_STORAGE_USBAT=y
887CONFIG_USB_STORAGE_SDDR09=y
888CONFIG_USB_STORAGE_SDDR55=y
889CONFIG_USB_STORAGE_JUMPSHOT=y
890# CONFIG_USB_STORAGE_ALAUDA is not set
891# CONFIG_USB_LIBUSUAL is not set
892
893#
894# USB Input Devices
895#
896CONFIG_USB_HID=m
897CONFIG_USB_HIDINPUT=y
898# CONFIG_USB_HIDINPUT_POWERBOOK is not set
899CONFIG_HID_FF=y
900CONFIG_HID_PID=y
901CONFIG_LOGITECH_FF=y
902CONFIG_THRUSTMASTER_FF=y
903CONFIG_USB_HIDDEV=y
904
905#
906# USB HID Boot Protocol drivers
907#
908# CONFIG_USB_KBD is not set
909# CONFIG_USB_MOUSE is not set
910# CONFIG_USB_AIPTEK is not set
911# CONFIG_USB_WACOM is not set
912# CONFIG_USB_ACECAD is not set
913# CONFIG_USB_KBTAB is not set
914# CONFIG_USB_POWERMATE is not set
915# CONFIG_USB_TOUCHSCREEN is not set
916# CONFIG_USB_YEALINK is not set
917# CONFIG_USB_XPAD is not set
918# CONFIG_USB_ATI_REMOTE is not set
919# CONFIG_USB_ATI_REMOTE2 is not set
920# CONFIG_USB_KEYSPAN_REMOTE is not set
921# CONFIG_USB_APPLETOUCH is not set
922
923#
924# USB Imaging devices
925#
926# CONFIG_USB_MDC800 is not set
927# CONFIG_USB_MICROTEK is not set
928
929#
930# USB Network Adapters
931#
932# CONFIG_USB_CATC is not set
933# CONFIG_USB_KAWETH is not set
934# CONFIG_USB_PEGASUS is not set
935# CONFIG_USB_RTL8150 is not set
936CONFIG_USB_USBNET=y
937CONFIG_USB_NET_AX8817X=y
938CONFIG_USB_NET_CDCETHER=y
939CONFIG_USB_NET_GL620A=y
940CONFIG_USB_NET_NET1080=y
941CONFIG_USB_NET_PLUSB=y
942CONFIG_USB_NET_RNDIS_HOST=y
943CONFIG_USB_NET_CDC_SUBSET=y
944CONFIG_USB_ALI_M5632=y
945CONFIG_USB_AN2720=y
946CONFIG_USB_BELKIN=y
947CONFIG_USB_ARMLINUX=y
948CONFIG_USB_EPSON2888=y
949CONFIG_USB_NET_ZAURUS=y
950# CONFIG_USB_ZD1201 is not set
951CONFIG_USB_MON=y
952
953#
954# USB port drivers
955#
956
957#
958# USB Serial Converter support
959#
960CONFIG_USB_SERIAL=m
961CONFIG_USB_SERIAL_GENERIC=y
962# CONFIG_USB_SERIAL_AIRPRIME is not set
963# CONFIG_USB_SERIAL_ANYDATA is not set
964# CONFIG_USB_SERIAL_BELKIN is not set
965# CONFIG_USB_SERIAL_WHITEHEAT is not set
966# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
967CONFIG_USB_SERIAL_CP2101=m
968# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
969# CONFIG_USB_SERIAL_EMPEG is not set
970CONFIG_USB_SERIAL_FTDI_SIO=m
971# CONFIG_USB_SERIAL_FUNSOFT is not set
972# CONFIG_USB_SERIAL_VISOR is not set
973# CONFIG_USB_SERIAL_IPAQ is not set
974# CONFIG_USB_SERIAL_IR is not set
975# CONFIG_USB_SERIAL_EDGEPORT is not set
976# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
977# CONFIG_USB_SERIAL_GARMIN is not set
978# CONFIG_USB_SERIAL_IPW is not set
979# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
980# CONFIG_USB_SERIAL_KEYSPAN is not set
981# CONFIG_USB_SERIAL_KLSI is not set
982# CONFIG_USB_SERIAL_KOBIL_SCT is not set
983# CONFIG_USB_SERIAL_MCT_U232 is not set
984# CONFIG_USB_SERIAL_NAVMAN is not set
985CONFIG_USB_SERIAL_PL2303=m
986# CONFIG_USB_SERIAL_HP4X is not set
987# CONFIG_USB_SERIAL_SAFE is not set
988# CONFIG_USB_SERIAL_TI is not set
989# CONFIG_USB_SERIAL_CYBERJACK is not set
990# CONFIG_USB_SERIAL_XIRCOM is not set
991# CONFIG_USB_SERIAL_OPTION is not set
992# CONFIG_USB_SERIAL_OMNINET 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_AUERSWALD is not set
1000# CONFIG_USB_RIO500 is not set
1001# CONFIG_USB_LEGOTOWER is not set
1002# CONFIG_USB_LCD is not set
1003# CONFIG_USB_LED is not set
1004# CONFIG_USB_CYTHERM is not set
1005# CONFIG_USB_PHIDGETKIT is not set
1006# CONFIG_USB_PHIDGETSERVO is not set
1007# CONFIG_USB_IDMOUSE is not set
1008# CONFIG_USB_LD is not set
1009# CONFIG_USB_TEST is not set
1010
1011#
1012# USB DSL modem support
1013#
1014
1015#
1016# USB Gadget Support
1017#
1018CONFIG_USB_GADGET=m
1019# CONFIG_USB_GADGET_DEBUG_FILES is not set
1020CONFIG_USB_GADGET_SELECTED=y
1021# CONFIG_USB_GADGET_NET2280 is not set
1022# CONFIG_USB_GADGET_PXA2XX is not set
1023# CONFIG_USB_GADGET_GOKU is not set
1024# CONFIG_USB_GADGET_LH7A40X is not set
1025# CONFIG_USB_GADGET_OMAP is not set
1026CONFIG_USB_GADGET_AT91=y
1027CONFIG_USB_AT91=m
1028# CONFIG_USB_GADGET_DUMMY_HCD is not set
1029# CONFIG_USB_GADGET_DUALSPEED is not set
1030# CONFIG_USB_ZERO is not set
1031CONFIG_USB_ETH=m
1032CONFIG_USB_ETH_RNDIS=y
1033CONFIG_USB_GADGETFS=m
1034CONFIG_USB_FILE_STORAGE=m
1035# CONFIG_USB_FILE_STORAGE_TEST is not set
1036CONFIG_USB_G_SERIAL=m
1037
1038#
1039# MMC/SD Card support
1040#
1041CONFIG_MMC=m
1042CONFIG_MMC_DEBUG=y
1043CONFIG_MMC_BLOCK=m
1044CONFIG_MMC_AT91RM9200=m
1045
1046#
1047# Real Time Clock
1048#
1049CONFIG_RTC_LIB=y
1050CONFIG_RTC_CLASS=y
1051# CONFIG_RTC_HCTOSYS is not set
1052
1053#
1054# RTC interfaces
1055#
1056CONFIG_RTC_INTF_SYSFS=y
1057CONFIG_RTC_INTF_PROC=y
1058CONFIG_RTC_INTF_DEV=y
1059
1060#
1061# RTC drivers
1062#
1063# CONFIG_RTC_DRV_X1205 is not set
1064# CONFIG_RTC_DRV_DS1672 is not set
1065# CONFIG_RTC_DRV_PCF8563 is not set
1066# CONFIG_RTC_DRV_RS5C372 is not set
1067# CONFIG_RTC_DRV_M48T86 is not set
1068CONFIG_RTC_DRV_AT91=y
1069# CONFIG_RTC_DRV_TEST is not set
1070
1071#
1072# File systems
1073#
1074CONFIG_EXT2_FS=m
1075# CONFIG_EXT2_FS_XATTR is not set
1076# CONFIG_EXT2_FS_XIP is not set
1077CONFIG_EXT3_FS=m
1078CONFIG_EXT3_FS_XATTR=y
1079# CONFIG_EXT3_FS_POSIX_ACL is not set
1080# CONFIG_EXT3_FS_SECURITY is not set
1081CONFIG_JBD=m
1082# CONFIG_JBD_DEBUG is not set
1083CONFIG_FS_MBCACHE=m
1084CONFIG_REISERFS_FS=m
1085# CONFIG_REISERFS_CHECK is not set
1086# CONFIG_REISERFS_PROC_INFO is not set
1087# CONFIG_REISERFS_FS_XATTR is not set
1088# CONFIG_JFS_FS is not set
1089CONFIG_FS_POSIX_ACL=y
1090# CONFIG_XFS_FS is not set
1091# CONFIG_OCFS2_FS is not set
1092# CONFIG_MINIX_FS is not set
1093# CONFIG_ROMFS_FS is not set
1094CONFIG_INOTIFY=y
1095# CONFIG_QUOTA is not set
1096CONFIG_DNOTIFY=y
1097# CONFIG_AUTOFS_FS is not set
1098# CONFIG_AUTOFS4_FS is not set
1099# CONFIG_FUSE_FS is not set
1100
1101#
1102# CD-ROM/DVD Filesystems
1103#
1104CONFIG_ISO9660_FS=m
1105CONFIG_JOLIET=y
1106CONFIG_ZISOFS=y
1107CONFIG_ZISOFS_FS=m
1108CONFIG_UDF_FS=m
1109CONFIG_UDF_NLS=y
1110
1111#
1112# DOS/FAT/NT Filesystems
1113#
1114CONFIG_FAT_FS=m
1115CONFIG_MSDOS_FS=m
1116CONFIG_VFAT_FS=m
1117CONFIG_FAT_DEFAULT_CODEPAGE=437
1118CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1119CONFIG_NTFS_FS=m
1120# CONFIG_NTFS_DEBUG is not set
1121CONFIG_NTFS_RW=y
1122
1123#
1124# Pseudo filesystems
1125#
1126CONFIG_PROC_FS=y
1127CONFIG_SYSFS=y
1128CONFIG_TMPFS=y
1129# CONFIG_HUGETLB_PAGE is not set
1130CONFIG_RAMFS=y
1131# CONFIG_CONFIGFS_FS is not set
1132
1133#
1134# Miscellaneous filesystems
1135#
1136# CONFIG_ADFS_FS is not set
1137# CONFIG_AFFS_FS is not set
1138# CONFIG_HFS_FS is not set
1139# CONFIG_HFSPLUS_FS is not set
1140# CONFIG_BEFS_FS is not set
1141# CONFIG_BFS_FS is not set
1142# CONFIG_EFS_FS is not set
1143# CONFIG_JFFS_FS is not set
1144# CONFIG_JFFS2_FS is not set
1145CONFIG_CRAMFS=y
1146# CONFIG_VXFS_FS is not set
1147# CONFIG_HPFS_FS is not set
1148# CONFIG_QNX4FS_FS is not set
1149# CONFIG_SYSV_FS is not set
1150# CONFIG_UFS_FS is not set
1151
1152#
1153# Network File Systems
1154#
1155CONFIG_NFS_FS=m
1156CONFIG_NFS_V3=y
1157CONFIG_NFS_V3_ACL=y
1158CONFIG_NFS_V4=y
1159CONFIG_NFS_DIRECTIO=y
1160CONFIG_NFSD=m
1161CONFIG_NFSD_V3=y
1162# CONFIG_NFSD_V3_ACL is not set
1163CONFIG_NFSD_V4=y
1164CONFIG_NFSD_TCP=y
1165CONFIG_LOCKD=m
1166CONFIG_LOCKD_V4=y
1167CONFIG_EXPORTFS=m
1168CONFIG_NFS_ACL_SUPPORT=m
1169CONFIG_NFS_COMMON=y
1170CONFIG_SUNRPC=m
1171CONFIG_SUNRPC_GSS=m
1172CONFIG_RPCSEC_GSS_KRB5=m
1173# CONFIG_RPCSEC_GSS_SPKM3 is not set
1174# CONFIG_SMB_FS is not set
1175# CONFIG_CIFS is not set
1176# CONFIG_NCP_FS is not set
1177# CONFIG_CODA_FS is not set
1178# CONFIG_AFS_FS is not set
1179# CONFIG_9P_FS is not set
1180
1181#
1182# Partition Types
1183#
1184CONFIG_PARTITION_ADVANCED=y
1185# CONFIG_ACORN_PARTITION is not set
1186# CONFIG_OSF_PARTITION is not set
1187# CONFIG_AMIGA_PARTITION is not set
1188# CONFIG_ATARI_PARTITION is not set
1189CONFIG_MAC_PARTITION=y
1190CONFIG_MSDOS_PARTITION=y
1191CONFIG_BSD_DISKLABEL=y
1192CONFIG_MINIX_SUBPARTITION=y
1193CONFIG_SOLARIS_X86_PARTITION=y
1194CONFIG_UNIXWARE_DISKLABEL=y
1195# CONFIG_LDM_PARTITION is not set
1196# CONFIG_SGI_PARTITION is not set
1197# CONFIG_ULTRIX_PARTITION is not set
1198# CONFIG_SUN_PARTITION is not set
1199# CONFIG_KARMA_PARTITION is not set
1200# CONFIG_EFI_PARTITION is not set
1201
1202#
1203# Native Language Support
1204#
1205CONFIG_NLS=m
1206CONFIG_NLS_DEFAULT="iso8859-1"
1207# CONFIG_NLS_CODEPAGE_437 is not set
1208# CONFIG_NLS_CODEPAGE_737 is not set
1209# CONFIG_NLS_CODEPAGE_775 is not set
1210# CONFIG_NLS_CODEPAGE_850 is not set
1211# CONFIG_NLS_CODEPAGE_852 is not set
1212# CONFIG_NLS_CODEPAGE_855 is not set
1213# CONFIG_NLS_CODEPAGE_857 is not set
1214# CONFIG_NLS_CODEPAGE_860 is not set
1215# CONFIG_NLS_CODEPAGE_861 is not set
1216# CONFIG_NLS_CODEPAGE_862 is not set
1217# CONFIG_NLS_CODEPAGE_863 is not set
1218# CONFIG_NLS_CODEPAGE_864 is not set
1219# CONFIG_NLS_CODEPAGE_865 is not set
1220# CONFIG_NLS_CODEPAGE_866 is not set
1221# CONFIG_NLS_CODEPAGE_869 is not set
1222# CONFIG_NLS_CODEPAGE_936 is not set
1223# CONFIG_NLS_CODEPAGE_950 is not set
1224CONFIG_NLS_CODEPAGE_932=m
1225# CONFIG_NLS_CODEPAGE_949 is not set
1226# CONFIG_NLS_CODEPAGE_874 is not set
1227# CONFIG_NLS_ISO8859_8 is not set
1228# CONFIG_NLS_CODEPAGE_1250 is not set
1229# CONFIG_NLS_CODEPAGE_1251 is not set
1230CONFIG_NLS_ASCII=m
1231# CONFIG_NLS_ISO8859_1 is not set
1232# CONFIG_NLS_ISO8859_2 is not set
1233# CONFIG_NLS_ISO8859_3 is not set
1234# CONFIG_NLS_ISO8859_4 is not set
1235# CONFIG_NLS_ISO8859_5 is not set
1236# CONFIG_NLS_ISO8859_6 is not set
1237# CONFIG_NLS_ISO8859_7 is not set
1238# CONFIG_NLS_ISO8859_9 is not set
1239# CONFIG_NLS_ISO8859_13 is not set
1240# CONFIG_NLS_ISO8859_14 is not set
1241CONFIG_NLS_ISO8859_15=m
1242# CONFIG_NLS_KOI8_R is not set
1243# CONFIG_NLS_KOI8_U is not set
1244CONFIG_NLS_UTF8=m
1245
1246#
1247# Profiling support
1248#
1249CONFIG_PROFILING=y
1250CONFIG_OPROFILE=m
1251
1252#
1253# Kernel hacking
1254#
1255# CONFIG_PRINTK_TIME is not set
1256# CONFIG_MAGIC_SYSRQ is not set
1257# CONFIG_DEBUG_KERNEL is not set
1258CONFIG_LOG_BUF_SHIFT=14
1259# CONFIG_DEBUG_BUGVERBOSE is not set
1260# CONFIG_DEBUG_FS is not set
1261CONFIG_FRAME_POINTER=y
1262# CONFIG_UNWIND_INFO is not set
1263# CONFIG_DEBUG_USER is not set
1264
1265#
1266# Security options
1267#
1268# CONFIG_KEYS is not set
1269# CONFIG_SECURITY is not set
1270
1271#
1272# Cryptographic options
1273#
1274CONFIG_CRYPTO=y
1275# CONFIG_CRYPTO_HMAC is not set
1276# CONFIG_CRYPTO_NULL is not set
1277# CONFIG_CRYPTO_MD4 is not set
1278CONFIG_CRYPTO_MD5=y
1279# CONFIG_CRYPTO_SHA1 is not set
1280# CONFIG_CRYPTO_SHA256 is not set
1281# CONFIG_CRYPTO_SHA512 is not set
1282# CONFIG_CRYPTO_WP512 is not set
1283# CONFIG_CRYPTO_TGR192 is not set
1284CONFIG_CRYPTO_DES=m
1285# CONFIG_CRYPTO_BLOWFISH is not set
1286# CONFIG_CRYPTO_TWOFISH is not set
1287# CONFIG_CRYPTO_SERPENT is not set
1288CONFIG_CRYPTO_AES=m
1289# CONFIG_CRYPTO_CAST5 is not set
1290# CONFIG_CRYPTO_CAST6 is not set
1291# CONFIG_CRYPTO_TEA is not set
1292CONFIG_CRYPTO_ARC4=m
1293# CONFIG_CRYPTO_KHAZAD is not set
1294# CONFIG_CRYPTO_ANUBIS is not set
1295# CONFIG_CRYPTO_DEFLATE is not set
1296CONFIG_CRYPTO_MICHAEL_MIC=m
1297# CONFIG_CRYPTO_CRC32C is not set
1298# CONFIG_CRYPTO_TEST is not set
1299
1300#
1301# Hardware crypto devices
1302#
1303
1304#
1305# Library routines
1306#
1307CONFIG_CRC_CCITT=m
1308CONFIG_CRC16=m
1309CONFIG_CRC32=y
1310CONFIG_LIBCRC32C=m
1311CONFIG_ZLIB_INFLATE=y
1312CONFIG_ZLIB_DEFLATE=m
diff --git a/arch/arm/configs/carmeva_defconfig b/arch/arm/configs/carmeva_defconfig
new file mode 100644
index 000000000000..5ccd29a7c1fb
--- /dev/null
+++ b/arch/arm/configs/carmeva_defconfig
@@ -0,0 +1,723 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.12-rc4
4# Tue Jun 14 12:05:24 2005
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_GENERIC_IOMAP=y
12
13#
14# Code maturity level options
15#
16CONFIG_EXPERIMENTAL=y
17CONFIG_CLEAN_COMPILE=y
18CONFIG_BROKEN_ON_SMP=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20
21#
22# General setup
23#
24CONFIG_LOCALVERSION=""
25CONFIG_SWAP=y
26# CONFIG_SYSVIPC is not set
27# CONFIG_POSIX_MQUEUE is not set
28# CONFIG_BSD_PROCESS_ACCT is not set
29# CONFIG_SYSCTL is not set
30# CONFIG_AUDIT is not set
31# CONFIG_HOTPLUG is not set
32CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set
34CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_EXTRA_PASS is not set
37CONFIG_PRINTK=y
38CONFIG_BUG=y
39CONFIG_BASE_FULL=y
40CONFIG_FUTEX=y
41CONFIG_EPOLL=y
42CONFIG_CC_OPTIMIZE_FOR_SIZE=y
43CONFIG_SHMEM=y
44CONFIG_CC_ALIGN_FUNCTIONS=0
45CONFIG_CC_ALIGN_LABELS=0
46CONFIG_CC_ALIGN_LOOPS=0
47CONFIG_CC_ALIGN_JUMPS=0
48# CONFIG_TINY_SHMEM is not set
49CONFIG_BASE_SMALL=0
50
51#
52# Loadable module support
53#
54CONFIG_MODULES=y
55CONFIG_MODULE_UNLOAD=y
56CONFIG_MODULE_FORCE_UNLOAD=y
57CONFIG_OBSOLETE_MODPARM=y
58# CONFIG_MODVERSIONS is not set
59# CONFIG_MODULE_SRCVERSION_ALL is not set
60# CONFIG_KMOD is not set
61
62#
63# System Type
64#
65# CONFIG_ARCH_CLPS7500 is not set
66# CONFIG_ARCH_CLPS711X is not set
67# CONFIG_ARCH_CO285 is not set
68# CONFIG_ARCH_EBSA110 is not set
69# CONFIG_ARCH_FOOTBRIDGE is not set
70# CONFIG_ARCH_INTEGRATOR is not set
71# CONFIG_ARCH_IOP3XX is not set
72# CONFIG_ARCH_IXP4XX is not set
73# CONFIG_ARCH_IXP2000 is not set
74# CONFIG_ARCH_L7200 is not set
75# CONFIG_ARCH_PXA is not set
76# CONFIG_ARCH_RPC is not set
77# CONFIG_ARCH_SA1100 is not set
78# CONFIG_ARCH_S3C2410 is not set
79# CONFIG_ARCH_SHARK is not set
80# CONFIG_ARCH_LH7A40X is not set
81# CONFIG_ARCH_OMAP is not set
82# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set
85CONFIG_ARCH_AT91RM9200=y
86
87#
88# AT91RM9200 Implementations
89#
90# CONFIG_ARCH_AT91RM9200DK is not set
91# CONFIG_MACH_AT91RM9200EK is not set
92# CONFIG_MACH_CSB337 is not set
93# CONFIG_MACH_CSB637 is not set
94CONFIG_MACH_CARMEVA=y
95
96#
97# Processor Type
98#
99CONFIG_CPU_32=y
100CONFIG_CPU_ARM920T=y
101CONFIG_CPU_32v4=y
102CONFIG_CPU_ABRT_EV4T=y
103CONFIG_CPU_CACHE_V4WT=y
104CONFIG_CPU_CACHE_VIVT=y
105CONFIG_CPU_COPY_V4WB=y
106CONFIG_CPU_TLB_V4WBI=y
107
108#
109# Processor Features
110#
111CONFIG_ARM_THUMB=y
112# CONFIG_CPU_ICACHE_DISABLE is not set
113# CONFIG_CPU_DCACHE_DISABLE is not set
114# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
115
116#
117# Bus support
118#
119CONFIG_ISA_DMA_API=y
120
121#
122# PCCARD (PCMCIA/CardBus) support
123#
124# CONFIG_PCCARD is not set
125
126#
127# Kernel Features
128#
129# CONFIG_SMP is not set
130# CONFIG_PREEMPT is not set
131# CONFIG_DISCONTIGMEM is not set
132# CONFIG_LEDS is not set
133CONFIG_ALIGNMENT_TRAP=y
134
135#
136# Boot options
137#
138CONFIG_ZBOOT_ROM_TEXT=0x0
139CONFIG_ZBOOT_ROM_BSS=0x0
140CONFIG_CMDLINE=""
141# CONFIG_XIP_KERNEL is not set
142
143#
144# Floating point emulation
145#
146
147#
148# At least one emulation must be selected
149#
150CONFIG_FPE_NWFPE=y
151# CONFIG_FPE_NWFPE_XP is not set
152# CONFIG_FPE_FASTFPE is not set
153
154#
155# Userspace binary formats
156#
157CONFIG_BINFMT_ELF=y
158# CONFIG_BINFMT_AOUT is not set
159# CONFIG_BINFMT_MISC is not set
160# CONFIG_ARTHUR is not set
161
162#
163# Power management options
164#
165# CONFIG_PM is not set
166
167#
168# Device Drivers
169#
170
171#
172# Generic Driver Options
173#
174CONFIG_STANDALONE=y
175CONFIG_PREVENT_FIRMWARE_BUILD=y
176# CONFIG_FW_LOADER is not set
177
178#
179# Memory Technology Devices (MTD)
180#
181CONFIG_MTD=y
182# CONFIG_MTD_DEBUG is not set
183# CONFIG_MTD_CONCAT is not set
184CONFIG_MTD_PARTITIONS=y
185# CONFIG_MTD_REDBOOT_PARTS is not set
186CONFIG_MTD_CMDLINE_PARTS=y
187# CONFIG_MTD_AFS_PARTS is not set
188
189#
190# User Modules And Translation Layers
191#
192CONFIG_MTD_CHAR=y
193CONFIG_MTD_BLOCK=y
194# CONFIG_FTL is not set
195# CONFIG_NFTL is not set
196# CONFIG_INFTL is not set
197
198#
199# RAM/ROM/Flash chip drivers
200#
201# CONFIG_MTD_CFI is not set
202# CONFIG_MTD_JEDECPROBE is not set
203CONFIG_MTD_MAP_BANK_WIDTH_1=y
204CONFIG_MTD_MAP_BANK_WIDTH_2=y
205CONFIG_MTD_MAP_BANK_WIDTH_4=y
206# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
207# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
208# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
209CONFIG_MTD_CFI_I1=y
210CONFIG_MTD_CFI_I2=y
211# CONFIG_MTD_CFI_I4 is not set
212# CONFIG_MTD_CFI_I8 is not set
213# CONFIG_MTD_RAM is not set
214# CONFIG_MTD_ROM is not set
215# CONFIG_MTD_ABSENT is not set
216
217#
218# Mapping drivers for chip access
219#
220# CONFIG_MTD_COMPLEX_MAPPINGS is not set
221
222#
223# Self-contained MTD device drivers
224#
225# CONFIG_MTD_SLRAM is not set
226# CONFIG_MTD_PHRAM is not set
227# CONFIG_MTD_MTDRAM is not set
228# CONFIG_MTD_BLKMTD is not set
229# CONFIG_MTD_BLOCK2MTD is not set
230
231#
232# Disk-On-Chip Device Drivers
233#
234# CONFIG_MTD_DOC2000 is not set
235# CONFIG_MTD_DOC2001 is not set
236# CONFIG_MTD_DOC2001PLUS is not set
237CONFIG_MTD_AT91_DATAFLASH=y
238# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
239
240#
241# NAND Flash Device Drivers
242#
243# CONFIG_MTD_NAND is not set
244
245#
246# Parallel port support
247#
248# CONFIG_PARPORT is not set
249
250#
251# Plug and Play support
252#
253
254#
255# Block devices
256#
257# CONFIG_BLK_DEV_COW_COMMON is not set
258# CONFIG_BLK_DEV_LOOP is not set
259# CONFIG_BLK_DEV_NBD is not set
260CONFIG_BLK_DEV_RAM=y
261CONFIG_BLK_DEV_RAM_COUNT=16
262CONFIG_BLK_DEV_RAM_SIZE=4096
263CONFIG_BLK_DEV_INITRD=y
264CONFIG_INITRAMFS_SOURCE=""
265# CONFIG_CDROM_PKTCDVD is not set
266
267#
268# IO Schedulers
269#
270CONFIG_IOSCHED_NOOP=y
271CONFIG_IOSCHED_AS=y
272CONFIG_IOSCHED_DEADLINE=y
273CONFIG_IOSCHED_CFQ=y
274# CONFIG_ATA_OVER_ETH is not set
275
276#
277# SCSI device support
278#
279# CONFIG_SCSI is not set
280
281#
282# Multi-device support (RAID and LVM)
283#
284# CONFIG_MD is not set
285
286#
287# Fusion MPT device support
288#
289
290#
291# IEEE 1394 (FireWire) support
292#
293
294#
295# I2O device support
296#
297
298#
299# Networking support
300#
301CONFIG_NET=y
302
303#
304# Networking options
305#
306# CONFIG_PACKET is not set
307CONFIG_UNIX=y
308# CONFIG_NET_KEY is not set
309CONFIG_INET=y
310CONFIG_IP_MULTICAST=y
311# CONFIG_IP_ADVANCED_ROUTER is not set
312CONFIG_IP_PNP=y
313# CONFIG_IP_PNP_DHCP is not set
314# CONFIG_IP_PNP_BOOTP is not set
315# CONFIG_IP_PNP_RARP is not set
316# CONFIG_NET_IPIP is not set
317# CONFIG_NET_IPGRE is not set
318# CONFIG_IP_MROUTE is not set
319# CONFIG_ARPD is not set
320# CONFIG_SYN_COOKIES is not set
321# CONFIG_INET_AH is not set
322# CONFIG_INET_ESP is not set
323# CONFIG_INET_IPCOMP is not set
324# CONFIG_INET_TUNNEL is not set
325CONFIG_IP_TCPDIAG=y
326# CONFIG_IP_TCPDIAG_IPV6 is not set
327# CONFIG_IPV6 is not set
328# CONFIG_NETFILTER is not set
329
330#
331# SCTP Configuration (EXPERIMENTAL)
332#
333# CONFIG_IP_SCTP is not set
334# CONFIG_ATM is not set
335# CONFIG_BRIDGE is not set
336# CONFIG_VLAN_8021Q is not set
337# CONFIG_DECNET is not set
338# CONFIG_LLC2 is not set
339# CONFIG_IPX is not set
340# CONFIG_ATALK is not set
341# CONFIG_X25 is not set
342# CONFIG_LAPB is not set
343# CONFIG_NET_DIVERT is not set
344# CONFIG_ECONET is not set
345# CONFIG_WAN_ROUTER is not set
346
347#
348# QoS and/or fair queueing
349#
350# CONFIG_NET_SCHED is not set
351# CONFIG_NET_CLS_ROUTE is not set
352
353#
354# Network testing
355#
356# CONFIG_NET_PKTGEN is not set
357# CONFIG_NETPOLL is not set
358# CONFIG_NET_POLL_CONTROLLER is not set
359# CONFIG_HAMRADIO is not set
360# CONFIG_IRDA is not set
361# CONFIG_BT is not set
362CONFIG_NETDEVICES=y
363# CONFIG_DUMMY is not set
364# CONFIG_BONDING is not set
365# CONFIG_EQUALIZER is not set
366# CONFIG_TUN is not set
367
368#
369# Ethernet (10 or 100Mbit)
370#
371CONFIG_NET_ETHERNET=y
372CONFIG_MII=y
373CONFIG_ARM_AT91_ETHER=y
374CONFIG_ARM_AT91_ETHER_RMII=y
375# CONFIG_SMC91X is not set
376
377#
378# Ethernet (1000 Mbit)
379#
380
381#
382# Ethernet (10000 Mbit)
383#
384
385#
386# Token Ring devices
387#
388
389#
390# Wireless LAN (non-hamradio)
391#
392# CONFIG_NET_RADIO is not set
393
394#
395# Wan interfaces
396#
397# CONFIG_WAN is not set
398# CONFIG_PPP is not set
399# CONFIG_SLIP is not set
400# CONFIG_SHAPER is not set
401# CONFIG_NETCONSOLE is not set
402
403#
404# ISDN subsystem
405#
406# CONFIG_ISDN is not set
407
408#
409# Input device support
410#
411CONFIG_INPUT=y
412
413#
414# Userland interfaces
415#
416# CONFIG_INPUT_MOUSEDEV is not set
417# CONFIG_INPUT_JOYDEV is not set
418# CONFIG_INPUT_TSDEV is not set
419# CONFIG_INPUT_EVDEV is not set
420# CONFIG_INPUT_EVBUG is not set
421
422#
423# Input Device Drivers
424#
425# CONFIG_INPUT_KEYBOARD is not set
426# CONFIG_INPUT_MOUSE is not set
427# CONFIG_INPUT_JOYSTICK is not set
428# CONFIG_INPUT_TOUCHSCREEN is not set
429# CONFIG_INPUT_MISC is not set
430
431#
432# Hardware I/O ports
433#
434CONFIG_SERIO=m
435CONFIG_SERIO_SERPORT=m
436# CONFIG_SERIO_LIBPS2 is not set
437# CONFIG_SERIO_RAW is not set
438# CONFIG_GAMEPORT is not set
439CONFIG_SOUND_GAMEPORT=y
440
441#
442# Character devices
443#
444CONFIG_VT=y
445CONFIG_VT_CONSOLE=y
446CONFIG_HW_CONSOLE=y
447# CONFIG_SERIAL_NONSTANDARD is not set
448
449#
450# Serial drivers
451#
452# CONFIG_SERIAL_8250 is not set
453
454#
455# Non-8250 serial port support
456#
457CONFIG_SERIAL_AT91=y
458CONFIG_SERIAL_AT91_CONSOLE=y
459CONFIG_SERIAL_CORE=y
460CONFIG_SERIAL_CORE_CONSOLE=y
461CONFIG_UNIX98_PTYS=y
462CONFIG_LEGACY_PTYS=y
463CONFIG_LEGACY_PTY_COUNT=256
464
465#
466# IPMI
467#
468# CONFIG_IPMI_HANDLER is not set
469
470#
471# Watchdog Cards
472#
473# CONFIG_WATCHDOG is not set
474# CONFIG_NVRAM is not set
475# CONFIG_RTC is not set
476# CONFIG_AT91_RTC is not set
477# CONFIG_DTLK is not set
478# CONFIG_R3964 is not set
479
480#
481# Ftape, the floppy tape device driver
482#
483# CONFIG_DRM is not set
484# CONFIG_RAW_DRIVER is not set
485
486#
487# TPM devices
488#
489CONFIG_AT91_SPI=y
490CONFIG_AT91_SPIDEV=y
491
492#
493# I2C support
494#
495# CONFIG_I2C is not set
496
497#
498# Misc devices
499#
500
501#
502# Multimedia devices
503#
504# CONFIG_VIDEO_DEV is not set
505
506#
507# Digital Video Broadcasting Devices
508#
509# CONFIG_DVB is not set
510
511#
512# Graphics support
513#
514# CONFIG_FB is not set
515
516#
517# Console display driver support
518#
519# CONFIG_VGA_CONSOLE is not set
520CONFIG_DUMMY_CONSOLE=y
521
522#
523# Sound
524#
525# CONFIG_SOUND is not set
526
527#
528# USB support
529#
530CONFIG_USB_ARCH_HAS_HCD=y
531CONFIG_USB_ARCH_HAS_OHCI=y
532# CONFIG_USB is not set
533
534#
535# USB Gadget Support
536#
537# CONFIG_USB_GADGET is not set
538
539#
540# MMC/SD Card support
541#
542CONFIG_MMC=m
543CONFIG_MMC_DEBUG=y
544CONFIG_MMC_BLOCK=m
545CONFIG_MMC_AT91RM9200=m
546
547#
548# File systems
549#
550CONFIG_EXT2_FS=y
551CONFIG_EXT2_FS_XATTR=y
552# CONFIG_EXT2_FS_POSIX_ACL is not set
553# CONFIG_EXT2_FS_SECURITY is not set
554# CONFIG_EXT3_FS is not set
555# CONFIG_JBD is not set
556CONFIG_FS_MBCACHE=y
557# CONFIG_REISERFS_FS is not set
558# CONFIG_JFS_FS is not set
559
560#
561# XFS support
562#
563# CONFIG_XFS_FS is not set
564# CONFIG_MINIX_FS is not set
565# CONFIG_ROMFS_FS is not set
566# CONFIG_QUOTA is not set
567# CONFIG_DNOTIFY is not set
568# CONFIG_AUTOFS_FS is not set
569# CONFIG_AUTOFS4_FS is not set
570
571#
572# CD-ROM/DVD Filesystems
573#
574# CONFIG_ISO9660_FS is not set
575# CONFIG_UDF_FS is not set
576
577#
578# DOS/FAT/NT Filesystems
579#
580# CONFIG_MSDOS_FS is not set
581# CONFIG_VFAT_FS is not set
582# CONFIG_NTFS_FS is not set
583
584#
585# Pseudo filesystems
586#
587CONFIG_PROC_FS=y
588CONFIG_SYSFS=y
589# CONFIG_DEVFS_FS is not set
590CONFIG_DEVPTS_FS_XATTR=y
591CONFIG_DEVPTS_FS_SECURITY=y
592# CONFIG_TMPFS is not set
593# CONFIG_HUGETLB_PAGE is not set
594CONFIG_RAMFS=y
595
596#
597# Miscellaneous filesystems
598#
599# CONFIG_ADFS_FS is not set
600# CONFIG_AFFS_FS is not set
601# CONFIG_HFS_FS is not set
602# CONFIG_HFSPLUS_FS is not set
603# CONFIG_BEFS_FS is not set
604# CONFIG_BFS_FS is not set
605# CONFIG_EFS_FS is not set
606CONFIG_JFFS_FS=y
607CONFIG_JFFS_FS_VERBOSE=0
608CONFIG_JFFS_PROC_FS=y
609CONFIG_JFFS2_FS=y
610CONFIG_JFFS2_FS_DEBUG=0
611CONFIG_JFFS2_FS_NAND=y
612# CONFIG_JFFS2_FS_NOR_ECC is not set
613CONFIG_JFFS2_COMPRESSION_OPTIONS=y
614CONFIG_JFFS2_ZLIB=y
615CONFIG_JFFS2_RTIME=y
616# CONFIG_JFFS2_RUBIN is not set
617# CONFIG_JFFS2_CMODE_NONE is not set
618CONFIG_JFFS2_CMODE_PRIORITY=y
619# CONFIG_JFFS2_CMODE_SIZE is not set
620# CONFIG_CRAMFS is not set
621# CONFIG_VXFS_FS is not set
622# CONFIG_HPFS_FS is not set
623# CONFIG_QNX4FS_FS is not set
624# CONFIG_SYSV_FS is not set
625# CONFIG_UFS_FS is not set
626
627#
628# Network File Systems
629#
630CONFIG_NFS_FS=y
631CONFIG_NFS_V3=y
632CONFIG_NFS_V4=y
633# CONFIG_NFS_DIRECTIO is not set
634CONFIG_NFSD=y
635# CONFIG_NFSD_V3 is not set
636CONFIG_NFSD_TCP=y
637CONFIG_ROOT_NFS=y
638CONFIG_LOCKD=y
639CONFIG_LOCKD_V4=y
640CONFIG_EXPORTFS=y
641CONFIG_SUNRPC=y
642CONFIG_SUNRPC_GSS=y
643CONFIG_RPCSEC_GSS_KRB5=y
644# CONFIG_RPCSEC_GSS_SPKM3 is not set
645# CONFIG_SMB_FS is not set
646# CONFIG_CIFS is not set
647# CONFIG_NCP_FS is not set
648# CONFIG_CODA_FS is not set
649# CONFIG_AFS_FS is not set
650
651#
652# Partition Types
653#
654# CONFIG_PARTITION_ADVANCED is not set
655CONFIG_MSDOS_PARTITION=y
656
657#
658# Native Language Support
659#
660# CONFIG_NLS is not set
661
662#
663# Profiling support
664#
665# CONFIG_PROFILING is not set
666
667#
668# Kernel hacking
669#
670# CONFIG_PRINTK_TIME is not set
671# CONFIG_DEBUG_KERNEL is not set
672CONFIG_LOG_BUF_SHIFT=14
673# CONFIG_DEBUG_BUGVERBOSE is not set
674CONFIG_FRAME_POINTER=y
675# CONFIG_DEBUG_USER is not set
676
677#
678# Security options
679#
680# CONFIG_KEYS is not set
681# CONFIG_SECURITY is not set
682
683#
684# Cryptographic options
685#
686CONFIG_CRYPTO=y
687# CONFIG_CRYPTO_HMAC is not set
688# CONFIG_CRYPTO_NULL is not set
689# CONFIG_CRYPTO_MD4 is not set
690CONFIG_CRYPTO_MD5=y
691# CONFIG_CRYPTO_SHA1 is not set
692# CONFIG_CRYPTO_SHA256 is not set
693# CONFIG_CRYPTO_SHA512 is not set
694# CONFIG_CRYPTO_WP512 is not set
695# CONFIG_CRYPTO_TGR192 is not set
696CONFIG_CRYPTO_DES=y
697# CONFIG_CRYPTO_BLOWFISH is not set
698# CONFIG_CRYPTO_TWOFISH is not set
699# CONFIG_CRYPTO_SERPENT is not set
700# CONFIG_CRYPTO_AES is not set
701# CONFIG_CRYPTO_CAST5 is not set
702# CONFIG_CRYPTO_CAST6 is not set
703# CONFIG_CRYPTO_TEA is not set
704# CONFIG_CRYPTO_ARC4 is not set
705# CONFIG_CRYPTO_KHAZAD is not set
706# CONFIG_CRYPTO_ANUBIS is not set
707# CONFIG_CRYPTO_DEFLATE is not set
708# CONFIG_CRYPTO_MICHAEL_MIC is not set
709# CONFIG_CRYPTO_CRC32C is not set
710# CONFIG_CRYPTO_TEST is not set
711
712#
713# Hardware crypto devices
714#
715
716#
717# Library routines
718#
719# CONFIG_CRC_CCITT is not set
720CONFIG_CRC32=y
721# CONFIG_LIBCRC32C is not set
722CONFIG_ZLIB_INFLATE=y
723CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/arm/configs/kafa_defconfig b/arch/arm/configs/kafa_defconfig
new file mode 100644
index 000000000000..51ded20e3f64
--- /dev/null
+++ b/arch/arm/configs/kafa_defconfig
@@ -0,0 +1,884 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc3
4# Sun May 7 16:54:53 2006
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_VECTORS_BASE=0xffff0000
12
13#
14# Code maturity level options
15#
16CONFIG_EXPERIMENTAL=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20
21#
22# General setup
23#
24CONFIG_LOCALVERSION=""
25# CONFIG_LOCALVERSION_AUTO is not set
26# CONFIG_SWAP is not set
27CONFIG_SYSVIPC=y
28# CONFIG_POSIX_MQUEUE is not set
29# CONFIG_BSD_PROCESS_ACCT is not set
30CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set
32# CONFIG_IKCONFIG is not set
33# CONFIG_RELAY is not set
34CONFIG_INITRAMFS_SOURCE=""
35CONFIG_UID16=y
36CONFIG_CC_OPTIMIZE_FOR_SIZE=y
37# CONFIG_EMBEDDED is not set
38CONFIG_KALLSYMS=y
39# CONFIG_KALLSYMS_EXTRA_PASS is not set
40CONFIG_HOTPLUG=y
41CONFIG_PRINTK=y
42CONFIG_BUG=y
43CONFIG_ELF_CORE=y
44CONFIG_BASE_FULL=y
45CONFIG_FUTEX=y
46CONFIG_EPOLL=y
47CONFIG_SHMEM=y
48CONFIG_SLAB=y
49# CONFIG_TINY_SHMEM is not set
50CONFIG_BASE_SMALL=0
51# CONFIG_SLOB is not set
52
53#
54# Loadable module support
55#
56CONFIG_MODULES=y
57CONFIG_MODULE_UNLOAD=y
58# CONFIG_MODULE_FORCE_UNLOAD is not set
59# CONFIG_MODVERSIONS is not set
60# CONFIG_MODULE_SRCVERSION_ALL is not set
61# CONFIG_KMOD is not set
62
63#
64# Block layer
65#
66# CONFIG_BLK_DEV_IO_TRACE is not set
67
68#
69# IO Schedulers
70#
71CONFIG_IOSCHED_NOOP=y
72# CONFIG_IOSCHED_AS is not set
73CONFIG_IOSCHED_DEADLINE=y
74# CONFIG_IOSCHED_CFQ is not set
75# CONFIG_DEFAULT_AS is not set
76CONFIG_DEFAULT_DEADLINE=y
77# CONFIG_DEFAULT_CFQ is not set
78# CONFIG_DEFAULT_NOOP is not set
79CONFIG_DEFAULT_IOSCHED="deadline"
80
81#
82# System Type
83#
84# CONFIG_ARCH_CLPS7500 is not set
85# CONFIG_ARCH_CLPS711X is not set
86# CONFIG_ARCH_CO285 is not set
87# CONFIG_ARCH_EBSA110 is not set
88# CONFIG_ARCH_EP93XX is not set
89# CONFIG_ARCH_FOOTBRIDGE is not set
90# CONFIG_ARCH_INTEGRATOR is not set
91# CONFIG_ARCH_IOP3XX is not set
92# CONFIG_ARCH_IXP4XX is not set
93# CONFIG_ARCH_IXP2000 is not set
94# CONFIG_ARCH_IXP23XX is not set
95# CONFIG_ARCH_L7200 is not set
96# CONFIG_ARCH_PXA is not set
97# CONFIG_ARCH_RPC is not set
98# CONFIG_ARCH_SA1100 is not set
99# CONFIG_ARCH_S3C2410 is not set
100# CONFIG_ARCH_SHARK is not set
101# CONFIG_ARCH_LH7A40X is not set
102# CONFIG_ARCH_OMAP is not set
103# CONFIG_ARCH_VERSATILE is not set
104# CONFIG_ARCH_REALVIEW is not set
105# CONFIG_ARCH_IMX is not set
106# CONFIG_ARCH_H720X is not set
107# CONFIG_ARCH_AAEC2000 is not set
108CONFIG_ARCH_AT91RM9200=y
109
110#
111# AT91RM9200 Implementations
112#
113
114#
115# AT91RM9200 Board Type
116#
117# CONFIG_ARCH_AT91RM9200DK is not set
118# CONFIG_MACH_AT91RM9200EK is not set
119# CONFIG_MACH_CSB337 is not set
120# CONFIG_MACH_CSB637 is not set
121# CONFIG_MACH_CARMEVA is not set
122# CONFIG_MACH_KB9200 is not set
123# CONFIG_MACH_ATEB9200 is not set
124CONFIG_MACH_KAFA=y
125
126#
127# AT91 Feature Selections
128#
129# CONFIG_AT91_PROGRAMMABLE_CLOCKS is not set
130
131#
132# Processor Type
133#
134CONFIG_CPU_32=y
135CONFIG_CPU_ARM920T=y
136CONFIG_CPU_32v4=y
137CONFIG_CPU_ABRT_EV4T=y
138CONFIG_CPU_CACHE_V4WT=y
139CONFIG_CPU_CACHE_VIVT=y
140CONFIG_CPU_COPY_V4WB=y
141CONFIG_CPU_TLB_V4WBI=y
142
143#
144# Processor Features
145#
146# CONFIG_ARM_THUMB is not set
147# CONFIG_CPU_ICACHE_DISABLE is not set
148# CONFIG_CPU_DCACHE_DISABLE is not set
149# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
150
151#
152# Bus support
153#
154
155#
156# PCCARD (PCMCIA/CardBus) support
157#
158# CONFIG_PCCARD is not set
159
160#
161# Kernel Features
162#
163CONFIG_PREEMPT=y
164# CONFIG_NO_IDLE_HZ is not set
165CONFIG_HZ=100
166# CONFIG_AEABI is not set
167# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
168CONFIG_SELECT_MEMORY_MODEL=y
169CONFIG_FLATMEM_MANUAL=y
170# CONFIG_DISCONTIGMEM_MANUAL is not set
171# CONFIG_SPARSEMEM_MANUAL is not set
172CONFIG_FLATMEM=y
173CONFIG_FLAT_NODE_MEM_MAP=y
174# CONFIG_SPARSEMEM_STATIC is not set
175CONFIG_SPLIT_PTLOCK_CPUS=4096
176CONFIG_LEDS=y
177# CONFIG_LEDS_TIMER is not set
178CONFIG_LEDS_CPU=y
179CONFIG_ALIGNMENT_TRAP=y
180
181#
182# Boot options
183#
184CONFIG_ZBOOT_ROM_TEXT=0x0
185CONFIG_ZBOOT_ROM_BSS=0x0
186CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x20800000,10M root=/dev/ram0 rw"
187# CONFIG_XIP_KERNEL is not set
188
189#
190# Floating point emulation
191#
192
193#
194# At least one emulation must be selected
195#
196CONFIG_FPE_NWFPE=y
197# CONFIG_FPE_NWFPE_XP is not set
198# CONFIG_FPE_FASTFPE is not set
199
200#
201# Userspace binary formats
202#
203CONFIG_BINFMT_ELF=y
204# CONFIG_BINFMT_AOUT is not set
205CONFIG_BINFMT_MISC=y
206# CONFIG_ARTHUR is not set
207
208#
209# Power management options
210#
211# CONFIG_PM is not set
212# CONFIG_APM is not set
213
214#
215# Networking
216#
217CONFIG_NET=y
218
219#
220# Networking options
221#
222# CONFIG_NETDEBUG is not set
223CONFIG_PACKET=y
224# CONFIG_PACKET_MMAP is not set
225CONFIG_UNIX=y
226# CONFIG_NET_KEY is not set
227CONFIG_INET=y
228# CONFIG_IP_MULTICAST is not set
229# CONFIG_IP_ADVANCED_ROUTER is not set
230CONFIG_IP_FIB_HASH=y
231# CONFIG_IP_PNP is not set
232# CONFIG_NET_IPIP is not set
233# CONFIG_NET_IPGRE is not set
234# CONFIG_ARPD is not set
235# CONFIG_SYN_COOKIES is not set
236# CONFIG_INET_AH is not set
237# CONFIG_INET_ESP is not set
238# CONFIG_INET_IPCOMP is not set
239# CONFIG_INET_XFRM_TUNNEL is not set
240# CONFIG_INET_TUNNEL is not set
241# CONFIG_INET_DIAG is not set
242# CONFIG_TCP_CONG_ADVANCED is not set
243CONFIG_TCP_CONG_BIC=y
244# CONFIG_IPV6 is not set
245# CONFIG_INET6_XFRM_TUNNEL is not set
246# CONFIG_INET6_TUNNEL is not set
247# CONFIG_NETFILTER is not set
248
249#
250# DCCP Configuration (EXPERIMENTAL)
251#
252# CONFIG_IP_DCCP is not set
253
254#
255# SCTP Configuration (EXPERIMENTAL)
256#
257# CONFIG_IP_SCTP is not set
258
259#
260# TIPC Configuration (EXPERIMENTAL)
261#
262# CONFIG_TIPC is not set
263# CONFIG_ATM is not set
264# CONFIG_BRIDGE is not set
265# CONFIG_VLAN_8021Q is not set
266# CONFIG_DECNET is not set
267# CONFIG_LLC2 is not set
268# CONFIG_IPX is not set
269# CONFIG_ATALK is not set
270# CONFIG_X25 is not set
271# CONFIG_LAPB is not set
272# CONFIG_NET_DIVERT is not set
273# CONFIG_ECONET is not set
274# CONFIG_WAN_ROUTER is not set
275
276#
277# QoS and/or fair queueing
278#
279# CONFIG_NET_SCHED is not set
280
281#
282# Network testing
283#
284# CONFIG_NET_PKTGEN is not set
285# CONFIG_HAMRADIO is not set
286# CONFIG_IRDA is not set
287# CONFIG_BT is not set
288# CONFIG_IEEE80211 is not set
289
290#
291# Device Drivers
292#
293
294#
295# Generic Driver Options
296#
297CONFIG_STANDALONE=y
298CONFIG_PREVENT_FIRMWARE_BUILD=y
299# CONFIG_FW_LOADER is not set
300
301#
302# Connector - unified userspace <-> kernelspace linker
303#
304# CONFIG_CONNECTOR is not set
305
306#
307# Memory Technology Devices (MTD)
308#
309CONFIG_MTD=y
310# CONFIG_MTD_DEBUG is not set
311# CONFIG_MTD_CONCAT is not set
312CONFIG_MTD_PARTITIONS=y
313# CONFIG_MTD_REDBOOT_PARTS is not set
314# CONFIG_MTD_CMDLINE_PARTS is not set
315# CONFIG_MTD_AFS_PARTS is not set
316
317#
318# User Modules And Translation Layers
319#
320CONFIG_MTD_CHAR=y
321# CONFIG_MTD_BLOCK is not set
322CONFIG_MTD_BLOCK_RO=y
323# CONFIG_FTL is not set
324# CONFIG_NFTL is not set
325# CONFIG_INFTL is not set
326# CONFIG_RFD_FTL is not set
327
328#
329# RAM/ROM/Flash chip drivers
330#
331# CONFIG_MTD_CFI is not set
332# CONFIG_MTD_JEDECPROBE is not set
333CONFIG_MTD_MAP_BANK_WIDTH_1=y
334CONFIG_MTD_MAP_BANK_WIDTH_2=y
335CONFIG_MTD_MAP_BANK_WIDTH_4=y
336# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
337# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
338# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
339CONFIG_MTD_CFI_I1=y
340CONFIG_MTD_CFI_I2=y
341# CONFIG_MTD_CFI_I4 is not set
342# CONFIG_MTD_CFI_I8 is not set
343# CONFIG_MTD_RAM is not set
344# CONFIG_MTD_ROM is not set
345# CONFIG_MTD_ABSENT is not set
346# CONFIG_MTD_OBSOLETE_CHIPS is not set
347
348#
349# Mapping drivers for chip access
350#
351# CONFIG_MTD_COMPLEX_MAPPINGS is not set
352# CONFIG_MTD_PLATRAM is not set
353
354#
355# Self-contained MTD device drivers
356#
357# CONFIG_MTD_SLRAM is not set
358# CONFIG_MTD_PHRAM is not set
359# CONFIG_MTD_MTDRAM is not set
360# CONFIG_MTD_BLOCK2MTD is not set
361
362#
363# Disk-On-Chip Device Drivers
364#
365# CONFIG_MTD_DOC2000 is not set
366# CONFIG_MTD_DOC2001 is not set
367# CONFIG_MTD_DOC2001PLUS is not set
368CONFIG_MTD_AT91_DATAFLASH=y
369# CONFIG_MTD_AT91_DATAFLASH_CARD is not set
370
371#
372# NAND Flash Device Drivers
373#
374# CONFIG_MTD_NAND is not set
375
376#
377# OneNAND Flash Device Drivers
378#
379# CONFIG_MTD_ONENAND is not set
380
381#
382# Parallel port support
383#
384# CONFIG_PARPORT is not set
385
386#
387# Plug and Play support
388#
389
390#
391# Block devices
392#
393# CONFIG_BLK_DEV_COW_COMMON is not set
394# CONFIG_BLK_DEV_LOOP is not set
395# CONFIG_BLK_DEV_NBD is not set
396# CONFIG_BLK_DEV_RAM is not set
397# CONFIG_BLK_DEV_INITRD is not set
398# CONFIG_CDROM_PKTCDVD is not set
399# CONFIG_ATA_OVER_ETH is not set
400
401#
402# SCSI device support
403#
404# CONFIG_RAID_ATTRS is not set
405# CONFIG_SCSI is not set
406
407#
408# Multi-device support (RAID and LVM)
409#
410# CONFIG_MD is not set
411
412#
413# Fusion MPT device support
414#
415# CONFIG_FUSION is not set
416
417#
418# IEEE 1394 (FireWire) support
419#
420
421#
422# I2O device support
423#
424
425#
426# Network device support
427#
428CONFIG_NETDEVICES=y
429# CONFIG_DUMMY is not set
430# CONFIG_BONDING is not set
431# CONFIG_EQUALIZER is not set
432# CONFIG_TUN is not set
433
434#
435# PHY device support
436#
437CONFIG_PHYLIB=y
438
439#
440# MII PHY device drivers
441#
442# CONFIG_MARVELL_PHY is not set
443CONFIG_DAVICOM_PHY=y
444# CONFIG_QSEMI_PHY is not set
445# CONFIG_LXT_PHY is not set
446# CONFIG_CICADA_PHY is not set
447
448#
449# Ethernet (10 or 100Mbit)
450#
451CONFIG_NET_ETHERNET=y
452CONFIG_MII=y
453CONFIG_ARM_AT91_ETHER=y
454# CONFIG_SMC91X is not set
455# CONFIG_DM9000 is not set
456
457#
458# Ethernet (1000 Mbit)
459#
460
461#
462# Ethernet (10000 Mbit)
463#
464
465#
466# Token Ring devices
467#
468
469#
470# Wireless LAN (non-hamradio)
471#
472# CONFIG_NET_RADIO is not set
473
474#
475# Wan interfaces
476#
477# CONFIG_WAN is not set
478# CONFIG_PPP is not set
479# CONFIG_SLIP is not set
480# CONFIG_SHAPER is not set
481# CONFIG_NETCONSOLE is not set
482# CONFIG_NETPOLL is not set
483# CONFIG_NET_POLL_CONTROLLER is not set
484
485#
486# ISDN subsystem
487#
488# CONFIG_ISDN is not set
489
490#
491# Input device support
492#
493CONFIG_INPUT=y
494
495#
496# Userland interfaces
497#
498CONFIG_INPUT_MOUSEDEV=y
499# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
500CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
501CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
502# CONFIG_INPUT_JOYDEV is not set
503# CONFIG_INPUT_TSDEV is not set
504# CONFIG_INPUT_EVDEV is not set
505# CONFIG_INPUT_EVBUG is not set
506
507#
508# Input Device Drivers
509#
510# CONFIG_INPUT_KEYBOARD is not set
511# CONFIG_INPUT_MOUSE is not set
512# CONFIG_INPUT_JOYSTICK is not set
513# CONFIG_INPUT_TOUCHSCREEN is not set
514# CONFIG_INPUT_MISC is not set
515
516#
517# Hardware I/O ports
518#
519# CONFIG_SERIO is not set
520# CONFIG_GAMEPORT is not set
521
522#
523# Character devices
524#
525CONFIG_VT=y
526CONFIG_VT_CONSOLE=y
527CONFIG_HW_CONSOLE=y
528# CONFIG_SERIAL_NONSTANDARD is not set
529
530#
531# Serial drivers
532#
533# CONFIG_SERIAL_8250 is not set
534
535#
536# Non-8250 serial port support
537#
538CONFIG_SERIAL_AT91=y
539CONFIG_SERIAL_AT91_CONSOLE=y
540# CONFIG_SERIAL_AT91_TTYAT is not set
541CONFIG_SERIAL_CORE=y
542CONFIG_SERIAL_CORE_CONSOLE=y
543CONFIG_UNIX98_PTYS=y
544CONFIG_LEGACY_PTYS=y
545CONFIG_LEGACY_PTY_COUNT=32
546
547#
548# IPMI
549#
550# CONFIG_IPMI_HANDLER is not set
551
552#
553# Watchdog Cards
554#
555CONFIG_WATCHDOG=y
556CONFIG_WATCHDOG_NOWAYOUT=y
557
558#
559# Watchdog Device Drivers
560#
561# CONFIG_SOFT_WATCHDOG is not set
562CONFIG_AT91_WATCHDOG=y
563# CONFIG_NVRAM is not set
564# CONFIG_DTLK is not set
565# CONFIG_R3964 is not set
566
567#
568# Ftape, the floppy tape device driver
569#
570# CONFIG_RAW_DRIVER is not set
571
572#
573# TPM devices
574#
575# CONFIG_TCG_TPM is not set
576# CONFIG_TELCLOCK is not set
577CONFIG_AT91_SPI=y
578CONFIG_AT91_SPIDEV=y
579
580#
581# I2C support
582#
583CONFIG_I2C=y
584CONFIG_I2C_CHARDEV=y
585
586#
587# I2C Algorithms
588#
589# CONFIG_I2C_ALGOBIT is not set
590# CONFIG_I2C_ALGOPCF is not set
591# CONFIG_I2C_ALGOPCA is not set
592
593#
594# I2C Hardware Bus support
595#
596CONFIG_I2C_AT91=y
597# CONFIG_I2C_PARPORT_LIGHT is not set
598# CONFIG_I2C_STUB is not set
599# CONFIG_I2C_PCA_ISA is not set
600
601#
602# Miscellaneous I2C Chip support
603#
604# CONFIG_SENSORS_DS1337 is not set
605# CONFIG_SENSORS_DS1374 is not set
606# CONFIG_SENSORS_EEPROM is not set
607# CONFIG_SENSORS_PCF8574 is not set
608# CONFIG_SENSORS_PCA9539 is not set
609# CONFIG_SENSORS_PCF8591 is not set
610# CONFIG_SENSORS_MAX6875 is not set
611# CONFIG_I2C_DEBUG_CORE is not set
612# CONFIG_I2C_DEBUG_ALGO is not set
613# CONFIG_I2C_DEBUG_BUS is not set
614# CONFIG_I2C_DEBUG_CHIP is not set
615
616#
617# SPI support
618#
619# CONFIG_SPI is not set
620# CONFIG_SPI_MASTER is not set
621
622#
623# Dallas's 1-wire bus
624#
625# CONFIG_W1 is not set
626
627#
628# Hardware Monitoring support
629#
630# CONFIG_HWMON is not set
631# CONFIG_HWMON_VID is not set
632
633#
634# Misc devices
635#
636
637#
638# LED devices
639#
640# CONFIG_NEW_LEDS is not set
641
642#
643# LED drivers
644#
645
646#
647# LED Triggers
648#
649
650#
651# Multimedia devices
652#
653# CONFIG_VIDEO_DEV is not set
654
655#
656# Digital Video Broadcasting Devices
657#
658# CONFIG_DVB is not set
659
660#
661# Graphics support
662#
663# CONFIG_FB is not set
664
665#
666# Console display driver support
667#
668# CONFIG_VGA_CONSOLE is not set
669CONFIG_DUMMY_CONSOLE=y
670
671#
672# Sound
673#
674# CONFIG_SOUND is not set
675
676#
677# USB support
678#
679CONFIG_USB_ARCH_HAS_HCD=y
680CONFIG_USB_ARCH_HAS_OHCI=y
681# CONFIG_USB_ARCH_HAS_EHCI is not set
682# CONFIG_USB is not set
683
684#
685# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
686#
687
688#
689# USB Gadget Support
690#
691# CONFIG_USB_GADGET is not set
692
693#
694# MMC/SD Card support
695#
696# CONFIG_MMC is not set
697
698#
699# Real Time Clock
700#
701CONFIG_RTC_LIB=y
702CONFIG_RTC_CLASS=y
703# CONFIG_RTC_HCTOSYS is not set
704
705#
706# RTC interfaces
707#
708CONFIG_RTC_INTF_SYSFS=y
709CONFIG_RTC_INTF_PROC=y
710CONFIG_RTC_INTF_DEV=y
711
712#
713# RTC drivers
714#
715# CONFIG_RTC_DRV_X1205 is not set
716# CONFIG_RTC_DRV_DS1672 is not set
717# CONFIG_RTC_DRV_PCF8563 is not set
718# CONFIG_RTC_DRV_RS5C372 is not set
719# CONFIG_RTC_DRV_M48T86 is not set
720CONFIG_RTC_DRV_AT91=y
721# CONFIG_RTC_DRV_TEST is not set
722
723#
724# File systems
725#
726# CONFIG_EXT2_FS is not set
727CONFIG_EXT3_FS=y
728# CONFIG_EXT3_FS_XATTR is not set
729CONFIG_JBD=y
730# CONFIG_JBD_DEBUG is not set
731# CONFIG_REISERFS_FS is not set
732# CONFIG_JFS_FS is not set
733# CONFIG_FS_POSIX_ACL is not set
734# CONFIG_XFS_FS is not set
735# CONFIG_OCFS2_FS is not set
736# CONFIG_MINIX_FS is not set
737# CONFIG_ROMFS_FS is not set
738# CONFIG_INOTIFY is not set
739# CONFIG_QUOTA is not set
740CONFIG_DNOTIFY=y
741# CONFIG_AUTOFS_FS is not set
742# CONFIG_AUTOFS4_FS is not set
743# CONFIG_FUSE_FS is not set
744
745#
746# CD-ROM/DVD Filesystems
747#
748# CONFIG_ISO9660_FS is not set
749# CONFIG_UDF_FS is not set
750
751#
752# DOS/FAT/NT Filesystems
753#
754# CONFIG_MSDOS_FS is not set
755# CONFIG_VFAT_FS is not set
756# CONFIG_NTFS_FS is not set
757
758#
759# Pseudo filesystems
760#
761CONFIG_PROC_FS=y
762CONFIG_SYSFS=y
763CONFIG_TMPFS=y
764# CONFIG_HUGETLB_PAGE is not set
765CONFIG_RAMFS=y
766# CONFIG_CONFIGFS_FS is not set
767
768#
769# Miscellaneous filesystems
770#
771# CONFIG_ADFS_FS is not set
772# CONFIG_AFFS_FS is not set
773# CONFIG_HFS_FS is not set
774# CONFIG_HFSPLUS_FS is not set
775# CONFIG_BEFS_FS is not set
776# CONFIG_BFS_FS is not set
777# CONFIG_EFS_FS is not set
778# CONFIG_JFFS_FS is not set
779# CONFIG_JFFS2_FS is not set
780CONFIG_CRAMFS=y
781# CONFIG_VXFS_FS is not set
782# CONFIG_HPFS_FS is not set
783# CONFIG_QNX4FS_FS is not set
784# CONFIG_SYSV_FS is not set
785# CONFIG_UFS_FS is not set
786
787#
788# Network File Systems
789#
790CONFIG_NFS_FS=m
791CONFIG_NFS_V3=y
792# CONFIG_NFS_V3_ACL is not set
793# CONFIG_NFS_V4 is not set
794# CONFIG_NFS_DIRECTIO is not set
795# CONFIG_NFSD is not set
796CONFIG_LOCKD=m
797CONFIG_LOCKD_V4=y
798CONFIG_NFS_COMMON=y
799CONFIG_SUNRPC=m
800# CONFIG_RPCSEC_GSS_KRB5 is not set
801# CONFIG_RPCSEC_GSS_SPKM3 is not set
802# CONFIG_SMB_FS is not set
803# CONFIG_CIFS is not set
804# CONFIG_NCP_FS is not set
805# CONFIG_CODA_FS is not set
806# CONFIG_AFS_FS is not set
807# CONFIG_9P_FS is not set
808
809#
810# Partition Types
811#
812# CONFIG_PARTITION_ADVANCED is not set
813CONFIG_MSDOS_PARTITION=y
814
815#
816# Native Language Support
817#
818# CONFIG_NLS is not set
819
820#
821# Profiling support
822#
823# CONFIG_PROFILING is not set
824
825#
826# Kernel hacking
827#
828# CONFIG_PRINTK_TIME is not set
829# CONFIG_MAGIC_SYSRQ is not set
830# CONFIG_DEBUG_KERNEL is not set
831CONFIG_LOG_BUF_SHIFT=14
832CONFIG_DEBUG_BUGVERBOSE=y
833# CONFIG_DEBUG_FS is not set
834CONFIG_FRAME_POINTER=y
835# CONFIG_UNWIND_INFO is not set
836# CONFIG_DEBUG_USER is not set
837
838#
839# Security options
840#
841# CONFIG_KEYS is not set
842# CONFIG_SECURITY is not set
843
844#
845# Cryptographic options
846#
847CONFIG_CRYPTO=y
848# CONFIG_CRYPTO_HMAC is not set
849# CONFIG_CRYPTO_NULL is not set
850# CONFIG_CRYPTO_MD4 is not set
851CONFIG_CRYPTO_MD5=y
852# CONFIG_CRYPTO_SHA1 is not set
853# CONFIG_CRYPTO_SHA256 is not set
854# CONFIG_CRYPTO_SHA512 is not set
855# CONFIG_CRYPTO_WP512 is not set
856# CONFIG_CRYPTO_TGR192 is not set
857CONFIG_CRYPTO_DES=y
858# CONFIG_CRYPTO_BLOWFISH is not set
859# CONFIG_CRYPTO_TWOFISH is not set
860# CONFIG_CRYPTO_SERPENT is not set
861# CONFIG_CRYPTO_AES is not set
862# CONFIG_CRYPTO_CAST5 is not set
863# CONFIG_CRYPTO_CAST6 is not set
864# CONFIG_CRYPTO_TEA is not set
865# CONFIG_CRYPTO_ARC4 is not set
866# CONFIG_CRYPTO_KHAZAD is not set
867# CONFIG_CRYPTO_ANUBIS is not set
868# CONFIG_CRYPTO_DEFLATE is not set
869# CONFIG_CRYPTO_MICHAEL_MIC is not set
870# CONFIG_CRYPTO_CRC32C is not set
871# CONFIG_CRYPTO_TEST is not set
872
873#
874# Hardware crypto devices
875#
876
877#
878# Library routines
879#
880# CONFIG_CRC_CCITT is not set
881# CONFIG_CRC16 is not set
882CONFIG_CRC32=y
883# CONFIG_LIBCRC32C is not set
884CONFIG_ZLIB_INFLATE=y
diff --git a/arch/arm/configs/kb9202_defconfig b/arch/arm/configs/kb9202_defconfig
new file mode 100644
index 000000000000..fee4f566452e
--- /dev/null
+++ b/arch/arm/configs/kb9202_defconfig
@@ -0,0 +1,780 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc2
4# Sun Aug 14 19:26:59 2005
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11
12#
13# Code maturity level options
14#
15# CONFIG_EXPERIMENTAL is not set
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_INIT_ENV_ARG_LIMIT=32
19
20#
21# General setup
22#
23CONFIG_LOCALVERSION=""
24# CONFIG_SWAP is not set
25# CONFIG_SYSVIPC is not set
26# CONFIG_BSD_PROCESS_ACCT is not set
27CONFIG_SYSCTL=y
28# CONFIG_AUDIT is not set
29CONFIG_HOTPLUG=y
30# CONFIG_KOBJECT_UEVENT is not set
31# CONFIG_IKCONFIG is not set
32# CONFIG_EMBEDDED is not set
33CONFIG_KALLSYMS=y
34# CONFIG_KALLSYMS_ALL is not set
35# CONFIG_KALLSYMS_EXTRA_PASS is not set
36CONFIG_PRINTK=y
37CONFIG_BUG=y
38CONFIG_BASE_FULL=y
39CONFIG_FUTEX=y
40CONFIG_EPOLL=y
41CONFIG_CC_OPTIMIZE_FOR_SIZE=y
42CONFIG_SHMEM=y
43CONFIG_CC_ALIGN_FUNCTIONS=0
44CONFIG_CC_ALIGN_LABELS=0
45CONFIG_CC_ALIGN_LOOPS=0
46CONFIG_CC_ALIGN_JUMPS=0
47# CONFIG_TINY_SHMEM is not set
48CONFIG_BASE_SMALL=0
49
50#
51# Loadable module support
52#
53CONFIG_MODULES=y
54CONFIG_MODULE_UNLOAD=y
55CONFIG_OBSOLETE_MODPARM=y
56# CONFIG_MODULE_SRCVERSION_ALL is not set
57CONFIG_KMOD=y
58
59#
60# System Type
61#
62# CONFIG_ARCH_CLPS7500 is not set
63# CONFIG_ARCH_CLPS711X is not set
64# CONFIG_ARCH_CO285 is not set
65# CONFIG_ARCH_EBSA110 is not set
66# CONFIG_ARCH_FOOTBRIDGE is not set
67# CONFIG_ARCH_INTEGRATOR is not set
68# CONFIG_ARCH_IOP3XX is not set
69# CONFIG_ARCH_IXP4XX is not set
70# CONFIG_ARCH_IXP2000 is not set
71# CONFIG_ARCH_L7200 is not set
72# CONFIG_ARCH_PXA is not set
73# CONFIG_ARCH_RPC is not set
74# CONFIG_ARCH_SA1100 is not set
75# CONFIG_ARCH_S3C2410 is not set
76# CONFIG_ARCH_SHARK is not set
77# CONFIG_ARCH_LH7A40X is not set
78# CONFIG_ARCH_OMAP is not set
79# CONFIG_ARCH_VERSATILE is not set
80# CONFIG_ARCH_IMX is not set
81# CONFIG_ARCH_H720X is not set
82# CONFIG_ARCH_AAEC2000 is not set
83CONFIG_ARCH_AT91RM9200=y
84
85#
86# AT91RM9200 Implementations
87#
88# CONFIG_ARCH_AT91RM9200DK is not set
89# CONFIG_MACH_AT91RM9200EK is not set
90# CONFIG_MACH_CSB337 is not set
91# CONFIG_MACH_CSB637 is not set
92# CONFIG_MACH_CARMEVA is not set
93CONFIG_MACH_KB9200=y
94
95#
96# Processor Type
97#
98CONFIG_CPU_32=y
99CONFIG_CPU_ARM920T=y
100CONFIG_CPU_32v4=y
101CONFIG_CPU_ABRT_EV4T=y
102CONFIG_CPU_CACHE_V4WT=y
103CONFIG_CPU_CACHE_VIVT=y
104CONFIG_CPU_COPY_V4WB=y
105CONFIG_CPU_TLB_V4WBI=y
106
107#
108# Processor Features
109#
110CONFIG_ARM_THUMB=y
111# CONFIG_CPU_ICACHE_DISABLE is not set
112# CONFIG_CPU_DCACHE_DISABLE is not set
113# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
114
115#
116# Bus support
117#
118CONFIG_ISA_DMA_API=y
119
120#
121# PCCARD (PCMCIA/CardBus) support
122#
123# CONFIG_PCCARD is not set
124
125#
126# Kernel Features
127#
128# CONFIG_NO_IDLE_HZ is not set
129# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
130CONFIG_FLATMEM=y
131CONFIG_FLAT_NODE_MEM_MAP=y
132# CONFIG_LEDS is not set
133CONFIG_ALIGNMENT_TRAP=y
134
135#
136# Boot options
137#
138CONFIG_ZBOOT_ROM_TEXT=0x10000000
139CONFIG_ZBOOT_ROM_BSS=0x20040000
140CONFIG_ZBOOT_ROM=y
141CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/ram rw initrd=0x20210000,654933"
142
143#
144# Floating point emulation
145#
146
147#
148# At least one emulation must be selected
149#
150CONFIG_FPE_NWFPE=y
151# CONFIG_FPE_NWFPE_XP is not set
152
153#
154# Userspace binary formats
155#
156CONFIG_BINFMT_ELF=y
157CONFIG_BINFMT_AOUT=y
158CONFIG_BINFMT_MISC=y
159# CONFIG_ARTHUR is not set
160
161#
162# Power management options
163#
164# CONFIG_PM is not set
165
166#
167# Device Drivers
168#
169
170#
171# Generic Driver Options
172#
173CONFIG_STANDALONE=y
174CONFIG_PREVENT_FIRMWARE_BUILD=y
175# CONFIG_FW_LOADER is not set
176CONFIG_DEBUG_DRIVER=y
177
178#
179# Memory Technology Devices (MTD)
180#
181# CONFIG_MTD is not set
182
183#
184# Parallel port support
185#
186# CONFIG_PARPORT is not set
187
188#
189# Plug and Play support
190#
191
192#
193# Block devices
194#
195# CONFIG_BLK_DEV_COW_COMMON is not set
196CONFIG_BLK_DEV_LOOP=y
197# CONFIG_BLK_DEV_CRYPTOLOOP is not set
198CONFIG_BLK_DEV_NBD=y
199# CONFIG_BLK_DEV_UB is not set
200CONFIG_BLK_DEV_RAM=y
201CONFIG_BLK_DEV_RAM_COUNT=16
202CONFIG_BLK_DEV_RAM_SIZE=4096
203CONFIG_BLK_DEV_INITRD=y
204CONFIG_INITRAMFS_SOURCE=""
205# CONFIG_CDROM_PKTCDVD is not set
206
207#
208# IO Schedulers
209#
210CONFIG_IOSCHED_NOOP=y
211CONFIG_IOSCHED_AS=y
212CONFIG_IOSCHED_DEADLINE=y
213CONFIG_IOSCHED_CFQ=y
214# CONFIG_ATA_OVER_ETH is not set
215
216#
217# SCSI device support
218#
219CONFIG_SCSI=y
220CONFIG_SCSI_PROC_FS=y
221
222#
223# SCSI support type (disk, tape, CD-ROM)
224#
225CONFIG_BLK_DEV_SD=y
226# CONFIG_CHR_DEV_ST is not set
227# CONFIG_CHR_DEV_OSST is not set
228# CONFIG_BLK_DEV_SR is not set
229CONFIG_CHR_DEV_SG=y
230# CONFIG_CHR_DEV_SCH is not set
231
232#
233# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
234#
235# CONFIG_SCSI_MULTI_LUN is not set
236# CONFIG_SCSI_CONSTANTS is not set
237# CONFIG_SCSI_LOGGING is not set
238
239#
240# SCSI Transport Attributes
241#
242# CONFIG_SCSI_SPI_ATTRS is not set
243# CONFIG_SCSI_FC_ATTRS is not set
244# CONFIG_SCSI_ISCSI_ATTRS is not set
245
246#
247# SCSI low-level drivers
248#
249# CONFIG_SCSI_SATA is not set
250# CONFIG_SCSI_DEBUG is not set
251
252#
253# Multi-device support (RAID and LVM)
254#
255# CONFIG_MD is not set
256
257#
258# Fusion MPT device support
259#
260# CONFIG_FUSION is not set
261
262#
263# IEEE 1394 (FireWire) support
264#
265
266#
267# I2O device support
268#
269
270#
271# Networking support
272#
273CONFIG_NET=y
274
275#
276# Networking options
277#
278CONFIG_PACKET=y
279# CONFIG_PACKET_MMAP is not set
280CONFIG_UNIX=y
281# CONFIG_NET_KEY is not set
282CONFIG_INET=y
283CONFIG_IP_MULTICAST=y
284# CONFIG_IP_ADVANCED_ROUTER is not set
285CONFIG_IP_FIB_HASH=y
286CONFIG_IP_PNP=y
287CONFIG_IP_PNP_DHCP=y
288# CONFIG_IP_PNP_BOOTP is not set
289# CONFIG_IP_PNP_RARP is not set
290# CONFIG_NET_IPIP is not set
291# CONFIG_NET_IPGRE is not set
292# CONFIG_IP_MROUTE is not set
293# CONFIG_SYN_COOKIES is not set
294# CONFIG_INET_AH is not set
295# CONFIG_INET_ESP is not set
296# CONFIG_INET_IPCOMP is not set
297# CONFIG_INET_TUNNEL is not set
298# CONFIG_IP_TCPDIAG is not set
299# CONFIG_IP_TCPDIAG_IPV6 is not set
300# CONFIG_TCP_CONG_ADVANCED is not set
301CONFIG_TCP_CONG_BIC=y
302# CONFIG_IPV6 is not set
303# CONFIG_NETFILTER is not set
304# CONFIG_BRIDGE is not set
305# CONFIG_VLAN_8021Q is not set
306# CONFIG_DECNET is not set
307# CONFIG_LLC2 is not set
308# CONFIG_IPX is not set
309# CONFIG_ATALK is not set
310
311#
312# QoS and/or fair queueing
313#
314# CONFIG_NET_SCHED is not set
315# CONFIG_NET_CLS_ROUTE is not set
316
317#
318# Network testing
319#
320# CONFIG_NET_PKTGEN is not set
321# CONFIG_NETPOLL is not set
322# CONFIG_NET_POLL_CONTROLLER is not set
323# CONFIG_HAMRADIO is not set
324# CONFIG_IRDA is not set
325# CONFIG_BT is not set
326CONFIG_NETDEVICES=y
327# CONFIG_DUMMY is not set
328# CONFIG_BONDING is not set
329# CONFIG_EQUALIZER is not set
330# CONFIG_TUN is not set
331
332#
333# Ethernet (10 or 100Mbit)
334#
335CONFIG_NET_ETHERNET=y
336CONFIG_MII=y
337CONFIG_ARM_AT91_ETHER=y
338# CONFIG_SMC91X is not set
339# CONFIG_DM9000 is not set
340
341#
342# Ethernet (1000 Mbit)
343#
344
345#
346# Ethernet (10000 Mbit)
347#
348
349#
350# Token Ring devices
351#
352
353#
354# Wireless LAN (non-hamradio)
355#
356# CONFIG_NET_RADIO is not set
357
358#
359# Wan interfaces
360#
361# CONFIG_WAN is not set
362# CONFIG_PPP is not set
363# CONFIG_SLIP is not set
364
365#
366# ISDN subsystem
367#
368# CONFIG_ISDN is not set
369
370#
371# Input device support
372#
373CONFIG_INPUT=y
374
375#
376# Userland interfaces
377#
378CONFIG_INPUT_MOUSEDEV=y
379# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
380CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
381CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
382# CONFIG_INPUT_JOYDEV is not set
383# CONFIG_INPUT_TSDEV is not set
384# CONFIG_INPUT_EVDEV is not set
385# CONFIG_INPUT_EVBUG is not set
386
387#
388# Input Device Drivers
389#
390# CONFIG_INPUT_KEYBOARD is not set
391# CONFIG_INPUT_MOUSE is not set
392# CONFIG_INPUT_JOYSTICK is not set
393# CONFIG_INPUT_TOUCHSCREEN is not set
394# CONFIG_INPUT_MISC is not set
395
396#
397# Hardware I/O ports
398#
399CONFIG_SERIO=y
400# CONFIG_SERIO_SERPORT is not set
401# CONFIG_SERIO_RAW is not set
402# CONFIG_GAMEPORT is not set
403
404#
405# Character devices
406#
407CONFIG_VT=y
408CONFIG_VT_CONSOLE=y
409CONFIG_HW_CONSOLE=y
410# CONFIG_SERIAL_NONSTANDARD is not set
411
412#
413# Serial drivers
414#
415# CONFIG_SERIAL_8250 is not set
416
417#
418# Non-8250 serial port support
419#
420CONFIG_SERIAL_AT91=y
421CONFIG_SERIAL_AT91_CONSOLE=y
422CONFIG_SERIAL_CORE=y
423CONFIG_SERIAL_CORE_CONSOLE=y
424CONFIG_UNIX98_PTYS=y
425CONFIG_LEGACY_PTYS=y
426CONFIG_LEGACY_PTY_COUNT=256
427
428#
429# IPMI
430#
431# CONFIG_IPMI_HANDLER is not set
432
433#
434# Watchdog Cards
435#
436# CONFIG_WATCHDOG is not set
437# CONFIG_NVRAM is not set
438# CONFIG_RTC is not set
439# CONFIG_AT91_RTC is not set
440# CONFIG_DTLK is not set
441# CONFIG_R3964 is not set
442
443#
444# Ftape, the floppy tape device driver
445#
446# CONFIG_RAW_DRIVER is not set
447
448#
449# TPM devices
450#
451# CONFIG_AT91_SPI is not set
452
453#
454# I2C support
455#
456# CONFIG_I2C is not set
457
458#
459# Misc devices
460#
461
462#
463# Multimedia devices
464#
465# CONFIG_VIDEO_DEV is not set
466
467#
468# Digital Video Broadcasting Devices
469#
470# CONFIG_DVB is not set
471
472#
473# Graphics support
474#
475# CONFIG_FB is not set
476
477#
478# Console display driver support
479#
480# CONFIG_VGA_CONSOLE is not set
481CONFIG_DUMMY_CONSOLE=y
482
483#
484# Sound
485#
486# CONFIG_SOUND is not set
487
488#
489# USB support
490#
491CONFIG_USB_ARCH_HAS_HCD=y
492CONFIG_USB_ARCH_HAS_OHCI=y
493CONFIG_USB=y
494CONFIG_USB_DEBUG=y
495
496#
497# Miscellaneous USB options
498#
499CONFIG_USB_DEVICEFS=y
500
501#
502# USB Host Controller Drivers
503#
504# CONFIG_USB_ISP116X_HCD is not set
505CONFIG_USB_OHCI_HCD=y
506# CONFIG_USB_OHCI_BIG_ENDIAN is not set
507CONFIG_USB_OHCI_LITTLE_ENDIAN=y
508# CONFIG_USB_SL811_HCD is not set
509
510#
511# USB Device Class drivers
512#
513# CONFIG_USB_BLUETOOTH_TTY is not set
514# CONFIG_USB_ACM is not set
515# CONFIG_USB_PRINTER is not set
516
517#
518# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
519#
520CONFIG_USB_STORAGE=y
521CONFIG_USB_STORAGE_DEBUG=y
522# CONFIG_USB_STORAGE_FREECOM is not set
523# CONFIG_USB_STORAGE_DPCM is not set
524
525#
526# USB Input Devices
527#
528# CONFIG_USB_HID is not set
529
530#
531# USB HID Boot Protocol drivers
532#
533# CONFIG_USB_KBD is not set
534# CONFIG_USB_MOUSE is not set
535# CONFIG_USB_AIPTEK is not set
536# CONFIG_USB_WACOM is not set
537# CONFIG_USB_ACECAD is not set
538# CONFIG_USB_KBTAB is not set
539# CONFIG_USB_POWERMATE is not set
540# CONFIG_USB_MTOUCH is not set
541# CONFIG_USB_ITMTOUCH is not set
542# CONFIG_USB_EGALAX is not set
543# CONFIG_USB_XPAD is not set
544# CONFIG_USB_ATI_REMOTE is not set
545
546#
547# USB Imaging devices
548#
549# CONFIG_USB_MICROTEK is not set
550
551#
552# USB Multimedia devices
553#
554# CONFIG_USB_DABUSB is not set
555
556#
557# Video4Linux support is needed for USB Multimedia device support
558#
559
560#
561# USB Network Adapters
562#
563# CONFIG_USB_KAWETH is not set
564# CONFIG_USB_PEGASUS is not set
565# CONFIG_USB_USBNET is not set
566# CONFIG_USB_MON is not set
567
568#
569# USB port drivers
570#
571
572#
573# USB Serial Converter support
574#
575# CONFIG_USB_SERIAL is not set
576
577#
578# USB Miscellaneous drivers
579#
580# CONFIG_USB_EMI62 is not set
581# CONFIG_USB_EMI26 is not set
582# CONFIG_USB_LCD is not set
583# CONFIG_USB_LED is not set
584# CONFIG_USB_CYTHERM is not set
585# CONFIG_USB_PHIDGETKIT is not set
586# CONFIG_USB_PHIDGETSERVO is not set
587# CONFIG_USB_IDMOUSE is not set
588
589#
590# USB DSL modem support
591#
592
593#
594# USB Gadget Support
595#
596# CONFIG_USB_GADGET is not set
597
598#
599# MMC/SD Card support
600#
601# CONFIG_MMC is not set
602
603#
604# File systems
605#
606CONFIG_EXT2_FS=y
607CONFIG_EXT2_FS_XATTR=y
608# CONFIG_EXT2_FS_POSIX_ACL is not set
609# CONFIG_EXT2_FS_SECURITY is not set
610# CONFIG_EXT2_FS_XIP is not set
611CONFIG_EXT3_FS=y
612CONFIG_EXT3_FS_XATTR=y
613# CONFIG_EXT3_FS_POSIX_ACL is not set
614# CONFIG_EXT3_FS_SECURITY is not set
615CONFIG_JBD=y
616# CONFIG_JBD_DEBUG is not set
617CONFIG_FS_MBCACHE=y
618# CONFIG_REISERFS_FS is not set
619# CONFIG_JFS_FS is not set
620
621#
622# XFS support
623#
624# CONFIG_XFS_FS is not set
625# CONFIG_MINIX_FS is not set
626# CONFIG_ROMFS_FS is not set
627# CONFIG_QUOTA is not set
628CONFIG_DNOTIFY=y
629CONFIG_AUTOFS_FS=y
630CONFIG_AUTOFS4_FS=y
631
632#
633# CD-ROM/DVD Filesystems
634#
635# CONFIG_ISO9660_FS is not set
636# CONFIG_UDF_FS is not set
637
638#
639# DOS/FAT/NT Filesystems
640#
641CONFIG_FAT_FS=y
642CONFIG_MSDOS_FS=y
643CONFIG_VFAT_FS=y
644CONFIG_FAT_DEFAULT_CODEPAGE=437
645CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
646# CONFIG_NTFS_FS is not set
647
648#
649# Pseudo filesystems
650#
651CONFIG_PROC_FS=y
652CONFIG_SYSFS=y
653CONFIG_DEVPTS_FS_XATTR=y
654# CONFIG_DEVPTS_FS_SECURITY is not set
655CONFIG_TMPFS=y
656# CONFIG_TMPFS_XATTR is not set
657# CONFIG_HUGETLB_PAGE is not set
658CONFIG_RAMFS=y
659
660#
661# Miscellaneous filesystems
662#
663# CONFIG_HFSPLUS_FS is not set
664# CONFIG_CRAMFS is not set
665# CONFIG_VXFS_FS is not set
666# CONFIG_HPFS_FS is not set
667# CONFIG_QNX4FS_FS is not set
668# CONFIG_SYSV_FS is not set
669# CONFIG_UFS_FS is not set
670
671#
672# Network File Systems
673#
674CONFIG_NFS_FS=y
675CONFIG_NFS_V3=y
676# CONFIG_NFS_V3_ACL is not set
677# CONFIG_NFSD is not set
678CONFIG_ROOT_NFS=y
679CONFIG_LOCKD=y
680CONFIG_LOCKD_V4=y
681CONFIG_NFS_COMMON=y
682CONFIG_SUNRPC=y
683# CONFIG_SMB_FS is not set
684# CONFIG_CIFS is not set
685# CONFIG_NCP_FS is not set
686# CONFIG_CODA_FS is not set
687
688#
689# Partition Types
690#
691# CONFIG_PARTITION_ADVANCED is not set
692CONFIG_MSDOS_PARTITION=y
693
694#
695# Native Language Support
696#
697CONFIG_NLS=y
698CONFIG_NLS_DEFAULT="utf8"
699CONFIG_NLS_CODEPAGE_437=y
700# CONFIG_NLS_CODEPAGE_737 is not set
701# CONFIG_NLS_CODEPAGE_775 is not set
702# CONFIG_NLS_CODEPAGE_850 is not set
703# CONFIG_NLS_CODEPAGE_852 is not set
704# CONFIG_NLS_CODEPAGE_855 is not set
705# CONFIG_NLS_CODEPAGE_857 is not set
706# CONFIG_NLS_CODEPAGE_860 is not set
707# CONFIG_NLS_CODEPAGE_861 is not set
708# CONFIG_NLS_CODEPAGE_862 is not set
709# CONFIG_NLS_CODEPAGE_863 is not set
710# CONFIG_NLS_CODEPAGE_864 is not set
711# CONFIG_NLS_CODEPAGE_865 is not set
712# CONFIG_NLS_CODEPAGE_866 is not set
713# CONFIG_NLS_CODEPAGE_869 is not set
714# CONFIG_NLS_CODEPAGE_936 is not set
715# CONFIG_NLS_CODEPAGE_950 is not set
716# CONFIG_NLS_CODEPAGE_932 is not set
717# CONFIG_NLS_CODEPAGE_949 is not set
718# CONFIG_NLS_CODEPAGE_874 is not set
719# CONFIG_NLS_ISO8859_8 is not set
720# CONFIG_NLS_CODEPAGE_1250 is not set
721# CONFIG_NLS_CODEPAGE_1251 is not set
722CONFIG_NLS_ASCII=y
723# CONFIG_NLS_ISO8859_1 is not set
724# CONFIG_NLS_ISO8859_2 is not set
725# CONFIG_NLS_ISO8859_3 is not set
726# CONFIG_NLS_ISO8859_4 is not set
727# CONFIG_NLS_ISO8859_5 is not set
728# CONFIG_NLS_ISO8859_6 is not set
729# CONFIG_NLS_ISO8859_7 is not set
730# CONFIG_NLS_ISO8859_9 is not set
731# CONFIG_NLS_ISO8859_13 is not set
732# CONFIG_NLS_ISO8859_14 is not set
733# CONFIG_NLS_ISO8859_15 is not set
734# CONFIG_NLS_KOI8_R is not set
735# CONFIG_NLS_KOI8_U is not set
736# CONFIG_NLS_UTF8 is not set
737
738#
739# Kernel hacking
740#
741# CONFIG_PRINTK_TIME is not set
742CONFIG_DEBUG_KERNEL=y
743# CONFIG_MAGIC_SYSRQ is not set
744CONFIG_LOG_BUF_SHIFT=14
745# CONFIG_SCHEDSTATS is not set
746# CONFIG_DEBUG_SLAB is not set
747# CONFIG_DEBUG_SPINLOCK is not set
748# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
749# CONFIG_DEBUG_KOBJECT is not set
750CONFIG_DEBUG_BUGVERBOSE=y
751# CONFIG_DEBUG_INFO is not set
752# CONFIG_DEBUG_FS is not set
753CONFIG_FRAME_POINTER=y
754CONFIG_DEBUG_USER=y
755# CONFIG_DEBUG_WAITQ is not set
756CONFIG_DEBUG_ERRORS=y
757CONFIG_DEBUG_LL=y
758# CONFIG_DEBUG_ICEDCC is not set
759
760#
761# Security options
762#
763# CONFIG_KEYS is not set
764# CONFIG_SECURITY is not set
765
766#
767# Cryptographic options
768#
769# CONFIG_CRYPTO is not set
770
771#
772# Hardware crypto devices
773#
774
775#
776# Library routines
777#
778# CONFIG_CRC_CCITT is not set
779CONFIG_CRC32=y
780# CONFIG_LIBCRC32C is not set
diff --git a/arch/arm/configs/netx_defconfig b/arch/arm/configs/netx_defconfig
new file mode 100644
index 000000000000..61115a773382
--- /dev/null
+++ b/arch/arm/configs/netx_defconfig
@@ -0,0 +1,926 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc6
4# Tue Jun 6 15:26:53 2006
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_VECTORS_BASE=0xffff0000
12
13#
14# Code maturity level options
15#
16CONFIG_EXPERIMENTAL=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20
21#
22# General setup
23#
24CONFIG_LOCALVERSION=""
25CONFIG_LOCALVERSION_AUTO=y
26CONFIG_SWAP=y
27CONFIG_SYSVIPC=y
28CONFIG_POSIX_MQUEUE=y
29CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set
31CONFIG_SYSCTL=y
32# CONFIG_AUDIT is not set
33CONFIG_IKCONFIG=y
34CONFIG_IKCONFIG_PROC=y
35# CONFIG_RELAY is not set
36CONFIG_INITRAMFS_SOURCE=""
37CONFIG_UID16=y
38CONFIG_CC_OPTIMIZE_FOR_SIZE=y
39# CONFIG_EMBEDDED is not set
40CONFIG_KALLSYMS=y
41# CONFIG_KALLSYMS_ALL is not set
42# CONFIG_KALLSYMS_EXTRA_PASS is not set
43CONFIG_HOTPLUG=y
44CONFIG_PRINTK=y
45CONFIG_BUG=y
46CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y
48CONFIG_FUTEX=y
49CONFIG_EPOLL=y
50CONFIG_SHMEM=y
51CONFIG_SLAB=y
52# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0
54# CONFIG_SLOB is not set
55CONFIG_OBSOLETE_INTERMODULE=y
56
57#
58# Loadable module support
59#
60CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y
62CONFIG_MODULE_FORCE_UNLOAD=y
63# CONFIG_MODVERSIONS is not set
64# CONFIG_MODULE_SRCVERSION_ALL is not set
65CONFIG_KMOD=y
66
67#
68# Block layer
69#
70# CONFIG_BLK_DEV_IO_TRACE is not set
71
72#
73# IO Schedulers
74#
75CONFIG_IOSCHED_NOOP=y
76CONFIG_IOSCHED_AS=y
77CONFIG_IOSCHED_DEADLINE=y
78CONFIG_IOSCHED_CFQ=y
79CONFIG_DEFAULT_AS=y
80# CONFIG_DEFAULT_DEADLINE is not set
81# CONFIG_DEFAULT_CFQ is not set
82# CONFIG_DEFAULT_NOOP is not set
83CONFIG_DEFAULT_IOSCHED="anticipatory"
84
85#
86# System Type
87#
88# CONFIG_ARCH_CLPS7500 is not set
89# CONFIG_ARCH_CLPS711X is not set
90# CONFIG_ARCH_CO285 is not set
91# CONFIG_ARCH_EBSA110 is not set
92# CONFIG_ARCH_EP93XX is not set
93# CONFIG_ARCH_FOOTBRIDGE is not set
94# CONFIG_ARCH_INTEGRATOR is not set
95# CONFIG_ARCH_IOP3XX is not set
96# CONFIG_ARCH_IXP4XX is not set
97# CONFIG_ARCH_IXP2000 is not set
98# CONFIG_ARCH_IXP23XX is not set
99# CONFIG_ARCH_L7200 is not set
100# CONFIG_ARCH_PXA is not set
101# CONFIG_ARCH_RPC is not set
102# CONFIG_ARCH_SA1100 is not set
103# CONFIG_ARCH_S3C2410 is not set
104# CONFIG_ARCH_SHARK is not set
105# CONFIG_ARCH_LH7A40X is not set
106# CONFIG_ARCH_OMAP is not set
107# CONFIG_ARCH_VERSATILE is not set
108# CONFIG_ARCH_REALVIEW is not set
109# CONFIG_ARCH_IMX is not set
110# CONFIG_ARCH_H720X is not set
111# CONFIG_ARCH_AAEC2000 is not set
112# CONFIG_ARCH_AT91RM9200 is not set
113CONFIG_ARCH_NETX=y
114
115#
116# NetX Implementations
117#
118CONFIG_MACH_NXDKN=y
119CONFIG_MACH_NXDB500=y
120CONFIG_MACH_NXEB500HMI=y
121
122#
123# Processor Type
124#
125CONFIG_CPU_32=y
126CONFIG_CPU_ARM926T=y
127CONFIG_CPU_32v5=y
128CONFIG_CPU_ABRT_EV5TJ=y
129CONFIG_CPU_CACHE_VIVT=y
130CONFIG_CPU_COPY_V4WB=y
131CONFIG_CPU_TLB_V4WBI=y
132
133#
134# Processor Features
135#
136CONFIG_ARM_THUMB=y
137# CONFIG_CPU_ICACHE_DISABLE is not set
138# CONFIG_CPU_DCACHE_DISABLE is not set
139# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
140# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
141CONFIG_ARM_VIC=y
142
143#
144# Bus support
145#
146CONFIG_ARM_AMBA=y
147
148#
149# PCCARD (PCMCIA/CardBus) support
150#
151# CONFIG_PCCARD is not set
152
153#
154# Kernel Features
155#
156CONFIG_PREEMPT=y
157# CONFIG_NO_IDLE_HZ is not set
158CONFIG_HZ=100
159# CONFIG_AEABI is not set
160# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
161CONFIG_SELECT_MEMORY_MODEL=y
162CONFIG_FLATMEM_MANUAL=y
163# CONFIG_DISCONTIGMEM_MANUAL is not set
164# CONFIG_SPARSEMEM_MANUAL is not set
165CONFIG_FLATMEM=y
166CONFIG_FLAT_NODE_MEM_MAP=y
167# CONFIG_SPARSEMEM_STATIC is not set
168CONFIG_SPLIT_PTLOCK_CPUS=4096
169CONFIG_ALIGNMENT_TRAP=y
170
171#
172# Boot options
173#
174CONFIG_ZBOOT_ROM_TEXT=0x0
175CONFIG_ZBOOT_ROM_BSS=0x0
176CONFIG_CMDLINE="console=ttySMX0,115200"
177# CONFIG_XIP_KERNEL is not set
178
179#
180# Floating point emulation
181#
182
183#
184# At least one emulation must be selected
185#
186# CONFIG_FPE_NWFPE is not set
187# CONFIG_FPE_FASTFPE is not set
188# CONFIG_VFP is not set
189
190#
191# Userspace binary formats
192#
193CONFIG_BINFMT_ELF=y
194# CONFIG_BINFMT_AOUT is not set
195# CONFIG_BINFMT_MISC is not set
196# CONFIG_ARTHUR is not set
197
198#
199# Power management options
200#
201# CONFIG_PM is not set
202# CONFIG_APM is not set
203
204#
205# Networking
206#
207CONFIG_NET=y
208
209#
210# Networking options
211#
212# CONFIG_NETDEBUG is not set
213CONFIG_PACKET=y
214CONFIG_PACKET_MMAP=y
215CONFIG_UNIX=y
216CONFIG_XFRM=y
217CONFIG_XFRM_USER=m
218CONFIG_NET_KEY=y
219CONFIG_INET=y
220CONFIG_IP_MULTICAST=y
221# CONFIG_IP_ADVANCED_ROUTER is not set
222CONFIG_IP_FIB_HASH=y
223CONFIG_IP_PNP=y
224CONFIG_IP_PNP_DHCP=y
225# CONFIG_IP_PNP_BOOTP is not set
226# CONFIG_IP_PNP_RARP is not set
227# CONFIG_NET_IPIP is not set
228CONFIG_NET_IPGRE=m
229# CONFIG_NET_IPGRE_BROADCAST is not set
230# CONFIG_IP_MROUTE is not set
231# CONFIG_ARPD is not set
232CONFIG_SYN_COOKIES=y
233CONFIG_INET_AH=y
234CONFIG_INET_ESP=y
235CONFIG_INET_IPCOMP=y
236CONFIG_INET_XFRM_TUNNEL=y
237CONFIG_INET_TUNNEL=y
238CONFIG_INET_DIAG=y
239CONFIG_INET_TCP_DIAG=y
240# CONFIG_TCP_CONG_ADVANCED is not set
241CONFIG_TCP_CONG_BIC=y
242
243#
244# IP: Virtual Server Configuration
245#
246# CONFIG_IP_VS is not set
247CONFIG_IPV6=m
248# CONFIG_IPV6_PRIVACY is not set
249# CONFIG_IPV6_ROUTER_PREF is not set
250CONFIG_INET6_AH=m
251CONFIG_INET6_ESP=m
252CONFIG_INET6_IPCOMP=m
253CONFIG_INET6_XFRM_TUNNEL=m
254CONFIG_INET6_TUNNEL=m
255# CONFIG_IPV6_TUNNEL is not set
256CONFIG_NETFILTER=y
257# CONFIG_NETFILTER_DEBUG is not set
258
259#
260# Core Netfilter Configuration
261#
262# CONFIG_NETFILTER_NETLINK is not set
263# CONFIG_NETFILTER_XTABLES is not set
264
265#
266# IP: Netfilter Configuration
267#
268CONFIG_IP_NF_CONNTRACK=m
269# CONFIG_IP_NF_CT_ACCT is not set
270# CONFIG_IP_NF_CONNTRACK_MARK is not set
271# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
272# CONFIG_IP_NF_CT_PROTO_SCTP is not set
273CONFIG_IP_NF_FTP=m
274CONFIG_IP_NF_IRC=m
275# CONFIG_IP_NF_NETBIOS_NS is not set
276CONFIG_IP_NF_TFTP=m
277CONFIG_IP_NF_AMANDA=m
278# CONFIG_IP_NF_PPTP is not set
279# CONFIG_IP_NF_H323 is not set
280CONFIG_IP_NF_QUEUE=m
281
282#
283# IPv6: Netfilter Configuration (EXPERIMENTAL)
284#
285# CONFIG_IP6_NF_QUEUE is not set
286
287#
288# DCCP Configuration (EXPERIMENTAL)
289#
290# CONFIG_IP_DCCP is not set
291
292#
293# SCTP Configuration (EXPERIMENTAL)
294#
295# CONFIG_IP_SCTP is not set
296
297#
298# TIPC Configuration (EXPERIMENTAL)
299#
300# CONFIG_TIPC is not set
301# CONFIG_ATM is not set
302# CONFIG_BRIDGE is not set
303# CONFIG_VLAN_8021Q is not set
304# CONFIG_DECNET is not set
305# CONFIG_LLC2 is not set
306# CONFIG_IPX is not set
307# CONFIG_ATALK is not set
308# CONFIG_X25 is not set
309# CONFIG_LAPB is not set
310# CONFIG_NET_DIVERT is not set
311# CONFIG_ECONET is not set
312# CONFIG_WAN_ROUTER is not set
313
314#
315# QoS and/or fair queueing
316#
317# CONFIG_NET_SCHED is not set
318
319#
320# Network testing
321#
322CONFIG_NET_PKTGEN=m
323# CONFIG_HAMRADIO is not set
324# CONFIG_IRDA is not set
325# CONFIG_BT is not set
326# CONFIG_IEEE80211 is not set
327
328#
329# Device Drivers
330#
331
332#
333# Generic Driver Options
334#
335CONFIG_STANDALONE=y
336CONFIG_PREVENT_FIRMWARE_BUILD=y
337CONFIG_FW_LOADER=y
338# CONFIG_DEBUG_DRIVER is not set
339
340#
341# Connector - unified userspace <-> kernelspace linker
342#
343# CONFIG_CONNECTOR is not set
344
345#
346# Memory Technology Devices (MTD)
347#
348CONFIG_MTD=y
349# CONFIG_MTD_DEBUG is not set
350# CONFIG_MTD_CONCAT is not set
351CONFIG_MTD_PARTITIONS=y
352# CONFIG_MTD_REDBOOT_PARTS is not set
353CONFIG_MTD_CMDLINE_PARTS=y
354# CONFIG_MTD_AFS_PARTS is not set
355
356#
357# User Modules And Translation Layers
358#
359CONFIG_MTD_CHAR=y
360CONFIG_MTD_BLOCK=y
361# CONFIG_FTL is not set
362# CONFIG_NFTL is not set
363# CONFIG_INFTL is not set
364# CONFIG_RFD_FTL is not set
365
366#
367# RAM/ROM/Flash chip drivers
368#
369CONFIG_MTD_CFI=y
370# CONFIG_MTD_JEDECPROBE is not set
371CONFIG_MTD_GEN_PROBE=y
372# CONFIG_MTD_CFI_ADV_OPTIONS is not set
373CONFIG_MTD_MAP_BANK_WIDTH_1=y
374CONFIG_MTD_MAP_BANK_WIDTH_2=y
375CONFIG_MTD_MAP_BANK_WIDTH_4=y
376# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
377# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
378# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
379CONFIG_MTD_CFI_I1=y
380CONFIG_MTD_CFI_I2=y
381# CONFIG_MTD_CFI_I4 is not set
382# CONFIG_MTD_CFI_I8 is not set
383CONFIG_MTD_CFI_INTELEXT=y
384# CONFIG_MTD_CFI_AMDSTD is not set
385# CONFIG_MTD_CFI_STAA is not set
386CONFIG_MTD_CFI_UTIL=y
387CONFIG_MTD_RAM=y
388# CONFIG_MTD_ROM is not set
389# CONFIG_MTD_ABSENT is not set
390# CONFIG_MTD_OBSOLETE_CHIPS is not set
391
392#
393# Mapping drivers for chip access
394#
395# CONFIG_MTD_COMPLEX_MAPPINGS is not set
396# CONFIG_MTD_PHYSMAP is not set
397# CONFIG_MTD_ARM_INTEGRATOR is not set
398CONFIG_MTD_PLATRAM=y
399
400#
401# Self-contained MTD device drivers
402#
403# CONFIG_MTD_SLRAM is not set
404# CONFIG_MTD_PHRAM is not set
405# CONFIG_MTD_MTDRAM is not set
406# CONFIG_MTD_BLOCK2MTD is not set
407
408#
409# Disk-On-Chip Device Drivers
410#
411# CONFIG_MTD_DOC2000 is not set
412# CONFIG_MTD_DOC2001 is not set
413# CONFIG_MTD_DOC2001PLUS is not set
414
415#
416# NAND Flash Device Drivers
417#
418# CONFIG_MTD_NAND is not set
419
420#
421# OneNAND Flash Device Drivers
422#
423# CONFIG_MTD_ONENAND is not set
424
425#
426# Parallel port support
427#
428# CONFIG_PARPORT is not set
429
430#
431# Plug and Play support
432#
433
434#
435# Block devices
436#
437# CONFIG_BLK_DEV_COW_COMMON is not set
438CONFIG_BLK_DEV_LOOP=m
439CONFIG_BLK_DEV_CRYPTOLOOP=m
440# CONFIG_BLK_DEV_NBD is not set
441# CONFIG_BLK_DEV_RAM is not set
442# CONFIG_BLK_DEV_INITRD is not set
443# CONFIG_CDROM_PKTCDVD is not set
444# CONFIG_ATA_OVER_ETH is not set
445
446#
447# SCSI device support
448#
449# CONFIG_RAID_ATTRS is not set
450# CONFIG_SCSI is not set
451
452#
453# Multi-device support (RAID and LVM)
454#
455# CONFIG_MD is not set
456
457#
458# Fusion MPT device support
459#
460# CONFIG_FUSION is not set
461
462#
463# IEEE 1394 (FireWire) support
464#
465
466#
467# I2O device support
468#
469
470#
471# Network device support
472#
473CONFIG_NETDEVICES=y
474# CONFIG_DUMMY is not set
475# CONFIG_BONDING is not set
476# CONFIG_EQUALIZER is not set
477# CONFIG_TUN is not set
478
479#
480# PHY device support
481#
482# CONFIG_PHYLIB is not set
483
484#
485# Ethernet (10 or 100Mbit)
486#
487CONFIG_NET_ETHERNET=y
488CONFIG_MII=y
489# CONFIG_SMC91X is not set
490CONFIG_NET_NETX=y
491# CONFIG_DM9000 is not set
492
493#
494# Ethernet (1000 Mbit)
495#
496
497#
498# Ethernet (10000 Mbit)
499#
500
501#
502# Token Ring devices
503#
504
505#
506# Wireless LAN (non-hamradio)
507#
508# CONFIG_NET_RADIO is not set
509
510#
511# Wan interfaces
512#
513# CONFIG_WAN is not set
514# CONFIG_PPP is not set
515# CONFIG_SLIP is not set
516# CONFIG_SHAPER is not set
517# CONFIG_NETCONSOLE is not set
518# CONFIG_NETPOLL is not set
519# CONFIG_NET_POLL_CONTROLLER is not set
520
521#
522# ISDN subsystem
523#
524# CONFIG_ISDN is not set
525
526#
527# Input device support
528#
529CONFIG_INPUT=y
530
531#
532# Userland interfaces
533#
534CONFIG_INPUT_MOUSEDEV=y
535# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
536CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
537CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
538# CONFIG_INPUT_JOYDEV is not set
539# CONFIG_INPUT_TSDEV is not set
540# CONFIG_INPUT_EVDEV is not set
541# CONFIG_INPUT_EVBUG is not set
542
543#
544# Input Device Drivers
545#
546# CONFIG_INPUT_KEYBOARD is not set
547# CONFIG_INPUT_MOUSE is not set
548# CONFIG_INPUT_JOYSTICK is not set
549# CONFIG_INPUT_TOUCHSCREEN is not set
550# CONFIG_INPUT_MISC is not set
551
552#
553# Hardware I/O ports
554#
555CONFIG_SERIO=y
556CONFIG_SERIO_SERPORT=y
557# CONFIG_SERIO_AMBAKMI is not set
558# CONFIG_SERIO_RAW is not set
559# CONFIG_GAMEPORT is not set
560
561#
562# Character devices
563#
564CONFIG_VT=y
565CONFIG_VT_CONSOLE=y
566CONFIG_HW_CONSOLE=y
567# CONFIG_SERIAL_NONSTANDARD is not set
568
569#
570# Serial drivers
571#
572# CONFIG_SERIAL_8250 is not set
573
574#
575# Non-8250 serial port support
576#
577# CONFIG_SERIAL_AMBA_PL010 is not set
578# CONFIG_SERIAL_AMBA_PL011 is not set
579CONFIG_SERIAL_CORE=y
580CONFIG_SERIAL_CORE_CONSOLE=y
581CONFIG_SERIAL_NETX=y
582CONFIG_SERIAL_NETX_CONSOLE=y
583CONFIG_UNIX98_PTYS=y
584CONFIG_LEGACY_PTYS=y
585CONFIG_LEGACY_PTY_COUNT=256
586
587#
588# IPMI
589#
590# CONFIG_IPMI_HANDLER is not set
591
592#
593# Watchdog Cards
594#
595# CONFIG_WATCHDOG is not set
596CONFIG_NVRAM=m
597# CONFIG_DTLK is not set
598# CONFIG_R3964 is not set
599
600#
601# Ftape, the floppy tape device driver
602#
603# CONFIG_RAW_DRIVER is not set
604
605#
606# TPM devices
607#
608# CONFIG_TCG_TPM is not set
609# CONFIG_TELCLOCK is not set
610
611#
612# I2C support
613#
614# CONFIG_I2C is not set
615
616#
617# SPI support
618#
619# CONFIG_SPI is not set
620# CONFIG_SPI_MASTER is not set
621
622#
623# Dallas's 1-wire bus
624#
625# CONFIG_W1 is not set
626
627#
628# Hardware Monitoring support
629#
630# CONFIG_HWMON is not set
631# CONFIG_HWMON_VID is not set
632
633#
634# Misc devices
635#
636
637#
638# LED devices
639#
640# CONFIG_NEW_LEDS is not set
641
642#
643# LED drivers
644#
645
646#
647# LED Triggers
648#
649
650#
651# Multimedia devices
652#
653# CONFIG_VIDEO_DEV is not set
654CONFIG_VIDEO_V4L2=y
655
656#
657# Digital Video Broadcasting Devices
658#
659# CONFIG_DVB is not set
660
661#
662# Graphics support
663#
664CONFIG_FB=y
665CONFIG_FB_CFB_FILLRECT=y
666CONFIG_FB_CFB_COPYAREA=y
667CONFIG_FB_CFB_IMAGEBLIT=y
668# CONFIG_FB_MACMODES is not set
669CONFIG_FB_FIRMWARE_EDID=y
670# CONFIG_FB_MODE_HELPERS is not set
671# CONFIG_FB_TILEBLITTING is not set
672CONFIG_FB_ARMCLCD=y
673# CONFIG_FB_S1D13XXX is not set
674# CONFIG_FB_VIRTUAL is not set
675
676#
677# Console display driver support
678#
679# CONFIG_VGA_CONSOLE is not set
680CONFIG_DUMMY_CONSOLE=y
681CONFIG_FRAMEBUFFER_CONSOLE=y
682# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
683# CONFIG_FONTS is not set
684CONFIG_FONT_8x8=y
685CONFIG_FONT_8x16=y
686
687#
688# Logo configuration
689#
690CONFIG_LOGO=y
691CONFIG_LOGO_LINUX_MONO=y
692CONFIG_LOGO_LINUX_VGA16=y
693CONFIG_LOGO_LINUX_CLUT224=y
694# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
695
696#
697# Sound
698#
699# CONFIG_SOUND is not set
700
701#
702# USB support
703#
704CONFIG_USB_ARCH_HAS_HCD=y
705# CONFIG_USB_ARCH_HAS_OHCI is not set
706# CONFIG_USB_ARCH_HAS_EHCI is not set
707# CONFIG_USB is not set
708
709#
710# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
711#
712
713#
714# USB Gadget Support
715#
716# CONFIG_USB_GADGET is not set
717
718#
719# MMC/SD Card support
720#
721# CONFIG_MMC is not set
722
723#
724# Real Time Clock
725#
726CONFIG_RTC_LIB=y
727CONFIG_RTC_CLASS=m
728
729#
730# RTC interfaces
731#
732CONFIG_RTC_INTF_SYSFS=m
733CONFIG_RTC_INTF_PROC=m
734CONFIG_RTC_INTF_DEV=m
735
736#
737# RTC drivers
738#
739# CONFIG_RTC_DRV_M48T86 is not set
740CONFIG_RTC_DRV_NETX=m
741# CONFIG_RTC_DRV_TEST is not set
742
743#
744# File systems
745#
746# CONFIG_EXT2_FS is not set
747# CONFIG_EXT3_FS is not set
748# CONFIG_REISERFS_FS is not set
749# CONFIG_JFS_FS is not set
750# CONFIG_FS_POSIX_ACL is not set
751# CONFIG_XFS_FS is not set
752# CONFIG_OCFS2_FS is not set
753# CONFIG_MINIX_FS is not set
754# CONFIG_ROMFS_FS is not set
755CONFIG_INOTIFY=y
756# CONFIG_QUOTA is not set
757CONFIG_DNOTIFY=y
758# CONFIG_AUTOFS_FS is not set
759# CONFIG_AUTOFS4_FS is not set
760# CONFIG_FUSE_FS is not set
761
762#
763# CD-ROM/DVD Filesystems
764#
765# CONFIG_ISO9660_FS is not set
766# CONFIG_UDF_FS is not set
767
768#
769# DOS/FAT/NT Filesystems
770#
771# CONFIG_MSDOS_FS is not set
772# CONFIG_VFAT_FS is not set
773# CONFIG_NTFS_FS is not set
774
775#
776# Pseudo filesystems
777#
778CONFIG_PROC_FS=y
779CONFIG_SYSFS=y
780CONFIG_TMPFS=y
781# CONFIG_HUGETLB_PAGE is not set
782CONFIG_RAMFS=y
783# CONFIG_CONFIGFS_FS is not set
784
785#
786# Miscellaneous filesystems
787#
788# CONFIG_ADFS_FS is not set
789# CONFIG_AFFS_FS is not set
790# CONFIG_HFS_FS is not set
791# CONFIG_HFSPLUS_FS is not set
792# CONFIG_BEFS_FS is not set
793# CONFIG_BFS_FS is not set
794# CONFIG_EFS_FS is not set
795# CONFIG_JFFS_FS is not set
796CONFIG_JFFS2_FS=y
797CONFIG_JFFS2_FS_DEBUG=0
798CONFIG_JFFS2_FS_WRITEBUFFER=y
799# CONFIG_JFFS2_SUMMARY is not set
800# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
801CONFIG_JFFS2_ZLIB=y
802CONFIG_JFFS2_RTIME=y
803# CONFIG_JFFS2_RUBIN is not set
804# CONFIG_CRAMFS is not set
805# CONFIG_VXFS_FS is not set
806# CONFIG_HPFS_FS is not set
807# CONFIG_QNX4FS_FS is not set
808# CONFIG_SYSV_FS is not set
809# CONFIG_UFS_FS is not set
810
811#
812# Network File Systems
813#
814CONFIG_NFS_FS=y
815CONFIG_NFS_V3=y
816# CONFIG_NFS_V3_ACL is not set
817CONFIG_NFS_V4=y
818CONFIG_NFS_DIRECTIO=y
819# CONFIG_NFSD is not set
820CONFIG_ROOT_NFS=y
821CONFIG_LOCKD=y
822CONFIG_LOCKD_V4=y
823CONFIG_NFS_COMMON=y
824CONFIG_SUNRPC=y
825CONFIG_SUNRPC_GSS=y
826CONFIG_RPCSEC_GSS_KRB5=y
827# CONFIG_RPCSEC_GSS_SPKM3 is not set
828# CONFIG_SMB_FS is not set
829# CONFIG_CIFS is not set
830# CONFIG_NCP_FS is not set
831# CONFIG_CODA_FS is not set
832# CONFIG_AFS_FS is not set
833# CONFIG_9P_FS is not set
834
835#
836# Partition Types
837#
838# CONFIG_PARTITION_ADVANCED is not set
839CONFIG_MSDOS_PARTITION=y
840
841#
842# Native Language Support
843#
844# CONFIG_NLS is not set
845
846#
847# Profiling support
848#
849# CONFIG_PROFILING is not set
850
851#
852# Kernel hacking
853#
854# CONFIG_PRINTK_TIME is not set
855CONFIG_MAGIC_SYSRQ=y
856CONFIG_DEBUG_KERNEL=y
857CONFIG_LOG_BUF_SHIFT=17
858CONFIG_DETECT_SOFTLOCKUP=y
859# CONFIG_SCHEDSTATS is not set
860# CONFIG_DEBUG_SLAB is not set
861CONFIG_DEBUG_PREEMPT=y
862# CONFIG_DEBUG_MUTEXES is not set
863# CONFIG_DEBUG_SPINLOCK is not set
864# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
865# CONFIG_DEBUG_KOBJECT is not set
866CONFIG_DEBUG_BUGVERBOSE=y
867# CONFIG_DEBUG_INFO is not set
868# CONFIG_DEBUG_FS is not set
869# CONFIG_DEBUG_VM is not set
870CONFIG_FRAME_POINTER=y
871# CONFIG_UNWIND_INFO is not set
872CONFIG_FORCED_INLINING=y
873# CONFIG_RCU_TORTURE_TEST is not set
874# CONFIG_DEBUG_USER is not set
875# CONFIG_DEBUG_WAITQ is not set
876CONFIG_DEBUG_ERRORS=y
877# CONFIG_DEBUG_LL is not set
878
879#
880# Security options
881#
882# CONFIG_KEYS is not set
883# CONFIG_SECURITY is not set
884
885#
886# Cryptographic options
887#
888CONFIG_CRYPTO=y
889CONFIG_CRYPTO_HMAC=y
890CONFIG_CRYPTO_NULL=m
891CONFIG_CRYPTO_MD4=m
892CONFIG_CRYPTO_MD5=y
893CONFIG_CRYPTO_SHA1=y
894CONFIG_CRYPTO_SHA256=m
895CONFIG_CRYPTO_SHA512=m
896# CONFIG_CRYPTO_WP512 is not set
897# CONFIG_CRYPTO_TGR192 is not set
898CONFIG_CRYPTO_DES=y
899CONFIG_CRYPTO_BLOWFISH=m
900CONFIG_CRYPTO_TWOFISH=m
901CONFIG_CRYPTO_SERPENT=m
902CONFIG_CRYPTO_AES=m
903CONFIG_CRYPTO_CAST5=m
904CONFIG_CRYPTO_CAST6=m
905# CONFIG_CRYPTO_TEA is not set
906CONFIG_CRYPTO_ARC4=m
907# CONFIG_CRYPTO_KHAZAD is not set
908# CONFIG_CRYPTO_ANUBIS is not set
909CONFIG_CRYPTO_DEFLATE=y
910CONFIG_CRYPTO_MICHAEL_MIC=m
911CONFIG_CRYPTO_CRC32C=m
912# CONFIG_CRYPTO_TEST is not set
913
914#
915# Hardware crypto devices
916#
917
918#
919# Library routines
920#
921CONFIG_CRC_CCITT=m
922# CONFIG_CRC16 is not set
923CONFIG_CRC32=y
924CONFIG_LIBCRC32C=m
925CONFIG_ZLIB_INFLATE=y
926CONFIG_ZLIB_DEFLATE=y
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index 3cec29d56c8e..e17661380096 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -1,12 +1,14 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.16 3# Linux kernel version: 2.6.17
4# Mon Mar 20 20:36:02 2006 4# Tue Jun 20 18:57:01 2006
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y 8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_VECTORS_BASE=0xffff0000
10 12
11# 13#
12# Code maturity level options 14# Code maturity level options
@@ -27,6 +29,7 @@ CONFIG_SYSVIPC=y
27CONFIG_SYSCTL=y 29CONFIG_SYSCTL=y
28# CONFIG_AUDIT is not set 30# CONFIG_AUDIT is not set
29# CONFIG_IKCONFIG is not set 31# CONFIG_IKCONFIG is not set
32# CONFIG_RELAY is not set
30CONFIG_INITRAMFS_SOURCE="" 33CONFIG_INITRAMFS_SOURCE=""
31CONFIG_UID16=y 34CONFIG_UID16=y
32CONFIG_CC_OPTIMIZE_FOR_SIZE=y 35CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -42,10 +45,6 @@ CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y 45CONFIG_FUTEX=y
43CONFIG_EPOLL=y 46CONFIG_EPOLL=y
44CONFIG_SHMEM=y 47CONFIG_SHMEM=y
45CONFIG_CC_ALIGN_FUNCTIONS=0
46CONFIG_CC_ALIGN_LABELS=0
47CONFIG_CC_ALIGN_LOOPS=0
48CONFIG_CC_ALIGN_JUMPS=0
49CONFIG_SLAB=y 48CONFIG_SLAB=y
50# CONFIG_TINY_SHMEM is not set 49# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0 50CONFIG_BASE_SMALL=0
@@ -57,7 +56,6 @@ CONFIG_OBSOLETE_INTERMODULE=y
57# 56#
58CONFIG_MODULES=y 57CONFIG_MODULES=y
59# CONFIG_MODULE_UNLOAD is not set 58# CONFIG_MODULE_UNLOAD is not set
60CONFIG_OBSOLETE_MODPARM=y
61# CONFIG_MODVERSIONS is not set 59# CONFIG_MODVERSIONS is not set
62# CONFIG_MODULE_SRCVERSION_ALL is not set 60# CONFIG_MODULE_SRCVERSION_ALL is not set
63CONFIG_KMOD=y 61CONFIG_KMOD=y
@@ -65,6 +63,7 @@ CONFIG_KMOD=y
65# 63#
66# Block layer 64# Block layer
67# 65#
66# CONFIG_BLK_DEV_IO_TRACE is not set
68 67
69# 68#
70# IO Schedulers 69# IO Schedulers
@@ -92,6 +91,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
92# CONFIG_ARCH_IOP3XX is not set 91# CONFIG_ARCH_IOP3XX is not set
93# CONFIG_ARCH_IXP4XX is not set 92# CONFIG_ARCH_IXP4XX is not set
94# CONFIG_ARCH_IXP2000 is not set 93# CONFIG_ARCH_IXP2000 is not set
94# CONFIG_ARCH_IXP23XX is not set
95# CONFIG_ARCH_L7200 is not set 95# CONFIG_ARCH_L7200 is not set
96# CONFIG_ARCH_PXA is not set 96# CONFIG_ARCH_PXA is not set
97# CONFIG_ARCH_RPC is not set 97# CONFIG_ARCH_RPC is not set
@@ -106,6 +106,8 @@ CONFIG_ARCH_S3C2410=y
106# CONFIG_ARCH_H720X is not set 106# CONFIG_ARCH_H720X is not set
107# CONFIG_ARCH_AAEC2000 is not set 107# CONFIG_ARCH_AAEC2000 is not set
108# CONFIG_ARCH_AT91RM9200 is not set 108# CONFIG_ARCH_AT91RM9200 is not set
109# CONFIG_ARCH_PNX4008 is not set
110# CONFIG_ARCH_NETX is not set
109 111
110# 112#
111# S3C24XX Implementations 113# S3C24XX Implementations
@@ -116,14 +118,19 @@ CONFIG_ARCH_BAST=y
116CONFIG_BAST_PC104_IRQ=y 118CONFIG_BAST_PC104_IRQ=y
117CONFIG_ARCH_H1940=y 119CONFIG_ARCH_H1940=y
118CONFIG_MACH_N30=y 120CONFIG_MACH_N30=y
121CONFIG_MACH_SMDK=y
119CONFIG_ARCH_SMDK2410=y 122CONFIG_ARCH_SMDK2410=y
120CONFIG_ARCH_S3C2440=y 123CONFIG_ARCH_S3C2440=y
124CONFIG_SMDK2440_CPU2440=y
125CONFIG_SMDK2440_CPU2442=y
121CONFIG_MACH_VR1000=y 126CONFIG_MACH_VR1000=y
122CONFIG_MACH_RX3715=y 127CONFIG_MACH_RX3715=y
123CONFIG_MACH_OTOM=y 128CONFIG_MACH_OTOM=y
124CONFIG_MACH_NEXCODER_2440=y 129CONFIG_MACH_NEXCODER_2440=y
125CONFIG_CPU_S3C2410=y 130CONFIG_CPU_S3C2410=y
131CONFIG_CPU_S3C244X=y
126CONFIG_CPU_S3C2440=y 132CONFIG_CPU_S3C2440=y
133CONFIG_CPU_S3C2442=y
127 134
128# 135#
129# S3C2410 Boot 136# S3C2410 Boot
@@ -251,12 +258,15 @@ CONFIG_IP_PNP_BOOTP=y
251# CONFIG_INET_AH is not set 258# CONFIG_INET_AH is not set
252# CONFIG_INET_ESP is not set 259# CONFIG_INET_ESP is not set
253# CONFIG_INET_IPCOMP is not set 260# CONFIG_INET_IPCOMP is not set
261# CONFIG_INET_XFRM_TUNNEL is not set
254# CONFIG_INET_TUNNEL is not set 262# CONFIG_INET_TUNNEL is not set
255CONFIG_INET_DIAG=y 263CONFIG_INET_DIAG=y
256CONFIG_INET_TCP_DIAG=y 264CONFIG_INET_TCP_DIAG=y
257# CONFIG_TCP_CONG_ADVANCED is not set 265# CONFIG_TCP_CONG_ADVANCED is not set
258CONFIG_TCP_CONG_BIC=y 266CONFIG_TCP_CONG_BIC=y
259# CONFIG_IPV6 is not set 267# CONFIG_IPV6 is not set
268# CONFIG_INET6_XFRM_TUNNEL is not set
269# CONFIG_INET6_TUNNEL is not set
260# CONFIG_NETFILTER is not set 270# CONFIG_NETFILTER is not set
261 271
262# 272#
@@ -360,7 +370,6 @@ CONFIG_MTD_CFI_I2=y
360# CONFIG_MTD_CFI_I8 is not set 370# CONFIG_MTD_CFI_I8 is not set
361CONFIG_MTD_CFI_INTELEXT=y 371CONFIG_MTD_CFI_INTELEXT=y
362CONFIG_MTD_CFI_AMDSTD=y 372CONFIG_MTD_CFI_AMDSTD=y
363CONFIG_MTD_CFI_AMDSTD_RETRY=0
364# CONFIG_MTD_CFI_STAA is not set 373# CONFIG_MTD_CFI_STAA is not set
365CONFIG_MTD_CFI_UTIL=y 374CONFIG_MTD_CFI_UTIL=y
366# CONFIG_MTD_RAM is not set 375# CONFIG_MTD_RAM is not set
@@ -385,7 +394,6 @@ CONFIG_MTD_BAST_MAXSIZE=4
385# CONFIG_MTD_SLRAM is not set 394# CONFIG_MTD_SLRAM is not set
386# CONFIG_MTD_PHRAM is not set 395# CONFIG_MTD_PHRAM is not set
387# CONFIG_MTD_MTDRAM is not set 396# CONFIG_MTD_MTDRAM is not set
388# CONFIG_MTD_BLKMTD is not set
389# CONFIG_MTD_BLOCK2MTD is not set 397# CONFIG_MTD_BLOCK2MTD is not set
390 398
391# 399#
@@ -694,7 +702,6 @@ CONFIG_S3C2410_WATCHDOG=y
694# 702#
695# CONFIG_USBPCWATCHDOG is not set 703# CONFIG_USBPCWATCHDOG is not set
696# CONFIG_NVRAM is not set 704# CONFIG_NVRAM is not set
697# CONFIG_RTC is not set
698CONFIG_S3C2410_RTC=y 705CONFIG_S3C2410_RTC=y
699# CONFIG_DTLK is not set 706# CONFIG_DTLK is not set
700# CONFIG_R3964 is not set 707# CONFIG_R3964 is not set
@@ -743,9 +750,7 @@ CONFIG_SENSORS_EEPROM=m
743# CONFIG_SENSORS_PCF8574 is not set 750# CONFIG_SENSORS_PCF8574 is not set
744# CONFIG_SENSORS_PCA9539 is not set 751# CONFIG_SENSORS_PCA9539 is not set
745# CONFIG_SENSORS_PCF8591 is not set 752# CONFIG_SENSORS_PCF8591 is not set
746# CONFIG_SENSORS_RTC8564 is not set
747# CONFIG_SENSORS_MAX6875 is not set 753# CONFIG_SENSORS_MAX6875 is not set
748# CONFIG_RTC_X1205_I2C is not set
749# CONFIG_I2C_DEBUG_CORE is not set 754# CONFIG_I2C_DEBUG_CORE is not set
750# CONFIG_I2C_DEBUG_ALGO is not set 755# CONFIG_I2C_DEBUG_ALGO is not set
751# CONFIG_I2C_DEBUG_BUS is not set 756# CONFIG_I2C_DEBUG_BUS is not set
@@ -807,18 +812,29 @@ CONFIG_SENSORS_LM85=m
807# 812#
808 813
809# 814#
810# Multimedia Capabilities Port drivers 815# LED devices
816#
817# CONFIG_NEW_LEDS is not set
818
819#
820# LED drivers
821#
822
823#
824# LED Triggers
811# 825#
812 826
813# 827#
814# Multimedia devices 828# Multimedia devices
815# 829#
816# CONFIG_VIDEO_DEV is not set 830# CONFIG_VIDEO_DEV is not set
831CONFIG_VIDEO_V4L2=y
817 832
818# 833#
819# Digital Video Broadcasting Devices 834# Digital Video Broadcasting Devices
820# 835#
821# CONFIG_DVB is not set 836# CONFIG_DVB is not set
837# CONFIG_USB_DABUSB is not set
822 838
823# 839#
824# Graphics support 840# Graphics support
@@ -828,6 +844,7 @@ CONFIG_FB_CFB_FILLRECT=y
828CONFIG_FB_CFB_COPYAREA=y 844CONFIG_FB_CFB_COPYAREA=y
829CONFIG_FB_CFB_IMAGEBLIT=y 845CONFIG_FB_CFB_IMAGEBLIT=y
830# CONFIG_FB_MACMODES is not set 846# CONFIG_FB_MACMODES is not set
847CONFIG_FB_FIRMWARE_EDID=y
831CONFIG_FB_MODE_HELPERS=y 848CONFIG_FB_MODE_HELPERS=y
832# CONFIG_FB_TILEBLITTING is not set 849# CONFIG_FB_TILEBLITTING is not set
833# CONFIG_FB_S1D13XXX is not set 850# CONFIG_FB_S1D13XXX is not set
@@ -863,6 +880,7 @@ CONFIG_FONT_8x16=y
863# 880#
864CONFIG_USB_ARCH_HAS_HCD=y 881CONFIG_USB_ARCH_HAS_HCD=y
865CONFIG_USB_ARCH_HAS_OHCI=y 882CONFIG_USB_ARCH_HAS_OHCI=y
883# CONFIG_USB_ARCH_HAS_EHCI is not set
866CONFIG_USB=y 884CONFIG_USB=y
867# CONFIG_USB_DEBUG is not set 885# CONFIG_USB_DEBUG is not set
868 886
@@ -915,9 +933,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
915# CONFIG_USB_ACECAD is not set 933# CONFIG_USB_ACECAD is not set
916# CONFIG_USB_KBTAB is not set 934# CONFIG_USB_KBTAB is not set
917# CONFIG_USB_POWERMATE is not set 935# CONFIG_USB_POWERMATE is not set
918# CONFIG_USB_MTOUCH is not set 936# CONFIG_USB_TOUCHSCREEN is not set
919# CONFIG_USB_ITMTOUCH is not set
920# CONFIG_USB_EGALAX is not set
921# CONFIG_USB_YEALINK is not set 937# CONFIG_USB_YEALINK is not set
922# CONFIG_USB_XPAD is not set 938# CONFIG_USB_XPAD is not set
923# CONFIG_USB_ATI_REMOTE is not set 939# CONFIG_USB_ATI_REMOTE is not set
@@ -931,15 +947,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
931# CONFIG_USB_MDC800 is not set 947# CONFIG_USB_MDC800 is not set
932 948
933# 949#
934# USB Multimedia devices
935#
936# CONFIG_USB_DABUSB is not set
937
938#
939# Video4Linux support is needed for USB Multimedia device support
940#
941
942#
943# USB Network Adapters 950# USB Network Adapters
944# 951#
945# CONFIG_USB_CATC is not set 952# CONFIG_USB_CATC is not set
@@ -984,17 +991,6 @@ CONFIG_USB_MON=y
984# USB Gadget Support 991# USB Gadget Support
985# 992#
986# CONFIG_USB_GADGET is not set 993# CONFIG_USB_GADGET is not set
987# CONFIG_USB_GADGET_NET2280 is not set
988# CONFIG_USB_GADGET_PXA2XX is not set
989# CONFIG_USB_GADGET_GOKU is not set
990# CONFIG_USB_GADGET_LH7A40X is not set
991# CONFIG_USB_GADGET_OMAP is not set
992# CONFIG_USB_GADGET_DUMMY_HCD is not set
993# CONFIG_USB_ZERO is not set
994# CONFIG_USB_ETH is not set
995# CONFIG_USB_GADGETFS is not set
996# CONFIG_USB_FILE_STORAGE is not set
997# CONFIG_USB_G_SERIAL is not set
998 994
999# 995#
1000# MMC/SD Card support 996# MMC/SD Card support
@@ -1002,6 +998,12 @@ CONFIG_USB_MON=y
1002# CONFIG_MMC is not set 998# CONFIG_MMC is not set
1003 999
1004# 1000#
1001# Real Time Clock
1002#
1003CONFIG_RTC_LIB=y
1004# CONFIG_RTC_CLASS is not set
1005
1006#
1005# File systems 1007# File systems
1006# 1008#
1007CONFIG_EXT2_FS=y 1009CONFIG_EXT2_FS=y
@@ -1052,7 +1054,6 @@ CONFIG_SYSFS=y
1052# CONFIG_TMPFS is not set 1054# CONFIG_TMPFS is not set
1053# CONFIG_HUGETLB_PAGE is not set 1055# CONFIG_HUGETLB_PAGE is not set
1054CONFIG_RAMFS=y 1056CONFIG_RAMFS=y
1055# CONFIG_RELAYFS_FS is not set
1056# CONFIG_CONFIGFS_FS is not set 1057# CONFIG_CONFIGFS_FS is not set
1057 1058
1058# 1059#
@@ -1193,6 +1194,7 @@ CONFIG_DEBUG_INFO=y
1193# CONFIG_DEBUG_FS is not set 1194# CONFIG_DEBUG_FS is not set
1194# CONFIG_DEBUG_VM is not set 1195# CONFIG_DEBUG_VM is not set
1195CONFIG_FRAME_POINTER=y 1196CONFIG_FRAME_POINTER=y
1197# CONFIG_UNWIND_INFO is not set
1196CONFIG_FORCED_INLINING=y 1198CONFIG_FORCED_INLINING=y
1197# CONFIG_RCU_TORTURE_TEST is not set 1199# CONFIG_RCU_TORTURE_TEST is not set
1198CONFIG_DEBUG_USER=y 1200CONFIG_DEBUG_USER=y
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 7df6e1aaa323..17c38dbf2f3c 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -28,6 +28,7 @@
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/cpu.h> 29#include <linux/cpu.h>
30#include <linux/elfcore.h> 30#include <linux/elfcore.h>
31#include <linux/pm.h>
31 32
32#include <asm/leds.h> 33#include <asm/leds.h>
33#include <asm/processor.h> 34#include <asm/processor.h>
@@ -71,8 +72,36 @@ static int __init hlt_setup(char *__unused)
71__setup("nohlt", nohlt_setup); 72__setup("nohlt", nohlt_setup);
72__setup("hlt", hlt_setup); 73__setup("hlt", hlt_setup);
73 74
75void arm_machine_restart(char mode)
76{
77 /*
78 * Clean and disable cache, and turn off interrupts
79 */
80 cpu_proc_fin();
81
82 /*
83 * Tell the mm system that we are going to reboot -
84 * we may need it to insert some 1:1 mappings so that
85 * soft boot works.
86 */
87 setup_mm_for_reboot(mode);
88
89 /*
90 * Now call the architecture specific reboot code.
91 */
92 arch_reset(mode);
93
94 /*
95 * Whoops - the architecture was unable to reboot.
96 * Tell the user!
97 */
98 mdelay(1000);
99 printk("Reboot failed -- System halted\n");
100 while (1);
101}
102
74/* 103/*
75 * The following aren't currently used. 104 * Function pointers to optional machine specific functions
76 */ 105 */
77void (*pm_idle)(void); 106void (*pm_idle)(void);
78EXPORT_SYMBOL(pm_idle); 107EXPORT_SYMBOL(pm_idle);
@@ -80,6 +109,10 @@ EXPORT_SYMBOL(pm_idle);
80void (*pm_power_off)(void); 109void (*pm_power_off)(void);
81EXPORT_SYMBOL(pm_power_off); 110EXPORT_SYMBOL(pm_power_off);
82 111
112void (*arm_pm_restart)(char str) = arm_machine_restart;
113EXPORT_SYMBOL_GPL(arm_pm_restart);
114
115
83/* 116/*
84 * This is our default idle handler. We need to disable 117 * This is our default idle handler. We need to disable
85 * interrupts here to ensure we don't miss a wakeup call. 118 * interrupts here to ensure we don't miss a wakeup call.
@@ -151,33 +184,9 @@ void machine_power_off(void)
151 pm_power_off(); 184 pm_power_off();
152} 185}
153 186
154
155void machine_restart(char * __unused) 187void machine_restart(char * __unused)
156{ 188{
157 /* 189 arm_pm_restart(reboot_mode);
158 * Clean and disable cache, and turn off interrupts
159 */
160 cpu_proc_fin();
161
162 /*
163 * Tell the mm system that we are going to reboot -
164 * we may need it to insert some 1:1 mappings so that
165 * soft boot works.
166 */
167 setup_mm_for_reboot(reboot_mode);
168
169 /*
170 * Now call the architecture specific reboot code.
171 */
172 arch_reset(reboot_mode);
173
174 /*
175 * Whoops - the architecture was unable to reboot.
176 * Tell the user!
177 */
178 mdelay(1000);
179 printk("Reboot failed -- System halted\n");
180 while (1);
181} 190}
182 191
183void __show_regs(struct pt_regs *regs) 192void __show_regs(struct pt_regs *regs)
diff --git a/arch/arm/mach-at91rm9200/Kconfig b/arch/arm/mach-at91rm9200/Kconfig
index 4b7218fc3eb1..1ab5b7828318 100644
--- a/arch/arm/mach-at91rm9200/Kconfig
+++ b/arch/arm/mach-at91rm9200/Kconfig
@@ -40,6 +40,18 @@ config MACH_KB9200
40 help 40 help
41 Select this if you are using KwikByte's KB920x board 41 Select this if you are using KwikByte's KB920x board
42 42
43config MACH_ATEB9200
44 bool "Embest's ATEB9200"
45 depends on ARCH_AT91RM9200
46 help
47 Select this if you are using Embest's ATEB9200 board
48
49config MACH_KAFA
50 bool "Sperry-Sun KAFA board"
51 depends on ARCH_AT91RM9200
52 help
53 Select this if you are using Sperry-Sun's KAFA board
54
43 55
44comment "AT91RM9200 Feature Selections" 56comment "AT91RM9200 Feature Selections"
45 57
diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91rm9200/Makefile
index ef88c4128edc..81ebc6684ad2 100644
--- a/arch/arm/mach-at91rm9200/Makefile
+++ b/arch/arm/mach-at91rm9200/Makefile
@@ -7,22 +7,31 @@ obj-m :=
7obj-n := 7obj-n :=
8obj- := 8obj- :=
9 9
10obj-$(CONFIG_PM) += pm.o
11
10# Board-specific support 12# Board-specific support
11obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o 13obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o
12obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o 14obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o
13obj-$(CONFIG_MACH_CSB337) += board-csb337.o 15obj-$(CONFIG_MACH_CSB337) += board-csb337.o
14obj-$(CONFIG_MACH_CSB637) += board-csb637.o 16obj-$(CONFIG_MACH_CSB637) += board-csb637.o
15#obj-$(CONFIG_MACH_CARMEVA) += board-carmeva.o 17obj-$(CONFIG_MACH_CARMEVA) += board-carmeva.o
16#obj-$(CONFIG_MACH_KB9200) += board-kb9202.o 18obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
19obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
20obj-$(CONFIG_MACH_KAFA) += board-kafa.o
17 21
18# LEDs support 22# LEDs support
19led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o 23led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
20led-$(CONFIG_MACH_AT91RM9200EK) += leds.o 24led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
21led-$(CONFIG_MACH_CSB337) += leds.o 25led-$(CONFIG_MACH_CSB337) += leds.o
22led-$(CONFIG_MACH_CSB637) += leds.o 26led-$(CONFIG_MACH_CSB637) += leds.o
23#led-$(CONFIG_MACH_KB9200) += leds.o 27led-$(CONFIG_MACH_KB9200) += leds.o
24#led-$(CONFIG_MACH_KAFA) += leds.o 28led-$(CONFIG_MACH_KAFA) += leds.o
25obj-$(CONFIG_LEDS) += $(led-y) 29obj-$(CONFIG_LEDS) += $(led-y)
26 30
27# VGA support 31# VGA support
28#obj-$(CONFIG_FB_S1D13XXX) += ics1523.o 32#obj-$(CONFIG_FB_S1D13XXX) += ics1523.o
33
34
35ifeq ($(CONFIG_PM_DEBUG),y)
36CFLAGS_pm.o += -DDEBUG
37endif
diff --git a/arch/arm/mach-at91rm9200/board-carmeva.c b/arch/arm/mach-at91rm9200/board-carmeva.c
new file mode 100644
index 000000000000..2c138b542ebe
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/board-carmeva.c
@@ -0,0 +1,131 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/board-carmeva.c
3 *
4 * Copyright (c) 2005 Peer Georgi
5 * Conitec Datasystems
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/config.h>
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
29#include <asm/hardware.h>
30#include <asm/setup.h>
31#include <asm/mach-types.h>
32#include <asm/irq.h>
33
34#include <asm/mach/arch.h>
35#include <asm/mach/map.h>
36#include <asm/mach/irq.h>
37
38#include <asm/hardware.h>
39#include <asm/arch/board.h>
40#include <asm/arch/gpio.h>
41
42#include "generic.h"
43
44static void __init carmeva_init_irq(void)
45{
46 /* Initialize AIC controller */
47 at91rm9200_init_irq(NULL);
48
49 /* Set up the GPIO interrupts */
50 at91_gpio_irq_setup(BGA_GPIO_BANKS);
51}
52
53/*
54 * Serial port configuration.
55 * 0 .. 3 = USART0 .. USART3
56 * 4 = DBGU
57 */
58static struct at91_uart_config __initdata carmeva_uart_config = {
59 .console_tty = 0, /* ttyS0 */
60 .nr_tty = 2,
61 .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
62};
63
64static void __init carmeva_map_io(void)
65{
66 at91rm9200_map_io();
67
68 /* Initialize clocks: 20.000 MHz crystal */
69 at91_clock_init(20000000);
70
71 /* Setup the serial ports and console */
72 at91_init_serial(&carmeva_uart_config);
73}
74
75static struct at91_eth_data __initdata carmeva_eth_data = {
76 .phy_irq_pin = AT91_PIN_PC4,
77 .is_rmii = 1,
78};
79
80static struct at91_usbh_data __initdata carmeva_usbh_data = {
81 .ports = 2,
82};
83
84static struct at91_udc_data __initdata carmeva_udc_data = {
85 .vbus_pin = AT91_PIN_PD12,
86 .pullup_pin = AT91_PIN_PD9,
87};
88
89/* FIXME: user dependend */
90// static struct at91_cf_data __initdata carmeva_cf_data = {
91// .det_pin = AT91_PIN_PB0,
92// .rst_pin = AT91_PIN_PC5,
93 // .irq_pin = ... not connected
94 // .vcc_pin = ... always powered
95// };
96
97static struct at91_mmc_data __initdata carmeva_mmc_data = {
98 .is_b = 0,
99 .wire4 = 1,
100};
101
102static void __init carmeva_board_init(void)
103{
104 /* Serial */
105 at91_add_device_serial();
106 /* Ethernet */
107 at91_add_device_eth(&carmeva_eth_data);
108 /* USB Host */
109 at91_add_device_usbh(&carmeva_usbh_data);
110 /* USB Device */
111 at91_add_device_udc(&carmeva_udc_data);
112 /* I2C */
113 at91_add_device_i2c();
114 /* Compact Flash */
115// at91_add_device_cf(&carmeva_cf_data);
116 /* SPI */
117// at91_add_device_spi(NULL, 0);
118 /* MMC */
119 at91_add_device_mmc(&carmeva_mmc_data);
120}
121
122MACHINE_START(CARMEVA, "Carmeva")
123 /* Maintainer: Conitec Datasystems */
124 .phys_io = AT91_BASE_SYS,
125 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
126 .boot_params = AT91_SDRAM_BASE + 0x100,
127 .timer = &at91rm9200_timer,
128 .map_io = carmeva_map_io,
129 .init_irq = carmeva_init_irq,
130 .init_machine = carmeva_board_init,
131MACHINE_END
diff --git a/arch/arm/mach-at91rm9200/board-csb337.c b/arch/arm/mach-at91rm9200/board-csb337.c
index f45104ceea8f..e94645d77f7a 100644
--- a/arch/arm/mach-at91rm9200/board-csb337.c
+++ b/arch/arm/mach-at91rm9200/board-csb337.c
@@ -24,6 +24,7 @@
24#include <linux/mm.h> 24#include <linux/mm.h>
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
27#include <linux/spi/spi.h>
27 28
28#include <asm/hardware.h> 29#include <asm/hardware.h>
29#include <asm/setup.h> 30#include <asm/setup.h>
@@ -34,9 +35,9 @@
34#include <asm/mach/map.h> 35#include <asm/mach/map.h>
35#include <asm/mach/irq.h> 36#include <asm/mach/irq.h>
36 37
37#include <asm/arch/hardware.h> 38#include <asm/hardware.h>
38#include <asm/mach/serial_at91rm9200.h>
39#include <asm/arch/board.h> 39#include <asm/arch/board.h>
40#include <asm/arch/gpio.h>
40 41
41#include "generic.h" 42#include "generic.h"
42 43
@@ -54,32 +55,24 @@ static void __init csb337_init_irq(void)
54 * 0 .. 3 = USART0 .. USART3 55 * 0 .. 3 = USART0 .. USART3
55 * 4 = DBGU 56 * 4 = DBGU
56 */ 57 */
57#define CSB337_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ 58static struct at91_uart_config __initdata csb337_uart_config = {
58#define CSB337_SERIAL_CONSOLE 0 /* ttyS0 */ 59 .console_tty = 0, /* ttyS0 */
60 .nr_tty = 2,
61 .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
62};
59 63
60static void __init csb337_map_io(void) 64static void __init csb337_map_io(void)
61{ 65{
62 int serial[AT91_NR_UART] = CSB337_UART_MAP;
63 int i;
64
65 at91rm9200_map_io(); 66 at91rm9200_map_io();
66 67
67 /* Initialize clocks: 3.6864 MHz crystal */ 68 /* Initialize clocks: 3.6864 MHz crystal */
68 at91_clock_init(3686400); 69 at91_clock_init(3686400);
69 70
70 /* Setup the LEDs */ 71 /* Setup the LEDs */
71 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); 72 at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
72 73
73#ifdef CONFIG_SERIAL_AT91 74 /* Setup the serial ports and console */
74 at91_console_port = CSB337_SERIAL_CONSOLE; 75 at91_init_serial(&csb337_uart_config);
75 memcpy(at91_serial_map, serial, sizeof(serial));
76
77 /* Register UARTs */
78 for (i = 0; i < AT91_NR_UART; i++) {
79 if (serial[i] >= 0)
80 at91_register_uart(i, serial[i]);
81 }
82#endif
83} 76}
84 77
85static struct at91_eth_data __initdata csb337_eth_data = { 78static struct at91_eth_data __initdata csb337_eth_data = {
@@ -118,17 +111,31 @@ static struct at91_mmc_data __initdata csb337_mmc_data = {
118 .wp_pin = AT91_PIN_PD6, 111 .wp_pin = AT91_PIN_PD6,
119}; 112};
120 113
114static struct spi_board_info csb337_spi_devices[] = {
115 { /* CAN controller */
116 .modalias = "sak82c900",
117 .chip_select = 0,
118 .max_speed_hz = 6 * 1000 * 1000,
119 },
120};
121
121static void __init csb337_board_init(void) 122static void __init csb337_board_init(void)
122{ 123{
124 /* Serial */
125 at91_add_device_serial();
123 /* Ethernet */ 126 /* Ethernet */
124 at91_add_device_eth(&csb337_eth_data); 127 at91_add_device_eth(&csb337_eth_data);
125 /* USB Host */ 128 /* USB Host */
126 at91_add_device_usbh(&csb337_usbh_data); 129 at91_add_device_usbh(&csb337_usbh_data);
127 /* USB Device */ 130 /* USB Device */
128 at91_add_device_udc(&csb337_udc_data); 131 at91_add_device_udc(&csb337_udc_data);
132 /* I2C */
133 at91_add_device_i2c();
129 /* Compact Flash */ 134 /* Compact Flash */
130 at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */ 135 at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */
131 at91_add_device_cf(&csb337_cf_data); 136 at91_add_device_cf(&csb337_cf_data);
137 /* SPI */
138 at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
132 /* MMC */ 139 /* MMC */
133 at91_add_device_mmc(&csb337_mmc_data); 140 at91_add_device_mmc(&csb337_mmc_data);
134} 141}
diff --git a/arch/arm/mach-at91rm9200/board-csb637.c b/arch/arm/mach-at91rm9200/board-csb637.c
index f2c2d6e79bc6..67d5f7786cdb 100644
--- a/arch/arm/mach-at91rm9200/board-csb637.c
+++ b/arch/arm/mach-at91rm9200/board-csb637.c
@@ -34,9 +34,9 @@
34#include <asm/mach/map.h> 34#include <asm/mach/map.h>
35#include <asm/mach/irq.h> 35#include <asm/mach/irq.h>
36 36
37#include <asm/arch/hardware.h> 37#include <asm/hardware.h>
38#include <asm/mach/serial_at91rm9200.h>
39#include <asm/arch/board.h> 38#include <asm/arch/board.h>
39#include <asm/arch/gpio.h>
40 40
41#include "generic.h" 41#include "generic.h"
42 42
@@ -54,14 +54,14 @@ static void __init csb637_init_irq(void)
54 * 0 .. 3 = USART0 .. USART3 54 * 0 .. 3 = USART0 .. USART3
55 * 4 = DBGU 55 * 4 = DBGU
56 */ 56 */
57#define CSB637_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ 57static struct at91_uart_config __initdata csb637_uart_config = {
58#define CSB637_SERIAL_CONSOLE 0 /* ttyS0 */ 58 .console_tty = 0, /* ttyS0 */
59 .nr_tty = 2,
60 .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
61};
59 62
60static void __init csb637_map_io(void) 63static void __init csb637_map_io(void)
61{ 64{
62 int serial[AT91_NR_UART] = CSB637_UART_MAP;
63 int i;
64
65 at91rm9200_map_io(); 65 at91rm9200_map_io();
66 66
67 /* Initialize clocks: 3.6864 MHz crystal */ 67 /* Initialize clocks: 3.6864 MHz crystal */
@@ -70,16 +70,8 @@ static void __init csb637_map_io(void)
70 /* Setup the LEDs */ 70 /* Setup the LEDs */
71 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); 71 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
72 72
73#ifdef CONFIG_SERIAL_AT91 73 /* Setup the serial ports and console */
74 at91_console_port = CSB637_SERIAL_CONSOLE; 74 at91_init_serial(&csb637_uart_config);
75 memcpy(at91_serial_map, serial, sizeof(serial));
76
77 /* Register UARTs */
78 for (i = 0; i < AT91_NR_UART; i++) {
79 if (serial[i] >= 0)
80 at91_register_uart(i, serial[i]);
81 }
82#endif
83} 75}
84 76
85static struct at91_eth_data __initdata csb637_eth_data = { 77static struct at91_eth_data __initdata csb637_eth_data = {
@@ -98,12 +90,18 @@ static struct at91_udc_data __initdata csb637_udc_data = {
98 90
99static void __init csb637_board_init(void) 91static void __init csb637_board_init(void)
100{ 92{
93 /* Serial */
94 at91_add_device_serial();
101 /* Ethernet */ 95 /* Ethernet */
102 at91_add_device_eth(&csb637_eth_data); 96 at91_add_device_eth(&csb637_eth_data);
103 /* USB Host */ 97 /* USB Host */
104 at91_add_device_usbh(&csb637_usbh_data); 98 at91_add_device_usbh(&csb637_usbh_data);
105 /* USB Device */ 99 /* USB Device */
106 at91_add_device_udc(&csb637_udc_data); 100 at91_add_device_udc(&csb637_udc_data);
101 /* I2C */
102 at91_add_device_i2c();
103 /* SPI */
104 at91_add_device_spi(NULL, 0);
107} 105}
108 106
109MACHINE_START(CSB637, "Cogent CSB637") 107MACHINE_START(CSB637, "Cogent CSB637")
diff --git a/arch/arm/mach-at91rm9200/board-dk.c b/arch/arm/mach-at91rm9200/board-dk.c
index 2d7200ed66ed..48d7390fa584 100644
--- a/arch/arm/mach-at91rm9200/board-dk.c
+++ b/arch/arm/mach-at91rm9200/board-dk.c
@@ -27,6 +27,7 @@
27#include <linux/mm.h> 27#include <linux/mm.h>
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30#include <linux/spi/spi.h>
30 31
31#include <asm/hardware.h> 32#include <asm/hardware.h>
32#include <asm/setup.h> 33#include <asm/setup.h>
@@ -37,9 +38,9 @@
37#include <asm/mach/map.h> 38#include <asm/mach/map.h>
38#include <asm/mach/irq.h> 39#include <asm/mach/irq.h>
39 40
40#include <asm/arch/hardware.h> 41#include <asm/hardware.h>
41#include <asm/mach/serial_at91rm9200.h>
42#include <asm/arch/board.h> 42#include <asm/arch/board.h>
43#include <asm/arch/gpio.h>
43 44
44#include "generic.h" 45#include "generic.h"
45 46
@@ -57,14 +58,14 @@ static void __init dk_init_irq(void)
57 * 0 .. 3 = USART0 .. USART3 58 * 0 .. 3 = USART0 .. USART3
58 * 4 = DBGU 59 * 4 = DBGU
59 */ 60 */
60#define DK_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ 61static struct at91_uart_config __initdata dk_uart_config = {
61#define DK_SERIAL_CONSOLE 0 /* ttyS0 */ 62 .console_tty = 0, /* ttyS0 */
63 .nr_tty = 2,
64 .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
65};
62 66
63static void __init dk_map_io(void) 67static void __init dk_map_io(void)
64{ 68{
65 int serial[AT91_NR_UART] = DK_UART_MAP;
66 int i;
67
68 at91rm9200_map_io(); 69 at91rm9200_map_io();
69 70
70 /* Initialize clocks: 18.432 MHz crystal */ 71 /* Initialize clocks: 18.432 MHz crystal */
@@ -73,16 +74,8 @@ static void __init dk_map_io(void)
73 /* Setup the LEDs */ 74 /* Setup the LEDs */
74 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2); 75 at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
75 76
76#ifdef CONFIG_SERIAL_AT91 77 /* Setup the serial ports and console */
77 at91_console_port = DK_SERIAL_CONSOLE; 78 at91_init_serial(&dk_uart_config);
78 memcpy(at91_serial_map, serial, sizeof(serial));
79
80 /* Register UARTs */
81 for (i = 0; i < AT91_NR_UART; i++) {
82 if (at91_serial_map[i] >= 0)
83 at91_register_uart(i, at91_serial_map[i]);
84 }
85#endif
86} 79}
87 80
88static struct at91_eth_data __initdata dk_eth_data = { 81static struct at91_eth_data __initdata dk_eth_data = {
@@ -111,16 +104,48 @@ static struct at91_mmc_data __initdata dk_mmc_data = {
111 .wire4 = 1, 104 .wire4 = 1,
112}; 105};
113 106
107static struct spi_board_info dk_spi_devices[] = {
108 { /* DataFlash chip */
109 .modalias = "mtd_dataflash",
110 .chip_select = 0,
111 .max_speed_hz = 15 * 1000 * 1000,
112 },
113 { /* UR6HCPS2-SP40 PS2-to-SPI adapter */
114 .modalias = "ur6hcps2",
115 .chip_select = 1,
116 .max_speed_hz = 250 * 1000,
117 },
118 { /* TLV1504 ADC, 4 channels, 10 bits; one is a temp sensor */
119 .modalias = "tlv1504",
120 .chip_select = 2,
121 .max_speed_hz = 20 * 1000 * 1000,
122 },
123#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
124 { /* DataFlash card */
125 .modalias = "mtd_dataflash",
126 .chip_select = 3,
127 .max_speed_hz = 15 * 1000 * 1000,
128 }
129#endif
130};
131
114static void __init dk_board_init(void) 132static void __init dk_board_init(void)
115{ 133{
134 /* Serial */
135 at91_add_device_serial();
116 /* Ethernet */ 136 /* Ethernet */
117 at91_add_device_eth(&dk_eth_data); 137 at91_add_device_eth(&dk_eth_data);
118 /* USB Host */ 138 /* USB Host */
119 at91_add_device_usbh(&dk_usbh_data); 139 at91_add_device_usbh(&dk_usbh_data);
120 /* USB Device */ 140 /* USB Device */
121 at91_add_device_udc(&dk_udc_data); 141 at91_add_device_udc(&dk_udc_data);
142 at91_set_multi_drive(dk_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */
122 /* Compact Flash */ 143 /* Compact Flash */
123 at91_add_device_cf(&dk_cf_data); 144 at91_add_device_cf(&dk_cf_data);
145 /* I2C */
146 at91_add_device_i2c();
147 /* SPI */
148 at91_add_device_spi(dk_spi_devices, ARRAY_SIZE(dk_spi_devices));
124#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD 149#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
125 /* DataFlash card */ 150 /* DataFlash card */
126 at91_set_gpio_output(AT91_PIN_PB7, 0); 151 at91_set_gpio_output(AT91_PIN_PB7, 0);
diff --git a/arch/arm/mach-at91rm9200/board-eb9200.c b/arch/arm/mach-at91rm9200/board-eb9200.c
new file mode 100644
index 000000000000..a3e2df968a66
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/board-eb9200.c
@@ -0,0 +1,130 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/board-eb9200.c
3 *
4 * Copyright (C) 2005 SAN People, adapted for ATEB9200 from Embest
5 * by Andrew Patrikalakis
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/config.h>
23#include <linux/types.h>
24#include <linux/init.h>
25#include <linux/mm.h>
26#include <linux/module.h>
27#include <linux/device.h>
28
29#include <asm/hardware.h>
30#include <asm/setup.h>
31#include <asm/mach-types.h>
32#include <asm/irq.h>
33
34#include <asm/mach/arch.h>
35#include <asm/mach/map.h>
36#include <asm/mach/irq.h>
37
38#include <asm/hardware.h>
39#include <asm/arch/board.h>
40#include <asm/arch/gpio.h>
41
42#include "generic.h"
43
44static void __init eb9200_init_irq(void)
45{
46 /* Initialize AIC controller */
47 at91rm9200_init_irq(NULL);
48
49 /* Set up the GPIO interrupts */
50 at91_gpio_irq_setup(BGA_GPIO_BANKS);
51}
52
53/*
54 * Serial port configuration.
55 * 0 .. 3 = USART0 .. USART3
56 * 4 = DBGU
57 */
58static struct at91_uart_config __initdata eb9200_uart_config = {
59 .console_tty = 0, /* ttyS0 */
60 .nr_tty = 2,
61 .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
62};
63
64static void __init eb9200_map_io(void)
65{
66 at91rm9200_map_io();
67
68 /* Initialize clocks: 18.432 MHz crystal */
69 at91_clock_init(18432000);
70
71 /* Setup the serial ports and console */
72 at91_init_serial(&eb9200_uart_config);
73}
74
75static struct at91_eth_data __initdata eb9200_eth_data = {
76 .phy_irq_pin = AT91_PIN_PC4,
77 .is_rmii = 1,
78};
79
80static struct at91_usbh_data __initdata eb9200_usbh_data = {
81 .ports = 2,
82};
83
84static struct at91_udc_data __initdata eb9200_udc_data = {
85 .vbus_pin = AT91_PIN_PD4,
86 .pullup_pin = AT91_PIN_PD5,
87};
88
89static struct at91_cf_data __initdata eb9200_cf_data = {
90 .det_pin = AT91_PIN_PB0,
91 .rst_pin = AT91_PIN_PC5,
92 // .irq_pin = ... not connected
93 // .vcc_pin = ... always powered
94};
95
96static struct at91_mmc_data __initdata eb9200_mmc_data = {
97 .is_b = 0,
98 .wire4 = 1,
99};
100
101static void __init eb9200_board_init(void)
102{
103 /* Serial */
104 at91_add_device_serial();
105 /* Ethernet */
106 at91_add_device_eth(&eb9200_eth_data);
107 /* USB Host */
108 at91_add_device_usbh(&eb9200_usbh_data);
109 /* USB Device */
110 at91_add_device_udc(&eb9200_udc_data);
111 /* I2C */
112 at91_add_device_i2c();
113 /* Compact Flash */
114 at91_add_device_cf(&eb9200_cf_data);
115 /* SPI */
116 at91_add_device_spi(NULL, 0);
117 /* MMC */
118 /* only supports 1 or 4 bit interface, not wired through to SPI */
119 at91_add_device_mmc(&eb9200_mmc_data);
120}
121
122MACHINE_START(ATEB9200, "Embest ATEB9200")
123 .phys_io = AT91_BASE_SYS,
124 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
125 .boot_params = AT91_SDRAM_BASE + 0x100,
126 .timer = &at91rm9200_timer,
127 .map_io = eb9200_map_io,
128 .init_irq = eb9200_init_irq,
129 .init_machine = eb9200_board_init,
130MACHINE_END
diff --git a/arch/arm/mach-at91rm9200/board-ek.c b/arch/arm/mach-at91rm9200/board-ek.c
index 80d90f5135a1..72202ed830ad 100644
--- a/arch/arm/mach-at91rm9200/board-ek.c
+++ b/arch/arm/mach-at91rm9200/board-ek.c
@@ -27,6 +27,7 @@
27#include <linux/mm.h> 27#include <linux/mm.h>
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/platform_device.h> 29#include <linux/platform_device.h>
30#include <linux/spi/spi.h>
30 31
31#include <asm/hardware.h> 32#include <asm/hardware.h>
32#include <asm/setup.h> 33#include <asm/setup.h>
@@ -37,9 +38,9 @@
37#include <asm/mach/map.h> 38#include <asm/mach/map.h>
38#include <asm/mach/irq.h> 39#include <asm/mach/irq.h>
39 40
40#include <asm/arch/hardware.h> 41#include <asm/hardware.h>
41#include <asm/mach/serial_at91rm9200.h>
42#include <asm/arch/board.h> 42#include <asm/arch/board.h>
43#include <asm/arch/gpio.h>
43 44
44#include "generic.h" 45#include "generic.h"
45 46
@@ -57,14 +58,14 @@ static void __init ek_init_irq(void)
57 * 0 .. 3 = USART0 .. USART3 58 * 0 .. 3 = USART0 .. USART3
58 * 4 = DBGU 59 * 4 = DBGU
59 */ 60 */
60#define EK_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ 61static struct at91_uart_config __initdata ek_uart_config = {
61#define EK_SERIAL_CONSOLE 0 /* ttyS0 */ 62 .console_tty = 0, /* ttyS0 */
63 .nr_tty = 2,
64 .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
65};
62 66
63static void __init ek_map_io(void) 67static void __init ek_map_io(void)
64{ 68{
65 int serial[AT91_NR_UART] = EK_UART_MAP;
66 int i;
67
68 at91rm9200_map_io(); 69 at91rm9200_map_io();
69 70
70 /* Initialize clocks: 18.432 MHz crystal */ 71 /* Initialize clocks: 18.432 MHz crystal */
@@ -73,16 +74,8 @@ static void __init ek_map_io(void)
73 /* Setup the LEDs */ 74 /* Setup the LEDs */
74 at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2); 75 at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
75 76
76#ifdef CONFIG_SERIAL_AT91 77 /* Setup the serial ports and console */
77 at91_console_port = EK_SERIAL_CONSOLE; 78 at91_init_serial(&ek_uart_config);
78 memcpy(at91_serial_map, serial, sizeof(serial));
79
80 /* Register UARTs */
81 for (i = 0; i < AT91_NR_UART; i++) {
82 if (serial[i] >= 0)
83 at91_register_uart(i, serial[i]);
84 }
85#endif
86} 79}
87 80
88static struct at91_eth_data __initdata ek_eth_data = { 81static struct at91_eth_data __initdata ek_eth_data = {
@@ -106,14 +99,36 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
106 .wp_pin = AT91_PIN_PA17, 99 .wp_pin = AT91_PIN_PA17,
107}; 100};
108 101
102static struct spi_board_info ek_spi_devices[] = {
103 { /* DataFlash chip */
104 .modalias = "mtd_dataflash",
105 .chip_select = 0,
106 .max_speed_hz = 15 * 1000 * 1000,
107 },
108#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
109 { /* DataFlash card */
110 .modalias = "mtd_dataflash",
111 .chip_select = 3,
112 .max_speed_hz = 15 * 1000 * 1000,
113 },
114#endif
115};
116
109static void __init ek_board_init(void) 117static void __init ek_board_init(void)
110{ 118{
119 /* Serial */
120 at91_add_device_serial();
111 /* Ethernet */ 121 /* Ethernet */
112 at91_add_device_eth(&ek_eth_data); 122 at91_add_device_eth(&ek_eth_data);
113 /* USB Host */ 123 /* USB Host */
114 at91_add_device_usbh(&ek_usbh_data); 124 at91_add_device_usbh(&ek_usbh_data);
115 /* USB Device */ 125 /* USB Device */
116 at91_add_device_udc(&ek_udc_data); 126 at91_add_device_udc(&ek_udc_data);
127 at91_set_multi_drive(ek_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */
128 /* I2C */
129 at91_add_device_i2c();
130 /* SPI */
131 at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
117#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD 132#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
118 /* DataFlash card */ 133 /* DataFlash card */
119 at91_set_gpio_output(AT91_PIN_PB22, 0); 134 at91_set_gpio_output(AT91_PIN_PB22, 0);
diff --git a/arch/arm/mach-at91rm9200/board-kafa.c b/arch/arm/mach-at91rm9200/board-kafa.c
new file mode 100644
index 000000000000..bf760c5e0c46
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/board-kafa.c
@@ -0,0 +1,116 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/board-kafa.c
3 *
4 * Copyright (C) 2006 Sperry-Sun
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 */
20
21#include <linux/config.h>
22#include <linux/types.h>
23#include <linux/init.h>
24#include <linux/mm.h>
25#include <linux/module.h>
26#include <linux/platform_device.h>
27
28#include <asm/hardware.h>
29#include <asm/setup.h>
30#include <asm/mach-types.h>
31#include <asm/irq.h>
32
33#include <asm/mach/arch.h>
34#include <asm/mach/map.h>
35#include <asm/mach/irq.h>
36
37#include <asm/hardware.h>
38#include <asm/arch/board.h>
39#include <asm/arch/gpio.h>
40
41#include "generic.h"
42
43static void __init kafa_init_irq(void)
44{
45 /* Initialize AIC controller */
46 at91rm9200_init_irq(NULL);
47
48 /* Set up the GPIO interrupts */
49 at91_gpio_irq_setup(PQFP_GPIO_BANKS);
50}
51
52/*
53 * Serial port configuration.
54 * 0 .. 3 = USART0 .. USART3
55 * 4 = DBGU
56 */
57static struct at91_uart_config __initdata kafa_uart_config = {
58 .console_tty = 0, /* ttyS0 */
59 .nr_tty = 2,
60 .tty_map = { 4, 0, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
61};
62
63static void __init kafa_map_io(void)
64{
65 at91rm9200_map_io();
66
67 /* Initialize clocks: 18.432 MHz crystal */
68 at91_clock_init(18432000);
69
70 /* Set up the LEDs */
71 at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
72
73 /* Setup the serial ports and console */
74 at91_init_serial(&kafa_uart_config);
75}
76
77static struct at91_eth_data __initdata kafa_eth_data = {
78 .phy_irq_pin = AT91_PIN_PC4,
79 .is_rmii = 0,
80};
81
82static struct at91_usbh_data __initdata kafa_usbh_data = {
83 .ports = 1,
84};
85
86static struct at91_udc_data __initdata kafa_udc_data = {
87 .vbus_pin = AT91_PIN_PB6,
88 .pullup_pin = AT91_PIN_PB7,
89};
90
91static void __init kafa_board_init(void)
92{
93 /* Serial */
94 at91_add_device_serial();
95 /* Ethernet */
96 at91_add_device_eth(&kafa_eth_data);
97 /* USB Host */
98 at91_add_device_usbh(&kafa_usbh_data);
99 /* USB Device */
100 at91_add_device_udc(&kafa_udc_data);
101 /* I2C */
102 at91_add_device_i2c();
103 /* SPI */
104 at91_add_device_spi(NULL, 0);
105}
106
107MACHINE_START(KAFA, "Sperry-Sun KAFA")
108 /* Maintainer: Sergei Sharonov */
109 .phys_io = AT91_BASE_SYS,
110 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
111 .boot_params = AT91_SDRAM_BASE + 0x100,
112 .timer = &at91rm9200_timer,
113 .map_io = kafa_map_io,
114 .init_irq = kafa_init_irq,
115 .init_machine = kafa_board_init,
116MACHINE_END
diff --git a/arch/arm/mach-at91rm9200/board-kb9202.c b/arch/arm/mach-at91rm9200/board-kb9202.c
new file mode 100644
index 000000000000..f06d2b54cc9a
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/board-kb9202.c
@@ -0,0 +1,125 @@
1/*
2 * linux/arch/arm/mach-at91rm9200/board-kb9202.c
3 *
4 * Copyright (c) 2005 kb_admin
5 * KwikByte, Inc.
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/config.h>
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
29#include <asm/hardware.h>
30#include <asm/setup.h>
31#include <asm/mach-types.h>
32#include <asm/irq.h>
33
34#include <asm/mach/arch.h>
35#include <asm/mach/map.h>
36#include <asm/mach/irq.h>
37
38#include <asm/hardware.h>
39#include <asm/arch/board.h>
40#include <asm/arch/gpio.h>
41
42#include "generic.h"
43
44static void __init kb9202_init_irq(void)
45{
46 /* Initialize AIC controller */
47 at91rm9200_init_irq(NULL);
48
49 /* Set up the GPIO interrupts */
50 at91_gpio_irq_setup(PQFP_GPIO_BANKS);
51}
52
53/*
54 * Serial port configuration.
55 * 0 .. 3 = USART0 .. USART3
56 * 4 = DBGU
57 */
58static struct at91_uart_config __initdata kb9202_uart_config = {
59 .console_tty = 0, /* ttyS0 */
60 .nr_tty = 3,
61 .tty_map = { 4, 0, 1, -1, -1 } /* ttyS0, ..., ttyS4 */
62};
63
64static void __init kb9202_map_io(void)
65{
66 at91rm9200_map_io();
67
68 /* Initialize clocks: 10 MHz crystal */
69 at91_clock_init(10000000);
70
71 /* Set up the LEDs */
72 at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
73
74 /* Setup the serial ports and console */
75 at91_init_serial(&kb9202_uart_config);
76}
77
78static struct at91_eth_data __initdata kb9202_eth_data = {
79 .phy_irq_pin = AT91_PIN_PB29,
80 .is_rmii = 0,
81};
82
83static struct at91_usbh_data __initdata kb9202_usbh_data = {
84 .ports = 1,
85};
86
87static struct at91_udc_data __initdata kb9202_udc_data = {
88 .vbus_pin = AT91_PIN_PB24,
89 .pullup_pin = AT91_PIN_PB22,
90};
91
92static struct at91_mmc_data __initdata kb9202_mmc_data = {
93 .det_pin = AT91_PIN_PB2,
94 .is_b = 0,
95 .wire4 = 1,
96};
97
98static void __init kb9202_board_init(void)
99{
100 /* Serial */
101 at91_add_device_serial();
102 /* Ethernet */
103 at91_add_device_eth(&kb9202_eth_data);
104 /* USB Host */
105 at91_add_device_usbh(&kb9202_usbh_data);
106 /* USB Device */
107 at91_add_device_udc(&kb9202_udc_data);
108 /* MMC */
109 at91_add_device_mmc(&kb9202_mmc_data);
110 /* I2C */
111 at91_add_device_i2c();
112 /* SPI */
113 at91_add_device_spi(NULL, 0);
114}
115
116MACHINE_START(KB9200, "KB920x")
117 /* Maintainer: KwikByte, Inc. */
118 .phys_io = AT91_BASE_SYS,
119 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
120 .boot_params = AT91_SDRAM_BASE + 0x100,
121 .timer = &at91rm9200_timer,
122 .map_io = kb9202_map_io,
123 .init_irq = kb9202_init_irq,
124 .init_machine = kb9202_board_init,
125MACHINE_END
diff --git a/arch/arm/mach-at91rm9200/clock.c b/arch/arm/mach-at91rm9200/clock.c
index 8b95467c6d61..edc2cc837ae6 100644
--- a/arch/arm/mach-at91rm9200/clock.c
+++ b/arch/arm/mach-at91rm9200/clock.c
@@ -27,12 +27,10 @@
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/mach-types.h> 28#include <asm/mach-types.h>
29 29
30#include <asm/arch/hardware.h> 30#include <asm/hardware.h>
31#include <asm/arch/board.h> /* for master clock global */
32 31
33#include "generic.h" 32#include "generic.h"
34 33
35#undef DEBUG
36 34
37/* 35/*
38 * There's a lot more which can be done with clocks, including cpufreq 36 * There's a lot more which can be done with clocks, including cpufreq
@@ -41,7 +39,9 @@
41 */ 39 */
42 40
43struct clk { 41struct clk {
44 const char *name; 42 const char *name; /* unique clock name */
43 const char *function; /* function of the clock */
44 struct device *dev; /* device associated with function */
45 unsigned long rate_hz; 45 unsigned long rate_hz;
46 struct clk *parent; 46 struct clk *parent;
47 u32 pmc_mask; 47 u32 pmc_mask;
@@ -71,15 +71,14 @@ static struct clk clk32k = {
71}; 71};
72static struct clk main_clk = { 72static struct clk main_clk = {
73 .name = "main", 73 .name = "main",
74 .pmc_mask = 1 << 0, /* in PMC_SR */ 74 .pmc_mask = AT91_PMC_MOSCS, /* in PMC_SR */
75 .users = 1,
76 .id = 1, 75 .id = 1,
77 .primary = 1, 76 .primary = 1,
78}; 77};
79static struct clk plla = { 78static struct clk plla = {
80 .name = "plla", 79 .name = "plla",
81 .parent = &main_clk, 80 .parent = &main_clk,
82 .pmc_mask = 1 << 1, /* in PMC_SR */ 81 .pmc_mask = AT91_PMC_LOCKA, /* in PMC_SR */
83 .id = 2, 82 .id = 2,
84 .primary = 1, 83 .primary = 1,
85 .pll = 1, 84 .pll = 1,
@@ -105,7 +104,7 @@ static void pllb_mode(struct clk *clk, int is_on)
105static struct clk pllb = { 104static struct clk pllb = {
106 .name = "pllb", 105 .name = "pllb",
107 .parent = &main_clk, 106 .parent = &main_clk,
108 .pmc_mask = 1 << 2, /* in PMC_SR */ 107 .pmc_mask = AT91_PMC_LOCKB, /* in PMC_SR */
109 .mode = pllb_mode, 108 .mode = pllb_mode,
110 .id = 3, 109 .id = 3,
111 .primary = 1, 110 .primary = 1,
@@ -177,8 +176,7 @@ static struct clk pck3 = {
177 */ 176 */
178static struct clk mck = { 177static struct clk mck = {
179 .name = "mck", 178 .name = "mck",
180 .pmc_mask = 1 << 3, /* in PMC_SR */ 179 .pmc_mask = AT91_PMC_MCKRDY, /* in PMC_SR */
181 .users = 1, /* (must be) always on */
182}; 180};
183 181
184static void pmc_periph_mode(struct clk *clk, int is_on) 182static void pmc_periph_mode(struct clk *clk, int is_on)
@@ -249,6 +247,30 @@ static struct clk spi_clk = {
249 .pmc_mask = 1 << AT91_ID_SPI, 247 .pmc_mask = 1 << AT91_ID_SPI,
250 .mode = pmc_periph_mode, 248 .mode = pmc_periph_mode,
251}; 249};
250static struct clk pioA_clk = {
251 .name = "pioA_clk",
252 .parent = &mck,
253 .pmc_mask = 1 << AT91_ID_PIOA,
254 .mode = pmc_periph_mode,
255};
256static struct clk pioB_clk = {
257 .name = "pioB_clk",
258 .parent = &mck,
259 .pmc_mask = 1 << AT91_ID_PIOB,
260 .mode = pmc_periph_mode,
261};
262static struct clk pioC_clk = {
263 .name = "pioC_clk",
264 .parent = &mck,
265 .pmc_mask = 1 << AT91_ID_PIOC,
266 .mode = pmc_periph_mode,
267};
268static struct clk pioD_clk = {
269 .name = "pioD_clk",
270 .parent = &mck,
271 .pmc_mask = 1 << AT91_ID_PIOD,
272 .mode = pmc_periph_mode,
273};
252 274
253static struct clk *const clock_list[] = { 275static struct clk *const clock_list[] = {
254 /* four primary clocks -- MUST BE FIRST! */ 276 /* four primary clocks -- MUST BE FIRST! */
@@ -279,21 +301,46 @@ static struct clk *const clock_list[] = {
279 &udc_clk, 301 &udc_clk,
280 &twi_clk, 302 &twi_clk,
281 &spi_clk, 303 &spi_clk,
304 &pioA_clk,
305 &pioB_clk,
306 &pioC_clk,
307 &pioD_clk,
282 // ssc0..ssc2 308 // ssc0..ssc2
283 // tc0..tc5 309 // tc0..tc5
310 // irq0..irq6
284 &ohci_clk, 311 &ohci_clk,
285 &ether_clk, 312 &ether_clk,
286}; 313};
287 314
288 315
316/*
317 * Associate a particular clock with a function (eg, "uart") and device.
318 * The drivers can then request the same 'function' with several different
319 * devices and not care about which clock name to use.
320 */
321void __init at91_clock_associate(const char *id, struct device *dev, const char *func)
322{
323 struct clk *clk = clk_get(NULL, id);
324
325 if (!dev || !clk || !IS_ERR(clk_get(dev, func)))
326 return;
327
328 clk->function = func;
329 clk->dev = dev;
330}
331
289/* clocks are all static for now; no refcounting necessary */ 332/* clocks are all static for now; no refcounting necessary */
290struct clk *clk_get(struct device *dev, const char *id) 333struct clk *clk_get(struct device *dev, const char *id)
291{ 334{
292 int i; 335 int i;
293 336
294 for (i = 0; i < ARRAY_SIZE(clock_list); i++) { 337 for (i = 0; i < ARRAY_SIZE(clock_list); i++) {
295 if (strcmp(id, clock_list[i]->name) == 0) 338 struct clk *clk = clock_list[i];
296 return clock_list[i]; 339
340 if (strcmp(id, clk->name) == 0)
341 return clk;
342 if (clk->function && (dev == clk->dev) && strcmp(id, clk->function) == 0)
343 return clk;
297 } 344 }
298 345
299 return ERR_PTR(-ENOENT); 346 return ERR_PTR(-ENOENT);
@@ -593,6 +640,30 @@ fail:
593 return 0; 640 return 0;
594} 641}
595 642
643
644/*
645 * Several unused clocks may be active. Turn them off.
646 */
647static void at91_periphclk_reset(void)
648{
649 unsigned long reg;
650 int i;
651
652 reg = at91_sys_read(AT91_PMC_PCSR);
653
654 for (i = 0; i < ARRAY_SIZE(clock_list); i++) {
655 struct clk *clk = clock_list[i];
656
657 if (clk->mode != pmc_periph_mode)
658 continue;
659
660 if (clk->users > 0)
661 reg &= ~clk->pmc_mask;
662 }
663
664 at91_sys_write(AT91_PMC_PCDR, reg);
665}
666
596int __init at91_clock_init(unsigned long main_clock) 667int __init at91_clock_init(unsigned long main_clock)
597{ 668{
598 unsigned tmp, freq, mckr; 669 unsigned tmp, freq, mckr;
@@ -626,7 +697,6 @@ int __init at91_clock_init(unsigned long main_clock)
626 */ 697 */
627 at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M; 698 at91_pllb_usb_init = at91_pll_calc(main_clock, 48000000 * 2) | AT91_PMC_USB96M;
628 pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init); 699 pllb.rate_hz = at91_pll_rate(&pllb, main_clock, at91_pllb_usb_init);
629 at91_sys_write(AT91_PMC_PCDR, (1 << AT91_ID_UHP) | (1 << AT91_ID_UDP));
630 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP); 700 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP | AT91_PMC_UDP);
631 at91_sys_write(AT91_CKGR_PLLBR, 0); 701 at91_sys_write(AT91_CKGR_PLLBR, 0);
632 at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP); 702 at91_sys_write(AT91_PMC_SCER, AT91_PMC_MCKUDP);
@@ -640,19 +710,18 @@ int __init at91_clock_init(unsigned long main_clock)
640 */ 710 */
641 mckr = at91_sys_read(AT91_PMC_MCKR); 711 mckr = at91_sys_read(AT91_PMC_MCKR);
642 mck.parent = clock_list[mckr & AT91_PMC_CSS]; 712 mck.parent = clock_list[mckr & AT91_PMC_CSS];
643 mck.parent->users++;
644 freq = mck.parent->rate_hz; 713 freq = mck.parent->rate_hz;
645 freq /= (1 << ((mckr >> 2) & 3)); /* prescale */ 714 freq /= (1 << ((mckr >> 2) & 3)); /* prescale */
646 mck.rate_hz = freq / (1 + ((mckr >> 8) & 3)); /* mdiv */ 715 mck.rate_hz = freq / (1 + ((mckr >> 8) & 3)); /* mdiv */
647 716
717 /* MCK and CPU clock are "always on" */
718 clk_enable(&mck);
719
648 printk("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n", 720 printk("Clocks: CPU %u MHz, master %u MHz, main %u.%03u MHz\n",
649 freq / 1000000, (unsigned) mck.rate_hz / 1000000, 721 freq / 1000000, (unsigned) mck.rate_hz / 1000000,
650 (unsigned) main_clock / 1000000, 722 (unsigned) main_clock / 1000000,
651 ((unsigned) main_clock % 1000000) / 1000); 723 ((unsigned) main_clock % 1000000) / 1000);
652 724
653 /* FIXME get rid of master_clock global */
654 at91_master_clock = mck.rate_hz;
655
656#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS 725#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
657 /* establish PCK0..PCK3 parentage */ 726 /* establish PCK0..PCK3 parentage */
658 for (tmp = 0; tmp < ARRAY_SIZE(clock_list); tmp++) { 727 for (tmp = 0; tmp < ARRAY_SIZE(clock_list); tmp++) {
@@ -663,19 +732,28 @@ int __init at91_clock_init(unsigned long main_clock)
663 continue; 732 continue;
664 733
665 pckr = at91_sys_read(AT91_PMC_PCKR(clk->id)); 734 pckr = at91_sys_read(AT91_PMC_PCKR(clk->id));
666 parent = clock_list[pckr & 3]; 735 parent = clock_list[pckr & AT91_PMC_CSS];
667 clk->parent = parent; 736 clk->parent = parent;
668 clk->rate_hz = parent->rate_hz / (1 << ((pckr >> 2) & 3)); 737 clk->rate_hz = parent->rate_hz / (1 << ((pckr >> 2) & 3));
738
739 if (clk->users == 0) {
740 /* not being used, so switch it off */
741 at91_sys_write(AT91_PMC_SCDR, clk->pmc_mask);
742 }
669 } 743 }
670#else 744#else
671 /* disable unused clocks */ 745 /* disable all programmable clocks */
672 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK0 | AT91_PMC_PCK1 | AT91_PMC_PCK2 | AT91_PMC_PCK3); 746 at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK0 | AT91_PMC_PCK1 | AT91_PMC_PCK2 | AT91_PMC_PCK3);
673#endif /* CONFIG_AT91_PROGRAMMABLE_CLOCKS */ 747#endif
674 748
675 /* FIXME several unused clocks may still be active... provide 749 /* enable the PIO clocks */
676 * a CONFIG option to turn off all unused clocks at some point 750 clk_enable(&pioA_clk);
677 * before driver init starts. 751 clk_enable(&pioB_clk);
678 */ 752 clk_enable(&pioC_clk);
753 clk_enable(&pioD_clk);
754
755 /* disable all other unused peripheral clocks */
756 at91_periphclk_reset();
679 757
680 return 0; 758 return 0;
681} 759}
diff --git a/arch/arm/mach-at91rm9200/common.c b/arch/arm/mach-at91rm9200/common.c
index 3848fd2d5596..e836f8537a1d 100644
--- a/arch/arm/mach-at91rm9200/common.c
+++ b/arch/arm/mach-at91rm9200/common.c
@@ -16,7 +16,8 @@
16#include <asm/mach/arch.h> 16#include <asm/mach/arch.h>
17#include <asm/mach/map.h> 17#include <asm/mach/map.h>
18 18
19#include <asm/arch/hardware.h> 19#include <asm/hardware.h>
20#include "generic.h"
20 21
21static struct map_desc at91rm9200_io_desc[] __initdata = { 22static struct map_desc at91rm9200_io_desc[] __initdata = {
22 { 23 {
@@ -94,6 +95,11 @@ static struct map_desc at91rm9200_io_desc[] __initdata = {
94 .pfn = __phys_to_pfn(AT91_BASE_TCB0), 95 .pfn = __phys_to_pfn(AT91_BASE_TCB0),
95 .length = SZ_16K, 96 .length = SZ_16K,
96 .type = MT_DEVICE, 97 .type = MT_DEVICE,
98 }, {
99 .virtual = AT91_SRAM_VIRT_BASE,
100 .pfn = __phys_to_pfn(AT91_SRAM_BASE),
101 .length = AT91_SRAM_SIZE,
102 .type = MT_DEVICE,
97 }, 103 },
98}; 104};
99 105
@@ -102,14 +108,3 @@ void __init at91rm9200_map_io(void)
102 iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); 108 iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
103} 109}
104 110
105
106unsigned long at91_master_clock;
107
108EXPORT_SYMBOL(at91_master_clock);
109
110
111int at91_serial_map[AT91_NR_UART];
112int at91_console_port;
113
114EXPORT_SYMBOL(at91_serial_map);
115EXPORT_SYMBOL(at91_console_port);
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c
index bfe47bd6e50c..1cf85d231baa 100644
--- a/arch/arm/mach-at91rm9200/devices.c
+++ b/arch/arm/mach-at91rm9200/devices.c
@@ -16,9 +16,15 @@
16#include <linux/config.h> 16#include <linux/config.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18 18
19#include <asm/hardware.h>
19#include <asm/arch/board.h> 20#include <asm/arch/board.h>
20#include <asm/arch/pio.h> 21#include <asm/arch/gpio.h>
21 22
23#include "generic.h"
24
25#define SZ_512 0x00000200
26#define SZ_256 0x00000100
27#define SZ_16 0x00000010
22 28
23/* -------------------------------------------------------------------- 29/* --------------------------------------------------------------------
24 * USB Host 30 * USB Host
@@ -28,7 +34,7 @@
28static u64 ohci_dmamask = 0xffffffffUL; 34static u64 ohci_dmamask = 0xffffffffUL;
29static struct at91_usbh_data usbh_data; 35static struct at91_usbh_data usbh_data;
30 36
31static struct resource at91_usbh_resource[] = { 37static struct resource at91_usbh_resources[] = {
32 [0] = { 38 [0] = {
33 .start = AT91_UHP_BASE, 39 .start = AT91_UHP_BASE,
34 .end = AT91_UHP_BASE + SZ_1M - 1, 40 .end = AT91_UHP_BASE + SZ_1M - 1,
@@ -42,15 +48,15 @@ static struct resource at91_usbh_resource[] = {
42}; 48};
43 49
44static struct platform_device at91rm9200_usbh_device = { 50static struct platform_device at91rm9200_usbh_device = {
45 .name = "at91rm9200-ohci", 51 .name = "at91_ohci",
46 .id = -1, 52 .id = -1,
47 .dev = { 53 .dev = {
48 .dma_mask = &ohci_dmamask, 54 .dma_mask = &ohci_dmamask,
49 .coherent_dma_mask = 0xffffffff, 55 .coherent_dma_mask = 0xffffffff,
50 .platform_data = &usbh_data, 56 .platform_data = &usbh_data,
51 }, 57 },
52 .resource = at91_usbh_resource, 58 .resource = at91_usbh_resources,
53 .num_resources = ARRAY_SIZE(at91_usbh_resource), 59 .num_resources = ARRAY_SIZE(at91_usbh_resources),
54}; 60};
55 61
56void __init at91_add_device_usbh(struct at91_usbh_data *data) 62void __init at91_add_device_usbh(struct at91_usbh_data *data)
@@ -74,11 +80,16 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data) {}
74static struct at91_udc_data udc_data; 80static struct at91_udc_data udc_data;
75 81
76static struct resource at91_udc_resources[] = { 82static struct resource at91_udc_resources[] = {
77 { 83 [0] = {
78 .start = AT91_BASE_UDP, 84 .start = AT91_BASE_UDP,
79 .end = AT91_BASE_UDP + SZ_16K - 1, 85 .end = AT91_BASE_UDP + SZ_16K - 1,
80 .flags = IORESOURCE_MEM, 86 .flags = IORESOURCE_MEM,
81 } 87 },
88 [1] = {
89 .start = AT91_ID_UDP,
90 .end = AT91_ID_UDP,
91 .flags = IORESOURCE_IRQ,
92 },
82}; 93};
83 94
84static struct platform_device at91rm9200_udc_device = { 95static struct platform_device at91rm9200_udc_device = {
@@ -100,10 +111,8 @@ void __init at91_add_device_udc(struct at91_udc_data *data)
100 at91_set_gpio_input(data->vbus_pin, 0); 111 at91_set_gpio_input(data->vbus_pin, 0);
101 at91_set_deglitch(data->vbus_pin, 1); 112 at91_set_deglitch(data->vbus_pin, 1);
102 } 113 }
103 if (data->pullup_pin) { 114 if (data->pullup_pin)
104 at91_set_gpio_output(data->pullup_pin, 0); 115 at91_set_gpio_output(data->pullup_pin, 0);
105 at91_set_multi_drive(data->pullup_pin, 1);
106 }
107 116
108 udc_data = *data; 117 udc_data = *data;
109 platform_device_register(&at91rm9200_udc_device); 118 platform_device_register(&at91rm9200_udc_device);
@@ -197,7 +206,7 @@ static struct at91_cf_data cf_data;
197static struct resource at91_cf_resources[] = { 206static struct resource at91_cf_resources[] = {
198 [0] = { 207 [0] = {
199 .start = AT91_CF_BASE, 208 .start = AT91_CF_BASE,
200 /* ties up CS4, CS5, and CS6 */ 209 /* ties up CS4, CS5 and CS6 */
201 .end = AT91_CF_BASE + (0x30000000 - 1), 210 .end = AT91_CF_BASE + (0x30000000 - 1),
202 .flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT, 211 .flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT,
203 }, 212 },
@@ -231,6 +240,12 @@ void __init at91_add_device_cf(struct at91_cf_data *data)
231 at91_set_gpio_output(data->vcc_pin, 0); 240 at91_set_gpio_output(data->vcc_pin, 0);
232 at91_set_gpio_output(data->rst_pin, 0); 241 at91_set_gpio_output(data->rst_pin, 0);
233 242
243 /* force poweron defaults for these pins ... */
244 at91_set_A_periph(AT91_PIN_PC9, 0); /* A25/CFRNW */
245 at91_set_A_periph(AT91_PIN_PC10, 0); /* NCS4/CFCS */
246 at91_set_A_periph(AT91_PIN_PC11, 0); /* NCS5/CFCE1 */
247 at91_set_A_periph(AT91_PIN_PC12, 0); /* NCS6/CFCE2 */
248
234 cf_data = *data; 249 cf_data = *data;
235 platform_device_register(&at91rm9200_cf_device); 250 platform_device_register(&at91rm9200_cf_device);
236} 251}
@@ -319,6 +334,7 @@ void __init at91_add_device_mmc(struct at91_mmc_data *data)
319void __init at91_add_device_mmc(struct at91_mmc_data *data) {} 334void __init at91_add_device_mmc(struct at91_mmc_data *data) {}
320#endif 335#endif
321 336
337
322/* -------------------------------------------------------------------- 338/* --------------------------------------------------------------------
323 * NAND / SmartMedia 339 * NAND / SmartMedia
324 * -------------------------------------------------------------------- */ 340 * -------------------------------------------------------------------- */
@@ -400,22 +416,110 @@ void __init at91_add_device_i2c(void) {}
400 416
401 417
402/* -------------------------------------------------------------------- 418/* --------------------------------------------------------------------
419 * SPI
420 * -------------------------------------------------------------------- */
421
422#if defined(CONFIG_SPI_AT91) || defined(CONFIG_SPI_AT91_MODULE) || defined(CONFIG_AT91_SPI) || defined(CONFIG_AT91_SPI_MODULE)
423static u64 spi_dmamask = 0xffffffffUL;
424
425static struct resource at91_spi_resources[] = {
426 [0] = {
427 .start = AT91_BASE_SPI,
428 .end = AT91_BASE_SPI + SZ_16K - 1,
429 .flags = IORESOURCE_MEM,
430 },
431 [1] = {
432 .start = AT91_ID_SPI,
433 .end = AT91_ID_SPI,
434 .flags = IORESOURCE_IRQ,
435 },
436};
437
438static struct platform_device at91rm9200_spi_device = {
439 .name = "at91_spi",
440 .id = 0,
441 .dev = {
442 .dma_mask = &spi_dmamask,
443 .coherent_dma_mask = 0xffffffff,
444 },
445 .resource = at91_spi_resources,
446 .num_resources = ARRAY_SIZE(at91_spi_resources),
447};
448
449static const unsigned at91_spi_standard_cs[4] = { AT91_PIN_PA3, AT91_PIN_PA4, AT91_PIN_PA5, AT91_PIN_PA6 };
450
451void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
452{
453 int i;
454 unsigned long cs_pin;
455
456 at91_set_A_periph(AT91_PIN_PA0, 0); /* MISO */
457 at91_set_A_periph(AT91_PIN_PA1, 0); /* MOSI */
458 at91_set_A_periph(AT91_PIN_PA2, 0); /* SPCK */
459
460 /* Enable SPI chip-selects */
461 for (i = 0; i < nr_devices; i++) {
462 if (devices[i].controller_data)
463 cs_pin = (unsigned long) devices[i].controller_data;
464 else
465 cs_pin = at91_spi_standard_cs[devices[i].chip_select];
466
467#ifdef CONFIG_SPI_AT91_MANUAL_CS
468 at91_set_gpio_output(cs_pin, 1);
469#else
470 at91_set_A_periph(cs_pin, 0);
471#endif
472
473 /* pass chip-select pin to driver */
474 devices[i].controller_data = (void *) cs_pin;
475 }
476
477 spi_register_board_info(devices, nr_devices);
478 at91_clock_associate("spi0_clk", &at91rm9200_spi_device.dev, "spi");
479 platform_device_register(&at91rm9200_spi_device);
480}
481#else
482void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices) {}
483#endif
484
485
486/* --------------------------------------------------------------------
403 * RTC 487 * RTC
404 * -------------------------------------------------------------------- */ 488 * -------------------------------------------------------------------- */
405 489
406#if defined(CONFIG_AT91_RTC) || defined(CONFIG_AT91_RTC_MODULE) 490#if defined(CONFIG_RTC_DRV_AT91) || defined(CONFIG_RTC_DRV_AT91_MODULE)
407static struct platform_device at91rm9200_rtc_device = { 491static struct platform_device at91rm9200_rtc_device = {
408 .name = "at91_rtc", 492 .name = "at91_rtc",
409 .id = -1, 493 .id = -1,
410 .num_resources = 0, 494 .num_resources = 0,
411}; 495};
412 496
413void __init at91_add_device_rtc(void) 497static void __init at91_add_device_rtc(void)
414{ 498{
415 platform_device_register(&at91rm9200_rtc_device); 499 platform_device_register(&at91rm9200_rtc_device);
416} 500}
417#else 501#else
418void __init at91_add_device_rtc(void) {} 502static void __init at91_add_device_rtc(void) {}
503#endif
504
505
506/* --------------------------------------------------------------------
507 * Watchdog
508 * -------------------------------------------------------------------- */
509
510#if defined(CONFIG_AT91_WATCHDOG) || defined(CONFIG_AT91_WATCHDOG_MODULE)
511static struct platform_device at91rm9200_wdt_device = {
512 .name = "at91_wdt",
513 .id = -1,
514 .num_resources = 0,
515};
516
517static void __init at91_add_device_watchdog(void)
518{
519 platform_device_register(&at91rm9200_wdt_device);
520}
521#else
522static void __init at91_add_device_watchdog(void) {}
419#endif 523#endif
420 524
421 525
@@ -429,13 +533,281 @@ u8 at91_leds_timer;
429 533
430void __init at91_init_leds(u8 cpu_led, u8 timer_led) 534void __init at91_init_leds(u8 cpu_led, u8 timer_led)
431{ 535{
432 at91_leds_cpu = cpu_led; 536 at91_leds_cpu = cpu_led;
433 at91_leds_timer = timer_led; 537 at91_leds_timer = timer_led;
434} 538}
435
436#else 539#else
437void __init at91_init_leds(u8 cpu_led, u8 timer_led) {} 540void __init at91_init_leds(u8 cpu_led, u8 timer_led) {}
438#endif 541#endif
439 542
440 543
544/* --------------------------------------------------------------------
545 * UART
546 * -------------------------------------------------------------------- */
547
548#if defined(CONFIG_SERIAL_AT91)
549static struct resource dbgu_resources[] = {
550 [0] = {
551 .start = AT91_VA_BASE_SYS + AT91_DBGU,
552 .end = AT91_VA_BASE_SYS + AT91_DBGU + SZ_512 - 1,
553 .flags = IORESOURCE_MEM,
554 },
555 [1] = {
556 .start = AT91_ID_SYS,
557 .end = AT91_ID_SYS,
558 .flags = IORESOURCE_IRQ,
559 },
560};
561
562static struct at91_uart_data dbgu_data = {
563 .use_dma_tx = 0,
564 .use_dma_rx = 0, /* DBGU not capable of receive DMA */
565};
566
567static struct platform_device at91rm9200_dbgu_device = {
568 .name = "at91_usart",
569 .id = 0,
570 .dev = {
571 .platform_data = &dbgu_data,
572 .coherent_dma_mask = 0xffffffff,
573 },
574 .resource = dbgu_resources,
575 .num_resources = ARRAY_SIZE(dbgu_resources),
576};
577
578static inline void configure_dbgu_pins(void)
579{
580 at91_set_A_periph(AT91_PIN_PA30, 0); /* DRXD */
581 at91_set_A_periph(AT91_PIN_PA31, 1); /* DTXD */
582}
583
584static struct resource uart0_resources[] = {
585 [0] = {
586 .start = AT91_BASE_US0,
587 .end = AT91_BASE_US0 + SZ_16K - 1,
588 .flags = IORESOURCE_MEM,
589 },
590 [1] = {
591 .start = AT91_ID_US0,
592 .end = AT91_ID_US0,
593 .flags = IORESOURCE_IRQ,
594 },
595};
596
597static struct at91_uart_data uart0_data = {
598 .use_dma_tx = 1,
599 .use_dma_rx = 1,
600};
601
602static struct platform_device at91rm9200_uart0_device = {
603 .name = "at91_usart",
604 .id = 1,
605 .dev = {
606 .platform_data = &uart0_data,
607 .coherent_dma_mask = 0xffffffff,
608 },
609 .resource = uart0_resources,
610 .num_resources = ARRAY_SIZE(uart0_resources),
611};
612
613static inline void configure_usart0_pins(void)
614{
615 at91_set_A_periph(AT91_PIN_PA17, 1); /* TXD0 */
616 at91_set_A_periph(AT91_PIN_PA18, 0); /* RXD0 */
617 at91_set_A_periph(AT91_PIN_PA20, 0); /* CTS0 */
618
619 /*
620 * AT91RM9200 Errata #39 - RTS0 is not internally connected to PA21.
621 * We need to drive the pin manually. Default is off (RTS is active low).
622 */
623 at91_set_gpio_output(AT91_PIN_PA21, 1);
624}
625
626static struct resource uart1_resources[] = {
627 [0] = {
628 .start = AT91_BASE_US1,
629 .end = AT91_BASE_US1 + SZ_16K - 1,
630 .flags = IORESOURCE_MEM,
631 },
632 [1] = {
633 .start = AT91_ID_US1,
634 .end = AT91_ID_US1,
635 .flags = IORESOURCE_IRQ,
636 },
637};
638
639static struct at91_uart_data uart1_data = {
640 .use_dma_tx = 1,
641 .use_dma_rx = 1,
642};
643
644static struct platform_device at91rm9200_uart1_device = {
645 .name = "at91_usart",
646 .id = 2,
647 .dev = {
648 .platform_data = &uart1_data,
649 .coherent_dma_mask = 0xffffffff,
650 },
651 .resource = uart1_resources,
652 .num_resources = ARRAY_SIZE(uart1_resources),
653};
654
655static inline void configure_usart1_pins(void)
656{
657 at91_set_A_periph(AT91_PIN_PB18, 0); /* RI1 */
658 at91_set_A_periph(AT91_PIN_PB19, 0); /* DTR1 */
659 at91_set_A_periph(AT91_PIN_PB20, 1); /* TXD1 */
660 at91_set_A_periph(AT91_PIN_PB21, 0); /* RXD1 */
661 at91_set_A_periph(AT91_PIN_PB23, 0); /* DCD1 */
662 at91_set_A_periph(AT91_PIN_PB24, 0); /* CTS1 */
663 at91_set_A_periph(AT91_PIN_PB25, 0); /* DSR1 */
664 at91_set_A_periph(AT91_PIN_PB26, 0); /* RTS1 */
665}
666
667static struct resource uart2_resources[] = {
668 [0] = {
669 .start = AT91_BASE_US2,
670 .end = AT91_BASE_US2 + SZ_16K - 1,
671 .flags = IORESOURCE_MEM,
672 },
673 [1] = {
674 .start = AT91_ID_US2,
675 .end = AT91_ID_US2,
676 .flags = IORESOURCE_IRQ,
677 },
678};
679
680static struct at91_uart_data uart2_data = {
681 .use_dma_tx = 1,
682 .use_dma_rx = 1,
683};
684
685static struct platform_device at91rm9200_uart2_device = {
686 .name = "at91_usart",
687 .id = 3,
688 .dev = {
689 .platform_data = &uart2_data,
690 .coherent_dma_mask = 0xffffffff,
691 },
692 .resource = uart2_resources,
693 .num_resources = ARRAY_SIZE(uart2_resources),
694};
695
696static inline void configure_usart2_pins(void)
697{
698 at91_set_A_periph(AT91_PIN_PA22, 0); /* RXD2 */
699 at91_set_A_periph(AT91_PIN_PA23, 1); /* TXD2 */
700}
701
702static struct resource uart3_resources[] = {
703 [0] = {
704 .start = AT91_BASE_US3,
705 .end = AT91_BASE_US3 + SZ_16K - 1,
706 .flags = IORESOURCE_MEM,
707 },
708 [1] = {
709 .start = AT91_ID_US3,
710 .end = AT91_ID_US3,
711 .flags = IORESOURCE_IRQ,
712 },
713};
714
715static struct at91_uart_data uart3_data = {
716 .use_dma_tx = 1,
717 .use_dma_rx = 1,
718};
719
720static struct platform_device at91rm9200_uart3_device = {
721 .name = "at91_usart",
722 .id = 4,
723 .dev = {
724 .platform_data = &uart3_data,
725 .coherent_dma_mask = 0xffffffff,
726 },
727 .resource = uart3_resources,
728 .num_resources = ARRAY_SIZE(uart3_resources),
729};
730
731static inline void configure_usart3_pins(void)
732{
733 at91_set_B_periph(AT91_PIN_PA5, 1); /* TXD3 */
734 at91_set_B_periph(AT91_PIN_PA6, 0); /* RXD3 */
735}
736
737struct platform_device *at91_uarts[AT91_NR_UART]; /* the UARTs to use */
738struct platform_device *at91_default_console_device; /* the serial console device */
739
740void __init at91_init_serial(struct at91_uart_config *config)
741{
742 int i;
743
744 /* Fill in list of supported UARTs */
745 for (i = 0; i < config->nr_tty; i++) {
746 switch (config->tty_map[i]) {
747 case 0:
748 configure_usart0_pins();
749 at91_uarts[i] = &at91rm9200_uart0_device;
750 at91_clock_associate("usart0_clk", &at91rm9200_uart0_device.dev, "usart");
751 break;
752 case 1:
753 configure_usart1_pins();
754 at91_uarts[i] = &at91rm9200_uart1_device;
755 at91_clock_associate("usart1_clk", &at91rm9200_uart1_device.dev, "usart");
756 break;
757 case 2:
758 configure_usart2_pins();
759 at91_uarts[i] = &at91rm9200_uart2_device;
760 at91_clock_associate("usart2_clk", &at91rm9200_uart2_device.dev, "usart");
761 break;
762 case 3:
763 configure_usart3_pins();
764 at91_uarts[i] = &at91rm9200_uart3_device;
765 at91_clock_associate("usart3_clk", &at91rm9200_uart3_device.dev, "usart");
766 break;
767 case 4:
768 configure_dbgu_pins();
769 at91_uarts[i] = &at91rm9200_dbgu_device;
770 at91_clock_associate("mck", &at91rm9200_dbgu_device.dev, "usart");
771 break;
772 default:
773 continue;
774 }
775 at91_uarts[i]->id = i; /* update ID number to mapped ID */
776 }
777
778 /* Set serial console device */
779 if (config->console_tty < AT91_NR_UART)
780 at91_default_console_device = at91_uarts[config->console_tty];
781 if (!at91_default_console_device)
782 printk(KERN_INFO "AT91: No default serial console defined.\n");
783}
784
785void __init at91_add_device_serial(void)
786{
787 int i;
788
789 for (i = 0; i < AT91_NR_UART; i++) {
790 if (at91_uarts[i])
791 platform_device_register(at91_uarts[i]);
792 }
793}
794#else
795void __init at91_init_serial(struct at91_uart_config *config) {}
796void __init at91_add_device_serial(void) {}
797#endif
798
799
441/* -------------------------------------------------------------------- */ 800/* -------------------------------------------------------------------- */
801
802/*
803 * These devices are always present and don't need any board-specific
804 * setup.
805 */
806static int __init at91_add_standard_devices(void)
807{
808 at91_add_device_rtc();
809 at91_add_device_watchdog();
810 return 0;
811}
812
813arch_initcall(at91_add_standard_devices);
diff --git a/arch/arm/mach-at91rm9200/generic.h b/arch/arm/mach-at91rm9200/generic.h
index 9bd541eba0a0..f0d969d7d874 100644
--- a/arch/arm/mach-at91rm9200/generic.h
+++ b/arch/arm/mach-at91rm9200/generic.h
@@ -16,3 +16,10 @@ extern struct sys_timer at91rm9200_timer;
16extern void __init at91rm9200_map_io(void); 16extern void __init at91rm9200_map_io(void);
17 17
18extern int __init at91_clock_init(unsigned long main_clock); 18extern int __init at91_clock_init(unsigned long main_clock);
19struct device;
20extern void __init at91_clock_associate(const char *id, struct device *dev, const char *func);
21
22 /* Power Management */
23extern void at91_irq_suspend(void);
24extern void at91_irq_resume(void);
25
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c
index 5ab46274e1a3..83c34747087b 100644
--- a/arch/arm/mach-at91rm9200/gpio.c
+++ b/arch/arm/mach-at91rm9200/gpio.c
@@ -16,7 +16,7 @@
16 16
17#include <asm/io.h> 17#include <asm/io.h>
18#include <asm/mach/irq.h> 18#include <asm/mach/irq.h>
19#include <asm/arch/hardware.h> 19#include <asm/hardware.h>
20#include <asm/arch/gpio.h> 20#include <asm/arch/gpio.h>
21 21
22static const u32 pio_controller_offset[4] = { 22static const u32 pio_controller_offset[4] = {
@@ -213,6 +213,84 @@ EXPORT_SYMBOL(at91_get_gpio_value);
213 213
214/*--------------------------------------------------------------------------*/ 214/*--------------------------------------------------------------------------*/
215 215
216#ifdef CONFIG_PM
217
218static u32 wakeups[BGA_GPIO_BANKS];
219static u32 backups[BGA_GPIO_BANKS];
220
221static int gpio_irq_set_wake(unsigned pin, unsigned state)
222{
223 unsigned mask = pin_to_mask(pin);
224
225 pin -= PIN_BASE;
226 pin /= 32;
227
228 if (unlikely(pin >= BGA_GPIO_BANKS))
229 return -EINVAL;
230
231 if (state)
232 wakeups[pin] |= mask;
233 else
234 wakeups[pin] &= ~mask;
235
236 return 0;
237}
238
239void at91_gpio_suspend(void)
240{
241 int i;
242
243 for (i = 0; i < BGA_GPIO_BANKS; i++) {
244 u32 pio = pio_controller_offset[i];
245
246 /*
247 * Note: drivers should have disabled GPIO interrupts that
248 * aren't supposed to be wakeup sources.
249 * But that is not much good on ARM..... disable_irq() does
250 * not update the hardware immediately, so the hardware mask
251 * (IMR) has the wrong value (not current, too much is
252 * permitted).
253 *
254 * Our workaround is to disable all non-wakeup IRQs ...
255 * which is exactly what correct drivers asked for in the
256 * first place!
257 */
258 backups[i] = at91_sys_read(pio + PIO_IMR);
259 at91_sys_write(pio_controller_offset[i] + PIO_IDR, backups[i]);
260 at91_sys_write(pio_controller_offset[i] + PIO_IER, wakeups[i]);
261
262 if (!wakeups[i]) {
263 disable_irq_wake(AT91_ID_PIOA + i);
264 at91_sys_write(AT91_PMC_PCDR, 1 << (AT91_ID_PIOA + i));
265 } else {
266 enable_irq_wake(AT91_ID_PIOA + i);
267#ifdef CONFIG_PM_DEBUG
268 printk(KERN_DEBUG "GPIO-%c may wake for %08x\n", "ABCD"[i], wakeups[i]);
269#endif
270 }
271 }
272}
273
274void at91_gpio_resume(void)
275{
276 int i;
277
278 for (i = 0; i < BGA_GPIO_BANKS; i++) {
279 at91_sys_write(pio_controller_offset[i] + PIO_IDR, wakeups[i]);
280 at91_sys_write(pio_controller_offset[i] + PIO_IER, backups[i]);
281 }
282
283 at91_sys_write(AT91_PMC_PCER,
284 (1 << AT91_ID_PIOA)
285 | (1 << AT91_ID_PIOB)
286 | (1 << AT91_ID_PIOC)
287 | (1 << AT91_ID_PIOD));
288}
289
290#else
291#define gpio_irq_set_wake NULL
292#endif
293
216 294
217/* Several AIC controller irqs are dispatched through this GPIO handler. 295/* Several AIC controller irqs are dispatched through this GPIO handler.
218 * To use any AT91_PIN_* as an externally triggered IRQ, first call 296 * To use any AT91_PIN_* as an externally triggered IRQ, first call
@@ -252,6 +330,7 @@ static struct irqchip gpio_irqchip = {
252 .mask = gpio_irq_mask, 330 .mask = gpio_irq_mask,
253 .unmask = gpio_irq_unmask, 331 .unmask = gpio_irq_unmask,
254 .set_type = gpio_irq_type, 332 .set_type = gpio_irq_type,
333 .set_wake = gpio_irq_set_wake,
255}; 334};
256 335
257static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs *regs) 336static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs *regs)
@@ -266,6 +345,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
266 /* temporarily mask (level sensitive) parent IRQ */ 345 /* temporarily mask (level sensitive) parent IRQ */
267 desc->chip->ack(irq); 346 desc->chip->ack(irq);
268 for (;;) { 347 for (;;) {
348 /* reading ISR acks the pending (edge triggered) GPIO interrupt */
269 isr = __raw_readl(pio + PIO_ISR) & __raw_readl(pio + PIO_IMR); 349 isr = __raw_readl(pio + PIO_ISR) & __raw_readl(pio + PIO_IMR);
270 if (!isr) 350 if (!isr)
271 break; 351 break;
@@ -315,15 +395,16 @@ void __init at91_gpio_irq_setup(unsigned banks)
315 set_irq_chipdata(id, controller); 395 set_irq_chipdata(id, controller);
316 396
317 for (i = 0; i < 32; i++, pin++) { 397 for (i = 0; i < 32; i++, pin++) {
398 /*
399 * Can use the "simple" and not "edge" handler since it's
400 * shorter, and the AIC handles interupts sanely.
401 */
318 set_irq_chip(pin, &gpio_irqchip); 402 set_irq_chip(pin, &gpio_irqchip);
319 set_irq_handler(pin, do_simple_IRQ); 403 set_irq_handler(pin, do_simple_IRQ);
320 set_irq_flags(pin, IRQF_VALID); 404 set_irq_flags(pin, IRQF_VALID);
321 } 405 }
322 406
323 set_irq_chained_handler(id, gpio_irq_handler); 407 set_irq_chained_handler(id, gpio_irq_handler);
324
325 /* enable the PIO peripheral clock */
326 at91_sys_write(AT91_PMC_PCER, 1 << id);
327 } 408 }
328 pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, banks); 409 pr_info("AT91: %d gpio irqs in %d banks\n", pin - PIN_BASE, banks);
329} 410}
diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c
index cb62bc83a1dd..70f4d7ac1533 100644
--- a/arch/arm/mach-at91rm9200/irq.c
+++ b/arch/arm/mach-at91rm9200/irq.c
@@ -92,10 +92,6 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type)
92{ 92{
93 unsigned int smr, srctype; 93 unsigned int smr, srctype;
94 94
95 /* change triggering only for FIQ and external IRQ0..IRQ6 */
96 if ((irq < AT91_ID_IRQ0) && (irq != AT91_ID_FIQ))
97 return -EINVAL;
98
99 switch (type) { 95 switch (type) {
100 case IRQT_HIGH: 96 case IRQT_HIGH:
101 srctype = AT91_AIC_SRCTYPE_HIGH; 97 srctype = AT91_AIC_SRCTYPE_HIGH;
@@ -104,9 +100,13 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type)
104 srctype = AT91_AIC_SRCTYPE_RISING; 100 srctype = AT91_AIC_SRCTYPE_RISING;
105 break; 101 break;
106 case IRQT_LOW: 102 case IRQT_LOW:
103 if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */
104 return -EINVAL;
107 srctype = AT91_AIC_SRCTYPE_LOW; 105 srctype = AT91_AIC_SRCTYPE_LOW;
108 break; 106 break;
109 case IRQT_FALLING: 107 case IRQT_FALLING:
108 if ((irq > AT91_ID_FIQ) && (irq < AT91_ID_IRQ0)) /* only supported on external interrupts */
109 return -EINVAL;
110 srctype = AT91_AIC_SRCTYPE_FALLING; 110 srctype = AT91_AIC_SRCTYPE_FALLING;
111 break; 111 break;
112 default: 112 default:
@@ -118,11 +118,47 @@ static int at91rm9200_irq_type(unsigned irq, unsigned type)
118 return 0; 118 return 0;
119} 119}
120 120
121#ifdef CONFIG_PM
122
123static u32 wakeups;
124static u32 backups;
125
126static int at91rm9200_irq_set_wake(unsigned irq, unsigned value)
127{
128 if (unlikely(irq >= 32))
129 return -EINVAL;
130
131 if (value)
132 wakeups |= (1 << irq);
133 else
134 wakeups &= ~(1 << irq);
135
136 return 0;
137}
138
139void at91_irq_suspend(void)
140{
141 backups = at91_sys_read(AT91_AIC_IMR);
142 at91_sys_write(AT91_AIC_IDCR, backups);
143 at91_sys_write(AT91_AIC_IECR, wakeups);
144}
145
146void at91_irq_resume(void)
147{
148 at91_sys_write(AT91_AIC_IDCR, wakeups);
149 at91_sys_write(AT91_AIC_IECR, backups);
150}
151
152#else
153#define at91rm9200_irq_set_wake NULL
154#endif
155
121static struct irqchip at91rm9200_irq_chip = { 156static struct irqchip at91rm9200_irq_chip = {
122 .ack = at91rm9200_mask_irq, 157 .ack = at91rm9200_mask_irq,
123 .mask = at91rm9200_mask_irq, 158 .mask = at91rm9200_mask_irq,
124 .unmask = at91rm9200_unmask_irq, 159 .unmask = at91rm9200_unmask_irq,
125 .set_type = at91rm9200_irq_type, 160 .set_type = at91rm9200_irq_type,
161 .set_wake = at91rm9200_irq_set_wake,
126}; 162};
127 163
128/* 164/*
diff --git a/arch/arm/mach-at91rm9200/pm.c b/arch/arm/mach-at91rm9200/pm.c
new file mode 100644
index 000000000000..47e5480feb7e
--- /dev/null
+++ b/arch/arm/mach-at91rm9200/pm.c
@@ -0,0 +1,225 @@
1/*
2 * arch/arm/mach-at91rm9200/pm.c
3 * AT91 Power Management
4 *
5 * Copyright (C) 2005 David Brownell
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
13#include <linux/pm.h>
14#include <linux/sched.h>
15#include <linux/proc_fs.h>
16#include <linux/pm.h>
17#include <linux/interrupt.h>
18#include <linux/sysfs.h>
19#include <linux/module.h>
20#include <linux/platform_device.h>
21
22#include <asm/io.h>
23#include <asm/irq.h>
24#include <asm/atomic.h>
25#include <asm/mach/time.h>
26#include <asm/mach/irq.h>
27#include <asm/mach-types.h>
28
29#include <asm/arch/gpio.h>
30
31#include "generic.h"
32
33
34static int at91_pm_valid_state(suspend_state_t state)
35{
36 switch (state) {
37 case PM_SUSPEND_ON:
38 case PM_SUSPEND_STANDBY:
39 case PM_SUSPEND_MEM:
40 return 1;
41
42 default:
43 return 0;
44 }
45}
46
47
48static suspend_state_t target_state;
49
50/*
51 * Called after processes are frozen, but before we shutdown devices.
52 */
53static int at91_pm_prepare(suspend_state_t state)
54{
55 target_state = state;
56 return 0;
57}
58
59/*
60 * Verify that all the clocks are correct before entering
61 * slow-clock mode.
62 */
63static int at91_pm_verify_clocks(void)
64{
65 unsigned long scsr;
66 int i;
67
68 scsr = at91_sys_read(AT91_PMC_SCSR);
69
70 /* USB must not be using PLLB */
71 if ((scsr & (AT91_PMC_UHP | AT91_PMC_UDP)) != 0) {
72 pr_debug("AT91: PM - Suspend-to-RAM with USB still active\n");
73 return 0;
74 }
75
76#ifdef CONFIG_AT91_PROGRAMMABLE_CLOCKS
77 /* PCK0..PCK3 must be disabled, or configured to use clk32k */
78 for (i = 0; i < 4; i++) {
79 u32 css;
80
81 if ((scsr & (AT91_PMC_PCK0 << i)) == 0)
82 continue;
83
84 css = at91_sys_read(AT91_PMC_PCKR(i)) & AT91_PMC_CSS;
85 if (css != AT91_PMC_CSS_SLOW) {
86 pr_debug("AT91: PM - Suspend-to-RAM with PCK%d src %d\n", i, css);
87 return 0;
88 }
89 }
90#endif
91
92 return 1;
93}
94
95/*
96 * Call this from platform driver suspend() to see how deeply to suspend.
97 * For example, some controllers (like OHCI) need one of the PLL clocks
98 * in order to act as a wakeup source, and those are not available when
99 * going into slow clock mode.
100 *
101 * REVISIT: generalize as clk_will_be_available(clk)? Other platforms have
102 * the very same problem (but not using at91 main_clk), and it'd be better
103 * to add one generic API rather than lots of platform-specific ones.
104 */
105int at91_suspend_entering_slow_clock(void)
106{
107 return (target_state == PM_SUSPEND_MEM);
108}
109EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
110
111
112static void (*slow_clock)(void);
113
114
115
116static int at91_pm_enter(suspend_state_t state)
117{
118 at91_gpio_suspend();
119 at91_irq_suspend();
120
121 pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
122 /* remember all the always-wake irqs */
123 (at91_sys_read(AT91_PMC_PCSR)
124 | (1 << AT91_ID_FIQ)
125 | (1 << AT91_ID_SYS)
126 | (1 << AT91_ID_IRQ0)
127 | (1 << AT91_ID_IRQ1)
128 | (1 << AT91_ID_IRQ2)
129 | (1 << AT91_ID_IRQ3)
130 | (1 << AT91_ID_IRQ4)
131 | (1 << AT91_ID_IRQ5)
132 | (1 << AT91_ID_IRQ6))
133 & at91_sys_read(AT91_AIC_IMR),
134 state);
135
136 switch (state) {
137 /*
138 * Suspend-to-RAM is like STANDBY plus slow clock mode, so
139 * drivers must suspend more deeply: only the master clock
140 * controller may be using the main oscillator.
141 */
142 case PM_SUSPEND_MEM:
143 /*
144 * Ensure that clocks are in a valid state.
145 */
146 if (!at91_pm_verify_clocks())
147 goto error;
148
149 /*
150 * Enter slow clock mode by switching over to clk32k and
151 * turning off the main oscillator; reverse on wakeup.
152 */
153 if (slow_clock) {
154 slow_clock();
155 break;
156 } else {
157 /* DEVELOPMENT ONLY */
158 pr_info("AT91: PM - no slow clock mode yet ...\n");
159 /* FALLTHROUGH leaving master clock alone */
160 }
161
162 /*
163 * STANDBY mode has *all* drivers suspended; ignores irqs not
164 * marked as 'wakeup' event sources; and reduces DRAM power.
165 * But otherwise it's identical to PM_SUSPEND_ON: cpu idle, and
166 * nothing fancy done with main or cpu clocks.
167 */
168 case PM_SUSPEND_STANDBY:
169 /*
170 * NOTE: the Wait-for-Interrupt instruction needs to be
171 * in icache so the SDRAM stays in self-refresh mode until
172 * the wakeup IRQ occurs.
173 */
174 asm("b 1f; .align 5; 1:");
175 asm("mcr p15, 0, r0, c7, c10, 4"); /* drain write buffer */
176 at91_sys_write(AT91_SDRAMC_SRR, 1); /* self-refresh mode */
177 /* fall though to next state */
178
179 case PM_SUSPEND_ON:
180 asm("mcr p15, 0, r0, c7, c0, 4"); /* wait for interrupt */
181 break;
182
183 default:
184 pr_debug("AT91: PM - bogus suspend state %d\n", state);
185 goto error;
186 }
187
188 pr_debug("AT91: PM - wakeup %08x\n",
189 at91_sys_read(AT91_AIC_IPR) & at91_sys_read(AT91_AIC_IMR));
190
191error:
192 target_state = PM_SUSPEND_ON;
193 at91_irq_resume();
194 at91_gpio_resume();
195 return 0;
196}
197
198
199static struct pm_ops at91_pm_ops ={
200 .pm_disk_mode = 0,
201 .valid = at91_pm_valid_state,
202 .prepare = at91_pm_prepare,
203 .enter = at91_pm_enter,
204};
205
206static int __init at91_pm_init(void)
207{
208 printk("AT91: Power Management\n");
209
210#ifdef CONFIG_AT91_PM_SLOW_CLOCK
211 /* REVISIT allocations of SRAM should be dynamically managed.
212 * FIQ handlers and other components will want SRAM/TCM too...
213 */
214 slow_clock = (void *) (AT91_VA_BASE_SRAM + (3 * SZ_4K));
215 memcpy(slow_clock, at91rm9200_slow_clock, at91rm9200_slow_clock_sz);
216#endif
217
218 /* Disable SDRAM low-power mode. Cannot be used with self-refresh. */
219 at91_sys_write(AT91_SDRAMC_LPR, 0);
220
221 pm_set_ops(&at91_pm_ops);
222
223 return 0;
224}
225arch_initcall(at91_pm_init);
diff --git a/arch/arm/mach-at91rm9200/time.c b/arch/arm/mach-at91rm9200/time.c
index 7ffcf443b99f..fc2d7d5e4637 100644
--- a/arch/arm/mach-at91rm9200/time.c
+++ b/arch/arm/mach-at91rm9200/time.c
@@ -31,6 +31,8 @@
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/mach/time.h> 32#include <asm/mach/time.h>
33 33
34static unsigned long last_crtr;
35
34/* 36/*
35 * The ST_CRTR is updated asynchronously to the master clock. It is therefore 37 * The ST_CRTR is updated asynchronously to the master clock. It is therefore
36 * necessary to read it twice (with the same value) to ensure accuracy. 38 * necessary to read it twice (with the same value) to ensure accuracy.
@@ -56,7 +58,7 @@ static unsigned long at91rm9200_gettimeoffset(void)
56{ 58{
57 unsigned long elapsed; 59 unsigned long elapsed;
58 60
59 elapsed = (read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV; 61 elapsed = (read_CRTR() - last_crtr) & AT91_ST_ALMV;
60 62
61 return (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH; 63 return (unsigned long)(elapsed * (tick_nsec / 1000)) / LATCH;
62} 64}
@@ -66,15 +68,12 @@ static unsigned long at91rm9200_gettimeoffset(void)
66 */ 68 */
67static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 69static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
68{ 70{
69 unsigned long rtar;
70
71 if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */ 71 if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */
72 write_seqlock(&xtime_lock); 72 write_seqlock(&xtime_lock);
73 73
74 while (((read_CRTR() - at91_sys_read(AT91_ST_RTAR)) & AT91_ST_ALMV) >= LATCH) { 74 while (((read_CRTR() - last_crtr) & AT91_ST_ALMV) >= LATCH) {
75 timer_tick(regs); 75 timer_tick(regs);
76 rtar = (at91_sys_read(AT91_ST_RTAR) + LATCH) & AT91_ST_ALMV; 76 last_crtr = (last_crtr + LATCH) & AT91_ST_ALMV;
77 at91_sys_write(AT91_ST_RTAR, rtar);
78 } 77 }
79 78
80 write_sequnlock(&xtime_lock); 79 write_sequnlock(&xtime_lock);
@@ -87,10 +86,24 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_r
87 86
88static struct irqaction at91rm9200_timer_irq = { 87static struct irqaction at91rm9200_timer_irq = {
89 .name = "at91_tick", 88 .name = "at91_tick",
90 .flags = SA_SHIRQ | SA_INTERRUPT, 89 .flags = SA_SHIRQ | SA_INTERRUPT | SA_TIMER,
91 .handler = at91rm9200_timer_interrupt 90 .handler = at91rm9200_timer_interrupt
92}; 91};
93 92
93void at91rm9200_timer_reset(void)
94{
95 last_crtr = 0;
96
97 /* Real time counter incremented every 30.51758 microseconds */
98 at91_sys_write(AT91_ST_RTMR, 1);
99
100 /* Set Period Interval timer */
101 at91_sys_write(AT91_ST_PIMR, LATCH);
102
103 /* Enable Period Interval Timer interrupt */
104 at91_sys_write(AT91_ST_IER, AT91_ST_PITS);
105}
106
94/* 107/*
95 * Set up timer interrupt. 108 * Set up timer interrupt.
96 */ 109 */
@@ -100,28 +113,30 @@ void __init at91rm9200_timer_init(void)
100 at91_sys_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS); 113 at91_sys_write(AT91_ST_IDR, AT91_ST_PITS | AT91_ST_WDOVF | AT91_ST_RTTINC | AT91_ST_ALMS);
101 (void) at91_sys_read(AT91_ST_SR); /* Clear any pending interrupts */ 114 (void) at91_sys_read(AT91_ST_SR); /* Clear any pending interrupts */
102 115
103 /* 116 /* Make IRQs happen for the system timer */
104 * Make IRQs happen for the system timer.
105 */
106 setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq); 117 setup_irq(AT91_ID_SYS, &at91rm9200_timer_irq);
107 118
108 /* Set initial alarm to 0 */
109 at91_sys_write(AT91_ST_RTAR, 0);
110
111 /* Real time counter incremented every 30.51758 microseconds */
112 at91_sys_write(AT91_ST_RTMR, 1);
113
114 /* Set Period Interval timer */
115 at91_sys_write(AT91_ST_PIMR, LATCH);
116
117 /* Change the kernel's 'tick' value to 10009 usec. (the default is 10000) */ 119 /* Change the kernel's 'tick' value to 10009 usec. (the default is 10000) */
118 tick_usec = (LATCH * 1000000) / CLOCK_TICK_RATE; 120 tick_usec = (LATCH * 1000000) / CLOCK_TICK_RATE;
119 121
120 /* Enable Period Interval Timer interrupt */ 122 /* Initialize and enable the timer interrupt */
121 at91_sys_write(AT91_ST_IER, AT91_ST_PITS); 123 at91rm9200_timer_reset();
124}
125
126#ifdef CONFIG_PM
127static void at91rm9200_timer_suspend(void)
128{
129 /* disable Period Interval Timer interrupt */
130 at91_sys_write(AT91_ST_IDR, AT91_ST_PITS);
122} 131}
132#else
133#define at91rm9200_timer_suspend NULL
134#endif
123 135
124struct sys_timer at91rm9200_timer = { 136struct sys_timer at91rm9200_timer = {
125 .init = at91rm9200_timer_init, 137 .init = at91rm9200_timer_init,
126 .offset = at91rm9200_gettimeoffset, 138 .offset = at91rm9200_gettimeoffset,
139 .suspend = at91rm9200_timer_suspend,
140 .resume = at91rm9200_timer_reset,
127}; 141};
142
diff --git a/arch/arm/mach-netx/Kconfig b/arch/arm/mach-netx/Kconfig
new file mode 100644
index 000000000000..3d90ef19be2b
--- /dev/null
+++ b/arch/arm/mach-netx/Kconfig
@@ -0,0 +1,24 @@
1menu "NetX Implementations"
2 depends on ARCH_NETX
3
4config MACH_NXDKN
5 bool "Enable Hilscher nxdkn Eval Board support"
6 depends on ARCH_NETX
7 help
8 Board support for the Hilscher NetX Eval Board
9
10config MACH_NXDB500
11 bool "Enable Hilscher nxdb500 Eval Board support"
12 depends on ARCH_NETX
13 select ARM_AMBA
14 help
15 Board support for the Hilscher nxdb500 Eval Board
16
17config MACH_NXEB500HMI
18 bool "Enable Hilscher nxeb500hmi Eval Board support"
19 depends on ARCH_NETX
20 select ARM_AMBA
21 help
22 Board support for the Hilscher nxeb500hmi Eval Board
23
24endmenu
diff --git a/arch/arm/mach-netx/Makefile b/arch/arm/mach-netx/Makefile
new file mode 100644
index 000000000000..18785ff37657
--- /dev/null
+++ b/arch/arm/mach-netx/Makefile
@@ -0,0 +1,15 @@
1#
2# Makefile for the linux kernel.
3#
4# Note! Dependencies are done automagically by 'make dep', which also
5# removes any old dependencies. DON'T put your own dependencies here
6# unless it's something special (ie not a .c file).
7
8# Object file lists.
9
10obj-y += time.o generic.o pfifo.o xc.o
11
12# Specific board support
13obj-$(CONFIG_MACH_NXDKN) += nxdkn.o
14obj-$(CONFIG_MACH_NXDB500) += nxdb500.o fb.o
15obj-$(CONFIG_MACH_NXEB500HMI) += nxeb500hmi.o fb.o
diff --git a/arch/arm/mach-netx/Makefile.boot b/arch/arm/mach-netx/Makefile.boot
new file mode 100644
index 000000000000..b81cf6aff0ac
--- /dev/null
+++ b/arch/arm/mach-netx/Makefile.boot
@@ -0,0 +1,2 @@
1 zreladdr-y := 0x80008000
2
diff --git a/arch/arm/mach-netx/fb.c b/arch/arm/mach-netx/fb.c
new file mode 100644
index 000000000000..ef0ab6115c0b
--- /dev/null
+++ b/arch/arm/mach-netx/fb.c
@@ -0,0 +1,114 @@
1/*
2 * arch/arm/mach-netx/fb.c
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#include <linux/device.h>
21#include <linux/init.h>
22#include <linux/dma-mapping.h>
23#include <linux/amba/bus.h>
24#include <linux/amba/clcd.h>
25
26#include <asm/arch/netx-regs.h>
27#include <asm/hardware.h>
28
29struct clk {};
30
31static struct clk fb_clk;
32
33static struct clcd_panel *netx_panel;
34
35void netx_clcd_enable(struct clcd_fb *fb)
36{
37}
38
39int netx_clcd_setup(struct clcd_fb *fb)
40{
41 dma_addr_t dma;
42
43 fb->panel = netx_panel;
44
45 fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, 1024*1024,
46 &dma, GFP_KERNEL);
47 if (!fb->fb.screen_base) {
48 printk(KERN_ERR "CLCD: unable to map framebuffer\n");
49 return -ENOMEM;
50 }
51
52 fb->fb.fix.smem_start = dma;
53 fb->fb.fix.smem_len = 1024*1024;
54
55 return 0;
56}
57
58int netx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
59{
60 return dma_mmap_writecombine(&fb->dev->dev, vma,
61 fb->fb.screen_base,
62 fb->fb.fix.smem_start,
63 fb->fb.fix.smem_len);
64}
65
66void netx_clcd_remove(struct clcd_fb *fb)
67{
68 dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
69 fb->fb.screen_base, fb->fb.fix.smem_start);
70}
71
72void clk_disable(struct clk *clk)
73{
74}
75
76int clk_set_rate(struct clk *clk, unsigned long rate)
77{
78 return 0;
79}
80
81int clk_enable(struct clk *clk)
82{
83 return 0;
84}
85
86struct clk *clk_get(struct device *dev, const char *id)
87{
88 return &fb_clk;
89}
90
91void clk_put(struct clk *clk)
92{
93}
94
95static struct amba_device fb_device = {
96 .dev = {
97 .bus_id = "fb",
98 .coherent_dma_mask = ~0,
99 },
100 .res = {
101 .start = 0x00104000,
102 .end = 0x00104fff,
103 .flags = IORESOURCE_MEM,
104 },
105 .irq = { NETX_IRQ_LCD, NO_IRQ },
106 .periphid = 0x10112400,
107};
108
109int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel)
110{
111 netx_panel = panel;
112 fb_device.dev.platform_data = board;
113 return amba_device_register(&fb_device, &iomem_resource);
114}
diff --git a/arch/arm/mach-netx/fb.h b/arch/arm/mach-netx/fb.h
new file mode 100644
index 000000000000..4919cf33a5f3
--- /dev/null
+++ b/arch/arm/mach-netx/fb.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/mach-netx/fb.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
20void netx_clcd_enable(struct clcd_fb *fb);
21int netx_clcd_setup(struct clcd_fb *fb);
22int netx_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma);
23void netx_clcd_remove(struct clcd_fb *fb);
24int netx_fb_init(struct clcd_board *board, struct clcd_panel *panel);
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
new file mode 100644
index 000000000000..af0b13534cfd
--- /dev/null
+++ b/arch/arm/mach-netx/generic.c
@@ -0,0 +1,193 @@
1/*
2 * arch/arm/mach-netx/generic.c
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#include <linux/device.h>
21#include <linux/init.h>
22#include <linux/kernel.h>
23#include <linux/module.h>
24#include <linux/platform_device.h>
25#include <asm/hardware.h>
26#include <asm/mach/map.h>
27#include <asm/hardware/vic.h>
28#include <asm/io.h>
29#include <asm/arch/netx-regs.h>
30#include <asm/mach/irq.h>
31
32static struct map_desc netx_io_desc[] __initdata = {
33 {
34 .virtual = NETX_IO_VIRT,
35 .pfn = __phys_to_pfn(NETX_IO_PHYS),
36 .length = NETX_IO_SIZE,
37 .type = MT_DEVICE
38 }
39};
40
41void __init netx_map_io(void)
42{
43 iotable_init(netx_io_desc, ARRAY_SIZE(netx_io_desc));
44}
45
46static struct resource netx_rtc_resources[] = {
47 [0] = {
48 .start = 0x00101200,
49 .end = 0x00101220,
50 .flags = IORESOURCE_MEM,
51 },
52};
53
54static struct platform_device netx_rtc_device = {
55 .name = "netx-rtc",
56 .id = 0,
57 .num_resources = ARRAY_SIZE(netx_rtc_resources),
58 .resource = netx_rtc_resources,
59};
60
61static struct platform_device *devices[] __initdata = {
62 &netx_rtc_device,
63};
64
65#if 0
66#define DEBUG_IRQ(fmt...) printk(fmt)
67#else
68#define DEBUG_IRQ(fmt...) while (0) {}
69#endif
70
71static void
72netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
73 struct pt_regs *regs)
74{
75 unsigned int irq = NETX_IRQ_HIF_CHAINED(0);
76 unsigned int stat;
77
78 stat = ((readl(NETX_DPMAS_INT_EN) &
79 readl(NETX_DPMAS_INT_STAT)) >> 24) & 0x1f;
80
81 desc = irq_desc + NETX_IRQ_HIF_CHAINED(0);
82
83 while (stat) {
84 if (stat & 1) {
85 DEBUG_IRQ("handling irq %d\n", irq);
86 desc_handle_irq(irq, desc, regs);
87 }
88 irq++;
89 desc++;
90 stat >>= 1;
91 }
92}
93
94static int
95netx_hif_irq_type(unsigned int _irq, unsigned int type)
96{
97 unsigned int val, irq;
98
99 val = readl(NETX_DPMAS_IF_CONF1);
100
101 irq = _irq - NETX_IRQ_HIF_CHAINED(0);
102
103 if (type & __IRQT_RISEDGE) {
104 DEBUG_IRQ("rising edges\n");
105 val |= (1 << 26) << irq;
106 }
107 if (type & __IRQT_FALEDGE) {
108 DEBUG_IRQ("falling edges\n");
109 val &= ~((1 << 26) << irq);
110 }
111 if (type & __IRQT_LOWLVL) {
112 DEBUG_IRQ("low level\n");
113 val &= ~((1 << 26) << irq);
114 }
115 if (type & __IRQT_HIGHLVL) {
116 DEBUG_IRQ("high level\n");
117 val |= (1 << 26) << irq;
118 }
119
120 writel(val, NETX_DPMAS_IF_CONF1);
121
122 return 0;
123}
124
125static void
126netx_hif_ack_irq(unsigned int _irq)
127{
128 unsigned int val, irq;
129
130 irq = _irq - NETX_IRQ_HIF_CHAINED(0);
131 writel((1 << 24) << irq, NETX_DPMAS_INT_STAT);
132
133 val = readl(NETX_DPMAS_INT_EN);
134 val &= ~((1 << 24) << irq);
135 writel(val, NETX_DPMAS_INT_EN);
136
137 DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq);
138}
139
140static void
141netx_hif_mask_irq(unsigned int _irq)
142{
143 unsigned int val, irq;
144
145 irq = _irq - NETX_IRQ_HIF_CHAINED(0);
146 val = readl(NETX_DPMAS_INT_EN);
147 val &= ~((1 << 24) << irq);
148 writel(val, NETX_DPMAS_INT_EN);
149 DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq);
150}
151
152static void
153netx_hif_unmask_irq(unsigned int _irq)
154{
155 unsigned int val, irq;
156
157 irq = _irq - NETX_IRQ_HIF_CHAINED(0);
158 val = readl(NETX_DPMAS_INT_EN);
159 val |= (1 << 24) << irq;
160 writel(val, NETX_DPMAS_INT_EN);
161 DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq);
162}
163
164static struct irqchip netx_hif_chip = {
165 .ack = netx_hif_ack_irq,
166 .mask = netx_hif_mask_irq,
167 .unmask = netx_hif_unmask_irq,
168 .set_type = netx_hif_irq_type,
169};
170
171void __init netx_init_irq(void)
172{
173 int irq;
174
175 vic_init(__io(io_p2v(NETX_PA_VIC)), 0, ~0);
176
177 for (irq = NETX_IRQ_HIF_CHAINED(0); irq <= NETX_IRQ_HIF_LAST; irq++) {
178 set_irq_chip(irq, &netx_hif_chip);
179 set_irq_handler(irq, do_level_IRQ);
180 set_irq_flags(irq, IRQF_VALID);
181 }
182
183 writel(NETX_DPMAS_INT_EN_GLB_EN, NETX_DPMAS_INT_EN);
184 set_irq_chained_handler(NETX_IRQ_HIF, netx_hif_demux_handler);
185}
186
187static int __init netx_init(void)
188{
189 return platform_add_devices(devices, ARRAY_SIZE(devices));
190}
191
192subsys_initcall(netx_init);
193
diff --git a/arch/arm/mach-netx/generic.h b/arch/arm/mach-netx/generic.h
new file mode 100644
index 000000000000..ede2d35341c3
--- /dev/null
+++ b/arch/arm/mach-netx/generic.h
@@ -0,0 +1,24 @@
1/*
2 * arch/arm/mach-netx/generic.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
20extern void __init netx_map_io(void);
21extern void __init netx_init_irq(void);
22
23struct sys_timer;
24extern struct sys_timer netx_timer;
diff --git a/arch/arm/mach-netx/nxdb500.c b/arch/arm/mach-netx/nxdb500.c
new file mode 100644
index 000000000000..e4a133d62846
--- /dev/null
+++ b/arch/arm/mach-netx/nxdb500.c
@@ -0,0 +1,210 @@
1/*
2 * arch/arm/mach-netx/nxdb500.c
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#include <linux/dma-mapping.h>
21#include <linux/init.h>
22#include <linux/interrupt.h>
23#include <linux/mtd/plat-ram.h>
24#include <linux/platform_device.h>
25#include <linux/amba/bus.h>
26#include <linux/amba/clcd.h>
27
28#include <asm/hardware.h>
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31#include <asm/arch/netx-regs.h>
32#include <asm/arch/eth.h>
33
34#include "generic.h"
35#include "fb.h"
36
37static struct clcd_panel qvga = {
38 .mode = {
39 .name = "QVGA",
40 .refresh = 60,
41 .xres = 240,
42 .yres = 320,
43 .pixclock = 187617,
44 .left_margin = 6,
45 .right_margin = 26,
46 .upper_margin = 0,
47 .lower_margin = 6,
48 .hsync_len = 6,
49 .vsync_len = 1,
50 .sync = 0,
51 .vmode = FB_VMODE_NONINTERLACED,
52 },
53 .width = -1,
54 .height = -1,
55 .tim2 = 16,
56 .cntl = CNTL_LCDTFT | CNTL_BGR,
57 .bpp = 16,
58 .grayscale = 0,
59};
60
61static inline int nxdb500_check(struct clcd_fb *fb, struct fb_var_screeninfo *var)
62{
63 var->green.length = 5;
64 var->green.msb_right = 0;
65
66 return clcdfb_check(fb, var);
67}
68
69static int nxdb500_clcd_setup(struct clcd_fb *fb)
70{
71 unsigned int val;
72
73 fb->fb.var.green.length = 5;
74 fb->fb.var.green.msb_right = 0;
75
76 /* enable asic control */
77 val = readl(NETX_SYSTEM_IOC_ACCESS_KEY);
78 writel(val, NETX_SYSTEM_IOC_ACCESS_KEY);
79
80 writel(3, NETX_SYSTEM_IOC_CR);
81
82 val = readl(NETX_PIO_OUTPIO);
83 writel(val | 1, NETX_PIO_OUTPIO);
84
85 val = readl(NETX_PIO_OEPIO);
86 writel(val | 1, NETX_PIO_OEPIO);
87 return netx_clcd_setup(fb);
88}
89
90static struct clcd_board clcd_data = {
91 .name = "netX",
92 .check = nxdb500_check,
93 .decode = clcdfb_decode,
94 .enable = netx_clcd_enable,
95 .setup = nxdb500_clcd_setup,
96 .mmap = netx_clcd_mmap,
97 .remove = netx_clcd_remove,
98};
99
100static struct netxeth_platform_data eth0_platform_data = {
101 .xcno = 0,
102};
103
104static struct platform_device netx_eth0_device = {
105 .name = "netx-eth",
106 .id = 0,
107 .num_resources = 0,
108 .resource = NULL,
109 .dev = {
110 .platform_data = &eth0_platform_data,
111 }
112};
113
114static struct netxeth_platform_data eth1_platform_data = {
115 .xcno = 1,
116};
117
118static struct platform_device netx_eth1_device = {
119 .name = "netx-eth",
120 .id = 1,
121 .num_resources = 0,
122 .resource = NULL,
123 .dev = {
124 .platform_data = &eth1_platform_data,
125 }
126};
127
128static struct resource netx_uart0_resources[] = {
129 [0] = {
130 .start = 0x00100A00,
131 .end = 0x00100A3F,
132 .flags = IORESOURCE_MEM,
133 },
134 [1] = {
135 .start = (NETX_IRQ_UART0),
136 .end = (NETX_IRQ_UART0),
137 .flags = IORESOURCE_IRQ,
138 },
139};
140
141static struct platform_device netx_uart0_device = {
142 .name = "netx-uart",
143 .id = 0,
144 .num_resources = ARRAY_SIZE(netx_uart0_resources),
145 .resource = netx_uart0_resources,
146};
147
148static struct resource netx_uart1_resources[] = {
149 [0] = {
150 .start = 0x00100A40,
151 .end = 0x00100A7F,
152 .flags = IORESOURCE_MEM,
153 },
154 [1] = {
155 .start = (NETX_IRQ_UART1),
156 .end = (NETX_IRQ_UART1),
157 .flags = IORESOURCE_IRQ,
158 },
159};
160
161static struct platform_device netx_uart1_device = {
162 .name = "netx-uart",
163 .id = 1,
164 .num_resources = ARRAY_SIZE(netx_uart1_resources),
165 .resource = netx_uart1_resources,
166};
167
168static struct resource netx_uart2_resources[] = {
169 [0] = {
170 .start = 0x00100A80,
171 .end = 0x00100ABF,
172 .flags = IORESOURCE_MEM,
173 },
174 [1] = {
175 .start = (NETX_IRQ_UART2),
176 .end = (NETX_IRQ_UART2),
177 .flags = IORESOURCE_IRQ,
178 },
179};
180
181static struct platform_device netx_uart2_device = {
182 .name = "netx-uart",
183 .id = 2,
184 .num_resources = ARRAY_SIZE(netx_uart2_resources),
185 .resource = netx_uart2_resources,
186};
187
188static struct platform_device *devices[] __initdata = {
189 &netx_eth0_device,
190 &netx_eth1_device,
191 &netx_uart0_device,
192 &netx_uart1_device,
193 &netx_uart2_device,
194};
195
196static void __init nxdb500_init(void)
197{
198 netx_fb_init(&clcd_data, &qvga);
199 platform_add_devices(devices, ARRAY_SIZE(devices));
200}
201
202MACHINE_START(NXDB500, "Hilscher nxdb500")
203 .phys_io = 0x00100000,
204 .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc,
205 .boot_params = 0x80000100,
206 .map_io = netx_map_io,
207 .init_irq = netx_init_irq,
208 .timer = &netx_timer,
209 .init_machine = nxdb500_init,
210MACHINE_END
diff --git a/arch/arm/mach-netx/nxdkn.c b/arch/arm/mach-netx/nxdkn.c
new file mode 100644
index 000000000000..7e26c42d1ac7
--- /dev/null
+++ b/arch/arm/mach-netx/nxdkn.c
@@ -0,0 +1,103 @@
1/*
2 * arch/arm/mach-netx/nxdkn.c
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#include <linux/dma-mapping.h>
21#include <linux/init.h>
22#include <linux/interrupt.h>
23#include <linux/mtd/plat-ram.h>
24#include <linux/platform_device.h>
25#include <linux/amba/bus.h>
26#include <linux/amba/clcd.h>
27
28#include <asm/hardware.h>
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31#include <asm/arch/netx-regs.h>
32#include <asm/arch/eth.h>
33
34#include "generic.h"
35
36static struct netxeth_platform_data eth0_platform_data = {
37 .xcno = 0,
38};
39
40static struct platform_device nxdkn_eth0_device = {
41 .name = "netx-eth",
42 .id = 0,
43 .num_resources = 0,
44 .resource = NULL,
45 .dev = {
46 .platform_data = &eth0_platform_data,
47 }
48};
49
50static struct netxeth_platform_data eth1_platform_data = {
51 .xcno = 1,
52};
53
54static struct platform_device nxdkn_eth1_device = {
55 .name = "netx-eth",
56 .id = 1,
57 .num_resources = 0,
58 .resource = NULL,
59 .dev = {
60 .platform_data = &eth1_platform_data,
61 }
62};
63
64static struct resource netx_uart0_resources[] = {
65 [0] = {
66 .start = 0x00100A00,
67 .end = 0x00100A3F,
68 .flags = IORESOURCE_MEM,
69 },
70 [1] = {
71 .start = (NETX_IRQ_UART0),
72 .end = (NETX_IRQ_UART0),
73 .flags = IORESOURCE_IRQ,
74 },
75};
76
77static struct platform_device netx_uart0_device = {
78 .name = "netx-uart",
79 .id = 0,
80 .num_resources = ARRAY_SIZE(netx_uart0_resources),
81 .resource = netx_uart0_resources,
82};
83
84static struct platform_device *devices[] __initdata = {
85 &nxdkn_eth0_device,
86 &nxdkn_eth1_device,
87 &netx_uart0_device,
88};
89
90static void __init nxdkn_init(void)
91{
92 platform_add_devices(devices, ARRAY_SIZE(devices));
93}
94
95MACHINE_START(NXDKN, "Hilscher nxdkn")
96 .phys_io = 0x00100000,
97 .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc,
98 .boot_params = 0x80000100,
99 .map_io = netx_map_io,
100 .init_irq = netx_init_irq,
101 .timer = &netx_timer,
102 .init_machine = nxdkn_init,
103MACHINE_END
diff --git a/arch/arm/mach-netx/nxeb500hmi.c b/arch/arm/mach-netx/nxeb500hmi.c
new file mode 100644
index 000000000000..53e10a9849f9
--- /dev/null
+++ b/arch/arm/mach-netx/nxeb500hmi.c
@@ -0,0 +1,187 @@
1/*
2 * arch/arm/mach-netx/nxeb500hmi.c
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#include <linux/dma-mapping.h>
21#include <linux/init.h>
22#include <linux/interrupt.h>
23#include <linux/mtd/plat-ram.h>
24#include <linux/platform_device.h>
25#include <linux/amba/bus.h>
26#include <linux/amba/clcd.h>
27
28#include <asm/hardware.h>
29#include <asm/mach-types.h>
30#include <asm/mach/arch.h>
31#include <asm/arch/netx-regs.h>
32#include <asm/arch/eth.h>
33
34#include "generic.h"
35#include "fb.h"
36
37static struct clcd_panel qvga = {
38 .mode = {
39 .name = "QVGA",
40 .refresh = 60,
41 .xres = 240,
42 .yres = 320,
43 .pixclock = 187617,
44 .left_margin = 6,
45 .right_margin = 26,
46 .upper_margin = 0,
47 .lower_margin = 6,
48 .hsync_len = 6,
49 .vsync_len = 1,
50 .sync = 0,
51 .vmode = FB_VMODE_NONINTERLACED,
52 },
53 .width = -1,
54 .height = -1,
55 .tim2 = 16,
56 .cntl = CNTL_LCDTFT | CNTL_BGR,
57 .bpp = 16,
58 .grayscale = 0,
59};
60
61static inline int nxeb500hmi_check(struct clcd_fb *fb, struct fb_var_screeninfo *var)
62{
63 var->green.length = 5;
64 var->green.msb_right = 0;
65
66 return clcdfb_check(fb, var);
67}
68
69static int nxeb500hmi_clcd_setup(struct clcd_fb *fb)
70{
71 unsigned int val;
72
73 fb->fb.var.green.length = 5;
74 fb->fb.var.green.msb_right = 0;
75
76 /* enable asic control */
77 val = readl(NETX_SYSTEM_IOC_ACCESS_KEY);
78 writel(val, NETX_SYSTEM_IOC_ACCESS_KEY);
79
80 writel(3, NETX_SYSTEM_IOC_CR);
81
82 /* GPIO 14 is used for display enable on newer boards */
83 writel(9, NETX_GPIO_CFG(14));
84
85 val = readl(NETX_PIO_OUTPIO);
86 writel(val | 1, NETX_PIO_OUTPIO);
87
88 val = readl(NETX_PIO_OEPIO);
89 writel(val | 1, NETX_PIO_OEPIO);
90 return netx_clcd_setup(fb);
91}
92
93static struct clcd_board clcd_data = {
94 .name = "netX",
95 .check = nxeb500hmi_check,
96 .decode = clcdfb_decode,
97 .enable = netx_clcd_enable,
98 .setup = nxeb500hmi_clcd_setup,
99 .mmap = netx_clcd_mmap,
100 .remove = netx_clcd_remove,
101};
102
103static struct netxeth_platform_data eth0_platform_data = {
104 .xcno = 0,
105};
106
107static struct platform_device netx_eth0_device = {
108 .name = "netx-eth",
109 .id = 0,
110 .num_resources = 0,
111 .resource = NULL,
112 .dev = {
113 .platform_data = &eth0_platform_data,
114 }
115};
116
117static struct netxeth_platform_data eth1_platform_data = {
118 .xcno = 1,
119};
120
121static struct platform_device netx_eth1_device = {
122 .name = "netx-eth",
123 .id = 1,
124 .num_resources = 0,
125 .resource = NULL,
126 .dev = {
127 .platform_data = &eth1_platform_data,
128 }
129};
130
131static struct resource netx_cf_resources[] = {
132 [0] = {
133 .start = 0x20000000,
134 .end = 0x25ffffff,
135 .flags = IORESOURCE_MEM | IORESOURCE_MEM_8AND16BIT,
136 },
137};
138
139static struct platform_device netx_cf_device = {
140 .name = "netx-cf",
141 .id = 0,
142 .resource = netx_cf_resources,
143 .num_resources = ARRAY_SIZE(netx_cf_resources),
144};
145
146static struct resource netx_uart0_resources[] = {
147 [0] = {
148 .start = 0x00100A00,
149 .end = 0x00100A3F,
150 .flags = IORESOURCE_MEM,
151 },
152 [1] = {
153 .start = (NETX_IRQ_UART0),
154 .end = (NETX_IRQ_UART0),
155 .flags = IORESOURCE_IRQ,
156 },
157};
158
159static struct platform_device netx_uart0_device = {
160 .name = "netx-uart",
161 .id = 0,
162 .num_resources = ARRAY_SIZE(netx_uart0_resources),
163 .resource = netx_uart0_resources,
164};
165
166static struct platform_device *devices[] __initdata = {
167 &netx_eth0_device,
168 &netx_eth1_device,
169 &netx_cf_device,
170 &netx_uart0_device,
171};
172
173static void __init nxeb500hmi_init(void)
174{
175 netx_fb_init(&clcd_data, &qvga);
176 platform_add_devices(devices, ARRAY_SIZE(devices));
177}
178
179MACHINE_START(NXEB500HMI, "Hilscher nxeb500hmi")
180 .phys_io = 0x00100000,
181 .io_pg_offst = (io_p2v(0x00100000) >> 18) & 0xfffc,
182 .boot_params = 0x80000100,
183 .map_io = netx_map_io,
184 .init_irq = netx_init_irq,
185 .timer = &netx_timer,
186 .init_machine = nxeb500hmi_init,
187MACHINE_END
diff --git a/arch/arm/mach-netx/pfifo.c b/arch/arm/mach-netx/pfifo.c
new file mode 100644
index 000000000000..44dea61a9de4
--- /dev/null
+++ b/arch/arm/mach-netx/pfifo.c
@@ -0,0 +1,68 @@
1/*
2 * arch/arm/mach-netx/pfifo.c
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#include <linux/init.h>
21#include <linux/module.h>
22#include <linux/mutex.h>
23
24#include <asm/io.h>
25#include <asm/hardware.h>
26#include <asm/arch/netx-regs.h>
27#include <asm/arch/pfifo.h>
28
29static DEFINE_MUTEX(pfifo_lock);
30
31static unsigned int pfifo_used = 0;
32
33int pfifo_request(unsigned int pfifo_mask)
34{
35 int err = 0;
36 unsigned int val;
37
38 mutex_lock(&pfifo_lock);
39
40 if (pfifo_mask & pfifo_used) {
41 err = -EBUSY;
42 goto out;
43 }
44
45 pfifo_used |= pfifo_mask;
46
47 val = readl(NETX_PFIFO_RESET);
48 writel(val | pfifo_mask, NETX_PFIFO_RESET);
49 writel(val, NETX_PFIFO_RESET);
50
51out:
52 mutex_unlock(&pfifo_lock);
53 return err;
54}
55
56void pfifo_free(unsigned int pfifo_mask)
57{
58 mutex_lock(&pfifo_lock);
59 pfifo_used &= ~pfifo_mask;
60 mutex_unlock(&pfifo_lock);
61}
62
63EXPORT_SYMBOL(pfifo_push);
64EXPORT_SYMBOL(pfifo_pop);
65EXPORT_SYMBOL(pfifo_fill_level);
66EXPORT_SYMBOL(pfifo_empty);
67EXPORT_SYMBOL(pfifo_request);
68EXPORT_SYMBOL(pfifo_free);
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
new file mode 100644
index 000000000000..edfbdf40c600
--- /dev/null
+++ b/arch/arm/mach-netx/time.c
@@ -0,0 +1,88 @@
1/*
2 * arch/arm/mach-netx/time.c
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#include <linux/init.h>
21#include <linux/interrupt.h>
22
23#include <asm/hardware.h>
24#include <asm/io.h>
25#include <asm/mach/time.h>
26#include <asm/arch/netx-regs.h>
27
28/*
29 * Returns number of us since last clock interrupt. Note that interrupts
30 * will have been disabled by do_gettimeoffset()
31 */
32static unsigned long netx_gettimeoffset(void)
33{
34 return readl(NETX_GPIO_COUNTER_CURRENT(0)) / 100;
35}
36
37/*
38 * IRQ handler for the timer
39 */
40static irqreturn_t
41netx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
42{
43 write_seqlock(&xtime_lock);
44
45 timer_tick(regs);
46 write_sequnlock(&xtime_lock);
47
48 /* acknowledge interrupt */
49 writel(COUNTER_BIT(0), NETX_GPIO_IRQ);
50
51 return IRQ_HANDLED;
52}
53
54
55static struct irqaction netx_timer_irq = {
56 .name = "NetX Timer Tick",
57 .flags = SA_INTERRUPT | SA_TIMER,
58 .handler = netx_timer_interrupt,
59};
60
61/*
62 * Set up timer interrupt
63 */
64static void __init netx_timer_init(void)
65{
66 /* disable timer initially */
67 writel(0, NETX_GPIO_COUNTER_CTRL(0));
68
69 /* Reset the timer value to zero */
70 writel(0, NETX_GPIO_COUNTER_CURRENT(0));
71
72 writel(LATCH, NETX_GPIO_COUNTER_MAX(0));
73
74 /* acknowledge interrupt */
75 writel(COUNTER_BIT(0), NETX_GPIO_IRQ);
76
77 /* Enable the interrupt in the specific timer register and start timer */
78 writel(COUNTER_BIT(0), NETX_GPIO_IRQ_ENABLE);
79 writel(NETX_GPIO_COUNTER_CTRL_IRQ_EN | NETX_GPIO_COUNTER_CTRL_RUN,
80 NETX_GPIO_COUNTER_CTRL(0));
81
82 setup_irq(NETX_IRQ_TIMER0, &netx_timer_irq);
83}
84
85struct sys_timer netx_timer = {
86 .init = netx_timer_init,
87 .offset = netx_gettimeoffset,
88};
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c
new file mode 100644
index 000000000000..172a058ddd66
--- /dev/null
+++ b/arch/arm/mach-netx/xc.c
@@ -0,0 +1,255 @@
1/*
2 * arch/arm/mach-netx/xc.c
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#include <linux/init.h>
21#include <linux/device.h>
22#include <linux/firmware.h>
23#include <linux/mutex.h>
24
25#include <asm/io.h>
26#include <asm/hardware.h>
27#include <asm/arch/netx-regs.h>
28
29#include <asm/arch/xc.h>
30
31static DEFINE_MUTEX(xc_lock);
32
33static int xc_in_use = 0;
34
35struct fw_desc {
36 unsigned int ofs;
37 unsigned int size;
38 unsigned int patch_ofs;
39 unsigned int patch_entries;
40};
41
42struct fw_header {
43 unsigned int magic;
44 unsigned int type;
45 unsigned int version;
46 unsigned int reserved[5];
47 struct fw_desc fw_desc[3];
48} __attribute__ ((packed));
49
50int xc_stop(struct xc *x)
51{
52 writel(RPU_HOLD_PC, x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS);
53 writel(TPU_HOLD_PC, x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS);
54 writel(XPU_HOLD_PC, x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS);
55 return 0;
56}
57
58int xc_start(struct xc *x)
59{
60 writel(0, x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS);
61 writel(0, x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS);
62 writel(0, x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS);
63 return 0;
64}
65
66int xc_running(struct xc *x)
67{
68 return (readl(x->xmac_base + NETX_XMAC_RPU_HOLD_PC_OFS) & RPU_HOLD_PC)
69 || (readl(x->xmac_base + NETX_XMAC_TPU_HOLD_PC_OFS) & TPU_HOLD_PC)
70 || (readl(x->xpec_base + NETX_XPEC_XPU_HOLD_PC_OFS) & XPU_HOLD_PC) ?
71 0 : 1;
72}
73
74int xc_reset(struct xc *x)
75{
76 writel(0, x->xpec_base + NETX_XPEC_PC_OFS);
77 return 0;
78}
79
80static int xc_check_ptr(struct xc *x, unsigned long adr, unsigned int size)
81{
82 if (adr >= NETX_PA_XMAC(x->no) &&
83 adr + size < NETX_PA_XMAC(x->no) + XMAC_MEM_SIZE)
84 return 0;
85
86 if (adr >= NETX_PA_XPEC(x->no) &&
87 adr + size < NETX_PA_XPEC(x->no) + XPEC_MEM_SIZE)
88 return 0;
89
90 dev_err(x->dev, "Illegal pointer in firmware found. aborting\n");
91
92 return -1;
93}
94
95static int xc_patch(struct xc *x, void *patch, int count)
96{
97 unsigned int val, adr;
98 unsigned int *data = patch;
99
100 int i;
101 for (i = 0; i < count; i++) {
102 adr = *data++;
103 val = *data++;
104 if (xc_check_ptr(x, adr, 4) < 0)
105 return -EINVAL;
106
107 writel(val, (void __iomem *)io_p2v(adr));
108 }
109 return 0;
110}
111
112int xc_request_firmware(struct xc *x)
113{
114 int ret;
115 char name[16];
116 const struct firmware *fw;
117 struct fw_header *head;
118 unsigned int size;
119 int i;
120 void *src;
121 unsigned long dst;
122
123 sprintf(name, "xc%d.bin", x->no);
124
125 ret = request_firmware(&fw, name, x->dev);
126
127 if (ret < 0) {
128 dev_err(x->dev, "request_firmware failed\n");
129 return ret;
130 }
131
132 head = (struct fw_header *)fw->data;
133 if (head->magic != 0x4e657458) {
134 if (head->magic == 0x5874654e) {
135 dev_err(x->dev,
136 "firmware magic is 'XteN'. Endianess problems?\n");
137 ret = -ENODEV;
138 goto exit_release_firmware;
139 }
140 dev_err(x->dev, "unrecognized firmware magic 0x%08x\n",
141 head->magic);
142 ret = -ENODEV;
143 goto exit_release_firmware;
144 }
145
146 x->type = head->type;
147 x->version = head->version;
148
149 ret = -EINVAL;
150
151 for (i = 0; i < 3; i++) {
152 src = fw->data + head->fw_desc[i].ofs;
153 dst = *(unsigned int *)src;
154 src += sizeof (unsigned int);
155 size = head->fw_desc[i].size - sizeof (unsigned int);
156
157 if (xc_check_ptr(x, dst, size))
158 goto exit_release_firmware;
159
160 memcpy((void *)io_p2v(dst), src, size);
161
162 src = fw->data + head->fw_desc[i].patch_ofs;
163 size = head->fw_desc[i].patch_entries;
164 ret = xc_patch(x, src, size);
165 if (ret < 0)
166 goto exit_release_firmware;
167 }
168
169 ret = 0;
170
171 exit_release_firmware:
172 release_firmware(fw);
173
174 return ret;
175}
176
177struct xc *request_xc(int xcno, struct device *dev)
178{
179 struct xc *x = NULL;
180
181 mutex_lock(&xc_lock);
182
183 if (xcno > 3)
184 goto exit;
185 if (xc_in_use & (1 << xcno))
186 goto exit;
187
188 x = kmalloc(sizeof (struct xc), GFP_KERNEL);
189 if (!x)
190 goto exit;
191
192 if (!request_mem_region
193 (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, dev->kobj.name))
194 goto exit_free;
195
196 if (!request_mem_region
197 (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, dev->kobj.name))
198 goto exit_release_1;
199
200 if (!request_mem_region
201 (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, dev->kobj.name))
202 goto exit_release_2;
203
204 x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno));
205 x->xmac_base = (void * __iomem)io_p2v(NETX_PA_XMAC(xcno));
206 x->sram_base = ioremap(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE);
207 if (!x->sram_base)
208 goto exit_release_3;
209
210 x->irq = NETX_IRQ_XPEC(xcno);
211
212 x->no = xcno;
213 x->dev = dev;
214
215 xc_in_use |= (1 << xcno);
216
217 goto exit;
218
219 exit_release_3:
220 release_mem_region(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE);
221 exit_release_2:
222 release_mem_region(NETX_PA_XMAC(xcno), XMAC_MEM_SIZE);
223 exit_release_1:
224 release_mem_region(NETX_PA_XPEC(xcno), XPEC_MEM_SIZE);
225 exit_free:
226 kfree(x);
227 x = NULL;
228 exit:
229 mutex_unlock(&xc_lock);
230 return x;
231}
232
233void free_xc(struct xc *x)
234{
235 int xcno = x->no;
236
237 mutex_lock(&xc_lock);
238
239 iounmap(x->sram_base);
240 release_mem_region(SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE);
241 release_mem_region(NETX_PA_XMAC(xcno), XMAC_MEM_SIZE);
242 release_mem_region(NETX_PA_XPEC(xcno), XPEC_MEM_SIZE);
243 xc_in_use &= ~(1 << x->no);
244 kfree(x);
245
246 mutex_unlock(&xc_lock);
247}
248
249EXPORT_SYMBOL(free_xc);
250EXPORT_SYMBOL(request_xc);
251EXPORT_SYMBOL(xc_request_firmware);
252EXPORT_SYMBOL(xc_reset);
253EXPORT_SYMBOL(xc_running);
254EXPORT_SYMBOL(xc_start);
255EXPORT_SYMBOL(xc_stop);
diff --git a/arch/arm/mach-pnx4008/serial.c b/arch/arm/mach-pnx4008/serial.c
index 2e1e04cc048c..10322384e45d 100644
--- a/arch/arm/mach-pnx4008/serial.c
+++ b/arch/arm/mach-pnx4008/serial.c
@@ -16,7 +16,7 @@
16#include <asm/io.h> 16#include <asm/io.h>
17 17
18#include <asm/arch/platform.h> 18#include <asm/arch/platform.h>
19#include <asm/arch/hardware.h> 19#include <asm/hardware.h>
20 20
21#include <linux/serial_core.h> 21#include <linux/serial_core.h>
22#include <linux/serial_reg.h> 22#include <linux/serial_reg.h>
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 0104fd142e70..ea5137f319c4 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -61,6 +61,7 @@ config MACH_POODLE
61 bool "Enable Sharp SL-5600 (Poodle) Support" 61 bool "Enable Sharp SL-5600 (Poodle) Support"
62 depends PXA_SHARPSL_25x 62 depends PXA_SHARPSL_25x
63 select SHARP_LOCOMO 63 select SHARP_LOCOMO
64 select PXA_SSP
64 65
65config MACH_CORGI 66config MACH_CORGI
66 bool "Enable Sharp SL-C700 (Corgi) Support" 67 bool "Enable Sharp SL-C700 (Corgi) Support"
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 4e8a983e2b83..1610690be419 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -15,7 +15,7 @@ obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
15obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o 15obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o
16obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o 16obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o
17obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o 17obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
18obj-$(CONFIG_MACH_POODLE) += poodle.o 18obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o
19obj-$(CONFIG_MACH_TOSA) += tosa.o 19obj-$(CONFIG_MACH_TOSA) += tosa.o
20 20
21# Support for blinky lights 21# Support for blinky lights
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index d6d726036361..bf6648a83901 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/pm.h>
22 23
23#include <asm/setup.h> 24#include <asm/setup.h>
24#include <asm/memory.h> 25#include <asm/memory.h>
@@ -26,6 +27,7 @@
26#include <asm/hardware.h> 27#include <asm/hardware.h>
27#include <asm/irq.h> 28#include <asm/irq.h>
28#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/system.h>
29 31
30#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
31#include <asm/mach/map.h> 33#include <asm/mach/map.h>
@@ -310,8 +312,31 @@ static struct platform_device *devices[] __initdata = {
310 &corgiled_device, 312 &corgiled_device,
311}; 313};
312 314
315static void corgi_poweroff(void)
316{
317 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
318
319 if (!machine_is_corgi())
320 /* Green LED off tells the bootloader to halt */
321 reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
322 arm_machine_restart('h');
323}
324
325static void corgi_restart(char mode)
326{
327 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
328
329 if (!machine_is_corgi())
330 /* Green LED on tells the bootloader to reboot */
331 set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
332 arm_machine_restart('h');
333}
334
313static void __init corgi_init(void) 335static void __init corgi_init(void)
314{ 336{
337 pm_power_off = corgi_poweroff;
338 arm_pm_restart = corgi_restart;
339
315 /* setup sleep mode values */ 340 /* setup sleep mode values */
316 PWER = 0x00000002; 341 PWER = 0x00000002;
317 PFER = 0x00000000; 342 PFER = 0x00000000;
diff --git a/arch/arm/mach-pxa/corgi_pm.c b/arch/arm/mach-pxa/corgi_pm.c
index 7a1ab73e9e10..4c3de4008a43 100644
--- a/arch/arm/mach-pxa/corgi_pm.c
+++ b/arch/arm/mach-pxa/corgi_pm.c
@@ -27,6 +27,13 @@
27#include <asm/arch/pxa-regs.h> 27#include <asm/arch/pxa-regs.h>
28#include "sharpsl.h" 28#include "sharpsl.h"
29 29
30#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
31#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */
32#define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b /* 6V */
33#define SHARPSL_CHARGE_ON_ACIN_LOW 0x34 /* 2V */
34#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */
35#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */
36
30static void corgi_charger_init(void) 37static void corgi_charger_init(void)
31{ 38{
32 pxa_gpio_mode(CORGI_GPIO_ADC_TEMP_ON | GPIO_OUT); 39 pxa_gpio_mode(CORGI_GPIO_ADC_TEMP_ON | GPIO_OUT);
@@ -195,9 +202,16 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = {
195 .read_devdata = corgipm_read_devdata, 202 .read_devdata = corgipm_read_devdata,
196 .charger_wakeup = corgi_charger_wakeup, 203 .charger_wakeup = corgi_charger_wakeup,
197 .should_wakeup = corgi_should_wakeup, 204 .should_wakeup = corgi_should_wakeup,
198 .bat_levels = 40, 205 .backlight_limit = corgibl_limit_intensity,
199 .bat_levels_noac = spitz_battery_levels_noac, 206 .charge_on_volt = SHARPSL_CHARGE_ON_VOLT,
200 .bat_levels_acin = spitz_battery_levels_acin, 207 .charge_on_temp = SHARPSL_CHARGE_ON_TEMP,
208 .charge_acin_high = SHARPSL_CHARGE_ON_ACIN_HIGH,
209 .charge_acin_low = SHARPSL_CHARGE_ON_ACIN_LOW,
210 .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT,
211 .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT,
212 .bat_levels = 40,
213 .bat_levels_noac = spitz_battery_levels_noac,
214 .bat_levels_acin = spitz_battery_levels_acin,
201 .status_high_acin = 188, 215 .status_high_acin = 188,
202 .status_low_acin = 178, 216 .status_low_acin = 178,
203 .status_high_noac = 185, 217 .status_high_noac = 185,
@@ -214,6 +228,9 @@ static int __devinit corgipm_init(void)
214 if (!corgipm_device) 228 if (!corgipm_device)
215 return -ENOMEM; 229 return -ENOMEM;
216 230
231 if (!machine_is_corgi())
232 corgi_pm_machinfo.batfull_irq = 1;
233
217 corgipm_device->dev.platform_data = &corgi_pm_machinfo; 234 corgipm_device->dev.platform_data = &corgi_pm_machinfo;
218 ret = platform_device_add(corgipm_device); 235 ret = platform_device_add(corgipm_device);
219 236
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
index 8a25a1c8019f..f9421318cb7a 100644
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ b/arch/arm/mach-pxa/corgi_ssp.c
@@ -50,12 +50,14 @@ unsigned long corgi_ssp_ads7846_putget(ulong data)
50 unsigned long ret,flag; 50 unsigned long ret,flag;
51 51
52 spin_lock_irqsave(&corgi_ssp_lock, flag); 52 spin_lock_irqsave(&corgi_ssp_lock, flag);
53 GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); 53 if (ssp_machinfo->cs_ads7846 >= 0)
54 GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
54 55
55 ssp_write_word(&corgi_ssp_dev,data); 56 ssp_write_word(&corgi_ssp_dev,data);
56 ret = ssp_read_word(&corgi_ssp_dev); 57 ret = ssp_read_word(&corgi_ssp_dev);
57 58
58 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); 59 if (ssp_machinfo->cs_ads7846 >= 0)
60 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
59 spin_unlock_irqrestore(&corgi_ssp_lock, flag); 61 spin_unlock_irqrestore(&corgi_ssp_lock, flag);
60 62
61 return ret; 63 return ret;
@@ -68,12 +70,14 @@ unsigned long corgi_ssp_ads7846_putget(ulong data)
68void corgi_ssp_ads7846_lock(void) 70void corgi_ssp_ads7846_lock(void)
69{ 71{
70 spin_lock(&corgi_ssp_lock); 72 spin_lock(&corgi_ssp_lock);
71 GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); 73 if (ssp_machinfo->cs_ads7846 >= 0)
74 GPCR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
72} 75}
73 76
74void corgi_ssp_ads7846_unlock(void) 77void corgi_ssp_ads7846_unlock(void)
75{ 78{
76 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); 79 if (ssp_machinfo->cs_ads7846 >= 0)
80 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846);
77 spin_unlock(&corgi_ssp_lock); 81 spin_unlock(&corgi_ssp_lock);
78} 82}
79 83
@@ -110,11 +114,13 @@ unsigned long corgi_ssp_dac_put(ulong data)
110 ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), sscr1, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_lcdcon)); 114 ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), sscr1, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_lcdcon));
111 ssp_enable(&corgi_ssp_dev); 115 ssp_enable(&corgi_ssp_dev);
112 116
113 GPCR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); 117 if (ssp_machinfo->cs_lcdcon >= 0)
118 GPCR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);
114 ssp_write_word(&corgi_ssp_dev,data); 119 ssp_write_word(&corgi_ssp_dev,data);
115 /* Read null data back from device to prevent SSP overflow */ 120 /* Read null data back from device to prevent SSP overflow */
116 ssp_read_word(&corgi_ssp_dev); 121 ssp_read_word(&corgi_ssp_dev);
117 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); 122 if (ssp_machinfo->cs_lcdcon >= 0)
123 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon);
118 124
119 ssp_disable(&corgi_ssp_dev); 125 ssp_disable(&corgi_ssp_dev);
120 ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846)); 126 ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
@@ -147,7 +153,8 @@ int corgi_ssp_max1111_get(ulong data)
147 int voltage,voltage1,voltage2; 153 int voltage,voltage1,voltage2;
148 154
149 spin_lock_irqsave(&corgi_ssp_lock, flag); 155 spin_lock_irqsave(&corgi_ssp_lock, flag);
150 GPCR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); 156 if (ssp_machinfo->cs_max1111 >= 0)
157 GPCR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111);
151 ssp_disable(&corgi_ssp_dev); 158 ssp_disable(&corgi_ssp_dev);
152 ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_max1111)); 159 ssp_config(&corgi_ssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_max1111));
153 ssp_enable(&corgi_ssp_dev); 160 ssp_enable(&corgi_ssp_dev);
@@ -169,7 +176,8 @@ int corgi_ssp_max1111_get(ulong data)
169 ssp_disable(&corgi_ssp_dev); 176 ssp_disable(&corgi_ssp_dev);
170 ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846)); 177 ssp_config(&corgi_ssp_dev, (SSCR0_National | (SSCR0_DSS & 0x0b )), 0, 0, SSCR0_SerClkDiv(ssp_machinfo->clk_ads7846));
171 ssp_enable(&corgi_ssp_dev); 178 ssp_enable(&corgi_ssp_dev);
172 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); 179 if (ssp_machinfo->cs_max1111 >= 0)
180 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111);
173 spin_unlock_irqrestore(&corgi_ssp_lock, flag); 181 spin_unlock_irqrestore(&corgi_ssp_lock, flag);
174 182
175 if (voltage1 & 0xc0 || voltage2 & 0x3f) 183 if (voltage1 & 0xc0 || voltage2 & 0x3f)
@@ -196,9 +204,12 @@ static int __init corgi_ssp_probe(struct platform_device *dev)
196 int ret; 204 int ret;
197 205
198 /* Chip Select - Disable All */ 206 /* Chip Select - Disable All */
199 pxa_gpio_mode(ssp_machinfo->cs_lcdcon | GPIO_OUT | GPIO_DFLT_HIGH); 207 if (ssp_machinfo->cs_lcdcon >= 0)
200 pxa_gpio_mode(ssp_machinfo->cs_max1111 | GPIO_OUT | GPIO_DFLT_HIGH); 208 pxa_gpio_mode(ssp_machinfo->cs_lcdcon | GPIO_OUT | GPIO_DFLT_HIGH);
201 pxa_gpio_mode(ssp_machinfo->cs_ads7846 | GPIO_OUT | GPIO_DFLT_HIGH); 209 if (ssp_machinfo->cs_max1111 >= 0)
210 pxa_gpio_mode(ssp_machinfo->cs_max1111 | GPIO_OUT | GPIO_DFLT_HIGH);
211 if (ssp_machinfo->cs_ads7846 >= 0)
212 pxa_gpio_mode(ssp_machinfo->cs_ads7846 | GPIO_OUT | GPIO_DFLT_HIGH);
202 213
203 ret = ssp_init(&corgi_ssp_dev, ssp_machinfo->port, 0); 214 ret = ssp_init(&corgi_ssp_dev, ssp_machinfo->port, 0);
204 215
@@ -229,9 +240,12 @@ static int corgi_ssp_suspend(struct platform_device *dev, pm_message_t state)
229 240
230static int corgi_ssp_resume(struct platform_device *dev) 241static int corgi_ssp_resume(struct platform_device *dev)
231{ 242{
232 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ 243 if (ssp_machinfo->cs_lcdcon >= 0)
233 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/ 244 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */
234 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/ 245 if (ssp_machinfo->cs_max1111 >= 0)
246 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/
247 if (ssp_machinfo->cs_ads7846 >= 0)
248 GPSR(ssp_machinfo->cs_ads7846) = GPIO_bit(ssp_machinfo->cs_ads7846); /* High - Disable ADS7846*/
235 ssp_restore_state(&corgi_ssp_dev,&corgi_ssp_state); 249 ssp_restore_state(&corgi_ssp_dev,&corgi_ssp_state);
236 ssp_enable(&corgi_ssp_dev); 250 ssp_enable(&corgi_ssp_dev);
237 251
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index a042473deedd..9a9fa87cea9f 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -18,11 +18,14 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/fb.h> 20#include <linux/fb.h>
21#include <linux/pm.h>
22#include <linux/delay.h>
21 23
22#include <asm/hardware.h> 24#include <asm/hardware.h>
23#include <asm/mach-types.h> 25#include <asm/mach-types.h>
24#include <asm/irq.h> 26#include <asm/irq.h>
25#include <asm/setup.h> 27#include <asm/setup.h>
28#include <asm/system.h>
26 29
27#include <asm/mach/arch.h> 30#include <asm/mach/arch.h>
28#include <asm/mach/map.h> 31#include <asm/mach/map.h>
@@ -34,12 +37,15 @@
34#include <asm/arch/irda.h> 37#include <asm/arch/irda.h>
35#include <asm/arch/poodle.h> 38#include <asm/arch/poodle.h>
36#include <asm/arch/pxafb.h> 39#include <asm/arch/pxafb.h>
40#include <asm/arch/sharpsl.h>
41#include <asm/arch/ssp.h>
37 42
38#include <asm/hardware/scoop.h> 43#include <asm/hardware/scoop.h>
39#include <asm/hardware/locomo.h> 44#include <asm/hardware/locomo.h>
40#include <asm/mach/sharpsl_param.h> 45#include <asm/mach/sharpsl_param.h>
41 46
42#include "generic.h" 47#include "generic.h"
48#include "sharpsl.h"
43 49
44static struct resource poodle_scoop_resources[] = { 50static struct resource poodle_scoop_resources[] = {
45 [0] = { 51 [0] = {
@@ -117,13 +123,71 @@ static struct resource locomo_resources[] = {
117 }, 123 },
118}; 124};
119 125
120static struct platform_device locomo_device = { 126struct platform_device poodle_locomo_device = {
121 .name = "locomo", 127 .name = "locomo",
122 .id = 0, 128 .id = 0,
123 .num_resources = ARRAY_SIZE(locomo_resources), 129 .num_resources = ARRAY_SIZE(locomo_resources),
124 .resource = locomo_resources, 130 .resource = locomo_resources,
125}; 131};
126 132
133EXPORT_SYMBOL(poodle_locomo_device);
134
135/*
136 * Poodle SSP Device
137 */
138
139struct platform_device poodle_ssp_device = {
140 .name = "corgi-ssp",
141 .id = -1,
142};
143
144struct corgissp_machinfo poodle_ssp_machinfo = {
145 .port = 1,
146 .cs_lcdcon = -1,
147 .cs_ads7846 = -1,
148 .cs_max1111 = -1,
149 .clk_lcdcon = 2,
150 .clk_ads7846 = 36,
151 .clk_max1111 = 2,
152};
153
154
155/*
156 * Poodle Touch Screen Device
157 */
158static struct resource poodlets_resources[] = {
159 [0] = {
160 .start = POODLE_IRQ_GPIO_TP_INT,
161 .end = POODLE_IRQ_GPIO_TP_INT,
162 .flags = IORESOURCE_IRQ,
163 },
164};
165
166static unsigned long poodle_get_hsync_len(void)
167{
168 return 0;
169}
170
171static void poodle_null_hsync(void)
172{
173}
174
175static struct corgits_machinfo poodle_ts_machinfo = {
176 .get_hsync_len = poodle_get_hsync_len,
177 .put_hsync = poodle_null_hsync,
178 .wait_hsync = poodle_null_hsync,
179};
180
181static struct platform_device poodle_ts_device = {
182 .name = "corgi-ts",
183 .dev = {
184 .platform_data = &poodle_ts_machinfo,
185 },
186 .id = -1,
187 .num_resources = ARRAY_SIZE(poodlets_resources),
188 .resource = poodlets_resources,
189};
190
127 191
128/* 192/*
129 * MMC/SD Device 193 * MMC/SD Device
@@ -141,7 +205,9 @@ static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(
141 pxa_gpio_mode(GPIO6_MMCCLK_MD); 205 pxa_gpio_mode(GPIO6_MMCCLK_MD);
142 pxa_gpio_mode(GPIO8_MMCCS0_MD); 206 pxa_gpio_mode(GPIO8_MMCCS0_MD);
143 pxa_gpio_mode(POODLE_GPIO_nSD_DETECT | GPIO_IN); 207 pxa_gpio_mode(POODLE_GPIO_nSD_DETECT | GPIO_IN);
208 pxa_gpio_mode(POODLE_GPIO_nSD_WP | GPIO_IN);
144 pxa_gpio_mode(POODLE_GPIO_SD_PWR | GPIO_OUT); 209 pxa_gpio_mode(POODLE_GPIO_SD_PWR | GPIO_OUT);
210 pxa_gpio_mode(POODLE_GPIO_SD_PWR1 | GPIO_OUT);
145 211
146 poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250); 212 poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250);
147 213
@@ -160,12 +226,22 @@ static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
160{ 226{
161 struct pxamci_platform_data* p_d = dev->platform_data; 227 struct pxamci_platform_data* p_d = dev->platform_data;
162 228
163 if (( 1 << vdd) & p_d->ocr_mask) 229 if (( 1 << vdd) & p_d->ocr_mask) {
164 GPSR1 = GPIO_bit(POODLE_GPIO_SD_PWR); 230 GPSR(POODLE_GPIO_SD_PWR) = GPIO_bit(POODLE_GPIO_SD_PWR);
165 else 231 mdelay(2);
166 GPCR1 = GPIO_bit(POODLE_GPIO_SD_PWR); 232 GPSR(POODLE_GPIO_SD_PWR1) = GPIO_bit(POODLE_GPIO_SD_PWR1);
233 } else {
234 GPCR(POODLE_GPIO_SD_PWR1) = GPIO_bit(POODLE_GPIO_SD_PWR1);
235 GPCR(POODLE_GPIO_SD_PWR) = GPIO_bit(POODLE_GPIO_SD_PWR);
236 }
237}
238
239static int poodle_mci_get_ro(struct device *dev)
240{
241 return GPLR(POODLE_GPIO_nSD_WP) & GPIO_bit(POODLE_GPIO_nSD_WP);
167} 242}
168 243
244
169static void poodle_mci_exit(struct device *dev, void *data) 245static void poodle_mci_exit(struct device *dev, void *data)
170{ 246{
171 free_irq(POODLE_IRQ_GPIO_nSD_DETECT, data); 247 free_irq(POODLE_IRQ_GPIO_nSD_DETECT, data);
@@ -174,6 +250,7 @@ static void poodle_mci_exit(struct device *dev, void *data)
174static struct pxamci_platform_data poodle_mci_platform_data = { 250static struct pxamci_platform_data poodle_mci_platform_data = {
175 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, 251 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
176 .init = poodle_mci_init, 252 .init = poodle_mci_init,
253 .get_ro = poodle_mci_get_ro,
177 .setpower = poodle_mci_setpower, 254 .setpower = poodle_mci_setpower,
178 .exit = poodle_mci_exit, 255 .exit = poodle_mci_exit,
179}; 256};
@@ -243,14 +320,31 @@ static struct pxafb_mach_info poodle_fb_info __initdata = {
243}; 320};
244 321
245static struct platform_device *devices[] __initdata = { 322static struct platform_device *devices[] __initdata = {
246 &locomo_device, 323 &poodle_locomo_device,
247 &poodle_scoop_device, 324 &poodle_scoop_device,
325 &poodle_ssp_device,
326 &poodle_ts_device,
248}; 327};
249 328
329static void poodle_poweroff(void)
330{
331 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
332 arm_machine_restart('h');
333}
334
335static void poodle_restart(char mode)
336{
337 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
338 arm_machine_restart('h');
339}
340
250static void __init poodle_init(void) 341static void __init poodle_init(void)
251{ 342{
252 int ret = 0; 343 int ret = 0;
253 344
345 pm_power_off = poodle_poweroff;
346 arm_pm_restart = poodle_restart;
347
254 /* setup sleep mode values */ 348 /* setup sleep mode values */
255 PWER = 0x00000002; 349 PWER = 0x00000002;
256 PFER = 0x00000000; 350 PFER = 0x00000000;
@@ -288,6 +382,7 @@ static void __init poodle_init(void)
288 GPSR1 = 0x00000000; 382 GPSR1 = 0x00000000;
289 GPSR2 = 0x00000000; 383 GPSR2 = 0x00000000;
290 384
385 set_pxa_fb_parent(&poodle_locomo_device.dev);
291 set_pxa_fb_info(&poodle_fb_info); 386 set_pxa_fb_info(&poodle_fb_info);
292 pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT); 387 pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT);
293 pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT); 388 pxa_gpio_mode(POODLE_GPIO_IR_ON | GPIO_OUT);
@@ -301,6 +396,7 @@ static void __init poodle_init(void)
301 if (ret) { 396 if (ret) {
302 printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n"); 397 printk(KERN_WARNING "poodle: Unable to register LoCoMo device\n");
303 } 398 }
399 corgi_ssp_set_machinfo(&poodle_ssp_machinfo);
304} 400}
305 401
306static void __init fixup_poodle(struct machine_desc *desc, 402static void __init fixup_poodle(struct machine_desc *desc,
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index 6d402b262d8a..0f1648780c41 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -128,6 +128,9 @@ struct battery_thresh spitz_battery_levels_noac[] = {
128 */ 128 */
129int sharpsl_pm_pxa_read_max1111(int channel) 129int sharpsl_pm_pxa_read_max1111(int channel)
130{ 130{
131 if (machine_is_tosa()) // Ugly, better move this function into another module
132 return 0;
133
131 return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1 134 return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1
132 | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR); 135 | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
133} 136}
@@ -156,7 +159,7 @@ void sharpsl_pm_pxa_init(void)
156 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQT_FALLING); 159 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQT_FALLING);
157 } 160 }
158 161
159 if (!machine_is_corgi()) 162 if (sharpsl_pm.machinfo->batfull_irq)
160 { 163 {
161 /* Register interrupt handler. */ 164 /* Register interrupt handler. */
162 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, SA_INTERRUPT, "CO", sharpsl_chrg_full_isr)) { 165 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, SA_INTERRUPT, "CO", sharpsl_chrg_full_isr)) {
@@ -174,6 +177,6 @@ void sharpsl_pm_pxa_remove(void)
174 if (sharpsl_pm.machinfo->gpio_fatal) 177 if (sharpsl_pm.machinfo->gpio_fatal)
175 free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr); 178 free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr);
176 179
177 if (!machine_is_corgi()) 180 if (sharpsl_pm.machinfo->batfull_irq)
178 free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr); 181 free_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr);
179} 182}
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 44bcb8097c7a..eb9937f6f5cd 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -20,6 +20,7 @@
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/mmc/host.h> 22#include <linux/mmc/host.h>
23#include <linux/pm.h>
23 24
24#include <asm/setup.h> 25#include <asm/setup.h>
25#include <asm/memory.h> 26#include <asm/memory.h>
@@ -27,6 +28,7 @@
27#include <asm/hardware.h> 28#include <asm/hardware.h>
28#include <asm/irq.h> 29#include <asm/irq.h>
29#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/system.h>
30 32
31#include <asm/mach/arch.h> 33#include <asm/mach/arch.h>
32#include <asm/mach/map.h> 34#include <asm/mach/map.h>
@@ -432,8 +434,31 @@ static struct platform_device *devices[] __initdata = {
432 &spitzled_device, 434 &spitzled_device,
433}; 435};
434 436
437static void spitz_poweroff(void)
438{
439 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
440
441 pxa_gpio_mode(SPITZ_GPIO_ON_RESET | GPIO_OUT);
442 GPSR(SPITZ_GPIO_ON_RESET) = GPIO_bit(SPITZ_GPIO_ON_RESET);
443
444 mdelay(1000);
445 arm_machine_restart('h');
446}
447
448static void spitz_restart(char mode)
449{
450 /* Bootloader magic for a reboot */
451 if((MSC0 & 0xffff0000) == 0x7ff00000)
452 MSC0 = (MSC0 & 0xffff) | 0x7ee00000;
453
454 spitz_poweroff();
455}
456
435static void __init common_init(void) 457static void __init common_init(void)
436{ 458{
459 pm_power_off = spitz_poweroff;
460 arm_pm_restart = spitz_restart;
461
437 PMCR = 0x00; 462 PMCR = 0x00;
438 463
439 /* setup sleep mode values */ 464 /* setup sleep mode values */
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index 5e5bdc898482..40be833079c7 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -27,6 +27,13 @@
27#include <asm/arch/pxa-regs.h> 27#include <asm/arch/pxa-regs.h>
28#include "sharpsl.h" 28#include "sharpsl.h"
29 29
30#define SHARPSL_CHARGE_ON_VOLT 0x99 /* 2.9V */
31#define SHARPSL_CHARGE_ON_TEMP 0xe0 /* 2.9V */
32#define SHARPSL_CHARGE_ON_ACIN_HIGH 0x9b /* 6V */
33#define SHARPSL_CHARGE_ON_ACIN_LOW 0x34 /* 2V */
34#define SHARPSL_FATAL_ACIN_VOLT 182 /* 3.45V */
35#define SHARPSL_FATAL_NOACIN_VOLT 170 /* 3.40V */
36
30static int spitz_last_ac_status; 37static int spitz_last_ac_status;
31 38
32static void spitz_charger_init(void) 39static void spitz_charger_init(void)
@@ -190,6 +197,7 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = {
190 .gpio_batlock = SPITZ_GPIO_BAT_COVER, 197 .gpio_batlock = SPITZ_GPIO_BAT_COVER,
191 .gpio_acin = SPITZ_GPIO_AC_IN, 198 .gpio_acin = SPITZ_GPIO_AC_IN,
192 .gpio_batfull = SPITZ_GPIO_CHRG_FULL, 199 .gpio_batfull = SPITZ_GPIO_CHRG_FULL,
200 .batfull_irq = 1,
193 .gpio_fatal = SPITZ_GPIO_FATAL_BAT, 201 .gpio_fatal = SPITZ_GPIO_FATAL_BAT,
194 .discharge = spitz_discharge, 202 .discharge = spitz_discharge,
195 .discharge1 = spitz_discharge1, 203 .discharge1 = spitz_discharge1,
@@ -200,6 +208,13 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = {
200 .read_devdata = spitzpm_read_devdata, 208 .read_devdata = spitzpm_read_devdata,
201 .charger_wakeup = spitz_charger_wakeup, 209 .charger_wakeup = spitz_charger_wakeup,
202 .should_wakeup = spitz_should_wakeup, 210 .should_wakeup = spitz_should_wakeup,
211 .backlight_limit = corgibl_limit_intensity,
212 .charge_on_volt = SHARPSL_CHARGE_ON_VOLT,
213 .charge_on_temp = SHARPSL_CHARGE_ON_TEMP,
214 .charge_acin_high = SHARPSL_CHARGE_ON_ACIN_HIGH,
215 .charge_acin_low = SHARPSL_CHARGE_ON_ACIN_LOW,
216 .fatal_acin_volt = SHARPSL_FATAL_ACIN_VOLT,
217 .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT,
203 .bat_levels = 40, 218 .bat_levels = 40,
204 .bat_levels_noac = spitz_battery_levels_noac, 219 .bat_levels_noac = spitz_battery_levels_noac,
205 .bat_levels_acin = spitz_battery_levels_acin, 220 .bat_levels_acin = spitz_battery_levels_acin,
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 76c0e7f0a219..7152bc13680f 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -19,12 +19,15 @@
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/pm.h>
23#include <linux/delay.h>
22 24
23#include <asm/setup.h> 25#include <asm/setup.h>
24#include <asm/memory.h> 26#include <asm/memory.h>
25#include <asm/mach-types.h> 27#include <asm/mach-types.h>
26#include <asm/hardware.h> 28#include <asm/hardware.h>
27#include <asm/irq.h> 29#include <asm/irq.h>
30#include <asm/system.h>
28#include <asm/arch/irda.h> 31#include <asm/arch/irda.h>
29#include <asm/arch/mmc.h> 32#include <asm/arch/mmc.h>
30#include <asm/arch/udc.h> 33#include <asm/arch/udc.h>
@@ -266,8 +269,31 @@ static struct platform_device *devices[] __initdata = {
266 &tosaled_device, 269 &tosaled_device,
267}; 270};
268 271
272static void tosa_poweroff(void)
273{
274 RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
275
276 pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT);
277 GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET);
278
279 mdelay(1000);
280 arm_machine_restart('h');
281}
282
283static void tosa_restart(char mode)
284{
285 /* Bootloader magic for a reboot */
286 if((MSC0 & 0xffff0000) == 0x7ff00000)
287 MSC0 = (MSC0 & 0xffff) | 0x7ee00000;
288
289 tosa_poweroff();
290}
291
269static void __init tosa_init(void) 292static void __init tosa_init(void)
270{ 293{
294 pm_power_off = tosa_poweroff;
295 arm_pm_restart = tosa_restart;
296
271 pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN); 297 pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
272 pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN); 298 pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN);
273 pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN); 299 pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
diff --git a/arch/arm/mach-s3c2410/mach-anubis.c b/arch/arm/mach-s3c2410/mach-anubis.c
index 52bf718137d4..4a92d6f92d6b 100644
--- a/arch/arm/mach-s3c2410/mach-anubis.c
+++ b/arch/arm/mach-s3c2410/mach-anubis.c
@@ -239,6 +239,54 @@ static struct s3c2410_platform_nand anubis_nand_info = {
239 .select_chip = anubis_nand_select, 239 .select_chip = anubis_nand_select,
240}; 240};
241 241
242/* IDE channels */
243
244static struct resource anubis_ide0_resource[] = {
245 {
246 .start = S3C2410_CS3,
247 .end = S3C2410_CS3 + (8*32) - 1,
248 .flags = IORESOURCE_MEM,
249 }, {
250 .start = S3C2410_CS3 + (1<<26),
251 .end = S3C2410_CS3 + (1<<26) + (8*32) - 1,
252 .flags = IORESOURCE_MEM,
253 }, {
254 .start = IRQ_IDE0,
255 .end = IRQ_IDE0,
256 .flags = IORESOURCE_IRQ,
257 },
258};
259
260static struct platform_device anubis_device_ide0 = {
261 .name = "simtec-ide",
262 .id = 0,
263 .num_resources = ARRAY_SIZE(anubis_ide0_resource),
264 .resource = anubis_ide0_resource,
265};
266
267static struct resource anubis_ide1_resource[] = {
268 {
269 .start = S3C2410_CS4,
270 .end = S3C2410_CS4 + (8*32) - 1,
271 .flags = IORESOURCE_MEM,
272 }, {
273 .start = S3C2410_CS4 + (1<<26),
274 .end = S3C2410_CS4 + (1<<26) + (8*32) - 1,
275 .flags = IORESOURCE_MEM,
276 }, {
277 .start = IRQ_IDE0,
278 .end = IRQ_IDE0,
279 .flags = IORESOURCE_IRQ,
280 },
281};
282
283
284static struct platform_device anubis_device_ide1 = {
285 .name = "simtec-ide",
286 .id = 1,
287 .num_resources = ARRAY_SIZE(anubis_ide1_resource),
288 .resource = anubis_ide1_resource,
289};
242 290
243/* Standard Anubis devices */ 291/* Standard Anubis devices */
244 292
@@ -249,6 +297,8 @@ static struct platform_device *anubis_devices[] __initdata = {
249 &s3c_device_i2c, 297 &s3c_device_i2c,
250 &s3c_device_rtc, 298 &s3c_device_rtc,
251 &s3c_device_nand, 299 &s3c_device_nand,
300 &anubis_device_ide0,
301 &anubis_device_ide1,
252}; 302};
253 303
254static struct clk *anubis_clocks[] = { 304static struct clk *anubis_clocks[] = {
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index 1ff2f073a55d..4221d054a1e9 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -121,8 +121,8 @@ config CPU_ARM925T
121# ARM926T 121# ARM926T
122config CPU_ARM926T 122config CPU_ARM926T
123 bool "Support ARM926T processor" 123 bool "Support ARM926T processor"
124 depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 124 depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX
125 default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 125 default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX
126 select CPU_32v5 126 select CPU_32v5
127 select CPU_ABRT_EV5TJ 127 select CPU_ABRT_EV5TJ
128 select CPU_CACHE_VIVT 128 select CPU_CACHE_VIVT
diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c
index 749a86c2adb6..8419e29b71f4 100644
--- a/drivers/leds/leds-locomo.c
+++ b/drivers/leds/leds-locomo.c
@@ -45,11 +45,13 @@ static void locomoled_brightness_set1(struct led_classdev *led_cdev,
45 45
46static struct led_classdev locomo_led0 = { 46static struct led_classdev locomo_led0 = {
47 .name = "locomo:amber", 47 .name = "locomo:amber",
48 .default_trigger = "sharpsl-charge",
48 .brightness_set = locomoled_brightness_set0, 49 .brightness_set = locomoled_brightness_set0,
49}; 50};
50 51
51static struct led_classdev locomo_led1 = { 52static struct led_classdev locomo_led1 = {
52 .name = "locomo:green", 53 .name = "locomo:green",
54 .default_trigger = "nand-disk",
53 .brightness_set = locomoled_brightness_set1, 55 .brightness_set = locomoled_brightness_set1,
54}; 56};
55 57
diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c
index c6b262b653d3..19b1e1276220 100644
--- a/drivers/pcmcia/sa1100_badge4.c
+++ b/drivers/pcmcia/sa1100_badge4.c
@@ -128,8 +128,8 @@ badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state
128 128
129static struct pcmcia_low_level badge4_pcmcia_ops = { 129static struct pcmcia_low_level badge4_pcmcia_ops = {
130 .owner = THIS_MODULE, 130 .owner = THIS_MODULE,
131 .init = sa1111_pcmcia_hw_init, 131 .hw_init = sa1111_pcmcia_hw_init,
132 .shutdown = sa1111_pcmcia_hw_shutdown, 132 .hw_shutdown = sa1111_pcmcia_hw_shutdown,
133 .socket_state = sa1111_pcmcia_socket_state, 133 .socket_state = sa1111_pcmcia_socket_state,
134 .configure_socket = badge4_pcmcia_configure_socket, 134 .configure_socket = badge4_pcmcia_configure_socket,
135 135
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
index 7d22dc0478d3..5ea778fc1caa 100644
--- a/drivers/serial/Kconfig
+++ b/drivers/serial/Kconfig
@@ -300,21 +300,22 @@ config SERIAL_AMBA_PL011_CONSOLE
300 kernel at boot time.) 300 kernel at boot time.)
301 301
302config SERIAL_AT91 302config SERIAL_AT91
303 bool "AT91RM9200 serial port support" 303 bool "AT91RM9200 / AT91SAM9261 serial port support"
304 depends on ARM && ARCH_AT91RM9200 304 depends on ARM && (ARCH_AT91RM9200 || ARCH_AT91SAM9261)
305 select SERIAL_CORE 305 select SERIAL_CORE
306 help 306 help
307 This enables the driver for the on-chip UARTs of the AT91RM9200 307 This enables the driver for the on-chip UARTs of the Atmel
308 processor. 308 AT91RM9200 and AT91SAM926 processor.
309 309
310config SERIAL_AT91_CONSOLE 310config SERIAL_AT91_CONSOLE
311 bool "Support for console on AT91RM9200 serial port" 311 bool "Support for console on AT91RM9200 / AT91SAM9261 serial port"
312 depends on SERIAL_AT91=y 312 depends on SERIAL_AT91=y
313 select SERIAL_CORE_CONSOLE 313 select SERIAL_CORE_CONSOLE
314 help 314 help
315 Say Y here if you wish to use a UART on the AT91RM9200 as the system 315 Say Y here if you wish to use a UART on the Atmel AT91RM9200 or
316 console (the system console is the device which receives all kernel 316 AT91SAM9261 as the system console (the system console is the device
317 messages and warnings and which allows logins in single user mode). 317 which receives all kernel messages and warnings and which allows
318 logins in single user mode).
318 319
319config SERIAL_AT91_TTYAT 320config SERIAL_AT91_TTYAT
320 bool "Install as device ttyAT0-4 instead of ttyS0-4" 321 bool "Install as device ttyAT0-4 instead of ttyS0-4"
diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c
index 6547fe0cef96..db5b25fafed4 100644
--- a/drivers/serial/at91_serial.c
+++ b/drivers/serial/at91_serial.c
@@ -2,7 +2,6 @@
2 * linux/drivers/char/at91_serial.c 2 * linux/drivers/char/at91_serial.c
3 * 3 *
4 * Driver for Atmel AT91RM9200 Serial ports 4 * Driver for Atmel AT91RM9200 Serial ports
5 *
6 * Copyright (C) 2003 Rick Bronson 5 * Copyright (C) 2003 Rick Bronson
7 * 6 *
8 * Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd. 7 * Based on drivers/char/serial_sa1100.c, by Deep Blue Solutions Ltd.
@@ -30,17 +29,19 @@
30#include <linux/slab.h> 29#include <linux/slab.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/serial.h> 31#include <linux/serial.h>
32#include <linux/clk.h>
33#include <linux/console.h> 33#include <linux/console.h>
34#include <linux/sysrq.h> 34#include <linux/sysrq.h>
35#include <linux/tty_flip.h> 35#include <linux/tty_flip.h>
36#include <linux/platform_device.h>
36 37
37#include <asm/io.h> 38#include <asm/io.h>
38 39
39#include <asm/arch/at91rm9200_usart.h> 40#include <asm/arch/at91rm9200_usart.h>
40#include <asm/mach/serial_at91rm9200.h> 41#include <asm/arch/at91rm9200_pdc.h>
42#include <asm/mach/serial_at91.h>
41#include <asm/arch/board.h> 43#include <asm/arch/board.h>
42#include <asm/arch/pio.h> 44#include <asm/arch/system.h>
43
44 45
45#if defined(CONFIG_SERIAL_AT91_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 46#if defined(CONFIG_SERIAL_AT91_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
46#define SUPPORT_SYSRQ 47#define SUPPORT_SYSRQ
@@ -67,7 +68,6 @@
67 68
68#endif 69#endif
69 70
70#define AT91_VA_BASE_DBGU ((unsigned long) AT91_VA_BASE_SYS + AT91_DBGU)
71#define AT91_ISR_PASS_LIMIT 256 71#define AT91_ISR_PASS_LIMIT 256
72 72
73#define UART_PUT_CR(port,v) writel(v, (port)->membase + AT91_US_CR) 73#define UART_PUT_CR(port,v) writel(v, (port)->membase + AT91_US_CR)
@@ -87,16 +87,33 @@
87 87
88 /* PDC registers */ 88 /* PDC registers */
89#define UART_PUT_PTCR(port,v) writel(v, (port)->membase + AT91_PDC_PTCR) 89#define UART_PUT_PTCR(port,v) writel(v, (port)->membase + AT91_PDC_PTCR)
90#define UART_GET_PTSR(port) readl((port)->membase + AT91_PDC_PTSR)
91
90#define UART_PUT_RPR(port,v) writel(v, (port)->membase + AT91_PDC_RPR) 92#define UART_PUT_RPR(port,v) writel(v, (port)->membase + AT91_PDC_RPR)
93#define UART_GET_RPR(port) readl((port)->membase + AT91_PDC_RPR)
91#define UART_PUT_RCR(port,v) writel(v, (port)->membase + AT91_PDC_RCR) 94#define UART_PUT_RCR(port,v) writel(v, (port)->membase + AT91_PDC_RCR)
92#define UART_GET_RCR(port) readl((port)->membase + AT91_PDC_RCR)
93#define UART_PUT_RNPR(port,v) writel(v, (port)->membase + AT91_PDC_RNPR) 95#define UART_PUT_RNPR(port,v) writel(v, (port)->membase + AT91_PDC_RNPR)
94#define UART_PUT_RNCR(port,v) writel(v, (port)->membase + AT91_PDC_RNCR) 96#define UART_PUT_RNCR(port,v) writel(v, (port)->membase + AT91_PDC_RNCR)
95 97
98#define UART_PUT_TPR(port,v) writel(v, (port)->membase + AT91_PDC_TPR)
99#define UART_PUT_TCR(port,v) writel(v, (port)->membase + AT91_PDC_TCR)
100//#define UART_PUT_TNPR(port,v) writel(v, (port)->membase + AT91_PDC_TNPR)
101//#define UART_PUT_TNCR(port,v) writel(v, (port)->membase + AT91_PDC_TNCR)
96 102
97static int (*at91_open)(struct uart_port *); 103static int (*at91_open)(struct uart_port *);
98static void (*at91_close)(struct uart_port *); 104static void (*at91_close)(struct uart_port *);
99 105
106/*
107 * We wrap our port structure around the generic uart_port.
108 */
109struct at91_uart_port {
110 struct uart_port uart; /* uart */
111 struct clk *clk; /* uart clock */
112 unsigned short suspended; /* is port suspended? */
113};
114
115static struct at91_uart_port at91_ports[AT91_NR_UART];
116
100#ifdef SUPPORT_SYSRQ 117#ifdef SUPPORT_SYSRQ
101static struct console at91_console; 118static struct console at91_console;
102#endif 119#endif
@@ -115,16 +132,19 @@ static u_int at91_tx_empty(struct uart_port *port)
115static void at91_set_mctrl(struct uart_port *port, u_int mctrl) 132static void at91_set_mctrl(struct uart_port *port, u_int mctrl)
116{ 133{
117 unsigned int control = 0; 134 unsigned int control = 0;
135 unsigned int mode;
118 136
119 /* 137 if (arch_identify() == ARCH_ID_AT91RM9200) {
120 * Errata #39: RTS0 is not internally connected to PA21. We need to drive 138 /*
121 * the pin manually. 139 * AT91RM9200 Errata #39: RTS0 is not internally connected to PA21.
122 */ 140 * We need to drive the pin manually.
123 if (port->mapbase == AT91_VA_BASE_US0) { 141 */
124 if (mctrl & TIOCM_RTS) 142 if (port->mapbase == AT91_BASE_US0) {
125 at91_sys_write(AT91_PIOA + PIO_CODR, AT91_PA21_RTS0); 143 if (mctrl & TIOCM_RTS)
126 else 144 at91_sys_write(AT91_PIOA + PIO_CODR, AT91_PA21_RTS0);
127 at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0); 145 else
146 at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0);
147 }
128 } 148 }
129 149
130 if (mctrl & TIOCM_RTS) 150 if (mctrl & TIOCM_RTS)
@@ -137,7 +157,15 @@ static void at91_set_mctrl(struct uart_port *port, u_int mctrl)
137 else 157 else
138 control |= AT91_US_DTRDIS; 158 control |= AT91_US_DTRDIS;
139 159
140 UART_PUT_CR(port,control); 160 UART_PUT_CR(port, control);
161
162 /* Local loopback mode? */
163 mode = UART_GET_MR(port) & ~AT91_US_CHMODE;
164 if (mctrl & TIOCM_LOOP)
165 mode |= AT91_US_CHMODE_LOC_LOOP;
166 else
167 mode |= AT91_US_CHMODE_NORMAL;
168 UART_PUT_MR(port, mode);
141} 169}
142 170
143/* 171/*
@@ -169,8 +197,9 @@ static u_int at91_get_mctrl(struct uart_port *port)
169 */ 197 */
170static void at91_stop_tx(struct uart_port *port) 198static void at91_stop_tx(struct uart_port *port)
171{ 199{
200 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
201
172 UART_PUT_IDR(port, AT91_US_TXRDY); 202 UART_PUT_IDR(port, AT91_US_TXRDY);
173 port->read_status_mask &= ~AT91_US_TXRDY;
174} 203}
175 204
176/* 205/*
@@ -178,7 +207,8 @@ static void at91_stop_tx(struct uart_port *port)
178 */ 207 */
179static void at91_start_tx(struct uart_port *port) 208static void at91_start_tx(struct uart_port *port)
180{ 209{
181 port->read_status_mask |= AT91_US_TXRDY; 210 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
211
182 UART_PUT_IER(port, AT91_US_TXRDY); 212 UART_PUT_IER(port, AT91_US_TXRDY);
183} 213}
184 214
@@ -187,6 +217,8 @@ static void at91_start_tx(struct uart_port *port)
187 */ 217 */
188static void at91_stop_rx(struct uart_port *port) 218static void at91_stop_rx(struct uart_port *port)
189{ 219{
220 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
221
190 UART_PUT_IDR(port, AT91_US_RXRDY); 222 UART_PUT_IDR(port, AT91_US_RXRDY);
191} 223}
192 224
@@ -195,7 +227,6 @@ static void at91_stop_rx(struct uart_port *port)
195 */ 227 */
196static void at91_enable_ms(struct uart_port *port) 228static void at91_enable_ms(struct uart_port *port)
197{ 229{
198 port->read_status_mask |= (AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC);
199 UART_PUT_IER(port, AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC); 230 UART_PUT_IER(port, AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC);
200} 231}
201 232
@@ -218,8 +249,8 @@ static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs)
218 struct tty_struct *tty = port->info->tty; 249 struct tty_struct *tty = port->info->tty;
219 unsigned int status, ch, flg; 250 unsigned int status, ch, flg;
220 251
221 status = UART_GET_CSR(port) & port->read_status_mask; 252 status = UART_GET_CSR(port);
222 while (status & (AT91_US_RXRDY)) { 253 while (status & AT91_US_RXRDY) {
223 ch = UART_GET_CHAR(port); 254 ch = UART_GET_CHAR(port);
224 255
225 port->icount.rx++; 256 port->icount.rx++;
@@ -230,40 +261,38 @@ static void at91_rx_chars(struct uart_port *port, struct pt_regs *regs)
230 * note that the error handling code is 261 * note that the error handling code is
231 * out of the main execution path 262 * out of the main execution path
232 */ 263 */
233 if (unlikely(status & (AT91_US_PARE | AT91_US_FRAME | AT91_US_OVRE))) { 264 if (unlikely(status & (AT91_US_PARE | AT91_US_FRAME | AT91_US_OVRE | AT91_US_RXBRK))) {
234 UART_PUT_CR(port, AT91_US_RSTSTA); /* clear error */ 265 UART_PUT_CR(port, AT91_US_RSTSTA); /* clear error */
235 if (status & (AT91_US_PARE)) 266 if (status & AT91_US_RXBRK) {
267 status &= ~(AT91_US_PARE | AT91_US_FRAME); /* ignore side-effect */
268 port->icount.brk++;
269 if (uart_handle_break(port))
270 goto ignore_char;
271 }
272 if (status & AT91_US_PARE)
236 port->icount.parity++; 273 port->icount.parity++;
237 if (status & (AT91_US_FRAME)) 274 if (status & AT91_US_FRAME)
238 port->icount.frame++; 275 port->icount.frame++;
239 if (status & (AT91_US_OVRE)) 276 if (status & AT91_US_OVRE)
240 port->icount.overrun++; 277 port->icount.overrun++;
241 278
242 if (status & AT91_US_PARE) 279 status &= port->read_status_mask;
280
281 if (status & AT91_US_RXBRK)
282 flg = TTY_BREAK;
283 else if (status & AT91_US_PARE)
243 flg = TTY_PARITY; 284 flg = TTY_PARITY;
244 else if (status & AT91_US_FRAME) 285 else if (status & AT91_US_FRAME)
245 flg = TTY_FRAME; 286 flg = TTY_FRAME;
246 if (status & AT91_US_OVRE) {
247 /*
248 * overrun does *not* affect the character
249 * we read from the FIFO
250 */
251 tty_insert_flip_char(tty, ch, flg);
252 ch = 0;
253 flg = TTY_OVERRUN;
254 }
255#ifdef SUPPORT_SYSRQ
256 port->sysrq = 0;
257#endif
258 } 287 }
259 288
260 if (uart_handle_sysrq_char(port, ch, regs)) 289 if (uart_handle_sysrq_char(port, ch, regs))
261 goto ignore_char; 290 goto ignore_char;
262 291
263 tty_insert_flip_char(tty, ch, flg); 292 uart_insert_char(port, status, AT91_US_OVRE, ch, flg);
264 293
265 ignore_char: 294 ignore_char:
266 status = UART_GET_CSR(port) & port->read_status_mask; 295 status = UART_GET_CSR(port);
267 } 296 }
268 297
269 tty_flip_buffer_push(tty); 298 tty_flip_buffer_push(tty);
@@ -308,40 +337,35 @@ static void at91_tx_chars(struct uart_port *port)
308static irqreturn_t at91_interrupt(int irq, void *dev_id, struct pt_regs *regs) 337static irqreturn_t at91_interrupt(int irq, void *dev_id, struct pt_regs *regs)
309{ 338{
310 struct uart_port *port = dev_id; 339 struct uart_port *port = dev_id;
340 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
311 unsigned int status, pending, pass_counter = 0; 341 unsigned int status, pending, pass_counter = 0;
312 342
313 status = UART_GET_CSR(port); 343 status = UART_GET_CSR(port);
314 pending = status & port->read_status_mask; 344 pending = status & UART_GET_IMR(port);
315 if (pending) { 345 while (pending) {
316 do { 346 /* Interrupt receive */
317 if (pending & AT91_US_RXRDY) 347 if (pending & AT91_US_RXRDY)
318 at91_rx_chars(port, regs); 348 at91_rx_chars(port, regs);
319 349
320 /* Clear the relevent break bits */ 350 // TODO: All reads to CSR will clear these interrupts!
321 if (pending & AT91_US_RXBRK) { 351 if (pending & AT91_US_RIIC) port->icount.rng++;
322 UART_PUT_CR(port, AT91_US_RSTSTA); 352 if (pending & AT91_US_DSRIC) port->icount.dsr++;
323 port->icount.brk++; 353 if (pending & AT91_US_DCDIC)
324 uart_handle_break(port); 354 uart_handle_dcd_change(port, !(status & AT91_US_DCD));
325 } 355 if (pending & AT91_US_CTSIC)
356 uart_handle_cts_change(port, !(status & AT91_US_CTS));
357 if (pending & (AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC))
358 wake_up_interruptible(&port->info->delta_msr_wait);
359
360 /* Interrupt transmit */
361 if (pending & AT91_US_TXRDY)
362 at91_tx_chars(port);
363
364 if (pass_counter++ > AT91_ISR_PASS_LIMIT)
365 break;
326 366
327 // TODO: All reads to CSR will clear these interrupts! 367 status = UART_GET_CSR(port);
328 if (pending & AT91_US_RIIC) port->icount.rng++; 368 pending = status & UART_GET_IMR(port);
329 if (pending & AT91_US_DSRIC) port->icount.dsr++;
330 if (pending & AT91_US_DCDIC)
331 uart_handle_dcd_change(port, !(status & AT91_US_DCD));
332 if (pending & AT91_US_CTSIC)
333 uart_handle_cts_change(port, !(status & AT91_US_CTS));
334 if (pending & (AT91_US_RIIC | AT91_US_DSRIC | AT91_US_DCDIC | AT91_US_CTSIC))
335 wake_up_interruptible(&port->info->delta_msr_wait);
336
337 if (pending & AT91_US_TXRDY)
338 at91_tx_chars(port);
339 if (pass_counter++ > AT91_ISR_PASS_LIMIT)
340 break;
341
342 status = UART_GET_CSR(port);
343 pending = status & port->read_status_mask;
344 } while (pending);
345 } 369 }
346 return IRQ_HANDLED; 370 return IRQ_HANDLED;
347} 371}
@@ -351,6 +375,7 @@ static irqreturn_t at91_interrupt(int irq, void *dev_id, struct pt_regs *regs)
351 */ 375 */
352static int at91_startup(struct uart_port *port) 376static int at91_startup(struct uart_port *port)
353{ 377{
378 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
354 int retval; 379 int retval;
355 380
356 /* 381 /*
@@ -381,14 +406,14 @@ static int at91_startup(struct uart_port *port)
381 } 406 }
382 } 407 }
383 408
384 port->read_status_mask = AT91_US_RXRDY | AT91_US_TXRDY | AT91_US_OVRE
385 | AT91_US_FRAME | AT91_US_PARE | AT91_US_RXBRK;
386 /* 409 /*
387 * Finally, enable the serial port 410 * Finally, enable the serial port
388 */ 411 */
389 UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX); 412 UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX);
390 UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN); /* enable xmit & rcvr */ 413 UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN); /* enable xmit & rcvr */
391 UART_PUT_IER(port, AT91_US_RXRDY); /* do receive only */ 414
415 UART_PUT_IER(port, AT91_US_RXRDY); /* enable receive only */
416
392 return 0; 417 return 0;
393} 418}
394 419
@@ -397,6 +422,8 @@ static int at91_startup(struct uart_port *port)
397 */ 422 */
398static void at91_shutdown(struct uart_port *port) 423static void at91_shutdown(struct uart_port *port)
399{ 424{
425 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
426
400 /* 427 /*
401 * Disable all interrupts, port and break condition. 428 * Disable all interrupts, port and break condition.
402 */ 429 */
@@ -421,21 +448,22 @@ static void at91_shutdown(struct uart_port *port)
421 */ 448 */
422static void at91_serial_pm(struct uart_port *port, unsigned int state, unsigned int oldstate) 449static void at91_serial_pm(struct uart_port *port, unsigned int state, unsigned int oldstate)
423{ 450{
451 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
452
424 switch (state) { 453 switch (state) {
425 case 0: 454 case 0:
426 /* 455 /*
427 * Enable the peripheral clock for this serial port. 456 * Enable the peripheral clock for this serial port.
428 * This is called on uart_open() or a resume event. 457 * This is called on uart_open() or a resume event.
429 */ 458 */
430 at91_sys_write(AT91_PMC_PCER, 1 << port->irq); 459 clk_enable(at91_port->clk);
431 break; 460 break;
432 case 3: 461 case 3:
433 /* 462 /*
434 * Disable the peripheral clock for this serial port. 463 * Disable the peripheral clock for this serial port.
435 * This is called on uart_close() or a suspend event. 464 * This is called on uart_close() or a suspend event.
436 */ 465 */
437 if (port->irq != AT91_ID_SYS) /* is this a shared clock? */ 466 clk_disable(at91_port->clk);
438 at91_sys_write(AT91_PMC_PCDR, 1 << port->irq);
439 break; 467 break;
440 default: 468 default:
441 printk(KERN_ERR "at91_serial: unknown pm %d\n", state); 469 printk(KERN_ERR "at91_serial: unknown pm %d\n", state);
@@ -494,9 +522,9 @@ static void at91_set_termios(struct uart_port *port, struct termios * termios, s
494 522
495 spin_lock_irqsave(&port->lock, flags); 523 spin_lock_irqsave(&port->lock, flags);
496 524
497 port->read_status_mask |= AT91_US_OVRE; 525 port->read_status_mask = AT91_US_OVRE;
498 if (termios->c_iflag & INPCK) 526 if (termios->c_iflag & INPCK)
499 port->read_status_mask |= AT91_US_FRAME | AT91_US_PARE; 527 port->read_status_mask |= (AT91_US_FRAME | AT91_US_PARE);
500 if (termios->c_iflag & (BRKINT | PARMRK)) 528 if (termios->c_iflag & (BRKINT | PARMRK))
501 port->read_status_mask |= AT91_US_RXBRK; 529 port->read_status_mask |= AT91_US_RXBRK;
502 530
@@ -552,7 +580,7 @@ static void at91_set_termios(struct uart_port *port, struct termios * termios, s
552 */ 580 */
553static const char *at91_type(struct uart_port *port) 581static const char *at91_type(struct uart_port *port)
554{ 582{
555 return (port->type == PORT_AT91RM9200) ? "AT91_SERIAL" : NULL; 583 return (port->type == PORT_AT91) ? "AT91_SERIAL" : NULL;
556} 584}
557 585
558/* 586/*
@@ -560,8 +588,15 @@ static const char *at91_type(struct uart_port *port)
560 */ 588 */
561static void at91_release_port(struct uart_port *port) 589static void at91_release_port(struct uart_port *port)
562{ 590{
563 release_mem_region(port->mapbase, 591 struct platform_device *pdev = to_platform_device(port->dev);
564 (port->mapbase == AT91_VA_BASE_DBGU) ? 512 : SZ_16K); 592 int size = pdev->resource[0].end - pdev->resource[0].start + 1;
593
594 release_mem_region(port->mapbase, size);
595
596 if (port->flags & UPF_IOREMAP) {
597 iounmap(port->membase);
598 port->membase = NULL;
599 }
565} 600}
566 601
567/* 602/*
@@ -569,10 +604,21 @@ static void at91_release_port(struct uart_port *port)
569 */ 604 */
570static int at91_request_port(struct uart_port *port) 605static int at91_request_port(struct uart_port *port)
571{ 606{
572 return request_mem_region(port->mapbase, 607 struct platform_device *pdev = to_platform_device(port->dev);
573 (port->mapbase == AT91_VA_BASE_DBGU) ? 512 : SZ_16K, 608 int size = pdev->resource[0].end - pdev->resource[0].start + 1;
574 "at91_serial") != NULL ? 0 : -EBUSY; 609
610 if (!request_mem_region(port->mapbase, size, "at91_serial"))
611 return -EBUSY;
612
613 if (port->flags & UPF_IOREMAP) {
614 port->membase = ioremap(port->mapbase, size);
615 if (port->membase == NULL) {
616 release_mem_region(port->mapbase, size);
617 return -ENOMEM;
618 }
619 }
575 620
621 return 0;
576} 622}
577 623
578/* 624/*
@@ -581,7 +627,7 @@ static int at91_request_port(struct uart_port *port)
581static void at91_config_port(struct uart_port *port, int flags) 627static void at91_config_port(struct uart_port *port, int flags)
582{ 628{
583 if (flags & UART_CONFIG_TYPE) { 629 if (flags & UART_CONFIG_TYPE) {
584 port->type = PORT_AT91RM9200; 630 port->type = PORT_AT91;
585 at91_request_port(port); 631 at91_request_port(port);
586 } 632 }
587} 633}
@@ -592,7 +638,7 @@ static void at91_config_port(struct uart_port *port, int flags)
592static int at91_verify_port(struct uart_port *port, struct serial_struct *ser) 638static int at91_verify_port(struct uart_port *port, struct serial_struct *ser)
593{ 639{
594 int ret = 0; 640 int ret = 0;
595 if (ser->type != PORT_UNKNOWN && ser->type != PORT_AT91RM9200) 641 if (ser->type != PORT_UNKNOWN && ser->type != PORT_AT91)
596 ret = -EINVAL; 642 ret = -EINVAL;
597 if (port->irq != ser->irq) 643 if (port->irq != ser->irq)
598 ret = -EINVAL; 644 ret = -EINVAL;
@@ -624,33 +670,47 @@ static struct uart_ops at91_pops = {
624 .type = at91_type, 670 .type = at91_type,
625 .release_port = at91_release_port, 671 .release_port = at91_release_port,
626 .request_port = at91_request_port, 672 .request_port = at91_request_port,
627 .config_port = at91_config_port, 673 .config_port = at91_config_port,
628 .verify_port = at91_verify_port, 674 .verify_port = at91_verify_port,
629 .pm = at91_serial_pm, 675 .pm = at91_serial_pm,
630}; 676};
631 677
632static struct uart_port at91_ports[AT91_NR_UART]; 678/*
633 679 * Configure the port from the platform device resource info.
634void __init at91_init_ports(void) 680 */
681static void __devinit at91_init_port(struct at91_uart_port *at91_port, struct platform_device *pdev)
635{ 682{
636 static int first = 1; 683 struct uart_port *port = &at91_port->uart;
637 int i; 684 struct at91_uart_data *data = pdev->dev.platform_data;
638 685
639 if (!first) 686 port->iotype = UPIO_MEM;
640 return; 687 port->flags = UPF_BOOT_AUTOCONF;
641 first = 0; 688 port->ops = &at91_pops;
689 port->fifosize = 1;
690 port->line = pdev->id;
691 port->dev = &pdev->dev;
692
693 port->mapbase = pdev->resource[0].start;
694 port->irq = pdev->resource[1].start;
695
696 if (port->mapbase == AT91_VA_BASE_SYS + AT91_DBGU) /* Part of system perpherals - already mapped */
697 port->membase = (void __iomem *) port->mapbase;
698 else {
699 port->flags |= UPF_IOREMAP;
700 port->membase = NULL;
701 }
642 702
643 for (i = 0; i < AT91_NR_UART; i++) { 703 if (!at91_port->clk) { /* for console, the clock could already be configured */
644 at91_ports[i].iotype = UPIO_MEM; 704 at91_port->clk = clk_get(&pdev->dev, "usart");
645 at91_ports[i].flags = UPF_BOOT_AUTOCONF; 705 clk_enable(at91_port->clk);
646 at91_ports[i].uartclk = at91_master_clock; 706 port->uartclk = clk_get_rate(at91_port->clk);
647 at91_ports[i].ops = &at91_pops; 707 }
648 at91_ports[i].fifosize = 1;
649 at91_ports[i].line = i;
650 }
651} 708}
652 709
653void __init at91_register_uart_fns(struct at91rm9200_port_fns *fns) 710/*
711 * Register board-specific modem-control line handlers.
712 */
713void __init at91_register_uart_fns(struct at91_port_fns *fns)
654{ 714{
655 if (fns->enable_ms) 715 if (fns->enable_ms)
656 at91_pops.enable_ms = fns->enable_ms; 716 at91_pops.enable_ms = fns->enable_ms;
@@ -664,51 +724,6 @@ void __init at91_register_uart_fns(struct at91rm9200_port_fns *fns)
664 at91_pops.set_wake = fns->set_wake; 724 at91_pops.set_wake = fns->set_wake;
665} 725}
666 726
667/*
668 * Setup ports.
669 */
670void __init at91_register_uart(int idx, int port)
671{
672 if ((idx < 0) || (idx >= AT91_NR_UART)) {
673 printk(KERN_ERR "%s: bad index number %d\n", __FUNCTION__, idx);
674 return;
675 }
676
677 switch (port) {
678 case 0:
679 at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_US0;
680 at91_ports[idx].mapbase = AT91_VA_BASE_US0;
681 at91_ports[idx].irq = AT91_ID_US0;
682 AT91_CfgPIO_USART0();
683 break;
684 case 1:
685 at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_US1;
686 at91_ports[idx].mapbase = AT91_VA_BASE_US1;
687 at91_ports[idx].irq = AT91_ID_US1;
688 AT91_CfgPIO_USART1();
689 break;
690 case 2:
691 at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_US2;
692 at91_ports[idx].mapbase = AT91_VA_BASE_US2;
693 at91_ports[idx].irq = AT91_ID_US2;
694 AT91_CfgPIO_USART2();
695 break;
696 case 3:
697 at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_US3;
698 at91_ports[idx].mapbase = AT91_VA_BASE_US3;
699 at91_ports[idx].irq = AT91_ID_US3;
700 AT91_CfgPIO_USART3();
701 break;
702 case 4:
703 at91_ports[idx].membase = (void __iomem *) AT91_VA_BASE_DBGU;
704 at91_ports[idx].mapbase = AT91_VA_BASE_DBGU;
705 at91_ports[idx].irq = AT91_ID_SYS;
706 AT91_CfgPIO_DBGU();
707 break;
708 default:
709 printk(KERN_ERR "%s : bad port number %d\n", __FUNCTION__, port);
710 }
711}
712 727
713#ifdef CONFIG_SERIAL_AT91_CONSOLE 728#ifdef CONFIG_SERIAL_AT91_CONSOLE
714static void at91_console_putchar(struct uart_port *port, int ch) 729static void at91_console_putchar(struct uart_port *port, int ch)
@@ -723,7 +738,7 @@ static void at91_console_putchar(struct uart_port *port, int ch)
723 */ 738 */
724static void at91_console_write(struct console *co, const char *s, u_int count) 739static void at91_console_write(struct console *co, const char *s, u_int count)
725{ 740{
726 struct uart_port *port = at91_ports + co->index; 741 struct uart_port *port = &at91_ports[co->index].uart;
727 unsigned int status, imr; 742 unsigned int status, imr;
728 743
729 /* 744 /*
@@ -778,23 +793,15 @@ static void __init at91_console_get_options(struct uart_port *port, int *baud, i
778 793
779static int __init at91_console_setup(struct console *co, char *options) 794static int __init at91_console_setup(struct console *co, char *options)
780{ 795{
781 struct uart_port *port; 796 struct uart_port *port = &at91_ports[co->index].uart;
782 int baud = 115200; 797 int baud = 115200;
783 int bits = 8; 798 int bits = 8;
784 int parity = 'n'; 799 int parity = 'n';
785 int flow = 'n'; 800 int flow = 'n';
786 801
787 /* 802 if (port->membase == 0) /* Port not initialized yet - delay setup */
788 * Check whether an invalid uart number has been specified, and 803 return -ENODEV;
789 * if so, search for the first available port that does have
790 * console support.
791 */
792 port = uart_get_console(at91_ports, AT91_NR_UART, co);
793 804
794 /*
795 * Enable the serial console, in-case bootloader did not do it.
796 */
797 at91_sys_write(AT91_PMC_PCER, 1 << port->irq); /* enable clock */
798 UART_PUT_IDR(port, -1); /* disable interrupts */ 805 UART_PUT_IDR(port, -1); /* disable interrupts */
799 UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX); 806 UART_PUT_CR(port, AT91_US_RSTSTA | AT91_US_RSTRX);
800 UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN); 807 UART_PUT_CR(port, AT91_US_TXEN | AT91_US_RXEN);
@@ -821,23 +828,40 @@ static struct console at91_console = {
821 828
822#define AT91_CONSOLE_DEVICE &at91_console 829#define AT91_CONSOLE_DEVICE &at91_console
823 830
824static int __init at91_console_init(void) 831/*
832 * Early console initialization (before VM subsystem initialized).
833 */
834static int __init at91_console_init(void)
825{ 835{
826 at91_init_ports(); 836 if (at91_default_console_device) {
837 add_preferred_console(AT91_DEVICENAME, at91_default_console_device->id, NULL);
838 at91_init_port(&(at91_ports[at91_default_console_device->id]), at91_default_console_device);
839 register_console(&at91_console);
840 }
827 841
828 at91_console.index = at91_console_port;
829 register_console(&at91_console);
830 return 0; 842 return 0;
831} 843}
832console_initcall(at91_console_init); 844console_initcall(at91_console_init);
833 845
846/*
847 * Late console initialization.
848 */
849static int __init at91_late_console_init(void)
850{
851 if (at91_default_console_device && !(at91_console.flags & CON_ENABLED))
852 register_console(&at91_console);
853
854 return 0;
855}
856core_initcall(at91_late_console_init);
857
834#else 858#else
835#define AT91_CONSOLE_DEVICE NULL 859#define AT91_CONSOLE_DEVICE NULL
836#endif 860#endif
837 861
838static struct uart_driver at91_uart = { 862static struct uart_driver at91_uart = {
839 .owner = THIS_MODULE, 863 .owner = THIS_MODULE,
840 .driver_name = AT91_DEVICENAME, 864 .driver_name = "at91_serial",
841 .dev_name = AT91_DEVICENAME, 865 .dev_name = AT91_DEVICENAME,
842 .devfs_name = AT91_DEVICENAME, 866 .devfs_name = AT91_DEVICENAME,
843 .major = SERIAL_AT91_MAJOR, 867 .major = SERIAL_AT91_MAJOR,
@@ -846,33 +870,106 @@ static struct uart_driver at91_uart = {
846 .cons = AT91_CONSOLE_DEVICE, 870 .cons = AT91_CONSOLE_DEVICE,
847}; 871};
848 872
849static int __init at91_serial_init(void) 873#ifdef CONFIG_PM
874static int at91_serial_suspend(struct platform_device *pdev, pm_message_t state)
850{ 875{
851 int ret, i; 876 struct uart_port *port = platform_get_drvdata(pdev);
877 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
878
879 if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock())
880 enable_irq_wake(port->irq);
881 else {
882 disable_irq_wake(port->irq);
883 uart_suspend_port(&at91_uart, port);
884 at91_port->suspended = 1;
885 }
852 886
853 at91_init_ports(); 887 return 0;
888}
854 889
855 ret = uart_register_driver(&at91_uart); 890static int at91_serial_resume(struct platform_device *pdev)
856 if (ret) 891{
857 return ret; 892 struct uart_port *port = platform_get_drvdata(pdev);
893 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
858 894
859 for (i = 0; i < AT91_NR_UART; i++) { 895 if (at91_port->suspended) {
860 if (at91_serial_map[i] >= 0) 896 uart_resume_port(&at91_uart, port);
861 uart_add_one_port(&at91_uart, &at91_ports[i]); 897 at91_port->suspended = 0;
862 } 898 }
863 899
864 return 0; 900 return 0;
865} 901}
902#else
903#define at91_serial_suspend NULL
904#define at91_serial_resume NULL
905#endif
866 906
867static void __exit at91_serial_exit(void) 907static int __devinit at91_serial_probe(struct platform_device *pdev)
868{ 908{
869 int i; 909 struct at91_uart_port *port;
910 int ret;
870 911
871 for (i = 0; i < AT91_NR_UART; i++) { 912 port = &at91_ports[pdev->id];
872 if (at91_serial_map[i] >= 0) 913 at91_init_port(port, pdev);
873 uart_remove_one_port(&at91_uart, &at91_ports[i]);
874 }
875 914
915 ret = uart_add_one_port(&at91_uart, &port->uart);
916 if (!ret) {
917 device_init_wakeup(&pdev->dev, 1);
918 platform_set_drvdata(pdev, port);
919 }
920
921 return ret;
922}
923
924static int __devexit at91_serial_remove(struct platform_device *pdev)
925{
926 struct uart_port *port = platform_get_drvdata(pdev);
927 struct at91_uart_port *at91_port = (struct at91_uart_port *) port;
928 int ret = 0;
929
930 clk_disable(at91_port->clk);
931 clk_put(at91_port->clk);
932
933 device_init_wakeup(&pdev->dev, 0);
934 platform_set_drvdata(pdev, NULL);
935
936 if (port) {
937 ret = uart_remove_one_port(&at91_uart, port);
938 kfree(port);
939 }
940
941 return ret;
942}
943
944static struct platform_driver at91_serial_driver = {
945 .probe = at91_serial_probe,
946 .remove = __devexit_p(at91_serial_remove),
947 .suspend = at91_serial_suspend,
948 .resume = at91_serial_resume,
949 .driver = {
950 .name = "at91_usart",
951 .owner = THIS_MODULE,
952 },
953};
954
955static int __init at91_serial_init(void)
956{
957 int ret;
958
959 ret = uart_register_driver(&at91_uart);
960 if (ret)
961 return ret;
962
963 ret = platform_driver_register(&at91_serial_driver);
964 if (ret)
965 uart_unregister_driver(&at91_uart);
966
967 return ret;
968}
969
970static void __exit at91_serial_exit(void)
971{
972 platform_driver_unregister(&at91_serial_driver);
876 uart_unregister_driver(&at91_uart); 973 uart_unregister_driver(&at91_uart);
877} 974}
878 975
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h b/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h
new file mode 100644
index 000000000000..bff5ea45f604
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h
@@ -0,0 +1,81 @@
1/*
2 * include/asm-arm/arch-at91rm9200/at91rm9200_spi.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * Serial Peripheral Interface (SPI) registers.
8 * Based on AT91RM9200 datasheet revision E.
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 as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_SPI_H
17#define AT91RM9200_SPI_H
18
19#define AT91_SPI_CR 0x00 /* Control Register */
20#define AT91_SPI_SPIEN (1 << 0) /* SPI Enable */
21#define AT91_SPI_SPIDIS (1 << 1) /* SPI Disable */
22#define AT91_SPI_SWRST (1 << 7) /* SPI Software Reset */
23#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */
24
25#define AT91_SPI_MR 0x04 /* Mode Register */
26#define AT91_SPI_MSTR (1 << 0) /* Master/Slave Mode */
27#define AT91_SPI_PS (1 << 1) /* Peripheral Select */
28#define AT91_SPI_PS_FIXED (0 << 1)
29#define AT91_SPI_PS_VARIABLE (1 << 1)
30#define AT91_SPI_PCSDEC (1 << 2) /* Chip Select Decode */
31#define AT91_SPI_DIV32 (1 << 3) /* Clock Selection */
32#define AT91_SPI_MODFDIS (1 << 4) /* Mode Fault Detection */
33#define AT91_SPI_LLB (1 << 7) /* Local Loopback Enable */
34#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
35#define AT91_SPI_DLYBCS (0xff << 24) /* Delay Between Chip Selects */
36
37#define AT91_SPI_RDR 0x08 /* Receive Data Register */
38#define AT91_SPI_RD (0xffff << 0) /* Receive Data */
39#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
40
41#define AT91_SPI_TDR 0x0c /* Transmit Data Register */
42#define AT91_SPI_TD (0xffff << 0) /* Transmit Data */
43#define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */
44#define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */
45
46#define AT91_SPI_SR 0x10 /* Status Register */
47#define AT91_SPI_RDRF (1 << 0) /* Receive Data Register Full */
48#define AT91_SPI_TDRE (1 << 1) /* Transmit Data Register Full */
49#define AT91_SPI_MODF (1 << 2) /* Mode Fault Error */
50#define AT91_SPI_OVRES (1 << 3) /* Overrun Error Status */
51#define AT91_SPI_ENDRX (1 << 4) /* End of RX buffer */
52#define AT91_SPI_ENDTX (1 << 5) /* End of TX buffer */
53#define AT91_SPI_RXBUFF (1 << 6) /* RX Buffer Full */
54#define AT91_SPI_TXBUFE (1 << 7) /* TX Buffer Empty */
55#define AT91_SPI_NSSR (1 << 8) /* NSS Rising [SAM9261 only] */
56#define AT91_SPI_TXEMPTY (1 << 9) /* Transmission Register Empty [SAM9261 only] */
57#define AT91_SPI_SPIENS (1 << 16) /* SPI Enable Status */
58
59#define AT91_SPI_IER 0x14 /* Interrupt Enable Register */
60#define AT91_SPI_IDR 0x18 /* Interrupt Disable Register */
61#define AT91_SPI_IMR 0x1c /* Interrupt Mask Register */
62
63#define AT91_SPI_CSR(n) (0x30 + ((n) * 4)) /* Chip Select Registers 0-3 */
64#define AT91_SPI_CPOL (1 << 0) /* Clock Polarity */
65#define AT91_SPI_NCPHA (1 << 1) /* Clock Phase */
66#define AT91_SPI_CSAAT (1 << 3) /* Chip Select Active After Transfer [SAM9261 only] */
67#define AT91_SPI_BITS (0xf << 4) /* Bits Per Transfer */
68#define AT91_SPI_BITS_8 (0 << 4)
69#define AT91_SPI_BITS_9 (1 << 4)
70#define AT91_SPI_BITS_10 (2 << 4)
71#define AT91_SPI_BITS_11 (3 << 4)
72#define AT91_SPI_BITS_12 (4 << 4)
73#define AT91_SPI_BITS_13 (5 << 4)
74#define AT91_SPI_BITS_14 (6 << 4)
75#define AT91_SPI_BITS_15 (7 << 4)
76#define AT91_SPI_BITS_16 (8 << 4)
77#define AT91_SPI_SCBR (0xff << 8) /* Serial Clock Baud Rate */
78#define AT91_SPI_DLYBS (0xff << 16) /* Delay before SPCK */
79#define AT91_SPI_DLYBCT (0xff << 24) /* Delay between Consecutive Transfers */
80
81#endif
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h b/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h
new file mode 100644
index 000000000000..ac880227147f
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h
@@ -0,0 +1,96 @@
1/*
2 * include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Serial Synchronous Controller (SSC) registers.
7 * Based on AT91RM9200 datasheet revision E.
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
15#ifndef AT91RM9200_SSC_H
16#define AT91RM9200_SSC_H
17
18#define AT91_SSC_CR 0x00 /* Control Register */
19#define AT91_SSC_RXEN (1 << 0) /* Receive Enable */
20#define AT91_SSC_RXDIS (1 << 1) /* Receive Disable */
21#define AT91_SSC_TXEN (1 << 8) /* Transmit Enable */
22#define AT91_SSC_TXDIS (1 << 9) /* Transmit Disable */
23#define AT91_SSC_SWRST (1 << 15) /* Software Reset */
24
25#define AT91_SSC_CMR 0x04 /* Clock Mode Register */
26#define AT91_SSC_CMR_DIV (0xfff << 0) /* Clock Divider */
27
28#define AT91_SSC_RCMR 0x10 /* Receive Clock Mode Register */
29#define AT91_SSC_CKS (3 << 0) /* Clock Selection */
30#define AT91_SSC_CKS_DIV (0 << 0)
31#define AT91_SSC_CKS_CLOCK (1 << 0)
32#define AT91_SSC_CKS_PIN (2 << 0)
33#define AT91_SSC_CKO (7 << 2) /* Clock Output Mode Selection */
34#define AT91_SSC_CKO_NONE (0 << 2)
35#define AT91_SSC_CKO_CONTINUOUS (1 << 2)
36#define AT91_SSC_CKI (1 << 5) /* Clock Inversion */
37#define AT91_SSC_CKI_FALLING (0 << 5)
38#define AT91_SSC_CK_RISING (1 << 5)
39#define AT91_SSC_START (0xf << 8) /* Start Selection */
40#define AT91_SSC_START_CONTINUOUS (0 << 8)
41#define AT91_SSC_START_TX_RX (1 << 8)
42#define AT91_SSC_START_LOW_RF (2 << 8)
43#define AT91_SSC_START_HIGH_RF (3 << 8)
44#define AT91_SSC_START_FALLING_RF (4 << 8)
45#define AT91_SSC_START_RISING_RF (5 << 8)
46#define AT91_SSC_START_LEVEL_RF (6 << 8)
47#define AT91_SSC_START_EDGE_RF (7 << 8)
48#define AT91_SSC_STTDLY (0xff << 16) /* Start Delay */
49#define AT91_SSC_PERIOD (0xff << 24) /* Period Divider Selection */
50
51#define AT91_SSC_RFMR 0x14 /* Receive Frame Mode Register */
52#define AT91_SSC_DATALEN (0x1f << 0) /* Data Length */
53#define AT91_SSC_LOOP (1 << 5) /* Loop Mode */
54#define AT91_SSC_MSBF (1 << 7) /* Most Significant Bit First */
55#define AT91_SSC_DATNB (0xf << 8) /* Data Number per Frame */
56#define AT91_SSC_FSLEN (0xf << 16) /* Frame Sync Length */
57#define AT91_SSC_FSOS (7 << 20) /* Frame Sync Output Selection */
58#define AT91_SSC_FSOS_NONE (0 << 20)
59#define AT91_SSC_FSOS_NEGATIVE (1 << 20)
60#define AT91_SSC_FSOS_POSITIVE (2 << 20)
61#define AT91_SSC_FSOS_LOW (3 << 20)
62#define AT91_SSC_FSOS_HIGH (4 << 20)
63#define AT91_SSC_FSOS_TOGGLE (5 << 20)
64#define AT91_SSC_FSEDGE (1 << 24) /* Frame Sync Edge Detection */
65#define AT91_SSC_FSEDGE_POSITIVE (0 << 24)
66#define AT91_SSC_FSEDGE_NEGATIVE (1 << 24)
67
68#define AT91_SSC_TCMR 0x18 /* Transmit Clock Mode Register */
69#define AT91_SSC_TFMR 0x1c /* Transmit Fram Mode Register */
70#define AT91_SSC_DATDEF (1 << 5) /* Data Default Value */
71#define AT91_SSC_FSDEN (1 << 23) /* Frame Sync Data Enable */
72
73#define AT91_SSC_RHR 0x20 /* Receive Holding Register */
74#define AT91_SSC_THR 0x24 /* Transmit Holding Register */
75#define AT91_SSC_RSHR 0x30 /* Receive Sync Holding Register */
76#define AT91_SSC_TSHR 0x34 /* Transmit Sync Holding Register */
77
78#define AT91_SSC_SR 0x40 /* Status Register */
79#define AT91_SSC_TXRDY (1 << 0) /* Transmit Ready */
80#define AT91_SSC_TXEMPTY (1 << 1) /* Transmit Empty */
81#define AT91_SSC_ENDTX (1 << 2) /* End of Transmission */
82#define AT91_SSC_TXBUFE (1 << 3) /* Transmit Buffer Empty */
83#define AT91_SSC_RXRDY (1 << 4) /* Receive Ready */
84#define AT91_SSC_OVRUN (1 << 5) /* Receive Overrun */
85#define AT91_SSC_ENDRX (1 << 6) /* End of Reception */
86#define AT91_SSC_RXBUFF (1 << 7) /* Receive Buffer Full */
87#define AT91_SSC_TXSYN (1 << 10) /* Transmit Sync */
88#define AT91_SSC_RXSYN (1 << 11) /* Receive Sync */
89#define AT91_SSC_TXENA (1 << 16) /* Transmit Enable */
90#define AT91_SSC_RXENA (1 << 17) /* Receive Enable */
91
92#define AT91_SSC_IER 0x44 /* Interrupt Enable Register */
93#define AT91_SSC_IDR 0x48 /* Interrupt Disable Register */
94#define AT91_SSC_IMR 0x4c /* Interrupt Mask Register */
95
96#endif
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h
index 2910d359f919..0f4c12d5f0cd 100644
--- a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h
+++ b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h
@@ -68,8 +68,17 @@
68#define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */ 68#define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */
69#define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */ 69#define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */
70#define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */ 70#define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */
71
71#define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */ 72#define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */
72#define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */ 73#define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */
74#define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */
75#define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */
76#define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */
77#define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */
78#define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */
79#define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */
80#define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */
81#define AT91_CIDR_EXT (1 << 31) /* Extension Flag */
73 82
74 83
75/* 84/*
@@ -241,7 +250,7 @@
241#define AT91_RTC_SEC (0x7f << 0) /* Current Second */ 250#define AT91_RTC_SEC (0x7f << 0) /* Current Second */
242#define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ 251#define AT91_RTC_MIN (0x7f << 8) /* Current Minute */
243#define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ 252#define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */
244#define At91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ 253#define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */
245 254
246#define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */ 255#define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */
247#define AT91_RTC_CENT (0x7f << 0) /* Current Century */ 256#define AT91_RTC_CENT (0x7f << 0) /* Current Century */
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h b/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h
new file mode 100644
index 000000000000..f4da752bb0c8
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h
@@ -0,0 +1,146 @@
1/*
2 * include/asm-arm/arch-at91rm9200/at91rm9200_tc.h
3 *
4 * Copyright (C) SAN People
5 *
6 * Timer/Counter Unit (TC) registers.
7 * Based on AT91RM9200 datasheet revision E.
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
15#ifndef AT91RM9200_TC_H
16#define AT91RM9200_TC_H
17
18#define AT91_TC_BCR 0xc0 /* TC Block Control Register */
19#define AT91_TC_SYNC (1 << 0) /* Synchro Command */
20
21#define AT91_TC_BMR 0xc4 /* TC Block Mode Register */
22#define AT91_TC_TC0XC0S (3 << 0) /* External Clock Signal 0 Selection */
23#define AT91_TC_TC0XC0S_TCLK0 (0 << 0)
24#define AT91_TC_TC0XC0S_NONE (1 << 0)
25#define AT91_TC_TC0XC0S_TIOA1 (2 << 0)
26#define AT91_TC_TC0XC0S_TIOA2 (3 << 0)
27#define AT91_TC_TC1XC1S (3 << 2) /* External Clock Signal 1 Selection */
28#define AT91_TC_TC1XC1S_TCLK1 (0 << 2)
29#define AT91_TC_TC1XC1S_NONE (1 << 2)
30#define AT91_TC_TC1XC1S_TIOA0 (2 << 2)
31#define AT91_TC_TC1XC1S_TIOA2 (3 << 2)
32#define AT91_TC_TC2XC2S (3 << 4) /* External Clock Signal 2 Selection */
33#define AT91_TC_TC2XC2S_TCLK2 (0 << 4)
34#define AT91_TC_TC2XC2S_NONE (1 << 4)
35#define AT91_TC_TC2XC2S_TIOA0 (2 << 4)
36#define AT91_TC_TC2XC2S_TIOA1 (3 << 4)
37
38
39#define AT91_TC_CCR 0x00 /* Channel Control Register */
40#define AT91_TC_CLKEN (1 << 0) /* Counter Clock Enable Command */
41#define AT91_TC_CLKDIS (1 << 1) /* Counter CLock Disable Command */
42#define AT91_TC_SWTRG (1 << 2) /* Software Trigger Command */
43
44#define AT91_TC_CMR 0x04 /* Channel Mode Register */
45#define AT91_TC_TCCLKS (7 << 0) /* Capture/Waveform Mode: Clock Selection */
46#define AT91_TC_TIMER_CLOCK1 (0 << 0)
47#define AT91_TC_TIMER_CLOCK2 (1 << 0)
48#define AT91_TC_TIMER_CLOCK3 (2 << 0)
49#define AT91_TC_TIMER_CLOCK4 (3 << 0)
50#define AT91_TC_TIMER_CLOCK5 (4 << 0)
51#define AT91_TC_XC0 (5 << 0)
52#define AT91_TC_XC1 (6 << 0)
53#define AT91_TC_XC2 (7 << 0)
54#define AT91_TC_CLKI (1 << 3) /* Capture/Waveform Mode: Clock Invert */
55#define AT91_TC_BURST (3 << 4) /* Capture/Waveform Mode: Burst Signal Selection */
56#define AT91_TC_LDBSTOP (1 << 6) /* Capture Mode: Counter Clock Stopped with TB Loading */
57#define AT91_TC_LDBDIS (1 << 7) /* Capture Mode: Counter Clock Disable with RB Loading */
58#define AT91_TC_ETRGEDG (3 << 8) /* Capture Mode: External Trigger Edge Selection */
59#define AT91_TC_ABETRG (1 << 10) /* Capture Mode: TIOA or TIOB External Trigger Selection */
60#define AT91_TC_CPCTRG (1 << 14) /* Capture Mode: RC Compare Trigger Enable */
61#define AT91_TC_WAVE (1 << 15) /* Capture/Waveform mode */
62#define AT91_TC_LDRA (3 << 16) /* Capture Mode: RA Loading Selection */
63#define AT91_TC_LDRB (3 << 18) /* Capture Mode: RB Loading Selection */
64
65#define AT91_TC_CPCSTOP (1 << 6) /* Waveform Mode: Counter Clock Stopped with RC Compare */
66#define AT91_TC_CPCDIS (1 << 7) /* Waveform Mode: Counter Clock Disable with RC Compare */
67#define AT91_TC_EEVTEDG (3 << 8) /* Waveform Mode: External Event Edge Selection */
68#define AT91_TC_EEVTEDG_NONE (0 << 8)
69#define AT91_TC_EEVTEDG_RISING (1 << 8)
70#define AT91_TC_EEVTEDG_FALLING (2 << 8)
71#define AT91_TC_EEVTEDG_BOTH (3 << 8)
72#define AT91_TC_EEVT (3 << 10) /* Waveform Mode: External Event Selection */
73#define AT91_TC_EEVT_TIOB (0 << 10)
74#define AT91_TC_EEVT_XC0 (1 << 10)
75#define AT91_TC_EEVT_XC1 (2 << 10)
76#define AT91_TC_EEVT_XC2 (3 << 10)
77#define AT91_TC_ENETRG (1 << 12) /* Waveform Mode: External Event Trigger Enable */
78#define AT91_TC_WAVESEL (3 << 13) /* Waveform Mode: Waveform Selection */
79#define AT91_TC_WAVESEL_UP (0 << 13)
80#define AT91_TC_WAVESEL_UP_AUTO (2 << 13)
81#define AT91_TC_WAVESEL_UPDOWN (1 << 13)
82#define AT91_TC_WAVESEL_UPDOWN_AUTO (3 << 13)
83#define AT91_TC_ACPA (3 << 16) /* Waveform Mode: RA Compare Effect on TIOA */
84#define AT91_TC_ACPA_NONE (0 << 16)
85#define AT91_TC_ACPA_SET (1 << 16)
86#define AT91_TC_ACPA_CLEAR (2 << 16)
87#define AT91_TC_ACPA_TOGGLE (3 << 16)
88#define AT91_TC_ACPC (3 << 18) /* Waveform Mode: RC Compre Effect on TIOA */
89#define AT91_TC_ACPC_NONE (0 << 18)
90#define AT91_TC_ACPC_SET (1 << 18)
91#define AT91_TC_ACPC_CLEAR (2 << 18)
92#define AT91_TC_ACPC_TOGGLE (3 << 18)
93#define AT91_TC_AEEVT (3 << 20) /* Waveform Mode: External Event Effect on TIOA */
94#define AT91_TC_AEEVT_NONE (0 << 20)
95#define AT91_TC_AEEVT_SET (1 << 20)
96#define AT91_TC_AEEVT_CLEAR (2 << 20)
97#define AT91_TC_AEEVT_TOGGLE (3 << 20)
98#define AT91_TC_ASWTRG (3 << 22) /* Waveform Mode: Software Trigger Effect on TIOA */
99#define AT91_TC_ASWTRG_NONE (0 << 22)
100#define AT91_TC_ASWTRG_SET (1 << 22)
101#define AT91_TC_ASWTRG_CLEAR (2 << 22)
102#define AT91_TC_ASWTRG_TOGGLE (3 << 22)
103#define AT91_TC_BCPB (3 << 24) /* Waveform Mode: RB Compare Effect on TIOB */
104#define AT91_TC_BCPB_NONE (0 << 24)
105#define AT91_TC_BCPB_SET (1 << 24)
106#define AT91_TC_BCPB_CLEAR (2 << 24)
107#define AT91_TC_BCPB_TOGGLE (3 << 24)
108#define AT91_TC_BCPC (3 << 26) /* Waveform Mode: RC Compare Effect on TIOB */
109#define AT91_TC_BCPC_NONE (0 << 26)
110#define AT91_TC_BCPC_SET (1 << 26)
111#define AT91_TC_BCPC_CLEAR (2 << 26)
112#define AT91_TC_BCPC_TOGGLE (3 << 26)
113#define AT91_TC_BEEVT (3 << 28) /* Waveform Mode: External Event Effect on TIOB */
114#define AT91_TC_BEEVT_NONE (0 << 28)
115#define AT91_TC_BEEVT_SET (1 << 28)
116#define AT91_TC_BEEVT_CLEAR (2 << 28)
117#define AT91_TC_BEEVT_TOGGLE (3 << 28)
118#define AT91_TC_BSWTRG (3 << 30) /* Waveform Mode: Software Trigger Effect on TIOB */
119#define AT91_TC_BSWTRG_NONE (0 << 30)
120#define AT91_TC_BSWTRG_SET (1 << 30)
121#define AT91_TC_BSWTRG_CLEAR (2 << 30)
122#define AT91_TC_BSWTRG_TOGGLE (3 << 30)
123
124#define AT91_TC_CV 0x10 /* Counter Value */
125#define AT91_TC_RA 0x14 /* Register A */
126#define AT91_TC_RB 0x18 /* Register B */
127#define AT91_TC_RC 0x1c /* Register C */
128
129#define AT91_TC_SR 0x20 /* Status Register */
130#define AT91_TC_COVFS (1 << 0) /* Counter Overflow Status */
131#define AT91_TC_LOVRS (1 << 1) /* Load Overrun Status */
132#define AT91_TC_CPAS (1 << 2) /* RA Compare Status */
133#define AT91_TC_CPBS (1 << 3) /* RB Compare Status */
134#define AT91_TC_CPCS (1 << 4) /* RC Compare Status */
135#define AT91_TC_LDRAS (1 << 5) /* RA Loading Status */
136#define AT91_TC_LDRBS (1 << 6) /* RB Loading Status */
137#define AT91_TC_ETRGS (1 << 7) /* External Trigger Status */
138#define AT91_TC_CLKSTA (1 << 16) /* Clock Enabling Status */
139#define AT91_TC_MTIOA (1 << 17) /* TIOA Mirror */
140#define AT91_TC_MTIOB (1 << 18) /* TIOB Mirror */
141
142#define AT91_TC_IER 0x24 /* Interrupt Enable Register */
143#define AT91_TC_IDR 0x28 /* Interrupt Disable Register */
144#define AT91_TC_IMR 0x2c /* Interrupt Mask Register */
145
146#endif
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h b/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h
new file mode 100644
index 000000000000..951e3f61cef4
--- /dev/null
+++ b/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h
@@ -0,0 +1,77 @@
1/*
2 * include/asm-arm/arch-at91rm9200/at91rm9200_udp.h
3 *
4 * Copyright (C) 2005 Ivan Kokshaysky
5 * Copyright (C) SAN People
6 *
7 * USB Device Port (UDP) registers.
8 * Based on AT91RM9200 datasheet revision E.
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 as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 */
15
16#ifndef AT91RM9200_UDP_H
17#define AT91RM9200_UDP_H
18
19#define AT91_UDP_FRM_NUM 0x00 /* Frame Number Register */
20#define AT91_UDP_NUM (0x7ff << 0) /* Frame Number */
21#define AT91_UDP_FRM_ERR (1 << 16) /* Frame Error */
22#define AT91_UDP_FRM_OK (1 << 17) /* Frame OK */
23
24#define AT91_UDP_GLB_STAT 0x04 /* Global State Register */
25#define AT91_UDP_FADDEN (1 << 0) /* Function Address Enable */
26#define AT91_UDP_CONFG (1 << 1) /* Configured */
27#define AT91_UDP_ESR (1 << 2) /* Enable Send Resume */
28#define AT91_UDP_RSMINPR (1 << 3) /* Resume has been sent */
29#define AT91_UDP_RMWUPE (1 << 4) /* Remote Wake Up Enable */
30
31#define AT91_UDP_FADDR 0x08 /* Function Address Register */
32#define AT91_UDP_FADD (0x7f << 0) /* Function Address Value */
33#define AT91_UDP_FEN (1 << 8) /* Function Enable */
34
35#define AT91_UDP_IER 0x10 /* Interrupt Enable Register */
36#define AT91_UDP_IDR 0x14 /* Interrupt Disable Register */
37#define AT91_UDP_IMR 0x18 /* Interrupt Mask Register */
38
39#define AT91_UDP_ISR 0x1c /* Interrupt Status Register */
40#define AT91_UDP_EP(n) (1 << (n)) /* Endpoint Interrupt Status */
41#define AT91_UDP_RXSUSP (1 << 8) /* USB Suspend Interrupt Status */
42#define AT91_UDP_RXRSM (1 << 9) /* USB Resume Interrupt Status */
43#define AT91_UDP_EXTRSM (1 << 10) /* External Resume Interrupt Status */
44#define AT91_UDP_SOFINT (1 << 11) /* Start of Frame Interrupt Status */
45#define AT91_UDP_ENDBUSRES (1 << 12) /* End of Bus Reset Interrpt Status */
46#define AT91_UDP_WAKEUP (1 << 13) /* USB Wakeup Interrupt Status */
47
48#define AT91_UDP_ICR 0x20 /* Interrupt Clear Register */
49#define AT91_UDP_RST_EP 0x28 /* Reset Endpoint Register */
50
51#define AT91_UDP_CSR(n) (0x30 + ((n) * 4)) /* Endpoint Control/Status Registers 0-7 */
52#define AT91_UDP_TXCOMP (1 << 0) /* Generates IN packet with data previously written in DPR */
53#define AT91_UDP_RX_DATA_BK0 (1 << 1) /* Receive Data Bank 0 */
54#define AT91_UDP_RXSETUP (1 << 2) /* Send STALL to the host */
55#define AT91_UDP_STALLSENT (1 << 3) /* Stall Sent / Isochronous error (Isochronous endpoints) */
56#define AT91_UDP_TXPKTRDY (1 << 4) /* Transmit Packet Ready */
57#define AT91_UDP_FORCESTALL (1 << 5) /* Force Stall */
58#define AT91_UDP_RX_DATA_BK1 (1 << 6) /* Receive Data Bank 1 */
59#define AT91_UDP_DIR (1 << 7) /* Transfer Direction */
60#define AT91_UDP_EPTYPE (7 << 8) /* Endpoint Type */
61#define AT91_UDP_EPTYPE_CTRL (0 << 8)
62#define AT91_UDP_EPTYPE_ISO_OUT (1 << 8)
63#define AT91_UDP_EPTYPE_BULK_OUT (2 << 8)
64#define AT91_UDP_EPTYPE_INT_OUT (3 << 8)
65#define AT91_UDP_EPTYPE_ISO_IN (5 << 8)
66#define AT91_UDP_EPTYPE_BULK_IN (6 << 8)
67#define AT91_UDP_EPTYPE_INT_IN (7 << 8)
68#define AT91_UDP_DTGLE (1 << 11) /* Data Toggle */
69#define AT91_UDP_EPEDS (1 << 15) /* Endpoint Enable/Disable */
70#define AT91_UDP_RXBYTECNT (0x7ff << 16) /* Number of bytes in FIFO */
71
72#define AT91_UDP_FDR(n) (0x50 + ((n) * 4)) /* Endpoint FIFO Data Registers 0-7 */
73
74#define AT91_UDP_TXVC 0x74 /* Transceiver Control Register */
75#define AT91_UDP_TXVC_TXVDIS (1 << 8) /* Transceiver Disable */
76
77#endif
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h
index 4fdef13d01d4..1fdd70b23809 100644
--- a/include/asm-arm/arch-at91rm9200/board.h
+++ b/include/asm-arm/arch-at91rm9200/board.h
@@ -31,14 +31,9 @@
31#ifndef __ASM_ARCH_BOARD_H 31#ifndef __ASM_ARCH_BOARD_H
32#define __ASM_ARCH_BOARD_H 32#define __ASM_ARCH_BOARD_H
33 33
34 /* Clocks */
35extern unsigned long at91_master_clock;
36
37 /* Serial Port */
38extern int at91_serial_map[AT91_NR_UART];
39extern int at91_console_port;
40
41#include <linux/mtd/partitions.h> 34#include <linux/mtd/partitions.h>
35#include <linux/device.h>
36#include <linux/spi/spi.h>
42 37
43 /* USB Device */ 38 /* USB Device */
44struct at91_udc_data { 39struct at91_udc_data {
@@ -91,10 +86,25 @@ struct at91_nand_data {
91extern void __init at91_add_device_nand(struct at91_nand_data *data); 86extern void __init at91_add_device_nand(struct at91_nand_data *data);
92 87
93 /* I2C*/ 88 /* I2C*/
94void __init at91_add_device_i2c(void); 89extern void __init at91_add_device_i2c(void);
90
91 /* SPI */
92extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices);
95 93
96 /* RTC */ 94 /* Serial */
97void __init at91_add_device_rtc(void); 95struct at91_uart_config {
96 unsigned short console_tty; /* tty number of serial console */
97 unsigned short nr_tty; /* number of serial tty's */
98 short tty_map[]; /* map UART to tty number */
99};
100extern struct platform_device *at91_default_console_device;
101extern void __init at91_init_serial(struct at91_uart_config *config);
102
103struct at91_uart_data {
104 short use_dma_tx; /* use transmit DMA? */
105 short use_dma_rx; /* use receive DMA? */
106};
107extern void __init at91_add_device_serial(void);
98 108
99 /* LEDs */ 109 /* LEDs */
100extern u8 at91_leds_cpu; 110extern u8 at91_leds_cpu;
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h
index 6176ab2dc417..dbde1baaf251 100644
--- a/include/asm-arm/arch-at91rm9200/gpio.h
+++ b/include/asm-arm/arch-at91rm9200/gpio.h
@@ -13,6 +13,8 @@
13#ifndef __ASM_ARCH_AT91RM9200_GPIO_H 13#ifndef __ASM_ARCH_AT91RM9200_GPIO_H
14#define __ASM_ARCH_AT91RM9200_GPIO_H 14#define __ASM_ARCH_AT91RM9200_GPIO_H
15 15
16#include <asm/irq.h>
17
16#define PIN_BASE NR_AIC_IRQS 18#define PIN_BASE NR_AIC_IRQS
17 19
18#define PQFP_GPIO_BANKS 3 /* PQFP package has 3 banks */ 20#define PQFP_GPIO_BANKS 3 /* PQFP package has 3 banks */
@@ -188,6 +190,9 @@ extern int at91_set_multi_drive(unsigned pin, int is_on);
188/* callable at any time */ 190/* callable at any time */
189extern int at91_set_gpio_value(unsigned pin, int value); 191extern int at91_set_gpio_value(unsigned pin, int value);
190extern int at91_get_gpio_value(unsigned pin); 192extern int at91_get_gpio_value(unsigned pin);
193
194extern void at91_gpio_suspend(void);
195extern void at91_gpio_resume(void);
191#endif 196#endif
192 197
193#endif 198#endif
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h
index 59e6f44d3a0d..235d39d91107 100644
--- a/include/asm-arm/arch-at91rm9200/hardware.h
+++ b/include/asm-arm/arch-at91rm9200/hardware.h
@@ -50,9 +50,12 @@
50#define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91_BASE_TCB0) 50#define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91_BASE_TCB0)
51 51
52/* Internal SRAM */ 52/* Internal SRAM */
53#define AT91_BASE_SRAM 0x00200000 /* Internal SRAM base address */ 53#define AT91_SRAM_BASE 0x00200000 /* Internal SRAM base address */
54#define AT91_SRAM_SIZE 0x00004000 /* Internal SRAM SIZE (16Kb) */ 54#define AT91_SRAM_SIZE 0x00004000 /* Internal SRAM SIZE (16Kb) */
55 55
56 /* Internal SRAM is mapped below the IO devices */
57#define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_SIZE)
58
56/* Serial ports */ 59/* Serial ports */
57#define AT91_NR_UART 5 /* 4 USART3's and one DBGU port */ 60#define AT91_NR_UART 5 /* 4 USART3's and one DBGU port */
58 61
@@ -81,14 +84,14 @@ static inline unsigned int at91_sys_read(unsigned int reg_offset)
81{ 84{
82 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; 85 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
83 86
84 return readl(addr + reg_offset); 87 return __raw_readl(addr + reg_offset);
85} 88}
86 89
87static inline void at91_sys_write(unsigned int reg_offset, unsigned long value) 90static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
88{ 91{
89 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; 92 void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
90 93
91 writel(value, addr + reg_offset); 94 __raw_writel(value, addr + reg_offset);
92} 95}
93#endif 96#endif
94 97
diff --git a/include/asm-arm/arch-at91rm9200/io.h b/include/asm-arm/arch-at91rm9200/io.h
index 23e670d85c9d..88fd1bebcef3 100644
--- a/include/asm-arm/arch-at91rm9200/io.h
+++ b/include/asm-arm/arch-at91rm9200/io.h
@@ -21,7 +21,6 @@
21#ifndef __ASM_ARCH_IO_H 21#ifndef __ASM_ARCH_IO_H
22#define __ASM_ARCH_IO_H 22#define __ASM_ARCH_IO_H
23 23
24#include <asm/arch/at91rm9200.h>
25#include <asm/io.h> 24#include <asm/io.h>
26 25
27#define IO_SPACE_LIMIT 0xFFFFFFFF 26#define IO_SPACE_LIMIT 0xFFFFFFFF
diff --git a/include/asm-arm/arch-at91rm9200/irqs.h b/include/asm-arm/arch-at91rm9200/irqs.h
index 27b0497f1b36..2dc93b174a8f 100644
--- a/include/asm-arm/arch-at91rm9200/irqs.h
+++ b/include/asm-arm/arch-at91rm9200/irqs.h
@@ -37,8 +37,6 @@
37 * symbols in gpio.h for ones handled indirectly as GPIOs. 37 * symbols in gpio.h for ones handled indirectly as GPIOs.
38 * We make provision for 4 banks of GPIO. 38 * We make provision for 4 banks of GPIO.
39 */ 39 */
40#include <asm/arch/gpio.h>
41
42#define NR_IRQS (NR_AIC_IRQS + (4 * 32)) 40#define NR_IRQS (NR_AIC_IRQS + (4 * 32))
43 41
44 42
diff --git a/include/asm-arm/arch-at91rm9200/memory.h b/include/asm-arm/arch-at91rm9200/memory.h
index 462f1f0ad67c..3c327c404373 100644
--- a/include/asm-arm/arch-at91rm9200/memory.h
+++ b/include/asm-arm/arch-at91rm9200/memory.h
@@ -21,7 +21,7 @@
21#ifndef __ASM_ARCH_MEMORY_H 21#ifndef __ASM_ARCH_MEMORY_H
22#define __ASM_ARCH_MEMORY_H 22#define __ASM_ARCH_MEMORY_H
23 23
24#include <asm/arch/hardware.h> 24#include <asm/hardware.h>
25 25
26#define PHYS_OFFSET (AT91_SDRAM_BASE) 26#define PHYS_OFFSET (AT91_SDRAM_BASE)
27 27
diff --git a/include/asm-arm/arch-at91rm9200/pio.h b/include/asm-arm/arch-at91rm9200/pio.h
deleted file mode 100644
index a89501b4a703..000000000000
--- a/include/asm-arm/arch-at91rm9200/pio.h
+++ /dev/null
@@ -1,115 +0,0 @@
1/*
2 * include/asm-arm/arch-at91rm9200/pio.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 */
12
13#ifndef __ASM_ARCH_PIO_H
14#define __ASM_ARCH_PIO_H
15
16#include <asm/arch/hardware.h>
17
18static inline void AT91_CfgPIO_USART0(void) {
19 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA17_TXD0 | AT91_PA18_RXD0 | AT91_PA20_CTS0);
20
21 /*
22 * Errata #39 - RTS0 is not internally connected to PA21. We need to drive
23 * the pin manually. Default is off (RTS is active low).
24 */
25 at91_sys_write(AT91_PIOA + PIO_PER, AT91_PA21_RTS0);
26 at91_sys_write(AT91_PIOA + PIO_OER, AT91_PA21_RTS0);
27 at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0);
28}
29
30static inline void AT91_CfgPIO_USART1(void) {
31 at91_sys_write(AT91_PIOB + PIO_PDR, AT91_PB18_RI1 | AT91_PB19_DTR1
32 | AT91_PB20_TXD1 | AT91_PB21_RXD1 | AT91_PB23_DCD1
33 | AT91_PB24_CTS1 | AT91_PB25_DSR1 | AT91_PB26_RTS1);
34}
35
36static inline void AT91_CfgPIO_USART2(void) {
37 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA22_RXD2 | AT91_PA23_TXD2);
38}
39
40static inline void AT91_CfgPIO_USART3(void) {
41 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_TXD3 | AT91_PA6_RXD3);
42 at91_sys_write(AT91_PIOA + PIO_BSR, AT91_PA5_TXD3 | AT91_PA6_RXD3);
43}
44
45static inline void AT91_CfgPIO_DBGU(void) {
46 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA31_DTXD | AT91_PA30_DRXD);
47}
48
49/*
50 * Enable the Two-Wire interface.
51 */
52static inline void AT91_CfgPIO_TWI(void) {
53 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA25_TWD | AT91_PA26_TWCK);
54 at91_sys_write(AT91_PIOA + PIO_ASR, AT91_PA25_TWD | AT91_PA26_TWCK);
55 at91_sys_write(AT91_PIOA + PIO_MDER, AT91_PA25_TWD | AT91_PA26_TWCK); /* open drain */
56}
57
58/*
59 * Enable the Serial Peripheral Interface.
60 */
61static inline void AT91_CfgPIO_SPI(void) {
62 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA0_MISO | AT91_PA1_MOSI | AT91_PA2_SPCK);
63}
64
65static inline void AT91_CfgPIO_SPI_CS0(void) {
66 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA3_NPCS0);
67}
68
69static inline void AT91_CfgPIO_SPI_CS1(void) {
70 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA4_NPCS1);
71}
72
73static inline void AT91_CfgPIO_SPI_CS2(void) {
74 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_NPCS2);
75}
76
77static inline void AT91_CfgPIO_SPI_CS3(void) {
78 at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA6_NPCS3);
79}
80
81/*
82 * Select the DataFlash card.
83 */
84static inline void AT91_CfgPIO_DataFlashCard(void) {
85 at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(7));
86 at91_sys_write(AT91_PIOB + PIO_OER, AT91_PIO_P(7));
87 at91_sys_write(AT91_PIOB + PIO_CODR, AT91_PIO_P(7));
88}
89
90/*
91 * Enable NAND Flash (SmartMedia) interface.
92 */
93static inline void AT91_CfgPIO_SmartMedia(void) {
94 /* enable PC0=SMCE, PC1=SMOE, PC3=SMWE, A21=CLE, A22=ALE */
95 at91_sys_write(AT91_PIOC + PIO_ASR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE);
96 at91_sys_write(AT91_PIOC + PIO_PDR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE);
97
98 /* Configure PC2 as input (signal READY of the SmartMedia) */
99 at91_sys_write(AT91_PIOC + PIO_PER, AT91_PC2_BFAVD); /* enable direct output enable */
100 at91_sys_write(AT91_PIOC + PIO_ODR, AT91_PC2_BFAVD); /* disable output */
101
102 /* Configure PB1 as input (signal Card Detect of the SmartMedia) */
103 at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(1)); /* enable direct output enable */
104 at91_sys_write(AT91_PIOB + PIO_ODR, AT91_PIO_P(1)); /* disable output */
105}
106
107static inline int AT91_PIO_SmartMedia_RDY(void) {
108 return (at91_sys_read(AT91_PIOC + PIO_PDSR) & AT91_PIO_P(2)) ? 1 : 0;
109}
110
111static inline int AT91_PIO_SmartMedia_CardDetect(void) {
112 return (at91_sys_read(AT91_PIOB + PIO_PDSR) & AT91_PIO_P(1)) ? 1 : 0;
113}
114
115#endif
diff --git a/include/asm-arm/arch-at91rm9200/system.h b/include/asm-arm/arch-at91rm9200/system.h
index 29c42655f05c..8a2ff472e4cf 100644
--- a/include/asm-arm/arch-at91rm9200/system.h
+++ b/include/asm-arm/arch-at91rm9200/system.h
@@ -21,7 +21,7 @@
21#ifndef __ASM_ARCH_SYSTEM_H 21#ifndef __ASM_ARCH_SYSTEM_H
22#define __ASM_ARCH_SYSTEM_H 22#define __ASM_ARCH_SYSTEM_H
23 23
24#include <asm/arch/hardware.h> 24#include <asm/hardware.h>
25 25
26static inline void arch_idle(void) 26static inline void arch_idle(void)
27{ 27{
@@ -48,4 +48,12 @@ static inline void arch_reset(char mode)
48 at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); 48 at91_sys_write(AT91_ST_CR, AT91_ST_WDRST);
49} 49}
50 50
51#define ARCH_ID_AT91RM9200 0x09200080
52#define ARCH_ID_AT91SAM9261 0x019000a0
53
54static inline unsigned long arch_identify(void)
55{
56 return at91_sys_read(AT91_DBGU_CIDR) & (AT91_CIDR_EPROC | AT91_CIDR_ARCH);
57}
58
51#endif 59#endif
diff --git a/include/asm-arm/arch-at91rm9200/timex.h b/include/asm-arm/arch-at91rm9200/timex.h
index 3f112dd12587..88687cefe6eb 100644
--- a/include/asm-arm/arch-at91rm9200/timex.h
+++ b/include/asm-arm/arch-at91rm9200/timex.h
@@ -21,7 +21,7 @@
21#ifndef __ASM_ARCH_TIMEX_H 21#ifndef __ASM_ARCH_TIMEX_H
22#define __ASM_ARCH_TIMEX_H 22#define __ASM_ARCH_TIMEX_H
23 23
24#include <asm/arch/hardware.h> 24#include <asm/hardware.h>
25 25
26#define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) 26#define CLOCK_TICK_RATE (AT91_SLOW_CLOCK)
27 27
diff --git a/include/asm-arm/arch-at91rm9200/uncompress.h b/include/asm-arm/arch-at91rm9200/uncompress.h
index 7b38497c24b5..ec7811ab0a52 100644
--- a/include/asm-arm/arch-at91rm9200/uncompress.h
+++ b/include/asm-arm/arch-at91rm9200/uncompress.h
@@ -21,7 +21,7 @@
21#ifndef __ASM_ARCH_UNCOMPRESS_H 21#ifndef __ASM_ARCH_UNCOMPRESS_H
22#define __ASM_ARCH_UNCOMPRESS_H 22#define __ASM_ARCH_UNCOMPRESS_H
23 23
24#include <asm/arch/hardware.h> 24#include <asm/hardware.h>
25 25
26/* 26/*
27 * The following code assumes the serial port has already been 27 * The following code assumes the serial port has already been
diff --git a/include/asm-arm/arch-at91rm9200/vmalloc.h b/include/asm-arm/arch-at91rm9200/vmalloc.h
index 34d9718feb90..4c367eb57f47 100644
--- a/include/asm-arm/arch-at91rm9200/vmalloc.h
+++ b/include/asm-arm/arch-at91rm9200/vmalloc.h
@@ -21,6 +21,6 @@
21#ifndef __ASM_ARCH_VMALLOC_H 21#ifndef __ASM_ARCH_VMALLOC_H
22#define __ASM_ARCH_VMALLOC_H 22#define __ASM_ARCH_VMALLOC_H
23 23
24#define VMALLOC_END (AT91_IO_VIRT_BASE & PGDIR_MASK) 24#define VMALLOC_END (AT91_SRAM_VIRT_BASE & PGDIR_MASK)
25 25
26#endif 26#endif
diff --git a/include/asm-arm/arch-ixp23xx/entry-macro.S b/include/asm-arm/arch-ixp23xx/entry-macro.S
index 0ef4e6016ac4..867761677b57 100644
--- a/include/asm-arm/arch-ixp23xx/entry-macro.S
+++ b/include/asm-arm/arch-ixp23xx/entry-macro.S
@@ -8,7 +8,7 @@
8 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp 8 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
9 ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) 9 ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET)
10 ldr \irqnr, [\irqnr] @ get interrupt number 10 ldr \irqnr, [\irqnr] @ get interrupt number
11 cmp \irqnr, #0x0 @ suprious interrupt ? 11 cmp \irqnr, #0x0 @ spurious interrupt ?
12 movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits 12 movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits
13 subne \irqnr, \irqnr, #1 @ convert to 0 based 13 subne \irqnr, \irqnr, #1 @ convert to 0 based
14 14
diff --git a/include/asm-arm/arch-ixp23xx/ixp23xx.h b/include/asm-arm/arch-ixp23xx/ixp23xx.h
index e49e1ca61b1a..01efdbd1180f 100644
--- a/include/asm-arm/arch-ixp23xx/ixp23xx.h
+++ b/include/asm-arm/arch-ixp23xx/ixp23xx.h
@@ -251,7 +251,7 @@
251 * CAP CSRs. 251 * CAP CSRs.
252 ****************************************************************************/ 252 ****************************************************************************/
253#define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x))) 253#define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x)))
254#define IXP23XX_PROD_IDG IXP23XX_GLOBAL_REG(0x00) 254#define IXP23XX_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00)
255#define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04) 255#define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04)
256#define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08) 256#define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08)
257#define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c) 257#define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c)
diff --git a/include/asm-arm/arch-netx/debug-macro.S b/include/asm-arm/arch-netx/debug-macro.S
new file mode 100644
index 000000000000..a940d0e80cb2
--- /dev/null
+++ b/include/asm-arm/arch-netx/debug-macro.S
@@ -0,0 +1,38 @@
1/* linux/include/asm-arm/arch-netx/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#include "hardware.h"
15
16 .macro addruart,rx
17 mrc p15, 0, \rx, c1, c0
18 tst \rx, #1 @ MMU enabled?
19 moveq \rx, #0x00100000 @ physical
20 movne \rx, #io_p2v(0x00100000) @ virtual
21 orr \rx, \rx, #0x00000a00
22 .endm
23
24 .macro senduart,rd,rx
25 str \rd, [\rx, #0]
26 .endm
27
28 .macro busyuart,rd,rx
291002: ldr \rd, [\rx, #0x18]
30 tst \rd, #(1 << 3)
31 bne 1002b
32 .endm
33
34 .macro waituart,rd,rx
351001: ldr \rd, [\rx, #0x18]
36 tst \rd, #(1 << 3)
37 bne 1001b
38 .endm
diff --git a/include/asm-arm/arch-netx/dma.h b/include/asm-arm/arch-netx/dma.h
new file mode 100644
index 000000000000..4eda5feed81c
--- /dev/null
+++ b/include/asm-arm/arch-netx/dma.h
@@ -0,0 +1,21 @@
1/*
2 * linux/include/asm-arm/arch-netx/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/include/asm-arm/arch-netx/entry-macro.S b/include/asm-arm/arch-netx/entry-macro.S
new file mode 100644
index 000000000000..658df4d60ff3
--- /dev/null
+++ b/include/asm-arm/arch-netx/entry-macro.S
@@ -0,0 +1,35 @@
1/*
2 * include/asm-arm/arch-netx/entry-macro.S
3 *
4 * Low-level IRQ helper macros for Hilscher netX based platforms
5 *
6 * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
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
10 * as published by the Free Software Foundation.
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#include <asm/hardware.h>
22
23 .macro disable_fiq
24 .endm
25
26 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
27 mov \base, #io_p2v(0x00100000)
28 add \base, \base, #0x000ff000
29
30 ldr \irqstat, [\base, #0]
31 clz \irqnr, \irqstat
32 rsb \irqnr, \irqnr, #31
33 cmp \irqstat, #0
34 .endm
35
diff --git a/include/asm-arm/arch-netx/hardware.h b/include/asm-arm/arch-netx/hardware.h
new file mode 100644
index 000000000000..7786c45455cd
--- /dev/null
+++ b/include/asm-arm/arch-netx/hardware.h
@@ -0,0 +1,39 @@
1/*
2 * include/asm-arm/arch-netx/hardware.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#ifndef __ASM_ARCH_HARDWARE_H
20#define __ASM_ARCH_HARDWARE_H
21
22#define NETX_IO_PHYS 0x00100000
23#define NETX_IO_VIRT 0xe0000000
24#define NETX_IO_SIZE 0x00100000
25
26#define SRAM_INTERNAL_PHYS_0 0x00000
27#define SRAM_INTERNAL_PHYS_1 0x08000
28#define SRAM_INTERNAL_PHYS_2 0x10000
29#define SRAM_INTERNAL_PHYS_3 0x18000
30#define SRAM_INTERNAL_PHYS(no) ((no) * 0x8000)
31
32#define XPEC_MEM_SIZE 0x4000
33#define XMAC_MEM_SIZE 0x1000
34#define SRAM_MEM_SIZE 0x8000
35
36#define io_p2v(x) ((x) - NETX_IO_PHYS + NETX_IO_VIRT)
37#define io_v2p(x) ((x) - NETX_IO_VIRT + NETX_IO_PHYS)
38
39#endif
diff --git a/include/asm-arm/arch-netx/io.h b/include/asm-arm/arch-netx/io.h
new file mode 100644
index 000000000000..81b7bc47747e
--- /dev/null
+++ b/include/asm-arm/arch-netx/io.h
@@ -0,0 +1,29 @@
1/*
2 * linux/include/asm-arm/arch-netx/io.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#ifndef __ASM_ARM_ARCH_IO_H
21#define __ASM_ARM_ARCH_IO_H
22
23#define IO_SPACE_LIMIT 0xffffffff
24
25#define __io(a) ((void __iomem *)(a))
26#define __mem_pci(a) (a)
27#define __mem_isa(a) (a)
28
29#endif
diff --git a/include/asm-arm/arch-netx/irqs.h b/include/asm-arm/arch-netx/irqs.h
new file mode 100644
index 000000000000..a487dc6e2661
--- /dev/null
+++ b/include/asm-arm/arch-netx/irqs.h
@@ -0,0 +1,70 @@
1/*
2 * include/asm-arm/arch-netx/irqs.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 NETX_IRQ_VIC_START 0
21#define NETX_IRQ_SOFTINT 0
22#define NETX_IRQ_TIMER0 1
23#define NETX_IRQ_TIMER1 2
24#define NETX_IRQ_TIMER2 3
25#define NETX_IRQ_SYSTIME_NS 4
26#define NETX_IRQ_SYSTIME_S 5
27#define NETX_IRQ_GPIO_15 6
28#define NETX_IRQ_WATCHDOG 7
29#define NETX_IRQ_UART0 8
30#define NETX_IRQ_UART1 9
31#define NETX_IRQ_UART2 10
32#define NETX_IRQ_USB 11
33#define NETX_IRQ_SPI 12
34#define NETX_IRQ_I2C 13
35#define NETX_IRQ_LCD 14
36#define NETX_IRQ_HIF 15
37#define NETX_IRQ_GPIO_0_14 16
38#define NETX_IRQ_XPEC0 17
39#define NETX_IRQ_XPEC1 18
40#define NETX_IRQ_XPEC2 19
41#define NETX_IRQ_XPEC3 20
42#define NETX_IRQ_XPEC(no) (17 + (no))
43#define NETX_IRQ_MSYNC0 21
44#define NETX_IRQ_MSYNC1 22
45#define NETX_IRQ_MSYNC2 23
46#define NETX_IRQ_MSYNC3 24
47#define NETX_IRQ_IRQ_PHY 25
48#define NETX_IRQ_ISO_AREA 26
49/* int 27 is reserved */
50/* int 28 is reserved */
51#define NETX_IRQ_TIMER3 29
52#define NETX_IRQ_TIMER4 30
53/* int 31 is reserved */
54
55#define NETX_IRQS 32
56
57/* for multiplexed irqs on gpio 0..14 */
58#define NETX_IRQ_GPIO(x) (NETX_IRQS + (x))
59#define NETX_IRQ_GPIO_LAST NETX_IRQ_GPIO(14)
60
61/* Host interface interrupts */
62#define NETX_IRQ_HIF_CHAINED(x) (NETX_IRQ_GPIO_LAST + 1 + (x))
63#define NETX_IRQ_HIF_PIO35 NETX_IRQ_HIF_CHAINED(0)
64#define NETX_IRQ_HIF_PIO36 NETX_IRQ_HIF_CHAINED(1)
65#define NETX_IRQ_HIF_PIO40 NETX_IRQ_HIF_CHAINED(2)
66#define NETX_IRQ_HIF_PIO47 NETX_IRQ_HIF_CHAINED(3)
67#define NETX_IRQ_HIF_PIO72 NETX_IRQ_HIF_CHAINED(4)
68#define NETX_IRQ_HIF_LAST NETX_IRQ_HIF_CHAINED(4)
69
70#define NR_IRQS (NETX_IRQ_HIF_LAST + 1)
diff --git a/include/asm-arm/arch-netx/memory.h b/include/asm-arm/arch-netx/memory.h
new file mode 100644
index 000000000000..6d8d2df3e99d
--- /dev/null
+++ b/include/asm-arm/arch-netx/memory.h
@@ -0,0 +1,36 @@
1/*
2 * linux/include/asm-arm/arch-netx/memory.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#ifndef __ASM_ARCH_MEMORY_H
21#define __ASM_ARCH_MEMORY_H
22
23#define PHYS_OFFSET UL(0x80000000)
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
36
diff --git a/include/asm-arm/arch-netx/netx-regs.h b/include/asm-arm/arch-netx/netx-regs.h
new file mode 100644
index 000000000000..8ab45bea83ca
--- /dev/null
+++ b/include/asm-arm/arch-netx/netx-regs.h
@@ -0,0 +1,410 @@
1/*
2 * include/asm-arm/arch-netx/netx-regs.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#ifndef __ASM_ARCH_NETX_REGS_H
21#define __ASM_ARCH_NETX_REGS_H
22
23/* offsets relative to the beginning of the io space */
24#define NETX_OFS_SYSTEM 0x00000
25#define NETX_OFS_MEMCR 0x00100
26#define NETX_OFS_DPMAS 0x03000
27#define NETX_OFS_GPIO 0x00800
28#define NETX_OFS_PIO 0x00900
29#define NETX_OFS_UART0 0x00a00
30#define NETX_OFS_UART1 0x00a40
31#define NETX_OFS_UART2 0x00a80
32#define NETX_OF_MIIMU 0x00b00
33#define NETX_OFS_SPI 0x00c00
34#define NETX_OFS_I2C 0x00d00
35#define NETX_OFS_SYSTIME 0x01100
36#define NETX_OFS_RTC 0x01200
37#define NETX_OFS_EXTBUS 0x03600
38#define NETX_OFS_LCD 0x04000
39#define NETX_OFS_USB 0x20000
40#define NETX_OFS_XMAC0 0x60000
41#define NETX_OFS_XMAC1 0x61000
42#define NETX_OFS_XMAC2 0x62000
43#define NETX_OFS_XMAC3 0x63000
44#define NETX_OFS_XMAC(no) (0x60000 + (no) * 0x1000)
45#define NETX_OFS_PFIFO 0x64000
46#define NETX_OFS_XPEC0 0x70000
47#define NETX_OFS_XPEC1 0x74000
48#define NETX_OFS_XPEC2 0x78000
49#define NETX_OFS_XPEC3 0x7c000
50#define NETX_OFS_XPEC(no) (0x70000 + (no) * 0x4000)
51#define NETX_OFS_VIC 0xff000
52
53/* physical addresses */
54#define NETX_PA_SYSTEM (NETX_IO_PHYS + NETX_OFS_SYSTEM)
55#define NETX_PA_MEMCR (NETX_IO_PHYS + NETX_OFS_MEMCR)
56#define NETX_PA_DPMAS (NETX_IO_PHYS + NETX_OFS_DPMAS)
57#define NETX_PA_GPIO (NETX_IO_PHYS + NETX_OFS_GPIO)
58#define NETX_PA_PIO (NETX_IO_PHYS + NETX_OFS_PIO)
59#define NETX_PA_UART0 (NETX_IO_PHYS + NETX_OFS_UART0)
60#define NETX_PA_UART1 (NETX_IO_PHYS + NETX_OFS_UART1)
61#define NETX_PA_UART2 (NETX_IO_PHYS + NETX_OFS_UART2)
62#define NETX_PA_MIIMU (NETX_IO_PHYS + NETX_OF_MIIMU)
63#define NETX_PA_SPI (NETX_IO_PHYS + NETX_OFS_SPI)
64#define NETX_PA_I2C (NETX_IO_PHYS + NETX_OFS_I2C)
65#define NETX_PA_SYSTIME (NETX_IO_PHYS + NETX_OFS_SYSTIME)
66#define NETX_PA_RTC (NETX_IO_PHYS + NETX_OFS_RTC)
67#define NETX_PA_EXTBUS (NETX_IO_PHYS + NETX_OFS_EXTBUS)
68#define NETX_PA_LCD (NETX_IO_PHYS + NETX_OFS_LCD)
69#define NETX_PA_USB (NETX_IO_PHYS + NETX_OFS_USB)
70#define NETX_PA_XMAC0 (NETX_IO_PHYS + NETX_OFS_XMAC0)
71#define NETX_PA_XMAC1 (NETX_IO_PHYS + NETX_OFS_XMAC1)
72#define NETX_PA_XMAC2 (NETX_IO_PHYS + NETX_OFS_XMAC2)
73#define NETX_PA_XMAC3 (NETX_IO_PHYS + NETX_OFS_XMAC3)
74#define NETX_PA_XMAC(no) (NETX_IO_PHYS + NETX_OFS_XMAC(no))
75#define NETX_PA_PFIFO (NETX_IO_PHYS + NETX_OFS_PFIFO)
76#define NETX_PA_XPEC0 (NETX_IO_PHYS + NETX_OFS_XPEC0)
77#define NETX_PA_XPEC1 (NETX_IO_PHYS + NETX_OFS_XPEC1)
78#define NETX_PA_XPEC2 (NETX_IO_PHYS + NETX_OFS_XPEC2)
79#define NETX_PA_XPEC3 (NETX_IO_PHYS + NETX_OFS_XPEC3)
80#define NETX_PA_XPEC(no) (NETX_IO_PHYS + NETX_OFS_XPEC(no))
81#define NETX_PA_VIC (NETX_IO_PHYS + NETX_OFS_VIC)
82
83/* virual addresses */
84#define NETX_VA_SYSTEM (NETX_IO_VIRT + NETX_OFS_SYSTEM)
85#define NETX_VA_MEMCR (NETX_IO_VIRT + NETX_OFS_MEMCR)
86#define NETX_VA_DPMAS (NETX_IO_VIRT + NETX_OFS_DPMAS)
87#define NETX_VA_GPIO (NETX_IO_VIRT + NETX_OFS_GPIO)
88#define NETX_VA_PIO (NETX_IO_VIRT + NETX_OFS_PIO)
89#define NETX_VA_UART0 (NETX_IO_VIRT + NETX_OFS_UART0)
90#define NETX_VA_UART1 (NETX_IO_VIRT + NETX_OFS_UART1)
91#define NETX_VA_UART2 (NETX_IO_VIRT + NETX_OFS_UART2)
92#define NETX_VA_MIIMU (NETX_IO_VIRT + NETX_OF_MIIMU)
93#define NETX_VA_SPI (NETX_IO_VIRT + NETX_OFS_SPI)
94#define NETX_VA_I2C (NETX_IO_VIRT + NETX_OFS_I2C)
95#define NETX_VA_SYSTIME (NETX_IO_VIRT + NETX_OFS_SYSTIME)
96#define NETX_VA_RTC (NETX_IO_VIRT + NETX_OFS_RTC)
97#define NETX_VA_EXTBUS (NETX_IO_VIRT + NETX_OFS_EXTBUS)
98#define NETX_VA_LCD (NETX_IO_VIRT + NETX_OFS_LCD)
99#define NETX_VA_USB (NETX_IO_VIRT + NETX_OFS_USB)
100#define NETX_VA_XMAC0 (NETX_IO_VIRT + NETX_OFS_XMAC0)
101#define NETX_VA_XMAC1 (NETX_IO_VIRT + NETX_OFS_XMAC1)
102#define NETX_VA_XMAC2 (NETX_IO_VIRT + NETX_OFS_XMAC2)
103#define NETX_VA_XMAC3 (NETX_IO_VIRT + NETX_OFS_XMAC3)
104#define NETX_VA_XMAC(no) (NETX_IO_VIRT + NETX_OFS_XMAC(no))
105#define NETX_VA_PFIFO (NETX_IO_VIRT + NETX_OFS_PFIFO)
106#define NETX_VA_XPEC0 (NETX_IO_VIRT + NETX_OFS_XPEC0)
107#define NETX_VA_XPEC1 (NETX_IO_VIRT + NETX_OFS_XPEC1)
108#define NETX_VA_XPEC2 (NETX_IO_VIRT + NETX_OFS_XPEC2)
109#define NETX_VA_XPEC3 (NETX_IO_VIRT + NETX_OFS_XPEC3)
110#define NETX_VA_XPEC(no) (NETX_IO_VIRT + NETX_OFS_XPEC(no))
111#define NETX_VA_VIC (NETX_IO_VIRT + NETX_OFS_VIC)
112
113/*********************************
114 * System functions *
115 *********************************/
116
117/* Registers */
118#define NETX_SYSTEM_REG(ofs) __io(NETX_VA_SYSTEM + (ofs))
119#define NETX_SYSTEM_BOO_SR NETX_SYSTEM_REG(0x00)
120#define NETX_SYSTEM_IOC_CR NETX_SYSTEM_REG(0x04)
121#define NETX_SYSTEM_IOC_MR NETX_SYSTEM_REG(0x08)
122
123/* FIXME: Docs are not consistent */
124#define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x08)
125/* #define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x0c) */
126
127#define NETX_SYSTEM_PHY_CONTROL NETX_SYSTEM_REG(0x10)
128#define NETX_SYSTEM_REV NETX_SYSTEM_REG(0x34)
129#define NETX_SYSTEM_IOC_ACCESS_KEY NETX_SYSTEM_REG(0x70)
130#define NETX_SYSTEM_WDG_TR NETX_SYSTEM_REG(0x200)
131#define NETX_SYSTEM_WDG_CTR NETX_SYSTEM_REG(0x204)
132#define NETX_SYSTEM_WDG_IRQ_TIMEOUT NETX_SYSTEM_REG(0x208)
133#define NETX_SYSTEM_WDG_RES_TIMEOUT NETX_SYSTEM_REG(0x20c)
134
135/* Bits */
136#define NETX_SYSTEM_RES_CR_RSTIN (1<<0)
137#define NETX_SYSTEM_RES_CR_WDG_RES (1<<1)
138#define NETX_SYSTEM_RES_CR_HOST_RES (1<<2)
139#define NETX_SYSTEM_RES_CR_FIRMW_RES (1<<3)
140#define NETX_SYSTEM_RES_CR_XPEC0_RES (1<<4)
141#define NETX_SYSTEM_RES_CR_XPEC1_RES (1<<5)
142#define NETX_SYSTEM_RES_CR_XPEC2_RES (1<<6)
143#define NETX_SYSTEM_RES_CR_XPEC3_RES (1<<7)
144#define NETX_SYSTEM_RES_CR_DIS_XPEC0_RES (1<<16)
145#define NETX_SYSTEM_RES_CR_DIS_XPEC1_RES (1<<17)
146#define NETX_SYSTEM_RES_CR_DIS_XPEC2_RES (1<<18)
147#define NETX_SYSTEM_RES_CR_DIS_XPEC3_RES (1<<19)
148#define NETX_SYSTEM_RES_CR_FIRMW_FLG0 (1<<20)
149#define NETX_SYSTEM_RES_CR_FIRMW_FLG1 (1<<21)
150#define NETX_SYSTEM_RES_CR_FIRMW_FLG2 (1<<22)
151#define NETX_SYSTEM_RES_CR_FIRMW_FLG3 (1<<23)
152#define NETX_SYSTEM_RES_CR_FIRMW_RES_EN (1<<24)
153#define NETX_SYSTEM_RES_CR_RSTOUT (1<<25)
154#define NETX_SYSTEM_RES_CR_EN_RSTOUT (1<<26)
155
156#define PHY_CONTROL_RESET (1<<31)
157#define PHY_CONTROL_SIM_BYP (1<<30)
158#define PHY_CONTROL_CLK_XLATIN (1<<29)
159#define PHY_CONTROL_PHY1_EN (1<<21)
160#define PHY_CONTROL_PHY1_NP_MSG_CODE
161#define PHY_CONTROL_PHY1_AUTOMDIX (1<<17)
162#define PHY_CONTROL_PHY1_FIXMODE (1<<16)
163#define PHY_CONTROL_PHY1_MODE(mode) (((mode) & 0x7) << 13)
164#define PHY_CONTROL_PHY0_EN (1<<12)
165#define PHY_CONTROL_PHY0_NP_MSG_CODE
166#define PHY_CONTROL_PHY0_AUTOMDIX (1<<8)
167#define PHY_CONTROL_PHY0_FIXMODE (1<<7)
168#define PHY_CONTROL_PHY0_MODE(mode) (((mode) & 0x7) << 4)
169#define PHY_CONTROL_PHY_ADDRESS(adr) ((adr) & 0xf)
170
171#define PHY_MODE_10BASE_T_HALF 0
172#define PHY_MODE_10BASE_T_FULL 1
173#define PHY_MODE_100BASE_TX_FX_FULL 2
174#define PHY_MODE_100BASE_TX_FX_HALF 3
175#define PHY_MODE_100BASE_TX_HALF 4
176#define PHY_MODE_REPEATER 5
177#define PHY_MODE_POWER_DOWN 6
178#define PHY_MODE_ALL 7
179
180/* Bits */
181#define VECT_CNTL_ENABLE (1 << 5)
182
183/*******************************
184 * GPIO and timer module *
185 *******************************/
186
187/* Registers */
188#define NETX_GPIO_REG(ofs) __io(NETX_VA_GPIO + (ofs))
189#define NETX_GPIO_CFG(gpio) NETX_GPIO_REG(0x0 + ((gpio)<<2))
190#define NETX_GPIO_THRESHOLD_CAPTURE(gpio) NETX_GPIO_REG(0x40 + ((gpio)<<2))
191#define NETX_GPIO_COUNTER_CTRL(counter) NETX_GPIO_REG(0x80 + ((counter)<<2))
192#define NETX_GPIO_COUNTER_MAX(counter) NETX_GPIO_REG(0x94 + ((counter)<<2))
193#define NETX_GPIO_COUNTER_CURRENT(counter) NETX_GPIO_REG(0xa8 + ((counter)<<2))
194#define NETX_GPIO_IRQ_ENABLE NETX_GPIO_REG(0xbc)
195#define NETX_GPIO_IRQ_DISABLE NETX_GPIO_REG(0xc0)
196#define NETX_GPIO_SYSTIME_NS_CMP NETX_GPIO_REG(0xc4)
197#define NETX_GPIO_LINE NETX_GPIO_REG(0xc8)
198#define NETX_GPIO_IRQ NETX_GPIO_REG(0xd0)
199
200/* Bits */
201#define NETX_GPIO_CFG_IOCFG_GP_INPUT (0x0)
202#define NETX_GPIO_CFG_IOCFG_GP_OUTPUT (0x1)
203#define NETX_GPIO_CFG_IOCFG_GP_UART (0x2)
204#define NETX_GPIO_CFG_INV (1<<2)
205#define NETX_GPIO_CFG_MODE_INPUT_READ (0<<3)
206#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_CONT_RISING (1<<3)
207#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_ONCE_RISING (2<<3)
208#define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_HIGH_LEVEL (3<<3)
209#define NETX_GPIO_CFG_COUNT_REF_COUNTER0 (0<<5)
210#define NETX_GPIO_CFG_COUNT_REF_COUNTER1 (1<<5)
211#define NETX_GPIO_CFG_COUNT_REF_COUNTER2 (2<<5)
212#define NETX_GPIO_CFG_COUNT_REF_COUNTER3 (3<<5)
213#define NETX_GPIO_CFG_COUNT_REF_COUNTER4 (4<<5)
214#define NETX_GPIO_CFG_COUNT_REF_SYSTIME (7<<5)
215
216#define NETX_GPIO_COUNTER_CTRL_RUN (1<<0)
217#define NETX_GPIO_COUNTER_CTRL_SYM (1<<1)
218#define NETX_GPIO_COUNTER_CTRL_ONCE (1<<2)
219#define NETX_GPIO_COUNTER_CTRL_IRQ_EN (1<<3)
220#define NETX_GPIO_COUNTER_CTRL_CNT_EVENT (1<<4)
221#define NETX_GPIO_COUNTER_CTRL_RST_EN (1<<5)
222#define NETX_GPIO_COUNTER_CTRL_SEL_EVENT (1<<6)
223#define NETX_GPIO_COUNTER_CTRL_GPIO_REF /* FIXME */
224
225#define GPIO_BIT(gpio) (1<<(gpio))
226#define COUNTER_BIT(counter) ((1<<16)<<(counter))
227
228/*******************************
229 * PIO *
230 *******************************/
231
232/* Registers */
233#define NETX_PIO_REG(ofs) __io(NETX_VA_PIO + (ofs))
234#define NETX_PIO_INPIO NETX_PIO_REG(0x0)
235#define NETX_PIO_OUTPIO NETX_PIO_REG(0x4)
236#define NETX_PIO_OEPIO NETX_PIO_REG(0x8)
237
238/*******************************
239 * MII Unit *
240 *******************************/
241
242/* Registers */
243#define NETX_MIIMU __io(NETX_VA_MIIMU)
244
245/* Bits */
246#define MIIMU_SNRDY (1<<0)
247#define MIIMU_PREAMBLE (1<<1)
248#define MIIMU_OPMODE_WRITE (1<<2)
249#define MIIMU_MDC_PERIOD (1<<3)
250#define MIIMU_PHY_NRES (1<<4)
251#define MIIMU_RTA (1<<5)
252#define MIIMU_REGADDR(adr) (((adr) & 0x1f) << 6)
253#define MIIMU_PHYADDR(adr) (((adr) & 0x1f) << 11)
254#define MIIMU_DATA(data) (((data) & 0xffff) << 16)
255
256/*******************************
257 * xmac / xpec *
258 *******************************/
259
260/* XPEC register offsets relative to NETX_VA_XPEC(no) */
261#define NETX_XPEC_R0_OFS 0x00
262#define NETX_XPEC_R1_OFS 0x04
263#define NETX_XPEC_R2_OFS 0x08
264#define NETX_XPEC_R3_OFS 0x0c
265#define NETX_XPEC_R4_OFS 0x10
266#define NETX_XPEC_R5_OFS 0x14
267#define NETX_XPEC_R6_OFS 0x18
268#define NETX_XPEC_R7_OFS 0x1c
269#define NETX_XPEC_RANGE01_OFS 0x20
270#define NETX_XPEC_RANGE23_OFS 0x24
271#define NETX_XPEC_RANGE45_OFS 0x28
272#define NETX_XPEC_RANGE67_OFS 0x2c
273#define NETX_XPEC_PC_OFS 0x48
274#define NETX_XPEC_TIMER_OFS(timer) (0x30 + ((timer)<<2))
275#define NETX_XPEC_IRQ_OFS 0x8c
276#define NETX_XPEC_SYSTIME_NS_OFS 0x90
277#define NETX_XPEC_FIFO_DATA_OFS 0x94
278#define NETX_XPEC_SYSTIME_S_OFS 0x98
279#define NETX_XPEC_ADC_OFS 0x9c
280#define NETX_XPEC_URX_COUNT_OFS 0x40
281#define NETX_XPEC_UTX_COUNT_OFS 0x44
282#define NETX_XPEC_PC_OFS 0x48
283#define NETX_XPEC_ZERO_OFS 0x4c
284#define NETX_XPEC_STATCFG_OFS 0x50
285#define NETX_XPEC_EC_MASKA_OFS 0x54
286#define NETX_XPEC_EC_MASKB_OFS 0x58
287#define NETX_XPEC_EC_MASK0_OFS 0x5c
288#define NETX_XPEC_EC_MASK8_OFS 0x7c
289#define NETX_XPEC_EC_MASK9_OFS 0x80
290#define NETX_XPEC_XPU_HOLD_PC_OFS 0x100
291#define NETX_XPEC_RAM_START_OFS 0x2000
292
293/* Bits */
294#define XPU_HOLD_PC (1<<0)
295
296/* XMAC register offsets relative to NETX_VA_XMAC(no) */
297#define NETX_XMAC_RPU_PROGRAM_START_OFS 0x000
298#define NETX_XMAC_RPU_PROGRAM_END_OFS 0x3ff
299#define NETX_XMAC_TPU_PROGRAM_START_OFS 0x400
300#define NETX_XMAC_TPU_PROGRAM_END_OFS 0x7ff
301#define NETX_XMAC_RPU_HOLD_PC_OFS 0xa00
302#define NETX_XMAC_TPU_HOLD_PC_OFS 0xa04
303#define NETX_XMAC_STATUS_SHARED0_OFS 0x840
304#define NETX_XMAC_CONFIG_SHARED0_OFS 0x844
305#define NETX_XMAC_STATUS_SHARED1_OFS 0x848
306#define NETX_XMAC_CONFIG_SHARED1_OFS 0x84c
307#define NETX_XMAC_STATUS_SHARED2_OFS 0x850
308#define NETX_XMAC_CONFIG_SHARED2_OFS 0x854
309#define NETX_XMAC_STATUS_SHARED3_OFS 0x858
310#define NETX_XMAC_CONFIG_SHARED3_OFS 0x85c
311
312#define RPU_HOLD_PC (1<<15)
313#define TPU_HOLD_PC (1<<15)
314
315/*******************************
316 * Pointer FIFO *
317 *******************************/
318
319/* Registers */
320#define NETX_PFIFO_REG(ofs) __io(NETX_VA_PFIFO + (ofs))
321#define NETX_PFIFO_BASE(pfifo) NETX_PFIFO_REG(0x00 + ((pfifo)<<2))
322#define NETX_PFIFO_BORDER_BASE(pfifo) NETX_PFIFO_REG(0x80 + ((pfifo)<<2))
323#define NETX_PFIFO_RESET NETX_PFIFO_REG(0x100)
324#define NETX_PFIFO_FULL NETX_PFIFO_REG(0x104)
325#define NETX_PFIFO_EMPTY NETX_PFIFO_REG(0x108)
326#define NETX_PFIFO_OVEFLOW NETX_PFIFO_REG(0x10c)
327#define NETX_PFIFO_UNDERRUN NETX_PFIFO_REG(0x110)
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))
330
331/*******************************
332 * Dual Port Memory *
333 *******************************/
334
335/* Registers */
336#define NETX_DPMAS_REG(ofs) __io(NETX_VA_DPMAS + (ofs))
337#define NETX_DPMAS_SYS_STAT NETX_DPMAS_REG(0x4d8)
338#define NETX_DPMAS_INT_STAT NETX_DPMAS_REG(0x4e0)
339#define NETX_DPMAS_INT_EN NETX_DPMAS_REG(0x4f0)
340#define NETX_DPMAS_IF_CONF0 NETX_DPMAS_REG(0x608)
341#define NETX_DPMAS_IF_CONF1 NETX_DPMAS_REG(0x60c)
342#define NETX_DPMAS_EXT_CONFIG(cs) NETX_DPMAS_REG(0x610 + 4 * (cs))
343#define NETX_DPMAS_IO_MODE0 NETX_DPMAS_REG(0x620) /* I/O 32..63 */
344#define NETX_DPMAS_DRV_EN0 NETX_DPMAS_REG(0x624)
345#define NETX_DPMAS_DATA0 NETX_DPMAS_REG(0x628)
346#define NETX_DPMAS_IO_MODE1 NETX_DPMAS_REG(0x630) /* I/O 64..84 */
347#define NETX_DPMAS_DRV_EN1 NETX_DPMAS_REG(0x634)
348#define NETX_DPMAS_DATA1 NETX_DPMAS_REG(0x638)
349
350/* Bits */
351#define NETX_DPMAS_INT_EN_GLB_EN (1<<31)
352#define NETX_DPMAS_INT_EN_MEM_LCK (1<<30)
353#define NETX_DPMAS_INT_EN_WDG (1<<29)
354#define NETX_DPMAS_INT_EN_PIO72 (1<<28)
355#define NETX_DPMAS_INT_EN_PIO47 (1<<27)
356#define NETX_DPMAS_INT_EN_PIO40 (1<<26)
357#define NETX_DPMAS_INT_EN_PIO36 (1<<25)
358#define NETX_DPMAS_INT_EN_PIO35 (1<<24)
359
360#define NETX_DPMAS_IF_CONF0_HIF_DISABLED (0<<28)
361#define NETX_DPMAS_IF_CONF0_HIF_EXT_BUS (1<<28)
362#define NETX_DPMAS_IF_CONF0_HIF_UP_8BIT (2<<28)
363#define NETX_DPMAS_IF_CONF0_HIF_UP_16BIT (3<<28)
364#define NETX_DPMAS_IF_CONF0_HIF_IO (4<<28)
365#define NETX_DPMAS_IF_CONF0_WAIT_DRV_PP (1<<14)
366#define NETX_DPMAS_IF_CONF0_WAIT_DRV_OD (2<<14)
367#define NETX_DPMAS_IF_CONF0_WAIT_DRV_TRI (3<<14)
368
369#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO35 (1<<26)
370#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO36 (1<<27)
371#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO40 (1<<28)
372#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO47 (1<<29)
373#define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO72 (1<<30)
374
375#define NETX_EXT_CONFIG_TALEWIDTH(x) (((x) & 0x7) << 29)
376#define NETX_EXT_CONFIG_TADRHOLD(x) (((x) & 0x7) << 26)
377#define NETX_EXT_CONFIG_TCSON(x) (((x) & 0x7) << 23)
378#define NETX_EXT_CONFIG_TRDON(x) (((x) & 0x7) << 20)
379#define NETX_EXT_CONFIG_TWRON(x) (((x) & 0x7) << 17)
380#define NETX_EXT_CONFIG_TWROFF(x) (((x) & 0x1f) << 12)
381#define NETX_EXT_CONFIG_TRDWRCYC(x) (((x) & 0x1f) << 7)
382#define NETX_EXT_CONFIG_WAIT_POL (1<<6)
383#define NETX_EXT_CONFIG_WAIT_EN (1<<5)
384#define NETX_EXT_CONFIG_NRD_MODE (1<<4)
385#define NETX_EXT_CONFIG_DS_MODE (1<<3)
386#define NETX_EXT_CONFIG_NWR_MODE (1<<2)
387#define NETX_EXT_CONFIG_16BIT (1<<1)
388#define NETX_EXT_CONFIG_CS_ENABLE (1<<0)
389
390#define NETX_DPMAS_IO_MODE0_WRL (1<<13)
391#define NETX_DPMAS_IO_MODE0_WAIT (1<<14)
392#define NETX_DPMAS_IO_MODE0_READY (1<<15)
393#define NETX_DPMAS_IO_MODE0_CS0 (1<<19)
394#define NETX_DPMAS_IO_MODE0_EXTRD (1<<20)
395
396#define NETX_DPMAS_IO_MODE1_CS2 (1<<15)
397#define NETX_DPMAS_IO_MODE1_CS1 (1<<16)
398#define NETX_DPMAS_IO_MODE1_SAMPLE_NPOR (0<<30)
399#define NETX_DPMAS_IO_MODE1_SAMPLE_100MHZ (1<<30)
400#define NETX_DPMAS_IO_MODE1_SAMPLE_NPIO36 (2<<30)
401#define NETX_DPMAS_IO_MODE1_SAMPLE_PIO36 (3<<30)
402
403/*******************************
404 * I2C *
405 *******************************/
406#define NETX_I2C_REG(ofs) __io(NETX_VA_I2C, (ofs))
407#define NETX_I2C_CTRL NETX_I2C_REG(0x0)
408#define NETX_I2C_DATA NETX_I2C_REG(0x4)
409
410#endif /* __ASM_ARCH_NETX_REGS_H */
diff --git a/include/asm-arm/arch-netx/param.h b/include/asm-arm/arch-netx/param.h
new file mode 100644
index 000000000000..7a80c26178a8
--- /dev/null
+++ b/include/asm-arm/arch-netx/param.h
@@ -0,0 +1,18 @@
1/*
2 * linux/include/asm-arm/arch-netx/param.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 */
diff --git a/include/asm-arm/arch-netx/pfifo.h b/include/asm-arm/arch-netx/pfifo.h
new file mode 100644
index 000000000000..4af2ee4a32c1
--- /dev/null
+++ b/include/asm-arm/arch-netx/pfifo.h
@@ -0,0 +1,54 @@
1/*
2 * include/asm-arm/arch-netx/pfifo.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
21#ifndef ASM_ARCH_PFIFO_H
22#define ASM_ARCH_PFIFO_H
23
24static inline int pfifo_push(int no, unsigned int pointer)
25{
26 writel(pointer, NETX_PFIFO_BASE(no));
27 return 0;
28}
29
30static inline unsigned int pfifo_pop(int no)
31{
32 return readl(NETX_PFIFO_BASE(no));
33}
34
35static inline int pfifo_fill_level(int no)
36{
37
38 return readl(NETX_PFIFO_FILL_LEVEL(no));
39}
40
41static inline int pfifo_full(int no)
42{
43 return readl(NETX_PFIFO_FULL) & (1<<no) ? 1 : 0;
44}
45
46static inline int pfifo_empty(int no)
47{
48 return readl(NETX_PFIFO_EMPTY) & (1<<no) ? 1 : 0;
49}
50
51int pfifo_request(unsigned int pfifo_mask);
52void pfifo_free(unsigned int pfifo_mask);
53
54#endif /* ASM_ARCH_PFIFO_H */
diff --git a/include/asm-arm/arch-netx/system.h b/include/asm-arm/arch-netx/system.h
new file mode 100644
index 000000000000..52adf368d765
--- /dev/null
+++ b/include/asm-arm/arch-netx/system.h
@@ -0,0 +1,38 @@
1/*
2 * include/asm-arm/arch-netx/system.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#ifndef __ASM_ARCH_SYSTEM_H
20#define __ASM_ARCH_SYSTEM_H
21
22#include <asm/io.h>
23#include <asm/hardware.h>
24#include "netx-regs.h"
25
26static inline void arch_idle(void)
27{
28 cpu_do_idle();
29}
30
31static inline void arch_reset(char mode)
32{
33 writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES,
34 NETX_SYSTEM_RES_CR);
35}
36
37#endif
38
diff --git a/include/asm-arm/arch-netx/timex.h b/include/asm-arm/arch-netx/timex.h
new file mode 100644
index 000000000000..7fdb42da0b40
--- /dev/null
+++ b/include/asm-arm/arch-netx/timex.h
@@ -0,0 +1,20 @@
1/*
2 * include/asm-arm/arch-netx/timex.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 CLOCK_TICK_RATE 100000000
diff --git a/include/asm-arm/arch-netx/uncompress.h b/include/asm-arm/arch-netx/uncompress.h
new file mode 100644
index 000000000000..f89434547102
--- /dev/null
+++ b/include/asm-arm/arch-netx/uncompress.h
@@ -0,0 +1,76 @@
1/*
2 * include/asm-arm/arch-netx/uncompress.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/*
21 * The following code assumes the serial port has already been
22 * initialized by the bootloader. We search for the first enabled
23 * port in the most probable order. If you didn't setup a port in
24 * your bootloader then nothing will appear (which might be desired).
25 *
26 * This does not append a newline
27 */
28
29#define REG(x) (*(volatile unsigned long *)(x))
30
31#define UART1_BASE 0x100a00
32#define UART2_BASE 0x100a80
33
34#define UART_DR 0x0
35
36#define UART_CR 0x14
37#define CR_UART_EN (1<<0)
38
39#define UART_FR 0x18
40#define FR_BUSY (1<<3)
41#define FR_TXFF (1<<5)
42
43static void putc(char c)
44{
45 unsigned long base;
46
47 if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
48 base = UART1_BASE;
49 else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
50 base = UART2_BASE;
51 else
52 return;
53
54 while (REG(base + UART_FR) & FR_TXFF);
55 REG(base + UART_DR) = c;
56}
57
58static inline void flush(void)
59{
60 unsigned long base;
61
62 if (REG(UART1_BASE + UART_CR) & CR_UART_EN)
63 base = UART1_BASE;
64 else if (REG(UART2_BASE + UART_CR) & CR_UART_EN)
65 base = UART2_BASE;
66 else
67 return;
68
69 while (REG(base + UART_FR) & FR_BUSY);
70}
71
72/*
73 * nothing to do
74 */
75#define arch_decomp_setup()
76#define arch_decomp_wdog()
diff --git a/include/asm-arm/arch-netx/vmalloc.h b/include/asm-arm/arch-netx/vmalloc.h
new file mode 100644
index 000000000000..da2da5a595da
--- /dev/null
+++ b/include/asm-arm/arch-netx/vmalloc.h
@@ -0,0 +1,19 @@
1/*
2 * linux/include/asm-arm/arch-netx/vmalloc.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#define VMALLOC_END (PAGE_OFFSET + 0x10000000)
diff --git a/include/asm-arm/arch-netx/xc.h b/include/asm-arm/arch-netx/xc.h
new file mode 100644
index 000000000000..659af19512a9
--- /dev/null
+++ b/include/asm-arm/arch-netx/xc.h
@@ -0,0 +1,42 @@
1/*
2 * linux/include/asm-arm/arch-netx/xc.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#ifndef __ASM_ARCH_XC_H
21#define __ASM_ARCH_XC_H
22
23struct xc {
24 int no;
25 unsigned int type;
26 unsigned int version;
27 void __iomem *xpec_base;
28 void __iomem *xmac_base;
29 void __iomem *sram_base;
30 int irq;
31 struct device *dev;
32};
33
34int xc_reset(struct xc *x);
35int xc_stop(struct xc* x);
36int xc_start(struct xc *x);
37int xc_running(struct xc *x);
38int xc_request_firmware(struct xc* x);
39struct xc* request_xc(int xcno, struct device *dev);
40void free_xc(struct xc *x);
41
42#endif /* __ASM_ARCH_XC_H */
diff --git a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h
index 6b5ac5144e70..4d6a40315764 100644
--- a/include/asm-arm/arch-pxa/poodle.h
+++ b/include/asm-arm/arch-pxa/poodle.h
@@ -31,6 +31,7 @@
31#define POODLE_GPIO_CF_CD (14) 31#define POODLE_GPIO_CF_CD (14)
32#define POODLE_GPIO_CF_STSCHG (14) 32#define POODLE_GPIO_CF_STSCHG (14)
33#define POODLE_GPIO_SD_PWR (33) 33#define POODLE_GPIO_SD_PWR (33)
34#define POODLE_GPIO_SD_PWR1 (3)
34#define POODLE_GPIO_nSD_CLK (6) 35#define POODLE_GPIO_nSD_CLK (6)
35#define POODLE_GPIO_nSD_WP (7) 36#define POODLE_GPIO_nSD_WP (7)
36#define POODLE_GPIO_nSD_INT (8) 37#define POODLE_GPIO_nSD_INT (8)
@@ -42,6 +43,7 @@
42#define POODLE_GPIO_BYPASS_ON (36) 43#define POODLE_GPIO_BYPASS_ON (36)
43#define POODLE_GPIO_CHRG_ON (38) 44#define POODLE_GPIO_CHRG_ON (38)
44#define POODLE_GPIO_CHRG_FULL (16) 45#define POODLE_GPIO_CHRG_FULL (16)
46#define POODLE_GPIO_DISCHARGE_ON (42) /* Enable battery discharge */
45 47
46/* PXA GPIOs */ 48/* PXA GPIOs */
47#define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0) 49#define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0)
@@ -68,4 +70,6 @@
68#define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT ) 70#define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT )
69#define POODLE_SCOOP_IO_OUT ( 0 ) 71#define POODLE_SCOOP_IO_OUT ( 0 )
70 72
73extern struct platform_device poodle_locomo_device;
74
71#endif /* __ASM_ARCH_POODLE_H */ 75#endif /* __ASM_ARCH_POODLE_H */
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index 6650d4decaeb..9f83f4adfbf3 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -1625,7 +1625,7 @@
1625#define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ 1625#define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */
1626#define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ 1626#define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */
1627#define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ 1627#define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */
1628#define SSCR0_SlotsPerFrm(c) ((x) - 1) /* Time slots per frame [1..8] */ 1628#define SSCR0_SlotsPerFrm(x) ((x) - 1) /* Time slots per frame [1..8] */
1629#define SSCR0_ADC (1 << 30) /* Audio clock select */ 1629#define SSCR0_ADC (1 << 30) /* Audio clock select */
1630#define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ 1630#define SSCR0_MOD (1 << 31) /* Mode (normal or network) */
1631#endif 1631#endif
@@ -1706,6 +1706,10 @@
1706#if defined (CONFIG_PXA27x) 1706#if defined (CONFIG_PXA27x)
1707#define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ 1707#define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */
1708#define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ 1708#define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */
1709#define SSTSA_P1 __REG(0x41000030) /* SSP Port 1 Tx Timeslot Active */
1710#define SSRSA_P1 __REG(0x41000034) /* SSP Port 1 Rx Timeslot Active */
1711#define SSTSS_P1 __REG(0x41000038) /* SSP Port 1 Timeslot Status */
1712#define SSACD_P1 __REG(0x4100003C) /* SSP Port 1 Audio Clock Divider */
1709#define SSCR0_P2 __REG(0x41700000) /* SSP Port 2 Control Register 0 */ 1713#define SSCR0_P2 __REG(0x41700000) /* SSP Port 2 Control Register 0 */
1710#define SSCR1_P2 __REG(0x41700004) /* SSP Port 2 Control Register 1 */ 1714#define SSCR1_P2 __REG(0x41700004) /* SSP Port 2 Control Register 1 */
1711#define SSSR_P2 __REG(0x41700008) /* SSP Port 2 Status Register */ 1715#define SSSR_P2 __REG(0x41700008) /* SSP Port 2 Status Register */
@@ -1713,6 +1717,10 @@
1713#define SSDR_P2 __REG(0x41700010) /* (Write / Read) SSP Port 2 Data Write Register/SSP Data Read Register */ 1717#define SSDR_P2 __REG(0x41700010) /* (Write / Read) SSP Port 2 Data Write Register/SSP Data Read Register */
1714#define SSTO_P2 __REG(0x41700028) /* SSP Port 2 Time Out Register */ 1718#define SSTO_P2 __REG(0x41700028) /* SSP Port 2 Time Out Register */
1715#define SSPSP_P2 __REG(0x4170002C) /* SSP Port 2 Programmable Serial Protocol */ 1719#define SSPSP_P2 __REG(0x4170002C) /* SSP Port 2 Programmable Serial Protocol */
1720#define SSTSA_P2 __REG(0x41700030) /* SSP Port 2 Tx Timeslot Active */
1721#define SSRSA_P2 __REG(0x41700034) /* SSP Port 2 Rx Timeslot Active */
1722#define SSTSS_P2 __REG(0x41700038) /* SSP Port 2 Timeslot Status */
1723#define SSACD_P2 __REG(0x4170003C) /* SSP Port 2 Audio Clock Divider */
1716#define SSCR0_P3 __REG(0x41900000) /* SSP Port 3 Control Register 0 */ 1724#define SSCR0_P3 __REG(0x41900000) /* SSP Port 3 Control Register 0 */
1717#define SSCR1_P3 __REG(0x41900004) /* SSP Port 3 Control Register 1 */ 1725#define SSCR1_P3 __REG(0x41900004) /* SSP Port 3 Control Register 1 */
1718#define SSSR_P3 __REG(0x41900008) /* SSP Port 3 Status Register */ 1726#define SSSR_P3 __REG(0x41900008) /* SSP Port 3 Status Register */
@@ -1720,6 +1728,10 @@
1720#define SSDR_P3 __REG(0x41900010) /* (Write / Read) SSP Port 3 Data Write Register/SSP Data Read Register */ 1728#define SSDR_P3 __REG(0x41900010) /* (Write / Read) SSP Port 3 Data Write Register/SSP Data Read Register */
1721#define SSTO_P3 __REG(0x41900028) /* SSP Port 3 Time Out Register */ 1729#define SSTO_P3 __REG(0x41900028) /* SSP Port 3 Time Out Register */
1722#define SSPSP_P3 __REG(0x4190002C) /* SSP Port 3 Programmable Serial Protocol */ 1730#define SSPSP_P3 __REG(0x4190002C) /* SSP Port 3 Programmable Serial Protocol */
1731#define SSTSA_P3 __REG(0x41900030) /* SSP Port 3 Tx Timeslot Active */
1732#define SSRSA_P3 __REG(0x41900034) /* SSP Port 3 Rx Timeslot Active */
1733#define SSTSS_P3 __REG(0x41900038) /* SSP Port 3 Timeslot Status */
1734#define SSACD_P3 __REG(0x4190003C) /* SSP Port 3 Audio Clock Divider */
1723#else /* PXA255 (only port 2) and PXA26x ports*/ 1735#else /* PXA255 (only port 2) and PXA26x ports*/
1724#define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ 1736#define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */
1725#define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ 1737#define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */
@@ -1746,6 +1758,10 @@
1746#define SSDR_P(x) (*(((x) == 1) ? &SSDR_P1 : ((x) == 2) ? &SSDR_P2 : ((x) == 3) ? &SSDR_P3 : NULL)) 1758#define SSDR_P(x) (*(((x) == 1) ? &SSDR_P1 : ((x) == 2) ? &SSDR_P2 : ((x) == 3) ? &SSDR_P3 : NULL))
1747#define SSTO_P(x) (*(((x) == 1) ? &SSTO_P1 : ((x) == 2) ? &SSTO_P2 : ((x) == 3) ? &SSTO_P3 : NULL)) 1759#define SSTO_P(x) (*(((x) == 1) ? &SSTO_P1 : ((x) == 2) ? &SSTO_P2 : ((x) == 3) ? &SSTO_P3 : NULL))
1748#define SSPSP_P(x) (*(((x) == 1) ? &SSPSP_P1 : ((x) == 2) ? &SSPSP_P2 : ((x) == 3) ? &SSPSP_P3 : NULL)) 1760#define SSPSP_P(x) (*(((x) == 1) ? &SSPSP_P1 : ((x) == 2) ? &SSPSP_P2 : ((x) == 3) ? &SSPSP_P3 : NULL))
1761#define SSTSA_P(x) (*(((x) == 1) ? &SSTSA_P1 : ((x) == 2) ? &SSTSA_P2 : ((x) == 3) ? &SSTSA_P3 : NULL))
1762#define SSRSA_P(x) (*(((x) == 1) ? &SSRSA_P1 : ((x) == 2) ? &SSRSA_P2 : ((x) == 3) ? &SSRSA_P3 : NULL))
1763#define SSTSS_P(x) (*(((x) == 1) ? &SSTSS_P1 : ((x) == 2) ? &SSTSS_P2 : ((x) == 3) ? &SSTSS_P3 : NULL))
1764#define SSACD_P(x) (*(((x) == 1) ? &SSACD_P1 : ((x) == 2) ? &SSACD_P2 : ((x) == 3) ? &SSACD_P3 : NULL))
1749 1765
1750/* 1766/*
1751 * MultiMediaCard (MMC) controller 1767 * MultiMediaCard (MMC) controller
diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h
index 840a46bfbc54..1d56a3ef89fd 100644
--- a/include/asm-arm/arch-pxa/system.h
+++ b/include/asm-arm/arch-pxa/system.h
@@ -10,6 +10,7 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12 12
13#include <asm/proc-fns.h>
13#include "hardware.h" 14#include "hardware.h"
14#include "pxa-regs.h" 15#include "pxa-regs.h"
15 16
diff --git a/include/asm-arm/arch-versatile/system.h b/include/asm-arm/arch-versatile/system.h
index 8889a189739f..71c6254c0d9b 100644
--- a/include/asm-arm/arch-versatile/system.h
+++ b/include/asm-arm/arch-versatile/system.h
@@ -36,16 +36,14 @@ static inline void arch_idle(void)
36 36
37static inline void arch_reset(char mode) 37static inline void arch_reset(char mode)
38{ 38{
39 unsigned int hdr_ctrl = (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_RESETCTL_OFFSET); 39 u32 val;
40 unsigned int val;
41 40
42 /* 41 val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7;
43 * To reset, we hit the on-board reset register 42 val |= 0x105;
44 * in the system FPGA 43
45 */ 44 __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK));
46 val = __raw_readl(hdr_ctrl); 45 __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL));
47 val |= VERSATILE_SYS_CTRL_RESET_CONFIGCLR; 46 __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK));
48 __raw_writel(val, hdr_ctrl);
49} 47}
50 48
51#endif 49#endif
diff --git a/include/asm-arm/byteorder.h b/include/asm-arm/byteorder.h
index 17eaf8bdf092..e6f7fcdc73b0 100644
--- a/include/asm-arm/byteorder.h
+++ b/include/asm-arm/byteorder.h
@@ -22,16 +22,18 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
22{ 22{
23 __u32 t; 23 __u32 t;
24 24
25 if (__builtin_constant_p(x)) { 25#ifndef __thumb__
26 t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ 26 if (!__builtin_constant_p(x)) {
27 } else {
28 /* 27 /*
29 * The compiler needs a bit of a hint here to always do the 28 * The compiler needs a bit of a hint here to always do the
30 * right thing and not screw it up to different degrees 29 * right thing and not screw it up to different degrees
31 * depending on the gcc version. 30 * depending on the gcc version.
32 */ 31 */
33 asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); 32 asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
34 } 33 } else
34#endif
35 t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */
36
35 x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ 37 x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */
36 t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ 38 t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */
37 x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ 39 x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */
diff --git a/include/asm-arm/hardware/sharpsl_pm.h b/include/asm-arm/hardware/sharpsl_pm.h
index 36983e5f3665..ecf15b83956f 100644
--- a/include/asm-arm/hardware/sharpsl_pm.h
+++ b/include/asm-arm/hardware/sharpsl_pm.h
@@ -16,6 +16,7 @@ struct sharpsl_charger_machinfo {
16 void (*exit)(void); 16 void (*exit)(void);
17 int gpio_acin; 17 int gpio_acin;
18 int gpio_batfull; 18 int gpio_batfull;
19 int batfull_irq;
19 int gpio_batlock; 20 int gpio_batlock;
20 int gpio_fatal; 21 int gpio_fatal;
21 void (*discharge)(int); 22 void (*discharge)(int);
@@ -34,9 +35,19 @@ struct sharpsl_charger_machinfo {
34#define SHARPSL_STATUS_FATAL 7 35#define SHARPSL_STATUS_FATAL 7
35 unsigned long (*charger_wakeup)(void); 36 unsigned long (*charger_wakeup)(void);
36 int (*should_wakeup)(unsigned int resume_on_alarm); 37 int (*should_wakeup)(unsigned int resume_on_alarm);
38 void (*backlight_limit)(int);
39 int (*backlight_get_status) (void);
40 int charge_on_volt;
41 int charge_on_temp;
42 int charge_acin_high;
43 int charge_acin_low;
44 int fatal_acin_volt;
45 int fatal_noacin_volt;
37 int bat_levels; 46 int bat_levels;
38 struct battery_thresh *bat_levels_noac; 47 struct battery_thresh *bat_levels_noac;
39 struct battery_thresh *bat_levels_acin; 48 struct battery_thresh *bat_levels_acin;
49 struct battery_thresh *bat_levels_noac_bl;
50 struct battery_thresh *bat_levels_acin_bl;
40 int status_high_acin; 51 int status_high_acin;
41 int status_low_acin; 52 int status_low_acin;
42 int status_high_noac; 53 int status_high_noac;
diff --git a/include/asm-arm/mach/serial_at91rm9200.h b/include/asm-arm/mach/serial_at91.h
index a0269de12079..1290bb32802d 100644
--- a/include/asm-arm/mach/serial_at91rm9200.h
+++ b/include/asm-arm/mach/serial_at91.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/include/asm-arm/mach/serial_at91rm9200.h 2 * linux/include/asm-arm/mach/serial_at91.h
3 * 3 *
4 * Based on serial_sa1100.h by Nicolas Pitre 4 * Based on serial_sa1100.h by Nicolas Pitre
5 * 5 *
@@ -14,7 +14,7 @@ struct uart_port;
14 * This is a temporary structure for registering these 14 * This is a temporary structure for registering these
15 * functions; it is intended to be discarded after boot. 15 * functions; it is intended to be discarded after boot.
16 */ 16 */
17struct at91rm9200_port_fns { 17struct at91_port_fns {
18 void (*set_mctrl)(struct uart_port *, u_int); 18 void (*set_mctrl)(struct uart_port *, u_int);
19 u_int (*get_mctrl)(struct uart_port *); 19 u_int (*get_mctrl)(struct uart_port *);
20 void (*enable_ms)(struct uart_port *); 20 void (*enable_ms)(struct uart_port *);
@@ -25,11 +25,9 @@ struct at91rm9200_port_fns {
25}; 25};
26 26
27#if defined(CONFIG_SERIAL_AT91) 27#if defined(CONFIG_SERIAL_AT91)
28void at91_register_uart_fns(struct at91rm9200_port_fns *fns); 28void at91_register_uart_fns(struct at91_port_fns *fns);
29void at91_register_uart(int idx, int port);
30#else 29#else
31#define at91_register_uart_fns(fns) do { } while (0) 30#define at91_register_uart_fns(fns) do { } while (0)
32#define at91_register_uart(idx,port) do { } while (0)
33#endif 31#endif
34 32
35 33
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 9c744ae6c6e3..6001febfe63b 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -107,6 +107,9 @@ extern void __show_regs(struct pt_regs *);
107extern int cpu_architecture(void); 107extern int cpu_architecture(void);
108extern void cpu_init(void); 108extern void cpu_init(void);
109 109
110void arm_machine_restart(char mode);
111extern void (*arm_pm_restart)(char str);
112
110/* 113/*
111 * Intel's XScale3 core supports some v6 features (supersections, L2) 114 * Intel's XScale3 core supports some v6 features (supersections, L2)
112 * but advertises itself as v5 as it does not support the v6 ISA. For 115 * but advertises itself as v5 as it does not support the v6 ISA. For
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 94b9286cf6bd..0ef50baa7da6 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -67,8 +67,8 @@
67/* Parisc type numbers. */ 67/* Parisc type numbers. */
68#define PORT_MUX 48 68#define PORT_MUX 48
69 69
70/* Atmel AT91RM9200 SoC */ 70/* Atmel AT91xxx SoC */
71#define PORT_AT91RM9200 49 71#define PORT_AT91 49
72 72
73/* Macintosh Zilog type numbers */ 73/* Macintosh Zilog type numbers */
74#define PORT_MAC_ZILOG 50 /* m68k : not yet implemented */ 74#define PORT_MAC_ZILOG 50 /* m68k : not yet implemented */