linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Query about include/linux/mailbox.h
@ 2013-08-31  4:57 Craig McGeachie
  2013-08-31  5:33 ` Jassi Brar
  0 siblings, 1 reply; 6+ messages in thread
From: Craig McGeachie @ 2013-08-31  4:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

At the end of all this, my question is should I put the BCM2835 mailbox 
driver in drivers somewhere, and try to make use of 
include/linux/mailbox.h, or should go with the view that mailbox drivers 
are inherently machine specific, have no common driver framework, and 
belongs in arch/arm/mach-bcm2835?

The background to this is that I'm trying to help bring Raspberry Pi 
support into the mainline kernel. Lubomir Rintel coded a mailbox driver 
[1] that I liked the look off and want to fix up and push upstream. 
Stephen Warren suggested that Lubmir's patch had the benefit of using a 
new mailbox sub-system [2] and that I should have a look at that.

I've looked at include/linux/mailbox.h, and it only has 3 function 
declarations, which are all specific to the PL320.  Unless there is 
something I've missed, then there is no mailbox sub-system to speak of. 
  Just a header file that will quickly a dependency nightmare.

I found a patch submission series from Jassi Brar [3] that looks like 
the start of an actual mailbox framework, but there is no indication of 
it in the current kernel source.  I assume it was dropped for some reason.

I don't see much benefit to a mailbox sub-system.  The BCM2835 one is 
quite a small piece of code, and I really see it as a machine-specific 
layer for other device drivers that implement a standard sub-system 
interface, like framebuffers.

Which all leads back to my opening question - which way do I jump? What 
I'd prefer to do is submit arch/arm/mach-bcm2835.c etc, and maybe even a 
patch to move include/linux/mailbox.h somewhere less inviting.

Cheers,
Craig.


[1] 
http://lists.infradead.org/pipermail/linux-rpi-kernel/2013-April/000528.html
[2] 
http://lists.infradead.org/pipermail/linux-rpi-kernel/2013-May/000546.html
[3] http://lkml.indiana.edu/hypermail/linux/kernel/1305.0/01978.html

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

* Query about include/linux/mailbox.h
  2013-08-31  4:57 Query about include/linux/mailbox.h Craig McGeachie
@ 2013-08-31  5:33 ` Jassi Brar
  2013-08-31 11:19   ` Craig McGeachie
  0 siblings, 1 reply; 6+ messages in thread
From: Jassi Brar @ 2013-08-31  5:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Aug 31, 2013 at 10:27 AM, Craig McGeachie <slapdau@yahoo.com.au> wrote:
>
> Hello,
>
> At the end of all this, my question is should I put the BCM2835 mailbox driver in drivers somewhere, and try to make use of include/linux/mailbox.h, or should go with the view that mailbox drivers are inherently machine specific, have no common driver framework, and belongs in arch/arm/mach-bcm2835?
>
> The background to this is that I'm trying to help bring Raspberry Pi support into the mainline kernel. Lubomir Rintel coded a mailbox driver [1] that I liked the look off and want to fix up and push upstream. Stephen Warren suggested that Lubmir's patch had the benefit of using a new mailbox sub-system [2] and that I should have a look at that.
>
> I've looked at include/linux/mailbox.h, and it only has 3 function declarations, which are all specific to the PL320.  Unless there is something I've missed, then there is no mailbox sub-system to speak of.  Just a header file that will quickly a dependency nightmare.
>
> I found a patch submission series from Jassi Brar [3] that looks like the start of an actual mailbox framework, but there is no indication of it in the current kernel source.  I assume it was dropped for some reason.
>
It wasn't dropped.
Just the development was taken offline by the three of us I (for
Fujitsu), Suman Anna (for TI) and Loic (for STE).  Later we were
joined by LF.Tan (for Intel). Please join us.
 https://github.com/sumananna/mailbox/commits/jassiv3-3.10-omap should
be good to base on.

Thanks,
Jassi

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

* Query about include/linux/mailbox.h
  2013-08-31  5:33 ` Jassi Brar
@ 2013-08-31 11:19   ` Craig McGeachie
  2013-08-31 13:39     ` Jassi Brar
  0 siblings, 1 reply; 6+ messages in thread
From: Craig McGeachie @ 2013-08-31 11:19 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/31/2013 05:33 PM, Jassi Brar wrote:
> It wasn't dropped.
> Just the development was taken offline by the three of us I (for
> Fujitsu), Suman Anna (for TI) and Loic (for STE).  Later we were
> joined by LF.Tan (for Intel). Please join us.
>   https://github.com/sumananna/mailbox/commits/jassiv3-3.10-omap should
> be good to base on.

So, this would be a good place to start?

https://github.com/sumananna/mailbox/commit/635c24eba19f67d1eb1ef7e7447f319c850b01e5#drivers/mailbox

See if I can get my head around that framework and what it does, and try 
fitting the BCM2835 mailbox into it?

Cheers,
Craig.

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

* Query about include/linux/mailbox.h
  2013-08-31 11:19   ` Craig McGeachie
@ 2013-08-31 13:39     ` Jassi Brar
  2013-09-01  8:53       ` Craig McGeachie
  2013-09-06  8:48       ` Craig McGeachie
  0 siblings, 2 replies; 6+ messages in thread
From: Jassi Brar @ 2013-08-31 13:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Aug 31, 2013 at 4:49 PM, Craig McGeachie <slapdau@yahoo.com.au> wrote:
> On 08/31/2013 05:33 PM, Jassi Brar wrote:
>>
>> It wasn't dropped.
>> Just the development was taken offline by the three of us I (for
>> Fujitsu), Suman Anna (for TI) and Loic (for STE).  Later we were
>> joined by LF.Tan (for Intel). Please join us.
>>   https://github.com/sumananna/mailbox/commits/jassiv3-3.10-omap should
>> be good to base on.
>
>
> So, this would be a good place to start?
>
> https://github.com/sumananna/mailbox/commit/635c24eba19f67d1eb1ef7e7447f319c850b01e5#drivers/mailbox
>
> See if I can get my head around that framework and what it does, and try
> fitting the BCM2835 mailbox into it?
>
Yes. If you point me to your mailbox client drivers, I could also give
it a look to see if we need some changes.

Regards
Jassi

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

* Query about include/linux/mailbox.h
  2013-08-31 13:39     ` Jassi Brar
@ 2013-09-01  8:53       ` Craig McGeachie
  2013-09-06  8:48       ` Craig McGeachie
  1 sibling, 0 replies; 6+ messages in thread
From: Craig McGeachie @ 2013-09-01  8:53 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/01/2013 01:39 AM, Jassi Brar wrote:
> Yes. If you point me to your mailbox client drivers, I could also give
> it a look to see if we need some changes.

This should be a reasonably concise view of things.

https://github.com/rickytarr/linux/commit/a9b131c63c73c450a567eb5fa527e8919e71bfd8

There is no header for the BCM2835 mailbox.  At the point I started to 
add one, I learnt more about the multi-architecture approach to SoC 
code, and realised I'm going to have to rethink what I'm doing.

I don't think your code will need to change much, if at all.  I'll try 
applying your patches and see what happens.

Cheers,
Craig.

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

* Query about include/linux/mailbox.h
  2013-08-31 13:39     ` Jassi Brar
  2013-09-01  8:53       ` Craig McGeachie
@ 2013-09-06  8:48       ` Craig McGeachie
  1 sibling, 0 replies; 6+ messages in thread
From: Craig McGeachie @ 2013-09-06  8:48 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/01/2013 01:39 AM, Jassi Brar wrote:
>> See if I can get my head around that framework and what it does, and try
>> fitting the BCM2835 mailbox into it?
>>
> Yes. If you point me to your mailbox client drivers, I could also give
> it a look to see if we need some changes.

Righty ho. This seems to be a reasonable attempt.

https://github.com/rickytarr/linux/tree/subsys-mailbox
https://github.com/rickytarr/linux/commit/e0c25371581d125e3f6a46f452ce3e95f1d267ee

It compiles cleanly and boots.  Start with bcm2835_defconfig, and then 
enable Device Drivers -> Mailbox Hardware Support -> BCM 2835 Mailbox. I 
think it validates that BCM2835 mailbox support can fit into your 
generic device.

But that's as far as I know.  I'm offering this as an early look only 
(comments and defects welcome). I've got to build something that uses it 
next.  For all I know it might cause the Raspberry Pi to explode and 
vaporise any desk it is sitting on.

Out of interest, do you have a roadmap for moving this into the kernel 
mainline?

Cheers,
Craig.

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

end of thread, other threads:[~2013-09-06  8:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-31  4:57 Query about include/linux/mailbox.h Craig McGeachie
2013-08-31  5:33 ` Jassi Brar
2013-08-31 11:19   ` Craig McGeachie
2013-08-31 13:39     ` Jassi Brar
2013-09-01  8:53       ` Craig McGeachie
2013-09-06  8:48       ` Craig McGeachie

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).