From: Igor Grinberg <grinberg@compulab.co.il>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] arm: omap3: cm-t35: add support for cm-t3730
Date: Fri, 03 Jun 2011 16:37:59 +0300 [thread overview]
Message-ID: <4DE8E3B7.5020107@compulab.co.il> (raw)
In-Reply-To: <20110531130447.GK11352@atomide.com>
Hi Tony,
On 05/31/11 16:04, Tony Lindgren wrote:
> * Igor Grinberg <grinberg@compulab.co.il> [110508 00:17]:
>> cm-t3730 is basically the same board as cm-t35, but has DM3730 SoC
>> assembled and therefore some changes are required.
>> +static void cm_t35_mux_init(void)
>> +{
>> + int mux_mode = OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT;
>> +
>> + omap3_mux_init(cm_t35_common_board_mux, OMAP_PACKAGE_CUS);
>> +
>> + if (cpu_is_omap34xx()) {
>> + omap_mux_init_signal("gpio_70", mux_mode);
>> + omap_mux_init_signal("gpio_71", mux_mode);
>> + omap_mux_init_signal("gpio_72", mux_mode);
>> + omap_mux_init_signal("gpio_73", mux_mode);
>> + omap_mux_init_signal("gpio_74", mux_mode);
>> + omap_mux_init_signal("gpio_75", mux_mode);
>> + } else if (cpu_is_omap3630()) {
>> + mux_mode = OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT;
>> + omap_mux_init_signal("sys_boot0", mux_mode);
>> + omap_mux_init_signal("sys_boot1", mux_mode);
>> + omap_mux_init_signal("sys_boot3", mux_mode);
>> + omap_mux_init_signal("sys_boot4", mux_mode);
>> + omap_mux_init_signal("sys_boot5", mux_mode);
>> + omap_mux_init_signal("sys_boot6", mux_mode);
>> + }
>> +
>> + omap_mux_init_signal("dss_data18", mux_mode);
>> + omap_mux_init_signal("dss_data19", mux_mode);
>> + omap_mux_init_signal("dss_data20", mux_mode);
>> + omap_mux_init_signal("dss_data21", mux_mode);
>> + omap_mux_init_signal("dss_data22", mux_mode);
>> + omap_mux_init_signal("dss_data23", mux_mode);
>> +}
>> +#else
>> +static inline void cm_t35_mux_init(void) {}
>> #endif
> Should this cpu_is_omap if else done once and then set
> some data based on it? That would be better if you need to
> use it for detection for other things later on as it will
> avoid multiple cpu_is/machine_is if else lines of code.
I'm not sure I understand what are you trying to propose here...
If you look once again on the code, there is currently only one if (cpu_is_..) {} else {}
statement currently present.
(I can remove the "if (cpu_is_omap3630())" - it indeed has no value)
Indeed, there will be some other differences...
Each time I submit a patch, I try to be as optimal as I can,
but again I'm open for suggestions...
(though I think it is optimal, e.g. 33 lines for a new running board...)
--
Regards,
Igor.
WARNING: multiple messages have this Message-ID (diff)
From: grinberg@compulab.co.il (Igor Grinberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] arm: omap3: cm-t35: add support for cm-t3730
Date: Fri, 03 Jun 2011 16:37:59 +0300 [thread overview]
Message-ID: <4DE8E3B7.5020107@compulab.co.il> (raw)
In-Reply-To: <20110531130447.GK11352@atomide.com>
Hi Tony,
On 05/31/11 16:04, Tony Lindgren wrote:
> * Igor Grinberg <grinberg@compulab.co.il> [110508 00:17]:
>> cm-t3730 is basically the same board as cm-t35, but has DM3730 SoC
>> assembled and therefore some changes are required.
>> +static void cm_t35_mux_init(void)
>> +{
>> + int mux_mode = OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT;
>> +
>> + omap3_mux_init(cm_t35_common_board_mux, OMAP_PACKAGE_CUS);
>> +
>> + if (cpu_is_omap34xx()) {
>> + omap_mux_init_signal("gpio_70", mux_mode);
>> + omap_mux_init_signal("gpio_71", mux_mode);
>> + omap_mux_init_signal("gpio_72", mux_mode);
>> + omap_mux_init_signal("gpio_73", mux_mode);
>> + omap_mux_init_signal("gpio_74", mux_mode);
>> + omap_mux_init_signal("gpio_75", mux_mode);
>> + } else if (cpu_is_omap3630()) {
>> + mux_mode = OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT;
>> + omap_mux_init_signal("sys_boot0", mux_mode);
>> + omap_mux_init_signal("sys_boot1", mux_mode);
>> + omap_mux_init_signal("sys_boot3", mux_mode);
>> + omap_mux_init_signal("sys_boot4", mux_mode);
>> + omap_mux_init_signal("sys_boot5", mux_mode);
>> + omap_mux_init_signal("sys_boot6", mux_mode);
>> + }
>> +
>> + omap_mux_init_signal("dss_data18", mux_mode);
>> + omap_mux_init_signal("dss_data19", mux_mode);
>> + omap_mux_init_signal("dss_data20", mux_mode);
>> + omap_mux_init_signal("dss_data21", mux_mode);
>> + omap_mux_init_signal("dss_data22", mux_mode);
>> + omap_mux_init_signal("dss_data23", mux_mode);
>> +}
>> +#else
>> +static inline void cm_t35_mux_init(void) {}
>> #endif
> Should this cpu_is_omap if else done once and then set
> some data based on it? That would be better if you need to
> use it for detection for other things later on as it will
> avoid multiple cpu_is/machine_is if else lines of code.
I'm not sure I understand what are you trying to propose here...
If you look once again on the code, there is currently only one if (cpu_is_..) {} else {}
statement currently present.
(I can remove the "if (cpu_is_omap3630())" - it indeed has no value)
Indeed, there will be some other differences...
Each time I submit a patch, I try to be as optimal as I can,
but again I'm open for suggestions...
(though I think it is optimal, e.g. 33 lines for a new running board...)
--
Regards,
Igor.
next prev parent reply other threads:[~2011-06-03 13:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 8:53 [PATCH] arm: omap3: cm-t35: add support for cm-t3730 Igor Grinberg
2011-05-05 8:53 ` Igor Grinberg
2011-05-05 9:51 ` Mike Rapoport
2011-05-05 9:51 ` Mike Rapoport
2011-05-08 7:20 ` [PATCH v2] " Igor Grinberg
2011-05-08 7:20 ` Igor Grinberg
2011-05-31 13:04 ` Tony Lindgren
2011-05-31 13:04 ` Tony Lindgren
2011-06-03 13:37 ` Igor Grinberg [this message]
2011-06-03 13:37 ` Igor Grinberg
2011-06-13 13:33 ` Tony Lindgren
2011-06-13 13:33 ` Tony Lindgren
2011-06-13 19:34 ` Igor Grinberg
2011-06-13 19:34 ` Igor Grinberg
2011-06-14 7:36 ` Tony Lindgren
2011-06-14 7:36 ` Tony Lindgren
2011-06-14 21:16 ` [PATCH 1/3] arm: omap3: cm-t35: minor comments fixes Igor Grinberg
2011-06-14 21:16 ` Igor Grinberg
2011-06-14 21:16 ` [PATCH 2/3] arm: omap3: cm-t35: fix slow path warning Igor Grinberg
2011-06-14 21:16 ` Igor Grinberg
2011-06-14 21:16 ` [PATCH v3 3/3] arm: omap3: cm-t35: add support for cm-t3730 Igor Grinberg
2011-06-14 21:16 ` Igor Grinberg
2011-06-22 14:56 ` Igor Grinberg
2011-06-22 14:56 ` Igor Grinberg
2011-06-27 8:35 ` Igor Grinberg
2011-06-27 8:35 ` Igor Grinberg
2011-06-27 10:21 ` Tony Lindgren
2011-06-27 10:21 ` Tony Lindgren
2011-06-27 12:31 ` Igor Grinberg
2011-06-27 12:31 ` Igor Grinberg
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=4DE8E3B7.5020107@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=tony@atomide.com \
/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.