Re: [PATCH 17/34] clk: maxgen: Migrate to clk_hw based OF and registration APIs

2016-08-16 Thread Javier Martinez Canillas
Hello Stephen,

On 08/16/2016 04:06 PM, Stephen Boyd wrote:
> On Tue, Jun 7, 2016 at 11:55 AM, Javier Martinez Canillas
>>>
>>> I tried this patch on top of linux-next and my Peach Pi Chromebook
>>> (that has a max77802 chip) failed to boot. Following is the relevant
>>> parts from the boot log:
>>>
>>
>> It seems the mailer did a mess with the line wrapping so here's another 
>> attempt:
>>
> 
> Thanks! Found the problem too.
> 

Great! Thanks a lot for finding the issue.
I tested v2 of your patch and it worked well indeed.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America


Re: [PATCH 17/34] clk: maxgen: Migrate to clk_hw based OF and registration APIs

2016-08-16 Thread Javier Martinez Canillas
Hello Stephen,

On 08/16/2016 04:06 PM, Stephen Boyd wrote:
> On Tue, Jun 7, 2016 at 11:55 AM, Javier Martinez Canillas
>>>
>>> I tried this patch on top of linux-next and my Peach Pi Chromebook
>>> (that has a max77802 chip) failed to boot. Following is the relevant
>>> parts from the boot log:
>>>
>>
>> It seems the mailer did a mess with the line wrapping so here's another 
>> attempt:
>>
> 
> Thanks! Found the problem too.
> 

Great! Thanks a lot for finding the issue.
I tested v2 of your patch and it worked well indeed.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America


Re: [PATCH 17/34] clk: maxgen: Migrate to clk_hw based OF and registration APIs

2016-08-16 Thread Stephen Boyd
On Tue, Jun 7, 2016 at 11:55 AM, Javier Martinez Canillas
 wrote:
> On 06/07/2016 02:50 PM, Javier Martinez Canillas wrote:
>> Hello Stephen,
>>
>> On Wed, Jun 1, 2016 at 7:15 PM, Stephen Boyd  wrote:
>>> Now that we have clk_hw based provider APIs to register clks, we
>>> can get rid of struct clk pointers while registering clks in
>>> these drivers, allowing us to move closer to a clear split of
>>> consumer and provider clk APIs.
>>>
>>> Cc: Javier Martinez Canillas 
>>
>> This email address doesn't exist anymore, you can use
>> jav...@osg.samsung.com instead.
>>
>>> Signed-off-by: Stephen Boyd 
>>> ---
>>>
>>> See commit 58657d189a2f and it's children for details on this
>>> new registration API.
>>>
>>
>> I tried this patch on top of linux-next and my Peach Pi Chromebook
>> (that has a max77802 chip) failed to boot. Following is the relevant
>> parts from the boot log:
>>
>
> It seems the mailer did a mess with the line wrapping so here's another 
> attempt:
>

Thanks! Found the problem too.

8<-
diff --git a/drivers/clk/clk-max-gen.c b/drivers/clk/clk-max-gen.c
index 4bb53fcf8639..5e8bac190698 100644
--- a/drivers/clk/clk-max-gen.c
+++ b/drivers/clk/clk-max-gen.c
@@ -169,7 +169,7 @@ int max_gen_clk_probe(struct platform_device
*pdev, struct regmap *regmap,

if (dev->of_node) {
ret = of_clk_add_hw_provider(dev->of_node, of_clk_max_gen_get,
-max_gen_clks);
+max_gen_data);
if (ret) {
dev_err(dev, "failed to register OF clock provider\n");
return ret;


Re: [PATCH 17/34] clk: maxgen: Migrate to clk_hw based OF and registration APIs

2016-08-16 Thread Stephen Boyd
On Tue, Jun 7, 2016 at 11:55 AM, Javier Martinez Canillas
 wrote:
> On 06/07/2016 02:50 PM, Javier Martinez Canillas wrote:
>> Hello Stephen,
>>
>> On Wed, Jun 1, 2016 at 7:15 PM, Stephen Boyd  wrote:
>>> Now that we have clk_hw based provider APIs to register clks, we
>>> can get rid of struct clk pointers while registering clks in
>>> these drivers, allowing us to move closer to a clear split of
>>> consumer and provider clk APIs.
>>>
>>> Cc: Javier Martinez Canillas 
>>
>> This email address doesn't exist anymore, you can use
>> jav...@osg.samsung.com instead.
>>
>>> Signed-off-by: Stephen Boyd 
>>> ---
>>>
>>> See commit 58657d189a2f and it's children for details on this
>>> new registration API.
>>>
>>
>> I tried this patch on top of linux-next and my Peach Pi Chromebook
>> (that has a max77802 chip) failed to boot. Following is the relevant
>> parts from the boot log:
>>
>
> It seems the mailer did a mess with the line wrapping so here's another 
> attempt:
>

Thanks! Found the problem too.

8<-
diff --git a/drivers/clk/clk-max-gen.c b/drivers/clk/clk-max-gen.c
index 4bb53fcf8639..5e8bac190698 100644
--- a/drivers/clk/clk-max-gen.c
+++ b/drivers/clk/clk-max-gen.c
@@ -169,7 +169,7 @@ int max_gen_clk_probe(struct platform_device
*pdev, struct regmap *regmap,

if (dev->of_node) {
ret = of_clk_add_hw_provider(dev->of_node, of_clk_max_gen_get,
-max_gen_clks);
+max_gen_data);
if (ret) {
dev_err(dev, "failed to register OF clock provider\n");
return ret;


Re: [PATCH 17/34] clk: maxgen: Migrate to clk_hw based OF and registration APIs

2016-06-07 Thread Javier Martinez Canillas
On 06/07/2016 02:50 PM, Javier Martinez Canillas wrote:
> Hello Stephen,
> 
> On Wed, Jun 1, 2016 at 7:15 PM, Stephen Boyd  wrote:
>> Now that we have clk_hw based provider APIs to register clks, we
>> can get rid of struct clk pointers while registering clks in
>> these drivers, allowing us to move closer to a clear split of
>> consumer and provider clk APIs.
>>
>> Cc: Javier Martinez Canillas 
> 
> This email address doesn't exist anymore, you can use
> jav...@osg.samsung.com instead.
> 
>> Signed-off-by: Stephen Boyd 
>> ---
>>
>> See commit 58657d189a2f and it's children for details on this
>> new registration API.
>>
> 
> I tried this patch on top of linux-next and my Peach Pi Chromebook
> (that has a max77802 chip) failed to boot. Following is the relevant
> parts from the boot log:
> 

It seems the mailer did a mess with the line wrapping so here's another attempt:

[3.096860] WARNING: CPU: 1 PID: 121 at include/linux/kref.h:46 
__clk_get+0x90/0x98
[3.096882] Modules linked in:
[3.096896] CPU: 1 PID: 121 Comm: kworker/u16:2 Not tainted 
4.7.0-rc2-next-20160606-9-g897c9c5cd3cf #117
[3.096905] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[3.096926] Workqueue: deferwq deferred_probe_work_func
[3.096956] [] (unwind_backtrace) from [] 
(show_stack+0x10/0x14)
[3.096971] [] (show_stack) from [] 
(dump_stack+0x88/0x9c)
[3.096986] [] (dump_stack) from [] (__warn+0xe8/0x100)
[3.096997] [] (__warn) from [] 
(warn_slowpath_null+0x20/0x28)
[3.097009] [] (warn_slowpath_null) from [] 
(__clk_get+0x90/0x98)
[3.097024] [] (__clk_get) from [] 
(__of_clk_get_from_provider+0x70/0x10c)
[3.097041] [] (__of_clk_get_from_provider) from [] 
(__of_clk_get_by_name+0xf0/0x108)
[3.097055] [] (__of_clk_get_by_name) from [] 
(clk_get+0x2c/0x5c)
[3.097070] [] (clk_get) from [] (devm_clk_get+0x3c/0x78)
[3.097086] [] (devm_clk_get) from [] 
(s3c_rtc_probe+0x2bc/0x438)
[3.097101] [] (s3c_rtc_probe) from [] 
(platform_drv_probe+0x4c/0xb0)
[3.097115] [] (platform_drv_probe) from [] 
(driver_probe_device+0x214/0x2c0)
[3.097136] [] (driver_probe_device) from [] 
(bus_for_each_drv+0x60/0x94)
[3.097149] [] (bus_for_each_drv) from [] 
(__device_attach+0xb0/0x114)
[3.097163] [] (__device_attach) from [] 
(bus_probe_device+0x84/0x8c)
[3.097174] [] (bus_probe_device) from [] 
(deferred_probe_work_func+0x68/0x98)
[3.097193] [] (deferred_probe_work_func) from [] 
(process_one_work+0x124/0x338)
[3.097208] [] (process_one_work) from [] 
(worker_thread+0x38/0x4d4)
[3.097224] [] (worker_thread) from [] 
(kthread+0xdc/0xf4)
[3.097239] [] (kthread) from [] 
(ret_from_fork+0x14/0x3c)
[3.097251] ---[ end trace c79e2db53b5a7881 ]---
[3.097286] Unable to handle kernel NULL pointer dereference at virtual 
address 003f
[3.097293] pgd = c0004000
[3.097312] [003f] *pgd=
[3.097324] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[3.097342] Modules linked in:
[3.097354] CPU: 1 PID: 121 Comm: kworker/u16:2 Tainted: GW   
4.7.0-rc2-next-20160606-9-g897c9c5cd3cf #117
[3.097364] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[3.097384] Workqueue: deferwq deferred_probe_work_func
[3.097394] task: ed22b200 ti: c3b9c000 task.ti: c3b9c000
[3.097408] PC is at clk_core_enable+0x10/0x98
[3.097420] LR is at clk_core_enable+0x40/0x98
[3.097430] pc : []lr : []psr: a093
[3.097430] sp : c3b9dde8  ip :   fp : c3abed80
[3.097442] r10: edc1a800  r9 : 0004  r8 : 
[3.097453] r7 : edd72734  r6 : ede32a10  r5 : a013  r4 : 
[3.097462] r3 :   r2 : 0001  r1 : 0001  r0 : 
[3.097474] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment 
none
[3.097484] Control: 10c5387d  Table: 2000406a  DAC: 0051
[3.097495] Process kworker/u16:2 (pid: 121, stack limit = 0xc3b9c210)
[3.097508] Stack: (0xc3b9dde8 to 0xc3b9e000)
[3.097520] dde0:   c3894340 a013 ede32a10 c054fcb4 
edd75a40 a013
[3.097532] de00: ede32a10 c0550720 edd72710 edd75a40 ede32a10 c04e48bc 
ede1f550 0001
[3.097546] de20: c089ff18 0004 ede1f550 c3a88d70  ede1f550 
0001 c089ff18
[3.097558] de40: edd74d70 ede32a10 ede32a10 ede32a10 ede32a10 ede32a10 
ede32a10 c0b2a504
[3.097570] de60: fdfb c03fc040 ede32a10 c0b8308c c0b83094 c0b2a504 
 c03fa794
[3.097582] de80:  c3b9deb8 c03fa924 0001   
edc1a800 c03f8bb4
[3.097594] dea0: edc05894 c3a69644 ede32a10 ede32a44 c0b211f0 c03fa4a0 
ede32a10 0001
[3.097603] dec0: c0b473a8 ede32a10 ede32a10 c0b211f0 c3b5ad00 c03f9adc 
ede32a10 c0b20f9c
[3.097615] dee0: c0b20fc8 c03f9f6c c3abed80 c0b20fe8 edc1a800 c012ff2c 
c3abed80 edc1a824
[3.097628] df00: edc1a800 c3abed98 0088 edc1a824 

Re: [PATCH 17/34] clk: maxgen: Migrate to clk_hw based OF and registration APIs

2016-06-07 Thread Javier Martinez Canillas
On 06/07/2016 02:50 PM, Javier Martinez Canillas wrote:
> Hello Stephen,
> 
> On Wed, Jun 1, 2016 at 7:15 PM, Stephen Boyd  wrote:
>> Now that we have clk_hw based provider APIs to register clks, we
>> can get rid of struct clk pointers while registering clks in
>> these drivers, allowing us to move closer to a clear split of
>> consumer and provider clk APIs.
>>
>> Cc: Javier Martinez Canillas 
> 
> This email address doesn't exist anymore, you can use
> jav...@osg.samsung.com instead.
> 
>> Signed-off-by: Stephen Boyd 
>> ---
>>
>> See commit 58657d189a2f and it's children for details on this
>> new registration API.
>>
> 
> I tried this patch on top of linux-next and my Peach Pi Chromebook
> (that has a max77802 chip) failed to boot. Following is the relevant
> parts from the boot log:
> 

It seems the mailer did a mess with the line wrapping so here's another attempt:

[3.096860] WARNING: CPU: 1 PID: 121 at include/linux/kref.h:46 
__clk_get+0x90/0x98
[3.096882] Modules linked in:
[3.096896] CPU: 1 PID: 121 Comm: kworker/u16:2 Not tainted 
4.7.0-rc2-next-20160606-9-g897c9c5cd3cf #117
[3.096905] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[3.096926] Workqueue: deferwq deferred_probe_work_func
[3.096956] [] (unwind_backtrace) from [] 
(show_stack+0x10/0x14)
[3.096971] [] (show_stack) from [] 
(dump_stack+0x88/0x9c)
[3.096986] [] (dump_stack) from [] (__warn+0xe8/0x100)
[3.096997] [] (__warn) from [] 
(warn_slowpath_null+0x20/0x28)
[3.097009] [] (warn_slowpath_null) from [] 
(__clk_get+0x90/0x98)
[3.097024] [] (__clk_get) from [] 
(__of_clk_get_from_provider+0x70/0x10c)
[3.097041] [] (__of_clk_get_from_provider) from [] 
(__of_clk_get_by_name+0xf0/0x108)
[3.097055] [] (__of_clk_get_by_name) from [] 
(clk_get+0x2c/0x5c)
[3.097070] [] (clk_get) from [] (devm_clk_get+0x3c/0x78)
[3.097086] [] (devm_clk_get) from [] 
(s3c_rtc_probe+0x2bc/0x438)
[3.097101] [] (s3c_rtc_probe) from [] 
(platform_drv_probe+0x4c/0xb0)
[3.097115] [] (platform_drv_probe) from [] 
(driver_probe_device+0x214/0x2c0)
[3.097136] [] (driver_probe_device) from [] 
(bus_for_each_drv+0x60/0x94)
[3.097149] [] (bus_for_each_drv) from [] 
(__device_attach+0xb0/0x114)
[3.097163] [] (__device_attach) from [] 
(bus_probe_device+0x84/0x8c)
[3.097174] [] (bus_probe_device) from [] 
(deferred_probe_work_func+0x68/0x98)
[3.097193] [] (deferred_probe_work_func) from [] 
(process_one_work+0x124/0x338)
[3.097208] [] (process_one_work) from [] 
(worker_thread+0x38/0x4d4)
[3.097224] [] (worker_thread) from [] 
(kthread+0xdc/0xf4)
[3.097239] [] (kthread) from [] 
(ret_from_fork+0x14/0x3c)
[3.097251] ---[ end trace c79e2db53b5a7881 ]---
[3.097286] Unable to handle kernel NULL pointer dereference at virtual 
address 003f
[3.097293] pgd = c0004000
[3.097312] [003f] *pgd=
[3.097324] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[3.097342] Modules linked in:
[3.097354] CPU: 1 PID: 121 Comm: kworker/u16:2 Tainted: GW   
4.7.0-rc2-next-20160606-9-g897c9c5cd3cf #117
[3.097364] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[3.097384] Workqueue: deferwq deferred_probe_work_func
[3.097394] task: ed22b200 ti: c3b9c000 task.ti: c3b9c000
[3.097408] PC is at clk_core_enable+0x10/0x98
[3.097420] LR is at clk_core_enable+0x40/0x98
[3.097430] pc : []lr : []psr: a093
[3.097430] sp : c3b9dde8  ip :   fp : c3abed80
[3.097442] r10: edc1a800  r9 : 0004  r8 : 
[3.097453] r7 : edd72734  r6 : ede32a10  r5 : a013  r4 : 
[3.097462] r3 :   r2 : 0001  r1 : 0001  r0 : 
[3.097474] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment 
none
[3.097484] Control: 10c5387d  Table: 2000406a  DAC: 0051
[3.097495] Process kworker/u16:2 (pid: 121, stack limit = 0xc3b9c210)
[3.097508] Stack: (0xc3b9dde8 to 0xc3b9e000)
[3.097520] dde0:   c3894340 a013 ede32a10 c054fcb4 
edd75a40 a013
[3.097532] de00: ede32a10 c0550720 edd72710 edd75a40 ede32a10 c04e48bc 
ede1f550 0001
[3.097546] de20: c089ff18 0004 ede1f550 c3a88d70  ede1f550 
0001 c089ff18
[3.097558] de40: edd74d70 ede32a10 ede32a10 ede32a10 ede32a10 ede32a10 
ede32a10 c0b2a504
[3.097570] de60: fdfb c03fc040 ede32a10 c0b8308c c0b83094 c0b2a504 
 c03fa794
[3.097582] de80:  c3b9deb8 c03fa924 0001   
edc1a800 c03f8bb4
[3.097594] dea0: edc05894 c3a69644 ede32a10 ede32a44 c0b211f0 c03fa4a0 
ede32a10 0001
[3.097603] dec0: c0b473a8 ede32a10 ede32a10 c0b211f0 c3b5ad00 c03f9adc 
ede32a10 c0b20f9c
[3.097615] dee0: c0b20fc8 c03f9f6c c3abed80 c0b20fe8 edc1a800 c012ff2c 
c3abed80 edc1a824
[3.097628] df00: edc1a800 c3abed98 0088 edc1a824 c0b02100 c3b9c000 
edc1a800 c0130178
[3.097638] df20: c3b9c000 c3ac26c0 c3abed80 

Re: [PATCH 17/34] clk: maxgen: Migrate to clk_hw based OF and registration APIs

2016-06-07 Thread Javier Martinez Canillas
Hello Stephen,

On Wed, Jun 1, 2016 at 7:15 PM, Stephen Boyd  wrote:
> Now that we have clk_hw based provider APIs to register clks, we
> can get rid of struct clk pointers while registering clks in
> these drivers, allowing us to move closer to a clear split of
> consumer and provider clk APIs.
>
> Cc: Javier Martinez Canillas 

This email address doesn't exist anymore, you can use
jav...@osg.samsung.com instead.

> Signed-off-by: Stephen Boyd 
> ---
>
> See commit 58657d189a2f and it's children for details on this
> new registration API.
>

I tried this patch on top of linux-next and my Peach Pi Chromebook
(that has a max77802 chip) failed to boot. Following is the relevant
parts from the boot log:

[3.096860] WARNING: CPU: 1 PID: 121 at include/linux/kref.h:46
__clk_get+0x90/0x98
[3.096882] Modules linked in:
[3.096896] CPU: 1 PID: 121 Comm: kworker/u16:2 Not tainted
4.7.0-rc2-next-20160606-9-g897c9c5cd3cf #117
[3.096905] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[3.096926] Workqueue: deferwq deferred_probe_work_func
[3.096956] [] (unwind_backtrace) from []
(show_stack+0x10/0x14)
[3.096971] [] (show_stack) from []
(dump_stack+0x88/0x9c)
[3.096986] [] (dump_stack) from [] (__warn+0xe8/0x100)
[3.096997] [] (__warn) from []
(warn_slowpath_null+0x20/0x28)
[3.097009] [] (warn_slowpath_null) from []
(__clk_get+0x90/0x98)
[3.097024] [] (__clk_get) from []
(__of_clk_get_from_provider+0x70/0x10c)
[3.097041] [] (__of_clk_get_from_provider) from
[] (__of_clk_get_by_name+0xf0/0x108)
[3.097055] [] (__of_clk_get_by_name) from []
(clk_get+0x2c/0x5c)
[3.097070] [] (clk_get) from [] (devm_clk_get+0x3c/0x78)
[3.097086] [] (devm_clk_get) from []
(s3c_rtc_probe+0x2bc/0x438)
[3.097101] [] (s3c_rtc_probe) from []
(platform_drv_probe+0x4c/0xb0)
[3.097115] [] (platform_drv_probe) from []
(driver_probe_device+0x214/0x2c0)
[3.097136] [] (driver_probe_device) from []
(bus_for_each_drv+0x60/0x94)
[3.097149] [] (bus_for_each_drv) from []
(__device_attach+0xb0/0x114)
[3.097163] [] (__device_attach) from []
(bus_probe_device+0x84/0x8c)
[3.097174] [] (bus_probe_device) from []
(deferred_probe_work_func+0x68/0x98)
[3.097193] [] (deferred_probe_work_func) from
[] (process_one_work+0x124/0x338)
[3.097208] [] (process_one_work) from []
(worker_thread+0x38/0x4d4)
[3.097224] [] (worker_thread) from []
(kthread+0xdc/0xf4)
[3.097239] [] (kthread) from []
(ret_from_fork+0x14/0x3c)
[3.097251] ---[ end trace c79e2db53b5a7881 ]---
[3.097286] Unable to handle kernel NULL pointer dereference at
virtual address 003f
[3.097293] pgd = c0004000
[3.097312] [003f] *pgd=
[3.097324] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[3.097342] Modules linked in:
[3.097354] CPU: 1 PID: 121 Comm: kworker/u16:2 Tainted: GW
  4.7.0-rc2-next-20160606-9-g897c9c5cd3cf #117
[3.097364] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[3.097384] Workqueue: deferwq deferred_probe_work_func
[3.097394] task: ed22b200 ti: c3b9c000 task.ti: c3b9c000
[3.097408] PC is at clk_core_enable+0x10/0x98
[3.097420] LR is at clk_core_enable+0x40/0x98
[3.097430] pc : []lr : []psr: a093
[3.097430] sp : c3b9dde8  ip :   fp : c3abed80
[3.097442] r10: edc1a800  r9 : 0004  r8 : 
[3.097453] r7 : edd72734  r6 : ede32a10  r5 : a013  r4 : 
[3.097462] r3 :   r2 : 0001  r1 : 0001  r0 : 
[3.097474] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment none
[3.097484] Control: 10c5387d  Table: 2000406a  DAC: 0051
[3.097495] Process kworker/u16:2 (pid: 121, stack limit = 0xc3b9c210)
[3.097508] Stack: (0xc3b9dde8 to 0xc3b9e000)
[3.097520] dde0:   c3894340 a013 ede32a10
c054fcb4 edd75a40 a013
[3.097532] de00: ede32a10 c0550720 edd72710 edd75a40 ede32a10
c04e48bc ede1f550 0001
[3.097546] de20: c089ff18 0004 ede1f550 c3a88d70 
ede1f550 0001 c089ff18
[3.097558] de40: edd74d70 ede32a10 ede32a10 ede32a10 ede32a10
ede32a10 ede32a10 c0b2a504
[3.097570] de60: fdfb c03fc040 ede32a10 c0b8308c c0b83094
c0b2a504  c03fa794
[3.097582] de80:  c3b9deb8 c03fa924 0001 
 edc1a800 c03f8bb4
[3.097594] dea0: edc05894 c3a69644 ede32a10 ede32a44 c0b211f0
c03fa4a0 ede32a10 0001
[3.097603] dec0: c0b473a8 ede32a10 ede32a10 c0b211f0 c3b5ad00
c03f9adc ede32a10 c0b20f9c
[3.097615] dee0: c0b20fc8 c03f9f6c c3abed80 c0b20fe8 edc1a800
c012ff2c c3abed80 edc1a824
[3.097628] df00: edc1a800 c3abed98 0088 edc1a824 c0b02100
c3b9c000 edc1a800 c0130178
[3.097638] df20: c3b9c000 c3ac26c0 c3abed80  c3ac26c0
c3abed80 c0130140 
[3.097649] df40:    c0135454 e7fddef0
 

Re: [PATCH 17/34] clk: maxgen: Migrate to clk_hw based OF and registration APIs

2016-06-07 Thread Javier Martinez Canillas
Hello Stephen,

On Wed, Jun 1, 2016 at 7:15 PM, Stephen Boyd  wrote:
> Now that we have clk_hw based provider APIs to register clks, we
> can get rid of struct clk pointers while registering clks in
> these drivers, allowing us to move closer to a clear split of
> consumer and provider clk APIs.
>
> Cc: Javier Martinez Canillas 

This email address doesn't exist anymore, you can use
jav...@osg.samsung.com instead.

> Signed-off-by: Stephen Boyd 
> ---
>
> See commit 58657d189a2f and it's children for details on this
> new registration API.
>

I tried this patch on top of linux-next and my Peach Pi Chromebook
(that has a max77802 chip) failed to boot. Following is the relevant
parts from the boot log:

[3.096860] WARNING: CPU: 1 PID: 121 at include/linux/kref.h:46
__clk_get+0x90/0x98
[3.096882] Modules linked in:
[3.096896] CPU: 1 PID: 121 Comm: kworker/u16:2 Not tainted
4.7.0-rc2-next-20160606-9-g897c9c5cd3cf #117
[3.096905] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[3.096926] Workqueue: deferwq deferred_probe_work_func
[3.096956] [] (unwind_backtrace) from []
(show_stack+0x10/0x14)
[3.096971] [] (show_stack) from []
(dump_stack+0x88/0x9c)
[3.096986] [] (dump_stack) from [] (__warn+0xe8/0x100)
[3.096997] [] (__warn) from []
(warn_slowpath_null+0x20/0x28)
[3.097009] [] (warn_slowpath_null) from []
(__clk_get+0x90/0x98)
[3.097024] [] (__clk_get) from []
(__of_clk_get_from_provider+0x70/0x10c)
[3.097041] [] (__of_clk_get_from_provider) from
[] (__of_clk_get_by_name+0xf0/0x108)
[3.097055] [] (__of_clk_get_by_name) from []
(clk_get+0x2c/0x5c)
[3.097070] [] (clk_get) from [] (devm_clk_get+0x3c/0x78)
[3.097086] [] (devm_clk_get) from []
(s3c_rtc_probe+0x2bc/0x438)
[3.097101] [] (s3c_rtc_probe) from []
(platform_drv_probe+0x4c/0xb0)
[3.097115] [] (platform_drv_probe) from []
(driver_probe_device+0x214/0x2c0)
[3.097136] [] (driver_probe_device) from []
(bus_for_each_drv+0x60/0x94)
[3.097149] [] (bus_for_each_drv) from []
(__device_attach+0xb0/0x114)
[3.097163] [] (__device_attach) from []
(bus_probe_device+0x84/0x8c)
[3.097174] [] (bus_probe_device) from []
(deferred_probe_work_func+0x68/0x98)
[3.097193] [] (deferred_probe_work_func) from
[] (process_one_work+0x124/0x338)
[3.097208] [] (process_one_work) from []
(worker_thread+0x38/0x4d4)
[3.097224] [] (worker_thread) from []
(kthread+0xdc/0xf4)
[3.097239] [] (kthread) from []
(ret_from_fork+0x14/0x3c)
[3.097251] ---[ end trace c79e2db53b5a7881 ]---
[3.097286] Unable to handle kernel NULL pointer dereference at
virtual address 003f
[3.097293] pgd = c0004000
[3.097312] [003f] *pgd=
[3.097324] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[3.097342] Modules linked in:
[3.097354] CPU: 1 PID: 121 Comm: kworker/u16:2 Tainted: GW
  4.7.0-rc2-next-20160606-9-g897c9c5cd3cf #117
[3.097364] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[3.097384] Workqueue: deferwq deferred_probe_work_func
[3.097394] task: ed22b200 ti: c3b9c000 task.ti: c3b9c000
[3.097408] PC is at clk_core_enable+0x10/0x98
[3.097420] LR is at clk_core_enable+0x40/0x98
[3.097430] pc : []lr : []psr: a093
[3.097430] sp : c3b9dde8  ip :   fp : c3abed80
[3.097442] r10: edc1a800  r9 : 0004  r8 : 
[3.097453] r7 : edd72734  r6 : ede32a10  r5 : a013  r4 : 
[3.097462] r3 :   r2 : 0001  r1 : 0001  r0 : 
[3.097474] Flags: NzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM
Segment none
[3.097484] Control: 10c5387d  Table: 2000406a  DAC: 0051
[3.097495] Process kworker/u16:2 (pid: 121, stack limit = 0xc3b9c210)
[3.097508] Stack: (0xc3b9dde8 to 0xc3b9e000)
[3.097520] dde0:   c3894340 a013 ede32a10
c054fcb4 edd75a40 a013
[3.097532] de00: ede32a10 c0550720 edd72710 edd75a40 ede32a10
c04e48bc ede1f550 0001
[3.097546] de20: c089ff18 0004 ede1f550 c3a88d70 
ede1f550 0001 c089ff18
[3.097558] de40: edd74d70 ede32a10 ede32a10 ede32a10 ede32a10
ede32a10 ede32a10 c0b2a504
[3.097570] de60: fdfb c03fc040 ede32a10 c0b8308c c0b83094
c0b2a504  c03fa794
[3.097582] de80:  c3b9deb8 c03fa924 0001 
 edc1a800 c03f8bb4
[3.097594] dea0: edc05894 c3a69644 ede32a10 ede32a44 c0b211f0
c03fa4a0 ede32a10 0001
[3.097603] dec0: c0b473a8 ede32a10 ede32a10 c0b211f0 c3b5ad00
c03f9adc ede32a10 c0b20f9c
[3.097615] dee0: c0b20fc8 c03f9f6c c3abed80 c0b20fe8 edc1a800
c012ff2c c3abed80 edc1a824
[3.097628] df00: edc1a800 c3abed98 0088 edc1a824 c0b02100
c3b9c000 edc1a800 c0130178
[3.097638] df20: c3b9c000 c3ac26c0 c3abed80  c3ac26c0
c3abed80 c0130140 
[3.097649] df40:    c0135454 e7fddef0
 e7fddef0 c3abed80
[3.097663] df60:   dead4ead