From: Paul Mundt <lethal@linux-sh.org>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 1/4] Add the directory mach-sh2007 for SH-2007 board support
Date: Tue, 08 Jun 2010 04:00:41 +0000 [thread overview]
Message-ID: <20100608040041.GB6376@linux-sh.org> (raw)
In-Reply-To: <1275292796-26602-2-git-send-email-mitake@dcl.info.waseda.ac.jp>
On Tue, Jun 08, 2010 at 12:06:32AM +0900, Hitoshi Mitake wrote:
> On 06/07/10 12:02, Paul Mundt wrote:
> > If you read through arch/sh/kernel/cpu/sh4a/setup-sh7780.c you can see
> > that everything is already centrally managed by the CPU, so the only
> > thing you need to take care of is the IRQ mapping and IRQ mode pins
> > setting.
> >
> > If your board has an FPGA that's chained off of the IRLs then you can set
> > the controller in to IRL mode, or if you're simply using them as IRQ0-7
> > directly and letting the CPU controller take care of the masking, then
> > you can simply throw the controller in to IRQ mode.
> >
> > Simply grep for plat_irq_setup_pins() to see how the CPU/board
> > interaction works for this, you'll likely want IRQ_MODE_IRQ for this
> > case.
>
> Ah, I noticed my misunderstanding.
> plat_irq_setup_pins(IRQ_MODE_IRQ);
> is enough for me to init ICR.
> Thanks for your correcting!
>
> And I have a question,
> Can I set evt2irq(INTEVT) to struct resource.start directly?
> # INTEVT is the value like 0x220
> If I do so, mv_irq_demux can be NULL because
> evt2irq(INTEVT) is equal to the first argument of do_IRQ().
>
> I don't know the traditional way of SH board support,
> and it seems that there is no board takes the way I described above.
> So I cannot judge this way is correct or not...
There is no real rule for this, on some parts we've opted for open-coding
the vector directly simply because it's immediately visible in the data
sheet, while for others (especially the SH-2 and SH-2A parts) which don't
really have anything to do for evt2irq() we just omit it entirely.
The data sheets for the newer CPUs all seem to prefer the event code
numbering, so you can see that there are already a few boards that are
using evt2irq() in their resource assignments directly, such as sdk7786.
So of course you can use whatever format you like.
next prev parent reply other threads:[~2010-06-08 4:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 7:59 [PATCH 1/4] Add the directory mach-sh2007 for SH-2007 board support Hitoshi Mitake
2010-06-02 6:32 ` Paul Mundt
2010-06-05 13:32 ` Hitoshi Mitake
2010-06-07 3:02 ` Paul Mundt
2010-06-07 15:06 ` Hitoshi Mitake
2010-06-08 4:00 ` Paul Mundt [this message]
2010-06-08 10:06 ` Hitoshi Mitake
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=20100608040041.GB6376@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.org \
/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