Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp707353pxb; Wed, 20 Jan 2021 19:23:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQbWs8a0JhyzGmJ86ORwVFEFzelQ7Z/IHzdtr9DGcgFvXgszzPttQNOhwfLhkgD9DWMK/l X-Received: by 2002:a17:907:3f9e:: with SMTP id hr30mr7737492ejc.445.1611199420267; Wed, 20 Jan 2021 19:23:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611199420; cv=none; d=google.com; s=arc-20160816; b=NeE93a3hiejvbyZWLKUeejdmnB8MTCqFrvQG6PaHaKqwcwdeT5QOscCUj0XdYYy/EL NVCzykyj6qWdUJ0/XR0EFsi3yvX5vq7UYJvp362E8MP8ZYVJWZJ9yqfnWDoXcd/Kt0EC ojK64McPIwlGNUEkhC1H4k0G2RqEuYA15PBi9aZpIFiVWRTABU690HzjsiAzewMpysGe aznBAzrL6k7T+NZQ+DCPT15NC2rLScPTghMQNGY0+vHNFbyPkRDpEsUAhM/KKG0VSTmV FvgAWb+cMa7jbl1vDDnTUwgNAJ6g6dQtD3yXORZTTyZZZFL41xoVCpNZ2YTO7WmFBIFp h5pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=RKh8CnIceSaUDjjaJWgA+kSyaMBkQOplWTDE8jBTZLA=; b=RUy700CtOFdk3XFL4BJC7BfAiHUqAZpciQVLp19f30Zyz0NDVMO/nk4Ex15tWD54aD xm4tbGwO57/u/B77fycMaK5RfUNVTKqldZXEn+i7SZV98Vhg+bqDm56QQswCuL0IU3By Bk6uGe2wjfH3KuvKP6QEuZeEX7po3WtI04iTTnfC9BhsGo27DDK7GAt8QNC6Z6/bzNlD 1G23LZcbksjKZweIB1m4pjxDXkONB59ZLZGIq5rb2/h7pm3OpLakD1UTtcNL3Jm7Eq5f /L6ixH38/KZi1D5Zurw+QdKR6sew0zmAgcQ50O1DAeS0lp9B8baSpQHu5YVODWPxA1YR kPWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si1311213ejr.370.2021.01.20.19.23.16; Wed, 20 Jan 2021 19:23:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2403876AbhATXxL convert rfc822-to-8bit (ORCPT + 99 others); Wed, 20 Jan 2021 18:53:11 -0500 Received: from mail-ej1-f48.google.com ([209.85.218.48]:41196 "EHLO mail-ej1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731770AbhATVaN (ORCPT ); Wed, 20 Jan 2021 16:30:13 -0500 Received: by mail-ej1-f48.google.com with SMTP id g12so35583180ejf.8 for ; Wed, 20 Jan 2021 13:29:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=+o6HGPiViAIr2DHqFpPeY8IyCTAEuh1zYRN4P/Gv+oA=; b=ErDiHtUjHVcJxIp/w7LHGAe3ucD8dwyoZyliRXppefAM8i3s8LaxOOyJeYty6YgE3i G+E5z8fOJ+ijk3h38h8SX47icNzdZNaAkOD5DniAmxeKQJNDC3y0Sm4Bsi2yZjQgCRA9 k8ip1fz0gWmOwa7KyLIkkGj0Bfjc6mB7NFCgdOfydzx14SkjnBXXM8M2YyhYyaFxC+nZ J5UTnzZhpX9AihapF+U0TDmPEMH01+zMsHomf8X7ZYGbGhETV5Wsa76v7wpDTgciRp1r 9Wav/Vy91NWLFdQIBgMVYHRi9NTNIHr5jIBlHgh0buoRSOwNz5LUJ4fkUQ7L3HVAMIt1 cygA== X-Gm-Message-State: AOAM532QlgQ+tdq+iNgzmZL+2lmq+tAKJ7fqE5Ldnb8XRTj041bYR9nk OGvQfkhETfWPKJIxep3sKK+TgVjwprQngvv8os0= X-Received: by 2002:a17:906:32d6:: with SMTP id k22mr7321402ejk.457.1611178170937; Wed, 20 Jan 2021 13:29:30 -0800 (PST) MIME-Version: 1.0 References: <20210120132154.2224550-1-arnd@kernel.org> In-Reply-To: <20210120132154.2224550-1-arnd@kernel.org> From: Barry Song Date: Thu, 21 Jan 2021 10:29:19 +1300 Message-ID: Subject: Re: [PATCH] hwspinlock: remove sirf driver To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, LKML , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann 于2021年1月21日周四 上午2:22写道: > > From: Arnd Bergmann > > The CSR SiRF prima2/atlas platforms are getting removed, so this driver > is no longer needed. > > Cc: Barry Song > Link: https://lore.kernel.org/linux-arm-kernel/20210120124812.2800027-1-arnd@kernel.org/T/ > Signed-off-by: Arnd Bergmann Acked-by: Barry Song > --- > .../bindings/hwlock/sirf,hwspinlock.txt | 28 ----- > drivers/hwspinlock/Kconfig | 11 -- > drivers/hwspinlock/Makefile | 1 - > drivers/hwspinlock/sirf_hwspinlock.c | 105 ------------------ > 4 files changed, 145 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt > delete mode 100644 drivers/hwspinlock/sirf_hwspinlock.c > > diff --git a/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt b/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt > deleted file mode 100644 > index 9bb1240a68e0..000000000000 > --- a/Documentation/devicetree/bindings/hwlock/sirf,hwspinlock.txt > +++ /dev/null > @@ -1,28 +0,0 @@ > -SIRF Hardware spinlock device Binding > ------------------------------------------------ > - > -Required properties : > -- compatible : shall contain only one of the following: > - "sirf,hwspinlock" > - > -- reg : the register address of hwspinlock > - > -- #hwlock-cells : hwlock users only use the hwlock id to represent a specific > - hwlock, so the number of cells should be <1> here. > - > -Please look at the generic hwlock binding for usage information for consumers, > -"Documentation/devicetree/bindings/hwlock/hwlock.txt" > - > -Example of hwlock provider: > - hwlock { > - compatible = "sirf,hwspinlock"; > - reg = <0x13240000 0x00010000>; > - #hwlock-cells = <1>; > - }; > - > -Example of hwlock users: > - node { > - ... > - hwlocks = <&hwlock 2>; > - ... > - }; > diff --git a/drivers/hwspinlock/Kconfig b/drivers/hwspinlock/Kconfig > index 32cd26352f38..53e13476e831 100644 > --- a/drivers/hwspinlock/Kconfig > +++ b/drivers/hwspinlock/Kconfig > @@ -28,17 +28,6 @@ config HWSPINLOCK_QCOM > > If unsure, say N. > > -config HWSPINLOCK_SIRF > - tristate "SIRF Hardware Spinlock device" > - depends on ARCH_SIRF || COMPILE_TEST > - help > - Say y here to support the SIRF Hardware Spinlock device, which > - provides a synchronisation mechanism for the various processors > - on the SoC. > - > - It's safe to say n here if you're not interested in SIRF hardware > - spinlock or just want a bare minimum kernel. > - > config HWSPINLOCK_SPRD > tristate "SPRD Hardware Spinlock device" > depends on ARCH_SPRD || COMPILE_TEST > diff --git a/drivers/hwspinlock/Makefile b/drivers/hwspinlock/Makefile > index ed053e3f02be..1f8dd6f5814f 100644 > --- a/drivers/hwspinlock/Makefile > +++ b/drivers/hwspinlock/Makefile > @@ -6,7 +6,6 @@ > obj-$(CONFIG_HWSPINLOCK) += hwspinlock_core.o > obj-$(CONFIG_HWSPINLOCK_OMAP) += omap_hwspinlock.o > obj-$(CONFIG_HWSPINLOCK_QCOM) += qcom_hwspinlock.o > -obj-$(CONFIG_HWSPINLOCK_SIRF) += sirf_hwspinlock.o > obj-$(CONFIG_HWSPINLOCK_SPRD) += sprd_hwspinlock.o > obj-$(CONFIG_HWSPINLOCK_STM32) += stm32_hwspinlock.o > obj-$(CONFIG_HSEM_U8500) += u8500_hsem.o > diff --git a/drivers/hwspinlock/sirf_hwspinlock.c b/drivers/hwspinlock/sirf_hwspinlock.c > deleted file mode 100644 > index a3f77120bad7..000000000000 > --- a/drivers/hwspinlock/sirf_hwspinlock.c > +++ /dev/null > @@ -1,105 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0 > -/* > - * SIRF hardware spinlock driver > - * > - * Copyright (c) 2015 Cambridge Silicon Radio Limited, a CSR plc group company. > - */ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -#include "hwspinlock_internal.h" > - > -struct sirf_hwspinlock { > - void __iomem *io_base; > - struct hwspinlock_device bank; > -}; > - > -/* Number of Hardware Spinlocks*/ > -#define HW_SPINLOCK_NUMBER 30 > - > -/* Hardware spinlock register offsets */ > -#define HW_SPINLOCK_BASE 0x404 > -#define HW_SPINLOCK_OFFSET(x) (HW_SPINLOCK_BASE + 0x4 * (x)) > - > -static int sirf_hwspinlock_trylock(struct hwspinlock *lock) > -{ > - void __iomem *lock_addr = lock->priv; > - > - /* attempt to acquire the lock by reading value == 1 from it */ > - return !!readl(lock_addr); > -} > - > -static void sirf_hwspinlock_unlock(struct hwspinlock *lock) > -{ > - void __iomem *lock_addr = lock->priv; > - > - /* release the lock by writing 0 to it */ > - writel(0, lock_addr); > -} > - > -static const struct hwspinlock_ops sirf_hwspinlock_ops = { > - .trylock = sirf_hwspinlock_trylock, > - .unlock = sirf_hwspinlock_unlock, > -}; > - > -static int sirf_hwspinlock_probe(struct platform_device *pdev) > -{ > - struct sirf_hwspinlock *hwspin; > - struct hwspinlock *hwlock; > - int idx; > - > - if (!pdev->dev.of_node) > - return -ENODEV; > - > - hwspin = devm_kzalloc(&pdev->dev, > - struct_size(hwspin, bank.lock, > - HW_SPINLOCK_NUMBER), > - GFP_KERNEL); > - if (!hwspin) > - return -ENOMEM; > - > - /* retrieve io base */ > - hwspin->io_base = devm_platform_ioremap_resource(pdev, 0); > - if (IS_ERR(hwspin->io_base)) > - return PTR_ERR(hwspin->io_base); > - > - for (idx = 0; idx < HW_SPINLOCK_NUMBER; idx++) { > - hwlock = &hwspin->bank.lock[idx]; > - hwlock->priv = hwspin->io_base + HW_SPINLOCK_OFFSET(idx); > - } > - > - platform_set_drvdata(pdev, hwspin); > - > - return devm_hwspin_lock_register(&pdev->dev, &hwspin->bank, > - &sirf_hwspinlock_ops, 0, > - HW_SPINLOCK_NUMBER); > -} > - > -static const struct of_device_id sirf_hwpinlock_ids[] = { > - { .compatible = "sirf,hwspinlock", }, > - {}, > -}; > -MODULE_DEVICE_TABLE(of, sirf_hwpinlock_ids); > - > -static struct platform_driver sirf_hwspinlock_driver = { > - .probe = sirf_hwspinlock_probe, > - .driver = { > - .name = "atlas7_hwspinlock", > - .of_match_table = sirf_hwpinlock_ids, > - }, > -}; > - > -module_platform_driver(sirf_hwspinlock_driver); > - > -MODULE_LICENSE("GPL v2"); > -MODULE_DESCRIPTION("SIRF Hardware spinlock driver"); > -MODULE_AUTHOR("Wei Chen "); > -- > 2.29.2 >