diff options
| -rw-r--r-- | arch/m68k/Kconfig.bus | 10 | ||||
| -rw-r--r-- | arch/m68k/Kconfig.devices | 24 | ||||
| -rw-r--r-- | arch/m68k/atari/ataints.c | 152 | ||||
| -rw-r--r-- | arch/m68k/atari/config.c | 239 | ||||
| -rw-r--r-- | arch/m68k/include/asm/atarihw.h | 6 | ||||
| -rw-r--r-- | arch/m68k/include/asm/atariints.h | 11 | ||||
| -rw-r--r-- | arch/m68k/include/asm/cmpxchg.h | 3 | ||||
| -rw-r--r-- | arch/m68k/include/asm/delay.h | 23 | ||||
| -rw-r--r-- | arch/m68k/include/asm/io_mm.h | 136 | ||||
| -rw-r--r-- | arch/m68k/include/asm/irq.h | 6 | ||||
| -rw-r--r-- | arch/m68k/include/asm/raw_io.h | 109 | ||||
| -rw-r--r-- | arch/m68k/include/asm/string.h | 14 | ||||
| -rw-r--r-- | arch/m68k/kernel/setup_mm.c | 6 | ||||
| -rw-r--r-- | arch/m68k/lib/string.c | 2 |
14 files changed, 717 insertions, 24 deletions
diff --git a/arch/m68k/Kconfig.bus b/arch/m68k/Kconfig.bus index 93ef0346b209..675b087198f6 100644 --- a/arch/m68k/Kconfig.bus +++ b/arch/m68k/Kconfig.bus | |||
| @@ -45,6 +45,16 @@ config ISA | |||
| 45 | (MCA) or VESA. ISA is an older system, now being displaced by PCI; | 45 | (MCA) or VESA. ISA is an older system, now being displaced by PCI; |
| 46 | newer boards don't support it. If you have ISA, say Y, otherwise N. | 46 | newer boards don't support it. If you have ISA, say Y, otherwise N. |
| 47 | 47 | ||
| 48 | config ATARI_ROM_ISA | ||
| 49 | bool "Atari ROM port ISA adapter support" | ||
| 50 | depends on ATARI | ||
| 51 | help | ||
| 52 | This option enables support for the ROM port ISA adapter used to | ||
| 53 | operate ISA cards on Atari. Only 8 bit cards are supported, and | ||
| 54 | no interrupt lines are connected. | ||
| 55 | The only driver currently using this adapter is the EtherNEC | ||
| 56 | driver for RTL8019AS based NE2000 compatible network cards. | ||
| 57 | |||
| 48 | config GENERIC_ISA_DMA | 58 | config GENERIC_ISA_DMA |
| 49 | def_bool ISA | 59 | def_bool ISA |
| 50 | 60 | ||
diff --git a/arch/m68k/Kconfig.devices b/arch/m68k/Kconfig.devices index 4bc945dfe467..d163991c5717 100644 --- a/arch/m68k/Kconfig.devices +++ b/arch/m68k/Kconfig.devices | |||
| @@ -55,6 +55,30 @@ config NFETH | |||
| 55 | which will emulate a regular ethernet device while presenting an | 55 | which will emulate a regular ethernet device while presenting an |
| 56 | ethertap device to the host system. | 56 | ethertap device to the host system. |
| 57 | 57 | ||
| 58 | config ATARI_ETHERNAT | ||
| 59 | bool "Atari EtherNAT Ethernet support" | ||
| 60 | depends on ATARI | ||
| 61 | ---help--- | ||
| 62 | Say Y to include support for the EtherNAT network adapter for the | ||
| 63 | CT/60 extension port. | ||
| 64 | |||
| 65 | To compile the actual ethernet driver, choose Y or M for the SMC91X | ||
| 66 | option in the network device section; the module will be called smc91x. | ||
| 67 | |||
| 68 | config ATARI_ETHERNEC | ||
| 69 | bool "Atari EtherNEC Ethernet support" | ||
| 70 | depends on ATARI_ROM_ISA | ||
| 71 | ---help--- | ||
| 72 | Say Y to include support for the EtherNEC network adapter for the | ||
| 73 | ROM port. The driver works by polling instead of interrupts, so it | ||
| 74 | is quite slow. | ||
| 75 | |||
| 76 | This driver also suppports the ethernet part of the NetUSBee ROM | ||
| 77 | port combined Ethernet/USB adapter. | ||
| 78 | |||
| 79 | To compile the actual ethernet driver, choose Y or M in for the NE2000 | ||
| 80 | option in the network device section; the module will be called ne. | ||
| 81 | |||
| 58 | endmenu | 82 | endmenu |
| 59 | 83 | ||
| 60 | menu "Character devices" | 84 | menu "Character devices" |
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 3f41092d1b70..20cde4e9fc77 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
| @@ -49,6 +49,7 @@ | |||
| 49 | #include <asm/atari_stdma.h> | 49 | #include <asm/atari_stdma.h> |
| 50 | #include <asm/irq.h> | 50 | #include <asm/irq.h> |
| 51 | #include <asm/entry.h> | 51 | #include <asm/entry.h> |
| 52 | #include <asm/io.h> | ||
| 52 | 53 | ||
| 53 | 54 | ||
| 54 | /* | 55 | /* |
| @@ -122,6 +123,136 @@ static struct irq_chip atari_irq_chip = { | |||
| 122 | }; | 123 | }; |
| 123 | 124 | ||
| 124 | /* | 125 | /* |
| 126 | * ST-MFP timer D chained interrupts - each driver gets its own timer | ||
| 127 | * interrupt instance. | ||
| 128 | */ | ||
| 129 | |||
| 130 | struct mfptimerbase { | ||
| 131 | volatile struct MFP *mfp; | ||
| 132 | unsigned char mfp_mask, mfp_data; | ||
| 133 | unsigned short int_mask; | ||
| 134 | int handler_irq, mfptimer_irq, server_irq; | ||
| 135 | char *name; | ||
| 136 | } stmfp_base = { | ||
| 137 | .mfp = &st_mfp, | ||
| 138 | .int_mask = 0x0, | ||
| 139 | .handler_irq = IRQ_MFP_TIMD, | ||
| 140 | .mfptimer_irq = IRQ_MFP_TIMER1, | ||
| 141 | .name = "MFP Timer D" | ||
| 142 | }; | ||
| 143 | |||
| 144 | static irqreturn_t mfptimer_handler(int irq, void *dev_id) | ||
| 145 | { | ||
| 146 | struct mfptimerbase *base = dev_id; | ||
| 147 | int mach_irq; | ||
| 148 | unsigned char ints; | ||
| 149 | |||
| 150 | mach_irq = base->mfptimer_irq; | ||
| 151 | ints = base->int_mask; | ||
| 152 | for (; ints; mach_irq++, ints >>= 1) { | ||
| 153 | if (ints & 1) | ||
| 154 | generic_handle_irq(mach_irq); | ||
| 155 | } | ||
| 156 | return IRQ_HANDLED; | ||
| 157 | } | ||
| 158 | |||
| 159 | |||
| 160 | static void atari_mfptimer_enable(struct irq_data *data) | ||
| 161 | { | ||
| 162 | int mfp_num = data->irq - IRQ_MFP_TIMER1; | ||
| 163 | stmfp_base.int_mask |= 1 << mfp_num; | ||
| 164 | atari_enable_irq(IRQ_MFP_TIMD); | ||
| 165 | } | ||
| 166 | |||
| 167 | static void atari_mfptimer_disable(struct irq_data *data) | ||
| 168 | { | ||
| 169 | int mfp_num = data->irq - IRQ_MFP_TIMER1; | ||
| 170 | stmfp_base.int_mask &= ~(1 << mfp_num); | ||
| 171 | if (!stmfp_base.int_mask) | ||
| 172 | atari_disable_irq(IRQ_MFP_TIMD); | ||
| 173 | } | ||
| 174 | |||
| 175 | static struct irq_chip atari_mfptimer_chip = { | ||
| 176 | .name = "timer_d", | ||
| 177 | .irq_enable = atari_mfptimer_enable, | ||
| 178 | .irq_disable = atari_mfptimer_disable, | ||
| 179 | }; | ||
| 180 | |||
| 181 | |||
| 182 | /* | ||
| 183 | * EtherNAT CPLD interrupt handling | ||
| 184 | * CPLD interrupt register is at phys. 0x80000023 | ||
| 185 | * Need this mapped in at interrupt startup time | ||
| 186 | * Possibly need this mapped on demand anyway - | ||
| 187 | * EtherNAT USB driver needs to disable IRQ before | ||
| 188 | * startup! | ||
| 189 | */ | ||
| 190 | |||
| 191 | static unsigned char *enat_cpld; | ||
| 192 | |||
| 193 | static unsigned int atari_ethernat_startup(struct irq_data *data) | ||
| 194 | { | ||
| 195 | int enat_num = 140 - data->irq + 1; | ||
| 196 | |||
| 197 | m68k_irq_startup(data); | ||
| 198 | /* | ||
| 199 | * map CPLD interrupt register | ||
| 200 | */ | ||
| 201 | if (!enat_cpld) | ||
| 202 | enat_cpld = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0x2); | ||
| 203 | /* | ||
| 204 | * do _not_ enable the USB chip interrupt here - causes interrupt storm | ||
| 205 | * and triggers dead interrupt watchdog | ||
| 206 | * Need to reset the USB chip to a sane state in early startup before | ||
| 207 | * removing this hack | ||
| 208 | */ | ||
| 209 | if (enat_num == 1) | ||
| 210 | *enat_cpld |= 1 << enat_num; | ||
| 211 | |||
| 212 | return 0; | ||
| 213 | } | ||
| 214 | |||
| 215 | static void atari_ethernat_enable(struct irq_data *data) | ||
| 216 | { | ||
| 217 | int enat_num = 140 - data->irq + 1; | ||
| 218 | /* | ||
| 219 | * map CPLD interrupt register | ||
| 220 | */ | ||
| 221 | if (!enat_cpld) | ||
| 222 | enat_cpld = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0x2); | ||
| 223 | *enat_cpld |= 1 << enat_num; | ||
| 224 | } | ||
| 225 | |||
| 226 | static void atari_ethernat_disable(struct irq_data *data) | ||
| 227 | { | ||
| 228 | int enat_num = 140 - data->irq + 1; | ||
| 229 | /* | ||
| 230 | * map CPLD interrupt register | ||
| 231 | */ | ||
| 232 | if (!enat_cpld) | ||
| 233 | enat_cpld = (unsigned char *)ioremap((ATARI_ETHERNAT_PHYS_ADDR+0x23), 0x2); | ||
| 234 | *enat_cpld &= ~(1 << enat_num); | ||
| 235 | } | ||
| 236 | |||
| 237 | static void atari_ethernat_shutdown(struct irq_data *data) | ||
| 238 | |||
