diff options
author | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:00:19 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2006-09-27 05:00:19 -0400 |
commit | 5a4053b23262afefa748e1e4c439931d4c27693b (patch) | |
tree | d8ed63a427c01361435d14d97b5ce3b2ab33b25c /arch/sh/boards/harp | |
parent | f118420be83c3ce7888fe1d42db84af495da9edb (diff) |
sh: Kill off dead boards.
None of these have been maintained in years, and no one seems to
be interested in doing so, so just get rid of them.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/harp')
-rw-r--r-- | arch/sh/boards/harp/Makefile | 8 | ||||
-rw-r--r-- | arch/sh/boards/harp/irq.c | 147 | ||||
-rw-r--r-- | arch/sh/boards/harp/led.c | 51 | ||||
-rw-r--r-- | arch/sh/boards/harp/mach.c | 62 | ||||
-rw-r--r-- | arch/sh/boards/harp/pcidma.c | 42 | ||||
-rw-r--r-- | arch/sh/boards/harp/setup.c | 90 |
6 files changed, 0 insertions, 400 deletions
diff --git a/arch/sh/boards/harp/Makefile b/arch/sh/boards/harp/Makefile deleted file mode 100644 index eb753d31812e..000000000000 --- a/arch/sh/boards/harp/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for STMicroelectronics board specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y := irq.o setup.o mach.o led.o | ||
6 | |||
7 | obj-$(CONFIG_PCI) += pcidma.o | ||
8 | |||
diff --git a/arch/sh/boards/harp/irq.c b/arch/sh/boards/harp/irq.c deleted file mode 100644 index 96bb41c9fc55..000000000000 --- a/arch/sh/boards/harp/irq.c +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 David J. Mckay (david.mckay@st.com) | ||
3 | * | ||
4 | * May be copied or modified under the terms of the GNU General Public | ||
5 | * License. See linux/COPYING for more information. | ||
6 | * | ||
7 | * Looks after interrupts on the HARP board. | ||
8 | * | ||
9 | * Bases on the IPR irq system | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/irq.h> | ||
14 | |||
15 | #include <asm/system.h> | ||
16 | #include <asm/io.h> | ||
17 | #include <asm/harp/harp.h> | ||
18 | |||
19 | |||
20 | #define NUM_EXTERNAL_IRQS 16 | ||
21 | |||
22 | // Early versions of the STB1 Overdrive required this nasty frig | ||
23 | //#define INVERT_INTMASK_WRITES | ||
24 | |||
25 | static void enable_harp_irq(unsigned int irq); | ||
26 | static void disable_harp_irq(unsigned int irq); | ||
27 | |||
28 | /* shutdown is same as "disable" */ | ||
29 | #define shutdown_harp_irq disable_harp_irq | ||
30 | |||
31 | static void mask_and_ack_harp(unsigned int); | ||
32 | static void end_harp_irq(unsigned int irq); | ||
33 | |||
34 | static unsigned int startup_harp_irq(unsigned int irq) | ||
35 | { | ||
36 | enable_harp_irq(irq); | ||
37 | return 0; /* never anything pending */ | ||
38 | } | ||
39 | |||
40 | static struct hw_interrupt_type harp_irq_type = { | ||
41 | .typename = "Harp-IRQ", | ||
42 | .startup = startup_harp_irq, | ||
43 | .shutdown = shutdown_harp_irq, | ||
44 | .enable = enable_harp_irq, | ||
45 | .disable = disable_harp_irq, | ||
46 | .ack = mask_and_ack_harp, | ||
47 | .end = end_harp_irq | ||
48 | }; | ||
49 | |||
50 | static void disable_harp_irq(unsigned int irq) | ||
51 | { | ||
52 | unsigned val, flags; | ||
53 | unsigned maskReg; | ||
54 | unsigned mask; | ||
55 | int pri; | ||
56 | |||
57 | if (irq < 0 || irq >= NUM_EXTERNAL_IRQS) | ||
58 | return; | ||
59 | |||
60 | pri = 15 - irq; | ||
61 | |||
62 | if (pri < 8) { | ||
63 | maskReg = EPLD_INTMASK0; | ||
64 | } else { | ||
65 | maskReg = EPLD_INTMASK1; | ||
66 | pri -= 8; | ||
67 | } | ||
68 | |||
69 | local_irq_save(flags); | ||
70 | mask = ctrl_inl(maskReg); | ||
71 | mask &= (~(1 << pri)); | ||
72 | #if defined(INVERT_INTMASK_WRITES) | ||
73 | mask ^= 0xff; | ||
74 | #endif | ||
75 | ctrl_outl(mask, maskReg); | ||
76 | local_irq_restore(flags); | ||
77 | } | ||
78 | |||
79 | static void enable_harp_irq(unsigned int irq) | ||
80 | { | ||
81 | unsigned flags; | ||
82 | unsigned maskReg; | ||
83 | unsigned mask; | ||
84 | int pri; | ||
85 | |||
86 | if (irq < 0 || irq >= NUM_EXTERNAL_IRQS) | ||
87 | return; | ||
88 | |||
89 | pri = 15 - irq; | ||
90 | |||
91 | if (pri < 8) { | ||
92 | maskReg = EPLD_INTMASK0; | ||
93 | } else { | ||
94 | maskReg = EPLD_INTMASK1; | ||
95 | pri -= 8; | ||
96 | } | ||
97 | |||
98 | local_irq_save(flags); | ||
99 | mask = ctrl_inl(maskReg); | ||
100 | |||
101 | |||
102 | mask |= (1 << pri); | ||
103 | |||
104 | #if defined(INVERT_INTMASK_WRITES) | ||
105 | mask ^= 0xff; | ||
106 | #endif | ||
107 | ctrl_outl(mask, maskReg); | ||
108 | |||
109 | local_irq_restore(flags); | ||
110 | } | ||
111 | |||
112 | /* This functions sets the desired irq handler to be an overdrive type */ | ||
113 | static void __init make_harp_irq(unsigned int irq) | ||
114 | { | ||
115 | disable_irq_nosync(irq); | ||
116 | irq_desc[irq].chip = &harp_irq_type; | ||
117 | disable_harp_irq(irq); | ||
118 | } | ||
119 | |||
120 | static void mask_and_ack_harp(unsigned int irq) | ||
121 | { | ||
122 | disable_harp_irq(irq); | ||
123 | } | ||
124 | |||
125 | static void end_harp_irq(unsigned int irq) | ||
126 | { | ||
127 | enable_harp_irq(irq); | ||
128 | } | ||
129 | |||
130 | void __init init_harp_irq(void) | ||
131 | { | ||
132 | int i; | ||
133 | |||
134 | #if !defined(INVERT_INTMASK_WRITES) | ||
135 | // On the harp these are set to enable an interrupt | ||
136 | ctrl_outl(0x00, EPLD_INTMASK0); | ||
137 | ctrl_outl(0x00, EPLD_INTMASK1); | ||
138 | #else | ||
139 | // On the Overdrive the data is inverted before being stored in the reg | ||
140 | ctrl_outl(0xff, EPLD_INTMASK0); | ||
141 | ctrl_outl(0xff, EPLD_INTMASK1); | ||
142 | #endif | ||
143 | |||
144 | for (i = 0; i < NUM_EXTERNAL_IRQS; i++) { | ||
145 | make_harp_irq(i); | ||
146 | } | ||
147 | } | ||
diff --git a/arch/sh/boards/harp/led.c b/arch/sh/boards/harp/led.c deleted file mode 100644 index aeb7b392b190..000000000000 --- a/arch/sh/boards/harp/led.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/stboards/led.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 ST40STB1 HARP and compatible code. | ||
10 | */ | ||
11 | |||
12 | #include <asm/io.h> | ||
13 | #include <asm/harp/harp.h> | ||
14 | |||
15 | /* Harp: Flash LD10 (front pannel) connected to EPLD (IC8) */ | ||
16 | /* Overdrive: Flash LD1 (front panel) connected to EPLD (IC4) */ | ||
17 | /* Works for HARP and overdrive */ | ||
18 | static void mach_led(int position, int value) | ||
19 | { | ||
20 | if (value) { | ||
21 | ctrl_outl(EPLD_LED_ON, EPLD_LED); | ||
22 | } else { | ||
23 | ctrl_outl(EPLD_LED_OFF, EPLD_LED); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | #ifdef CONFIG_HEARTBEAT | ||
28 | |||
29 | #include <linux/sched.h> | ||
30 | |||
31 | /* acts like an actual heart beat -- ie thump-thump-pause... */ | ||
32 | void heartbeat_harp(void) | ||
33 | { | ||
34 | static unsigned cnt = 0, period = 0, dist = 0; | ||
35 | |||
36 | if (cnt == 0 || cnt == dist) | ||
37 | mach_led( -1, 1); | ||
38 | else if (cnt == 7 || cnt == dist+7) | ||
39 | mach_led( -1, 0); | ||
40 | |||
41 | if (++cnt > period) { | ||
42 | cnt = 0; | ||
43 | /* The hyperbolic function below modifies the heartbeat period | ||
44 | * length in dependency of the current (5min) load. It goes | ||
45 | * through the points f(0)=126, f(1)=86, f(5)=51, | ||
46 | * f(inf)->30. */ | ||
47 | period = ((672<<FSHIFT)/(5*avenrun[0]+(7<<FSHIFT))) + 30; | ||
48 | dist = period / 4; | ||
49 | } | ||
50 | } | ||
51 | #endif | ||
diff --git a/arch/sh/boards/harp/mach.c b/arch/sh/boards/harp/mach.c deleted file mode 100644 index a946dd1674ca..000000000000 --- a/arch/sh/boards/harp/mach.c +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/boards/harp/mach.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 | * Machine vector for the STMicroelectronics STB1 HARP and compatible boards | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | |||
14 | #include <asm/machvec.h> | ||
15 | #include <asm/rtc.h> | ||
16 | #include <asm/machvec_init.h> | ||
17 | #include <asm/hd64465/io.h> | ||
18 | #include <asm/hd64465/hd64465.h> | ||
19 | |||
20 | void setup_harp(void); | ||
21 | void init_harp_irq(void); | ||
22 | void heartbeat_harp(void); | ||
23 | |||
24 | /* | ||
25 | * The Machine Vector | ||
26 | */ | ||
27 | |||
28 | struct sh_machine_vector mv_harp __initmv = { | ||
29 | .mv_nr_irqs = 89 + HD64465_IRQ_NUM, | ||
30 | |||
31 | .mv_inb = hd64465_inb, | ||
32 | .mv_inw = hd64465_inw, | ||
33 | .mv_inl = hd64465_inl, | ||
34 | .mv_outb = hd64465_outb, | ||
35 | .mv_outw = hd64465_outw, | ||
36 | .mv_outl = hd64465_outl, | ||
37 | |||
38 | .mv_inb_p = hd64465_inb_p, | ||
39 | .mv_inw_p = hd64465_inw, | ||
40 | .mv_inl_p = hd64465_inl, | ||
41 | .mv_outb_p = hd64465_outb_p, | ||
42 | .mv_outw_p = hd64465_outw, | ||
43 | .mv_outl_p = hd64465_outl, | ||
44 | |||
45 | .mv_insb = hd64465_insb, | ||
46 | .mv_insw = hd64465_insw, | ||
47 | .mv_insl = hd64465_insl, | ||
48 | .mv_outsb = hd64465_outsb, | ||
49 | .mv_outsw = hd64465_outsw, | ||
50 | .mv_outsl = hd64465_outsl, | ||
51 | |||
52 | .mv_isa_port2addr = hd64465_isa_port2addr, | ||
53 | |||
54 | #ifdef CONFIG_PCI | ||
55 | .mv_init_irq = init_harp_irq, | ||
56 | #endif | ||
57 | #ifdef CONFIG_HEARTBEAT | ||
58 | .mv_heartbeat = heartbeat_harp, | ||
59 | #endif | ||
60 | }; | ||
61 | |||
62 | ALIAS_MV(harp) | ||
diff --git a/arch/sh/boards/harp/pcidma.c b/arch/sh/boards/harp/pcidma.c deleted file mode 100644 index 475311390fd6..000000000000 --- a/arch/sh/boards/harp/pcidma.c +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 David J. Mckay (david.mckay@st.com) | ||
3 | * | ||
4 | * May be copied or modified under the terms of the GNU General Public | ||
5 | * License. See linux/COPYING for more information. | ||
6 | * | ||
7 | * Dynamic DMA mapping support. | ||
8 | */ | ||
9 | |||
10 | #include <linux/types.h> | ||
11 | #include <linux/mm.h> | ||
12 | #include <linux/string.h> | ||
13 | #include <linux/pci.h> | ||
14 | #include <asm/io.h> | ||
15 | #include <asm/addrspace.h> | ||
16 | |||
17 | |||
18 | void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, | ||
19 | dma_addr_t * dma_handle) | ||
20 | { | ||
21 | void *ret; | ||
22 | int gfp = GFP_ATOMIC; | ||
23 | |||
24 | ret = (void *) __get_free_pages(gfp, get_order(size)); | ||
25 | |||
26 | if (ret != NULL) { | ||
27 | /* Is it neccessary to do the memset? */ | ||
28 | memset(ret, 0, size); | ||
29 | *dma_handle = virt_to_bus(ret); | ||
30 | } | ||
31 | /* We must flush the cache before we pass it on to the device */ | ||
32 | flush_cache_all(); | ||
33 | return P2SEGADDR(ret); | ||
34 | } | ||
35 | |||
36 | void pci_free_consistent(struct pci_dev *hwdev, size_t size, | ||
37 | void *vaddr, dma_addr_t dma_handle) | ||
38 | { | ||
39 | unsigned long p1addr=P1SEGADDR((unsigned long)vaddr); | ||
40 | |||
41 | free_pages(p1addr, get_order(size)); | ||
42 | } | ||
diff --git a/arch/sh/boards/harp/setup.c b/arch/sh/boards/harp/setup.c deleted file mode 100644 index 886e450ab63e..000000000000 --- a/arch/sh/boards/harp/setup.c +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /* | ||
2 | * arch/sh/stboard/setup.c | ||
3 | * | ||
4 | * Copyright (C) 2001 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 | * STMicroelectronics ST40STB1 HARP and compatible support. | ||
10 | */ | ||
11 | |||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/io.h> | ||
15 | #include <asm/harp/harp.h> | ||
16 | |||
17 | const char *get_system_type(void) | ||
18 | { | ||
19 | return "STB1 Harp"; | ||
20 | } | ||
21 | |||
22 | /* | ||
23 | * Initialize the board | ||
24 | */ | ||
25 | int __init platform_setup(void) | ||
26 | { | ||
27 | #ifdef CONFIG_SH_STB1_HARP | ||
28 | unsigned long ic8_version, ic36_version; | ||
29 | |||
30 | ic8_version = ctrl_inl(EPLD_REVID2); | ||
31 | ic36_version = ctrl_inl(EPLD_REVID1); | ||
32 | |||
33 | printk("STMicroelectronics STB1 HARP initialisaton\n"); | ||
34 | printk("EPLD versions: IC8: %d.%02d, IC36: %d.%02d\n", | ||
35 | (ic8_version >> 4) & 0xf, ic8_version & 0xf, | ||
36 | (ic36_version >> 4) & 0xf, ic36_version & 0xf); | ||
37 | #elif defined(CONFIG_SH_STB1_OVERDRIVE) | ||
38 | unsigned long version; | ||
39 | |||
40 | version = ctrl_inl(EPLD_REVID); | ||
41 | |||
42 | printk("STMicroelectronics STB1 Overdrive initialisaton\n"); | ||
43 | printk("EPLD version: %d.%02d\n", | ||
44 | (version >> 4) & 0xf, version & 0xf); | ||
45 | #else | ||
46 | #error Undefined machine | ||
47 | #endif | ||
48 | |||
49 | /* Currently all STB1 chips have problems with the sleep instruction, | ||
50 | * so disable it here. | ||
51 | */ | ||
52 | disable_hlt(); | ||
53 | |||
54 | return 0; | ||
55 | } | ||
56 | |||
57 | /* | ||
58 | * pcibios_map_platform_irq | ||
59 | * | ||
60 | * This is board specific and returns the IRQ for a given PCI device. | ||
61 | * It is used by the PCI code (arch/sh/kernel/st40_pci*) | ||
62 | * | ||
63 | */ | ||
64 | |||
65 | #define HARP_PCI_IRQ 1 | ||
66 | #define HARP_BRIDGE_IRQ 2 | ||
67 | #define OVERDRIVE_SLOT0_IRQ 0 | ||
68 | |||
69 | |||
70 | int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
71 | { | ||
72 | switch (slot) { | ||
73 | #ifdef CONFIG_SH_STB1_HARP | ||
74 | case 2: /*This is the PCI slot on the */ | ||
75 | return HARP_PCI_IRQ; | ||
76 | case 1: /* this is the bridge */ | ||
77 | return HARP_BRIDGE_IRQ; | ||
78 | #elif defined(CONFIG_SH_STB1_OVERDRIVE) | ||
79 | case 1: | ||
80 | case 2: | ||
81 | case 3: | ||
82 | return slot - 1; | ||
83 | #else | ||
84 | #error Unknown board | ||
85 | #endif | ||
86 | default: | ||
87 | return -1; | ||
88 | } | ||
89 | } | ||
90 | |||