Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-23 Thread Lee Jones
On Thu, 19 Mar 2015, Jassi Brar wrote: > On Thu, Mar 19, 2015 at 2:47 PM, Lee Jones wrote: > > On Thu, 19 Mar 2015, Jassi Brar wrote: > > > >> On Wed, Mar 18, 2015 at 9:04 PM, Lee Jones wrote: > >> > On Wed, 18 Mar 2015, Jassi Brar wrote: > >> > > >> >> On Wed, Mar 18, 2015 at 6:47 PM, Lee

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-23 Thread Lee Jones
On Thu, 19 Mar 2015, Jassi Brar wrote: On Thu, Mar 19, 2015 at 2:47 PM, Lee Jones lee.jo...@linaro.org wrote: On Thu, 19 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 9:04 PM, Lee Jones lee.jo...@linaro.org wrote: On Wed, 18 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-19 Thread Jassi Brar
On Thu, Mar 19, 2015 at 3:27 PM, Lee Jones wrote: > On Thu, 19 Mar 2015, Jassi Brar wrote: > >> And also no header that's included by exactly one file. > > So you also want me to drag in all of the controller structs into the > driver? > Yes, please. Why have structures, internal to a code, in a

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-19 Thread Jassi Brar
On Thu, Mar 19, 2015 at 2:47 PM, Lee Jones wrote: > On Thu, 19 Mar 2015, Jassi Brar wrote: > >> On Wed, Mar 18, 2015 at 9:04 PM, Lee Jones wrote: >> > On Wed, 18 Mar 2015, Jassi Brar wrote: >> > >> >> On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones wrote: >> >> > On Tue, 03 Mar 2015, Jassi Brar

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-19 Thread Lee Jones
On Thu, 19 Mar 2015, Jassi Brar wrote: > On Wed, Mar 18, 2015 at 8:56 PM, Lee Jones wrote: > > On Wed, 18 Mar 2015, Jassi Brar wrote: > > >> >> > + mbox->irq = > >> >> > irq_create_mapping(mbinst->irq_domain, > >> >> > +

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-19 Thread Lee Jones
On Thu, 19 Mar 2015, Jassi Brar wrote: > On Wed, Mar 18, 2015 at 9:04 PM, Lee Jones wrote: > > On Wed, 18 Mar 2015, Jassi Brar wrote: > > > >> On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones wrote: > >> > On Tue, 03 Mar 2015, Jassi Brar wrote: > >> > > >> >> On 3 March 2015 at 17:04, Arnd Bergmann

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-19 Thread Lee Jones
On Thu, 19 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 9:04 PM, Lee Jones lee.jo...@linaro.org wrote: On Wed, 18 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones lee.jo...@linaro.org wrote: On Tue, 03 Mar 2015, Jassi Brar wrote: On 3 March 2015 at

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-19 Thread Lee Jones
On Thu, 19 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 8:56 PM, Lee Jones lee.jo...@linaro.org wrote: On Wed, 18 Mar 2015, Jassi Brar wrote: + mbox-irq = irq_create_mapping(mbinst-irq_domain, +

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-19 Thread Jassi Brar
On Thu, Mar 19, 2015 at 3:27 PM, Lee Jones lee.jo...@linaro.org wrote: On Thu, 19 Mar 2015, Jassi Brar wrote: And also no header that's included by exactly one file. So you also want me to drag in all of the controller structs into the driver? Yes, please. Why have structures, internal to a

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-19 Thread Jassi Brar
On Thu, Mar 19, 2015 at 2:47 PM, Lee Jones lee.jo...@linaro.org wrote: On Thu, 19 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 9:04 PM, Lee Jones lee.jo...@linaro.org wrote: On Wed, 18 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones lee.jo...@linaro.org

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Jassi Brar
On Wed, Mar 18, 2015 at 9:04 PM, Lee Jones wrote: > On Wed, 18 Mar 2015, Jassi Brar wrote: > >> On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones wrote: >> > On Tue, 03 Mar 2015, Jassi Brar wrote: >> > >> >> On 3 March 2015 at 17:04, Arnd Bergmann wrote: >> >> > On Tuesday 03 March 2015 10:41:23 Lee

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Jassi Brar
On Wed, Mar 18, 2015 at 8:56 PM, Lee Jones wrote: > On Wed, 18 Mar 2015, Jassi Brar wrote: >> >> > + mbox->irq = >> >> > irq_create_mapping(mbinst->irq_domain, >> >> > + mbox->rx_id); >> >> > >> >> simply assigning same

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Lee Jones
On Wed, 18 Mar 2015, Jassi Brar wrote: > On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones wrote: > > On Tue, 03 Mar 2015, Jassi Brar wrote: > > > >> On 3 March 2015 at 17:04, Arnd Bergmann wrote: > >> > On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: > >> >> + > >> >> +/* > >> >> + * struct

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Lee Jones
On Wed, 18 Mar 2015, Jassi Brar wrote: > On Wed, Mar 18, 2015 at 6:42 PM, Lee Jones wrote: > > On Wed, 04 Mar 2015, Jassi Brar wrote: > > > >> > + > >> > + if ((!data) || (!sti_mbox_chan_is_tx(mbox))) > >> > > >> nit: too much protection. > > > > What makes you think that? > > > Usually we

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Jassi Brar
On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones wrote: > On Tue, 03 Mar 2015, Jassi Brar wrote: > >> On 3 March 2015 at 17:04, Arnd Bergmann wrote: >> > On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: >> >> + >> >> +/* >> >> + * struct sti_mbox_msg - sti mailbox message description >> >> + *

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Jassi Brar
On Wed, Mar 18, 2015 at 6:42 PM, Lee Jones wrote: > On Wed, 04 Mar 2015, Jassi Brar wrote: > >> > + >> > + if ((!data) || (!sti_mbox_chan_is_tx(mbox))) >> > >> nit: too much protection. > > What makes you think that? > Usually we write if (!data ||

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Lee Jones
On Tue, 03 Mar 2015, Jassi Brar wrote: > On 3 March 2015 at 17:04, Arnd Bergmann wrote: > > On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: > >> + > >> +/* > >> + * struct sti_mbox_msg - sti mailbox message description > >> + * @dsize: data payload size > >> + * @pdata:

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Lee Jones
On Wed, 04 Mar 2015, Jassi Brar wrote: > On 3 March 2015 at 16:11, Lee Jones wrote: > > > --- > > drivers/mailbox/Kconfig | 7 + > > drivers/mailbox/Makefile | 2 + > > drivers/mailbox/mailbox-sti.c | 664 > > ++ > >

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Jassi Brar
On Wed, Mar 18, 2015 at 6:42 PM, Lee Jones lee.jo...@linaro.org wrote: On Wed, 04 Mar 2015, Jassi Brar wrote: + + if ((!data) || (!sti_mbox_chan_is_tx(mbox))) nit: too much protection. What makes you think that? Usually we write if (!data ||

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Jassi Brar
On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones lee.jo...@linaro.org wrote: On Tue, 03 Mar 2015, Jassi Brar wrote: On 3 March 2015 at 17:04, Arnd Bergmann a...@arndb.de wrote: On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: + +/* + * struct sti_mbox_msg - sti mailbox message description

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Lee Jones
On Tue, 03 Mar 2015, Jassi Brar wrote: On 3 March 2015 at 17:04, Arnd Bergmann a...@arndb.de wrote: On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: + +/* + * struct sti_mbox_msg - sti mailbox message description + * @dsize: data payload size + * @pdata:

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Lee Jones
On Wed, 04 Mar 2015, Jassi Brar wrote: On 3 March 2015 at 16:11, Lee Jones lee.jo...@linaro.org wrote: --- drivers/mailbox/Kconfig | 7 + drivers/mailbox/Makefile | 2 + drivers/mailbox/mailbox-sti.c | 664 ++

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Lee Jones
On Wed, 18 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 6:42 PM, Lee Jones lee.jo...@linaro.org wrote: On Wed, 04 Mar 2015, Jassi Brar wrote: + + if ((!data) || (!sti_mbox_chan_is_tx(mbox))) nit: too much protection. What makes you think that? Usually we write

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Lee Jones
On Wed, 18 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones lee.jo...@linaro.org wrote: On Tue, 03 Mar 2015, Jassi Brar wrote: On 3 March 2015 at 17:04, Arnd Bergmann a...@arndb.de wrote: On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: + +/* + * struct

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Jassi Brar
On Wed, Mar 18, 2015 at 8:56 PM, Lee Jones lee.jo...@linaro.org wrote: On Wed, 18 Mar 2015, Jassi Brar wrote: + mbox-irq = irq_create_mapping(mbinst-irq_domain, + mbox-rx_id); simply assigning same IRQ to

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-18 Thread Jassi Brar
On Wed, Mar 18, 2015 at 9:04 PM, Lee Jones lee.jo...@linaro.org wrote: On Wed, 18 Mar 2015, Jassi Brar wrote: On Wed, Mar 18, 2015 at 6:47 PM, Lee Jones lee.jo...@linaro.org wrote: On Tue, 03 Mar 2015, Jassi Brar wrote: On 3 March 2015 at 17:04, Arnd Bergmann a...@arndb.de wrote: On

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-04 Thread Jassi Brar
On 3 March 2015 at 16:11, Lee Jones wrote: > --- > drivers/mailbox/Kconfig | 7 + > drivers/mailbox/Makefile | 2 + > drivers/mailbox/mailbox-sti.c | 664 > ++ > include/linux/mailbox_sti.h | 128 > How about the header in

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-04 Thread Jassi Brar
On 3 March 2015 at 16:11, Lee Jones lee.jo...@linaro.org wrote: --- drivers/mailbox/Kconfig | 7 + drivers/mailbox/Makefile | 2 + drivers/mailbox/mailbox-sti.c | 664 ++ include/linux/mailbox_sti.h | 128 How about the

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-03 Thread Jassi Brar
On 3 March 2015 at 17:04, Arnd Bergmann wrote: > On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: >> + >> +/* >> + * struct sti_mbox_msg - sti mailbox message description >> + * @dsize: data payload size >> + * @pdata: message data payload >> + */ >> +struct sti_mbox_msg

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-03 Thread Arnd Bergmann
On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: > + > +/* > + * struct sti_mbox_msg - sti mailbox message description > + * @dsize: data payload size > + * @pdata: message data payload > + */ > +struct sti_mbox_msg { > + u32 dsize; > + u8

[PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-03 Thread Lee Jones
ST's platforms currently support a maximum of 5 channels, one for each of the co-processors situated on the platforms. The difficulty with this IP is the fact that there is only one RX IRQ, which requires some special handling within the driver. In this implementation channel 1, which is always

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-03 Thread Jassi Brar
On 3 March 2015 at 17:04, Arnd Bergmann a...@arndb.de wrote: On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: + +/* + * struct sti_mbox_msg - sti mailbox message description + * @dsize: data payload size + * @pdata: message data payload + */ +struct sti_mbox_msg {

[PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-03 Thread Lee Jones
ST's platforms currently support a maximum of 5 channels, one for each of the co-processors situated on the platforms. The difficulty with this IP is the fact that there is only one RX IRQ, which requires some special handling within the driver. In this implementation channel 1, which is always

Re: [PATCH 3/3] mailbox: Add support for ST's Mailbox IP

2015-03-03 Thread Arnd Bergmann
On Tuesday 03 March 2015 10:41:23 Lee Jones wrote: + +/* + * struct sti_mbox_msg - sti mailbox message description + * @dsize: data payload size + * @pdata: message data payload + */ +struct sti_mbox_msg { + u32 dsize; + u8