From patchwork Tue May 31 22:15:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 9145733 X-Patchwork-Delegate: horms@verge.net.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 577AA60761 for ; Tue, 31 May 2016 22:15:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A49C26569 for ; Tue, 31 May 2016 22:15:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F194265D7; Tue, 31 May 2016 22:15:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 99EED26569 for ; Tue, 31 May 2016 22:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752896AbcEaWP6 (ORCPT ); Tue, 31 May 2016 18:15:58 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:35496 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750730AbcEaWP5 (ORCPT ); Tue, 31 May 2016 18:15:57 -0400 Received: by mail-lf0-f53.google.com with SMTP id w16so842467lfd.2 for ; Tue, 31 May 2016 15:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:organization:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=/P4ZAQb8fucg1Xv7DnySV0f/OgJByMw7jgDP3JLwn3w=; b=w4mQq2Kb2R0AC/VVbcefyQ5nCa3oBQJIw8ef9ADzqTSHNXHEewx4GB1eM/dqDRUScF N/lH38SJtE+c87M/GB4++JGtXyUcfTyVaEboDOLZk3DDY+8dwC8SIVLQXBZgbbUEnWI4 yIntWcuNWiTIWYaK831qxMl+z2B6wcZO/x1pXQHJsg9E5H0DS4D61NEkVDbzovP7ExEg rggjrIparSzbo+TIulRhk2dUjb+vMkUSH32IfeimzWyg36KmwNdOBeC2TyuOFkQ1lQ+4 +t6K19U3+4ncV7RV+vTTh6WFG9+KaDTeep1OtpsKQ/ZOVFuLxYAW4tLBolmVPlR3gVFr lJCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding; bh=/P4ZAQb8fucg1Xv7DnySV0f/OgJByMw7jgDP3JLwn3w=; b=GJu+q67o2tXRaIBbQbCgFI/mkUCw2omZ2jHefQxcna7bj0dZCuFRhnj0SicKXQ6UHH 9WOZ8KX99E8lf/IT6CXGFzXn8y8euDS+xYLKMiabvjZ1gBtHGn00w7KgzMr5uqIFPemf D2gAcLAYJSawDHvsY8ucBYrXHzyw5K/AKiXxVJEs7S8auv82YFtw8WQX6GXgSZakmaSV 8xDI/a4pZrLSQf7oCJDGi9iqHfCrEWc7xfzUTLkEJm2IG7I3R7LlC0ojQk80LddCndNC ENVFcXCVVYqWO0lZ8N0s1NxW+oKxN81z119JXTTn8SrsVtnGQWPH7o5nizzgXV/oC0Mr yyVg== X-Gm-Message-State: ALyK8tI5rnU77rT2ziKhLatNxqfORgvHAji+nSmPWhex2e3MnlW1Ko5aXXSN8JGFifdFaw== X-Received: by 10.46.9.211 with SMTP id 202mr352293ljj.3.1464732955152; Tue, 31 May 2016 15:15:55 -0700 (PDT) Received: from wasted.cogentembedded.com ([31.173.80.163]) by smtp.gmail.com with ESMTPSA id u194sm2937543lja.18.2016.05.31.15.15.54 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 31 May 2016 15:15:54 -0700 (PDT) From: Sergei Shtylyov To: horms@verge.net.au, linux-renesas-soc@vger.kernel.org, magnus.damm@gmail.com Subject: [PATCH 03/13] soc: renesas: rcar-sysc: add R8A7792 support Date: Wed, 01 Jun 2016 01:15:53 +0300 Message-ID: <5578588.eXCR2ytE51@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.4.10-200.fc22.x86_64; KDE/4.14.17; x86_64; ; ) In-Reply-To: <13205049.n7pM8utpHF@wasted.cogentembedded.com> References: <13205049.n7pM8utpHF@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for R-Car V2H (R8A7792) SoC power areas to the SYSC driver. Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven --- drivers/soc/renesas/Makefile | 1 + drivers/soc/renesas/r8a7792-sysc.c | 34 ++++++++++++++++++++++++++++++++++ drivers/soc/renesas/rcar-sysc.c | 3 +++ drivers/soc/renesas/rcar-sysc.h | 1 + 4 files changed, 39 insertions(+) Index: renesas/drivers/soc/renesas/Makefile =================================================================== --- renesas.orig/drivers/soc/renesas/Makefile +++ renesas/drivers/soc/renesas/Makefile @@ -1,6 +1,7 @@ obj-$(CONFIG_ARCH_R8A7779) += rcar-sysc.o r8a7779-sysc.o obj-$(CONFIG_ARCH_R8A7790) += rcar-sysc.o r8a7790-sysc.o obj-$(CONFIG_ARCH_R8A7791) += rcar-sysc.o r8a7791-sysc.o +obj-$(CONFIG_ARCH_R8A7792) += rcar-sysc.o r8a7792-sysc.o # R-Car M2-N is identical to R-Car M2-W w.r.t. power domains. obj-$(CONFIG_ARCH_R8A7793) += rcar-sysc.o r8a7791-sysc.o obj-$(CONFIG_ARCH_R8A7794) += rcar-sysc.o r8a7794-sysc.o Index: renesas/drivers/soc/renesas/r8a7792-sysc.c =================================================================== --- /dev/null +++ renesas/drivers/soc/renesas/r8a7792-sysc.c @@ -0,0 +1,34 @@ +/* + * Renesas R-Car V2H (R8A7792) System Controller + * + * Copyright (C) 2016 Cogent Embedded Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + */ + +#include +#include +#include + +#include + +#include "rcar-sysc.h" + +static const struct rcar_sysc_area r8a7792_areas[] __initconst = { + { "always-on", 0, 0, R8A7792_PD_ALWAYS_ON, -1, PD_ALWAYS_ON }, + { "ca15-scu", 0x180, 0, R8A7792_PD_CA15_SCU, R8A7792_PD_ALWAYS_ON, + PD_SCU }, + { "ca15-cpu0", 0x40, 0, R8A7792_PD_CA15_CPU0, R8A7792_PD_CA15_SCU, + PD_CPU_NOCR }, + { "ca15-cpu1", 0x40, 1, R8A7792_PD_CA15_CPU1, R8A7792_PD_CA15_SCU, + PD_CPU_NOCR }, + { "sgx", 0xc0, 0, R8A7792_PD_SGX, R8A7792_PD_ALWAYS_ON }, + { "imp", 0x140, 0, R8A7792_PD_IMP, R8A7792_PD_ALWAYS_ON }, +}; + +const struct rcar_sysc_info r8a7792_sysc_info __initconst = { + .areas = r8a7792_areas, + .num_areas = ARRAY_SIZE(r8a7792_areas), +}; Index: renesas/drivers/soc/renesas/rcar-sysc.c =================================================================== --- renesas.orig/drivers/soc/renesas/rcar-sysc.c +++ renesas/drivers/soc/renesas/rcar-sysc.c @@ -293,6 +293,9 @@ static const struct of_device_id rcar_sy #ifdef CONFIG_ARCH_R8A7791 { .compatible = "renesas,r8a7791-sysc", .data = &r8a7791_sysc_info }, #endif +#ifdef CONFIG_ARCH_R8A7792 + { .compatible = "renesas,r8a7792-sysc", .data = &r8a7792_sysc_info }, +#endif #ifdef CONFIG_ARCH_R8A7793 /* R-Car M2-N is identical to R-Car M2-W w.r.t. power domains. */ { .compatible = "renesas,r8a7793-sysc", .data = &r8a7791_sysc_info }, Index: renesas/drivers/soc/renesas/rcar-sysc.h =================================================================== --- renesas.orig/drivers/soc/renesas/rcar-sysc.h +++ renesas/drivers/soc/renesas/rcar-sysc.h @@ -53,6 +53,7 @@ struct rcar_sysc_info { extern const struct rcar_sysc_info r8a7779_sysc_info; extern const struct rcar_sysc_info r8a7790_sysc_info; extern const struct rcar_sysc_info r8a7791_sysc_info; +extern const struct rcar_sysc_info r8a7792_sysc_info; extern const struct rcar_sysc_info r8a7794_sysc_info; extern const struct rcar_sysc_info r8a7795_sysc_info; #endif /* __SOC_RENESAS_RCAR_SYSC_H__ */