From patchwork Wed Aug 2 20:34:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 796824 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com 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=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xN55x0626z9s7v for ; Thu, 3 Aug 2017 06:54:28 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C2F56C21EA1; Wed, 2 Aug 2017 20:46:26 +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=none 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 72C57C21DED; Wed, 2 Aug 2017 20:45:01 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id F3391C21E2C; Wed, 2 Aug 2017 20:43:46 +0000 (UTC) Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by lists.denx.de (Postfix) with ESMTPS id E3822C21DA5 for ; Wed, 2 Aug 2017 20:43:40 +0000 (UTC) Received: from [86.59.122.178] (port=53932 helo=android.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1dd0Mw-0002Ai-0F; Wed, 02 Aug 2017 22:35:50 +0200 From: Philipp Tomsich To: u-boot@lists.denx.de Date: Wed, 2 Aug 2017 22:34:26 +0200 Message-Id: <1501706105-7490-32-git-send-email-philipp.tomsich@theobroma-systems.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1501706105-7490-1-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1501706105-7490-1-git-send-email-philipp.tomsich@theobroma-systems.com> Cc: Albert Aribaud , Klaus Goger , Andy Yan , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [U-Boot] [PATCH v4 31/66] rockchip: rk3368: syscon: SGRF support for OF_PLATDATA 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" In TPL we will need to configure security in the SGRF of the RK3368. This change adds support for the SGRF as a syscon device, so we can retrieve its address range through the syscon API in TPL (and can avoid having to hard-code the address). Signed-off-by: Philipp Tomsich Reviewed-by: Simon Glass --- Changes in v4: None Changes in v3: - adds SGRF syscon support with OF_PLATDATA (to allow access to the SGRF address range from TPL) Changes in v2: None arch/arm/mach-rockchip/rk3368/syscon_rk3368.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c index 90a993e..99d51f0 100644 --- a/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c +++ b/arch/arm/mach-rockchip/rk3368/syscon_rk3368.c @@ -18,6 +18,8 @@ static const struct udevice_id rk3368_syscon_ids[] = { .data = ROCKCHIP_SYSCON_PMUGRF }, { .compatible = "rockchip,rk3368-msch", .data = ROCKCHIP_SYSCON_MSCH }, + { .compatible = "rockchip,rk3368-sgrf", + .data = ROCKCHIP_SYSCON_SGRF }, { } }; @@ -56,4 +58,11 @@ U_BOOT_DRIVER(rockchip_rk3368_msch) = { .of_match = rk3368_syscon_ids + 2, .bind = rk3368_syscon_bind_of_platdata, }; + +U_BOOT_DRIVER(rockchip_rk3368_sgrf) = { + .name = "rockchip_rk3368_sgrf", + .id = UCLASS_SYSCON, + .of_match = rk3368_syscon_ids + 3, + .bind = rk3368_syscon_bind_of_platdata, +}; #endif