From patchwork Mon Dec 2 22:05:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11269969 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AAEB0921 for ; Mon, 2 Dec 2019 22:05:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8906020722 for ; Mon, 2 Dec 2019 22:05:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NgBkTR0K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8906020722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KrUitLbmCpQ3no41+d35LloJxYxqIbp4gBt0LniUGcg=; b=NgBkTR0KNA4vIn XDBPzZ0r7FhTy8tNT2h1QNJGBoFKADZ8R64QDDLUzHmaIMCsk/a6abapQgNokmNHmDT2YPYRFDrb+ TimIYanZrXG0X9iOgj4tNMs9QJS3EeCdnuQyapzWMHhXH6eJaqAJEhkpZJj28nZGkDoJXI42o+8T+ +I4RZsLk+VmOHL3U6kFGiPJTbE6fx3n0iN15IfS2a88KNTzWMHMPIKA9eP7Zc/57q5mAo9+JvGgpg EcELMKtyXZa4MlCLbb0heIupAyVtC02W9S9iwMsCYNFdkW/Df72ugOVlVcCvgWQG6WjG+YaulnFlh ujwX1jmXT7le5VNZCnIw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtpG-0007vn-Gy; Mon, 02 Dec 2019 22:05:50 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtpC-0007tV-NA; Mon, 02 Dec 2019 22:05:48 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3C093B2EC; Mon, 2 Dec 2019 22:05:45 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 1/5] dt-bindings: hwlock: Add Realtek RTD1195 SB2 Date: Mon, 2 Dec 2019 23:05:31 +0100 Message-Id: <20191202220535.6208-2-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191202220535.6208-1-afaerber@suse.de> References: <20191202220535.6208-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191202_140546_912626_2BE5D3AD X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ohad Ben-Cohen , Mark Rutland , Cheng-Yu Lee , devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , Rob Herring , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Define a binding for Realtek RTD1195 SoC's SB2 hardware semaphore. Signed-off-by: Andreas Färber Reviewed-by: Rob Herring --- .../bindings/hwlock/realtek,rtd1195-sb2-sem.yaml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwlock/realtek,rtd1195-sb2-sem.yaml diff --git a/Documentation/devicetree/bindings/hwlock/realtek,rtd1195-sb2-sem.yaml b/Documentation/devicetree/bindings/hwlock/realtek,rtd1195-sb2-sem.yaml new file mode 100644 index 000000000000..8035af02c667 --- /dev/null +++ b/Documentation/devicetree/bindings/hwlock/realtek,rtd1195-sb2-sem.yaml @@ -0,0 +1,42 @@ +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwlock/realtek,rtd1195-sb2-sem.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek RTD1195 SB2 hardware semaphore device tree binding + +maintainers: + - Andreas Färber + +properties: + compatible: + const: realtek,rtd1195-sb2-sem + + reg: + maxItems: 1 + + "#hwlock-cells": + enum: [ 0, 1 ] + +required: + - compatible + - reg + - "#hwlock-cells" + +additionalProperties: false + +examples: + - | + hwspinlock@9801a000 { + compatible = "realtek,rtd1195-sb2-sem"; + reg = <0x9801a000 0x4>; + #hwlock-cells = <0>; + }; + - | + hwspinlock@9801a620 { + compatible = "realtek,rtd1195-sb2-sem"; + reg = <0x9801a620 0x20>; + #hwlock-cells = <1>; + }; +... From patchwork Mon Dec 2 22:05:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11269981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 845B8930 for ; Mon, 2 Dec 2019 22:06:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5FBE02070B for ; Mon, 2 Dec 2019 22:06:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZhIbtiB5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FBE02070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=a2glyl1jhQKhb20uxupHqWkyQMXGzEmd698MtzkC4r8=; b=ZhIbtiB50A4DgD VyfsccZY3M8yD51g40ODMXJv7pI0GUXUc/5zo5z6b2YjdGWAlEGzwnugvg+KE7t6yuYg47G3Re4/V VGDhR4tjuCM372GV7kaL0twSZgDghl6jY3fEI46L/4vbM5JXUvn7V7juY2FVAYgq8WzND5S8l1Ivy PiBXvS8oywc2i2RUxQ72Pud1rZa3tyX082OUxgYBwenQe3naW3TMLwS7NR5MLPdk2sDfzacnq4qwZ OgI88zsErxeOSZKbnI9H9TwGBoJS8Yw0ARFFgdSskNl0zQpyllETkOCXGQ4cZSPrg4bEhjF++5DhL Gd1yY4Hsszz28nPxIHQw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtq4-0000PY-Ef; Mon, 02 Dec 2019 22:06:40 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtpD-0007tW-0I; Mon, 02 Dec 2019 22:05:50 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B9492B2ED; Mon, 2 Dec 2019 22:05:45 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 2/5] hwspinlock: Add Realtek RTD1195 SB2 Date: Mon, 2 Dec 2019 23:05:32 +0100 Message-Id: <20191202220535.6208-3-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191202220535.6208-1-afaerber@suse.de> References: <20191202220535.6208-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191202_140547_335637_3393958F X-CRM114-Status: GOOD ( 13.91 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ohad Ben-Cohen , Cheng-Yu Lee , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Bjorn Andersson , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Implement a driver for hardware semaphores found in RTD1195 SoC. It allows for both per-register instances (SB2_HD_SEM) as well as contiguous register ranges (SB2_HD_SEM_NEW[0-7]). While these registers are part of the SB2 syscon, this implementation does not use syscon, to allow assigning one as SB2 syscon's hwlock. Cc: Cheng-Yu Lee Signed-off-by: Andreas Färber --- drivers/hwspinlock/Kconfig | 11 ++++ drivers/hwspinlock/Makefile | 1 + drivers/hwspinlock/rtd1195_sb2_sem.c | 101 +++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 drivers/hwspinlock/rtd1195_sb2_sem.c diff --git a/drivers/hwspinlock/Kconfig b/drivers/hwspinlock/Kconfig index 37740e992cfa..9c26c436d399 100644 --- a/drivers/hwspinlock/Kconfig +++ b/drivers/hwspinlock/Kconfig @@ -28,6 +28,17 @@ config HWSPINLOCK_QCOM If unsure, say N. +config HWSPINLOCK_RTD1195_SB2 + tristate "Realtek RTD1195 SB2 Hardware Spinlock device" + depends on HWSPINLOCK + depends on ARCH_REALTEK || COMPILE_TEST + default ARCH_REALTEK + help + Say y here to support the Realtek Hardware Semaphore functionality, + found on the RTD1195 and later SoC families. + + If unsure, say N. + config HWSPINLOCK_SIRF tristate "SIRF Hardware Spinlock device" depends on HWSPINLOCK diff --git a/drivers/hwspinlock/Makefile b/drivers/hwspinlock/Makefile index ed053e3f02be..d5bd59412468 100644 --- a/drivers/hwspinlock/Makefile +++ b/drivers/hwspinlock/Makefile @@ -6,6 +6,7 @@ obj-$(CONFIG_HWSPINLOCK) += hwspinlock_core.o obj-$(CONFIG_HWSPINLOCK_OMAP) += omap_hwspinlock.o obj-$(CONFIG_HWSPINLOCK_QCOM) += qcom_hwspinlock.o +obj-$(CONFIG_HWSPINLOCK_RTD1195_SB2) += rtd1195_sb2_sem.o obj-$(CONFIG_HWSPINLOCK_SIRF) += sirf_hwspinlock.o obj-$(CONFIG_HWSPINLOCK_SPRD) += sprd_hwspinlock.o obj-$(CONFIG_HWSPINLOCK_STM32) += stm32_hwspinlock.o diff --git a/drivers/hwspinlock/rtd1195_sb2_sem.c b/drivers/hwspinlock/rtd1195_sb2_sem.c new file mode 100644 index 000000000000..ae925d057874 --- /dev/null +++ b/drivers/hwspinlock/rtd1195_sb2_sem.c @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * RTD1195 SB2 hardware semaphore + * + * Copyright (c) 2019 Andreas Färber + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "hwspinlock_internal.h" + +struct rtd1195_sb2_sem { + struct platform_device *pdev; + void __iomem *base; + int base_id; + struct hwspinlock_device lockdev; +}; + +static DEFINE_IDR(rtd1195_sb2_sem_idr); + +static int rtd1195_sb2_sem_trylock(struct hwspinlock *lock) +{ + void __iomem *reg = (void __iomem *)lock->priv; + + return readl_relaxed(reg) & BIT(0); +} + +static void rtd1195_sb2_sem_unlock(struct hwspinlock *lock) +{ + void __iomem *reg = (void __iomem *)lock->priv; + + writel_relaxed(0, reg); +} + +static const struct hwspinlock_ops rtd1195_sb2_sem_hwspinlock_ops = { + .trylock = rtd1195_sb2_sem_trylock, + .unlock = rtd1195_sb2_sem_unlock, +}; + +static int rtd1195_sb2_sem_probe(struct platform_device *pdev) +{ + struct rtd1195_sb2_sem *sem; + struct hwspinlock *lock; + struct resource *res; + int i, num; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENOMEM; + + num = resource_size(res) / 4; + + sem = devm_kzalloc(&pdev->dev, sizeof(*sem) + num * sizeof(*lock), + GFP_KERNEL); + if (!sem) + return -ENOMEM; + + sem->pdev = pdev; + + sem->base = of_iomap(pdev->dev.of_node, 0); + if (!sem->base) + return -ENOMEM; + + for (i = 0; i < num; i++) { + lock = &sem->lockdev.lock[i]; + lock->priv = sem->base + i * 4; + } + + platform_set_drvdata(pdev, sem); + + sem->base_id = idr_alloc(&rtd1195_sb2_sem_idr, sem, 0, 0, GFP_KERNEL); + + return devm_hwspin_lock_register(&pdev->dev, &sem->lockdev, + &rtd1195_sb2_sem_hwspinlock_ops, sem->base_id, num); +} + +static const struct of_device_id rtd1195_sb2_sem_dt_ids[] = { + { .compatible = "realtek,rtd1195-sb2-sem" }, + { } +}; +MODULE_DEVICE_TABLE(of, rtd1195_sb2_sem_dt_ids); + +static struct platform_driver rtd1195_sb2_sem_platform_driver = { + .driver = { + .name = "rtd1195-sb2-sem", + .of_match_table = rtd1195_sb2_sem_dt_ids, + }, + .probe = rtd1195_sb2_sem_probe, +}; +module_platform_driver(rtd1195_sb2_sem_platform_driver); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Hardware spinlock driver for Realtek RTD1195 SB2"); +MODULE_AUTHOR("Andreas Färber "); From patchwork Mon Dec 2 22:05:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11269977 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C98E930 for ; Mon, 2 Dec 2019 22:06:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3AB4820722 for ; Mon, 2 Dec 2019 22:06:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qWYLgdTb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3AB4820722 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+GqiJM2wmeB0WK6CwWDNy0vHCMxun3ND4t9s5tKDg8w=; b=qWYLgdTbOBhEH/ 5B0+z5PudWUMVthLHLQRwKNSclkDQExEJ+hcCk2SaRTnCRyfwT4kAqsKXLJVxqy72oW16QZZNItPG xNpuUpnt/ZjvkhKrAURA396t8/gYnPpOJFtyK1PPTv4RgY+34FOz65WBj8UW24d/U93TaqbCFpxET l7uj03DY5PDkzO2EFddA9OwEl++nUoNeXeNxEnqVmY4YmYufFhI9yt4HZvk8klYtVxRp6a0y6ogWR he8A8DVC6d8RcSRAFPMWJclWt27G/88Mg4CM/btSzTKqoBJ8opiHNe1WN5iDEScenYs49BrptIgIa 3IciYZ6LMRK2ItwNDj5g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtph-0008Rs-L0; Mon, 02 Dec 2019 22:06:17 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtpD-0007tY-DD; Mon, 02 Dec 2019 22:05:49 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2973CB2F0; Mon, 2 Dec 2019 22:05:46 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 3/5] ARM: dts: rtd1195: Add SB2 sem nodes Date: Mon, 2 Dec 2019 23:05:33 +0100 Message-Id: <20191202220535.6208-4-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191202220535.6208-1-afaerber@suse.de> References: <20191202220535.6208-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191202_140547_584623_2CD38659 X-CRM114-Status: UNSURE ( 8.49 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Cheng-Yu Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add DT nodes to SB2 for hardware semaphores on RTD1195 SoC. Signed-off-by: Andreas Färber --- arch/arm/boot/dts/rtd1195.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/rtd1195.dtsi b/arch/arm/boot/dts/rtd1195.dtsi index 21897210d9d0..6fd12a2d766e 100644 --- a/arch/arm/boot/dts/rtd1195.dtsi +++ b/arch/arm/boot/dts/rtd1195.dtsi @@ -215,3 +215,17 @@ status = "disabled"; }; }; + +&sb2 { + sb2_hd_sem: hwspinlock@0 { + compatible = "realtek,rtd1195-sb2-sem"; + reg = <0x0 0x4>; + #hwlock-cells = <0>; + }; + + sb2_hd_sem_new: hwspinlock@620 { + compatible = "realtek,rtd1195-sb2-sem"; + reg = <0x620 0x20>; + #hwlock-cells = <1>; + }; +}; From patchwork Mon Dec 2 22:05:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11269979 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B097E921 for ; Mon, 2 Dec 2019 22:06:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8EF052070B for ; Mon, 2 Dec 2019 22:06:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BWVtbTAp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EF052070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gMAcVLsWeAisxSQtlqBQsbXvfQLZkgbcFN0ea/amHrY=; b=BWVtbTApxJ4ngK qURx4Oim0k1dd+4jsmrCVrKEiMbK9gt7sCyPhBWcch+7diigVwimoENVLcMVSwWWb0/1xJ+oXEy9r eU3Iy2ph+2wmkKb1uW4Ko3IKsA5TEKGiBpOc+K2loAe3dhGqIHsUm3dLrSlg6MkyNu7RIj1MFCZMo sqjb6gM/zchnQXtWRGBa9hbVJIxv0cJQpNBl0+J834T8qSw2Pj3v/kA9qnB8sqOTunLckmN88zIyC 6u8ajQrUaosADdOIF3XgSIQa6VzVxcP24sO1S17/KT4WVc8J+d13Ab/Lbn1BIaXcka+80bDD+i3r+ 48SlVMSzXVUiJ1t6QK1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtpu-0000DK-Rk; Mon, 02 Dec 2019 22:06:30 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtpD-0007tz-Re; Mon, 02 Dec 2019 22:05:49 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 9523AB2F1; Mon, 2 Dec 2019 22:05:46 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 4/5] arm64: dts: realtek: rtd129x: Add SB2 sem nodes Date: Mon, 2 Dec 2019 23:05:34 +0100 Message-Id: <20191202220535.6208-5-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191202220535.6208-1-afaerber@suse.de> References: <20191202220535.6208-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191202_140548_031766_58FFD9CD X-CRM114-Status: UNSURE ( 8.31 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Cheng-Yu Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add DT nodes to SB2 for hardware sempaphores in RTD1295 SoC family. Signed-off-by: Andreas Färber --- arch/arm64/boot/dts/realtek/rtd129x.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd129x.dtsi b/arch/arm64/boot/dts/realtek/rtd129x.dtsi index 39aefe66a794..93ab6fdd03d4 100644 --- a/arch/arm64/boot/dts/realtek/rtd129x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd129x.dtsi @@ -193,3 +193,17 @@ status = "disabled"; }; }; + +&sb2 { + sb2_hd_sem: hwspinlock@0 { + compatible = "realtek,rtd1195-sb2-sem"; + reg = <0x0 0x4>; + #hwlock-cells = <0>; + }; + + sb2_hd_sem_new: hwspinlock@620 { + compatible = "realtek,rtd1195-sb2-sem"; + reg = <0x620 0x20>; + #hwlock-cells = <1>; + }; +}; From patchwork Mon Dec 2 22:05:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 11269983 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 58C13930 for ; Mon, 2 Dec 2019 22:07:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 357342070B for ; Mon, 2 Dec 2019 22:07:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZKO9nJ+X" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 357342070B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EWh0v3x9J77x7IYEImm2psotvL0DSKxH5iDLUsdVcl0=; b=ZKO9nJ+XMAFKQU s/zr0mbGUSOmarwACc7YnHi3DTFj3McjUfWlHM7Pf/lKXjwOIyD1YpCYxvIyCvRvC5rdVadgBXwAL qj5htnpHZwAkXnEElbkORY4iHSuMt1Az+p4boVIopeujH4Ojv14HNqbSUBmkD6e3kPfr6lFttLqHv ahQG4uwSVEhytDKyt68XWBKqMrk+Px/sWycDvwlh80Vid8jOFxOjf0LUc2MQ4pC7gVl3nC7MiePO9 A5lPb5uWtztk98XUvREeTvC81YcnL8rC29GQ7Nb3vDR783ryO2EDCfAyUSCppUY1zieUhjGt3EgcV culJK9E/QjKiKLg54GGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtqN-0000iX-CW; Mon, 02 Dec 2019 22:06:59 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ibtpF-0007uu-Lt; Mon, 02 Dec 2019 22:05:51 +0000 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 09520B2F2; Mon, 2 Dec 2019 22:05:47 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Subject: [RFC 5/5] arm64: dts: realtek: rtd139x: Add SB2 sem nodes Date: Mon, 2 Dec 2019 23:05:35 +0100 Message-Id: <20191202220535.6208-6-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191202220535.6208-1-afaerber@suse.de> References: <20191202220535.6208-1-afaerber@suse.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191202_140549_879013_A319FE47 X-CRM114-Status: UNSURE ( 8.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Cheng-Yu Lee , linux-kernel@vger.kernel.org, Rob Herring , =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Add DT nodes to SB2 for hardware semaphores in RTD1395 SoC family. Signed-off-by: Andreas Färber --- arch/arm64/boot/dts/realtek/rtd139x.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/realtek/rtd139x.dtsi b/arch/arm64/boot/dts/realtek/rtd139x.dtsi index a3c10ceeb586..586b05350274 100644 --- a/arch/arm64/boot/dts/realtek/rtd139x.dtsi +++ b/arch/arm64/boot/dts/realtek/rtd139x.dtsi @@ -191,3 +191,17 @@ status = "disabled"; }; }; + +&sb2 { + sb2_hd_sem: hwspinlock@0 { + compatible = "realtek,rtd1195-sb2-sem"; + reg = <0x0 0x4>; + #hwlock-cells = <0>; + }; + + sb2_hd_sem_new: hwspinlock@620 { + compatible = "realtek,rtd1195-sb2-sem"; + reg = <0x620 0x20>; + #hwlock-cells = <1>; + }; +};