From patchwork Mon Aug 12 12:10:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kever Yang X-Patchwork-Id: 1145690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rock-chips.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pZeAayT+"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 466ZSd6GW2z9sN1 for ; Mon, 12 Aug 2019 22:11:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 726CDC21EF7; Mon, 12 Aug 2019 12:11:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0644CC21CB1; Mon, 12 Aug 2019 12:10:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0BB9CC21CB1; Mon, 12 Aug 2019 12:10:56 +0000 (UTC) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by lists.denx.de (Postfix) with ESMTPS id 52CCDC21C29 for ; Mon, 12 Aug 2019 12:10:56 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id r7so49593304pfl.3 for ; Mon, 12 Aug 2019 05:10:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=DfwpWHJwpCMohTb5gy1hwZWuUIcl4RAQoRrLJzebY2g=; b=pZeAayT+wsF2xAo9BkF0f2SzZb+d2ZEOB6eIxKa9u4sUALCcjhT1FfADClLVlSm1a1 5eFRVJIznQJcKmoDU1Ga6NX4Nr/Nt2gv49Xq2iUSL89pp/n36X/UCwdzpEt+PETL1gPX EzOFI1Ff5QzaiUGl+ZrHe12Y2dvdqvh6xYnk1PjDcDW4eOmruOA33ybvAMoyY3ezGgVU DuEsPAfM3BBO3x1n7graThrgfoIsI5PAHN9n+fl4/Kgf3UrhfHYiv9LD8cHf33zf/IF2 nAqFAQnVTwe1e8vfmMbeNiY/Lsufw3PRQy/c8FIZkJDMaO3EVlf7fBD7Rii1++Oiavb6 1Kdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=DfwpWHJwpCMohTb5gy1hwZWuUIcl4RAQoRrLJzebY2g=; b=ra+YHXBrtJcIhRH8hzbVAU2FfDaOuWMf3nBsIan71oAH6wEEyknUPhmyJoPLbbOyuq j6POH88xxtsETrpgvbaQ+ZBBF0qJGWDDfv9ulHjJ/V0mLqeuVrHaZTP0QjvAcMX3FS+K ULGiXpkG7TitqVKyT/XAkZUe+Lzgon70Xasw1HSRSueKsCqAefeezKCjnFT4awhNrVH7 z3xYyBshukL94u9SpdwC1XeDT5g11NLcO2TzqCBQaaup32CR7ivfmoTGkwRMVnmifs8p IL7U7YuM3NYknmeEx/HPq88Ve1Spe1qjFJA1NZGQfmbOPEgC7HzZxgXgGokPzdU3lJRM U+QQ== X-Gm-Message-State: APjAAAWatUItPaoSNo28n+2gjC5+szGtldyqjmbmIY1cECq+wMiUAW8a fARA+ot2ZWVAtAW+vPUqS7hRyfvSUW8= X-Google-Smtp-Source: APXvYqzaY1jBZDOXJz4/7nHLYEEij87NJecoeS67TJSb4FlayUU1gtjf6HjlvwF30Bg2+d1KIoFMAQ== X-Received: by 2002:a65:500a:: with SMTP id f10mr30010675pgo.105.1565611854377; Mon, 12 Aug 2019 05:10:54 -0700 (PDT) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id a15sm147625859pfg.102.2019.08.12.05.10.52 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 05:10:54 -0700 (PDT) From: Kever Yang To: u-boot@lists.denx.de Date: Mon, 12 Aug 2019 20:10:30 +0800 Message-Id: <20190812121030.21195-1-kever.yang@rock-chips.com> X-Mailer: git-send-email 2.17.1 Cc: YouMin Chen Subject: [U-Boot] [PATCH] rockchip: ram: rk3399: fix setting for some type of dram X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" We need to store all the ram related cap/map info back to register after all the init has been done in case some of register was reset during the process. Signed-off-by: YouMin Chen Signed-off-by: Kever Yang --- drivers/ram/rockchip/sdram_rk3399.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 81fc71c051..edbc34327c 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -2592,8 +2592,11 @@ static int sdram_init(struct dram_info *dram, } sdram_print_ddr_info(cap_info, ¶ms->base); + set_memory_map(chan, channel, params); + cap_info->ddrconfig = calculate_ddrconfig(params, channel); set_ddrconfig(chan, params, channel, cap_info->ddrconfig); + set_cap_relate_config(chan, params, channel); } if (params->base.num_channels == 0) {