diff options
Diffstat (limited to 'arch/sh')
133 files changed, 6721 insertions, 1894 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 6a461d4caeff..3aa3b885ab36 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -51,6 +51,22 @@ config GENERIC_TIME | |||
51 | config ARCH_MAY_HAVE_PC_FDC | 51 | config ARCH_MAY_HAVE_PC_FDC |
52 | bool | 52 | bool |
53 | 53 | ||
54 | config STACKTRACE_SUPPORT | ||
55 | bool | ||
56 | default y | ||
57 | |||
58 | config LOCKDEP_SUPPORT | ||
59 | bool | ||
60 | default y | ||
61 | |||
62 | config ARCH_HAS_ILOG2_U32 | ||
63 | bool | ||
64 | default n | ||
65 | |||
66 | config ARCH_HAS_ILOG2_U64 | ||
67 | bool | ||
68 | default n | ||
69 | |||
54 | source "init/Kconfig" | 70 | source "init/Kconfig" |
55 | 71 | ||
56 | menu "System type" | 72 | menu "System type" |
@@ -217,7 +233,21 @@ config SH_SHMIN | |||
217 | bool "SHMIN" | 233 | bool "SHMIN" |
218 | select CPU_SUBTYPE_SH7706 | 234 | select CPU_SUBTYPE_SH7706 |
219 | help | 235 | help |
220 | Select SHMIN if configureing for the SHMIN board | 236 | Select SHMIN if configuring for the SHMIN board. |
237 | |||
238 | config SH_7206_SOLUTION_ENGINE | ||
239 | bool "SolutionEngine7206" | ||
240 | select CPU_SUBTYPE_SH7206 | ||
241 | help | ||
242 | Select 7206 SolutionEngine if configuring for a Hitachi SH7206 | ||
243 | evaluation board. | ||
244 | |||
245 | config SH_7619_SOLUTION_ENGINE | ||
246 | bool "SolutionEngine7619" | ||
247 | select CPU_SUBTYPE_SH7619 | ||
248 | help | ||
249 | Select 7619 SolutionEngine if configuring for a Hitachi SH7619 | ||
250 | evaluation board. | ||
221 | 251 | ||
222 | config SH_UNKNOWN | 252 | config SH_UNKNOWN |
223 | bool "BareCPU" | 253 | bool "BareCPU" |
@@ -280,12 +310,20 @@ config CF_BASE_ADDR | |||
280 | 310 | ||
281 | menu "Processor features" | 311 | menu "Processor features" |
282 | 312 | ||
283 | config CPU_LITTLE_ENDIAN | 313 | choice |
284 | bool "Little Endian" | 314 | prompt "Endianess selection" |
315 | default CPU_LITTLE_ENDIAN | ||
285 | help | 316 | help |
286 | Some SuperH machines can be configured for either little or big | 317 | Some SuperH machines can be configured for either little or big |
287 | endian byte order. These modes require different kernels. Say Y if | 318 | endian byte order. These modes require different kernels. |
288 | your machine is little endian, N if it's a big endian machine. | 319 | |
320 | config CPU_LITTLE_ENDIAN | ||
321 | bool "Little Endian" | ||
322 | |||
323 | config CPU_BIG_ENDIAN | ||
324 | bool "Big Endian" | ||
325 | |||
326 | endchoice | ||
289 | 327 | ||
290 | config SH_FPU | 328 | config SH_FPU |
291 | bool "FPU support" | 329 | bool "FPU support" |
@@ -345,6 +383,9 @@ config CPU_HAS_MASKREG_IRQ | |||
345 | config CPU_HAS_INTC2_IRQ | 383 | config CPU_HAS_INTC2_IRQ |
346 | bool | 384 | bool |
347 | 385 | ||
386 | config CPU_HAS_IPR_IRQ | ||
387 | bool | ||
388 | |||
348 | config CPU_HAS_SR_RB | 389 | config CPU_HAS_SR_RB |
349 | bool "CPU has SR.RB" | 390 | bool "CPU has SR.RB" |
350 | depends on CPU_SH3 || CPU_SH4 | 391 | depends on CPU_SH3 || CPU_SH4 |
@@ -357,6 +398,9 @@ config CPU_HAS_SR_RB | |||
357 | See <file:Documentation/sh/register-banks.txt> for further | 398 | See <file:Documentation/sh/register-banks.txt> for further |
358 | information on SR.RB and register banking in the kernel in general. | 399 | information on SR.RB and register banking in the kernel in general. |
359 | 400 | ||
401 | config CPU_HAS_PTEA | ||
402 | bool | ||
403 | |||
360 | endmenu | 404 | endmenu |
361 | 405 | ||
362 | menu "Timer support" | 406 | menu "Timer support" |
@@ -364,10 +408,25 @@ depends on !GENERIC_TIME | |||
364 | 408 | ||
365 | config SH_TMU | 409 | config SH_TMU |
366 | bool "TMU timer support" | 410 | bool "TMU timer support" |
411 | depends on CPU_SH3 || CPU_SH4 | ||
367 | default y | 412 | default y |
368 | help | 413 | help |
369 | This enables the use of the TMU as the system timer. | 414 | This enables the use of the TMU as the system timer. |
370 | 415 | ||
416 | config SH_CMT | ||
417 | bool "CMT timer support" | ||
418 | depends on CPU_SH2 | ||
419 | default y | ||
420 | help | ||
421 | This enables the use of the CMT as the system timer. | ||
422 | |||
423 | config SH_MTU2 | ||
424 | bool "MTU2 timer support" | ||
425 | depends on CPU_SH2A | ||
426 | default n | ||
427 | help | ||
428 | This enables the use of the MTU2 as the system timer. | ||
429 | |||
371 | endmenu | 430 | endmenu |
372 | 431 | ||
373 | source "arch/sh/boards/renesas/hs7751rvoip/Kconfig" | 432 | source "arch/sh/boards/renesas/hs7751rvoip/Kconfig" |
@@ -376,19 +435,52 @@ source "arch/sh/boards/renesas/rts7751r2d/Kconfig" | |||
376 | 435 | ||
377 | source "arch/sh/boards/renesas/r7780rp/Kconfig" | 436 | source "arch/sh/boards/renesas/r7780rp/Kconfig" |
378 | 437 | ||
438 | config SH_TIMER_IRQ | ||
439 | int | ||
440 | default "28" if CPU_SUBTYPE_SH7780 | ||
441 | default "86" if CPU_SUBTYPE_SH7619 | ||
442 | default "140" if CPU_SUBTYPE_SH7206 | ||
443 | default "16" | ||
444 | |||
445 | config NO_IDLE_HZ | ||
446 | bool "Dynamic tick timer" | ||
447 | help | ||
448 | Select this option if you want to disable continuous timer ticks | ||
449 | and have them programmed to occur as required. This option saves | ||
450 | power as the system can remain in idle state for longer. | ||
451 | |||
452 | By default dynamic tick is disabled during the boot, and can be | ||
453 | manually enabled with: | ||
454 | |||
455 | echo 1 > /sys/devices/system/timer/timer0/dyn_tick | ||
456 | |||
457 | Alternatively, if you want dynamic tick automatically enabled | ||
458 | during boot, pass "dyntick=enable" via the kernel command string. | ||
459 | |||
460 | Please note that dynamic tick may affect the accuracy of | ||
461 | timekeeping on some platforms depending on the implementation. | ||
462 | |||
379 | config SH_PCLK_FREQ | 463 | config SH_PCLK_FREQ |
380 | int "Peripheral clock frequency (in Hz)" | 464 | int "Peripheral clock frequency (in Hz)" |
465 | default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343 | ||
466 | default "31250000" if CPU_SUBTYPE_SH7619 | ||
467 | default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \ | ||
468 | CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \ | ||
469 | CPU_SUBTYPE_SH7206 | ||
381 | default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 | 470 | default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 |
382 | default "60000000" if CPU_SUBTYPE_SH7751 | 471 | default "60000000" if CPU_SUBTYPE_SH7751 |
383 | default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \ | ||
384 | CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 | ||
385 | default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343 | ||
386 | default "66000000" if CPU_SUBTYPE_SH4_202 | 472 | default "66000000" if CPU_SUBTYPE_SH4_202 |
387 | help | 473 | help |
388 | This option is used to specify the peripheral clock frequency. | 474 | This option is used to specify the peripheral clock frequency. |
389 | This is necessary for determining the reference clock value on | 475 | This is necessary for determining the reference clock value on |
390 | platforms lacking an RTC. | 476 | platforms lacking an RTC. |
391 | 477 | ||
478 | config SH_CLK_MD | ||
479 | int "CPU Mode Pin Setting" | ||
480 | depends on CPU_SUBTYPE_SH7619 || CPU_SUBTYPE_SH7206 | ||
481 | help | ||
482 | MD2 - MD0 pin setting. | ||
483 | |||
392 | menu "CPU Frequency scaling" | 484 | menu "CPU Frequency scaling" |
393 | 485 | ||
394 | source "drivers/cpufreq/Kconfig" | 486 | source "drivers/cpufreq/Kconfig" |
@@ -421,6 +513,8 @@ config HEARTBEAT | |||
421 | behavior is platform-dependent, but normally the flash frequency is | 513 | behavior is platform-dependent, but normally the flash frequency is |
422 | a hyperbolic function of the 5-minute load average. | 514 | a hyperbolic function of the 5-minute load average. |
423 | 515 | ||
516 | source "arch/sh/drivers/Kconfig" | ||
517 | |||
424 | endmenu | 518 | endmenu |
425 | 519 | ||
426 | config ISA_DMA_API | 520 | config ISA_DMA_API |
@@ -486,18 +580,6 @@ config NR_CPUS | |||
486 | 580 | ||
487 | source "kernel/Kconfig.preempt" | 581 | source "kernel/Kconfig.preempt" |
488 | 582 | ||
489 | config CPU_HAS_SR_RB | ||
490 | bool "CPU has SR.RB" | ||
491 | depends on CPU_SH3 || CPU_SH4 | ||
492 | default y | ||
493 | help | ||
494 | This will enable the use of SR.RB register bank usage. Processors | ||
495 | that are lacking this bit must have another method in place for | ||
496 | accomplishing what is taken care of by the banked registers. | ||
497 | |||
498 | See <file:Documentation/sh/register-banks.txt> for further | ||
499 | information on SR.RB and register banking in the kernel in general. | ||
500 | |||
501 | config NODES_SHIFT | 583 | config NODES_SHIFT |
502 | int | 584 | int |
503 | default "1" | 585 | default "1" |
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug index 48479e014dac..87902e0298e2 100644 --- a/arch/sh/Kconfig.debug +++ b/arch/sh/Kconfig.debug | |||
@@ -1,5 +1,9 @@ | |||
1 | menu "Kernel hacking" | 1 | menu "Kernel hacking" |
2 | 2 | ||
3 | config TRACE_IRQFLAGS_SUPPORT | ||
4 | bool | ||
5 | default y | ||
6 | |||
3 | source "lib/Kconfig.debug" | 7 | source "lib/Kconfig.debug" |
4 | 8 | ||
5 | config SH_STANDARD_BIOS | 9 | config SH_STANDARD_BIOS |
@@ -17,7 +21,19 @@ config SH_STANDARD_BIOS | |||
17 | 21 | ||
18 | config EARLY_SCIF_CONSOLE | 22 | config EARLY_SCIF_CONSOLE |
19 | bool "Use early SCIF console" | 23 | bool "Use early SCIF console" |
20 | depends on CPU_SH4 || CPU_SH2A && !SH_STANDARD_BIOS | 24 | help |
25 | This enables an early console using a fixed SCIF port. This can | ||
26 | be used by platforms that are either not running the SH | ||
27 | standard BIOS, or do not wish to use the BIOS callbacks for the | ||
28 | serial I/O. | ||
29 | |||
30 | config EARLY_SCIF_CONSOLE_PORT | ||
31 | hex "SCIF port for early console" | ||
32 | depends on EARLY_SCIF_CONSOLE | ||
33 | default "0xffe00000" if CPU_SUBTYPE_SH7780 | ||
34 | default "0xfffe9800" if CPU_SUBTYPE_SH7206 | ||
35 | default "0xf8420000" if CPU_SUBTYPE_SH7619 | ||
36 | default "0xffe80000" if CPU_SH4 | ||
21 | 37 | ||
22 | config EARLY_PRINTK | 38 | config EARLY_PRINTK |
23 | bool "Early printk support" | 39 | bool "Early printk support" |
@@ -30,6 +46,11 @@ config EARLY_PRINTK | |||
30 | when the kernel may crash or hang before the serial console is | 46 | when the kernel may crash or hang before the serial console is |
31 | initialised. If unsure, say N. | 47 | initialised. If unsure, say N. |
32 | 48 | ||
49 | On devices that are running SH-IPL and want to keep the port | ||
50 | initialization consistent while not using the BIOS callbacks, | ||
51 | select both the EARLY_SCIF_CONSOLE and SH_STANDARD_BIOS, using | ||
52 | the kernel command line option to toggle back and forth. | ||
53 | |||
33 | config DEBUG_STACKOVERFLOW | 54 | config DEBUG_STACKOVERFLOW |
34 | bool "Check for stack overflows" | 55 | bool "Check for stack overflows" |
35 | depends on DEBUG_KERNEL | 56 | depends on DEBUG_KERNEL |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 26d62ff51a64..c1dbef212634 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -13,10 +13,6 @@ | |||
13 | # for "archclean" and "archdep" for cleaning up and making dependencies for | 13 | # for "archclean" and "archdep" for cleaning up and making dependencies for |
14 | # this architecture | 14 | # this architecture |
15 | # | 15 | # |
16 | |||
17 | cflags-y := -mb | ||
18 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) := -ml | ||
19 | |||
20 | isa-y := any | 16 | isa-y := any |
21 | isa-$(CONFIG_SH_DSP) := sh | 17 | isa-$(CONFIG_SH_DSP) := sh |
22 | isa-$(CONFIG_CPU_SH2) := sh2 | 18 | isa-$(CONFIG_CPU_SH2) := sh2 |
@@ -38,13 +34,16 @@ isa-y := $(isa-y)-nofpu | |||
38 | endif | 34 | endif |
39 | endif | 35 | endif |
40 | 36 | ||
41 | cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) | 37 | cflags-$(CONFIG_CPU_SH2) := -m2 |
42 | 38 | cflags-$(CONFIG_CPU_SH3) := -m3 | |
43 | cflags-$(CONFIG_CPU_SH2) += -m2 | 39 | cflags-$(CONFIG_CPU_SH4) := -m4 \ |
44 | cflags-$(CONFIG_CPU_SH3) += -m3 | ||
45 | cflags-$(CONFIG_CPU_SH4) += -m4 \ | ||
46 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) | 40 | $(call cc-option,-mno-implicit-fp,-m4-nofpu) |
47 | cflags-$(CONFIG_CPU_SH4A) += $(call cc-option,-m4a-nofpu,) | 41 | cflags-$(CONFIG_CPU_SH4A) := -m4a $(call cc-option,-m4a-nofpu,) |
42 | |||
43 | cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mb | ||
44 | cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += -ml | ||
45 | |||
46 | cflags-y += $(call as-option,-Wa$(comma)-isa=$(isa-y),) -ffreestanding | ||
48 | 47 | ||
49 | cflags-$(CONFIG_SH_DSP) += -Wa,-dsp | 48 | cflags-$(CONFIG_SH_DSP) += -Wa,-dsp |
50 | cflags-$(CONFIG_SH_KGDB) += -g | 49 | cflags-$(CONFIG_SH_KGDB) += -g |
@@ -59,7 +58,9 @@ OBJCOPYFLAGS := -O binary -R .note -R .comment -R .stab -R .stabstr -S | |||
59 | # never be used by anyone. Use a board-specific defconfig that has a | 58 | # never be used by anyone. Use a board-specific defconfig that has a |
60 | # reasonable chance of being current instead. | 59 | # reasonable chance of being current instead. |
61 | # | 60 | # |
62 | KBUILD_DEFCONFIG := rts7751r2d_defconfig | 61 | KBUILD_DEFCONFIG := r7780rp_defconfig |
62 | |||
63 | KBUILD_IMAGE := arch/sh/boot/zImage | ||
63 | 64 | ||
64 | # | 65 | # |
65 | # Choosing incompatible machines durings configuration will result in | 66 | # Choosing incompatible machines durings configuration will result in |
@@ -109,6 +110,8 @@ machdir-$(CONFIG_SH_SH4202_MICRODEV) := superh/microdev | |||
109 | machdir-$(CONFIG_SH_LANDISK) := landisk | 110 | machdir-$(CONFIG_SH_LANDISK) := landisk |
110 | machdir-$(CONFIG_SH_TITAN) := titan | 111 | machdir-$(CONFIG_SH_TITAN) := titan |
111 | machdir-$(CONFIG_SH_SHMIN) := shmin | 112 | machdir-$(CONFIG_SH_SHMIN) := shmin |
113 | machdir-$(CONFIG_SH_7206_SOLUTION_ENGINE) := se/7206 | ||
114 | machdir-$(CONFIG_SH_7619_SOLUTION_ENGINE) := se/7619 | ||
112 | machdir-$(CONFIG_SH_UNKNOWN) := unknown | 115 | machdir-$(CONFIG_SH_UNKNOWN) := unknown |
113 | 116 | ||
114 | incdir-y := $(notdir $(machdir-y)) | 117 | incdir-y := $(notdir $(machdir-y)) |
@@ -124,6 +127,7 @@ core-$(CONFIG_HD64465) += arch/sh/cchips/hd6446x/hd64465/ | |||
124 | core-$(CONFIG_VOYAGERGX) += arch/sh/cchips/voyagergx/ | 127 | core-$(CONFIG_VOYAGERGX) += arch/sh/cchips/voyagergx/ |
125 | 128 | ||
126 | cpuincdir-$(CONFIG_CPU_SH2) := cpu-sh2 | 129 | cpuincdir-$(CONFIG_CPU_SH2) := cpu-sh2 |
130 | cpuincdir-$(CONFIG_CPU_SH2A) := cpu-sh2a | ||
127 | cpuincdir-$(CONFIG_CPU_SH3) := cpu-sh3 | 131 | cpuincdir-$(CONFIG_CPU_SH3) := cpu-sh3 |
128 | cpuincdir-$(CONFIG_CPU_SH4) := cpu-sh4 | 132 | cpuincdir-$(CONFIG_CPU_SH4) := cpu-sh4 |
129 | 133 | ||
@@ -175,7 +179,7 @@ maketools: include/linux/version.h FORCE | |||
175 | 179 | ||
176 | all: zImage | 180 | all: zImage |
177 | 181 | ||
178 | zImage: vmlinux | 182 | zImage uImage uImage.srec vmlinux.srec: vmlinux |
179 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 183 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
180 | 184 | ||
181 | compressed: zImage | 185 | compressed: zImage |
@@ -186,5 +190,8 @@ archclean: | |||
186 | CLEAN_FILES += include/asm-sh/machtypes.h | 190 | CLEAN_FILES += include/asm-sh/machtypes.h |
187 | 191 | ||
188 | define archhelp | 192 | define archhelp |
189 | @echo ' zImage - Compressed kernel image (arch/sh/boot/zImage)' | 193 | @echo '* zImage - Compressed kernel image' |
194 | @echo ' vmlinux.srec - Create an ELF S-record' | ||
195 | @echo ' uImage - Create a bootable image for U-Boot' | ||
196 | @echo ' uImage.srec - Create an S-record for U-Boot' | ||
190 | endef | 197 | endef |
diff --git a/arch/sh/boards/hp6xx/hp6xx_apm.c b/arch/sh/boards/hp6xx/hp6xx_apm.c index 219179114f0f..d146cdaa0b8b 100644 --- a/arch/sh/boards/hp6xx/hp6xx_apm.c +++ b/arch/sh/boards/hp6xx/hp6xx_apm.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <asm/io.h> | 14 | #include <asm/io.h> |
15 | #include <asm/apm.h> | 15 | #include <asm/apm.h> |
16 | #include <asm/adc.h> | 16 | #include <asm/adc.h> |
17 | #include <asm/hp6xx/hp6xx.h> | 17 | #include <asm/hp6xx.h> |
18 | 18 | ||
19 | #define SH7709_PGDR 0xa400012c | 19 | #define SH7709_PGDR 0xa400012c |
20 | 20 | ||
diff --git a/arch/sh/boards/hp6xx/pm.c b/arch/sh/boards/hp6xx/pm.c index 83d327212064..d1947732fb3e 100644 --- a/arch/sh/boards/hp6xx/pm.c +++ b/arch/sh/boards/hp6xx/pm.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/time.h> | 12 | #include <linux/time.h> |
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/hd64461.h> | 14 | #include <asm/hd64461.h> |
15 | #include <asm/hp6xx/hp6xx.h> | 15 | #include <asm/hp6xx.h> |
16 | #include <asm/cpu/dac.h> | 16 | #include <asm/cpu/dac.h> |
17 | #include <asm/pm.h> | 17 | #include <asm/pm.h> |
18 | 18 | ||
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c index 2d3a5b4faf58..b5a96649ed26 100644 --- a/arch/sh/boards/hp6xx/setup.c +++ b/arch/sh/boards/hp6xx/setup.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <asm/hd64461.h> | 13 | #include <asm/hd64461.h> |
14 | #include <asm/io.h> | 14 | #include <asm/io.h> |
15 | #include <asm/irq.h> | 15 | #include <asm/irq.h> |
16 | #include <asm/hp6xx/hp6xx.h> | 16 | #include <asm/hp6xx.h> |
17 | #include <asm/cpu/dac.h> | 17 | #include <asm/cpu/dac.h> |
18 | 18 | ||
19 | #define SCPCR 0xa4000116 | 19 | #define SCPCR 0xa4000116 |
diff --git a/arch/sh/boards/landisk/irq.c b/arch/sh/boards/landisk/irq.c index 8f2e1c68b90f..3eba6d086d7f 100644 --- a/arch/sh/boards/landisk/irq.c +++ b/arch/sh/boards/landisk/irq.c | |||
@@ -16,8 +16,8 @@ | |||
16 | */ | 16 | */ |
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | #include <asm/io.h> | 19 | #include <linux/interrupt.h> |
20 | #include <asm/irq.h> | 20 | #include <linux/io.h> |
21 | #include <asm/landisk/iodata_landisk.h> | 21 | #include <asm/landisk/iodata_landisk.h> |
22 | 22 | ||
23 | static void enable_landisk_irq(unsigned int irq); | 23 | static void enable_landisk_irq(unsigned int irq); |
diff --git a/arch/sh/boards/renesas/hs7751rvoip/io.c b/arch/sh/boards/renesas/hs7751rvoip/io.c index 51f3f6574210..bb9aa0d62852 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/io.c +++ b/arch/sh/boards/renesas/hs7751rvoip/io.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include <asm/hs7751rvoip/hs7751rvoip.h> | 18 | #include <asm/hs7751rvoip.h> |
19 | #include <asm/addrspace.h> | 19 | #include <asm/addrspace.h> |
20 | 20 | ||
21 | extern void *area6_io8_base; /* Area 6 8bit I/O Base address */ | 21 | extern void *area6_io8_base; /* Area 6 8bit I/O Base address */ |
diff --git a/arch/sh/boards/renesas/hs7751rvoip/irq.c b/arch/sh/boards/renesas/hs7751rvoip/irq.c index c617b188258a..943f93aa6052 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/irq.c +++ b/arch/sh/boards/renesas/hs7751rvoip/irq.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
17 | #include <asm/hs7751rvoip/hs7751rvoip.h> | 17 | #include <asm/hs7751rvoip.h> |
18 | 18 | ||
19 | static int mask_pos[] = {8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6, 7}; | 19 | static int mask_pos[] = {8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6, 7}; |
20 | 20 | ||
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c index 0414c15c3458..f7d0e304d899 100644 --- a/arch/sh/boards/renesas/hs7751rvoip/setup.c +++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c | |||
@@ -10,22 +10,21 @@ | |||
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <linux/irq.h> | 11 | #include <linux/irq.h> |
12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
13 | #include <linux/vmalloc.h> | ||
14 | #include <linux/hdreg.h> | ||
15 | #include <linux/ide.h> | ||
16 | #include <linux/pm.h> | 13 | #include <linux/pm.h> |
14 | #include <asm/hs7751rvoip.h> | ||
17 | #include <asm/io.h> | 15 | #include <asm/io.h> |
18 | #include <asm/hs7751rvoip/hs7751rvoip.h> | ||
19 | #include <asm/machvec.h> | 16 | #include <asm/machvec.h> |
20 | #include <asm/rtc.h> | ||
21 | #include <asm/irq.h> | ||
22 | 17 | ||
23 | static void __init hs7751rvoip_init_irq(void) | 18 | static struct ipr_data hs77501rvoip_ipr_map[] = { |
24 | { | ||
25 | #if defined(CONFIG_HS7751RVOIP_CODEC) | 19 | #if defined(CONFIG_HS7751RVOIP_CODEC) |
26 | make_ipr_irq(DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 20 | { DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
27 | make_ipr_irq(DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 21 | { DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
28 | #endif | 22 | #endif |
23 | }; | ||
24 | |||
25 | static void __init hs7751rvoip_init_irq(void) | ||
26 | { | ||
27 | make_ipr_irq(hs77501rvoip_ipr_map, ARRAY_SIZE(hs77501rvoip_ipr_map)); | ||
29 | 28 | ||
30 | init_hs7751rvoip_IRQ(); | 29 | init_hs7751rvoip_IRQ(); |
31 | } | 30 | } |
diff --git a/arch/sh/boards/renesas/r7780rp/Makefile b/arch/sh/boards/renesas/r7780rp/Makefile index f1776d027978..574b0316ed56 100644 --- a/arch/sh/boards/renesas/r7780rp/Makefile +++ b/arch/sh/boards/renesas/r7780rp/Makefile | |||
@@ -3,4 +3,6 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := setup.o io.o irq.o | 5 | obj-y := setup.o io.o irq.o |
6 | obj-$(CONFIG_HEARTBEAT) += led.o | 6 | |
7 | obj-$(CONFIG_HEARTBEAT) += led.o | ||
8 | obj-$(CONFIG_PUSH_SWITCH) += psw.o | ||
diff --git a/arch/sh/boards/renesas/r7780rp/io.c b/arch/sh/boards/renesas/r7780rp/io.c index db92d6e6ae99..311ccccba718 100644 --- a/arch/sh/boards/renesas/r7780rp/io.c +++ b/arch/sh/boards/renesas/r7780rp/io.c | |||
@@ -11,7 +11,7 @@ | |||
11 | #include <linux/pci.h> | 11 | #include <linux/pci.h> |
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <asm/r7780rp/r7780rp.h> | 14 | #include <asm/r7780rp.h> |
15 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
16 | #include <asm/io.h> | 16 | #include <asm/io.h> |
17 | 17 | ||
diff --git a/arch/sh/boards/renesas/r7780rp/irq.c b/arch/sh/boards/renesas/r7780rp/irq.c index b544772cbc72..cc381e197783 100644 --- a/arch/sh/boards/renesas/r7780rp/irq.c +++ b/arch/sh/boards/renesas/r7780rp/irq.c | |||
@@ -10,7 +10,9 @@ | |||
10 | */ | 10 | */ |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
13 | #include <asm/io.h> | 13 | #include <linux/interrupt.h> |
14 | #include <linux/io.h> | ||
15 | #include <asm/r7780rp.h> | ||
14 | 16 | ||
15 | #ifdef CONFIG_SH_R7780MP | 17 | #ifdef CONFIG_SH_R7780MP |
16 | static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0}; | 18 | static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0}; |
@@ -32,7 +34,7 @@ static void disable_r7780rp_irq(unsigned int irq) | |||
32 | } | 34 | } |
33 | 35 | ||
34 | static struct irq_chip r7780rp_irq_chip __read_mostly = { | 36 | static struct irq_chip r7780rp_irq_chip __read_mostly = { |
35 | .name = "r7780rp", | 37 | .name = "R7780RP", |
36 | .mask = disable_r7780rp_irq, | 38 | .mask = disable_r7780rp_irq, |
37 | .unmask = enable_r7780rp_irq, | 39 | .unmask = enable_r7780rp_irq, |
38 | .mask_ack = disable_r7780rp_irq, | 40 | .mask_ack = disable_r7780rp_irq, |
@@ -47,8 +49,8 @@ void __init init_r7780rp_IRQ(void) | |||
47 | 49 | ||
48 | for (i = 0; i < 15; i++) { | 50 | for (i = 0; i < 15; i++) { |
49 | disable_irq_nosync(i); | 51 | disable_irq_nosync(i); |
50 | set_irq_chip_and_handler(i, &r7780rp_irq_chip, | 52 | set_irq_chip_and_handler_name(i, &r7780rp_irq_chip, |
51 | handle_level_irq); | 53 | handle_level_irq, "level"); |
52 | enable_r7780rp_irq(i); | 54 | enable_r7780rp_irq(i); |
53 | } | 55 | } |
54 | } | 56 | } |
diff --git a/arch/sh/boards/renesas/r7780rp/psw.c b/arch/sh/boards/renesas/r7780rp/psw.c new file mode 100644 index 000000000000..c844dfa5d58d --- /dev/null +++ b/arch/sh/boards/renesas/r7780rp/psw.c | |||
@@ -0,0 +1,122 @@ | |||
1 | /* | ||
2 | * arch/sh/boards/renesas/r7780rp/psw.c | ||
3 | * | ||
4 | * push switch support for RDBRP-1/RDBREVRP-1 debug boards. | ||
5 | * | ||
6 | * Copyright (C) 2006 Paul Mundt | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | #include <linux/io.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <asm/mach/r7780rp.h> | ||
17 | #include <asm/push-switch.h> | ||
18 | |||
19 | static irqreturn_t psw_irq_handler(int irq, void *arg) | ||
20 | { | ||
21 | struct platform_device *pdev = arg; | ||
22 | struct push_switch *psw = platform_get_drvdata(pdev); | ||
23 | struct push_switch_platform_info *psw_info = pdev->dev.platform_data; | ||
24 | unsigned int l, mask; | ||
25 | int ret = 0; | ||
26 | |||
27 | l = ctrl_inw(PA_DBSW); | ||
28 | |||
29 | /* Nothing to do if there's no state change */ | ||
30 | if (psw->state) { | ||
31 | ret = 1; | ||
32 | goto out; | ||
33 | } | ||
34 | |||
35 | mask = l & 0x70; | ||
36 | /* Figure out who raised it */ | ||
37 | if (mask & (1 << psw_info->bit)) { | ||
38 | psw->state = !!(mask & (1 << psw_info->bit)); | ||
39 | if (psw->state) /* debounce */ | ||
40 | mod_timer(&psw->debounce, jiffies + 50); | ||
41 | |||
42 | ret = 1; | ||
43 | } | ||
44 | |||
45 | out: | ||
46 | /* Clear the switch IRQs */ | ||
47 | l |= (0x7 << 12); | ||
48 | ctrl_outw(l, PA_DBSW); | ||
49 | |||
50 | return IRQ_RETVAL(ret); | ||
51 | } | ||
52 | |||
53 | static struct resource psw_resources[] = { | ||
54 | [0] = { | ||
55 | .start = IRQ_PSW, | ||
56 | .flags = IORESOURCE_IRQ, | ||
57 | }, | ||
58 | }; | ||
59 | |||
60 | static struct push_switch_platform_info s2_platform_data = { | ||
61 | .name = "s2", | ||
62 | .bit = 6, | ||
63 | .irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | | ||
64 | IRQF_SHARED, | ||
65 | .irq_handler = psw_irq_handler, | ||
66 | }; | ||
67 | |||
68 | static struct platform_device s2_switch_device = { | ||
69 | .name = "push-switch", | ||
70 | .id = 0, | ||
71 | .num_resources = ARRAY_SIZE(psw_resources), | ||
72 | .resource = psw_resources, | ||
73 | .dev = { | ||
74 | .platform_data = &s2_platform_data, | ||
75 | }, | ||
76 | }; | ||
77 | |||
78 | static struct push_switch_platform_info s3_platform_data = { | ||
79 | .name = "s3", | ||
80 | .bit = 5, | ||
81 | .irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | | ||
82 | IRQF_SHARED, | ||
83 | .irq_handler = psw_irq_handler, | ||
84 | }; | ||
85 | |||
86 | static struct platform_device s3_switch_device = { | ||
87 | .name = "push-switch", | ||
88 | .id = 1, | ||
89 | .num_resources = ARRAY_SIZE(psw_resources), | ||
90 | .resource = psw_resources, | ||
91 | .dev = { | ||
92 | .platform_data = &s3_platform_data, | ||
93 | }, | ||
94 | }; | ||
95 | |||
96 | static struct push_switch_platform_info s4_platform_data = { | ||
97 | .name = "s4", | ||
98 | .bit = 4, | ||
99 | .irq_flags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | | ||
100 | IRQF_SHARED, | ||
101 | .irq_handler = psw_irq_handler, | ||
102 | }; | ||
103 | |||
104 | static struct platform_device s4_switch_device = { | ||
105 | .name = "push-switch", | ||
106 | .id = 2, | ||
107 | .num_resources = ARRAY_SIZE(psw_resources), | ||
108 | .resource = psw_resources, | ||
109 | .dev = { | ||
110 | .platform_data = &s4_platform_data, | ||
111 | }, | ||
112 | }; | ||
113 | |||
114 | static struct platform_device *psw_devices[] = { | ||
115 | &s2_switch_device, &s3_switch_device, &s4_switch_device, | ||
116 | }; | ||
117 | |||
118 | static int __init psw_init(void) | ||
119 | { | ||
120 | return platform_add_devices(psw_devices, ARRAY_SIZE(psw_devices)); | ||
121 | } | ||
122 | module_init(psw_init); | ||
diff --git a/arch/sh/boards/renesas/r7780rp/setup.c b/arch/sh/boards/renesas/r7780rp/setup.c index b941aa0aa34e..9f89c8de9db9 100644 --- a/arch/sh/boards/renesas/r7780rp/setup.c +++ b/arch/sh/boards/renesas/r7780rp/setup.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
15 | #include <asm/machvec.h> | 15 | #include <asm/machvec.h> |
16 | #include <asm/r7780rp/r7780rp.h> | 16 | #include <asm/r7780rp.h> |
17 | #include <asm/clock.h> | 17 | #include <asm/clock.h> |
18 | #include <asm/io.h> | 18 | #include <asm/io.h> |
19 | 19 | ||
@@ -44,8 +44,37 @@ static struct platform_device m66596_usb_host_device = { | |||
44 | .resource = m66596_usb_host_resources, | 44 | .resource = m66596_usb_host_resources, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static struct resource cf_ide_resources[] = { | ||
48 | [0] = { | ||
49 | .start = 0x1f0, | ||
50 | .end = 0x1f0 + 8, | ||
51 | .flags = IORESOURCE_IO, | ||
52 | }, | ||
53 | [1] = { | ||
54 | .start = 0x1f0 + 0x206, | ||
55 | .end = 0x1f0 + 8 + 0x206 + 8, | ||
56 | .flags = IORESOURCE_IO, | ||
57 | }, | ||
58 | [2] = { | ||
59 | #ifdef CONFIG_SH_R7780MP | ||
60 | .start = 1, | ||
61 | #else | ||
62 | .start = 4, | ||
63 | #endif | ||
64 | .flags = IORESOURCE_IRQ, | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | static struct platform_device cf_ide_device = { | ||
69 | .name = "pata_platform", | ||
70 | .id = -1, | ||
71 | .num_resources = ARRAY_SIZE(cf_ide_resources), | ||
72 | .resource = cf_ide_resources, | ||
73 | }; | ||
74 | |||
47 | static struct platform_device *r7780rp_devices[] __initdata = { | 75 | static struct platform_device *r7780rp_devices[] __initdata = { |
48 | &m66596_usb_host_device, | 76 | &m66596_usb_host_device, |
77 | &cf_ide_device, | ||
49 | }; | 78 | }; |
50 | 79 | ||
51 | static int __init r7780rp_devices_setup(void) | 80 | static int __init r7780rp_devices_setup(void) |
diff --git a/arch/sh/boards/renesas/rts7751r2d/io.c b/arch/sh/boards/renesas/rts7751r2d/io.c index 135aa0b5e62d..f2507a804979 100644 --- a/arch/sh/boards/renesas/rts7751r2d/io.c +++ b/arch/sh/boards/renesas/rts7751r2d/io.c | |||
@@ -11,8 +11,8 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
14 | #include <asm/rts7751r2d/rts7751r2d.h> | 14 | #include <linux/io.h> |
15 | #include <asm/io.h> | 15 | #include <asm/rts7751r2d.h> |
16 | #include <asm/addrspace.h> | 16 | #include <asm/addrspace.h> |
17 | 17 | ||
18 | /* | 18 | /* |
diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c index c915e7a3693a..cb0eb20d1b43 100644 --- a/arch/sh/boards/renesas/rts7751r2d/irq.c +++ b/arch/sh/boards/renesas/rts7751r2d/irq.c | |||
@@ -8,12 +8,10 @@ | |||
8 | * Modified for RTS7751R2D by | 8 | * Modified for RTS7751R2D by |
9 | * Atom Create Engineering Co., Ltd. 2002. | 9 | * Atom Create Engineering Co., Ltd. 2002. |
10 | */ | 10 | */ |
11 | |||
12 | #include <linux/init.h> | 11 | #include <linux/init.h> |
13 | #include <linux/irq.h> | 12 | #include <linux/irq.h> |
14 | #include <asm/io.h> | 13 | #include <linux/io.h> |
15 | #include <asm/irq.h> | 14 | #include <asm/rts7751r2d.h> |
16 | #include <asm/rts7751r2d/rts7751r2d.h> | ||
17 | 15 | ||
18 | #if defined(CONFIG_RTS7751R2D_REV11) | 16 | #if defined(CONFIG_RTS7751R2D_REV11) |
19 | static int mask_pos[] = {11, 9, 8, 12, 10, 6, 5, 4, 7, 14, 13, 0, 0, 0, 0}; | 17 | static int mask_pos[] = {11, 9, 8, 12, 10, 6, 5, 4, 7, 14, 13, 0, 0, 0, 0}; |
diff --git a/arch/sh/boards/renesas/rts7751r2d/led.c b/arch/sh/boards/renesas/rts7751r2d/led.c index a7ce66c1e4f0..509f548bdce0 100644 --- a/arch/sh/boards/renesas/rts7751r2d/led.c +++ b/arch/sh/boards/renesas/rts7751r2d/led.c | |||
@@ -8,13 +8,9 @@ | |||
8 | * | 8 | * |
9 | * This file contains Renesas Technology Sales RTS7751R2D specific LED code. | 9 | * This file contains Renesas Technology Sales RTS7751R2D specific LED code. |
10 | */ | 10 | */ |
11 | 11 | #include <linux/io.h> | |
12 | #include <asm/io.h> | ||
13 | #include <asm/rts7751r2d/rts7751r2d.h> | ||
14 | |||
15 | #ifdef CONFIG_HEARTBEAT | ||
16 | |||
17 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <asm/rts7751r2d.h> | ||
18 | 14 | ||
19 | /* Cycle the LED's in the clasic Knightriger/Sun pattern */ | 15 | /* Cycle the LED's in the clasic Knightriger/Sun pattern */ |
20 | void heartbeat_rts7751r2d(void) | 16 | void heartbeat_rts7751r2d(void) |
@@ -46,10 +42,3 @@ void heartbeat_rts7751r2d(void) | |||
46 | else | 42 | else |
47 | bit--; | 43 | bit--; |
48 | } | 44 | } |
49 | #endif /* CONFIG_HEARTBEAT */ | ||
50 | |||
51 | void rts7751r2d_led(unsigned short value) | ||
52 | { | ||
53 | ctrl_outw(value, PA_OUTPORT); | ||
54 | } | ||
55 | |||
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 20597a6e6702..5c042d35ec91 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -12,9 +12,9 @@ | |||
12 | #include <linux/platform_device.h> | 12 | #include <linux/platform_device.h> |
13 | #include <linux/serial_8250.h> | 13 | #include <linux/serial_8250.h> |
14 | #include <linux/pm.h> | 14 | #include <linux/pm.h> |
15 | #include <asm/io.h> | ||
16 | #include <asm/machvec.h> | 15 | #include <asm/machvec.h> |
17 | #include <asm/mach/rts7751r2d.h> | 16 | #include <asm/mach/rts7751r2d.h> |
17 | #include <asm/io.h> | ||
18 | #include <asm/voyagergx.h> | 18 | #include <asm/voyagergx.h> |
19 | 19 | ||
20 | extern void heartbeat_rts7751r2d(void); | 20 | extern void heartbeat_rts7751r2d(void); |
diff --git a/arch/sh/boards/renesas/sh7710voipgw/setup.c b/arch/sh/boards/renesas/sh7710voipgw/setup.c index e57e7afab8c6..180810b12107 100644 --- a/arch/sh/boards/renesas/sh7710voipgw/setup.c +++ b/arch/sh/boards/renesas/sh7710voipgw/setup.c | |||
@@ -13,6 +13,51 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
15 | 15 | ||
16 | static struct ipr_data sh7710voipgw_ipr_map[] = { | ||
17 | { TIMER2_IRQ, TIMER2_IPR_ADDR, TIMER2_IPR_POS, TIMER2_PRIORITY }, | ||
18 | { WDT_IRQ, WDT_IPR_ADDR, WDT_IPR_POS, WDT_PRIORITY }, | ||
19 | |||
20 | /* SCIF0 */ | ||
21 | { SCIF0_ERI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, | ||
22 | { SCIF0_RXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, | ||
23 | { SCIF0_BRI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, | ||
24 | { SCIF0_TXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY }, | ||
25 | |||
26 | /* DMAC-1 */ | ||
27 | { DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
28 | { DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
29 | { DMTE2_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
30 | { DMTE3_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
31 | |||
32 | /* DMAC-2 */ | ||
33 | { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
34 | { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
35 | |||
36 | /* IPSEC */ | ||
37 | { IPSEC_IRQ, IPSEC_IPR_ADDR, IPSEC_IPR_POS, IPSEC_PRIORITY }, | ||
38 | |||
39 | /* EDMAC */ | ||
40 | { EDMAC0_IRQ, EDMAC0_IPR_ADDR, EDMAC0_IPR_POS, EDMAC0_PRIORITY }, | ||
41 | { EDMAC1_IRQ, EDMAC1_IPR_ADDR, EDMAC1_IPR_POS, EDMAC1_PRIORITY }, | ||
42 | { EDMAC2_IRQ, EDMAC2_IPR_ADDR, EDMAC2_IPR_POS, EDMAC2_PRIORITY }, | ||
43 | |||
44 | /* SIOF0 */ | ||
45 | { SIOF0_ERI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
46 | { SIOF0_TXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
47 | { SIOF0_RXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
48 | { SIOF0_CCI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
49 | |||
50 | /* SIOF1 */ | ||
51 | { SIOF1_ERI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY }, | ||
52 | { SIOF1_TXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY }, | ||
53 | { SIOF1_RXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY }, | ||
54 | { SIOF1_CCI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, SIOF1_PRIORITY }, | ||
55 | |||
56 | /* SLIC IRQ's */ | ||
57 | { IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY }, | ||
58 | { IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY }, | ||
59 | }; | ||
60 | |||
16 | /* | 61 | /* |
17 | * Initialize IRQ setting | 62 | * Initialize IRQ setting |
18 | */ | 63 | */ |
@@ -37,65 +82,7 @@ static void __init sh7710voipgw_init_irq(void) | |||
37 | */ | 82 | */ |
38 | ctrl_outw(0x2aa, INTC_ICR1); | 83 | ctrl_outw(0x2aa, INTC_ICR1); |
39 | 84 | ||
40 | /* Now make IPR interrupts */ | 85 | make_ipr_irq(sh7710voipgw_ipr_map, ARRAY_SIZE(sh7710voipgw_ipr_map)); |
41 | make_ipr_irq(TIMER2_IRQ, TIMER2_IPR_ADDR, | ||
42 | TIMER2_IPR_POS, TIMER2_PRIORITY); | ||
43 | make_ipr_irq(WDT_IRQ, WDT_IPR_ADDR, WDT_IPR_POS, WDT_PRIORITY); | ||
44 | |||
45 | /* SCIF0 */ | ||
46 | make_ipr_irq(SCIF0_ERI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
47 | SCIF0_PRIORITY); | ||
48 | make_ipr_irq(SCIF0_RXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
49 | SCIF0_PRIORITY); | ||
50 | make_ipr_irq(SCIF0_BRI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
51 | SCIF0_PRIORITY); | ||
52 | make_ipr_irq(SCIF0_TXI_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, | ||
53 | SCIF0_PRIORITY); | ||
54 | |||
55 | /* DMAC-1 */ | ||
56 | make_ipr_irq(DMTE0_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
57 | make_ipr_irq(DMTE1_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
58 | make_ipr_irq(DMTE2_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
59 | make_ipr_irq(DMTE3_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | ||
60 | |||
61 | /* DMAC-2 */ | ||
62 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
63 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
64 | |||
65 | /* IPSEC */ | ||
66 | make_ipr_irq(IPSEC_IRQ, IPSEC_IPR_ADDR, IPSEC_IPR_POS, IPSEC_PRIORITY); | ||
67 | |||
68 | /* EDMAC */ | ||
69 | make_ipr_irq(EDMAC0_IRQ, EDMAC0_IPR_ADDR, EDMAC0_IPR_POS, | ||
70 | EDMAC0_PRIORITY); | ||
71 | make_ipr_irq(EDMAC1_IRQ, EDMAC1_IPR_ADDR, EDMAC1_IPR_POS, | ||
72 | EDMAC1_PRIORITY); | ||
73 | make_ipr_irq(EDMAC2_IRQ, EDMAC2_IPR_ADDR, EDMAC2_IPR_POS, | ||
74 | EDMAC2_PRIORITY); | ||
75 | |||
76 | /* SIOF0 */ | ||
77 | make_ipr_irq(SIOF0_ERI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
78 | SIOF0_PRIORITY); | ||
79 | make_ipr_irq(SIOF0_TXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
80 | SIOF0_PRIORITY); | ||
81 | make_ipr_irq(SIOF0_RXI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
82 | SIOF0_PRIORITY); | ||
83 | make_ipr_irq(SIOF0_CCI_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, | ||
84 | SIOF0_PRIORITY); | ||
85 | |||
86 | /* SIOF1 */ | ||
87 | make_ipr_irq(SIOF1_ERI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
88 | SIOF1_PRIORITY); | ||
89 | make_ipr_irq(SIOF1_TXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
90 | SIOF1_PRIORITY); | ||
91 | make_ipr_irq(SIOF1_RXI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
92 | SIOF1_PRIORITY); | ||
93 | make_ipr_irq(SIOF1_CCI_IRQ, SIOF1_IPR_ADDR, SIOF1_IPR_POS, | ||
94 | SIOF1_PRIORITY); | ||
95 | |||
96 | /* SLIC IRQ's */ | ||
97 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY); | ||
98 | make_ipr_irq(IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY); | ||
99 | } | 86 | } |
100 | 87 | ||
101 | /* | 88 | /* |
diff --git a/arch/sh/boards/se/7206/Makefile b/arch/sh/boards/se/7206/Makefile new file mode 100644 index 000000000000..63950f4f2453 --- /dev/null +++ b/arch/sh/boards/se/7206/Makefile | |||
@@ -0,0 +1,7 @@ | |||
1 | # | ||
2 | # Makefile for the 7206 SolutionEngine specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y := setup.o io.o irq.o | ||
6 | obj-$(CONFIG_HEARTBEAT) += led.o | ||
7 | |||
diff --git a/arch/sh/boards/se/7206/io.c b/arch/sh/boards/se/7206/io.c new file mode 100644 index 000000000000..b557273e0cbe --- /dev/null +++ b/arch/sh/boards/se/7206/io.c | |||
@@ -0,0 +1,123 @@ | |||
1 | /* $Id: io.c,v 1.5 2004/02/22 23:08:43 kkojima Exp $ | ||
2 | * | ||
3 | * linux/arch/sh/boards/se/7206/io.c | ||
4 | * | ||
5 | * Copyright (C) 2006 Yoshinori Sato | ||
6 | * | ||
7 | * I/O routine for Hitachi 7206 SolutionEngine. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <asm/se7206.h> | ||
15 | |||
16 | |||
17 | static inline void delay(void) | ||
18 | { | ||
19 | ctrl_inw(0x20000000); /* P2 ROM Area */ | ||
20 | } | ||
21 | |||
22 | /* MS7750 requires special versions of in*, out* routines, since | ||
23 | PC-like io ports are located at upper half byte of 16-bit word which | ||
24 | can be accessed only with 16-bit wide. */ | ||
25 | |||
26 | static inline volatile __u16 * | ||
27 | port2adr(unsigned int port) | ||
28 | { | ||
29 | if (port >= 0x2000) | ||
30 | return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); | ||
31 | else if (port >= 0x300 || port < 0x310) | ||
32 | return (volatile __u16 *) (PA_SMSC + (port - 0x300)); | ||
33 | } | ||
34 | |||
35 | unsigned char se7206_inb(unsigned long port) | ||
36 | { | ||
37 | return (*port2adr(port))&0xff; | ||
38 | } | ||
39 | |||
40 | unsigned char se7206_inb_p(unsigned long port) | ||
41 | { | ||
42 | unsigned long v; | ||
43 | |||
44 | v = (*port2adr(port))&0xff; | ||
45 | delay(); | ||
46 | return v; | ||
47 | } | ||
48 | |||
49 | unsigned short se7206_inw(unsigned long port) | ||
50 | { | ||
51 | return *port2adr(port);; | ||
52 | } | ||
53 | |||
54 | unsigned int se7206_inl(unsigned long port) | ||
55 | { | ||
56 | maybebadio(port); | ||
57 | return 0; | ||
58 | } | ||
59 | |||
60 | void se7206_outb(unsigned char value, unsigned long port) | ||
61 | { | ||
62 | *(port2adr(port)) = value; | ||
63 | } | ||
64 | |||
65 | void se7206_outb_p(unsigned char value, unsigned long port) | ||
66 | { | ||
67 | *(port2adr(port)) = value; | ||
68 | delay(); | ||
69 | } | ||
70 | |||
71 | void se7206_outw(unsigned short value, unsigned long port) | ||
72 | { | ||
73 | *port2adr(port) = value; | ||
74 | } | ||
75 | |||
76 | void se7206_outl(unsigned int value, unsigned long port) | ||
77 | { | ||
78 | maybebadio(port); | ||
79 | } | ||
80 | |||
81 | void se7206_insb(unsigned long port, void *addr, unsigned long count) | ||
82 | { | ||
83 | volatile __u16 *p = port2adr(port); | ||
84 | __u8 *ap = addr; | ||
85 | |||
86 | while (count--) | ||
87 | *ap++ = *p; | ||
88 | } | ||
89 | |||
90 | void se7206_insw(unsigned long port, void *addr, unsigned long count) | ||
91 | { | ||
92 | volatile __u16 *p = port2adr(port); | ||
93 | __u16 *ap = addr; | ||
94 | while (count--) | ||
95 | *ap++ = *p; | ||
96 | } | ||
97 | |||
98 | void se7206_insl(unsigned long port, void *addr, unsigned long count) | ||
99 | { | ||
100 | maybebadio(port); | ||
101 | } | ||
102 | |||
103 | void se7206_outsb(unsigned long port, const void *addr, unsigned long count) | ||
104 | { | ||
105 | volatile __u16 *p = port2adr(port); | ||
106 | const __u8 *ap = addr; | ||
107 | |||
108 | while (count--) | ||
109 | *p = *ap++; | ||
110 | } | ||
111 | |||
112 | void se7206_outsw(unsigned long port, const void *addr, unsigned long count) | ||
113 | { | ||
114 | volatile __u16 *p = port2adr(port); | ||
115 | const __u16 *ap = addr; | ||
116 | while (count--) | ||
117 | *p = *ap++; | ||
118 | } | ||
119 | |||
120 | void se7206_outsl(unsigned long port, const void *addr, unsigned long count) | ||
121 | { | ||
122 | maybebadio(port); | ||
123 | } | ||
diff --git a/arch/sh/boards/se/7206/irq.c b/arch/sh/boards/se/7206/irq.c new file mode 100644 index 000000000000..27da88486f73 --- /dev/null +++ b/arch/sh/boards/se/7206/irq.c | |||
@@ -0,0 +1,147 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/boards/se/7206/irq.c | ||
3 | * | ||
4 | * Copyright (C) 2005,2006 Yoshinori Sato | ||
5 | * | ||
6 | * Hitachi SolutionEngine Support. | ||
7 | * | ||
8 | */ | ||
9 | #include <linux/init.h> | ||
10 | #include <linux/irq.h> | ||
11 | #include <linux/io.h> | ||
12 | #include <linux/irq.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <asm/se7206.h> | ||
15 | |||
16 | #define INTSTS0 0x31800000 | ||
17 | #define INTSTS1 0x31800002 | ||
18 | #define INTMSK0 0x31800004 | ||
19 | #define INTMSK1 0x31800006 | ||
20 | #define INTSEL 0x31800008 | ||
21 | |||
22 | #define IRQ0_IRQ 64 | ||
23 | #define IRQ1_IRQ 65 | ||
24 | #define IRQ3_IRQ 67 | ||
25 | |||
26 | #define INTC_IPR01 0xfffe0818 | ||
27 | #define INTC_ICR1 0xfffe0802 | ||
28 | |||
29 | static void disable_se7206_irq(unsigned int irq) | ||
30 | { | ||
31 | unsigned short val; | ||
32 | unsigned short mask = 0xffff ^ (0x0f << 4 * (3 - (IRQ0_IRQ - irq))); | ||
33 | unsigned short msk0,msk1; | ||
34 | |||
35 | /* Set the priority in IPR to 0 */ | ||
36 | val = ctrl_inw(INTC_IPR01); | ||
37 | val &= mask; | ||
38 | ctrl_outw(val, INTC_IPR01); | ||
39 | /* FPGA mask set */ | ||
40 | msk0 = ctrl_inw(INTMSK0); | ||
41 | msk1 = ctrl_inw(INTMSK1); | ||
42 | |||
43 | switch (irq) { | ||
44 | case IRQ0_IRQ: | ||
45 | msk0 |= 0x0010; | ||
46 | break; | ||
47 | case IRQ1_IRQ: | ||
48 | msk0 |= 0x000f; | ||
49 | break; | ||
50 | case IRQ3_IRQ: | ||
51 | msk0 |= 0x0f00; | ||
52 | msk1 |= 0x00ff; | ||
53 | break; | ||
54 | } | ||
55 | ctrl_outw(msk0, INTMSK0); | ||
56 | ctrl_outw(msk1, INTMSK1); | ||
57 | } | ||
58 | |||
59 | static void enable_se7206_irq(unsigned int irq) | ||
60 | { | ||
61 | unsigned short val; | ||
62 | unsigned short value = (0x0001 << 4 * (3 - (IRQ0_IRQ - irq))); | ||
63 | unsigned short msk0,msk1; | ||
64 | |||
65 | /* Set priority in IPR back to original value */ | ||
66 | val = ctrl_inw(INTC_IPR01); | ||
67 | val |= value; | ||
68 | ctrl_outw(val, INTC_IPR01); | ||
69 | |||
70 | /* FPGA mask reset */ | ||
71 | msk0 = ctrl_inw(INTMSK0); | ||
72 | msk1 = ctrl_inw(INTMSK1); | ||
73 | |||
74 | switch (irq) { | ||
75 | case IRQ0_IRQ: | ||
76 | msk0 &= ~0x0010; | ||
77 | break; | ||
78 | case IRQ1_IRQ: | ||
79 | msk0 &= ~0x000f; | ||
80 | break; | ||
81 | case IRQ3_IRQ: | ||
82 | msk0 &= ~0x0f00; | ||
83 | msk1 &= ~0x00ff; | ||
84 | break; | ||
85 | } | ||
86 | ctrl_outw(msk0, INTMSK0); | ||
87 | ctrl_outw(msk1, INTMSK1); | ||
88 | } | ||
89 | |||
90 | static void eoi_se7206_irq(unsigned int irq) | ||
91 | { | ||
92 | unsigned short sts0,sts1; | ||
93 | |||
94 | if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
95 | enable_se7206_irq(irq); | ||
96 | /* FPGA isr clear */ | ||
97 | sts0 = ctrl_inw(INTSTS0); | ||
98 | sts1 = ctrl_inw(INTSTS1); | ||
99 | |||
100 | switch (irq) { | ||
101 | case IRQ0_IRQ: | ||
102 | sts0 &= ~0x0010; | ||
103 | break; | ||
104 | case IRQ1_IRQ: | ||
105 | sts0 &= ~0x000f; | ||
106 | break; | ||
107 | case IRQ3_IRQ: | ||
108 | sts0 &= ~0x0f00; | ||
109 | sts1 &= ~0x00ff; | ||
110 | break; | ||
111 | } | ||
112 | ctrl_outw(sts0, INTSTS0); | ||
113 | ctrl_outw(sts1, INTSTS1); | ||
114 | } | ||
115 | |||
116 | static struct irq_chip se7206_irq_chip __read_mostly = { | ||
117 | .name = "SE7206-FPGA", | ||
118 | .mask = disable_se7206_irq, | ||
119 | .unmask = enable_se7206_irq, | ||
120 | .mask_ack = disable_se7206_irq, | ||
121 | .eoi = eoi_se7206_irq, | ||
122 | }; | ||
123 | |||
124 | static void make_se7206_irq(unsigned int irq) | ||
125 | { | ||
126 | disable_irq_nosync(irq); | ||
127 | set_irq_chip_and_handler_name(irq, &se7206_irq_chip, | ||
128 | handle_level_irq, "level"); | ||
129 | disable_se7206_irq(irq); | ||
130 | } | ||
131 | |||
132 | /* | ||
133 | * Initialize IRQ setting | ||
134 | */ | ||
135 | void __init init_se7206_IRQ(void) | ||
136 | { | ||
137 | make_se7206_irq(IRQ0_IRQ); /* SMC91C111 */ | ||
138 | make_se7206_irq(IRQ1_IRQ); /* ATA */ | ||
139 | make_se7206_irq(IRQ3_IRQ); /* SLOT / PCM */ | ||
140 | ctrl_outw(inw(INTC_ICR1) | 0x000b ,INTC_ICR1 ) ; /* ICR1 */ | ||
141 | |||
142 | /* FPGA System register setup*/ | ||
143 | ctrl_outw(0x0000,INTSTS0); /* Clear INTSTS0 */ | ||
144 | ctrl_outw(0x0000,INTSTS1); /* Clear INTSTS1 */ | ||
145 | /* IRQ0=LAN, IRQ1=ATA, IRQ3=SLT,PCM */ | ||
146 | ctrl_outw(0x0001,INTSEL); | ||
147 | } | ||
diff --git a/arch/sh/boards/se/7206/led.c b/arch/sh/boards/se/7206/led.c new file mode 100644 index 000000000000..ef794601ab86 --- /dev/null +++ b/arch/sh/boards/se/7206/led.c | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/kernel/led_se.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Stuart Menefy <stuart.menefy@st.com> | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | * This file contains Solution Engine specific LED code. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <asm/se7206.h> | ||
14 | |||
15 | #ifdef CONFIG_HEARTBEAT | ||
16 | |||
17 | #include <linux/sched.h> | ||
18 | |||
19 | /* Cycle the LED's in the clasic Knightrider/Sun pattern */ | ||
20 | void heartbeat_se(void) | ||
21 | { | ||
22 | static unsigned int cnt = 0, period = 0; | ||
23 | volatile unsigned short* p = (volatile unsigned short*)PA_LED; | ||
24 | static unsigned bit = 0, up = 1; | ||
25 | |||
26 | cnt += 1; | ||
27 | if (cnt < period) { | ||
28 | return; | ||
29 | } | ||
30 | |||
31 | cnt = 0; | ||
32 | |||
33 | /* Go through the points (roughly!): | ||
34 | * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110 | ||
35 | */ | ||
36 | period = 110 - ( (300<<FSHIFT)/ | ||
37 | ((avenrun[0]/5) + (3<<FSHIFT)) ); | ||
38 | |||
39 | if (up) { | ||
40 | if (bit == 7) { | ||
41 | bit--; | ||
42 | up=0; | ||
43 | } else { | ||
44 | bit ++; | ||
45 | } | ||
46 | } else { | ||
47 | if (bit == 0) { | ||
48 | bit++; | ||
49 | up=1; | ||
50 | } else { | ||
51 | bit--; | ||
52 | } | ||
53 | } | ||
54 | *p = 1<<(bit+8); | ||
55 | |||
56 | } | ||
57 | #endif /* CONFIG_HEARTBEAT */ | ||
diff --git a/arch/sh/boards/se/7206/setup.c b/arch/sh/boards/se/7206/setup.c new file mode 100644 index 000000000000..0f42e91a3238 --- /dev/null +++ b/arch/sh/boards/se/7206/setup.c | |||
@@ -0,0 +1,79 @@ | |||
1 | /* | ||
2 | * | ||
3 | * linux/arch/sh/boards/se/7206/setup.c | ||
4 | * | ||
5 | * Copyright (C) 2006 Yoshinori Sato | ||
6 | * | ||
7 | * Hitachi 7206 SolutionEngine Support. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/init.h> | ||
12 | #include <linux/platform_device.h> | ||
13 | #include <asm/se7206.h> | ||
14 | #include <asm/io.h> | ||
15 | #include <asm/machvec.h> | ||
16 | |||
17 | static struct resource smc91x_resources[] = { | ||
18 | [0] = { | ||
19 | .start = 0x300, | ||
20 | .end = 0x300 + 0x020 - 1, | ||
21 | .flags = IORESOURCE_MEM, | ||
22 | }, | ||
23 | [1] = { | ||
24 | .start = 64, | ||
25 | .end = 64, | ||
26 | .flags = IORESOURCE_IRQ, | ||
27 | }, | ||
28 | }; | ||
29 | |||
30 | static struct platform_device smc91x_device = { | ||
31 | .name = "smc91x", | ||
32 | .id = -1, | ||
33 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
34 | .resource = smc91x_resources, | ||
35 | }; | ||
36 | |||
37 | static int __init se7206_devices_setup(void) | ||
38 | { | ||
39 | return platform_device_register(&smc91x_device); | ||
40 | } | ||
41 | |||
42 | __initcall(se7206_devices_setup); | ||
43 | |||
44 | void heartbeat_se(void); | ||
45 | |||
46 | /* | ||
47 | * The Machine Vector | ||
48 | */ | ||
49 | |||
50 | struct sh_machine_vector mv_se __initmv = { | ||
51 | .mv_name = "SolutionEngine", | ||
52 | .mv_nr_irqs = 256, | ||
53 | .mv_inb = se7206_inb, | ||
54 | .mv_inw = se7206_inw, | ||
55 | .mv_inl = se7206_inl, | ||
56 | .mv_outb = se7206_outb, | ||
57 | .mv_outw = se7206_outw, | ||
58 | .mv_outl = se7206_outl, | ||
59 | |||
60 | .mv_inb_p = se7206_inb_p, | ||
61 | .mv_inw_p = se7206_inw, | ||
62 | .mv_inl_p = se7206_inl, | ||
63 | .mv_outb_p = se7206_outb_p, | ||
64 | .mv_outw_p = se7206_outw, | ||
65 | .mv_outl_p = se7206_outl, | ||
66 | |||
67 | .mv_insb = se7206_insb, | ||
68 | .mv_insw = se7206_insw, | ||
69 | .mv_insl = se7206_insl, | ||
70 | .mv_outsb = se7206_outsb, | ||
71 | .mv_outsw = se7206_outsw, | ||
72 | .mv_outsl = se7206_outsl, | ||
73 | |||
74 | .mv_init_irq = init_se7206_IRQ, | ||
75 | #ifdef CONFIG_HEARTBEAT | ||
76 | .mv_heartbeat = heartbeat_se, | ||
77 | #endif | ||
78 | }; | ||
79 | ALIAS_MV(se) | ||
diff --git a/arch/sh/boards/se/7300/irq.c b/arch/sh/boards/se/7300/irq.c index ad1034f98a29..1279d776d60f 100644 --- a/arch/sh/boards/se/7300/irq.c +++ b/arch/sh/boards/se/7300/irq.c | |||
@@ -13,6 +13,17 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/se7300.h> | 14 | #include <asm/se7300.h> |
15 | 15 | ||
16 | static struct ipr_data se7300_ipr_map[] = { | ||
17 | /* PC_IRQ[0-3] -> IRQ0 (32) */ | ||
18 | { IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f - IRQ0_IRQ }, | ||
19 | /* A_IRQ[0-3] -> IRQ1 (33) */ | ||
20 | { IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f - IRQ1_IRQ }, | ||
21 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
22 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
23 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
24 | { VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
25 | }; | ||
26 | |||
16 | /* | 27 | /* |
17 | * Initialize IRQ setting | 28 | * Initialize IRQ setting |
18 | */ | 29 | */ |
@@ -23,14 +34,7 @@ init_7300se_IRQ(void) | |||
23 | ctrl_outw(0xa000, INTC_ICR1); /* IRQ mode; IRQ0,1 enable. */ | 34 | ctrl_outw(0xa000, INTC_ICR1); /* IRQ mode; IRQ0,1 enable. */ |
24 | ctrl_outw(0x0000, PORT_PFCR); /* use F for IRQ[3:0] and SIU. */ | 35 | ctrl_outw(0x0000, PORT_PFCR); /* use F for IRQ[3:0] and SIU. */ |
25 | 36 | ||
26 | /* PC_IRQ[0-3] -> IRQ0 (32) */ | 37 | make_ipr_irq(se7300_ipr_map, ARRAY_SIZE(se7300_ipr_map)); |
27 | make_ipr_irq(IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, 0x0f - IRQ0_IRQ); | ||
28 | /* A_IRQ[0-3] -> IRQ1 (33) */ | ||
29 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, 0x0f - IRQ1_IRQ); | ||
30 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | ||
31 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
32 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
33 | make_ipr_irq(VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
34 | 38 | ||
35 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ | 39 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ |
36 | } | 40 | } |
diff --git a/arch/sh/boards/se/73180/irq.c b/arch/sh/boards/se/73180/irq.c index 2c62b8ea350e..e7200c56bb45 100644 --- a/arch/sh/boards/se/73180/irq.c +++ b/arch/sh/boards/se/73180/irq.c | |||
@@ -87,13 +87,38 @@ shmse_irq_demux(int irq) | |||
87 | return irq; | 87 | return irq; |
88 | } | 88 | } |
89 | 89 | ||
90 | static struct ipr_data se73180_siof0_ipr_map[] = { | ||
91 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
92 | }; | ||
93 | static struct ipr_data se73180_vpu_ipr_map[] = { | ||
94 | { VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8 }, | ||
95 | }; | ||
96 | static struct ipr_data se73180_other_ipr_map[] = { | ||
97 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
98 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
99 | { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
100 | { IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
101 | { IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
102 | { IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
103 | { IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
104 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
105 | { SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY }, | ||
106 | |||
107 | /* VIO interrupt */ | ||
108 | { CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
109 | { BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
110 | { VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
111 | |||
112 | { LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY }, | ||
113 | }; | ||
114 | |||
90 | /* | 115 | /* |
91 | * Initialize IRQ setting | 116 | * Initialize IRQ setting |
92 | */ | 117 | */ |
93 | void __init | 118 | void __init |
94 | init_73180se_IRQ(void) | 119 | init_73180se_IRQ(void) |
95 | { | 120 | { |
96 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | 121 | make_ipr_irq(se73180_siof0_ipr_map, ARRAY_SIZE(se73180_siof0_ipr_map)); |
97 | 122 | ||
98 | ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ | 123 | ctrl_outw(0x2000, 0xb03fffec); /* mrshpc irq enable */ |
99 | ctrl_outw(0x2000, 0xb07fffec); /* mrshpc irq enable */ | 124 | ctrl_outw(0x2000, 0xb07fffec); /* mrshpc irq enable */ |
@@ -101,27 +126,11 @@ init_73180se_IRQ(void) | |||
101 | ctrl_outw(2 << ((7 - 5) * 2), INTC_ICR1); /* low-level irq */ | 126 | ctrl_outw(2 << ((7 - 5) * 2), INTC_ICR1); /* low-level irq */ |
102 | make_intreq_irq(10); | 127 | make_intreq_irq(10); |
103 | 128 | ||
104 | make_ipr_irq(VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8); | 129 | make_ipr_irq(se73180_vpu_ipr_map, ARRAY_SIZE(se73180_vpu_ipr_map)); |
105 | 130 | ||
106 | ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */ | 131 | ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */ |
107 | 132 | ||
108 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | 133 | make_ipr_irq(se73180_other_ipr_map, ARRAY_SIZE(se73180_other_ipr_map)); |
109 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
110 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
111 | make_ipr_irq(IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY); | ||
112 | make_ipr_irq(IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, | ||
113 | IIC0_PRIORITY); | ||
114 | make_ipr_irq(IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, | ||
115 | IIC0_PRIORITY); | ||
116 | make_ipr_irq(IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY); | ||
117 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | ||
118 | make_ipr_irq(SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY); | ||
119 | |||
120 | /* VIO interrupt */ | ||
121 | make_ipr_irq(CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
122 | make_ipr_irq(BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
123 | make_ipr_irq(VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
124 | 134 | ||
125 | make_ipr_irq(LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY); | ||
126 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ | 135 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ |
127 | } | 136 | } |
diff --git a/arch/sh/boards/se/7343/irq.c b/arch/sh/boards/se/7343/irq.c index 288b62f59419..360153ecc55b 100644 --- a/arch/sh/boards/se/7343/irq.c +++ b/arch/sh/boards/se/7343/irq.c | |||
@@ -102,6 +102,51 @@ shmse_irq_demux(int irq) | |||
102 | static struct irqaction irq5 = { no_action, 0, CPU_MASK_NONE, "IRQ5-cascade", | 102 | static struct irqaction irq5 = { no_action, 0, CPU_MASK_NONE, "IRQ5-cascade", |
103 | NULL, NULL}; | 103 | NULL, NULL}; |
104 | 104 | ||
105 | static struct ipr_data se7343_irq5_ipr_map[] = { | ||
106 | { IRQ5_IRQ, IRQ5_IPR_ADDR+2, IRQ5_IPR_POS, IRQ5_PRIORITY }, | ||
107 | }; | ||
108 | static struct ipr_data se7343_siof0_vpu_ipr_map[] = { | ||
109 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
110 | { VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8 }, | ||
111 | }; | ||
112 | static struct ipr_data se7343_other_ipr_map[] = { | ||
113 | { DMTE0_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
114 | { DMTE1_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
115 | { DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
116 | { DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY }, | ||
117 | { DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
118 | { DMTE5_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY }, | ||
119 | |||
120 | /* I2C block */ | ||
121 | { IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
122 | { IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
123 | { IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
124 | { IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY }, | ||
125 | |||
126 | { IIC1_ALI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY }, | ||
127 | { IIC1_TACKI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY }, | ||
128 | { IIC1_WAITI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY }, | ||
129 | { IIC1_DTEI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY }, | ||
130 | |||
131 | /* SIOF */ | ||
132 | { SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY }, | ||
133 | |||
134 | /* SIU */ | ||
135 | { SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY }, | ||
136 | |||
137 | /* VIO interrupt */ | ||
138 | { CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
139 | { BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
140 | { VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY }, | ||
141 | |||
142 | /*MFI interrupt*/ | ||
143 | |||
144 | { MFI_IRQ, MFI_IPR_ADDR, MFI_IPR_POS, MFI_PRIORITY }, | ||
145 | |||
146 | /* LCD controller */ | ||
147 | { LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY }, | ||
148 | }; | ||
149 | |||
105 | /* | 150 | /* |
106 | * Initialize IRQ setting | 151 | * Initialize IRQ setting |
107 | */ | 152 | */ |
@@ -138,54 +183,17 @@ init_7343se_IRQ(void) | |||
138 | /* Setup all external interrupts to be active low */ | 183 | /* Setup all external interrupts to be active low */ |
139 | ctrl_outw(0xaaaa, INTC_ICR1); | 184 | ctrl_outw(0xaaaa, INTC_ICR1); |
140 | 185 | ||
141 | make_ipr_irq(IRQ5_IRQ, IRQ5_IPR_ADDR+2, IRQ5_IPR_POS, IRQ5_PRIORITY); | 186 | make_ipr_irq(se7343_irq5_ipr_map, ARRAY_SIZE(se7343_irq5_ipr_map)); |
187 | |||
142 | setup_irq(IRQ5_IRQ, &irq5); | 188 | setup_irq(IRQ5_IRQ, &irq5); |
143 | /* Set port control to use IRQ5 */ | 189 | /* Set port control to use IRQ5 */ |
144 | *(u16 *)0xA4050108 &= ~0xc; | 190 | *(u16 *)0xA4050108 &= ~0xc; |
145 | 191 | ||
146 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | 192 | make_ipr_irq(se7343_siof0_vpu_ipr_map, ARRAY_SIZE(se7343_siof0_vpu_ipr_map)); |
147 | make_ipr_irq(VPU_IRQ, VPU_IPR_ADDR, VPU_IPR_POS, 8); | ||
148 | 193 | ||
149 | ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */ | 194 | ctrl_outb(0x0f, INTC_IMCR5); /* enable SCIF IRQ */ |
150 | 195 | ||
151 | make_ipr_irq(DMTE0_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | 196 | make_ipr_irq(se7343_other_ipr_map, ARRAY_SIZE(se7343_other_ipr_map)); |
152 | make_ipr_irq(DMTE1_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
153 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
154 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
155 | make_ipr_irq(DMTE4_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
156 | make_ipr_irq(DMTE5_IRQ, DMA2_IPR_ADDR, DMA2_IPR_POS, DMA2_PRIORITY); | ||
157 | |||
158 | /* I2C block */ | ||
159 | make_ipr_irq(IIC0_ALI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY); | ||
160 | make_ipr_irq(IIC0_TACKI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, | ||
161 | IIC0_PRIORITY); | ||
162 | make_ipr_irq(IIC0_WAITI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, | ||
163 | IIC0_PRIORITY); | ||
164 | make_ipr_irq(IIC0_DTEI_IRQ, IIC0_IPR_ADDR, IIC0_IPR_POS, IIC0_PRIORITY); | ||
165 | |||
166 | make_ipr_irq(IIC1_ALI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY); | ||
167 | make_ipr_irq(IIC1_TACKI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, | ||
168 | IIC1_PRIORITY); | ||
169 | make_ipr_irq(IIC1_WAITI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, | ||
170 | IIC1_PRIORITY); | ||
171 | make_ipr_irq(IIC1_DTEI_IRQ, IIC1_IPR_ADDR, IIC1_IPR_POS, IIC1_PRIORITY); | ||
172 | |||
173 | /* SIOF */ | ||
174 | make_ipr_irq(SIOF0_IRQ, SIOF0_IPR_ADDR, SIOF0_IPR_POS, SIOF0_PRIORITY); | ||
175 | 197 | ||
176 | /* SIU */ | ||
177 | make_ipr_irq(SIU_IRQ, SIU_IPR_ADDR, SIU_IPR_POS, SIU_PRIORITY); | ||
178 | |||
179 | /* VIO interrupt */ | ||
180 | make_ipr_irq(CEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
181 | make_ipr_irq(BEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
182 | make_ipr_irq(VEU_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
183 | |||
184 | /*MFI interrupt*/ | ||
185 | |||
186 | make_ipr_irq(MFI_IRQ, MFI_IPR_ADDR, MFI_IPR_POS, MFI_PRIORITY); | ||
187 | |||
188 | /* LCD controller */ | ||
189 | make_ipr_irq(LCDC_IRQ, LCDC_IPR_ADDR, LCDC_IPR_POS, LCDC_PRIORITY); | ||
190 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ | 198 | ctrl_outw(0x2000, PA_MRSHPC + 0x0c); /* mrshpc irq enable */ |
191 | } | 199 | } |
diff --git a/arch/sh/boards/se/7619/Makefile b/arch/sh/boards/se/7619/Makefile new file mode 100644 index 000000000000..d21775c28cda --- /dev/null +++ b/arch/sh/boards/se/7619/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | # | ||
2 | # Makefile for the 7619 SolutionEngine specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y := setup.o | ||
diff --git a/arch/sh/boards/se/7619/setup.c b/arch/sh/boards/se/7619/setup.c new file mode 100644 index 000000000000..52d2c4d5d2fa --- /dev/null +++ b/arch/sh/boards/se/7619/setup.c | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * arch/sh/boards/se/7619/setup.c | ||
3 | * | ||
4 | * Copyright (C) 2006 Yoshinori Sato | ||
5 | * | ||
6 | * Hitachi SH7619 SolutionEngine Support. | ||
7 | */ | ||
8 | |||
9 | #include <linux/init.h> | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <asm/io.h> | ||
12 | #include <asm/machvec.h> | ||
13 | |||
14 | /* | ||
15 | * The Machine Vector | ||
16 | */ | ||
17 | |||
18 | struct sh_machine_vector mv_se __initmv = { | ||
19 | .mv_name = "SolutionEngine", | ||
20 | .mv_nr_irqs = 108, | ||
21 | }; | ||
22 | ALIAS_MV(se) | ||
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c index cff6700bbafd..fcd7cd7fa05f 100644 --- a/arch/sh/boards/se/770x/irq.c +++ b/arch/sh/boards/se/770x/irq.c | |||
@@ -13,6 +13,48 @@ | |||
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
14 | #include <asm/se.h> | 14 | #include <asm/se.h> |
15 | 15 | ||
16 | static struct ipr_data se770x_ipr_map[] = { | ||
17 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
18 | /* This is default value */ | ||
19 | { 0xf-0x2, BCR_ILCRA, 2, 0x2 }, | ||
20 | { 0xf-0xa, BCR_ILCRA, 1, 0xa }, | ||
21 | { 0xf-0x5, BCR_ILCRB, 0, 0x5 }, | ||
22 | { 0xf-0x8, BCR_ILCRC, 1, 0x8 }, | ||
23 | { 0xf-0xc, BCR_ILCRC, 0, 0xc }, | ||
24 | { 0xf-0xe, BCR_ILCRD, 3, 0xe }, | ||
25 | { 0xf-0x3, BCR_ILCRD, 1, 0x3 }, /* LAN */ | ||
26 | { 0xf-0xd, BCR_ILCRE, 2, 0xd }, | ||
27 | { 0xf-0x9, BCR_ILCRE, 1, 0x9 }, | ||
28 | { 0xf-0x1, BCR_ILCRE, 0, 0x1 }, | ||
29 | { 0xf-0xf, BCR_ILCRF, 3, 0xf }, | ||
30 | { 0xf-0xb, BCR_ILCRF, 1, 0xb }, | ||
31 | { 0xf-0x7, BCR_ILCRG, 3, 0x7 }, | ||
32 | { 0xf-0x6, BCR_ILCRG, 2, 0x6 }, | ||
33 | { 0xf-0x4, BCR_ILCRG, 1, 0x4 }, | ||
34 | #else | ||
35 | { 14, BCR_ILCRA, 2, 0x0f-14 }, | ||
36 | { 12, BCR_ILCRA, 1, 0x0f-12 }, | ||
37 | { 8, BCR_ILCRB, 1, 0x0f- 8 }, | ||
38 | { 6, BCR_ILCRC, 3, 0x0f- 6 }, | ||
39 | { 5, BCR_ILCRC, 2, 0x0f- 5 }, | ||
40 | { 4, BCR_ILCRC, 1, 0x0f- 4 }, | ||
41 | { 3, BCR_ILCRC, 0, 0x0f- 3 }, | ||
42 | { 1, BCR_ILCRD, 3, 0x0f- 1 }, | ||
43 | |||
44 | { 10, BCR_ILCRD, 1, 0x0f-10 }, /* LAN */ | ||
45 | |||
46 | { 0, BCR_ILCRE, 3, 0x0f- 0 }, /* PCIRQ3 */ | ||
47 | { 11, BCR_ILCRE, 2, 0x0f-11 }, /* PCIRQ2 */ | ||
48 | { 9, BCR_ILCRE, 1, 0x0f- 9 }, /* PCIRQ1 */ | ||
49 | { 7, BCR_ILCRE, 0, 0x0f- 7 }, /* PCIRQ0 */ | ||
50 | |||
51 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ | ||
52 | /* NOTE: #2 and #13 are not used on PC */ | ||
53 | { 13, BCR_ILCRG, 1, 0x0f-13 }, /* SLOTIRQ2 */ | ||
54 | { 2, BCR_ILCRG, 0, 0x0f- 2 }, /* SLOTIRQ1 */ | ||
55 | #endif | ||
56 | }; | ||
57 | |||
16 | /* | 58 | /* |
17 | * Initialize IRQ setting | 59 | * Initialize IRQ setting |
18 | */ | 60 | */ |
@@ -38,42 +80,6 @@ void __init init_se_IRQ(void) | |||
38 | ctrl_outw(0, BCR_ILCRE); | 80 | ctrl_outw(0, BCR_ILCRE); |
39 | ctrl_outw(0, BCR_ILCRF); | 81 | ctrl_outw(0, BCR_ILCRF); |
40 | ctrl_outw(0, BCR_ILCRG); | 82 | ctrl_outw(0, BCR_ILCRG); |
41 | /* This is default value */ | ||
42 | make_ipr_irq(0xf-0x2, BCR_ILCRA, 2, 0x2); | ||
43 | make_ipr_irq(0xf-0xa, BCR_ILCRA, 1, 0xa); | ||
44 | make_ipr_irq(0xf-0x5, BCR_ILCRB, 0, 0x5); | ||
45 | make_ipr_irq(0xf-0x8, BCR_ILCRC, 1, 0x8); | ||
46 | make_ipr_irq(0xf-0xc, BCR_ILCRC, 0, 0xc); | ||
47 | make_ipr_irq(0xf-0xe, BCR_ILCRD, 3, 0xe); | ||
48 | make_ipr_irq(0xf-0x3, BCR_ILCRD, 1, 0x3); /* LAN */ | ||
49 | make_ipr_irq(0xf-0xd, BCR_ILCRE, 2, 0xd); | ||
50 | make_ipr_irq(0xf-0x9, BCR_ILCRE, 1, 0x9); | ||
51 | make_ipr_irq(0xf-0x1, BCR_ILCRE, 0, 0x1); | ||
52 | make_ipr_irq(0xf-0xf, BCR_ILCRF, 3, 0xf); | ||
53 | make_ipr_irq(0xf-0xb, BCR_ILCRF, 1, 0xb); | ||
54 | make_ipr_irq(0xf-0x7, BCR_ILCRG, 3, 0x7); | ||
55 | make_ipr_irq(0xf-0x6, BCR_ILCRG, 2, 0x6); | ||
56 | make_ipr_irq(0xf-0x4, BCR_ILCRG, 1, 0x4); | ||
57 | #else | ||
58 | make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14); | ||
59 | make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12); | ||
60 | make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8); | ||
61 | make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6); | ||
62 | make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5); | ||
63 | make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4); | ||
64 | make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3); | ||
65 | make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1); | ||
66 | |||
67 | make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */ | ||
68 | |||
69 | make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */ | ||
70 | make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */ | ||
71 | make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */ | ||
72 | make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */ | ||
73 | |||
74 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ | ||
75 | /* NOTE: #2 and #13 are not used on PC */ | ||
76 | make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */ | ||
77 | make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */ | ||
78 | #endif | 83 | #endif |
84 | make_ipr_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); | ||
79 | } | 85 | } |
diff --git a/arch/sh/boards/se/7751/irq.c b/arch/sh/boards/se/7751/irq.c index c607b0a48479..e4c63a48296c 100644 --- a/arch/sh/boards/se/7751/irq.c +++ b/arch/sh/boards/se/7751/irq.c | |||
@@ -14,53 +14,50 @@ | |||
14 | #include <asm/irq.h> | 14 | #include <asm/irq.h> |
15 | #include <asm/se7751.h> | 15 | #include <asm/se7751.h> |
16 | 16 | ||
17 | /* | 17 | static struct ipr_data se7751_ipr_map[] = { |
18 | * Initialize IRQ setting | ||
19 | */ | ||
20 | void __init init_7751se_IRQ(void) | ||
21 | { | ||
22 | |||
23 | /* Leave old Solution Engine code in for reference. */ | 18 | /* Leave old Solution Engine code in for reference. */ |
24 | #if defined(CONFIG_SH_SOLUTION_ENGINE) | 19 | #if defined(CONFIG_SH_SOLUTION_ENGINE) |
25 | /* | 20 | /* |
26 | * Super I/O (Just mimic PC): | 21 | * Super I/O (Just mimic PC): |
27 | * 1: keyboard | 22 | * 1: keyboard |
28 | * 3: serial 0 | 23 | * 3: serial 0 |
29 | * 4: serial 1 | 24 | * 4: serial 1 |
30 | * 5: printer | 25 | * 5: printer |
31 | * 6: floppy | 26 | * 6: floppy |
32 | * 8: rtc | 27 | * 8: rtc |
33 | * 12: mouse | 28 | * 12: mouse |
34 | * 14: ide0 | 29 | * 14: ide0 |
35 | */ | 30 | */ |
36 | make_ipr_irq(14, BCR_ILCRA, 2, 0x0f-14); | 31 | { 14, BCR_ILCRA, 2, 0x0f-14 }, |
37 | make_ipr_irq(12, BCR_ILCRA, 1, 0x0f-12); | 32 | { 12, BCR_ILCRA, 1, 0x0f-12 }, |
38 | make_ipr_irq( 8, BCR_ILCRB, 1, 0x0f- 8); | 33 | { 8, BCR_ILCRB, 1, 0x0f- 8 }, |
39 | make_ipr_irq( 6, BCR_ILCRC, 3, 0x0f- 6); | 34 | { 6, BCR_ILCRC, 3, 0x0f- 6 }, |
40 | make_ipr_irq( 5, BCR_ILCRC, 2, 0x0f- 5); | 35 | { 5, BCR_ILCRC, 2, 0x0f- 5 }, |
41 | make_ipr_irq( 4, BCR_ILCRC, 1, 0x0f- 4); | 36 | { 4, BCR_ILCRC, 1, 0x0f- 4 }, |
42 | make_ipr_irq( 3, BCR_ILCRC, 0, 0x0f- 3); | 37 | { 3, BCR_ILCRC, 0, 0x0f- 3 }, |
43 | make_ipr_irq( 1, BCR_ILCRD, 3, 0x0f- 1); | 38 | { 1, BCR_ILCRD, 3, 0x0f- 1 }, |
44 | 39 | ||
45 | make_ipr_irq(10, BCR_ILCRD, 1, 0x0f-10); /* LAN */ | 40 | { 10, BCR_ILCRD, 1, 0x0f-10 }, /* LAN */ |
46 | 41 | ||
47 | make_ipr_irq( 0, BCR_ILCRE, 3, 0x0f- 0); /* PCIRQ3 */ | 42 | { 0, BCR_ILCRE, 3, 0x0f- 0 }, /* PCIRQ3 */ |
48 | make_ipr_irq(11, BCR_ILCRE, 2, 0x0f-11); /* PCIRQ2 */ | 43 | { 11, BCR_ILCRE, 2, 0x0f-11 }, /* PCIRQ2 */ |
49 | make_ipr_irq( 9, BCR_ILCRE, 1, 0x0f- 9); /* PCIRQ1 */ | 44 | { 9, BCR_ILCRE, 1, 0x0f- 9 }, /* PCIRQ1 */ |
50 | make_ipr_irq( 7, BCR_ILCRE, 0, 0x0f- 7); /* PCIRQ0 */ | 45 | { 7, BCR_ILCRE, 0, 0x0f- 7 }, /* PCIRQ0 */ |
51 | 46 | ||
52 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ | 47 | /* #2, #13 are allocated for SLOT IRQ #1 and #2 (for now) */ |
53 | /* NOTE: #2 and #13 are not used on PC */ | 48 | /* NOTE: #2 and #13 are not used on PC */ |
54 | make_ipr_irq(13, BCR_ILCRG, 1, 0x0f-13); /* SLOTIRQ2 */ | 49 | { 13, BCR_ILCRG, 1, 0x0f-13 }, /* SLOTIRQ2 */ |
55 | make_ipr_irq( 2, BCR_ILCRG, 0, 0x0f- 2); /* SLOTIRQ1 */ | 50 | { 2, BCR_ILCRG, 0, 0x0f- 2 }, /* SLOTIRQ1 */ |
56 | |||
57 | #elif defined(CONFIG_SH_7751_SOLUTION_ENGINE) | 51 | #elif defined(CONFIG_SH_7751_SOLUTION_ENGINE) |
58 | 52 | { 13, BCR_ILCRD, 3, 2 }, | |
59 | make_ipr_irq(13, BCR_ILCRD, 3, 2); | 53 | /* Add additional entries here as drivers are added and tested. */ |
60 | |||
61 | /* Add additional calls to make_ipr_irq() as drivers are added | ||
62 | * and tested. | ||
63 | */ | ||
64 | #endif | 54 | #endif |
55 | }; | ||
65 | 56 | ||
57 | /* | ||
58 | * Initialize IRQ setting | ||
59 | */ | ||
60 | void __init init_7751se_IRQ(void) | ||
61 | { | ||
62 | make_ipr_irq(se7751_ipr_map, ARRAY_SIZE(se7751_ipr_map)); | ||
66 | } | 63 | } |
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c index 137e2ba9243e..5ad1e19771be 100644 --- a/arch/sh/boards/sh03/setup.c +++ b/arch/sh/boards/sh03/setup.c | |||
@@ -14,14 +14,17 @@ | |||
14 | #include <asm/sh03/sh03.h> | 14 | #include <asm/sh03/sh03.h> |
15 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
16 | 16 | ||
17 | static struct ipr_data sh03_ipr_map[] = { | ||
18 | { IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY }, | ||
19 | { IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY }, | ||
20 | { IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY }, | ||
21 | { IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY }, | ||
22 | }; | ||
23 | |||
17 | static void __init init_sh03_IRQ(void) | 24 | static void __init init_sh03_IRQ(void) |
18 | { | 25 | { |
19 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | 26 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); |
20 | 27 | make_ipr_irq(sh03_ipr_map, ARRAY_SIZE(sh03_ipr_map)); | |
21 | make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); | ||
22 | make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); | ||
23 | make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); | ||
24 | make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); | ||
25 | } | 28 | } |
26 | 29 | ||
27 | extern void *cf_io_base; | 30 | extern void *cf_io_base; |
diff --git a/arch/sh/boards/shmin/setup.c b/arch/sh/boards/shmin/setup.c index 2f0c19706cf9..a31a1d1e2681 100644 --- a/arch/sh/boards/shmin/setup.c +++ b/arch/sh/boards/shmin/setup.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
9 | #include <asm/machvec.h> | 9 | #include <asm/machvec.h> |
10 | #include <asm/shmin/shmin.h> | 10 | #include <asm/shmin.h> |
11 | #include <asm/clock.h> | 11 | #include <asm/clock.h> |
12 | #include <asm/irq.h> | 12 | #include <asm/irq.h> |
13 | #include <asm/io.h> | 13 | #include <asm/io.h> |
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c index 540d0bf16446..650fb3645947 100644 --- a/arch/sh/boards/snapgear/setup.c +++ b/arch/sh/boards/snapgear/setup.c | |||
@@ -68,6 +68,13 @@ module_init(eraseconfig_init); | |||
68 | * IRL3 = crypto | 68 | * IRL3 = crypto |
69 | */ | 69 | */ |
70 | 70 | ||
71 | static struct ipr_data snapgear_ipr_map[] = { | ||
72 | make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); | ||
73 | make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); | ||
74 | make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); | ||
75 | make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); | ||
76 | }; | ||
77 | |||
71 | static void __init init_snapgear_IRQ(void) | 78 | static void __init init_snapgear_IRQ(void) |
72 | { | 79 | { |
73 | /* enable individual interrupt mode for externals */ | 80 | /* enable individual interrupt mode for externals */ |
@@ -75,10 +82,7 @@ static void __init init_snapgear_IRQ(void) | |||
75 | 82 | ||
76 | printk("Setup SnapGear IRQ/IPR ...\n"); | 83 | printk("Setup SnapGear IRQ/IPR ...\n"); |
77 | 84 | ||
78 | make_ipr_irq(IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); | 85 | make_ipr_irq(snapgear_ipr_map, ARRAY_SIZE(snapgear_ipr_map)); |
79 | make_ipr_irq(IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); | ||
80 | make_ipr_irq(IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); | ||
81 | make_ipr_irq(IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); | ||
82 | } | 86 | } |
83 | 87 | ||
84 | /* | 88 | /* |
diff --git a/arch/sh/boards/titan/setup.c b/arch/sh/boards/titan/setup.c index 52b66d8b8d2a..6bcd939bfaed 100644 --- a/arch/sh/boards/titan/setup.c +++ b/arch/sh/boards/titan/setup.c | |||
@@ -1,23 +1,31 @@ | |||
1 | /* | 1 | /* |
2 | * Setup for Titan | 2 | * arch/sh/boards/titan/setup.c - Setup for Titan |
3 | * | ||
4 | * Copyright (C) 2006 Jamie Lenehan | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
3 | */ | 9 | */ |
4 | |||
5 | #include <linux/init.h> | 10 | #include <linux/init.h> |
6 | #include <asm/irq.h> | 11 | #include <linux/irq.h> |
7 | #include <asm/titan.h> | 12 | #include <asm/titan.h> |
8 | #include <asm/io.h> | 13 | #include <asm/io.h> |
9 | 14 | ||
10 | extern void __init pcibios_init_platform(void); | 15 | static struct ipr_data titan_ipr_map[] = { |
16 | /* IRQ, IPR idx, shift, prio */ | ||
17 | { TITAN_IRQ_WAN, 3, 12, 8 }, /* eth0 (WAN) */ | ||
18 | { TITAN_IRQ_LAN, 3, 8, 8 }, /* eth1 (LAN) */ | ||
19 | { TITAN_IRQ_MPCIA, 3, 4, 8 }, /* mPCI A (top) */ | ||
20 | { TITAN_IRQ_USB, 3, 0, 8 }, /* mPCI B (bottom), USB */ | ||
21 | }; | ||
11 | 22 | ||
12 | static void __init init_titan_irq(void) | 23 | static void __init init_titan_irq(void) |
13 | { | 24 | { |
14 | /* enable individual interrupt mode for externals */ | 25 | /* enable individual interrupt mode for externals */ |
15 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | 26 | ipr_irq_enable_irlm(); |
16 | 27 | /* register ipr irqs */ | |
17 | make_ipr_irq( TITAN_IRQ_WAN, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY); /* PCIRQ0 */ | 28 | make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map)); |
18 | make_ipr_irq( TITAN_IRQ_LAN, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY); /* PCIRQ1 */ | ||
19 | make_ipr_irq( TITAN_IRQ_MPCIA, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY); /* PCIRQ2 */ | ||
20 | make_ipr_irq( TITAN_IRQ_USB, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY); /* PCIRQ3 */ | ||
21 | } | 29 | } |
22 | 30 | ||
23 | struct sh_machine_vector mv_titan __initmv = { | 31 | struct sh_machine_vector mv_titan __initmv = { |
@@ -43,6 +51,5 @@ struct sh_machine_vector mv_titan __initmv = { | |||
43 | .mv_ioport_map = titan_ioport_map, | 51 | .mv_ioport_map = titan_ioport_map, |
44 | 52 | ||
45 | .mv_init_irq = init_titan_irq, | 53 | .mv_init_irq = init_titan_irq, |
46 | .mv_init_pci = pcibios_init_platform, | ||
47 | }; | 54 | }; |
48 | ALIAS_MV(titan) | 55 | ALIAS_MV(titan) |
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile index 60797b31089c..11dc272c618e 100644 --- a/arch/sh/boot/Makefile +++ b/arch/sh/boot/Makefile | |||
@@ -8,13 +8,49 @@ | |||
8 | # Copyright (C) 1999 Stuart Menefy | 8 | # Copyright (C) 1999 Stuart Menefy |
9 | # | 9 | # |
10 | 10 | ||
11 | targets := zImage | 11 | MKIMAGE := $(srctree)/scripts/mkuboot.sh |
12 | |||
13 | # | ||
14 | # Assign safe dummy values if these variables are not defined, | ||
15 | # in order to suppress error message. | ||
16 | # | ||
17 | CONFIG_PAGE_OFFSET ?= 0x80000000 | ||
18 | CONFIG_MEMORY_START ?= 0x0c000000 | ||
19 | CONFIG_BOOT_LINK_OFFSET ?= 0x00800000 | ||
20 | CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 | ||
21 | |||
22 | export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \ | ||
23 | CONFIG_ZERO_PAGE_OFFSET | ||
24 | |||
25 | targets := zImage vmlinux.srec uImage uImage.srec | ||
12 | subdir- := compressed | 26 | subdir- := compressed |
13 | 27 | ||
14 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE | 28 | $(obj)/zImage: $(obj)/compressed/vmlinux FORCE |
15 | $(call if_changed,objcopy) | 29 | $(call if_changed,objcopy) |
16 | @echo 'Kernel: $@ is ready' | 30 | @echo ' Kernel: $@ is ready' |
17 | 31 | ||
18 | $(obj)/compressed/vmlinux: FORCE | 32 | $(obj)/compressed/vmlinux: FORCE |
19 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ | 33 | $(Q)$(MAKE) $(build)=$(obj)/compressed $@ |
20 | 34 | ||
35 | KERNEL_LOAD := $(shell printf "0x%8x" $$[$(CONFIG_PAGE_OFFSET) + \ | ||
36 | $(CONFIG_MEMORY_START) + \ | ||
37 | $(CONFIG_ZERO_PAGE_OFFSET)+0x1000]) | ||
38 | |||
39 | quiet_cmd_uimage = UIMAGE $@ | ||
40 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \ | ||
41 | -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_LOAD) \ | ||
42 | -n 'Linux-$(KERNELRELEASE)' -d $< $@ | ||
43 | |||
44 | $(obj)/uImage: $(obj)/zImage FORCE | ||
45 | $(call if_changed,uimage) | ||
46 | @echo ' Image $@ is ready' | ||
47 | |||
48 | OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec | ||
49 | $(obj)/vmlinux.srec: $(obj)/compressed/vmlinux | ||
50 | $(call if_changed,objcopy) | ||
51 | |||
52 | OBJCOPYFLAGS_uImage.srec := -I binary -O srec | ||
53 | $(obj)/uImage.srec: $(obj)/uImage | ||
54 | $(call if_changed,objcopy) | ||
55 | |||
56 | clean-files += uImage uImage.srec vmlinux.srec | ||
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index e5f443790079..d9512416f885 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -15,13 +15,7 @@ endif | |||
15 | 15 | ||
16 | # | 16 | # |
17 | # IMAGE_OFFSET is the load offset of the compression loader | 17 | # IMAGE_OFFSET is the load offset of the compression loader |
18 | # Assign dummy values if these 2 variables are not defined, | ||
19 | # in order to suppress error message. | ||
20 | # | 18 | # |
21 | CONFIG_PAGE_OFFSET ?= 0x80000000 | ||
22 | CONFIG_MEMORY_START ?= 0x0c000000 | ||
23 | CONFIG_BOOT_LINK_OFFSET ?= 0x00800000 | ||
24 | |||
25 | IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_PAGE_OFFSET) + \ | 19 | IMAGE_OFFSET := $(shell printf "0x%08x" $$[$(CONFIG_PAGE_OFFSET) + \ |
26 | $(CONFIG_MEMORY_START) + \ | 20 | $(CONFIG_MEMORY_START) + \ |
27 | $(CONFIG_BOOT_LINK_OFFSET)]) | 21 | $(CONFIG_BOOT_LINK_OFFSET)]) |
diff --git a/arch/sh/boot/compressed/head.S b/arch/sh/boot/compressed/head.S index 4c26a192277d..a8399b013729 100644 --- a/arch/sh/boot/compressed/head.S +++ b/arch/sh/boot/compressed/head.S | |||
@@ -8,6 +8,7 @@ | |||
8 | .text | 8 | .text |
9 | 9 | ||
10 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
11 | #include <asm/page.h> | ||
11 | 12 | ||
12 | .global startup | 13 | .global startup |
13 | startup: | 14 | startup: |
@@ -97,7 +98,7 @@ init_stack_addr: | |||
97 | decompress_kernel_addr: | 98 | decompress_kernel_addr: |
98 | .long decompress_kernel | 99 | .long decompress_kernel |
99 | kernel_start_addr: | 100 | kernel_start_addr: |
100 | .long _text+0x1000 | 101 | .long _text+PAGE_SIZE |
101 | 102 | ||
102 | .align 9 | 103 | .align 9 |
103 | fake_headers_as_bzImage: | 104 | fake_headers_as_bzImage: |
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c index f2fed5ce5cc3..df65e305acf7 100644 --- a/arch/sh/boot/compressed/misc.c +++ b/arch/sh/boot/compressed/misc.c | |||
@@ -12,6 +12,8 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include <asm/addrspace.h> | ||
16 | #include <asm/page.h> | ||
15 | #ifdef CONFIG_SH_STANDARD_BIOS | 17 | #ifdef CONFIG_SH_STANDARD_BIOS |
16 | #include <asm/sh_bios.h> | 18 | #include <asm/sh_bios.h> |
17 | #endif | 19 | #endif |
@@ -228,7 +230,7 @@ long* stack_start = &user_stack[STACK_SIZE]; | |||
228 | void decompress_kernel(void) | 230 | void decompress_kernel(void) |
229 | { | 231 | { |
230 | output_data = 0; | 232 | output_data = 0; |
231 | output_ptr = (unsigned long)&_text+0x20001000; | 233 | output_ptr = P2SEGADDR((unsigned long)&_text+PAGE_SIZE); |
232 | free_mem_ptr = (unsigned long)&_end; | 234 | free_mem_ptr = (unsigned long)&_end; |
233 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; | 235 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; |
234 | 236 | ||
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c index bf1b28feca06..f7ea700d05ae 100644 --- a/arch/sh/cchips/voyagergx/irq.c +++ b/arch/sh/cchips/voyagergx/irq.c | |||
@@ -17,29 +17,18 @@ | |||
17 | 17 | ||
18 | Copyright 2003 (c) Lineo uSolutions,Inc. | 18 | Copyright 2003 (c) Lineo uSolutions,Inc. |
19 | */ | 19 | */ |
20 | /* -------------------------------------------------------------------- */ | ||
21 | |||
22 | #undef DEBUG | ||
23 | |||
24 | #include <linux/sched.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/param.h> | ||
28 | #include <linux/ioport.h> | ||
29 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
30 | #include <linux/init.h> | 21 | #include <linux/init.h> |
31 | #include <linux/irq.h> | 22 | #include <linux/io.h> |
32 | |||
33 | #include <asm/io.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/voyagergx.h> | 23 | #include <asm/voyagergx.h> |
24 | #include <asm/rts7751r2d.h> | ||
36 | 25 | ||
37 | static void disable_voyagergx_irq(unsigned int irq) | 26 | static void disable_voyagergx_irq(unsigned int irq) |
38 | { | 27 | { |
39 | unsigned long val; | 28 | unsigned long val; |
40 | unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); | 29 | unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); |
41 | 30 | ||
42 | pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); | 31 | pr_debug("disable_voyagergx_irq(%d): mask=%lx\n", irq, mask); |
43 | val = inl(VOYAGER_INT_MASK); | 32 | val = inl(VOYAGER_INT_MASK); |
44 | val &= ~mask; | 33 | val &= ~mask; |
45 | outl(val, VOYAGER_INT_MASK); | 34 | outl(val, VOYAGER_INT_MASK); |
@@ -50,7 +39,7 @@ static void enable_voyagergx_irq(unsigned int irq) | |||
50 | unsigned long val; | 39 | unsigned long val; |
51 | unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); | 40 | unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); |
52 | 41 | ||
53 | pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); | 42 | pr_debug("disable_voyagergx_irq(%d): mask=%lx\n", irq, mask); |
54 | val = inl(VOYAGER_INT_MASK); | 43 | val = inl(VOYAGER_INT_MASK); |
55 | val |= mask; | 44 | val |= mask; |
56 | outl(val, VOYAGER_INT_MASK); | 45 | outl(val, VOYAGER_INT_MASK); |
@@ -137,7 +126,7 @@ int voyagergx_irq_demux(int irq) | |||
137 | } else { | 126 | } else { |
138 | printk("Unexpected IRQ irq = %d status = 0x%08lx\n", irq, val); | 127 | printk("Unexpected IRQ irq = %d status = 0x%08lx\n", irq, val); |
139 | } | 128 | } |
140 | pr_debug("voyagergx_irq_demux %d \n", i); | 129 | pr_debug("voyagergx_irq_demux %ld\n", i); |
141 | #else | 130 | #else |
142 | for (bit = 1, i = 0 ; i < VOYAGER_IRQ_NUM ; bit <<= 1, i++) | 131 | for (bit = 1, i = 0 ; i < VOYAGER_IRQ_NUM ; bit <<= 1, i++) |
143 | if (val & bit) | 132 | if (val & bit) |
@@ -185,4 +174,3 @@ void __init setup_voyagergx_irq(void) | |||
185 | 174 | ||
186 | setup_irq(IRQ_VOYAGER, &irq0); | 175 | setup_irq(IRQ_VOYAGER, &irq0); |
187 | } | 176 | } |
188 | |||
diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_defconfig index 238c0f109907..e7f8ddb0ada4 100644 --- a/arch/sh/configs/landisk_defconfig +++ b/arch/sh/configs/landisk_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18 | 3 | # Linux kernel version: 2.6.19 |
4 | # Tue Oct 3 11:14:13 2006 | 4 | # Thu Dec 7 17:13:04 2006 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -10,6 +10,9 @@ CONFIG_GENERIC_HWEIGHT=y | |||
10 | CONFIG_GENERIC_HARDIRQS=y | 10 | CONFIG_GENERIC_HARDIRQS=y |
11 | CONFIG_GENERIC_IRQ_PROBE=y | 11 | CONFIG_GENERIC_IRQ_PROBE=y |
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 12 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | # CONFIG_GENERIC_TIME is not set | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
13 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 16 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
14 | 17 | ||
15 | # | 18 | # |
@@ -33,6 +36,7 @@ CONFIG_SYSVIPC=y | |||
33 | # CONFIG_UTS_NS is not set | 36 | # CONFIG_UTS_NS is not set |
34 | # CONFIG_AUDIT is not set | 37 | # CONFIG_AUDIT is not set |
35 | # CONFIG_IKCONFIG is not set | 38 | # CONFIG_IKCONFIG is not set |
39 | CONFIG_SYSFS_DEPRECATED=y | ||
36 | # CONFIG_RELAY is not set | 40 | # CONFIG_RELAY is not set |
37 | CONFIG_INITRAMFS_SOURCE="" | 41 | CONFIG_INITRAMFS_SOURCE="" |
38 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 42 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -114,6 +118,8 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
114 | CONFIG_SH_LANDISK=y | 118 | CONFIG_SH_LANDISK=y |
115 | # CONFIG_SH_TITAN is not set | 119 | # CONFIG_SH_TITAN is not set |
116 | # CONFIG_SH_SHMIN is not set | 120 | # CONFIG_SH_SHMIN is not set |
121 | # CONFIG_SH_7206_SOLUTION_ENGINE is not set | ||
122 | # CONFIG_SH_7619_SOLUTION_ENGINE is not set | ||
117 | # CONFIG_SH_UNKNOWN is not set | 123 | # CONFIG_SH_UNKNOWN is not set |
118 | 124 | ||
119 | # | 125 | # |
@@ -125,6 +131,12 @@ CONFIG_CPU_SH4=y | |||
125 | # SH-2 Processor Support | 131 | # SH-2 Processor Support |
126 | # | 132 | # |
127 | # CONFIG_CPU_SUBTYPE_SH7604 is not set | 133 | # CONFIG_CPU_SUBTYPE_SH7604 is not set |
134 | # CONFIG_CPU_SUBTYPE_SH7619 is not set | ||
135 | |||
136 | # | ||
137 | # SH-2A Processor Support | ||
138 | # | ||
139 | # CONFIG_CPU_SUBTYPE_SH7206 is not set | ||
128 | 140 | ||
129 | # | 141 | # |
130 | # SH-3 Processor Support | 142 | # SH-3 Processor Support |
@@ -160,6 +172,7 @@ CONFIG_CPU_SUBTYPE_SH7751R=y | |||
160 | # | 172 | # |
161 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | 173 | # CONFIG_CPU_SUBTYPE_SH7770 is not set |
162 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | 174 | # CONFIG_CPU_SUBTYPE_SH7780 is not set |
175 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | ||
163 | 176 | ||
164 | # | 177 | # |
165 | # SH4AL-DSP Processor Support | 178 | # SH4AL-DSP Processor Support |
@@ -175,6 +188,9 @@ CONFIG_PAGE_OFFSET=0x80000000 | |||
175 | CONFIG_MEMORY_START=0x0c000000 | 188 | CONFIG_MEMORY_START=0x0c000000 |
176 | CONFIG_MEMORY_SIZE=0x04000000 | 189 | CONFIG_MEMORY_SIZE=0x04000000 |
177 | CONFIG_VSYSCALL=y | 190 | CONFIG_VSYSCALL=y |
191 | CONFIG_PAGE_SIZE_4KB=y | ||
192 | # CONFIG_PAGE_SIZE_8KB is not set | ||
193 | # CONFIG_PAGE_SIZE_64KB is not set | ||
178 | CONFIG_SELECT_MEMORY_MODEL=y | 194 | CONFIG_SELECT_MEMORY_MODEL=y |
179 | CONFIG_FLATMEM_MANUAL=y | 195 | CONFIG_FLATMEM_MANUAL=y |
180 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 196 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -196,16 +212,21 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
196 | # Processor features | 212 | # Processor features |
197 | # | 213 | # |
198 | CONFIG_CPU_LITTLE_ENDIAN=y | 214 | CONFIG_CPU_LITTLE_ENDIAN=y |
215 | # CONFIG_CPU_BIG_ENDIAN is not set | ||
199 | CONFIG_SH_FPU=y | 216 | CONFIG_SH_FPU=y |
200 | # CONFIG_SH_DSP is not set | 217 | # CONFIG_SH_DSP is not set |
201 | # CONFIG_SH_STORE_QUEUES is not set | 218 | # CONFIG_SH_STORE_QUEUES is not set |
202 | CONFIG_CPU_HAS_INTEVT=y | 219 | CONFIG_CPU_HAS_INTEVT=y |
220 | CONFIG_CPU_HAS_IPR_IRQ=y | ||
203 | CONFIG_CPU_HAS_SR_RB=y | 221 | CONFIG_CPU_HAS_SR_RB=y |
222 | CONFIG_CPU_HAS_PTEA=y | ||
204 | 223 | ||
205 | # | 224 | # |
206 | # Timer support | 225 | # Timer support |
207 | # | 226 | # |
208 | CONFIG_SH_TMU=y | 227 | CONFIG_SH_TMU=y |
228 | CONFIG_SH_TIMER_IRQ=16 | ||
229 | # CONFIG_NO_IDLE_HZ is not set | ||
209 | CONFIG_SH_PCLK_FREQ=33333333 | 230 | CONFIG_SH_PCLK_FREQ=33333333 |
210 | 231 | ||
211 | # | 232 | # |
@@ -216,9 +237,7 @@ CONFIG_SH_PCLK_FREQ=33333333 | |||
216 | # | 237 | # |
217 | # DMA support | 238 | # DMA support |
218 | # | 239 | # |
219 | CONFIG_SH_DMA=y | 240 | # CONFIG_SH_DMA is not set |
220 | CONFIG_NR_ONCHIP_DMA_CHANNELS=4 | ||
221 | # CONFIG_NR_DMA_CHANNELS_BOOL is not set | ||
222 | 241 | ||
223 | # | 242 | # |
224 | # Companion Chips | 243 | # Companion Chips |
@@ -227,6 +246,11 @@ CONFIG_NR_ONCHIP_DMA_CHANNELS=4 | |||
227 | CONFIG_HEARTBEAT=y | 246 | CONFIG_HEARTBEAT=y |
228 | 247 | ||
229 | # | 248 | # |
249 | # Additional SuperH Device Drivers | ||
250 | # | ||
251 | # CONFIG_PUSH_SWITCH is not set | ||
252 | |||
253 | # | ||
230 | # Kernel features | 254 | # Kernel features |
231 | # | 255 | # |
232 | # CONFIG_HZ_100 is not set | 256 | # CONFIG_HZ_100 is not set |
@@ -340,11 +364,13 @@ CONFIG_IP_PNP=y | |||
340 | # CONFIG_INET_TUNNEL is not set | 364 | # CONFIG_INET_TUNNEL is not set |
341 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 365 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
342 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 366 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
367 | CONFIG_INET_XFRM_MODE_BEET=y | ||
343 | CONFIG_INET_DIAG=y | 368 | CONFIG_INET_DIAG=y |
344 | CONFIG_INET_TCP_DIAG=y | 369 | CONFIG_INET_TCP_DIAG=y |
345 | # CONFIG_TCP_CONG_ADVANCED is not set | 370 | # CONFIG_TCP_CONG_ADVANCED is not set |
346 | CONFIG_TCP_CONG_CUBIC=y | 371 | CONFIG_TCP_CONG_CUBIC=y |
347 | CONFIG_DEFAULT_TCP_CONG="cubic" | 372 | CONFIG_DEFAULT_TCP_CONG="cubic" |
373 | # CONFIG_TCP_MD5SIG is not set | ||
348 | 374 | ||
349 | # | 375 | # |
350 | # IP: Virtual Server Configuration | 376 | # IP: Virtual Server Configuration |
@@ -361,24 +387,12 @@ CONFIG_NETFILTER=y | |||
361 | # Core Netfilter Configuration | 387 | # Core Netfilter Configuration |
362 | # | 388 | # |
363 | # CONFIG_NETFILTER_NETLINK is not set | 389 | # CONFIG_NETFILTER_NETLINK is not set |
390 | # CONFIG_NF_CONNTRACK_ENABLED is not set | ||
364 | # CONFIG_NETFILTER_XTABLES is not set | 391 | # CONFIG_NETFILTER_XTABLES is not set |
365 | 392 | ||
366 | # | 393 | # |
367 | # IP: Netfilter Configuration | 394 | # IP: Netfilter Configuration |
368 | # | 395 | # |
369 | CONFIG_IP_NF_CONNTRACK=m | ||
370 | CONFIG_IP_NF_CT_ACCT=y | ||
371 | CONFIG_IP_NF_CONNTRACK_MARK=y | ||
372 | # CONFIG_IP_NF_CONNTRACK_EVENTS is not set | ||
373 | # CONFIG_IP_NF_CT_PROTO_SCTP is not set | ||
374 | CONFIG_IP_NF_FTP=m | ||
375 | CONFIG_IP_NF_IRC=m | ||
376 | # CONFIG_IP_NF_NETBIOS_NS is not set | ||
377 | CONFIG_IP_NF_TFTP=m | ||
378 | CONFIG_IP_NF_AMANDA=m | ||
379 | # CONFIG_IP_NF_PPTP is not set | ||
380 | # CONFIG_IP_NF_H323 is not set | ||
381 | # CONFIG_IP_NF_SIP is not set | ||
382 | CONFIG_IP_NF_QUEUE=m | 396 | CONFIG_IP_NF_QUEUE=m |
383 | 397 | ||
384 | # | 398 | # |
@@ -477,6 +491,12 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
477 | # CONFIG_ATA_OVER_ETH is not set | 491 | # CONFIG_ATA_OVER_ETH is not set |
478 | 492 | ||
479 | # | 493 | # |
494 | # Misc devices | ||
495 | # | ||
496 | # CONFIG_SGI_IOC4 is not set | ||
497 | # CONFIG_TIFM_CORE is not set | ||
498 | |||
499 | # | ||
480 | # ATA/ATAPI/MFM/RLL support | 500 | # ATA/ATAPI/MFM/RLL support |
481 | # | 501 | # |
482 | CONFIG_IDE=y | 502 | CONFIG_IDE=y |
@@ -519,6 +539,7 @@ CONFIG_BLK_DEV_AEC62XX=y | |||
519 | # CONFIG_BLK_DEV_CS5530 is not set | 539 | # CONFIG_BLK_DEV_CS5530 is not set |
520 | # CONFIG_BLK_DEV_HPT34X is not set | 540 | # CONFIG_BLK_DEV_HPT34X is not set |
521 | # CONFIG_BLK_DEV_HPT366 is not set | 541 | # CONFIG_BLK_DEV_HPT366 is not set |
542 | # CONFIG_BLK_DEV_JMICRON is not set | ||
522 | # CONFIG_BLK_DEV_SC1200 is not set | 543 | # CONFIG_BLK_DEV_SC1200 is not set |
523 | # CONFIG_BLK_DEV_PIIX is not set | 544 | # CONFIG_BLK_DEV_PIIX is not set |
524 | # CONFIG_BLK_DEV_IT821X is not set | 545 | # CONFIG_BLK_DEV_IT821X is not set |
@@ -542,6 +563,7 @@ CONFIG_IDEDMA_AUTO=y | |||
542 | # | 563 | # |
543 | # CONFIG_RAID_ATTRS is not set | 564 | # CONFIG_RAID_ATTRS is not set |
544 | CONFIG_SCSI=y | 565 | CONFIG_SCSI=y |
566 | # CONFIG_SCSI_TGT is not set | ||
545 | # CONFIG_SCSI_NETLINK is not set | 567 | # CONFIG_SCSI_NETLINK is not set |
546 | CONFIG_SCSI_PROC_FS=y | 568 | CONFIG_SCSI_PROC_FS=y |
547 | 569 | ||
@@ -561,6 +583,7 @@ CONFIG_BLK_DEV_SD=y | |||
561 | CONFIG_SCSI_MULTI_LUN=y | 583 | CONFIG_SCSI_MULTI_LUN=y |
562 | # CONFIG_SCSI_CONSTANTS is not set | 584 | # CONFIG_SCSI_CONSTANTS is not set |
563 | # CONFIG_SCSI_LOGGING is not set | 585 | # CONFIG_SCSI_LOGGING is not set |
586 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
564 | 587 | ||
565 | # | 588 | # |
566 | # SCSI Transports | 589 | # SCSI Transports |
@@ -602,12 +625,12 @@ CONFIG_SCSI_MULTI_LUN=y | |||
602 | # CONFIG_SCSI_NCR53C406A is not set | 625 | # CONFIG_SCSI_NCR53C406A is not set |
603 | # CONFIG_SCSI_STEX is not set | 626 | # CONFIG_SCSI_STEX is not set |
604 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 627 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
605 | # CONFIG_SCSI_IPR is not set | ||
606 | # CONFIG_SCSI_PAS16 is not set | 628 | # CONFIG_SCSI_PAS16 is not set |
607 | # CONFIG_SCSI_PSI240I is not set | 629 | # CONFIG_SCSI_PSI240I is not set |
608 | # CONFIG_SCSI_QLOGIC_FAS is not set | 630 | # CONFIG_SCSI_QLOGIC_FAS is not set |
609 | # CONFIG_SCSI_QLOGIC_1280 is not set | 631 | # CONFIG_SCSI_QLOGIC_1280 is not set |
610 | # CONFIG_SCSI_QLA_FC is not set | 632 | # CONFIG_SCSI_QLA_FC is not set |
633 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
611 | # CONFIG_SCSI_LPFC is not set | 634 | # CONFIG_SCSI_LPFC is not set |
612 | # CONFIG_SCSI_SYM53C416 is not set | 635 | # CONFIG_SCSI_SYM53C416 is not set |
613 | # CONFIG_SCSI_DC395x is not set | 636 | # CONFIG_SCSI_DC395x is not set |
@@ -615,6 +638,7 @@ CONFIG_SCSI_MULTI_LUN=y | |||
615 | # CONFIG_SCSI_T128 is not set | 638 | # CONFIG_SCSI_T128 is not set |
616 | # CONFIG_SCSI_NSP32 is not set | 639 | # CONFIG_SCSI_NSP32 is not set |
617 | # CONFIG_SCSI_DEBUG is not set | 640 | # CONFIG_SCSI_DEBUG is not set |
641 | # CONFIG_SCSI_SRP is not set | ||
618 | 642 | ||
619 | # | 643 | # |
620 | # PCMCIA SCSI adapter support | 644 | # PCMCIA SCSI adapter support |
@@ -757,6 +781,7 @@ CONFIG_8139CP=y | |||
757 | # CONFIG_IXGB is not set | 781 | # CONFIG_IXGB is not set |
758 | # CONFIG_S2IO is not set | 782 | # CONFIG_S2IO is not set |
759 | # CONFIG_MYRI10GE is not set | 783 | # CONFIG_MYRI10GE is not set |
784 | # CONFIG_NETXEN_NIC is not set | ||
760 | 785 | ||
761 | # | 786 | # |
762 | # Token Ring devices | 787 | # Token Ring devices |
@@ -871,10 +896,6 @@ CONFIG_HW_RANDOM=y | |||
871 | # CONFIG_DTLK is not set | 896 | # CONFIG_DTLK is not set |
872 | # CONFIG_R3964 is not set | 897 | # CONFIG_R3964 is not set |
873 | # CONFIG_APPLICOM is not set | 898 | # CONFIG_APPLICOM is not set |
874 | |||
875 | # | ||
876 | # Ftape, the floppy tape device driver | ||
877 | # | ||
878 | # CONFIG_DRM is not set | 899 | # CONFIG_DRM is not set |
879 | 900 | ||
880 | # | 901 | # |
@@ -889,7 +910,6 @@ CONFIG_HW_RANDOM=y | |||
889 | # TPM devices | 910 | # TPM devices |
890 | # | 911 | # |
891 | # CONFIG_TCG_TPM is not set | 912 | # CONFIG_TCG_TPM is not set |
892 | # CONFIG_TELCLOCK is not set | ||
893 | 913 | ||
894 | # | 914 | # |
895 | # I2C support | 915 | # I2C support |
@@ -905,6 +925,7 @@ CONFIG_HW_RANDOM=y | |||
905 | # | 925 | # |
906 | # Dallas's 1-wire bus | 926 | # Dallas's 1-wire bus |
907 | # | 927 | # |
928 | # CONFIG_W1 is not set | ||
908 | 929 | ||
909 | # | 930 | # |
910 | # Hardware Monitoring support | 931 | # Hardware Monitoring support |
@@ -917,10 +938,6 @@ CONFIG_HWMON=y | |||
917 | # CONFIG_HWMON_DEBUG_CHIP is not set | 938 | # CONFIG_HWMON_DEBUG_CHIP is not set |
918 | 939 | ||
919 | # | 940 | # |
920 | # Misc devices | ||
921 | # | ||
922 | |||
923 | # | ||
924 | # Multimedia devices | 941 | # Multimedia devices |
925 | # | 942 | # |
926 | CONFIG_VIDEO_DEV=m | 943 | CONFIG_VIDEO_DEV=m |
@@ -1037,6 +1054,7 @@ CONFIG_USB=y | |||
1037 | CONFIG_USB_DEVICEFS=y | 1054 | CONFIG_USB_DEVICEFS=y |
1038 | # CONFIG_USB_BANDWIDTH is not set | 1055 | # CONFIG_USB_BANDWIDTH is not set |
1039 | # CONFIG_USB_DYNAMIC_MINORS is not set | 1056 | # CONFIG_USB_DYNAMIC_MINORS is not set |
1057 | # CONFIG_USB_MULTITHREAD_PROBE is not set | ||
1040 | # CONFIG_USB_OTG is not set | 1058 | # CONFIG_USB_OTG is not set |
1041 | 1059 | ||
1042 | # | 1060 | # |
@@ -1106,7 +1124,6 @@ CONFIG_USB_HIDINPUT=y | |||
1106 | # CONFIG_USB_ATI_REMOTE2 is not set | 1124 | # CONFIG_USB_ATI_REMOTE2 is not set |
1107 | # CONFIG_USB_KEYSPAN_REMOTE is not set | 1125 | # CONFIG_USB_KEYSPAN_REMOTE is not set |
1108 | # CONFIG_USB_APPLETOUCH is not set | 1126 | # CONFIG_USB_APPLETOUCH is not set |
1109 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1110 | 1127 | ||
1111 | # | 1128 | # |
1112 | # USB Imaging devices | 1129 | # USB Imaging devices |
@@ -1121,6 +1138,7 @@ CONFIG_USB_HIDINPUT=y | |||
1121 | # CONFIG_USB_KAWETH is not set | 1138 | # CONFIG_USB_KAWETH is not set |
1122 | CONFIG_USB_PEGASUS=m | 1139 | CONFIG_USB_PEGASUS=m |
1123 | CONFIG_USB_RTL8150=m | 1140 | CONFIG_USB_RTL8150=m |
1141 | # CONFIG_USB_USBNET_MII is not set | ||
1124 | # CONFIG_USB_USBNET is not set | 1142 | # CONFIG_USB_USBNET is not set |
1125 | CONFIG_USB_MON=y | 1143 | CONFIG_USB_MON=y |
1126 | 1144 | ||
@@ -1156,6 +1174,7 @@ CONFIG_USB_SERIAL_FTDI_SIO=m | |||
1156 | # CONFIG_USB_SERIAL_KLSI is not set | 1174 | # CONFIG_USB_SERIAL_KLSI is not set |
1157 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | 1175 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set |
1158 | # CONFIG_USB_SERIAL_MCT_U232 is not set | 1176 | # CONFIG_USB_SERIAL_MCT_U232 is not set |
1177 | # CONFIG_USB_SERIAL_MOS7720 is not set | ||
1159 | # CONFIG_USB_SERIAL_MOS7840 is not set | 1178 | # CONFIG_USB_SERIAL_MOS7840 is not set |
1160 | # CONFIG_USB_SERIAL_NAVMAN is not set | 1179 | # CONFIG_USB_SERIAL_NAVMAN is not set |
1161 | CONFIG_USB_SERIAL_PL2303=m | 1180 | CONFIG_USB_SERIAL_PL2303=m |
@@ -1167,6 +1186,7 @@ CONFIG_USB_SERIAL_PL2303=m | |||
1167 | # CONFIG_USB_SERIAL_XIRCOM is not set | 1186 | # CONFIG_USB_SERIAL_XIRCOM is not set |
1168 | # CONFIG_USB_SERIAL_OPTION is not set | 1187 | # CONFIG_USB_SERIAL_OPTION is not set |
1169 | # CONFIG_USB_SERIAL_OMNINET is not set | 1188 | # CONFIG_USB_SERIAL_OMNINET is not set |
1189 | # CONFIG_USB_SERIAL_DEBUG is not set | ||
1170 | 1190 | ||
1171 | # | 1191 | # |
1172 | # USB Miscellaneous drivers | 1192 | # USB Miscellaneous drivers |
@@ -1188,6 +1208,7 @@ CONFIG_USB_EMI26=m | |||
1188 | CONFIG_USB_SISUSBVGA=m | 1208 | CONFIG_USB_SISUSBVGA=m |
1189 | CONFIG_USB_SISUSBVGA_CON=y | 1209 | CONFIG_USB_SISUSBVGA_CON=y |
1190 | # CONFIG_USB_LD is not set | 1210 | # CONFIG_USB_LD is not set |
1211 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1191 | # CONFIG_USB_TEST is not set | 1212 | # CONFIG_USB_TEST is not set |
1192 | 1213 | ||
1193 | # | 1214 | # |
@@ -1254,6 +1275,7 @@ CONFIG_EXT3_FS=y | |||
1254 | CONFIG_EXT3_FS_XATTR=y | 1275 | CONFIG_EXT3_FS_XATTR=y |
1255 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 1276 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
1256 | # CONFIG_EXT3_FS_SECURITY is not set | 1277 | # CONFIG_EXT3_FS_SECURITY is not set |
1278 | # CONFIG_EXT4DEV_FS is not set | ||
1257 | CONFIG_JBD=y | 1279 | CONFIG_JBD=y |
1258 | # CONFIG_JBD_DEBUG is not set | 1280 | # CONFIG_JBD_DEBUG is not set |
1259 | CONFIG_FS_MBCACHE=y | 1281 | CONFIG_FS_MBCACHE=y |
@@ -1264,6 +1286,7 @@ CONFIG_REISERFS_FS=y | |||
1264 | # CONFIG_JFS_FS is not set | 1286 | # CONFIG_JFS_FS is not set |
1265 | # CONFIG_FS_POSIX_ACL is not set | 1287 | # CONFIG_FS_POSIX_ACL is not set |
1266 | # CONFIG_XFS_FS is not set | 1288 | # CONFIG_XFS_FS is not set |
1289 | # CONFIG_GFS2_FS is not set | ||
1267 | # CONFIG_OCFS2_FS is not set | 1290 | # CONFIG_OCFS2_FS is not set |
1268 | # CONFIG_MINIX_FS is not set | 1291 | # CONFIG_MINIX_FS is not set |
1269 | CONFIG_ROMFS_FS=y | 1292 | CONFIG_ROMFS_FS=y |
@@ -1414,6 +1437,7 @@ CONFIG_NLS_CODEPAGE_932=y | |||
1414 | # | 1437 | # |
1415 | # Kernel hacking | 1438 | # Kernel hacking |
1416 | # | 1439 | # |
1440 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
1417 | # CONFIG_PRINTK_TIME is not set | 1441 | # CONFIG_PRINTK_TIME is not set |
1418 | CONFIG_ENABLE_MUST_CHECK=y | 1442 | CONFIG_ENABLE_MUST_CHECK=y |
1419 | # CONFIG_MAGIC_SYSRQ is not set | 1443 | # CONFIG_MAGIC_SYSRQ is not set |
@@ -1422,6 +1446,7 @@ CONFIG_ENABLE_MUST_CHECK=y | |||
1422 | CONFIG_LOG_BUF_SHIFT=14 | 1446 | CONFIG_LOG_BUF_SHIFT=14 |
1423 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1447 | # CONFIG_DEBUG_BUGVERBOSE is not set |
1424 | # CONFIG_DEBUG_FS is not set | 1448 | # CONFIG_DEBUG_FS is not set |
1449 | # CONFIG_HEADERS_CHECK is not set | ||
1425 | CONFIG_SH_STANDARD_BIOS=y | 1450 | CONFIG_SH_STANDARD_BIOS=y |
1426 | # CONFIG_EARLY_SCIF_CONSOLE is not set | 1451 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
1427 | # CONFIG_EARLY_PRINTK is not set | 1452 | # CONFIG_EARLY_PRINTK is not set |
@@ -1445,6 +1470,4 @@ CONFIG_SH_STANDARD_BIOS=y | |||
1445 | # CONFIG_CRC16 is not set | 1470 | # CONFIG_CRC16 is not set |
1446 | CONFIG_CRC32=y | 1471 | CONFIG_CRC32=y |
1447 | # CONFIG_LIBCRC32C is not set | 1472 | # CONFIG_LIBCRC32C is not set |
1448 | CONFIG_TEXTSEARCH=y | ||
1449 | CONFIG_TEXTSEARCH_KMP=m | ||
1450 | CONFIG_PLIST=y | 1473 | CONFIG_PLIST=y |
diff --git a/arch/sh/configs/r7780rp_defconfig b/arch/sh/configs/r7780rp_defconfig index 2470364948e7..2b75b4896ba5 100644 --- a/arch/sh/configs/r7780rp_defconfig +++ b/arch/sh/configs/r7780rp_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18 | 3 | # Linux kernel version: 2.6.19 |
4 | # Tue Oct 3 11:32:47 2006 | 4 | # Wed Dec 6 11:59:38 2006 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -10,6 +10,9 @@ CONFIG_GENERIC_HWEIGHT=y | |||
10 | CONFIG_GENERIC_HARDIRQS=y | 10 | CONFIG_GENERIC_HARDIRQS=y |
11 | CONFIG_GENERIC_IRQ_PROBE=y | 11 | CONFIG_GENERIC_IRQ_PROBE=y |
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 12 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | # CONFIG_GENERIC_TIME is not set | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
13 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 16 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
14 | 17 | ||
15 | # | 18 | # |
@@ -36,6 +39,7 @@ CONFIG_BSD_PROCESS_ACCT=y | |||
36 | # CONFIG_AUDIT is not set | 39 | # CONFIG_AUDIT is not set |
37 | CONFIG_IKCONFIG=y | 40 | CONFIG_IKCONFIG=y |
38 | CONFIG_IKCONFIG_PROC=y | 41 | CONFIG_IKCONFIG_PROC=y |
42 | # CONFIG_SYSFS_DEPRECATED is not set | ||
39 | # CONFIG_RELAY is not set | 43 | # CONFIG_RELAY is not set |
40 | CONFIG_INITRAMFS_SOURCE="" | 44 | CONFIG_INITRAMFS_SOURCE="" |
41 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 45 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -117,6 +121,8 @@ CONFIG_SH_R7780RP=y | |||
117 | # CONFIG_SH_LANDISK is not set | 121 | # CONFIG_SH_LANDISK is not set |
118 | # CONFIG_SH_TITAN is not set | 122 | # CONFIG_SH_TITAN is not set |
119 | # CONFIG_SH_SHMIN is not set | 123 | # CONFIG_SH_SHMIN is not set |
124 | # CONFIG_SH_7206_SOLUTION_ENGINE is not set | ||
125 | # CONFIG_SH_7619_SOLUTION_ENGINE is not set | ||
120 | # CONFIG_SH_UNKNOWN is not set | 126 | # CONFIG_SH_UNKNOWN is not set |
121 | 127 | ||
122 | # | 128 | # |
@@ -129,6 +135,12 @@ CONFIG_CPU_SH4A=y | |||
129 | # SH-2 Processor Support | 135 | # SH-2 Processor Support |
130 | # | 136 | # |
131 | # CONFIG_CPU_SUBTYPE_SH7604 is not set | 137 | # CONFIG_CPU_SUBTYPE_SH7604 is not set |
138 | # CONFIG_CPU_SUBTYPE_SH7619 is not set | ||
139 | |||
140 | # | ||
141 | # SH-2A Processor Support | ||
142 | # | ||
143 | # CONFIG_CPU_SUBTYPE_SH7206 is not set | ||
132 | 144 | ||
133 | # | 145 | # |
134 | # SH-3 Processor Support | 146 | # SH-3 Processor Support |
@@ -164,6 +176,7 @@ CONFIG_CPU_SH4A=y | |||
164 | # | 176 | # |
165 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | 177 | # CONFIG_CPU_SUBTYPE_SH7770 is not set |
166 | CONFIG_CPU_SUBTYPE_SH7780=y | 178 | CONFIG_CPU_SUBTYPE_SH7780=y |
179 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | ||
167 | 180 | ||
168 | # | 181 | # |
169 | # SH4AL-DSP Processor Support | 182 | # SH4AL-DSP Processor Support |
@@ -178,10 +191,16 @@ CONFIG_MMU=y | |||
178 | CONFIG_PAGE_OFFSET=0x80000000 | 191 | CONFIG_PAGE_OFFSET=0x80000000 |
179 | CONFIG_MEMORY_START=0x08000000 | 192 | CONFIG_MEMORY_START=0x08000000 |
180 | CONFIG_MEMORY_SIZE=0x08000000 | 193 | CONFIG_MEMORY_SIZE=0x08000000 |
181 | CONFIG_32BIT=y | 194 | # CONFIG_32BIT is not set |
182 | CONFIG_VSYSCALL=y | 195 | CONFIG_VSYSCALL=y |
196 | CONFIG_PAGE_SIZE_4KB=y | ||
197 | # CONFIG_PAGE_SIZE_8KB is not set | ||
198 | # CONFIG_PAGE_SIZE_64KB is not set | ||
183 | CONFIG_HUGETLB_PAGE_SIZE_64K=y | 199 | CONFIG_HUGETLB_PAGE_SIZE_64K=y |
200 | # CONFIG_HUGETLB_PAGE_SIZE_256K is not set | ||
184 | # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set | 201 | # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set |
202 | # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set | ||
203 | # CONFIG_HUGETLB_PAGE_SIZE_64MB is not set | ||
185 | CONFIG_SELECT_MEMORY_MODEL=y | 204 | CONFIG_SELECT_MEMORY_MODEL=y |
186 | CONFIG_FLATMEM_MANUAL=y | 205 | CONFIG_FLATMEM_MANUAL=y |
187 | # CONFIG_DISCONTIGMEM_MANUAL is not set | 206 | # CONFIG_DISCONTIGMEM_MANUAL is not set |
@@ -203,12 +222,14 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
203 | # Processor features | 222 | # Processor features |
204 | # | 223 | # |
205 | CONFIG_CPU_LITTLE_ENDIAN=y | 224 | CONFIG_CPU_LITTLE_ENDIAN=y |
225 | # CONFIG_CPU_BIG_ENDIAN is not set | ||
206 | CONFIG_SH_FPU=y | 226 | CONFIG_SH_FPU=y |
207 | # CONFIG_SH_DSP is not set | 227 | # CONFIG_SH_DSP is not set |
208 | CONFIG_SH_STORE_QUEUES=y | 228 | CONFIG_SH_STORE_QUEUES=y |
209 | CONFIG_CPU_HAS_INTEVT=y | 229 | CONFIG_CPU_HAS_INTEVT=y |
210 | CONFIG_CPU_HAS_INTC2_IRQ=y | 230 | CONFIG_CPU_HAS_INTC2_IRQ=y |
211 | CONFIG_CPU_HAS_SR_RB=y | 231 | CONFIG_CPU_HAS_SR_RB=y |
232 | CONFIG_CPU_HAS_PTEA=y | ||
212 | 233 | ||
213 | # | 234 | # |
214 | # Timer support | 235 | # Timer support |
@@ -219,6 +240,8 @@ CONFIG_SH_TMU=y | |||
219 | # R7780RP options | 240 | # R7780RP options |
220 | # | 241 | # |
221 | CONFIG_SH_R7780MP=y | 242 | CONFIG_SH_R7780MP=y |
243 | CONFIG_SH_TIMER_IRQ=28 | ||
244 | CONFIG_NO_IDLE_HZ=y | ||
222 | CONFIG_SH_PCLK_FREQ=32000000 | 245 | CONFIG_SH_PCLK_FREQ=32000000 |
223 | 246 | ||
224 | # | 247 | # |
@@ -229,9 +252,7 @@ CONFIG_SH_PCLK_FREQ=32000000 | |||
229 | # | 252 | # |
230 | # DMA support | 253 | # DMA support |
231 | # | 254 | # |
232 | CONFIG_SH_DMA=y | 255 | # CONFIG_SH_DMA is not set |
233 | CONFIG_NR_ONCHIP_DMA_CHANNELS=6 | ||
234 | # CONFIG_NR_DMA_CHANNELS_BOOL is not set | ||
235 | 256 | ||
236 | # | 257 | # |
237 | # Companion Chips | 258 | # Companion Chips |
@@ -239,13 +260,18 @@ CONFIG_NR_ONCHIP_DMA_CHANNELS=6 | |||
239 | # CONFIG_HD6446X_SERIES is not set | 260 | # CONFIG_HD6446X_SERIES is not set |
240 | 261 | ||
241 | # | 262 | # |
263 | # Additional SuperH Device Drivers | ||
264 | # | ||
265 | CONFIG_PUSH_SWITCH=y | ||
266 | |||
267 | # | ||
242 | # Kernel features | 268 | # Kernel features |
243 | # | 269 | # |
244 | # CONFIG_HZ_100 is not set | 270 | # CONFIG_HZ_100 is not set |
245 | CONFIG_HZ_250=y | 271 | CONFIG_HZ_250=y |
246 | # CONFIG_HZ_1000 is not set | 272 | # CONFIG_HZ_1000 is not set |
247 | CONFIG_HZ=250 | 273 | CONFIG_HZ=250 |
248 | # CONFIG_KEXEC is not set | 274 | CONFIG_KEXEC=y |
249 | # CONFIG_SMP is not set | 275 | # CONFIG_SMP is not set |
250 | # CONFIG_PREEMPT_NONE is not set | 276 | # CONFIG_PREEMPT_NONE is not set |
251 | # CONFIG_PREEMPT_VOLUNTARY is not set | 277 | # CONFIG_PREEMPT_VOLUNTARY is not set |
@@ -259,7 +285,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000 | |||
259 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | 285 | CONFIG_BOOT_LINK_OFFSET=0x00800000 |
260 | # CONFIG_UBC_WAKEUP is not set | 286 | # CONFIG_UBC_WAKEUP is not set |
261 | CONFIG_CMDLINE_BOOL=y | 287 | CONFIG_CMDLINE_BOOL=y |
262 | CONFIG_CMDLINE="mem=128M console=ttySC0,115200 root=/dev/hda1" | 288 | CONFIG_CMDLINE="mem=128M console=ttySC0,115200 root=/dev/sda1" |
263 | 289 | ||
264 | # | 290 | # |
265 | # Bus options | 291 | # Bus options |
@@ -279,10 +305,7 @@ CONFIG_PCI_AUTO_UPDATE_RESOURCES=y | |||
279 | # | 305 | # |
280 | # PCI Hotplug Support | 306 | # PCI Hotplug Support |
281 | # | 307 | # |
282 | CONFIG_HOTPLUG_PCI=y | 308 | # CONFIG_HOTPLUG_PCI is not set |
283 | # CONFIG_HOTPLUG_PCI_FAKE is not set | ||
284 | # CONFIG_HOTPLUG_PCI_CPCI is not set | ||
285 | # CONFIG_HOTPLUG_PCI_SHPC is not set | ||
286 | 309 | ||
287 | # | 310 | # |
288 | # Executable file formats | 311 | # Executable file formats |
@@ -336,11 +359,13 @@ CONFIG_IP_PNP_DHCP=y | |||
336 | # CONFIG_INET_TUNNEL is not set | 359 | # CONFIG_INET_TUNNEL is not set |
337 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 360 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
338 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 361 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
362 | CONFIG_INET_XFRM_MODE_BEET=y | ||
339 | CONFIG_INET_DIAG=y | 363 | CONFIG_INET_DIAG=y |
340 | CONFIG_INET_TCP_DIAG=y | 364 | CONFIG_INET_TCP_DIAG=y |
341 | # CONFIG_TCP_CONG_ADVANCED is not set | 365 | # CONFIG_TCP_CONG_ADVANCED is not set |
342 | CONFIG_TCP_CONG_CUBIC=y | 366 | CONFIG_TCP_CONG_CUBIC=y |
343 | CONFIG_DEFAULT_TCP_CONG="cubic" | 367 | CONFIG_DEFAULT_TCP_CONG="cubic" |
368 | # CONFIG_TCP_MD5SIG is not set | ||
344 | # CONFIG_IPV6 is not set | 369 | # CONFIG_IPV6 is not set |
345 | # CONFIG_INET6_XFRM_TUNNEL is not set | 370 | # CONFIG_INET6_XFRM_TUNNEL is not set |
346 | # CONFIG_INET6_TUNNEL is not set | 371 | # CONFIG_INET6_TUNNEL is not set |
@@ -441,76 +466,28 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
441 | # CONFIG_ATA_OVER_ETH is not set | 466 | # CONFIG_ATA_OVER_ETH is not set |
442 | 467 | ||
443 | # | 468 | # |
469 | # Misc devices | ||
470 | # | ||
471 | # CONFIG_SGI_IOC4 is not set | ||
472 | # CONFIG_TIFM_CORE is not set | ||
473 | |||
474 | # | ||
444 | # ATA/ATAPI/MFM/RLL support | 475 | # ATA/ATAPI/MFM/RLL support |
445 | # | 476 | # |
446 | CONFIG_IDE=m | 477 | # CONFIG_IDE is not set |
447 | CONFIG_IDE_MAX_HWIFS=4 | ||
448 | CONFIG_BLK_DEV_IDE=m | ||
449 | |||
450 | # | ||
451 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
452 | # | ||
453 | CONFIG_BLK_DEV_IDE_SATA=y | ||
454 | CONFIG_BLK_DEV_IDEDISK=m | ||
455 | CONFIG_IDEDISK_MULTI_MODE=y | ||
456 | # CONFIG_BLK_DEV_IDECD is not set | ||
457 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
458 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
459 | CONFIG_BLK_DEV_IDESCSI=m | ||
460 | # CONFIG_IDE_TASK_IOCTL is not set | ||
461 | |||
462 | # | ||
463 | # IDE chipset support/bugfixes | ||
464 | # | ||
465 | CONFIG_IDE_GENERIC=m | ||
466 | CONFIG_BLK_DEV_IDEPCI=y | ||
467 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
468 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
469 | CONFIG_BLK_DEV_GENERIC=m | ||
470 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
471 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
472 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
473 | CONFIG_IDEDMA_PCI_AUTO=y | ||
474 | # CONFIG_IDEDMA_ONLYDISK is not set | ||
475 | CONFIG_BLK_DEV_AEC62XX=m | ||
476 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
477 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
478 | # CONFIG_BLK_DEV_CMD64X is not set | ||
479 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
480 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
481 | # CONFIG_BLK_DEV_CS5520 is not set | ||
482 | # CONFIG_BLK_DEV_CS5530 is not set | ||
483 | # CONFIG_BLK_DEV_HPT34X is not set | ||
484 | # CONFIG_BLK_DEV_HPT366 is not set | ||
485 | # CONFIG_BLK_DEV_SC1200 is not set | ||
486 | # CONFIG_BLK_DEV_PIIX is not set | ||
487 | # CONFIG_BLK_DEV_IT821X is not set | ||
488 | # CONFIG_BLK_DEV_NS87415 is not set | ||
489 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
490 | CONFIG_BLK_DEV_PDC202XX_NEW=m | ||
491 | # CONFIG_BLK_DEV_SVWKS is not set | ||
492 | CONFIG_BLK_DEV_SIIMAGE=m | ||
493 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
494 | # CONFIG_BLK_DEV_TRM290 is not set | ||
495 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
496 | # CONFIG_IDE_ARM is not set | ||
497 | CONFIG_BLK_DEV_IDEDMA=y | ||
498 | # CONFIG_IDEDMA_IVB is not set | ||
499 | CONFIG_IDEDMA_AUTO=y | ||
500 | # CONFIG_BLK_DEV_HD is not set | ||
501 | 478 | ||
502 | # | 479 | # |
503 | # SCSI device support | 480 | # SCSI device support |
504 | # | 481 | # |
505 | # CONFIG_RAID_ATTRS is not set | 482 | # CONFIG_RAID_ATTRS is not set |
506 | CONFIG_SCSI=m | 483 | CONFIG_SCSI=y |
507 | # CONFIG_SCSI_NETLINK is not set | 484 | # CONFIG_SCSI_NETLINK is not set |
508 | CONFIG_SCSI_PROC_FS=y | 485 | CONFIG_SCSI_PROC_FS=y |
509 | 486 | ||
510 | # | 487 | # |
511 | # SCSI support type (disk, tape, CD-ROM) | 488 | # SCSI support type (disk, tape, CD-ROM) |
512 | # | 489 | # |
513 | CONFIG_BLK_DEV_SD=m | 490 | CONFIG_BLK_DEV_SD=y |
514 | # CONFIG_CHR_DEV_ST is not set | 491 | # CONFIG_CHR_DEV_ST is not set |
515 | # CONFIG_CHR_DEV_OSST is not set | 492 | # CONFIG_CHR_DEV_OSST is not set |
516 | # CONFIG_BLK_DEV_SR is not set | 493 | # CONFIG_BLK_DEV_SR is not set |
@@ -561,6 +538,7 @@ CONFIG_CHR_DEV_SG=m | |||
561 | # CONFIG_SCSI_IPR is not set | 538 | # CONFIG_SCSI_IPR is not set |
562 | # CONFIG_SCSI_QLOGIC_1280 is not set | 539 | # CONFIG_SCSI_QLOGIC_1280 is not set |
563 | # CONFIG_SCSI_QLA_FC is not set | 540 | # CONFIG_SCSI_QLA_FC is not set |
541 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
564 | # CONFIG_SCSI_LPFC is not set | 542 | # CONFIG_SCSI_LPFC is not set |
565 | # CONFIG_SCSI_DC395x is not set | 543 | # CONFIG_SCSI_DC395x is not set |
566 | # CONFIG_SCSI_DC390T is not set | 544 | # CONFIG_SCSI_DC390T is not set |
@@ -570,7 +548,57 @@ CONFIG_CHR_DEV_SG=m | |||
570 | # | 548 | # |
571 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | 549 | # Serial ATA (prod) and Parallel ATA (experimental) drivers |
572 | # | 550 | # |
573 | # CONFIG_ATA is not set | 551 | CONFIG_ATA=y |
552 | # CONFIG_SATA_AHCI is not set | ||
553 | # CONFIG_SATA_SVW is not set | ||
554 | # CONFIG_ATA_PIIX is not set | ||
555 | # CONFIG_SATA_MV is not set | ||
556 | # CONFIG_SATA_NV is not set | ||
557 | # CONFIG_PDC_ADMA is not set | ||
558 | # CONFIG_SATA_QSTOR is not set | ||
559 | # CONFIG_SATA_PROMISE is not set | ||
560 | # CONFIG_SATA_SX4 is not set | ||
561 | CONFIG_SATA_SIL=y | ||
562 | # CONFIG_SATA_SIL24 is not set | ||
563 | # CONFIG_SATA_SIS is not set | ||
564 | # CONFIG_SATA_ULI is not set | ||
565 | # CONFIG_SATA_VIA is not set | ||
566 | # CONFIG_SATA_VITESSE is not set | ||
567 | # CONFIG_PATA_ALI is not set | ||
568 | # CONFIG_PATA_AMD is not set | ||
569 | # CONFIG_PATA_ARTOP is not set | ||
570 | # CONFIG_PATA_ATIIXP is not set | ||
571 | # CONFIG_PATA_CMD64X is not set | ||
572 | # CONFIG_PATA_CS5520 is not set | ||
573 | # CONFIG_PATA_CS5530 is not set | ||
574 | # CONFIG_PATA_CYPRESS is not set | ||
575 | # CONFIG_PATA_EFAR is not set | ||
576 | # CONFIG_ATA_GENERIC is not set | ||
577 | # CONFIG_PATA_HPT366 is not set | ||
578 | # CONFIG_PATA_HPT37X is not set | ||
579 | # CONFIG_PATA_HPT3X2N is not set | ||
580 | # CONFIG_PATA_HPT3X3 is not set | ||
581 | # CONFIG_PATA_IT821X is not set | ||
582 | # CONFIG_PATA_JMICRON is not set | ||
583 | # CONFIG_PATA_TRIFLEX is not set | ||
584 | # CONFIG_PATA_MARVELL is not set | ||
585 | # CONFIG_PATA_MPIIX is not set | ||
586 | # CONFIG_PATA_OLDPIIX is not set | ||
587 | # CONFIG_PATA_NETCELL is not set | ||
588 | # CONFIG_PATA_NS87410 is not set | ||
589 | # CONFIG_PATA_OPTI is not set | ||
590 | # CONFIG_PATA_OPTIDMA is not set | ||
591 | # CONFIG_PATA_PDC_OLD is not set | ||
592 | # CONFIG_PATA_RADISYS is not set | ||
593 | # CONFIG_PATA_RZ1000 is not set | ||
594 | # CONFIG_PATA_SC1200 is not set | ||
595 | # CONFIG_PATA_SERVERWORKS is not set | ||
596 | # CONFIG_PATA_PDC2027X is not set | ||
597 | # CONFIG_PATA_SIL680 is not set | ||
598 | # CONFIG_PATA_SIS is not set | ||
599 | # CONFIG_PATA_VIA is not set | ||
600 | # CONFIG_PATA_WINBOND is not set | ||
601 | CONFIG_PATA_PLATFORM=y | ||
574 | 602 | ||
575 | # | 603 | # |
576 | # Multi-device support (RAID and LVM) | 604 | # Multi-device support (RAID and LVM) |
@@ -687,6 +715,7 @@ CONFIG_R8169=y | |||
687 | # CONFIG_IXGB is not set | 715 | # CONFIG_IXGB is not set |
688 | # CONFIG_S2IO is not set | 716 | # CONFIG_S2IO is not set |
689 | # CONFIG_MYRI10GE is not set | 717 | # CONFIG_MYRI10GE is not set |
718 | # CONFIG_NETXEN_NIC is not set | ||
690 | 719 | ||
691 | # | 720 | # |
692 | # Token Ring devices | 721 | # Token Ring devices |
@@ -829,10 +858,6 @@ CONFIG_HW_RANDOM=y | |||
829 | # CONFIG_DTLK is not set | 858 | # CONFIG_DTLK is not set |
830 | # CONFIG_R3964 is not set | 859 | # CONFIG_R3964 is not set |
831 | # CONFIG_APPLICOM is not set | 860 | # CONFIG_APPLICOM is not set |
832 | |||
833 | # | ||
834 | # Ftape, the floppy tape device driver | ||
835 | # | ||
836 | # CONFIG_DRM is not set | 861 | # CONFIG_DRM is not set |
837 | # CONFIG_RAW_DRIVER is not set | 862 | # CONFIG_RAW_DRIVER is not set |
838 | 863 | ||
@@ -840,7 +865,6 @@ CONFIG_HW_RANDOM=y | |||
840 | # TPM devices | 865 | # TPM devices |
841 | # | 866 | # |
842 | # CONFIG_TCG_TPM is not set | 867 | # CONFIG_TCG_TPM is not set |
843 | # CONFIG_TELCLOCK is not set | ||
844 | 868 | ||
845 | # | 869 | # |
846 | # I2C support | 870 | # I2C support |
@@ -856,6 +880,7 @@ CONFIG_HW_RANDOM=y | |||
856 | # | 880 | # |
857 | # Dallas's 1-wire bus | 881 | # Dallas's 1-wire bus |
858 | # | 882 | # |
883 | # CONFIG_W1 is not set | ||
859 | 884 | ||
860 | # | 885 | # |
861 | # Hardware Monitoring support | 886 | # Hardware Monitoring support |
@@ -868,14 +893,9 @@ CONFIG_HWMON=y | |||
868 | # CONFIG_HWMON_DEBUG_CHIP is not set | 893 | # CONFIG_HWMON_DEBUG_CHIP is not set |
869 | 894 | ||
870 | # | 895 | # |
871 | # Misc devices | ||
872 | # | ||
873 | |||
874 | # | ||
875 | # Multimedia devices | 896 | # Multimedia devices |
876 | # | 897 | # |
877 | # CONFIG_VIDEO_DEV is not set | 898 | # CONFIG_VIDEO_DEV is not set |
878 | CONFIG_VIDEO_V4L2=y | ||
879 | 899 | ||
880 | # | 900 | # |
881 | # Digital Video Broadcasting Devices | 901 | # Digital Video Broadcasting Devices |
@@ -959,7 +979,29 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
959 | # | 979 | # |
960 | # Real Time Clock | 980 | # Real Time Clock |
961 | # | 981 | # |
962 | # CONFIG_RTC_CLASS is not set | 982 | CONFIG_RTC_LIB=y |
983 | CONFIG_RTC_CLASS=y | ||
984 | CONFIG_RTC_HCTOSYS=y | ||
985 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
986 | # CONFIG_RTC_DEBUG is not set | ||
987 | |||
988 | # | ||
989 | # RTC interfaces | ||
990 | # | ||
991 | CONFIG_RTC_INTF_SYSFS=y | ||
992 | CONFIG_RTC_INTF_PROC=y | ||
993 | CONFIG_RTC_INTF_DEV=y | ||
994 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
995 | |||
996 | # | ||
997 | # RTC drivers | ||
998 | # | ||
999 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1000 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1001 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1002 | CONFIG_RTC_DRV_SH=y | ||
1003 | # CONFIG_RTC_DRV_TEST is not set | ||
1004 | # CONFIG_RTC_DRV_V3020 is not set | ||
963 | 1005 | ||
964 | # | 1006 | # |
965 | # DMA Engine support | 1007 | # DMA Engine support |
@@ -984,6 +1026,7 @@ CONFIG_EXT3_FS=y | |||
984 | CONFIG_EXT3_FS_XATTR=y | 1026 | CONFIG_EXT3_FS_XATTR=y |
985 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 1027 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
986 | # CONFIG_EXT3_FS_SECURITY is not set | 1028 | # CONFIG_EXT3_FS_SECURITY is not set |
1029 | # CONFIG_EXT4DEV_FS is not set | ||
987 | CONFIG_JBD=y | 1030 | CONFIG_JBD=y |
988 | # CONFIG_JBD_DEBUG is not set | 1031 | # CONFIG_JBD_DEBUG is not set |
989 | CONFIG_FS_MBCACHE=y | 1032 | CONFIG_FS_MBCACHE=y |
@@ -991,6 +1034,7 @@ CONFIG_FS_MBCACHE=y | |||
991 | # CONFIG_JFS_FS is not set | 1034 | # CONFIG_JFS_FS is not set |
992 | CONFIG_FS_POSIX_ACL=y | 1035 | CONFIG_FS_POSIX_ACL=y |
993 | # CONFIG_XFS_FS is not set | 1036 | # CONFIG_XFS_FS is not set |
1037 | # CONFIG_GFS2_FS is not set | ||
994 | # CONFIG_OCFS2_FS is not set | 1038 | # CONFIG_OCFS2_FS is not set |
995 | CONFIG_MINIX_FS=y | 1039 | CONFIG_MINIX_FS=y |
996 | # CONFIG_ROMFS_FS is not set | 1040 | # CONFIG_ROMFS_FS is not set |
@@ -1000,7 +1044,7 @@ CONFIG_INOTIFY_USER=y | |||
1000 | CONFIG_DNOTIFY=y | 1044 | CONFIG_DNOTIFY=y |
1001 | # CONFIG_AUTOFS_FS is not set | 1045 | # CONFIG_AUTOFS_FS is not set |
1002 | # CONFIG_AUTOFS4_FS is not set | 1046 | # CONFIG_AUTOFS4_FS is not set |
1003 | # CONFIG_FUSE_FS is not set | 1047 | CONFIG_FUSE_FS=m |
1004 | 1048 | ||
1005 | # | 1049 | # |
1006 | # CD-ROM/DVD Filesystems | 1050 | # CD-ROM/DVD Filesystems |
@@ -1027,11 +1071,12 @@ CONFIG_PROC_FS=y | |||
1027 | CONFIG_PROC_KCORE=y | 1071 | CONFIG_PROC_KCORE=y |
1028 | CONFIG_PROC_SYSCTL=y | 1072 | CONFIG_PROC_SYSCTL=y |
1029 | CONFIG_SYSFS=y | 1073 | CONFIG_SYSFS=y |
1030 | # CONFIG_TMPFS is not set | 1074 | CONFIG_TMPFS=y |
1075 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1031 | CONFIG_HUGETLBFS=y | 1076 | CONFIG_HUGETLBFS=y |
1032 | CONFIG_HUGETLB_PAGE=y | 1077 | CONFIG_HUGETLB_PAGE=y |
1033 | CONFIG_RAMFS=y | 1078 | CONFIG_RAMFS=y |
1034 | # CONFIG_CONFIGFS_FS is not set | 1079 | CONFIG_CONFIGFS_FS=m |
1035 | 1080 | ||
1036 | # | 1081 | # |
1037 | # Miscellaneous filesystems | 1082 | # Miscellaneous filesystems |
@@ -1132,37 +1177,43 @@ CONFIG_NLS_ISO8859_1=y | |||
1132 | # | 1177 | # |
1133 | # Profiling support | 1178 | # Profiling support |
1134 | # | 1179 | # |
1135 | # CONFIG_PROFILING is not set | 1180 | CONFIG_PROFILING=y |
1181 | CONFIG_OPROFILE=m | ||
1136 | 1182 | ||
1137 | # | 1183 | # |
1138 | # Kernel hacking | 1184 | # Kernel hacking |
1139 | # | 1185 | # |
1140 | # CONFIG_PRINTK_TIME is not set | 1186 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
1187 | CONFIG_PRINTK_TIME=y | ||
1141 | CONFIG_ENABLE_MUST_CHECK=y | 1188 | CONFIG_ENABLE_MUST_CHECK=y |
1142 | # CONFIG_MAGIC_SYSRQ is not set | 1189 | CONFIG_MAGIC_SYSRQ=y |
1143 | # CONFIG_UNUSED_SYMBOLS is not set | 1190 | # CONFIG_UNUSED_SYMBOLS is not set |
1144 | CONFIG_DEBUG_KERNEL=y | 1191 | CONFIG_DEBUG_KERNEL=y |
1145 | CONFIG_LOG_BUF_SHIFT=14 | 1192 | CONFIG_LOG_BUF_SHIFT=14 |
1146 | CONFIG_DETECT_SOFTLOCKUP=y | 1193 | CONFIG_DETECT_SOFTLOCKUP=y |
1147 | # CONFIG_SCHEDSTATS is not set | 1194 | # CONFIG_SCHEDSTATS is not set |
1148 | # CONFIG_DEBUG_SLAB is not set | 1195 | # CONFIG_DEBUG_SLAB is not set |
1149 | CONFIG_DEBUG_SPINLOCK=y | 1196 | # CONFIG_DEBUG_PREEMPT is not set |
1197 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1150 | # CONFIG_DEBUG_MUTEXES is not set | 1198 | # CONFIG_DEBUG_MUTEXES is not set |
1151 | # CONFIG_DEBUG_RWSEMS is not set | 1199 | # CONFIG_DEBUG_RWSEMS is not set |
1200 | # CONFIG_DEBUG_LOCK_ALLOC is not set | ||
1201 | # CONFIG_PROVE_LOCKING is not set | ||
1152 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1202 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1153 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1203 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1154 | # CONFIG_DEBUG_KOBJECT is not set | 1204 | # CONFIG_DEBUG_KOBJECT is not set |
1155 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1205 | CONFIG_DEBUG_BUGVERBOSE=y |
1156 | # CONFIG_DEBUG_INFO is not set | 1206 | CONFIG_DEBUG_INFO=y |
1157 | CONFIG_DEBUG_FS=y | 1207 | CONFIG_DEBUG_FS=y |
1158 | # CONFIG_DEBUG_VM is not set | 1208 | # CONFIG_DEBUG_VM is not set |
1159 | # CONFIG_DEBUG_LIST is not set | 1209 | # CONFIG_DEBUG_LIST is not set |
1160 | CONFIG_FRAME_POINTER=y | 1210 | CONFIG_FRAME_POINTER=y |
1161 | CONFIG_FORCED_INLINING=y | 1211 | CONFIG_FORCED_INLINING=y |
1212 | # CONFIG_HEADERS_CHECK is not set | ||
1162 | # CONFIG_RCU_TORTURE_TEST is not set | 1213 | # CONFIG_RCU_TORTURE_TEST is not set |
1163 | # CONFIG_SH_STANDARD_BIOS is not set | 1214 | # CONFIG_SH_STANDARD_BIOS is not set |
1164 | # CONFIG_EARLY_SCIF_CONSOLE is not set | 1215 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
1165 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1216 | CONFIG_DEBUG_STACKOVERFLOW=y |
1166 | # CONFIG_DEBUG_STACK_USAGE is not set | 1217 | # CONFIG_DEBUG_STACK_USAGE is not set |
1167 | # CONFIG_4KSTACKS is not set | 1218 | # CONFIG_4KSTACKS is not set |
1168 | # CONFIG_KGDB is not set | 1219 | # CONFIG_KGDB is not set |
@@ -1178,9 +1229,9 @@ CONFIG_FORCED_INLINING=y | |||
1178 | # | 1229 | # |
1179 | CONFIG_CRYPTO=y | 1230 | CONFIG_CRYPTO=y |
1180 | CONFIG_CRYPTO_ALGAPI=y | 1231 | CONFIG_CRYPTO_ALGAPI=y |
1181 | CONFIG_CRYPTO_BLKCIPHER=m | 1232 | CONFIG_CRYPTO_BLKCIPHER=y |
1182 | CONFIG_CRYPTO_HASH=y | 1233 | CONFIG_CRYPTO_HASH=y |
1183 | CONFIG_CRYPTO_MANAGER=m | 1234 | CONFIG_CRYPTO_MANAGER=y |
1184 | CONFIG_CRYPTO_HMAC=y | 1235 | CONFIG_CRYPTO_HMAC=y |
1185 | # CONFIG_CRYPTO_NULL is not set | 1236 | # CONFIG_CRYPTO_NULL is not set |
1186 | # CONFIG_CRYPTO_MD4 is not set | 1237 | # CONFIG_CRYPTO_MD4 is not set |
@@ -1191,7 +1242,7 @@ CONFIG_CRYPTO_MD5=y | |||
1191 | # CONFIG_CRYPTO_WP512 is not set | 1242 | # CONFIG_CRYPTO_WP512 is not set |
1192 | # CONFIG_CRYPTO_TGR192 is not set | 1243 | # CONFIG_CRYPTO_TGR192 is not set |
1193 | CONFIG_CRYPTO_ECB=m | 1244 | CONFIG_CRYPTO_ECB=m |
1194 | CONFIG_CRYPTO_CBC=m | 1245 | CONFIG_CRYPTO_CBC=y |
1195 | CONFIG_CRYPTO_DES=y | 1246 | CONFIG_CRYPTO_DES=y |
1196 | # CONFIG_CRYPTO_BLOWFISH is not set | 1247 | # CONFIG_CRYPTO_BLOWFISH is not set |
1197 | # CONFIG_CRYPTO_TWOFISH is not set | 1248 | # CONFIG_CRYPTO_TWOFISH is not set |
diff --git a/arch/sh/configs/se7206_defconfig b/arch/sh/configs/se7206_defconfig new file mode 100644 index 000000000000..87ab9080fd1d --- /dev/null +++ b/arch/sh/configs/se7206_defconfig | |||
@@ -0,0 +1,890 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19 | ||
4 | # Wed Dec 6 14:40:15 2006 | ||
5 | # | ||
6 | CONFIG_SUPERH=y | ||
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
8 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
9 | CONFIG_GENERIC_HWEIGHT=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_GENERIC_IRQ_PROBE=y | ||
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
13 | # CONFIG_GENERIC_TIME is not set | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
16 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
17 | |||
18 | # | ||
19 | # Code maturity level options | ||
20 | # | ||
21 | CONFIG_EXPERIMENTAL=y | ||
22 | CONFIG_BROKEN_ON_SMP=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_LOCALVERSION="" | ||
29 | # CONFIG_LOCALVERSION_AUTO is not set | ||
30 | # CONFIG_SYSVIPC is not set | ||
31 | # CONFIG_POSIX_MQUEUE is not set | ||
32 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
33 | # CONFIG_TASKSTATS is not set | ||
34 | # CONFIG_UTS_NS is not set | ||
35 | # CONFIG_AUDIT is not set | ||
36 | # CONFIG_IKCONFIG is not set | ||
37 | # CONFIG_RELAY is not set | ||
38 | CONFIG_INITRAMFS_SOURCE="" | ||
39 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
40 | CONFIG_SYSCTL=y | ||
41 | CONFIG_EMBEDDED=y | ||
42 | # CONFIG_UID16 is not set | ||
43 | # CONFIG_SYSCTL_SYSCALL is not set | ||
44 | # CONFIG_KALLSYMS is not set | ||
45 | # CONFIG_HOTPLUG is not set | ||
46 | CONFIG_PRINTK=y | ||
47 | CONFIG_BUG=y | ||
48 | # CONFIG_ELF_CORE is not set | ||
49 | # CONFIG_BASE_FULL is not set | ||
50 | # CONFIG_FUTEX is not set | ||
51 | # CONFIG_EPOLL is not set | ||
52 | CONFIG_SLAB=y | ||
53 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
54 | CONFIG_TINY_SHMEM=y | ||
55 | CONFIG_BASE_SMALL=1 | ||
56 | # CONFIG_SLOB is not set | ||
57 | |||
58 | # | ||
59 | # Loadable module support | ||
60 | # | ||
61 | # CONFIG_MODULES is not set | ||
62 | |||
63 | # | ||
64 | # Block layer | ||
65 | # | ||
66 | CONFIG_BLOCK=y | ||
67 | # CONFIG_LBD is not set | ||
68 | # CONFIG_LSF is not set | ||
69 | |||
70 | # | ||
71 | # IO Schedulers | ||
72 | # | ||
73 | CONFIG_IOSCHED_NOOP=y | ||
74 | # CONFIG_IOSCHED_AS is not set | ||
75 | # CONFIG_IOSCHED_DEADLINE is not set | ||
76 | # CONFIG_IOSCHED_CFQ is not set | ||
77 | # CONFIG_DEFAULT_AS is not set | ||
78 | # CONFIG_DEFAULT_DEADLINE is not set | ||
79 | # CONFIG_DEFAULT_CFQ is not set | ||
80 | CONFIG_DEFAULT_NOOP=y | ||
81 | CONFIG_DEFAULT_IOSCHED="noop" | ||
82 | |||
83 | # | ||
84 | # System type | ||
85 | # | ||
86 | # CONFIG_SH_SOLUTION_ENGINE is not set | ||
87 | # CONFIG_SH_7751_SOLUTION_ENGINE is not set | ||
88 | # CONFIG_SH_7300_SOLUTION_ENGINE is not set | ||
89 | # CONFIG_SH_7343_SOLUTION_ENGINE is not set | ||
90 | # CONFIG_SH_73180_SOLUTION_ENGINE is not set | ||
91 | # CONFIG_SH_7751_SYSTEMH is not set | ||
92 | # CONFIG_SH_HP6XX is not set | ||
93 | # CONFIG_SH_EC3104 is not set | ||
94 | # CONFIG_SH_SATURN is not set | ||
95 | # CONFIG_SH_DREAMCAST is not set | ||
96 | # CONFIG_SH_BIGSUR is not set | ||
97 | # CONFIG_SH_MPC1211 is not set | ||
98 | # CONFIG_SH_SH03 is not set | ||
99 | # CONFIG_SH_SECUREEDGE5410 is not set | ||
100 | # CONFIG_SH_HS7751RVOIP is not set | ||
101 | # CONFIG_SH_7710VOIPGW is not set | ||
102 | # CONFIG_SH_RTS7751R2D is not set | ||
103 | # CONFIG_SH_R7780RP is not set | ||
104 | # CONFIG_SH_EDOSK7705 is not set | ||
105 | # CONFIG_SH_SH4202_MICRODEV is not set | ||
106 | # CONFIG_SH_LANDISK is not set | ||
107 | # CONFIG_SH_TITAN is not set | ||
108 | # CONFIG_SH_SHMIN is not set | ||
109 | CONFIG_SH_7206_SOLUTION_ENGINE=y | ||
110 | # CONFIG_SH_7619_SOLUTION_ENGINE is not set | ||
111 | # CONFIG_SH_UNKNOWN is not set | ||
112 | |||
113 | # | ||
114 | # Processor selection | ||
115 | # | ||
116 | CONFIG_CPU_SH2=y | ||
117 | CONFIG_CPU_SH2A=y | ||
118 | |||
119 | # | ||
120 | # SH-2 Processor Support | ||
121 | # | ||
122 | # CONFIG_CPU_SUBTYPE_SH7604 is not set | ||
123 | # CONFIG_CPU_SUBTYPE_SH7619 is not set | ||
124 | |||
125 | # | ||
126 | # SH-2A Processor Support | ||
127 | # | ||
128 | CONFIG_CPU_SUBTYPE_SH7206=y | ||
129 | |||
130 | # | ||
131 | # SH-3 Processor Support | ||
132 | # | ||
133 | # CONFIG_CPU_SUBTYPE_SH7300 is not set | ||
134 | # CONFIG_CPU_SUBTYPE_SH7705 is not set | ||
135 | # CONFIG_CPU_SUBTYPE_SH7706 is not set | ||
136 | # CONFIG_CPU_SUBTYPE_SH7707 is not set | ||
137 | # CONFIG_CPU_SUBTYPE_SH7708 is not set | ||
138 | # CONFIG_CPU_SUBTYPE_SH7709 is not set | ||
139 | # CONFIG_CPU_SUBTYPE_SH7710 is not set | ||
140 | |||
141 | # | ||
142 | # SH-4 Processor Support | ||
143 | # | ||
144 | # CONFIG_CPU_SUBTYPE_SH7750 is not set | ||
145 | # CONFIG_CPU_SUBTYPE_SH7091 is not set | ||
146 | # CONFIG_CPU_SUBTYPE_SH7750R is not set | ||
147 | # CONFIG_CPU_SUBTYPE_SH7750S is not set | ||
148 | # CONFIG_CPU_SUBTYPE_SH7751 is not set | ||
149 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | ||
150 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | ||
151 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set | ||
152 | |||
153 | # | ||
154 | # ST40 Processor Support | ||
155 | # | ||
156 | # CONFIG_CPU_SUBTYPE_ST40STB1 is not set | ||
157 | # CONFIG_CPU_SUBTYPE_ST40GX1 is not set | ||
158 | |||
159 | # | ||
160 | # SH-4A Processor Support | ||
161 | # | ||
162 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | ||
163 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | ||
164 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | ||
165 | |||
166 | # | ||
167 | # SH4AL-DSP Processor Support | ||
168 | # | ||
169 | # CONFIG_CPU_SUBTYPE_SH73180 is not set | ||
170 | # CONFIG_CPU_SUBTYPE_SH7343 is not set | ||
171 | |||
172 | # | ||
173 | # Memory management options | ||
174 | # | ||
175 | CONFIG_PAGE_OFFSET=0x00000000 | ||
176 | CONFIG_MEMORY_START=0x0c000000 | ||
177 | CONFIG_MEMORY_SIZE=0x04000000 | ||
178 | CONFIG_PAGE_SIZE_4KB=y | ||
179 | # CONFIG_PAGE_SIZE_8KB is not set | ||
180 | # CONFIG_PAGE_SIZE_64KB is not set | ||
181 | CONFIG_SELECT_MEMORY_MODEL=y | ||
182 | CONFIG_FLATMEM_MANUAL=y | ||
183 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
184 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
185 | CONFIG_FLATMEM=y | ||
186 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
187 | # CONFIG_SPARSEMEM_STATIC is not set | ||
188 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
189 | # CONFIG_RESOURCES_64BIT is not set | ||
190 | |||
191 | # | ||
192 | # Cache configuration | ||
193 | # | ||
194 | # CONFIG_SH_DIRECT_MAPPED is not set | ||
195 | # CONFIG_SH_WRITETHROUGH is not set | ||
196 | # CONFIG_SH_OCRAM is not set | ||
197 | |||
198 | # | ||
199 | # Processor features | ||
200 | # | ||
201 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
202 | CONFIG_CPU_BIG_ENDIAN=y | ||
203 | # CONFIG_SH_FPU is not set | ||
204 | # CONFIG_SH_FPU_EMU is not set | ||
205 | # CONFIG_SH_DSP is not set | ||
206 | |||
207 | # | ||
208 | # Timer support | ||
209 | # | ||
210 | CONFIG_SH_CMT=y | ||
211 | # CONFIG_SH_MTU2 is not set | ||
212 | CONFIG_SH_TIMER_IRQ=140 | ||
213 | # CONFIG_NO_IDLE_HZ is not set | ||
214 | CONFIG_SH_PCLK_FREQ=33333333 | ||
215 | CONFIG_SH_CLK_MD=6 | ||
216 | |||
217 | # | ||
218 | # CPU Frequency scaling | ||
219 | # | ||
220 | # CONFIG_CPU_FREQ is not set | ||
221 | |||
222 | # | ||
223 | # DMA support | ||
224 | # | ||
225 | # CONFIG_SH_DMA is not set | ||
226 | |||
227 | # | ||
228 | # Companion Chips | ||
229 | # | ||
230 | # CONFIG_HD6446X_SERIES is not set | ||
231 | |||
232 | # | ||
233 | # Additional SuperH Device Drivers | ||
234 | # | ||
235 | # CONFIG_PUSH_SWITCH is not set | ||
236 | |||
237 | # | ||
238 | # Kernel features | ||
239 | # | ||
240 | CONFIG_HZ_100=y | ||
241 | # CONFIG_HZ_250 is not set | ||
242 | # CONFIG_HZ_1000 is not set | ||
243 | CONFIG_HZ=100 | ||
244 | # CONFIG_KEXEC is not set | ||
245 | # CONFIG_SMP is not set | ||
246 | CONFIG_PREEMPT_NONE=y | ||
247 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
248 | # CONFIG_PREEMPT is not set | ||
249 | |||
250 | # | ||
251 | # Boot options | ||
252 | # | ||
253 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 | ||
254 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | ||
255 | # CONFIG_UBC_WAKEUP is not set | ||
256 | # CONFIG_CMDLINE_BOOL is not set | ||
257 | |||
258 | # | ||
259 | # Bus options | ||
260 | # | ||
261 | # CONFIG_PCI is not set | ||
262 | |||
263 | # | ||
264 | # PCCARD (PCMCIA/CardBus) support | ||
265 | # | ||
266 | |||
267 | # | ||
268 | # PCI Hotplug Support | ||
269 | # | ||
270 | |||
271 | # | ||
272 | # Executable file formats | ||
273 | # | ||
274 | CONFIG_BINFMT_FLAT=y | ||
275 | CONFIG_BINFMT_ZFLAT=y | ||
276 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
277 | # CONFIG_BINFMT_MISC is not set | ||
278 | |||
279 | # | ||
280 | # Power management options (EXPERIMENTAL) | ||
281 | # | ||
282 | # CONFIG_PM is not set | ||
283 | |||
284 | # | ||
285 | # Networking | ||
286 | # | ||
287 | CONFIG_NET=y | ||
288 | |||
289 | # | ||
290 | # Networking options | ||
291 | # | ||
292 | # CONFIG_NETDEBUG is not set | ||
293 | # CONFIG_PACKET is not set | ||
294 | # CONFIG_UNIX is not set | ||
295 | # CONFIG_NET_KEY is not set | ||
296 | CONFIG_INET=y | ||
297 | # CONFIG_IP_MULTICAST is not set | ||
298 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
299 | CONFIG_IP_FIB_HASH=y | ||
300 | # CONFIG_IP_PNP is not set | ||
301 | # CONFIG_NET_IPIP is not set | ||
302 | # CONFIG_NET_IPGRE is not set | ||
303 | # CONFIG_ARPD is not set | ||
304 | # CONFIG_SYN_COOKIES is not set | ||
305 | # CONFIG_INET_AH is not set | ||
306 | # CONFIG_INET_ESP is not set | ||
307 | # CONFIG_INET_IPCOMP is not set | ||
308 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
309 | # CONFIG_INET_TUNNEL is not set | ||
310 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
311 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
312 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
313 | # CONFIG_INET_DIAG is not set | ||
314 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
315 | CONFIG_TCP_CONG_CUBIC=y | ||
316 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
317 | # CONFIG_IPV6 is not set | ||
318 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
319 | # CONFIG_INET6_TUNNEL is not set | ||
320 | # CONFIG_NETWORK_SECMARK is not set | ||
321 | # CONFIG_NETFILTER is not set | ||
322 | |||
323 | # | ||
324 | # DCCP Configuration (EXPERIMENTAL) | ||
325 | # | ||
326 | # CONFIG_IP_DCCP is not set | ||
327 | |||
328 | # | ||
329 | # SCTP Configuration (EXPERIMENTAL) | ||
330 | # | ||
331 | # CONFIG_IP_SCTP is not set | ||
332 | |||
333 | # | ||
334 | # TIPC Configuration (EXPERIMENTAL) | ||
335 | # | ||
336 | # CONFIG_TIPC is not set | ||
337 | # CONFIG_ATM is not set | ||
338 | # CONFIG_BRIDGE is not set | ||
339 | # CONFIG_VLAN_8021Q is not set | ||
340 | # CONFIG_DECNET is not set | ||
341 | # CONFIG_LLC2 is not set | ||
342 | # CONFIG_IPX is not set | ||
343 | # CONFIG_ATALK is not set | ||
344 | # CONFIG_X25 is not set | ||
345 | # CONFIG_LAPB is not set | ||
346 | # CONFIG_ECONET is not set | ||
347 | # CONFIG_WAN_ROUTER is not set | ||
348 | |||
349 | # | ||
350 | # QoS and/or fair queueing | ||
351 | # | ||
352 | # CONFIG_NET_SCHED is not set | ||
353 | |||
354 | # | ||
355 | # Network testing | ||
356 | # | ||
357 | # CONFIG_NET_PKTGEN is not set | ||
358 | # CONFIG_HAMRADIO is not set | ||
359 | # CONFIG_IRDA is not set | ||
360 | # CONFIG_BT is not set | ||
361 | # CONFIG_IEEE80211 is not set | ||
362 | |||
363 | # | ||
364 | # Device Drivers | ||
365 | # | ||
366 | |||
367 | # | ||
368 | # Generic Driver Options | ||
369 | # | ||
370 | # CONFIG_STANDALONE is not set | ||
371 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
372 | # CONFIG_SYS_HYPERVISOR is not set | ||
373 | |||
374 | # | ||
375 | # Connector - unified userspace <-> kernelspace linker | ||
376 | # | ||
377 | # CONFIG_CONNECTOR is not set | ||
378 | |||
379 | # | ||
380 | # Memory Technology Devices (MTD) | ||
381 | # | ||
382 | CONFIG_MTD=y | ||
383 | # CONFIG_MTD_DEBUG is not set | ||
384 | CONFIG_MTD_CONCAT=y | ||
385 | CONFIG_MTD_PARTITIONS=y | ||
386 | CONFIG_MTD_REDBOOT_PARTS=y | ||
387 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
388 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
389 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
390 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
391 | |||
392 | # | ||
393 | # User Modules And Translation Layers | ||
394 | # | ||
395 | CONFIG_MTD_CHAR=y | ||
396 | CONFIG_MTD_BLOCK=y | ||
397 | # CONFIG_FTL is not set | ||
398 | # CONFIG_NFTL is not set | ||
399 | # CONFIG_INFTL is not set | ||
400 | # CONFIG_RFD_FTL is not set | ||
401 | # CONFIG_SSFDC is not set | ||
402 | |||
403 | # | ||
404 | # RAM/ROM/Flash chip drivers | ||
405 | # | ||
406 | CONFIG_MTD_CFI=y | ||
407 | # CONFIG_MTD_JEDECPROBE is not set | ||
408 | CONFIG_MTD_GEN_PROBE=y | ||
409 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
410 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
411 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
412 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
413 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
414 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
415 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
416 | CONFIG_MTD_CFI_I1=y | ||
417 | CONFIG_MTD_CFI_I2=y | ||
418 | # CONFIG_MTD_CFI_I4 is not set | ||
419 | # CONFIG_MTD_CFI_I8 is not set | ||
420 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
421 | CONFIG_MTD_CFI_AMDSTD=y | ||
422 | # CONFIG_MTD_CFI_STAA is not set | ||
423 | CONFIG_MTD_CFI_UTIL=y | ||
424 | # CONFIG_MTD_RAM is not set | ||
425 | # CONFIG_MTD_ROM is not set | ||
426 | # CONFIG_MTD_ABSENT is not set | ||
427 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
428 | |||
429 | # | ||
430 | # Mapping drivers for chip access | ||
431 | # | ||
432 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
433 | CONFIG_MTD_PHYSMAP=y | ||
434 | CONFIG_MTD_PHYSMAP_START=0x20000000 | ||
435 | CONFIG_MTD_PHYSMAP_LEN=0x01000000 | ||
436 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | ||
437 | # CONFIG_MTD_SOLUTIONENGINE is not set | ||
438 | # CONFIG_MTD_UCLINUX is not set | ||
439 | # CONFIG_MTD_PLATRAM is not set | ||
440 | |||
441 | # | ||
442 | # Self-contained MTD device drivers | ||
443 | # | ||
444 | # CONFIG_MTD_SLRAM is not set | ||
445 | # CONFIG_MTD_PHRAM is not set | ||
446 | # CONFIG_MTD_MTDRAM is not set | ||
447 | # CONFIG_MTD_BLOCK2MTD is not set | ||
448 | |||
449 | # | ||
450 | # Disk-On-Chip Device Drivers | ||
451 | # | ||
452 | # CONFIG_MTD_DOC2000 is not set | ||
453 | # CONFIG_MTD_DOC2001 is not set | ||
454 | # CONFIG_MTD_DOC2001PLUS is not set | ||
455 | |||
456 | # | ||
457 | # NAND Flash Device Drivers | ||
458 | # | ||
459 | # CONFIG_MTD_NAND is not set | ||
460 | |||
461 | # | ||
462 | # OneNAND Flash Device Drivers | ||
463 | # | ||
464 | # CONFIG_MTD_ONENAND is not set | ||
465 | |||
466 | # | ||
467 | # Parallel port support | ||
468 | # | ||
469 | # CONFIG_PARPORT is not set | ||
470 | |||
471 | # | ||
472 | # Plug and Play support | ||
473 | # | ||
474 | |||
475 | # | ||
476 | # Block devices | ||
477 | # | ||
478 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
479 | # CONFIG_BLK_DEV_LOOP is not set | ||
480 | # CONFIG_BLK_DEV_NBD is not set | ||
481 | # CONFIG_BLK_DEV_RAM is not set | ||
482 | # CONFIG_BLK_DEV_INITRD is not set | ||
483 | # CONFIG_CDROM_PKTCDVD is not set | ||
484 | # CONFIG_ATA_OVER_ETH is not set | ||
485 | |||
486 | # | ||
487 | # Misc devices | ||
488 | # | ||
489 | # CONFIG_TIFM_CORE is not set | ||
490 | |||
491 | # | ||
492 | # ATA/ATAPI/MFM/RLL support | ||
493 | # | ||
494 | # CONFIG_IDE is not set | ||
495 | |||
496 | # | ||
497 | # SCSI device support | ||
498 | # | ||
499 | # CONFIG_RAID_ATTRS is not set | ||
500 | # CONFIG_SCSI is not set | ||
501 | # CONFIG_SCSI_NETLINK is not set | ||
502 | |||
503 | # | ||
504 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
505 | # | ||
506 | # CONFIG_ATA is not set | ||
507 | |||
508 | # | ||
509 | # Multi-device support (RAID and LVM) | ||
510 | # | ||
511 | # CONFIG_MD is not set | ||
512 | |||
513 | # | ||
514 | # Fusion MPT device support | ||
515 | # | ||
516 | # CONFIG_FUSION is not set | ||
517 | |||
518 | # | ||
519 | # IEEE 1394 (FireWire) support | ||
520 | # | ||
521 | |||
522 | # | ||
523 | # I2O device support | ||
524 | # | ||
525 | |||
526 | # | ||
527 | # Network device support | ||
528 | # | ||
529 | CONFIG_NETDEVICES=y | ||
530 | # CONFIG_DUMMY is not set | ||
531 | # CONFIG_BONDING is not set | ||
532 | # CONFIG_EQUALIZER is not set | ||
533 | # CONFIG_TUN is not set | ||
534 | |||
535 | # | ||
536 | # PHY device support | ||
537 | # | ||
538 | # CONFIG_PHYLIB is not set | ||
539 | |||
540 | # | ||
541 | # Ethernet (10 or 100Mbit) | ||
542 | # | ||
543 | CONFIG_NET_ETHERNET=y | ||
544 | CONFIG_MII=y | ||
545 | # CONFIG_STNIC is not set | ||
546 | CONFIG_SMC91X=y | ||
547 | |||
548 | # | ||
549 | # Ethernet (1000 Mbit) | ||
550 | # | ||
551 | |||
552 | # | ||
553 | # Ethernet (10000 Mbit) | ||
554 | # | ||
555 | |||
556 | # | ||
557 | # Token Ring devices | ||
558 | # | ||
559 | |||
560 | # | ||
561 | # Wireless LAN (non-hamradio) | ||
562 | # | ||
563 | # CONFIG_NET_RADIO is not set | ||
564 | |||
565 | # | ||
566 | # Wan interfaces | ||
567 | # | ||
568 | # CONFIG_WAN is not set | ||
569 | # CONFIG_PPP is not set | ||
570 | # CONFIG_SLIP is not set | ||
571 | # CONFIG_SHAPER is not set | ||
572 | # CONFIG_NETCONSOLE is not set | ||
573 | # CONFIG_NETPOLL is not set | ||
574 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
575 | |||
576 | # | ||
577 | # ISDN subsystem | ||
578 | # | ||
579 | # CONFIG_ISDN is not set | ||
580 | |||
581 | # | ||
582 | # Telephony Support | ||
583 | # | ||
584 | # CONFIG_PHONE is not set | ||
585 | |||
586 | # | ||
587 | # Input device support | ||
588 | # | ||
589 | CONFIG_INPUT=y | ||
590 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
591 | |||
592 | # | ||
593 | # Userland interfaces | ||
594 | # | ||
595 | # CONFIG_INPUT_MOUSEDEV is not set | ||
596 | # CONFIG_INPUT_JOYDEV is not set | ||
597 | # CONFIG_INPUT_TSDEV is not set | ||
598 | # CONFIG_INPUT_EVDEV is not set | ||
599 | # CONFIG_INPUT_EVBUG is not set | ||
600 | |||
601 | # | ||
602 | # Input Device Drivers | ||
603 | # | ||
604 | # CONFIG_INPUT_KEYBOARD is not set | ||
605 | # CONFIG_INPUT_MOUSE is not set | ||
606 | # CONFIG_INPUT_JOYSTICK is not set | ||
607 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
608 | # CONFIG_INPUT_MISC is not set | ||
609 | |||
610 | # | ||
611 | # Hardware I/O ports | ||
612 | # | ||
613 | # CONFIG_SERIO is not set | ||
614 | # CONFIG_GAMEPORT is not set | ||
615 | |||
616 | # | ||
617 | # Character devices | ||
618 | # | ||
619 | # CONFIG_VT is not set | ||
620 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
621 | |||
622 | # | ||
623 | # Serial drivers | ||
624 | # | ||
625 | # CONFIG_SERIAL_8250 is not set | ||
626 | |||
627 | # | ||
628 | # Non-8250 serial port support | ||
629 | # | ||
630 | CONFIG_SERIAL_SH_SCI=y | ||
631 | CONFIG_SERIAL_SH_SCI_NR_UARTS=4 | ||
632 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
633 | CONFIG_SERIAL_CORE=y | ||
634 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
635 | # CONFIG_UNIX98_PTYS is not set | ||
636 | # CONFIG_LEGACY_PTYS is not set | ||
637 | |||
638 | # | ||
639 | # IPMI | ||
640 | # | ||
641 | # CONFIG_IPMI_HANDLER is not set | ||
642 | |||
643 | # | ||
644 | # Watchdog Cards | ||
645 | # | ||
646 | # CONFIG_WATCHDOG is not set | ||
647 | # CONFIG_HW_RANDOM is not set | ||
648 | # CONFIG_GEN_RTC is not set | ||
649 | # CONFIG_DTLK is not set | ||
650 | # CONFIG_R3964 is not set | ||
651 | |||
652 | # | ||
653 | # Ftape, the floppy tape device driver | ||
654 | # | ||
655 | # CONFIG_RAW_DRIVER is not set | ||
656 | |||
657 | # | ||
658 | # TPM devices | ||
659 | # | ||
660 | # CONFIG_TCG_TPM is not set | ||
661 | |||
662 | # | ||
663 | # I2C support | ||
664 | # | ||
665 | # CONFIG_I2C is not set | ||
666 | |||
667 | # | ||
668 | # SPI support | ||
669 | # | ||
670 | # CONFIG_SPI is not set | ||
671 | # CONFIG_SPI_MASTER is not set | ||
672 | |||
673 | # | ||
674 | # Dallas's 1-wire bus | ||
675 | # | ||
676 | # CONFIG_W1 is not set | ||
677 | |||
678 | # | ||
679 | # Hardware Monitoring support | ||
680 | # | ||
681 | # CONFIG_HWMON is not set | ||
682 | # CONFIG_HWMON_VID is not set | ||
683 | |||
684 | # | ||
685 | # Multimedia devices | ||
686 | # | ||
687 | # CONFIG_VIDEO_DEV is not set | ||
688 | |||
689 | # | ||
690 | # Digital Video Broadcasting Devices | ||
691 | # | ||
692 | # CONFIG_DVB is not set | ||
693 | |||
694 | # | ||
695 | # Graphics support | ||
696 | # | ||
697 | # CONFIG_FIRMWARE_EDID is not set | ||
698 | # CONFIG_FB is not set | ||
699 | |||
700 | # | ||
701 | # Sound | ||
702 | # | ||
703 | # CONFIG_SOUND is not set | ||
704 | |||
705 | # | ||
706 | # USB support | ||
707 | # | ||
708 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
709 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
710 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
711 | |||
712 | # | ||
713 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
714 | # | ||
715 | |||
716 | # | ||
717 | # USB Gadget Support | ||
718 | # | ||
719 | # CONFIG_USB_GADGET is not set | ||
720 | |||
721 | # | ||
722 | # MMC/SD Card support | ||
723 | # | ||
724 | # CONFIG_MMC is not set | ||
725 | |||
726 | # | ||
727 | # LED devices | ||
728 | # | ||
729 | # CONFIG_NEW_LEDS is not set | ||
730 | |||
731 | # | ||
732 | # LED drivers | ||
733 | # | ||
734 | |||
735 | # | ||
736 | # LED Triggers | ||
737 | # | ||
738 | |||
739 | # | ||
740 | # InfiniBand support | ||
741 | # | ||
742 | |||
743 | # | ||
744 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
745 | # | ||
746 | |||
747 | # | ||
748 | # Real Time Clock | ||
749 | # | ||
750 | # CONFIG_RTC_CLASS is not set | ||
751 | |||
752 | # | ||
753 | # DMA Engine support | ||
754 | # | ||
755 | # CONFIG_DMA_ENGINE is not set | ||
756 | |||
757 | # | ||
758 | # DMA Clients | ||
759 | # | ||
760 | |||
761 | # | ||
762 | # DMA Devices | ||
763 | # | ||
764 | |||
765 | # | ||
766 | # File systems | ||
767 | # | ||
768 | # CONFIG_EXT2_FS is not set | ||
769 | # CONFIG_EXT3_FS is not set | ||
770 | # CONFIG_EXT4DEV_FS is not set | ||
771 | # CONFIG_REISERFS_FS is not set | ||
772 | # CONFIG_JFS_FS is not set | ||
773 | # CONFIG_FS_POSIX_ACL is not set | ||
774 | # CONFIG_XFS_FS is not set | ||
775 | # CONFIG_GFS2_FS is not set | ||
776 | # CONFIG_MINIX_FS is not set | ||
777 | CONFIG_ROMFS_FS=y | ||
778 | # CONFIG_INOTIFY is not set | ||
779 | # CONFIG_QUOTA is not set | ||
780 | # CONFIG_DNOTIFY is not set | ||
781 | # CONFIG_AUTOFS_FS is not set | ||
782 | # CONFIG_AUTOFS4_FS is not set | ||
783 | # CONFIG_FUSE_FS is not set | ||
784 | |||
785 | # | ||
786 | # CD-ROM/DVD Filesystems | ||
787 | # | ||
788 | # CONFIG_ISO9660_FS is not set | ||
789 | # CONFIG_UDF_FS is not set | ||
790 | |||
791 | # | ||
792 | # DOS/FAT/NT Filesystems | ||
793 | # | ||
794 | # CONFIG_MSDOS_FS is not set | ||
795 | # CONFIG_VFAT_FS is not set | ||
796 | # CONFIG_NTFS_FS is not set | ||
797 | |||
798 | # | ||
799 | # Pseudo filesystems | ||
800 | # | ||
801 | CONFIG_PROC_FS=y | ||
802 | CONFIG_PROC_SYSCTL=y | ||
803 | # CONFIG_SYSFS is not set | ||
804 | # CONFIG_TMPFS is not set | ||
805 | # CONFIG_HUGETLBFS is not set | ||
806 | # CONFIG_HUGETLB_PAGE is not set | ||
807 | CONFIG_RAMFS=y | ||
808 | |||
809 | # | ||
810 | # Miscellaneous filesystems | ||
811 | # | ||
812 | # CONFIG_ADFS_FS is not set | ||
813 | # CONFIG_AFFS_FS is not set | ||
814 | # CONFIG_HFS_FS is not set | ||
815 | # CONFIG_HFSPLUS_FS is not set | ||
816 | # CONFIG_BEFS_FS is not set | ||
817 | # CONFIG_BFS_FS is not set | ||
818 | # CONFIG_EFS_FS is not set | ||
819 | # CONFIG_JFFS_FS is not set | ||
820 | # CONFIG_JFFS2_FS is not set | ||
821 | # CONFIG_CRAMFS is not set | ||
822 | # CONFIG_VXFS_FS is not set | ||
823 | # CONFIG_HPFS_FS is not set | ||
824 | # CONFIG_QNX4FS_FS is not set | ||
825 | # CONFIG_SYSV_FS is not set | ||
826 | # CONFIG_UFS_FS is not set | ||
827 | |||
828 | # | ||
829 | # Network File Systems | ||
830 | # | ||
831 | # CONFIG_NFS_FS is not set | ||
832 | # CONFIG_NFSD is not set | ||
833 | # CONFIG_SMB_FS is not set | ||
834 | # CONFIG_CIFS is not set | ||
835 | # CONFIG_NCP_FS is not set | ||
836 | # CONFIG_CODA_FS is not set | ||
837 | # CONFIG_AFS_FS is not set | ||
838 | # CONFIG_9P_FS is not set | ||
839 | |||
840 | # | ||
841 | # Partition Types | ||
842 | # | ||
843 | # CONFIG_PARTITION_ADVANCED is not set | ||
844 | CONFIG_MSDOS_PARTITION=y | ||
845 | |||
846 | # | ||
847 | # Native Language Support | ||
848 | # | ||
849 | # CONFIG_NLS is not set | ||
850 | |||
851 | # | ||
852 | # Profiling support | ||
853 | # | ||
854 | # CONFIG_PROFILING is not set | ||
855 | |||
856 | # | ||
857 | # Kernel hacking | ||
858 | # | ||
859 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
860 | # CONFIG_PRINTK_TIME is not set | ||
861 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
862 | # CONFIG_MAGIC_SYSRQ is not set | ||
863 | # CONFIG_UNUSED_SYMBOLS is not set | ||
864 | # CONFIG_DEBUG_KERNEL is not set | ||
865 | CONFIG_LOG_BUF_SHIFT=14 | ||
866 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
867 | # CONFIG_UNWIND_INFO is not set | ||
868 | # CONFIG_HEADERS_CHECK is not set | ||
869 | # CONFIG_SH_STANDARD_BIOS is not set | ||
870 | # CONFIG_EARLY_SCIF_CONSOLE is not set | ||
871 | # CONFIG_KGDB is not set | ||
872 | |||
873 | # | ||
874 | # Security options | ||
875 | # | ||
876 | # CONFIG_KEYS is not set | ||
877 | |||
878 | # | ||
879 | # Cryptographic options | ||
880 | # | ||
881 | # CONFIG_CRYPTO is not set | ||
882 | |||
883 | # | ||
884 | # Library routines | ||
885 | # | ||
886 | # CONFIG_CRC_CCITT is not set | ||
887 | # CONFIG_CRC16 is not set | ||
888 | CONFIG_CRC32=y | ||
889 | # CONFIG_LIBCRC32C is not set | ||
890 | CONFIG_ZLIB_INFLATE=y | ||
diff --git a/arch/sh/configs/se7619_defconfig b/arch/sh/configs/se7619_defconfig new file mode 100644 index 000000000000..20ac7f4c53fb --- /dev/null +++ b/arch/sh/configs/se7619_defconfig | |||
@@ -0,0 +1,744 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.19 | ||
4 | # Wed Dec 6 16:35:36 2006 | ||
5 | # | ||
6 | CONFIG_SUPERH=y | ||
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
8 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
9 | CONFIG_GENERIC_HWEIGHT=y | ||
10 | CONFIG_GENERIC_HARDIRQS=y | ||
11 | CONFIG_GENERIC_IRQ_PROBE=y | ||
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
13 | # CONFIG_GENERIC_TIME is not set | ||
14 | CONFIG_STACKTRACE_SUPPORT=y | ||
15 | CONFIG_LOCKDEP_SUPPORT=y | ||
16 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
17 | |||
18 | # | ||
19 | # Code maturity level options | ||
20 | # | ||
21 | CONFIG_EXPERIMENTAL=y | ||
22 | CONFIG_BROKEN_ON_SMP=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
24 | |||
25 | # | ||
26 | # General setup | ||
27 | # | ||
28 | CONFIG_LOCALVERSION="" | ||
29 | # CONFIG_LOCALVERSION_AUTO is not set | ||
30 | # CONFIG_SYSVIPC is not set | ||
31 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
32 | # CONFIG_UTS_NS is not set | ||
33 | # CONFIG_IKCONFIG is not set | ||
34 | # CONFIG_RELAY is not set | ||
35 | CONFIG_INITRAMFS_SOURCE="" | ||
36 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
37 | CONFIG_SYSCTL=y | ||
38 | CONFIG_EMBEDDED=y | ||
39 | # CONFIG_UID16 is not set | ||
40 | # CONFIG_SYSCTL_SYSCALL is not set | ||
41 | # CONFIG_KALLSYMS is not set | ||
42 | # CONFIG_HOTPLUG is not set | ||
43 | CONFIG_PRINTK=y | ||
44 | CONFIG_BUG=y | ||
45 | # CONFIG_ELF_CORE is not set | ||
46 | # CONFIG_BASE_FULL is not set | ||
47 | # CONFIG_FUTEX is not set | ||
48 | # CONFIG_EPOLL is not set | ||
49 | CONFIG_SLAB=y | ||
50 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
51 | CONFIG_TINY_SHMEM=y | ||
52 | CONFIG_BASE_SMALL=1 | ||
53 | # CONFIG_SLOB is not set | ||
54 | |||
55 | # | ||
56 | # Loadable module support | ||
57 | # | ||
58 | # CONFIG_MODULES is not set | ||
59 | |||
60 | # | ||
61 | # Block layer | ||
62 | # | ||
63 | CONFIG_BLOCK=y | ||
64 | # CONFIG_LBD is not set | ||
65 | # CONFIG_LSF is not set | ||
66 | |||
67 | # | ||
68 | # IO Schedulers | ||
69 | # | ||
70 | CONFIG_IOSCHED_NOOP=y | ||
71 | # CONFIG_IOSCHED_AS is not set | ||
72 | # CONFIG_IOSCHED_DEADLINE is not set | ||
73 | # CONFIG_IOSCHED_CFQ is not set | ||
74 | # CONFIG_DEFAULT_AS is not set | ||
75 | # CONFIG_DEFAULT_DEADLINE is not set | ||
76 | # CONFIG_DEFAULT_CFQ is not set | ||
77 | CONFIG_DEFAULT_NOOP=y | ||
78 | CONFIG_DEFAULT_IOSCHED="noop" | ||
79 | |||
80 | # | ||
81 | # System type | ||
82 | # | ||
83 | # CONFIG_SH_SOLUTION_ENGINE is not set | ||
84 | # CONFIG_SH_7751_SOLUTION_ENGINE is not set | ||
85 | # CONFIG_SH_7300_SOLUTION_ENGINE is not set | ||
86 | # CONFIG_SH_7343_SOLUTION_ENGINE is not set | ||
87 | # CONFIG_SH_73180_SOLUTION_ENGINE is not set | ||
88 | # CONFIG_SH_7751_SYSTEMH is not set | ||
89 | # CONFIG_SH_HP6XX is not set | ||
90 | # CONFIG_SH_EC3104 is not set | ||
91 | # CONFIG_SH_SATURN is not set | ||
92 | # CONFIG_SH_DREAMCAST is not set | ||
93 | # CONFIG_SH_BIGSUR is not set | ||
94 | # CONFIG_SH_MPC1211 is not set | ||
95 | # CONFIG_SH_SH03 is not set | ||
96 | # CONFIG_SH_SECUREEDGE5410 is not set | ||
97 | # CONFIG_SH_HS7751RVOIP is not set | ||
98 | # CONFIG_SH_7710VOIPGW is not set | ||
99 | # CONFIG_SH_RTS7751R2D is not set | ||
100 | # CONFIG_SH_R7780RP is not set | ||
101 | # CONFIG_SH_EDOSK7705 is not set | ||
102 | # CONFIG_SH_SH4202_MICRODEV is not set | ||
103 | # CONFIG_SH_LANDISK is not set | ||
104 | # CONFIG_SH_TITAN is not set | ||
105 | # CONFIG_SH_SHMIN is not set | ||
106 | # CONFIG_SH_7206_SOLUTION_ENGINE is not set | ||
107 | CONFIG_SH_7619_SOLUTION_ENGINE=y | ||
108 | # CONFIG_SH_UNKNOWN is not set | ||
109 | |||
110 | # | ||
111 | # Processor selection | ||
112 | # | ||
113 | CONFIG_CPU_SH2=y | ||
114 | |||
115 | # | ||
116 | # SH-2 Processor Support | ||
117 | # | ||
118 | # CONFIG_CPU_SUBTYPE_SH7604 is not set | ||
119 | CONFIG_CPU_SUBTYPE_SH7619=y | ||
120 | |||
121 | # | ||
122 | # SH-2A Processor Support | ||
123 | # | ||
124 | # CONFIG_CPU_SUBTYPE_SH7206 is not set | ||
125 | |||
126 | # | ||
127 | # SH-3 Processor Support | ||
128 | # | ||
129 | # CONFIG_CPU_SUBTYPE_SH7300 is not set | ||
130 | # CONFIG_CPU_SUBTYPE_SH7705 is not set | ||
131 | # CONFIG_CPU_SUBTYPE_SH7706 is not set | ||
132 | # CONFIG_CPU_SUBTYPE_SH7707 is not set | ||
133 | # CONFIG_CPU_SUBTYPE_SH7708 is not set | ||
134 | # CONFIG_CPU_SUBTYPE_SH7709 is not set | ||
135 | # CONFIG_CPU_SUBTYPE_SH7710 is not set | ||
136 | |||
137 | # | ||
138 | # SH-4 Processor Support | ||
139 | # | ||
140 | # CONFIG_CPU_SUBTYPE_SH7750 is not set | ||
141 | # CONFIG_CPU_SUBTYPE_SH7091 is not set | ||
142 | # CONFIG_CPU_SUBTYPE_SH7750R is not set | ||
143 | # CONFIG_CPU_SUBTYPE_SH7750S is not set | ||
144 | # CONFIG_CPU_SUBTYPE_SH7751 is not set | ||
145 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | ||
146 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | ||
147 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set | ||
148 | |||
149 | # | ||
150 | # ST40 Processor Support | ||
151 | # | ||
152 | # CONFIG_CPU_SUBTYPE_ST40STB1 is not set | ||
153 | # CONFIG_CPU_SUBTYPE_ST40GX1 is not set | ||
154 | |||
155 | # | ||
156 | # SH-4A Processor Support | ||
157 | # | ||
158 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | ||
159 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | ||
160 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | ||
161 | |||
162 | # | ||
163 | # SH4AL-DSP Processor Support | ||
164 | # | ||
165 | # CONFIG_CPU_SUBTYPE_SH73180 is not set | ||
166 | # CONFIG_CPU_SUBTYPE_SH7343 is not set | ||
167 | |||
168 | # | ||
169 | # Memory management options | ||
170 | # | ||
171 | CONFIG_PAGE_OFFSET=0x00000000 | ||
172 | CONFIG_MEMORY_START=0x0c000000 | ||
173 | CONFIG_MEMORY_SIZE=0x04000000 | ||
174 | CONFIG_PAGE_SIZE_4KB=y | ||
175 | # CONFIG_PAGE_SIZE_8KB is not set | ||
176 | # CONFIG_PAGE_SIZE_64KB is not set | ||
177 | CONFIG_SELECT_MEMORY_MODEL=y | ||
178 | CONFIG_FLATMEM_MANUAL=y | ||
179 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
180 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
181 | CONFIG_FLATMEM=y | ||
182 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
183 | # CONFIG_SPARSEMEM_STATIC is not set | ||
184 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
185 | # CONFIG_RESOURCES_64BIT is not set | ||
186 | |||
187 | # | ||
188 | # Cache configuration | ||
189 | # | ||
190 | # CONFIG_SH_DIRECT_MAPPED is not set | ||
191 | CONFIG_SH_WRITETHROUGH=y | ||
192 | # CONFIG_SH_OCRAM is not set | ||
193 | |||
194 | # | ||
195 | # Processor features | ||
196 | # | ||
197 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
198 | CONFIG_CPU_BIG_ENDIAN=y | ||
199 | # CONFIG_SH_FPU is not set | ||
200 | # CONFIG_SH_FPU_EMU is not set | ||
201 | # CONFIG_SH_DSP is not set | ||
202 | |||
203 | # | ||
204 | # Timer support | ||
205 | # | ||
206 | CONFIG_SH_CMT=y | ||
207 | CONFIG_SH_TIMER_IRQ=86 | ||
208 | # CONFIG_NO_IDLE_HZ is not set | ||
209 | CONFIG_SH_PCLK_FREQ=31250000 | ||
210 | CONFIG_SH_CLK_MD=5 | ||
211 | |||
212 | # | ||
213 | # CPU Frequency scaling | ||
214 | # | ||
215 | # CONFIG_CPU_FREQ is not set | ||
216 | |||
217 | # | ||
218 | # DMA support | ||
219 | # | ||
220 | # CONFIG_SH_DMA is not set | ||
221 | |||
222 | # | ||
223 | # Companion Chips | ||
224 | # | ||
225 | # CONFIG_HD6446X_SERIES is not set | ||
226 | |||
227 | # | ||
228 | # Additional SuperH Device Drivers | ||
229 | # | ||
230 | # CONFIG_PUSH_SWITCH is not set | ||
231 | |||
232 | # | ||
233 | # Kernel features | ||
234 | # | ||
235 | CONFIG_HZ_100=y | ||
236 | # CONFIG_HZ_250 is not set | ||
237 | # CONFIG_HZ_1000 is not set | ||
238 | CONFIG_HZ=100 | ||
239 | # CONFIG_KEXEC is not set | ||
240 | # CONFIG_SMP is not set | ||
241 | CONFIG_PREEMPT_NONE=y | ||
242 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
243 | # CONFIG_PREEMPT is not set | ||
244 | |||
245 | # | ||
246 | # Boot options | ||
247 | # | ||
248 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 | ||
249 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | ||
250 | # CONFIG_UBC_WAKEUP is not set | ||
251 | # CONFIG_CMDLINE_BOOL is not set | ||
252 | |||
253 | # | ||
254 | # Bus options | ||
255 | # | ||
256 | # CONFIG_PCI is not set | ||
257 | |||
258 | # | ||
259 | # PCCARD (PCMCIA/CardBus) support | ||
260 | # | ||
261 | |||
262 | # | ||
263 | # PCI Hotplug Support | ||
264 | # | ||
265 | |||
266 | # | ||
267 | # Executable file formats | ||
268 | # | ||
269 | CONFIG_BINFMT_FLAT=y | ||
270 | CONFIG_BINFMT_ZFLAT=y | ||
271 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
272 | # CONFIG_BINFMT_MISC is not set | ||
273 | |||
274 | # | ||
275 | # Power management options (EXPERIMENTAL) | ||
276 | # | ||
277 | # CONFIG_PM is not set | ||
278 | |||
279 | # | ||
280 | # Networking | ||
281 | # | ||
282 | # CONFIG_NET is not set | ||
283 | |||
284 | # | ||
285 | # Device Drivers | ||
286 | # | ||
287 | |||
288 | # | ||
289 | # Generic Driver Options | ||
290 | # | ||
291 | # CONFIG_STANDALONE is not set | ||
292 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | ||
293 | # CONFIG_SYS_HYPERVISOR is not set | ||
294 | |||
295 | # | ||
296 | # Connector - unified userspace <-> kernelspace linker | ||
297 | # | ||
298 | |||
299 | # | ||
300 | # Memory Technology Devices (MTD) | ||
301 | # | ||
302 | CONFIG_MTD=y | ||
303 | # CONFIG_MTD_DEBUG is not set | ||
304 | CONFIG_MTD_CONCAT=y | ||
305 | CONFIG_MTD_PARTITIONS=y | ||
306 | CONFIG_MTD_REDBOOT_PARTS=y | ||
307 | CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1 | ||
308 | # CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set | ||
309 | # CONFIG_MTD_REDBOOT_PARTS_READONLY is not set | ||
310 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
311 | |||
312 | # | ||
313 | # User Modules And Translation Layers | ||
314 | # | ||
315 | CONFIG_MTD_CHAR=y | ||
316 | CONFIG_MTD_BLOCK=y | ||
317 | # CONFIG_FTL is not set | ||
318 | # CONFIG_NFTL is not set | ||
319 | # CONFIG_INFTL is not set | ||
320 | # CONFIG_RFD_FTL is not set | ||
321 | # CONFIG_SSFDC is not set | ||
322 | |||
323 | # | ||
324 | # RAM/ROM/Flash chip drivers | ||
325 | # | ||
326 | CONFIG_MTD_CFI=y | ||
327 | # CONFIG_MTD_JEDECPROBE is not set | ||
328 | CONFIG_MTD_GEN_PROBE=y | ||
329 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
330 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
331 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
332 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
333 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
334 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
335 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
336 | CONFIG_MTD_CFI_I1=y | ||
337 | CONFIG_MTD_CFI_I2=y | ||
338 | # CONFIG_MTD_CFI_I4 is not set | ||
339 | # CONFIG_MTD_CFI_I8 is not set | ||
340 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
341 | CONFIG_MTD_CFI_AMDSTD=y | ||
342 | # CONFIG_MTD_CFI_STAA is not set | ||
343 | CONFIG_MTD_CFI_UTIL=y | ||
344 | # CONFIG_MTD_RAM is not set | ||
345 | # CONFIG_MTD_ROM is not set | ||
346 | # CONFIG_MTD_ABSENT is not set | ||
347 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
348 | |||
349 | # | ||
350 | # Mapping drivers for chip access | ||
351 | # | ||
352 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
353 | CONFIG_MTD_PHYSMAP=y | ||
354 | CONFIG_MTD_PHYSMAP_START=0xa0000000 | ||
355 | CONFIG_MTD_PHYSMAP_LEN=0x01000000 | ||
356 | CONFIG_MTD_PHYSMAP_BANKWIDTH=2 | ||
357 | # CONFIG_MTD_SOLUTIONENGINE is not set | ||
358 | # CONFIG_MTD_UCLINUX is not set | ||
359 | # CONFIG_MTD_PLATRAM is not set | ||
360 | |||
361 | # | ||
362 | # Self-contained MTD device drivers | ||
363 | # | ||
364 | # CONFIG_MTD_SLRAM is not set | ||
365 | # CONFIG_MTD_PHRAM is not set | ||
366 | # CONFIG_MTD_MTDRAM is not set | ||
367 | # CONFIG_MTD_BLOCK2MTD is not set | ||
368 | |||
369 | # | ||
370 | # Disk-On-Chip Device Drivers | ||
371 | # | ||
372 | # CONFIG_MTD_DOC2000 is not set | ||
373 | # CONFIG_MTD_DOC2001 is not set | ||
374 | # CONFIG_MTD_DOC2001PLUS is not set | ||
375 | |||
376 | # | ||
377 | # NAND Flash Device Drivers | ||
378 | # | ||
379 | # CONFIG_MTD_NAND is not set | ||
380 | |||
381 | # | ||
382 | # OneNAND Flash Device Drivers | ||
383 | # | ||
384 | # CONFIG_MTD_ONENAND is not set | ||
385 | |||
386 | # | ||
387 | # Parallel port support | ||
388 | # | ||
389 | # CONFIG_PARPORT is not set | ||
390 | |||
391 | # | ||
392 | # Plug and Play support | ||
393 | # | ||
394 | |||
395 | # | ||
396 | # Block devices | ||
397 | # | ||
398 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
399 | # CONFIG_BLK_DEV_LOOP is not set | ||
400 | # CONFIG_BLK_DEV_RAM is not set | ||
401 | # CONFIG_BLK_DEV_INITRD is not set | ||
402 | # CONFIG_CDROM_PKTCDVD is not set | ||
403 | |||
404 | # | ||
405 | # Misc devices | ||
406 | # | ||
407 | # CONFIG_TIFM_CORE is not set | ||
408 | |||
409 | # | ||
410 | # ATA/ATAPI/MFM/RLL support | ||
411 | # | ||
412 | # CONFIG_IDE is not set | ||
413 | |||
414 | # | ||
415 | # SCSI device support | ||
416 | # | ||
417 | # CONFIG_RAID_ATTRS is not set | ||
418 | # CONFIG_SCSI is not set | ||
419 | # CONFIG_SCSI_NETLINK is not set | ||
420 | |||
421 | # | ||
422 | # Serial ATA (prod) and Parallel ATA (experimental) drivers | ||
423 | # | ||
424 | # CONFIG_ATA is not set | ||
425 | |||
426 | # | ||
427 | # Multi-device support (RAID and LVM) | ||
428 | # | ||
429 | # CONFIG_MD is not set | ||
430 | |||
431 | # | ||
432 | # Fusion MPT device support | ||
433 | # | ||
434 | # CONFIG_FUSION is not set | ||
435 | |||
436 | # | ||
437 | # IEEE 1394 (FireWire) support | ||
438 | # | ||
439 | |||
440 | # | ||
441 | # I2O device support | ||
442 | # | ||
443 | |||
444 | # | ||
445 | # ISDN subsystem | ||
446 | # | ||
447 | |||
448 | # | ||
449 | # Telephony Support | ||
450 | # | ||
451 | # CONFIG_PHONE is not set | ||
452 | |||
453 | # | ||
454 | # Input device support | ||
455 | # | ||
456 | CONFIG_INPUT=y | ||
457 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
458 | |||
459 | # | ||
460 | # Userland interfaces | ||
461 | # | ||
462 | # CONFIG_INPUT_MOUSEDEV is not set | ||
463 | # CONFIG_INPUT_JOYDEV is not set | ||
464 | # CONFIG_INPUT_TSDEV is not set | ||
465 | # CONFIG_INPUT_EVDEV is not set | ||
466 | # CONFIG_INPUT_EVBUG is not set | ||
467 | |||
468 | # | ||
469 | # Input Device Drivers | ||
470 | # | ||
471 | # CONFIG_INPUT_KEYBOARD is not set | ||
472 | # CONFIG_INPUT_MOUSE is not set | ||
473 | # CONFIG_INPUT_JOYSTICK is not set | ||
474 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
475 | # CONFIG_INPUT_MISC is not set | ||
476 | |||
477 | # | ||
478 | # Hardware I/O ports | ||
479 | # | ||
480 | # CONFIG_SERIO is not set | ||
481 | # CONFIG_GAMEPORT is not set | ||
482 | |||
483 | # | ||
484 | # Character devices | ||
485 | # | ||
486 | # CONFIG_VT is not set | ||
487 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
488 | |||
489 | # | ||
490 | # Serial drivers | ||
491 | # | ||
492 | # CONFIG_SERIAL_8250 is not set | ||
493 | |||
494 | # | ||
495 | # Non-8250 serial port support | ||
496 | # | ||
497 | CONFIG_SERIAL_SH_SCI=y | ||
498 | CONFIG_SERIAL_SH_SCI_NR_UARTS=3 | ||
499 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | ||
500 | CONFIG_SERIAL_CORE=y | ||
501 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
502 | # CONFIG_UNIX98_PTYS is not set | ||
503 | # CONFIG_LEGACY_PTYS is not set | ||
504 | |||
505 | # | ||
506 | # IPMI | ||
507 | # | ||
508 | # CONFIG_IPMI_HANDLER is not set | ||
509 | |||
510 | # | ||
511 | # Watchdog Cards | ||
512 | # | ||
513 | # CONFIG_WATCHDOG is not set | ||
514 | # CONFIG_HW_RANDOM is not set | ||
515 | # CONFIG_GEN_RTC is not set | ||
516 | # CONFIG_DTLK is not set | ||
517 | # CONFIG_R3964 is not set | ||
518 | |||
519 | # | ||
520 | # Ftape, the floppy tape device driver | ||
521 | # | ||
522 | # CONFIG_RAW_DRIVER is not set | ||
523 | |||
524 | # | ||
525 | # TPM devices | ||
526 | # | ||
527 | # CONFIG_TCG_TPM is not set | ||
528 | |||
529 | # | ||
530 | # I2C support | ||
531 | # | ||
532 | # CONFIG_I2C is not set | ||
533 | |||
534 | # | ||
535 | # SPI support | ||
536 | # | ||
537 | # CONFIG_SPI is not set | ||
538 | # CONFIG_SPI_MASTER is not set | ||
539 | |||
540 | # | ||
541 | # Dallas's 1-wire bus | ||
542 | # | ||
543 | # CONFIG_W1 is not set | ||
544 | |||
545 | # | ||
546 | # Hardware Monitoring support | ||
547 | # | ||
548 | # CONFIG_HWMON is not set | ||
549 | # CONFIG_HWMON_VID is not set | ||
550 | |||
551 | # | ||
552 | # Multimedia devices | ||
553 | # | ||
554 | # CONFIG_VIDEO_DEV is not set | ||
555 | |||
556 | # | ||
557 | # Digital Video Broadcasting Devices | ||
558 | # | ||
559 | |||
560 | # | ||
561 | # Graphics support | ||
562 | # | ||
563 | # CONFIG_FIRMWARE_EDID is not set | ||
564 | # CONFIG_FB is not set | ||
565 | |||
566 | # | ||
567 | # Sound | ||
568 | # | ||
569 | # CONFIG_SOUND is not set | ||
570 | |||
571 | # | ||
572 | # USB support | ||
573 | # | ||
574 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
575 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
576 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
577 | |||
578 | # | ||
579 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
580 | # | ||
581 | |||
582 | # | ||
583 | # USB Gadget Support | ||
584 | # | ||
585 | # CONFIG_USB_GADGET is not set | ||
586 | |||
587 | # | ||
588 | # MMC/SD Card support | ||
589 | # | ||
590 | # CONFIG_MMC is not set | ||
591 | |||
592 | # | ||
593 | # LED devices | ||
594 | # | ||
595 | # CONFIG_NEW_LEDS is not set | ||
596 | |||
597 | # | ||
598 | # LED drivers | ||
599 | # | ||
600 | |||
601 | # | ||
602 | # LED Triggers | ||
603 | # | ||
604 | |||
605 | # | ||
606 | # InfiniBand support | ||
607 | # | ||
608 | |||
609 | # | ||
610 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
611 | # | ||
612 | |||
613 | # | ||
614 | # Real Time Clock | ||
615 | # | ||
616 | # CONFIG_RTC_CLASS is not set | ||
617 | |||
618 | # | ||
619 | # DMA Engine support | ||
620 | # | ||
621 | # CONFIG_DMA_ENGINE is not set | ||
622 | |||
623 | # | ||
624 | # DMA Clients | ||
625 | # | ||
626 | |||
627 | # | ||
628 | # DMA Devices | ||
629 | # | ||
630 | |||
631 | # | ||
632 | # File systems | ||
633 | # | ||
634 | # CONFIG_EXT2_FS is not set | ||
635 | # CONFIG_EXT3_FS is not set | ||
636 | # CONFIG_EXT4DEV_FS is not set | ||
637 | # CONFIG_REISERFS_FS is not set | ||
638 | # CONFIG_JFS_FS is not set | ||
639 | # CONFIG_FS_POSIX_ACL is not set | ||
640 | # CONFIG_XFS_FS is not set | ||
641 | # CONFIG_GFS2_FS is not set | ||
642 | # CONFIG_MINIX_FS is not set | ||
643 | CONFIG_ROMFS_FS=y | ||
644 | # CONFIG_INOTIFY is not set | ||
645 | # CONFIG_QUOTA is not set | ||
646 | # CONFIG_DNOTIFY is not set | ||
647 | # CONFIG_AUTOFS_FS is not set | ||
648 | # CONFIG_AUTOFS4_FS is not set | ||
649 | # CONFIG_FUSE_FS is not set | ||
650 | |||
651 | # | ||
652 | # CD-ROM/DVD Filesystems | ||
653 | # | ||
654 | # CONFIG_ISO9660_FS is not set | ||
655 | # CONFIG_UDF_FS is not set | ||
656 | |||
657 | # | ||
658 | # DOS/FAT/NT Filesystems | ||
659 | # | ||
660 | # CONFIG_MSDOS_FS is not set | ||
661 | # CONFIG_VFAT_FS is not set | ||
662 | # CONFIG_NTFS_FS is not set | ||
663 | |||
664 | # | ||
665 | # Pseudo filesystems | ||
666 | # | ||
667 | CONFIG_PROC_FS=y | ||
668 | CONFIG_PROC_SYSCTL=y | ||
669 | # CONFIG_SYSFS is not set | ||
670 | # CONFIG_TMPFS is not set | ||
671 | # CONFIG_HUGETLBFS is not set | ||
672 | # CONFIG_HUGETLB_PAGE is not set | ||
673 | CONFIG_RAMFS=y | ||
674 | |||
675 | # | ||
676 | # Miscellaneous filesystems | ||
677 | # | ||
678 | # CONFIG_ADFS_FS is not set | ||
679 | # CONFIG_AFFS_FS is not set | ||
680 | # CONFIG_HFS_FS is not set | ||
681 | # CONFIG_HFSPLUS_FS is not set | ||
682 | # CONFIG_BEFS_FS is not set | ||
683 | # CONFIG_BFS_FS is not set | ||
684 | # CONFIG_EFS_FS is not set | ||
685 | # CONFIG_JFFS_FS is not set | ||
686 | # CONFIG_JFFS2_FS is not set | ||
687 | # CONFIG_CRAMFS is not set | ||
688 | # CONFIG_VXFS_FS is not set | ||
689 | # CONFIG_HPFS_FS is not set | ||
690 | # CONFIG_QNX4FS_FS is not set | ||
691 | # CONFIG_SYSV_FS is not set | ||
692 | # CONFIG_UFS_FS is not set | ||
693 | |||
694 | # | ||
695 | # Partition Types | ||
696 | # | ||
697 | # CONFIG_PARTITION_ADVANCED is not set | ||
698 | CONFIG_MSDOS_PARTITION=y | ||
699 | |||
700 | # | ||
701 | # Native Language Support | ||
702 | # | ||
703 | # CONFIG_NLS is not set | ||
704 | |||
705 | # | ||
706 | # Profiling support | ||
707 | # | ||
708 | # CONFIG_PROFILING is not set | ||
709 | |||
710 | # | ||
711 | # Kernel hacking | ||
712 | # | ||
713 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
714 | # CONFIG_PRINTK_TIME is not set | ||
715 | # CONFIG_ENABLE_MUST_CHECK is not set | ||
716 | # CONFIG_MAGIC_SYSRQ is not set | ||
717 | # CONFIG_UNUSED_SYMBOLS is not set | ||
718 | # CONFIG_DEBUG_KERNEL is not set | ||
719 | CONFIG_LOG_BUF_SHIFT=14 | ||
720 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
721 | # CONFIG_UNWIND_INFO is not set | ||
722 | # CONFIG_HEADERS_CHECK is not set | ||
723 | # CONFIG_SH_STANDARD_BIOS is not set | ||
724 | # CONFIG_EARLY_SCIF_CONSOLE is not set | ||
725 | # CONFIG_KGDB is not set | ||
726 | |||
727 | # | ||
728 | # Security options | ||
729 | # | ||
730 | # CONFIG_KEYS is not set | ||
731 | |||
732 | # | ||
733 | # Cryptographic options | ||
734 | # | ||
735 | # CONFIG_CRYPTO is not set | ||
736 | |||
737 | # | ||
738 | # Library routines | ||
739 | # | ||
740 | # CONFIG_CRC_CCITT is not set | ||
741 | # CONFIG_CRC16 is not set | ||
742 | CONFIG_CRC32=y | ||
743 | # CONFIG_LIBCRC32C is not set | ||
744 | CONFIG_ZLIB_INFLATE=y | ||
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig index 5e8175461138..41049cf14b79 100644 --- a/arch/sh/configs/titan_defconfig +++ b/arch/sh/configs/titan_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18 | 3 | # Linux kernel version: 2.6.19-rc3 |
4 | # Tue Oct 3 12:59:14 2006 | 4 | # Mon Oct 30 18:04:49 2006 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -10,6 +10,7 @@ CONFIG_GENERIC_HWEIGHT=y | |||
10 | CONFIG_GENERIC_HARDIRQS=y | 10 | CONFIG_GENERIC_HARDIRQS=y |
11 | CONFIG_GENERIC_IRQ_PROBE=y | 11 | CONFIG_GENERIC_IRQ_PROBE=y |
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 12 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | # CONFIG_GENERIC_TIME is not set | ||
13 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 14 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
14 | 15 | ||
15 | # | 16 | # |
@@ -23,7 +24,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32 | |||
23 | # General setup | 24 | # General setup |
24 | # | 25 | # |
25 | CONFIG_LOCALVERSION="" | 26 | CONFIG_LOCALVERSION="" |
26 | CONFIG_LOCALVERSION_AUTO=y | 27 | # CONFIG_LOCALVERSION_AUTO is not set |
27 | CONFIG_SWAP=y | 28 | CONFIG_SWAP=y |
28 | CONFIG_SYSVIPC=y | 29 | CONFIG_SYSVIPC=y |
29 | # CONFIG_IPC_NS is not set | 30 | # CONFIG_IPC_NS is not set |
@@ -236,8 +237,8 @@ CONFIG_HZ_250=y | |||
236 | CONFIG_HZ=250 | 237 | CONFIG_HZ=250 |
237 | # CONFIG_KEXEC is not set | 238 | # CONFIG_KEXEC is not set |
238 | # CONFIG_SMP is not set | 239 | # CONFIG_SMP is not set |
239 | CONFIG_PREEMPT_NONE=y | 240 | # CONFIG_PREEMPT_NONE is not set |
240 | # CONFIG_PREEMPT_VOLUNTARY is not set | 241 | CONFIG_PREEMPT_VOLUNTARY=y |
241 | # CONFIG_PREEMPT is not set | 242 | # CONFIG_PREEMPT is not set |
242 | 243 | ||
243 | # | 244 | # |
@@ -247,7 +248,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x00001000 | |||
247 | CONFIG_BOOT_LINK_OFFSET=0x009e0000 | 248 | CONFIG_BOOT_LINK_OFFSET=0x009e0000 |
248 | # CONFIG_UBC_WAKEUP is not set | 249 | # CONFIG_UBC_WAKEUP is not set |
249 | CONFIG_CMDLINE_BOOL=y | 250 | CONFIG_CMDLINE_BOOL=y |
250 | CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/nfs ip=:::::eth1:autoconf" | 251 | CONFIG_CMDLINE="console=ttySC1,38400N81 root=/dev/nfs ip=:::::eth1:autoconf rw" |
251 | 252 | ||
252 | # | 253 | # |
253 | # Bus options | 254 | # Bus options |
@@ -334,6 +335,7 @@ CONFIG_INET_XFRM_TUNNEL=y | |||
334 | CONFIG_INET_TUNNEL=y | 335 | CONFIG_INET_TUNNEL=y |
335 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 336 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
336 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 337 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
338 | CONFIG_INET_XFRM_MODE_BEET=y | ||
337 | CONFIG_INET_DIAG=m | 339 | CONFIG_INET_DIAG=m |
338 | CONFIG_INET_TCP_DIAG=m | 340 | CONFIG_INET_TCP_DIAG=m |
339 | # CONFIG_TCP_CONG_ADVANCED is not set | 341 | # CONFIG_TCP_CONG_ADVANCED is not set |
@@ -355,9 +357,10 @@ CONFIG_INET6_XFRM_TUNNEL=y | |||
355 | CONFIG_INET6_TUNNEL=y | 357 | CONFIG_INET6_TUNNEL=y |
356 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y | 358 | CONFIG_INET6_XFRM_MODE_TRANSPORT=y |
357 | CONFIG_INET6_XFRM_MODE_TUNNEL=y | 359 | CONFIG_INET6_XFRM_MODE_TUNNEL=y |
360 | CONFIG_INET6_XFRM_MODE_BEET=y | ||
358 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | 361 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set |
362 | CONFIG_IPV6_SIT=m | ||
359 | CONFIG_IPV6_TUNNEL=y | 363 | CONFIG_IPV6_TUNNEL=y |
360 | # CONFIG_IPV6_SUBTREES is not set | ||
361 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | 364 | # CONFIG_IPV6_MULTIPLE_TABLES is not set |
362 | # CONFIG_NETWORK_SECMARK is not set | 365 | # CONFIG_NETWORK_SECMARK is not set |
363 | CONFIG_NETFILTER=y | 366 | CONFIG_NETFILTER=y |
@@ -714,6 +717,12 @@ CONFIG_BLK_DEV_INITRD=y | |||
714 | CONFIG_ATA_OVER_ETH=m | 717 | CONFIG_ATA_OVER_ETH=m |
715 | 718 | ||
716 | # | 719 | # |
720 | # Misc devices | ||
721 | # | ||
722 | # CONFIG_SGI_IOC4 is not set | ||
723 | # CONFIG_TIFM_CORE is not set | ||
724 | |||
725 | # | ||
717 | # ATA/ATAPI/MFM/RLL support | 726 | # ATA/ATAPI/MFM/RLL support |
718 | # | 727 | # |
719 | # CONFIG_IDE is not set | 728 | # CONFIG_IDE is not set |
@@ -778,9 +787,9 @@ CONFIG_CHR_DEV_SG=m | |||
778 | # CONFIG_SCSI_INIA100 is not set | 787 | # CONFIG_SCSI_INIA100 is not set |
779 | # CONFIG_SCSI_STEX is not set | 788 | # CONFIG_SCSI_STEX is not set |
780 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 789 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
781 | # CONFIG_SCSI_IPR is not set | ||
782 | # CONFIG_SCSI_QLOGIC_1280 is not set | 790 | # CONFIG_SCSI_QLOGIC_1280 is not set |
783 | # CONFIG_SCSI_QLA_FC is not set | 791 | # CONFIG_SCSI_QLA_FC is not set |
792 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
784 | # CONFIG_SCSI_LPFC is not set | 793 | # CONFIG_SCSI_LPFC is not set |
785 | # CONFIG_SCSI_DC395x is not set | 794 | # CONFIG_SCSI_DC395x is not set |
786 | # CONFIG_SCSI_DC390T is not set | 795 | # CONFIG_SCSI_DC390T is not set |
@@ -1095,7 +1104,6 @@ CONFIG_HW_RANDOM=y | |||
1095 | # TPM devices | 1104 | # TPM devices |
1096 | # | 1105 | # |
1097 | # CONFIG_TCG_TPM is not set | 1106 | # CONFIG_TCG_TPM is not set |
1098 | # CONFIG_TELCLOCK is not set | ||
1099 | 1107 | ||
1100 | # | 1108 | # |
1101 | # I2C support | 1109 | # I2C support |
@@ -1124,14 +1132,9 @@ CONFIG_HWMON=y | |||
1124 | # CONFIG_HWMON_DEBUG_CHIP is not set | 1132 | # CONFIG_HWMON_DEBUG_CHIP is not set |
1125 | 1133 | ||
1126 | # | 1134 | # |
1127 | # Misc devices | ||
1128 | # | ||
1129 | |||
1130 | # | ||
1131 | # Multimedia devices | 1135 | # Multimedia devices |
1132 | # | 1136 | # |
1133 | # CONFIG_VIDEO_DEV is not set | 1137 | # CONFIG_VIDEO_DEV is not set |
1134 | CONFIG_VIDEO_V4L2=y | ||
1135 | 1138 | ||
1136 | # | 1139 | # |
1137 | # Digital Video Broadcasting Devices | 1140 | # Digital Video Broadcasting Devices |
@@ -1177,9 +1180,9 @@ CONFIG_USB_DEVICEFS=y | |||
1177 | # USB Host Controller Drivers | 1180 | # USB Host Controller Drivers |
1178 | # | 1181 | # |
1179 | CONFIG_USB_EHCI_HCD=y | 1182 | CONFIG_USB_EHCI_HCD=y |
1180 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | 1183 | CONFIG_USB_EHCI_SPLIT_ISO=y |
1181 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1184 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
1182 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1185 | CONFIG_USB_EHCI_TT_NEWSCHED=y |
1183 | # CONFIG_USB_ISP116X_HCD is not set | 1186 | # CONFIG_USB_ISP116X_HCD is not set |
1184 | CONFIG_USB_OHCI_HCD=y | 1187 | CONFIG_USB_OHCI_HCD=y |
1185 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | 1188 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set |
@@ -1235,7 +1238,6 @@ CONFIG_USB_STORAGE=y | |||
1235 | # CONFIG_USB_ATI_REMOTE2 is not set | 1238 | # CONFIG_USB_ATI_REMOTE2 is not set |
1236 | # CONFIG_USB_KEYSPAN_REMOTE is not set | 1239 | # CONFIG_USB_KEYSPAN_REMOTE is not set |
1237 | # CONFIG_USB_APPLETOUCH is not set | 1240 | # CONFIG_USB_APPLETOUCH is not set |
1238 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1239 | 1241 | ||
1240 | # | 1242 | # |
1241 | # USB Imaging devices | 1243 | # USB Imaging devices |
@@ -1246,11 +1248,20 @@ CONFIG_USB_STORAGE=y | |||
1246 | # | 1248 | # |
1247 | # USB Network Adapters | 1249 | # USB Network Adapters |
1248 | # | 1250 | # |
1249 | # CONFIG_USB_CATC is not set | 1251 | CONFIG_USB_CATC=m |
1250 | # CONFIG_USB_KAWETH is not set | 1252 | CONFIG_USB_KAWETH=m |
1251 | # CONFIG_USB_PEGASUS is not set | 1253 | CONFIG_USB_PEGASUS=m |
1252 | # CONFIG_USB_RTL8150 is not set | 1254 | CONFIG_USB_RTL8150=m |
1253 | # CONFIG_USB_USBNET is not set | 1255 | CONFIG_USB_USBNET=m |
1256 | CONFIG_USB_NET_AX8817X=m | ||
1257 | CONFIG_USB_NET_CDCETHER=m | ||
1258 | # CONFIG_USB_NET_GL620A is not set | ||
1259 | CONFIG_USB_NET_NET1080=m | ||
1260 | CONFIG_USB_NET_PLUSB=m | ||
1261 | # CONFIG_USB_NET_MCS7830 is not set | ||
1262 | # CONFIG_USB_NET_RNDIS_HOST is not set | ||
1263 | # CONFIG_USB_NET_CDC_SUBSET is not set | ||
1264 | CONFIG_USB_NET_ZAURUS=m | ||
1254 | CONFIG_USB_MON=y | 1265 | CONFIG_USB_MON=y |
1255 | 1266 | ||
1256 | # | 1267 | # |
@@ -1285,6 +1296,7 @@ CONFIG_USB_SERIAL_ARK3116=m | |||
1285 | # CONFIG_USB_SERIAL_KLSI is not set | 1296 | # CONFIG_USB_SERIAL_KLSI is not set |
1286 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | 1297 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set |
1287 | # CONFIG_USB_SERIAL_MCT_U232 is not set | 1298 | # CONFIG_USB_SERIAL_MCT_U232 is not set |
1299 | # CONFIG_USB_SERIAL_MOS7720 is not set | ||
1288 | # CONFIG_USB_SERIAL_MOS7840 is not set | 1300 | # CONFIG_USB_SERIAL_MOS7840 is not set |
1289 | # CONFIG_USB_SERIAL_NAVMAN is not set | 1301 | # CONFIG_USB_SERIAL_NAVMAN is not set |
1290 | CONFIG_USB_SERIAL_PL2303=m | 1302 | CONFIG_USB_SERIAL_PL2303=m |
@@ -1316,6 +1328,7 @@ CONFIG_USB_SERIAL_PL2303=m | |||
1316 | # CONFIG_USB_APPLEDISPLAY is not set | 1328 | # CONFIG_USB_APPLEDISPLAY is not set |
1317 | # CONFIG_USB_SISUSBVGA is not set | 1329 | # CONFIG_USB_SISUSBVGA is not set |
1318 | # CONFIG_USB_LD is not set | 1330 | # CONFIG_USB_LD is not set |
1331 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1319 | # CONFIG_USB_TEST is not set | 1332 | # CONFIG_USB_TEST is not set |
1320 | 1333 | ||
1321 | # | 1334 | # |
@@ -1357,7 +1370,26 @@ CONFIG_USB_SERIAL_PL2303=m | |||
1357 | # | 1370 | # |
1358 | # Real Time Clock | 1371 | # Real Time Clock |
1359 | # | 1372 | # |
1360 | # CONFIG_RTC_CLASS is not set | 1373 | CONFIG_RTC_LIB=m |
1374 | CONFIG_RTC_CLASS=m | ||
1375 | |||
1376 | # | ||
1377 | # RTC interfaces | ||
1378 | # | ||
1379 | CONFIG_RTC_INTF_SYSFS=m | ||
1380 | CONFIG_RTC_INTF_PROC=m | ||
1381 | CONFIG_RTC_INTF_DEV=m | ||
1382 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
1383 | |||
1384 | # | ||
1385 | # RTC drivers | ||
1386 | # | ||
1387 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1388 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1389 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1390 | CONFIG_RTC_DRV_SH=m | ||
1391 | # CONFIG_RTC_DRV_TEST is not set | ||
1392 | # CONFIG_RTC_DRV_V3020 is not set | ||
1361 | 1393 | ||
1362 | # | 1394 | # |
1363 | # DMA Engine support | 1395 | # DMA Engine support |
@@ -1380,8 +1412,12 @@ CONFIG_EXT2_FS=y | |||
1380 | # CONFIG_EXT2_FS_XIP is not set | 1412 | # CONFIG_EXT2_FS_XIP is not set |
1381 | CONFIG_EXT3_FS=y | 1413 | CONFIG_EXT3_FS=y |
1382 | # CONFIG_EXT3_FS_XATTR is not set | 1414 | # CONFIG_EXT3_FS_XATTR is not set |
1415 | CONFIG_EXT4DEV_FS=m | ||
1416 | # CONFIG_EXT4DEV_FS_XATTR is not set | ||
1383 | CONFIG_JBD=y | 1417 | CONFIG_JBD=y |
1384 | # CONFIG_JBD_DEBUG is not set | 1418 | # CONFIG_JBD_DEBUG is not set |
1419 | CONFIG_JBD2=m | ||
1420 | # CONFIG_JBD2_DEBUG is not set | ||
1385 | CONFIG_REISERFS_FS=m | 1421 | CONFIG_REISERFS_FS=m |
1386 | # CONFIG_REISERFS_CHECK is not set | 1422 | # CONFIG_REISERFS_CHECK is not set |
1387 | # CONFIG_REISERFS_PROC_INFO is not set | 1423 | # CONFIG_REISERFS_PROC_INFO is not set |
@@ -1393,9 +1429,10 @@ CONFIG_XFS_FS=m | |||
1393 | # CONFIG_XFS_SECURITY is not set | 1429 | # CONFIG_XFS_SECURITY is not set |
1394 | # CONFIG_XFS_POSIX_ACL is not set | 1430 | # CONFIG_XFS_POSIX_ACL is not set |
1395 | # CONFIG_XFS_RT is not set | 1431 | # CONFIG_XFS_RT is not set |
1432 | # CONFIG_GFS2_FS is not set | ||
1396 | # CONFIG_OCFS2_FS is not set | 1433 | # CONFIG_OCFS2_FS is not set |
1397 | # CONFIG_MINIX_FS is not set | 1434 | # CONFIG_MINIX_FS is not set |
1398 | # CONFIG_ROMFS_FS is not set | 1435 | CONFIG_ROMFS_FS=y |
1399 | CONFIG_INOTIFY=y | 1436 | CONFIG_INOTIFY=y |
1400 | CONFIG_INOTIFY_USER=y | 1437 | CONFIG_INOTIFY_USER=y |
1401 | # CONFIG_QUOTA is not set | 1438 | # CONFIG_QUOTA is not set |
@@ -1480,7 +1517,12 @@ CONFIG_SUNRPC=y | |||
1480 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1517 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1481 | CONFIG_SMB_FS=m | 1518 | CONFIG_SMB_FS=m |
1482 | # CONFIG_SMB_NLS_DEFAULT is not set | 1519 | # CONFIG_SMB_NLS_DEFAULT is not set |
1483 | # CONFIG_CIFS is not set | 1520 | CONFIG_CIFS=m |
1521 | # CONFIG_CIFS_STATS is not set | ||
1522 | CONFIG_CIFS_WEAK_PW_HASH=y | ||
1523 | # CONFIG_CIFS_XATTR is not set | ||
1524 | # CONFIG_CIFS_DEBUG2 is not set | ||
1525 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1484 | # CONFIG_NCP_FS is not set | 1526 | # CONFIG_NCP_FS is not set |
1485 | # CONFIG_CODA_FS is not set | 1527 | # CONFIG_CODA_FS is not set |
1486 | # CONFIG_AFS_FS is not set | 1528 | # CONFIG_AFS_FS is not set |
@@ -1583,9 +1625,10 @@ CONFIG_LOG_BUF_SHIFT=16 | |||
1583 | # CONFIG_DEBUG_LIST is not set | 1625 | # CONFIG_DEBUG_LIST is not set |
1584 | # CONFIG_FRAME_POINTER is not set | 1626 | # CONFIG_FRAME_POINTER is not set |
1585 | # CONFIG_FORCED_INLINING is not set | 1627 | # CONFIG_FORCED_INLINING is not set |
1628 | # CONFIG_HEADERS_CHECK is not set | ||
1586 | # CONFIG_RCU_TORTURE_TEST is not set | 1629 | # CONFIG_RCU_TORTURE_TEST is not set |
1587 | # CONFIG_SH_STANDARD_BIOS is not set | 1630 | # CONFIG_SH_STANDARD_BIOS is not set |
1588 | CONFIG_EARLY_SCIF_CONSOLE=y | 1631 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
1589 | # CONFIG_EARLY_PRINTK is not set | 1632 | # CONFIG_EARLY_PRINTK is not set |
1590 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1633 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1591 | # CONFIG_DEBUG_STACK_USAGE is not set | 1634 | # CONFIG_DEBUG_STACK_USAGE is not set |
@@ -1605,7 +1648,7 @@ CONFIG_CRYPTO=y | |||
1605 | CONFIG_CRYPTO_ALGAPI=y | 1648 | CONFIG_CRYPTO_ALGAPI=y |
1606 | CONFIG_CRYPTO_BLKCIPHER=y | 1649 | CONFIG_CRYPTO_BLKCIPHER=y |
1607 | CONFIG_CRYPTO_HASH=y | 1650 | CONFIG_CRYPTO_HASH=y |
1608 | CONFIG_CRYPTO_MANAGER=m | 1651 | CONFIG_CRYPTO_MANAGER=y |
1609 | CONFIG_CRYPTO_HMAC=y | 1652 | CONFIG_CRYPTO_HMAC=y |
1610 | CONFIG_CRYPTO_NULL=m | 1653 | CONFIG_CRYPTO_NULL=m |
1611 | CONFIG_CRYPTO_MD4=m | 1654 | CONFIG_CRYPTO_MD4=m |
@@ -1615,7 +1658,7 @@ CONFIG_CRYPTO_SHA256=m | |||
1615 | CONFIG_CRYPTO_SHA512=m | 1658 | CONFIG_CRYPTO_SHA512=m |
1616 | CONFIG_CRYPTO_WP512=m | 1659 | CONFIG_CRYPTO_WP512=m |
1617 | CONFIG_CRYPTO_TGR192=m | 1660 | CONFIG_CRYPTO_TGR192=m |
1618 | CONFIG_CRYPTO_ECB=m | 1661 | CONFIG_CRYPTO_ECB=y |
1619 | CONFIG_CRYPTO_CBC=y | 1662 | CONFIG_CRYPTO_CBC=y |
1620 | CONFIG_CRYPTO_DES=y | 1663 | CONFIG_CRYPTO_DES=y |
1621 | CONFIG_CRYPTO_BLOWFISH=m | 1664 | CONFIG_CRYPTO_BLOWFISH=m |
diff --git a/arch/sh/drivers/Kconfig b/arch/sh/drivers/Kconfig new file mode 100644 index 000000000000..c54c758e6243 --- /dev/null +++ b/arch/sh/drivers/Kconfig | |||
@@ -0,0 +1,9 @@ | |||
1 | menu "Additional SuperH Device Drivers" | ||
2 | |||
3 | config PUSH_SWITCH | ||
4 | tristate "Push switch support" | ||
5 | help | ||
6 | This enables support for the push switch framework, a simple | ||
7 | framework that allows for sysfs driven switch status reporting. | ||
8 | |||
9 | endmenu | ||
diff --git a/arch/sh/drivers/Makefile b/arch/sh/drivers/Makefile index 338c3729d270..bf18dbfb6787 100644 --- a/arch/sh/drivers/Makefile +++ b/arch/sh/drivers/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | obj-$(CONFIG_PCI) += pci/ | 5 | obj-$(CONFIG_PCI) += pci/ |
6 | obj-$(CONFIG_SH_DMA) += dma/ | 6 | obj-$(CONFIG_SH_DMA) += dma/ |
7 | obj-$(CONFIG_SUPERHYWAY) += superhyway/ | 7 | obj-$(CONFIG_SUPERHYWAY) += superhyway/ |
8 | 8 | obj-$(CONFIG_PUSH_SWITCH) += push-switch.o | |
diff --git a/arch/sh/drivers/dma/Makefile b/arch/sh/drivers/dma/Makefile index 065d4c90970e..db1295d32268 100644 --- a/arch/sh/drivers/dma/Makefile +++ b/arch/sh/drivers/dma/Makefile | |||
@@ -2,8 +2,8 @@ | |||
2 | # Makefile for the SuperH DMA specific kernel interface routines under Linux. | 2 | # Makefile for the SuperH DMA specific kernel interface routines under Linux. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += dma-api.o dma-isa.o | 5 | obj-y += dma-api.o |
6 | obj-$(CONFIG_ISA_DMA_API) += dma-isa.o | ||
6 | obj-$(CONFIG_SYSFS) += dma-sysfs.o | 7 | obj-$(CONFIG_SYSFS) += dma-sysfs.o |
7 | obj-$(CONFIG_SH_DMA) += dma-sh.o | 8 | obj-$(CONFIG_SH_DMA) += dma-sh.o |
8 | obj-$(CONFIG_SH_DREAMCAST) += dma-pvr2.o dma-g2.o | 9 | obj-$(CONFIG_SH_DREAMCAST) += dma-pvr2.o dma-g2.o |
9 | |||
diff --git a/arch/sh/drivers/dma/dma-api.c b/arch/sh/drivers/dma/dma-api.c index 47c3e837599b..e062067edd24 100644 --- a/arch/sh/drivers/dma/dma-api.c +++ b/arch/sh/drivers/dma/dma-api.c | |||
@@ -11,61 +11,27 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
16 | #include <linux/proc_fs.h> | 15 | #include <linux/proc_fs.h> |
17 | #include <linux/list.h> | 16 | #include <linux/list.h> |
18 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/mm.h> | ||
19 | #include <asm/dma.h> | 19 | #include <asm/dma.h> |
20 | 20 | ||
21 | DEFINE_SPINLOCK(dma_spin_lock); | 21 | DEFINE_SPINLOCK(dma_spin_lock); |
22 | static LIST_HEAD(registered_dmac_list); | 22 | static LIST_HEAD(registered_dmac_list); |
23 | 23 | ||
24 | /* | ||
25 | * A brief note about the reasons for this API as it stands. | ||
26 | * | ||
27 | * For starters, the old ISA DMA API didn't work for us for a number of | ||
28 | * reasons, for one, the vast majority of channels on the SH DMAC are | ||
29 | * dual-address mode only, and both the new and the old DMA APIs are after the | ||
30 | * concept of managing a DMA buffer, which doesn't overly fit this model very | ||
31 | * well. In addition to which, the new API is largely geared at IOMMUs and | ||
32 | * GARTs, and doesn't even support the channel notion very well. | ||
33 | * | ||
34 | * The other thing that's a marginal issue, is the sheer number of random DMA | ||
35 | * engines that are present (ie, in boards like the Dreamcast), some of which | ||
36 | * cascade off of the SH DMAC, and others do not. As such, there was a real | ||
37 | * need for a scalable subsystem that could deal with both single and | ||
38 | * dual-address mode usage, in addition to interoperating with cascaded DMACs. | ||
39 | * | ||
40 | * There really isn't any reason why this needs to be SH specific, though I'm | ||
41 | * not aware of too many other processors (with the exception of some MIPS) | ||
42 | * that have the same concept of a dual address mode, or any real desire to | ||
43 | * actually make use of the DMAC even if such a subsystem were exposed | ||
44 | * elsewhere. | ||
45 | * | ||
46 | * The idea for this was derived from the ARM port, which acted as an excellent | ||
47 | * reference when trying to address these issues. | ||
48 | * | ||
49 | * It should also be noted that the decision to add Yet Another DMA API(tm) to | ||
50 | * the kernel wasn't made easily, and was only decided upon after conferring | ||
51 | * with jejb with regards to the state of the old and new APIs as they applied | ||
52 | * to these circumstances. Philip Blundell was also a great help in figuring | ||
53 | * out some single-address mode DMA semantics that were otherwise rather | ||
54 | * confusing. | ||
55 | */ | ||
56 | |||
57 | struct dma_info *get_dma_info(unsigned int chan) | 24 | struct dma_info *get_dma_info(unsigned int chan) |
58 | { | 25 | { |
59 | struct dma_info *info; | 26 | struct dma_info *info; |
60 | unsigned int total = 0; | ||
61 | 27 | ||
62 | /* | 28 | /* |
63 | * Look for each DMAC's range to determine who the owner of | 29 | * Look for each DMAC's range to determine who the owner of |
64 | * the channel is. | 30 | * the channel is. |
65 | */ | 31 | */ |
66 | list_for_each_entry(info, ®istered_dmac_list, list) { | 32 | list_for_each_entry(info, ®istered_dmac_list, list) { |
67 | total += info->nr_channels; | 33 | if ((chan < info->first_channel_nr) || |
68 | if (chan > total) | 34 | (chan >= info->first_channel_nr + info->nr_channels)) |
69 | continue; | 35 | continue; |
70 | 36 | ||
71 | return info; | 37 | return info; |
@@ -73,6 +39,22 @@ struct dma_info *get_dma_info(unsigned int chan) | |||
73 | 39 | ||
74 | return NULL; | 40 | return NULL; |
75 | } | 41 | } |
42 | EXPORT_SYMBOL(get_dma_info); | ||
43 | |||
44 | struct dma_info *get_dma_info_by_name(const char *dmac_name) | ||
45 | { | ||
46 | struct dma_info *info; | ||
47 | |||
48 | list_for_each_entry(info, ®istered_dmac_list, list) { | ||
49 | if (dmac_name && (strcmp(dmac_name, info->name) != 0)) | ||
50 | continue; | ||
51 | else | ||
52 | return info; | ||
53 | } | ||
54 | |||
55 | return NULL; | ||
56 | } | ||
57 | EXPORT_SYMBOL(get_dma_info_by_name); | ||
76 | 58 | ||
77 | static unsigned int get_nr_channels(void) | 59 | static unsigned int get_nr_channels(void) |
78 | { | 60 | { |
@@ -91,63 +73,161 @@ static unsigned int get_nr_channels(void) | |||
91 | struct dma_channel *get_dma_channel(unsigned int chan) | 73 | struct dma_channel *get_dma_channel(unsigned int chan) |
92 | { | 74 | { |
93 | struct dma_info *info = get_dma_info(chan); | 75 | struct dma_info *info = get_dma_info(chan); |
76 | struct dma_channel *channel; | ||
77 | int i; | ||
94 | 78 | ||
95 | if (!info) | 79 | if (unlikely(!info)) |
96 | return ERR_PTR(-EINVAL); | 80 | return ERR_PTR(-EINVAL); |
97 | 81 | ||
98 | return info->channels + chan; | 82 | for (i = 0; i < info->nr_channels; i++) { |
83 | channel = &info->channels[i]; | ||
84 | if (channel->chan == chan) | ||
85 | return channel; | ||
86 | } | ||
87 | |||
88 | return NULL; | ||
99 | } | 89 | } |
90 | EXPORT_SYMBOL(get_dma_channel); | ||
100 | 91 | ||
101 | int get_dma_residue(unsigned int chan) | 92 | int get_dma_residue(unsigned int chan) |
102 | { | 93 | { |
103 | struct dma_info *info = get_dma_info(chan); | 94 | struct dma_info *info = get_dma_info(chan); |
104 | struct dma_channel *channel = &info->channels[chan]; | 95 | struct dma_channel *channel = get_dma_channel(chan); |
105 | 96 | ||
106 | if (info->ops->get_residue) | 97 | if (info->ops->get_residue) |
107 | return info->ops->get_residue(channel); | 98 | return info->ops->get_residue(channel); |
108 | 99 | ||
109 | return 0; | 100 | return 0; |
110 | } | 101 | } |
102 | EXPORT_SYMBOL(get_dma_residue); | ||
111 | 103 | ||
112 | int request_dma(unsigned int chan, const char *dev_id) | 104 | static int search_cap(const char **haystack, const char *needle) |
113 | { | 105 | { |
114 | struct dma_info *info = get_dma_info(chan); | 106 | const char **p; |
115 | struct dma_channel *channel = &info->channels[chan]; | 107 | |
108 | for (p = haystack; *p; p++) | ||
109 | if (strcmp(*p, needle) == 0) | ||
110 | return 1; | ||
111 | |||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * request_dma_bycap - Allocate a DMA channel based on its capabilities | ||
117 | * @dmac: List of DMA controllers to search | ||
118 | * @caps: List of capabilites | ||
119 | * | ||
120 | * Search all channels of all DMA controllers to find a channel which | ||
121 | * matches the requested capabilities. The result is the channel | ||
122 | * number if a match is found, or %-ENODEV if no match is found. | ||
123 | * | ||
124 | * Note that not all DMA controllers export capabilities, in which | ||
125 | * case they can never be allocated using this API, and so | ||
126 | * request_dma() must be used specifying the channel number. | ||
127 | */ | ||
128 | int request_dma_bycap(const char **dmac, const char **caps, const char *dev_id) | ||
129 | { | ||
130 | unsigned int found = 0; | ||
131 | struct dma_info *info; | ||
132 | const char **p; | ||
133 | int i; | ||
134 | |||
135 | BUG_ON(!dmac || !caps); | ||
136 | |||
137 | list_for_each_entry(info, ®istered_dmac_list, list) | ||
138 | if (strcmp(*dmac, info->name) == 0) { | ||
139 | found = 1; | ||
140 | break; | ||
141 | } | ||
142 | |||
143 | if (!found) | ||
144 | return -ENODEV; | ||
145 | |||
146 | for (i = 0; i < info->nr_channels; i++) { | ||
147 | struct dma_channel *channel = &info->channels[i]; | ||
148 | |||
149 | if (unlikely(!channel->caps)) | ||
150 | continue; | ||
151 | |||
152 | for (p = caps; *p; p++) { | ||
153 | if (!search_cap(channel->caps, *p)) | ||
154 | break; | ||
155 | if (request_dma(channel->chan, dev_id) == 0) | ||
156 | return channel->chan; | ||
157 | } | ||
158 | } | ||
159 | |||
160 | return -EINVAL; | ||
161 | } | ||
162 | EXPORT_SYMBOL(request_dma_bycap); | ||
163 | |||
164 | int dmac_search_free_channel(const char *dev_id) | ||
165 | { | ||
166 | struct dma_channel *channel = { 0 }; | ||
167 | struct dma_info *info = get_dma_info(0); | ||
168 | int i; | ||
169 | |||
170 | for (i = 0; i < info->nr_channels; i++) { | ||
171 | channel = &info->channels[i]; | ||
172 | if (unlikely(!channel)) | ||
173 | return -ENODEV; | ||
174 | |||
175 | if (atomic_read(&channel->busy) == 0) | ||
176 | break; | ||
177 | } | ||
116 | 178 | ||
117 | down(&channel->sem); | 179 | if (info->ops->request) { |
180 | int result = info->ops->request(channel); | ||
181 | if (result) | ||
182 | return result; | ||
118 | 183 | ||
119 | if (!info->ops || chan >= MAX_DMA_CHANNELS) { | 184 | atomic_set(&channel->busy, 1); |
120 | up(&channel->sem); | 185 | return channel->chan; |
121 | return -EINVAL; | ||
122 | } | 186 | } |
123 | 187 | ||
124 | atomic_set(&channel->busy, 1); | 188 | return -ENOSYS; |
189 | } | ||
190 | |||
191 | int request_dma(unsigned int chan, const char *dev_id) | ||
192 | { | ||
193 | struct dma_channel *channel = { 0 }; | ||
194 | struct dma_info *info = get_dma_info(chan); | ||
195 | int result; | ||
196 | |||
197 | channel = get_dma_channel(chan); | ||
198 | if (atomic_xchg(&channel->busy, 1)) | ||
199 | return -EBUSY; | ||
125 | 200 | ||
126 | strlcpy(channel->dev_id, dev_id, sizeof(channel->dev_id)); | 201 | strlcpy(channel->dev_id, dev_id, sizeof(channel->dev_id)); |
127 | 202 | ||
128 | up(&channel->sem); | 203 | if (info->ops->request) { |
204 | result = info->ops->request(channel); | ||
205 | if (result) | ||
206 | atomic_set(&channel->busy, 0); | ||
129 | 207 | ||
130 | if (info->ops->request) | 208 | return result; |
131 | return info->ops->request(channel); | 209 | } |
132 | 210 | ||
133 | return 0; | 211 | return 0; |
134 | } | 212 | } |
213 | EXPORT_SYMBOL(request_dma); | ||
135 | 214 | ||
136 | void free_dma(unsigned int chan) | 215 | void free_dma(unsigned int chan) |
137 | { | 216 | { |
138 | struct dma_info *info = get_dma_info(chan); | 217 | struct dma_info *info = get_dma_info(chan); |
139 | struct dma_channel *channel = &info->channels[chan]; | 218 | struct dma_channel *channel = get_dma_channel(chan); |
140 | 219 | ||
141 | if (info->ops->free) | 220 | if (info->ops->free) |
142 | info->ops->free(channel); | 221 | info->ops->free(channel); |
143 | 222 | ||
144 | atomic_set(&channel->busy, 0); | 223 | atomic_set(&channel->busy, 0); |
145 | } | 224 | } |
225 | EXPORT_SYMBOL(free_dma); | ||
146 | 226 | ||
147 | void dma_wait_for_completion(unsigned int chan) | 227 | void dma_wait_for_completion(unsigned int chan) |
148 | { | 228 | { |
149 | struct dma_info *info = get_dma_info(chan); | 229 | struct dma_info *info = get_dma_info(chan); |
150 | struct dma_channel *channel = &info->channels[chan]; | 230 | struct dma_channel *channel = get_dma_channel(chan); |
151 | 231 | ||
152 | if (channel->flags & DMA_TEI_CAPABLE) { | 232 | if (channel->flags & DMA_TEI_CAPABLE) { |
153 | wait_event(channel->wait_queue, | 233 | wait_event(channel->wait_queue, |
@@ -158,21 +238,52 @@ void dma_wait_for_completion(unsigned int chan) | |||
158 | while (info->ops->get_residue(channel)) | 238 | while (info->ops->get_residue(channel)) |
159 | cpu_relax(); | 239 | cpu_relax(); |
160 | } | 240 | } |
241 | EXPORT_SYMBOL(dma_wait_for_completion); | ||
242 | |||
243 | int register_chan_caps(const char *dmac, struct dma_chan_caps *caps) | ||
244 | { | ||
245 | struct dma_info *info; | ||
246 | unsigned int found = 0; | ||
247 | int i; | ||
248 | |||
249 | list_for_each_entry(info, ®istered_dmac_list, list) | ||
250 | if (strcmp(dmac, info->name) == 0) { | ||
251 | found = 1; | ||
252 | break; | ||
253 | } | ||
254 | |||
255 | if (unlikely(!found)) | ||
256 | return -ENODEV; | ||
257 | |||
258 | for (i = 0; i < info->nr_channels; i++, caps++) { | ||
259 | struct dma_channel *channel; | ||
260 | |||
261 | if ((info->first_channel_nr + i) != caps->ch_num) | ||
262 | return -EINVAL; | ||
263 | |||
264 | channel = &info->channels[i]; | ||
265 | channel->caps = caps->caplist; | ||
266 | } | ||
267 | |||
268 | return 0; | ||
269 | } | ||
270 | EXPORT_SYMBOL(register_chan_caps); | ||
161 | 271 | ||
162 | void dma_configure_channel(unsigned int chan, unsigned long flags) | 272 | void dma_configure_channel(unsigned int chan, unsigned long flags) |
163 | { | 273 | { |
164 | struct dma_info *info = get_dma_info(chan); | 274 | struct dma_info *info = get_dma_info(chan); |
165 | struct dma_channel *channel = &info->channels[chan]; | 275 | struct dma_channel *channel = get_dma_channel(chan); |
166 | 276 | ||
167 | if (info->ops->configure) | 277 | if (info->ops->configure) |
168 | info->ops->configure(channel, flags); | 278 | info->ops->configure(channel, flags); |
169 | } | 279 | } |
280 | EXPORT_SYMBOL(dma_configure_channel); | ||
170 | 281 | ||
171 | int dma_xfer(unsigned int chan, unsigned long from, | 282 | int dma_xfer(unsigned int chan, unsigned long from, |
172 | unsigned long to, size_t size, unsigned int mode) | 283 | unsigned long to, size_t size, unsigned int mode) |
173 | { | 284 | { |
174 | struct dma_info *info = get_dma_info(chan); | 285 | struct dma_info *info = get_dma_info(chan); |
175 | struct dma_channel *channel = &info->channels[chan]; | 286 | struct dma_channel *channel = get_dma_channel(chan); |
176 | 287 | ||
177 | channel->sar = from; | 288 | channel->sar = from; |
178 | channel->dar = to; | 289 | channel->dar = to; |
@@ -181,8 +292,20 @@ int dma_xfer(unsigned int chan, unsigned long from, | |||
181 | 292 | ||
182 | return info->ops->xfer(channel); | 293 | return info->ops->xfer(channel); |
183 | } | 294 | } |
295 | EXPORT_SYMBOL(dma_xfer); | ||
296 | |||
297 | int dma_extend(unsigned int chan, unsigned long op, void *param) | ||
298 | { | ||
299 | struct dma_info *info = get_dma_info(chan); | ||
300 | struct dma_channel *channel = get_dma_channel(chan); | ||
301 | |||
302 | if (info->ops->extend) | ||
303 | return info->ops->extend(channel, op, param); | ||
304 | |||
305 | return -ENOSYS; | ||
306 | } | ||
307 | EXPORT_SYMBOL(dma_extend); | ||
184 | 308 | ||
185 | #ifdef CONFIG_PROC_FS | ||
186 | static int dma_read_proc(char *buf, char **start, off_t off, | 309 | static int dma_read_proc(char *buf, char **start, off_t off, |
187 | int len, int *eof, void *data) | 310 | int len, int *eof, void *data) |
188 | { | 311 | { |
@@ -214,8 +337,6 @@ static int dma_read_proc(char *buf, char **start, off_t off, | |||
214 | 337 | ||
215 | return p - buf; | 338 | return p - buf; |
216 | } | 339 | } |
217 | #endif | ||
218 | |||
219 | 340 | ||
220 | int register_dmac(struct dma_info *info) | 341 | int register_dmac(struct dma_info *info) |
221 | { | 342 | { |
@@ -224,8 +345,7 @@ int register_dmac(struct dma_info *info) | |||
224 | INIT_LIST_HEAD(&info->list); | 345 | INIT_LIST_HEAD(&info->list); |
225 | 346 | ||
226 | printk(KERN_INFO "DMA: Registering %s handler (%d channel%s).\n", | 347 | printk(KERN_INFO "DMA: Registering %s handler (%d channel%s).\n", |
227 | info->name, info->nr_channels, | 348 | info->name, info->nr_channels, info->nr_channels > 1 ? "s" : ""); |
228 | info->nr_channels > 1 ? "s" : ""); | ||
229 | 349 | ||
230 | BUG_ON((info->flags & DMAC_CHANNELS_CONFIGURED) && !info->channels); | 350 | BUG_ON((info->flags & DMAC_CHANNELS_CONFIGURED) && !info->channels); |
231 | 351 | ||
@@ -242,28 +362,26 @@ int register_dmac(struct dma_info *info) | |||
242 | 362 | ||
243 | size = sizeof(struct dma_channel) * info->nr_channels; | 363 | size = sizeof(struct dma_channel) * info->nr_channels; |
244 | 364 | ||
245 | info->channels = kmalloc(size, GFP_KERNEL); | 365 | info->channels = kzalloc(size, GFP_KERNEL); |
246 | if (!info->channels) | 366 | if (!info->channels) |
247 | return -ENOMEM; | 367 | return -ENOMEM; |
248 | |||
249 | memset(info->channels, 0, size); | ||
250 | } | 368 | } |
251 | 369 | ||
252 | total_channels = get_nr_channels(); | 370 | total_channels = get_nr_channels(); |
253 | for (i = 0; i < info->nr_channels; i++) { | 371 | for (i = 0; i < info->nr_channels; i++) { |
254 | struct dma_channel *chan = info->channels + i; | 372 | struct dma_channel *chan = &info->channels[i]; |
373 | |||
374 | atomic_set(&chan->busy, 0); | ||
255 | 375 | ||
256 | chan->chan = i; | 376 | chan->chan = info->first_channel_nr + i; |
257 | chan->vchan = i + total_channels; | 377 | chan->vchan = info->first_channel_nr + i + total_channels; |
258 | 378 | ||
259 | memcpy(chan->dev_id, "Unused", 7); | 379 | memcpy(chan->dev_id, "Unused", 7); |
260 | 380 | ||
261 | if (info->flags & DMAC_CHANNELS_TEI_CAPABLE) | 381 | if (info->flags & DMAC_CHANNELS_TEI_CAPABLE) |
262 | chan->flags |= DMA_TEI_CAPABLE; | 382 | chan->flags |= DMA_TEI_CAPABLE; |
263 | 383 | ||
264 | init_MUTEX(&chan->sem); | ||
265 | init_waitqueue_head(&chan->wait_queue); | 384 | init_waitqueue_head(&chan->wait_queue); |
266 | |||
267 | dma_create_sysfs_files(chan, info); | 385 | dma_create_sysfs_files(chan, info); |
268 | } | 386 | } |
269 | 387 | ||
@@ -271,6 +389,7 @@ int register_dmac(struct dma_info *info) | |||
271 | 389 | ||
272 | return 0; | 390 | return 0; |
273 | } | 391 | } |
392 | EXPORT_SYMBOL(register_dmac); | ||
274 | 393 | ||
275 | void unregister_dmac(struct dma_info *info) | 394 | void unregister_dmac(struct dma_info *info) |
276 | { | 395 | { |
@@ -285,31 +404,16 @@ void unregister_dmac(struct dma_info *info) | |||
285 | list_del(&info->list); | 404 | list_del(&info->list); |
286 | platform_device_unregister(info->pdev); | 405 | platform_device_unregister(info->pdev); |
287 | } | 406 | } |
407 | EXPORT_SYMBOL(unregister_dmac); | ||
288 | 408 | ||
289 | static int __init dma_api_init(void) | 409 | static int __init dma_api_init(void) |
290 | { | 410 | { |
291 | printk("DMA: Registering DMA API.\n"); | 411 | printk(KERN_NOTICE "DMA: Registering DMA API.\n"); |
292 | |||
293 | #ifdef CONFIG_PROC_FS | ||
294 | create_proc_read_entry("dma", 0, 0, dma_read_proc, 0); | 412 | create_proc_read_entry("dma", 0, 0, dma_read_proc, 0); |
295 | #endif | ||
296 | |||
297 | return 0; | 413 | return 0; |
298 | } | 414 | } |
299 | |||
300 | subsys_initcall(dma_api_init); | 415 | subsys_initcall(dma_api_init); |
301 | 416 | ||
302 | MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>"); | 417 | MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>"); |
303 | MODULE_DESCRIPTION("DMA API for SuperH"); | 418 | MODULE_DESCRIPTION("DMA API for SuperH"); |
304 | MODULE_LICENSE("GPL"); | 419 | MODULE_LICENSE("GPL"); |
305 | |||
306 | EXPORT_SYMBOL(request_dma); | ||
307 | EXPORT_SYMBOL(free_dma); | ||
308 | EXPORT_SYMBOL(register_dmac); | ||
309 | EXPORT_SYMBOL(get_dma_residue); | ||
310 | EXPORT_SYMBOL(get_dma_info); | ||
311 | EXPORT_SYMBOL(get_dma_channel); | ||
312 | EXPORT_SYMBOL(dma_xfer); | ||
313 | EXPORT_SYMBOL(dma_wait_for_completion); | ||
314 | EXPORT_SYMBOL(dma_configure_channel); | ||
315 | |||
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c index d8ece20bb2cf..f63721ed86c2 100644 --- a/arch/sh/drivers/dma/dma-sh.c +++ b/arch/sh/drivers/dma/dma-sh.c | |||
@@ -19,23 +19,34 @@ | |||
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | #include "dma-sh.h" | 20 | #include "dma-sh.h" |
21 | 21 | ||
22 | static inline unsigned int get_dmte_irq(unsigned int chan) | ||
23 | { | ||
24 | unsigned int irq = 0; | ||
25 | 22 | ||
23 | |||
24 | #ifdef CONFIG_CPU_SH4 | ||
25 | static struct ipr_data dmae_ipr_map[] = { | ||
26 | { DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
27 | }; | ||
28 | #endif | ||
29 | static struct ipr_data dmte_ipr_map[] = { | ||
26 | /* | 30 | /* |
27 | * Normally we could just do DMTE0_IRQ + chan outright, though in the | 31 | * Normally we could just do DMTE0_IRQ + chan outright, though in the |
28 | * case of the 7751R, the DMTE IRQs for channels > 4 start right above | 32 | * case of the 7751R, the DMTE IRQs for channels > 4 start right above |
29 | * the SCIF | 33 | * the SCIF |
30 | */ | 34 | */ |
31 | if (chan < 4) { | 35 | { DMTE0_IRQ + 0, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
32 | irq = DMTE0_IRQ + chan; | 36 | { DMTE0_IRQ + 1, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
33 | } else { | 37 | { DMTE0_IRQ + 2, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
34 | #ifdef DMTE4_IRQ | 38 | { DMTE0_IRQ + 3, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
35 | irq = DMTE4_IRQ + chan - 4; | 39 | { DMTE4_IRQ + 0, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
36 | #endif | 40 | { DMTE4_IRQ + 1, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
37 | } | 41 | { DMTE4_IRQ + 2, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, |
42 | { DMTE4_IRQ + 3, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY }, | ||
43 | }; | ||
38 | 44 | ||
45 | static inline unsigned int get_dmte_irq(unsigned int chan) | ||
46 | { | ||
47 | unsigned int irq = 0; | ||
48 | if (chan < ARRAY_SIZE(dmte_ipr_map)) | ||
49 | irq = dmte_ipr_map[chan].irq; | ||
39 | return irq; | 50 | return irq; |
40 | } | 51 | } |
41 | 52 | ||
@@ -83,20 +94,13 @@ static int sh_dmac_request_dma(struct dma_channel *chan) | |||
83 | if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) | 94 | if (unlikely(!chan->flags & DMA_TEI_CAPABLE)) |
84 | return 0; | 95 | return 0; |
85 | 96 | ||
86 | chan->name = kzalloc(32, GFP_KERNEL); | ||
87 | if (unlikely(chan->name == NULL)) | ||
88 | return -ENOMEM; | ||
89 | snprintf(chan->name, 32, "DMAC Transfer End (Channel %d)", | ||
90 | chan->chan); | ||
91 | |||
92 | return request_irq(get_dmte_irq(chan->chan), dma_tei, | 97 | return request_irq(get_dmte_irq(chan->chan), dma_tei, |
93 | IRQF_DISABLED, chan->name, chan); | 98 | IRQF_DISABLED, chan->dev_id, chan); |
94 | } | 99 | } |
95 | 100 | ||
96 | static void sh_dmac_free_dma(struct dma_channel *chan) | 101 | static void sh_dmac_free_dma(struct dma_channel *chan) |
97 | { | 102 | { |
98 | free_irq(get_dmte_irq(chan->chan), chan); | 103 | free_irq(get_dmte_irq(chan->chan), chan); |
99 | kfree(chan->name); | ||
100 | } | 104 | } |
101 | 105 | ||
102 | static void | 106 | static void |
@@ -258,17 +262,16 @@ static int __init sh_dmac_init(void) | |||
258 | int i; | 262 | int i; |
259 | 263 | ||
260 | #ifdef CONFIG_CPU_SH4 | 264 | #ifdef CONFIG_CPU_SH4 |
261 | make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 265 | make_ipr_irq(dmae_ipr_map, ARRAY_SIZE(dmae_ipr_map)); |
262 | i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); | 266 | i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0); |
263 | if (unlikely(i < 0)) | 267 | if (unlikely(i < 0)) |
264 | return i; | 268 | return i; |
265 | #endif | 269 | #endif |
266 | 270 | ||
267 | for (i = 0; i < info->nr_channels; i++) { | 271 | i = info->nr_channels; |
268 | int irq = get_dmte_irq(i); | 272 | if (i > ARRAY_SIZE(dmte_ipr_map)) |
269 | 273 | i = ARRAY_SIZE(dmte_ipr_map); | |
270 | make_ipr_irq(irq, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); | 274 | make_ipr_irq(dmte_ipr_map, i); |
271 | } | ||
272 | 275 | ||
273 | /* | 276 | /* |
274 | * Initialize DMAOR, and clean up any error flags that may have | 277 | * Initialize DMAOR, and clean up any error flags that may have |
diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c index 29b8ef9873d1..eebcd4768bbf 100644 --- a/arch/sh/drivers/dma/dma-sysfs.c +++ b/arch/sh/drivers/dma/dma-sysfs.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * sysfs interface for SH DMA API | 4 | * sysfs interface for SH DMA API |
5 | * | 5 | * |
6 | * Copyright (C) 2004, 2005 Paul Mundt | 6 | * Copyright (C) 2004 - 2006 Paul Mundt |
7 | * | 7 | * |
8 | * This file is subject to the terms and conditions of the GNU General Public | 8 | * This file is subject to the terms and conditions of the GNU General Public |
9 | * License. See the file "COPYING" in the main directory of this archive | 9 | * License. See the file "COPYING" in the main directory of this archive |
@@ -21,7 +21,6 @@ | |||
21 | static struct sysdev_class dma_sysclass = { | 21 | static struct sysdev_class dma_sysclass = { |
22 | set_kset_name("dma"), | 22 | set_kset_name("dma"), |
23 | }; | 23 | }; |
24 | |||
25 | EXPORT_SYMBOL(dma_sysclass); | 24 | EXPORT_SYMBOL(dma_sysclass); |
26 | 25 | ||
27 | static ssize_t dma_show_devices(struct sys_device *dev, char *buf) | 26 | static ssize_t dma_show_devices(struct sys_device *dev, char *buf) |
@@ -31,7 +30,10 @@ static ssize_t dma_show_devices(struct sys_device *dev, char *buf) | |||
31 | 30 | ||
32 | for (i = 0; i < MAX_DMA_CHANNELS; i++) { | 31 | for (i = 0; i < MAX_DMA_CHANNELS; i++) { |
33 | struct dma_info *info = get_dma_info(i); | 32 | struct dma_info *info = get_dma_info(i); |
34 | struct dma_channel *channel = &info->channels[i]; | 33 | struct dma_channel *channel = get_dma_channel(i); |
34 | |||
35 | if (unlikely(!info) || !channel) | ||
36 | continue; | ||
35 | 37 | ||
36 | len += sprintf(buf + len, "%2d: %14s %s\n", | 38 | len += sprintf(buf + len, "%2d: %14s %s\n", |
37 | channel->chan, info->name, | 39 | channel->chan, info->name, |
@@ -125,11 +127,16 @@ int dma_create_sysfs_files(struct dma_channel *chan, struct dma_info *info) | |||
125 | if (ret) | 127 | if (ret) |
126 | return ret; | 128 | return ret; |
127 | 129 | ||
128 | sysdev_create_file(dev, &attr_dev_id); | 130 | ret |= sysdev_create_file(dev, &attr_dev_id); |
129 | sysdev_create_file(dev, &attr_count); | 131 | ret |= sysdev_create_file(dev, &attr_count); |
130 | sysdev_create_file(dev, &attr_mode); | 132 | ret |= sysdev_create_file(dev, &attr_mode); |
131 | sysdev_create_file(dev, &attr_flags); | 133 | ret |= sysdev_create_file(dev, &attr_flags); |
132 | sysdev_create_file(dev, &attr_config); | 134 | ret |= sysdev_create_file(dev, &attr_config); |
135 | |||
136 | if (unlikely(ret)) { | ||
137 | dev_err(&info->pdev->dev, "Failed creating attrs\n"); | ||
138 | return ret; | ||
139 | } | ||
133 | 140 | ||
134 | snprintf(name, sizeof(name), "dma%d", chan->chan); | 141 | snprintf(name, sizeof(name), "dma%d", chan->chan); |
135 | return sysfs_create_link(&info->pdev->dev.kobj, &dev->kobj, name); | 142 | return sysfs_create_link(&info->pdev->dev.kobj, &dev->kobj, name); |
diff --git a/arch/sh/drivers/pci/ops-r7780rp.c b/arch/sh/drivers/pci/ops-r7780rp.c index 6e3ba9c65b40..eeea1577e112 100644 --- a/arch/sh/drivers/pci/ops-r7780rp.c +++ b/arch/sh/drivers/pci/ops-r7780rp.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/delay.h> | 14 | #include <linux/delay.h> |
15 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
16 | #include <asm/r7780rp/r7780rp.h> | 16 | #include <asm/r7780rp.h> |
17 | #include <asm/io.h> | 17 | #include <asm/io.h> |
18 | #include "pci-sh4.h" | 18 | #include "pci-sh4.h" |
19 | 19 | ||
diff --git a/arch/sh/drivers/pci/ops-rts7751r2d.c b/arch/sh/drivers/pci/ops-rts7751r2d.c index b68824c8b81e..4a518d948049 100644 --- a/arch/sh/drivers/pci/ops-rts7751r2d.c +++ b/arch/sh/drivers/pci/ops-rts7751r2d.c | |||
@@ -10,28 +10,24 @@ | |||
10 | * | 10 | * |
11 | * PCI initialization for the Renesas SH7751R RTS7751R2D board | 11 | * PCI initialization for the Renesas SH7751R RTS7751R2D board |
12 | */ | 12 | */ |
13 | |||
14 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
15 | #include <linux/types.h> | 14 | #include <linux/types.h> |
16 | #include <linux/init.h> | 15 | #include <linux/init.h> |
17 | #include <linux/delay.h> | ||
18 | #include <linux/pci.h> | 16 | #include <linux/pci.h> |
19 | #include <linux/module.h> | 17 | #include <linux/io.h> |
20 | #include <asm/rts7751r2d/rts7751r2d.h> | 18 | #include <asm/rts7751r2d.h> |
21 | #include <asm/io.h> | ||
22 | #include "pci-sh4.h" | 19 | #include "pci-sh4.h" |
23 | 20 | ||
21 | static u8 rts7751r2d_irq_tab[] __initdata = { | ||
22 | IRQ_PCISLOT1, | ||
23 | IRQ_PCISLOT2, | ||
24 | IRQ_PCMCIA, | ||
25 | IRQ_PCIETH, | ||
26 | }; | ||
27 | |||
24 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 28 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) |
25 | { | 29 | { |
26 | switch (slot) { | 30 | return rts7751r2d_irq_tab[slot]; |
27 | case 0: return IRQ_PCISLOT1; /* PCI Extend slot #1 */ | ||
28 | case 1: return IRQ_PCISLOT2; /* PCI Extend slot #2 */ | ||
29 | case 2: return IRQ_PCMCIA; /* PCI Cardbus Bridge */ | ||
30 | case 3: return IRQ_PCIETH; /* Realtek Ethernet controller */ | ||
31 | default: | ||
32 | printk("PCI: Bad IRQ mapping request for slot %d\n", slot); | ||
33 | return -1; | ||
34 | } | ||
35 | } | 31 | } |
36 | 32 | ||
37 | static struct resource sh7751_io_resource = { | 33 | static struct resource sh7751_io_resource = { |
diff --git a/arch/sh/drivers/pci/ops-titan.c b/arch/sh/drivers/pci/ops-titan.c index cd56d53375e7..ac8ee2312cd8 100644 --- a/arch/sh/drivers/pci/ops-titan.c +++ b/arch/sh/drivers/pci/ops-titan.c | |||
@@ -15,25 +15,21 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <asm/io.h> | 18 | #include <linux/io.h> |
19 | #include <asm/titan.h> | 19 | #include <asm/titan.h> |
20 | #include "pci-sh4.h" | 20 | #include "pci-sh4.h" |
21 | 21 | ||
22 | static char titan_irq_tab[] __initdata = { | ||
23 | TITAN_IRQ_WAN, | ||
24 | TITAN_IRQ_LAN, | ||
25 | TITAN_IRQ_MPCIA, | ||
26 | TITAN_IRQ_MPCIB, | ||
27 | TITAN_IRQ_USB, | ||
28 | }; | ||
29 | |||
22 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 30 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) |
23 | { | 31 | { |
24 | int irq = -1; | 32 | int irq = titan_irq_tab[slot]; |
25 | |||
26 | switch (slot) { | ||
27 | case 0: irq = TITAN_IRQ_WAN; break; /* eth0 (WAN) */ | ||
28 | case 1: irq = TITAN_IRQ_LAN; break; /* eth1 (LAN) */ | ||
29 | case 2: irq = TITAN_IRQ_MPCIA; break; /* mPCI A */ | ||
30 | case 3: irq = TITAN_IRQ_MPCIB; break; /* mPCI B */ | ||
31 | case 4: irq = TITAN_IRQ_USB; break; /* USB */ | ||
32 | default: | ||
33 | printk(KERN_INFO "PCI: Bad IRQ mapping " | ||
34 | "request for slot %d\n", slot); | ||
35 | return -1; | ||
36 | } | ||
37 | 33 | ||
38 | printk("PCI: Mapping TITAN IRQ for slot %d, pin %c to irq %d\n", | 34 | printk("PCI: Mapping TITAN IRQ for slot %d, pin %c to irq %d\n", |
39 | slot, pin - 1 + 'A', irq); | 35 | slot, pin - 1 + 'A', irq); |
diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c index d6e635296534..602b644c35ad 100644 --- a/arch/sh/drivers/pci/pci-sh7780.c +++ b/arch/sh/drivers/pci/pci-sh7780.c | |||
@@ -22,6 +22,20 @@ | |||
22 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
23 | #include "pci-sh4.h" | 23 | #include "pci-sh4.h" |
24 | 24 | ||
25 | #define INTC_BASE 0xffd00000 | ||
26 | #define INTC_ICR0 (INTC_BASE+0x0) | ||
27 | #define INTC_ICR1 (INTC_BASE+0x1c) | ||
28 | #define INTC_INTPRI (INTC_BASE+0x10) | ||
29 | #define INTC_INTREQ (INTC_BASE+0x24) | ||
30 | #define INTC_INTMSK0 (INTC_BASE+0x44) | ||
31 | #define INTC_INTMSK1 (INTC_BASE+0x48) | ||
32 | #define INTC_INTMSK2 (INTC_BASE+0x40080) | ||
33 | #define INTC_INTMSKCLR0 (INTC_BASE+0x64) | ||
34 | #define INTC_INTMSKCLR1 (INTC_BASE+0x68) | ||
35 | #define INTC_INTMSKCLR2 (INTC_BASE+0x40084) | ||
36 | #define INTC_INT2MSKR (INTC_BASE+0x40038) | ||
37 | #define INTC_INT2MSKCR (INTC_BASE+0x4003c) | ||
38 | |||
25 | /* | 39 | /* |
26 | * Initialization. Try all known PCI access methods. Note that we support | 40 | * Initialization. Try all known PCI access methods. Note that we support |
27 | * using both PCI BIOS and direct access: in such cases, we use I/O ports | 41 | * using both PCI BIOS and direct access: in such cases, we use I/O ports |
diff --git a/arch/sh/drivers/push-switch.c b/arch/sh/drivers/push-switch.c new file mode 100644 index 000000000000..b3d20c0e021f --- /dev/null +++ b/arch/sh/drivers/push-switch.c | |||
@@ -0,0 +1,141 @@ | |||
1 | /* | ||
2 | * Generic push-switch framework | ||
3 | * | ||
4 | * Copyright (C) 2006 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/module.h> | ||
12 | #include <linux/interrupt.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <asm/push-switch.h> | ||
15 | |||
16 | #define DRV_NAME "push-switch" | ||
17 | #define DRV_VERSION "0.1.1" | ||
18 | |||
19 | static ssize_t switch_show(struct device *dev, | ||
20 | struct device_attribute *attr, | ||
21 | char *buf) | ||
22 | { | ||
23 | struct push_switch_platform_info *psw_info = dev->platform_data; | ||
24 | return sprintf(buf, "%s\n", psw_info->name); | ||
25 | } | ||
26 | static DEVICE_ATTR(switch, S_IRUGO, switch_show, NULL); | ||
27 | |||
28 | static void switch_timer(unsigned long data) | ||
29 | { | ||
30 | struct push_switch *psw = (struct push_switch *)data; | ||
31 | |||
32 | schedule_work(&psw->work); | ||
33 | } | ||
34 | |||
35 | static void switch_work_handler(struct work_struct *work) | ||
36 | { | ||
37 | struct push_switch *psw = container_of(work, struct push_switch, work); | ||
38 | struct platform_device *pdev = psw->pdev; | ||
39 | |||
40 | psw->state = 0; | ||
41 | |||
42 | kobject_uevent(&pdev->dev.kobj, KOBJ_CHANGE); | ||
43 | } | ||
44 | |||
45 | static int switch_drv_probe(struct platform_device *pdev) | ||
46 | { | ||
47 | struct push_switch_platform_info *psw_info; | ||
48 | struct push_switch *psw; | ||
49 | int ret, irq; | ||
50 | |||
51 | psw = kzalloc(sizeof(struct push_switch), GFP_KERNEL); | ||
52 | if (unlikely(!psw)) | ||
53 | return -ENOMEM; | ||
54 | |||
55 | irq = platform_get_irq(pdev, 0); | ||
56 | if (unlikely(irq < 0)) { | ||
57 | ret = -ENODEV; | ||
58 | goto err; | ||
59 | } | ||
60 | |||
61 | psw_info = pdev->dev.platform_data; | ||
62 | BUG_ON(!psw_info); | ||
63 | |||
64 | ret = request_irq(irq, psw_info->irq_handler, | ||
65 | IRQF_DISABLED | psw_info->irq_flags, | ||
66 | psw_info->name ? psw_info->name : DRV_NAME, pdev); | ||
67 | if (unlikely(ret < 0)) | ||
68 | goto err; | ||
69 | |||
70 | if (psw_info->name) { | ||
71 | ret = device_create_file(&pdev->dev, &dev_attr_switch); | ||
72 | if (unlikely(ret)) { | ||
73 | dev_err(&pdev->dev, "Failed creating device attrs\n"); | ||
74 | ret = -EINVAL; | ||
75 | goto err_irq; | ||
76 | } | ||
77 | } | ||
78 | |||
79 | INIT_WORK(&psw->work, switch_work_handler); | ||
80 | init_timer(&psw->debounce); | ||
81 | |||
82 | psw->debounce.function = switch_timer; | ||
83 | psw->debounce.data = (unsigned long)psw; | ||
84 | |||
85 | /* Workqueue API brain-damage */ | ||
86 | psw->pdev = pdev; | ||
87 | |||
88 | platform_set_drvdata(pdev, psw); | ||
89 | |||
90 | return 0; | ||
91 | |||
92 | err_irq: | ||
93 | free_irq(irq, pdev); | ||
94 | err: | ||
95 | kfree(psw); | ||
96 | return ret; | ||
97 | } | ||
98 | |||
99 | static int switch_drv_remove(struct platform_device *pdev) | ||
100 | { | ||
101 | struct push_switch *psw = platform_get_drvdata(pdev); | ||
102 | struct push_switch_platform_info *psw_info = pdev->dev.platform_data; | ||
103 | int irq = platform_get_irq(pdev, 0); | ||
104 | |||
105 | if (psw_info->name) | ||
106 | device_remove_file(&pdev->dev, &dev_attr_switch); | ||
107 | |||
108 | platform_set_drvdata(pdev, NULL); | ||
109 | flush_scheduled_work(); | ||
110 | del_timer_sync(&psw->debounce); | ||
111 | free_irq(irq, pdev); | ||
112 | |||
113 | kfree(psw); | ||
114 | |||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static struct platform_driver switch_driver = { | ||
119 | .probe = switch_drv_probe, | ||
120 | .remove = switch_drv_remove, | ||
121 | .driver = { | ||
122 | .name = DRV_NAME, | ||
123 | }, | ||
124 | }; | ||
125 | |||
126 | static int __init switch_init(void) | ||
127 | { | ||
128 | printk(KERN_NOTICE DRV_NAME ": version %s loaded\n", DRV_VERSION); | ||
129 | return platform_driver_register(&switch_driver); | ||
130 | } | ||
131 | |||
132 | static void __exit switch_exit(void) | ||
133 | { | ||
134 | platform_driver_unregister(&switch_driver); | ||
135 | } | ||
136 | module_init(switch_init); | ||
137 | module_exit(switch_exit); | ||
138 | |||
139 | MODULE_VERSION(DRV_VERSION); | ||
140 | MODULE_AUTHOR("Paul Mundt"); | ||
141 | MODULE_LICENSE("GPLv2"); | ||
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile index 5da88a43d350..99c7e5249f7a 100644 --- a/arch/sh/kernel/Makefile +++ b/arch/sh/kernel/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | extra-y := head.o init_task.o vmlinux.lds | 5 | extra-y := head.o init_task.o vmlinux.lds |
6 | 6 | ||
7 | obj-y := process.o signal.o entry.o traps.o irq.o \ | 7 | obj-y := process.o signal.o traps.o irq.o \ |
8 | ptrace.o setup.o time.o sys_sh.o semaphore.o \ | 8 | ptrace.o setup.o time.o sys_sh.o semaphore.o \ |
9 | io.o io_generic.o sh_ksyms.o syscalls.o | 9 | io.o io_generic.o sh_ksyms.o syscalls.o |
10 | 10 | ||
@@ -21,3 +21,4 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | |||
21 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o | 21 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o |
22 | obj-$(CONFIG_APM) += apm.o | 22 | obj-$(CONFIG_APM) += apm.o |
23 | obj-$(CONFIG_PM) += pm.o | 23 | obj-$(CONFIG_PM) += pm.o |
24 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | ||
diff --git a/arch/sh/kernel/cpu/Makefile b/arch/sh/kernel/cpu/Makefile index fb5dac069382..d055a3ea6b4b 100644 --- a/arch/sh/kernel/cpu/Makefile +++ b/arch/sh/kernel/cpu/Makefile | |||
@@ -2,11 +2,13 @@ | |||
2 | # Makefile for the Linux/SuperH CPU-specifc backends. | 2 | # Makefile for the Linux/SuperH CPU-specifc backends. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += irq/ init.o clock.o | 5 | obj-$(CONFIG_CPU_SH2) = sh2/ |
6 | 6 | obj-$(CONFIG_CPU_SH2A) = sh2a/ | |
7 | obj-$(CONFIG_CPU_SH2) += sh2/ | 7 | obj-$(CONFIG_CPU_SH3) = sh3/ |
8 | obj-$(CONFIG_CPU_SH3) += sh3/ | 8 | obj-$(CONFIG_CPU_SH4) = sh4/ |
9 | obj-$(CONFIG_CPU_SH4) += sh4/ | 9 | obj-$(CONFIG_CPU_SH4A) += sh4a/ |
10 | 10 | ||
11 | obj-$(CONFIG_UBC_WAKEUP) += ubc.o | 11 | obj-$(CONFIG_UBC_WAKEUP) += ubc.o |
12 | obj-$(CONFIG_SH_ADC) += adc.o | 12 | obj-$(CONFIG_SH_ADC) += adc.o |
13 | |||
14 | obj-y += irq/ init.o clock.o | ||
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index 51ec64cdf348..abb586b12565 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
@@ -5,9 +5,11 @@ | |||
5 | * | 5 | * |
6 | * This clock framework is derived from the OMAP version by: | 6 | * This clock framework is derived from the OMAP version by: |
7 | * | 7 | * |
8 | * Copyright (C) 2004 Nokia Corporation | 8 | * Copyright (C) 2004 - 2005 Nokia Corporation |
9 | * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> | 9 | * Written by Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> |
10 | * | 10 | * |
11 | * Modified for omap shared clock framework by Tony Lindgren <tony@atomide.com> | ||
12 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | 13 | * This file is subject to the terms and conditions of the GNU General Public |
12 | * License. See the file "COPYING" in the main directory of this archive | 14 | * License. See the file "COPYING" in the main directory of this archive |
13 | * for more details. | 15 | * for more details. |
@@ -20,6 +22,7 @@ | |||
20 | #include <linux/kref.h> | 22 | #include <linux/kref.h> |
21 | #include <linux/seq_file.h> | 23 | #include <linux/seq_file.h> |
22 | #include <linux/err.h> | 24 | #include <linux/err.h> |
25 | #include <linux/platform_device.h> | ||
23 | #include <asm/clock.h> | 26 | #include <asm/clock.h> |
24 | #include <asm/timer.h> | 27 | #include <asm/timer.h> |
25 | 28 | ||
@@ -195,17 +198,37 @@ void clk_recalc_rate(struct clk *clk) | |||
195 | propagate_rate(clk); | 198 | propagate_rate(clk); |
196 | } | 199 | } |
197 | 200 | ||
198 | struct clk *clk_get(const char *id) | 201 | /* |
202 | * Returns a clock. Note that we first try to use device id on the bus | ||
203 | * and clock name. If this fails, we try to use clock name only. | ||
204 | */ | ||
205 | struct clk *clk_get(struct device *dev, const char *id) | ||
199 | { | 206 | { |
200 | struct clk *p, *clk = ERR_PTR(-ENOENT); | 207 | struct clk *p, *clk = ERR_PTR(-ENOENT); |
208 | int idno; | ||
209 | |||
210 | if (dev == NULL || dev->bus != &platform_bus_type) | ||
211 | idno = -1; | ||
212 | else | ||
213 | idno = to_platform_device(dev)->id; | ||
201 | 214 | ||
202 | mutex_lock(&clock_list_sem); | 215 | mutex_lock(&clock_list_sem); |
203 | list_for_each_entry(p, &clock_list, node) { | 216 | list_for_each_entry(p, &clock_list, node) { |
217 | if (p->id == idno && | ||
218 | strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | ||
219 | clk = p; | ||
220 | goto found; | ||
221 | } | ||
222 | } | ||
223 | |||
224 | list_for_each_entry(p, &clock_list, node) { | ||
204 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | 225 | if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { |
205 | clk = p; | 226 | clk = p; |
206 | break; | 227 | break; |
207 | } | 228 | } |
208 | } | 229 | } |
230 | |||
231 | found: | ||
209 | mutex_unlock(&clock_list_sem); | 232 | mutex_unlock(&clock_list_sem); |
210 | 233 | ||
211 | return clk; | 234 | return clk; |
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c index bfb90eb0b7a6..48121766e8d2 100644 --- a/arch/sh/kernel/cpu/init.c +++ b/arch/sh/kernel/cpu/init.c | |||
@@ -68,12 +68,14 @@ static void __init cache_init(void) | |||
68 | 68 | ||
69 | waysize = cpu_data->dcache.sets; | 69 | waysize = cpu_data->dcache.sets; |
70 | 70 | ||
71 | #ifdef CCR_CACHE_ORA | ||
71 | /* | 72 | /* |
72 | * If the OC is already in RAM mode, we only have | 73 | * If the OC is already in RAM mode, we only have |
73 | * half of the entries to flush.. | 74 | * half of the entries to flush.. |
74 | */ | 75 | */ |
75 | if (ccr & CCR_CACHE_ORA) | 76 | if (ccr & CCR_CACHE_ORA) |
76 | waysize >>= 1; | 77 | waysize >>= 1; |
78 | #endif | ||
77 | 79 | ||
78 | waysize <<= cpu_data->dcache.entry_shift; | 80 | waysize <<= cpu_data->dcache.entry_shift; |
79 | 81 | ||
diff --git a/arch/sh/kernel/cpu/irq/Makefile b/arch/sh/kernel/cpu/irq/Makefile index 1c034c283f59..0049d217561a 100644 --- a/arch/sh/kernel/cpu/irq/Makefile +++ b/arch/sh/kernel/cpu/irq/Makefile | |||
@@ -1,8 +1,9 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the Linux/SuperH CPU-specifc IRQ handlers. | 2 | # Makefile for the Linux/SuperH CPU-specifc IRQ handlers. |
3 | # | 3 | # |
4 | obj-y += ipr.o imask.o | 4 | obj-y += imask.o |
5 | 5 | ||
6 | obj-$(CONFIG_CPU_HAS_IPR_IRQ) += ipr.o | ||
6 | obj-$(CONFIG_CPU_HAS_PINT_IRQ) += pint.o | 7 | obj-$(CONFIG_CPU_HAS_PINT_IRQ) += pint.o |
7 | obj-$(CONFIG_CPU_HAS_MASKREG_IRQ) += maskreg.o | 8 | obj-$(CONFIG_CPU_HAS_MASKREG_IRQ) += maskreg.o |
8 | obj-$(CONFIG_CPU_HAS_INTC2_IRQ) += intc2.o | 9 | obj-$(CONFIG_CPU_HAS_INTC2_IRQ) += intc2.o |
diff --git a/arch/sh/kernel/cpu/irq/imask.c b/arch/sh/kernel/cpu/irq/imask.c index a33ae3e0a5a5..301b505c4278 100644 --- a/arch/sh/kernel/cpu/irq/imask.c +++ b/arch/sh/kernel/cpu/irq/imask.c | |||
@@ -53,7 +53,10 @@ void static inline set_interrupt_registers(int ip) | |||
53 | { | 53 | { |
54 | unsigned long __dummy; | 54 | unsigned long __dummy; |
55 | 55 | ||
56 | asm volatile("ldc %2, r6_bank\n\t" | 56 | asm volatile( |
57 | #ifdef CONFIG_CPU_HAS_SR_RB | ||
58 | "ldc %2, r6_bank\n\t" | ||
59 | #endif | ||
57 | "stc sr, %0\n\t" | 60 | "stc sr, %0\n\t" |
58 | "and #0xf0, %0\n\t" | 61 | "and #0xf0, %0\n\t" |
59 | "shlr2 %0\n\t" | 62 | "shlr2 %0\n\t" |
diff --git a/arch/sh/kernel/cpu/irq/intc2.c b/arch/sh/kernel/cpu/irq/intc2.c index d4b2bb7e08c7..74defe76a058 100644 --- a/arch/sh/kernel/cpu/irq/intc2.c +++ b/arch/sh/kernel/cpu/irq/intc2.c | |||
@@ -11,27 +11,33 @@ | |||
11 | * Hitachi 7751, the STM ST40 STB1, SH7760, and SH7780. | 11 | * Hitachi 7751, the STM ST40 STB1, SH7760, and SH7780. |
12 | */ | 12 | */ |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/irq.h> | 15 | #include <linux/io.h> |
16 | #include <asm/system.h> | 16 | |
17 | #include <asm/io.h> | 17 | #if defined(CONFIG_CPU_SUBTYPE_SH7760) |
18 | #define INTC2_BASE 0xfe080000 | ||
19 | #define INTC2_INTMSK (INTC2_BASE + 0x40) | ||
20 | #define INTC2_INTMSKCLR (INTC2_BASE + 0x60) | ||
21 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | ||
22 | #define INTC2_BASE 0xffd40000 | ||
23 | #define INTC2_INTMSK (INTC2_BASE + 0x38) | ||
24 | #define INTC2_INTMSKCLR (INTC2_BASE + 0x3c) | ||
25 | #endif | ||
18 | 26 | ||
19 | static void disable_intc2_irq(unsigned int irq) | 27 | static void disable_intc2_irq(unsigned int irq) |
20 | { | 28 | { |
21 | struct intc2_data *p = get_irq_chip_data(irq); | 29 | struct intc2_data *p = get_irq_chip_data(irq); |
22 | ctrl_outl(1 << p->msk_shift, | 30 | ctrl_outl(1 << p->msk_shift, INTC2_INTMSK + p->msk_offset); |
23 | INTC2_BASE + INTC2_INTMSK_OFFSET + p->msk_offset); | ||
24 | } | 31 | } |
25 | 32 | ||
26 | static void enable_intc2_irq(unsigned int irq) | 33 | static void enable_intc2_irq(unsigned int irq) |
27 | { | 34 | { |
28 | struct intc2_data *p = get_irq_chip_data(irq); | 35 | struct intc2_data *p = get_irq_chip_data(irq); |
29 | ctrl_outl(1 << p->msk_shift, | 36 | ctrl_outl(1 << p->msk_shift, INTC2_INTMSKCLR + p->msk_offset); |
30 | INTC2_BASE + INTC2_INTMSKCLR_OFFSET + p->msk_offset); | ||
31 | } | 37 | } |
32 | 38 | ||
33 | static struct irq_chip intc2_irq_chip = { | 39 | static struct irq_chip intc2_irq_chip = { |
34 | .typename = "intc2", | 40 | .name = "INTC2", |
35 | .mask = disable_intc2_irq, | 41 | .mask = disable_intc2_irq, |
36 | .unmask = enable_intc2_irq, | 42 | .unmask = enable_intc2_irq, |
37 | .mask_ack = disable_intc2_irq, | 43 | .mask_ack = disable_intc2_irq, |
@@ -45,150 +51,34 @@ static struct irq_chip intc2_irq_chip = { | |||
45 | * PIO1 which is INTPRI00[19,16] and INTMSK00[13] | 51 | * PIO1 which is INTPRI00[19,16] and INTMSK00[13] |
46 | * would be: ^ ^ ^ ^ | 52 | * would be: ^ ^ ^ ^ |
47 | * | | | | | 53 | * | | | | |
48 | * make_intc2_irq(84, 0, 16, 0, 13); | 54 | * { 84, 0, 16, 0, 13 }, |
55 | * | ||
56 | * in the intc2_data table. | ||
49 | */ | 57 | */ |
50 | void make_intc2_irq(struct intc2_data *p) | 58 | void make_intc2_irq(struct intc2_data *table, unsigned int nr_irqs) |
51 | { | 59 | { |
52 | unsigned int flags; | 60 | int i; |
53 | unsigned long ipr; | ||
54 | |||
55 | disable_irq_nosync(p->irq); | ||
56 | |||
57 | /* Set the priority level */ | ||
58 | local_irq_save(flags); | ||
59 | |||
60 | ipr = ctrl_inl(INTC2_BASE + INTC2_INTPRI_OFFSET + p->ipr_offset); | ||
61 | ipr &= ~(0xf << p->ipr_shift); | ||
62 | ipr |= p->priority << p->ipr_shift; | ||
63 | ctrl_outl(ipr, INTC2_BASE + INTC2_INTPRI_OFFSET + p->ipr_offset); | ||
64 | |||
65 | local_irq_restore(flags); | ||
66 | 61 | ||
67 | set_irq_chip_and_handler(p->irq, &intc2_irq_chip, handle_level_irq); | 62 | for (i = 0; i < nr_irqs; i++) { |
68 | set_irq_chip_data(p->irq, p); | 63 | unsigned long ipr, flags; |
64 | struct intc2_data *p = table + i; | ||
69 | 65 | ||
70 | enable_intc2_irq(p->irq); | 66 | disable_irq_nosync(p->irq); |
71 | } | ||
72 | 67 | ||
73 | static struct intc2_data intc2_irq_table[] = { | 68 | /* Set the priority level */ |
74 | #if defined(CONFIG_CPU_SUBTYPE_ST40) | 69 | local_irq_save(flags); |
75 | {64, 0, 0, 0, 0, 13}, /* PCI serr */ | ||
76 | {65, 0, 4, 0, 1, 13}, /* PCI err */ | ||
77 | {66, 0, 4, 0, 2, 13}, /* PCI ad */ | ||
78 | {67, 0, 4, 0, 3, 13}, /* PCI pwd down */ | ||
79 | {72, 0, 8, 0, 5, 13}, /* DMAC INT0 */ | ||
80 | {73, 0, 8, 0, 6, 13}, /* DMAC INT1 */ | ||
81 | {74, 0, 8, 0, 7, 13}, /* DMAC INT2 */ | ||
82 | {75, 0, 8, 0, 8, 13}, /* DMAC INT3 */ | ||
83 | {76, 0, 8, 0, 9, 13}, /* DMAC INT4 */ | ||
84 | {78, 0, 8, 0, 11, 13}, /* DMAC ERR */ | ||
85 | {80, 0, 12, 0, 12, 13}, /* PIO0 */ | ||
86 | {84, 0, 16, 0, 13, 13}, /* PIO1 */ | ||
87 | {88, 0, 20, 0, 14, 13}, /* PIO2 */ | ||
88 | {112, 4, 0, 4, 0, 13}, /* Mailbox */ | ||
89 | #ifdef CONFIG_CPU_SUBTYPE_ST40GX1 | ||
90 | {116, 4, 4, 4, 4, 13}, /* SSC0 */ | ||
91 | {120, 4, 8, 4, 8, 13}, /* IR Blaster */ | ||
92 | {124, 4, 12, 4, 12, 13}, /* USB host */ | ||
93 | {128, 4, 16, 4, 16, 13}, /* Video processor BLITTER */ | ||
94 | {132, 4, 20, 4, 20, 13}, /* UART0 */ | ||
95 | {134, 4, 20, 4, 22, 13}, /* UART2 */ | ||
96 | {136, 4, 24, 4, 24, 13}, /* IO_PIO0 */ | ||
97 | {140, 4, 28, 4, 28, 13}, /* EMPI */ | ||
98 | {144, 8, 0, 8, 0, 13}, /* MAFE */ | ||
99 | {148, 8, 4, 8, 4, 13}, /* PWM */ | ||
100 | {152, 8, 8, 8, 8, 13}, /* SSC1 */ | ||
101 | {156, 8, 12, 8, 12, 13}, /* IO_PIO1 */ | ||
102 | {160, 8, 16, 8, 16, 13}, /* USB target */ | ||
103 | {164, 8, 20, 8, 20, 13}, /* UART1 */ | ||
104 | {168, 8, 24, 8, 24, 13}, /* Teletext */ | ||
105 | {172, 8, 28, 8, 28, 13}, /* VideoSync VTG */ | ||
106 | {173, 8, 28, 8, 29, 13}, /* VideoSync DVP0 */ | ||
107 | {174, 8, 28, 8, 30, 13}, /* VideoSync DVP1 */ | ||
108 | #endif | ||
109 | #elif defined(CONFIG_CPU_SUBTYPE_SH7760) | ||
110 | /* | ||
111 | * SH7760 INTC2-Style interrupts, vectors IRQ48-111 INTEVT 0x800-0xFE0 | ||
112 | */ | ||
113 | /* INTPRIO0 | INTMSK0 */ | ||
114 | {48, 0, 28, 0, 31, 3}, /* IRQ 4 */ | ||
115 | {49, 0, 24, 0, 30, 3}, /* IRQ 3 */ | ||
116 | {50, 0, 20, 0, 29, 3}, /* IRQ 2 */ | ||
117 | {51, 0, 16, 0, 28, 3}, /* IRQ 1 */ | ||
118 | /* 52-55 (INTEVT 0x880-0x8E0) unused/reserved */ | ||
119 | /* INTPRIO4 | INTMSK0 */ | ||
120 | {56, 4, 28, 0, 25, 3}, /* HCAN2_CHAN0 */ | ||
121 | {57, 4, 24, 0, 24, 3}, /* HCAN2_CHAN1 */ | ||
122 | {58, 4, 20, 0, 23, 3}, /* I2S_CHAN0 */ | ||
123 | {59, 4, 16, 0, 22, 3}, /* I2S_CHAN1 */ | ||
124 | {60, 4, 12, 0, 21, 3}, /* AC97_CHAN0 */ | ||
125 | {61, 4, 8, 0, 20, 3}, /* AC97_CHAN1 */ | ||
126 | {62, 4, 4, 0, 19, 3}, /* I2C_CHAN0 */ | ||
127 | {63, 4, 0, 0, 18, 3}, /* I2C_CHAN1 */ | ||
128 | /* INTPRIO8 | INTMSK0 */ | ||
129 | {52, 8, 16, 0, 11, 3}, /* SCIF0_ERI_IRQ */ | ||
130 | {53, 8, 16, 0, 10, 3}, /* SCIF0_RXI_IRQ */ | ||
131 | {54, 8, 16, 0, 9, 3}, /* SCIF0_BRI_IRQ */ | ||
132 | {55, 8, 16, 0, 8, 3}, /* SCIF0_TXI_IRQ */ | ||
133 | {64, 8, 28, 0, 17, 3}, /* USBHI_IRQ */ | ||
134 | {65, 8, 24, 0, 16, 3}, /* LCDC */ | ||
135 | /* 66, 67 unused */ | ||
136 | {68, 8, 20, 0, 14, 13}, /* DMABRGI0_IRQ */ | ||
137 | {69, 8, 20, 0, 13, 13}, /* DMABRGI1_IRQ */ | ||
138 | {70, 8, 20, 0, 12, 13}, /* DMABRGI2_IRQ */ | ||
139 | /* 71 unused */ | ||
140 | {72, 8, 12, 0, 7, 3}, /* SCIF1_ERI_IRQ */ | ||
141 | {73, 8, 12, 0, 6, 3}, /* SCIF1_RXI_IRQ */ | ||
142 | {74, 8, 12, 0, 5, 3}, /* SCIF1_BRI_IRQ */ | ||
143 | {75, 8, 12, 0, 4, 3}, /* SCIF1_TXI_IRQ */ | ||
144 | {76, 8, 8, 0, 3, 3}, /* SCIF2_ERI_IRQ */ | ||
145 | {77, 8, 8, 0, 2, 3}, /* SCIF2_RXI_IRQ */ | ||
146 | {78, 8, 8, 0, 1, 3}, /* SCIF2_BRI_IRQ */ | ||
147 | {79, 8, 8, 0, 0, 3}, /* SCIF2_TXI_IRQ */ | ||
148 | /* | INTMSK4 */ | ||
149 | {80, 8, 4, 4, 23, 3}, /* SIM_ERI */ | ||
150 | {81, 8, 4, 4, 22, 3}, /* SIM_RXI */ | ||
151 | {82, 8, 4, 4, 21, 3}, /* SIM_TXI */ | ||
152 | {83, 8, 4, 4, 20, 3}, /* SIM_TEI */ | ||
153 | {84, 8, 0, 4, 19, 3}, /* HSPII */ | ||
154 | /* INTPRIOC | INTMSK4 */ | ||
155 | /* 85-87 unused/reserved */ | ||
156 | {88, 12, 20, 4, 18, 3}, /* MMCI0 */ | ||
157 | {89, 12, 20, 4, 17, 3}, /* MMCI1 */ | ||
158 | {90, 12, 20, 4, 16, 3}, /* MMCI2 */ | ||
159 | {91, 12, 20, 4, 15, 3}, /* MMCI3 */ | ||
160 | {92, 12, 12, 4, 6, 3}, /* MFI (unsure, bug? in my 7760 manual*/ | ||
161 | /* 93-107 reserved/undocumented */ | ||
162 | {108,12, 4, 4, 1, 3}, /* ADC */ | ||
163 | {109,12, 0, 4, 0, 3}, /* CMTI */ | ||
164 | /* 110-111 reserved/unused */ | ||
165 | #elif defined(CONFIG_CPU_SUBTYPE_SH7780) | ||
166 | { TIMER_IRQ, 0, 24, 0, INTC_TMU0_MSK, 2}, | ||
167 | { 21, 1, 0, 0, INTC_RTC_MSK, TIMER_PRIORITY }, | ||
168 | { 22, 1, 1, 0, INTC_RTC_MSK, TIMER_PRIORITY }, | ||
169 | { 23, 1, 2, 0, INTC_RTC_MSK, TIMER_PRIORITY }, | ||
170 | { SCIF0_ERI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, | ||
171 | { SCIF0_RXI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, | ||
172 | { SCIF0_BRI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, | ||
173 | { SCIF0_TXI_IRQ, 8, 24, 0, INTC_SCIF0_MSK, SCIF0_PRIORITY }, | ||
174 | 70 | ||
175 | { SCIF1_ERI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, | 71 | ipr = ctrl_inl(INTC2_BASE + p->ipr_offset); |
176 | { SCIF1_RXI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, | 72 | ipr &= ~(0xf << p->ipr_shift); |
177 | { SCIF1_BRI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, | 73 | ipr |= p->priority << p->ipr_shift; |
178 | { SCIF1_TXI_IRQ, 8, 16, 0, INTC_SCIF1_MSK, SCIF1_PRIORITY }, | 74 | ctrl_outl(ipr, INTC2_BASE + p->ipr_offset); |
179 | 75 | ||
180 | { PCIC0_IRQ, 0x10, 8, 0, INTC_PCIC0_MSK, PCIC0_PRIORITY }, | 76 | local_irq_restore(flags); |
181 | { PCIC1_IRQ, 0x10, 0, 0, INTC_PCIC1_MSK, PCIC1_PRIORITY }, | ||
182 | { PCIC2_IRQ, 0x14, 24, 0, INTC_PCIC2_MSK, PCIC2_PRIORITY }, | ||
183 | { PCIC3_IRQ, 0x14, 16, 0, INTC_PCIC3_MSK, PCIC3_PRIORITY }, | ||
184 | { PCIC4_IRQ, 0x14, 8, 0, INTC_PCIC4_MSK, PCIC4_PRIORITY }, | ||
185 | #endif | ||
186 | }; | ||
187 | 77 | ||
188 | void __init init_IRQ_intc2(void) | 78 | set_irq_chip_and_handler_name(p->irq, &intc2_irq_chip, |
189 | { | 79 | handle_level_irq, "level"); |
190 | int i; | 80 | set_irq_chip_data(p->irq, p); |
191 | 81 | ||
192 | for (i = 0; i < ARRAY_SIZE(intc2_irq_table); i++) | 82 | enable_intc2_irq(p->irq); |
193 | make_intc2_irq(intc2_irq_table + i); | 83 | } |
194 | } | 84 | } |
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c index 8944abdf6e1c..35eb5751a3aa 100644 --- a/arch/sh/kernel/cpu/irq/ipr.c +++ b/arch/sh/kernel/cpu/irq/ipr.c | |||
@@ -19,15 +19,8 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <asm/system.h> | 22 | #include <linux/io.h> |
23 | #include <asm/io.h> | 23 | #include <linux/interrupt.h> |
24 | #include <asm/machvec.h> | ||
25 | |||
26 | struct ipr_data { | ||
27 | unsigned int addr; /* Address of Interrupt Priority Register */ | ||
28 | int shift; /* Shifts of the 16-bit data */ | ||
29 | int priority; /* The priority */ | ||
30 | }; | ||
31 | 24 | ||
32 | static void disable_ipr_irq(unsigned int irq) | 25 | static void disable_ipr_irq(unsigned int irq) |
33 | { | 26 | { |
@@ -44,107 +37,30 @@ static void enable_ipr_irq(unsigned int irq) | |||
44 | } | 37 | } |
45 | 38 | ||
46 | static struct irq_chip ipr_irq_chip = { | 39 | static struct irq_chip ipr_irq_chip = { |
47 | .name = "ipr", | 40 | .name = "IPR", |
48 | .mask = disable_ipr_irq, | 41 | .mask = disable_ipr_irq, |
49 | .unmask = enable_ipr_irq, | 42 | .unmask = enable_ipr_irq, |
50 | .mask_ack = disable_ipr_irq, | 43 | .mask_ack = disable_ipr_irq, |
51 | }; | 44 | }; |
52 | 45 | ||
53 | void make_ipr_irq(unsigned int irq, unsigned int addr, int pos, int priority) | 46 | void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs) |
54 | { | ||
55 | struct ipr_data ipr_data; | ||
56 | |||
57 | disable_irq_nosync(irq); | ||
58 | |||
59 | ipr_data.addr = addr; | ||
60 | ipr_data.shift = pos*4; /* POSition (0-3) x 4 means shift */ | ||
61 | ipr_data.priority = priority; | ||
62 | |||
63 | set_irq_chip_and_handler(irq, &ipr_irq_chip, handle_level_irq); | ||
64 | set_irq_chip_data(irq, &ipr_data); | ||
65 | |||
66 | enable_ipr_irq(irq); | ||
67 | } | ||
68 | |||
69 | /* XXX: This needs to die a horrible death.. */ | ||
70 | void __init init_IRQ(void) | ||
71 | { | 47 | { |
72 | #ifndef CONFIG_CPU_SUBTYPE_SH7780 | 48 | int i; |
73 | make_ipr_irq(TIMER_IRQ, TIMER_IPR_ADDR, TIMER_IPR_POS, TIMER_PRIORITY); | 49 | |
74 | make_ipr_irq(TIMER1_IRQ, TIMER1_IPR_ADDR, TIMER1_IPR_POS, TIMER1_PRIORITY); | 50 | for (i = 0; i < nr_irqs; i++) { |
75 | #ifdef RTC_IRQ | 51 | unsigned int irq = table[i].irq; |
76 | make_ipr_irq(RTC_IRQ, RTC_IPR_ADDR, RTC_IPR_POS, RTC_PRIORITY); | 52 | table[i].addr = map_ipridx_to_addr(table[i].ipr_idx); |
77 | #endif | 53 | /* could the IPR index be mapped, if not we ignore this */ |
78 | 54 | if (table[i].addr == 0) | |
79 | #ifdef SCI_ERI_IRQ | 55 | continue; |
80 | make_ipr_irq(SCI_ERI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); | 56 | disable_irq_nosync(irq); |
81 | make_ipr_irq(SCI_RXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); | 57 | set_irq_chip_and_handler_name(irq, &ipr_irq_chip, |
82 | make_ipr_irq(SCI_TXI_IRQ, SCI_IPR_ADDR, SCI_IPR_POS, SCI_PRIORITY); | 58 | handle_level_irq, "level"); |
83 | #endif | 59 | set_irq_chip_data(irq, &table[i]); |
84 | 60 | enable_ipr_irq(irq); | |
85 | #ifdef SCIF1_ERI_IRQ | 61 | } |
86 | make_ipr_irq(SCIF1_ERI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); | ||
87 | make_ipr_irq(SCIF1_RXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); | ||
88 | make_ipr_irq(SCIF1_BRI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); | ||
89 | make_ipr_irq(SCIF1_TXI_IRQ, SCIF1_IPR_ADDR, SCIF1_IPR_POS, SCIF1_PRIORITY); | ||
90 | #endif | ||
91 | |||
92 | #if defined(CONFIG_CPU_SUBTYPE_SH7300) | ||
93 | make_ipr_irq(SCIF0_IRQ, SCIF0_IPR_ADDR, SCIF0_IPR_POS, SCIF0_PRIORITY); | ||
94 | make_ipr_irq(DMTE2_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
95 | make_ipr_irq(DMTE3_IRQ, DMA1_IPR_ADDR, DMA1_IPR_POS, DMA1_PRIORITY); | ||
96 | make_ipr_irq(VIO_IRQ, VIO_IPR_ADDR, VIO_IPR_POS, VIO_PRIORITY); | ||
97 | #endif | ||
98 | |||
99 | #ifdef SCIF_ERI_IRQ | ||
100 | make_ipr_irq(SCIF_ERI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); | ||
101 | make_ipr_irq(SCIF_RXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); | ||
102 | make_ipr_irq(SCIF_BRI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); | ||
103 | make_ipr_irq(SCIF_TXI_IRQ, SCIF_IPR_ADDR, SCIF_IPR_POS, SCIF_PRIORITY); | ||
104 | #endif | ||
105 | |||
106 | #ifdef IRDA_ERI_IRQ | ||
107 | make_ipr_irq(IRDA_ERI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); | ||
108 | make_ipr_irq(IRDA_RXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); | ||
109 | make_ipr_irq(IRDA_BRI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); | ||
110 | make_ipr_irq(IRDA_TXI_IRQ, IRDA_IPR_ADDR, IRDA_IPR_POS, IRDA_PRIORITY); | ||
111 | #endif | ||
112 | |||
113 | #if defined(CONFIG_CPU_SUBTYPE_SH7707) || defined(CONFIG_CPU_SUBTYPE_SH7709) || \ | ||
114 | defined(CONFIG_CPU_SUBTYPE_SH7706) || \ | ||
115 | defined(CONFIG_CPU_SUBTYPE_SH7300) || defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
116 | /* | ||
117 | * Initialize the Interrupt Controller (INTC) | ||
118 | * registers to their power on values | ||
119 | */ | ||
120 | |||
121 | /* | ||
122 | * Enable external irq (INTC IRQ mode). | ||
123 | * You should set corresponding bits of PFC to "00" | ||
124 | * to enable these interrupts. | ||
125 | */ | ||
126 | make_ipr_irq(IRQ0_IRQ, IRQ0_IPR_ADDR, IRQ0_IPR_POS, IRQ0_PRIORITY); | ||
127 | make_ipr_irq(IRQ1_IRQ, IRQ1_IPR_ADDR, IRQ1_IPR_POS, IRQ1_PRIORITY); | ||
128 | make_ipr_irq(IRQ2_IRQ, IRQ2_IPR_ADDR, IRQ2_IPR_POS, IRQ2_PRIORITY); | ||
129 | make_ipr_irq(IRQ3_IRQ, IRQ3_IPR_ADDR, IRQ3_IPR_POS, IRQ3_PRIORITY); | ||
130 | make_ipr_irq(IRQ4_IRQ, IRQ4_IPR_ADDR, IRQ4_IPR_POS, IRQ4_PRIORITY); | ||
131 | make_ipr_irq(IRQ5_IRQ, IRQ5_IPR_ADDR, IRQ5_IPR_POS, IRQ5_PRIORITY); | ||
132 | #endif | ||
133 | #endif | ||
134 | |||
135 | #ifdef CONFIG_CPU_HAS_PINT_IRQ | ||
136 | init_IRQ_pint(); | ||
137 | #endif | ||
138 | |||
139 | #ifdef CONFIG_CPU_HAS_INTC2_IRQ | ||
140 | init_IRQ_intc2(); | ||
141 | #endif | ||
142 | /* Perform the machine specific initialisation */ | ||
143 | if (sh_mv.mv_init_irq != NULL) | ||
144 | sh_mv.mv_init_irq(); | ||
145 | |||
146 | irq_ctx_init(smp_processor_id()); | ||
147 | } | 62 | } |
63 | EXPORT_SYMBOL(make_ipr_irq); | ||
148 | 64 | ||
149 | #if !defined(CONFIG_CPU_HAS_PINT_IRQ) | 65 | #if !defined(CONFIG_CPU_HAS_PINT_IRQ) |
150 | int ipr_irq_demux(int irq) | 66 | int ipr_irq_demux(int irq) |
@@ -152,5 +68,3 @@ int ipr_irq_demux(int irq) | |||
152 | return irq; | 68 | return irq; |
153 | } | 69 | } |
154 | #endif | 70 | #endif |
155 | |||
156 | EXPORT_SYMBOL(make_ipr_irq); | ||
diff --git a/arch/sh/kernel/cpu/irq/pint.c b/arch/sh/kernel/cpu/irq/pint.c index 17f47b373d6e..f60007783a21 100644 --- a/arch/sh/kernel/cpu/irq/pint.c +++ b/arch/sh/kernel/cpu/irq/pint.c | |||
@@ -84,12 +84,16 @@ void make_pint_irq(unsigned int irq) | |||
84 | disable_pint_irq(irq); | 84 | disable_pint_irq(irq); |
85 | } | 85 | } |
86 | 86 | ||
87 | static struct ipr_data pint_ipr_map[] = { | ||
88 | { PINT0_IRQ, PINT0_IPR_ADDR, PINT0_IPR_POS, PINT0_PRIORITY }, | ||
89 | { PINT8_IRQ, PINT8_IPR_ADDR, PINT8_IPR_POS, PINT8_PRIORITY }, | ||
90 | }; | ||
91 | |||
87 | void __init init_IRQ_pint(void) | 92 | void __init init_IRQ_pint(void) |
88 | { | 93 | { |
89 | int i; | 94 | int i; |
90 | 95 | ||
91 | make_ipr_irq(PINT0_IRQ, PINT0_IPR_ADDR, PINT0_IPR_POS, PINT0_PRIORITY); | 96 | make_ipr_irq(pint_ipr_map, ARRAY_SIZE(pint_ipr_map)); |
92 | make_ipr_irq(PINT8_IRQ, PINT8_IPR_ADDR, PINT8_IPR_POS, PINT8_PRIORITY); | ||
93 | 97 | ||
94 | enable_irq(PINT0_IRQ); | 98 | enable_irq(PINT0_IRQ); |
95 | enable_irq(PINT8_IRQ); | 99 | enable_irq(PINT8_IRQ); |
diff --git a/arch/sh/kernel/cpu/sh2/Makefile b/arch/sh/kernel/cpu/sh2/Makefile index 389353fba608..f0f059acfcfb 100644 --- a/arch/sh/kernel/cpu/sh2/Makefile +++ b/arch/sh/kernel/cpu/sh2/Makefile | |||
@@ -2,5 +2,6 @@ | |||
2 | # Makefile for the Linux/SuperH SH-2 backends. | 2 | # Makefile for the Linux/SuperH SH-2 backends. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := probe.o | 5 | obj-y := ex.o probe.o entry.o |
6 | 6 | ||
7 | obj-$(CONFIG_CPU_SUBTYPE_SH7619) += setup-sh7619.o clock-sh7619.o | ||
diff --git a/arch/sh/kernel/cpu/sh2/clock-sh7619.c b/arch/sh/kernel/cpu/sh2/clock-sh7619.c new file mode 100644 index 000000000000..d0440b269702 --- /dev/null +++ b/arch/sh/kernel/cpu/sh2/clock-sh7619.c | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh2/clock-sh7619.c | ||
3 | * | ||
4 | * SH7619 support for the clock framework | ||
5 | * | ||
6 | * Copyright (C) 2006 Yoshinori Sato | ||
7 | * | ||
8 | * Based on clock-sh4.c | ||
9 | * Copyright (C) 2005 Paul Mundt | ||
10 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | ||
12 | * License. See the file "COPYING" in the main directory of this archive | ||
13 | * for more details. | ||
14 | */ | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <asm/clock.h> | ||
18 | #include <asm/freq.h> | ||
19 | #include <asm/io.h> | ||
20 | |||
21 | const static int pll1rate[]={1,2}; | ||
22 | const static int pfc_divisors[]={1,2,0,4}; | ||
23 | |||
24 | #if (CONFIG_SH_CLK_MD == 1) || (CONFIG_SH_CLK_MD == 2) | ||
25 | #define PLL2 (4) | ||
26 | #elif (CONFIG_SH_CLK_MD == 5) || (CONFIG_SH_CLK_MD == 6) | ||
27 | #define PLL2 (2) | ||
28 | #else | ||
29 | #error "Illigal Clock Mode!" | ||
30 | #endif | ||
31 | |||
32 | static void master_clk_init(struct clk *clk) | ||
33 | { | ||
34 | clk->rate *= PLL2 * pll1rate[(ctrl_inw(FREQCR) >> 8) & 7]; | ||
35 | } | ||
36 | |||
37 | static struct clk_ops sh7619_master_clk_ops = { | ||
38 | .init = master_clk_init, | ||
39 | }; | ||
40 | |||
41 | static void module_clk_recalc(struct clk *clk) | ||
42 | { | ||
43 | int idx = (ctrl_inw(FREQCR) & 0x0007); | ||
44 | clk->rate = clk->parent->rate / pfc_divisors[idx]; | ||
45 | } | ||
46 | |||
47 | static struct clk_ops sh7619_module_clk_ops = { | ||
48 | .recalc = module_clk_recalc, | ||
49 | }; | ||
50 | |||
51 | static void bus_clk_recalc(struct clk *clk) | ||
52 | { | ||
53 | clk->rate = clk->parent->rate / pll1rate[(ctrl_inw(FREQCR) >> 8) & 7]; | ||
54 | } | ||
55 | |||
56 | static struct clk_ops sh7619_bus_clk_ops = { | ||
57 | .recalc = bus_clk_recalc, | ||
58 | }; | ||
59 | |||
60 | static void cpu_clk_recalc(struct clk *clk) | ||
61 | { | ||
62 | clk->rate = clk->parent->rate; | ||
63 | } | ||
64 | |||
65 | static struct clk_ops sh7619_cpu_clk_ops = { | ||
66 | .recalc = cpu_clk_recalc, | ||
67 | }; | ||
68 | |||
69 | static struct clk_ops *sh7619_clk_ops[] = { | ||
70 | &sh7619_master_clk_ops, | ||
71 | &sh7619_module_clk_ops, | ||
72 | &sh7619_bus_clk_ops, | ||
73 | &sh7619_cpu_clk_ops, | ||
74 | }; | ||
75 | |||
76 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | ||
77 | { | ||
78 | if (idx < ARRAY_SIZE(sh7619_clk_ops)) | ||
79 | *ops = sh7619_clk_ops[idx]; | ||
80 | } | ||
81 | |||
diff --git a/arch/sh/kernel/cpu/sh2/entry.S b/arch/sh/kernel/cpu/sh2/entry.S new file mode 100644 index 000000000000..d51fa5e9904a --- /dev/null +++ b/arch/sh/kernel/cpu/sh2/entry.S | |||
@@ -0,0 +1,337 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh2/entry.S | ||
3 | * | ||
4 | * The SH-2 exception entry | ||
5 | * | ||
6 | * Copyright (C) 2005,2006 Yoshinori Sato | ||
7 | * Copyright (C) 2005 AXE,Inc. | ||
8 | * | ||
9 | * This file is subject to the terms and conditions of the GNU General Public | ||
10 | * License. See the file "COPYING" in the main directory of this archive | ||
11 | * for more details. | ||
12 | */ | ||
13 | |||
14 | #include <linux/linkage.h> | ||
15 | #include <asm/asm-offsets.h> | ||
16 | #include <asm/thread_info.h> | ||
17 | #include <asm/cpu/mmu_context.h> | ||
18 | #include <asm/unistd.h> | ||
19 | #include <asm/errno.h> | ||
20 | #include <asm/page.h> | ||
21 | |||
22 | /* Offsets to the stack */ | ||
23 | OFF_R0 = 0 /* Return value. New ABI also arg4 */ | ||
24 | OFF_R1 = 4 /* New ABI: arg5 */ | ||
25 | OFF_R2 = 8 /* New ABI: arg6 */ | ||
26 | OFF_R3 = 12 /* New ABI: syscall_nr */ | ||
27 | OFF_R4 = 16 /* New ABI: arg0 */ | ||
28 | OFF_R5 = 20 /* New ABI: arg1 */ | ||
29 | OFF_R6 = 24 /* New ABI: arg2 */ | ||
30 | OFF_R7 = 28 /* New ABI: arg3 */ | ||
31 | OFF_SP = (15*4) | ||
32 | OFF_PC = (16*4) | ||
33 | OFF_SR = (16*4+2*4) | ||
34 | OFF_TRA = (16*4+6*4) | ||
35 | |||
36 | #include <asm/entry-macros.S> | ||
37 | |||
38 | ENTRY(exception_handler) | ||
39 | ! already saved r0/r1 | ||
40 | mov.l r2,@-sp | ||
41 | mov.l r3,@-sp | ||
42 | mov r0,r1 | ||
43 | cli | ||
44 | mov.l $cpu_mode,r2 | ||
45 | mov.l @r2,r0 | ||
46 | mov.l @(5*4,r15),r3 ! previous SR | ||
47 | shll2 r3 ! set "S" flag | ||
48 | rotl r0 ! T <- "S" flag | ||
49 | rotl r0 ! "S" flag is LSB | ||
50 | rotcr r3 ! T -> r3:b30 | ||
51 | shlr r3 | ||
52 | shlr r0 | ||
53 | bt/s 1f | ||
54 | mov.l r3,@(5*4,r15) ! copy cpu mode to SR | ||
55 | ! switch to kernel mode | ||
56 | mov #1,r0 | ||
57 | rotr r0 | ||
58 | rotr r0 | ||
59 | mov.l r0,@r2 ! enter kernel mode | ||
60 | mov.l $current_thread_info,r2 | ||
61 | mov.l @r2,r2 | ||
62 | mov #0x20,r0 | ||
63 | shll8 r0 | ||
64 | add r2,r0 | ||
65 | mov r15,r2 ! r2 = user stack top | ||
66 | mov r0,r15 ! switch kernel stack | ||
67 | add #-4,r15 ! dummy | ||
68 | mov.l r1,@-r15 ! TRA | ||
69 | sts.l macl, @-r15 | ||
70 | sts.l mach, @-r15 | ||
71 | stc.l gbr, @-r15 | ||
72 | mov.l @(4*4,r2),r0 | ||
73 | mov.l @(5*4,r2),r1 | ||
74 | mov.l r1,@-r15 ! original SR | ||
75 | sts.l pr,@-r15 | ||
76 | mov.l r0,@-r15 ! original PC | ||
77 | mov r2,r3 | ||
78 | add #(4+2)*4,r3 ! rewind r0 - r3 + exception frame | ||
79 | mov.l r3,@-r15 ! original SP | ||
80 | mov.l r14,@-r15 | ||
81 | mov.l r13,@-r15 | ||
82 | mov.l r12,@-r15 | ||
83 | mov.l r11,@-r15 | ||
84 | mov.l r10,@-r15 | ||
85 | mov.l r9,@-r15 | ||
86 | mov.l r8,@-r15 | ||
87 | mov.l r7,@-r15 | ||
88 | mov.l r6,@-r15 | ||
89 | mov.l r5,@-r15 | ||
90 | mov.l r4,@-r15 | ||
91 | mov r2,r8 ! copy user -> kernel stack | ||
92 | mov.l @r8+,r3 | ||
93 | mov.l r3,@-r15 | ||
94 | mov.l @r8+,r2 | ||
95 | mov.l r2,@-r15 | ||
96 | mov.l @r8+,r1 | ||
97 | mov.l r1,@-r15 | ||
98 | mov.l @r8+,r0 | ||
99 | bra 2f | ||
100 | mov.l r0,@-r15 | ||
101 | 1: | ||
102 | ! in kernel exception | ||
103 | mov #(22-4-4-1)*4+4,r0 | ||
104 | mov r15,r2 | ||
105 | sub r0,r15 | ||
106 | mov.l @r2+,r0 ! old R3 | ||
107 | mov.l r0,@-r15 | ||
108 | mov.l @r2+,r0 ! old R2 | ||
109 | mov.l r0,@-r15 | ||
110 | mov.l @r2+,r0 ! old R1 | ||
111 | mov.l r0,@-r15 | ||
112 | mov.l @r2+,r0 ! old R0 | ||
113 | mov.l r0,@-r15 | ||
114 | mov.l @r2+,r3 ! old PC | ||
115 | mov.l @r2+,r0 ! old SR | ||
116 | add #-4,r2 ! exception frame stub (sr) | ||
117 | mov.l r1,@-r2 ! TRA | ||
118 | sts.l macl, @-r2 | ||
119 | sts.l mach, @-r2 | ||
120 | stc.l gbr, @-r2 | ||
121 | mov.l r0,@-r2 ! save old SR | ||
122 | sts.l pr,@-r2 | ||
123 | mov.l r3,@-r2 ! save old PC | ||
124 | mov r2,r0 | ||
125 | add #8*4,r0 | ||
126 | mov.l r0,@-r2 ! save old SP | ||
127 | mov.l r14,@-r2 | ||
128 | mov.l r13,@-r2 | ||
129 | mov.l r12,@-r2 | ||
130 | mov.l r11,@-r2 | ||
131 | mov.l r10,@-r2 | ||
132 | mov.l r9,@-r2 | ||
133 | mov.l r8,@-r2 | ||
134 | mov.l r7,@-r2 | ||
135 | mov.l r6,@-r2 | ||
136 | mov.l r5,@-r2 | ||
137 | mov.l r4,@-r2 | ||
138 | mov.l @(OFF_R0,r15),r0 | ||
139 | mov.l @(OFF_R1,r15),r1 | ||
140 | mov.l @(OFF_R2,r15),r2 | ||
141 | mov.l @(OFF_R3,r15),r3 | ||
142 | 2: | ||
143 | mov #OFF_TRA,r8 | ||
144 | add r15,r8 | ||
145 | mov.l @r8,r9 | ||
146 | mov #64,r8 | ||
147 | cmp/hs r8,r9 | ||
148 | bt interrupt_entry ! vec >= 64 is interrupt | ||
149 | mov #32,r8 | ||
150 | cmp/hs r8,r9 | ||
151 | bt trap_entry ! 64 > vec >= 32 is trap | ||
152 | mov.l 4f,r8 | ||
153 | mov r9,r4 | ||
154 | shll2 r9 | ||
155 | add r9,r8 | ||
156 | mov.l @r8,r8 | ||
157 | mov #0,r9 | ||
158 | cmp/eq r9,r8 | ||
159 | bf 3f | ||
160 | mov.l 8f,r8 ! unhandled exception | ||
161 | 3: | ||
162 | mov.l 5f,r10 | ||
163 | jmp @r8 | ||
164 | lds r10,pr | ||
165 | |||
166 | interrupt_entry: | ||
167 | mov r9,r4 | ||
168 | mov.l 6f,r9 | ||
169 | mov.l 7f,r8 | ||
170 | jmp @r8 | ||
171 | lds r9,pr | ||
172 | |||
173 | .align 2 | ||
174 | 4: .long exception_handling_table | ||
175 | 5: .long ret_from_exception | ||
176 | 6: .long ret_from_irq | ||
177 | 7: .long do_IRQ | ||
178 | 8: .long do_exception_error | ||
179 | |||
180 | trap_entry: | ||
181 | /* verbose BUG trapa entry check */ | ||
182 | mov #0x3e,r8 | ||
183 | cmp/ge r8,r9 | ||
184 | bf/s 1f | ||
185 | add #-0x10,r9 | ||
186 | add #0x10,r9 | ||
187 | 1: | ||
188 | shll2 r9 ! TRA | ||
189 | mov #OFF_TRA,r8 | ||
190 | add r15,r8 | ||
191 | mov.l r9,@r8 | ||
192 | mov r9,r8 | ||
193 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
194 | mov.l 2f, r9 | ||
195 | jsr @r9 | ||
196 | nop | ||
197 | #endif | ||
198 | sti | ||
199 | bra system_call | ||
200 | nop | ||
201 | |||
202 | .align 2 | ||
203 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
204 | 2: .long trace_hardirqs_on | ||
205 | #endif | ||
206 | |||
207 | #if defined(CONFIG_SH_STANDARD_BIOS) | ||
208 | /* Unwind the stack and jmp to the debug entry */ | ||
209 | debug_kernel_fw: | ||
210 | mov r15,r0 | ||
211 | add #(22-4)*4-4,r0 | ||
212 | ldc.l @r0+,gbr | ||
213 | lds.l @r0+,mach | ||
214 | lds.l @r0+,macl | ||
215 | mov r15,r0 | ||
216 | mov.l @(OFF_SP,r0),r1 | ||
217 | mov #OFF_SR,r2 | ||
218 | mov.l @(r0,r2),r3 | ||
219 | mov.l r3,@-r1 | ||
220 | mov #OFF_SP,r2 | ||
221 | mov.l @(r0,r2),r3 | ||
222 | mov.l r3,@-r1 | ||
223 | mov r15,r0 | ||
224 | add #(22-4)*4-8,r0 | ||
225 | mov.l 1f,r2 | ||
226 | mov.l @r2,r2 | ||
227 | stc sr,r3 | ||
228 | mov.l r2,@r0 | ||
229 | mov.l r3,@r0 | ||
230 | mov.l r1,@(8,r0) | ||
231 | mov.l @r15+, r0 | ||
232 | mov.l @r15+, r1 | ||
233 | mov.l @r15+, r2 | ||
234 | mov.l @r15+, r3 | ||
235 | mov.l @r15+, r4 | ||
236 | mov.l @r15+, r5 | ||
237 | mov.l @r15+, r6 | ||
238 | mov.l @r15+, r7 | ||
239 | mov.l @r15+, r8 | ||
240 | mov.l @r15+, r9 | ||
241 | mov.l @r15+, r10 | ||
242 | mov.l @r15+, r11 | ||
243 | mov.l @r15+, r12 | ||
244 | mov.l @r15+, r13 | ||
245 | mov.l @r15+, r14 | ||
246 | add #8,r15 | ||
247 | lds.l @r15+, pr | ||
248 | rte | ||
249 | mov.l @r15+,r15 | ||
250 | .align 2 | ||
251 | 1: .long gdb_vbr_vector | ||
252 | #endif /* CONFIG_SH_STANDARD_BIOS */ | ||
253 | |||
254 | ENTRY(address_error_handler) | ||
255 | mov r15,r4 ! regs | ||
256 | add #4,r4 | ||
257 | mov #OFF_PC,r0 | ||
258 | mov.l @(r0,r15),r6 ! pc | ||
259 | mov.l 1f,r0 | ||
260 | jmp @r0 | ||
261 | mov #0,r5 ! writeaccess is unknown | ||
262 | .align 2 | ||
263 | |||
264 | 1: .long do_address_error | ||
265 | |||
266 | restore_all: | ||
267 | cli | ||
268 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
269 | mov.l 1f, r0 | ||
270 | jsr @r0 | ||
271 | nop | ||
272 | #endif | ||
273 | mov r15,r0 | ||
274 | mov.l $cpu_mode,r2 | ||
275 | mov #OFF_SR,r3 | ||
276 | mov.l @(r0,r3),r1 | ||
277 | mov.l r1,@r2 | ||
278 | shll2 r1 ! clear MD bit | ||
279 | shlr2 r1 | ||
280 | mov.l @(OFF_SP,r0),r2 | ||
281 | add #-8,r2 | ||
282 | mov.l r2,@(OFF_SP,r0) ! point exception frame top | ||
283 | mov.l r1,@(4,r2) ! set sr | ||
284 | mov #OFF_PC,r3 | ||
285 | mov.l @(r0,r3),r1 | ||
286 | mov.l r1,@r2 ! set pc | ||
287 | add #4*16+4,r0 | ||
288 | lds.l @r0+,pr | ||
289 | add #4,r0 ! skip sr | ||
290 | ldc.l @r0+,gbr | ||
291 | lds.l @r0+,mach | ||
292 | lds.l @r0+,macl | ||
293 | get_current_thread_info r0, r1 | ||
294 | mov.l $current_thread_info,r1 | ||
295 | mov.l r0,@r1 | ||
296 | mov.l @r15+,r0 | ||
297 | mov.l @r15+,r1 | ||
298 | mov.l @r15+,r2 | ||
299 | mov.l @r15+,r3 | ||
300 | mov.l @r15+,r4 | ||
301 | mov.l @r15+,r5 | ||
302 | mov.l @r15+,r6 | ||
303 | mov.l @r15+,r7 | ||
304 | mov.l @r15+,r8 | ||
305 | mov.l @r15+,r9 | ||
306 | mov.l @r15+,r10 | ||
307 | mov.l @r15+,r11 | ||
308 | mov.l @r15+,r12 | ||
309 | mov.l @r15+,r13 | ||
310 | mov.l @r15+,r14 | ||
311 | mov.l @r15,r15 | ||
312 | rte | ||
313 | nop | ||
314 | |||
315 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
316 | 1: .long trace_hardirqs_off | ||
317 | #endif | ||
318 | $current_thread_info: | ||
319 | .long __current_thread_info | ||
320 | $cpu_mode: | ||
321 | .long __cpu_mode | ||
322 | |||
323 | ! common exception handler | ||
324 | #include "../../entry-common.S" | ||
325 | |||
326 | .data | ||
327 | ! cpu operation mode | ||
328 | ! bit30 = MD (compatible SH3/4) | ||
329 | __cpu_mode: | ||
330 | .long 0x40000000 | ||
331 | |||
332 | .section .bss | ||
333 | __current_thread_info: | ||
334 | .long 0 | ||
335 | |||
336 | ENTRY(exception_handling_table) | ||
337 | .space 4*32 | ||
diff --git a/arch/sh/kernel/cpu/sh2/ex.S b/arch/sh/kernel/cpu/sh2/ex.S new file mode 100644 index 000000000000..6d285af7846c --- /dev/null +++ b/arch/sh/kernel/cpu/sh2/ex.S | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh2/ex.S | ||
3 | * | ||
4 | * The SH-2 exception vector table | ||
5 | * | ||
6 | * Copyright (C) 2005 Yoshinori Sato | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | |||
13 | #include <linux/linkage.h> | ||
14 | |||
15 | ! | ||
16 | ! convert Exception Vector to Exception Number | ||
17 | ! | ||
18 | exception_entry: | ||
19 | no = 0 | ||
20 | .rept 256 | ||
21 | mov.l r0,@-sp | ||
22 | mov #no,r0 | ||
23 | bra exception_trampoline | ||
24 | and #0xff,r0 | ||
25 | no = no + 1 | ||
26 | .endr | ||
27 | exception_trampoline: | ||
28 | mov.l r1,@-sp | ||
29 | mov.l $exception_handler,r1 | ||
30 | jmp @r1 | ||
31 | |||
32 | .align 2 | ||
33 | $exception_entry: | ||
34 | .long exception_entry | ||
35 | $exception_handler: | ||
36 | .long exception_handler | ||
37 | ! | ||
38 | ! Exception Vector Base | ||
39 | ! | ||
40 | .align 2 | ||
41 | ENTRY(vbr_base) | ||
42 | vector = 0 | ||
43 | .rept 256 | ||
44 | .long exception_entry + vector * 8 | ||
45 | vector = vector + 1 | ||
46 | .endr | ||
diff --git a/arch/sh/kernel/cpu/sh2/probe.c b/arch/sh/kernel/cpu/sh2/probe.c index f17a2a0d588e..ba527d9b5024 100644 --- a/arch/sh/kernel/cpu/sh2/probe.c +++ b/arch/sh/kernel/cpu/sh2/probe.c | |||
@@ -17,17 +17,23 @@ | |||
17 | 17 | ||
18 | int __init detect_cpu_and_cache_system(void) | 18 | int __init detect_cpu_and_cache_system(void) |
19 | { | 19 | { |
20 | /* | 20 | #if defined(CONFIG_CPU_SUBTYPE_SH7604) |
21 | * For now, assume SH7604 .. fix this later. | ||
22 | */ | ||
23 | cpu_data->type = CPU_SH7604; | 21 | cpu_data->type = CPU_SH7604; |
24 | cpu_data->dcache.ways = 4; | 22 | cpu_data->dcache.ways = 4; |
25 | cpu_data->dcache.way_shift = 6; | 23 | cpu_data->dcache.way_incr = (1<<10); |
26 | cpu_data->dcache.sets = 64; | 24 | cpu_data->dcache.sets = 64; |
27 | cpu_data->dcache.entry_shift = 4; | 25 | cpu_data->dcache.entry_shift = 4; |
28 | cpu_data->dcache.linesz = L1_CACHE_BYTES; | 26 | cpu_data->dcache.linesz = L1_CACHE_BYTES; |
29 | cpu_data->dcache.flags = 0; | 27 | cpu_data->dcache.flags = 0; |
30 | 28 | #elif defined(CONFIG_CPU_SUBTYPE_SH7619) | |
29 | cpu_data->type = CPU_SH7619; | ||
30 | cpu_data->dcache.ways = 4; | ||
31 | cpu_data->dcache.way_incr = (1<<12); | ||
32 | cpu_data->dcache.sets = 256; | ||
33 | cpu_data->dcache.entry_shift = 4; | ||
34 | cpu_data->dcache.linesz = L1_CACHE_BYTES; | ||
35 | cpu_data->dcache.flags = 0; | ||
36 | #endif | ||
31 | /* | 37 | /* |
32 | * SH-2 doesn't have separate caches | 38 | * SH-2 doesn't have separate caches |
33 | */ | 39 | */ |
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c new file mode 100644 index 000000000000..79283e6c1d8f --- /dev/null +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * SH7619 Setup | ||
3 | * | ||
4 | * Copyright (C) 2006 Yoshinori Sato | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/serial.h> | ||
13 | #include <asm/sci.h> | ||
14 | |||
15 | static struct plat_sci_port sci_platform_data[] = { | ||
16 | { | ||
17 | .mapbase = 0xf8400000, | ||
18 | .flags = UPF_BOOT_AUTOCONF, | ||
19 | .type = PORT_SCIF, | ||
20 | .irqs = { 88, 89, 91, 90}, | ||
21 | }, { | ||
22 | .mapbase = 0xf8410000, | ||
23 | .flags = UPF_BOOT_AUTOCONF, | ||
24 | .type = PORT_SCIF, | ||
25 | .irqs = { 92, 93, 95, 94}, | ||
26 | }, { | ||
27 | .mapbase = 0xf8420000, | ||
28 | .flags = UPF_BOOT_AUTOCONF, | ||
29 | .type = PORT_SCIF, | ||
30 | .irqs = { 96, 97, 99, 98}, | ||
31 | }, { | ||
32 | .flags = 0, | ||
33 | } | ||
34 | }; | ||
35 | |||
36 | static struct platform_device sci_device = { | ||
37 | .name = "sh-sci", | ||
38 | .id = -1, | ||
39 | .dev = { | ||
40 | .platform_data = sci_platform_data, | ||
41 | }, | ||
42 | }; | ||
43 | |||
44 | static struct platform_device *sh7619_devices[] __initdata = { | ||
45 | &sci_device, | ||
46 | }; | ||
47 | |||
48 | static int __init sh7619_devices_setup(void) | ||
49 | { | ||
50 | return platform_add_devices(sh7619_devices, | ||
51 | ARRAY_SIZE(sh7619_devices)); | ||
52 | } | ||
53 | __initcall(sh7619_devices_setup); | ||
54 | |||
55 | #define INTC_IPRC 0xf8080000UL | ||
56 | #define INTC_IPRD 0xf8080002UL | ||
57 | |||
58 | #define CMI0_IRQ 86 | ||
59 | |||
60 | #define SCIF0_ERI_IRQ 88 | ||
61 | #define SCIF0_RXI_IRQ 89 | ||
62 | #define SCIF0_BRI_IRQ 90 | ||
63 | #define SCIF0_TXI_IRQ 91 | ||
64 | |||
65 | #define SCIF1_ERI_IRQ 92 | ||
66 | #define SCIF1_RXI_IRQ 93 | ||
67 | #define SCIF1_BRI_IRQ 94 | ||
68 | #define SCIF1_TXI_IRQ 95 | ||
69 | |||
70 | #define SCIF2_BRI_IRQ 96 | ||
71 | #define SCIF2_ERI_IRQ 97 | ||
72 | #define SCIF2_RXI_IRQ 98 | ||
73 | #define SCIF2_TXI_IRQ 99 | ||
74 | |||
75 | static struct ipr_data sh7619_ipr_map[] = { | ||
76 | { CMI0_IRQ, INTC_IPRC, 1, 2 }, | ||
77 | { SCIF0_ERI_IRQ, INTC_IPRD, 3, 3 }, | ||
78 | { SCIF0_RXI_IRQ, INTC_IPRD, 3, 3 }, | ||
79 | { SCIF0_BRI_IRQ, INTC_IPRD, 3, 3 }, | ||
80 | { SCIF0_TXI_IRQ, INTC_IPRD, 3, 3 }, | ||
81 | { SCIF1_ERI_IRQ, INTC_IPRD, 2, 3 }, | ||
82 | { SCIF1_RXI_IRQ, INTC_IPRD, 2, 3 }, | ||
83 | { SCIF1_BRI_IRQ, INTC_IPRD, 2, 3 }, | ||
84 | { SCIF1_TXI_IRQ, INTC_IPRD, 2, 3 }, | ||
85 | { SCIF2_ERI_IRQ, INTC_IPRD, 1, 3 }, | ||
86 | { SCIF2_RXI_IRQ, INTC_IPRD, 1, 3 }, | ||
87 | { SCIF2_BRI_IRQ, INTC_IPRD, 1, 3 }, | ||
88 | { SCIF2_TXI_IRQ, INTC_IPRD, 1, 3 }, | ||
89 | }; | ||
90 | |||
91 | void __init init_IRQ_ipr(void) | ||
92 | { | ||
93 | make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map)); | ||
94 | } | ||
diff --git a/arch/sh/kernel/cpu/sh2a/Makefile b/arch/sh/kernel/cpu/sh2a/Makefile new file mode 100644 index 000000000000..350972ae9410 --- /dev/null +++ b/arch/sh/kernel/cpu/sh2a/Makefile | |||
@@ -0,0 +1,10 @@ | |||
1 | # | ||
2 | # Makefile for the Linux/SuperH SH-2A backends. | ||
3 | # | ||
4 | |||
5 | obj-y := common.o probe.o | ||
6 | |||
7 | common-y += $(addprefix ../sh2/, ex.o) | ||
8 | common-y += $(addprefix ../sh2/, entry.o) | ||
9 | |||
10 | obj-$(CONFIG_CPU_SUBTYPE_SH7206) += setup-sh7206.o clock-sh7206.o | ||
diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7206.c b/arch/sh/kernel/cpu/sh2a/clock-sh7206.c new file mode 100644 index 000000000000..a9ad309c6a33 --- /dev/null +++ b/arch/sh/kernel/cpu/sh2a/clock-sh7206.c | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh2a/clock-sh7206.c | ||
3 | * | ||
4 | * SH7206 support for the clock framework | ||
5 | * | ||
6 | * Copyright (C) 2006 Yoshinori Sato | ||
7 | * | ||
8 | * Based on clock-sh4.c | ||
9 | * Copyright (C) 2005 Paul Mundt | ||
10 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | ||
12 | * License. See the file "COPYING" in the main directory of this archive | ||
13 | * for more details. | ||
14 | */ | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <asm/clock.h> | ||
18 | #include <asm/freq.h> | ||
19 | #include <asm/io.h> | ||
20 | |||
21 | const static int pll1rate[]={1,2,3,4,6,8}; | ||
22 | const static int pfc_divisors[]={1,2,3,4,6,8,12}; | ||
23 | #define ifc_divisors pfc_divisors | ||
24 | |||
25 | #if (CONFIG_SH_CLK_MD == 2) | ||
26 | #define PLL2 (4) | ||
27 | #elif (CONFIG_SH_CLK_MD == 6) | ||
28 | #define PLL2 (2) | ||
29 | #elif (CONFIG_SH_CLK_MD == 7) | ||
30 | #define PLL2 (1) | ||
31 | #else | ||
32 | #error "Illigal Clock Mode!" | ||
33 | #endif | ||
34 | |||
35 | static void master_clk_init(struct clk *clk) | ||
36 | { | ||
37 | clk->rate *= PLL2 * pll1rate[(ctrl_inw(FREQCR) >> 8) & 0x0007]; | ||
38 | } | ||
39 | |||
40 | static struct clk_ops sh7206_master_clk_ops = { | ||
41 | .init = master_clk_init, | ||
42 | }; | ||
43 | |||
44 | static void module_clk_recalc(struct clk *clk) | ||
45 | { | ||
46 | int idx = (ctrl_inw(FREQCR) & 0x0007); | ||
47 | clk->rate = clk->parent->rate / pfc_divisors[idx]; | ||
48 | } | ||
49 | |||
50 | static struct clk_ops sh7206_module_clk_ops = { | ||
51 | .recalc = module_clk_recalc, | ||
52 | }; | ||
53 | |||
54 | static void bus_clk_recalc(struct clk *clk) | ||
55 | { | ||
56 | clk->rate = clk->parent->rate / pll1rate[(ctrl_inw(FREQCR) >> 8) & 0x0007]; | ||
57 | } | ||
58 | |||
59 | static struct clk_ops sh7206_bus_clk_ops = { | ||
60 | .recalc = bus_clk_recalc, | ||
61 | }; | ||
62 | |||
63 | static void cpu_clk_recalc(struct clk *clk) | ||
64 | { | ||
65 | int idx = (ctrl_inw(FREQCR) & 0x0007); | ||
66 | clk->rate = clk->parent->rate / ifc_divisors[idx]; | ||
67 | } | ||
68 | |||
69 | static struct clk_ops sh7206_cpu_clk_ops = { | ||
70 | .recalc = cpu_clk_recalc, | ||
71 | }; | ||
72 | |||
73 | static struct clk_ops *sh7206_clk_ops[] = { | ||
74 | &sh7206_master_clk_ops, | ||
75 | &sh7206_module_clk_ops, | ||
76 | &sh7206_bus_clk_ops, | ||
77 | &sh7206_cpu_clk_ops, | ||
78 | }; | ||
79 | |||
80 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | ||
81 | { | ||
82 | if (idx < ARRAY_SIZE(sh7206_clk_ops)) | ||
83 | *ops = sh7206_clk_ops[idx]; | ||
84 | } | ||
85 | |||
diff --git a/arch/sh/kernel/cpu/sh2a/probe.c b/arch/sh/kernel/cpu/sh2a/probe.c new file mode 100644 index 000000000000..87c6c0542089 --- /dev/null +++ b/arch/sh/kernel/cpu/sh2a/probe.c | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh2a/probe.c | ||
3 | * | ||
4 | * CPU Subtype Probing for SH-2A. | ||
5 | * | ||
6 | * Copyright (C) 2004, 2005 Paul Mundt | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <asm/processor.h> | ||
15 | #include <asm/cache.h> | ||
16 | |||
17 | int __init detect_cpu_and_cache_system(void) | ||
18 | { | ||
19 | /* Just SH7206 for now .. */ | ||
20 | cpu_data->type = CPU_SH7206; | ||
21 | |||
22 | cpu_data->dcache.ways = 4; | ||
23 | cpu_data->dcache.way_incr = (1 << 11); | ||
24 | cpu_data->dcache.sets = 128; | ||
25 | cpu_data->dcache.entry_shift = 4; | ||
26 | cpu_data->dcache.linesz = L1_CACHE_BYTES; | ||
27 | cpu_data->dcache.flags = 0; | ||
28 | |||
29 | /* | ||
30 | * The icache is the same as the dcache as far as this setup is | ||
31 | * concerned. The only real difference in hardware is that the icache | ||
32 | * lacks the U bit that the dcache has, none of this has any bearing | ||
33 | * on the cache info. | ||
34 | */ | ||
35 | cpu_data->icache = cpu_data->dcache; | ||
36 | |||
37 | return 0; | ||
38 | } | ||
39 | |||
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c new file mode 100644 index 000000000000..4b60fcc7d667 --- /dev/null +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | * SH7206 Setup | ||
3 | * | ||
4 | * Copyright (C) 2006 Yoshinori Sato | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/serial.h> | ||
13 | #include <asm/sci.h> | ||
14 | |||
15 | static struct plat_sci_port sci_platform_data[] = { | ||
16 | { | ||
17 | .mapbase = 0xfffe8000, | ||
18 | .flags = UPF_BOOT_AUTOCONF, | ||
19 | .type = PORT_SCIF, | ||
20 | .irqs = { 241, 242, 243, 240}, | ||
21 | }, { | ||
22 | .mapbase = 0xfffe8800, | ||
23 | .flags = UPF_BOOT_AUTOCONF, | ||
24 | .type = PORT_SCIF, | ||
25 | .irqs = { 247, 244, 245, 246}, | ||
26 | }, { | ||
27 | .mapbase = 0xfffe9000, | ||
28 | .flags = UPF_BOOT_AUTOCONF, | ||
29 | .type = PORT_SCIF, | ||
30 | .irqs = { 249, 250, 251, 248}, | ||
31 | }, { | ||
32 | .mapbase = 0xfffe9800, | ||
33 | .flags = UPF_BOOT_AUTOCONF, | ||
34 | .type = PORT_SCIF, | ||
35 | .irqs = { 253, 254, 255, 252}, | ||
36 | }, { | ||
37 | .flags = 0, | ||
38 | } | ||
39 | }; | ||
40 | |||
41 | static struct platform_device sci_device = { | ||
42 | .name = "sh-sci", | ||
43 | .id = -1, | ||
44 | .dev = { | ||
45 | .platform_data = sci_platform_data, | ||
46 | }, | ||
47 | }; | ||
48 | |||
49 | static struct platform_device *sh7206_devices[] __initdata = { | ||
50 | &sci_device, | ||
51 | }; | ||
52 | |||
53 | static int __init sh7206_devices_setup(void) | ||
54 | { | ||
55 | return platform_add_devices(sh7206_devices, | ||
56 | ARRAY_SIZE(sh7206_devices)); | ||
57 | } | ||
58 | __initcall(sh7206_devices_setup); | ||
59 | |||
60 | #define INTC_IPR08 0xfffe0c04UL | ||
61 | #define INTC_IPR09 0xfffe0c06UL | ||
62 | #define INTC_IPR14 0xfffe0c10UL | ||
63 | |||
64 | #define CMI0_IRQ 140 | ||
65 | |||
66 | #define MTU1_TGI1A 164 | ||
67 | |||
68 | #define SCIF0_BRI_IRQ 240 | ||
69 | #define SCIF0_ERI_IRQ 241 | ||
70 | #define SCIF0_RXI_IRQ 242 | ||
71 | #define SCIF0_TXI_IRQ 243 | ||
72 | |||
73 | #define SCIF1_BRI_IRQ 244 | ||
74 | #define SCIF1_ERI_IRQ 245 | ||
75 | #define SCIF1_RXI_IRQ 246 | ||
76 | #define SCIF1_TXI_IRQ 247 | ||
77 | |||
78 | #define SCIF2_BRI_IRQ 248 | ||
79 | #define SCIF2_ERI_IRQ 249 | ||
80 | #define SCIF2_RXI_IRQ 250 | ||
81 | #define SCIF2_TXI_IRQ 251 | ||
82 | |||
83 | #define SCIF3_BRI_IRQ 252 | ||
84 | #define SCIF3_ERI_IRQ 253 | ||
85 | #define SCIF3_RXI_IRQ 254 | ||
86 | #define SCIF3_TXI_IRQ 255 | ||
87 | |||
88 | static struct ipr_data sh7206_ipr_map[] = { | ||
89 | { CMI0_IRQ, INTC_IPR08, 3, 2 }, | ||
90 | { MTU2_TGI1A, INTC_IPR09, 1, 2 }, | ||
91 | { SCIF0_ERI_IRQ, INTC_IPR14, 3, 3 }, | ||
92 | { SCIF0_RXI_IRQ, INTC_IPR14, 3, 3 }, | ||
93 | { SCIF0_BRI_IRQ, INTC_IPR14, 3, 3 }, | ||
94 | { SCIF0_TXI_IRQ, INTC_IPR14, 3, 3 }, | ||
95 | { SCIF1_ERI_IRQ, INTC_IPR14, 2, 3 }, | ||
96 | { SCIF1_RXI_IRQ, INTC_IPR14, 2, 3 }, | ||
97 | { SCIF1_BRI_IRQ, INTC_IPR14, 2, 3 }, | ||
98 | { SCIF1_TXI_IRQ, INTC_IPR14, 2, 3 }, | ||
99 | { SCIF2_ERI_IRQ, INTC_IPR14, 1, 3 }, | ||
100 | { SCIF2_RXI_IRQ, INTC_IPR14, 1, 3 }, | ||
101 | { SCIF2_BRI_IRQ, INTC_IPR14, 1, 3 }, | ||
102 | { SCIF2_TXI_IRQ, INTC_IPR14, 1, 3 }, | ||
103 | { SCIF3_ERI_IRQ, INTC_IPR14, 0, 3 }, | ||
104 | { SCIF3_RXI_IRQ, INTC_IPR14, 0, 3 }, | ||
105 | { SCIF3_BRI_IRQ, INTC_IPR14, 0, 3 }, | ||
106 | { SCIF3_TXI_IRQ, INTC_IPR14, 0, 3 }, | ||
107 | }; | ||
108 | |||
109 | void __init init_IRQ_ipr(void) | ||
110 | { | ||
111 | make_ipr_irq(sh7206_ipr_map, ARRAY_SIZE(sh7206_ipr_map)); | ||
112 | } | ||
diff --git a/arch/sh/kernel/cpu/sh3/Makefile b/arch/sh/kernel/cpu/sh3/Makefile index 58d3815695ff..83905e4e4387 100644 --- a/arch/sh/kernel/cpu/sh3/Makefile +++ b/arch/sh/kernel/cpu/sh3/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the Linux/SuperH SH-3 backends. | 2 | # Makefile for the Linux/SuperH SH-3 backends. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := ex.o probe.o | 5 | obj-y := ex.o probe.o entry.o |
6 | 6 | ||
7 | # CPU subtype setup | 7 | # CPU subtype setup |
8 | obj-$(CONFIG_CPU_SUBTYPE_SH7705) += setup-sh7705.o | 8 | obj-$(CONFIG_CPU_SUBTYPE_SH7705) += setup-sh7705.o |
diff --git a/arch/sh/kernel/cpu/sh3/clock-sh7709.c b/arch/sh/kernel/cpu/sh3/clock-sh7709.c index 10461a745e5f..b791a29fdb62 100644 --- a/arch/sh/kernel/cpu/sh3/clock-sh7709.c +++ b/arch/sh/kernel/cpu/sh3/clock-sh7709.c | |||
@@ -24,7 +24,7 @@ static int pfc_divisors[] = { 1, 2, 4, 1, 3, 6, 1, 1 }; | |||
24 | 24 | ||
25 | static void set_bus_parent(struct clk *clk) | 25 | static void set_bus_parent(struct clk *clk) |
26 | { | 26 | { |
27 | struct clk *bus_clk = clk_get("bus_clk"); | 27 | struct clk *bus_clk = clk_get(NULL, "bus_clk"); |
28 | clk->parent = bus_clk; | 28 | clk->parent = bus_clk; |
29 | clk_put(bus_clk); | 29 | clk_put(bus_clk); |
30 | } | 30 | } |
diff --git a/arch/sh/kernel/entry.S b/arch/sh/kernel/cpu/sh3/entry.S index 39aaefb2d83f..8c0dc2700c69 100644 --- a/arch/sh/kernel/entry.S +++ b/arch/sh/kernel/cpu/sh3/entry.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/arch/sh/entry.S | 2 | * arch/sh/kernel/entry.S |
3 | * | 3 | * |
4 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka | 4 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka |
5 | * Copyright (C) 2003 - 2006 Paul Mundt | 5 | * Copyright (C) 2003 - 2006 Paul Mundt |
@@ -7,15 +7,16 @@ | |||
7 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * This file is subject to the terms and conditions of the GNU General Public |
8 | * License. See the file "COPYING" in the main directory of this archive | 8 | * License. See the file "COPYING" in the main directory of this archive |
9 | * for more details. | 9 | * for more details. |
10 | * | ||
11 | */ | 10 | */ |
12 | #include <linux/sys.h> | 11 | #include <linux/sys.h> |
13 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
14 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
15 | #include <asm/asm-offsets.h> | 14 | #include <asm/asm-offsets.h> |
16 | #include <asm/thread_info.h> | 15 | #include <asm/thread_info.h> |
17 | #include <asm/cpu/mmu_context.h> | ||
18 | #include <asm/unistd.h> | 16 | #include <asm/unistd.h> |
17 | #include <asm/cpu/mmu_context.h> | ||
18 | #include <asm/pgtable.h> | ||
19 | #include <asm/page.h> | ||
19 | 20 | ||
20 | ! NOTE: | 21 | ! NOTE: |
21 | ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address | 22 | ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address |
@@ -81,6 +82,8 @@ OFF_TRA = (16*4+6*4) | |||
81 | #define k_g_imask r6_bank /* r6_bank1 */ | 82 | #define k_g_imask r6_bank /* r6_bank1 */ |
82 | #define current r7 /* r7_bank1 */ | 83 | #define current r7 /* r7_bank1 */ |
83 | 84 | ||
85 | #include <asm/entry-macros.S> | ||
86 | |||
84 | /* | 87 | /* |
85 | * Kernel mode register usage: | 88 | * Kernel mode register usage: |
86 | * k0 scratch | 89 | * k0 scratch |
@@ -107,26 +110,6 @@ OFF_TRA = (16*4+6*4) | |||
107 | ! this first version depends *much* on C implementation. | 110 | ! this first version depends *much* on C implementation. |
108 | ! | 111 | ! |
109 | 112 | ||
110 | #define CLI() \ | ||
111 | stc sr, r0; \ | ||
112 | or #0xf0, r0; \ | ||
113 | ldc r0, sr | ||
114 | |||
115 | #define STI() \ | ||
116 | mov.l __INV_IMASK, r11; \ | ||
117 | stc sr, r10; \ | ||
118 | and r11, r10; \ | ||
119 | stc k_g_imask, r11; \ | ||
120 | or r11, r10; \ | ||
121 | ldc r10, sr | ||
122 | |||
123 | #if defined(CONFIG_PREEMPT) | ||
124 | # define preempt_stop() CLI() | ||
125 | #else | ||
126 | # define preempt_stop() | ||
127 | # define resume_kernel restore_all | ||
128 | #endif | ||
129 | |||
130 | #if defined(CONFIG_MMU) | 113 | #if defined(CONFIG_MMU) |
131 | .align 2 | 114 | .align 2 |
132 | ENTRY(tlb_miss_load) | 115 | ENTRY(tlb_miss_load) |
@@ -155,29 +138,14 @@ ENTRY(tlb_protection_violation_store) | |||
155 | 138 | ||
156 | call_dpf: | 139 | call_dpf: |
157 | mov.l 1f, r0 | 140 | mov.l 1f, r0 |
158 | mov r5, r8 | 141 | mov.l @r0, r6 ! address |
159 | mov.l @r0, r6 | ||
160 | mov r6, r9 | ||
161 | mov.l 2f, r0 | ||
162 | sts pr, r10 | ||
163 | jsr @r0 | ||
164 | mov r15, r4 | ||
165 | ! | ||
166 | tst r0, r0 | ||
167 | bf/s 0f | ||
168 | lds r10, pr | ||
169 | rts | ||
170 | nop | ||
171 | 0: STI() | ||
172 | mov.l 3f, r0 | 142 | mov.l 3f, r0 |
173 | mov r9, r6 | 143 | |
174 | mov r8, r5 | ||
175 | jmp @r0 | 144 | jmp @r0 |
176 | mov r15, r4 | 145 | mov r15, r4 ! regs |
177 | 146 | ||
178 | .align 2 | 147 | .align 2 |
179 | 1: .long MMU_TEA | 148 | 1: .long MMU_TEA |
180 | 2: .long __do_page_fault | ||
181 | 3: .long do_page_fault | 149 | 3: .long do_page_fault |
182 | 150 | ||
183 | .align 2 | 151 | .align 2 |
@@ -203,32 +171,6 @@ call_dae: | |||
203 | 2: .long do_address_error | 171 | 2: .long do_address_error |
204 | #endif /* CONFIG_MMU */ | 172 | #endif /* CONFIG_MMU */ |
205 | 173 | ||
206 | #if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) | ||
207 | ! Handle kernel debug if either kgdb (SW) or gdb-stub (FW) is present. | ||
208 | ! If both are configured, handle the debug traps (breakpoints) in SW, | ||
209 | ! but still allow BIOS traps to FW. | ||
210 | |||
211 | .align 2 | ||
212 | debug_kernel: | ||
213 | #if defined(CONFIG_SH_STANDARD_BIOS) && defined(CONFIG_SH_KGDB) | ||
214 | /* Force BIOS call to FW (debug_trap put TRA in r8) */ | ||
215 | mov r8,r0 | ||
216 | shlr2 r0 | ||
217 | cmp/eq #0x3f,r0 | ||
218 | bt debug_kernel_fw | ||
219 | #endif /* CONFIG_SH_STANDARD_BIOS && CONFIG_SH_KGDB */ | ||
220 | |||
221 | debug_enter: | ||
222 | #if defined(CONFIG_SH_KGDB) | ||
223 | /* Jump to kgdb, pass stacked regs as arg */ | ||
224 | debug_kernel_sw: | ||
225 | mov.l 3f, r0 | ||
226 | jmp @r0 | ||
227 | mov r15, r4 | ||
228 | .align 2 | ||
229 | 3: .long kgdb_handle_exception | ||
230 | #endif /* CONFIG_SH_KGDB */ | ||
231 | |||
232 | #if defined(CONFIG_SH_STANDARD_BIOS) | 174 | #if defined(CONFIG_SH_STANDARD_BIOS) |
233 | /* Unwind the stack and jmp to the debug entry */ | 175 | /* Unwind the stack and jmp to the debug entry */ |
234 | debug_kernel_fw: | 176 | debug_kernel_fw: |
@@ -269,276 +211,6 @@ debug_kernel_fw: | |||
269 | 2: .long gdb_vbr_vector | 211 | 2: .long gdb_vbr_vector |
270 | #endif /* CONFIG_SH_STANDARD_BIOS */ | 212 | #endif /* CONFIG_SH_STANDARD_BIOS */ |
271 | 213 | ||
272 | #endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */ | ||
273 | |||
274 | |||
275 | .align 2 | ||
276 | debug_trap: | ||
277 | #if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) | ||
278 | mov #OFF_SR, r0 | ||
279 | mov.l @(r0,r15), r0 ! get status register | ||
280 | shll r0 | ||
281 | shll r0 ! kernel space? | ||
282 | bt/s debug_kernel | ||
283 | #endif | ||
284 | mov.l @r15, r0 ! Restore R0 value | ||
285 | mov.l 1f, r8 | ||
286 | jmp @r8 | ||
287 | nop | ||
288 | |||
289 | .align 2 | ||
290 | ENTRY(exception_error) | ||
291 | ! | ||
292 | STI() | ||
293 | mov.l 2f, r0 | ||
294 | jmp @r0 | ||
295 | nop | ||
296 | |||
297 | ! | ||
298 | .align 2 | ||
299 | 1: .long break_point_trap_software | ||
300 | 2: .long do_exception_error | ||
301 | |||
302 | .align 2 | ||
303 | ret_from_exception: | ||
304 | preempt_stop() | ||
305 | ENTRY(ret_from_irq) | ||
306 | ! | ||
307 | mov #OFF_SR, r0 | ||
308 | mov.l @(r0,r15), r0 ! get status register | ||
309 | shll r0 | ||
310 | shll r0 ! kernel space? | ||
311 | bt/s resume_kernel ! Yes, it's from kernel, go back soon | ||
312 | GET_THREAD_INFO(r8) | ||
313 | |||
314 | #ifdef CONFIG_PREEMPT | ||
315 | bra resume_userspace | ||
316 | nop | ||
317 | ENTRY(resume_kernel) | ||
318 | mov.l @(TI_PRE_COUNT,r8), r0 ! current_thread_info->preempt_count | ||
319 | tst r0, r0 | ||
320 | bf noresched | ||
321 | need_resched: | ||
322 | mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags | ||
323 | tst #_TIF_NEED_RESCHED, r0 ! need_resched set? | ||
324 | bt noresched | ||
325 | |||
326 | mov #OFF_SR, r0 | ||
327 | mov.l @(r0,r15), r0 ! get status register | ||
328 | and #0xf0, r0 ! interrupts off (exception path)? | ||
329 | cmp/eq #0xf0, r0 | ||
330 | bt noresched | ||
331 | |||
332 | mov.l 1f, r0 | ||
333 | mov.l r0, @(TI_PRE_COUNT,r8) | ||
334 | |||
335 | STI() | ||
336 | mov.l 2f, r0 | ||
337 | jsr @r0 | ||
338 | nop | ||
339 | mov #0, r0 | ||
340 | mov.l r0, @(TI_PRE_COUNT,r8) | ||
341 | CLI() | ||
342 | |||
343 | bra need_resched | ||
344 | nop | ||
345 | noresched: | ||
346 | bra restore_all | ||
347 | nop | ||
348 | |||
349 | .align 2 | ||
350 | 1: .long PREEMPT_ACTIVE | ||
351 | 2: .long schedule | ||
352 | #endif | ||
353 | |||
354 | ENTRY(resume_userspace) | ||
355 | ! r8: current_thread_info | ||
356 | CLI() | ||
357 | mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags | ||
358 | tst #_TIF_WORK_MASK, r0 | ||
359 | bt/s restore_all | ||
360 | tst #_TIF_NEED_RESCHED, r0 | ||
361 | |||
362 | .align 2 | ||
363 | work_pending: | ||
364 | ! r0: current_thread_info->flags | ||
365 | ! r8: current_thread_info | ||
366 | ! t: result of "tst #_TIF_NEED_RESCHED, r0" | ||
367 | bf/s work_resched | ||
368 | tst #(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), r0 | ||
369 | work_notifysig: | ||
370 | bt/s restore_all | ||
371 | mov r15, r4 | ||
372 | mov r12, r5 ! set arg1(save_r0) | ||
373 | mov r0, r6 | ||
374 | mov.l 2f, r1 | ||
375 | mova restore_all, r0 | ||
376 | jmp @r1 | ||
377 | lds r0, pr | ||
378 | work_resched: | ||
379 | #ifndef CONFIG_PREEMPT | ||
380 | ! gUSA handling | ||
381 | mov.l @(OFF_SP,r15), r0 ! get user space stack pointer | ||
382 | mov r0, r1 | ||
383 | shll r0 | ||
384 | bf/s 1f | ||
385 | shll r0 | ||
386 | bf/s 1f | ||
387 | mov #OFF_PC, r0 | ||
388 | ! SP >= 0xc0000000 : gUSA mark | ||
389 | mov.l @(r0,r15), r2 ! get user space PC (program counter) | ||
390 | mov.l @(OFF_R0,r15), r3 ! end point | ||
391 | cmp/hs r3, r2 ! r2 >= r3? | ||
392 | bt 1f | ||
393 | add r3, r1 ! rewind point #2 | ||
394 | mov.l r1, @(r0,r15) ! reset PC to rewind point #2 | ||
395 | ! | ||
396 | 1: | ||
397 | #endif | ||
398 | mov.l 1f, r1 | ||
399 | jsr @r1 ! schedule | ||
400 | nop | ||
401 | CLI() | ||
402 | ! | ||
403 | mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags | ||
404 | tst #_TIF_WORK_MASK, r0 | ||
405 | bt restore_all | ||
406 | bra work_pending | ||
407 | tst #_TIF_NEED_RESCHED, r0 | ||
408 | |||
409 | .align 2 | ||
410 | 1: .long schedule | ||
411 | 2: .long do_notify_resume | ||
412 | |||
413 | .align 2 | ||
414 | syscall_exit_work: | ||
415 | ! r0: current_thread_info->flags | ||
416 | ! r8: current_thread_info | ||
417 | tst #_TIF_SYSCALL_TRACE, r0 | ||
418 | bt/s work_pending | ||
419 | tst #_TIF_NEED_RESCHED, r0 | ||
420 | STI() | ||
421 | ! XXX setup arguments... | ||
422 | mov.l 4f, r0 ! do_syscall_trace | ||
423 | jsr @r0 | ||
424 | nop | ||
425 | bra resume_userspace | ||
426 | nop | ||
427 | |||
428 | .align 2 | ||
429 | syscall_trace_entry: | ||
430 | ! Yes it is traced. | ||
431 | ! XXX setup arguments... | ||
432 | mov.l 4f, r11 ! Call do_syscall_trace which notifies | ||
433 | jsr @r11 ! superior (will chomp R[0-7]) | ||
434 | nop | ||
435 | ! Reload R0-R4 from kernel stack, where the | ||
436 | ! parent may have modified them using | ||
437 | ! ptrace(POKEUSR). (Note that R0-R2 are | ||
438 | ! used by the system call handler directly | ||
439 | ! from the kernel stack anyway, so don't need | ||
440 | ! to be reloaded here.) This allows the parent | ||
441 | ! to rewrite system calls and args on the fly. | ||
442 | mov.l @(OFF_R4,r15), r4 ! arg0 | ||
443 | mov.l @(OFF_R5,r15), r5 | ||
444 | mov.l @(OFF_R6,r15), r6 | ||
445 | mov.l @(OFF_R7,r15), r7 ! arg3 | ||
446 | mov.l @(OFF_R3,r15), r3 ! syscall_nr | ||
447 | ! Arrange for do_syscall_trace to be called | ||
448 | ! again as the system call returns. | ||
449 | mov.l 2f, r10 ! Number of syscalls | ||
450 | cmp/hs r10, r3 | ||
451 | bf syscall_call | ||
452 | mov #-ENOSYS, r0 | ||
453 | bra syscall_exit | ||
454 | mov.l r0, @(OFF_R0,r15) ! Return value | ||
455 | |||
456 | /* | ||
457 | * Syscall interface: | ||
458 | * | ||
459 | * Syscall #: R3 | ||
460 | * Arguments #0 to #3: R4--R7 | ||
461 | * Arguments #4 to #6: R0, R1, R2 | ||
462 | * TRA: (number of arguments + 0x10) x 4 | ||
463 | * | ||
464 | * This code also handles delegating other traps to the BIOS/gdb stub | ||
465 | * according to: | ||
466 | * | ||
467 | * Trap number | ||
468 | * (TRA>>2) Purpose | ||
469 | * -------- ------- | ||
470 | * 0x0-0xf old syscall ABI | ||
471 | * 0x10-0x1f new syscall ABI | ||
472 | * 0x20-0xff delegated through debug_trap to BIOS/gdb stub. | ||
473 | * | ||
474 | * Note: When we're first called, the TRA value must be shifted | ||
475 | * right 2 bits in order to get the value that was used as the "trapa" | ||
476 | * argument. | ||
477 | */ | ||
478 | |||
479 | .align 2 | ||
480 | .globl ret_from_fork | ||
481 | ret_from_fork: | ||
482 | mov.l 1f, r8 | ||
483 | jsr @r8 | ||
484 | mov r0, r4 | ||
485 | bra syscall_exit | ||
486 | nop | ||
487 | .align 2 | ||
488 | 1: .long schedule_tail | ||
489 | ! | ||
490 | ENTRY(system_call) | ||
491 | mov.l 1f, r9 | ||
492 | mov.l @r9, r8 ! Read from TRA (Trap Address) Register | ||
493 | ! | ||
494 | ! Is the trap argument >= 0x20? (TRA will be >= 0x80) | ||
495 | mov #0x7f, r9 | ||
496 | cmp/hi r9, r8 | ||
497 | bt/s 0f | ||
498 | mov #OFF_TRA, r9 | ||
499 | add r15, r9 | ||
500 | ! | ||
501 | mov.l r8, @r9 ! set TRA value to tra | ||
502 | STI() | ||
503 | ! Call the system call handler through the table. | ||
504 | ! First check for bad syscall number | ||
505 | mov r3, r9 | ||
506 | mov.l 2f, r8 ! Number of syscalls | ||
507 | cmp/hs r8, r9 | ||
508 | bf/s good_system_call | ||
509 | GET_THREAD_INFO(r8) | ||
510 | syscall_badsys: ! Bad syscall number | ||
511 | mov #-ENOSYS, r0 | ||
512 | bra resume_userspace | ||
513 | mov.l r0, @(OFF_R0,r15) ! Return value | ||
514 | ! | ||
515 | 0: | ||
516 | bra debug_trap | ||
517 | nop | ||
518 | ! | ||
519 | good_system_call: ! Good syscall number | ||
520 | mov.l @(TI_FLAGS,r8), r8 | ||
521 | mov #_TIF_SYSCALL_TRACE, r10 | ||
522 | tst r10, r8 | ||
523 | bf syscall_trace_entry | ||
524 | ! | ||
525 | syscall_call: | ||
526 | shll2 r9 ! x4 | ||
527 | mov.l 3f, r8 ! Load the address of sys_call_table | ||
528 | add r8, r9 | ||
529 | mov.l @r9, r8 | ||
530 | jsr @r8 ! jump to specific syscall handler | ||
531 | nop | ||
532 | mov.l @(OFF_R0,r15), r12 ! save r0 | ||
533 | mov.l r0, @(OFF_R0,r15) ! save the return value | ||
534 | ! | ||
535 | syscall_exit: | ||
536 | CLI() | ||
537 | ! | ||
538 | GET_THREAD_INFO(r8) | ||
539 | mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags | ||
540 | tst #_TIF_ALLWORK_MASK, r0 | ||
541 | bf syscall_exit_work | ||
542 | restore_all: | 214 | restore_all: |
543 | mov.l @r15+, r0 | 215 | mov.l @r15+, r0 |
544 | mov.l @r15+, r1 | 216 | mov.l @r15+, r1 |
@@ -606,7 +278,9 @@ skip_restore: | |||
606 | ! | 278 | ! |
607 | ! Calculate new SR value | 279 | ! Calculate new SR value |
608 | mov k3, k2 ! original SR value | 280 | mov k3, k2 ! original SR value |
609 | mov.l 9f, k1 | 281 | mov #0xf0, k1 |
282 | extu.b k1, k1 | ||
283 | not k1, k1 | ||
610 | and k1, k2 ! Mask orignal SR value | 284 | and k1, k2 ! Mask orignal SR value |
611 | ! | 285 | ! |
612 | mov k3, k0 ! Calculate IMASK-bits | 286 | mov k3, k0 ! Calculate IMASK-bits |
@@ -632,16 +306,12 @@ skip_restore: | |||
632 | nop | 306 | nop |
633 | 307 | ||
634 | .align 2 | 308 | .align 2 |
635 | 1: .long TRA | ||
636 | 2: .long NR_syscalls | ||
637 | 3: .long sys_call_table | ||
638 | 4: .long do_syscall_trace | ||
639 | 5: .long 0x00001000 ! DSP | 309 | 5: .long 0x00001000 ! DSP |
640 | 7: .long 0x30000000 | 310 | 7: .long 0x30000000 |
641 | 9: | ||
642 | __INV_IMASK: | ||
643 | .long 0xffffff0f ! ~(IMASK) | ||
644 | 311 | ||
312 | ! common exception handler | ||
313 | #include "../../entry-common.S" | ||
314 | |||
645 | ! Exception Vector Base | 315 | ! Exception Vector Base |
646 | ! | 316 | ! |
647 | ! Should be aligned page boundary. | 317 | ! Should be aligned page boundary. |
@@ -661,9 +331,176 @@ general_exception: | |||
661 | 2: .long ret_from_exception | 331 | 2: .long ret_from_exception |
662 | ! | 332 | ! |
663 | ! | 333 | ! |
334 | |||
335 | /* This code makes some assumptions to improve performance. | ||
336 | * Make sure they are stil true. */ | ||
337 | #if PTRS_PER_PGD != PTRS_PER_PTE | ||
338 | #error PGD and PTE sizes don't match | ||
339 | #endif | ||
340 | |||
341 | /* gas doesn't flag impossible values for mov #immediate as an error */ | ||
342 | #if (_PAGE_PRESENT >> 2) > 0x7f | ||
343 | #error cannot load PAGE_PRESENT as an immediate | ||
344 | #endif | ||
345 | #if _PAGE_DIRTY > 0x7f | ||
346 | #error cannot load PAGE_DIRTY as an immediate | ||
347 | #endif | ||
348 | #if (_PAGE_PRESENT << 2) != _PAGE_ACCESSED | ||
349 | #error cannot derive PAGE_ACCESSED from PAGE_PRESENT | ||
350 | #endif | ||
351 | |||
352 | #if defined(CONFIG_CPU_SH4) | ||
353 | #define ldmmupteh(r) mov.l 8f, r | ||
354 | #else | ||
355 | #define ldmmupteh(r) mov #MMU_PTEH, r | ||
356 | #endif | ||
357 | |||
664 | .balign 1024,0,1024 | 358 | .balign 1024,0,1024 |
665 | tlb_miss: | 359 | tlb_miss: |
666 | mov.l 1f, k2 | 360 | #ifdef COUNT_EXCEPTIONS |
361 | ! Increment the counts | ||
362 | mov.l 9f, k1 | ||
363 | mov.l @k1, k2 | ||
364 | add #1, k2 | ||
365 | mov.l k2, @k1 | ||
366 | #endif | ||
367 | |||
368 | ! k0 scratch | ||
369 | ! k1 pgd and pte pointers | ||
370 | ! k2 faulting address | ||
371 | ! k3 pgd and pte index masks | ||
372 | ! k4 shift | ||
373 | |||
374 | ! Load up the pgd entry (k1) | ||
375 | |||
376 | ldmmupteh(k0) ! 9 LS (latency=2) MMU_PTEH | ||
377 | |||
378 | mov.w 4f, k3 ! 8 LS (latency=2) (PTRS_PER_PGD-1) << 2 | ||
379 | mov #-(PGDIR_SHIFT-2), k4 ! 6 EX | ||
380 | |||
381 | mov.l @(MMU_TEA-MMU_PTEH,k0), k2 ! 18 LS (latency=2) | ||
382 | |||
383 | mov.l @(MMU_TTB-MMU_PTEH,k0), k1 ! 18 LS (latency=2) | ||
384 | |||
385 | mov k2, k0 ! 5 MT (latency=0) | ||
386 | shld k4, k0 ! 99 EX | ||
387 | |||
388 | and k3, k0 ! 78 EX | ||
389 | |||
390 | mov.l @(k0, k1), k1 ! 21 LS (latency=2) | ||
391 | mov #-(PAGE_SHIFT-2), k4 ! 6 EX | ||
392 | |||
393 | ! Load up the pte entry (k2) | ||
394 | |||
395 | mov k2, k0 ! 5 MT (latency=0) | ||
396 | shld k4, k0 ! 99 EX | ||
397 | |||
398 | tst k1, k1 ! 86 MT | ||
399 | |||
400 | bt 20f ! 110 BR | ||
401 | |||
402 | and k3, k0 ! 78 EX | ||
403 | mov.w 5f, k4 ! 8 LS (latency=2) _PAGE_PRESENT | ||
404 | |||
405 | mov.l @(k0, k1), k2 ! 21 LS (latency=2) | ||
406 | add k0, k1 ! 49 EX | ||
407 | |||
408 | #ifdef CONFIG_CPU_HAS_PTEA | ||
409 | ! Test the entry for present and _PAGE_ACCESSED | ||
410 | |||
411 | mov #-28, k3 ! 6 EX | ||
412 | mov k2, k0 ! 5 MT (latency=0) | ||
413 | |||
414 | tst k4, k2 ! 68 MT | ||
415 | shld k3, k0 ! 99 EX | ||
416 | |||
417 | bt 20f ! 110 BR | ||
418 | |||
419 | ! Set PTEA register | ||
420 | ! MMU_PTEA = ((pteval >> 28) & 0xe) | (pteval & 0x1) | ||
421 | ! | ||
422 | ! k0=pte>>28, k1=pte*, k2=pte, k3=<unused>, k4=_PAGE_PRESENT | ||
423 | |||
424 | and #0xe, k0 ! 79 EX | ||
425 | |||
426 | mov k0, k3 ! 5 MT (latency=0) | ||
427 | mov k2, k0 ! 5 MT (latency=0) | ||
428 | |||
429 | and #1, k0 ! 79 EX | ||
430 | |||
431 | or k0, k3 ! 82 EX | ||
432 | |||
433 | ldmmupteh(k0) ! 9 LS (latency=2) | ||
434 | shll2 k4 ! 101 EX _PAGE_ACCESSED | ||
435 | |||
436 | tst k4, k2 ! 68 MT | ||
437 | |||
438 | mov.l k3, @(MMU_PTEA-MMU_PTEH,k0) ! 27 LS | ||
439 | |||
440 | mov.l 7f, k3 ! 9 LS (latency=2) _PAGE_FLAGS_HARDWARE_MASK | ||
441 | |||
442 | ! k0=MMU_PTEH, k1=pte*, k2=pte, k3=_PAGE_FLAGS_HARDWARE, k4=_PAGE_ACCESSED | ||
443 | #else | ||
444 | |||
445 | ! Test the entry for present and _PAGE_ACCESSED | ||
446 | |||
447 | mov.l 7f, k3 ! 9 LS (latency=2) _PAGE_FLAGS_HARDWARE_MASK | ||
448 | tst k4, k2 ! 68 MT | ||
449 | |||
450 | shll2 k4 ! 101 EX _PAGE_ACCESSED | ||
451 | ldmmupteh(k0) ! 9 LS (latency=2) | ||
452 | |||
453 | bt 20f ! 110 BR | ||
454 | tst k4, k2 ! 68 MT | ||
455 | |||
456 | ! k0=MMU_PTEH, k1=pte*, k2=pte, k3=_PAGE_FLAGS_HARDWARE, k4=_PAGE_ACCESSED | ||
457 | |||
458 | #endif | ||
459 | |||
460 | ! Set up the entry | ||
461 | |||
462 | and k2, k3 ! 78 EX | ||
463 | bt/s 10f ! 108 BR | ||
464 | |||
465 | mov.l k3, @(MMU_PTEL-MMU_PTEH,k0) ! 27 LS | ||
466 | |||
467 | ldtlb ! 128 CO | ||
468 | |||
469 | ! At least one instruction between ldtlb and rte | ||
470 | nop ! 119 NOP | ||
471 | |||
472 | rte ! 126 CO | ||
473 | |||
474 | nop ! 119 NOP | ||
475 | |||
476 | |||
477 | 10: or k4, k2 ! 82 EX | ||
478 | |||
479 | ldtlb ! 128 CO | ||
480 | |||
481 | ! At least one instruction between ldtlb and rte | ||
482 | mov.l k2, @k1 ! 27 LS | ||
483 | |||
484 | rte ! 126 CO | ||
485 | |||
486 | ! Note we cannot execute mov here, because it is executed after | ||
487 | ! restoring SSR, so would be executed in user space. | ||
488 | nop ! 119 NOP | ||
489 | |||
490 | |||
491 | .align 5 | ||
492 | ! Once cache line if possible... | ||
493 | 1: .long swapper_pg_dir | ||
494 | 4: .short (PTRS_PER_PGD-1) << 2 | ||
495 | 5: .short _PAGE_PRESENT | ||
496 | 7: .long _PAGE_FLAGS_HARDWARE_MASK | ||
497 | 8: .long MMU_PTEH | ||
498 | #ifdef COUNT_EXCEPTIONS | ||
499 | 9: .long exception_count_miss | ||
500 | #endif | ||
501 | |||
502 | ! Either pgd or pte not present | ||
503 | 20: mov.l 1f, k2 | ||
667 | mov.l 4f, k3 | 504 | mov.l 4f, k3 |
668 | bra handle_exception | 505 | bra handle_exception |
669 | mov.l @k2, k2 | 506 | mov.l @k2, k2 |
@@ -710,8 +547,9 @@ ENTRY(handle_exception) | |||
710 | bt/s 1f ! It's a kernel to kernel transition. | 547 | bt/s 1f ! It's a kernel to kernel transition. |
711 | mov r15, k0 ! save original stack to k0 | 548 | mov r15, k0 ! save original stack to k0 |
712 | /* User space to kernel */ | 549 | /* User space to kernel */ |
713 | mov #(THREAD_SIZE >> 8), k1 | 550 | mov #(THREAD_SIZE >> 10), k1 |
714 | shll8 k1 ! k1 := THREAD_SIZE | 551 | shll8 k1 ! k1 := THREAD_SIZE |
552 | shll2 k1 | ||
715 | add current, k1 | 553 | add current, k1 |
716 | mov k1, r15 ! change to kernel stack | 554 | mov k1, r15 ! change to kernel stack |
717 | ! | 555 | ! |
@@ -761,7 +599,7 @@ skip_save: | |||
761 | ! Save the user registers on the stack. | 599 | ! Save the user registers on the stack. |
762 | mov.l k2, @-r15 ! EXPEVT | 600 | mov.l k2, @-r15 ! EXPEVT |
763 | 601 | ||
764 | mov #-1, k4 | 602 | mov #-1, k4 |
765 | mov.l k4, @-r15 ! set TRA (default: -1) | 603 | mov.l k4, @-r15 ! set TRA (default: -1) |
766 | ! | 604 | ! |
767 | sts.l macl, @-r15 | 605 | sts.l macl, @-r15 |
@@ -813,6 +651,15 @@ skip_save: | |||
813 | bf interrupt_exception | 651 | bf interrupt_exception |
814 | shlr2 r8 | 652 | shlr2 r8 |
815 | shlr r8 | 653 | shlr r8 |
654 | |||
655 | #ifdef COUNT_EXCEPTIONS | ||
656 | mov.l 5f, r9 | ||
657 | add r8, r9 | ||
658 | mov.l @r9, r10 | ||
659 | add #1, r10 | ||
660 | mov.l r10, @r9 | ||
661 | #endif | ||
662 | |||
816 | mov.l 4f, r9 | 663 | mov.l 4f, r9 |
817 | add r8, r9 | 664 | add r8, r9 |
818 | mov.l @r9, r9 | 665 | mov.l @r9, r9 |
@@ -826,6 +673,9 @@ skip_save: | |||
826 | 2: .long 0x000080f0 ! FD=1, IMASK=15 | 673 | 2: .long 0x000080f0 ! FD=1, IMASK=15 |
827 | 3: .long 0xcfffffff ! RB=0, BL=0 | 674 | 3: .long 0xcfffffff ! RB=0, BL=0 |
828 | 4: .long exception_handling_table | 675 | 4: .long exception_handling_table |
676 | #ifdef COUNT_EXCEPTIONS | ||
677 | 5: .long exception_count_table | ||
678 | #endif | ||
829 | 679 | ||
830 | interrupt_exception: | 680 | interrupt_exception: |
831 | mov.l 1f, r9 | 681 | mov.l 1f, r9 |
diff --git a/arch/sh/kernel/cpu/sh3/ex.S b/arch/sh/kernel/cpu/sh3/ex.S index 6be46f0686b7..ba3082d640b5 100644 --- a/arch/sh/kernel/cpu/sh3/ex.S +++ b/arch/sh/kernel/cpu/sh3/ex.S | |||
@@ -4,7 +4,7 @@ | |||
4 | * The SH-3 exception vector table. | 4 | * The SH-3 exception vector table. |
5 | 5 | ||
6 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka | 6 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka |
7 | * Copyright (C) 2003 Paul Mundt | 7 | * Copyright (C) 2003 - 2006 Paul Mundt |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General Public | 9 | * This file is subject to the terms and conditions of the GNU General Public |
10 | * License. See the file "COPYING" in the main directory of this archive | 10 | * License. See the file "COPYING" in the main directory of this archive |
@@ -49,3 +49,10 @@ ENTRY(nmi_slot) | |||
49 | #endif | 49 | #endif |
50 | ENTRY(user_break_point_trap) | 50 | ENTRY(user_break_point_trap) |
51 | .long break_point_trap /* 1E0 */ | 51 | .long break_point_trap /* 1E0 */ |
52 | |||
53 | /* | ||
54 | * Pad the remainder of the table out, exceptions residing in far | ||
55 | * away offsets can be manually inserted in to their appropriate | ||
56 | * location via set_exception_table_{evt,vec}(). | ||
57 | */ | ||
58 | .balign 4096,0,4096 | ||
diff --git a/arch/sh/kernel/cpu/sh4/Makefile b/arch/sh/kernel/cpu/sh4/Makefile index 8dbf3895ece7..19ca68c71884 100644 --- a/arch/sh/kernel/cpu/sh4/Makefile +++ b/arch/sh/kernel/cpu/sh4/Makefile | |||
@@ -2,7 +2,8 @@ | |||
2 | # Makefile for the Linux/SuperH SH-4 backends. | 2 | # Makefile for the Linux/SuperH SH-4 backends. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := ex.o probe.o | 5 | obj-y := ex.o probe.o common.o |
6 | common-y += $(addprefix ../sh3/, entry.o) | ||
6 | 7 | ||
7 | obj-$(CONFIG_SH_FPU) += fpu.o | 8 | obj-$(CONFIG_SH_FPU) += fpu.o |
8 | obj-$(CONFIG_SH_STORE_QUEUES) += sq.o | 9 | obj-$(CONFIG_SH_STORE_QUEUES) += sq.o |
@@ -11,17 +12,12 @@ obj-$(CONFIG_SH_STORE_QUEUES) += sq.o | |||
11 | obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o | 12 | obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o |
12 | obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o | 13 | obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o |
13 | obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o | 14 | obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o |
14 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o | ||
15 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o | ||
16 | obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o | ||
17 | obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o | ||
18 | obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o | 15 | obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o |
19 | 16 | ||
20 | # Primary on-chip clocks (common) | 17 | # Primary on-chip clocks (common) |
18 | ifndef CONFIG_CPU_SH4A | ||
21 | clock-$(CONFIG_CPU_SH4) := clock-sh4.o | 19 | clock-$(CONFIG_CPU_SH4) := clock-sh4.o |
22 | clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o | 20 | endif |
23 | clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o | ||
24 | clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o | ||
25 | 21 | ||
26 | # Additional clocks by subtype | 22 | # Additional clocks by subtype |
27 | clock-$(CONFIG_CPU_SUBTYPE_SH4_202) += clock-sh4-202.o | 23 | clock-$(CONFIG_CPU_SUBTYPE_SH4_202) += clock-sh4-202.o |
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c index bfdf5fe8d948..fa2019aabd74 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/clock-sh4-202.c | |||
@@ -97,7 +97,7 @@ static void shoc_clk_recalc(struct clk *clk) | |||
97 | 97 | ||
98 | static int shoc_clk_verify_rate(struct clk *clk, unsigned long rate) | 98 | static int shoc_clk_verify_rate(struct clk *clk, unsigned long rate) |
99 | { | 99 | { |
100 | struct clk *bclk = clk_get("bus_clk"); | 100 | struct clk *bclk = clk_get(NULL, "bus_clk"); |
101 | unsigned long bclk_rate = clk_get_rate(bclk); | 101 | unsigned long bclk_rate = clk_get_rate(bclk); |
102 | 102 | ||
103 | clk_put(bclk); | 103 | clk_put(bclk); |
@@ -151,7 +151,7 @@ static struct clk *sh4202_onchip_clocks[] = { | |||
151 | 151 | ||
152 | static int __init sh4202_clk_init(void) | 152 | static int __init sh4202_clk_init(void) |
153 | { | 153 | { |
154 | struct clk *clk = clk_get("master_clk"); | 154 | struct clk *clk = clk_get(NULL, "master_clk"); |
155 | int i; | 155 | int i; |
156 | 156 | ||
157 | for (i = 0; i < ARRAY_SIZE(sh4202_onchip_clocks); i++) { | 157 | for (i = 0; i < ARRAY_SIZE(sh4202_onchip_clocks); i++) { |
diff --git a/arch/sh/kernel/cpu/sh4/ex.S b/arch/sh/kernel/cpu/sh4/ex.S index 3f4cd043e900..ac8ab57413cc 100644 --- a/arch/sh/kernel/cpu/sh4/ex.S +++ b/arch/sh/kernel/cpu/sh4/ex.S | |||
@@ -4,7 +4,7 @@ | |||
4 | * The SH-4 exception vector table. | 4 | * The SH-4 exception vector table. |
5 | 5 | ||
6 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka | 6 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka |
7 | * Copyright (C) 2003 Paul Mundt | 7 | * Copyright (C) 2003 - 2006 Paul Mundt |
8 | * | 8 | * |
9 | * This file is subject to the terms and conditions of the GNU General Public | 9 | * This file is subject to the terms and conditions of the GNU General Public |
10 | * License. See the file "COPYING" in the main directory of this archive | 10 | * License. See the file "COPYING" in the main directory of this archive |
@@ -53,3 +53,10 @@ ENTRY(nmi_slot) | |||
53 | #endif | 53 | #endif |
54 | ENTRY(user_break_point_trap) | 54 | ENTRY(user_break_point_trap) |
55 | .long break_point_trap /* 1E0 */ | 55 | .long break_point_trap /* 1E0 */ |
56 | |||
57 | /* | ||
58 | * Pad the remainder of the table out, exceptions residing in far | ||
59 | * away offsets can be manually inserted in to their appropriate | ||
60 | * location via set_exception_table_{evt,vec}(). | ||
61 | */ | ||
62 | .balign 4096,0,4096 | ||
diff --git a/arch/sh/kernel/cpu/sh4/fpu.c b/arch/sh/kernel/cpu/sh4/fpu.c index f486c07e10e2..7624677f6628 100644 --- a/arch/sh/kernel/cpu/sh4/fpu.c +++ b/arch/sh/kernel/cpu/sh4/fpu.c | |||
@@ -282,11 +282,8 @@ ieee_fpe_handler (struct pt_regs *regs) | |||
282 | grab_fpu(regs); | 282 | grab_fpu(regs); |
283 | restore_fpu(tsk); | 283 | restore_fpu(tsk); |
284 | set_tsk_thread_flag(tsk, TIF_USEDFPU); | 284 | set_tsk_thread_flag(tsk, TIF_USEDFPU); |
285 | } else { | 285 | } else |
286 | tsk->thread.trap_no = 11; | ||
287 | tsk->thread.error_code = 0; | ||
288 | force_sig(SIGFPE, tsk); | 286 | force_sig(SIGFPE, tsk); |
289 | } | ||
290 | 287 | ||
291 | regs->pc = nextpc; | 288 | regs->pc = nextpc; |
292 | return 1; | 289 | return 1; |
@@ -296,29 +293,29 @@ ieee_fpe_handler (struct pt_regs *regs) | |||
296 | } | 293 | } |
297 | 294 | ||
298 | asmlinkage void | 295 | asmlinkage void |
299 | do_fpu_error(unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7, | 296 | do_fpu_error(unsigned long r4, unsigned long r5, unsigned long r6, |
300 | struct pt_regs regs) | 297 | unsigned long r7, struct pt_regs __regs) |
301 | { | 298 | { |
299 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
302 | struct task_struct *tsk = current; | 300 | struct task_struct *tsk = current; |
303 | 301 | ||
304 | if (ieee_fpe_handler (®s)) | 302 | if (ieee_fpe_handler(regs)) |
305 | return; | 303 | return; |
306 | 304 | ||
307 | regs.pc += 2; | 305 | regs->pc += 2; |
308 | save_fpu(tsk, ®s); | 306 | save_fpu(tsk, regs); |
309 | tsk->thread.trap_no = 11; | ||
310 | tsk->thread.error_code = 0; | ||
311 | force_sig(SIGFPE, tsk); | 307 | force_sig(SIGFPE, tsk); |
312 | } | 308 | } |
313 | 309 | ||
314 | asmlinkage void | 310 | asmlinkage void |
315 | do_fpu_state_restore(unsigned long r4, unsigned long r5, unsigned long r6, | 311 | do_fpu_state_restore(unsigned long r4, unsigned long r5, unsigned long r6, |
316 | unsigned long r7, struct pt_regs regs) | 312 | unsigned long r7, struct pt_regs __regs) |
317 | { | 313 | { |
314 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
318 | struct task_struct *tsk = current; | 315 | struct task_struct *tsk = current; |
319 | 316 | ||
320 | grab_fpu(®s); | 317 | grab_fpu(regs); |
321 | if (!user_mode(®s)) { | 318 | if (!user_mode(regs)) { |
322 | printk(KERN_ERR "BUG: FPU is used in kernel mode.\n"); | 319 | printk(KERN_ERR "BUG: FPU is used in kernel mode.\n"); |
323 | return; | 320 | return; |
324 | } | 321 | } |
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c index c294de1e14a3..9031a22a2ce7 100644 --- a/arch/sh/kernel/cpu/sh4/probe.c +++ b/arch/sh/kernel/cpu/sh4/probe.c | |||
@@ -79,16 +79,16 @@ int __init detect_cpu_and_cache_system(void) | |||
79 | case 0x205: | 79 | case 0x205: |
80 | cpu_data->type = CPU_SH7750; | 80 | cpu_data->type = CPU_SH7750; |
81 | cpu_data->flags |= CPU_HAS_P2_FLUSH_BUG | CPU_HAS_FPU | | 81 | cpu_data->flags |= CPU_HAS_P2_FLUSH_BUG | CPU_HAS_FPU | |
82 | CPU_HAS_PERF_COUNTER | CPU_HAS_PTEA; | 82 | CPU_HAS_PERF_COUNTER; |
83 | break; | 83 | break; |
84 | case 0x206: | 84 | case 0x206: |
85 | cpu_data->type = CPU_SH7750S; | 85 | cpu_data->type = CPU_SH7750S; |
86 | cpu_data->flags |= CPU_HAS_P2_FLUSH_BUG | CPU_HAS_FPU | | 86 | cpu_data->flags |= CPU_HAS_P2_FLUSH_BUG | CPU_HAS_FPU | |
87 | CPU_HAS_PERF_COUNTER | CPU_HAS_PTEA; | 87 | CPU_HAS_PERF_COUNTER; |
88 | break; | 88 | break; |
89 | case 0x1100: | 89 | case 0x1100: |
90 | cpu_data->type = CPU_SH7751; | 90 | cpu_data->type = CPU_SH7751; |
91 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PTEA; | 91 | cpu_data->flags |= CPU_HAS_FPU; |
92 | break; | 92 | break; |
93 | case 0x2000: | 93 | case 0x2000: |
94 | cpu_data->type = CPU_SH73180; | 94 | cpu_data->type = CPU_SH73180; |
@@ -119,30 +119,38 @@ int __init detect_cpu_and_cache_system(void) | |||
119 | break; | 119 | break; |
120 | case 0x3000: | 120 | case 0x3000: |
121 | case 0x3003: | 121 | case 0x3003: |
122 | case 0x3009: | ||
122 | cpu_data->type = CPU_SH7343; | 123 | cpu_data->type = CPU_SH7343; |
123 | cpu_data->icache.ways = 4; | 124 | cpu_data->icache.ways = 4; |
124 | cpu_data->dcache.ways = 4; | 125 | cpu_data->dcache.ways = 4; |
125 | cpu_data->flags |= CPU_HAS_LLSC; | 126 | cpu_data->flags |= CPU_HAS_LLSC; |
126 | break; | 127 | break; |
128 | case 0x3008: | ||
129 | if (prr == 0xa0) { | ||
130 | cpu_data->type = CPU_SH7722; | ||
131 | cpu_data->icache.ways = 4; | ||
132 | cpu_data->dcache.ways = 4; | ||
133 | cpu_data->flags |= CPU_HAS_LLSC; | ||
134 | } | ||
135 | break; | ||
127 | case 0x8000: | 136 | case 0x8000: |
128 | cpu_data->type = CPU_ST40RA; | 137 | cpu_data->type = CPU_ST40RA; |
129 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PTEA; | 138 | cpu_data->flags |= CPU_HAS_FPU; |
130 | break; | 139 | break; |
131 | case 0x8100: | 140 | case 0x8100: |
132 | cpu_data->type = CPU_ST40GX1; | 141 | cpu_data->type = CPU_ST40GX1; |
133 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PTEA; | 142 | cpu_data->flags |= CPU_HAS_FPU; |
134 | break; | 143 | break; |
135 | case 0x700: | 144 | case 0x700: |
136 | cpu_data->type = CPU_SH4_501; | 145 | cpu_data->type = CPU_SH4_501; |
137 | cpu_data->icache.ways = 2; | 146 | cpu_data->icache.ways = 2; |
138 | cpu_data->dcache.ways = 2; | 147 | cpu_data->dcache.ways = 2; |
139 | cpu_data->flags |= CPU_HAS_PTEA; | ||
140 | break; | 148 | break; |
141 | case 0x600: | 149 | case 0x600: |
142 | cpu_data->type = CPU_SH4_202; | 150 | cpu_data->type = CPU_SH4_202; |
143 | cpu_data->icache.ways = 2; | 151 | cpu_data->icache.ways = 2; |
144 | cpu_data->dcache.ways = 2; | 152 | cpu_data->dcache.ways = 2; |
145 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PTEA; | 153 | cpu_data->flags |= CPU_HAS_FPU; |
146 | break; | 154 | break; |
147 | case 0x500 ... 0x501: | 155 | case 0x500 ... 0x501: |
148 | switch (prr) { | 156 | switch (prr) { |
@@ -160,7 +168,7 @@ int __init detect_cpu_and_cache_system(void) | |||
160 | cpu_data->icache.ways = 2; | 168 | cpu_data->icache.ways = 2; |
161 | cpu_data->dcache.ways = 2; | 169 | cpu_data->dcache.ways = 2; |
162 | 170 | ||
163 | cpu_data->flags |= CPU_HAS_FPU | CPU_HAS_PTEA; | 171 | cpu_data->flags |= CPU_HAS_FPU; |
164 | 172 | ||
165 | break; | 173 | break; |
166 | default: | 174 | default: |
@@ -173,6 +181,10 @@ int __init detect_cpu_and_cache_system(void) | |||
173 | cpu_data->dcache.ways = 1; | 181 | cpu_data->dcache.ways = 1; |
174 | #endif | 182 | #endif |
175 | 183 | ||
184 | #ifdef CONFIG_CPU_HAS_PTEA | ||
185 | cpu_data->flags |= CPU_HAS_PTEA; | ||
186 | #endif | ||
187 | |||
176 | /* | 188 | /* |
177 | * On anything that's not a direct-mapped cache, look to the CVR | 189 | * On anything that's not a direct-mapped cache, look to the CVR |
178 | * for I/D-cache specifics. | 190 | * for I/D-cache specifics. |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index 50812d57c1c1..cbac27634c0b 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * SH7750/SH7751 Setup | 2 | * SH7750/SH7751 Setup |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Paul Mundt | 4 | * Copyright (C) 2006 Paul Mundt |
5 | * Copyright (C) 2006 Jamie Lenehan | ||
5 | * | 6 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 7 | * This file is subject to the terms and conditions of the GNU General Public |
7 | * License. See the file "COPYING" in the main directory of this archive | 8 | * License. See the file "COPYING" in the main directory of this archive |
@@ -10,8 +11,39 @@ | |||
10 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/serial.h> | 13 | #include <linux/serial.h> |
14 | #include <linux/io.h> | ||
13 | #include <asm/sci.h> | 15 | #include <asm/sci.h> |
14 | 16 | ||
17 | static struct resource rtc_resources[] = { | ||
18 | [0] = { | ||
19 | .start = 0xffc80000, | ||
20 | .end = 0xffc80000 + 0x58 - 1, | ||
21 | .flags = IORESOURCE_IO, | ||
22 | }, | ||
23 | [1] = { | ||
24 | /* Period IRQ */ | ||
25 | .start = 21, | ||
26 | .flags = IORESOURCE_IRQ, | ||
27 | }, | ||
28 | [2] = { | ||
29 | /* Carry IRQ */ | ||
30 | .start = 22, | ||
31 | .flags = IORESOURCE_IRQ, | ||
32 | }, | ||
33 | [3] = { | ||
34 | /* Alarm IRQ */ | ||
35 | .start = 20, | ||
36 | .flags = IORESOURCE_IRQ, | ||
37 | }, | ||
38 | }; | ||
39 | |||
40 | static struct platform_device rtc_device = { | ||
41 | .name = "sh-rtc", | ||
42 | .id = -1, | ||
43 | .num_resources = ARRAY_SIZE(rtc_resources), | ||
44 | .resource = rtc_resources, | ||
45 | }; | ||
46 | |||
15 | static struct plat_sci_port sci_platform_data[] = { | 47 | static struct plat_sci_port sci_platform_data[] = { |
16 | { | 48 | { |
17 | .mapbase = 0xffe00000, | 49 | .mapbase = 0xffe00000, |
@@ -37,6 +69,7 @@ static struct platform_device sci_device = { | |||
37 | }; | 69 | }; |
38 | 70 | ||
39 | static struct platform_device *sh7750_devices[] __initdata = { | 71 | static struct platform_device *sh7750_devices[] __initdata = { |
72 | &rtc_device, | ||
40 | &sci_device, | 73 | &sci_device, |
41 | }; | 74 | }; |
42 | 75 | ||
@@ -46,3 +79,71 @@ static int __init sh7750_devices_setup(void) | |||
46 | ARRAY_SIZE(sh7750_devices)); | 79 | ARRAY_SIZE(sh7750_devices)); |
47 | } | 80 | } |
48 | __initcall(sh7750_devices_setup); | 81 | __initcall(sh7750_devices_setup); |
82 | |||
83 | static struct ipr_data sh7750_ipr_map[] = { | ||
84 | /* IRQ, IPR-idx, shift, priority */ | ||
85 | { 16, 0, 12, 2 }, /* TMU0 TUNI*/ | ||
86 | { 17, 0, 12, 2 }, /* TMU1 TUNI */ | ||
87 | { 18, 0, 4, 2 }, /* TMU2 TUNI */ | ||
88 | { 19, 0, 4, 2 }, /* TMU2 TIPCI */ | ||
89 | { 27, 1, 12, 2 }, /* WDT ITI */ | ||
90 | { 20, 0, 0, 2 }, /* RTC ATI (alarm) */ | ||
91 | { 21, 0, 0, 2 }, /* RTC PRI (period) */ | ||
92 | { 22, 0, 0, 2 }, /* RTC CUI (carry) */ | ||
93 | { 23, 1, 4, 3 }, /* SCI ERI */ | ||
94 | { 24, 1, 4, 3 }, /* SCI RXI */ | ||
95 | { 25, 1, 4, 3 }, /* SCI TXI */ | ||
96 | { 40, 2, 4, 3 }, /* SCIF ERI */ | ||
97 | { 41, 2, 4, 3 }, /* SCIF RXI */ | ||
98 | { 42, 2, 4, 3 }, /* SCIF BRI */ | ||
99 | { 43, 2, 4, 3 }, /* SCIF TXI */ | ||
100 | { 34, 2, 8, 7 }, /* DMAC DMTE0 */ | ||
101 | { 35, 2, 8, 7 }, /* DMAC DMTE1 */ | ||
102 | { 36, 2, 8, 7 }, /* DMAC DMTE2 */ | ||
103 | { 37, 2, 8, 7 }, /* DMAC DMTE3 */ | ||
104 | { 28, 2, 8, 7 }, /* DMAC DMAE */ | ||
105 | }; | ||
106 | |||
107 | static struct ipr_data sh7751_ipr_map[] = { | ||
108 | { 44, 2, 8, 7 }, /* DMAC DMTE4 */ | ||
109 | { 45, 2, 8, 7 }, /* DMAC DMTE5 */ | ||
110 | { 46, 2, 8, 7 }, /* DMAC DMTE6 */ | ||
111 | { 47, 2, 8, 7 }, /* DMAC DMTE7 */ | ||
112 | /* The following use INTC_INPRI00 for masking, which is a 32-bit | ||
113 | register, not a 16-bit register like the IPRx registers, so it | ||
114 | would need special support */ | ||
115 | /*{ 72, INTPRI00, 8, ? },*/ /* TMU3 TUNI */ | ||
116 | /*{ 76, INTPRI00, 12, ? },*/ /* TMU4 TUNI */ | ||
117 | }; | ||
118 | |||
119 | static unsigned long ipr_offsets[] = { | ||
120 | 0xffd00004UL, /* 0: IPRA */ | ||
121 | 0xffd00008UL, /* 1: IPRB */ | ||
122 | 0xffd0000cUL, /* 2: IPRC */ | ||
123 | 0xffd00010UL, /* 3: IPRD */ | ||
124 | }; | ||
125 | |||
126 | /* given the IPR index return the address of the IPR register */ | ||
127 | unsigned int map_ipridx_to_addr(int idx) | ||
128 | { | ||
129 | if (idx >= ARRAY_SIZE(ipr_offsets)) | ||
130 | return 0; | ||
131 | return ipr_offsets[idx]; | ||
132 | } | ||
133 | |||
134 | #define INTC_ICR 0xffd00000UL | ||
135 | #define INTC_ICR_IRLM (1<<7) | ||
136 | |||
137 | /* enable individual interrupt mode for external interupts */ | ||
138 | void ipr_irq_enable_irlm(void) | ||
139 | { | ||
140 | ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); | ||
141 | } | ||
142 | |||
143 | void __init init_IRQ_ipr() | ||
144 | { | ||
145 | make_ipr_irq(sh7750_ipr_map, ARRAY_SIZE(sh7750_ipr_map)); | ||
146 | #ifdef CONFIG_CPU_SUBTYPE_SH7751 | ||
147 | make_ipr_irq(sh7751_ipr_map, ARRAY_SIZE(sh7751_ipr_map)); | ||
148 | #endif | ||
149 | } | ||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index 97f1c9af35d6..07e5377bf550 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c | |||
@@ -51,3 +51,66 @@ static int __init sh7760_devices_setup(void) | |||
51 | ARRAY_SIZE(sh7760_devices)); | 51 | ARRAY_SIZE(sh7760_devices)); |
52 | } | 52 | } |
53 | __initcall(sh7760_devices_setup); | 53 | __initcall(sh7760_devices_setup); |
54 | |||
55 | /* | ||
56 | * SH7760 INTC2-Style interrupts, vectors IRQ48-111 INTEVT 0x800-0xFE0 | ||
57 | */ | ||
58 | static struct intc2_data intc2_irq_table[] = { | ||
59 | /* INTPRIO0 | INTMSK0 */ | ||
60 | {48, 0, 28, 0, 31, 3}, /* IRQ 4 */ | ||
61 | {49, 0, 24, 0, 30, 3}, /* IRQ 3 */ | ||
62 | {50, 0, 20, 0, 29, 3}, /* IRQ 2 */ | ||
63 | {51, 0, 16, 0, 28, 3}, /* IRQ 1 */ | ||
64 | /* 52-55 (INTEVT 0x880-0x8E0) unused/reserved */ | ||
65 | /* INTPRIO4 | INTMSK0 */ | ||
66 | {56, 4, 28, 0, 25, 3}, /* HCAN2_CHAN0 */ | ||
67 | {57, 4, 24, 0, 24, 3}, /* HCAN2_CHAN1 */ | ||
68 | {58, 4, 20, 0, 23, 3}, /* I2S_CHAN0 */ | ||
69 | {59, 4, 16, 0, 22, 3}, /* I2S_CHAN1 */ | ||
70 | {60, 4, 12, 0, 21, 3}, /* AC97_CHAN0 */ | ||
71 | {61, 4, 8, 0, 20, 3}, /* AC97_CHAN1 */ | ||
72 | {62, 4, 4, 0, 19, 3}, /* I2C_CHAN0 */ | ||
73 | {63, 4, 0, 0, 18, 3}, /* I2C_CHAN1 */ | ||
74 | /* INTPRIO8 | INTMSK0 */ | ||
75 | {52, 8, 16, 0, 11, 3}, /* SCIF0_ERI_IRQ */ | ||
76 | {53, 8, 16, 0, 10, 3}, /* SCIF0_RXI_IRQ */ | ||
77 | {54, 8, 16, 0, 9, 3}, /* SCIF0_BRI_IRQ */ | ||
78 | {55, 8, 16, 0, 8, 3}, /* SCIF0_TXI_IRQ */ | ||
79 | {64, 8, 28, 0, 17, 3}, /* USBHI_IRQ */ | ||
80 | {65, 8, 24, 0, 16, 3}, /* LCDC */ | ||
81 | /* 66, 67 unused */ | ||
82 | {68, 8, 20, 0, 14, 13}, /* DMABRGI0_IRQ */ | ||
83 | {69, 8, 20, 0, 13, 13}, /* DMABRGI1_IRQ */ | ||
84 | {70, 8, 20, 0, 12, 13}, /* DMABRGI2_IRQ */ | ||
85 | /* 71 unused */ | ||
86 | {72, 8, 12, 0, 7, 3}, /* SCIF1_ERI_IRQ */ | ||
87 | {73, 8, 12, 0, 6, 3}, /* SCIF1_RXI_IRQ */ | ||
88 | {74, 8, 12, 0, 5, 3}, /* SCIF1_BRI_IRQ */ | ||
89 | {75, 8, 12, 0, 4, 3}, /* SCIF1_TXI_IRQ */ | ||
90 | {76, 8, 8, 0, 3, 3}, /* SCIF2_ERI_IRQ */ | ||
91 | {77, 8, 8, 0, 2, 3}, /* SCIF2_RXI_IRQ */ | ||
92 | {78, 8, 8, 0, 1, 3}, /* SCIF2_BRI_IRQ */ | ||
93 | {79, 8, 8, 0, 0, 3}, /* SCIF2_TXI_IRQ */ | ||
94 | /* | INTMSK4 */ | ||
95 | {80, 8, 4, 4, 23, 3}, /* SIM_ERI */ | ||
96 | {81, 8, 4, 4, 22, 3}, /* SIM_RXI */ | ||
97 | {82, 8, 4, 4, 21, 3}, /* SIM_TXI */ | ||
98 | {83, 8, 4, 4, 20, 3}, /* SIM_TEI */ | ||
99 | {84, 8, 0, 4, 19, 3}, /* HSPII */ | ||
100 | /* INTPRIOC | INTMSK4 */ | ||
101 | /* 85-87 unused/reserved */ | ||
102 | {88, 12, 20, 4, 18, 3}, /* MMCI0 */ | ||
103 | {89, 12, 20, 4, 17, 3}, /* MMCI1 */ | ||
104 | {90, 12, 20, 4, 16, 3}, /* MMCI2 */ | ||
105 | {91, 12, 20, 4, 15, 3}, /* MMCI3 */ | ||
106 | {92, 12, 12, 4, 6, 3}, /* MFI (unsure, bug? in my 7760 manual*/ | ||
107 | /* 93-107 reserved/undocumented */ | ||
108 | {108,12, 4, 4, 1, 3}, /* ADC */ | ||
109 | {109,12, 0, 4, 0, 3}, /* CMTI */ | ||
110 | /* 110-111 reserved/unused */ | ||
111 | }; | ||
112 | |||
113 | void __init init_IRQ_intc2(void) | ||
114 | { | ||
115 | make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); | ||
116 | } | ||
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 7bcc73f9b8df..d7fff752e569 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/vmalloc.h> | 20 | #include <linux/vmalloc.h> |
21 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
22 | #include <asm/io.h> | 22 | #include <linux/io.h> |
23 | #include <asm/page.h> | 23 | #include <asm/page.h> |
24 | #include <asm/cacheflush.h> | 24 | #include <asm/cacheflush.h> |
25 | #include <asm/cpu/sq.h> | 25 | #include <asm/cpu/sq.h> |
@@ -38,7 +38,7 @@ struct sq_mapping { | |||
38 | 38 | ||
39 | static struct sq_mapping *sq_mapping_list; | 39 | static struct sq_mapping *sq_mapping_list; |
40 | static DEFINE_SPINLOCK(sq_mapping_lock); | 40 | static DEFINE_SPINLOCK(sq_mapping_lock); |
41 | static kmem_cache_t *sq_cache; | 41 | static struct kmem_cache *sq_cache; |
42 | static unsigned long *sq_bitmap; | 42 | static unsigned long *sq_bitmap; |
43 | 43 | ||
44 | #define store_queue_barrier() \ | 44 | #define store_queue_barrier() \ |
@@ -67,6 +67,7 @@ void sq_flush_range(unsigned long start, unsigned int len) | |||
67 | /* Wait for completion */ | 67 | /* Wait for completion */ |
68 | store_queue_barrier(); | 68 | store_queue_barrier(); |
69 | } | 69 | } |
70 | EXPORT_SYMBOL(sq_flush_range); | ||
70 | 71 | ||
71 | static inline void sq_mapping_list_add(struct sq_mapping *map) | 72 | static inline void sq_mapping_list_add(struct sq_mapping *map) |
72 | { | 73 | { |
@@ -110,8 +111,9 @@ static int __sq_remap(struct sq_mapping *map, unsigned long flags) | |||
110 | 111 | ||
111 | vma->phys_addr = map->addr; | 112 | vma->phys_addr = map->addr; |
112 | 113 | ||
113 | if (remap_area_pages((unsigned long)vma->addr, vma->phys_addr, | 114 | if (ioremap_page_range((unsigned long)vma->addr, |
114 | map->size, flags)) { | 115 | (unsigned long)vma->addr + map->size, |
116 | vma->phys_addr, __pgprot(flags))) { | ||
115 | vunmap(vma->addr); | 117 | vunmap(vma->addr); |
116 | return -EAGAIN; | 118 | return -EAGAIN; |
117 | } | 119 | } |
@@ -166,7 +168,7 @@ unsigned long sq_remap(unsigned long phys, unsigned int size, | |||
166 | map->size = size; | 168 | map->size = size; |
167 | map->name = name; | 169 | map->name = name; |
168 | 170 | ||
169 | page = bitmap_find_free_region(sq_bitmap, 0x04000000, | 171 | page = bitmap_find_free_region(sq_bitmap, 0x04000000 >> PAGE_SHIFT, |
170 | get_order(map->size)); | 172 | get_order(map->size)); |
171 | if (unlikely(page < 0)) { | 173 | if (unlikely(page < 0)) { |
172 | ret = -ENOSPC; | 174 | ret = -ENOSPC; |
@@ -175,7 +177,7 @@ unsigned long sq_remap(unsigned long phys, unsigned int size, | |||
175 | 177 | ||
176 | map->sq_addr = P4SEG_STORE_QUE + (page << PAGE_SHIFT); | 178 | map->sq_addr = P4SEG_STORE_QUE + (page << PAGE_SHIFT); |
177 | 179 | ||
178 | ret = __sq_remap(map, flags); | 180 | ret = __sq_remap(map, pgprot_val(PAGE_KERNEL_NOCACHE) | flags); |
179 | if (unlikely(ret != 0)) | 181 | if (unlikely(ret != 0)) |
180 | goto out; | 182 | goto out; |
181 | 183 | ||
@@ -193,6 +195,7 @@ out: | |||
193 | kmem_cache_free(sq_cache, map); | 195 | kmem_cache_free(sq_cache, map); |
194 | return ret; | 196 | return ret; |
195 | } | 197 | } |
198 | EXPORT_SYMBOL(sq_remap); | ||
196 | 199 | ||
197 | /** | 200 | /** |
198 | * sq_unmap - Unmap a Store Queue allocation | 201 | * sq_unmap - Unmap a Store Queue allocation |
@@ -234,6 +237,7 @@ void sq_unmap(unsigned long vaddr) | |||
234 | 237 | ||
235 | kmem_cache_free(sq_cache, map); | 238 | kmem_cache_free(sq_cache, map); |
236 | } | 239 | } |
240 | EXPORT_SYMBOL(sq_unmap); | ||
237 | 241 | ||
238 | /* | 242 | /* |
239 | * Needlessly complex sysfs interface. Unfortunately it doesn't seem like | 243 | * Needlessly complex sysfs interface. Unfortunately it doesn't seem like |
@@ -402,7 +406,3 @@ module_exit(sq_api_exit); | |||
402 | MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>, M. R. Brown <mrbrown@0xd6.org>"); | 406 | MODULE_AUTHOR("Paul Mundt <lethal@linux-sh.org>, M. R. Brown <mrbrown@0xd6.org>"); |
403 | MODULE_DESCRIPTION("Simple API for SH-4 integrated Store Queues"); | 407 | MODULE_DESCRIPTION("Simple API for SH-4 integrated Store Queues"); |
404 | MODULE_LICENSE("GPL"); | 408 | MODULE_LICENSE("GPL"); |
405 | |||
406 | EXPORT_SYMBOL(sq_remap); | ||
407 | EXPORT_SYMBOL(sq_unmap); | ||
408 | EXPORT_SYMBOL(sq_flush_range); | ||
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile new file mode 100644 index 000000000000..a8f493f2f21f --- /dev/null +++ b/arch/sh/kernel/cpu/sh4a/Makefile | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # Makefile for the Linux/SuperH SH-4 backends. | ||
3 | # | ||
4 | |||
5 | # CPU subtype setup | ||
6 | obj-$(CONFIG_CPU_SUBTYPE_SH7770) += setup-sh7770.o | ||
7 | obj-$(CONFIG_CPU_SUBTYPE_SH7780) += setup-sh7780.o | ||
8 | obj-$(CONFIG_CPU_SUBTYPE_SH73180) += setup-sh73180.o | ||
9 | obj-$(CONFIG_CPU_SUBTYPE_SH7343) += setup-sh7343.o | ||
10 | obj-$(CONFIG_CPU_SUBTYPE_SH7722) += setup-sh7722.o | ||
11 | |||
12 | # Primary on-chip clocks (common) | ||
13 | clock-$(CONFIG_CPU_SUBTYPE_SH73180) := clock-sh73180.o | ||
14 | clock-$(CONFIG_CPU_SUBTYPE_SH7770) := clock-sh7770.o | ||
15 | clock-$(CONFIG_CPU_SUBTYPE_SH7780) := clock-sh7780.o | ||
16 | clock-$(CONFIG_CPU_SUBTYPE_SH7343) := clock-sh7343.o | ||
17 | clock-$(CONFIG_CPU_SUBTYPE_SH7722) := clock-sh7343.o | ||
18 | |||
19 | obj-y += $(clock-y) | ||
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh73180.c b/arch/sh/kernel/cpu/sh4a/clock-sh73180.c index 2fa5cb2ae68d..2fa5cb2ae68d 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh73180.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh73180.c | |||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7343.c b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c new file mode 100644 index 000000000000..1707a213f0cf --- /dev/null +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c | |||
@@ -0,0 +1,99 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/cpu/sh4/clock-sh7343.c | ||
3 | * | ||
4 | * SH7343/SH7722 support for the clock framework | ||
5 | * | ||
6 | * Copyright (C) 2006 Paul Mundt | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/io.h> | ||
15 | #include <asm/clock.h> | ||
16 | #include <asm/freq.h> | ||
17 | |||
18 | /* | ||
19 | * SH7343/SH7722 uses a common set of multipliers and divisors, so this | ||
20 | * is quite simple.. | ||
21 | */ | ||
22 | static int multipliers[] = { 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; | ||
23 | static int divisors[] = { 1, 3, 2, 5, 3, 4, 5, 6, 8, 10, 12, 16, 20 }; | ||
24 | |||
25 | #define pll_calc() (((ctrl_inl(FRQCR) >> 24) & 0x1f) + 1) | ||
26 | |||
27 | static void master_clk_init(struct clk *clk) | ||
28 | { | ||
29 | clk->parent = clk_get(NULL, "cpu_clk"); | ||
30 | } | ||
31 | |||
32 | static void master_clk_recalc(struct clk *clk) | ||
33 | { | ||
34 | int idx = (ctrl_inl(FRQCR) & 0x000f); | ||
35 | clk->rate *= clk->parent->rate * multipliers[idx] / divisors[idx]; | ||
36 | } | ||
37 | |||
38 | static struct clk_ops sh7343_master_clk_ops = { | ||
39 | .init = master_clk_init, | ||
40 | .recalc = master_clk_recalc, | ||
41 | }; | ||
42 | |||
43 | static void module_clk_init(struct clk *clk) | ||
44 | { | ||
45 | clk->parent = NULL; | ||
46 | clk->rate = CONFIG_SH_PCLK_FREQ; | ||
47 | } | ||
48 | |||
49 | static struct clk_ops sh7343_module_clk_ops = { | ||
50 | .init = module_clk_init, | ||
51 | }; | ||
52 | |||
53 | static void bus_clk_init(struct clk *clk) | ||
54 | { | ||
55 | clk->parent = clk_get(NULL, "cpu_clk"); | ||
56 | } | ||
57 | |||
58 | static void bus_clk_recalc(struct clk *clk) | ||
59 | { | ||
60 | int idx = (ctrl_inl(FRQCR) >> 8) & 0x000f; | ||
61 | clk->rate = clk->parent->rate * multipliers[idx] / divisors[idx]; | ||
62 | } | ||
63 | |||
64 | static struct clk_ops sh7343_bus_clk_ops = { | ||
65 | .init = bus_clk_init, | ||
66 | .recalc = bus_clk_recalc, | ||
67 | }; | ||
68 | |||
69 | static void cpu_clk_init(struct clk *clk) | ||
70 | { | ||
71 | clk->parent = clk_get(NULL, "module_clk"); | ||
72 | clk->flags |= CLK_RATE_PROPAGATES; | ||
73 | clk_set_rate(clk, clk_get_rate(clk)); | ||
74 | } | ||
75 | |||
76 | static void cpu_clk_recalc(struct clk *clk) | ||
77 | { | ||
78 | int idx = (ctrl_inl(FRQCR) >> 20) & 0x000f; | ||
79 | clk->rate = clk->parent->rate * pll_calc() * | ||
80 | multipliers[idx] / divisors[idx]; | ||
81 | } | ||
82 | |||
83 | static struct clk_ops sh7343_cpu_clk_ops = { | ||
84 | .init = cpu_clk_init, | ||
85 | .recalc = cpu_clk_recalc, | ||
86 | }; | ||
87 | |||
88 | static struct clk_ops *sh7343_clk_ops[] = { | ||
89 | &sh7343_master_clk_ops, | ||
90 | &sh7343_module_clk_ops, | ||
91 | &sh7343_bus_clk_ops, | ||
92 | &sh7343_cpu_clk_ops, | ||
93 | }; | ||
94 | |||
95 | void __init arch_init_clk_ops(struct clk_ops **ops, int idx) | ||
96 | { | ||
97 | if (idx < ARRAY_SIZE(sh7343_clk_ops)) | ||
98 | *ops = sh7343_clk_ops[idx]; | ||
99 | } | ||
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh7770.c b/arch/sh/kernel/cpu/sh4a/clock-sh7770.c index c8694bac6477..c8694bac6477 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7770.c | |||
diff --git a/arch/sh/kernel/cpu/sh4/clock-sh7780.c b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c index 93ad367342c9..9e6a216750c8 100644 --- a/arch/sh/kernel/cpu/sh4/clock-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7780.c | |||
@@ -98,7 +98,7 @@ static struct clk *sh7780_onchip_clocks[] = { | |||
98 | 98 | ||
99 | static int __init sh7780_clk_init(void) | 99 | static int __init sh7780_clk_init(void) |
100 | { | 100 | { |
101 | struct clk *clk = clk_get("master_clk"); | 101 | struct clk *clk = clk_get(NULL, "master_clk"); |
102 | int i; | 102 | int i; |
103 | 103 | ||
104 | for (i = 0; i < ARRAY_SIZE(sh7780_onchip_clocks); i++) { | 104 | for (i = 0; i < ARRAY_SIZE(sh7780_onchip_clocks); i++) { |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh73180.c b/arch/sh/kernel/cpu/sh4a/setup-sh73180.c index cc9ea1e2e5df..cc9ea1e2e5df 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh73180.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh73180.c | |||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index 91d61cf91ba1..91d61cf91ba1 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |||
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c new file mode 100644 index 000000000000..1143fbf65faf --- /dev/null +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * SH7722 Setup | ||
3 | * | ||
4 | * Copyright (C) 2006 Paul Mundt | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | #include <linux/platform_device.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/serial.h> | ||
13 | #include <asm/sci.h> | ||
14 | |||
15 | static struct plat_sci_port sci_platform_data[] = { | ||
16 | { | ||
17 | .mapbase = 0xffe00000, | ||
18 | .flags = UPF_BOOT_AUTOCONF, | ||
19 | .type = PORT_SCIF, | ||
20 | .irqs = { 80, 81, 83, 82 }, | ||
21 | }, { | ||
22 | .flags = 0, | ||
23 | } | ||
24 | }; | ||
25 | |||
26 | static struct platform_device sci_device = { | ||
27 | .name = "sh-sci", | ||
28 | .id = -1, | ||
29 | .dev = { | ||
30 | .platform_data = sci_platform_data, | ||
31 | }, | ||
32 | }; | ||
33 | |||
34 | static struct platform_device *sh7722_devices[] __initdata = { | ||
35 | &sci_device, | ||
36 | }; | ||
37 | |||
38 | static int __init sh7722_devices_setup(void) | ||
39 | { | ||
40 | return platform_add_devices(sh7722_devices, | ||
41 | ARRAY_SIZE(sh7722_devices)); | ||
42 | } | ||
43 | __initcall(sh7722_devices_setup); | ||
44 | |||
45 | static struct ipr_data sh7722_ipr_map[] = { | ||
46 | /* IRQ, IPR-idx, shift, prio */ | ||
47 | { 16, 0, 12, 2 }, /* TMU0 */ | ||
48 | { 17, 0, 8, 2 }, /* TMU1 */ | ||
49 | { 80, 6, 12, 3 }, /* SCIF ERI */ | ||
50 | { 81, 6, 12, 3 }, /* SCIF RXI */ | ||
51 | { 82, 6, 12, 3 }, /* SCIF BRI */ | ||
52 | { 83, 6, 12, 3 }, /* SCIF TXI */ | ||
53 | }; | ||
54 | |||
55 | static unsigned long ipr_offsets[] = { | ||
56 | 0xa4080000, /* 0: IPRA */ | ||
57 | 0xa4080004, /* 1: IPRB */ | ||
58 | 0xa4080008, /* 2: IPRC */ | ||
59 | 0xa408000c, /* 3: IPRD */ | ||
60 | 0xa4080010, /* 4: IPRE */ | ||
61 | 0xa4080014, /* 5: IPRF */ | ||
62 | 0xa4080018, /* 6: IPRG */ | ||
63 | 0xa408001c, /* 7: IPRH */ | ||
64 | 0xa4080020, /* 8: IPRI */ | ||
65 | 0xa4080024, /* 9: IPRJ */ | ||
66 | 0xa4080028, /* 10: IPRK */ | ||
67 | 0xa408002c, /* 11: IPRL */ | ||
68 | }; | ||
69 | |||
70 | unsigned int map_ipridx_to_addr(int idx) | ||
71 | { | ||
72 | if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) | ||
73 | return 0; | ||
74 | return ipr_offsets[idx]; | ||
75 | } | ||
76 | |||
77 | void __init init_IRQ_ipr(void) | ||
78 | { | ||
79 | make_ipr_irq(sh7722_ipr_map, ARRAY_SIZE(sh7722_ipr_map)); | ||
80 | } | ||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c index 6a04cc5f5aca..6a04cc5f5aca 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c | |||
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c index 72493f259edc..9aeaa2ddaa28 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c | |||
@@ -77,3 +77,32 @@ static int __init sh7780_devices_setup(void) | |||
77 | ARRAY_SIZE(sh7780_devices)); | 77 | ARRAY_SIZE(sh7780_devices)); |
78 | } | 78 | } |
79 | __initcall(sh7780_devices_setup); | 79 | __initcall(sh7780_devices_setup); |
80 | |||
81 | static struct intc2_data intc2_irq_table[] = { | ||
82 | { 28, 0, 24, 0, 0, 2 }, /* TMU0 */ | ||
83 | |||
84 | { 21, 1, 0, 0, 2, 2 }, | ||
85 | { 22, 1, 1, 0, 2, 2 }, | ||
86 | { 23, 1, 2, 0, 2, 2 }, | ||
87 | |||
88 | { 40, 8, 24, 0, 3, 3 }, /* SCIF0 ERI */ | ||
89 | { 41, 8, 24, 0, 3, 3 }, /* SCIF0 RXI */ | ||
90 | { 42, 8, 24, 0, 3, 3 }, /* SCIF0 BRI */ | ||
91 | { 43, 8, 24, 0, 3, 3 }, /* SCIF0 TXI */ | ||
92 | |||
93 | { 76, 8, 16, 0, 4, 3 }, /* SCIF1 ERI */ | ||
94 | { 77, 8, 16, 0, 4, 3 }, /* SCIF1 RXI */ | ||
95 | { 78, 8, 16, 0, 4, 3 }, /* SCIF1 BRI */ | ||
96 | { 79, 8, 16, 0, 4, 3 }, /* SCIF1 TXI */ | ||
97 | |||
98 | { 64, 0x10, 8, 0, 14, 2 }, /* PCIC0 */ | ||
99 | { 65, 0x10, 0, 0, 15, 2 }, /* PCIC1 */ | ||
100 | { 66, 0x14, 24, 0, 16, 2 }, /* PCIC2 */ | ||
101 | { 67, 0x14, 16, 0, 17, 2 }, /* PCIC3 */ | ||
102 | { 68, 0x14, 8, 0, 18, 2 }, /* PCIC4 */ | ||
103 | }; | ||
104 | |||
105 | void __init init_IRQ_intc2(void) | ||
106 | { | ||
107 | make_intc2_irq(intc2_irq_table, ARRAY_SIZE(intc2_irq_table)); | ||
108 | } | ||
diff --git a/arch/sh/kernel/early_printk.c b/arch/sh/kernel/early_printk.c index a00022722e9e..560b91cdd15c 100644 --- a/arch/sh/kernel/early_printk.c +++ b/arch/sh/kernel/early_printk.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/console.h> | 12 | #include <linux/console.h> |
13 | #include <linux/tty.h> | 13 | #include <linux/tty.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <asm/io.h> | 15 | #include <linux/io.h> |
16 | 16 | ||
17 | #ifdef CONFIG_SH_STANDARD_BIOS | 17 | #ifdef CONFIG_SH_STANDARD_BIOS |
18 | #include <asm/sh_bios.h> | 18 | #include <asm/sh_bios.h> |
@@ -62,17 +62,9 @@ static struct console bios_console = { | |||
62 | #include <linux/serial_core.h> | 62 | #include <linux/serial_core.h> |
63 | #include "../../../drivers/serial/sh-sci.h" | 63 | #include "../../../drivers/serial/sh-sci.h" |
64 | 64 | ||
65 | #ifdef CONFIG_CPU_SH4 | ||
66 | #define SCIF_REG 0xffe80000 | ||
67 | #elif defined(CONFIG_CPU_SUBTYPE_SH72060) | ||
68 | #define SCIF_REG 0xfffe9800 | ||
69 | #else | ||
70 | #error "Undefined SCIF for this subtype" | ||
71 | #endif | ||
72 | |||
73 | static struct uart_port scif_port = { | 65 | static struct uart_port scif_port = { |
74 | .mapbase = SCIF_REG, | 66 | .mapbase = CONFIG_EARLY_SCIF_CONSOLE_PORT, |
75 | .membase = (char __iomem *)SCIF_REG, | 67 | .membase = (char __iomem *)CONFIG_EARLY_SCIF_CONSOLE_PORT, |
76 | }; | 68 | }; |
77 | 69 | ||
78 | static void scif_sercon_putc(int c) | 70 | static void scif_sercon_putc(int c) |
@@ -113,23 +105,29 @@ static struct console scif_console = { | |||
113 | .index = -1, | 105 | .index = -1, |
114 | }; | 106 | }; |
115 | 107 | ||
108 | #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_STANDARD_BIOS) | ||
109 | /* | ||
110 | * Simple SCIF init, primarily aimed at SH7750 and other similar SH-4 | ||
111 | * devices that aren't using sh-ipl+g. | ||
112 | */ | ||
116 | static void scif_sercon_init(int baud) | 113 | static void scif_sercon_init(int baud) |
117 | { | 114 | { |
118 | ctrl_outw(0, SCIF_REG + 8); | 115 | ctrl_outw(0, scif_port.mapbase + 8); |
119 | ctrl_outw(0, SCIF_REG); | 116 | ctrl_outw(0, scif_port.mapbase); |
120 | 117 | ||
121 | /* Set baud rate */ | 118 | /* Set baud rate */ |
122 | ctrl_outb((CONFIG_SH_PCLK_FREQ + 16 * baud) / | 119 | ctrl_outb((CONFIG_SH_PCLK_FREQ + 16 * baud) / |
123 | (32 * baud) - 1, SCIF_REG + 4); | 120 | (32 * baud) - 1, scif_port.mapbase + 4); |
124 | 121 | ||
125 | ctrl_outw(12, SCIF_REG + 24); | 122 | ctrl_outw(12, scif_port.mapbase + 24); |
126 | ctrl_outw(8, SCIF_REG + 24); | 123 | ctrl_outw(8, scif_port.mapbase + 24); |
127 | ctrl_outw(0, SCIF_REG + 32); | 124 | ctrl_outw(0, scif_port.mapbase + 32); |
128 | ctrl_outw(0x60, SCIF_REG + 16); | 125 | ctrl_outw(0x60, scif_port.mapbase + 16); |
129 | ctrl_outw(0, SCIF_REG + 36); | 126 | ctrl_outw(0, scif_port.mapbase + 36); |
130 | ctrl_outw(0x30, SCIF_REG + 8); | 127 | ctrl_outw(0x30, scif_port.mapbase + 8); |
131 | } | 128 | } |
132 | #endif | 129 | #endif /* CONFIG_CPU_SH4 && !CONFIG_SH_STANDARD_BIOS */ |
130 | #endif /* CONFIG_EARLY_SCIF_CONSOLE */ | ||
133 | 131 | ||
134 | /* | 132 | /* |
135 | * Setup a default console, if more than one is compiled in, rely on the | 133 | * Setup a default console, if more than one is compiled in, rely on the |
@@ -146,16 +144,16 @@ static struct console *early_console = | |||
146 | ; | 144 | ; |
147 | 145 | ||
148 | static int __initdata keep_early; | 146 | static int __initdata keep_early; |
147 | static int early_console_initialized; | ||
149 | 148 | ||
150 | int __init setup_early_printk(char *opt) | 149 | int __init setup_early_printk(char *buf) |
151 | { | 150 | { |
152 | char *space; | 151 | if (!buf) |
153 | char buf[256]; | 152 | return 0; |
154 | 153 | ||
155 | strlcpy(buf, opt, sizeof(buf)); | 154 | if (early_console_initialized) |
156 | space = strchr(buf, ' '); | 155 | return 0; |
157 | if (space) | 156 | early_console_initialized = 1; |
158 | *space = 0; | ||
159 | 157 | ||
160 | if (strstr(buf, "keep")) | 158 | if (strstr(buf, "keep")) |
161 | keep_early = 1; | 159 | keep_early = 1; |
@@ -168,7 +166,7 @@ int __init setup_early_printk(char *opt) | |||
168 | if (!strncmp(buf, "serial", 6)) { | 166 | if (!strncmp(buf, "serial", 6)) { |
169 | early_console = &scif_console; | 167 | early_console = &scif_console; |
170 | 168 | ||
171 | #ifdef CONFIG_CPU_SH4 | 169 | #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_STANDARD_BIOS) |
172 | scif_sercon_init(115200); | 170 | scif_sercon_init(115200); |
173 | #endif | 171 | #endif |
174 | } | 172 | } |
@@ -177,12 +175,14 @@ int __init setup_early_printk(char *opt) | |||
177 | if (likely(early_console)) | 175 | if (likely(early_console)) |
178 | register_console(early_console); | 176 | register_console(early_console); |
179 | 177 | ||
180 | return 1; | 178 | return 0; |
181 | } | 179 | } |
182 | __setup("earlyprintk=", setup_early_printk); | 180 | early_param("earlyprintk", setup_early_printk); |
183 | 181 | ||
184 | void __init disable_early_printk(void) | 182 | void __init disable_early_printk(void) |
185 | { | 183 | { |
184 | if (!early_console_initialized || !early_console) | ||
185 | return; | ||
186 | if (!keep_early) { | 186 | if (!keep_early) { |
187 | printk("disabling early console\n"); | 187 | printk("disabling early console\n"); |
188 | unregister_console(early_console); | 188 | unregister_console(early_console); |
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S new file mode 100644 index 000000000000..fc279aeb73ab --- /dev/null +++ b/arch/sh/kernel/entry-common.S | |||
@@ -0,0 +1,444 @@ | |||
1 | /* $Id: entry.S,v 1.37 2004/06/11 13:02:46 doyu Exp $ | ||
2 | * | ||
3 | * linux/arch/sh/entry.S | ||
4 | * | ||
5 | * Copyright (C) 1999, 2000, 2002 Niibe Yutaka | ||
6 | * Copyright (C) 2003 Paul Mundt | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | ! NOTE: | ||
15 | ! GNU as (as of 2.9.1) changes bf/s into bt/s and bra, when the address | ||
16 | ! to be jumped is too far, but it causes illegal slot exception. | ||
17 | |||
18 | /* | ||
19 | * entry.S contains the system-call and fault low-level handling routines. | ||
20 | * This also contains the timer-interrupt handler, as well as all interrupts | ||
21 | * and faults that can result in a task-switch. | ||
22 | * | ||
23 | * NOTE: This code handles signal-recognition, which happens every time | ||
24 | * after a timer-interrupt and after each system call. | ||
25 | * | ||
26 | * NOTE: This code uses a convention that instructions in the delay slot | ||
27 | * of a transfer-control instruction are indented by an extra space, thus: | ||
28 | * | ||
29 | * jmp @k0 ! control-transfer instruction | ||
30 | * ldc k1, ssr ! delay slot | ||
31 | * | ||
32 | * Stack layout in 'ret_from_syscall': | ||
33 | * ptrace needs to have all regs on the stack. | ||
34 | * if the order here is changed, it needs to be | ||
35 | * updated in ptrace.c and ptrace.h | ||
36 | * | ||
37 | * r0 | ||
38 | * ... | ||
39 | * r15 = stack pointer | ||
40 | * spc | ||
41 | * pr | ||
42 | * ssr | ||
43 | * gbr | ||
44 | * mach | ||
45 | * macl | ||
46 | * syscall # | ||
47 | * | ||
48 | */ | ||
49 | |||
50 | #if defined(CONFIG_PREEMPT) | ||
51 | # define preempt_stop() cli | ||
52 | #else | ||
53 | # define preempt_stop() | ||
54 | # define resume_kernel __restore_all | ||
55 | #endif | ||
56 | |||
57 | #if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) | ||
58 | ! Handle kernel debug if either kgdb (SW) or gdb-stub (FW) is present. | ||
59 | ! If both are configured, handle the debug traps (breakpoints) in SW, | ||
60 | ! but still allow BIOS traps to FW. | ||
61 | |||
62 | .align 2 | ||
63 | debug_kernel: | ||
64 | #if defined(CONFIG_SH_STANDARD_BIOS) && defined(CONFIG_SH_KGDB) | ||
65 | /* Force BIOS call to FW (debug_trap put TRA in r8) */ | ||
66 | mov r8,r0 | ||
67 | shlr2 r0 | ||
68 | cmp/eq #0x3f,r0 | ||
69 | bt debug_kernel_fw | ||
70 | #endif /* CONFIG_SH_STANDARD_BIOS && CONFIG_SH_KGDB */ | ||
71 | |||
72 | debug_enter: | ||
73 | #if defined(CONFIG_SH_KGDB) | ||
74 | /* Jump to kgdb, pass stacked regs as arg */ | ||
75 | debug_kernel_sw: | ||
76 | mov.l 3f, r0 | ||
77 | jmp @r0 | ||
78 | mov r15, r4 | ||
79 | .align 2 | ||
80 | 3: .long kgdb_handle_exception | ||
81 | #endif /* CONFIG_SH_KGDB */ | ||
82 | #ifdef CONFIG_SH_STANDARD_BIOS | ||
83 | bra debug_kernel_fw | ||
84 | nop | ||
85 | #endif | ||
86 | #endif /* CONFIG_SH_STANDARD_BIOS || CONFIG_SH_KGDB */ | ||
87 | |||
88 | .align 2 | ||
89 | debug_trap: | ||
90 | #if defined(CONFIG_SH_STANDARD_BIOS) || defined(CONFIG_SH_KGDB) | ||
91 | mov r8, r0 | ||
92 | shlr2 r0 | ||
93 | cmp/eq #0x3f, r0 ! sh_bios() trap | ||
94 | bf 1f | ||
95 | #ifdef CONFIG_SH_KGDB | ||
96 | cmp/eq #0xff, r0 ! XXX: KGDB trap, fix for SH-2. | ||
97 | bf 1f | ||
98 | #endif | ||
99 | mov #OFF_SR, r0 | ||
100 | mov.l @(r0,r15), r0 ! get status register | ||
101 | shll r0 | ||
102 | shll r0 ! kernel space? | ||
103 | bt/s debug_kernel | ||
104 | 1: | ||
105 | #endif | ||
106 | mov.l @r15, r0 ! Restore R0 value | ||
107 | mov.l 1f, r8 | ||
108 | jmp @r8 | ||
109 | nop | ||
110 | |||
111 | .align 2 | ||
112 | ENTRY(exception_error) | ||
113 | ! | ||
114 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
115 | mov.l 3f, r0 | ||
116 | jsr @r0 | ||
117 | nop | ||
118 | #endif | ||
119 | sti | ||
120 | mov.l 2f, r0 | ||
121 | jmp @r0 | ||
122 | nop | ||
123 | |||
124 | ! | ||
125 | .align 2 | ||
126 | 1: .long break_point_trap_software | ||
127 | 2: .long do_exception_error | ||
128 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
129 | 3: .long trace_hardirqs_on | ||
130 | #endif | ||
131 | |||
132 | .align 2 | ||
133 | ret_from_exception: | ||
134 | preempt_stop() | ||
135 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
136 | mov.l 4f, r0 | ||
137 | jsr @r0 | ||
138 | nop | ||
139 | #endif | ||
140 | ENTRY(ret_from_irq) | ||
141 | ! | ||
142 | mov #OFF_SR, r0 | ||
143 | mov.l @(r0,r15), r0 ! get status register | ||
144 | shll r0 | ||
145 | shll r0 ! kernel space? | ||
146 | get_current_thread_info r8, r0 | ||
147 | bt resume_kernel ! Yes, it's from kernel, go back soon | ||
148 | |||
149 | #ifdef CONFIG_PREEMPT | ||
150 | bra resume_userspace | ||
151 | nop | ||
152 | ENTRY(resume_kernel) | ||
153 | mov.l @(TI_PRE_COUNT,r8), r0 ! current_thread_info->preempt_count | ||
154 | tst r0, r0 | ||
155 | bf noresched | ||
156 | need_resched: | ||
157 | mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags | ||
158 | tst #_TIF_NEED_RESCHED, r0 ! need_resched set? | ||
159 | bt noresched | ||
160 | |||
161 | mov #OFF_SR, r0 | ||
162 | mov.l @(r0,r15), r0 ! get status register | ||
163 | and #0xf0, r0 ! interrupts off (exception path)? | ||
164 | cmp/eq #0xf0, r0 | ||
165 | bt noresched | ||
166 | |||
167 | mov.l 1f, r0 | ||
168 | mov.l r0, @(TI_PRE_COUNT,r8) | ||
169 | |||
170 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
171 | mov.l 3f, r0 | ||
172 | jsr @r0 | ||
173 | nop | ||
174 | #endif | ||
175 | sti | ||
176 | mov.l 2f, r0 | ||
177 | jsr @r0 | ||
178 | nop | ||
179 | mov #0, r0 | ||
180 | mov.l r0, @(TI_PRE_COUNT,r8) | ||
181 | cli | ||
182 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
183 | mov.l 4f, r0 | ||
184 | jsr @r0 | ||
185 | nop | ||
186 | #endif | ||
187 | |||
188 | bra need_resched | ||
189 | nop | ||
190 | |||
191 | noresched: | ||
192 | bra __restore_all | ||
193 | nop | ||
194 | |||
195 | .align 2 | ||
196 | 1: .long PREEMPT_ACTIVE | ||
197 | 2: .long schedule | ||
198 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
199 | 3: .long trace_hardirqs_on | ||
200 | 4: .long trace_hardirqs_off | ||
201 | #endif | ||
202 | #endif | ||
203 | |||
204 | ENTRY(resume_userspace) | ||
205 | ! r8: current_thread_info | ||
206 | cli | ||
207 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
208 | mov.l 5f, r0 | ||
209 | jsr @r0 | ||
210 | nop | ||
211 | #endif | ||
212 | mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags | ||
213 | tst #_TIF_WORK_MASK, r0 | ||
214 | bt/s __restore_all | ||
215 | tst #_TIF_NEED_RESCHED, r0 | ||
216 | |||
217 | .align 2 | ||
218 | work_pending: | ||
219 | ! r0: current_thread_info->flags | ||
220 | ! r8: current_thread_info | ||
221 | ! t: result of "tst #_TIF_NEED_RESCHED, r0" | ||
222 | bf/s work_resched | ||
223 | tst #(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), r0 | ||
224 | work_notifysig: | ||
225 | bt/s __restore_all | ||
226 | mov r15, r4 | ||
227 | mov r12, r5 ! set arg1(save_r0) | ||
228 | mov r0, r6 | ||
229 | mov.l 2f, r1 | ||
230 | mov.l 3f, r0 | ||
231 | jmp @r1 | ||
232 | lds r0, pr | ||
233 | work_resched: | ||
234 | #ifndef CONFIG_PREEMPT | ||
235 | ! gUSA handling | ||
236 | mov.l @(OFF_SP,r15), r0 ! get user space stack pointer | ||
237 | mov r0, r1 | ||
238 | shll r0 | ||
239 | bf/s 1f | ||
240 | shll r0 | ||
241 | bf/s 1f | ||
242 | mov #OFF_PC, r0 | ||
243 | ! SP >= 0xc0000000 : gUSA mark | ||
244 | mov.l @(r0,r15), r2 ! get user space PC (program counter) | ||
245 | mov.l @(OFF_R0,r15), r3 ! end point | ||
246 | cmp/hs r3, r2 ! r2 >= r3? | ||
247 | bt 1f | ||
248 | add r3, r1 ! rewind point #2 | ||
249 | mov.l r1, @(r0,r15) ! reset PC to rewind point #2 | ||
250 | ! | ||
251 | 1: | ||
252 | #endif | ||
253 | mov.l 1f, r1 | ||
254 | jsr @r1 ! schedule | ||
255 | nop | ||
256 | cli | ||
257 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
258 | mov.l 5f, r0 | ||
259 | jsr @r0 | ||
260 | nop | ||
261 | #endif | ||
262 | ! | ||
263 | mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags | ||
264 | tst #_TIF_WORK_MASK, r0 | ||
265 | bt __restore_all | ||
266 | bra work_pending | ||
267 | tst #_TIF_NEED_RESCHED, r0 | ||
268 | |||
269 | .align 2 | ||
270 | 1: .long schedule | ||
271 | 2: .long do_notify_resume | ||
272 | 3: .long restore_all | ||
273 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
274 | 4: .long trace_hardirqs_on | ||
275 | 5: .long trace_hardirqs_off | ||
276 | #endif | ||
277 | |||
278 | .align 2 | ||
279 | syscall_exit_work: | ||
280 | ! r0: current_thread_info->flags | ||
281 | ! r8: current_thread_info | ||
282 | tst #_TIF_SYSCALL_TRACE, r0 | ||
283 | bt/s work_pending | ||
284 | tst #_TIF_NEED_RESCHED, r0 | ||
285 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
286 | mov.l 5f, r0 | ||
287 | jsr @r0 | ||
288 | nop | ||
289 | #endif | ||
290 | sti | ||
291 | ! XXX setup arguments... | ||
292 | mov.l 4f, r0 ! do_syscall_trace | ||
293 | jsr @r0 | ||
294 | nop | ||
295 | bra resume_userspace | ||
296 | nop | ||
297 | |||
298 | .align 2 | ||
299 | syscall_trace_entry: | ||
300 | ! Yes it is traced. | ||
301 | ! XXX setup arguments... | ||
302 | mov.l 4f, r11 ! Call do_syscall_trace which notifies | ||
303 | jsr @r11 ! superior (will chomp R[0-7]) | ||
304 | nop | ||
305 | ! Reload R0-R4 from kernel stack, where the | ||
306 | ! parent may have modified them using | ||
307 | ! ptrace(POKEUSR). (Note that R0-R2 are | ||
308 | ! used by the system call handler directly | ||
309 | ! from the kernel stack anyway, so don't need | ||
310 | ! to be reloaded here.) This allows the parent | ||
311 | ! to rewrite system calls and args on the fly. | ||
312 | mov.l @(OFF_R4,r15), r4 ! arg0 | ||
313 | mov.l @(OFF_R5,r15), r5 | ||
314 | mov.l @(OFF_R6,r15), r6 | ||
315 | mov.l @(OFF_R7,r15), r7 ! arg3 | ||
316 | mov.l @(OFF_R3,r15), r3 ! syscall_nr | ||
317 | ! | ||
318 | mov.l 2f, r10 ! Number of syscalls | ||
319 | cmp/hs r10, r3 | ||
320 | bf syscall_call | ||
321 | mov #-ENOSYS, r0 | ||
322 | bra syscall_exit | ||
323 | mov.l r0, @(OFF_R0,r15) ! Return value | ||
324 | |||
325 | __restore_all: | ||
326 | mov.l 1f, r0 | ||
327 | jmp @r0 | ||
328 | nop | ||
329 | |||
330 | .align 2 | ||
331 | 1: .long restore_all | ||
332 | |||
333 | .align 2 | ||
334 | not_syscall_tra: | ||
335 | bra debug_trap | ||
336 | nop | ||
337 | |||
338 | .align 2 | ||
339 | syscall_badsys: ! Bad syscall number | ||
340 | mov #-ENOSYS, r0 | ||
341 | bra resume_userspace | ||
342 | mov.l r0, @(OFF_R0,r15) ! Return value | ||
343 | |||
344 | |||
345 | /* | ||
346 | * Syscall interface: | ||
347 | * | ||
348 | * Syscall #: R3 | ||
349 | * Arguments #0 to #3: R4--R7 | ||
350 | * Arguments #4 to #6: R0, R1, R2 | ||
351 | * TRA: (number of arguments + 0x10) x 4 | ||
352 | * | ||
353 | * This code also handles delegating other traps to the BIOS/gdb stub | ||
354 | * according to: | ||
355 | * | ||
356 | * Trap number | ||
357 | * (TRA>>2) Purpose | ||
358 | * -------- ------- | ||
359 | * 0x0-0xf old syscall ABI | ||
360 | * 0x10-0x1f new syscall ABI | ||
361 | * 0x20-0xff delegated through debug_trap to BIOS/gdb stub. | ||
362 | * | ||
363 | * Note: When we're first called, the TRA value must be shifted | ||
364 | * right 2 bits in order to get the value that was used as the "trapa" | ||
365 | * argument. | ||
366 | */ | ||
367 | |||
368 | .align 2 | ||
369 | .globl ret_from_fork | ||
370 | ret_from_fork: | ||
371 | mov.l 1f, r8 | ||
372 | jsr @r8 | ||
373 | mov r0, r4 | ||
374 | bra syscall_exit | ||
375 | nop | ||
376 | .align 2 | ||
377 | 1: .long schedule_tail | ||
378 | ! | ||
379 | ENTRY(system_call) | ||
380 | #if !defined(CONFIG_CPU_SH2) | ||
381 | mov.l 1f, r9 | ||
382 | mov.l @r9, r8 ! Read from TRA (Trap Address) Register | ||
383 | #endif | ||
384 | ! | ||
385 | ! Is the trap argument >= 0x20? (TRA will be >= 0x80) | ||
386 | mov #0x7f, r9 | ||
387 | cmp/hi r9, r8 | ||
388 | bt/s not_syscall_tra | ||
389 | mov #OFF_TRA, r9 | ||
390 | add r15, r9 | ||
391 | mov.l r8, @r9 ! set TRA value to tra | ||
392 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
393 | mov.l 5f, r10 | ||
394 | jsr @r10 | ||
395 | nop | ||
396 | #endif | ||
397 | sti | ||
398 | |||
399 | ! | ||
400 | get_current_thread_info r8, r10 | ||
401 | mov.l @(TI_FLAGS,r8), r8 | ||
402 | mov #_TIF_SYSCALL_TRACE, r10 | ||
403 | tst r10, r8 | ||
404 | bf syscall_trace_entry | ||
405 | ! | ||
406 | mov.l 2f, r8 ! Number of syscalls | ||
407 | cmp/hs r8, r3 | ||
408 | bt syscall_badsys | ||
409 | ! | ||
410 | syscall_call: | ||
411 | shll2 r3 ! x4 | ||
412 | mov.l 3f, r8 ! Load the address of sys_call_table | ||
413 | add r8, r3 | ||
414 | mov.l @r3, r8 | ||
415 | jsr @r8 ! jump to specific syscall handler | ||
416 | nop | ||
417 | mov.l @(OFF_R0,r15), r12 ! save r0 | ||
418 | mov.l r0, @(OFF_R0,r15) ! save the return value | ||
419 | ! | ||
420 | syscall_exit: | ||
421 | cli | ||
422 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
423 | mov.l 6f, r0 | ||
424 | jsr @r0 | ||
425 | nop | ||
426 | #endif | ||
427 | ! | ||
428 | get_current_thread_info r8, r0 | ||
429 | mov.l @(TI_FLAGS,r8), r0 ! current_thread_info->flags | ||
430 | tst #_TIF_ALLWORK_MASK, r0 | ||
431 | bf syscall_exit_work | ||
432 | bra __restore_all | ||
433 | nop | ||
434 | .align 2 | ||
435 | #if !defined(CONFIG_CPU_SH2) | ||
436 | 1: .long TRA | ||
437 | #endif | ||
438 | 2: .long NR_syscalls | ||
439 | 3: .long sys_call_table | ||
440 | 4: .long do_syscall_trace | ||
441 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
442 | 5: .long trace_hardirqs_on | ||
443 | 6: .long trace_hardirqs_off | ||
444 | #endif | ||
diff --git a/arch/sh/kernel/head.S b/arch/sh/kernel/head.S index f5f53d14f245..71a3ad7d283e 100644 --- a/arch/sh/kernel/head.S +++ b/arch/sh/kernel/head.S | |||
@@ -33,7 +33,8 @@ ENTRY(empty_zero_page) | |||
33 | .long 0x00360000 /* INITRD_START */ | 33 | .long 0x00360000 /* INITRD_START */ |
34 | .long 0x000a0000 /* INITRD_SIZE */ | 34 | .long 0x000a0000 /* INITRD_SIZE */ |
35 | .long 0 | 35 | .long 0 |
36 | .balign 4096,0,4096 | 36 | 1: |
37 | .skip PAGE_SIZE - empty_zero_page - 1b | ||
37 | 38 | ||
38 | .text | 39 | .text |
39 | /* | 40 | /* |
@@ -53,8 +54,10 @@ ENTRY(_stext) | |||
53 | ldc r0, sr | 54 | ldc r0, sr |
54 | ! Initialize global interrupt mask | 55 | ! Initialize global interrupt mask |
55 | mov #0, r0 | 56 | mov #0, r0 |
57 | #ifdef CONFIG_CPU_HAS_SR_RB | ||
56 | ldc r0, r6_bank | 58 | ldc r0, r6_bank |
57 | 59 | #endif | |
60 | |||
58 | /* | 61 | /* |
59 | * Prefetch if possible to reduce cache miss penalty. | 62 | * Prefetch if possible to reduce cache miss penalty. |
60 | * | 63 | * |
@@ -68,11 +71,14 @@ ENTRY(_stext) | |||
68 | ! | 71 | ! |
69 | mov.l 2f, r0 | 72 | mov.l 2f, r0 |
70 | mov r0, r15 ! Set initial r15 (stack pointer) | 73 | mov r0, r15 ! Set initial r15 (stack pointer) |
71 | mov #(THREAD_SIZE >> 8), r1 | 74 | mov #(THREAD_SIZE >> 10), r1 |
72 | shll8 r1 ! r1 = THREAD_SIZE | 75 | shll8 r1 ! r1 = THREAD_SIZE |
76 | shll2 r1 | ||
73 | sub r1, r0 ! | 77 | sub r1, r0 ! |
78 | #ifdef CONFIG_CPU_HAS_SR_RB | ||
74 | ldc r0, r7_bank ! ... and initial thread_info | 79 | ldc r0, r7_bank ! ... and initial thread_info |
75 | 80 | #endif | |
81 | |||
76 | ! Clear BSS area | 82 | ! Clear BSS area |
77 | mov.l 3f, r1 | 83 | mov.l 3f, r1 |
78 | add #4, r1 | 84 | add #4, r1 |
@@ -95,7 +101,11 @@ ENTRY(_stext) | |||
95 | nop | 101 | nop |
96 | 102 | ||
97 | .balign 4 | 103 | .balign 4 |
104 | #if defined(CONFIG_CPU_SH2) | ||
105 | 1: .long 0x000000F0 ! IMASK=0xF | ||
106 | #else | ||
98 | 1: .long 0x400080F0 ! MD=1, RB=0, BL=0, FD=1, IMASK=0xF | 107 | 1: .long 0x400080F0 ! MD=1, RB=0, BL=0, FD=1, IMASK=0xF |
108 | #endif | ||
99 | 2: .long init_thread_union+THREAD_SIZE | 109 | 2: .long init_thread_union+THREAD_SIZE |
100 | 3: .long __bss_start | 110 | 3: .long __bss_start |
101 | 4: .long _end | 111 | 4: .long _end |
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index acf2602569c4..67be2b6e8cd1 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <linux/kernel_stat.h> | 12 | #include <linux/kernel_stat.h> |
13 | #include <linux/seq_file.h> | 13 | #include <linux/seq_file.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <asm/irq.h> | 15 | #include <linux/irq.h> |
16 | #include <asm/processor.h> | 16 | #include <asm/processor.h> |
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | #include <asm/thread_info.h> | 18 | #include <asm/thread_info.h> |
@@ -54,7 +54,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
54 | for_each_online_cpu(j) | 54 | for_each_online_cpu(j) |
55 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); | 55 | seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); |
56 | seq_printf(p, " %14s", irq_desc[i].chip->name); | 56 | seq_printf(p, " %14s", irq_desc[i].chip->name); |
57 | seq_printf(p, "-%s", handle_irq_name(irq_desc[i].handle_irq)); | 57 | seq_printf(p, "-%-8s", irq_desc[i].name); |
58 | seq_printf(p, " %s", action->name); | 58 | seq_printf(p, " %s", action->name); |
59 | 59 | ||
60 | for (action=action->next; action; action = action->next) | 60 | for (action=action->next; action; action = action->next) |
@@ -78,15 +78,16 @@ union irq_ctx { | |||
78 | u32 stack[THREAD_SIZE/sizeof(u32)]; | 78 | u32 stack[THREAD_SIZE/sizeof(u32)]; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static union irq_ctx *hardirq_ctx[NR_CPUS]; | 81 | static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly; |
82 | static union irq_ctx *softirq_ctx[NR_CPUS]; | 82 | static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, | 85 | asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, |
86 | unsigned long r6, unsigned long r7, | 86 | unsigned long r6, unsigned long r7, |
87 | struct pt_regs regs) | 87 | struct pt_regs __regs) |
88 | { | 88 | { |
89 | struct pt_regs *old_regs = set_irq_regs(®s); | 89 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
90 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
90 | int irq; | 91 | int irq; |
91 | #ifdef CONFIG_4KSTACKS | 92 | #ifdef CONFIG_4KSTACKS |
92 | union irq_ctx *curctx, *irqctx; | 93 | union irq_ctx *curctx, *irqctx; |
@@ -111,7 +112,7 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, | |||
111 | #endif | 112 | #endif |
112 | 113 | ||
113 | #ifdef CONFIG_CPU_HAS_INTEVT | 114 | #ifdef CONFIG_CPU_HAS_INTEVT |
114 | irq = (ctrl_inl(INTEVT) >> 5) - 16; | 115 | irq = evt2irq(ctrl_inl(INTEVT)); |
115 | #else | 116 | #else |
116 | irq = r4; | 117 | irq = r4; |
117 | #endif | 118 | #endif |
@@ -135,17 +136,24 @@ asmlinkage int do_IRQ(unsigned long r4, unsigned long r5, | |||
135 | irqctx->tinfo.task = curctx->tinfo.task; | 136 | irqctx->tinfo.task = curctx->tinfo.task; |
136 | irqctx->tinfo.previous_sp = current_stack_pointer; | 137 | irqctx->tinfo.previous_sp = current_stack_pointer; |
137 | 138 | ||
139 | /* | ||
140 | * Copy the softirq bits in preempt_count so that the | ||
141 | * softirq checks work in the hardirq context. | ||
142 | */ | ||
143 | irqctx->tinfo.preempt_count = | ||
144 | (irqctx->tinfo.preempt_count & ~SOFTIRQ_MASK) | | ||
145 | (curctx->tinfo.preempt_count & SOFTIRQ_MASK); | ||
146 | |||
138 | __asm__ __volatile__ ( | 147 | __asm__ __volatile__ ( |
139 | "mov %0, r4 \n" | 148 | "mov %0, r4 \n" |
140 | "mov r15, r9 \n" | 149 | "mov r15, r8 \n" |
141 | "jsr @%1 \n" | 150 | "jsr @%1 \n" |
142 | /* swith to the irq stack */ | 151 | /* swith to the irq stack */ |
143 | " mov %2, r15 \n" | 152 | " mov %2, r15 \n" |
144 | /* restore the stack (ring zero) */ | 153 | /* restore the stack (ring zero) */ |
145 | "mov r9, r15 \n" | 154 | "mov r8, r15 \n" |
146 | : /* no outputs */ | 155 | : /* no outputs */ |
147 | : "r" (irq), "r" (generic_handle_irq), "r" (isp) | 156 | : "r" (irq), "r" (generic_handle_irq), "r" (isp) |
148 | /* XXX: A somewhat excessive clobber list? -PFM */ | ||
149 | : "memory", "r0", "r1", "r2", "r3", "r4", | 157 | : "memory", "r0", "r1", "r2", "r3", "r4", |
150 | "r5", "r6", "r7", "r8", "t", "pr" | 158 | "r5", "r6", "r7", "r8", "t", "pr" |
151 | ); | 159 | ); |
@@ -193,7 +201,7 @@ void irq_ctx_init(int cpu) | |||
193 | irqctx->tinfo.task = NULL; | 201 | irqctx->tinfo.task = NULL; |
194 | irqctx->tinfo.exec_domain = NULL; | 202 | irqctx->tinfo.exec_domain = NULL; |
195 | irqctx->tinfo.cpu = cpu; | 203 | irqctx->tinfo.cpu = cpu; |
196 | irqctx->tinfo.preempt_count = SOFTIRQ_OFFSET; | 204 | irqctx->tinfo.preempt_count = 0; |
197 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); | 205 | irqctx->tinfo.addr_limit = MAKE_MM_SEG(0); |
198 | 206 | ||
199 | softirq_ctx[cpu] = irqctx; | 207 | softirq_ctx[cpu] = irqctx; |
@@ -239,13 +247,38 @@ asmlinkage void do_softirq(void) | |||
239 | "mov r9, r15 \n" | 247 | "mov r9, r15 \n" |
240 | : /* no outputs */ | 248 | : /* no outputs */ |
241 | : "r" (__do_softirq), "r" (isp) | 249 | : "r" (__do_softirq), "r" (isp) |
242 | /* XXX: A somewhat excessive clobber list? -PFM */ | ||
243 | : "memory", "r0", "r1", "r2", "r3", "r4", | 250 | : "memory", "r0", "r1", "r2", "r3", "r4", |
244 | "r5", "r6", "r7", "r8", "r9", "r15", "t", "pr" | 251 | "r5", "r6", "r7", "r8", "r9", "r15", "t", "pr" |
245 | ); | 252 | ); |
253 | |||
254 | /* | ||
255 | * Shouldnt happen, we returned above if in_interrupt(): | ||
256 | */ | ||
257 | WARN_ON_ONCE(softirq_count()); | ||
246 | } | 258 | } |
247 | 259 | ||
248 | local_irq_restore(flags); | 260 | local_irq_restore(flags); |
249 | } | 261 | } |
250 | EXPORT_SYMBOL(do_softirq); | 262 | EXPORT_SYMBOL(do_softirq); |
251 | #endif | 263 | #endif |
264 | |||
265 | void __init init_IRQ(void) | ||
266 | { | ||
267 | #ifdef CONFIG_CPU_HAS_PINT_IRQ | ||
268 | init_IRQ_pint(); | ||
269 | #endif | ||
270 | |||
271 | #ifdef CONFIG_CPU_HAS_INTC2_IRQ | ||
272 | init_IRQ_intc2(); | ||
273 | #endif | ||
274 | |||
275 | #ifdef CONFIG_CPU_HAS_IPR_IRQ | ||
276 | init_IRQ_ipr(); | ||
277 | #endif | ||
278 | |||
279 | /* Perform the machine specific initialisation */ | ||
280 | if (sh_mv.mv_init_irq) | ||
281 | sh_mv.mv_init_irq(); | ||
282 | |||
283 | irq_ctx_init(smp_processor_id()); | ||
284 | } | ||
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index 91516dca4a85..486c06e18033 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -105,7 +105,7 @@ void show_regs(struct pt_regs * regs) | |||
105 | { | 105 | { |
106 | printk("\n"); | 106 | printk("\n"); |
107 | printk("Pid : %d, Comm: %20s\n", current->pid, current->comm); | 107 | printk("Pid : %d, Comm: %20s\n", current->pid, current->comm); |
108 | print_symbol("PC is at %s\n", regs->pc); | 108 | print_symbol("PC is at %s\n", instruction_pointer(regs)); |
109 | printk("PC : %08lx SP : %08lx SR : %08lx ", | 109 | printk("PC : %08lx SP : %08lx SR : %08lx ", |
110 | regs->pc, regs->regs[15], regs->sr); | 110 | regs->pc, regs->regs[15], regs->sr); |
111 | #ifdef CONFIG_MMU | 111 | #ifdef CONFIG_MMU |
@@ -130,15 +130,7 @@ void show_regs(struct pt_regs * regs) | |||
130 | printk("MACH: %08lx MACL: %08lx GBR : %08lx PR : %08lx\n", | 130 | printk("MACH: %08lx MACL: %08lx GBR : %08lx PR : %08lx\n", |
131 | regs->mach, regs->macl, regs->gbr, regs->pr); | 131 | regs->mach, regs->macl, regs->gbr, regs->pr); |
132 | 132 | ||
133 | /* | 133 | show_trace(NULL, (unsigned long *)regs->regs[15], regs); |
134 | * If we're in kernel mode, dump the stack too.. | ||
135 | */ | ||
136 | if (!user_mode(regs)) { | ||
137 | extern void show_task(unsigned long *sp); | ||
138 | unsigned long sp = regs->regs[15]; | ||
139 | |||
140 | show_task((unsigned long *)sp); | ||
141 | } | ||
142 | } | 134 | } |
143 | 135 | ||
144 | /* | 136 | /* |
@@ -393,10 +385,11 @@ struct task_struct *__switch_to(struct task_struct *prev, struct task_struct *ne | |||
393 | 385 | ||
394 | asmlinkage int sys_fork(unsigned long r4, unsigned long r5, | 386 | asmlinkage int sys_fork(unsigned long r4, unsigned long r5, |
395 | unsigned long r6, unsigned long r7, | 387 | unsigned long r6, unsigned long r7, |
396 | struct pt_regs regs) | 388 | struct pt_regs __regs) |
397 | { | 389 | { |
390 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
398 | #ifdef CONFIG_MMU | 391 | #ifdef CONFIG_MMU |
399 | return do_fork(SIGCHLD, regs.regs[15], ®s, 0, NULL, NULL); | 392 | return do_fork(SIGCHLD, regs->regs[15], regs, 0, NULL, NULL); |
400 | #else | 393 | #else |
401 | /* fork almost works, enough to trick you into looking elsewhere :-( */ | 394 | /* fork almost works, enough to trick you into looking elsewhere :-( */ |
402 | return -EINVAL; | 395 | return -EINVAL; |
@@ -406,11 +399,12 @@ asmlinkage int sys_fork(unsigned long r4, unsigned long r5, | |||
406 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | 399 | asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, |
407 | unsigned long parent_tidptr, | 400 | unsigned long parent_tidptr, |
408 | unsigned long child_tidptr, | 401 | unsigned long child_tidptr, |
409 | struct pt_regs regs) | 402 | struct pt_regs __regs) |
410 | { | 403 | { |
404 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
411 | if (!newsp) | 405 | if (!newsp) |
412 | newsp = regs.regs[15]; | 406 | newsp = regs->regs[15]; |
413 | return do_fork(clone_flags, newsp, ®s, 0, | 407 | return do_fork(clone_flags, newsp, regs, 0, |
414 | (int __user *)parent_tidptr, (int __user *)child_tidptr); | 408 | (int __user *)parent_tidptr, (int __user *)child_tidptr); |
415 | } | 409 | } |
416 | 410 | ||
@@ -426,9 +420,10 @@ asmlinkage int sys_clone(unsigned long clone_flags, unsigned long newsp, | |||
426 | */ | 420 | */ |
427 | asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, | 421 | asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, |
428 | unsigned long r6, unsigned long r7, | 422 | unsigned long r6, unsigned long r7, |
429 | struct pt_regs regs) | 423 | struct pt_regs __regs) |
430 | { | 424 | { |
431 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.regs[15], ®s, | 425 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
426 | return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->regs[15], regs, | ||
432 | 0, NULL, NULL); | 427 | 0, NULL, NULL); |
433 | } | 428 | } |
434 | 429 | ||
@@ -437,8 +432,9 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, | |||
437 | */ | 432 | */ |
438 | asmlinkage int sys_execve(char *ufilename, char **uargv, | 433 | asmlinkage int sys_execve(char *ufilename, char **uargv, |
439 | char **uenvp, unsigned long r7, | 434 | char **uenvp, unsigned long r7, |
440 | struct pt_regs regs) | 435 | struct pt_regs __regs) |
441 | { | 436 | { |
437 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
442 | int error; | 438 | int error; |
443 | char *filename; | 439 | char *filename; |
444 | 440 | ||
@@ -450,7 +446,7 @@ asmlinkage int sys_execve(char *ufilename, char **uargv, | |||
450 | error = do_execve(filename, | 446 | error = do_execve(filename, |
451 | (char __user * __user *)uargv, | 447 | (char __user * __user *)uargv, |
452 | (char __user * __user *)uenvp, | 448 | (char __user * __user *)uenvp, |
453 | ®s); | 449 | regs); |
454 | if (error == 0) { | 450 | if (error == 0) { |
455 | task_lock(current); | 451 | task_lock(current); |
456 | current->ptrace &= ~PT_DTRACE; | 452 | current->ptrace &= ~PT_DTRACE; |
@@ -474,15 +470,14 @@ unsigned long get_wchan(struct task_struct *p) | |||
474 | */ | 470 | */ |
475 | pc = thread_saved_pc(p); | 471 | pc = thread_saved_pc(p); |
476 | if (in_sched_functions(pc)) { | 472 | if (in_sched_functions(pc)) { |
477 | schedule_frame = ((unsigned long *)(long)p->thread.sp)[1]; | 473 | schedule_frame = (unsigned long)p->thread.sp; |
478 | return (unsigned long)((unsigned long *)schedule_frame)[1]; | 474 | return ((unsigned long *)schedule_frame)[21]; |
479 | } | 475 | } |
476 | |||
480 | return pc; | 477 | return pc; |
481 | } | 478 | } |
482 | 479 | ||
483 | asmlinkage void break_point_trap(unsigned long r4, unsigned long r5, | 480 | asmlinkage void break_point_trap(void) |
484 | unsigned long r6, unsigned long r7, | ||
485 | struct pt_regs regs) | ||
486 | { | 481 | { |
487 | /* Clear tracing. */ | 482 | /* Clear tracing. */ |
488 | #if defined(CONFIG_CPU_SH4A) | 483 | #if defined(CONFIG_CPU_SH4A) |
@@ -500,8 +495,20 @@ asmlinkage void break_point_trap(unsigned long r4, unsigned long r5, | |||
500 | 495 | ||
501 | asmlinkage void break_point_trap_software(unsigned long r4, unsigned long r5, | 496 | asmlinkage void break_point_trap_software(unsigned long r4, unsigned long r5, |
502 | unsigned long r6, unsigned long r7, | 497 | unsigned long r6, unsigned long r7, |
503 | struct pt_regs regs) | 498 | struct pt_regs __regs) |
504 | { | 499 | { |
505 | regs.pc -= 2; | 500 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
501 | |||
502 | /* Rewind */ | ||
503 | regs->pc -= 2; | ||
504 | |||
505 | #ifdef CONFIG_BUG | ||
506 | if (__kernel_text_address(instruction_pointer(regs))) { | ||
507 | u16 insn = *(u16 *)instruction_pointer(regs); | ||
508 | if (insn == TRAPA_BUG_OPCODE) | ||
509 | handle_BUG(regs); | ||
510 | } | ||
511 | #endif | ||
512 | |||
506 | force_sig(SIGTRAP, current); | 513 | force_sig(SIGTRAP, current); |
507 | } | 514 | } |
diff --git a/arch/sh/kernel/relocate_kernel.S b/arch/sh/kernel/relocate_kernel.S index 8221b37c9773..c66cb3209db5 100644 --- a/arch/sh/kernel/relocate_kernel.S +++ b/arch/sh/kernel/relocate_kernel.S | |||
@@ -7,11 +7,9 @@ | |||
7 | * This source code is licensed under the GNU General Public License, | 7 | * This source code is licensed under the GNU General Public License, |
8 | * Version 2. See the file COPYING for more details. | 8 | * Version 2. See the file COPYING for more details. |
9 | */ | 9 | */ |
10 | |||
11 | #include <linux/linkage.h> | 10 | #include <linux/linkage.h> |
12 | 11 | #include <asm/addrspace.h> | |
13 | #define PAGE_SIZE 4096 /* must be same value as in <asm/page.h> */ | 12 | #include <asm/page.h> |
14 | |||
15 | 13 | ||
16 | .globl relocate_new_kernel | 14 | .globl relocate_new_kernel |
17 | relocate_new_kernel: | 15 | relocate_new_kernel: |
@@ -20,8 +18,8 @@ relocate_new_kernel: | |||
20 | /* r6 = start_address */ | 18 | /* r6 = start_address */ |
21 | /* r7 = vbr_reg */ | 19 | /* r7 = vbr_reg */ |
22 | 20 | ||
23 | mov.l 10f,r8 /* 4096 */ | 21 | mov.l 10f,r8 /* PAGE_SIZE */ |
24 | mov.l 11f,r9 /* 0xa0000000 */ | 22 | mov.l 11f,r9 /* P2SEG */ |
25 | 23 | ||
26 | /* stack setting */ | 24 | /* stack setting */ |
27 | add r8,r5 | 25 | add r8,r5 |
@@ -32,7 +30,7 @@ relocate_new_kernel: | |||
32 | 0: | 30 | 0: |
33 | mov.l @r4+,r0 /* cmd = *ind++ */ | 31 | mov.l @r4+,r0 /* cmd = *ind++ */ |
34 | 32 | ||
35 | 1: /* addr = (cmd | 0xa0000000) & 0xfffffff0 */ | 33 | 1: /* addr = (cmd | P2SEG) & 0xfffffff0 */ |
36 | mov r0,r2 | 34 | mov r0,r2 |
37 | or r9,r2 | 35 | or r9,r2 |
38 | mov #-16,r1 | 36 | mov #-16,r1 |
@@ -92,7 +90,7 @@ relocate_new_kernel: | |||
92 | 10: | 90 | 10: |
93 | .long PAGE_SIZE | 91 | .long PAGE_SIZE |
94 | 11: | 92 | 11: |
95 | .long 0xa0000000 | 93 | .long P2SEG |
96 | 94 | ||
97 | relocate_new_kernel_end: | 95 | relocate_new_kernel_end: |
98 | 96 | ||
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 36d86f9ac38a..225f9ea5cdd7 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -84,8 +84,7 @@ unsigned long memory_start, memory_end; | |||
84 | 84 | ||
85 | static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | 85 | static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], |
86 | struct sh_machine_vector** mvp, | 86 | struct sh_machine_vector** mvp, |
87 | unsigned long *mv_io_base, | 87 | unsigned long *mv_io_base) |
88 | int *mv_mmio_enable) | ||
89 | { | 88 | { |
90 | char c = ' ', *to = command_line, *from = COMMAND_LINE; | 89 | char c = ' ', *to = command_line, *from = COMMAND_LINE; |
91 | int len = 0; | 90 | int len = 0; |
@@ -112,23 +111,6 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
112 | } | 111 | } |
113 | } | 112 | } |
114 | 113 | ||
115 | #ifdef CONFIG_EARLY_PRINTK | ||
116 | if (c == ' ' && !memcmp(from, "earlyprintk=", 12)) { | ||
117 | char *ep_end; | ||
118 | |||
119 | if (to != command_line) | ||
120 | to--; | ||
121 | |||
122 | from += 12; | ||
123 | ep_end = strchr(from, ' '); | ||
124 | |||
125 | setup_early_printk(from); | ||
126 | printk("early console enabled\n"); | ||
127 | |||
128 | from = ep_end; | ||
129 | } | ||
130 | #endif | ||
131 | |||
132 | if (c == ' ' && !memcmp(from, "sh_mv=", 6)) { | 114 | if (c == ' ' && !memcmp(from, "sh_mv=", 6)) { |
133 | char* mv_end; | 115 | char* mv_end; |
134 | char* mv_comma; | 116 | char* mv_comma; |
@@ -145,7 +127,6 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
145 | int ints[3]; | 127 | int ints[3]; |
146 | get_options(mv_comma+1, ARRAY_SIZE(ints), ints); | 128 | get_options(mv_comma+1, ARRAY_SIZE(ints), ints); |
147 | *mv_io_base = ints[1]; | 129 | *mv_io_base = ints[1]; |
148 | *mv_mmio_enable = ints[2]; | ||
149 | mv_len = mv_comma - from; | 130 | mv_len = mv_comma - from; |
150 | } else { | 131 | } else { |
151 | mv_len = mv_end - from; | 132 | mv_len = mv_end - from; |
@@ -158,6 +139,7 @@ static inline void parse_cmdline (char ** cmdline_p, char mv_name[MV_NAME_SIZE], | |||
158 | 139 | ||
159 | *mvp = get_mv_byname(mv_name); | 140 | *mvp = get_mv_byname(mv_name); |
160 | } | 141 | } |
142 | |||
161 | c = *(from++); | 143 | c = *(from++); |
162 | if (!c) | 144 | if (!c) |
163 | break; | 145 | break; |
@@ -177,9 +159,8 @@ static int __init sh_mv_setup(char **cmdline_p) | |||
177 | struct sh_machine_vector *mv = NULL; | 159 | struct sh_machine_vector *mv = NULL; |
178 | char mv_name[MV_NAME_SIZE] = ""; | 160 | char mv_name[MV_NAME_SIZE] = ""; |
179 | unsigned long mv_io_base = 0; | 161 | unsigned long mv_io_base = 0; |
180 | int mv_mmio_enable = 0; | ||
181 | 162 | ||
182 | parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable); | 163 | parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base); |
183 | 164 | ||
184 | #ifdef CONFIG_SH_UNKNOWN | 165 | #ifdef CONFIG_SH_UNKNOWN |
185 | if (mv == NULL) { | 166 | if (mv == NULL) { |
@@ -258,6 +239,7 @@ void __init setup_arch(char **cmdline_p) | |||
258 | 239 | ||
259 | sh_mv_setup(cmdline_p); | 240 | sh_mv_setup(cmdline_p); |
260 | 241 | ||
242 | |||
261 | /* | 243 | /* |
262 | * Find the highest page frame number we have available | 244 | * Find the highest page frame number we have available |
263 | */ | 245 | */ |
@@ -305,6 +287,7 @@ void __init setup_arch(char **cmdline_p) | |||
305 | PFN_PHYS(pages)); | 287 | PFN_PHYS(pages)); |
306 | } | 288 | } |
307 | 289 | ||
290 | |||
308 | /* | 291 | /* |
309 | * Reserve the kernel text and | 292 | * Reserve the kernel text and |
310 | * Reserve the bootmem bitmap. We do this in two steps (first step | 293 | * Reserve the bootmem bitmap. We do this in two steps (first step |
@@ -325,15 +308,18 @@ void __init setup_arch(char **cmdline_p) | |||
325 | ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); | 308 | ROOT_DEV = MKDEV(RAMDISK_MAJOR, 0); |
326 | if (&__rd_start != &__rd_end) { | 309 | if (&__rd_start != &__rd_end) { |
327 | LOADER_TYPE = 1; | 310 | LOADER_TYPE = 1; |
328 | INITRD_START = PHYSADDR((unsigned long)&__rd_start) - __MEMORY_START; | 311 | INITRD_START = PHYSADDR((unsigned long)&__rd_start) - |
329 | INITRD_SIZE = (unsigned long)&__rd_end - (unsigned long)&__rd_start; | 312 | __MEMORY_START; |
313 | INITRD_SIZE = (unsigned long)&__rd_end - | ||
314 | (unsigned long)&__rd_start; | ||
330 | } | 315 | } |
331 | 316 | ||
332 | if (LOADER_TYPE && INITRD_START) { | 317 | if (LOADER_TYPE && INITRD_START) { |
333 | if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { | 318 | if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { |
334 | reserve_bootmem_node(NODE_DATA(0), INITRD_START+__MEMORY_START, INITRD_SIZE); | 319 | reserve_bootmem_node(NODE_DATA(0), INITRD_START + |
335 | initrd_start = | 320 | __MEMORY_START, INITRD_SIZE); |
336 | INITRD_START ? INITRD_START + PAGE_OFFSET + __MEMORY_START : 0; | 321 | initrd_start = INITRD_START + PAGE_OFFSET + |
322 | __MEMORY_START; | ||
337 | initrd_end = initrd_start + INITRD_SIZE; | 323 | initrd_end = initrd_start + INITRD_SIZE; |
338 | } else { | 324 | } else { |
339 | printk("initrd extends beyond end of memory " | 325 | printk("initrd extends beyond end of memory " |
@@ -392,6 +378,7 @@ static int __init topology_init(void) | |||
392 | subsys_initcall(topology_init); | 378 | subsys_initcall(topology_init); |
393 | 379 | ||
394 | static const char *cpu_name[] = { | 380 | static const char *cpu_name[] = { |
381 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", | ||
395 | [CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300", | 382 | [CPU_SH7604] = "SH7604", [CPU_SH7300] = "SH7300", |
396 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", | 383 | [CPU_SH7705] = "SH7705", [CPU_SH7706] = "SH7706", |
397 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", | 384 | [CPU_SH7707] = "SH7707", [CPU_SH7708] = "SH7708", |
@@ -404,6 +391,7 @@ static const char *cpu_name[] = { | |||
404 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", | 391 | [CPU_SH4_202] = "SH4-202", [CPU_SH4_501] = "SH4-501", |
405 | [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", | 392 | [CPU_SH7770] = "SH7770", [CPU_SH7780] = "SH7780", |
406 | [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", | 393 | [CPU_SH7781] = "SH7781", [CPU_SH7343] = "SH7343", |
394 | [CPU_SH7785] = "SH7785", [CPU_SH7722] = "SH7722", | ||
407 | [CPU_SH_NONE] = "Unknown" | 395 | [CPU_SH_NONE] = "Unknown" |
408 | }; | 396 | }; |
409 | 397 | ||
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index 9daad70bc305..e6106239a0fe 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <asm/delay.h> | 18 | #include <asm/delay.h> |
19 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
20 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
21 | #include <asm/checksum.h> | ||
22 | 21 | ||
23 | extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); | 22 | extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); |
24 | extern struct hw_interrupt_type no_irq_type; | 23 | extern struct hw_interrupt_type no_irq_type; |
@@ -71,15 +70,26 @@ DECLARE_EXPORT(__sdivsi3); | |||
71 | DECLARE_EXPORT(__ashrdi3); | 70 | DECLARE_EXPORT(__ashrdi3); |
72 | DECLARE_EXPORT(__ashldi3); | 71 | DECLARE_EXPORT(__ashldi3); |
73 | DECLARE_EXPORT(__lshrdi3); | 72 | DECLARE_EXPORT(__lshrdi3); |
74 | DECLARE_EXPORT(__movstr); | ||
75 | DECLARE_EXPORT(__movstrSI16); | 73 | DECLARE_EXPORT(__movstrSI16); |
76 | 74 | #if __GNUC__ == 4 | |
77 | EXPORT_SYMBOL(strcpy); | 75 | DECLARE_EXPORT(__movmem); |
76 | #else | ||
77 | DECLARE_EXPORT(__movstr); | ||
78 | #endif | ||
78 | 79 | ||
79 | #ifdef CONFIG_CPU_SH4 | 80 | #ifdef CONFIG_CPU_SH4 |
81 | #if __GNUC__ == 4 | ||
82 | DECLARE_EXPORT(__movmem_i4_even); | ||
83 | DECLARE_EXPORT(__movmem_i4_odd); | ||
84 | DECLARE_EXPORT(__movmemSI12_i4); | ||
85 | DECLARE_EXPORT(__sdivsi3_i4i); | ||
86 | DECLARE_EXPORT(__udiv_qrnnd_16); | ||
87 | DECLARE_EXPORT(__udivsi3_i4i); | ||
88 | #else /* GCC 3.x */ | ||
80 | DECLARE_EXPORT(__movstr_i4_even); | 89 | DECLARE_EXPORT(__movstr_i4_even); |
81 | DECLARE_EXPORT(__movstr_i4_odd); | 90 | DECLARE_EXPORT(__movstr_i4_odd); |
82 | DECLARE_EXPORT(__movstrSI12_i4); | 91 | DECLARE_EXPORT(__movstrSI12_i4); |
92 | #endif /* __GNUC__ == 4 */ | ||
83 | #endif | 93 | #endif |
84 | 94 | ||
85 | #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) | 95 | #if defined(CONFIG_CPU_SH4) || defined(CONFIG_SH7705_CACHE_32KB) |
@@ -102,10 +112,6 @@ EXPORT_SYMBOL(__down_trylock); | |||
102 | EXPORT_SYMBOL(synchronize_irq); | 112 | EXPORT_SYMBOL(synchronize_irq); |
103 | #endif | 113 | #endif |
104 | 114 | ||
105 | #ifdef CONFIG_PM | ||
106 | EXPORT_SYMBOL(pm_suspend); | ||
107 | #endif | ||
108 | |||
109 | EXPORT_SYMBOL(csum_partial); | 115 | EXPORT_SYMBOL(csum_partial); |
110 | #ifdef CONFIG_IPV6 | 116 | #ifdef CONFIG_IPV6 |
111 | EXPORT_SYMBOL(csum_ipv6_magic); | 117 | EXPORT_SYMBOL(csum_ipv6_magic); |
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index 5213f5bc6ce0..379c88bf5d9a 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/elf.h> | 23 | #include <linux/elf.h> |
24 | #include <linux/personality.h> | 24 | #include <linux/personality.h> |
25 | #include <linux/binfmts.h> | 25 | #include <linux/binfmts.h> |
26 | #include <linux/freezer.h> | ||
26 | 27 | ||
27 | #include <asm/ucontext.h> | 28 | #include <asm/ucontext.h> |
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
@@ -37,7 +38,7 @@ | |||
37 | asmlinkage int | 38 | asmlinkage int |
38 | sys_sigsuspend(old_sigset_t mask, | 39 | sys_sigsuspend(old_sigset_t mask, |
39 | unsigned long r5, unsigned long r6, unsigned long r7, | 40 | unsigned long r5, unsigned long r6, unsigned long r7, |
40 | struct pt_regs regs) | 41 | struct pt_regs __regs) |
41 | { | 42 | { |
42 | mask &= _BLOCKABLE; | 43 | mask &= _BLOCKABLE; |
43 | spin_lock_irq(¤t->sighand->siglock); | 44 | spin_lock_irq(¤t->sighand->siglock); |
@@ -52,7 +53,7 @@ sys_sigsuspend(old_sigset_t mask, | |||
52 | return -ERESTARTNOHAND; | 53 | return -ERESTARTNOHAND; |
53 | } | 54 | } |
54 | 55 | ||
55 | asmlinkage int | 56 | asmlinkage int |
56 | sys_sigaction(int sig, const struct old_sigaction __user *act, | 57 | sys_sigaction(int sig, const struct old_sigaction __user *act, |
57 | struct old_sigaction __user *oact) | 58 | struct old_sigaction __user *oact) |
58 | { | 59 | { |
@@ -87,9 +88,11 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
87 | asmlinkage int | 88 | asmlinkage int |
88 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | 89 | sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, |
89 | unsigned long r6, unsigned long r7, | 90 | unsigned long r6, unsigned long r7, |
90 | struct pt_regs regs) | 91 | struct pt_regs __regs) |
91 | { | 92 | { |
92 | return do_sigaltstack(uss, uoss, regs.regs[15]); | 93 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
94 | |||
95 | return do_sigaltstack(uss, uoss, regs->regs[15]); | ||
93 | } | 96 | } |
94 | 97 | ||
95 | 98 | ||
@@ -98,7 +101,11 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | |||
98 | */ | 101 | */ |
99 | 102 | ||
100 | #define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */ | 103 | #define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */ |
101 | #define TRAP16 0xc310 /* Syscall w/no args (NR in R3) */ | 104 | #if defined(CONFIG_CPU_SH2) |
105 | #define TRAP_NOARG 0xc320 /* Syscall w/no args (NR in R3) */ | ||
106 | #else | ||
107 | #define TRAP_NOARG 0xc310 /* Syscall w/no args (NR in R3) */ | ||
108 | #endif | ||
102 | #define OR_R0_R0 0x200b /* or r0,r0 (insert to avoid hardware bug) */ | 109 | #define OR_R0_R0 0x200b /* or r0,r0 (insert to avoid hardware bug) */ |
103 | 110 | ||
104 | struct sigframe | 111 | struct sigframe |
@@ -194,9 +201,10 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p | |||
194 | 201 | ||
195 | asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5, | 202 | asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5, |
196 | unsigned long r6, unsigned long r7, | 203 | unsigned long r6, unsigned long r7, |
197 | struct pt_regs regs) | 204 | struct pt_regs __regs) |
198 | { | 205 | { |
199 | struct sigframe __user *frame = (struct sigframe __user *)regs.regs[15]; | 206 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
207 | struct sigframe __user *frame = (struct sigframe __user *)regs->regs[15]; | ||
200 | sigset_t set; | 208 | sigset_t set; |
201 | int r0; | 209 | int r0; |
202 | 210 | ||
@@ -216,7 +224,7 @@ asmlinkage int sys_sigreturn(unsigned long r4, unsigned long r5, | |||
216 | recalc_sigpending(); | 224 | recalc_sigpending(); |
217 | spin_unlock_irq(¤t->sighand->siglock); | 225 | spin_unlock_irq(¤t->sighand->siglock); |
218 | 226 | ||
219 | if (restore_sigcontext(®s, &frame->sc, &r0)) | 227 | if (restore_sigcontext(regs, &frame->sc, &r0)) |
220 | goto badframe; | 228 | goto badframe; |
221 | return r0; | 229 | return r0; |
222 | 230 | ||
@@ -227,9 +235,10 @@ badframe: | |||
227 | 235 | ||
228 | asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5, | 236 | asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5, |
229 | unsigned long r6, unsigned long r7, | 237 | unsigned long r6, unsigned long r7, |
230 | struct pt_regs regs) | 238 | struct pt_regs __regs) |
231 | { | 239 | { |
232 | struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs.regs[15]; | 240 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
241 | struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->regs[15]; | ||
233 | sigset_t set; | 242 | sigset_t set; |
234 | stack_t st; | 243 | stack_t st; |
235 | int r0; | 244 | int r0; |
@@ -246,14 +255,14 @@ asmlinkage int sys_rt_sigreturn(unsigned long r4, unsigned long r5, | |||
246 | recalc_sigpending(); | 255 | recalc_sigpending(); |
247 | spin_unlock_irq(¤t->sighand->siglock); | 256 | spin_unlock_irq(¤t->sighand->siglock); |
248 | 257 | ||
249 | if (restore_sigcontext(®s, &frame->uc.uc_mcontext, &r0)) | 258 | if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &r0)) |
250 | goto badframe; | 259 | goto badframe; |
251 | 260 | ||
252 | if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) | 261 | if (__copy_from_user(&st, &frame->uc.uc_stack, sizeof(st))) |
253 | goto badframe; | 262 | goto badframe; |
254 | /* It is more difficult to avoid calling this function than to | 263 | /* It is more difficult to avoid calling this function than to |
255 | call it and ignore errors. */ | 264 | call it and ignore errors. */ |
256 | do_sigaltstack(&st, NULL, regs.regs[15]); | 265 | do_sigaltstack(&st, NULL, regs->regs[15]); |
257 | 266 | ||
258 | return r0; | 267 | return r0; |
259 | 268 | ||
@@ -350,7 +359,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, | |||
350 | } else { | 359 | } else { |
351 | /* Generate return code (system call to sigreturn) */ | 360 | /* Generate return code (system call to sigreturn) */ |
352 | err |= __put_user(MOVW(7), &frame->retcode[0]); | 361 | err |= __put_user(MOVW(7), &frame->retcode[0]); |
353 | err |= __put_user(TRAP16, &frame->retcode[1]); | 362 | err |= __put_user(TRAP_NOARG, &frame->retcode[1]); |
354 | err |= __put_user(OR_R0_R0, &frame->retcode[2]); | 363 | err |= __put_user(OR_R0_R0, &frame->retcode[2]); |
355 | err |= __put_user(OR_R0_R0, &frame->retcode[3]); | 364 | err |= __put_user(OR_R0_R0, &frame->retcode[3]); |
356 | err |= __put_user(OR_R0_R0, &frame->retcode[4]); | 365 | err |= __put_user(OR_R0_R0, &frame->retcode[4]); |
@@ -430,7 +439,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
430 | } else { | 439 | } else { |
431 | /* Generate return code (system call to rt_sigreturn) */ | 440 | /* Generate return code (system call to rt_sigreturn) */ |
432 | err |= __put_user(MOVW(7), &frame->retcode[0]); | 441 | err |= __put_user(MOVW(7), &frame->retcode[0]); |
433 | err |= __put_user(TRAP16, &frame->retcode[1]); | 442 | err |= __put_user(TRAP_NOARG, &frame->retcode[1]); |
434 | err |= __put_user(OR_R0_R0, &frame->retcode[2]); | 443 | err |= __put_user(OR_R0_R0, &frame->retcode[2]); |
435 | err |= __put_user(OR_R0_R0, &frame->retcode[3]); | 444 | err |= __put_user(OR_R0_R0, &frame->retcode[3]); |
436 | err |= __put_user(OR_R0_R0, &frame->retcode[4]); | 445 | err |= __put_user(OR_R0_R0, &frame->retcode[4]); |
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c new file mode 100644 index 000000000000..0d5268afe80f --- /dev/null +++ b/arch/sh/kernel/stacktrace.c | |||
@@ -0,0 +1,43 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/stacktrace.c | ||
3 | * | ||
4 | * Stack trace management functions | ||
5 | * | ||
6 | * Copyright (C) 2006 Paul Mundt | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | #include <linux/sched.h> | ||
13 | #include <linux/stacktrace.h> | ||
14 | #include <linux/thread_info.h> | ||
15 | #include <asm/ptrace.h> | ||
16 | |||
17 | /* | ||
18 | * Save stack-backtrace addresses into a stack_trace buffer. | ||
19 | */ | ||
20 | void save_stack_trace(struct stack_trace *trace, struct task_struct *task) | ||
21 | { | ||
22 | unsigned long *sp; | ||
23 | |||
24 | if (!task) | ||
25 | task = current; | ||
26 | if (task == current) | ||
27 | sp = (unsigned long *)current_stack_pointer; | ||
28 | else | ||
29 | sp = (unsigned long *)task->thread.sp; | ||
30 | |||
31 | while (!kstack_end(sp)) { | ||
32 | unsigned long addr = *sp++; | ||
33 | |||
34 | if (__kernel_text_address(addr)) { | ||
35 | if (trace->skip > 0) | ||
36 | trace->skip--; | ||
37 | else | ||
38 | trace->entries[trace->nr_entries++] = addr; | ||
39 | if (trace->nr_entries >= trace->max_entries) | ||
40 | break; | ||
41 | } | ||
42 | } | ||
43 | } | ||
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c index 8fde95001c34..e18f183e1035 100644 --- a/arch/sh/kernel/sys_sh.c +++ b/arch/sh/kernel/sys_sh.c | |||
@@ -33,14 +33,15 @@ | |||
33 | */ | 33 | */ |
34 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, | 34 | asmlinkage int sys_pipe(unsigned long r4, unsigned long r5, |
35 | unsigned long r6, unsigned long r7, | 35 | unsigned long r6, unsigned long r7, |
36 | struct pt_regs regs) | 36 | struct pt_regs __regs) |
37 | { | 37 | { |
38 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
38 | int fd[2]; | 39 | int fd[2]; |
39 | int error; | 40 | int error; |
40 | 41 | ||
41 | error = do_pipe(fd); | 42 | error = do_pipe(fd); |
42 | if (!error) { | 43 | if (!error) { |
43 | regs.regs[1] = fd[1]; | 44 | regs->regs[1] = fd[1]; |
44 | return fd[0]; | 45 | return fd[0]; |
45 | } | 46 | } |
46 | return error; | 47 | return error; |
@@ -50,6 +51,7 @@ unsigned long shm_align_mask = PAGE_SIZE - 1; /* Sane caches */ | |||
50 | 51 | ||
51 | EXPORT_SYMBOL(shm_align_mask); | 52 | EXPORT_SYMBOL(shm_align_mask); |
52 | 53 | ||
54 | #ifdef CONFIG_MMU | ||
53 | /* | 55 | /* |
54 | * To avoid cache aliases, we map the shared page with same color. | 56 | * To avoid cache aliases, we map the shared page with same color. |
55 | */ | 57 | */ |
@@ -135,6 +137,7 @@ full_search: | |||
135 | addr = COLOUR_ALIGN(addr, pgoff); | 137 | addr = COLOUR_ALIGN(addr, pgoff); |
136 | } | 138 | } |
137 | } | 139 | } |
140 | #endif /* CONFIG_MMU */ | ||
138 | 141 | ||
139 | static inline long | 142 | static inline long |
140 | do_mmap2(unsigned long addr, unsigned long len, unsigned long prot, | 143 | do_mmap2(unsigned long addr, unsigned long len, unsigned long prot, |
@@ -311,6 +314,12 @@ asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1, | |||
311 | #endif | 314 | #endif |
312 | } | 315 | } |
313 | 316 | ||
317 | #if defined(CONFIG_CPU_SH2) || defined(CONFIG_CPU_SH2A) | ||
318 | #define SYSCALL_ARG3 "trapa #0x23" | ||
319 | #else | ||
320 | #define SYSCALL_ARG3 "trapa #0x13" | ||
321 | #endif | ||
322 | |||
314 | /* | 323 | /* |
315 | * Do a system call from kernel instead of calling sys_execve so we | 324 | * Do a system call from kernel instead of calling sys_execve so we |
316 | * end up with proper pt_regs. | 325 | * end up with proper pt_regs. |
@@ -321,7 +330,7 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[]) | |||
321 | register long __sc4 __asm__ ("r4") = (long) filename; | 330 | register long __sc4 __asm__ ("r4") = (long) filename; |
322 | register long __sc5 __asm__ ("r5") = (long) argv; | 331 | register long __sc5 __asm__ ("r5") = (long) argv; |
323 | register long __sc6 __asm__ ("r6") = (long) envp; | 332 | register long __sc6 __asm__ ("r6") = (long) envp; |
324 | __asm__ __volatile__ ("trapa #0x13" : "=z" (__sc0) | 333 | __asm__ __volatile__ (SYSCALL_ARG3 : "=z" (__sc0) |
325 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) | 334 | : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) |
326 | : "memory"); | 335 | : "memory"); |
327 | return __sc0; | 336 | return __sc0; |
diff --git a/arch/sh/kernel/syscalls.S b/arch/sh/kernel/syscalls.S index 768334e95075..ca81976e9e34 100644 --- a/arch/sh/kernel/syscalls.S +++ b/arch/sh/kernel/syscalls.S | |||
@@ -351,3 +351,6 @@ ENTRY(sys_call_table) | |||
351 | .long sys_sync_file_range | 351 | .long sys_sync_file_range |
352 | .long sys_tee /* 315 */ | 352 | .long sys_tee /* 315 */ |
353 | .long sys_vmsplice | 353 | .long sys_vmsplice |
354 | .long sys_move_pages | ||
355 | .long sys_getcpu | ||
356 | .long sys_epoll_pwait | ||
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index 57e708d7b52d..c206c9504c4b 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
15 | #include <linux/profile.h> | 15 | #include <linux/profile.h> |
16 | #include <linux/timex.h> | ||
17 | #include <linux/sched.h> | ||
16 | #include <asm/clock.h> | 18 | #include <asm/clock.h> |
17 | #include <asm/rtc.h> | 19 | #include <asm/rtc.h> |
18 | #include <asm/timer.h> | 20 | #include <asm/timer.h> |
@@ -50,15 +52,20 @@ unsigned long long __attribute__ ((weak)) sched_clock(void) | |||
50 | #ifndef CONFIG_GENERIC_TIME | 52 | #ifndef CONFIG_GENERIC_TIME |
51 | void do_gettimeofday(struct timeval *tv) | 53 | void do_gettimeofday(struct timeval *tv) |
52 | { | 54 | { |
55 | unsigned long flags; | ||
53 | unsigned long seq; | 56 | unsigned long seq; |
54 | unsigned long usec, sec; | 57 | unsigned long usec, sec; |
55 | 58 | ||
56 | do { | 59 | do { |
57 | seq = read_seqbegin(&xtime_lock); | 60 | /* |
61 | * Turn off IRQs when grabbing xtime_lock, so that | ||
62 | * the sys_timer get_offset code doesn't have to handle it. | ||
63 | */ | ||
64 | seq = read_seqbegin_irqsave(&xtime_lock, flags); | ||
58 | usec = get_timer_offset(); | 65 | usec = get_timer_offset(); |
59 | sec = xtime.tv_sec; | 66 | sec = xtime.tv_sec; |
60 | usec += xtime.tv_nsec / 1000; | 67 | usec += xtime.tv_nsec / NSEC_PER_USEC; |
61 | } while (read_seqretry(&xtime_lock, seq)); | 68 | } while (read_seqretry_irqrestore(&xtime_lock, seq, flags)); |
62 | 69 | ||
63 | while (usec >= 1000000) { | 70 | while (usec >= 1000000) { |
64 | usec -= 1000000; | 71 | usec -= 1000000; |
@@ -85,7 +92,7 @@ int do_settimeofday(struct timespec *tv) | |||
85 | * wall time. Discover what correction gettimeofday() would have | 92 | * wall time. Discover what correction gettimeofday() would have |
86 | * made, and then undo it! | 93 | * made, and then undo it! |
87 | */ | 94 | */ |
88 | nsec -= 1000 * get_timer_offset(); | 95 | nsec -= get_timer_offset() * NSEC_PER_USEC; |
89 | 96 | ||
90 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); | 97 | wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec); |
91 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); | 98 | wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec); |
@@ -169,6 +176,108 @@ static struct sysdev_class timer_sysclass = { | |||
169 | .resume = timer_resume, | 176 | .resume = timer_resume, |
170 | }; | 177 | }; |
171 | 178 | ||
179 | #ifdef CONFIG_NO_IDLE_HZ | ||
180 | static int timer_dyn_tick_enable(void) | ||
181 | { | ||
182 | struct dyn_tick_timer *dyn_tick = sys_timer->dyn_tick; | ||
183 | unsigned long flags; | ||
184 | int ret = -ENODEV; | ||
185 | |||
186 | if (dyn_tick) { | ||
187 | spin_lock_irqsave(&dyn_tick->lock, flags); | ||
188 | ret = 0; | ||
189 | if (!(dyn_tick->state & DYN_TICK_ENABLED)) { | ||
190 | ret = dyn_tick->enable(); | ||
191 | |||
192 | if (ret == 0) | ||
193 | dyn_tick->state |= DYN_TICK_ENABLED; | ||
194 | } | ||
195 | spin_unlock_irqrestore(&dyn_tick->lock, flags); | ||
196 | } | ||
197 | |||
198 | return ret; | ||
199 | } | ||
200 | |||
201 | static int timer_dyn_tick_disable(void) | ||
202 | { | ||
203 | struct dyn_tick_timer *dyn_tick = sys_timer->dyn_tick; | ||
204 | unsigned long flags; | ||
205 | int ret = -ENODEV; | ||
206 | |||
207 | if (dyn_tick) { | ||
208 | spin_lock_irqsave(&dyn_tick->lock, flags); | ||
209 | ret = 0; | ||
210 | if (dyn_tick->state & DYN_TICK_ENABLED) { | ||
211 | ret = dyn_tick->disable(); | ||
212 | |||
213 | if (ret == 0) | ||
214 | dyn_tick->state &= ~DYN_TICK_ENABLED; | ||
215 | } | ||
216 | spin_unlock_irqrestore(&dyn_tick->lock, flags); | ||
217 | } | ||
218 | |||
219 | return ret; | ||
220 | } | ||
221 | |||
222 | /* | ||
223 | * Reprogram the system timer for at least the calculated time interval. | ||
224 | * This function should be called from the idle thread with IRQs disabled, | ||
225 | * immediately before sleeping. | ||
226 | */ | ||
227 | void timer_dyn_reprogram(void) | ||
228 | { | ||
229 | struct dyn_tick_timer *dyn_tick = sys_timer->dyn_tick; | ||
230 | unsigned long next, seq, flags; | ||
231 | |||
232 | if (!dyn_tick) | ||
233 | return; | ||
234 | |||
235 | spin_lock_irqsave(&dyn_tick->lock, flags); | ||
236 | if (dyn_tick->state & DYN_TICK_ENABLED) { | ||
237 | next = next_timer_interrupt(); | ||
238 | do { | ||
239 | seq = read_seqbegin(&xtime_lock); | ||
240 | dyn_tick->reprogram(next - jiffies); | ||
241 | } while (read_seqretry(&xtime_lock, seq)); | ||
242 | } | ||
243 | spin_unlock_irqrestore(&dyn_tick->lock, flags); | ||
244 | } | ||
245 | |||
246 | static ssize_t timer_show_dyn_tick(struct sys_device *dev, char *buf) | ||
247 | { | ||
248 | return sprintf(buf, "%i\n", | ||
249 | (sys_timer->dyn_tick->state & DYN_TICK_ENABLED) >> 1); | ||
250 | } | ||
251 | |||
252 | static ssize_t timer_set_dyn_tick(struct sys_device *dev, const char *buf, | ||
253 | size_t count) | ||
254 | { | ||
255 | unsigned int enable = simple_strtoul(buf, NULL, 2); | ||
256 | |||
257 | if (enable) | ||
258 | timer_dyn_tick_enable(); | ||
259 | else | ||
260 | timer_dyn_tick_disable(); | ||
261 | |||
262 | return count; | ||
263 | } | ||
264 | static SYSDEV_ATTR(dyn_tick, 0644, timer_show_dyn_tick, timer_set_dyn_tick); | ||
265 | |||
266 | /* | ||
267 | * dyntick=enable|disable | ||
268 | */ | ||
269 | static char dyntick_str[4] __initdata = ""; | ||
270 | |||
271 | static int __init dyntick_setup(char *str) | ||
272 | { | ||
273 | if (str) | ||
274 | strlcpy(dyntick_str, str, sizeof(dyntick_str)); | ||
275 | return 1; | ||
276 | } | ||
277 | |||
278 | __setup("dyntick=", dyntick_setup); | ||
279 | #endif | ||
280 | |||
172 | static int __init timer_init_sysfs(void) | 281 | static int __init timer_init_sysfs(void) |
173 | { | 282 | { |
174 | int ret = sysdev_class_register(&timer_sysclass); | 283 | int ret = sysdev_class_register(&timer_sysclass); |
@@ -176,7 +285,22 @@ static int __init timer_init_sysfs(void) | |||
176 | return ret; | 285 | return ret; |
177 | 286 | ||
178 | sys_timer->dev.cls = &timer_sysclass; | 287 | sys_timer->dev.cls = &timer_sysclass; |
179 | return sysdev_register(&sys_timer->dev); | 288 | ret = sysdev_register(&sys_timer->dev); |
289 | |||
290 | #ifdef CONFIG_NO_IDLE_HZ | ||
291 | if (ret == 0 && sys_timer->dyn_tick) { | ||
292 | ret = sysdev_create_file(&sys_timer->dev, &attr_dyn_tick); | ||
293 | |||
294 | /* | ||
295 | * Turn on dynamic tick after calibrate delay | ||
296 | * for correct bogomips | ||
297 | */ | ||
298 | if (ret == 0 && dyntick_str[0] == 'e') | ||
299 | ret = timer_dyn_tick_enable(); | ||
300 | } | ||
301 | #endif | ||
302 | |||
303 | return ret; | ||
180 | } | 304 | } |
181 | device_initcall(timer_init_sysfs); | 305 | device_initcall(timer_init_sysfs); |
182 | 306 | ||
@@ -200,6 +324,11 @@ void __init time_init(void) | |||
200 | sys_timer = get_sys_timer(); | 324 | sys_timer = get_sys_timer(); |
201 | printk(KERN_INFO "Using %s for system timer\n", sys_timer->name); | 325 | printk(KERN_INFO "Using %s for system timer\n", sys_timer->name); |
202 | 326 | ||
327 | #ifdef CONFIG_NO_IDLE_HZ | ||
328 | if (sys_timer->dyn_tick) | ||
329 | spin_lock_init(&sys_timer->dyn_tick->lock); | ||
330 | #endif | ||
331 | |||
203 | #if defined(CONFIG_SH_KGDB) | 332 | #if defined(CONFIG_SH_KGDB) |
204 | /* | 333 | /* |
205 | * Set up kgdb as requested. We do it here because the serial | 334 | * Set up kgdb as requested. We do it here because the serial |
diff --git a/arch/sh/kernel/timers/Makefile b/arch/sh/kernel/timers/Makefile index 151a6a304cec..bcf244ff6a12 100644 --- a/arch/sh/kernel/timers/Makefile +++ b/arch/sh/kernel/timers/Makefile | |||
@@ -5,4 +5,6 @@ | |||
5 | obj-y := timer.o | 5 | obj-y := timer.o |
6 | 6 | ||
7 | obj-$(CONFIG_SH_TMU) += timer-tmu.o | 7 | obj-$(CONFIG_SH_TMU) += timer-tmu.o |
8 | obj-$(CONFIG_SH_MTU2) += timer-mtu2.o | ||
9 | obj-$(CONFIG_SH_CMT) += timer-cmt.o | ||
8 | 10 | ||
diff --git a/arch/sh/kernel/timers/timer-cmt.c b/arch/sh/kernel/timers/timer-cmt.c new file mode 100644 index 000000000000..a574b93a4e7b --- /dev/null +++ b/arch/sh/kernel/timers/timer-cmt.c | |||
@@ -0,0 +1,196 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/timers/timer-cmt.c - CMT Timer Support | ||
3 | * | ||
4 | * Copyright (C) 2005 Yoshinori Sato | ||
5 | * | ||
6 | * This file is subject to the terms and conditions of the GNU General Public | ||
7 | * License. See the file "COPYING" in the main directory of this archive | ||
8 | * for more details. | ||
9 | */ | ||
10 | |||
11 | #include <linux/init.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/seqlock.h> | ||
15 | #include <asm/timer.h> | ||
16 | #include <asm/rtc.h> | ||
17 | #include <asm/io.h> | ||
18 | #include <asm/irq.h> | ||
19 | #include <asm/clock.h> | ||
20 | |||
21 | #if defined(CONFIG_CPU_SUBTYPE_SH7619) | ||
22 | #define CMT_CMSTR 0xf84a0070 | ||
23 | #define CMT_CMCSR_0 0xf84a0072 | ||
24 | #define CMT_CMCNT_0 0xf84a0074 | ||
25 | #define CMT_CMCOR_0 0xf84a0076 | ||
26 | #define CMT_CMCSR_1 0xf84a0078 | ||
27 | #define CMT_CMCNT_1 0xf84a007a | ||
28 | #define CMT_CMCOR_1 0xf84a007c | ||
29 | |||
30 | #define STBCR3 0xf80a0000 | ||
31 | #define cmt_clock_enable() do { ctrl_outb(ctrl_inb(STBCR3) & ~0x10, STBCR3); } while(0) | ||
32 | #define CMT_CMCSR_INIT 0x0040 | ||
33 | #define CMT_CMCSR_CALIB 0x0000 | ||
34 | #elif defined(CONFIG_CPU_SUBTYPE_SH7206) | ||
35 | #define CMT_CMSTR 0xfffec000 | ||
36 | #define CMT_CMCSR_0 0xfffec002 | ||
37 | #define CMT_CMCNT_0 0xfffec004 | ||
38 | #define CMT_CMCOR_0 0xfffec006 | ||
39 | |||
40 | #define STBCR4 0xfffe040c | ||
41 | #define cmt_clock_enable() do { ctrl_outb(ctrl_inb(STBCR4) & ~0x04, STBCR4); } while(0) | ||
42 | #define CMT_CMCSR_INIT 0x0040 | ||
43 | #define CMT_CMCSR_CALIB 0x0000 | ||
44 | #else | ||
45 | #error "Unknown CPU SUBTYPE" | ||
46 | #endif | ||
47 | |||
48 | static unsigned long cmt_timer_get_offset(void) | ||
49 | { | ||
50 | int count; | ||
51 | static unsigned short count_p = 0xffff; /* for the first call after boot */ | ||
52 | static unsigned long jiffies_p = 0; | ||
53 | |||
54 | /* | ||
55 | * cache volatile jiffies temporarily; we have IRQs turned off. | ||
56 | */ | ||
57 | unsigned long jiffies_t; | ||
58 | |||
59 | /* timer count may underflow right here */ | ||
60 | count = ctrl_inw(CMT_CMCOR_0); | ||
61 | count -= ctrl_inw(CMT_CMCNT_0); | ||
62 | |||
63 | jiffies_t = jiffies; | ||
64 | |||
65 | /* | ||
66 | * avoiding timer inconsistencies (they are rare, but they happen)... | ||
67 | * there is one kind of problem that must be avoided here: | ||
68 | * 1. the timer counter underflows | ||
69 | */ | ||
70 | |||
71 | if (jiffies_t == jiffies_p) { | ||
72 | if (count > count_p) { | ||
73 | /* the nutcase */ | ||
74 | if (ctrl_inw(CMT_CMCSR_0) & 0x80) { /* Check CMF bit */ | ||
75 | count -= LATCH; | ||
76 | } else { | ||
77 | printk("%s (): hardware timer problem?\n", | ||
78 | __FUNCTION__); | ||
79 | } | ||
80 | } | ||
81 | } else | ||
82 | jiffies_p = jiffies_t; | ||
83 | |||
84 | count_p = count; | ||
85 | |||
86 | count = ((LATCH-1) - count) * TICK_SIZE; | ||
87 | count = (count + LATCH/2) / LATCH; | ||
88 | |||
89 | return count; | ||
90 | } | ||
91 | |||
92 | static irqreturn_t cmt_timer_interrupt(int irq, void *dev_id) | ||
93 | { | ||
94 | unsigned long timer_status; | ||
95 | |||
96 | /* Clear CMF bit */ | ||
97 | timer_status = ctrl_inw(CMT_CMCSR_0); | ||
98 | timer_status &= ~0x80; | ||
99 | ctrl_outw(timer_status, CMT_CMCSR_0); | ||
100 | |||
101 | /* | ||
102 | * Here we are in the timer irq handler. We just have irqs locally | ||
103 | * disabled but we don't know if the timer_bh is running on the other | ||
104 | * CPU. We need to avoid to SMP race with it. NOTE: we don' t need | ||
105 | * the irq version of write_lock because as just said we have irq | ||
106 | * locally disabled. -arca | ||
107 | */ | ||
108 | write_seqlock(&xtime_lock); | ||
109 | handle_timer_tick(); | ||
110 | write_sequnlock(&xtime_lock); | ||
111 | |||
112 | return IRQ_HANDLED; | ||
113 | } | ||
114 | |||
115 | static struct irqaction cmt_irq = { | ||
116 | .name = "timer", | ||
117 | .handler = cmt_timer_interrupt, | ||
118 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
119 | .mask = CPU_MASK_NONE, | ||
120 | }; | ||
121 | |||
122 | static void cmt_clk_init(struct clk *clk) | ||
123 | { | ||
124 | u8 divisor = CMT_CMCSR_INIT & 0x3; | ||
125 | ctrl_inw(CMT_CMCSR_0); | ||
126 | ctrl_outw(CMT_CMCSR_INIT, CMT_CMCSR_0); | ||
127 | clk->parent = clk_get(NULL, "module_clk"); | ||
128 | clk->rate = clk->parent->rate / (8 << (divisor << 1)); | ||
129 | } | ||
130 | |||
131 | static void cmt_clk_recalc(struct clk *clk) | ||
132 | { | ||
133 | u8 divisor = ctrl_inw(CMT_CMCSR_0) & 0x3; | ||
134 | clk->rate = clk->parent->rate / (8 << (divisor << 1)); | ||
135 | } | ||
136 | |||
137 | static struct clk_ops cmt_clk_ops = { | ||
138 | .init = cmt_clk_init, | ||
139 | .recalc = cmt_clk_recalc, | ||
140 | }; | ||
141 | |||
142 | static struct clk cmt0_clk = { | ||
143 | .name = "cmt0_clk", | ||
144 | .ops = &cmt_clk_ops, | ||
145 | }; | ||
146 | |||
147 | static int cmt_timer_start(void) | ||
148 | { | ||
149 | ctrl_outw(ctrl_inw(CMT_CMSTR) | 0x01, CMT_CMSTR); | ||
150 | return 0; | ||
151 | } | ||
152 | |||
153 | static int cmt_timer_stop(void) | ||
154 | { | ||
155 | ctrl_outw(ctrl_inw(CMT_CMSTR) & ~0x01, CMT_CMSTR); | ||
156 | return 0; | ||
157 | } | ||
158 | |||
159 | static int cmt_timer_init(void) | ||
160 | { | ||
161 | unsigned long interval; | ||
162 | |||
163 | cmt_clock_enable(); | ||
164 | |||
165 | setup_irq(CONFIG_SH_TIMER_IRQ, &cmt_irq); | ||
166 | |||
167 | cmt0_clk.parent = clk_get(NULL, "module_clk"); | ||
168 | |||
169 | cmt_timer_stop(); | ||
170 | |||
171 | interval = cmt0_clk.parent->rate / 8 / HZ; | ||
172 | printk(KERN_INFO "Interval = %ld\n", interval); | ||
173 | |||
174 | ctrl_outw(interval, CMT_CMCOR_0); | ||
175 | |||
176 | clk_register(&cmt0_clk); | ||
177 | clk_enable(&cmt0_clk); | ||
178 | |||
179 | cmt_timer_start(); | ||
180 | |||
181 | return 0; | ||
182 | } | ||
183 | |||
184 | struct sys_timer_ops cmt_timer_ops = { | ||
185 | .init = cmt_timer_init, | ||
186 | .start = cmt_timer_start, | ||
187 | .stop = cmt_timer_stop, | ||
188 | #ifndef CONFIG_GENERIC_TIME | ||
189 | .get_offset = cmt_timer_get_offset, | ||
190 | #endif | ||
191 | }; | ||
192 | |||
193 | struct sys_timer cmt_timer = { | ||
194 | .name = "cmt", | ||
195 | .ops = &cmt_timer_ops, | ||
196 | }; | ||
diff --git a/arch/sh/kernel/timers/timer-mtu2.c b/arch/sh/kernel/timers/timer-mtu2.c new file mode 100644 index 000000000000..fffcd1c09873 --- /dev/null +++ b/arch/sh/kernel/timers/timer-mtu2.c | |||
@@ -0,0 +1,200 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/timers/timer-mtu2.c - MTU2 Timer Support | ||
3 | * | ||
4 | * Copyright (C) 2005 Paul Mundt | ||
5 | * | ||
6 | * Based off of arch/sh/kernel/timers/timer-tmu.c | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/seqlock.h> | ||
16 | #include <asm/timer.h> | ||
17 | #include <asm/io.h> | ||
18 | #include <asm/irq.h> | ||
19 | #include <asm/clock.h> | ||
20 | |||
21 | /* | ||
22 | * We use channel 1 for our lowly system timer. Channel 2 would be the other | ||
23 | * likely candidate, but we leave it alone as it has higher divisors that | ||
24 | * would be of more use to other more interesting applications. | ||
25 | * | ||
26 | * TODO: Presently we only implement a 16-bit single-channel system timer. | ||
27 | * However, we can implement channel cascade if we go the overflow route and | ||
28 | * get away with using 2 MTU2 channels as a 32-bit timer. | ||
29 | */ | ||
30 | #define MTU2_TSTR 0xfffe4280 | ||
31 | #define MTU2_TCR_1 0xfffe4380 | ||
32 | #define MTU2_TMDR_1 0xfffe4381 | ||
33 | #define MTU2_TIOR_1 0xfffe4382 | ||
34 | #define MTU2_TIER_1 0xfffe4384 | ||
35 | #define MTU2_TSR_1 0xfffe4385 | ||
36 | #define MTU2_TCNT_1 0xfffe4386 /* 16-bit counter */ | ||
37 | #define MTU2_TGRA_1 0xfffe438a | ||
38 | |||
39 | #define STBCR3 0xfffe0408 | ||
40 | |||
41 | #define MTU2_TSTR_CST1 (1 << 1) /* Counter Start 1 */ | ||
42 | |||
43 | #define MTU2_TSR_TGFA (1 << 0) /* GRA compare match */ | ||
44 | |||
45 | #define MTU2_TIER_TGIEA (1 << 0) /* GRA compare match interrupt enable */ | ||
46 | |||
47 | #define MTU2_TCR_INIT 0x22 | ||
48 | |||
49 | #define MTU2_TCR_CALIB 0x00 | ||
50 | |||
51 | static unsigned long mtu2_timer_get_offset(void) | ||
52 | { | ||
53 | int count; | ||
54 | static int count_p = 0x7fff; /* for the first call after boot */ | ||
55 | static unsigned long jiffies_p = 0; | ||
56 | |||
57 | /* | ||
58 | * cache volatile jiffies temporarily; we have IRQs turned off. | ||
59 | */ | ||
60 | unsigned long jiffies_t; | ||
61 | |||
62 | /* timer count may underflow right here */ | ||
63 | count = ctrl_inw(MTU2_TCNT_1); /* read the latched count */ | ||
64 | |||
65 | jiffies_t = jiffies; | ||
66 | |||
67 | /* | ||
68 | * avoiding timer inconsistencies (they are rare, but they happen)... | ||
69 | * there is one kind of problem that must be avoided here: | ||
70 | * 1. the timer counter underflows | ||
71 | */ | ||
72 | |||
73 | if (jiffies_t == jiffies_p) { | ||
74 | if (count > count_p) { | ||
75 | if (ctrl_inb(MTU2_TSR_1) & MTU2_TSR_TGFA) { | ||
76 | count -= LATCH; | ||
77 | } else { | ||
78 | printk("%s (): hardware timer problem?\n", | ||
79 | __FUNCTION__); | ||
80 | } | ||
81 | } | ||
82 | } else | ||
83 | jiffies_p = jiffies_t; | ||
84 | |||
85 | count_p = count; | ||
86 | |||
87 | count = ((LATCH-1) - count) * TICK_SIZE; | ||
88 | count = (count + LATCH/2) / LATCH; | ||
89 | |||
90 | return count; | ||
91 | } | ||
92 | |||
93 | static irqreturn_t mtu2_timer_interrupt(int irq, void *dev_id) | ||
94 | { | ||
95 | unsigned long timer_status; | ||
96 | |||
97 | /* Clear TGFA bit */ | ||
98 | timer_status = ctrl_inb(MTU2_TSR_1); | ||
99 | timer_status &= ~MTU2_TSR_TGFA; | ||
100 | ctrl_outb(timer_status, MTU2_TSR_1); | ||
101 | |||
102 | /* Do timer tick */ | ||
103 | write_seqlock(&xtime_lock); | ||
104 | handle_timer_tick(); | ||
105 | write_sequnlock(&xtime_lock); | ||
106 | |||
107 | return IRQ_HANDLED; | ||
108 | } | ||
109 | |||
110 | static struct irqaction mtu2_irq = { | ||
111 | .name = "timer", | ||
112 | .handler = mtu2_timer_interrupt, | ||
113 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
114 | .mask = CPU_MASK_NONE, | ||
115 | }; | ||
116 | |||
117 | static unsigned int divisors[] = { 1, 4, 16, 64, 1, 1, 256 }; | ||
118 | |||
119 | static void mtu2_clk_init(struct clk *clk) | ||
120 | { | ||
121 | u8 idx = MTU2_TCR_INIT & 0x7; | ||
122 | |||
123 | clk->rate = clk->parent->rate / divisors[idx]; | ||
124 | /* Start TCNT counting */ | ||
125 | ctrl_outb(ctrl_inb(MTU2_TSTR) | MTU2_TSTR_CST1, MTU2_TSTR); | ||
126 | |||
127 | } | ||
128 | |||
129 | static void mtu2_clk_recalc(struct clk *clk) | ||
130 | { | ||
131 | u8 idx = ctrl_inb(MTU2_TCR_1) & 0x7; | ||
132 | clk->rate = clk->parent->rate / divisors[idx]; | ||
133 | } | ||
134 | |||
135 | static struct clk_ops mtu2_clk_ops = { | ||
136 | .init = mtu2_clk_init, | ||
137 | .recalc = mtu2_clk_recalc, | ||
138 | }; | ||
139 | |||
140 | static struct clk mtu2_clk1 = { | ||
141 | .name = "mtu2_clk1", | ||
142 | .ops = &mtu2_clk_ops, | ||
143 | }; | ||
144 | |||
145 | static int mtu2_timer_start(void) | ||
146 | { | ||
147 | ctrl_outb(ctrl_inb(MTU2_TSTR) | MTU2_TSTR_CST1, MTU2_TSTR); | ||
148 | return 0; | ||
149 | } | ||
150 | |||
151 | static int mtu2_timer_stop(void) | ||
152 | { | ||
153 | ctrl_outb(ctrl_inb(MTU2_TSTR) & ~MTU2_TSTR_CST1, MTU2_TSTR); | ||
154 | return 0; | ||
155 | } | ||
156 | |||
157 | static int mtu2_timer_init(void) | ||
158 | { | ||
159 | u8 tmp; | ||
160 | unsigned long interval; | ||
161 | |||
162 | setup_irq(CONFIG_SH_TIMER_IRQ, &mtu2_irq); | ||
163 | |||
164 | mtu2_clk1.parent = clk_get(NULL, "module_clk"); | ||
165 | |||
166 | ctrl_outb(ctrl_inb(STBCR3) & (~0x20), STBCR3); | ||
167 | |||
168 | /* Normal operation */ | ||
169 | ctrl_outb(0, MTU2_TMDR_1); | ||
170 | ctrl_outb(MTU2_TCR_INIT, MTU2_TCR_1); | ||
171 | ctrl_outb(0x01, MTU2_TIOR_1); | ||
172 | |||
173 | /* Enable underflow interrupt */ | ||
174 | ctrl_outb(ctrl_inb(MTU2_TIER_1) | MTU2_TIER_TGIEA, MTU2_TIER_1); | ||
175 | |||
176 | interval = CONFIG_SH_PCLK_FREQ / 16 / HZ; | ||
177 | printk(KERN_INFO "Interval = %ld\n", interval); | ||
178 | |||
179 | ctrl_outw(interval, MTU2_TGRA_1); | ||
180 | ctrl_outw(0, MTU2_TCNT_1); | ||
181 | |||
182 | clk_register(&mtu2_clk1); | ||
183 | clk_enable(&mtu2_clk1); | ||
184 | |||
185 | return 0; | ||
186 | } | ||
187 | |||
188 | struct sys_timer_ops mtu2_timer_ops = { | ||
189 | .init = mtu2_timer_init, | ||
190 | .start = mtu2_timer_start, | ||
191 | .stop = mtu2_timer_stop, | ||
192 | #ifndef CONFIG_GENERIC_TIME | ||
193 | .get_offset = mtu2_timer_get_offset, | ||
194 | #endif | ||
195 | }; | ||
196 | |||
197 | struct sys_timer mtu2_timer = { | ||
198 | .name = "mtu2", | ||
199 | .ops = &mtu2_timer_ops, | ||
200 | }; | ||
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c index 24927015dc31..e060e71d0785 100644 --- a/arch/sh/kernel/timers/timer-tmu.c +++ b/arch/sh/kernel/timers/timer-tmu.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/spinlock.h> | ||
21 | #include <linux/seqlock.h> | 20 | #include <linux/seqlock.h> |
22 | #include <asm/timer.h> | 21 | #include <asm/timer.h> |
23 | #include <asm/rtc.h> | 22 | #include <asm/rtc.h> |
@@ -31,13 +30,9 @@ | |||
31 | 30 | ||
32 | #define TMU0_TCR_CALIB 0x0000 | 31 | #define TMU0_TCR_CALIB 0x0000 |
33 | 32 | ||
34 | static DEFINE_SPINLOCK(tmu0_lock); | ||
35 | |||
36 | static unsigned long tmu_timer_get_offset(void) | 33 | static unsigned long tmu_timer_get_offset(void) |
37 | { | 34 | { |
38 | int count; | 35 | int count; |
39 | unsigned long flags; | ||
40 | |||
41 | static int count_p = 0x7fffffff; /* for the first call after boot */ | 36 | static int count_p = 0x7fffffff; /* for the first call after boot */ |
42 | static unsigned long jiffies_p = 0; | 37 | static unsigned long jiffies_p = 0; |
43 | 38 | ||
@@ -46,7 +41,6 @@ static unsigned long tmu_timer_get_offset(void) | |||
46 | */ | 41 | */ |
47 | unsigned long jiffies_t; | 42 | unsigned long jiffies_t; |
48 | 43 | ||
49 | spin_lock_irqsave(&tmu0_lock, flags); | ||
50 | /* timer count may underflow right here */ | 44 | /* timer count may underflow right here */ |
51 | count = ctrl_inl(TMU0_TCNT); /* read the latched count */ | 45 | count = ctrl_inl(TMU0_TCNT); /* read the latched count */ |
52 | 46 | ||
@@ -72,7 +66,6 @@ static unsigned long tmu_timer_get_offset(void) | |||
72 | jiffies_p = jiffies_t; | 66 | jiffies_p = jiffies_t; |
73 | 67 | ||
74 | count_p = count; | 68 | count_p = count; |
75 | spin_unlock_irqrestore(&tmu0_lock, flags); | ||
76 | 69 | ||
77 | count = ((LATCH-1) - count) * TICK_SIZE; | 70 | count = ((LATCH-1) - count) * TICK_SIZE; |
78 | count = (count + LATCH/2) / LATCH; | 71 | count = (count + LATCH/2) / LATCH; |
@@ -106,7 +99,7 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dummy) | |||
106 | static struct irqaction tmu_irq = { | 99 | static struct irqaction tmu_irq = { |
107 | .name = "timer", | 100 | .name = "timer", |
108 | .handler = tmu_timer_interrupt, | 101 | .handler = tmu_timer_interrupt, |
109 | .flags = IRQF_DISABLED, | 102 | .flags = IRQF_DISABLED | IRQF_TIMER, |
110 | .mask = CPU_MASK_NONE, | 103 | .mask = CPU_MASK_NONE, |
111 | }; | 104 | }; |
112 | 105 | ||
@@ -149,9 +142,9 @@ static int tmu_timer_init(void) | |||
149 | { | 142 | { |
150 | unsigned long interval; | 143 | unsigned long interval; |
151 | 144 | ||
152 | setup_irq(TIMER_IRQ, &tmu_irq); | 145 | setup_irq(CONFIG_SH_TIMER_IRQ, &tmu_irq); |
153 | 146 | ||
154 | tmu0_clk.parent = clk_get("module_clk"); | 147 | tmu0_clk.parent = clk_get(NULL, "module_clk"); |
155 | 148 | ||
156 | /* Start TMU0 */ | 149 | /* Start TMU0 */ |
157 | tmu_timer_stop(); | 150 | tmu_timer_stop(); |
diff --git a/arch/sh/kernel/timers/timer.c b/arch/sh/kernel/timers/timer.c index dc1f631053a8..a6bcc913d25e 100644 --- a/arch/sh/kernel/timers/timer.c +++ b/arch/sh/kernel/timers/timer.c | |||
@@ -17,6 +17,12 @@ static struct sys_timer *sys_timers[] __initdata = { | |||
17 | #ifdef CONFIG_SH_TMU | 17 | #ifdef CONFIG_SH_TMU |
18 | &tmu_timer, | 18 | &tmu_timer, |
19 | #endif | 19 | #endif |
20 | #ifdef CONFIG_SH_MTU2 | ||
21 | &mtu2_timer, | ||
22 | #endif | ||
23 | #ifdef CONFIG_SH_CMT | ||
24 | &cmt_timer, | ||
25 | #endif | ||
20 | NULL, | 26 | NULL, |
21 | }; | 27 | }; |
22 | 28 | ||
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c index c2c597e09482..ec110157992d 100644 --- a/arch/sh/kernel/traps.c +++ b/arch/sh/kernel/traps.c | |||
@@ -1,43 +1,32 @@ | |||
1 | /* $Id: traps.c,v 1.17 2004/05/02 01:46:30 sugioka Exp $ | 1 | /* |
2 | * | 2 | * 'traps.c' handles hardware traps and faults after we have saved some |
3 | * linux/arch/sh/traps.c | 3 | * state in 'entry.S'. |
4 | * | 4 | * |
5 | * SuperH version: Copyright (C) 1999 Niibe Yutaka | 5 | * SuperH version: Copyright (C) 1999 Niibe Yutaka |
6 | * Copyright (C) 2000 Philipp Rumpf | 6 | * Copyright (C) 2000 Philipp Rumpf |
7 | * Copyright (C) 2000 David Howells | 7 | * Copyright (C) 2000 David Howells |
8 | * Copyright (C) 2002, 2003 Paul Mundt | 8 | * Copyright (C) 2002 - 2006 Paul Mundt |
9 | */ | 9 | * |
10 | 10 | * This file is subject to the terms and conditions of the GNU General Public | |
11 | /* | 11 | * License. See the file "COPYING" in the main directory of this archive |
12 | * 'Traps.c' handles hardware traps and faults after we have saved some | 12 | * for more details. |
13 | * state in 'entry.S'. | ||
14 | */ | 13 | */ |
15 | #include <linux/sched.h> | ||
16 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
17 | #include <linux/string.h> | ||
18 | #include <linux/errno.h> | ||
19 | #include <linux/ptrace.h> | 15 | #include <linux/ptrace.h> |
20 | #include <linux/timer.h> | ||
21 | #include <linux/mm.h> | ||
22 | #include <linux/smp.h> | ||
23 | #include <linux/smp_lock.h> | ||
24 | #include <linux/init.h> | 16 | #include <linux/init.h> |
25 | #include <linux/delay.h> | ||
26 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
27 | #include <linux/module.h> | 18 | #include <linux/module.h> |
28 | #include <linux/kallsyms.h> | 19 | #include <linux/kallsyms.h> |
29 | 20 | #include <linux/io.h> | |
21 | #include <linux/debug_locks.h> | ||
22 | #include <linux/limits.h> | ||
30 | #include <asm/system.h> | 23 | #include <asm/system.h> |
31 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
32 | #include <asm/io.h> | ||
33 | #include <asm/atomic.h> | ||
34 | #include <asm/processor.h> | ||
35 | #include <asm/sections.h> | ||
36 | 25 | ||
37 | #ifdef CONFIG_SH_KGDB | 26 | #ifdef CONFIG_SH_KGDB |
38 | #include <asm/kgdb.h> | 27 | #include <asm/kgdb.h> |
39 | #define CHK_REMOTE_DEBUG(regs) \ | 28 | #define CHK_REMOTE_DEBUG(regs) \ |
40 | { \ | 29 | { \ |
41 | if (kgdb_debug_hook && !user_mode(regs))\ | 30 | if (kgdb_debug_hook && !user_mode(regs))\ |
42 | (*kgdb_debug_hook)(regs); \ | 31 | (*kgdb_debug_hook)(regs); \ |
43 | } | 32 | } |
@@ -46,20 +35,44 @@ | |||
46 | #endif | 35 | #endif |
47 | 36 | ||
48 | #ifdef CONFIG_CPU_SH2 | 37 | #ifdef CONFIG_CPU_SH2 |
49 | #define TRAP_RESERVED_INST 4 | 38 | # define TRAP_RESERVED_INST 4 |
50 | #define TRAP_ILLEGAL_SLOT_INST 6 | 39 | # define TRAP_ILLEGAL_SLOT_INST 6 |
40 | # define TRAP_ADDRESS_ERROR 9 | ||
41 | # ifdef CONFIG_CPU_SH2A | ||
42 | # define TRAP_DIVZERO_ERROR 17 | ||
43 | # define TRAP_DIVOVF_ERROR 18 | ||
44 | # endif | ||
51 | #else | 45 | #else |
52 | #define TRAP_RESERVED_INST 12 | 46 | #define TRAP_RESERVED_INST 12 |
53 | #define TRAP_ILLEGAL_SLOT_INST 13 | 47 | #define TRAP_ILLEGAL_SLOT_INST 13 |
54 | #endif | 48 | #endif |
55 | 49 | ||
56 | /* | 50 | static void dump_mem(const char *str, unsigned long bottom, unsigned long top) |
57 | * These constants are for searching for possible module text | 51 | { |
58 | * segments. VMALLOC_OFFSET comes from mm/vmalloc.c; MODULE_RANGE is | 52 | unsigned long p; |
59 | * a guess of how much space is likely to be vmalloced. | 53 | int i; |
60 | */ | 54 | |
61 | #define VMALLOC_OFFSET (8*1024*1024) | 55 | printk("%s(0x%08lx to 0x%08lx)\n", str, bottom, top); |
62 | #define MODULE_RANGE (8*1024*1024) | 56 | |
57 | for (p = bottom & ~31; p < top; ) { | ||
58 | printk("%04lx: ", p & 0xffff); | ||
59 | |||
60 | for (i = 0; i < 8; i++, p += 4) { | ||
61 | unsigned int val; | ||
62 | |||
63 | if (p < bottom || p >= top) | ||
64 | printk(" "); | ||
65 | else { | ||
66 | if (__get_user(val, (unsigned int __user *)p)) { | ||
67 | printk("\n"); | ||
68 | return; | ||
69 | } | ||
70 | printk("%08x ", val); | ||
71 | } | ||
72 | } | ||
73 | printk("\n"); | ||
74 | } | ||
75 | } | ||
63 | 76 | ||
64 | DEFINE_SPINLOCK(die_lock); | 77 | DEFINE_SPINLOCK(die_lock); |
65 | 78 | ||
@@ -69,21 +82,33 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
69 | 82 | ||
70 | console_verbose(); | 83 | console_verbose(); |
71 | spin_lock_irq(&die_lock); | 84 | spin_lock_irq(&die_lock); |
85 | bust_spinlocks(1); | ||
86 | |||
72 | printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); | 87 | printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); |
88 | |||
73 | CHK_REMOTE_DEBUG(regs); | 89 | CHK_REMOTE_DEBUG(regs); |
90 | print_modules(); | ||
74 | show_regs(regs); | 91 | show_regs(regs); |
92 | |||
93 | printk("Process: %s (pid: %d, stack limit = %p)\n", | ||
94 | current->comm, current->pid, task_stack_page(current) + 1); | ||
95 | |||
96 | if (!user_mode(regs) || in_interrupt()) | ||
97 | dump_mem("Stack: ", regs->regs[15], THREAD_SIZE + | ||
98 | (unsigned long)task_stack_page(current)); | ||
99 | |||
100 | bust_spinlocks(0); | ||
75 | spin_unlock_irq(&die_lock); | 101 | spin_unlock_irq(&die_lock); |
76 | do_exit(SIGSEGV); | 102 | do_exit(SIGSEGV); |
77 | } | 103 | } |
78 | 104 | ||
79 | static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err) | 105 | static inline void die_if_kernel(const char *str, struct pt_regs *regs, |
106 | long err) | ||
80 | { | 107 | { |
81 | if (!user_mode(regs)) | 108 | if (!user_mode(regs)) |
82 | die(str, regs, err); | 109 | die(str, regs, err); |
83 | } | 110 | } |
84 | 111 | ||
85 | static int handle_unaligned_notify_count = 10; | ||
86 | |||
87 | /* | 112 | /* |
88 | * try and fix up kernelspace address errors | 113 | * try and fix up kernelspace address errors |
89 | * - userspace errors just cause EFAULT to be returned, resulting in SEGV | 114 | * - userspace errors just cause EFAULT to be returned, resulting in SEGV |
@@ -93,8 +118,7 @@ static int handle_unaligned_notify_count = 10; | |||
93 | */ | 118 | */ |
94 | static int die_if_no_fixup(const char * str, struct pt_regs * regs, long err) | 119 | static int die_if_no_fixup(const char * str, struct pt_regs * regs, long err) |
95 | { | 120 | { |
96 | if (!user_mode(regs)) | 121 | if (!user_mode(regs)) { |
97 | { | ||
98 | const struct exception_table_entry *fixup; | 122 | const struct exception_table_entry *fixup; |
99 | fixup = search_exception_tables(regs->pc); | 123 | fixup = search_exception_tables(regs->pc); |
100 | if (fixup) { | 124 | if (fixup) { |
@@ -106,6 +130,40 @@ static int die_if_no_fixup(const char * str, struct pt_regs * regs, long err) | |||
106 | return -EFAULT; | 130 | return -EFAULT; |
107 | } | 131 | } |
108 | 132 | ||
133 | #ifdef CONFIG_BUG | ||
134 | #ifdef CONFIG_DEBUG_BUGVERBOSE | ||
135 | static inline void do_bug_verbose(struct pt_regs *regs) | ||
136 | { | ||
137 | struct bug_frame f; | ||
138 | long len; | ||
139 | |||
140 | if (__copy_from_user(&f, (const void __user *)regs->pc, | ||
141 | sizeof(struct bug_frame))) | ||
142 | return; | ||
143 | |||
144 | len = __strnlen_user(f.file, PATH_MAX) - 1; | ||
145 | if (unlikely(len < 0 || len >= PATH_MAX)) | ||
146 | f.file = "<bad filename>"; | ||
147 | len = __strnlen_user(f.func, PATH_MAX) - 1; | ||
148 | if (unlikely(len < 0 || len >= PATH_MAX)) | ||
149 | f.func = "<bad function>"; | ||
150 | |||
151 | printk(KERN_ALERT "kernel BUG in %s() at %s:%d!\n", | ||
152 | f.func, f.file, f.line); | ||
153 | } | ||
154 | #else | ||
155 | static inline void do_bug_verbose(struct pt_regs *regs) | ||
156 | { | ||
157 | } | ||
158 | #endif /* CONFIG_DEBUG_BUGVERBOSE */ | ||
159 | #endif /* CONFIG_BUG */ | ||
160 | |||
161 | void handle_BUG(struct pt_regs *regs) | ||
162 | { | ||
163 | do_bug_verbose(regs); | ||
164 | die("Kernel BUG", regs, TRAPA_BUG_OPCODE & 0xff); | ||
165 | } | ||
166 | |||
109 | /* | 167 | /* |
110 | * handle an instruction that does an unaligned memory access by emulating the | 168 | * handle an instruction that does an unaligned memory access by emulating the |
111 | * desired behaviour | 169 | * desired behaviour |
@@ -179,7 +237,7 @@ static int handle_unaligned_ins(u16 instruction, struct pt_regs *regs) | |||
179 | if (copy_to_user(dst,src,4)) | 237 | if (copy_to_user(dst,src,4)) |
180 | goto fetch_fault; | 238 | goto fetch_fault; |
181 | ret = 0; | 239 | ret = 0; |
182 | break; | 240 | break; |
183 | 241 | ||
184 | case 2: /* mov.[bwl] to memory, possibly with pre-decrement */ | 242 | case 2: /* mov.[bwl] to memory, possibly with pre-decrement */ |
185 | if (instruction & 4) | 243 | if (instruction & 4) |
@@ -203,7 +261,7 @@ static int handle_unaligned_ins(u16 instruction, struct pt_regs *regs) | |||
203 | if (copy_from_user(dst,src,4)) | 261 | if (copy_from_user(dst,src,4)) |
204 | goto fetch_fault; | 262 | goto fetch_fault; |
205 | ret = 0; | 263 | ret = 0; |
206 | break; | 264 | break; |
207 | 265 | ||
208 | case 6: /* mov.[bwl] from memory, possibly with post-increment */ | 266 | case 6: /* mov.[bwl] from memory, possibly with post-increment */ |
209 | src = (unsigned char*) *rm; | 267 | src = (unsigned char*) *rm; |
@@ -211,7 +269,7 @@ static int handle_unaligned_ins(u16 instruction, struct pt_regs *regs) | |||
211 | *rm += count; | 269 | *rm += count; |
212 | dst = (unsigned char*) rn; | 270 | dst = (unsigned char*) rn; |
213 | *(unsigned long*)dst = 0; | 271 | *(unsigned long*)dst = 0; |
214 | 272 | ||
215 | #ifdef __LITTLE_ENDIAN__ | 273 | #ifdef __LITTLE_ENDIAN__ |
216 | if (copy_from_user(dst, src, count)) | 274 | if (copy_from_user(dst, src, count)) |
217 | goto fetch_fault; | 275 | goto fetch_fault; |
@@ -222,7 +280,7 @@ static int handle_unaligned_ins(u16 instruction, struct pt_regs *regs) | |||
222 | } | 280 | } |
223 | #else | 281 | #else |
224 | dst += 4-count; | 282 | dst += 4-count; |
225 | 283 | ||
226 | if (copy_from_user(dst, src, count)) | 284 | if (copy_from_user(dst, src, count)) |
227 | goto fetch_fault; | 285 | goto fetch_fault; |
228 | 286 | ||
@@ -301,7 +359,8 @@ static inline int handle_unaligned_delayslot(struct pt_regs *regs) | |||
301 | return -EFAULT; | 359 | return -EFAULT; |
302 | 360 | ||
303 | /* kernel */ | 361 | /* kernel */ |
304 | die("delay-slot-insn faulting in handle_unaligned_delayslot", regs, 0); | 362 | die("delay-slot-insn faulting in handle_unaligned_delayslot", |
363 | regs, 0); | ||
305 | } | 364 | } |
306 | 365 | ||
307 | return handle_unaligned_ins(instruction,regs); | 366 | return handle_unaligned_ins(instruction,regs); |
@@ -323,6 +382,13 @@ static inline int handle_unaligned_delayslot(struct pt_regs *regs) | |||
323 | #define SH_PC_8BIT_OFFSET(instr) ((((signed char)(instr))*2) + 4) | 382 | #define SH_PC_8BIT_OFFSET(instr) ((((signed char)(instr))*2) + 4) |
324 | #define SH_PC_12BIT_OFFSET(instr) ((((signed short)(instr<<4))>>3) + 4) | 383 | #define SH_PC_12BIT_OFFSET(instr) ((((signed short)(instr<<4))>>3) + 4) |
325 | 384 | ||
385 | /* | ||
386 | * XXX: SH-2A needs this too, but it needs an overhaul thanks to mixed 32-bit | ||
387 | * opcodes.. | ||
388 | */ | ||
389 | #ifndef CONFIG_CPU_SH2A | ||
390 | static int handle_unaligned_notify_count = 10; | ||
391 | |||
326 | static int handle_unaligned_access(u16 instruction, struct pt_regs *regs) | 392 | static int handle_unaligned_access(u16 instruction, struct pt_regs *regs) |
327 | { | 393 | { |
328 | u_int rm; | 394 | u_int rm; |
@@ -335,7 +401,8 @@ static int handle_unaligned_access(u16 instruction, struct pt_regs *regs) | |||
335 | if (user_mode(regs) && handle_unaligned_notify_count>0) { | 401 | if (user_mode(regs) && handle_unaligned_notify_count>0) { |
336 | handle_unaligned_notify_count--; | 402 | handle_unaligned_notify_count--; |
337 | 403 | ||
338 | printk("Fixing up unaligned userspace access in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", | 404 | printk(KERN_NOTICE "Fixing up unaligned userspace access " |
405 | "in \"%s\" pid=%d pc=0x%p ins=0x%04hx\n", | ||
339 | current->comm,current->pid,(u16*)regs->pc,instruction); | 406 | current->comm,current->pid,(u16*)regs->pc,instruction); |
340 | } | 407 | } |
341 | 408 | ||
@@ -459,32 +526,58 @@ static int handle_unaligned_access(u16 instruction, struct pt_regs *regs) | |||
459 | regs->pc += 2; | 526 | regs->pc += 2; |
460 | return ret; | 527 | return ret; |
461 | } | 528 | } |
529 | #endif /* CONFIG_CPU_SH2A */ | ||
530 | |||
531 | #ifdef CONFIG_CPU_HAS_SR_RB | ||
532 | #define lookup_exception_vector(x) \ | ||
533 | __asm__ __volatile__ ("stc r2_bank, %0\n\t" : "=r" ((x))) | ||
534 | #else | ||
535 | #define lookup_exception_vector(x) \ | ||
536 | __asm__ __volatile__ ("mov r4, %0\n\t" : "=r" ((x))) | ||
537 | #endif | ||
462 | 538 | ||
463 | /* | 539 | /* |
464 | * Handle various address error exceptions | 540 | * Handle various address error exceptions: |
541 | * - instruction address error: | ||
542 | * misaligned PC | ||
543 | * PC >= 0x80000000 in user mode | ||
544 | * - data address error (read and write) | ||
545 | * misaligned data access | ||
546 | * access to >= 0x80000000 is user mode | ||
547 | * Unfortuntaly we can't distinguish between instruction address error | ||
548 | * and data address errors caused by read acceses. | ||
465 | */ | 549 | */ |
466 | asmlinkage void do_address_error(struct pt_regs *regs, | 550 | asmlinkage void do_address_error(struct pt_regs *regs, |
467 | unsigned long writeaccess, | 551 | unsigned long writeaccess, |
468 | unsigned long address) | 552 | unsigned long address) |
469 | { | 553 | { |
470 | unsigned long error_code; | 554 | unsigned long error_code = 0; |
471 | mm_segment_t oldfs; | 555 | mm_segment_t oldfs; |
556 | siginfo_t info; | ||
557 | #ifndef CONFIG_CPU_SH2A | ||
472 | u16 instruction; | 558 | u16 instruction; |
473 | int tmp; | 559 | int tmp; |
560 | #endif | ||
474 | 561 | ||
475 | asm volatile("stc r2_bank,%0": "=r" (error_code)); | 562 | /* Intentional ifdef */ |
563 | #ifdef CONFIG_CPU_HAS_SR_RB | ||
564 | lookup_exception_vector(error_code); | ||
565 | #endif | ||
476 | 566 | ||
477 | oldfs = get_fs(); | 567 | oldfs = get_fs(); |
478 | 568 | ||
479 | if (user_mode(regs)) { | 569 | if (user_mode(regs)) { |
570 | int si_code = BUS_ADRERR; | ||
571 | |||
480 | local_irq_enable(); | 572 | local_irq_enable(); |
481 | current->thread.error_code = error_code; | ||
482 | current->thread.trap_no = (writeaccess) ? 8 : 7; | ||
483 | 573 | ||
484 | /* bad PC is not something we can fix */ | 574 | /* bad PC is not something we can fix */ |
485 | if (regs->pc & 1) | 575 | if (regs->pc & 1) { |
576 | si_code = BUS_ADRALN; | ||
486 | goto uspace_segv; | 577 | goto uspace_segv; |
578 | } | ||
487 | 579 | ||
580 | #ifndef CONFIG_CPU_SH2A | ||
488 | set_fs(USER_DS); | 581 | set_fs(USER_DS); |
489 | if (copy_from_user(&instruction, (u16 *)(regs->pc), 2)) { | 582 | if (copy_from_user(&instruction, (u16 *)(regs->pc), 2)) { |
490 | /* Argh. Fault on the instruction itself. | 583 | /* Argh. Fault on the instruction itself. |
@@ -499,14 +592,23 @@ asmlinkage void do_address_error(struct pt_regs *regs, | |||
499 | 592 | ||
500 | if (tmp==0) | 593 | if (tmp==0) |
501 | return; /* sorted */ | 594 | return; /* sorted */ |
595 | #endif | ||
502 | 596 | ||
503 | uspace_segv: | 597 | uspace_segv: |
504 | printk(KERN_NOTICE "Killing process \"%s\" due to unaligned access\n", current->comm); | 598 | printk(KERN_NOTICE "Sending SIGBUS to \"%s\" due to unaligned " |
505 | force_sig(SIGSEGV, current); | 599 | "access (PC %lx PR %lx)\n", current->comm, regs->pc, |
600 | regs->pr); | ||
601 | |||
602 | info.si_signo = SIGBUS; | ||
603 | info.si_errno = 0; | ||
604 | info.si_code = si_code; | ||
605 | info.si_addr = (void *) address; | ||
606 | force_sig_info(SIGBUS, &info, current); | ||
506 | } else { | 607 | } else { |
507 | if (regs->pc & 1) | 608 | if (regs->pc & 1) |
508 | die("unaligned program counter", regs, error_code); | 609 | die("unaligned program counter", regs, error_code); |
509 | 610 | ||
611 | #ifndef CONFIG_CPU_SH2A | ||
510 | set_fs(KERNEL_DS); | 612 | set_fs(KERNEL_DS); |
511 | if (copy_from_user(&instruction, (u16 *)(regs->pc), 2)) { | 613 | if (copy_from_user(&instruction, (u16 *)(regs->pc), 2)) { |
512 | /* Argh. Fault on the instruction itself. | 614 | /* Argh. Fault on the instruction itself. |
@@ -518,6 +620,12 @@ asmlinkage void do_address_error(struct pt_regs *regs, | |||
518 | 620 | ||
519 | handle_unaligned_access(instruction, regs); | 621 | handle_unaligned_access(instruction, regs); |
520 | set_fs(oldfs); | 622 | set_fs(oldfs); |
623 | #else | ||
624 | printk(KERN_NOTICE "Killing process \"%s\" due to unaligned " | ||
625 | "access\n", current->comm); | ||
626 | |||
627 | force_sig(SIGSEGV, current); | ||
628 | #endif | ||
521 | } | 629 | } |
522 | } | 630 | } |
523 | 631 | ||
@@ -529,7 +637,7 @@ int is_dsp_inst(struct pt_regs *regs) | |||
529 | { | 637 | { |
530 | unsigned short inst; | 638 | unsigned short inst; |
531 | 639 | ||
532 | /* | 640 | /* |
533 | * Safe guard if DSP mode is already enabled or we're lacking | 641 | * Safe guard if DSP mode is already enabled or we're lacking |
534 | * the DSP altogether. | 642 | * the DSP altogether. |
535 | */ | 643 | */ |
@@ -550,24 +658,49 @@ int is_dsp_inst(struct pt_regs *regs) | |||
550 | #define is_dsp_inst(regs) (0) | 658 | #define is_dsp_inst(regs) (0) |
551 | #endif /* CONFIG_SH_DSP */ | 659 | #endif /* CONFIG_SH_DSP */ |
552 | 660 | ||
553 | extern int do_fpu_inst(unsigned short, struct pt_regs*); | 661 | #ifdef CONFIG_CPU_SH2A |
662 | asmlinkage void do_divide_error(unsigned long r4, unsigned long r5, | ||
663 | unsigned long r6, unsigned long r7, | ||
664 | struct pt_regs __regs) | ||
665 | { | ||
666 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
667 | siginfo_t info; | ||
668 | |||
669 | switch (r4) { | ||
670 | case TRAP_DIVZERO_ERROR: | ||
671 | info.si_code = FPE_INTDIV; | ||
672 | break; | ||
673 | case TRAP_DIVOVF_ERROR: | ||
674 | info.si_code = FPE_INTOVF; | ||
675 | break; | ||
676 | } | ||
677 | |||
678 | force_sig_info(SIGFPE, &info, current); | ||
679 | } | ||
680 | #endif | ||
681 | |||
682 | /* arch/sh/kernel/cpu/sh4/fpu.c */ | ||
683 | extern int do_fpu_inst(unsigned short, struct pt_regs *); | ||
684 | extern asmlinkage void do_fpu_state_restore(unsigned long r4, unsigned long r5, | ||
685 | unsigned long r6, unsigned long r7, struct pt_regs __regs); | ||
554 | 686 | ||
555 | asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5, | 687 | asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5, |
556 | unsigned long r6, unsigned long r7, | 688 | unsigned long r6, unsigned long r7, |
557 | struct pt_regs regs) | 689 | struct pt_regs __regs) |
558 | { | 690 | { |
691 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
559 | unsigned long error_code; | 692 | unsigned long error_code; |
560 | struct task_struct *tsk = current; | 693 | struct task_struct *tsk = current; |
561 | 694 | ||
562 | #ifdef CONFIG_SH_FPU_EMU | 695 | #ifdef CONFIG_SH_FPU_EMU |
563 | unsigned short inst; | 696 | unsigned short inst = 0; |
564 | int err; | 697 | int err; |
565 | 698 | ||
566 | get_user(inst, (unsigned short*)regs.pc); | 699 | get_user(inst, (unsigned short*)regs->pc); |
567 | 700 | ||
568 | err = do_fpu_inst(inst, ®s); | 701 | err = do_fpu_inst(inst, regs); |
569 | if (!err) { | 702 | if (!err) { |
570 | regs.pc += 2; | 703 | regs->pc += 2; |
571 | return; | 704 | return; |
572 | } | 705 | } |
573 | /* not a FPU inst. */ | 706 | /* not a FPU inst. */ |
@@ -575,20 +708,19 @@ asmlinkage void do_reserved_inst(unsigned long r4, unsigned long r5, | |||
575 | 708 | ||
576 | #ifdef CONFIG_SH_DSP | 709 | #ifdef CONFIG_SH_DSP |
577 | /* Check if it's a DSP instruction */ | 710 | /* Check if it's a DSP instruction */ |
578 | if (is_dsp_inst(®s)) { | 711 | if (is_dsp_inst(regs)) { |
579 | /* Enable DSP mode, and restart instruction. */ | 712 | /* Enable DSP mode, and restart instruction. */ |
580 | regs.sr |= SR_DSP; | 713 | regs->sr |= SR_DSP; |
581 | return; | 714 | return; |
582 | } | 715 | } |
583 | #endif | 716 | #endif |
584 | 717 | ||
585 | asm volatile("stc r2_bank, %0": "=r" (error_code)); | 718 | lookup_exception_vector(error_code); |
719 | |||
586 | local_irq_enable(); | 720 | local_irq_enable(); |
587 | tsk->thread.error_code = error_code; | 721 | CHK_REMOTE_DEBUG(regs); |
588 | tsk->thread.trap_no = TRAP_RESERVED_INST; | ||
589 | CHK_REMOTE_DEBUG(®s); | ||
590 | force_sig(SIGILL, tsk); | 722 | force_sig(SIGILL, tsk); |
591 | die_if_no_fixup("reserved instruction", ®s, error_code); | 723 | die_if_no_fixup("reserved instruction", regs, error_code); |
592 | } | 724 | } |
593 | 725 | ||
594 | #ifdef CONFIG_SH_FPU_EMU | 726 | #ifdef CONFIG_SH_FPU_EMU |
@@ -636,39 +768,41 @@ static int emulate_branch(unsigned short inst, struct pt_regs* regs) | |||
636 | 768 | ||
637 | asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5, | 769 | asmlinkage void do_illegal_slot_inst(unsigned long r4, unsigned long r5, |
638 | unsigned long r6, unsigned long r7, | 770 | unsigned long r6, unsigned long r7, |
639 | struct pt_regs regs) | 771 | struct pt_regs __regs) |
640 | { | 772 | { |
773 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
641 | unsigned long error_code; | 774 | unsigned long error_code; |
642 | struct task_struct *tsk = current; | 775 | struct task_struct *tsk = current; |
643 | #ifdef CONFIG_SH_FPU_EMU | 776 | #ifdef CONFIG_SH_FPU_EMU |
644 | unsigned short inst; | 777 | unsigned short inst = 0; |
645 | 778 | ||
646 | get_user(inst, (unsigned short *)regs.pc + 1); | 779 | get_user(inst, (unsigned short *)regs->pc + 1); |
647 | if (!do_fpu_inst(inst, ®s)) { | 780 | if (!do_fpu_inst(inst, regs)) { |
648 | get_user(inst, (unsigned short *)regs.pc); | 781 | get_user(inst, (unsigned short *)regs->pc); |
649 | if (!emulate_branch(inst, ®s)) | 782 | if (!emulate_branch(inst, regs)) |
650 | return; | 783 | return; |
651 | /* fault in branch.*/ | 784 | /* fault in branch.*/ |
652 | } | 785 | } |
653 | /* not a FPU inst. */ | 786 | /* not a FPU inst. */ |
654 | #endif | 787 | #endif |
655 | 788 | ||
656 | asm volatile("stc r2_bank, %0": "=r" (error_code)); | 789 | lookup_exception_vector(error_code); |
790 | |||
657 | local_irq_enable(); | 791 | local_irq_enable(); |
658 | tsk->thread.error_code = error_code; | 792 | CHK_REMOTE_DEBUG(regs); |
659 | tsk->thread.trap_no = TRAP_RESERVED_INST; | ||
660 | CHK_REMOTE_DEBUG(®s); | ||
661 | force_sig(SIGILL, tsk); | 793 | force_sig(SIGILL, tsk); |
662 | die_if_no_fixup("illegal slot instruction", ®s, error_code); | 794 | die_if_no_fixup("illegal slot instruction", regs, error_code); |
663 | } | 795 | } |
664 | 796 | ||
665 | asmlinkage void do_exception_error(unsigned long r4, unsigned long r5, | 797 | asmlinkage void do_exception_error(unsigned long r4, unsigned long r5, |
666 | unsigned long r6, unsigned long r7, | 798 | unsigned long r6, unsigned long r7, |
667 | struct pt_regs regs) | 799 | struct pt_regs __regs) |
668 | { | 800 | { |
801 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | ||
669 | long ex; | 802 | long ex; |
670 | asm volatile("stc r2_bank, %0" : "=r" (ex)); | 803 | |
671 | die_if_kernel("exception", ®s, ex); | 804 | lookup_exception_vector(ex); |
805 | die_if_kernel("exception", regs, ex); | ||
672 | } | 806 | } |
673 | 807 | ||
674 | #if defined(CONFIG_SH_STANDARD_BIOS) | 808 | #if defined(CONFIG_SH_STANDARD_BIOS) |
@@ -709,14 +843,24 @@ void __init per_cpu_trap_init(void) | |||
709 | : "memory"); | 843 | : "memory"); |
710 | } | 844 | } |
711 | 845 | ||
712 | void __init trap_init(void) | 846 | void *set_exception_table_vec(unsigned int vec, void *handler) |
713 | { | 847 | { |
714 | extern void *exception_handling_table[]; | 848 | extern void *exception_handling_table[]; |
849 | void *old_handler; | ||
850 | |||
851 | old_handler = exception_handling_table[vec]; | ||
852 | exception_handling_table[vec] = handler; | ||
853 | return old_handler; | ||
854 | } | ||
715 | 855 | ||
716 | exception_handling_table[TRAP_RESERVED_INST] | 856 | extern asmlinkage void address_error_handler(unsigned long r4, unsigned long r5, |
717 | = (void *)do_reserved_inst; | 857 | unsigned long r6, unsigned long r7, |
718 | exception_handling_table[TRAP_ILLEGAL_SLOT_INST] | 858 | struct pt_regs __regs); |
719 | = (void *)do_illegal_slot_inst; | 859 | |
860 | void __init trap_init(void) | ||
861 | { | ||
862 | set_exception_table_vec(TRAP_RESERVED_INST, do_reserved_inst); | ||
863 | set_exception_table_vec(TRAP_ILLEGAL_SLOT_INST, do_illegal_slot_inst); | ||
720 | 864 | ||
721 | #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_FPU) || \ | 865 | #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_SH_FPU) || \ |
722 | defined(CONFIG_SH_FPU_EMU) | 866 | defined(CONFIG_SH_FPU_EMU) |
@@ -725,61 +869,67 @@ void __init trap_init(void) | |||
725 | * reserved. They'll be handled in the math-emu case, or faulted on | 869 | * reserved. They'll be handled in the math-emu case, or faulted on |
726 | * otherwise. | 870 | * otherwise. |
727 | */ | 871 | */ |
728 | /* entry 64 corresponds to EXPEVT=0x800 */ | 872 | set_exception_table_evt(0x800, do_reserved_inst); |
729 | exception_handling_table[64] = (void *)do_reserved_inst; | 873 | set_exception_table_evt(0x820, do_illegal_slot_inst); |
730 | exception_handling_table[65] = (void *)do_illegal_slot_inst; | 874 | #elif defined(CONFIG_SH_FPU) |
875 | set_exception_table_evt(0x800, do_fpu_state_restore); | ||
876 | set_exception_table_evt(0x820, do_fpu_state_restore); | ||
731 | #endif | 877 | #endif |
732 | 878 | ||
879 | #ifdef CONFIG_CPU_SH2 | ||
880 | set_exception_table_vec(TRAP_ADDRESS_ERROR, address_error_handler); | ||
881 | #endif | ||
882 | #ifdef CONFIG_CPU_SH2A | ||
883 | set_exception_table_vec(TRAP_DIVZERO_ERROR, do_divide_error); | ||
884 | set_exception_table_vec(TRAP_DIVOVF_ERROR, do_divide_error); | ||
885 | #endif | ||
886 | |||
733 | /* Setup VBR for boot cpu */ | 887 | /* Setup VBR for boot cpu */ |
734 | per_cpu_trap_init(); | 888 | per_cpu_trap_init(); |
735 | } | 889 | } |
736 | 890 | ||
737 | void show_stack(struct task_struct *tsk, unsigned long *sp) | 891 | void show_trace(struct task_struct *tsk, unsigned long *sp, |
892 | struct pt_regs *regs) | ||
738 | { | 893 | { |
739 | unsigned long *stack, addr; | 894 | unsigned long addr; |
740 | unsigned long module_start = VMALLOC_START; | ||
741 | unsigned long module_end = VMALLOC_END; | ||
742 | int i = 1; | ||
743 | 895 | ||
744 | if (!tsk) | 896 | if (regs && user_mode(regs)) |
745 | tsk = current; | 897 | return; |
746 | if (tsk == current) | ||
747 | sp = (unsigned long *)current_stack_pointer; | ||
748 | else | ||
749 | sp = (unsigned long *)tsk->thread.sp; | ||
750 | |||
751 | stack = sp; | ||
752 | 898 | ||
753 | printk("\nCall trace: "); | 899 | printk("\nCall trace: "); |
754 | #ifdef CONFIG_KALLSYMS | 900 | #ifdef CONFIG_KALLSYMS |
755 | printk("\n"); | 901 | printk("\n"); |
756 | #endif | 902 | #endif |
757 | 903 | ||
758 | while (!kstack_end(stack)) { | 904 | while (!kstack_end(sp)) { |
759 | addr = *stack++; | 905 | addr = *sp++; |
760 | if (((addr >= (unsigned long)_text) && | 906 | if (kernel_text_address(addr)) |
761 | (addr <= (unsigned long)_etext)) || | 907 | print_ip_sym(addr); |
762 | ((addr >= module_start) && (addr <= module_end))) { | ||
763 | /* | ||
764 | * For 80-columns display, 6 entry is maximum. | ||
765 | * NOTE: '[<8c00abcd>] ' consumes 13 columns . | ||
766 | */ | ||
767 | #ifndef CONFIG_KALLSYMS | ||
768 | if (i && ((i % 6) == 0)) | ||
769 | printk("\n "); | ||
770 | #endif | ||
771 | printk("[<%08lx>] ", addr); | ||
772 | print_symbol("%s\n", addr); | ||
773 | i++; | ||
774 | } | ||
775 | } | 908 | } |
776 | 909 | ||
777 | printk("\n"); | 910 | printk("\n"); |
911 | |||
912 | if (!tsk) | ||
913 | tsk = current; | ||
914 | |||
915 | debug_show_held_locks(tsk); | ||
778 | } | 916 | } |
779 | 917 | ||
780 | void show_task(unsigned long *sp) | 918 | void show_stack(struct task_struct *tsk, unsigned long *sp) |
781 | { | 919 | { |
782 | show_stack(NULL, sp); | 920 | unsigned long stack; |
921 | |||
922 | if (!tsk) | ||
923 | tsk = current; | ||
924 | if (tsk == current) | ||
925 | sp = (unsigned long *)current_stack_pointer; | ||
926 | else | ||
927 | sp = (unsigned long *)tsk->thread.sp; | ||
928 | |||
929 | stack = (unsigned long)sp; | ||
930 | dump_mem("Stack: ", stack, THREAD_SIZE + | ||
931 | (unsigned long)task_stack_page(tsk)); | ||
932 | show_trace(tsk, sp, NULL); | ||
783 | } | 933 | } |
784 | 934 | ||
785 | void dump_stack(void) | 935 | void dump_stack(void) |
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S index 5eb930918186..f34bdcc33a7d 100644 --- a/arch/sh/kernel/vmlinux.lds.S +++ b/arch/sh/kernel/vmlinux.lds.S | |||
@@ -51,7 +51,7 @@ SECTIONS | |||
51 | } | 51 | } |
52 | 52 | ||
53 | . = ALIGN(PAGE_SIZE); | 53 | . = ALIGN(PAGE_SIZE); |
54 | .data.page_aligned : { *(.data.idt) } | 54 | .data.page_aligned : { *(.data.page_aligned) } |
55 | 55 | ||
56 | . = ALIGN(32); | 56 | . = ALIGN(32); |
57 | __per_cpu_start = .; | 57 | __per_cpu_start = .; |
@@ -76,13 +76,7 @@ SECTIONS | |||
76 | __setup_end = .; | 76 | __setup_end = .; |
77 | __initcall_start = .; | 77 | __initcall_start = .; |
78 | .initcall.init : { | 78 | .initcall.init : { |
79 | *(.initcall1.init) | 79 | INITCALLS |
80 | *(.initcall2.init) | ||
81 | *(.initcall3.init) | ||
82 | *(.initcall4.init) | ||
83 | *(.initcall5.init) | ||
84 | *(.initcall6.init) | ||
85 | *(.initcall7.init) | ||
86 | } | 80 | } |
87 | __initcall_end = .; | 81 | __initcall_end = .; |
88 | __con_initcall_start = .; | 82 | __con_initcall_start = .; |
diff --git a/arch/sh/kernel/vsyscall/vsyscall.c b/arch/sh/kernel/vsyscall/vsyscall.c index 075d6cc1a2d7..deb46941f315 100644 --- a/arch/sh/kernel/vsyscall/vsyscall.c +++ b/arch/sh/kernel/vsyscall/vsyscall.c | |||
@@ -97,7 +97,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, | |||
97 | goto up_fail; | 97 | goto up_fail; |
98 | } | 98 | } |
99 | 99 | ||
100 | vma = kmem_cache_zalloc(vm_area_cachep, SLAB_KERNEL); | 100 | vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL); |
101 | if (!vma) { | 101 | if (!vma) { |
102 | ret = -ENOMEM; | 102 | ret = -ENOMEM; |
103 | goto up_fail; | 103 | goto up_fail; |
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig index 9dd606464d23..29f4ee35c6dc 100644 --- a/arch/sh/mm/Kconfig +++ b/arch/sh/mm/Kconfig | |||
@@ -4,8 +4,12 @@ menu "Processor selection" | |||
4 | # Processor families | 4 | # Processor families |
5 | # | 5 | # |
6 | config CPU_SH2 | 6 | config CPU_SH2 |
7 | select SH_WRITETHROUGH if !CPU_SH2A | ||
7 | bool | 8 | bool |
8 | select SH_WRITETHROUGH | 9 | |
10 | config CPU_SH2A | ||
11 | bool | ||
12 | select CPU_SH2 | ||
9 | 13 | ||
10 | config CPU_SH3 | 14 | config CPU_SH3 |
11 | bool | 15 | bool |
@@ -16,6 +20,7 @@ config CPU_SH4 | |||
16 | bool | 20 | bool |
17 | select CPU_HAS_INTEVT | 21 | select CPU_HAS_INTEVT |
18 | select CPU_HAS_SR_RB | 22 | select CPU_HAS_SR_RB |
23 | select CPU_HAS_PTEA if !CPU_SUBTYPE_ST40 | ||
19 | 24 | ||
20 | config CPU_SH4A | 25 | config CPU_SH4A |
21 | bool | 26 | bool |
@@ -30,6 +35,9 @@ config CPU_SUBTYPE_ST40 | |||
30 | select CPU_SH4 | 35 | select CPU_SH4 |
31 | select CPU_HAS_INTC2_IRQ | 36 | select CPU_HAS_INTC2_IRQ |
32 | 37 | ||
38 | config CPU_SHX2 | ||
39 | bool | ||
40 | |||
33 | # | 41 | # |
34 | # Processor subtypes | 42 | # Processor subtypes |
35 | # | 43 | # |
@@ -40,6 +48,16 @@ config CPU_SUBTYPE_SH7604 | |||
40 | bool "Support SH7604 processor" | 48 | bool "Support SH7604 processor" |
41 | select CPU_SH2 | 49 | select CPU_SH2 |
42 | 50 | ||
51 | config CPU_SUBTYPE_SH7619 | ||
52 | bool "Support SH7619 processor" | ||
53 | select CPU_SH2 | ||
54 | |||
55 | comment "SH-2A Processor Support" | ||
56 | |||
57 | config CPU_SUBTYPE_SH7206 | ||
58 | bool "Support SH7206 processor" | ||
59 | select CPU_SH2A | ||
60 | |||
43 | comment "SH-3 Processor Support" | 61 | comment "SH-3 Processor Support" |
44 | 62 | ||
45 | config CPU_SUBTYPE_SH7300 | 63 | config CPU_SUBTYPE_SH7300 |
@@ -89,6 +107,7 @@ comment "SH-4 Processor Support" | |||
89 | config CPU_SUBTYPE_SH7750 | 107 | config CPU_SUBTYPE_SH7750 |
90 | bool "Support SH7750 processor" | 108 | bool "Support SH7750 processor" |
91 | select CPU_SH4 | 109 | select CPU_SH4 |
110 | select CPU_HAS_IPR_IRQ | ||
92 | help | 111 | help |
93 | Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU. | 112 | Select SH7750 if you have a 200 Mhz SH-4 HD6417750 CPU. |
94 | 113 | ||
@@ -104,15 +123,18 @@ config CPU_SUBTYPE_SH7750R | |||
104 | bool "Support SH7750R processor" | 123 | bool "Support SH7750R processor" |
105 | select CPU_SH4 | 124 | select CPU_SH4 |
106 | select CPU_SUBTYPE_SH7750 | 125 | select CPU_SUBTYPE_SH7750 |
126 | select CPU_HAS_IPR_IRQ | ||
107 | 127 | ||
108 | config CPU_SUBTYPE_SH7750S | 128 | config CPU_SUBTYPE_SH7750S |
109 | bool "Support SH7750S processor" | 129 | bool "Support SH7750S processor" |
110 | select CPU_SH4 | 130 | select CPU_SH4 |
111 | select CPU_SUBTYPE_SH7750 | 131 | select CPU_SUBTYPE_SH7750 |
132 | select CPU_HAS_IPR_IRQ | ||
112 | 133 | ||
113 | config CPU_SUBTYPE_SH7751 | 134 | config CPU_SUBTYPE_SH7751 |
114 | bool "Support SH7751 processor" | 135 | bool "Support SH7751 processor" |
115 | select CPU_SH4 | 136 | select CPU_SH4 |
137 | select CPU_HAS_IPR_IRQ | ||
116 | help | 138 | help |
117 | Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU, | 139 | Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU, |
118 | or if you have a HD6417751R CPU. | 140 | or if you have a HD6417751R CPU. |
@@ -121,6 +143,7 @@ config CPU_SUBTYPE_SH7751R | |||
121 | bool "Support SH7751R processor" | 143 | bool "Support SH7751R processor" |
122 | select CPU_SH4 | 144 | select CPU_SH4 |
123 | select CPU_SUBTYPE_SH7751 | 145 | select CPU_SUBTYPE_SH7751 |
146 | select CPU_HAS_IPR_IRQ | ||
124 | 147 | ||
125 | config CPU_SUBTYPE_SH7760 | 148 | config CPU_SUBTYPE_SH7760 |
126 | bool "Support SH7760 processor" | 149 | bool "Support SH7760 processor" |
@@ -157,6 +180,12 @@ config CPU_SUBTYPE_SH7780 | |||
157 | select CPU_SH4A | 180 | select CPU_SH4A |
158 | select CPU_HAS_INTC2_IRQ | 181 | select CPU_HAS_INTC2_IRQ |
159 | 182 | ||
183 | config CPU_SUBTYPE_SH7785 | ||
184 | bool "Support SH7785 processor" | ||
185 | select CPU_SH4A | ||
186 | select CPU_SHX2 | ||
187 | select CPU_HAS_INTC2_IRQ | ||
188 | |||
160 | comment "SH4AL-DSP Processor Support" | 189 | comment "SH4AL-DSP Processor Support" |
161 | 190 | ||
162 | config CPU_SUBTYPE_SH73180 | 191 | config CPU_SUBTYPE_SH73180 |
@@ -167,6 +196,12 @@ config CPU_SUBTYPE_SH7343 | |||
167 | bool "Support SH7343 processor" | 196 | bool "Support SH7343 processor" |
168 | select CPU_SH4AL_DSP | 197 | select CPU_SH4AL_DSP |
169 | 198 | ||
199 | config CPU_SUBTYPE_SH7722 | ||
200 | bool "Support SH7722 processor" | ||
201 | select CPU_SH4AL_DSP | ||
202 | select CPU_SHX2 | ||
203 | select CPU_HAS_IPR_IRQ | ||
204 | |||
170 | endmenu | 205 | endmenu |
171 | 206 | ||
172 | menu "Memory management options" | 207 | menu "Memory management options" |
@@ -216,13 +251,22 @@ config MEMORY_SIZE | |||
216 | 251 | ||
217 | config 32BIT | 252 | config 32BIT |
218 | bool "Support 32-bit physical addressing through PMB" | 253 | bool "Support 32-bit physical addressing through PMB" |
219 | depends on CPU_SH4A && MMU | 254 | depends on CPU_SH4A && MMU && (!X2TLB || BROKEN) |
220 | default y | 255 | default y |
221 | help | 256 | help |
222 | If you say Y here, physical addressing will be extended to | 257 | If you say Y here, physical addressing will be extended to |
223 | 32-bits through the SH-4A PMB. If this is not set, legacy | 258 | 32-bits through the SH-4A PMB. If this is not set, legacy |
224 | 29-bit physical addressing will be used. | 259 | 29-bit physical addressing will be used. |
225 | 260 | ||
261 | config X2TLB | ||
262 | bool "Enable extended TLB mode" | ||
263 | depends on CPU_SHX2 && MMU && EXPERIMENTAL | ||
264 | help | ||
265 | Selecting this option will enable the extended mode of the SH-X2 | ||
266 | TLB. For legacy SH-X behaviour and interoperability, say N. For | ||
267 | all of the fun new features and a willingless to submit bug reports, | ||
268 | say Y. | ||
269 | |||
226 | config VSYSCALL | 270 | config VSYSCALL |
227 | bool "Support vsyscall page" | 271 | bool "Support vsyscall page" |
228 | depends on MMU | 272 | depends on MMU |
@@ -237,16 +281,52 @@ config VSYSCALL | |||
237 | (the default value) say Y. | 281 | (the default value) say Y. |
238 | 282 | ||
239 | choice | 283 | choice |
284 | prompt "Kernel page size" | ||
285 | default PAGE_SIZE_4KB | ||
286 | |||
287 | config PAGE_SIZE_4KB | ||
288 | bool "4kB" | ||
289 | help | ||
290 | This is the default page size used by all SuperH CPUs. | ||
291 | |||
292 | config PAGE_SIZE_8KB | ||
293 | bool "8kB" | ||
294 | depends on EXPERIMENTAL && X2TLB | ||
295 | help | ||
296 | This enables 8kB pages as supported by SH-X2 and later MMUs. | ||
297 | |||
298 | config PAGE_SIZE_64KB | ||
299 | bool "64kB" | ||
300 | depends on EXPERIMENTAL && CPU_SH4 | ||
301 | help | ||
302 | This enables support for 64kB pages, possible on all SH-4 | ||
303 | CPUs and later. Highly experimental, not recommended. | ||
304 | |||
305 | endchoice | ||
306 | |||
307 | choice | ||
240 | prompt "HugeTLB page size" | 308 | prompt "HugeTLB page size" |
241 | depends on HUGETLB_PAGE && CPU_SH4 && MMU | 309 | depends on HUGETLB_PAGE && CPU_SH4 && MMU |
242 | default HUGETLB_PAGE_SIZE_64K | 310 | default HUGETLB_PAGE_SIZE_64K |
243 | 311 | ||
244 | config HUGETLB_PAGE_SIZE_64K | 312 | config HUGETLB_PAGE_SIZE_64K |
245 | bool "64K" | 313 | bool "64kB" |
314 | |||
315 | config HUGETLB_PAGE_SIZE_256K | ||
316 | bool "256kB" | ||
317 | depends on X2TLB | ||
246 | 318 | ||
247 | config HUGETLB_PAGE_SIZE_1MB | 319 | config HUGETLB_PAGE_SIZE_1MB |
248 | bool "1MB" | 320 | bool "1MB" |
249 | 321 | ||
322 | config HUGETLB_PAGE_SIZE_4MB | ||
323 | bool "4MB" | ||
324 | depends on X2TLB | ||
325 | |||
326 | config HUGETLB_PAGE_SIZE_64MB | ||
327 | bool "64MB" | ||
328 | depends on X2TLB | ||
329 | |||
250 | endchoice | 330 | endchoice |
251 | 331 | ||
252 | source "mm/Kconfig" | 332 | source "mm/Kconfig" |
@@ -274,7 +354,6 @@ config SH_DIRECT_MAPPED | |||
274 | 354 | ||
275 | config SH_WRITETHROUGH | 355 | config SH_WRITETHROUGH |
276 | bool "Use write-through caching" | 356 | bool "Use write-through caching" |
277 | default y if CPU_SH2 | ||
278 | help | 357 | help |
279 | Selecting this option will configure the caches in write-through | 358 | Selecting this option will configure the caches in write-through |
280 | mode, as opposed to the default write-back configuration. | 359 | mode, as opposed to the default write-back configuration. |
diff --git a/arch/sh/mm/cache-sh2.c b/arch/sh/mm/cache-sh2.c index 2689cb24ea2b..6614033f6be9 100644 --- a/arch/sh/mm/cache-sh2.c +++ b/arch/sh/mm/cache-sh2.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Released under the terms of the GNU GPL v2.0. | 6 | * Released under the terms of the GNU GPL v2.0. |
7 | */ | 7 | */ |
8 | |||
8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | 11 | ||
@@ -14,37 +15,43 @@ | |||
14 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
15 | #include <asm/io.h> | 16 | #include <asm/io.h> |
16 | 17 | ||
17 | /* | 18 | void __flush_wback_region(void *start, int size) |
18 | * Calculate the OC address and set the way bit on the SH-2. | ||
19 | * | ||
20 | * We must have already jump_to_P2()'ed prior to calling this | ||
21 | * function, since we rely on CCR manipulation to do the | ||
22 | * Right Thing(tm). | ||
23 | */ | ||
24 | unsigned long __get_oc_addr(unsigned long set, unsigned long way) | ||
25 | { | 19 | { |
26 | unsigned long ccr; | 20 | unsigned long v; |
27 | 21 | unsigned long begin, end; | |
28 | /* | 22 | |
29 | * On SH-2 the way bit isn't tracked in the address field | 23 | begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); |
30 | * if we're doing address array access .. instead, we need | 24 | end = ((unsigned long)start + size + L1_CACHE_BYTES-1) |
31 | * to manually switch out the way in the CCR. | 25 | & ~(L1_CACHE_BYTES-1); |
32 | */ | 26 | for (v = begin; v < end; v+=L1_CACHE_BYTES) { |
33 | ccr = ctrl_inl(CCR); | 27 | /* FIXME cache purge */ |
34 | ccr &= ~0x00c0; | 28 | ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008); |
35 | ccr |= way << cpu_data->dcache.way_shift; | 29 | } |
36 | 30 | } | |
37 | /* | 31 | |
38 | * Despite the number of sets being halved, we end up losing | 32 | void __flush_purge_region(void *start, int size) |
39 | * the first 2 ways to OCRAM instead of the last 2 (if we're | 33 | { |
40 | * 4-way). As a result, forcibly setting the W1 bit handily | 34 | unsigned long v; |
41 | * bumps us up 2 ways. | 35 | unsigned long begin, end; |
42 | */ | 36 | |
43 | if (ccr & CCR_CACHE_ORA) | 37 | begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); |
44 | ccr |= 1 << (cpu_data->dcache.way_shift + 1); | 38 | end = ((unsigned long)start + size + L1_CACHE_BYTES-1) |
45 | 39 | & ~(L1_CACHE_BYTES-1); | |
46 | ctrl_outl(ccr, CCR); | 40 | for (v = begin; v < end; v+=L1_CACHE_BYTES) { |
47 | 41 | ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008); | |
48 | return CACHE_OC_ADDRESS_ARRAY | (set << cpu_data->dcache.entry_shift); | 42 | } |
43 | } | ||
44 | |||
45 | void __flush_invalidate_region(void *start, int size) | ||
46 | { | ||
47 | unsigned long v; | ||
48 | unsigned long begin, end; | ||
49 | |||
50 | begin = (unsigned long)start & ~(L1_CACHE_BYTES-1); | ||
51 | end = ((unsigned long)start + size + L1_CACHE_BYTES-1) | ||
52 | & ~(L1_CACHE_BYTES-1); | ||
53 | for (v = begin; v < end; v+=L1_CACHE_BYTES) { | ||
54 | ctrl_outl((v & 0x1ffffc00), (v & 0x00000ff0) | 0x00000008); | ||
55 | } | ||
49 | } | 56 | } |
50 | 57 | ||
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index e48cc22724d9..c6955157c989 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c | |||
@@ -11,12 +11,8 @@ | |||
11 | */ | 11 | */ |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
14 | #include <asm/addrspace.h> | 14 | #include <linux/io.h> |
15 | #include <asm/pgtable.h> | 15 | #include <linux/mutex.h> |
16 | #include <asm/processor.h> | ||
17 | #include <asm/cache.h> | ||
18 | #include <asm/io.h> | ||
19 | #include <asm/pgalloc.h> | ||
20 | #include <asm/mmu_context.h> | 16 | #include <asm/mmu_context.h> |
21 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
22 | 18 | ||
@@ -83,9 +79,9 @@ static void __init emit_cache_params(void) | |||
83 | */ | 79 | */ |
84 | 80 | ||
85 | /* Worst case assumed to be 64k cache, direct-mapped i.e. 4 synonym bits. */ | 81 | /* Worst case assumed to be 64k cache, direct-mapped i.e. 4 synonym bits. */ |
86 | #define MAX_P3_SEMAPHORES 16 | 82 | #define MAX_P3_MUTEXES 16 |
87 | 83 | ||
88 | struct semaphore p3map_sem[MAX_P3_SEMAPHORES]; | 84 | struct mutex p3map_mutex[MAX_P3_MUTEXES]; |
89 | 85 | ||
90 | void __init p3_cache_init(void) | 86 | void __init p3_cache_init(void) |
91 | { | 87 | { |
@@ -111,11 +107,11 @@ void __init p3_cache_init(void) | |||
111 | 107 | ||
112 | emit_cache_params(); | 108 | emit_cache_params(); |
113 | 109 | ||
114 | if (remap_area_pages(P3SEG, 0, PAGE_SIZE * 4, _PAGE_CACHABLE)) | 110 | if (ioremap_page_range(P3SEG, P3SEG + (PAGE_SIZE * 4), 0, PAGE_KERNEL)) |
115 | panic("%s failed.", __FUNCTION__); | 111 | panic("%s failed.", __FUNCTION__); |
116 | 112 | ||
117 | for (i = 0; i < cpu_data->dcache.n_aliases; i++) | 113 | for (i = 0; i < cpu_data->dcache.n_aliases; i++) |
118 | sema_init(&p3map_sem[i], 1); | 114 | mutex_init(&p3map_mutex[i]); |
119 | } | 115 | } |
120 | 116 | ||
121 | /* | 117 | /* |
@@ -229,7 +225,7 @@ static inline void flush_cache_4096(unsigned long start, | |||
229 | */ | 225 | */ |
230 | if ((cpu_data->flags & CPU_HAS_P2_FLUSH_BUG) || | 226 | if ((cpu_data->flags & CPU_HAS_P2_FLUSH_BUG) || |
231 | (start < CACHE_OC_ADDRESS_ARRAY)) | 227 | (start < CACHE_OC_ADDRESS_ARRAY)) |
232 | exec_offset = 0x20000000; | 228 | exec_offset = 0x20000000; |
233 | 229 | ||
234 | local_irq_save(flags); | 230 | local_irq_save(flags); |
235 | __flush_cache_4096(start | SH_CACHE_ASSOC, | 231 | __flush_cache_4096(start | SH_CACHE_ASSOC, |
@@ -250,7 +246,7 @@ void flush_dcache_page(struct page *page) | |||
250 | 246 | ||
251 | /* Loop all the D-cache */ | 247 | /* Loop all the D-cache */ |
252 | n = cpu_data->dcache.n_aliases; | 248 | n = cpu_data->dcache.n_aliases; |
253 | for (i = 0; i < n; i++, addr += PAGE_SIZE) | 249 | for (i = 0; i < n; i++, addr += 4096) |
254 | flush_cache_4096(addr, phys); | 250 | flush_cache_4096(addr, phys); |
255 | } | 251 | } |
256 | 252 | ||
diff --git a/arch/sh/mm/clear_page.S b/arch/sh/mm/clear_page.S index 7b96425ae270..8a706131e521 100644 --- a/arch/sh/mm/clear_page.S +++ b/arch/sh/mm/clear_page.S | |||
@@ -1,12 +1,12 @@ | |||
1 | /* $Id: clear_page.S,v 1.13 2003/08/25 17:03:10 lethal Exp $ | 1 | /* |
2 | * | ||
3 | * __clear_user_page, __clear_user, clear_page implementation of SuperH | 2 | * __clear_user_page, __clear_user, clear_page implementation of SuperH |
4 | * | 3 | * |
5 | * Copyright (C) 2001 Kaz Kojima | 4 | * Copyright (C) 2001 Kaz Kojima |
6 | * Copyright (C) 2001, 2002 Niibe Yutaka | 5 | * Copyright (C) 2001, 2002 Niibe Yutaka |
7 | * | 6 | * Copyright (C) 2006 Paul Mundt |
8 | */ | 7 | */ |
9 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | #include <asm/page.h> | ||
10 | 10 | ||
11 | /* | 11 | /* |
12 | * clear_page_slow | 12 | * clear_page_slow |
@@ -18,11 +18,11 @@ | |||
18 | /* | 18 | /* |
19 | * r0 --- scratch | 19 | * r0 --- scratch |
20 | * r4 --- to | 20 | * r4 --- to |
21 | * r5 --- to + 4096 | 21 | * r5 --- to + PAGE_SIZE |
22 | */ | 22 | */ |
23 | ENTRY(clear_page_slow) | 23 | ENTRY(clear_page_slow) |
24 | mov r4,r5 | 24 | mov r4,r5 |
25 | mov.w .Llimit,r0 | 25 | mov.l .Llimit,r0 |
26 | add r0,r5 | 26 | add r0,r5 |
27 | mov #0,r0 | 27 | mov #0,r0 |
28 | ! | 28 | ! |
@@ -50,7 +50,7 @@ ENTRY(clear_page_slow) | |||
50 | ! | 50 | ! |
51 | rts | 51 | rts |
52 | nop | 52 | nop |
53 | .Llimit: .word (4096-28) | 53 | .Llimit: .long (PAGE_SIZE-28) |
54 | 54 | ||
55 | ENTRY(__clear_user) | 55 | ENTRY(__clear_user) |
56 | ! | 56 | ! |
@@ -164,10 +164,10 @@ ENTRY(__clear_user) | |||
164 | * r0 --- scratch | 164 | * r0 --- scratch |
165 | * r4 --- to | 165 | * r4 --- to |
166 | * r5 --- orig_to | 166 | * r5 --- orig_to |
167 | * r6 --- to + 4096 | 167 | * r6 --- to + PAGE_SIZE |
168 | */ | 168 | */ |
169 | ENTRY(__clear_user_page) | 169 | ENTRY(__clear_user_page) |
170 | mov.w .L4096,r0 | 170 | mov.l .Lpsz,r0 |
171 | mov r4,r6 | 171 | mov r4,r6 |
172 | add r0,r6 | 172 | add r0,r6 |
173 | mov #0,r0 | 173 | mov #0,r0 |
@@ -191,7 +191,7 @@ ENTRY(__clear_user_page) | |||
191 | ! | 191 | ! |
192 | rts | 192 | rts |
193 | nop | 193 | nop |
194 | .L4096: .word 4096 | 194 | .Lpsz: .long PAGE_SIZE |
195 | 195 | ||
196 | #endif | 196 | #endif |
197 | 197 | ||
diff --git a/arch/sh/mm/copy_page.S b/arch/sh/mm/copy_page.S index 1addffe117c3..397c94c97315 100644 --- a/arch/sh/mm/copy_page.S +++ b/arch/sh/mm/copy_page.S | |||
@@ -1,12 +1,12 @@ | |||
1 | /* $Id: copy_page.S,v 1.8 2003/08/25 17:03:10 lethal Exp $ | 1 | /* |
2 | * | ||
3 | * copy_page, __copy_user_page, __copy_user implementation of SuperH | 2 | * copy_page, __copy_user_page, __copy_user implementation of SuperH |
4 | * | 3 | * |
5 | * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima | 4 | * Copyright (C) 2001 Niibe Yutaka & Kaz Kojima |
6 | * Copyright (C) 2002 Toshinobu Sugioka | 5 | * Copyright (C) 2002 Toshinobu Sugioka |
7 | * | 6 | * Copyright (C) 2006 Paul Mundt |
8 | */ | 7 | */ |
9 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | #include <asm/page.h> | ||
10 | 10 | ||
11 | /* | 11 | /* |
12 | * copy_page_slow | 12 | * copy_page_slow |
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | /* | 19 | /* |
20 | * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch | 20 | * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch |
21 | * r8 --- from + 4096 | 21 | * r8 --- from + PAGE_SIZE |
22 | * r9 --- not used | 22 | * r9 --- not used |
23 | * r10 --- to | 23 | * r10 --- to |
24 | * r11 --- from | 24 | * r11 --- from |
@@ -30,7 +30,7 @@ ENTRY(copy_page_slow) | |||
30 | mov r4,r10 | 30 | mov r4,r10 |
31 | mov r5,r11 | 31 | mov r5,r11 |
32 | mov r5,r8 | 32 | mov r5,r8 |
33 | mov.w .L4096,r0 | 33 | mov.l .Lpsz,r0 |
34 | add r0,r8 | 34 | add r0,r8 |
35 | ! | 35 | ! |
36 | 1: mov.l @r11+,r0 | 36 | 1: mov.l @r11+,r0 |
@@ -80,7 +80,7 @@ ENTRY(copy_page_slow) | |||
80 | 80 | ||
81 | /* | 81 | /* |
82 | * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch | 82 | * r0, r1, r2, r3, r4, r5, r6, r7 --- scratch |
83 | * r8 --- from + 4096 | 83 | * r8 --- from + PAGE_SIZE |
84 | * r9 --- orig_to | 84 | * r9 --- orig_to |
85 | * r10 --- to | 85 | * r10 --- to |
86 | * r11 --- from | 86 | * r11 --- from |
@@ -94,7 +94,7 @@ ENTRY(__copy_user_page) | |||
94 | mov r5,r11 | 94 | mov r5,r11 |
95 | mov r6,r9 | 95 | mov r6,r9 |
96 | mov r5,r8 | 96 | mov r5,r8 |
97 | mov.w .L4096,r0 | 97 | mov.l .Lpsz,r0 |
98 | add r0,r8 | 98 | add r0,r8 |
99 | ! | 99 | ! |
100 | 1: ocbi @r9 | 100 | 1: ocbi @r9 |
@@ -129,7 +129,7 @@ ENTRY(__copy_user_page) | |||
129 | rts | 129 | rts |
130 | nop | 130 | nop |
131 | #endif | 131 | #endif |
132 | .L4096: .word 4096 | 132 | .Lpsz: .long PAGE_SIZE |
133 | /* | 133 | /* |
134 | * __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); | 134 | * __kernel_size_t __copy_user(void *to, const void *from, __kernel_size_t n); |
135 | * Return the number of bytes NOT copied | 135 | * Return the number of bytes NOT copied |
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index 68663b8f99ae..716ebf568af2 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c | |||
@@ -26,13 +26,19 @@ extern void die(const char *,struct pt_regs *,long); | |||
26 | * and the problem, and then passes it off to one of the appropriate | 26 | * and the problem, and then passes it off to one of the appropriate |
27 | * routines. | 27 | * routines. |
28 | */ | 28 | */ |
29 | asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess, | 29 | asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, |
30 | unsigned long address) | 30 | unsigned long writeaccess, |
31 | unsigned long address) | ||
31 | { | 32 | { |
32 | struct task_struct *tsk; | 33 | struct task_struct *tsk; |
33 | struct mm_struct *mm; | 34 | struct mm_struct *mm; |
34 | struct vm_area_struct * vma; | 35 | struct vm_area_struct * vma; |
35 | unsigned long page; | 36 | unsigned long page; |
37 | int si_code; | ||
38 | siginfo_t info; | ||
39 | |||
40 | trace_hardirqs_on(); | ||
41 | local_irq_enable(); | ||
36 | 42 | ||
37 | #ifdef CONFIG_SH_KGDB | 43 | #ifdef CONFIG_SH_KGDB |
38 | if (kgdb_nofault && kgdb_bus_err_hook) | 44 | if (kgdb_nofault && kgdb_bus_err_hook) |
@@ -41,6 +47,46 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess, | |||
41 | 47 | ||
42 | tsk = current; | 48 | tsk = current; |
43 | mm = tsk->mm; | 49 | mm = tsk->mm; |
50 | si_code = SEGV_MAPERR; | ||
51 | |||
52 | if (unlikely(address >= TASK_SIZE)) { | ||
53 | /* | ||
54 | * Synchronize this task's top level page-table | ||
55 | * with the 'reference' page table. | ||
56 | * | ||
57 | * Do _not_ use "tsk" here. We might be inside | ||
58 | * an interrupt in the middle of a task switch.. | ||
59 | */ | ||
60 | int offset = pgd_index(address); | ||
61 | pgd_t *pgd, *pgd_k; | ||
62 | pud_t *pud, *pud_k; | ||
63 | pmd_t *pmd, *pmd_k; | ||
64 | |||
65 | pgd = get_TTB() + offset; | ||
66 | pgd_k = swapper_pg_dir + offset; | ||
67 | |||
68 | /* This will never happen with the folded page table. */ | ||
69 | if (!pgd_present(*pgd)) { | ||
70 | if (!pgd_present(*pgd_k)) | ||
71 | goto bad_area_nosemaphore; | ||
72 | set_pgd(pgd, *pgd_k); | ||
73 | return; | ||
74 | } | ||
75 | |||
76 | pud = pud_offset(pgd, address); | ||
77 | pud_k = pud_offset(pgd_k, address); | ||
78 | if (pud_present(*pud) || !pud_present(*pud_k)) | ||
79 | goto bad_area_nosemaphore; | ||
80 | set_pud(pud, *pud_k); | ||
81 | |||
82 | pmd = pmd_offset(pud, address); | ||
83 | pmd_k = pmd_offset(pud_k, address); | ||
84 | if (pmd_present(*pmd) || !pmd_present(*pmd_k)) | ||
85 | goto bad_area_nosemaphore; | ||
86 | set_pmd(pmd, *pmd_k); | ||
87 | |||
88 | return; | ||
89 | } | ||
44 | 90 | ||
45 | /* | 91 | /* |
46 | * If we're in an interrupt or have no user | 92 | * If we're in an interrupt or have no user |
@@ -65,6 +111,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess, | |||
65 | * we can handle it.. | 111 | * we can handle it.. |
66 | */ | 112 | */ |
67 | good_area: | 113 | good_area: |
114 | si_code = SEGV_ACCERR; | ||
68 | if (writeaccess) { | 115 | if (writeaccess) { |
69 | if (!(vma->vm_flags & VM_WRITE)) | 116 | if (!(vma->vm_flags & VM_WRITE)) |
70 | goto bad_area; | 117 | goto bad_area; |
@@ -104,10 +151,13 @@ survive: | |||
104 | bad_area: | 151 | bad_area: |
105 | up_read(&mm->mmap_sem); | 152 | up_read(&mm->mmap_sem); |
106 | 153 | ||
154 | bad_area_nosemaphore: | ||
107 | if (user_mode(regs)) { | 155 | if (user_mode(regs)) { |
108 | tsk->thread.address = address; | 156 | info.si_signo = SIGSEGV; |
109 | tsk->thread.error_code = writeaccess; | 157 | info.si_errno = 0; |
110 | force_sig(SIGSEGV, tsk); | 158 | info.si_code = si_code; |
159 | info.si_addr = (void *) address; | ||
160 | force_sig_info(SIGSEGV, &info, tsk); | ||
111 | return; | 161 | return; |
112 | } | 162 | } |
113 | 163 | ||
@@ -127,11 +177,9 @@ no_context: | |||
127 | printk(KERN_ALERT "Unable to handle kernel paging request"); | 177 | printk(KERN_ALERT "Unable to handle kernel paging request"); |
128 | printk(" at virtual address %08lx\n", address); | 178 | printk(" at virtual address %08lx\n", address); |
129 | printk(KERN_ALERT "pc = %08lx\n", regs->pc); | 179 | printk(KERN_ALERT "pc = %08lx\n", regs->pc); |
130 | asm volatile("mov.l %1, %0" | 180 | page = (unsigned long)get_TTB(); |
131 | : "=r" (page) | ||
132 | : "m" (__m(MMU_TTB))); | ||
133 | if (page) { | 181 | if (page) { |
134 | page = ((unsigned long *) page)[address >> 22]; | 182 | page = ((unsigned long *) page)[address >> PGDIR_SHIFT]; |
135 | printk(KERN_ALERT "*pde = %08lx\n", page); | 183 | printk(KERN_ALERT "*pde = %08lx\n", page); |
136 | if (page & _PAGE_PRESENT) { | 184 | if (page & _PAGE_PRESENT) { |
137 | page &= PAGE_MASK; | 185 | page &= PAGE_MASK; |
@@ -166,98 +214,13 @@ do_sigbus: | |||
166 | * Send a sigbus, regardless of whether we were in kernel | 214 | * Send a sigbus, regardless of whether we were in kernel |
167 | * or user mode. | 215 | * or user mode. |
168 | */ | 216 | */ |
169 | tsk->thread.address = address; | 217 | info.si_signo = SIGBUS; |
170 | tsk->thread.error_code = writeaccess; | 218 | info.si_errno = 0; |
171 | tsk->thread.trap_no = 14; | 219 | info.si_code = BUS_ADRERR; |
172 | force_sig(SIGBUS, tsk); | 220 | info.si_addr = (void *)address; |
221 | force_sig_info(SIGBUS, &info, tsk); | ||
173 | 222 | ||
174 | /* Kernel mode? Handle exceptions or die */ | 223 | /* Kernel mode? Handle exceptions or die */ |
175 | if (!user_mode(regs)) | 224 | if (!user_mode(regs)) |
176 | goto no_context; | 225 | goto no_context; |
177 | } | 226 | } |
178 | |||
179 | #ifdef CONFIG_SH_STORE_QUEUES | ||
180 | /* | ||
181 | * This is a special case for the SH-4 store queues, as pages for this | ||
182 | * space still need to be faulted in before it's possible to flush the | ||
183 | * store queue cache for writeout to the remapped region. | ||
184 | */ | ||
185 | #define P3_ADDR_MAX (P4SEG_STORE_QUE + 0x04000000) | ||
186 | #else | ||
187 | #define P3_ADDR_MAX P4SEG | ||
188 | #endif | ||
189 | |||
190 | /* | ||
191 | * Called with interrupts disabled. | ||
192 | */ | ||
193 | asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, | ||
194 | unsigned long writeaccess, | ||
195 | unsigned long address) | ||
196 | { | ||
197 | pgd_t *pgd; | ||
198 | pud_t *pud; | ||
199 | pmd_t *pmd; | ||
200 | pte_t *pte; | ||
201 | pte_t entry; | ||
202 | struct mm_struct *mm = current->mm; | ||
203 | spinlock_t *ptl; | ||
204 | int ret = 1; | ||
205 | |||
206 | #ifdef CONFIG_SH_KGDB | ||
207 | if (kgdb_nofault && kgdb_bus_err_hook) | ||
208 | kgdb_bus_err_hook(); | ||
209 | #endif | ||
210 | |||
211 | /* | ||
212 | * We don't take page faults for P1, P2, and parts of P4, these | ||
213 | * are always mapped, whether it be due to legacy behaviour in | ||
214 | * 29-bit mode, or due to PMB configuration in 32-bit mode. | ||
215 | */ | ||
216 | if (address >= P3SEG && address < P3_ADDR_MAX) { | ||
217 | pgd = pgd_offset_k(address); | ||
218 | mm = NULL; | ||
219 | } else { | ||
220 | if (unlikely(address >= TASK_SIZE || !mm)) | ||
221 | return 1; | ||
222 | |||
223 | pgd = pgd_offset(mm, address); | ||
224 | } | ||
225 | |||
226 | pud = pud_offset(pgd, address); | ||
227 | if (pud_none_or_clear_bad(pud)) | ||
228 | return 1; | ||
229 | pmd = pmd_offset(pud, address); | ||
230 | if (pmd_none_or_clear_bad(pmd)) | ||
231 | return 1; | ||
232 | |||
233 | if (mm) | ||
234 | pte = pte_offset_map_lock(mm, pmd, address, &ptl); | ||
235 | else | ||
236 | pte = pte_offset_kernel(pmd, address); | ||
237 | |||
238 | entry = *pte; | ||
239 | if (unlikely(pte_none(entry) || pte_not_present(entry))) | ||
240 | goto unlock; | ||
241 | if (unlikely(writeaccess && !pte_write(entry))) | ||
242 | goto unlock; | ||
243 | |||
244 | if (writeaccess) | ||
245 | entry = pte_mkdirty(entry); | ||
246 | entry = pte_mkyoung(entry); | ||
247 | |||
248 | #ifdef CONFIG_CPU_SH4 | ||
249 | /* | ||
250 | * ITLB is not affected by "ldtlb" instruction. | ||
251 | * So, we need to flush the entry by ourselves. | ||
252 | */ | ||
253 | __flush_tlb_page(get_asid(), address & PAGE_MASK); | ||
254 | #endif | ||
255 | |||
256 | set_pte(pte, entry); | ||
257 | update_mmu_cache(NULL, address, entry); | ||
258 | ret = 0; | ||
259 | unlock: | ||
260 | if (mm) | ||
261 | pte_unmap_unlock(pte, ptl); | ||
262 | return ret; | ||
263 | } | ||
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c index 329059d6b54a..cf2c2ee35a37 100644 --- a/arch/sh/mm/hugetlbpage.c +++ b/arch/sh/mm/hugetlbpage.c | |||
@@ -63,6 +63,11 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
63 | return pte; | 63 | return pte; |
64 | } | 64 | } |
65 | 65 | ||
66 | int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep) | ||
67 | { | ||
68 | return 0; | ||
69 | } | ||
70 | |||
66 | struct page *follow_huge_addr(struct mm_struct *mm, | 71 | struct page *follow_huge_addr(struct mm_struct *mm, |
67 | unsigned long address, int write) | 72 | unsigned long address, int write) |
68 | { | 73 | { |
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 7154d1ce9785..29bd37b1488e 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c | |||
@@ -77,6 +77,7 @@ void show_mem(void) | |||
77 | printk("%d pages swap cached\n",cached); | 77 | printk("%d pages swap cached\n",cached); |
78 | } | 78 | } |
79 | 79 | ||
80 | #ifdef CONFIG_MMU | ||
80 | static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) | 81 | static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) |
81 | { | 82 | { |
82 | pgd_t *pgd; | 83 | pgd_t *pgd; |
@@ -84,30 +85,22 @@ static void set_pte_phys(unsigned long addr, unsigned long phys, pgprot_t prot) | |||
84 | pmd_t *pmd; | 85 | pmd_t *pmd; |
85 | pte_t *pte; | 86 | pte_t *pte; |
86 | 87 | ||
87 | pgd = swapper_pg_dir + pgd_index(addr); | 88 | pgd = pgd_offset_k(addr); |
88 | if (pgd_none(*pgd)) { | 89 | if (pgd_none(*pgd)) { |
89 | pgd_ERROR(*pgd); | 90 | pgd_ERROR(*pgd); |
90 | return; | 91 | return; |
91 | } | 92 | } |
92 | 93 | ||
93 | pud = pud_offset(pgd, addr); | 94 | pud = pud_alloc(NULL, pgd, addr); |
94 | if (pud_none(*pud)) { | 95 | if (unlikely(!pud)) { |
95 | pmd = (pmd_t *)get_zeroed_page(GFP_ATOMIC); | 96 | pud_ERROR(*pud); |
96 | set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE | _PAGE_USER)); | 97 | return; |
97 | if (pmd != pmd_offset(pud, 0)) { | ||
98 | pud_ERROR(*pud); | ||
99 | return; | ||
100 | } | ||
101 | } | 98 | } |
102 | 99 | ||
103 | pmd = pmd_offset(pud, addr); | 100 | pmd = pmd_alloc(NULL, pud, addr); |
104 | if (pmd_none(*pmd)) { | 101 | if (unlikely(!pmd)) { |
105 | pte = (pte_t *)get_zeroed_page(GFP_ATOMIC); | 102 | pmd_ERROR(*pmd); |
106 | set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE | _PAGE_USER)); | 103 | return; |
107 | if (pte != pte_offset_kernel(pmd, 0)) { | ||
108 | pmd_ERROR(*pmd); | ||
109 | return; | ||
110 | } | ||
111 | } | 104 | } |
112 | 105 | ||
113 | pte = pte_offset_kernel(pmd, addr); | 106 | pte = pte_offset_kernel(pmd, addr); |
@@ -147,6 +140,7 @@ void __set_fixmap(enum fixed_addresses idx, unsigned long phys, pgprot_t prot) | |||
147 | 140 | ||
148 | set_pte_phys(address, phys, prot); | 141 | set_pte_phys(address, phys, prot); |
149 | } | 142 | } |
143 | #endif /* CONFIG_MMU */ | ||
150 | 144 | ||
151 | /* References to section boundaries */ | 145 | /* References to section boundaries */ |
152 | 146 | ||
@@ -155,9 +149,6 @@ extern char __init_begin, __init_end; | |||
155 | 149 | ||
156 | /* | 150 | /* |
157 | * paging_init() sets up the page tables | 151 | * paging_init() sets up the page tables |
158 | * | ||
159 | * This routines also unmaps the page at virtual kernel address 0, so | ||
160 | * that we can trap those pesky NULL-reference errors in the kernel. | ||
161 | */ | 152 | */ |
162 | void __init paging_init(void) | 153 | void __init paging_init(void) |
163 | { | 154 | { |
@@ -180,14 +171,11 @@ void __init paging_init(void) | |||
180 | */ | 171 | */ |
181 | { | 172 | { |
182 | unsigned long max_dma, low, start_pfn; | 173 | unsigned long max_dma, low, start_pfn; |
183 | pgd_t *pg_dir; | ||
184 | int i; | ||
185 | 174 | ||
186 | /* We don't need kernel mapping as hardware support that. */ | 175 | /* We don't need to map the kernel through the TLB, as |
187 | pg_dir = swapper_pg_dir; | 176 | * it is permanatly mapped using P1. So clear the |
188 | 177 | * entire pgd. */ | |
189 | for (i = 0; i < PTRS_PER_PGD; i++) | 178 | memset(swapper_pg_dir, 0, sizeof(swapper_pg_dir)); |
190 | pgd_val(pg_dir[i]) = 0; | ||
191 | 179 | ||
192 | /* Turn on the MMU */ | 180 | /* Turn on the MMU */ |
193 | enable_mmu(); | 181 | enable_mmu(); |
@@ -206,6 +194,10 @@ void __init paging_init(void) | |||
206 | } | 194 | } |
207 | } | 195 | } |
208 | 196 | ||
197 | /* Set an initial value for the MMU.TTB so we don't have to | ||
198 | * check for a null value. */ | ||
199 | set_TTB(swapper_pg_dir); | ||
200 | |||
209 | #elif defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4) | 201 | #elif defined(CONFIG_CPU_SH3) || defined(CONFIG_CPU_SH4) |
210 | /* | 202 | /* |
211 | * If we don't have CONFIG_MMU set and the processor in question | 203 | * If we don't have CONFIG_MMU set and the processor in question |
@@ -227,7 +219,6 @@ static struct kcore_list kcore_mem, kcore_vmalloc; | |||
227 | 219 | ||
228 | void __init mem_init(void) | 220 | void __init mem_init(void) |
229 | { | 221 | { |
230 | extern unsigned long empty_zero_page[1024]; | ||
231 | int codesize, reservedpages, datasize, initsize; | 222 | int codesize, reservedpages, datasize, initsize; |
232 | int tmp; | 223 | int tmp; |
233 | extern unsigned long memory_start; | 224 | extern unsigned long memory_start; |
diff --git a/arch/sh/mm/ioremap.c b/arch/sh/mm/ioremap.c index a9fe80cfc233..90b494a0cf45 100644 --- a/arch/sh/mm/ioremap.c +++ b/arch/sh/mm/ioremap.c | |||
@@ -16,99 +16,13 @@ | |||
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include <asm/io.h> | 19 | #include <linux/io.h> |
20 | #include <asm/page.h> | 20 | #include <asm/page.h> |
21 | #include <asm/pgalloc.h> | 21 | #include <asm/pgalloc.h> |
22 | #include <asm/addrspace.h> | 22 | #include <asm/addrspace.h> |
23 | #include <asm/cacheflush.h> | 23 | #include <asm/cacheflush.h> |
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | 25 | ||
26 | static inline void remap_area_pte(pte_t * pte, unsigned long address, | ||
27 | unsigned long size, unsigned long phys_addr, unsigned long flags) | ||
28 | { | ||
29 | unsigned long end; | ||
30 | unsigned long pfn; | ||
31 | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | _PAGE_RW | | ||
32 | _PAGE_DIRTY | _PAGE_ACCESSED | | ||
33 | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD | flags); | ||
34 | |||
35 | address &= ~PMD_MASK; | ||
36 | end = address + size; | ||
37 | if (end > PMD_SIZE) | ||
38 | end = PMD_SIZE; | ||
39 | if (address >= end) | ||
40 | BUG(); | ||
41 | pfn = phys_addr >> PAGE_SHIFT; | ||
42 | do { | ||
43 | if (!pte_none(*pte)) { | ||
44 | printk("remap_area_pte: page already exists\n"); | ||
45 | BUG(); | ||
46 | } | ||
47 | set_pte(pte, pfn_pte(pfn, pgprot)); | ||
48 | address += PAGE_SIZE; | ||
49 | pfn++; | ||
50 | pte++; | ||
51 | } while (address && (address < end)); | ||
52 | } | ||
53 | |||
54 | static inline int remap_area_pmd(pmd_t * pmd, unsigned long address, | ||
55 | unsigned long size, unsigned long phys_addr, unsigned long flags) | ||
56 | { | ||
57 | unsigned long end; | ||
58 | |||
59 | address &= ~PGDIR_MASK; | ||
60 | end = address + size; | ||
61 | if (end > PGDIR_SIZE) | ||
62 | end = PGDIR_SIZE; | ||
63 | phys_addr -= address; | ||
64 | if (address >= end) | ||
65 | BUG(); | ||
66 | do { | ||
67 | pte_t * pte = pte_alloc_kernel(pmd, address); | ||
68 | if (!pte) | ||
69 | return -ENOMEM; | ||
70 | remap_area_pte(pte, address, end - address, address + phys_addr, flags); | ||
71 | address = (address + PMD_SIZE) & PMD_MASK; | ||
72 | pmd++; | ||
73 | } while (address && (address < end)); | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | int remap_area_pages(unsigned long address, unsigned long phys_addr, | ||
78 | unsigned long size, unsigned long flags) | ||
79 | { | ||
80 | int error; | ||
81 | pgd_t * dir; | ||
82 | unsigned long end = address + size; | ||
83 | |||
84 | phys_addr -= address; | ||
85 | dir = pgd_offset_k(address); | ||
86 | flush_cache_all(); | ||
87 | if (address >= end) | ||
88 | BUG(); | ||
89 | do { | ||
90 | pud_t *pud; | ||
91 | pmd_t *pmd; | ||
92 | |||
93 | error = -ENOMEM; | ||
94 | |||
95 | pud = pud_alloc(&init_mm, dir, address); | ||
96 | if (!pud) | ||
97 | break; | ||
98 | pmd = pmd_alloc(&init_mm, pud, address); | ||
99 | if (!pmd) | ||
100 | break; | ||
101 | if (remap_area_pmd(pmd, address, end - address, | ||
102 | phys_addr + address, flags)) | ||
103 | break; | ||
104 | error = 0; | ||
105 | address = (address + PGDIR_SIZE) & PGDIR_MASK; | ||
106 | dir++; | ||
107 | } while (address && (address < end)); | ||
108 | flush_tlb_all(); | ||
109 | return error; | ||
110 | } | ||
111 | |||
112 | /* | 26 | /* |
113 | * Remap an arbitrary physical address space into the kernel virtual | 27 | * Remap an arbitrary physical address space into the kernel virtual |
114 | * address space. Needed when the kernel wants to access high addresses | 28 | * address space. Needed when the kernel wants to access high addresses |
@@ -123,6 +37,7 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
123 | { | 37 | { |
124 | struct vm_struct * area; | 38 | struct vm_struct * area; |
125 | unsigned long offset, last_addr, addr, orig_addr; | 39 | unsigned long offset, last_addr, addr, orig_addr; |
40 | pgprot_t pgprot; | ||
126 | 41 | ||
127 | /* Don't allow wraparound or zero size */ | 42 | /* Don't allow wraparound or zero size */ |
128 | last_addr = phys_addr + size - 1; | 43 | last_addr = phys_addr + size - 1; |
@@ -192,8 +107,9 @@ void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
192 | } | 107 | } |
193 | #endif | 108 | #endif |
194 | 109 | ||
110 | pgprot = __pgprot(pgprot_val(PAGE_KERNEL_NOCACHE) | flags); | ||
195 | if (likely(size)) | 111 | if (likely(size)) |
196 | if (remap_area_pages(addr, phys_addr, size, flags)) { | 112 | if (ioremap_page_range(addr, addr + size, phys_addr, pgprot)) { |
197 | vunmap((void *)orig_addr); | 113 | vunmap((void *)orig_addr); |
198 | return NULL; | 114 | return NULL; |
199 | } | 115 | } |
diff --git a/arch/sh/mm/pg-dma.c b/arch/sh/mm/pg-dma.c index 1406d2e348ca..bb23679369d6 100644 --- a/arch/sh/mm/pg-dma.c +++ b/arch/sh/mm/pg-dma.c | |||
@@ -39,8 +39,6 @@ static void copy_page_dma(void *to, void *from) | |||
39 | 39 | ||
40 | static void clear_page_dma(void *to) | 40 | static void clear_page_dma(void *to) |
41 | { | 41 | { |
42 | extern unsigned long empty_zero_page[1024]; | ||
43 | |||
44 | /* | 42 | /* |
45 | * We get invoked quite early on, if the DMAC hasn't been initialized | 43 | * We get invoked quite early on, if the DMAC hasn't been initialized |
46 | * yet, fall back on the slow manual implementation. | 44 | * yet, fall back on the slow manual implementation. |
diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c index 07371ed7a313..3f98d2a4f936 100644 --- a/arch/sh/mm/pg-sh4.c +++ b/arch/sh/mm/pg-sh4.c | |||
@@ -6,22 +6,12 @@ | |||
6 | * | 6 | * |
7 | * Released under the terms of the GNU GPL v2.0. | 7 | * Released under the terms of the GNU GPL v2.0. |
8 | */ | 8 | */ |
9 | #include <linux/init.h> | ||
10 | #include <linux/mman.h> | ||
11 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
12 | #include <linux/threads.h> | 10 | #include <linux/mutex.h> |
13 | #include <asm/addrspace.h> | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/pgtable.h> | ||
16 | #include <asm/processor.h> | ||
17 | #include <asm/cache.h> | ||
18 | #include <asm/io.h> | ||
19 | #include <asm/uaccess.h> | ||
20 | #include <asm/pgalloc.h> | ||
21 | #include <asm/mmu_context.h> | 11 | #include <asm/mmu_context.h> |
22 | #include <asm/cacheflush.h> | 12 | #include <asm/cacheflush.h> |
23 | 13 | ||
24 | extern struct semaphore p3map_sem[]; | 14 | extern struct mutex p3map_mutex[]; |
25 | 15 | ||
26 | #define CACHE_ALIAS (cpu_data->dcache.alias_mask) | 16 | #define CACHE_ALIAS (cpu_data->dcache.alias_mask) |
27 | 17 | ||
@@ -37,10 +27,6 @@ void clear_user_page(void *to, unsigned long address, struct page *page) | |||
37 | if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) | 27 | if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) |
38 | clear_page(to); | 28 | clear_page(to); |
39 | else { | 29 | else { |
40 | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | | ||
41 | _PAGE_RW | _PAGE_CACHABLE | | ||
42 | _PAGE_DIRTY | _PAGE_ACCESSED | | ||
43 | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD); | ||
44 | unsigned long phys_addr = PHYSADDR(to); | 30 | unsigned long phys_addr = PHYSADDR(to); |
45 | unsigned long p3_addr = P3SEG + (address & CACHE_ALIAS); | 31 | unsigned long p3_addr = P3SEG + (address & CACHE_ALIAS); |
46 | pgd_t *pgd = pgd_offset_k(p3_addr); | 32 | pgd_t *pgd = pgd_offset_k(p3_addr); |
@@ -50,8 +36,8 @@ void clear_user_page(void *to, unsigned long address, struct page *page) | |||
50 | pte_t entry; | 36 | pte_t entry; |
51 | unsigned long flags; | 37 | unsigned long flags; |
52 | 38 | ||
53 | entry = pfn_pte(phys_addr >> PAGE_SHIFT, pgprot); | 39 | entry = pfn_pte(phys_addr >> PAGE_SHIFT, PAGE_KERNEL); |
54 | down(&p3map_sem[(address & CACHE_ALIAS)>>12]); | 40 | mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); |
55 | set_pte(pte, entry); | 41 | set_pte(pte, entry); |
56 | local_irq_save(flags); | 42 | local_irq_save(flags); |
57 | __flush_tlb_page(get_asid(), p3_addr); | 43 | __flush_tlb_page(get_asid(), p3_addr); |
@@ -59,7 +45,7 @@ void clear_user_page(void *to, unsigned long address, struct page *page) | |||
59 | update_mmu_cache(NULL, p3_addr, entry); | 45 | update_mmu_cache(NULL, p3_addr, entry); |
60 | __clear_user_page((void *)p3_addr, to); | 46 | __clear_user_page((void *)p3_addr, to); |
61 | pte_clear(&init_mm, p3_addr, pte); | 47 | pte_clear(&init_mm, p3_addr, pte); |
62 | up(&p3map_sem[(address & CACHE_ALIAS)>>12]); | 48 | mutex_unlock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); |
63 | } | 49 | } |
64 | } | 50 | } |
65 | 51 | ||
@@ -77,10 +63,6 @@ void copy_user_page(void *to, void *from, unsigned long address, | |||
77 | if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) | 63 | if (((address ^ (unsigned long)to) & CACHE_ALIAS) == 0) |
78 | copy_page(to, from); | 64 | copy_page(to, from); |
79 | else { | 65 | else { |
80 | pgprot_t pgprot = __pgprot(_PAGE_PRESENT | | ||
81 | _PAGE_RW | _PAGE_CACHABLE | | ||
82 | _PAGE_DIRTY | _PAGE_ACCESSED | | ||
83 | _PAGE_HW_SHARED | _PAGE_FLAGS_HARD); | ||
84 | unsigned long phys_addr = PHYSADDR(to); | 66 | unsigned long phys_addr = PHYSADDR(to); |
85 | unsigned long p3_addr = P3SEG + (address & CACHE_ALIAS); | 67 | unsigned long p3_addr = P3SEG + (address & CACHE_ALIAS); |
86 | pgd_t *pgd = pgd_offset_k(p3_addr); | 68 | pgd_t *pgd = pgd_offset_k(p3_addr); |
@@ -90,8 +72,8 @@ void copy_user_page(void *to, void *from, unsigned long address, | |||
90 | pte_t entry; | 72 | pte_t entry; |
91 | unsigned long flags; | 73 | unsigned long flags; |
92 | 74 | ||
93 | entry = pfn_pte(phys_addr >> PAGE_SHIFT, pgprot); | 75 | entry = pfn_pte(phys_addr >> PAGE_SHIFT, PAGE_KERNEL); |
94 | down(&p3map_sem[(address & CACHE_ALIAS)>>12]); | 76 | mutex_lock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); |
95 | set_pte(pte, entry); | 77 | set_pte(pte, entry); |
96 | local_irq_save(flags); | 78 | local_irq_save(flags); |
97 | __flush_tlb_page(get_asid(), p3_addr); | 79 | __flush_tlb_page(get_asid(), p3_addr); |
@@ -99,7 +81,7 @@ void copy_user_page(void *to, void *from, unsigned long address, | |||
99 | update_mmu_cache(NULL, p3_addr, entry); | 81 | update_mmu_cache(NULL, p3_addr, entry); |
100 | __copy_user_page((void *)p3_addr, from, to); | 82 | __copy_user_page((void *)p3_addr, from, to); |
101 | pte_clear(&init_mm, p3_addr, pte); | 83 | pte_clear(&init_mm, p3_addr, pte); |
102 | up(&p3map_sem[(address & CACHE_ALIAS)>>12]); | 84 | mutex_unlock(&p3map_mutex[(address & CACHE_ALIAS)>>12]); |
103 | } | 85 | } |
104 | } | 86 | } |
105 | 87 | ||
@@ -122,4 +104,3 @@ inline pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t | |||
122 | } | 104 | } |
123 | return pte; | 105 | return pte; |
124 | } | 106 | } |
125 | |||
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index 92e745341e4d..b60ad83a7635 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | #define NR_PMB_ENTRIES 16 | 31 | #define NR_PMB_ENTRIES 16 |
32 | 32 | ||
33 | static kmem_cache_t *pmb_cache; | 33 | static struct kmem_cache *pmb_cache; |
34 | static unsigned long pmb_map; | 34 | static unsigned long pmb_map; |
35 | 35 | ||
36 | static struct pmb_entry pmb_init_map[] = { | 36 | static struct pmb_entry pmb_init_map[] = { |
@@ -283,7 +283,7 @@ void pmb_unmap(unsigned long addr) | |||
283 | } while (pmbe); | 283 | } while (pmbe); |
284 | } | 284 | } |
285 | 285 | ||
286 | static void pmb_cache_ctor(void *pmb, kmem_cache_t *cachep, unsigned long flags) | 286 | static void pmb_cache_ctor(void *pmb, struct kmem_cache *cachep, unsigned long flags) |
287 | { | 287 | { |
288 | struct pmb_entry *pmbe = pmb; | 288 | struct pmb_entry *pmbe = pmb; |
289 | 289 | ||
@@ -297,7 +297,7 @@ static void pmb_cache_ctor(void *pmb, kmem_cache_t *cachep, unsigned long flags) | |||
297 | spin_unlock_irq(&pmb_list_lock); | 297 | spin_unlock_irq(&pmb_list_lock); |
298 | } | 298 | } |
299 | 299 | ||
300 | static void pmb_cache_dtor(void *pmb, kmem_cache_t *cachep, unsigned long flags) | 300 | static void pmb_cache_dtor(void *pmb, struct kmem_cache *cachep, unsigned long flags) |
301 | { | 301 | { |
302 | spin_lock_irq(&pmb_list_lock); | 302 | spin_lock_irq(&pmb_list_lock); |
303 | pmb_list_del(pmb); | 303 | pmb_list_del(pmb); |
diff --git a/arch/sh/oprofile/op_model_sh7750.c b/arch/sh/oprofile/op_model_sh7750.c index c265185b22a7..60402eec4b4d 100644 --- a/arch/sh/oprofile/op_model_sh7750.c +++ b/arch/sh/oprofile/op_model_sh7750.c | |||
@@ -142,7 +142,7 @@ static u64 sh7750_read_counter(int counter) | |||
142 | */ | 142 | */ |
143 | static inline int to_counter(struct file *file) | 143 | static inline int to_counter(struct file *file) |
144 | { | 144 | { |
145 | const unsigned char *name = file->f_dentry->d_parent->d_name.name; | 145 | const unsigned char *name = file->f_path.dentry->d_parent->d_name.name; |
146 | 146 | ||
147 | return (int)simple_strtol(name, NULL, 10); | 147 | return (int)simple_strtol(name, NULL, 10); |
148 | } | 148 | } |
diff --git a/arch/sh/tools/mach-types b/arch/sh/tools/mach-types index ac57638977ee..0571755e9a84 100644 --- a/arch/sh/tools/mach-types +++ b/arch/sh/tools/mach-types | |||
@@ -30,3 +30,5 @@ R7780MP SH_R7780MP | |||
30 | TITAN SH_TITAN | 30 | TITAN SH_TITAN |
31 | SHMIN SH_SHMIN | 31 | SHMIN SH_SHMIN |
32 | 7710VOIPGW SH_7710VOIPGW | 32 | 7710VOIPGW SH_7710VOIPGW |
33 | 7206SE SH_7206_SOLUTION_ENGINE | ||
34 | 7619SE SH_7619_SOLUTION_ENGINE | ||