Re: [PATCH v5] sh: avoid using IRQ0 on SH3/4

Sergey Shtylyov <[email protected]>
Newsgroups gmane.linux.ports.sh.devel,gmane.linux.kernel
Organization Open Mobile Platform
Message-ID <[email protected]>
On 6/1/23 9:38 AM, John Paul Adrian Glaubitz wrote:
[...]
>> Now that IRQ0 is no longer returned by platform_get_irq() and its ilk (they
>> now return -EINVAL instead).  However, the code supporting SH3/4 SoCs still
>> maps the IRQ #s starting at 0 -- modify that code to start the IRQ #s from
>> 16 instead.

  Now that I'm re-reading this passage, it seems unfinished... :-/

>> The patch should mostly affect the AP-SH4A-3A/AP-SH4AD-0A boards as they
>> indeed use IRQ0 for the SMSC911x compatible Ethernet chip...
> 
> I'm not sure I understand. Does that mean that the Ethernet controller on
> the AP-SH4A-3A/AP-SH4AD-0A boards will no longer work after this patch
> has been applied?

   Contrariwise, they should start working again! :-)
   Here's the story as I understand it:

1. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=965b2aa78fbcb831acf4f669f494da201f4bcace broke IRQ0 use in the SMSC 9111x
driver.

2. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5ef9b803a4af0f5e42012176889b40bb2a978b18 fixed IRQ0 use in that driver.

3. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce753ad1549cbe9ccaea4c06a1f5fa47432c8289 totally stopped returning IRQ0
from platform_get_irq(), thus breaking that driver again.

4. This patch remaps IRQ0 to IRQ16 and thus fixes the SMSC 911x driver again.

[...]

MBR, Sergey
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.