diff options
Diffstat (limited to 'arch/riscv')
-rw-r--r-- | arch/riscv/cpu/k1/Kconfig | 1 | ||||
-rw-r--r-- | arch/riscv/cpu/start.S | 4 | ||||
-rw-r--r-- | arch/riscv/dts/binman.dtsi | 10 | ||||
-rw-r--r-- | arch/riscv/dts/cv18xx.dtsi | 14 | ||||
-rw-r--r-- | arch/riscv/dts/k1.dtsi | 35 | ||||
-rw-r--r-- | arch/riscv/dts/starfive-visionfive2-binman.dtsi | 76 | ||||
-rw-r--r-- | arch/riscv/include/asm/arch-jh7110/gpio.h | 5 | ||||
-rw-r--r-- | arch/riscv/include/asm/setjmp.h | 15 | ||||
-rw-r--r-- | arch/riscv/lib/bootm.c | 4 | ||||
-rw-r--r-- | arch/riscv/lib/cache.c | 6 | ||||
-rw-r--r-- | arch/riscv/lib/crt0_riscv_efi.S | 1 |
11 files changed, 50 insertions, 121 deletions
diff --git a/arch/riscv/cpu/k1/Kconfig b/arch/riscv/cpu/k1/Kconfig index d9cd8dce964..14201df80f2 100644 --- a/arch/riscv/cpu/k1/Kconfig +++ b/arch/riscv/cpu/k1/Kconfig @@ -13,6 +13,7 @@ config SPACEMIT_K1 imply RISCV_ACLINT if RISCV_MMODE imply SPL_RISCV_ACLINT if SPL_RISCV_MMODE imply CMD_CPU + imply DM_RESET imply SPL_CPU imply SPL_OPENSBI imply SPL_LOAD_FIT diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index 3f78932aa9d..7bafdfd390a 100644 --- a/arch/riscv/cpu/start.S +++ b/arch/riscv/cpu/start.S @@ -90,8 +90,8 @@ _start: * Set stackpointer in internal/ex RAM to call board_init_f */ call_board_init_f: -#if defined(CONFIG_XPL_BUILD) && defined(CONFIG_SPL_STACK) - li t0, CONFIG_SPL_STACK +#if CONFIG_IS_ENABLED(HAVE_INIT_STACK) + li t0, CONFIG_VAL(STACK) #else li t0, SYS_INIT_SP_ADDR #endif diff --git a/arch/riscv/dts/binman.dtsi b/arch/riscv/dts/binman.dtsi index 0405faca574..ceb916b74a7 100644 --- a/arch/riscv/dts/binman.dtsi +++ b/arch/riscv/dts/binman.dtsi @@ -82,8 +82,9 @@ }; }; -#ifndef CONFIG_OF_BOARD +#if !defined(CONFIG_OF_BOARD) || defined(CONFIG_MULTI_DTB_FIT) @fdt-SEQ { + fit,operation = "gen-fdt-nodes"; description = "NAME"; type = "flat_dt"; compression = "none"; @@ -92,9 +93,12 @@ }; configurations { + +#ifndef CONFIG_MULTI_DTB_FIT default = "conf-1"; +#endif -#ifndef CONFIG_OF_BOARD +#if !defined(CONFIG_OF_BOARD) || defined(CONFIG_MULTI_DTB_FIT) @conf-SEQ { #else conf-1 { @@ -115,7 +119,7 @@ #endif #endif /* CONFIG_OPTEE */ -#ifndef CONFIG_OF_BOARD +#if !defined(CONFIG_OF_BOARD) || defined(CONFIG_MULTI_DTB_FIT) fdt = "fdt-SEQ"; #endif }; diff --git a/arch/riscv/dts/cv18xx.dtsi b/arch/riscv/dts/cv18xx.dtsi index 8a7386b76e6..6fac247e7ac 100644 --- a/arch/riscv/dts/cv18xx.dtsi +++ b/arch/riscv/dts/cv18xx.dtsi @@ -46,20 +46,6 @@ #clock-cells = <0>; }; - eth_csrclk: eth-csrclk { - compatible = "fixed-clock"; - clock-frequency = <250000000>; - clock-output-names = "eth_csrclk"; - #clock-cells = <0x0>; - }; - - eth_ptpclk: eth-ptpclk { - compatible = "fixed-clock"; - clock-frequency = <50000000>; - clock-output-names = "eth_ptpclk"; - #clock-cells = <0x0>; - }; - soc { compatible = "simple-bus"; interrupt-parent = <&plic>; diff --git a/arch/riscv/dts/k1.dtsi b/arch/riscv/dts/k1.dtsi index 514be453dba..7c0f1b928e2 100644 --- a/arch/riscv/dts/k1.dtsi +++ b/arch/riscv/dts/k1.dtsi @@ -327,7 +327,7 @@ ranges; uart0: serial@d4017000 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017000 0x0 0x100>; interrupts = <42>; clock-frequency = <14857000>; @@ -337,7 +337,7 @@ }; uart2: serial@d4017100 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017100 0x0 0x100>; interrupts = <44>; clock-frequency = <14857000>; @@ -347,7 +347,7 @@ }; uart3: serial@d4017200 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017200 0x0 0x100>; interrupts = <45>; clock-frequency = <14857000>; @@ -357,7 +357,7 @@ }; uart4: serial@d4017300 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017300 0x0 0x100>; interrupts = <46>; clock-frequency = <14857000>; @@ -367,7 +367,7 @@ }; uart5: serial@d4017400 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017400 0x0 0x100>; interrupts = <47>; clock-frequency = <14857000>; @@ -377,7 +377,7 @@ }; uart6: serial@d4017500 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017500 0x0 0x100>; interrupts = <48>; clock-frequency = <14857000>; @@ -387,7 +387,7 @@ }; uart7: serial@d4017600 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017600 0x0 0x100>; interrupts = <49>; clock-frequency = <14857000>; @@ -397,7 +397,7 @@ }; uart8: serial@d4017700 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017700 0x0 0x100>; interrupts = <50>; clock-frequency = <14857000>; @@ -407,7 +407,7 @@ }; uart9: serial@d4017800 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xd4017800 0x0 0x100>; interrupts = <51>; clock-frequency = <14857000>; @@ -447,7 +447,7 @@ }; sec_uart1: serial@f0612000 { - compatible = "spacemit,k1-uart", "snps,dw-apb-uart"; + compatible = "spacemit,k1-uart", "intel,xscale-uart"; reg = <0x0 0xf0612000 0x0 0x100>; interrupts = <43>; clock-frequency = <14857000>; @@ -455,5 +455,20 @@ reg-io-width = <4>; status = "reserved"; /* for TEE usage */ }; + + reset: reset-controller@d4050000 { + compatible = "spacemit,k1-reset"; + reg = <0x0 0xd4050000 0x0 0x209c>, + <0x0 0xd4282800 0x0 0x400>, + <0x0 0xd4015000 0x0 0x1000>, + <0x0 0xd4090000 0x0 0x1000>, + <0x0 0xd4282c00 0x0 0x400>, + <0x0 0xd8440000 0x0 0x98>, + <0x0 0xc0000000 0x0 0x4280>, + <0x0 0xf0610000 0x0 0x20>; + reg-names = "mpmu", "apmu", "apbc", "apbs", "ciu", "dciu", "ddrc", "apbc2"; + #reset-cells = <1>; + status = "disabled"; + }; }; };
\ No newline at end of file diff --git a/arch/riscv/dts/starfive-visionfive2-binman.dtsi b/arch/riscv/dts/starfive-visionfive2-binman.dtsi index 4cce001e80d..05787bdb92d 100644 --- a/arch/riscv/dts/starfive-visionfive2-binman.dtsi +++ b/arch/riscv/dts/starfive-visionfive2-binman.dtsi @@ -13,82 +13,6 @@ }; &binman { - itb { - fit { - images { - fdt-jh7110-milkv-mars { - description = "jh7110-milkv-mars"; - load = <0x40400000>; - compression = "none"; - - blob-ext { - filename = "dts/upstream/src/riscv/starfive/jh7110-milkv-mars.dtb"; - }; - }; - - fdt-jh7110-pine64-star64 { - description = "jh7110-pine64-star64"; - load = <0x40400000>; - compression = "none"; - - blob-ext { - filename = "dts/upstream/src/riscv/starfive/jh7110-pine64-star64.dtb"; - }; - }; - - fdt-jh7110-starfive-visionfive-2-v1.2a { - description = "jh7110-starfive-visionfive-2-v1.2a"; - load = <0x40400000>; - compression = "none"; - - blob-ext { - filename = "dts/upstream/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.2a.dtb"; - }; - }; - - fdt-jh7110-starfive-visionfive-2-v1.3b { - description = "jh7110-starfive-visionfive-2-v1.3b"; - load = <0x40400000>; - compression = "none"; - - blob-ext { - filename = "dts/upstream/src/riscv/starfive/jh7110-starfive-visionfive-2-v1.3b.dtb"; - }; - }; - }; - - configurations { - conf-jh7110-milkv-mars { - description = "jh7110-milkv-mars"; - firmware = "opensbi"; - loadables = "uboot"; - fdt = "fdt-jh7110-milkv-mars"; - }; - - conf-jh7110-pine64-star64 { - description = "jh7110-pine64-star64"; - firmware = "opensbi"; - loadables = "uboot"; - fdt = "fdt-jh7110-pine64-star64"; - }; - - conf-jh7110-starfive-visionfive-2-v1.2a { - description = "jh7110-starfive-visionfive-2-v1.2a"; - firmware = "opensbi"; - loadables = "uboot"; - fdt = "fdt-jh7110-starfive-visionfive-2-v1.2a"; - }; - - conf-jh7110-starfive-visionfive-2-v1.3b { - description = "jh7110-starfive-visionfive-2-v1.3b"; - firmware = "opensbi"; - loadables = "uboot"; - fdt = "fdt-jh7110-starfive-visionfive-2-v1.3b"; - }; - }; - }; - }; - spl-img { filename = "spl/u-boot-spl.bin.normal.out"; diff --git a/arch/riscv/include/asm/arch-jh7110/gpio.h b/arch/riscv/include/asm/arch-jh7110/gpio.h index 90aa2f8a9ed..be2a1e0d1c8 100644 --- a/arch/riscv/include/asm/arch-jh7110/gpio.h +++ b/arch/riscv/include/asm/arch-jh7110/gpio.h @@ -63,6 +63,11 @@ enum gpio_state { GPIO_DIN_MASK << GPIO_SHIFT(gpi), \ ((gpio + 2) & GPIO_DIN_MASK) << GPIO_SHIFT(gpi)) +#define SYS_IOMUX_DIN_DISABLED(gpi)\ + clrsetbits_le32(JH7110_SYS_IOMUX + GPIO_DIN + GPIO_OFFSET(gpi), \ + GPIO_DIN_MASK << GPIO_SHIFT(gpi), \ + ((0x1) & GPIO_DIN_MASK) << GPIO_SHIFT(gpi)) + #define SYS_IOMUX_SET_DS(gpio, ds) \ clrsetbits_le32(JH7110_SYS_IOMUX + GPIO_CONFIG + gpio * 4, \ GPIO_DS_MASK, (ds) << GPIO_DS_SHIFT) diff --git a/arch/riscv/include/asm/setjmp.h b/arch/riscv/include/asm/setjmp.h index 72383d43303..08687e0f92b 100644 --- a/arch/riscv/include/asm/setjmp.h +++ b/arch/riscv/include/asm/setjmp.h @@ -3,13 +3,9 @@ * (C) Copyright 2018 Alexander Graf <agraf@suse.de> */ -#ifndef _SETJMP_H_ -#define _SETJMP_H_ 1 +#ifndef _ASM_SETJMP_H_ +#define _ASM_SETJMP_H_ 1 -/* - * This really should be opaque, but the EFI implementation wrongly - * assumes that a 'struct jmp_buf_data' is defined. - */ struct jmp_buf_data { /* x2, x8, x9, x18, x19, x20, x21, x22, x23, x24, x25, x26, x27, sp */ unsigned long s_regs[12]; /* s0 - s11 */ @@ -17,9 +13,4 @@ struct jmp_buf_data { unsigned long sp; }; -typedef struct jmp_buf_data jmp_buf[1]; - -int setjmp(jmp_buf jmp); -void longjmp(jmp_buf jmp, int ret); - -#endif /* _SETJMP_H_ */ +#endif /* _ASM_SETJMP_H_ */ diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index 76c610bcee0..9544907ab1e 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -46,10 +46,6 @@ static void announce_and_cleanup(int fake) bootstage_report(); #endif -#ifdef CONFIG_USB_DEVICE - udc_disconnect(); -#endif - board_quiesce_devices(); /* diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c index 71e4937ab54..31aa30bc7d7 100644 --- a/arch/riscv/lib/cache.c +++ b/arch/riscv/lib/cache.c @@ -8,6 +8,7 @@ #include <dm.h> #include <asm/insn-def.h> #include <linux/const.h> +#include <linux/errno.h> #define CBO_INVAL(base) \ INSN_I(OPCODE_MISC_MEM, FUNC3(2), __RD(0), \ @@ -151,3 +152,8 @@ __weak void enable_caches(void) if (!zicbom_block_size) log_debug("Zicbom not initialized.\n"); } + +int __weak pgprot_set_attrs(phys_addr_t addr, size_t size, enum pgprot_attrs perm) +{ + return -ENOSYS; +} diff --git a/arch/riscv/lib/crt0_riscv_efi.S b/arch/riscv/lib/crt0_riscv_efi.S index 9eacbe4a859..f170e4b26d6 100644 --- a/arch/riscv/lib/crt0_riscv_efi.S +++ b/arch/riscv/lib/crt0_riscv_efi.S @@ -179,6 +179,7 @@ section_table: IMAGE_SCN_CNT_INITIALIZED_DATA) .align 12 + .globl _start _start: addi sp, sp, -(SIZE_LONG * 3) SAVE_LONG(a0, 0) |