[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1505121751560.4225@nanos>
Date: Tue, 12 May 2015 17:55:24 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Lee Jones <lee.jones@...aro.org>
cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, daniel.lezcano@...aro.org,
wim@...ana.be, a.zummo@...ertech.it,
linux-watchdog@...r.kernel.org, rtc-linux@...glegroups.com,
linux@...ck-us.net, kernel@...inux.com
Subject: Re: [PATCH v2 02/12] clocksource: sti: Provide support for the ST
LPC Clocksource IP
On Tue, 12 May 2015, Lee Jones wrote:
> +static void st_clksrc_reset(void)
__init
> +static int st_clksrc_setup_clk(struct device_node *np)
__init
> +static void __init st_clksrc_of_register(struct device_node *np)
> +{
> + int ret;
> + uint32_t mode;
> +
> + ret = of_property_read_u32(np, "st,lpc-mode", &mode);
> + if (ret) {
> + pr_err("clksrc-st-lpc: An LPC mode must be provided\n");
> + return;
> + }
> +
> + /* LPC can either run as a Clocksource or in RTC or WDT mode */
> + if (mode != ST_LPC_MODE_CLKSRC)
> + return;
> +
> + ddata.base = of_iomap(np, 0);
> + if (!ddata.base) {
> + pr_err("clksrc-st-lpc: Unable to map iomem\n");
> + return;
> + }
> +
> + if (st_clksrc_setup_clk(np)) {
> + iounmap(ddata.base);
> + return;
> + }
> +
> + if (st_clksrc_init()) {
Keeps the clock enabled.
> + iounmap(ddata.base);
> + return;
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists