* External Interrupt
@ 2008-02-01 8:11 Marco Stornelli
2008-02-01 14:28 ` Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Marco Stornelli @ 2008-02-01 8:11 UTC (permalink / raw)
To: Linuxppc Embedded Mailing List
Hi,
I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a
driver for a device connected with the local bus. This device has an
external interrupt. In the local bus driver I have used the macro
MPC85xx_IRQ_EXT<X> to get the interrupt number and pass it to the
driver and after that register the ISR. Now with a kernel 2.6.21 this
macro isn't available because in the header file irq.h there is the
option CONFIG_PPC_MERGE that disable those options. I think this
problem is related to the migration of ppc code towards powerpc. I
know that now there is the new device tree source file where I can add
a device and its interrupt number but I think in this file I should
describe only the platform device, and this device is not a platform
device. Then, how can I get now this value? Is there some function to
call? How can I perform this operation?
Thanks in advance.
Marco
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: External Interrupt
2008-02-01 8:11 External Interrupt Marco Stornelli
@ 2008-02-01 14:28 ` Sergei Shtylyov
2008-02-01 15:15 ` Marco Stornelli
2008-02-01 14:29 ` Sergei Shtylyov
2008-02-01 14:52 ` AW: " Lehmann, Hans (Ritter Elektronik)
2 siblings, 1 reply; 10+ messages in thread
From: Sergei Shtylyov @ 2008-02-01 14:28 UTC (permalink / raw)
To: Marco Stornelli; +Cc: Linuxppc Embedded Mailing List
Marco Stornelli wrote:
> Hi,
>
> I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a
> driver for a device connected with the local bus. This device has an
> external interrupt. In the local bus driver I have used the macro
> MPC85xx_IRQ_EXT<X> to get the interrupt number and pass it to the
> driver and after that register the ISR. Now with a kernel 2.6.21 this
> macro isn't available because in the header file irq.h there is the
> option CONFIG_PPC_MERGE that disable those options. I think this
> problem is related to the migration of ppc code towards powerpc. I
> know that now there is the new device tree source file where I can add
> a device and its interrupt number but I think in this file I should
> describe only the platform device, and this device is not a platform
> device.
How comes that it's not platform device if it hangs off the local bus?
> Then, how can I get now this value? Is there some function to
> call? How can I perform this operation?
Probably irq_alloc_virt()...
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: External Interrupt
2008-02-01 14:28 ` Sergei Shtylyov
@ 2008-02-01 15:15 ` Marco Stornelli
2008-02-01 15:35 ` Sergei Shtylyov
0 siblings, 1 reply; 10+ messages in thread
From: Marco Stornelli @ 2008-02-01 15:15 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Linuxppc Embedded Mailing List
Sergei Shtylyov ha scritto:
> Marco Stornelli wrote:
>> Hi,
>>
>> I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a
>> driver for a device connected with the local bus. This device has an
>> external interrupt. In the local bus driver I have used the macro
>> MPC85xx_IRQ_EXT<X> to get the interrupt number and pass it to the
>> driver and after that register the ISR. Now with a kernel 2.6.21 this
>> macro isn't available because in the header file irq.h there is the
>> option CONFIG_PPC_MERGE that disable those options. I think this
>> problem is related to the migration of ppc code towards powerpc. I
>> know that now there is the new device tree source file where I can add
>> a device and its interrupt number but I think in this file I should
>> describe only the platform device, and this device is not a platform
>> device.
>
> How comes that it's not platform device if it hangs off the local bus?
In SoC system generally the platform device are (more or less) the
microprocessor controller like i2c, pci, local bus itself and so on. I
think is like if you consider a PCI board a platform device only because
it hangs off the PCI link.
>
>> Then, how can I get now this value? Is there some function to
>> call? How can I perform this operation?
>
> Probably irq_alloc_virt()...
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: External Interrupt
2008-02-01 15:15 ` Marco Stornelli
@ 2008-02-01 15:35 ` Sergei Shtylyov
2008-02-01 16:22 ` Marco Stornelli
0 siblings, 1 reply; 10+ messages in thread
From: Sergei Shtylyov @ 2008-02-01 15:35 UTC (permalink / raw)
To: Marco Stornelli; +Cc: Linuxppc Embedded Mailing List
Marco Stornelli wrote:
>>>I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a
>>>driver for a device connected with the local bus. This device has an
>>>external interrupt. In the local bus driver I have used the macro
>>>MPC85xx_IRQ_EXT<X> to get the interrupt number and pass it to the
>>>driver and after that register the ISR. Now with a kernel 2.6.21 this
>>>macro isn't available because in the header file irq.h there is the
>>>option CONFIG_PPC_MERGE that disable those options. I think this
>>>problem is related to the migration of ppc code towards powerpc. I
>>>know that now there is the new device tree source file where I can add
>>>a device and its interrupt number but I think in this file I should
>>>describe only the platform device, and this device is not a platform
>>>device.
>> How comes that it's not platform device if it hangs off the local bus?
> In SoC system generally the platform device are (more or less) the
> microprocessor controller like i2c, pci, local bus itself and so on.
That's SoC devices but the notion of the platform device is not limited to
SoC device only, rather to all the on-board devices.
> I think is like if you consider a PCI board a platform device only because
> it hangs off the PCI link.
No. PCI devices are detectable/configurable by kernel -- even if they are
on-board chips, they can be found by PCI bus scan (and finally presented as
the device nodes as well), while local bus devices (most probably) not. An
example (that comes to mind) of a device hanging off the local bus and yet
described by the device tree are the flash chips.
WBR, Sergei
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: External Interrupt
2008-02-01 15:35 ` Sergei Shtylyov
@ 2008-02-01 16:22 ` Marco Stornelli
2008-02-01 19:43 ` Scott Wood
0 siblings, 1 reply; 10+ messages in thread
From: Marco Stornelli @ 2008-02-01 16:22 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Linuxppc Embedded Mailing List
Sergei Shtylyov ha scritto:
> Marco Stornelli wrote:
>
>>>> I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a
>>>> driver for a device connected with the local bus. This device has an
>>>> external interrupt. In the local bus driver I have used the macro
>>>> MPC85xx_IRQ_EXT<X> to get the interrupt number and pass it to the
>>>> driver and after that register the ISR. Now with a kernel 2.6.21 this
>>>> macro isn't available because in the header file irq.h there is the
>>>> option CONFIG_PPC_MERGE that disable those options. I think this
>>>> problem is related to the migration of ppc code towards powerpc. I
>>>> know that now there is the new device tree source file where I can add
>>>> a device and its interrupt number but I think in this file I should
>>>> describe only the platform device, and this device is not a platform
>>>> device.
>
>>> How comes that it's not platform device if it hangs off the local bus?
>
>> In SoC system generally the platform device are (more or less) the
>> microprocessor controller like i2c, pci, local bus itself and so on.
>
> That's SoC devices but the notion of the platform device is not limited to
> SoC device only, rather to all the on-board devices.
>
>> I think is like if you consider a PCI board a platform device only because
>> it hangs off the PCI link.
>
> No. PCI devices are detectable/configurable by kernel -- even if they are
> on-board chips, they can be found by PCI bus scan (and finally presented as
> the device nodes as well), while local bus devices (most probably) not. An
> example (that comes to mind) of a device hanging off the local bus and yet
> described by the device tree are the flash chips.
Yes you are right. The local bus is like i2c, but I've never seen a
device connected with i2c and described with a sub-node of i2c node in
the dts file, however I think it's only philosophy, the most important
thing is that there is a way to get the irq number :)
Thanks for your response.
Regards.
Marco
>
> WBR, Sergei
>
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: External Interrupt
2008-02-01 16:22 ` Marco Stornelli
@ 2008-02-01 19:43 ` Scott Wood
2008-02-01 19:55 ` Jon Loeliger
0 siblings, 1 reply; 10+ messages in thread
From: Scott Wood @ 2008-02-01 19:43 UTC (permalink / raw)
To: Marco Stornelli; +Cc: Linuxppc Embedded Mailing List
Marco Stornelli wrote:
> Yes you are right. The local bus is like i2c, but I've never seen a
> device connected with i2c and described with a sub-node of i2c node in
> the dts file,
Grep the dts directory for "rtc@68".
-Scott
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: External Interrupt
2008-02-01 19:43 ` Scott Wood
@ 2008-02-01 19:55 ` Jon Loeliger
0 siblings, 0 replies; 10+ messages in thread
From: Jon Loeliger @ 2008-02-01 19:55 UTC (permalink / raw)
To: Scott Wood; +Cc: Marco Stornelli, Linuxppc Embedded Mailing List
On Fri, 2008-02-01 at 13:43, Scott Wood wrote:
> Marco Stornelli wrote:
> > Yes you are right. The local bus is like i2c, but I've never seen a
> > device connected with i2c and described with a sub-node of i2c node in
> > the dts file,
>
> Grep the dts directory for "rtc@68".
But be sure to inspect /dts-v1/-ness too.
Yes, yes, yes. I have a typo fix coming... :-)
jdl
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: External Interrupt
2008-02-01 8:11 External Interrupt Marco Stornelli
2008-02-01 14:28 ` Sergei Shtylyov
@ 2008-02-01 14:29 ` Sergei Shtylyov
2008-02-01 14:52 ` AW: " Lehmann, Hans (Ritter Elektronik)
2 siblings, 0 replies; 10+ messages in thread
From: Sergei Shtylyov @ 2008-02-01 14:29 UTC (permalink / raw)
To: Marco Stornelli; +Cc: Linuxppc Embedded Mailing List
Hello.
Marco Stornelli wrote:
> I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a
> driver for a device connected with the local bus. This device has an
> external interrupt. In the local bus driver I have used the macro
> MPC85xx_IRQ_EXT<X> to get the interrupt number and pass it to the
> driver and after that register the ISR. Now with a kernel 2.6.21 this
> macro isn't available because in the header file irq.h there is the
> option CONFIG_PPC_MERGE that disable those options. I think this
> problem is related to the migration of ppc code towards powerpc. I
> know that now there is the new device tree source file where I can add
> a device and its interrupt number but I think in this file I should
> describe only the platform device, and this device is not a platform
> device.
How comes that it's not platform device if it hangs off the local bus?
> Then, how can I get now this value? Is there some function to
> call? How can I perform this operation?
Probably irq_alloc_virt()...
WBR, Sergei
^ permalink raw reply [flat|nested] 10+ messages in thread* AW: External Interrupt
2008-02-01 8:11 External Interrupt Marco Stornelli
2008-02-01 14:28 ` Sergei Shtylyov
2008-02-01 14:29 ` Sergei Shtylyov
@ 2008-02-01 14:52 ` Lehmann, Hans (Ritter Elektronik)
2 siblings, 0 replies; 10+ messages in thread
From: Lehmann, Hans (Ritter Elektronik) @ 2008-02-01 14:52 UTC (permalink / raw)
To: Marco Stornelli; +Cc: linuxppc-embedded
Marco,
ASFAIK there where some changes and you have to get the irq with =
irq_create_mapping() or irq_of_parse_and_map()
Kindly regards
Hans
=20
Mit freundlichen Gr=FC=DFen
Hans Lehmann
Dipl.-Ing. Elektrotechnik
RITTER Elektronik GmbH
Leverkuser Strasse 65
D-42897 Remscheid
Tel. +49 (0) 2191 - 67 32 40
Fax +49 (0) 2191 - 67 14 29
Email hans.lehmann@ritter-elektronik.de
Homepage www.ritter-elektronik.de
Gesch=E4ftsf=FChrer: Manfred A. Wagner, Dr. Uwe Baader
Sitz der Gesellschaft: Oberhausen
HRB 17168 Duisburg USt-ID DE 814009849
-----Urspr=FCngliche Nachricht-----
Von: =
linuxppc-embedded-bounces+hans.lehmann=3Dritter-elektronik.de@ozlabs.org =
[mailto:linuxppc-embedded-bounces+hans.lehmann=3Dritter-elektronik.de@ozl=
abs.org] Im Auftrag von Marco Stornelli
Gesendet: Freitag, 1. Februar 2008 09:11
An: Linuxppc Embedded Mailing List
Betreff: External Interrupt
Hi,
I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a =
driver for a device connected with the local bus. This device has an =
external interrupt. In the local bus driver I have used the macro =
MPC85xx_IRQ_EXT<X> to get the interrupt number and pass it to the driver =
and after that register the ISR. Now with a kernel 2.6.21 this macro =
isn't available because in the header file irq.h there is the option =
CONFIG_PPC_MERGE that disable those options. I think this problem is =
related to the migration of ppc code towards powerpc. I know that now =
there is the new device tree source file where I can add a device and =
its interrupt number but I think in this file I should describe only =
the platform device, and this device is not a platform device. Then, how =
can I get now this value? Is there some function to call? How can I =
perform this operation?
Thanks in advance.
Marco
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply [flat|nested] 10+ messages in thread
* External Interrupt
@ 2008-01-30 13:31 Marco Stornelli
0 siblings, 0 replies; 10+ messages in thread
From: Marco Stornelli @ 2008-01-30 13:31 UTC (permalink / raw)
To: LinuxPPC-Dev Mailing List
Hi all,
I used the linux kernel 2.6.10 with a processor MPC8548E. I wrote a
driver for a device connected with the local bus. This device has an
external interrupt. In the local bus driver I have used the macro
MPC85xx_IRQ_EXT<X> to get the interrupt number and pass it to the driver
and after that register the ISR. Now with a kernel 2.6.21 this macro
isn't available because in the header file irq.h there is the option
CONFIG_PPC_MERGE that disable those options. I think this problem is
related to the migration of ppc code towards powerpc. I know that now
there is the new device tree source file but I think in this file I
should describe only the platform device, and this device is not a
platform device. Then, how can I get now this value? Is there some
function to call?
Thanks in advance.
Marco
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-02-01 19:56 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 8:11 External Interrupt Marco Stornelli
2008-02-01 14:28 ` Sergei Shtylyov
2008-02-01 15:15 ` Marco Stornelli
2008-02-01 15:35 ` Sergei Shtylyov
2008-02-01 16:22 ` Marco Stornelli
2008-02-01 19:43 ` Scott Wood
2008-02-01 19:55 ` Jon Loeliger
2008-02-01 14:29 ` Sergei Shtylyov
2008-02-01 14:52 ` AW: " Lehmann, Hans (Ritter Elektronik)
-- strict thread matches above, loose matches on Subject: below --
2008-01-30 13:31 Marco Stornelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).