From patchwork Mon Jun 17 07:31:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 578 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2F3F23F072 for ; Mon, 17 Jun 2019 09:36:46 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id l184sf7185469pgd.18 for ; Mon, 17 Jun 2019 00:36:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1560757004; cv=pass; d=google.com; s=arc-20160816; b=s787vZeQ8hXi1ENTc12ivntkVO8YF8c/RKiKRa+D/l9lLA1pQkrhCaZjYBzIFijC+d J/CUoEyq+XplmqKaZ+3Ml4+FzdxPwZ5DYiTm86OiziGQtl7CThvO1ZHwjwwbEi2KRyJR 6Wv6LsUJMkkJYpEmRC9obQxd6yZKqER+3r7cU/LND9wzLVZLH0SA9IDbK7Qi2i8a2c/U 9T+h3mdbx/HFCez8by1qt1bWcj4R2W02p6CuyM9XdLuaGPjmVETMBLFxRchBskrSfXur nHwpN8s3SQ4+VjlUPScJQBLEr3UolV6OAuisJMm6MejzywqCxq9I8pARWUpIi8A1O7g5 aA6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=i8R6D1Q4iXf4CQVibmOLr+/AbpCBWAgCHLfvT8HSgPo=; b=XFF+MbgM2e89Nfqa1WYOfdsJUGutfsLQfajxe8O239Z2aocKvf3i8I01cTBNy0u92G pvPqlgpvXifMYtRe29B7IpulEzR2eM/qpgtBAm3N2fByKevhnE73lBnlnVIjIZefI8Cx 8agdYGpkYpKOv2sK+84I1TKz3WWzVDn+C8pAnUi8+v59nUvTmkHOGZ81Bw7KwwGx1pXB TIk1cuic847MW03G8SgqBgApuu1ohZb3zB5xWG/3s8H0SdM7pofzdIjUxjx9yqihlOtC H0W+Nj52rCmOUq2xs9JfBKa8NnPNsJ+TMtBVpDH4lh07ZDNtYwwMamltq81xtXIVXYus 8OaA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aJs5q9wt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=i8R6D1Q4iXf4CQVibmOLr+/AbpCBWAgCHLfvT8HSgPo=; b=h86b2E/IJOeGHh+VRs4nKsD6lX2sQC6dundnOTNNlxVEMvQfFuo7jis59yfeGJCfKC dCGuzrdFx3XeVMCTboADPAdTD6ZBniGidkI6dUOcpZ4li1c2Mpi0Z1HP4lN8cWNYDh2S jJJ60YlG/KdD2BlP2ymZ9Np7N/oaPC7VvL+0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=i8R6D1Q4iXf4CQVibmOLr+/AbpCBWAgCHLfvT8HSgPo=; b=UGmV5JqMdr2qdVdA7MJ5NKF78CmdcdgcZncNMIQCwxkcDzc1Og2eADJcMteLxj2oUv XqqeNOHH/vLOyIDw0nSVZFun9cJaJb1pM3v28QiY7gLwSEkJulzniK8aoo/gKdLw0oYk bAkWs/FXbdOg87v0Hg8uiSa2EOX/3VTZgnYryhxIzl9/beYgFumCJegq7fCtlgjrzrXe o7NksCSYpbs55QBZZFTYF+9MoWCpEZnu9bkAyT4y9ew3M9l4a65a97h/7P5mzWztIZcl dBRMhDlC+NymU0jCYUq6I5Jo0VM7N2Vhcbs9R9oksXay/zEiO2vRmxxFZZNPjowytR4v 7QRA== X-Gm-Message-State: APjAAAXQCRG3Ns96tgJPUwk8RAm297EHF+wE5GWuZmcyEzB4OIkMlKAF fereA4pxDmNYhrwI97Jt0VVCc2b8 X-Google-Smtp-Source: APXvYqyZt8CWsuo4g4ASeROVVfeSfdSh+++3oDTapmI9FHjmgHf+5EPWdLI9hSgVSOfKVgc3ijTxaA== X-Received: by 2002:aa7:9f8b:: with SMTP id z11mr46555647pfr.121.1560757004861; Mon, 17 Jun 2019 00:36:44 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a62:3483:: with SMTP id b125ls3367189pfa.11.gmail; Mon, 17 Jun 2019 00:36:44 -0700 (PDT) X-Received: by 2002:a65:4806:: with SMTP id h6mr46309547pgs.299.1560757004463; Mon, 17 Jun 2019 00:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560757004; cv=none; d=google.com; s=arc-20160816; b=teC53YEkSKQuwvG5o/hDw1vR6XtHR8i5ujlUijJhfyEVLAEwBTiOEVSZG+rpVHP3di YWkoU+nnhKkaRJgP/mhzSzWB4DqXeOXylUIMYQHZDAj/f8WQK8xM9J3h87TWPSgWjbUq fg3ik5pwJA3jNKjGCLLwvp5lfctURKMFKr+x+tF8zINdd2At9eYABycJQTgHgUbmIAMh 4cWrunVrjQV43VWUK0YELlckxnbNnCCw3SgH+CbVvJQ+ESGkVdl9yHUdXtBSbOlPGIki B97RRZuDv5xCfYV7UDs7BDeelHN6zY1QOWK0c1BB4BW0wOg1QBqtG+z0KtMHAXU0RMZQ Zf4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=LMKxiuvAOryuoILHVyH5XgsTExftYqEOkhz0pjdExb8=; b=o4bOLFiVqv9npjgxvyei/aCQ+tO4u+PrMB+naSIkIcLAhgcvgjTUGo8eroNrbgtKzL BiD75UWRskBeV+bfzk6RYAZa8j8tyAs3Wk4GfFVz3FoKRUrRBTCdNexuXA2pBfNv241Y Ib2E/b0MMYEeoXc3VzKr6is3sW7laEID1g5qZoX+IOS7QzU9sD2gm+fQjV1jabfnspLJ NGqHE2ZJI8iOuKZeCwE2TWP2US12hPADx8eTgveqxhlALZUJo8x1lMnGdco11x4rThzV tdhXcNn0+uD/IPIs6cyq5kreuarQ0RW9pgfUngGX5ctl5qmqn7qkwBPBhASRdPJBCElH ieuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aJs5q9wt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id c4sor10298565pgm.40.2019.06.17.00.36.44 for (Google Transport Security); Mon, 17 Jun 2019 00:36:44 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:e250:: with SMTP id y16mr46691465pgj.392.1560757004086; Mon, 17 Jun 2019 00:36:44 -0700 (PDT) Received: from localhost.localdomain ([49.206.203.245]) by smtp.gmail.com with ESMTPSA id m41sm15205998pje.18.2019.06.17.00.36.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 00:36:43 -0700 (PDT) From: Jagan Teki To: Simon Glass , Philipp Tomsich , Kever Yang , YouMin Chen , u-boot@lists.denx.de Cc: Manivannan Sadhasivam , gajjar04akash@gmail.com, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v2 07/99] ram: rk3399: Move macro after include files Date: Mon, 17 Jun 2019 13:01:20 +0530 Message-Id: <20190617073252.27810-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190617073252.27810-1-jagan@amarulasolutions.com> References: <20190617073252.27810-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aJs5q9wt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Move the macro definitions after include files for better code readability and to satisfy coding style. Signed-off-by: Jagan Teki --- drivers/ram/rockchip/sdram_rk3399.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index e6f52c9f59..20a3e89c17 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -22,6 +22,19 @@ #include #include +#define PRESET_SGRF_HOLD(n) ((0x1 << (6 + 16)) | ((n) << 6)) +#define PRESET_GPIO0_HOLD(n) ((0x1 << (7 + 16)) | ((n) << 7)) +#define PRESET_GPIO1_HOLD(n) ((0x1 << (8 + 16)) | ((n) << 8)) + +#define PHY_DRV_ODT_HI_Z 0x0 +#define PHY_DRV_ODT_240 0x1 +#define PHY_DRV_ODT_120 0x8 +#define PHY_DRV_ODT_80 0x9 +#define PHY_DRV_ODT_60 0xc +#define PHY_DRV_ODT_48 0xd +#define PHY_DRV_ODT_40 0xe +#define PHY_DRV_ODT_34_3 0xf + struct chan_info { struct rk3399_ddr_pctl_regs *pctl; struct rk3399_ddr_pi_regs *pi; @@ -43,19 +56,6 @@ struct dram_info { struct rk3399_pmugrf_regs *pmugrf; }; -#define PRESET_SGRF_HOLD(n) ((0x1 << (6 + 16)) | ((n) << 6)) -#define PRESET_GPIO0_HOLD(n) ((0x1 << (7 + 16)) | ((n) << 7)) -#define PRESET_GPIO1_HOLD(n) ((0x1 << (8 + 16)) | ((n) << 8)) - -#define PHY_DRV_ODT_HI_Z 0x0 -#define PHY_DRV_ODT_240 0x1 -#define PHY_DRV_ODT_120 0x8 -#define PHY_DRV_ODT_80 0x9 -#define PHY_DRV_ODT_60 0xc -#define PHY_DRV_ODT_48 0xd -#define PHY_DRV_ODT_40 0xe -#define PHY_DRV_ODT_34_3 0xf - #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD))