linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: "Hiremath, Vaibhav" <hvaibhav@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"khilman@linaro.org" <khilman@linaro.org>,
	"paul@pwsan.com" <paul@pwsan.com>,
	"Nayak, Rajendra" <rnayak@ti.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 3/3] ARM: OMAP2+: Add command line parameter for debugSS module control
Date: Tue, 9 Apr 2013 09:34:59 -0700	[thread overview]
Message-ID: <20130409163459.GJ10155@atomide.com> (raw)
In-Reply-To: <79CD15C6BA57404B839C016229A409A83EC47BB2@DBDE01.ent.ti.com>

* Hiremath, Vaibhav <hvaibhav@ti.com> [130409 01:12]:
> > From: Tony Lindgren [mailto:tony@atomide.com]
> > 
> > I suggest you just make this part into a standard DT only
> > device driver. That way the command line parsing and clock
> > enabling can happen the normal way.
> > 
> 
> That’s good idea, as we are moving towards DT only boot support.
> Also, are you suggesting to have both command-line param and DT
> Property for this?
> 
> 
> > Is there any reason why this could not be a loadable module?
> > 
> 
> Because we want to keep it enabled before late_initcall. As part of late_initcall
> Clock/hwmod framework will start disabling unused modules, which will impact the
> Debugs as well. Consider the case where this debugss is loaded as a module, the user
> Will loose the JTAG connection until the module is loaded; and once module is
> Loaded, he has to again re-connect to the debugss.

It will get run before late_initcall if compiled in. Sounds
like there are no issues also make it work as a loadable module
as needed.
 
> With only DT option the code will look like below, is this what you also have in your mind -
> 
> arch/arm/boot/dts/am33xx.dtsi:
> 
> 	debugss: debugss@4b000000 {
> 		compatible = "ti,debugss";
> 		ti,hwmods = "debugss";
> 		reg = <0x4b000000 1000000>;
> 		status = "disabled";	/* User need to enable it if he need JTAG connectivity*/
> 	};
>
>
> arch/arm/mach-omap2/debugss.c:
> 
> 	static int __init _omap2_debugss_enable(void)
> 	{
> 		struct device_node *np;
> 	
> 		np = of_find_matching_node(oh_name);
> 		if (!node || ! of_device_is_available()) {
> 			pr_err("debugss device is not found\n");
> 			return -ENODEV;
> 		}
> 		...
> 		hwmod lookup./setup/enable along with optional clock enable.
> 		...
> 
> 	}
> 	device_initcall(_omap2_debugss_enable);

It should be all standard device driver stuff. I'd make it just
regular module_platform_driver and only initialize it earlier if
compiled in.

Regards,

Tony


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-04-09 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04 11:35 [RFC PATCH 3/3] ARM: OMAP2+: Add command line parameter for debugSS module control hvaibhav
2013-04-08 17:29 ` Tony Lindgren
2013-04-09  8:07   ` Hiremath, Vaibhav
2013-04-09 16:34     ` Tony Lindgren [this message]
2013-04-10  5:11       ` Hiremath, Vaibhav
2013-04-10 17:07         ` 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=20130409163459.GJ10155@atomide.com \
    --to=tony@atomide.com \
    --cc=hvaibhav@ti.com \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=rnayak@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).