From: b-cousson@ti.com (Cousson, Benoit)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/7] OMAP4: hwmod data: add mailbox data
Date: Mon, 8 Nov 2010 03:56:31 -0500 [thread overview]
Message-ID: <4CD7BB3F.1010304@ti.com> (raw)
In-Reply-To: <AANLkTi=mkBROke+4Yf25QndYB=0pE+k0tE2NKxUM5xU_@mail.gmail.com>
Hi Omar,
On 11/7/2010 10:07 AM, Ramirez Luna, Omar wrote:
> On Sat, Nov 6, 2010 at 12:18 PM, Cousson, Benoit<b-cousson@ti.com> wrote:
>> I don't know why, but this patch has nothing to do with my original one.
>> Can you stick to the original code?
>
> no, apart from the ordering of structure members, that I will change,
If you do want to change a patch already submitted to loml, the least
you can do is to comment on the mailing list, and afaik, you didn't
provide any comment on this code.
So do not change it without any explanation or any rational.
That's the most basic rule of the patch submission / review process in
Linux.
> since keeping the order of the original structure doesn't fly, I don't
> see anything that needs to be changed.
>
> - The magic numbers replaced for the defines, afaik it gives more clarity.
No, since these are not magic numbers but physical address or dma number
or irq channel.
That does not give any more clarity to add a define, and in fact it adds
an extra level of indirection for nothing.
The hwmod file is "the" unique HW definition files. So all the
information that used to be scattered all over various header files will
have to be there.
You should considered this file as a global SoC HW definition file.
> - mailbox irq has a name.
Which is in the structure anyway, so again no need to add a define.
All the structure that are populated hrer are all unique to every IP, so
having that kind of assignment does not seems very useful to me.
omap44xx_mailbox_irq = OMAP44XX_MAILBOX_IRQ;
whereas that:
omap44xx_mailbox_irq = 20;
Give you a little be more information, because you do not have have to
read the TRM or another header file to get the real number.
FYI, that was discussed at least 6 months ago during the submission of
the early hwmod series.
> - overall defining block was improved:
>
> class
> ocp_if
> slave ports
> hwmod
>
> If you see, each dependent reference is right before the structure
> that is using it, which at least to me establishes some order, as of
> today this ordering doesn't exists.
>
> e.g. you are defining some hwmod and some how you are populating all
> the members, if you are looking at your omap_hwmod struct and want to
> see the irqs defined you need to scroll beyond the supposed first
> reference in omap_hwmod (right now above ocp_if)
So what? If you have any issue with the original order, please feel free
to comment on the original patch.
In case you didn't notice, all the OMAP4 data are following the same
pattern. So any change to the structure should be applied everywhere.
I do not have any issue to improve the overall readability if that make
sense for everybody, but again, please comment first.
>>
>> On 11/5/2010 9:17 PM, Ramirez Luna, Omar wrote:
>>> +/* mailbox */
>>
>> The original comment is missing.
>
> <quote>
> /*
> * 'mailbox' class
> * mailbox module allowing communication between the on-chip processors
> * useusing a queued mailbox-interrupt mechanism.
> */
> </quote>
>
> I don't think it adds anything to the patch, should we start
> commenting on the functionality of the drivers for each hwmod?
In that case, it does not hurt since this file is the C file version of
the TRM. You might not care because you know what that module is doing,
but most people don't.
>
>>> +
>>> +static struct omap_hwmod omap44xx_mailbox_hwmod;
>>> +
>>> +static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
>>> + {
>>> + .pa_start = OMAP44XX_MAILBOX_BASE,
>>
>> If that physical address is not used elsewhere, and it should be the case,
>> there is no need to create a define for it. That's why the physical address
>> was directly used here.
>> There is no added value to create a define for that.
>
> yes there is, apart from readability where '0x4a0f4000' doesn't say much
It says everything... when you use a debugger, what kind of information
OMAP44XX_MAILBOX_BASE will give you? Nothing, you will have to check
again the TRM or the define to get the real useful information.
> for me at least, if reviewing I need to open the TRM check if that is
> the address and move on, with the define you know that someone have
> checked the address before (when creating the define)
And what if the define is wrong??? You have as well to check the TRM...
FYI, that file is automatically generated from the HW data, so it has a
much lower probably to contain wrong data. Especially compared to a
manually written header file done from a buggy TRM.
Regards,
Benoit
next prev parent reply other threads:[~2010-11-08 8:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-06 1:17 [PATCH v2 0/7] omap: mailbox: hwmod support and dependent cleanup patches Omar Ramirez Luna
2010-11-06 1:17 ` [PATCH v2 1/7] OMAP2: hwmod data: add mailbox data Omar Ramirez Luna
2010-11-06 17:08 ` Cousson, Benoit
2010-11-07 14:27 ` Ramirez Luna, Omar
2010-11-06 1:17 ` [PATCH v2 2/7] OMAP3: " Omar Ramirez Luna
2010-11-06 1:17 ` [PATCH v2 3/7] OMAP4: " Omar Ramirez Luna
2010-11-06 17:18 ` Cousson, Benoit
2010-11-07 15:07 ` Ramirez Luna, Omar
2010-11-08 8:56 ` Cousson, Benoit [this message]
2010-11-08 16:55 ` Ramirez Luna, Omar
2010-11-06 1:17 ` [PATCH v2 4/7] omap: mailbox: initial hwmod support Omar Ramirez Luna
2010-11-06 17:44 ` Cousson, Benoit
2010-11-06 1:17 ` [PATCH v2 5/7] omap: mailbox: add omap_device latency information Omar Ramirez Luna
2010-11-06 18:09 ` Cousson, Benoit
2010-11-06 1:17 ` [PATCH v2 6/7] omap: mailbox: fix detection for previously supported chips Omar Ramirez Luna
2010-11-06 18:11 ` Cousson, Benoit
2010-11-07 15:15 ` Ramirez Luna, Omar
2010-11-07 21:05 ` Felipe Contreras
2010-11-08 16:05 ` Ramirez Luna, Omar
2010-11-08 21:43 ` Cousson, Benoit
2010-11-06 1:17 ` [PATCH v2 7/7] omap: mailbox: remove unreachable return Omar Ramirez Luna
2010-11-06 18:21 ` Cousson, Benoit
2010-11-07 15:18 ` Ramirez Luna, Omar
2010-11-06 18:32 ` [PATCH v2 0/7] omap: mailbox: hwmod support and dependent cleanup patches Cousson, Benoit
2010-11-07 15:19 ` Ramirez Luna, Omar
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=4CD7BB3F.1010304@ti.com \
--to=b-cousson@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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 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).