[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=SCQYOTSQGpRnje-+=h5AZTtuaEOT6LO4VQA8T@mail.gmail.com>
Date: Fri, 7 Jan 2011 17:41:53 +0100
From: Richard Genoud <richard.genoud@...il.com>
To: Grant Likely <grant.likely@...retlab.ca>
Cc: spi-devel-general@...ts.sourceforge.net,
David Brownell <dbrownell@...rs.sourceforge.net>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi_imx.c: correct the test on platform_get_irq() return value
2011/1/7 Grant Likely <grant.likely@...retlab.ca>:
> On Fri, Jan 7, 2011 at 7:26 AM, Richard Genoud <richard.genoud@...il.com> wrote:
>> The test "if (spi_imx->irq <= 0)" is not testing the IRQ value, but the return value of platform_get_irq().
>> As platform_get_irq() can return an error (-ENXIO) or the IRQ value it found, the test should be "if (spi_imx->irq < 0)"
>>
>> Signed-off-by: Richard Genoud <richard.genoud@...il.com>
>
> For the majority of architectures in Linux, 0 is not a valid IRQ for
> devices. Unless there is an actual imx platform that currently
> assigns linux irq 0 to the spi controller then I'd rather not apply
> this change.
actually, there is the imx25 platform:
in arch/arm/plat-mxc/include/mach/mx25.h
line 61 :
#define MX25_INT_CSPI3 0
this is the interrupt assigned for CSPI3.
I doubled check with the imx25 release manual chapter 3.1 (page 51):
http://cache.freescale.com/files/dsp/doc/ref_manual/IMX25RM.pdf
And I made some spi test on the imx25 3stack PDK, the CSPI3 is working
with irq 0.
richard.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists