* [PATCH] mips: add support for Siflower MIPS SoCs
@ 2025-01-20 1:52 Chuanhong Guo
2025-01-22 12:05 ` Jiaxun Yang
0 siblings, 1 reply; 3+ messages in thread
From: Chuanhong Guo @ 2025-01-20 1:52 UTC (permalink / raw)
To: Thomas Bogendoerfer, Paul Burton; +Cc: Chuanhong Guo, linux-mips, linux-kernel
Siflower MIPS SoCs like SF19A2890 uses dual-core MIPS InterAptiv
processor, built-in GMAC, USB, dual-band WiFi and various other
peripherals.
Notably, it uses some ARM PLxxx peripherals, and ARM_AMBA is
selected for the drivers.
Most devices on the market with this chip come with 64M or less
DRAM. A kmalloc.h with malloc alignment override is added to
conserve memory, and a MACH_SIFLOWER_MIPS is created with reduced
features instead of using the generic kernel.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
---
arch/mips/Kconfig | 30 +++++++++++++++++++
arch/mips/generic/Platform | 1 +
arch/mips/include/asm/mach-siflower/kmalloc.h | 9 ++++++
3 files changed, 40 insertions(+)
create mode 100644 arch/mips/include/asm/mach-siflower/kmalloc.h
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 1924f2d83932..e26636f2bc66 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -895,6 +895,36 @@ config SIBYTE_BIGSUR
select ZONE_DMA32 if 64BIT
select SWIOTLB if ARCH_DMA_ADDR_T_64BIT && PCI
+config MACH_SIFLOWER_MIPS
+ bool "Siflower MIPS SoCs"
+ select MIPS_GENERIC
+ select MACH_GENERIC_CORE
+ select ARM_AMBA
+ select BOOT_RAW
+ select CEVT_R4K
+ select CLKSRC_MIPS_GIC
+ select COMMON_CLK
+ select CPU_MIPSR2_IRQ_EI
+ select CPU_MIPSR2_IRQ_VI
+ select CSRC_R4K
+ select DMA_NONCOHERENT
+ select IRQ_MIPS_CPU
+ select MIPS_CPU_SCACHE
+ select MIPS_GIC
+ select MIPS_L1_CACHE_SHIFT_5
+ select NO_EXCEPT_FILL
+ select SMP_UP if SMP
+ select SYS_HAS_CPU_MIPS32_R2
+ select SYS_SUPPORTS_32BIT_KERNEL
+ select SYS_SUPPORTS_LITTLE_ENDIAN
+ select SYS_SUPPORTS_MIPS16
+ select SYS_SUPPORTS_MIPS_CPS
+ select SYS_SUPPORTS_MULTITHREADING
+ select USE_OF
+ help
+ Select this to build a kernel which supports SoCs from Siflower
+ with MIPS InterAptiv cores, like Siflower SF19A2890.
+
config SNI_RM
bool "SNI RM200/300/400"
select ARC_MEMORY
diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
index 0c03623f3897..c09a8484db9b 100644
--- a/arch/mips/generic/Platform
+++ b/arch/mips/generic/Platform
@@ -10,6 +10,7 @@
# Note: order matters, keep the asm/mach-generic include last.
cflags-$(CONFIG_MACH_INGENIC_SOC) += -I$(srctree)/arch/mips/include/asm/mach-ingenic
+cflags-$(CONFIG_MACH_SIFLOWER_MIPS) += -I$(srctree)/arch/mips/include/asm/mach-siflower
cflags-$(CONFIG_MIPS_GENERIC) += -I$(srctree)/arch/mips/include/asm/mach-generic
load-$(CONFIG_MIPS_GENERIC) += 0xffffffff80100000
diff --git a/arch/mips/include/asm/mach-siflower/kmalloc.h b/arch/mips/include/asm/mach-siflower/kmalloc.h
new file mode 100644
index 000000000000..d0b270e2ec64
--- /dev/null
+++ b/arch/mips/include/asm/mach-siflower/kmalloc.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_MACH_SIFLOWER_KMALLOC_H
+#define __ASM_MACH_SIFLOWER_KMALLOC_H
+
+#ifdef CONFIG_DMA_NONCOHERENT
+#define ARCH_DMA_MINALIGN 32
+#endif
+
+#endif /* __ASM_MACH_SIFLOWER_KMALLOC_H */
--
2.48.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mips: add support for Siflower MIPS SoCs
2025-01-20 1:52 [PATCH] mips: add support for Siflower MIPS SoCs Chuanhong Guo
@ 2025-01-22 12:05 ` Jiaxun Yang
2025-01-23 2:43 ` Chuanhong Guo
0 siblings, 1 reply; 3+ messages in thread
From: Jiaxun Yang @ 2025-01-22 12:05 UTC (permalink / raw)
To: Chuanhong Guo, Thomas Bogendoerfer, paulburton; +Cc: linux-mips, linux-kernel
在2025年1月20日一月 上午1:52,Chuanhong Guo写道:
> Siflower MIPS SoCs like SF19A2890 uses dual-core MIPS InterAptiv
> processor, built-in GMAC, USB, dual-band WiFi and various other
> peripherals.
> Notably, it uses some ARM PLxxx peripherals, and ARM_AMBA is
> selected for the drivers.
> Most devices on the market with this chip come with 64M or less
> DRAM. A kmalloc.h with malloc alignment override is added to
> conserve memory, and a MACH_SIFLOWER_MIPS is created with reduced
> features instead of using the generic kernel.
>
> Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Hmm, why not using MIPS_GENERIC.
Thanks
- Jiaxun
[...]
--
- Jiaxun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mips: add support for Siflower MIPS SoCs
2025-01-22 12:05 ` Jiaxun Yang
@ 2025-01-23 2:43 ` Chuanhong Guo
0 siblings, 0 replies; 3+ messages in thread
From: Chuanhong Guo @ 2025-01-23 2:43 UTC (permalink / raw)
To: Jiaxun Yang; +Cc: Thomas Bogendoerfer, paulburton, linux-mips, linux-kernel
On Wed, Jan 22, 2025 at 8:05 PM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:
>
>
>
> 在2025年1月20日一月 上午1:52,Chuanhong Guo写道:
> > Siflower MIPS SoCs like SF19A2890 uses dual-core MIPS InterAptiv
> > processor, built-in GMAC, USB, dual-band WiFi and various other
> > peripherals.
> > Notably, it uses some ARM PLxxx peripherals, and ARM_AMBA is
> > selected for the drivers.
> > Most devices on the market with this chip come with 64M or less
> > DRAM. A kmalloc.h with malloc alignment override is added to
> > conserve memory, and a MACH_SIFLOWER_MIPS is created with reduced
> > features instead of using the generic kernel.
> >
> > Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
>
> Hmm, why not using MIPS_GENERIC.
Mainly to override MIPS_L1_CACHE_SHIFT and ARCH_DMA_MINALIGN.
This saves about 1MB of memory if I remember correctly.
--
Regards,
Chuanhong Guo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-23 2:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-20 1:52 [PATCH] mips: add support for Siflower MIPS SoCs Chuanhong Guo
2025-01-22 12:05 ` Jiaxun Yang
2025-01-23 2:43 ` Chuanhong Guo
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®