lkml.org 
[lkml]   [2010]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [UIO] SMX UIO interface
  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/
>



\
 
 \ /
  Last update: 2010-09-03 10:39    [W:0.043 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site