Commit 1eac59d7 authored by Russell King's avatar Russell King

ARM: riscpc: add ecard quirk for Atomwide 3port serial card

Atomwide 3port serial cards seem to leave their interrupts active when
exiting RISC OS, resulting in an interrupt storm during boot, and the
expansion card interrupt being disabled.  Avoid this by manually
disabling the interrupt on each serial port via a custom quirk function.
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
parent 090a37ce
...@@ -70,17 +70,21 @@ struct expcard_blacklist { ...@@ -70,17 +70,21 @@ struct expcard_blacklist {
unsigned short manufacturer; unsigned short manufacturer;
unsigned short product; unsigned short product;
const char *type; const char *type;
void (*init)(ecard_t *ec);
}; };
static ecard_t *cards; static ecard_t *cards;
static ecard_t *slot_to_expcard[MAX_ECARDS]; static ecard_t *slot_to_expcard[MAX_ECARDS];
static unsigned int ectcr; static unsigned int ectcr;
static void atomwide_3p_quirk(ecard_t *ec);
/* List of descriptions of cards which don't have an extended /* List of descriptions of cards which don't have an extended
* identification, or chunk directories containing a description. * identification, or chunk directories containing a description.
*/ */
static struct expcard_blacklist __initdata blacklist[] = { static struct expcard_blacklist __initdata blacklist[] = {
{ MANU_ACORN, PROD_ACORN_ETHER1, "Acorn Ether1" } { MANU_ACORN, PROD_ACORN_ETHER1, "Acorn Ether1" },
{ MANU_ATOMWIDE, PROD_ATOMWIDE_3PSERIAL, NULL, atomwide_3p_quirk },
}; };
asmlinkage extern int asmlinkage extern int
...@@ -871,6 +875,16 @@ void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res, ...@@ -871,6 +875,16 @@ void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
} }
EXPORT_SYMBOL(ecardm_iomap); EXPORT_SYMBOL(ecardm_iomap);
static void atomwide_3p_quirk(ecard_t *ec)
{
void __iomem *addr = __ecard_address(ec, ECARD_IOC, ECARD_SYNC);
unsigned int i;
/* Disable interrupts on each port */
for (i = 0x2000; i <= 0x2800; i += 0x0400)
writeb(0, addr + i + 4);
}
/* /*
* Probe for an expansion card. * Probe for an expansion card.
* *
...@@ -927,7 +941,10 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type) ...@@ -927,7 +941,10 @@ static int __init ecard_probe(int slot, unsigned irq, card_type_t type)
for (i = 0; i < ARRAY_SIZE(blacklist); i++) for (i = 0; i < ARRAY_SIZE(blacklist); i++)
if (blacklist[i].manufacturer == ec->cid.manufacturer && if (blacklist[i].manufacturer == ec->cid.manufacturer &&
blacklist[i].product == ec->cid.product) { blacklist[i].product == ec->cid.product) {
ec->card_desc = blacklist[i].type; if (blacklist[i].type)
ec->card_desc = blacklist[i].type;
if (blacklist[i].init)
blacklist[i].init(ec);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment