Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1368652rwo; Wed, 2 Aug 2023 12:56:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBNd9K4YWIp4OgbvhPR0lYKgl6d4HvEW+S405wApo/W7fdQXwytHvJpLct5VyjDbUv+Zqs X-Received: by 2002:aa7:cf87:0:b0:522:a6fb:7f8b with SMTP id z7-20020aa7cf87000000b00522a6fb7f8bmr5879672edx.11.1691006196311; Wed, 02 Aug 2023 12:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691006196; cv=none; d=google.com; s=arc-20160816; b=v3Tffy67K8NEEfZKNCmy2bnfWL/79eQCvM/uBR6j9fwSaI0mz3jM2YjrvQ6QQHc0WF LjMGyhEAMhfk3doXh3VIDOIh5+dvWl2AMxhhvxK1V0ejJbeX1WudxWeHKDeW9GGOuarT p7x5k3bfG+HopxygFyz9hpzeihs3aivKEWpbRh7s/9yFt8lFSNLU7pKDqynMAkqFexu9 W2YIOo/360M5yL4of9HvY6uEkUsJRe3KW+Wy2SyjcLTOSHi2lxh7npUiUeyoXsrm2Bcb MhVoL9fRhi8jNCvpH7bK5ZEoQJGAIv3Dt7Mm9MOlAHwtga87DtenELY+Hqbwf6SkAVwF gS4w== 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 :dkim-signature; bh=K6B9kMGarks7Q0duSwHi97Ql/OshQCP49KVVetaQz48=; fh=UP+1GX0Yn5Q1U6DCIWs67cGIxWG4RY16T4r5VTdxVz8=; b=hcEFnZV9chdQC43Gs8jtHye40nYYXKyLZJOf493vG8xaiAiuKsIlMsHpIE09SHgyTD f+vITYqN0J+dH8vaDt6sQQy/O5v2XbXTq6sYDAIYw3XUTmst/8rtZb1llrB6BIEnuc35 bTH9eBiJgm5pkIPKgeu3M4B1tr/zTRrGLy4kCOOJ7DL3yabI3dsvWfAKzmIvMqGAoXo5 oq8pkL64YLUX58fv2h3awy+sIFbhVjsnvrKiAn7Bl2wVBhy4bju8AmdANDJj4zMWMPad yEvt+k9f/HFs7lmI9t679XYHgHvGej3qIAwJeHiiYIp4Ork7JxQH8Nz3FkgnsCammnDb oSLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cn+VZaY8; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o17-20020aa7d3d1000000b005223d47e265si7345776edr.208.2023.08.02.12.56.08; Wed, 02 Aug 2023 12:56:36 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=cn+VZaY8; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232151AbjHBStU (ORCPT + 99 others); Wed, 2 Aug 2023 14:49:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbjHBStN (ORCPT ); Wed, 2 Aug 2023 14:49:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15AFF1734; Wed, 2 Aug 2023 11:49:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9F0FD61AFB; Wed, 2 Aug 2023 18:49:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84374C433CB; Wed, 2 Aug 2023 18:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691002149; bh=WYKfkfr7MebQWbq9faERXzPtA07lKx6EmcLFTn6CB2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cn+VZaY8lMvlmlTfVKNePJotkfJKqjUlKZcWScSemSjw/30kG7ayyX4xn54AyicAK woCQXOz72VOsNW7LZXdIpQZf3iQlV5/sKexruF+XUqNRDZjQ5TAvEGrVKmPl3dN07t y+cslHEo0B4HsmB61mp5uk5dmGBfk7iMsV6VuBs46T//rxlbNAdyGJbItW2ZdBXMF/ pnvhXtz8tgrL7ClXGkeSkrpUBIK9uLBs//D7eSoZR3ioOPdO0rsSrdiWD0TorMYp0O QHIWq/f8J2+Rr/1N4pqDe+baG/Ml/QyMRMF/vkjLNPe//JDctKB3QCD8IckxW+9StM rNhw1qVpB9eGQ== From: Arnd Bergmann To: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org, Rich Felker , Yoshinori Sato , Geert Uytterhoeven , linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4/4] sh: machvec: remove custom ioport_{un,}map() Date: Wed, 2 Aug 2023 20:48:49 +0200 Message-Id: <20230802184849.1019466-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230802184849.1019466-1-arnd@kernel.org> References: <20230802184849.1019466-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Arnd Bergmann These functions were only used on the microdev board that is now gone, so remove them to simplify the ioport handling. This could be further simplified to use the generic I/O port accessors now. Signed-off-by: Arnd Bergmann --- arch/sh/include/asm/io.h | 4 ++-- arch/sh/include/asm/machvec.h | 5 ----- arch/sh/kernel/ioport.c | 13 +------------ 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h index f2f38e9d489ac..ac521f287fa59 100644 --- a/arch/sh/include/asm/io.h +++ b/arch/sh/include/asm/io.h @@ -181,7 +181,7 @@ static inline void pfx##out##bwlq##p(type val, unsigned long port) \ { \ volatile type *__addr; \ \ - __addr = __ioport_map(port, sizeof(type)); \ + __addr = (void __iomem *)sh_io_port_base + port; \ *__addr = val; \ slow; \ } \ @@ -191,7 +191,7 @@ static inline type pfx##in##bwlq##p(unsigned long port) \ volatile type *__addr; \ type __val; \ \ - __addr = __ioport_map(port, sizeof(type)); \ + __addr = (void __iomem *)sh_io_port_base + port; \ __val = *__addr; \ slow; \ \ diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h index 2b4b085e8f219..4e5314b921f19 100644 --- a/arch/sh/include/asm/machvec.h +++ b/arch/sh/include/asm/machvec.h @@ -19,11 +19,6 @@ struct sh_machine_vector { int (*mv_irq_demux)(int irq); void (*mv_init_irq)(void); -#ifdef CONFIG_HAS_IOPORT_MAP - void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size); - void (*mv_ioport_unmap)(void __iomem *); -#endif - int (*mv_clk_init)(void); int (*mv_mode_pins)(void); diff --git a/arch/sh/kernel/ioport.c b/arch/sh/kernel/ioport.c index f39446a658bdb..c8aff8a20164d 100644 --- a/arch/sh/kernel/ioport.c +++ b/arch/sh/kernel/ioport.c @@ -12,15 +12,6 @@ unsigned long sh_io_port_base __read_mostly = -1; EXPORT_SYMBOL(sh_io_port_base); -void __iomem *__ioport_map(unsigned long addr, unsigned int size) -{ - if (sh_mv.mv_ioport_map) - return sh_mv.mv_ioport_map(addr, size); - - return (void __iomem *)(addr + sh_io_port_base); -} -EXPORT_SYMBOL(__ioport_map); - void __iomem *ioport_map(unsigned long port, unsigned int nr) { void __iomem *ret; @@ -29,13 +20,11 @@ void __iomem *ioport_map(unsigned long port, unsigned int nr) if (ret) return ret; - return __ioport_map(port, nr); + return (void __iomem *)(port + sh_io_port_base); } EXPORT_SYMBOL(ioport_map); void ioport_unmap(void __iomem *addr) { - if (sh_mv.mv_ioport_unmap) - sh_mv.mv_ioport_unmap(addr); } EXPORT_SYMBOL(ioport_unmap); -- 2.39.2