Re: mailbox_mach dependency problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 2, 2010 at 6:59 PM, Felipe Balbi <me@xxxxxxxxxxxxxxx> wrote:
> On Sun, May 02, 2010 at 03:57:42PM +0300, Felipe Contreras wrote:
>> Indeed, that was my understanding, but the mailbox doesn't seem to be
>> designed that way. Apparently the driver has an internal linked list
>> of mailboxes, and the platform device registers a bunch of them.
>> Effectively they need each other.
>
> you could make it the other way around. For each registered
> platform_device you instantiate one mailbox and add it to the list on
> the fly, you would probably like to use a list_head for that also
> instead of having your own list implementation.
>
> if you do that, you leave the mbox "instantiation" up to the
> platform_device code. You would simply register several omap-mbox with a
> different id for each mbox you need. Then the name could be sent using a
> well-defined platform_data. Just a suggestion.

First, this is not my code (sounds like you are assuming so).

Now, I thought on doing something like what you suggest, but since I
haven't done anything like it, I thought on asking for ideas just so I
don't end up doing something stupid.

Making multiple platform_device sounds appealing, but the problem is
that there's no 1-to-1 mapping from resources to mailboxes. For
example, all mailboxes seem to share the same memory, and some
mailboxes use the same irq. I don't know if multiple platform_devices
can share the same resources.

What I ended up doing is store all the mailboxes in the platform data.
I didn't know how to store an array of pointers in the pdata, so I
created my own structure for that:
http://article.gmane.org/gmane.linux.ports.arm.omap/34916

You can check the whole patch series here:
http://thread.gmane.org/gmane.linux.ports.arm.omap/34912

Thanks for the comments. Cheers.

-- 
Felipe Contreras
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux