From nobody Fri Apr 17 03:01:21 2026 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1339036681D for ; Tue, 24 Feb 2026 08:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771923481; cv=none; b=EBgjtwO20Il7IC7GycrzjxrXNuVEU8CM2ldhbxE39ikwdNm97sF2ArSvB2l79cD+/nscZH853n9MQHbb7toitjW2Np2na72k1HG8hcRjrh0XGNRlRjRDTEuXhIOjwa+yhvZ69UIL3OdO2MswjTl7AURO1VJjQw2HtDULtl9VWUk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771923481; c=relaxed/simple; bh=75tIlJhL7lTvbSGE7D59R10soZGFPbIv0b8WGkPwmek=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ecDLS5cWVZKQx8L+vMeWn7X7ltJRCSGwja3fqdTuFUTYg7K8TndOXWRT684ZRssNKfnv81UEpGHrznddA8x58zLE4vj3gx+9c4TtE0PdZpm+QsLjCNsGk8JE+fDjqFxvDQmn8APKv8iQJCTvHGspB/OoLcC4U9oyEGlOHlHDEF8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=LiQO4QDA; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="LiQO4QDA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; s=k1; bh=LkBWz+K1nxLr/l Bo/t63y5ciaH4V8V92AgZnhwFxGiA=; b=LiQO4QDAIPC7jcFmuXQdpS9cUIzzff rXWVlM9nR60bsKOnCkWjG0KnKQTqD81SwstkLHp6FEz3vYXFtiamSQVd5hgItMGq GV9+bJGPQ50+Ac4ldqd1/vlEg3Mj4E28u/nF02AdxtVuthUCsJE7ELD9+nntiQ7h d0HkE9X1UbIZxLn9T9E1VlZ9/bTfDL/nH/EjGWSGImvrCKh9VZ52v5gdOg2K2Rru LrZjemW/Q8ZwVyzT83Y5GQOkT/mcff8RaSRsEL4wIxcuq3mV1aJSsP7ogw/qBrbz l0XrVuhNFsQj8xLj9ahx68kzfmuU8AEKWck47h34E3GWLiq9ixsTjLgg== Received: (qmail 175537 invoked from network); 24 Feb 2026 09:57:54 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 24 Feb 2026 09:57:54 +0100 X-UD-Smtp-Session: l3s3148p1@Nso9FY5LUsUgAwDPXzF+ANZpdrMKUeLI From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Wolfram Sang , Peter Chen , Fugang Duan , CIX Linux Kernel Upstream Group , Jassi Brar , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Sudeep Holla , Thierry Reding , Jonathan Hunter , linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-acpi@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [RFC PATCH] mailbox: remove superfluous internal header Date: Tue, 24 Feb 2026 09:50:21 +0100 Message-ID: <20260224085720.18055-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Quite some controller drivers use the defines from the internal header already. This prevents controller drivers outside the mailbox directory. Move the defines to the public controller header to allow this again as the defines are not strictly internal anyhow. Signed-off-by: Wolfram Sang Reviewed-by: Sudeep Holla --- I need this for a combined driver (mailbox + hwspinlock at least) which probably ends up in drivers/soc. But it seems reasonable to me to do this anyway. Locally build tested. Still waiting for buildbot results. Opinions? drivers/mailbox/cix-mailbox.c | 2 -- drivers/mailbox/hi3660-mailbox.c | 2 -- drivers/mailbox/imx-mailbox.c | 2 -- drivers/mailbox/mailbox-sti.c | 2 -- drivers/mailbox/mailbox.c | 2 -- drivers/mailbox/mailbox.h | 12 ------------ drivers/mailbox/omap-mailbox.c | 2 -- drivers/mailbox/pcc.c | 2 -- drivers/mailbox/tegra-hsp.c | 2 -- include/linux/mailbox_controller.h | 5 +++++ 10 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 drivers/mailbox/mailbox.h diff --git a/drivers/mailbox/cix-mailbox.c b/drivers/mailbox/cix-mailbox.c index 443620e8ae37..864f98f21fc3 100644 --- a/drivers/mailbox/cix-mailbox.c +++ b/drivers/mailbox/cix-mailbox.c @@ -12,8 +12,6 @@ #include #include =20 -#include "mailbox.h" - /* * The maximum transmission size is 32 words or 128 bytes. */ diff --git a/drivers/mailbox/hi3660-mailbox.c b/drivers/mailbox/hi3660-mail= box.c index 17c29e960fbf..9b727a2b54a5 100644 --- a/drivers/mailbox/hi3660-mailbox.c +++ b/drivers/mailbox/hi3660-mailbox.c @@ -15,8 +15,6 @@ #include #include =20 -#include "mailbox.h" - #define MBOX_CHAN_MAX 32 =20 #define MBOX_RX 0x0 diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 003f9236c35e..22331b579489 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -23,8 +23,6 @@ #include #include =20 -#include "mailbox.h" - #define IMX_MU_CHANS 24 /* TX0/RX0/RXDB[0-3] */ #define IMX_MU_SCU_CHANS 6 diff --git a/drivers/mailbox/mailbox-sti.c b/drivers/mailbox/mailbox-sti.c index b4b5bdd503cf..b6c9ecbbc8ec 100644 --- a/drivers/mailbox/mailbox-sti.c +++ b/drivers/mailbox/mailbox-sti.c @@ -21,8 +21,6 @@ #include #include =20 -#include "mailbox.h" - #define STI_MBOX_INST_MAX 4 /* RAM saving: Max supported instances */ #define STI_MBOX_CHAN_MAX 20 /* RAM saving: Max supported channels */ =20 diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index e63b2292ee7a..9d41a1ab9018 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -18,8 +18,6 @@ #include #include =20 -#include "mailbox.h" - static LIST_HEAD(mbox_cons); static DEFINE_MUTEX(con_mutex); =20 diff --git a/drivers/mailbox/mailbox.h b/drivers/mailbox/mailbox.h deleted file mode 100644 index e1ec4efab693..000000000000 --- a/drivers/mailbox/mailbox.h +++ /dev/null @@ -1,12 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __MAILBOX_H -#define __MAILBOX_H - -#include - -#define TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */ -#define TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */ -#define TXDONE_BY_ACK BIT(2) /* S/W ACK received by Client ticks the TX */ - -#endif /* __MAILBOX_H */ diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index d9f100c18895..5772c6b9886a 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c @@ -22,8 +22,6 @@ #include #include =20 -#include "mailbox.h" - #define MAILBOX_REVISION 0x000 #define MAILBOX_MESSAGE(m) (0x040 + 4 * (m)) #define MAILBOX_FIFOSTATUS(m) (0x080 + 4 * (m)) diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index 22e70af1ae5d..636879ae1db7 100644 --- a/drivers/mailbox/pcc.c +++ b/drivers/mailbox/pcc.c @@ -59,8 +59,6 @@ #include #include =20 -#include "mailbox.h" - #define MBOX_IRQ_NAME "pcc-mbox" =20 /** diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c index ed9a0bb2bcd8..2231050bb5a9 100644 --- a/drivers/mailbox/tegra-hsp.c +++ b/drivers/mailbox/tegra-hsp.c @@ -16,8 +16,6 @@ =20 #include =20 -#include "mailbox.h" - #define HSP_INT_IE(x) (0x100 + ((x) * 4)) #define HSP_INT_IV 0x300 #define HSP_INT_IR 0x304 diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_con= troller.h index 80a427c7ca29..16fef421c30c 100644 --- a/include/linux/mailbox_controller.h +++ b/include/linux/mailbox_controller.h @@ -3,6 +3,7 @@ #ifndef __MAILBOX_CONTROLLER_H #define __MAILBOX_CONTROLLER_H =20 +#include #include #include #include @@ -11,6 +12,10 @@ =20 struct mbox_chan; =20 +#define TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */ +#define TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */ +#define TXDONE_BY_ACK BIT(2) /* S/W ACK received by Client ticks the TX */ + /** * struct mbox_chan_ops - methods to control mailbox channels * @send_data: The API asks the MBOX controller driver, in atomic --=20 2.51.0