sifive: switch to OF_UPSTREAM
Subsystems (4)
PATCH 1/1 sifive: switch to OF_UPSTREAM
Tested on HiFive Unleashed and HiFive Unmatched, both SPIFlash and MMC boot.
Signed-off-by Andreas Schwab <[email protected]>
--- arch/riscv/cpu/fu540/Kconfig | 1 + arch/riscv/cpu/fu740/Kconfig | 1 + arch/riscv/dts/Makefile | 2 - arch/riscv/dts/fu540-c000-u-boot.dtsi | 16 +- arch/riscv/dts/fu540-c000.dtsi | 286 --------------- arch/riscv/dts/fu740-c000.dtsi | 326 ------------------ arch/riscv/dts/hifive-unleashed-a00.dts | 105 ------ arch/riscv/dts/hifive-unmatched-a00.dts | 246 ------------- configs/sifive_unleashed_defconfig | 2 +- configs/sifive_unmatched_defconfig | 2 +- drivers/clk/sifive/fu540-prci.c | 8 +- include/dt-bindings/clock/sifive-fu540-prci.h | 18 - 12 files changed, 16 insertions(+), 997 deletions(-) delete mode 100644 arch/riscv/dts/fu540-c000.dtsi delete mode 100644 arch/riscv/dts/fu740-c000.dtsi delete mode 100644 arch/riscv/dts/hifive-unleashed-a00.dts delete mode 100644 arch/riscv/dts/hifive-unmatched-a00.dts delete mode 100644 include/dt-bindings/clock/sifive-fu540-prci.h
arch/riscv/cpu/fu540/Kconfig +1 -0
@@ -39,6 +39,7 @@ config SIFIVE_FU540 imply PWM_SIFIVE imply DM_I2C imply SYS_I2C_OCORES + imply OF_UPSTREAM if ENV_IS_IN_SPI_FLASH
arch/riscv/cpu/fu740/Kconfig +1 -0
@@ -40,6 +40,7 @@ config SIFIVE_FU740 imply DM_I2C imply SYS_I2C_OCORES imply SPL_I2C + imply OF_UPSTREAM if ENV_IS_IN_SPI_FLASH
arch/riscv/dts/Makefile +0 -2
@@ -9,8 +9,6 @@ dtb-$(CONFIG_TARGET_MILKV_DUO) += cv1800b-milkv-duo.dtb dtb-$(CONFIG_TARGET_LICHEERV_NANO) += sg2002-licheerv-nano-b.dtb dtb-$(CONFIG_TARGET_QEMU_VIRT) += qemu-virt32.dtb qemu-virt64.dtb dtb-$(CONFIG_TARGET_OPENPITON_RISCV64) += openpiton-riscv64.dtb -dtb-$(CONFIG_TARGET_SIFIVE_UNLEASHED) += hifive-unleashed-a00.dtb -dtb-$(CONFIG_TARGET_SIFIVE_UNMATCHED) += hifive-unmatched-a00.dtb dtb-$(CONFIG_TARGET_SIPEED_MAIX) += k210-maix-bit.dtb dtb-$(CONFIG_TARGET_XILINX_MBV) += xilinx-mbv32.dtb dtb-$(CONFIG_TARGET_XILINX_MBV) += xilinx-mbv64.dtb
arch/riscv/dts/fu540-c000-u-boot.dtsi +8 -8
@@ -7,11 +7,11 @@ / { cpus { - assigned-clocks = <&prci PRCI_CLK_COREPLL>; + assigned-clocks = <&prci FU540_PRCI_CLK_COREPLL>; assigned-clock-rates = <1000000000>; bootph-pre-ram; cpu0: cpu@0 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; status = "okay"; cpu0_intc: interrupt-controller {
@@ -19,28 +19,28 @@ }; }; cpu1: cpu@1 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; cpu1_intc: interrupt-controller { bootph-pre-ram; }; }; cpu2: cpu@2 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; cpu2_intc: interrupt-controller { bootph-pre-ram; }; }; cpu3: cpu@3 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; cpu3_intc: interrupt-controller { bootph-pre-ram; }; }; cpu4: cpu@4 { - clocks = <&prci PRCI_CLK_COREPLL>; + clocks = <&prci FU540_PRCI_CLK_COREPLL>; bootph-pre-ram; cpu4_intc: interrupt-controller { bootph-pre-ram;
@@ -80,7 +80,7 @@ reg = <0x0 0x100b0000 0x0 0x0800 0x0 0x100b2000 0x0 0x2000 0x0 0x100b8000 0x0 0x1000>; - clocks = <&prci PRCI_CLK_DDRPLL>; + clocks = <&prci FU540_PRCI_CLK_DDRPLL>; clock-frequency = <933333324>; bootph-pre-ram; };
@@ -100,7 +100,7 @@ }; ð0 { - assigned-clocks = <&prci PRCI_CLK_GEMGXLPLL>; + assigned-clocks = <&prci FU540_PRCI_CLK_GEMGXLPLL>; assigned-clock-rates = <125000000>; };
arch/riscv/dts/fu540-c000.dtsi deleted +0 -286
286 lines not on this page · raw message
arch/riscv/dts/fu740-c000.dtsi deleted +0 -326
326 lines not on this page · raw message
arch/riscv/dts/hifive-unleashed-a00.dts deleted +0 -105
105 lines not on this page · raw message
arch/riscv/dts/hifive-unmatched-a00.dts deleted +0 -246
246 lines not on this page · raw message
configs/sifive_unleashed_defconfig +1 -1
@@ -6,7 +6,7 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_SPL_DM_SPI=y -CONFIG_DEFAULT_DEVICE_TREE="hifive-unleashed-a00" +CONFIG_DEFAULT_DEVICE_TREE="sifive/hifive-unleashed-a00" CONFIG_DM_RESET=y CONFIG_SPL_MMC=y CONFIG_SPL_STACK=0x81cfe70
configs/sifive_unmatched_defconfig +1 -1
@@ -7,7 +7,7 @@ CONFIG_NR_DRAM_BANKS=1 CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80200000 CONFIG_SPL_DM_SPI=y -CONFIG_DEFAULT_DEVICE_TREE="hifive-unmatched-a00" +CONFIG_DEFAULT_DEVICE_TREE="sifive/hifive-unmatched-a00" CONFIG_DM_RESET=y CONFIG_SPL_MMC=y CONFIG_SPL_STACK=0x81cfe60
drivers/clk/sifive/fu540-prci.c +4 -4
@@ -59,25 +59,25 @@ static const struct __prci_clock_ops sifive_fu540_prci_tlclksel_clk_ops = {/* List of clock controls provided by the PRCI */ static struct __prci_clock __prci_init_clocks_fu540[] = { - [PRCI_CLK_COREPLL ] = { + [FU540_PRCI_CLK_COREPLL ] = { .name ="corepll" , .parent_name ="hfclk" , .ops = &sifive_fu540_prci_wrpll_clk_ops, .pwd = &__prci_corepll_data, }, - [PRCI_CLK_DDRPLL ] = { + [FU540_PRCI_CLK_DDRPLL ] = { .name ="ddrpll" , .parent_name ="hfclk" , .ops = &sifive_fu540_prci_wrpll_clk_ops, .pwd = &__prci_ddrpll_data, }, - [PRCI_CLK_GEMGXLPLL ] = { + [FU540_PRCI_CLK_GEMGXLPLL ] = { .name ="gemgxlpll" , .parent_name ="hfclk" , .ops = &sifive_fu540_prci_wrpll_clk_ops, .pwd = &__prci_gemgxlpll_data, }, - [PRCI_CLK_TLCLK ] = { + [FU540_PRCI_CLK_TLCLK ] = { .name ="tlclk" , .parent_name ="corepll" , .ops = &sifive_fu540_prci_tlclksel_clk_ops,
include/dt-bindings/clock/sifive-fu540-prci.h deleted +0 -18
@@ -1,18 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* -* Copyright (C) 2018-2019 SiFive, Inc. -* Wesley Terpstra -* Paul Walmsley -*/ - -#ifndef __DT_BINDINGS_CLOCK_SIFIVE_FU540_PRCI_H -#define __DT_BINDINGS_CLOCK_SIFIVE_FU540_PRCI_H - -/* Clock indexes for use by Device Tree data and the PRCI driver */ - -#define PRCI_CLK_COREPLL 0 -#define PRCI_CLK_DDRPLL 1 -#define PRCI_CLK_GEMGXLPLL 2 -#define PRCI_CLK_TLCLK 3 - -#endif
Signature · 7 lines
2.52.0 -- Andreas Schwab, SUSE Labs, [email protected] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
Quoted 14 lines · Andreas Schwab
Tested on HiFive Unleashed and HiFive Unmatched, both SPIFlash and MMC boot.
Signed-off-by Andreas Schwab <[email protected]>--- arch/riscv/cpu/fu540/Kconfig | 1 + arch/riscv/cpu/fu740/Kconfig | 1 + arch/riscv/dts/Makefile | 2 - arch/riscv/dts/fu540-c000-u-boot.dtsi | 16 +- arch/riscv/dts/fu540-c000.dtsi | 286 --------------- arch/riscv/dts/fu740-c000.dtsi | 326 ------------------ arch/riscv/dts/hifive-unleashed-a00.dts | 105 ------ arch/riscv/dts/hifive-unmatched-a00.dts | 246 ------------- configs/sifive_unleashed_defconfig | 2 +- configs/sifive_unmatched_defconfig | 2 +-
Quoted 8 lines
drivers/clk/sifive/fu540-prci.c | 8 +- include/dt-bindings/clock/sifive-fu540-prci.h | 18 - 12 files changed, 16 insertions(+), 997 deletions(-) delete mode 100644 arch/riscv/dts/fu540-c000.dtsi delete mode 100644 arch/riscv/dts/fu740-c000.dtsi delete mode 100644 arch/riscv/dts/hifive-unleashed-a00.dts delete mode 100644 arch/riscv/dts/hifive-unmatched-a00.dts delete mode 100644 include/dt-bindings/clock/sifive-fu540-prci.h
Reviewed-by Leo Yu-Chi Liang <[email protected]>