linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Cox <adrian@humboldt.co.uk>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Internal interrupts on the MPC107
Date: 02 Jun 2003 12:46:37 +0100	[thread overview]
Message-ID: <1054554408.20568.86.camel@newt> (raw)
In-Reply-To: <3ED7EFB4.2050400@mvista.com>


On Sat, 2003-05-31 at 00:56, Mark A. Greer wrote:


> [snip]
>  My guess is
> that your board's fw (or early kernel init code) is setting it up with
> the correct value but on the other systems you mentioned, the fw doesn't
> (and the reset value of 0x00 is returned).  Basically, if I'm
> interpreting the manual correctly, you probably need to do something
> other than count on the fw setting up that field in that reg correctly.

For boards derived from the linuxppc_2_4_devel tree, everything works.
I've now done kernel ports for several MPC107 based boards, all derived
from that tree, which use the "new way" you describe below.

> [description of "old way" snipped]

I think I may force the driver to run in polled mode on kernels which
use the "old way". Many of them fail to initialise the vector in the
EPIC.

> The "new way" of initializing the openpic uses the openpic_set_sources()
> routine which allows you to select just the vectors you want to
> initialize and assign them the IRQ values that you want (independent of
> their offset).  Much nicer and it doesn't write to vectors/locations
> that you don't want written.
>
> The problem for an I2C driver is that the IRQ is now board specific.
>
> So what to do?  Well, the board-specific file needs to initialize the
> I2C vector.  Also, there has to be some mechanism for the board-specific
> file to tell your driver what the IRQ is.  Maybe the best solution is to
> have the board-specific code set up the vector field in the IIVPR0 reg
> with the proper IRQ and then your driver won't need to change.  Seems
> fairly clean but you'll have to hack the board-specific code of any
> boards that will use the I2C driver.

If there's any interest I could tidy up the driver and submit it into
linuxppc_2_4_devel along with a patch that collects MPC107 configuration
into one place.

- Adrian Cox
http://www.humboldt.co.uk/


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2003-06-02 11:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-28 10:49 Internal interrupts on the MPC107 Adrian Cox
2003-05-30 23:56 ` Mark A. Greer
2003-06-02 11:46   ` Adrian Cox [this message]
2003-06-02 18:55     ` Tom Rini
2003-06-03  0:07     ` bdiGDB configuration file for PPC750 and MPC107 bridge chip dong in kang

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=1054554408.20568.86.camel@newt \
    --to=adrian@humboldt.co.uk \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    --cc=mgreer@mvista.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).