From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796391440; b=MQTj03jXLhyoAOVAjVjhqWEF+NSnSCz/P1J7QOVQ6HmvlgYde97s/M2JeRiVRJQpND3Z QdTTOv0jzWtg31+qrYeMfW0Sn0XyBGlwcvI3jcvDHBMLYIkTofw/vtVTHpHwLyYfVYkoH KkMNe5C1seYZldWKTur18q/3GIWJ6wE8Frl9d30GPIzpXVibYjMIgO72KwFYy0EOmRPlG 406u3hraKB9QaOt0HXxzY32QcgqTRXOiXUWr73Ai+0KwlxtvJuQYOIxUDM2dPG+Zl+0Mh OsPz+QAF1ZbmNWwfh//UAp328vXbRa1ONMa8gvv6ypScWGqVJkk+t5qHMLbX6xK3Igg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796391440; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=KhGHzvH3bn+aNsCOGVV+py9jw2l2WCV7ga5rtEUXUXw=; b=wi7YfXeN7uXa3thBLPP/SktjfUBRyVPRa8d4+IzLHs6BWXAgw5W1GcjCQc/zvb9Hq2o8 ROrnQDT6kpGoSiZuG8WzoQDh9WNxfF8JIExJSXcNmRnSC+7PG6Z7CRcFul5MFsqXO3hUF vmpjAJ/ZnSeor3uVecQS+tCOmIADbw8p5M8KXilMbeyn+qNvE6gY1BdInDGS2vJntTVQ3 +opMSMebZOZCfyfkOCV3g8buA0Bif03LBAmPCB6z2jgrC0jaDWR2OG+EHSh4laFyggTIU Dq7f6L5W5rkF7BJ2LiSKYSs6/33IKdKvPb/CiXiSn3oEa9Hop+kvCniMSTANtv33Duw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=k7VjucHj; arc=none smtp.remote-ip=209.85.161.50 Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A2DE606A322 for ; Fri, 4 Dec 2026 13:37:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0A2DE606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=riscstar.com header.i=@riscstar.com header.a=rsa-sha256 header.s=google header.b=k7VjucHj Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-6b8e2d8df4fso385618eaf.1 for ; Fri, 04 Dec 2026 05:37:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riscstar.com; s=google; t=1796391439; x=1796996239; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=KhGHzvH3bn+aNsCOGVV+py9jw2l2WCV7ga5rtEUXUXw=; b=k7VjucHjzrRH/B+eTrLkiXKZxmuVDtEZaQ1r9am8EBYNietxVWGq1qPgVsnlYapmkM 17M1UfLJslTo9NmcN0Md/6OQ0bnzlLdiithrT0fQKBZ0WY0w5Lqdw9CuEXszE+a1VN5K BOgHKked6ygiXCppEyk8Bbdcg1v3BRSXXJDfzSKu2QxMJrwQGye+xZLz0pSaLs/FT5j+ K0ZU3D+/bT/QFjHufcjMXv8cWgFHDoGjFl/x/D/tFjZUIJ5oXyvT88Qw5V8+mOL5BCTy BlkAAf2mU46hqjnNXKHw87KrOBddLgSxC9pOTUuk21jJk2uFB9p/Y3L4CI5XA9x9xThz 5wTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796391439; x=1796996239; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=KhGHzvH3bn+aNsCOGVV+py9jw2l2WCV7ga5rtEUXUXw=; b=iFRrLRESbzoM0akh4Ua9JfIT4e4bpNnxJCARHKNGzIrXo0XSRyv1bZuxMnK5tuh9wr /w54nXYnQQ2kVaKsPGLioTO+hg5bk707bKRaZeDc7/FpxaUe8aX57NIElW2PCMv8QTU1 YDLPuniEw8SeOv1/KA0ej2jYnZ1uULWJ5Jly5hk9rfSIBFIAvepNXqBnOJ83J41Qn3kV RQRs/qWTIGbgnQLmXpa68LP2wLjmNtSwz+i7orSolqsFXi7py7NDpAJ+273oE2uVUKxq GcUO8alVA023KXNfNrGIg0FYMuMqk/6ERQClXesLz5qc6V8fLBx2zw6pgx8DF5cWSuCM jAxw== X-Forwarded-Encrypted: i=1; AL+hErHaFNEmOwlj8GkZZcteMcgpBwSUBFAP5lDXkIj7aezxPNfU7Yj4QGyagDz1LhthsVcDvSlDjA4GZbb5iVw=@vger.kernel.org X-Gm-Message-State: APuU4Z+QpkIIPN2o9U8WyzbOz9S9S4w5yWFBpVVvpqgZufzrCbkd8BDs kDp7wj5kRDo68haKlvI4y0Ko93Uvs9tYbsDib/batoS0eee3OM3TwmsPEZBLuM6u3y4= X-Gm-Gg: AZFdTZc78PfOn0uBO/uYNU1HkZfRk+wZou+Lz+djp6daqS1TVCeVKJLSfmbpDWhXL45 aXImpTf51Z+W3iF6f0WLiDH/R53ShPhzzvpAezocuZjFyyC66NK57g3HmOuLv7i27uFFJcUN+Bw 0ZxnFv4eQO5hAWRLe5sncJloKjTLc9rPn2qYKKI+J471y21+kbttmv7gTpaTA4tNy1RBBPlRgdw pKfwuP3gDNfV1zaWtWE1cG+5U9PZSU2naEDUbr0YmwI0ojQn5W6GgICWhuaLDF2d1ZvlrmJZ/yn uSNbt7epEShrNhg2OdrGQk35D8gZDdkiCgzugbij8GmVVbIlhdg/iLVE10n4MphNeegrbgtGBlg Na/3tIpSCowdQTkpRVeUS6cI/LjzimX7zc1O1o6J1TYoKJH9+y1tq9m1T3/H5T668lXAsJ3qbcC a2y40yKupMJbK/PTwnXq81ZKQyCEARtzpwmXT4s430JH4T/DBgsf3uQdrfbyY1RRwLJrMNnrlZ9 Z8YSbr8B1N72AcyCKp1fkMSTMgSyMfQEET++0VWpFegjl48DVtACy9YY6q95jxOK45dEshzaX3Z 9hUw9mzef5UXsKC6OqaItTLYfp1dhAM= X-Received: by 2002:a05:6820:8592:20b0:71a:df61:2ec with SMTP id 006d021491bc7-71bf21b6768mr1205299eaf.90.1796391438919; Fri, 04 Dec 2026 05:37:18 -0800 (PST) Received: from [172.22.22.28] ([76.156.233.211]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-863f81e76bdsm2145525a34.8.2026.12.04.05.37.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Dec 2026 05:37:18 -0800 (PST) Message-ID: <70717fcc-59a5-4029-92d7-42617160c757@riscstar.com> Date: Fri, 4 Dec 2026 07:37:16 -0600 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/4] reset: toshiba: introduce a TC9564 reset driver To: Lorenzo Bianconi Cc: sboyd@kernel.org, bmasney+clk@redhat.com, jbrunet+clk@baylibre.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, andersson@kernel.org, konradybcio@kernel.org, abelvesa@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, daniel@riscstar.com, mohd.anwar@oss.qualcomm.com, fabrice.gasnier@foss.st.com, alexandre.torgue@foss.st.com, marex@nabladev.com, changhuang.liang@starfivetech.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261203200948.1595470-1-elder@riscstar.com> <20261203200948.1595470-3-elder@riscstar.com> Content-Language: en-US From: Alex Elder In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/4/26 3:42 AM, Lorenzo Bianconi wrote: >> Define a new auxiliary device driver that manages resets implemented >> by the Toshiba TC9564 SoC. The TC9564 clock driver will create the >> reset device, which will bind to this driver. >> >> The reset controller uses two registers to control a set of 13 resets >> that can be asserted or deasserted. Only a subset of the resets can >> currently be managed. >> >> The MMIO region containing the two control registers is mapped by >> the clock controller driver, and passed via the auxiliary device's >> platform data. >> >> Some common definitions are added to to >> specify the interface between the clock and reset drivers. >> >> Reviewed-by: Philipp Zabel >> Reviewed-by: Lorenzo Bianconi >> Co-developed-by: Daniel Thompson >> Signed-off-by: Daniel Thompson >> Signed-off-by: Alex Elder >> --- >> v5: - Code related to the I2C and PCIE resets (including code that >> warned if they were used) has been removed. >> - The Kconfig now selects AUXILIARY_BUS >> - Philipp's Reviewed-by tag has been added. >> >> MAINTAINERS | 1 + >> drivers/reset/Kconfig | 8 ++ >> drivers/reset/Makefile | 1 + >> drivers/reset/reset-tc9564.c | 165 ++++++++++++++++++++++++++++++++ >> include/linux/soc/qcom/tc9563.h | 9 ++ >> 5 files changed, 184 insertions(+) >> create mode 100644 drivers/reset/reset-tc9564.c >> . . . >> diff --git a/include/linux/soc/qcom/tc9563.h b/include/linux/soc/qcom/tc9563.h >> index 086f37a40d801..f778ce9ae2e7c 100644 >> --- a/include/linux/soc/qcom/tc9563.h >> +++ b/include/linux/soc/qcom/tc9563.h >> @@ -16,4 +16,13 @@ >> #define TC9563_GPIO_CONFIG TC9563_GPIO_EN0_OFFSET >> #define TC9563_RESET_GPIO TC9563_GPIO_OUT0_OFFSET >> >> +/* Name of the clock driver and the reset auxiliary device it creates */ >> +#define TC9564_CLK_MODNAME "clk_tc9564" >> +#define TC9564_RESET_DEV_NAME "tc9564-reset" >> + >> +/* Platform data passed to the TC9564 reset auxiliary driver */ >> +struct tc9564_aux_data { >> + void __iomem *regs; > > nit: I guess we do not really need it. I'm not sure what you mean here. The mapped registers pointer is required by the auxiliary reset driver, so we need to pass it via platform data. If what you're saying is that we could just pass the pointer alone, rather than a structure that *contains* the pointer, that is technically true. (And I think that's what you're saying.) The reason I did it this way is that assigning an __iomem tagged pointer to a simple void pointer (like the platform data) produces a "sparse" warning: warning: incorrect type in assignment (different address spaces) That happens in the clock driver (when setting the platform data) and in the auxiliary reset driver (when getting it from the platform data). I didn't like that, so I enclosed it in a structure to avoid the problem. I *would* prefer to just pass the mapped pointer. But even if I try to cast away the warning with (void *) we get a different warning from "sparse": warning: cast removes address space '__iomem' of expression I think the __iomem tag has value and putting it inside a structure preserves it (and avoids these warnings). So that's how I did it. Unless there are other objections I'd like to keep it this way. Thanks. -Ales > Regards, > Lorenzo > >> +}; >> + >> #endif /* __QCOM_TC9563_H */ >> -- >> 2.53.0 >>