diff options
author | Karsten Keil <keil@b1-systems.de> | 2009-05-22 07:04:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-25 03:55:30 -0400 |
commit | db9bb63a1b5b65df41d112a8c21adbbfc6a4ac08 (patch) | |
tree | 1a817cf2b57f557346d3f436aa12e0d10a918d42 /drivers/isdn/hardware/mISDN/hfc_multi.h | |
parent | 5df3b8bcc7826b85a2d233dd20da3ed247e1dc1d (diff) |
mISDN: Add XHFC support for embedded Speech-Design board to hfcmulti
New version without emulating arch specific stuff for the other
architectures, the special IO and init functions for the 8xx
microcontroller are in a separate include file.
Signed-off-by: Andreas Eversberg <andreas@eversberg.eu>
Signed-off-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware/mISDN/hfc_multi.h')
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfc_multi.h | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfc_multi.h b/drivers/isdn/hardware/mISDN/hfc_multi.h index c4878cc712c9..0c773866efc7 100644 --- a/drivers/isdn/hardware/mISDN/hfc_multi.h +++ b/drivers/isdn/hardware/mISDN/hfc_multi.h | |||
@@ -17,6 +17,16 @@ | |||
17 | #define PCI_ENA_REGIO 0x01 | 17 | #define PCI_ENA_REGIO 0x01 |
18 | #define PCI_ENA_MEMIO 0x02 | 18 | #define PCI_ENA_MEMIO 0x02 |
19 | 19 | ||
20 | #define XHFC_IRQ 4 /* SIU_IRQ2 */ | ||
21 | #define XHFC_MEMBASE 0xFE000000 | ||
22 | #define XHFC_MEMSIZE 0x00001000 | ||
23 | #define XHFC_OFFSET 0x00001000 | ||
24 | #define PA_XHFC_A0 0x0020 /* PA10 */ | ||
25 | #define PB_XHFC_IRQ1 0x00000100 /* PB23 */ | ||
26 | #define PB_XHFC_IRQ2 0x00000200 /* PB22 */ | ||
27 | #define PB_XHFC_IRQ3 0x00000400 /* PB21 */ | ||
28 | #define PB_XHFC_IRQ4 0x00000800 /* PB20 */ | ||
29 | |||
20 | /* | 30 | /* |
21 | * NOTE: some registers are assigned multiple times due to different modes | 31 | * NOTE: some registers are assigned multiple times due to different modes |
22 | * also registers are assigned differen for HFC-4s/8s and HFC-E1 | 32 | * also registers are assigned differen for HFC-4s/8s and HFC-E1 |
@@ -81,6 +91,11 @@ struct hfcm_hw { | |||
81 | #define HFC_CFG_CRC4 10 /* disable CRC-4 Multiframe mode, */ | 91 | #define HFC_CFG_CRC4 10 /* disable CRC-4 Multiframe mode, */ |
82 | /* use double frame instead. */ | 92 | /* use double frame instead. */ |
83 | 93 | ||
94 | #define HFC_TYPE_E1 1 /* controller is HFC-E1 */ | ||
95 | #define HFC_TYPE_4S 4 /* controller is HFC-4S */ | ||
96 | #define HFC_TYPE_8S 8 /* controller is HFC-8S */ | ||
97 | #define HFC_TYPE_XHFC 5 /* controller is XHFC */ | ||
98 | |||
84 | #define HFC_CHIP_EXRAM_128 0 /* external ram 128k */ | 99 | #define HFC_CHIP_EXRAM_128 0 /* external ram 128k */ |
85 | #define HFC_CHIP_EXRAM_512 1 /* external ram 256k */ | 100 | #define HFC_CHIP_EXRAM_512 1 /* external ram 256k */ |
86 | #define HFC_CHIP_REVISION0 2 /* old fifo handling */ | 101 | #define HFC_CHIP_REVISION0 2 /* old fifo handling */ |
@@ -88,19 +103,22 @@ struct hfcm_hw { | |||
88 | #define HFC_CHIP_PCM_MASTER 4 /* PCM is master */ | 103 | #define HFC_CHIP_PCM_MASTER 4 /* PCM is master */ |
89 | #define HFC_CHIP_RX_SYNC 5 /* disable pll sync for pcm */ | 104 | #define HFC_CHIP_RX_SYNC 5 /* disable pll sync for pcm */ |
90 | #define HFC_CHIP_DTMF 6 /* DTMF decoding is enabled */ | 105 | #define HFC_CHIP_DTMF 6 /* DTMF decoding is enabled */ |
91 | #define HFC_CHIP_ULAW 7 /* ULAW mode */ | 106 | #define HFC_CHIP_CONF 7 /* conference handling is enabled */ |
92 | #define HFC_CHIP_CLOCK2 8 /* double clock mode */ | 107 | #define HFC_CHIP_ULAW 8 /* ULAW mode */ |
93 | #define HFC_CHIP_E1CLOCK_GET 9 /* always get clock from E1 interface */ | 108 | #define HFC_CHIP_CLOCK2 9 /* double clock mode */ |
94 | #define HFC_CHIP_E1CLOCK_PUT 10 /* always put clock from E1 interface */ | 109 | #define HFC_CHIP_E1CLOCK_GET 10 /* always get clock from E1 interface */ |
95 | #define HFC_CHIP_WATCHDOG 11 /* whether we should send signals */ | 110 | #define HFC_CHIP_E1CLOCK_PUT 11 /* always put clock from E1 interface */ |
111 | #define HFC_CHIP_WATCHDOG 12 /* whether we should send signals */ | ||
96 | /* to the watchdog */ | 112 | /* to the watchdog */ |
97 | #define HFC_CHIP_B410P 12 /* whether we have a b410p with echocan in */ | 113 | #define HFC_CHIP_B410P 13 /* whether we have a b410p with echocan in */ |
98 | /* hw */ | 114 | /* hw */ |
99 | #define HFC_CHIP_PLXSD 13 /* whether we have a Speech-Design PLX */ | 115 | #define HFC_CHIP_PLXSD 14 /* whether we have a Speech-Design PLX */ |
116 | #define HFC_CHIP_EMBSD 15 /* whether we have a SD Embedded board */ | ||
100 | 117 | ||
101 | #define HFC_IO_MODE_PCIMEM 0x00 /* normal memory mapped IO */ | 118 | #define HFC_IO_MODE_PCIMEM 0x00 /* normal memory mapped IO */ |
102 | #define HFC_IO_MODE_REGIO 0x01 /* PCI io access */ | 119 | #define HFC_IO_MODE_REGIO 0x01 /* PCI io access */ |
103 | #define HFC_IO_MODE_PLXSD 0x02 /* access HFC via PLX9030 */ | 120 | #define HFC_IO_MODE_PLXSD 0x02 /* access HFC via PLX9030 */ |
121 | #define HFC_IO_MODE_EMBSD 0x03 /* direct access */ | ||
104 | 122 | ||
105 | /* table entry in the PCI devices list */ | 123 | /* table entry in the PCI devices list */ |
106 | struct hm_map { | 124 | struct hm_map { |
@@ -113,6 +131,7 @@ struct hm_map { | |||
113 | int opticalsupport; | 131 | int opticalsupport; |
114 | int dip_type; | 132 | int dip_type; |
115 | int io_mode; | 133 | int io_mode; |
134 | int irq; | ||
116 | }; | 135 | }; |
117 | 136 | ||
118 | struct hfc_multi { | 137 | struct hfc_multi { |
@@ -120,7 +139,7 @@ struct hfc_multi { | |||
120 | struct hm_map *mtyp; | 139 | struct hm_map *mtyp; |
121 | int id; | 140 | int id; |
122 | int pcm; /* id of pcm bus */ | 141 | int pcm; /* id of pcm bus */ |
123 | int type; | 142 | int ctype; /* controller type */ |
124 | int ports; | 143 | int ports; |
125 | 144 | ||
126 | u_int irq; /* irq used by card */ | 145 | u_int irq; /* irq used by card */ |
@@ -160,10 +179,16 @@ struct hfc_multi { | |||
160 | int len); | 179 | int len); |
161 | void (*write_fifo)(struct hfc_multi *hc, u_char *data, | 180 | void (*write_fifo)(struct hfc_multi *hc, u_char *data, |
162 | int len); | 181 | int len); |
163 | u_long pci_origmembase, plx_origmembase, dsp_origmembase; | 182 | u_long pci_origmembase, plx_origmembase; |
164 | void __iomem *pci_membase; /* PCI memory */ | 183 | void __iomem *pci_membase; /* PCI memory */ |
165 | void __iomem *plx_membase; /* PLX memory */ | 184 | void __iomem *plx_membase; /* PLX memory */ |
166 | u_char *dsp_membase; /* DSP on PLX */ | 185 | u_long xhfc_origmembase; |
186 | u_char *xhfc_membase; | ||
187 | u_long *xhfc_memaddr, *xhfc_memdata; | ||
188 | #ifdef CONFIG_MISDN_HFCMULTI_8xx | ||
189 | struct immap *immap; | ||
190 | #endif | ||
191 | u_long pb_irqmsk; /* Portbit mask to check the IRQ line */ | ||
167 | u_long pci_iobase; /* PCI IO */ | 192 | u_long pci_iobase; /* PCI IO */ |
168 | struct hfcm_hw hw; /* remember data of write-only-registers */ | 193 | struct hfcm_hw hw; /* remember data of write-only-registers */ |
169 | 194 | ||