lkml.org 
[lkml]   [2010]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [UIO] SMX UIO interface
From
Date

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
>



\
 
 \ /
  Last update: 2010-09-02 01:47    [W:0.126 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site