[PATCH 12/16] cpu: Add loongarch_cpu driver

2024-05-22 Thread Jiaxun Yang
Implement a driver for LoongArch CPU solely for gathering some information bits from FDT and CPU level config registers. Signed-off-by: Jiaxun Yang --- drivers/cpu/Kconfig | 6 ++ drivers/cpu/Makefile| 1 + drivers/cpu/loongarch_cpu.c | 148

[PATCH 13/16] timer: Add loongarch_timer driver

2024-05-22 Thread Jiaxun Yang
Implement a timer driver for LoongArch architecture driver. It's synced in hardware for every core in a system, and frequency information can be gathered from CPUCFG instruction. It is not described in fdt, thus I have to declare a DRVINFO for it. Signed-off-by: Jiaxun Yang --- drivers/

[PATCH 14/16] board: emulation: Add qemu-loongarch

2024-05-22 Thread Jiaxun Yang
Yet another generic QEMU VIRT machine. QEMU placed FDT in memory before launching U-Boot, so we can just obtian FDT here. Signed-off-by: Jiaxun Yang --- arch/loongarch/Kconfig| 5 ++ arch/loongarch/dts/qemu-loongarch64.dts | 9 +++ board/emulation/qemu

[PATCH 15/16] efi: LoongArch: Define LoongArch bits everywhere

2024-05-22 Thread Jiaxun Yang
They are all coming from UEFI spec, Microsoft PE sepc, or IANA websites. Signed-off-by: Jiaxun Yang --- boot/bootmeth_efi.c | 2 ++ include/asm-generic/pe.h | 2 ++ include/config_distro_bootcmd.h | 5 + include

[PATCH 16/16] efi: LoongArch: Implement everything

2024-05-22 Thread Jiaxun Yang
Implement crt, reloc, linker scripts, wire things up in Makefiles and Kconfig. Signed-off-by: Jiaxun Yang --- arch/loongarch/config.mk | 4 + arch/loongarch/lib/Makefile | 12 ++ arch/loongarch/lib/crt0_loongarch_efi.S | 182 +++ arch

[PATCH 06/16] LoongArch: skeleton and headers

2024-05-22 Thread Jiaxun Yang
Commit for directories, Kconfig, Makefile and headers Some of them are copied from linux, some of them are derived from other architectures, the rest are wriiten on my own. Signed-off-by: Jiaxun Yang --- arch/Kconfig | 15 + arch/loongarch/Kconfig

[PATCH v2 00/10] xtensa: Enable qemu-xtensa board

2024-05-22 Thread Jiaxun Yang
64-2020.07-xtensa-dc232b-elf.tar.gz Signed-off-by: Jiaxun Yang --- Changes in v2: - Fix noMMU memory mappings - Addressing Max's comments in other patches - Link to v1: https://lore.kernel.org/r/20240519-qemu-xtensa-v1-0-8fff0cb11...@flygoat.com --- Jiaxun Yang (10): xtensa: Move dram

[PATCH v2 01/10] xtensa: Move dram_init to xtfpga board file

2024-05-22 Thread Jiaxun Yang
This is a board level stuff. Signed-off-by: Jiaxun Yang --- arch/xtensa/cpu/cpu.c | 5 - board/cadence/xtfpga/xtfpga.c | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/xtensa/cpu/cpu.c b/arch/xtensa/cpu/cpu.c index abcd8f7984fa..d2266812229c 100644

[PATCH v2 02/10] xtensa: Correct define of _end symbol

2024-05-22 Thread Jiaxun Yang
So U-Boot is using _end symbol to detect location of devicetree appended at the end of the ROM. It needs to be calculated based on end of .data load address, as in our lds .current address is address in RAM. Signed-off-by: Jiaxun Yang --- arch/xtensa/cpu/u-boot.lds | 2 ++ arch/xtensa

[PATCH v2 03/10] xtensa: Implement phys virt conversion for PTP_MMU

2024-05-22 Thread Jiaxun Yang
For PTP_MMU our physical address is not directly mapped into virtual address space, we need to access physical memory from those fixed map segments. Implement phys_to_virt and virt_to_phys hook to reflect this setting. Signed-off-by: Jiaxun Yang --- arch/xtensa/include/asm/addrspace.h | 2

[PATCH v2 04/10] xtensa: Define PLATFORM_ELFFLAGS

2024-05-22 Thread Jiaxun Yang
u-boot.elf target requires it to work. Signed-off-by: Jiaxun Yang --- v2: - Concerning big endian CPU Note: CONFIG_SYS_BIG_ENDIAN will never be set for xtensa for now, but as we don't have big endian headers for xtensa core either I think it's fine for now. This will be impr

[PATCH v2 05/10] xtensa: Bring in semihosting headers and config options

2024-05-22 Thread Jiaxun Yang
They are all directly imported from Linux kernel. Reviewed-by: Max Filippov Signed-off-by: Jiaxun Yang --- arch/xtensa/Kconfig | 27 ++ arch/xtensa/include/asm/platform/simcall-gdbio.h | 34 +++ arch/xtensa/include/asm/platform/simcall-iss.h | 73

[PATCH v2 06/10] drivers: serial: Add xtensa semihosting driver

2024-05-22 Thread Jiaxun Yang
Add xtensa semihosting driver. It can't use regular semihosting driver as Xtensa's has it's own semihosting ABI. Signed-off-by: Jiaxun Yang --- v2: - Fix simc_serial_pending implementation - Get puts work --- drivers/serial/Kconfig | 18

[PATCH v2 07/10] drivers: cpu: Add xtensa CPU driver

2024-05-22 Thread Jiaxun Yang
Implement various CPU related functions. I'm actually just using it to get cpu clock frequency. Signed-off-by: Jiaxun Yang --- drivers/cpu/Kconfig | 6 +++ drivers/cpu/Makefile | 1 + drivers/cpu/xtensa_cpu.c | 117 +++ 3 files ch

[PATCH v2 08/10] dts/upsteam: Add Makefile for xtensa

2024-05-22 Thread Jiaxun Yang
It is required to get it xtensa OF_UPSTREAM work. Reviewed-by: Sumit Garg Signed-off-by: Jiaxun Yang --- dts/upstream/src/xtensa/Makefile | 14 ++ 1 file changed, 14 insertions(+) diff --git a/dts/upstream/src/xtensa/Makefile b/dts/upstream/src/xtensa/Makefile new file mode 100644

[PATCH v2 09/10] board: emulation: New board qemu-xtensa

2024-05-22 Thread Jiaxun Yang
Introduce the new board, define every bits. Signed-off-by: Jiaxun Yang --- v2: - Fix maintainers entries - Refine address mapping for noMMU machine - Add a dtsi overlay to describe different memory size for noMMU system --- arch/xtensa/Kconfig | 5

[PATCH v2 10/10] doc: New documentation for qemu-xtensa

2024-05-22 Thread Jiaxun Yang
Introduce the board and provide instructions on how to get it work. Signed-off-by: Jiaxun Yang --- doc/board/emulation/index.rst | 1 + doc/board/emulation/qemu-xtensa.rst | 33 + 2 files changed, 34 insertions(+) diff --git a/doc/board/emulation

Re: [PATCH 00/16] LoongArch initial support

2024-05-23 Thread Jiaxun Yang
在2024年5月23日五月 下午4:25,Tom Rini写道: > On Wed, May 22, 2024 at 04:34:43PM +0100, Jiaxun Yang wrote: > >> Hi all, >> >> Sorry for flooding the mailing list recently, yet another huge RFC series >> ahead. >> >> So after working on MIPS, arm64be and Xte

Re: [PATCH 15/16] efi: LoongArch: Define LoongArch bits everywhere

2024-05-23 Thread Jiaxun Yang
在2024年5月23日五月 下午5:14,Heinrich Schuchardt写道: [...] > Looking at > https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html: > > There the following symbols are mentioned: > > __loongarch__ > __loongarch_grlen > > > Table 15. > C/C++ Built-in Macros Provided for C

Re: [PATCH 16/16] efi: LoongArch: Implement everything

2024-05-23 Thread Jiaxun Yang
在2024年5月23日五月 下午5:26,Heinrich Schuchardt写道: >> diff --git a/arch/loongarch/lib/reloc_loongarch_efi.c >> b/arch/loongarch/lib/reloc_loongarch_efi.c >> new file mode 100644 >> index ..32a7d792103d >> --- /dev/null >> +++ b/arch/loongarch/lib/reloc_loongarch_efi.c > > The code seems t

[PATCH v2 0/2] virtio_gpu driver and relevant fix

2024-05-24 Thread Jiaxun Yang
vidconsole. My current appraoch is to register virtio_init in init_sequence_r, just after pci_init. Is this a viable approach? Should I introduce a config like CONFIG_VIRTIO_INIT_R to allow it to be selected by boards? Thanks Signed-off-by: Jiaxun Yang --- Changes in v2: - Fix left over in previous

[PATCH v2 1/2] virtio: New virtio_gpu driver

2024-05-24 Thread Jiaxun Yang
This driver is implemened based on latest VirtIO spec. It follows operation prodcure as defined in the spec. It implemented multihead (mirroring) support as well. Signed-off-by: Jiaxun Yang --- v2: - Add big endian code path - Reword typical resolution for Kconfig symbol

[PATCH v2 2/2] efi: gop: Mark pixel_format as BLTONLY if we have sync hook

2024-05-24 Thread Jiaxun Yang
spec to reflect this nature. Signed-off-by: Jiaxun Yang --- v2: - Remove an unused variable --- include/efi_api.h| 1 + lib/efi_loader/efi_gop.c | 8 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/efi_api.h b/include/efi_api.h index ab40b1b

Re: [PATCH 1/1] Added arm64 assembly for examples/api crt0

2024-05-25 Thread Jiaxun Yang
在2024年5月21日五月 下午7:15,Tom Rini写道: [...] > > We have long not done a great job with the U-Boot standalone API stuff, > and for a number of years at this point a lot of the use cases it was > used for could instead be filled by making an EFI application. There's a > well defined API there, there's

[PATCH] mmc: mmc_spi: Do not drop first RX byte after CMD TX

2021-01-24 Thread Jiaxun Yang
followed after, so R1 will be dropped here. Signed-off-by: Jiaxun Yang --- drivers/mmc/mmc_spi.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c index 46800bbed2..1da963ba1e 100644 --- a/drivers/mmc/mmc_spi.c +++ b/drivers/mmc/mmc_spi.c @@ -94,10

Re: [PATCH] mmc: mmc_spi: Do not drop first RX byte after CMD TX

2021-01-25 Thread Jiaxun Yang
在 2021/1/24 下午7:38, Meng, Bin 写道: It looks somehow this email did not arrive the mailing list? Yes, it is waiting list moderator for approval as it's my first mail to U-Boot list. As for the patch, U-Boot mms_spi driver does nothing wrong. The dropped byte is for Ncr as required by the sp

<    1   2   3