aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shark
diff options
context:
space:
mode:
authorAlexander Schulz <alex@shark-linux.de>2009-01-08 12:05:58 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-19 06:30:20 -0500
commiteab184c2362567f2b2e951b7bd0e0d353a7e5091 (patch)
treef03f859d1f038b1c0b358c35fb842fc2f50f41d7 /arch/arm/mach-shark
parent60f793de891ea06fa870546336a88df543ec56ae (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')
-rw-r--r--arch/arm/mach-shark/core.c48
-rw-r--r--arch/arm/mach-shark/include/mach/debug-macro.S2
-rw-r--r--arch/arm/mach-shark/include/mach/framebuffer.h16
-rw-r--r--arch/arm/mach-shark/include/mach/hardware.h27
-rw-r--r--arch/arm/mach-shark/include/mach/io.h8
-rw-r--r--arch/arm/mach-shark/include/mach/irqs.h2
-rw-r--r--arch/arm/mach-shark/include/mach/isa-dma.h4
-rw-r--r--arch/arm/mach-shark/include/mach/memory.h1
-rw-r--r--arch/arm/mach-shark/include/mach/system.h16
-rw-r--r--arch/arm/mach-shark/include/mach/uncompress.h2
-rw-r--r--arch/arm/mach-shark/leds.c6
11 files changed, 74 insertions, 58 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
29void 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
25static struct plat_serial8250_port serial_platform_data[] = { 41static 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
69static 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
82static 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
53static int __init shark_init(void) 89static 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
63arch_initcall(shark_init); 103arch_initcall(shark_init);
diff --git a/arch/arm/mach-shark/include/mach/debug-macro.S b/arch/arm/mach-shark/include/mach/debug-macro.S
index 0836cb78b29a..f97a7626bd58 100644
--- a/arch/arm/mach-shark/include/mach/debug-macro.S
+++ b/arch/arm/mach-shark/include/mach/debug-macro.S
@@ -27,5 +27,3 @@
27 bne 1001b 27 bne 1001b
28 .endm 28 .endm
29 29
30 .macro waituart,rd,rx
31 .endm
diff --git a/arch/arm/mach-shark/include/mach/framebuffer.h b/arch/arm/mach-shark/include/mach/framebuffer.h
new file mode 100644
index 000000000000..84a5bf6e5ba3
--- /dev/null
+++ b/arch/arm/mach-shark/include/mach/framebuffer.h
@@ -0,0 +1,16 @@
1/*
2 * arch/arm/mach-shark/include/mach/framebuffer.h
3 *
4 * by Alexander Schulz
5 *
6 */
7
8#ifndef __ASM_ARCH_FRAMEBUFFER_H
9#define __ASM_ARCH_FRAMEBUFFER_H
10
11/* defines for the Framebuffer */
12#define FB_START 0x06000000
13#define FB_SIZE 0x01000000
14
15#endif
16
diff --git a/arch/arm/mach-shark/include/mach/hardware.h b/arch/arm/mach-shark/include/mach/hardware.h
index 01bf76099ce5..94d84b27a0cb 100644
--- a/arch/arm/mach-shark/include/mach/hardware.h
+++ b/arch/arm/mach-shark/include/mach/hardware.h
@@ -10,35 +10,8 @@
10#ifndef __ASM_ARCH_HARDWARE_H 10#ifndef __ASM_ARCH_HARDWARE_H
11#define __ASM_ARCH_HARDWARE_H 11#define __ASM_ARCH_HARDWARE_H
12 12
13#ifndef __ASSEMBLY__
14
15/*
16 * Mapping areas
17 */
18#define IO_BASE 0xe0000000
19
20#else
21
22#define IO_BASE 0
23
24#endif
25
26#define IO_SIZE 0x08000000
27#define IO_START 0x40000000
28#define ROMCARD_SIZE 0x08000000
29#define ROMCARD_START 0x10000000
30
31
32/* defines for the Framebuffer */
33#define FB_START 0x06000000
34#define FB_SIZE 0x01000000
35
36#define UNCACHEABLE_ADDR 0xdf010000 13#define UNCACHEABLE_ADDR 0xdf010000
37 14
38#define SEQUOIA_LED_GREEN (1<<6)
39#define SEQUOIA_LED_AMBER (1<<5)
40#define SEQUOIA_LED_BACK (1<<7)
41
42#define pcibios_assign_all_busses() 1 15#define pcibios_assign_all_busses() 1
43 16
44#define PCIBIOS_MIN_IO 0x6000 17#define PCIBIOS_MIN_IO 0x6000
diff --git a/arch/arm/mach-shark/include/mach/io.h b/arch/arm/mach-shark/include/mach/io.h
index c5cee829fc87..9ccbcecc430b 100644
--- a/arch/arm/mach-shark/include/mach/io.h
+++ b/arch/arm/mach-shark/include/mach/io.h
@@ -11,10 +11,10 @@
11#ifndef __ASM_ARM_ARCH_IO_H 11#ifndef __ASM_ARM_ARCH_IO_H
12#define __ASM_ARM_ARCH_IO_H 12#define __ASM_ARM_ARCH_IO_H
13 13
14#define PCIO_BASE 0xe0000000 14#define IO_SPACE_LIMIT 0xffffffff
15#define IO_SPACE_LIMIT 0xffffffff
16 15
17#define __io(a) ((void __iomem *)(PCIO_BASE + (a))) 16#define __io(a) ((void __iomem *)(0xe0000000 + (a)))
18#define __mem_pci(addr) (addr) 17
18#define __mem_pci(addr) (addr)
19 19
20#endif 20#endif
diff --git a/arch/arm/mach-shark/include/mach/irqs.h b/arch/arm/mach-shark/include/mach/irqs.h
index 0586acd7cdd5..c8e8a4e1f61a 100644
--- a/arch/arm/mach-shark/include/mach/irqs.h
+++ b/arch/arm/mach-shark/include/mach/irqs.h
@@ -7,7 +7,7 @@
7#define NR_IRQS 16 7#define NR_IRQS 16
8 8
9#define IRQ_ISA_KEYBOARD 1 9#define IRQ_ISA_KEYBOARD 1
10#define RTC_IRQ 8 10#define IRQ_ISA_RTC_ALARM 8
11#define I8042_KBD_IRQ 1 11#define I8042_KBD_IRQ 1
12#define I8042_AUX_IRQ 12 12#define I8042_AUX_IRQ 12
13#define IRQ_HARDDISK 14 13#define IRQ_HARDDISK 14
diff --git a/arch/arm/mach-shark/include/mach/isa-dma.h b/arch/arm/mach-shark/include/mach/isa-dma.h
index 864298ff3927..96c43b8f8dda 100644
--- a/arch/arm/mach-shark/include/mach/isa-dma.h
+++ b/arch/arm/mach-shark/include/mach/isa-dma.h
@@ -6,10 +6,6 @@
6#ifndef __ASM_ARCH_DMA_H 6#ifndef __ASM_ARCH_DMA_H
7#define __ASM_ARCH_DMA_H 7#define __ASM_ARCH_DMA_H
8 8
9/* Use only the lowest 4MB, nothing else works.
10 * The rest is not DMAable. See dev / .properties
11 * in OpenFirmware.
12 */
13#define MAX_DMA_CHANNELS 8 9#define MAX_DMA_CHANNELS 8
14#define DMA_ISA_CASCADE 4 10#define DMA_ISA_CASCADE 4
15 11
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
index c5ab038925d6..3053e5b7f168 100644
--- a/arch/arm/mach-shark/include/mach/memory.h
+++ b/arch/arm/mach-shark/include/mach/memory.h
@@ -23,6 +23,7 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
23{ 23{
24 if (node != 0) return; 24 if (node != 0) return;
25 /* Only the first 4 MB (=1024 Pages) are usable for DMA */ 25 /* Only the first 4 MB (=1024 Pages) are usable for DMA */
26 /* See dev / -> .properties in OpenFirmware. */
26 zone_size[1] = zone_size[0] - 1024; 27 zone_size[1] = zone_size[0] - 1024;
27 zone_size[0] = 1024; 28 zone_size[0] = 1024;
28 zhole_size[1] = zhole_size[0]; 29 zhole_size[1] = zhole_size[0];
diff --git a/arch/arm/mach-shark/include/mach/system.h b/arch/arm/mach-shark/include/mach/system.h
index e45bd734a03e..0752ca29971a 100644
--- a/arch/arm/mach-shark/include/mach/system.h
+++ b/arch/arm/mach-shark/include/mach/system.h
@@ -6,20 +6,8 @@
6#ifndef __ASM_ARCH_SYSTEM_H 6#ifndef __ASM_ARCH_SYSTEM_H
7#define __ASM_ARCH_SYSTEM_H 7#define __ASM_ARCH_SYSTEM_H
8 8
9#include <linux/io.h> 9/* Found in arch/mach-shark/core.c */
10 10extern void arch_reset(char mode);
11static void arch_reset(char mode)
12{
13 short temp;
14 local_irq_disable();
15 /* Reset the Machine via pc[3] of the sequoia chipset */
16 outw(0x09,0x24);
17 temp=inw(0x26);
18 temp = temp | (1<<3) | (1<<10);
19 outw(0x09,0x24);
20 outw(temp,0x26);
21
22}
23 11
24static inline void arch_idle(void) 12static inline void arch_idle(void)
25{ 13{
diff --git a/arch/arm/mach-shark/include/mach/uncompress.h b/arch/arm/mach-shark/include/mach/uncompress.h
index 3725e1633418..22ccab4c3c5e 100644
--- a/arch/arm/mach-shark/include/mach/uncompress.h
+++ b/arch/arm/mach-shark/include/mach/uncompress.h
@@ -11,7 +11,7 @@
11 11
12static inline void putc(int c) 12static inline void putc(int c)
13{ 13{
14 int t; 14 volatile int t;
15 15
16 SERIAL_BASE[0] = c; 16 SERIAL_BASE[0] = c;
17 t=0x10000; 17 t=0x10000;
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c
index 8bd8d6bb4d92..c9e32de4adf9 100644
--- a/arch/arm/mach-shark/leds.c
+++ b/arch/arm/mach-shark/leds.c
@@ -22,12 +22,16 @@
22#include <linux/ioport.h> 22#include <linux/ioport.h>
23#include <linux/io.h> 23#include <linux/io.h>
24 24
25#include <mach/hardware.h>
26#include <asm/leds.h> 25#include <asm/leds.h>
27#include <asm/system.h> 26#include <asm/system.h>
28 27
29#define LED_STATE_ENABLED 1 28#define LED_STATE_ENABLED 1
30#define LED_STATE_CLAIMED 2 29#define LED_STATE_CLAIMED 2
30
31#define SEQUOIA_LED_GREEN (1<<6)
32#define SEQUOIA_LED_AMBER (1<<5)
33#define SEQUOIA_LED_BACK (1<<7)
34
31static char led_state; 35static char led_state;
32static short hw_led_state; 36static short hw_led_state;
33static short saved_state; 37static short saved_state;