[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67169312-ba94-7a68-56cf-8412d8b42169@ti.com>
Date: Mon, 19 Mar 2018 08:57:30 +0200
From: Tero Kristo <t-kristo@...com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
<linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>,
Stephen Boyd <sboyd@...eaurora.org>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: Re: [PATCH 4.14 056/109] clk: ti: clkctrl: add support for retrying
failed init
On 19/03/18 05:44, Dan Rue wrote:
> On Fri, Mar 16, 2018 at 04:23:25PM +0100, Greg Kroah-Hartman wrote:
>> 4.14-stable review patch. If anyone has any objections, please let me know.
>>
>> ------------------
>>
>> From: Tero Kristo <t-kristo@...com>
>>
>>
>> [ Upstream commit 729e13bf58e643b9accd2a14c55b555958702fb0 ]
>>
>> In case the clkctrl node contains assigned-clock-* entries, registering
>> the provider can fail with -EPROBE_DEFER. In this case, add the
>> provider to the retry_init clock list so it will be cleaned up later.
>>
>> Signed-off-by: Tero Kristo <t-kristo@...com>
>> Acked-by: Stephen Boyd <sboyd@...eaurora.org>
>> Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>
> This fails to build for me on arm32:
>
> $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=build-arm multi_v7_defconfig
> $ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=build-arm
This actually needs commit ffb009b24388b896d9ca8b54e39a879302142518
("clk: ti: convert retry_init param to use void data type") as
prerequisite, otherwise it fails building.
-Tero
>
> ...
>
> ../drivers/clk/ti/clkctrl.c: In function ‘_ti_omap4_clkctrl_setup’:
> ../drivers/clk/ti/clkctrl.c:497:27: error: passing argument 2 of ‘ti_clk_retry_init’ from incompatible pointer type
> [-Werror=incompatible-pointer-types]
> ti_clk_retry_init(node, provider, _clkctrl_add_provider);
> ^~~~~~~~
> In file included from ../drivers/clk/ti/clkctrl.c:24:0:
> ../drivers/clk/ti/clock.h:265:5: note: expected ‘struct clk_hw *’ but argument is of type ‘struct omap_clkctrl_prov
> ider *’
> int ti_clk_retry_init(struct device_node *node, struct clk_hw *hw,
> ^~~~~~~~~~~~~~~~~ ../drivers/clk/ti/clkctrl.c:497:37: error: passing argument 3 of ‘ti_clk_retry_init’ from incompatible pointer type
> [-Werror=incompatible-pointer-types]
> ti_clk_retry_init(node, provider, _clkctrl_add_provider);
> ^~~~~~~~~~~~~~~~~~~~~
> In file included from ../drivers/clk/ti/clkctrl.c:24:0: ../drivers/clk/ti/clock.h:265:5: note: expected ‘ti_of_clk_init_cb_t {aka void (*)(struct clk_hw *, struct device_n
> ode *)}’ but argument is of type ‘void (*)(void *, struct device_node *)’
> int ti_clk_retry_init(struct device_node *node, struct clk_hw *hw,
> ^~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> make[4]: *** [../scripts/Makefile.build:329: drivers/clk/ti/clkctrl.o] Error 1
> make[3]: *** [../scripts/Makefile.build:587: drivers/clk/ti] Error 2
> make[2]: *** [../scripts/Makefile.build:587: drivers/clk] Error 2
> make[1]: *** [/home/drue/src/linux/4.14-rc/Makefile:1031: drivers] Error 2
> make[1]: Leaving directory '/home/drue/src/linux/4.14-rc/build-arm'
> make: *** [Makefile:146: sub-make] Error 2
>
>> ---
>> drivers/clk/ti/clkctrl.c | 12 +++++++++++-
>> 1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> --- a/drivers/clk/ti/clkctrl.c
>> +++ b/drivers/clk/ti/clkctrl.c
>> @@ -400,6 +400,12 @@ _ti_clkctrl_setup_subclks(struct omap_cl
>> }
>> }
>>
>> +static void __init _clkctrl_add_provider(void *data,
>> + struct device_node *np)
>> +{
>> + of_clk_add_hw_provider(np, _ti_omap4_clkctrl_xlate, data);
>> +}
>> +
>> static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
>> {
>> struct omap_clkctrl_provider *provider;
>> @@ -411,6 +417,7 @@ static void __init _ti_omap4_clkctrl_set
>> struct omap_clkctrl_clk *clkctrl_clk;
>> const __be32 *addrp;
>> u32 addr;
>> + int ret;
>>
>> addrp = of_get_address(node, 0, NULL, NULL);
>> addr = (u32)of_translate_address(node, addrp);
>> @@ -485,7 +492,10 @@ static void __init _ti_omap4_clkctrl_set
>> reg_data++;
>> }
>>
>> - of_clk_add_hw_provider(node, _ti_omap4_clkctrl_xlate, provider);
>> + ret = of_clk_add_hw_provider(node, _ti_omap4_clkctrl_xlate, provider);
>> + if (ret == -EPROBE_DEFER)
>> + ti_clk_retry_init(node, provider, _clkctrl_add_provider);
>> +
>> return;
>>
>> cleanup:
>>
>>
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists