// SPDX-License-Identifier: GPL-2.0-only /* * Apple Peripheral System Controller (PSC) * * The PSC is used on the AV Macs to control IO functions not handled * by the VIAs (Ethernet, DSP, SCC). * * TO DO: * * Try to figure out what's going on in pIFR5 and pIFR6. There seem to be * persisant interrupt conditions in those registers and I have no idea what * they are. Granted it doesn't affect since we're not enabling any interrupts * on those levels at the moment, but it would be nice to know. I have a feeling * they aren't actually interrupt lines but data lines (to the DSP?)
*/
/* * Debugging dump, used in various places to see what's going on.
*/
staticvoid psc_debug_dump(void)
{ int i;
if (!psc) return;
for (i = 0x30 ; i < 0x70 ; i += 0x10) {
printk(KERN_DEBUG "PSC #%d: IFR = 0x%02X IER = 0x%02X\n",
i >> 4,
(int) psc_read_byte(pIFRbase + i),
(int) psc_read_byte(pIERbase + i));
}
}
/* * Try to kill all DMA channels on the PSC. Not sure how this his * supposed to work; this is code lifted from macmace.c and then * expanded to cover what I think are the other 7 channels.
*/
static __init void psc_dma_die_die_die(void)
{ int i;
for (i = 0 ; i < 9 ; i++) {
psc_write_word(PSC_CTL_BASE + (i << 4), 0x8800);
psc_write_word(PSC_CTL_BASE + (i << 4), 0x1000);
psc_write_word(PSC_CMD_BASE + (i << 5), 0x1100);
psc_write_word(PSC_CMD_BASE + (i << 5) + 0x10, 0x1100);
}
}
/* * Initialize the PSC. For now this just involves shutting down all * interrupt sources using the IERs.
*/
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.