Skip to content

Commit 9209fb5

Browse files
Christoph Hellwigpaul-walmsley-sifive
authored andcommitted
riscv: move sifive_l2_cache.c to drivers/soc
The sifive_l2_cache.c is in no way related to RISC-V architecture memory management. It is a little stub driver working around the fact that the EDAC maintainers prefer their drivers to be structured in a certain way that doesn't fit the SiFive SOCs. Move the file to drivers/soc and add a Kconfig option for it, as well as the whole drivers/soc boilerplate for CONFIG_SOC_SIFIVE. Fixes: a967a28 ("RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCs") Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> [[email protected]: keep the MAINTAINERS change specific to the L2$ controller code] Signed-off-by: Paul Walmsley <[email protected]>
1 parent 01f52e1 commit 9209fb5

File tree

8 files changed

+17
-2
lines changed

8 files changed

+17
-2
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6027,6 +6027,7 @@ M: Yash Shah <[email protected]>
60276027
60286028
S: Supported
60296029
F: drivers/edac/sifive_edac.c
6030+
F: drivers/soc/sifive_l2_cache.c
60306031

60316032
EDAC-SKYLAKE
60326033
M: Tony Luck <[email protected]>

arch/riscv/mm/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ obj-y += extable.o
1010
obj-$(CONFIG_MMU) += fault.o
1111
obj-y += cacheflush.o
1212
obj-y += context.o
13-
obj-y += sifive_l2_cache.o
1413

1514
ifeq ($(CONFIG_MMU),y)
1615
obj-$(CONFIG_SMP) += tlbflush.o

drivers/edac/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ config EDAC_ALTERA_SDMMC
462462

463463
config EDAC_SIFIVE
464464
bool "Sifive platform EDAC driver"
465-
depends on EDAC=y && RISCV
465+
depends on EDAC=y && SIFIVE_L2
466466
help
467467
Support for error detection and correction on the SiFive SoCs.
468468

drivers/soc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ source "drivers/soc/qcom/Kconfig"
1414
source "drivers/soc/renesas/Kconfig"
1515
source "drivers/soc/rockchip/Kconfig"
1616
source "drivers/soc/samsung/Kconfig"
17+
source "drivers/soc/sifive/Kconfig"
1718
source "drivers/soc/sunxi/Kconfig"
1819
source "drivers/soc/tegra/Kconfig"
1920
source "drivers/soc/ti/Kconfig"

drivers/soc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ obj-y += qcom/
2020
obj-y += renesas/
2121
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/
2222
obj-$(CONFIG_SOC_SAMSUNG) += samsung/
23+
obj-$(CONFIG_SOC_SIFIVE) += sifive/
2324
obj-y += sunxi/
2425
obj-$(CONFIG_ARCH_TEGRA) += tegra/
2526
obj-y += ti/

drivers/soc/sifive/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
if SOC_SIFIVE
4+
5+
config SIFIVE_L2
6+
bool "Sifive L2 Cache controller"
7+
help
8+
Support for the L2 cache controller on SiFive platforms.
9+
10+
endif

drivers/soc/sifive/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
3+
obj-$(CONFIG_SIFIVE_L2) += sifive_l2_cache.o

0 commit comments

Comments
 (0)