Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4001306rdb; Thu, 14 Sep 2023 08:56:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoXLqGfYEDI1lEUyl7ufjAX6klVt6i9iCIeQ4KAkUhrs7zl5ej9rkBrQo4XWMyY+pvuWX6 X-Received: by 2002:a05:6870:58a9:b0:1bf:77e2:95cc with SMTP id be41-20020a05687058a900b001bf77e295ccmr5863434oab.17.1694706969543; Thu, 14 Sep 2023 08:56:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694706969; cv=none; d=google.com; s=arc-20160816; b=GN2Vxh/TFQyBmIm77HUjUNNkIWpfJqIDW3X+10PQObhJMVp4bNL5cdakiRpV6YtXv1 UNlbJHroe00OSX5hLfp8LKY9Ih/d2ww0W6sx+/FmGCoK/Vu40XmFv+J4rzajTtcIA0gK mHlSAq4CEZIY/1cHSKc/SpyP80wNqkeMuJpK7mennUN2FvlTjmJCf7WWP5BWDCky3QLG gN6whvozhxr1nn7TjSrFmuGg73JUyPY2iTwGDv1XCT8zXtfSEeKN2SMAGc+eeb6pfw0q tgQX4lynPvh0uUF54hRIC6+QsjFcEWmvh2btBVvS/aF/NEO7jxj6n+jobUXS/UdupmsH xQYQ== 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=MLL8dR+/bhQJnOv+ux9aho/GWK0jEIt0QSM+093Yx3E=; b=ToyBZX+rzvcPqmvk7fp4FNvOqsM5urZyEC4zPmps65c6oFEVNCuevYJom/qlZOVYvL +ECi4OcR8g8xOod8oYo6NXPQ5Fr18W9Wdz7wZ/6Ekz+o6vuPfdeUd0/2+MqzrUQDTGiS 5Ru/O+Lh+3YRNhuv28AeBQXlFDrGkgPmAMPCSWkwyll3sOCSxdoRo5brnU7ZINtXX90U RAJd+EVmNMCMoR2b1X7bE5Lr0W0fBtji/bIv3iLVr7mbZSqqCwrUZ/ITh+i9Hb+UbZ2U sdOgNKDM0psjWRBCWY6uHlK3R+HnUUxJWr/6aQhLSc5YW6/xPmqpxr5slxgSgoUfUssj dTTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="heRjq/BZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 4-20020a630004000000b00573f83d85e8si1815443pga.467.2023.09.14.08.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 08:56:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="heRjq/BZ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 46ACD82AC7B0; Thu, 14 Sep 2023 08:56:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241312AbjINPz4 (ORCPT + 99 others); Thu, 14 Sep 2023 11:55:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241270AbjINPzt (ORCPT ); Thu, 14 Sep 2023 11:55:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9EF61FD7; Thu, 14 Sep 2023 08:55:44 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C93C8C433C8; Thu, 14 Sep 2023 15:55:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694706944; bh=WYKfkfr7MebQWbq9faERXzPtA07lKx6EmcLFTn6CB2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=heRjq/BZpFMe00VYlNyixPB2IcAbNqocd4sDnS5NRJC7qIiJCN13BI5NXW4QG/S21 yK0SvEUgs3En6g7///M2Ngdy4mJYxqRuOYarjV6ltPHQSONODfdvkrxkg9Y7Oy/BM3 hD9Aj0AAKCygjmlHjWKKCiwGzDezm5OaOWkK1sVZ+NEaXwAzJlEpwGVZTXh1U461cV Ny0nlqut4oc1fDm7f0yK6aiiLoEBibLgDLC63T7OM253FC1GHUFzAG6Zk619EGHCNv n6En7PougAGfJX2hGhNdFrh3D1EBm4ZplRwDPvJ/tqfHeeDeFbpUmoaW+lFL5QVeT5 5wyubgBNMmwag== From: Arnd Bergmann To: John Paul Adrian Glaubitz Cc: Geert Uytterhoeven , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 4/4] [v2] sh: machvec: remove custom ioport_{un,}map() Date: Thu, 14 Sep 2023 17:55:23 +0200 Message-Id: <20230914155523.3839811-4-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230914155523.3839811-1-arnd@kernel.org> References: <20230914155523.3839811-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Sep 2023 08:56:04 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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