From: Artem Novak <artem122novak@gmail.com>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org,
Artem Novak <artem122novak@gmail.com>
Subject: [PATCH v2 2/2] sh: add SH7305 CPU subtype support
Date: Thu, 1 Oct 2026 22:12:20 -0600 [thread overview]
Message-ID: <20261002041220.133911-3-artem122novak@gmail.com> (raw)
In-Reply-To: <20261002041220.133911-1-artem122novak@gmail.com>
Add the SH7305 as an SH4AL-DSP CPU subtype.
Recognize the SH7305 in the SH-4 CPU probe using the existing
0x300b PVR family with PRR value 0xc0, and expose the processor
name through the SH CPU information interface.
Signed-off-by: Artem Novak <artem122novak@gmail.com>
---
arch/sh/Kconfig | 9 +++++++++
arch/sh/include/asm/processor.h | 2 +-
arch/sh/kernel/cpu/proc.c | 3 ++-
arch/sh/kernel/cpu/sh4/probe.c | 3 +++
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index d60f1d5a94c0..e71b5476769e 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -467,6 +467,15 @@ config CPU_SUBTYPE_SHX3
# SH4AL-DSP Processor Support
+config CPU_SUBTYPE_SH7305
+ bool "Support SH7305 processor"
+ select CPU_SH4AL_DSP
+ help
+ Select this option to build the kernel for systems based on the
+ Renesas SH7305 processor. The SH7305 belongs to the SH4AL-DSP
+ processor family and is used in embedded systems such as Casio
+ graphing calculators.
+
config CPU_SUBTYPE_SH7343
bool "Support SH7343 processor"
select CPU_SH4AL_DSP
diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h
index 2a0b5713ab80..96321c46ce85 100644
--- a/arch/sh/include/asm/processor.h
+++ b/arch/sh/include/asm/processor.h
@@ -36,7 +36,7 @@ enum cpu_type {
CPU_SH7723, CPU_SH7724, CPU_SH7757, CPU_SH7734, CPU_SHX3,
/* SH4AL-DSP types */
- CPU_SH7343, CPU_SH7722, CPU_SH7366, CPU_SH7372,
+ CPU_SH7343, CPU_SH7305, CPU_SH7722, CPU_SH7366, CPU_SH7372,
/* Unknown subtype */
CPU_SH_NONE
diff --git a/arch/sh/kernel/cpu/proc.c b/arch/sh/kernel/cpu/proc.c
index 5f6d0e827bae..b6fbe27742e0 100644
--- a/arch/sh/kernel/cpu/proc.c
+++ b/arch/sh/kernel/cpu/proc.c
@@ -25,7 +25,8 @@ static const char *cpu_name[] = {
[CPU_SH7786] = "SH7786", [CPU_SH7757] = "SH7757",
[CPU_SH7722] = "SH7722", [CPU_SHX3] = "SH-X3",
[CPU_MXG] = "MX-G", [CPU_SH7723] = "SH7723",
- [CPU_SH7366] = "SH7366", [CPU_SH7724] = "SH7724",
+ [CPU_SH7305] = "SH7305", [CPU_SH7366] = "SH7366",
+ [CPU_SH7724] = "SH7724",
[CPU_SH7372] = "SH7372", [CPU_SH7734] = "SH7734",
[CPU_J2] = "J2",
[CPU_SH_NONE] = "Unknown"
diff --git a/arch/sh/kernel/cpu/sh4/probe.c b/arch/sh/kernel/cpu/sh4/probe.c
index ef4dd6295263..7f77fc64258c 100644
--- a/arch/sh/kernel/cpu/sh4/probe.c
+++ b/arch/sh/kernel/cpu/sh4/probe.c
@@ -143,6 +143,9 @@ void cpu_probe(void)
break;
case 0x300b:
switch (prr) {
+ case 0xc0:
+ boot_cpu_data.type = CPU_SH7305;
+ break;
case 0x20:
boot_cpu_data.type = CPU_SH7724;
boot_cpu_data.flags |= CPU_HAS_L2_CACHE;
--
2.55.0
next prev parent reply other threads:[~2026-10-02 4:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 4:12 [PATCH v2 0/2] sh: add initial SH7305 CPU support Artem Novak
2026-10-02 4:12 ` [PATCH v2 1/2] sh: guard SH4 no-FPU compiler fallback Artem Novak
2026-10-02 4:12 ` Artem Novak [this message]
2026-11-09 6:43 ` [PATCH v2 0/2] sh: add initial SH7305 CPU support Artem Novak
2026-11-09 7:04 ` John Paul Adrian Glaubitz
2026-11-09 7:11 ` Artem Novak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261002041220.133911-3-artem122novak@gmail.com \
--to=artem122novak@gmail.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®