mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@nvidia.com>
To: Peter De Schrijver <pdeschrijver@nvidia.com>
Cc: Colin Cross <ccross@android.com>, Olof Johansson <olof@lixom.net>,
	Russell King <linux@arm.linux.org.uk>,
	Gary King <gking@nvidia.com>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] arm/tegra: add support for tegra30 interrupts
Date: Wed, 2 Nov 2011 12:09:36 -0700	[thread overview]
Message-ID: <74CDBE0F657A3D45AFBB94109FB122FF173F9A47A7@HQMAIL01.nvidia.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF173F9A4758@HQMAIL01.nvidia.com>

Stephen Warren wrote at Wednesday, November 02, 2011 12:07 PM:
> Stephen Warren wrote at Wednesday, November 02, 2011 10:39 AM:
> > Peter De Schrijver wrote by Wednesday, November 02, 2011 9:38 AM:
> > > Tegra30 has 1 extra legacy interrupt controller. Use the GIC ITLinesNumber
> > > field to determine how many interrupt controllers we have and initialize
> > > appropriately. Also make room for the extra tegra30 interrupts by moving
> > > the GPIO IRQ base. This shouldn't affect existing code as it determines the
> > > correct IRQ number for GPIOs using TEGRA_GPIO_TO_IRQ()
> > >
> > > Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
> >
> > After fixing one small issue I comment on below,
> > Acked-by: Stephen Warren <swarren@nvidia.com>
> 
> Also, both this and "arm/tegra: remove unused defines":
> 
> Tested-by: Stephen Warren <swarren@nvidia.com>
> 
> (on Tegra20 Seaboard/Springbank, not on Tegra30 Cardhu)

Actually, I take that back. This patch breaks stuff: just GPIO stuff which
I didn't test, not IRQ stuff which I did.

This patch changes INT_GPIO_NR from 224 to 256, which in turn changes the
value of TEGRA_NR_GPIOS. This is the number of GPIOs that the Tegra GPIO
controller "assigns" to itself when registering with gpiolib. Now, Tegra
doesn't define ARCH_NR_GPIOs, so it defaults to 256. This means there is
no GPIO numbering space left for non-Tegra GPIO controllers. In particular,
the WM8903 audio codec registers with gpiolib, and one of the GPIOs is used
on most boards to enable/disable the speaker amplifier, which now doesn't
work since the GPIO ID to control it isn't registered.

To solve this, I recommend definining ARCH_NR_GPIOs for Tegra, to something
large; I see that arch/arm/mach-shmobile defines it to 1024. Failing any
disadvantage of using a number that large, I'd go for that...

-- 
nvpublic


  reply	other threads:[~2011-11-02 19:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 15:38 Peter De Schrijver
2011-11-02 16:39 ` Stephen Warren
2011-11-02 18:06   ` Stephen Warren
2011-11-02 19:09     ` Stephen Warren [this message]
2011-11-02 19:21       ` Russell King - ARM Linux
2011-11-02 19:26         ` Felipe Balbi
2011-11-02 19:39           ` Russell King - ARM Linux
2011-11-02 19:48             ` Felipe Balbi
2011-11-02 19:54               ` Russell King - ARM Linux
2011-11-02 20:40                 ` Felipe Balbi
2011-11-02 18:13 ` Colin Cross

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=74CDBE0F657A3D45AFBB94109FB122FF173F9A47A7@HQMAIL01.nvidia.com \
    --to=swarren@nvidia.com \
    --cc=ccross@android.com \
    --cc=gking@nvidia.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --cc=pdeschrijver@nvidia.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

all inboxes | Powered by JetHome®