From: Loic PALLARDY <loic.pallardy@st.com>
To: "Bedia, Vaibhav" <vaibhav.bedia@ti.com>
Cc: Loic PALLARDY STE <loic.pallardy-ext@stericsson.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ohad Ben-Cohen <ohad@wizery.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Russell King <linux@arm.linux.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
Tony Lindgren <tony@atomide.com>,
Linus Walleij <linus.walleij@linaro.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
"Gutierrez, Juan" <jgutierrez@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Felipe Contreras <felipe.contreras@nokia.com>,
Dom Cobley <popcornmix@gmail.com>,
Wim Van Sebroeck <wim@iguana.be>,
Omar Ramirez Luna <omar.ramirez@copitl.com>,
Tejun Heo <tj@kernel.org>, "Anna, Suman" <s-anna@ti.com>,
STEricsson_nomadik_linux <STEricsson_nomadik_linux@list.st.com>,
"linux-arm-kernel@lists.infradead.org" <linux-arm-kern>
Subject: Re: [PATCH 4/9] mailbox: create opened message type
Date: Fri, 21 Dec 2012 11:50:01 +0100 [thread overview]
Message-ID: <50D43ED9.4030906@st.com> (raw)
In-Reply-To: <B5906170F1614E41A8A28DE3B8D121433EC9CE7A@DBDE01.ent.ti.com>
On 12/21/2012 11:28 AM, Bedia, Vaibhav wrote:
> On Tue, Dec 18, 2012 at 18:40:07, Loic Pallardy wrote:
>> - msg = mbox_read_reg(fifo->data);
>> - msg |= ((mbox_msg_t) mbox_read_reg(fifo->cmd))<< 16;
>> + msg->header = mbox_read_reg(fifo->data);
>> + msg->header |= ((mbox_msg_t) mbox_read_reg(fifo->cmd))<< 16;
>
> Now that struct mailbox_msg encapsulates the data, you can
> get rid of the mbox_msg_t typedef completely. Having the data
> as part of the mailbox_msg along with the functions with mbox_msg_t
> as the return type just creates confusion IMHO.
>
OK I'll clean up mbox_msg_t typedef.
>>
>> - return msg;
>> + return 0;
>> }
>
> Convert all return 0 functions to void?
>
> [...]
>
Yes, agree I'll change the prototype.
>>
>> +
>> +#define MAILBOX_FILL_HEADER_MSG(_msg, _header) \
>> + MAILBOX_FILL_MSG(_msg, _header, NULL, 0);
>> +
>
> I used these patches as part of the suspend-resume support for AM335x
> which has the same mailbox IP as OMAP4. I used the MAILBOX_FILL_HEADER_MSG
> helper and things work as expected.
Nice.
>
> However, I found the 'header' part to be very confusing. Why not treat the
> OMAP case as a special case of the new MAILBOX_FILL_MSG where the data size
> is set to 1?
Yes it is another possibility. Changes are not big.
Omar, what's your view on this point?
Regards,
Loic
>
> Regards,
> Vaibhav
WARNING: multiple messages have this Message-ID (diff)
From: loic.pallardy@st.com (Loic PALLARDY)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/9] mailbox: create opened message type
Date: Fri, 21 Dec 2012 11:50:01 +0100 [thread overview]
Message-ID: <50D43ED9.4030906@st.com> (raw)
In-Reply-To: <B5906170F1614E41A8A28DE3B8D121433EC9CE7A@DBDE01.ent.ti.com>
On 12/21/2012 11:28 AM, Bedia, Vaibhav wrote:
> On Tue, Dec 18, 2012 at 18:40:07, Loic Pallardy wrote:
>> - msg = mbox_read_reg(fifo->data);
>> - msg |= ((mbox_msg_t) mbox_read_reg(fifo->cmd))<< 16;
>> + msg->header = mbox_read_reg(fifo->data);
>> + msg->header |= ((mbox_msg_t) mbox_read_reg(fifo->cmd))<< 16;
>
> Now that struct mailbox_msg encapsulates the data, you can
> get rid of the mbox_msg_t typedef completely. Having the data
> as part of the mailbox_msg along with the functions with mbox_msg_t
> as the return type just creates confusion IMHO.
>
OK I'll clean up mbox_msg_t typedef.
>>
>> - return msg;
>> + return 0;
>> }
>
> Convert all return 0 functions to void?
>
> [...]
>
Yes, agree I'll change the prototype.
>>
>> +
>> +#define MAILBOX_FILL_HEADER_MSG(_msg, _header) \
>> + MAILBOX_FILL_MSG(_msg, _header, NULL, 0);
>> +
>
> I used these patches as part of the suspend-resume support for AM335x
> which has the same mailbox IP as OMAP4. I used the MAILBOX_FILL_HEADER_MSG
> helper and things work as expected.
Nice.
>
> However, I found the 'header' part to be very confusing. Why not treat the
> OMAP case as a special case of the new MAILBOX_FILL_MSG where the data size
> is set to 1?
Yes it is another possibility. Changes are not big.
Omar, what's your view on this point?
Regards,
Loic
>
> Regards,
> Vaibhav
WARNING: multiple messages have this Message-ID (diff)
From: Loic PALLARDY <loic.pallardy@st.com>
To: "Bedia, Vaibhav" <vaibhav.bedia@ti.com>
Cc: Loic PALLARDY STE <loic.pallardy-ext@stericsson.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ohad Ben-Cohen <ohad@wizery.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Russell King <linux@arm.linux.org.uk>,
Arnd Bergmann <arnd@arndb.de>,
Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>,
Tony Lindgren <tony@atomide.com>,
Linus Walleij <linus.walleij@linaro.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
"Gutierrez, Juan" <jgutierrez@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Felipe Contreras <felipe.contreras@nokia.com>,
Dom Cobley <popcornmix@gmail.com>,
Wim Van Sebroeck <wim@iguana.be>,
Omar Ramirez Luna <omar.ramirez@copitl.com>,
Tejun Heo <tj@kernel.org>, "Anna, Suman" <s-anna@ti.com>,
STEricsson_nomadik_linux <STEricsson_nomadik_linux@list.st.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 4/9] mailbox: create opened message type
Date: Fri, 21 Dec 2012 11:50:01 +0100 [thread overview]
Message-ID: <50D43ED9.4030906@st.com> (raw)
In-Reply-To: <B5906170F1614E41A8A28DE3B8D121433EC9CE7A@DBDE01.ent.ti.com>
On 12/21/2012 11:28 AM, Bedia, Vaibhav wrote:
> On Tue, Dec 18, 2012 at 18:40:07, Loic Pallardy wrote:
>> - msg = mbox_read_reg(fifo->data);
>> - msg |= ((mbox_msg_t) mbox_read_reg(fifo->cmd))<< 16;
>> + msg->header = mbox_read_reg(fifo->data);
>> + msg->header |= ((mbox_msg_t) mbox_read_reg(fifo->cmd))<< 16;
>
> Now that struct mailbox_msg encapsulates the data, you can
> get rid of the mbox_msg_t typedef completely. Having the data
> as part of the mailbox_msg along with the functions with mbox_msg_t
> as the return type just creates confusion IMHO.
>
OK I'll clean up mbox_msg_t typedef.
>>
>> - return msg;
>> + return 0;
>> }
>
> Convert all return 0 functions to void?
>
> [...]
>
Yes, agree I'll change the prototype.
>>
>> +
>> +#define MAILBOX_FILL_HEADER_MSG(_msg, _header) \
>> + MAILBOX_FILL_MSG(_msg, _header, NULL, 0);
>> +
>
> I used these patches as part of the suspend-resume support for AM335x
> which has the same mailbox IP as OMAP4. I used the MAILBOX_FILL_HEADER_MSG
> helper and things work as expected.
Nice.
>
> However, I found the 'header' part to be very confusing. Why not treat the
> OMAP case as a special case of the new MAILBOX_FILL_MSG where the data size
> is set to 1?
Yes it is another possibility. Changes are not big.
Omar, what's your view on this point?
Regards,
Loic
>
> Regards,
> Vaibhav
next prev parent reply other threads:[~2012-12-21 10:50 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-18 13:10 [PATCH 0/9] drivers: mailbox: framework creation Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` [PATCH 1/9] mailbox: OMAP: introduce mailbox framework Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 16:59 ` Tony Lindgren
2012-12-18 16:59 ` Tony Lindgren
2012-12-21 8:54 ` Loic PALLARDY
2012-12-21 8:54 ` Loic PALLARDY
2012-12-21 8:54 ` Loic PALLARDY
2012-12-21 10:49 ` Bedia, Vaibhav
2012-12-21 10:49 ` Bedia, Vaibhav
2012-12-21 10:49 ` Bedia, Vaibhav
2012-12-21 10:53 ` Loic PALLARDY
2012-12-21 10:53 ` Loic PALLARDY
2012-12-21 10:53 ` Loic PALLARDY
2013-01-09 12:11 ` Bedia, Vaibhav
2013-01-09 12:11 ` Bedia, Vaibhav
2013-01-09 12:11 ` Bedia, Vaibhav
2013-01-09 12:29 ` Loic PALLARDY
2013-01-09 12:29 ` Loic PALLARDY
2013-01-09 12:29 ` Loic PALLARDY
2013-01-09 12:34 ` Bedia, Vaibhav
2013-01-09 12:34 ` Bedia, Vaibhav
2013-01-09 12:34 ` Bedia, Vaibhav
2013-01-11 13:34 ` Omar Ramirez Luna
2013-01-11 13:34 ` Omar Ramirez Luna
2013-01-11 13:34 ` Omar Ramirez Luna
2012-12-18 13:10 ` [PATCH 2/9] mailbox: split internal header from API header Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` [PATCH 3/9] mailbox: rename omap_mbox in mailbox Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-20 21:29 ` Ohad Ben-Cohen
2012-12-20 21:29 ` Ohad Ben-Cohen
2012-12-18 13:10 ` [PATCH 4/9] mailbox: create opened message type Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-21 10:28 ` Bedia, Vaibhav
2012-12-21 10:28 ` Bedia, Vaibhav
2012-12-21 10:28 ` Bedia, Vaibhav
2012-12-21 10:50 ` Loic PALLARDY [this message]
2012-12-21 10:50 ` Loic PALLARDY
2012-12-21 10:50 ` Loic PALLARDY
2012-12-18 13:10 ` [PATCH 5/9] mailbox: change protection mechanisms Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-21 10:28 ` Bedia, Vaibhav
2012-12-21 10:28 ` Bedia, Vaibhav
2012-12-21 10:28 ` Bedia, Vaibhav
2012-12-21 10:50 ` Loic PALLARDY
2012-12-21 10:50 ` Loic PALLARDY
2012-12-21 10:50 ` Loic PALLARDY
2012-12-18 13:10 ` [PATCH 6/9] mailbox: add shared memory mailbox type Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` [PATCH 7/9] mailbox: add IRQF_NO_SUSPEND flag Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` [PATCH 8/9] mailbox: add no_irq send message Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` [PATCH 9/9] mailbox: create dbx500 mailbox driver Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-18 13:10 ` Loic Pallardy
2012-12-20 18:16 ` [PATCH 0/9] drivers: mailbox: framework creation Linus Walleij
2012-12-20 18:16 ` Linus Walleij
2012-12-20 18:28 ` Tony Lindgren
2012-12-20 18:28 ` Tony Lindgren
2012-12-20 19:19 ` Olof Johansson
2012-12-20 19:19 ` Olof Johansson
2012-12-20 19:33 ` Tony Lindgren
2012-12-20 19:33 ` Tony Lindgren
2012-12-21 7:31 ` Ohad Ben-Cohen
2012-12-21 7:31 ` Ohad Ben-Cohen
2012-12-21 7:31 ` Ohad Ben-Cohen
2012-12-21 8:52 ` Loic PALLARDY
2012-12-21 8:52 ` Loic PALLARDY
2012-12-21 8:52 ` Loic PALLARDY
2012-12-21 19:33 ` Omar Ramirez Luna
2012-12-21 19:33 ` Omar Ramirez Luna
2012-12-21 19:33 ` Omar Ramirez Luna
2012-12-24 15:17 ` Ohad Ben-Cohen
2012-12-24 15:17 ` Ohad Ben-Cohen
2012-12-24 15:17 ` Ohad Ben-Cohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50D43ED9.4030906@st.com \
--to=loic.pallardy@st.com \
--cc=STEricsson_nomadik_linux@list.st.com \
--cc=arnd@arndb.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=felipe.contreras@nokia.com \
--cc=gregkh@linuxfoundation.org \
--cc=jgutierrez@ti.com \
--cc=jkrzyszt@tis.icnet.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=loic.pallardy-ext@stericsson.com \
--cc=ohad@wizery.com \
--cc=omar.ramirez@copitl.com \
--cc=popcornmix@gmail.com \
--cc=s-anna@ti.com \
--cc=tj@kernel.org \
--cc=tony@atomide.com \
--cc=vaibhav.bedia@ti.com \
--cc=wim@iguana.be \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.