/* * linux/arch/m68k/amiga/config.c * * Copyright (C) 1993 Hamish Macdonald * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details.
*/
case AMI_600: case AMI_1200:
AMIGAHW_SET(A1200_IDE);
AMIGAHW_SET(PCMCIA);
fallthrough; case AMI_500: case AMI_500PLUS: case AMI_1000: case AMI_2000: case AMI_2500:
AMIGAHW_SET(A2000_CLK); /* Is this correct for all models? */ break;
case AMI_3000: case AMI_3000T:
AMIGAHW_SET(AMBER_FF);
AMIGAHW_SET(MAGIC_REKICK);
fallthrough; case AMI_3000PLUS:
AMIGAHW_SET(A3000_SCSI);
AMIGAHW_SET(A3000_CLK);
AMIGAHW_SET(ZORRO3); break;
case AMI_4000T:
AMIGAHW_SET(A4000_SCSI);
fallthrough; case AMI_4000:
AMIGAHW_SET(A4000_IDE);
AMIGAHW_SET(A3000_CLK);
AMIGAHW_SET(ZORRO3); break;
case AMI_CDTV: case AMI_CD32:
AMIGAHW_SET(CD_ROM);
AMIGAHW_SET(A2000_CLK); /* Is this correct? */ break;
case AMI_DRACO:
panic("No support for Draco yet");
switch (amiga_chipset) { case CS_OCS: case CS_ECS: case CS_AGA: switch (amiga_custom.deniseid & 0xf) { case 0x0c:
AMIGAHW_SET(DENISE_HR); break; case 0x08:
AMIGAHW_SET(LISA); break; default:
AMIGAHW_SET(DENISE); break;
} break;
} switch ((amiga_custom.vposr>>8) & 0x7f) { case 0x00:
AMIGAHW_SET(AGNUS_PAL); break; case 0x10:
AMIGAHW_SET(AGNUS_NTSC); break; case 0x20: case 0x21:
AMIGAHW_SET(AGNUS_HR_PAL); break; case 0x30: case 0x31:
AMIGAHW_SET(AGNUS_HR_NTSC); break; case 0x22: case 0x23:
AMIGAHW_SET(ALICE_PAL); break; case 0x32: case 0x33:
AMIGAHW_SET(ALICE_NTSC); break;
}
AMIGAHW_SET(ZORRO);
#define AMIGAHW_ANNOUNCE(name, str) \ if (AMIGAHW_PRESENT(name)) \
pr_cont(str)
staticunsignedlong amiga_random_get_entropy(void)
{ /* VPOSR/VHPOSR provide at least 17 bits of data changing at 1.79 MHz */ return *(unsignedlong *)&amiga_custom.vposr;
}
/* * Setup the Amiga configuration info
*/
void __init config_amiga(void)
{ int i;
amiga_identify();
/* Yuk, we don't have PCI memory */
iomem_resource.name = "Memory"; for (i = 0; i < 4; i++)
request_resource(&iomem_resource, &((struct resource *)&mb_resources)[i]);
/* Fill in the clock value (based on the 700 kHz E-Clock) */
amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */
/* clear all DMA bits */
amiga_custom.dmacon = DMAF_ALL; /* ensure that the DMA master bit is set */
amiga_custom.dmacon = DMAF_SETCLR | DMAF_MASTER;
/* don't use Z2 RAM as system memory on Z3 capable machines */ if (AMIGAHW_PRESENT(ZORRO3)) { int i, j;
u32 disabled_z2mem = 0;
for (i = 0; i < m68k_num_memory; i++) { if (m68k_memory[i].addr < 16*1024*1024) { if (i == 0) { /* don't cut off the branch we're sitting on */
pr_warn("Warning: kernel runs in Zorro II memory\n"); continue;
}
disabled_z2mem += m68k_memory[i].size;
m68k_num_memory--; for (j = i; j < m68k_num_memory; j++)
m68k_memory[j] = m68k_memory[j+1];
i--;
}
} if (disabled_z2mem)
pr_info("%dK of Zorro II memory will not be used as system memory\n",
disabled_z2mem>>10);
}
/* request all RAM */ for (i = 0; i < m68k_num_memory; i++) {
ram_resource[i].name =
(m68k_memory[i].addr >= 0x01000000) ? "32-bit Fast RAM" :
(m68k_memory[i].addr < 0x00c00000) ? "16-bit Fast RAM" : "16-bit Slow RAM";
ram_resource[i].start = m68k_memory[i].addr;
ram_resource[i].end = m68k_memory[i].addr+m68k_memory[i].size-1;
request_resource(&iomem_resource, &ram_resource[i]);
}
/* our beloved beeper */ if (AMIGAHW_PRESENT(AMI_AUDIO))
amiga_init_sound();
/* * if it is an A3000, set the magic bit that forces * a hard rekick
*/ if (AMIGAHW_PRESENT(MAGIC_REKICK))
*(unsignedchar *)ZTWO_VADDR(0xde0002) |= 0x80;
}
if (request_resource(&mb_resources._ciab, &sched_res))
pr_warn("Cannot allocate ciab.ta{lo,hi}\n");
ciab.cra &= 0xC0; /* turn off timer A, continuous mode, from Eclk */
ciab.talo = jiffy_ticks % 256;
ciab.tahi = jiffy_ticks / 256;
/* install interrupt service routine for CIAB Timer A * * Please don't change this to use ciaa, as it interferes with the * SCSI code. We'll have to take a look at this later
*/ if (request_irq(IRQ_AMIGA_CIAB_TA, ciab_timer_handler, IRQF_TIMER, "timer", NULL))
pr_err("Couldn't register timer interrupt\n"); /* start timer */
ciab.cra |= 0x11;
int amiga_serial_console_wait_key(struct console *co)
{ int ch;
while (!(amiga_custom.intreqr & IF_RBF))
barrier();
ch = amiga_custom.serdatr & 0xff; /* clear the interrupt, so that another character can be read */
amiga_custom.intreq = IF_RBF; return ch;
}
void amiga_serial_gets(struct console *co, char *s, int len)
{ int ch, cnt = 0;
while (1) {
ch = amiga_serial_console_wait_key(co);
/* Check for backspace. */ if (ch == 8 || ch == 127) { if (cnt == 0) {
amiga_serial_putc('\007'); continue;
}
cnt--;
amiga_serial_puts("\010 \010"); continue;
}
/* Check for enter. */ if (ch == 10 || ch == 13) break;
/* See if line is too long. */ if (cnt >= len + 1) {
amiga_serial_putc(7);
cnt--; continue;
}
/* * The Amiga keyboard driver needs key_maps, but we cannot export it in * drivers/char/defkeymap.c, as it is autogenerated
*/ #ifdef CONFIG_VT
EXPORT_SYMBOL_GPL(key_maps); #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.