From patchwork Mon Dec 18 06:20:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lokesh Vutla X-Patchwork-Id: 10118293 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 EB77260390 for ; Mon, 18 Dec 2017 06:20:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDBF328D48 for ; Mon, 18 Dec 2017 06:20:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2A1628D52; Mon, 18 Dec 2017 06:20:57 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 74C3728D48 for ; Mon, 18 Dec 2017 06:20:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750802AbdLRGU4 (ORCPT ); Mon, 18 Dec 2017 01:20:56 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:56540 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750752AbdLRGUz (ORCPT ); Mon, 18 Dec 2017 01:20:55 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id vBI6KpX2018876; Mon, 18 Dec 2017 00:20:51 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1513578051; bh=YcAQTZE03OsLi21J5sBFGz5YeyuW2VqZLP0f34tMhWI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=tgUdTFb47SdeecTsLUKTK9qkxU1V6y9dtffvyeult5Kd5kZ5HS8bip5NQYismscqO DVjvYhchR4mAf8Nyv1VK7D+m5XMuc8u+5LhiAynLTRCACYEAMxYlYjaW7tB8shnsgX 8+cj6+A4hff2eGVnAaWCf0bMiTXAVQyVr7WuTg0c= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBI6Kp70012880; Mon, 18 Dec 2017 00:20:51 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 18 Dec 2017 00:20:51 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 18 Dec 2017 00:20:51 -0600 Received: from uda0131933.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id vBI6Kd3S011359; Mon, 18 Dec 2017 00:20:49 -0600 From: Lokesh Vutla To: Tony Lindgren , Linux OMAP Mailing List CC: Tero Kristo , Sekhar Nori , Rob Herring , Device Tree Mailing List , Lokesh Vutla Subject: [PATCH 2/3] ARM: dra762: hwmod: Register package specific hwmod Date: Mon, 18 Dec 2017 11:50:02 +0530 Message-ID: <20171218062003.9024-3-lokeshvutla@ti.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171218062003.9024-1-lokeshvutla@ti.com> References: <20171218062003.9024-1-lokeshvutla@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Register dra762 abz package specific hwmod. Also move registering rtc hwmod into respective SoC conditional statements instead of doing it separately. Signed-off-by: Lokesh Vutla --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index d05e553d6346..f33afcaec77e 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -4019,6 +4019,10 @@ static struct omap_hwmod_ocp_if *dra76x_hwmod_ocp_ifs[] __initdata = { NULL, }; +static struct omap_hwmod_ocp_if *acd_76x_hwmod_ocp_ifs[] __initdata = { + NULL, +}; + static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_per3__usb_otg_ss4, NULL, @@ -4028,7 +4032,7 @@ static struct omap_hwmod_ocp_if *dra72x_hwmod_ocp_ifs[] __initdata = { NULL, }; -static struct omap_hwmod_ocp_if *dra74x_dra72x_hwmod_ocp_ifs[] __initdata = { +static struct omap_hwmod_ocp_if *rtc_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_per3__rtcss, NULL, }; @@ -4040,19 +4044,26 @@ int __init dra7xx_hwmod_init(void) omap_hwmod_init(); ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs); - if (!ret && soc_is_dra74x()) + if (!ret && soc_is_dra74x()) { ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs); - else if (!ret && soc_is_dra72x()) + if (!ret) + ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs); + } else if (!ret && soc_is_dra72x()) { ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs); - else if (!ret && soc_is_dra76x()) + if (!ret && !of_machine_is_compatible("ti,dra718")) + ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs); + } else if (!ret && soc_is_dra76x()) { ret = omap_hwmod_register_links(dra76x_hwmod_ocp_ifs); + if (!ret && soc_is_dra76x_acd()) { + ret = omap_hwmod_register_links(acd_76x_hwmod_ocp_ifs); + } else if (!ret && soc_is_dra76x_abz()) { + ret = omap_hwmod_register_links(rtc_hwmod_ocp_ifs); + } + } + if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP) ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs); - /* now for the IPs available only in dra74 and dra72 */ - if (!ret && !of_machine_is_compatible("ti,dra718") && !soc_is_dra76x()) - ret = omap_hwmod_register_links(dra74x_dra72x_hwmod_ocp_ifs); - return ret; }