lkml.org 
[lkml]   [2015]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2015-05-12 18:21    [W:0.143 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site