linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: Samsung/S3C6410/Mini6410: how to handle NAND's "clock off"
Date: Tue, 11 Nov 2014 19:42:26 +0100	[thread overview]
Message-ID: <20141111184226.GH27002@pengutronix.de> (raw)
In-Reply-To: <201411111910.34231.juergen@kreuzholzen.de>

On Tue, Nov 11, 2014 at 07:10:33PM +0100, Juergen Borleis wrote:
> Hi,
> 
> the S3C2410 NAND driver [1] can still be used for NANDs attached to an S3C6410
> SoC. But this driver has a "nice" feature called "clock off" to save some
> power while not in use. I tried it here on my Mini6410 platform and it freezes
> the system.
> 
> The clock tree is somehow:
> 
> [...]
>   hclk                      4            4   133000000          0 0
>      hclk_mfc               0            0   133000000          0 0
>      hclk_mem0              2            2   133000000          0 0
>         mem0_srom           0            0   133000000          0 0
>         mem0_nfcon          1            1   133000000          0 0
>         mem0_onenand0       0            0   133000000          0 0
>         mem0_onenand1       0            0   133000000          0 0
>         mem0_cfcon          0            0   133000000          0 0
> [...]
> 
> On the Mini6410 the "mem0_nfcon" clock is the only single user of the
> "hclk_mem0". And this clock is required to keep the access to the external
> network device enabled. When the NAND driver disables its clock "mem0_nfcon",
> the "hclk_mem0" gets also disabled because there is no consumer anymore. The
> next time the network driver tries to access its device, the SoC freezes.
Sounds like the network driver should hold a reference to hclk_mem0. I
assume the system uses a device tree? This is the dm9000 driver? It
doesn't seem to use clk stuff, but it should be possible to add an
optional clk entry.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2014-11-11 18:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 18:10 Samsung/S3C6410/Mini6410: how to handle NAND's "clock off" Juergen Borleis
2014-11-11 18:42 ` Uwe Kleine-König [this message]
2014-11-12  9:14   ` Uwe Kleine-König
2014-11-12 12:00     ` Juergen Borleis

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=20141111184226.GH27002@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --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).