All of lore.kernel.org
 help / color / mirror / Atom feed
* [UIO]  SMX UIO interface
@ 2010-09-01  7:22 Armin Steinhoff
  2010-09-01 23:33 ` Ben Nizette
  0 siblings, 1 reply; 7+ messages in thread
From: Armin Steinhoff @ 2010-09-01  7:22 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: bn

  Hi Ben,

I have a question about the SMX UIO Interface.

In the SMX module you are reading the data of the platform resourses:

     regs = platform_get_resource(dev, IORESOURCE_MEM, 0);
     if (!regs) {
         dev_err(&dev->dev, "No memory resource specified\n");
         goto out_free;
     }

But who sets these data initially ?

Cheers

--Armin


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [UIO]  SMX UIO interface
  2010-09-01  7:22 [UIO] SMX UIO interface Armin Steinhoff
@ 2010-09-01 23:33 ` Ben Nizette
  2010-09-02 10:13   ` Armin Steinhoff
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Nizette @ 2010-09-01 23:33 UTC (permalink / raw)
  To: Armin Steinhoff; +Cc: Linux Kernel Mailing List


On 01/09/2010, at 5:22 PM, Armin Steinhoff wrote:

> Hi Ben,
> 
> I have a question about the SMX UIO Interface.
> 
> In the SMX module you are reading the data of the platform resourses:
> 
>    regs = platform_get_resource(dev, IORESOURCE_MEM, 0);
>    if (!regs) {
>        dev_err(&dev->dev, "No memory resource specified\n");
>        goto out_free;
>    }
> 
> But who sets these data initially ?

Who ever sets up the platform device that will bind to this driver, usually the board code (eg on avr32 arch/avr32/boards/*/setup.c, ARM is somewhere under arch/arm/mach-*/ I think).

The board code would create an array of struct resource with the appropriate memory regions and an IRQ entry, create a struct platform_device with the right content to bind to that driver, set the platform_device .resource field to the previously created array then call platform_device_register() to kick things off.

	--Ben.

> 
> Cheers
> 
> --Armin
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [UIO]  SMX UIO interface
  2010-09-01 23:33 ` Ben Nizette
@ 2010-09-02 10:13   ` Armin Steinhoff
  2010-09-02 11:45     ` Ben Nizette
  0 siblings, 1 reply; 7+ messages in thread
From: Armin Steinhoff @ 2010-09-02 10:13 UTC (permalink / raw)
  To: Ben Nizette; +Cc: Linux Kernel Mailing List

  Ben Nizette wrote:
> On 01/09/2010, at 5:22 PM, Armin Steinhoff wrote:
>
>> Hi Ben,
>>
>> I have a question about the SMX UIO Interface.
>>
>> In the SMX module you are reading the data of the platform resourses:
>>
>>     regs = platform_get_resource(dev, IORESOURCE_MEM, 0);
>>     if (!regs) {
>>         dev_err(&dev->dev, "No memory resource specified\n");
>>         goto out_free;
>>     }
>>
>> But who sets these data initially ?
> Who ever sets up the platform device that will bind to this driver, usually the board code (eg on avr32 arch/avr32/boards/*/setup.c, ARM is somewhere under arch/arm/mach-*/ I think).
>
> The board code would create an array of struct resource with the appropriate memory regions and an IRQ entry, create a struct platform_device with the right content to bind to that driver, set the platform_device .resource field to the previously created array then call platform_device_register() to kick things off.
>

   That means there is additionally an individual driver of the board 
and the UIO interface is just for open up the hardware interfaces ?

   Thanks

--Armin


> 	--Ben.
>
>> Cheers
>>
>> --Armin
>>
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [UIO]  SMX UIO interface
  2010-09-02 10:13   ` Armin Steinhoff
@ 2010-09-02 11:45     ` Ben Nizette
  2010-09-03  8:36       ` Armin Steinhoff
                         ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Ben Nizette @ 2010-09-02 11:45 UTC (permalink / raw)
  To: Armin Steinhoff; +Cc: Linux Kernel Mailing List


On 02/09/2010, at 8:13 PM, Armin Steinhoff wrote:

> Ben Nizette wrote:
>> On 01/09/2010, at 5:22 PM, Armin Steinhoff wrote:
>> 
>>> Hi Ben,
>>> 
>>> I have a question about the SMX UIO Interface.
>>> 
>>> In the SMX module you are reading the data of the platform resourses:
>>> 
>>>    regs = platform_get_resource(dev, IORESOURCE_MEM, 0);
>>>    if (!regs) {
>>>        dev_err(&dev->dev, "No memory resource specified\n");
>>>        goto out_free;
>>>    }
>>> 
>>> But who sets these data initially ?
>> Who ever sets up the platform device that will bind to this driver, usually the board code (eg on avr32 arch/avr32/boards/*/setup.c, ARM is somewhere under arch/arm/mach-*/ I think).
>> 
>> The board code would create an array of struct resource with the appropriate memory regions and an IRQ entry, create a struct platform_device with the right content to bind to that driver, set the platform_device .resource field to the previously created array then call platform_device_register() to kick things off.
>> 
> 
>  That means there is additionally an individual driver of the board and the UIO interface is just for open up the hardware interfaces ?

Um, sort of, I guess.. :-)

The board code isn't a driver, it's just code that gets run at startup whose job is to register all the devices on the board.  If your board only contains probe-able busses then you might not need any board code at all but if you've got busses which can't be automatically discovered then something else needs to tell the kernel what devices are where.

Maybe a good place to start would be to read up a bit more on the Linux device model and look through some example board code, you'll probably learn more than me just answering small bits like this :-)

	--Ben.

> 
>  Thanks
> 
> --Armin
> 
> 
>> 	--Ben.
>> 
>>> Cheers
>>> 
>>> --Armin
>>> 
>> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [UIO]  SMX UIO interface
  2010-09-02 11:45     ` Ben Nizette
@ 2010-09-03  8:36       ` Armin Steinhoff
  2010-09-04 14:22       ` [ISA bus] or platform bus ? Armin Steinhoff
  2010-09-05 18:39       ` [PC/104 interrupt bug] Fedora 13 problem Armin Steinhoff
  2 siblings, 0 replies; 7+ messages in thread
From: Armin Steinhoff @ 2010-09-03  8:36 UTC (permalink / raw)
  To: Ben Nizette; +Cc: Linux Kernel Mailing List

  Ben Nizette wrote:
> On 02/09/2010, at 8:13 PM, Armin Steinhoff wrote:
>
>> Ben Nizette wrote:
>>> On 01/09/2010, at 5:22 PM, Armin Steinhoff wrote:
>>>
>>>> Hi Ben,
>>>>
>>>> I have a question about the SMX UIO Interface.
>>>>
>>>> In the SMX module you are reading the data of the platform resourses:
>>>>
>>>>     regs = platform_get_resource(dev, IORESOURCE_MEM, 0);
>>>>     if (!regs) {
>>>>         dev_err(&dev->dev, "No memory resource specified\n");
>>>>         goto out_free;
>>>>     }
>>>>
>>>> But who sets these data initially ?
>>> Who ever sets up the platform device that will bind to this driver, usually the board code (eg on avr32 arch/avr32/boards/*/setup.c, ARM is somewhere under arch/arm/mach-*/ I think).
>>>
>>> The board code would create an array of struct resource with the appropriate memory regions and an IRQ entry, create a struct platform_device with the right content to bind to that driver, set the platform_device .resource field to the previously created array then call platform_device_register() to kick things off.
>>>
>>   That means there is additionally an individual driver of the board and the UIO interface is just for open up the hardware interfaces ?
> Um, sort of, I guess.. :-)
>
> The board code isn't a driver, it's just code that gets run at startup whose job is to register all the devices on the board.  If your board only contains probe-able busses then you might not need any board code at all but if you've got busses which can't be automatically discovered then something else needs to tell the kernel what devices are where.
>
> Maybe a good place to start would be to read up a bit more on the Linux device model and look through some example board code, you'll probably learn more than me just answering small bits like this :-)

   Yes, you are right.  I'm currently learning a lot about the Linux 
driver model ... it's a real jungle :)

    Thanks for your small bits and bytes

--Armin




> 	--Ben.
>
>>   Thanks
>>
>> --Armin
>>
>>
>>> 	--Ben.
>>>
>>>> Cheers
>>>>
>>>> --Armin
>>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [ISA bus] or platform bus ?
  2010-09-02 11:45     ` Ben Nizette
  2010-09-03  8:36       ` Armin Steinhoff
@ 2010-09-04 14:22       ` Armin Steinhoff
  2010-09-05 18:39       ` [PC/104 interrupt bug] Fedora 13 problem Armin Steinhoff
  2 siblings, 0 replies; 7+ messages in thread
From: Armin Steinhoff @ 2010-09-04 14:22 UTC (permalink / raw)
  To: Linux Kernel Mailing List


Hi,

I have developed a UIO based driver using the platform bus. The target 
device is an ISA bus board.

Can an ISA bus board create interrupts for a device based on the 
platform bus ?

I don't see any interrupts. The hardware and BIOS settings are OK .. was 
verified on an other OS.

--Armin




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PC/104 interrupt bug] Fedora 13 problem
  2010-09-02 11:45     ` Ben Nizette
  2010-09-03  8:36       ` Armin Steinhoff
  2010-09-04 14:22       ` [ISA bus] or platform bus ? Armin Steinhoff
@ 2010-09-05 18:39       ` Armin Steinhoff
  2 siblings, 0 replies; 7+ messages in thread
From: Armin Steinhoff @ 2010-09-05 18:39 UTC (permalink / raw)
  To: Linux Kernel Mailing List


Hi,

I'm developing a driver for a PC/104 board and see that the flag  
IRQF_TRIGGER_RISING has no effect with
a request_irq() call.

The related interrupt pin of the PIC / APIC isn't after the 
request_irq() call reconfigured for handling of an ISA interrupt !
The ISA interrupt is connected to a pull down resistor ... which leads 
to a catastrophic crash when that ISA interrupt line is handled as a PCI 
interrupt line.

Is this by design - that means no ISA interrupt supported -  or is it a 
bug ?

--Armin




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-05 18:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-01  7:22 [UIO] SMX UIO interface Armin Steinhoff
2010-09-01 23:33 ` Ben Nizette
2010-09-02 10:13   ` Armin Steinhoff
2010-09-02 11:45     ` Ben Nizette
2010-09-03  8:36       ` Armin Steinhoff
2010-09-04 14:22       ` [ISA bus] or platform bus ? Armin Steinhoff
2010-09-05 18:39       ` [PC/104 interrupt bug] Fedora 13 problem Armin Steinhoff

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.