From patchwork Mon Aug 8 10:05:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wenyou Yang X-Patchwork-Id: 9267671 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 584D3607D6 for ; Mon, 8 Aug 2016 10:19:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 476E32793D for ; Mon, 8 Aug 2016 10:19:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B58227E66; Mon, 8 Aug 2016 10:19: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, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E72832793D for ; Mon, 8 Aug 2016 10:19:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bWhdS-0006o7-Mf; Mon, 08 Aug 2016 10:18:18 +0000 Received: from nasmtp01.atmel.com ([192.199.1.246] helo=ussmtp01.atmel.com) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bWhdN-0006jG-4V for linux-arm-kernel@lists.infradead.org; Mon, 08 Aug 2016 10:18:14 +0000 Received: from apsmtp01.atmel.com (10.168.254.30) by DVREDG02.corp.atmel.com (10.42.103.31) with Microsoft SMTP Server (TLS) id 14.3.235.1; Mon, 8 Aug 2016 04:17:50 -0600 Received: from shaarm01.corp.atmel.com (10.168.254.13) by apsmtp01.corp.atmel.com (10.168.254.30) with Microsoft SMTP Server id 14.3.235.1; Mon, 8 Aug 2016 18:25:11 +0800 From: Wenyou Yang To: Nicolas Ferre , Alexandre Belloni , Russell King Subject: [PATCH v6 1/6] ARM: at91: sama5: Add a new DT_MACHINE for SAMA5D2 Date: Mon, 8 Aug 2016 18:05:00 +0800 Message-ID: <1470650705-31418-2-git-send-email-wenyou.yang@atmel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470650705-31418-1-git-send-email-wenyou.yang@atmel.com> References: <1470650705-31418-1-git-send-email-wenyou.yang@atmel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160808_031813_485642_05AFF110 X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Pawel Moll , Ian Campbell , Mark Brown , linux-kernel@vger.kernel.org, Wenyou Yang , Rob Herring , Kumar Gala , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 To support the SAMA5D2 specific pm_init function, add a new DT_MACHINE for SAMA5D2. Signed-off-by: Wenyou Yang --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None arch/arm/mach-at91/sama5.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c index 922b85f..2debfe2 100644 --- a/arch/arm/mach-at91/sama5.c +++ b/arch/arm/mach-at91/sama5.c @@ -59,7 +59,7 @@ static const struct at91_soc sama5_socs[] = { { /* sentinel */ }, }; -static void __init sama5_dt_device_init(void) +static void __init sama5_common_init(void) { struct soc_device *soc; struct device *soc_dev = NULL; @@ -69,6 +69,11 @@ static void __init sama5_dt_device_init(void) soc_dev = soc_device_to_device(soc); of_platform_populate(NULL, of_default_bus_match_table, NULL, soc_dev); +} + +static void __init sama5_dt_device_init(void) +{ + sama5_common_init(); sama5_pm_init(); } @@ -84,7 +89,6 @@ DT_MACHINE_START(sama5_dt, "Atmel SAMA5") MACHINE_END static const char *const sama5_alt_dt_board_compat[] __initconst = { - "atmel,sama5d2", "atmel,sama5d4", NULL }; @@ -95,3 +99,20 @@ DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5") .dt_compat = sama5_alt_dt_board_compat, .l2c_aux_mask = ~0UL, MACHINE_END + +static void __init sama5d2_dt_device_init(void) +{ + sama5_common_init(); +} + +static const char *const sama5d2_dt_board_compat[] __initconst = { + "atmel,sama5d2", + NULL +}; + +DT_MACHINE_START(sama5d2_dt, "Atmel SAMA5") + /* Maintainer: Atmel */ + .init_machine = sama5d2_dt_device_init, + .dt_compat = sama5d2_dt_board_compat, + .l2c_aux_mask = ~0UL, +MACHINE_END