All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
Cc: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: [PATCH 2/3] mmc: sunxi: Set the 'New Timing' register for 8 bits DDR transfers
Date: Thu, 21 Jul 2016 10:56:15 +0200	[thread overview]
Message-ID: <20160721085615.GG5993@lukather> (raw)
In-Reply-To: <bc7b767cad6db159a44c4b98d5b1f3eb53c26bd3.1469082481.git.moinejf-GANU6spQydw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

Hi,

On Wed, Jul 20, 2016 at 08:16:28PM +0200, Jean-Francois Moine wrote:
> The 'new timing mode' with 8 bits DDR works correctly when the NewTiming
> register is set.

What does that mode brings to the table?

> 
> Signed-off-by: Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
> ---
> Note about the 'new timing mode'.
> 
> This patch assumes that, when the new mode is used, the clock driver
> sets the mode select in the MMC clock and multiplies the clock rate
> by 2:
> - MMC side:
>   - with a timing 8 bits DDR at 50MHz, the MMC driver calls
>     clk_set_rate() with a rate 50*2 = 100MHz,
> - clock side:
>   - the clock driver sets the hardware MMC clock to 100*2 = 200MHz,
>   - setting the 'mode select' of the hardware MMC clock divides the
>     rate by 2,
> - MMC side:
>   - setting the MMC clock divider register to 1 divides the rate by 2.
> So, the final rate is 50MHz.

What happens if you actually want to set it to 100MHz?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] mmc: sunxi: Set the 'New Timing' register for 8 bits DDR transfers
Date: Thu, 21 Jul 2016 10:56:15 +0200	[thread overview]
Message-ID: <20160721085615.GG5993@lukather> (raw)
In-Reply-To: <bc7b767cad6db159a44c4b98d5b1f3eb53c26bd3.1469082481.git.moinejf@free.fr>

Hi,

On Wed, Jul 20, 2016 at 08:16:28PM +0200, Jean-Francois Moine wrote:
> The 'new timing mode' with 8 bits DDR works correctly when the NewTiming
> register is set.

What does that mode brings to the table?

> 
> Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
> ---
> Note about the 'new timing mode'.
> 
> This patch assumes that, when the new mode is used, the clock driver
> sets the mode select in the MMC clock and multiplies the clock rate
> by 2:
> - MMC side:
>   - with a timing 8 bits DDR at 50MHz, the MMC driver calls
>     clk_set_rate() with a rate 50*2 = 100MHz,
> - clock side:
>   - the clock driver sets the hardware MMC clock to 100*2 = 200MHz,
>   - setting the 'mode select' of the hardware MMC clock divides the
>     rate by 2,
> - MMC side:
>   - setting the MMC clock divider register to 1 divides the rate by 2.
> So, the final rate is 50MHz.

What happens if you actually want to set it to 100MHz?

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160721/39cd3e0c/attachment.sig>

  parent reply	other threads:[~2016-07-21  8:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21  6:28 [PATCH 0/3] mmc: sunxi: Changes in the host driver Jean-Francois Moine
2016-07-21  6:28 ` Jean-Francois Moine
     [not found] ` <cover.1469082481.git.moinejf-GANU6spQydw@public.gmane.org>
2016-07-20 18:01   ` [PATCH 1/3] mmc: sunxi: Check the value returned by clk_round_rate Jean-Francois Moine
2016-07-20 18:01     ` Jean-Francois Moine
     [not found]     ` <c2231f3df66cf77e4fb9051f7b0c27ea69b8e63d.1469082481.git.moinejf-GANU6spQydw@public.gmane.org>
2016-07-21  8:49       ` Maxime Ripard
2016-07-21  8:49         ` Maxime Ripard
2016-07-20 18:16   ` [PATCH 2/3] mmc: sunxi: Set the 'New Timing' register for 8 bits DDR transfers Jean-Francois Moine
2016-07-20 18:16     ` Jean-Francois Moine
     [not found]     ` <bc7b767cad6db159a44c4b98d5b1f3eb53c26bd3.1469082481.git.moinejf-GANU6spQydw@public.gmane.org>
2016-07-21  8:56       ` Maxime Ripard [this message]
2016-07-21  8:56         ` Maxime Ripard
2016-07-21  9:26         ` Jean-Francois Moine
2016-07-21  9:26           ` Jean-Francois Moine
     [not found]           ` <20160721112655.941b1dad04f7a5b94d4172c1-GANU6spQydw@public.gmane.org>
2016-07-29 19:17             ` Maxime Ripard
2016-07-29 19:17               ` Maxime Ripard
2016-07-30  5:18               ` Jean-Francois Moine
2016-07-30  5:18                 ` Jean-Francois Moine
2016-07-30 10:19               ` [linux-sunxi] " Hans de Goede
2016-07-30 10:19                 ` Hans de Goede
     [not found]                 ` <9414aab0-ac2b-01c2-e16b-8f7394ea7b68-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-08-01 13:52                   ` Jean-Francois Moine
2016-08-01 13:52                     ` [linux-sunxi] " Jean-Francois Moine
     [not found]                     ` <20160801155246.b7b3c7f0f582394b4c25f6dc-GANU6spQydw@public.gmane.org>
2016-08-02  8:37                       ` Hans de Goede
2016-08-02  8:37                         ` [linux-sunxi] " Hans de Goede
2016-07-29 19:36             ` Maxime Ripard
2016-07-29 19:36               ` Maxime Ripard
2016-07-30  5:20               ` Jean-Francois Moine
2016-07-30  5:20                 ` Jean-Francois Moine
2016-07-20 18:28   ` [PATCH 3/3] mmc: sunxi: Add support to the Allwinner A83T Jean-Francois Moine
2016-07-20 18:28     ` Jean-Francois Moine
2016-07-21  8:58     ` Maxime Ripard
2016-07-21  8:58       ` Maxime Ripard
2016-07-21  9:18       ` Jean-Francois Moine
2016-07-21  9:18         ` Jean-Francois Moine
     [not found]         ` <20160721111851.133a3f16d6e9de1ee45b3654-GANU6spQydw@public.gmane.org>
2016-07-22 19:00           ` Jean-Francois Moine
2016-07-22 19:00             ` Jean-Francois Moine

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=20160721085615.GG5993@lukather \
    --to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=moinejf-GANU6spQydw@public.gmane.org \
    --cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=wens-jdAy2FN1RRM@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.