All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@uni-koblenz.de>
To: Marc Karasek <marc_karasek@ivivity.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: Serial Console on Malta broken?
Date: Fri, 7 Dec 2001 14:52:26 -0200	[thread overview]
Message-ID: <20011207145225.B17998@dea.linux-mips.net> (raw)
In-Reply-To: <1007741762.1387.3.camel@localhost.localdomain>; from marc_karasek@ivivity.com on Fri, Dec 07, 2001 at 11:15:39AM -0500

On Fri, Dec 07, 2001 at 11:15:39AM -0500, Marc Karasek wrote:

> I will try it as soon as I can.  I also did some snooping and found that
> the exception handler was not even getting fired.  It was getting the
> two interrupts (36, 38) but no other "exceptions/interrupts" at all. 
> Even spurious ones...  It looked to me like the i8259 was locked up or
> waiting for something.  I put back in the old stuff.  (Carsten sent me
> the old malta_int.c and a patch file) And that works.
> 
> Just a thought but, in looking at the two codes (old/new) the old one
> seems to be more applicable for an embedded system.  In that it treats
> the interrupt controller as a set of registers.  I know that it really
> is a i8259, but most people will not put a southbridge in there embedded
> design.  They are more likely to have a fpga or asic that handles the
> interrupts.  In using the Malta as a reference design and linux as the
> RTOS it might be better to have the old code for porting.  As it will
> probably be closer to the what the embedded design will be. 

If you're going to use a legacy i8259 interrupt controller it'll almost
certainly reside on ports 0x20 / 0xa0 like the original controllers in
the PC.  Now, from a software point of few the i8259 is a pain in the
lower part of the body so you better stay from it anyway.

Any other interrupt controller can easily be plugged into the interrupt
handling.  Take a look at arch/mips/kernel/i8259.c's structure.  Basically
all it does is filling in a number of entries into the irq_desc[] array
for interrupts 0 to 15, most important for understanding is the
struct hw_interrupt_type i8259A_irq_type.  It contains the name of the
interrupt handler and a bunch of methods to enable, disable etc. an
interrupt.  Almost all the complexity is handled in hardware that way
and code to support a particular interrupt controler is easily reusable,
i8259.c being the primary example.  Another example would be the
Momenco Ocelot which mostly uses the RM7000's internal interrupt
controller.

The old code was such a pain in the a** to maintain that removing support
for it was one of the first things I did for 2.5.0 and I won't accept any
patches for 2.4 that use the old style interupt handling for new systems.

  Ralf

      parent reply	other threads:[~2001-12-07 17:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-26 21:05 Serial Console on Malta broken? Marc Karasek
2001-11-27 12:50 ` Carsten Langgaard
     [not found] ` <20011127175420.F29424@dea.linux-mips.net>
     [not found]   ` <1006884537.2037.4.camel@localhost.localdomain>
     [not found]     ` <20011207100937.D1347@dea.linux-mips.net>
     [not found]       ` <1007741762.1387.3.camel@localhost.localdomain>
2001-12-07 16:52         ` Ralf Baechle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011207145225.B17998@dea.linux-mips.net \
    --to=ralf@uni-koblenz.de \
    --cc=linux-mips@oss.sgi.com \
    --cc=marc_karasek@ivivity.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.