From patchwork Mon Jul 29 07:46:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 810 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 3B7023F0E1 for ; Mon, 29 Jul 2019 09:47:28 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id 21sf37951549pfu.9 for ; Mon, 29 Jul 2019 00:47:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1564386447; cv=pass; d=google.com; s=arc-20160816; b=kgtrOoz83QSFGaM7PmNxaYHJwYsjc2iTCIP2gUwB9hwzDa3Mnh5/zRQ7EB/3LtULUe 1Z2rWcXDcmuzjXdnVKSzt5Q33BYghJnGriKl4F2/MbFlOu6b0ZguSKOGhvAf4WPQ3Dhd nNANxBq3fRSDHhXQS+Ifwu4ZKf79w9NhyMS+xSGBlzLpqEk7E4h/oVwBuvtp9HAupCHw BLcwuAWFNitk/zAHCrO5rQOzHc16hypSH6tohR7a39WzHFFv3vOljlpAZKxbEk3x1Ls2 pQtdsXmeDdaubVFmQHP5c/anTKJ7slhXFoM1FpOA0KVt7q75YG7afd3Kg2/4bPAUCZDj olWw== 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=jixxZKbOK9I1bIfwu0mz4ytgbaBdl6IxmVWTWBYb93I=; b=nfufTYZp9DMaS81UuCrnCaXew72zeR2VHnAa6rFBg+XOs52ncN7IBBFcjO5k49QnFw 5EAbDctgbeZPUnqerzKuvgnAfqI6ubrt6Yre26bAlOF5jkvirWuroIlevI4FK27zhvfF In20XwDMGqLAG7IJw2MMVmJPt+MVJUTghq+GfW3tJu50oGqnGnVa+UnLKoWwStxzz/fC CInm+WRs3ydNbc0ua4GU8/VHP4s3cqZk0yEVBpxIe124m1lQeiJ95ZrJrGHdegf1tn5s Wkj/R/RMWuvcxmoHT7T8fNlX3zS5D6ZI+pS5sjG/0FljnnvXwphuFUv/Ws5u79UyrDdM vlVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Cf3TC4YQ; 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=jixxZKbOK9I1bIfwu0mz4ytgbaBdl6IxmVWTWBYb93I=; b=NSPXvVqkOyvCP+gANY1XNP62fWdWV1YULp5i+6J3bz/giW2CcsvyXXFG4LORlUCXrR Ojx9bndF/IfdGISQNTRv+kOio0ndmsC2CoW6+8Nj1wTdMtxa2z4Sdvglp0OpX4qHNmvy VFDuW+KpIFdlDDK2OSYuzX7P2W0Y3N4eAZ8NM= 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=jixxZKbOK9I1bIfwu0mz4ytgbaBdl6IxmVWTWBYb93I=; b=VmVJxEA+oHqAzZIP7srFCLk5bsFiUtrfYh+NrKWb891FurqXqw2ePQrSJumXTHsadx HKGe/A5F2JOL9byqTbVt9mIZIsfDmyXrlBSO69nKUXjJm/SA3rf1ApESStvRV3JkFhem Syj8qKnzKVQb1nq5J8iZXy+8YybS1j0ZlR3A704dFzrbYgNLtW7UEVonXSR38M8PQjfI DwZ15LzYLchf9i/5+mHrW5gJZeuff99NKDVFALd8y5RG7Ft/D/RqzmSnYf2gxM1ebNHv Fv54zZ4eKo8uMgIAI56P3MYfOf+lXNeWJShIoluvYpFTEbOd+azesxlYn4X3qgyJFZN5 NkQg== X-Gm-Message-State: APjAAAWDvVB0DcJtQJuNR/u4lKx5jw+pptiVpvIBK2yjJX9y6tDjFqZd wPNb75JTdCSrG2E1Y3Y+Tg9J4OYT X-Google-Smtp-Source: APXvYqwWKWHopNC0nTMsubjtkt1UY7rf0iPWFSyH0vgjMs7eKs7c6ZavXtqFDthW2Q3r3gDD3P7EKA== X-Received: by 2002:a17:902:f301:: with SMTP id gb1mr106898307plb.292.1564386447004; Mon, 29 Jul 2019 00:47:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:372f:: with SMTP id u44ls20990690pjb.5.canary-gmail; Mon, 29 Jul 2019 00:47:26 -0700 (PDT) X-Received: by 2002:a17:902:583:: with SMTP id f3mr108119254plf.137.1564386446633; Mon, 29 Jul 2019 00:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564386446; cv=none; d=google.com; s=arc-20160816; b=dc51U6hbf8u4WXvxTPUWBTbr+ZrlLfIG3NCHb+ZGZg38sMHbPKFYUk/ruFum08CTB8 h9XMQ0rY3uv8pDqKiiV2JAyrPVRXW46k6NmOltmuUT/f2FbWthsHSbdq3gh12FG9+Q4X bVZAi/u/a4rbUEpFIjRUpPGbQqAJSiQOQaDG00I3hDgftPxk9if2sIW1Aw6CUhvInF3W ycYk/hl1IvwkSK2d3bnkwCjBQY0h9FJH5wfJQoLPXxWiXTAmYPeGWe3nfR2YD2rM3Adr 406CIOU9YBJnmRtYAV/DQYj8JAi54HwFUs4XdjYA/6vdt4BAkkBBIzMdB/3Sx7vtzAWz Lc2g== 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=8OIOV+UE8ZbIkjguEi4aoCp9GMNHCgAZTjnew6eqK2M=; b=qxKFytW8PtbVrK0alr9zMcTCSv+CAvSi59EN8SJdg3Wa8qsqI8jwTfG1ANFvb7TJEH cfTt0gPqvypwy8VH9cqreiplxqFPejjuc+mR1cS4hnqndKlitBcKpyUXEuM+VeYCkeW9 8gtPN4PE1aYDilMa1AJkDqQuy8SWy0EOm1AIJsYbEavmZDSZT7NyhDAeFKQginuakZB9 vmVRNs3nZKm4pHBB+OgHrEOTr7FWzYNsahOqihhow4MPIgOinLjloEQ+raiHWOA6oyRh rllVxZiXb319brzHdLdytIHW29+XMH1V65IyuiyjbjLXBvHAzuFY3FnCjsJ9rtEqE3T8 uAdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Cf3TC4YQ; 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 h63sor74340754pjb.6.2019.07.29.00.47.26 for (Google Transport Security); Mon, 29 Jul 2019 00:47:26 -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:a17:90a:a404:: with SMTP id y4mr114436155pjp.58.1564386445900; Mon, 29 Jul 2019 00:47:25 -0700 (PDT) Received: from localhost.localdomain ([49.206.203.41]) by smtp.gmail.com with ESMTPSA id h14sm75723348pfq.22.2019.07.29.00.47.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 00:47:25 -0700 (PDT) From: Jagan Teki To: Kever Yang , Simon Glass , Philipp Tomsich Cc: Akash Gajjar , u-boot@lists.denx.de, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 01/15] arm: rockchip: Add common cru.h Date: Mon, 29 Jul 2019 13:16:57 +0530 Message-Id: <20190729074711.16988-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190729074711.16988-1-jagan@amarulasolutions.com> References: <20190729074711.16988-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=Cf3TC4YQ; 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: , Few of the rockchip family SoC atleast rk3288, rk3399 are sharing some cru register bits so adding common code between these SoC families would require to include both cru include files that indeed resulting function declarations error. So, create a common cru include as cru.h then include the arch cru include file and move the common cru register bit definitions into it. Signed-off-by: Jagan Teki --- arch/arm/include/asm/arch-rockchip/cru.h | 16 ++++++++++++++++ arch/arm/mach-rockchip/rk3288-board.c | 2 +- arch/arm/mach-rockchip/rk3288/clk_rk3288.c | 2 +- arch/arm/mach-rockchip/rk3399-board-spl.c | 2 +- arch/arm/mach-rockchip/rk3399/clk_rk3399.c | 2 +- drivers/clk/rockchip/clk_rk3288.c | 2 +- drivers/clk/rockchip/clk_rk3399.c | 2 +- drivers/ram/rockchip/sdram_rk3288.c | 2 +- drivers/ram/rockchip/sdram_rk3399.c | 2 +- drivers/video/rockchip/rk3288_mipi.c | 2 +- drivers/video/rockchip/rk3399_mipi.c | 2 +- drivers/video/rockchip/rk_mipi.c | 2 +- 12 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 arch/arm/include/asm/arch-rockchip/cru.h diff --git a/arch/arm/include/asm/arch-rockchip/cru.h b/arch/arm/include/asm/arch-rockchip/cru.h new file mode 100644 index 0000000000..3b1a3bae71 --- /dev/null +++ b/arch/arm/include/asm/arch-rockchip/cru.h @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * (C) Copyright 2019 Amarula Solutions. + * Author: Jagan Teki + */ + +#ifndef _ROCKCHIP_CLOCK_H +#define _ROCKCHIP_CLOCK_H + +#if defined(CONFIG_ROCKCHIP_RK3288) +# include +#elif defined(CONFIG_ROCKCHIP_RK3399) +# include +#endif + +#endif /* _ROCKCHIP_CLOCK_H */ diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c index a250d50387..d3ec141fea 100644 --- a/arch/arm/mach-rockchip/rk3288-board.c +++ b/arch/arm/mach-rockchip/rk3288-board.c @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/rk3288/clk_rk3288.c b/arch/arm/mach-rockchip/rk3288/clk_rk3288.c index e64ee86f08..1730f12443 100644 --- a/arch/arm/mach-rockchip/rk3288/clk_rk3288.c +++ b/arch/arm/mach-rockchip/rk3288/clk_rk3288.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include int rockchip_get_clk(struct udevice **devp) { diff --git a/arch/arm/mach-rockchip/rk3399-board-spl.c b/arch/arm/mach-rockchip/rk3399-board-spl.c index 7154d8e5d0..5642c7f523 100644 --- a/arch/arm/mach-rockchip/rk3399-board-spl.c +++ b/arch/arm/mach-rockchip/rk3399-board-spl.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/arch/arm/mach-rockchip/rk3399/clk_rk3399.c b/arch/arm/mach-rockchip/rk3399/clk_rk3399.c index f0411c0a21..a80a46f1db 100644 --- a/arch/arm/mach-rockchip/rk3399/clk_rk3399.c +++ b/arch/arm/mach-rockchip/rk3399/clk_rk3399.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include static int rockchip_get_cruclk(struct udevice **devp) { diff --git a/drivers/clk/rockchip/clk_rk3288.c b/drivers/clk/rockchip/clk_rk3288.c index 375d7f8acb..b05becd3d0 100644 --- a/drivers/clk/rockchip/clk_rk3288.c +++ b/drivers/clk/rockchip/clk_rk3288.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/clk/rockchip/clk_rk3399.c b/drivers/clk/rockchip/clk_rk3399.c index d9950c159b..37a82788c6 100644 --- a/drivers/clk/rockchip/clk_rk3399.c +++ b/drivers/clk/rockchip/clk_rk3399.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/ram/rockchip/sdram_rk3288.c b/drivers/ram/rockchip/sdram_rk3288.c index 6bb025a851..48b479d82b 100644 --- a/drivers/ram/rockchip/sdram_rk3288.c +++ b/drivers/ram/rockchip/sdram_rk3288.c @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 81fc71c051..0801faf7a1 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/video/rockchip/rk3288_mipi.c b/drivers/video/rockchip/rk3288_mipi.c index 7c4a4cc53b..65891ce45c 100644 --- a/drivers/video/rockchip/rk3288_mipi.c +++ b/drivers/video/rockchip/rk3288_mipi.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/video/rockchip/rk3399_mipi.c b/drivers/video/rockchip/rk3399_mipi.c index a93b73400b..a5b7ba69a8 100644 --- a/drivers/video/rockchip/rk3399_mipi.c +++ b/drivers/video/rockchip/rk3399_mipi.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/drivers/video/rockchip/rk_mipi.c b/drivers/video/rockchip/rk_mipi.c index bcd039b7bc..f9280e8607 100644 --- a/drivers/video/rockchip/rk_mipi.c +++ b/drivers/video/rockchip/rk_mipi.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include