Skip to content

Commit c57582a

Browse files
committed
Merge tag 'riscv-for-v5.2/fixes-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fixes from Paul Walmsley: "Minor RISC-V fixes and one defconfig update. The fixes have no functional impact: - Fix some comment text in the memory management vmalloc_fault path. - Fix some warnings from the DT compiler in our newly-added DT files. - Change the newly-added DT bindings such that SoC IP blocks with external I/O are marked as "disabled" by default, then enable them explicitly in board DT files when the devices are used on the board. This aligns the bindings with existing upstream practice. - Add the MIT license as an option for a minor header file, at the request of one of the U-Boot maintainers. The RISC-V defconfig update builds the SiFive SPI driver and the MMC-SPI driver by default. The intention here is to make v5.2 more usable for testers and users with RISC-V hardware" * tag 'riscv-for-v5.2/fixes-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: mm: Fix code comment dt-bindings: clock: sifive: add MIT license as an option for the header file dt-bindings: riscv: resolve 'make dt_binding_check' warnings riscv: dts: Re-organize the DT nodes RISC-V: defconfig: enable MMC & SPI for RISC-V
2 parents c949c30 + 0db7f5c commit c57582a

File tree

6 files changed

+39
-16
lines changed

6 files changed

+39
-16
lines changed

Documentation/devicetree/bindings/riscv/cpus.yaml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,19 @@ examples:
152152
- |
153153
// Example 2: Spike ISA Simulator with 1 Hart
154154
cpus {
155-
cpu@0 {
156-
device_type = "cpu";
157-
reg = <0>;
158-
compatible = "riscv";
159-
riscv,isa = "rv64imafdc";
160-
mmu-type = "riscv,sv48";
161-
interrupt-controller {
162-
#interrupt-cells = <1>;
163-
interrupt-controller;
164-
compatible = "riscv,cpu-intc";
165-
};
166-
};
155+
#address-cells = <1>;
156+
#size-cells = <0>;
157+
cpu@0 {
158+
device_type = "cpu";
159+
reg = <0>;
160+
compatible = "riscv";
161+
riscv,isa = "rv64imafdc";
162+
mmu-type = "riscv,sv48";
163+
interrupt-controller {
164+
#interrupt-cells = <1>;
165+
interrupt-controller;
166+
compatible = "riscv,cpu-intc";
167+
};
168+
};
167169
};
168170
...

arch/riscv/boot/dts/sifive/fu540-c000.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,15 @@
163163
interrupt-parent = <&plic0>;
164164
interrupts = <4>;
165165
clocks = <&prci PRCI_CLK_TLCLK>;
166+
status = "disabled";
166167
};
167168
uart1: serial@10011000 {
168169
compatible = "sifive,fu540-c000-uart", "sifive,uart0";
169170
reg = <0x0 0x10011000 0x0 0x1000>;
170171
interrupt-parent = <&plic0>;
171172
interrupts = <5>;
172173
clocks = <&prci PRCI_CLK_TLCLK>;
174+
status = "disabled";
173175
};
174176
i2c0: i2c@10030000 {
175177
compatible = "sifive,fu540-c000-i2c", "sifive,i2c0";
@@ -181,6 +183,7 @@
181183
reg-io-width = <1>;
182184
#address-cells = <1>;
183185
#size-cells = <0>;
186+
status = "disabled";
184187
};
185188
qspi0: spi@10040000 {
186189
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
@@ -191,6 +194,7 @@
191194
clocks = <&prci PRCI_CLK_TLCLK>;
192195
#address-cells = <1>;
193196
#size-cells = <0>;
197+
status = "disabled";
194198
};
195199
qspi1: spi@10041000 {
196200
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
@@ -201,6 +205,7 @@
201205
clocks = <&prci PRCI_CLK_TLCLK>;
202206
#address-cells = <1>;
203207
#size-cells = <0>;
208+
status = "disabled";
204209
};
205210
qspi2: spi@10050000 {
206211
compatible = "sifive,fu540-c000-spi", "sifive,spi0";
@@ -210,6 +215,7 @@
210215
clocks = <&prci PRCI_CLK_TLCLK>;
211216
#address-cells = <1>;
212217
#size-cells = <0>;
218+
status = "disabled";
213219
};
214220
};
215221
};

arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,20 @@
4242
};
4343
};
4444

45+
&uart0 {
46+
status = "okay";
47+
};
48+
49+
&uart1 {
50+
status = "okay";
51+
};
52+
53+
&i2c0 {
54+
status = "okay";
55+
};
56+
4557
&qspi0 {
58+
status = "okay";
4659
flash@0 {
4760
compatible = "issi,is25wp256", "jedec,spi-nor";
4861
reg = <0>;

arch/riscv/configs/defconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ CONFIG_VIRTIO_MMIO=y
6969
CONFIG_CLK_SIFIVE=y
7070
CONFIG_CLK_SIFIVE_FU540_PRCI=y
7171
CONFIG_SIFIVE_PLIC=y
72+
CONFIG_SPI_SIFIVE=y
7273
CONFIG_EXT4_FS=y
7374
CONFIG_EXT4_FS_POSIX_ACL=y
7475
CONFIG_AUTOFS4_FS=y
@@ -84,4 +85,8 @@ CONFIG_ROOT_NFS=y
8485
CONFIG_CRYPTO_USER_API_HASH=y
8586
CONFIG_CRYPTO_DEV_VIRTIO=y
8687
CONFIG_PRINTK_TIME=y
88+
CONFIG_SPI=y
89+
CONFIG_MMC_SPI=y
90+
CONFIG_MMC=y
91+
CONFIG_DEVTMPFS_MOUNT=y
8792
# CONFIG_RCU_TRACE is not set

arch/riscv/mm/fault.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs)
272272
* entries, but in RISC-V, SFENCE.VMA specifies an
273273
* ordering constraint, not a cache flush; it is
274274
* necessary even after writing invalid entries.
275-
* Relying on flush_tlb_fix_spurious_fault would
276-
* suffice, but the extra traps reduce
277-
* performance. So, eagerly SFENCE.VMA.
278275
*/
279276
local_flush_tlb_page(addr);
280277

include/dt-bindings/clock/sifive-fu540-prci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL-2.0 */
1+
/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
22
/*
33
* Copyright (C) 2018-2019 SiFive, Inc.
44
* Wesley Terpstra

0 commit comments

Comments
 (0)