linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] ARM: kirkwood: Ensure that kirkwood_ge0[01]_init() finds its clock
Date: Wed, 30 Jan 2013 01:51:18 +0100	[thread overview]
Message-ID: <51086E86.8040705@gmail.com> (raw)
In-Reply-To: <20130130000341.GA10600@schnuecks.de>

On 01/30/2013 01:03 AM, Simon Baatz wrote:
> On Tue, Jan 29, 2013 at 09:08:46PM +0100, Sebastian Hesselbarth wrote:
>> Well, if there is no device/driver using runit it should be safe to disable
>> it. If there is a driver using it, we need a clocks property for it. And
>> as you already stated, serial is using it. And you want serial in every
>> minimal kernel, don't you?
>
>  From f479db4:
>
>   Marvell engineers tell us:
>
>   It seems that many units use the RUNIT clock.
>   SPI, UART, NAND, TWSI, ...
>   So it's not possible to clock gate it.
>
>   Currently the SPI, NAND and TWSI driver will clk_prepaure_enable()
>   this clk, but since we have no idea what ... is, and turning this clk
>   off results in a hard lock, unconditionally enable runit.
>
>
> Thus, if we know better than that, that's fine, but please don't tell
> me that this is "blindly" enabling clocks.

Hmm, should have seen that comment ealier. Based on your/Andrew's statement
above using CLK_IGNORE_UNUSED on runit maybe is the best.

So I guess we take patch 2/2 and extend DT clock gating for .flags later?

> So, we have a statement from Marvell not to gate it, we know that it
> is needed for "...", can we please not gate it?

Ack.

>>>>> 3.8-rc5 + runit + Sebastians get smi clock patch (modified to use
>>>>> legacy clock names):
>>>>>
>>>>> DT: Boots, but no MAC
>>>>> non-DT: Boots ok
>>>
>>> This is the behavior originally found by Andrew. The clock patch
>>> eliminates the lockup, but the hardware forgets its MAC address.

For the smi clock issue: DT is fixed by the smi clock patch, right?
non-DT should be fixed in kirkwood_clk_init() with an orion_clkdev_add()
alias for MV643XX_ETH_SHARED_NAME ".0" and ".1" respectively.

For the MAC address issue: non-DT doesn't need to be fixed, right?
DT clock gates should be fixed in kirkwood_legacy_clk_init which will
also save the clk_get_sys() call. We can easily remove it when mv643xx_eth
catches the MAC address from either local-mac-address or ATAG.

> Fine with all of that. But: I am talking about 3.8 all the time. We
> have three options for issues 2 and 3 from my point of view:
>
> 1. We do proper fixes in 3.8 for issues 2 and 3.
>
> 2. We fix this regression by not gating the clock in both the DT and
> the non-DT case, preferably by using the correct clocks in
> kirkwood_ge0[01]_init().  Additionally, Jason promises that all gets
> well with the DT aware driver in 3.9.  ;-)
>
> 3. Do nothing. Simply accept that we broke modular Ethernet for DT
> because some code relies on two pointers being set.  When we
> introduced a new code path for DT, we forgot about these pointers.
> Bad luck, the solution was not nice anyway and we will do proper
> fixes in 3.9.
>
> As should be clear by now, I think we should go for option 2.

Agreed, do you think all issues you are suffering will be solved with:

- [PATCH v2 2/2] clk: mvebu: Do not gate runit clock on Kirkwood
   (no lockup for minimal kernel configs)

- [PATCH] NET: mv643xx: get smi clock from device tree
   (no lockup for modular DT ethernet)

- Some patch that adds MV643XX_ETH_SHARED_NAME ".0" and ".1" clk aliases
   (no lockup for modular non-DT ethernet)

- Some patch that adds clk_prepare_enable to ge0/ge1 clocks to
   kirkwood_legacy_clk_init()
   (retain MAC address for modular DT ethernet)

I'll prepare the latter patches and post them.

Sebastian

  reply	other threads:[~2013-01-30  0:51 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-27 10:40 [PATCH v2 0/2] Do not gate ge0/1 and runit clocks on Kirkwood Simon Baatz
2013-01-27 10:40 ` [PATCH v2 1/2] ARM: kirkwood: Ensure that kirkwood_ge0[01]_init() finds its clock Simon Baatz
2013-01-27 10:52   ` Sebastian Hesselbarth
2013-01-27 11:08     ` Simon Baatz
2013-01-27 11:18       ` Sebastian Hesselbarth
2013-01-27 14:19       ` Sebastian Hesselbarth
2013-01-27 14:46         ` Jason Cooper
2013-01-27 14:53           ` Sebastian Hesselbarth
2013-01-27 15:24             ` Jason Cooper
2013-01-28 22:31               ` Simon Baatz
2013-01-29  0:48                 ` Jason Cooper
2013-01-29 19:42                   ` Simon Baatz
2013-01-29 20:08                     ` Sebastian Hesselbarth
2013-01-29 20:32                       ` Jason Cooper
2013-01-29 20:48                         ` Sebastian Hesselbarth
2013-01-29 21:23                           ` Jason Cooper
2013-01-30 22:43                           ` Jason Cooper
2013-01-30 23:05                             ` Jason Gunthorpe
2013-01-31  0:29                               ` Jason Cooper
2013-01-31  0:39                                 ` Jason Gunthorpe
2013-01-30  0:03                       ` Simon Baatz
2013-01-30  0:51                         ` Sebastian Hesselbarth [this message]
2013-01-30  4:26                           ` Jason Cooper
2013-01-30  8:30                           ` Simon Baatz
2013-01-30 10:16                             ` Sebastian Hesselbarth
2013-01-30 14:53                               ` Simon Baatz
2013-01-30 23:01                               ` Jason Cooper
2013-01-30 23:15                                 ` Jason Gunthorpe
2013-01-31  0:40                                   ` Jason Cooper
2013-01-30 23:22                                 ` Sebastian Hesselbarth
2013-01-31  0:32                                   ` Jason Cooper
2013-01-31 22:26                                     ` Simon Baatz
2013-01-31 22:44                                 ` Simon Baatz
2013-01-31 22:49                                   ` Sebastian Hesselbarth
2013-02-01  0:11                                     ` Jason Cooper
2013-02-01  0:01                                   ` Jason Cooper
2013-02-01  0:19                                     ` Jason Gunthorpe
2013-02-01  6:14                                       ` Andrew Lunn
2013-02-01  6:46                                         ` Jason Gunthorpe
2013-02-02 23:04                                       ` Simon Baatz
2013-02-03 16:45                                         ` Jason Cooper
2013-01-28 18:28             ` Jason Gunthorpe
2013-01-29  6:56               ` Andrew Lunn
2013-01-29 17:29                 ` Jason Gunthorpe
2013-01-28 18:22     ` Jason Gunthorpe
2013-01-28 19:46       ` Jason Cooper
2013-01-29 19:54         ` Simon Baatz
2013-01-29 21:13           ` Jason Cooper
2013-01-28 20:26       ` Jason Cooper
2013-01-27 10:40 ` [PATCH v2 2/2] clk: mvebu: Do not gate runit clock on Kirkwood Simon Baatz
2013-01-27 10:55   ` Sebastian Hesselbarth

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=51086E86.8040705@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).