From patchwork Thu Jan 25 18:02:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrizio Castro X-Patchwork-Id: 10184599 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 66D4060383 for ; Thu, 25 Jan 2018 18:20:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 54CA52874F for ; Thu, 25 Jan 2018 18:20:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47E97287A1; Thu, 25 Jan 2018 18:20:36 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C710D2874F for ; Thu, 25 Jan 2018 18:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=tD0+g93iQ919KkuD3hykCgLFqwKDhOgTkbmtudaOZig=; b=nF+sBU8LZ70ISDlQLshqf8ekpC hQO6eZo/Ffgm74MUJBdxPqlQ4xxjg4On/fu1hTopxR4+URlX6tkq3s9XPX4kgp6tXGqkbxsPWfI1I +V3QsJKLEJ7oGfQMygZK6KISUepqRFznyaRcp0AffahQOudXSVLldw+j7Z9CKKblM4tgiC1QXCujU ZrgXfY+rbCUKAgdfn1U0Xf7Hx89oceEyUqKGA1eelHLXrRXY7SC/DLVMtwNRdghbFibg83AgyKZ2p wVRdiVeRTNsfGxdul/VUVNVWLvZIH4YuNzN4bqGvMqSf2KTck9MlSMyWKfOW52LC6runyT2/4SR78 5IX4hUYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eem8W-0004vu-Sl; Thu, 25 Jan 2018 18:20:32 +0000 Received: from relmlor4.renesas.com ([210.160.252.174] helo=relmlie3.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eelsv-00012e-0Z for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2018 18:04:48 +0000 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 26 Jan 2018 03:04:14 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 2D8F244192; Fri, 26 Jan 2018 03:04:14 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.46,412,1511794800"; d="scan'208";a="270636921" Received: from unknown (HELO fabrizio-dev.ree.adwin.renesas.com) ([10.226.37.88]) by relmlii2.idc.renesas.com with ESMTP; 26 Jan 2018 03:04:09 +0900 From: Fabrizio Castro To: Philipp Zabel , Rob Herring , Mark Rutland , Wim Van Sebroeck , Russell King , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Simon Horman , Magnus Damm , Geert Uytterhoeven Subject: [RFC 09/37] soc: renesas: rcar-rst: Add generic compatible strings Date: Thu, 25 Jan 2018 18:02:43 +0000 Message-Id: <1516903391-30467-10-git-send-email-fabrizio.castro@bp.renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516903391-30467-1-git-send-email-fabrizio.castro@bp.renesas.com> References: <1516903391-30467-1-git-send-email-fabrizio.castro@bp.renesas.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabrizio Castro , devicetree@vger.kernel.org, Chris Paterson , linux-watchdog@vger.kernel.org, Biju Das , linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ramesh Shanmugasundaram , linux-clk@vger.kernel.org, Guenter Roeck MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This commit introduces generic compatible strings to use as fallback, so that devices compatible with the generic implementation may avoid changing the driver. Signed-off-by: Fabrizio Castro Signed-off-by: Ramesh Shanmugasundaram --- drivers/soc/renesas/rcar-rst.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/soc/renesas/rcar-rst.c b/drivers/soc/renesas/rcar-rst.c index 3316b02..f7a0d54 100644 --- a/drivers/soc/renesas/rcar-rst.c +++ b/drivers/soc/renesas/rcar-rst.c @@ -25,8 +25,16 @@ static const struct rst_config rcar_rst_gen2 __initconst = { .modemr = 0x60, }; +static const struct rst_config rcar_rst_gen3 __initconst = { + .modemr = 0x60, +}; + static const struct of_device_id rcar_rst_matches[] __initconst = { - /* RZ/G is handled like R-Car Gen2 */ + /* generic compatible strings */ + { .compatible = "renesas,rcar-gen1-rst", .data = &rcar_rst_gen1 }, + { .compatible = "renesas,rcar-gen2-rst", .data = &rcar_rst_gen2 }, + { .compatible = "renesas,rcar-gen3-rst", .data = &rcar_rst_gen3 }, + /* RZ/G */ { .compatible = "renesas,r8a7743-rst", .data = &rcar_rst_gen2 }, { .compatible = "renesas,r8a7745-rst", .data = &rcar_rst_gen2 }, /* R-Car Gen1 */ @@ -38,11 +46,11 @@ static const struct of_device_id rcar_rst_matches[] __initconst = { { .compatible = "renesas,r8a7792-rst", .data = &rcar_rst_gen2 }, { .compatible = "renesas,r8a7793-rst", .data = &rcar_rst_gen2 }, { .compatible = "renesas,r8a7794-rst", .data = &rcar_rst_gen2 }, - /* R-Car Gen3 is handled like R-Car Gen2 */ - { .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen2 }, - { .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen2 }, - { .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen2 }, - { .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen2 }, + /* R-Car Gen3 */ + { .compatible = "renesas,r8a7795-rst", .data = &rcar_rst_gen3 }, + { .compatible = "renesas,r8a7796-rst", .data = &rcar_rst_gen3 }, + { .compatible = "renesas,r8a77970-rst", .data = &rcar_rst_gen3 }, + { .compatible = "renesas,r8a77995-rst", .data = &rcar_rst_gen3 }, { /* sentinel */ } };