Merge tag 'm68k-for-v4.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven: - more printk modernization - various cleanups and fixes (incl. a race condition) for Mac - defconfig updates * tag 'm68k-for-v4.15-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/defconfig: Update defconfigs for v4.14-rc7 m68k/mac: Add mutual exclusion for IOP interrupt polling m68k/mac: Disentangle VIA/RBV and NuBus initialization m68k/mac: Disentangle VIA and OSS initialization m68k/mac: More printk modernization
This commit is contained in:
@@ -37,7 +37,7 @@ void __init baboon_init(void)
|
||||
baboon = (struct baboon *) BABOON_BASE;
|
||||
baboon_present = 1;
|
||||
|
||||
printk("Baboon detected at %p\n", baboon);
|
||||
pr_debug("Baboon detected at %p\n", baboon);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -898,8 +898,8 @@ static void __init mac_identify(void)
|
||||
mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize);
|
||||
|
||||
iop_init();
|
||||
via_init();
|
||||
oss_init();
|
||||
via_init();
|
||||
psc_init();
|
||||
baboon_init();
|
||||
|
||||
|
@@ -273,10 +273,10 @@ void __init iop_init(void)
|
||||
int i;
|
||||
|
||||
if (iop_scc_present) {
|
||||
pr_info("IOP: detected SCC IOP at %p\n", iop_base[IOP_NUM_SCC]);
|
||||
pr_debug("SCC IOP detected at %p\n", iop_base[IOP_NUM_SCC]);
|
||||
}
|
||||
if (iop_ism_present) {
|
||||
pr_info("IOP: detected ISM IOP at %p\n", iop_base[IOP_NUM_ISM]);
|
||||
pr_debug("ISM IOP detected at %p\n", iop_base[IOP_NUM_ISM]);
|
||||
iop_start(iop_base[IOP_NUM_ISM]);
|
||||
iop_alive(iop_base[IOP_NUM_ISM]); /* clears the alive flag */
|
||||
}
|
||||
@@ -598,3 +598,12 @@ irqreturn_t iop_ism_irq(int irq, void *dev_id)
|
||||
}
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
void iop_ism_irq_poll(uint iop_num)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
local_irq_save(flags);
|
||||
iop_ism_irq(0, (void *)iop_num);
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
@@ -32,18 +32,18 @@ volatile struct mac_oss *oss;
|
||||
|
||||
/*
|
||||
* Initialize the OSS
|
||||
*
|
||||
* The OSS "detection" code is actually in via_init() which is always called
|
||||
* before us. Thus we can count on oss_present being valid on entry.
|
||||
*/
|
||||
|
||||
void __init oss_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!oss_present) return;
|
||||
if (macintosh_config->ident != MAC_MODEL_IIFX)
|
||||
return;
|
||||
|
||||
oss = (struct mac_oss *) OSS_BASE;
|
||||
pr_debug("OSS detected at %p", oss);
|
||||
oss_present = 1;
|
||||
|
||||
/* Disable all interrupts. Unlike a VIA it looks like we */
|
||||
/* do this by setting the source's interrupt level to zero. */
|
||||
@@ -52,14 +52,6 @@ void __init oss_init(void)
|
||||
oss->irq_level[i] = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize OSS for Nubus access
|
||||
*/
|
||||
|
||||
void __init oss_nubus_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle miscellaneous OSS interrupts.
|
||||
*/
|
||||
|
@@ -42,7 +42,7 @@ static void psc_debug_dump(void)
|
||||
return;
|
||||
|
||||
for (i = 0x30 ; i < 0x70 ; i += 0x10) {
|
||||
printk("PSC #%d: IFR = 0x%02X IER = 0x%02X\n",
|
||||
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));
|
||||
@@ -59,14 +59,12 @@ static __init void psc_dma_die_die_die(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
printk("Killing all PSC DMA channels...");
|
||||
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);
|
||||
}
|
||||
printk("done!\n");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -92,7 +90,7 @@ void __init psc_init(void)
|
||||
|
||||
psc = (void *) PSC_BASE;
|
||||
|
||||
printk("PSC detected at %p\n", psc);
|
||||
pr_debug("PSC detected at %p\n", psc);
|
||||
|
||||
psc_dma_die_die_die();
|
||||
|
||||
|
@@ -107,6 +107,7 @@ static int gIER,gIFR,gBufA,gBufB;
|
||||
static u8 nubus_disabled;
|
||||
|
||||
void via_debug_dump(void);
|
||||
static void via_nubus_init(void);
|
||||
|
||||
/*
|
||||
* Initialize the VIAs
|
||||
@@ -114,29 +115,25 @@ void via_debug_dump(void);
|
||||
* First we figure out where they actually _are_ as well as what type of
|
||||
* VIA we have for VIA2 (it could be a real VIA or an RBV or even an OSS.)
|
||||
* Then we pretty much clear them out and disable all IRQ sources.
|
||||
*
|
||||
* Note: the OSS is actually "detected" here and not in oss_init(). It just
|
||||
* seems more logical to do it here since via_init() needs to know
|
||||
* these things anyways.
|
||||
*/
|
||||
|
||||
void __init via_init(void)
|
||||
{
|
||||
switch(macintosh_config->via_type) {
|
||||
via1 = (void *)VIA1_BASE;
|
||||
pr_debug("VIA1 detected at %p\n", via1);
|
||||
|
||||
if (oss_present) {
|
||||
via2 = NULL;
|
||||
rbv_present = 0;
|
||||
} else {
|
||||
switch (macintosh_config->via_type) {
|
||||
|
||||
/* IIci, IIsi, IIvx, IIvi (P6xx), LC series */
|
||||
|
||||
case MAC_VIA_IICI:
|
||||
via1 = (void *) VIA1_BASE;
|
||||
if (macintosh_config->ident == MAC_MODEL_IIFX) {
|
||||
via2 = NULL;
|
||||
rbv_present = 0;
|
||||
oss_present = 1;
|
||||
} else {
|
||||
via2 = (void *) RBV_BASE;
|
||||
rbv_present = 1;
|
||||
oss_present = 0;
|
||||
}
|
||||
via2 = (void *)RBV_BASE;
|
||||
pr_debug("VIA2 (RBV) detected at %p\n", via2);
|
||||
rbv_present = 1;
|
||||
if (macintosh_config->ident == MAC_MODEL_LCIII) {
|
||||
rbv_clear = 0x00;
|
||||
} else {
|
||||
@@ -155,29 +152,19 @@ void __init via_init(void)
|
||||
|
||||
case MAC_VIA_QUADRA:
|
||||
case MAC_VIA_II:
|
||||
via1 = (void *) VIA1_BASE;
|
||||
via2 = (void *) VIA2_BASE;
|
||||
pr_debug("VIA2 detected at %p\n", via2);
|
||||
rbv_present = 0;
|
||||
oss_present = 0;
|
||||
rbv_clear = 0x00;
|
||||
gIER = vIER;
|
||||
gIFR = vIFR;
|
||||
gBufA = vBufA;
|
||||
gBufB = vBufB;
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("UNKNOWN VIA TYPE");
|
||||
}
|
||||
|
||||
printk(KERN_INFO "VIA1 at %p is a 6522 or clone\n", via1);
|
||||
|
||||
printk(KERN_INFO "VIA2 at %p is ", via2);
|
||||
if (rbv_present) {
|
||||
printk("an RBV\n");
|
||||
} else if (oss_present) {
|
||||
printk("an OSS\n");
|
||||
} else {
|
||||
printk("a 6522 or clone\n");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_VIA
|
||||
@@ -253,6 +240,8 @@ void __init via_init(void)
|
||||
via2[vACR] &= ~0x03; /* disable port A & B latches */
|
||||
}
|
||||
|
||||
via_nubus_init();
|
||||
|
||||
/* Everything below this point is VIA2 only... */
|
||||
|
||||
if (rbv_present)
|
||||
@@ -304,9 +293,9 @@ void via_debug_dump(void)
|
||||
(uint) via1[vDirA], (uint) via1[vDirB], (uint) via1[vACR]);
|
||||
printk(KERN_DEBUG " PCR = 0x%02X IFR = 0x%02X IER = 0x%02X\n",
|
||||
(uint) via1[vPCR], (uint) via1[vIFR], (uint) via1[vIER]);
|
||||
if (oss_present) {
|
||||
printk(KERN_DEBUG "VIA2: <OSS>\n");
|
||||
} else if (rbv_present) {
|
||||
if (!via2)
|
||||
return;
|
||||
if (rbv_present) {
|
||||
printk(KERN_DEBUG "VIA2: IFR = 0x%02X IER = 0x%02X\n",
|
||||
(uint) via2[rIFR], (uint) via2[rIER]);
|
||||
printk(KERN_DEBUG " SIFR = 0x%02X SIER = 0x%02X\n",
|
||||
@@ -374,7 +363,7 @@ int via_get_cache_disable(void)
|
||||
* Initialize VIA2 for Nubus access
|
||||
*/
|
||||
|
||||
void __init via_nubus_init(void)
|
||||
static void __init via_nubus_init(void)
|
||||
{
|
||||
/* unlock nubus transactions */
|
||||
|
||||
|
Reference in New Issue
Block a user