All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kever Yang <kever.yang@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] ram: rk3328: Use correct frequency units in function
Date: Tue, 8 Oct 2019 10:55:15 +0800	[thread overview]
Message-ID: <5f27cfa6-0574-848c-af3d-66cdbccf2988@rock-chips.com> (raw)
In-Reply-To: <c633e31b9ceb238153d8f767a2d5681deaaa8985.1570376078.git.simon@simonsouth.net>


On 2019/10/7 上午12:28, Simon South wrote:
> Fix a pair of tests in phy_dll_bypass_set() that used incorrect units
> for the DDR frequency, causing the DRAM controller to be misconfigured
> in most cases.
>
> Signed-off-by: Simon South <simon@simonsouth.net>


Reviewed-by: Kever Yang<kever.yang@rock-chips.com>


Thanks,
- Kever
> ---
>   drivers/ram/rockchip/sdram_rk3328.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ram/rockchip/sdram_rk3328.c b/drivers/ram/rockchip/sdram_rk3328.c
> index 656696ac3c..0541bbadf0 100644
> --- a/drivers/ram/rockchip/sdram_rk3328.c
> +++ b/drivers/ram/rockchip/sdram_rk3328.c
> @@ -311,12 +311,12 @@ static void phy_dll_bypass_set(struct dram_info *dram, u32 freq)
>   	setbits_le32(PHY_REG(phy_base, 0x56), 1 << 4);
>   	clrbits_le32(PHY_REG(phy_base, 0x57), 1 << 3);
>   
> -	if (freq <= (400 * MHz))
> +	if (freq <= 400)
>   		/* DLL bypass */
>   		setbits_le32(PHY_REG(phy_base, 0xa4), 0x1f);
>   	else
>   		clrbits_le32(PHY_REG(phy_base, 0xa4), 0x1f);
> -	if (freq <= (680 * MHz))
> +	if (freq <= 680)
>   		tmp = 2;
>   	else
>   		tmp = 1;

  reply	other threads:[~2019-10-08  2:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-06 16:28 [U-Boot] [PATCH 0/2] Fix memory instability on ROCK64 Simon South
2019-10-06 16:28 ` [U-Boot] [PATCH 1/2] ram: rk3328: Use correct frequency units in function Simon South
2019-10-08  2:55   ` Kever Yang [this message]
2019-10-14 10:07     ` [U-Boot] [PATCH 1/2] ram: rk3328: Use correct frequency units in function【请注意,邮件由u-boot-bounces@lists.denx.de代发】 " Kever Yang
2019-10-06 16:28 ` [U-Boot] [PATCH 2/2] ram: rk3328: Fix loading of skew values Simon South
2019-10-08  2:55   ` Kever Yang
2019-10-14 10:06     ` [U-Boot] [PATCH 2/2] ram: rk3328: Fix loading of skew values【请注意,邮件由u-boot-bounces@lists.denx.de代发】 Kever Yang
2019-10-07  4:25 ` [U-Boot] [PATCH 0/2] Fix memory instability on ROCK64 Kurt Miller

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=5f27cfa6-0574-848c-af3d-66cdbccf2988@rock-chips.com \
    --to=kever.yang@rock-chips.com \
    --cc=u-boot@lists.denx.de \
    /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.