From patchwork Wed May 11 05:29:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 9064961 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CA364BF29F for ; Wed, 11 May 2016 05:31:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 335192015A for ; Wed, 11 May 2016 05:31:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9D67320155 for ; Wed, 11 May 2016 05:31:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751400AbcEKFbZ (ORCPT ); Wed, 11 May 2016 01:31:25 -0400 Received: from smtp6-v.fe.bosch.de ([139.15.237.11]:12984 "EHLO smtp6-v.fe.bosch.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbcEKFbY (ORCPT ); Wed, 11 May 2016 01:31:24 -0400 Received: from vsmta14.fe.internet.bosch.com (unknown [10.4.98.54]) by imta24.fe.bosch.de (Postfix) with ESMTP id 462C0D80220 for ; Wed, 11 May 2016 07:31:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=de.bosch.com; s=2015-01-21; t=1462944683; bh=2w9EbYfLCZvPRRVt4bNYm0yWWjP24TdBGiPC7asR1v0=; l=10; h=From:From:Reply-To:Sender; b=xuBPj45wD1e2lYtSCOO0nfUuLA7CBqlnQimxCNk8LdgHAOthElF/5qNJdXAfqjtHw afDVgXSphcuOlhthp3+aoj1O8Mm3ekK5pTXYr+rBpDviFRJBf97NyQZrKkcTq6kLGo LL7A12egQ9dM2TxbSkhTTTDKWMujGm9ey0kH+kfk= Received: from FE-HUB1001.de.bosch.com (vsgw22.fe.internet.bosch.com [10.4.98.11]) by vsmta14.fe.internet.bosch.com (Postfix) with ESMTP id E3BA2A406B4 for ; Wed, 11 May 2016 07:31:22 +0200 (CEST) Received: from hi-z08if.hi.de.bosch.com (10.34.209.31) by FE-HUB1001.de.bosch.com (10.4.103.109) with Microsoft SMTP Server id 14.3.195.1; Wed, 11 May 2016 07:31:21 +0200 Received: from hi-z08if.hi.de.bosch.com (localhost [127.0.0.1]) by hi-z08if.hi.de.bosch.com (Postfix) with ESMTP id 1E201625E9E; Wed, 11 May 2016 07:29:41 +0200 (CEST) From: Dirk Behme To: Geert Uytterhoeven , Simon Horman , CC: Dirk Behme Subject: [PATCH v2 04/10] arm: renesas: r8a7791: Obtain MD pin value using boot-mode-reg Date: Wed, 11 May 2016 07:29:32 +0200 Message-ID: <1462944578-1220-5-git-send-email-dirk.behme@de.bosch.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1462944578-1220-1-git-send-email-dirk.behme@de.bosch.com> References: <1462944578-1220-1-git-send-email-dirk.behme@de.bosch.com> MIME-Version: 1.0 X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22312.006 X-TMASE-MatchedRID: DtZlbWOVwNAyNFM0Xa1tqLMjW/sniEQKwx0jRRxcQfMypRY3gsuRLZGV Q/ySfpwPeilsFAi4j9wo4LmTgl363oJrRWPc34Z+A9lly13c/gHt/okBLaEo+JOh3HiqoNeSC2b f4vQBGC7QGlxIVvV/XoAy6p60ZV62fJ5/bZ6npdjGVuWouVipcmhV3qYKXMPu90SBhfGSyvyHnb K0D97WvjgScyDgnzJWJNOhDqWWW3xxQbRUuvG/0xA3rLEkskOpvi3W/FRbO9+42en7kfdvYoISr dkIFqeuO4Y2dUBhL/BTBYT7RGXoWxJAEJH0NuHT9aAnbWsWzHc= Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Simon Horman Use new boot mode reg infrastructure to obtain the mode pin value when initialising SMP for r8a7791 SoC. Signed-off-by: Simon Horman Signed-off-by: Dirk Behme --- arch/arm/mach-shmobile/smp-r8a7791.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c index 2d6417a..00d794d 100644 --- a/arch/arm/mach-shmobile/smp-r8a7791.c +++ b/arch/arm/mach-shmobile/smp-r8a7791.c @@ -20,6 +20,8 @@ #include +#include + #include "common.h" #include "platsmp-apmu.h" #include "r8a7791.h" @@ -45,8 +47,17 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus) static int r8a7791_smp_boot_secondary(unsigned int cpu, struct task_struct *idle) { + int err; + u32 mode; + + err = boot_mode_reg_get(&mode); + if (err) { + pr_warn("Unable to retrieve boot mode register\n"); + return err; + } + /* Error out when hardware debug mode is enabled */ - if (rcar_gen2_read_mode_pins() & BIT(21)) { + if (mode & BIT(21)) { pr_warn("Unable to boot CPU%u when MD21 is set\n", cpu); return -ENOTSUPP; }