From: Tony Lindgren <tony@atomide.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: khilman@linaro.org, linux-omap@vger.kernel.org,
vaibhav.bedia@ti.com, linux-arm-kernel@lists.infradead.org,
mpfj-list@newflow.co.uk, sourav.poddar@ti.com, paul@pwsan.com,
balbi@ti.com
Subject: Re: [PATCH 1/2] Revert "ARM: OMAP2+: Fix serial init for device tree based booting"
Date: Fri, 12 Jul 2013 05:33:31 -0700 [thread overview]
Message-ID: <20130712123331.GJ7656@atomide.com> (raw)
In-Reply-To: <51DFF294.9080501@ti.com>
* Rajendra Nayak <rnayak@ti.com> [130712 05:18]:
> On Friday 12 July 2013 02:48 PM, Tony Lindgren wrote:
> > * Rajendra Nayak <rnayak@ti.com> [130712 02:06]:
> >> On Friday 12 July 2013 01:33 PM, Tony Lindgren wrote:
> >>>
> >>> OK, so that's only for earlyprintk then?
> >>
> >> yes,
> >>
> >>>
> >>> If so, it seems the right fix is to set the NO_IDLE and NO_RESET
> >>> flags based on ifdef CONFIG_DEBUG_OMAP4UART3 etc as that is selected
> >>> in the Kconfig now.
> >>
> >> ok makes sense. It seems like the static data in hwmod can be populated
> >> based on these defines? something like
> >>
> >> /* uart3 */
> >> static struct omap_hwmod omap44xx_uart3_hwmod = {
> >> .name = "uart3",
> >> .class = &omap44xx_uart_hwmod_class,
> >> .clkdm_name = "l4_per_clkdm",
> >> #ifdef CONFIG_DEBUG_OMAP4UART3
> >> .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
> >> HWMOD_SWSUP_SIDLE_ACT,
> >> #else
> >> .flags = HWMOD_SWSUP_SIDLE_ACT,
> >> #endif
> >> .main_clk = "func_48m_fclk",
> >> .prcm = {
> >> .omap4 = {
> >> .clkctrl_offs = OMAP4_CM_L4PER_UART3_CLKCTRL_OFFSET,
> >> .context_offs = OMAP4_RM_L4PER_UART3_CONTEXT_OFFSET,
> >> .modulemode = MODULEMODE_SWCTRL,
> >> },
> >> },
> >> };
> >>
> >> And same way for others? That way the cmdline parsing can be done away
> >> with even for the non-DT case.
> >
> > Yes we can do it that way. How about add a common macro for it if
> > it's always the same? Then the .flags line would be just:
> >
> > #define HWMOD_OMAP_UART_FLAGS(soc, port)
> > ...
> >
> > .flags = HWMOD_OMAP_UART_FLAGS(4, 3),
>
> I started doing this and ended up with equal number of #ifdefs in the
> header :( Was the intention of doing this to reduce the #ifdefs? in which
> case maybe I am doing something wrong.
Hmm can't you use ## for substition in the macro to reduce the ifdefs
and have just one macro instead one for every debug port?
Regards,
Tony
next prev parent reply other threads:[~2013-07-12 12:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-11 10:53 [PATCH 0/2] Fix omap serial early crash during hwmod _setup() Rajendra Nayak
2013-07-11 10:53 ` [PATCH 1/2] Revert "ARM: OMAP2+: Fix serial init for device tree based booting" Rajendra Nayak
2013-07-12 7:20 ` Tony Lindgren
2013-07-12 7:31 ` Rajendra Nayak
2013-07-12 8:03 ` Tony Lindgren
2013-07-12 8:59 ` Rajendra Nayak
2013-07-12 9:18 ` Tony Lindgren
2013-07-12 9:22 ` Rajendra Nayak
2013-07-12 9:46 ` Tony Lindgren
2013-07-12 12:12 ` Rajendra Nayak
2013-07-12 12:33 ` Tony Lindgren [this message]
2013-07-11 10:53 ` [PATCH 2/2] ARM: OMAP4+: Get rid of the HWMOD_INIT_NO_IDLE and HWMOD_INIT_NO_RESET flags for uart Rajendra Nayak
2013-07-11 13:28 ` [PATCH 0/2] Fix omap serial early crash during hwmod _setup() Felipe Balbi
2013-07-12 7:22 ` Tony Lindgren
2013-07-12 7:33 ` Rajendra Nayak
2013-07-12 8:03 ` Tony Lindgren
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=20130712123331.GJ7656@atomide.com \
--to=tony@atomide.com \
--cc=balbi@ti.com \
--cc=khilman@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=mpfj-list@newflow.co.uk \
--cc=paul@pwsan.com \
--cc=rnayak@ti.com \
--cc=sourav.poddar@ti.com \
--cc=vaibhav.bedia@ti.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 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).