diff options
author | Alexander Schulz <alex@shark-linux.de> | 2009-01-08 12:05:58 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-02-19 06:30:20 -0500 |
commit | eab184c2362567f2b2e951b7bd0e0d353a7e5091 (patch) | |
tree | f03f859d1f038b1c0b358c35fb842fc2f50f41d7 /arch/arm/mach-shark/core.c | |
parent | 60f793de891ea06fa870546336a88df543ec56ae (diff) |
[ARM] 5363/1: Shark cleanup and new defconfig
This includes a new defconfig for the Shark and some changes to
the mach-shark directory to avoid namespace pollution and to
switch the rtc to the newer driver.
Signed-off-by: Alexander Schulz <alex@shark-linux.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-shark/core.c')
-rw-r--r-- | arch/arm/mach-shark/core.c | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c index a23fd3d0163a..4f3a26512599 100644 --- a/arch/arm/mach-shark/core.c +++ b/arch/arm/mach-shark/core.c | |||
@@ -16,12 +16,28 @@ | |||
16 | #include <asm/leds.h> | 16 | #include <asm/leds.h> |
17 | #include <asm/param.h> | 17 | #include <asm/param.h> |
18 | 18 | ||
19 | #include <mach/hardware.h> | ||
20 | |||
21 | #include <asm/mach/map.h> | 19 | #include <asm/mach/map.h> |
22 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
23 | #include <asm/mach/time.h> | 21 | #include <asm/mach/time.h> |
24 | 22 | ||
23 | #define IO_BASE 0xe0000000 | ||
24 | #define IO_SIZE 0x08000000 | ||
25 | #define IO_START 0x40000000 | ||
26 | #define ROMCARD_SIZE 0x08000000 | ||
27 | #define ROMCARD_START 0x10000000 | ||
28 | |||
29 | void arch_reset(char mode) | ||
30 | { | ||
31 | short temp; | ||
32 | local_irq_disable(); | ||
33 | /* Reset the Machine via pc[3] of the sequoia chipset */ | ||
34 | outw(0x09,0x24); | ||
35 | temp=inw(0x26); | ||
36 | temp = temp | (1<<3) | (1<<10); | ||
37 | outw(0x09,0x24); | ||
38 | outw(temp,0x26); | ||
39 | } | ||
40 | |||
25 | static struct plat_serial8250_port serial_platform_data[] = { | 41 | static struct plat_serial8250_port serial_platform_data[] = { |
26 | { | 42 | { |
27 | .iobase = 0x3f8, | 43 | .iobase = 0x3f8, |
@@ -50,14 +66,38 @@ static struct platform_device serial_device = { | |||
50 | }, | 66 | }, |
51 | }; | 67 | }; |
52 | 68 | ||
69 | static struct resource rtc_resources[] = { | ||
70 | [0] = { | ||
71 | .start = 0x70, | ||
72 | .end = 0x73, | ||
73 | .flags = IORESOURCE_IO, | ||
74 | }, | ||
75 | [1] = { | ||
76 | .start = IRQ_ISA_RTC_ALARM, | ||
77 | .end = IRQ_ISA_RTC_ALARM, | ||
78 | .flags = IORESOURCE_IRQ, | ||
79 | } | ||
80 | }; | ||
81 | |||
82 | static struct platform_device rtc_device = { | ||
83 | .name = "rtc_cmos", | ||
84 | .id = -1, | ||
85 | .resource = rtc_resources, | ||
86 | .num_resources = ARRAY_SIZE(rtc_resources), | ||
87 | }; | ||
88 | |||
53 | static int __init shark_init(void) | 89 | static int __init shark_init(void) |
54 | { | 90 | { |
55 | int ret; | 91 | int ret; |
56 | 92 | ||
57 | if (machine_is_shark()) | 93 | if (machine_is_shark()) |
94 | { | ||
95 | ret = platform_device_register(&rtc_device); | ||
96 | if (ret) printk(KERN_ERR "Unable to register RTC device: %d\n", ret); | ||
58 | ret = platform_device_register(&serial_device); | 97 | ret = platform_device_register(&serial_device); |
59 | 98 | if (ret) printk(KERN_ERR "Unable to register Serial device: %d\n", ret); | |
60 | return ret; | 99 | } |
100 | return 0; | ||
61 | } | 101 | } |
62 | 102 | ||
63 | arch_initcall(shark_init); | 103 | arch_initcall(shark_init); |