mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-clk@vger.kernel.org,
	devicetree <devicetree@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>, Sekhar Nori <nsekhar@ti.com>,
	Kevin Hilman <khilman@kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Adam Ford <aford173@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v7 00/42] ARM: davinci: convert to common clock framework​
Date: Tue, 20 Feb 2018 12:39:59 -0600	[thread overview]
Message-ID: <6142ab0d-85b1-84da-3a35-bdd8733bebd9@lechnology.com> (raw)
In-Reply-To: <CAMRc=MdT5Vd68eoWfJGv=5_uzD0L5m3Y+wi6r7N6O8y6HZrQSg@mail.gmail.com>

On 02/20/2018 07:33 AM, Bartosz Golaszewski wrote:
> 2018-02-19 21:21 GMT+01:00 David Lechner <david@lechnology.com>:
>> This series converts mach-davinci to use the common clock framework.
>>
>>
> 
> Hi David,
> 
> just some quick results from today's playing with v7.
> 
> I started out with da850-lcdk with my standard rootfs over NFS. I was
> not able to boot to console so far. The first problem is that mdio
> fails to probe:
> 
> libphy: Fixed MDIO Bus: probed
> davinci_mdio 1e24000.mdio: davinci mdio revision 1.5, bus freq 2200000
> davinci_mdio 1e24000.mdio: no live phy, scanning all
> davinci_mdio: probe of 1e24000.mdio failed with error -5> 
> After some digging I noticed that the supplied clock rate differs
> between mainline (114000000Hz) vs common-clock-v7 (18000000). Since
> we're not setting the rate in mdio, using LPSC_SET_RATE_PARENT would
> not help like with lcdc.

Can you post the output of this command so that I can see how your
clocks are setup:

cat /sys/kernel/debug/clk/clk_summary


> 
> After that, the boot just hangs without ever getting to emac's probe.

Using your workaround, can you run:

cat /sys/kernel/debug/pm_genpd/pm_genpd_summary

If you see:
   
1e27000.clock-controller: emac  off-0

then genpd is not working like it is supposed to. You should see something
like this for device that are working:
           
1e27000.clock-controller: uart2  on
     /devices/platform/soc@1c00000/1d0d000.serial        active


> 
> Once I set the emac clock to always enabled (a workaround that was
> necessary with v6, but could be dropped with my first
> genpd-in-a-separate-driver attempt), I'm getting a rather strange NULL
> pointer dereference:

I noticed this too when adding the power-domains property to some device
tree nodes. This is part of the reason why I didn't add it everywhere.
I wasn't able to figure out the cause of this yet. As a work around
though, please try removing the power-domains property from the emac
and mdio nodes and use your previous workaround of having an always
enabled clock.

> 
> Backtrace:
> [<c049d464>] (strlen) from [<c01f32a8>] (start_creating+0x58/0xc0)
> [<c01f3250>] (start_creating) from [<c01f34c8>] (debugfs_create_dir+0x14/0xd8)
>   r7:c04dadbc r6:c0567480 r5:c0656274 r4:c68a9300
> [<c01f34b4>] (debugfs_create_dir) from [<c0296838>]
> (clk_debug_create_one+0x28/0x1d0)
>   r5:c0656274 r4:c68a9300
> [<c0296810>] (clk_debug_create_one) from [<c05cdf84>]
> (clk_debug_init+0x100/0x15c)
>   r5:c0656274 r4:c68a9300
> [<c05cde84>] (clk_debug_init) from [<c000a54c>] (do_one_initcall+0x50/0x19c)
>   r7:c05e3834 r6:ffffe000 r5:c05f7008 r4:c05cde84
> [<c000a4fc>] (do_one_initcall) from [<c05b6eb4>]
> (kernel_init_freeable+0x110/0x1cc)
>   r9:c05b4584 r8:c05b6614 r7:c05e3834 r6:c063cc80 r5:00000073 r4:c05f2354
> [<c05b6da4>] (kernel_init_freeable) from [<c04a2ce4>] (kernel_init+0x10/0xfc)
>   r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c04a2cd4
>   r4:00000000
> [<c04a2cd4>] (kernel_init) from [<c00090e0>] (ret_from_fork+0x14/0x34)
> 
> It turns out that the emac clock is correctly registered in
> __davinci_psc_register_clocks() and a corresponding clk_core structure
> is added to the list and core->name is correctly assigned, but then
> later when clk_debug_init() is called, the name in emac clk_core is
> NULL. This is the direct reason for the panic. Interestingly other
> members of clk_core seem to be fine.
> 
> I'll continue on debugging it. Let me know if you have any ideas.
> 
> Best regards,
> Bartosz Golaszewski
> 

  reply	other threads:[~2018-02-20 18:39 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 20:21 David Lechner
2018-02-19 20:21 ` [PATCH v7 01/42] dt-bindings: clock: Add new bindings for TI Davinci PLL clocks David Lechner
2018-03-01 21:41   ` Rob Herring
2018-02-19 20:21 ` [PATCH v7 02/42] clk: davinci: New driver for davinci " David Lechner
2018-02-19 20:21 ` [PATCH v7 03/42] clk: davinci: Add platform information for TI DA830 PLL David Lechner
2018-02-19 20:21 ` [PATCH v7 04/42] clk: davinci: Add platform information for TI DA850 PLL David Lechner
2018-02-19 20:21 ` [PATCH v7 05/42] clk: davinci: Add platform information for TI DM355 PLL David Lechner
2018-02-19 20:21 ` [PATCH v7 06/42] clk: davinci: Add platform information for TI DM365 PLL David Lechner
2018-02-19 20:21 ` [PATCH v7 07/42] clk: davinci: Add platform information for TI DM644x PLL David Lechner
2018-02-19 20:21 ` [PATCH v7 08/42] clk: davinci: Add platform information for TI DM646x PLL David Lechner
2018-02-19 20:21 ` [PATCH v7 09/42] dt-bindings: clock: New bindings for TI Davinci PSC David Lechner
2018-03-01 21:13   ` Rob Herring
2018-02-19 20:21 ` [PATCH v7 10/42] clk: davinci: New driver for davinci PSC clocks David Lechner
2018-02-28 12:38   ` Bartosz Golaszewski
2018-02-28 21:40     ` David Lechner
2018-03-01  8:36       ` Bartosz Golaszewski
2018-03-01 16:44         ` David Lechner
2018-03-02 17:39           ` Bartosz Golaszewski
2018-03-05 13:02           ` Bartosz Golaszewski
2018-03-05 16:23             ` David Lechner
2018-03-05 17:46               ` David Lechner
2018-03-16 17:55     ` Stephen Boyd
2018-03-19 10:26       ` Bartosz Golaszewski
2018-02-19 20:21 ` [PATCH v7 11/42] clk: davinci: Add platform information for TI DA830 PSC David Lechner
2018-02-19 20:21 ` [PATCH v7 12/42] clk: davinci: Add platform information for TI DA850 PSC David Lechner
2018-02-19 20:21 ` [PATCH v7 13/42] clk: davinci: Add platform information for TI DM355 PSC David Lechner
2018-02-19 20:21 ` [PATCH v7 14/42] clk: davinci: Add platform information for TI DM365 PSC David Lechner
2018-02-19 20:21 ` [PATCH v7 15/42] clk: davinci: Add platform information for TI DM644x PSC David Lechner
2018-02-19 20:21 ` [PATCH v7 16/42] clk: davinci: Add platform information for TI DM646x PSC David Lechner
2018-02-19 20:21 ` [PATCH v7 17/42] dt-bindings: clock: Add bindings for DA8XX CFGCHIP clocks David Lechner
2018-02-19 20:21 ` [PATCH v7 18/42] clk: davinci: New driver for TI " David Lechner
2018-02-19 20:21 ` [PATCH v7 19/42] clk: davinci: cfgchip: Add TI DA8XX USB PHY clocks David Lechner
2018-02-19 20:21 ` [PATCH v7 20/42] ARM: davinci: pass clock as parameter to davinci_timer_init() David Lechner
2018-02-19 20:21 ` [PATCH v7 21/42] ARM: davinci: da830: add new clock init using common clock framework David Lechner
2018-02-19 20:21 ` [PATCH v7 22/42] ARM: davinci: da850: " David Lechner
2018-02-19 20:21 ` [PATCH v7 23/42] ARM: davinci: dm355: " David Lechner
2018-02-19 20:21 ` [PATCH v7 24/42] ARM: davinci: dm365: " David Lechner
2018-02-19 20:21 ` [PATCH v7 25/42] ARM: davinci: dm644x: " David Lechner
2018-02-19 20:21 ` [PATCH v7 26/42] ARM: davinci: dm646x: " David Lechner
2018-02-19 20:21 ` [PATCH v7 27/42] ARM: davinci: da8xx: add new USB PHY " David Lechner
2018-02-19 20:21 ` [PATCH v7 28/42] ARM: davinci: da8xx: add new sata_refclk " David Lechner
2018-02-19 20:21 ` [PATCH v7 29/42] ARM: davinci: remove CONFIG_DAVINCI_RESET_CLOCKS David Lechner
2018-02-19 20:21 ` [PATCH v7 30/42] ARM: davinci_all_defconfig: " David Lechner
2018-02-19 20:21 ` [PATCH v7 31/42] ARM: davinci: switch to common clock framework David Lechner
2018-02-19 20:21 ` [PATCH v7 32/42] ARM: davinci: da830: Remove legacy clock init David Lechner
2018-02-19 20:21 ` [PATCH v7 33/42] ARM: davinci: da850: " David Lechner
2018-02-19 20:21 ` [PATCH v7 34/42] ARM: davinci: dm355: " David Lechner
2018-02-19 20:21 ` [PATCH v7 35/42] ARM: davinci: dm365: " David Lechner
2018-02-19 20:21 ` [PATCH v7 36/42] ARM: davinci: dm644x: " David Lechner
2018-02-19 20:21 ` [PATCH v7 37/42] ARM: davinci: dm646x: " David Lechner
2018-02-19 20:21 ` [PATCH v7 38/42] ARM: davinci: da8xx: Remove legacy USB and SATA " David Lechner
2018-02-19 20:22 ` [PATCH v7 39/42] ARM: davinci: remove legacy clocks David Lechner
2018-02-19 20:22 ` [PATCH v7 40/42] ARM: davinci: add device tree support to timer David Lechner
2018-02-19 20:22 ` [PATCH v7 41/42] ARM: davinci: da8xx-dt: switch to device tree clocks David Lechner
2018-02-19 20:22 ` [PATCH v7 42/42] ARM: dts: da850: Add clocks David Lechner
2018-02-20 13:33 ` [PATCH v7 00/42] ARM: davinci: convert to common clock framework​ Bartosz Golaszewski
2018-02-20 18:39   ` David Lechner [this message]
2018-02-21 12:01     ` Bartosz Golaszewski
2018-02-21 17:05       ` David Lechner
2018-02-21 17:46         ` Bartosz Golaszewski
2018-02-22 13:36           ` Bartosz Golaszewski

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=6142ab0d-85b1-84da-3a35-bdd8733bebd9@lechnology.com \
    --to=david@lechnology.com \
    --cc=aford173@gmail.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=nsekhar@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    /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

Powered by JetHome