aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 00:42:57 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 00:42:57 -0400
commit6d75e650f1d0d59fd97c7629f0903ef18e8dfb7b (patch)
tree71753efdb503c351079e7ece10229a87cf263901
parentd95fb13c960ae19e9fd4a95807eb68fa20caf537 (diff)
sh: Move hd64461.h to a more sensible location.
With the I/O rework for hd64461 we're down to a single header, so move it by itself and get rid of the directory. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/cchips/hd6446x/hd64461/io.c11
-rw-r--r--arch/sh/cchips/hd6446x/hd64461/setup.c3
-rw-r--r--include/asm-sh/hd64461.h (renamed from include/asm-sh/hd64461/hd64461.h)49
-rw-r--r--include/asm-sh/hd64461/io.h43
-rw-r--r--include/asm-sh/hp6xx/io.h2
5 files changed, 32 insertions, 76 deletions
diff --git a/arch/sh/cchips/hd6446x/hd64461/io.c b/arch/sh/cchips/hd6446x/hd64461/io.c
index ac3062671db7..f77f18f2ba7f 100644
--- a/arch/sh/cchips/hd6446x/hd64461/io.c
+++ b/arch/sh/cchips/hd6446x/hd64461/io.c
@@ -1,11 +1,10 @@
1/* 1/*
2 * $Id: io.c,v 1.6 2004/03/16 00:07:50 lethal Exp $
3 * Copyright (C) 2000 YAEGASHI Takeshi 2 * Copyright (C) 2000 YAEGASHI Takeshi
4 * Typical I/O routines for HD64461 system. 3 * Typical I/O routines for HD64461 system.
5 */ 4 */
6 5
7#include <asm/io.h> 6#include <asm/io.h>
8#include <asm/hd64461/hd64461.h> 7#include <asm/hd64461.h>
9 8
10#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR) 9#define MEM_BASE (CONFIG_HD64461_IOBASE - HD64461_STBCR)
11 10
@@ -144,13 +143,13 @@ void hd64461_outsl(unsigned long port, const void *buffer, unsigned long count)
144 while(count--) *addr=*buf++; 143 while(count--) *addr=*buf++;
145} 144}
146 145
147unsigned short hd64461_readw(unsigned long addr) 146unsigned short hd64461_readw(void __iomem *addr)
148{ 147{
149 return *(volatile unsigned short*)(MEM_BASE+addr); 148 return ctrl_inw(MEM_BASE+(unsigned long __force)addr);
150} 149}
151 150
152void hd64461_writew(unsigned short b, unsigned long addr) 151void hd64461_writew(unsigned short b, void __iomem *addr)
153{ 152{
154 *(volatile unsigned short*)(MEM_BASE+addr) = b; 153 ctrl_outw(b, MEM_BASE+(unsigned long __force)addr);
155} 154}
156 155
diff --git a/arch/sh/cchips/hd6446x/hd64461/setup.c b/arch/sh/cchips/hd6446x/hd64461/setup.c
index ad126016720f..6c961273a23a 100644
--- a/arch/sh/cchips/hd6446x/hd64461/setup.c
+++ b/arch/sh/cchips/hd6446x/hd64461/setup.c
@@ -14,8 +14,7 @@
14 14
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/irq.h> 16#include <asm/irq.h>
17 17#include <asm/hd64461.h>
18#include <asm/hd64461/hd64461.h>
19 18
20static void disable_hd64461_irq(unsigned int irq) 19static void disable_hd64461_irq(unsigned int irq)
21{ 20{
diff --git a/include/asm-sh/hd64461/hd64461.h b/include/asm-sh/hd64461.h
index 87f13d24c630..0f2e2132cc35 100644
--- a/include/asm-sh/hd64461/hd64461.h
+++ b/include/asm-sh/hd64461.h
@@ -54,9 +54,9 @@
54#define HD64461_LDVSPR 0x1101c 54#define HD64461_LDVSPR 0x1101c
55#define HD64461_LDR3 0x1101e 55#define HD64461_LDR3 0x1101e
56 56
57#define HD64461_CPTWAR 0x11030 57#define HD64461_CPTWAR 0x11030
58#define HD64461_CPTWDR 0x11032 58#define HD64461_CPTWDR 0x11032
59#define HD64461_CPTRAR 0x11034 59#define HD64461_CPTRAR 0x11034
60#define HD64461_CPTRDR 0x11036 60#define HD64461_CPTRDR 0x11036
61 61
62#define HD64461_GRDOR 0x11040 62#define HD64461_GRDOR 0x11040
@@ -111,7 +111,7 @@
111#define HD64461_PCCISR_BVD1 0x01 /* battery 1 */ 111#define HD64461_PCCISR_BVD1 0x01 /* battery 1 */
112 112
113#define HD64461_PCCISR_PCD_MASK 0x0c /* card detect */ 113#define HD64461_PCCISR_PCD_MASK 0x0c /* card detect */
114#define HD64461_PCCISR_BVD_MASK 0x03 /* battery voltage */ 114#define HD64461_PCCISR_BVD_MASK 0x03 /* battery voltage */
115#define HD64461_PCCISR_BVD_BATGOOD 0x03 /* battery good */ 115#define HD64461_PCCISR_BVD_BATGOOD 0x03 /* battery good */
116#define HD64461_PCCISR_BVD_BATWARN 0x01 /* battery low warning */ 116#define HD64461_PCCISR_BVD_BATWARN 0x01 /* battery low warning */
117#define HD64461_PCCISR_BVD_BATDEAD1 0x02 /* battery dead */ 117#define HD64461_PCCISR_BVD_BATDEAD1 0x02 /* battery dead */
@@ -139,11 +139,11 @@
139 139
140/* PCC Card Status Change Interrupt Enable Register */ 140/* PCC Card Status Change Interrupt Enable Register */
141#define HD64461_PCCCSCIER_CRE 0x80 /* change reset enable */ 141#define HD64461_PCCCSCIER_CRE 0x80 /* change reset enable */
142#define HD64461_PCCCSCIER_IREQE_MASK 0x60 /* IREQ enable */ 142#define HD64461_PCCCSCIER_IREQE_MASK 0x60 /* IREQ enable */
143#define HD64461_PCCCSCIER_IREQE_DISABLED 0x00 /* IREQ disabled */ 143#define HD64461_PCCCSCIER_IREQE_DISABLED 0x00 /* IREQ disabled */
144#define HD64461_PCCCSCIER_IREQE_LEVEL 0x20 /* IREQ level-triggered */ 144#define HD64461_PCCCSCIER_IREQE_LEVEL 0x20 /* IREQ level-triggered */
145#define HD64461_PCCCSCIER_IREQE_FALLING 0x40 /* IREQ falling-edge-trig */ 145#define HD64461_PCCCSCIER_IREQE_FALLING 0x40 /* IREQ falling-edge-trig */
146#define HD64461_PCCCSCIER_IREQE_RISING 0x60 /* IREQ rising-edge-trig */ 146#define HD64461_PCCCSCIER_IREQE_RISING 0x60 /* IREQ rising-edge-trig */
147 147
148#define HD64461_PCCCSCIER_SCE 0x10 /* status change enable */ 148#define HD64461_PCCCSCIER_SCE 0x10 /* status change enable */
149#define HD64461_PCCCSCIER_CDE 0x08 /* card detect change enable */ 149#define HD64461_PCCCSCIER_CDE 0x08 /* card detect change enable */
@@ -155,7 +155,6 @@
155#define HD64461_PCCSCR_VCC1 0x02 /* voltage control pin 1 */ 155#define HD64461_PCCSCR_VCC1 0x02 /* voltage control pin 1 */
156#define HD64461_PCCSCR_SWP 0x01 /* write protect */ 156#define HD64461_PCCSCR_SWP 0x01 /* write protect */
157 157
158
159#define HD64461_P0OCR 0x1202a 158#define HD64461_P0OCR 0x1202a
160#define HD64461_P1OCR 0x1202c 159#define HD64461_P1OCR 0x1202c
161#define HD64461_PGCR 0x1202e 160#define HD64461_PGCR 0x1202e
@@ -180,23 +179,25 @@
180#define HD64461_NIRR 0x15000 179#define HD64461_NIRR 0x15000
181#define HD64461_NIMR 0x15002 180#define HD64461_NIMR 0x15002
182 181
183#ifndef CONFIG_HD64461_IOBASE
184#define CONFIG_HD64461_IOBASE 0xb0000000
185#endif
186#ifndef CONFIG_HD64461_IRQ
187#define CONFIG_HD64461_IRQ 36
188#endif
189
190#define HD64461_IRQBASE OFFCHIP_IRQ_BASE 182#define HD64461_IRQBASE OFFCHIP_IRQ_BASE
191#define HD64461_IRQ_NUM 16 183#define HD64461_IRQ_NUM 16
192 184
193#define HD64461_IRQ_UART (HD64461_IRQBASE+5) 185#define HD64461_IRQ_UART (HD64461_IRQBASE+5)
194#define HD64461_IRQ_IRDA (HD64461_IRQBASE+6) 186#define HD64461_IRQ_IRDA (HD64461_IRQBASE+6)
195#define HD64461_IRQ_TMU1 (HD64461_IRQBASE+9) 187#define HD64461_IRQ_TMU1 (HD64461_IRQBASE+9)
196#define HD64461_IRQ_TMU0 (HD64461_IRQBASE+10) 188#define HD64461_IRQ_TMU0 (HD64461_IRQBASE+10)
197#define HD64461_IRQ_GPIO (HD64461_IRQBASE+11) 189#define HD64461_IRQ_GPIO (HD64461_IRQBASE+11)
198#define HD64461_IRQ_AFE (HD64461_IRQBASE+12) 190#define HD64461_IRQ_AFE (HD64461_IRQBASE+12)
199#define HD64461_IRQ_PCC1 (HD64461_IRQBASE+13) 191#define HD64461_IRQ_PCC1 (HD64461_IRQBASE+13)
200#define HD64461_IRQ_PCC0 (HD64461_IRQBASE+14) 192#define HD64461_IRQ_PCC0 (HD64461_IRQBASE+14)
193
194#define __IO_PREFIX hd64461
195#include <asm/io_generic.h>
196
197/* arch/sh/cchips/hd6446x/hd64461/setup.c */
198int hd64461_irq_demux(int irq);
199void hd64461_register_irq_demux(int irq,
200 int (*demux) (int irq, void *dev), void *dev);
201void hd64461_unregister_irq_demux(int irq);
201 202
202#endif 203#endif
diff --git a/include/asm-sh/hd64461/io.h b/include/asm-sh/hd64461/io.h
deleted file mode 100644
index 67f2489088d9..000000000000
--- a/include/asm-sh/hd64461/io.h
+++ /dev/null
@@ -1,43 +0,0 @@
1/*
2 * include/asm-sh/io_hd64461.h
3 *
4 * Copyright 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 * IO functions for an HD64461
10 */
11
12#ifndef _ASM_SH_IO_HD64461_H
13#define _ASM_SH_IO_HD64461_H
14
15extern unsigned char hd64461_inb(unsigned long port);
16extern unsigned short hd64461_inw(unsigned long port);
17extern unsigned int hd64461_inl(unsigned long port);
18
19extern void hd64461_outb(unsigned char value, unsigned long port);
20extern void hd64461_outw(unsigned short value, unsigned long port);
21extern void hd64461_outl(unsigned int value, unsigned long port);
22
23extern unsigned char hd64461_inb_p(unsigned long port);
24extern void hd64461_outb_p(unsigned char value, unsigned long port);
25
26extern void hd64461_insb(unsigned long port, void *addr, unsigned long count);
27extern void hd64461_insw(unsigned long port, void *addr, unsigned long count);
28extern void hd64461_insl(unsigned long port, void *addr, unsigned long count);
29
30extern void hd64461_outsb(unsigned long port, const void *buffer, unsigned long count);
31extern void hd64461_outsw(unsigned long port, const void *buffer, unsigned long count);
32extern void hd64461_outsl(unsigned long port, const void *buffer, unsigned long count);
33
34extern unsigned short hd64461_readw(unsigned long addr);
35extern void hd64461_writew(unsigned short b, unsigned long addr);
36
37
38extern int hd64461_irq_demux(int irq);
39extern void hd64461_register_irq_demux(int irq,
40 int (*demux)(int irq, void *dev), void *dev);
41extern void hd64461_unregister_irq_demux(int irq);
42
43#endif /* _ASM_SH_IO_HD64461_H */
diff --git a/include/asm-sh/hp6xx/io.h b/include/asm-sh/hp6xx/io.h
index 731798003550..2044476ab199 100644
--- a/include/asm-sh/hp6xx/io.h
+++ b/include/asm-sh/hp6xx/io.h
@@ -4,7 +4,7 @@
4/* 4/*
5 * Nothing special here.. just use the generic cchip io routines. 5 * Nothing special here.. just use the generic cchip io routines.
6 */ 6 */
7#include <asm/hd64461/io.h> 7#include <asm/hd64461.h>
8 8
9#endif /* __ASM_SH_HP6XX_IO_H */ 9#endif /* __ASM_SH_HP6XX_IO_H */
10 10