Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4951222rwb; Sun, 13 Nov 2022 18:00:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf4sHAgvEdo0m+gcYkrDnZc1AWzmfC1MczGdnCSGzFfmY7qs9TiwP3NFDkVta7kMGyFTvICr X-Received: by 2002:a17:907:20d1:b0:78d:554f:fb16 with SMTP id qq17-20020a17090720d100b0078d554ffb16mr8818012ejb.151.1668391230106; Sun, 13 Nov 2022 18:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668391230; cv=none; d=google.com; s=arc-20160816; b=lQO9YDlHZGE2dFPjrdDECRJ4CcQ1phVZCN0FG4BNhjY6Eb/KFbk5ql6bYnT5zbmbOI Go4o3zuMeqGdAdnqhtbvb9vlqDiuL3htS3Z2LEh8YqMzzx1f+WZsdz4LRhmkSwHpHfKa dAepDBZMHVpdKGMdZ7TFhjgTLnaLRd3qS0sMfQSG/n7E4FO7IRJb7lIWRyCM0jcEpIK9 CoKFo5lE8/ZD4OVveaTveUtLKOtGLQ+9pHlQNo+5X2Wt8D/BPntglaCBliZD5220bzOT vwW1S7kqQTNeKhMSGK5enKsjGbVwyLSUgdajUMqi7vXK3KZ2CpZa6YGXDywUx4eYxkxU qLpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=kb2KL/xNBPAUpKNppz0Hv1Qzx9PzkMbgYoTAwQW8XmE=; b=UpOE/eQtprAVDY7H3aW8QKuHgwREOnpFrACiK3ReSDk6MUrCpX8hyopdnxvBhkhDux P7wjrq/hu56rWPjJS2PpN9sDOv3Es5e6m+w6MP21ocrwflNXcqIjhJ6HaskwXL6UE/jL Mr27L/p6FFzZ1n4md51yABdDNWQs5/VOP27d0TcP/qHCtj2K2LLZWRkoPNxlbGJUB455 4WlqW8CJCybmIrnHYfgSmcA/bvZ3aF014T4oYPpsxVyQYJAiu703k9DbbvQjSiqQK9ju tOWnljPTfRoYNRa9coEbjqpgVr0W5GkS528/FtwLpmsCZuCMD9TCaLGwZu3O8Uu3PzSC TQvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fastmail.com.au header.s=fm1 header.b="4/yjO5Pz"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=D5f28vns; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fastmail.com.au Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a056402038700b0046777becff2si4453018edv.629.2022.11.13.18.00.07; Sun, 13 Nov 2022 18:00:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@fastmail.com.au header.s=fm1 header.b="4/yjO5Pz"; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=D5f28vns; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fastmail.com.au Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235668AbiKNB5V (ORCPT + 90 others); Sun, 13 Nov 2022 20:57:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235649AbiKNB5U (ORCPT ); Sun, 13 Nov 2022 20:57:20 -0500 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85784625C; Sun, 13 Nov 2022 17:57:19 -0800 (PST) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id ED9EF5C00F1; Sun, 13 Nov 2022 20:57:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 13 Nov 2022 20:57:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com.au; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1668391038; x= 1668477438; bh=kb2KL/xNBPAUpKNppz0Hv1Qzx9PzkMbgYoTAwQW8XmE=; b=4 /yjO5Pz01qhLDkb2WcxXwFqBymiocxmmcwpbyQs+moVPID/d1NdQM/ryeXfvkdk+ LiVlxHfPaOOjpvObgVM4Gx81r6eWytP9qQf2FWa1HdOLT0zcYe9/6YLVOnbSpfNP ySeJKDGn5DfJsD/WnOjVPG4f5e6a3eOv1QZSgrKWNm8y7/BomXEVBGcfOlNwxTTh AouKpSfitBAqQ7vIaUt3e3SqTglcynVCn9PMBQYKRTHuOtX92MnF5ulkwxpvHF8q pCQNMAKEtdlLpQKCb9P/kkhIbmidm8xiRZ+hwG8zMaO08L7yVgY/0uMiB6jvimdx 0KEp3tPpqjWNhtUdh7eZA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1668391038; x=1668477438; bh=kb2KL/xNBPAUp KNppz0Hv1Qzx9PzkMbgYoTAwQW8XmE=; b=D5f28vnsPucZz73azymHtj6ze61pk DniUQcK0WQnwq4jS4guz6AKB7x7wq2qDoauXzRYSeSKT848s1kPPjw4J8c6xrDLP evygnUE6+xBw+u1tlgKfckUuDfk3hKqz8f+rktlVnl3t8mHPsmCHRyFlA9LdUdid czvW9cVcIdZcLy05LLOsl3H3jAZfLH14M+5ktyTfve/S8BOc0otHp323eosQsICB IUBUoKtsk1RAoFbDlkRhbMX07KHg+wmhz9ZAjLyjuFlRk6CU6ae72JAJVSYbCg4C 4MD62jyjOiOh8NEPyyDBPPj0oqIbp+6udd7JzgJzCjs3bZIj+Ux217p3A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrgedugdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflohhhnhcu vfhhohhmshhonhcuoehgihhtsehjohhhnhhthhhomhhsohhnrdhfrghsthhmrghilhdrtg homhdrrghuqeenucggtffrrghtthgvrhhnpeejgfffffeijedtueejffekgeevieduvdeu keffjeeiueetkeffjeekveelieejffenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehgihhtsehjohhhnhhthhhomhhsohhnrdhfrghsthhmrghi lhdrtghomhdrrghu X-ME-Proxy: Feedback-ID: ic081425d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 13 Nov 2022 20:57:16 -0500 (EST) From: John Thomson To: Sergio Paracuellos , Thomas Bogendoerfer , John Crispin , =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, John Thomson Subject: [PATCH 1/3] mips: ralink: mt7621: define MT7621_SYSC_BASE with __iomem Date: Mon, 14 Nov 2022 11:56:56 +1000 Message-Id: <20221114015658.2873120-2-git@johnthomson.fastmail.com.au> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221114015658.2873120-1-git@johnthomson.fastmail.com.au> References: <20221114015658.2873120-1-git@johnthomson.fastmail.com.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So that MT7621_SYSC_BASE can be used later in multiple functions without needing to repeat this __iomem declaration each time Signed-off-by: John Thomson --- arch/mips/include/asm/mach-ralink/mt7621.h | 4 +++- arch/mips/ralink/mt7621.c | 7 +++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/mips/include/asm/mach-ralink/mt7621.h b/arch/mips/include/asm/mach-ralink/mt7621.h index 6bbf082dd149..79d5bb0e06d6 100644 --- a/arch/mips/include/asm/mach-ralink/mt7621.h +++ b/arch/mips/include/asm/mach-ralink/mt7621.h @@ -7,10 +7,12 @@ #ifndef _MT7621_REGS_H_ #define _MT7621_REGS_H_ +#define IOMEM(x) ((void __iomem *)(KSEG1ADDR(x))) + #define MT7621_PALMBUS_BASE 0x1C000000 #define MT7621_PALMBUS_SIZE 0x03FFFFFF -#define MT7621_SYSC_BASE 0x1E000000 +#define MT7621_SYSC_BASE IOMEM(0x1E000000) #define SYSC_REG_CHIP_NAME0 0x00 #define SYSC_REG_CHIP_NAME1 0x04 diff --git a/arch/mips/ralink/mt7621.c b/arch/mips/ralink/mt7621.c index fb0565bc34fd..17dbf28897e0 100644 --- a/arch/mips/ralink/mt7621.c +++ b/arch/mips/ralink/mt7621.c @@ -126,7 +126,6 @@ static void soc_dev_init(struct ralink_soc_info *soc_info, u32 rev) void __init prom_soc_init(struct ralink_soc_info *soc_info) { - void __iomem *sysc = (void __iomem *) KSEG1ADDR(MT7621_SYSC_BASE); unsigned char *name = NULL; u32 n0; u32 n1; @@ -154,8 +153,8 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info) __sync(); } - n0 = __raw_readl(sysc + SYSC_REG_CHIP_NAME0); - n1 = __raw_readl(sysc + SYSC_REG_CHIP_NAME1); + n0 = __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_NAME0); + n1 = __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_NAME1); if (n0 == MT7621_CHIP_NAME0 && n1 == MT7621_CHIP_NAME1) { name = "MT7621"; @@ -164,7 +163,7 @@ void __init prom_soc_init(struct ralink_soc_info *soc_info) panic("mt7621: unknown SoC, n0:%08x n1:%08x\n", n0, n1); } ralink_soc = MT762X_SOC_MT7621AT; - rev = __raw_readl(sysc + SYSC_REG_CHIP_REV); + rev = __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_REV); snprintf(soc_info->sys_type, RAMIPS_SYS_TYPE_LEN, "MediaTek %s ver:%u eco:%u", -- 2.37.2