Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp803604ybl; Thu, 22 Aug 2019 05:14:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgQi9FCPSGTa12Yvv6TzxYm8J+Bn3VijTFgDaakCQzKGqFU330Z61qrU94u0bnJj80sGgE X-Received: by 2002:aa7:8007:: with SMTP id j7mr40907878pfi.154.1566476086945; Thu, 22 Aug 2019 05:14:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566476086; cv=none; d=google.com; s=arc-20160816; b=j+t9hnZzfM/uIsziOq+nED1VmhX9mfX5PfKkokGas2Vb1kE2RlfBMTW6/ooR9+XNQN aiCvkgfeyb19qEPcpLPR2Jf+u0oyLSVhjPxH6ioVvDdKyPC5Azic98NyNehuVH6NKRYY R0sBTjfV590+XShCLglsizz90F1HYX8jPdMwB9rlhDfIwTjQ9xC0HDIaTVaSgoHP/1YC 9StZT65V67S+v8bBc3+2eEMHdgZEV/Lh01MMLXgb6SR9dDO9oHzFD/d2IBFEbiZi+F+/ 5tUra+QzvZBlJFgMZVCOd3uvnkqAOrDRQKGu1W6LFJ9IPQGF0oWeUJajQd8kTcNAticv YM9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=S9fJz3ojWjusRxTyWTQLf2n+gc0Jr30lURWLoFA7Mt0=; b=HVvrzJJjh3j6D7ZwXy0PDAN04LCkDaw9XNeeOO0YD3O6cg5pl9/EGEiqxwfOqBB/fu 711Kja8CcrWmh1sdMsK7bJJ0FNOin4mptvvDK1ZF7w0Rwrsvys1CErzlBVmp97WneCYg UpJlnRqYkONVBinPmYvGC++FIgIS9tXKFZsmqfOwx2W/1Oo2MJuZaCRtBTVfeasWgzGD uVhV01GKQEBfoPuz7nxOjmgOG7uGPHaQC+ciiTefeyPnlsIbDbIF+hLSvkXDomA32HvU R0LYe7c6g1QazdfDdz3+FHyeZWHiQUgzXHA4KitHOEI02NDgE5aRsgc1UYvUk7SeQEKT /GGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9si11149720pls.38.2019.08.22.05.14.31; Thu, 22 Aug 2019 05:14:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733255AbfHVJdm (ORCPT + 99 others); Thu, 22 Aug 2019 05:33:42 -0400 Received: from shell.v3.sk ([90.176.6.54]:35782 "EHLO shell.v3.sk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733245AbfHVJdf (ORCPT ); Thu, 22 Aug 2019 05:33:35 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id B0FC3D7576; Thu, 22 Aug 2019 11:33:33 +0200 (CEST) Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id N7gI5GyWg9Ho; Thu, 22 Aug 2019 11:33:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra.v3.sk (Postfix) with ESMTP id 84DB7D7557; Thu, 22 Aug 2019 11:32:57 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.v3.sk Received: from shell.v3.sk ([127.0.0.1]) by localhost (zimbra.v3.sk [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qf4lwqAmDpNg; Thu, 22 Aug 2019 11:27:45 +0200 (CEST) Received: from belphegor.brq.redhat.com (nat-pool-brq-t.redhat.com [213.175.37.10]) by zimbra.v3.sk (Postfix) with ESMTPSA id 48200D7566; Thu, 22 Aug 2019 11:26:50 +0200 (CEST) From: Lubomir Rintel To: Olof Johansson Cc: Rob Herring , Mark Rutland , Thomas Gleixner , Jason Cooper , Marc Zyngier , Kishon Vijay Abraham I , Russell King , Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, Lubomir Rintel Subject: [PATCH v2 12/20] ARM: mmp: map the PGU as well Date: Thu, 22 Aug 2019 11:26:35 +0200 Message-Id: <20190822092643.593488-13-lkundrak@v3.sk> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190822092643.593488-1-lkundrak@v3.sk> References: <20190822092643.593488-1-lkundrak@v3.sk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The MMP2 and later includes a system control unit in this area. We'll nee= d that to initialize the secondary core on MMP3. Signed-off-by: Lubomir Rintel --- arch/arm/mach-mmp/addr-map.h | 7 +++++++ arch/arm/mach-mmp/common.c | 15 +++++++++++++++ arch/arm/mach-mmp/common.h | 1 + arch/arm/mach-mmp/mmp2-dt.c | 2 +- 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-mmp/addr-map.h b/arch/arm/mach-mmp/addr-map.h index 25edf6a92276e..3dc2f0b0ecba5 100644 --- a/arch/arm/mach-mmp/addr-map.h +++ b/arch/arm/mach-mmp/addr-map.h @@ -20,6 +20,10 @@ #define AXI_VIRT_BASE IOMEM(0xfe200000) #define AXI_PHYS_SIZE 0x00200000 =20 +#define PGU_PHYS_BASE 0xe0000000 +#define PGU_VIRT_BASE IOMEM(0xfe400000) +#define PGU_PHYS_SIZE 0x00100000 + /* Static Memory Controller - Chip Select 0 and 1 */ #define SMC_CS0_PHYS_BASE 0x80000000 #define SMC_CS0_PHYS_SIZE 0x10000000 @@ -38,4 +42,7 @@ #define CIU_VIRT_BASE (AXI_VIRT_BASE + 0x82c00) #define CIU_REG(x) (CIU_VIRT_BASE + (x)) =20 +#define SCU_VIRT_BASE (PGU_VIRT_BASE) +#define SCU_REG(x) (SCU_VIRT_BASE + (x)) + #endif /* __ASM_MACH_ADDR_MAP_H */ diff --git a/arch/arm/mach-mmp/common.c b/arch/arm/mach-mmp/common.c index 6684abc7708bd..2ee08c78e8bc9 100644 --- a/arch/arm/mach-mmp/common.c +++ b/arch/arm/mach-mmp/common.c @@ -36,6 +36,15 @@ static struct map_desc standard_io_desc[] __initdata =3D= { }, }; =20 +static struct map_desc mmp2_io_desc[] __initdata =3D { + { + .pfn =3D __phys_to_pfn(PGU_PHYS_BASE), + .virtual =3D (unsigned long)PGU_VIRT_BASE, + .length =3D PGU_PHYS_SIZE, + .type =3D MT_DEVICE, + }, +}; + void __init mmp_map_io(void) { iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); @@ -44,6 +53,12 @@ void __init mmp_map_io(void) mmp_chip_id =3D __raw_readl(MMP_CHIPID); } =20 +void __init mmp2_map_io(void) +{ + mmp_map_io(); + iotable_init(mmp2_io_desc, ARRAY_SIZE(mmp2_io_desc)); +} + void mmp_restart(enum reboot_mode mode, const char *cmd) { soft_restart(0); diff --git a/arch/arm/mach-mmp/common.h b/arch/arm/mach-mmp/common.h index 483b8b6d3005a..ed56b3f15b45e 100644 --- a/arch/arm/mach-mmp/common.h +++ b/arch/arm/mach-mmp/common.h @@ -5,4 +5,5 @@ extern void mmp_timer_init(int irq, unsigned long rate); =20 extern void __init mmp_map_io(void); +extern void __init mmp2_map_io(void); extern void mmp_restart(enum reboot_mode, const char *); diff --git a/arch/arm/mach-mmp/mmp2-dt.c b/arch/arm/mach-mmp/mmp2-dt.c index 305a9daba6d68..8eec881191f4b 100644 --- a/arch/arm/mach-mmp/mmp2-dt.c +++ b/arch/arm/mach-mmp/mmp2-dt.c @@ -33,7 +33,7 @@ static const char *const mmp2_dt_board_compat[] __initc= onst =3D { }; =20 DT_MACHINE_START(MMP2_DT, "Marvell MMP2 (Device Tree Support)") - .map_io =3D mmp_map_io, + .map_io =3D mmp2_map_io, .init_time =3D mmp_init_time, .dt_compat =3D mmp2_dt_board_compat, MACHINE_END --=20 2.21.0