lkml.org 
[lkml]   [2011]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] arm/tegra: add support for tegra30 interrupts
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



\
 
 \ /
  Last update: 2011-11-02 20:11    [W:0.059 / U:104.444 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site