diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4acd4715ba9d6..af9aa33347921 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -687,7 +687,6 @@ Documentation/platforms/risc-v/hpm6750/index.rst raiden00@railab.me Documentation/platforms/risc-v/index.rst matias@protobits.dev Documentation/platforms/risc-v/jh7110/boards/star64/index.rst luppy@appkaki.com Documentation/platforms/risc-v/jh7110/index.rst luppy@appkaki.com -Documentation/platforms/risc-v/k210/boards/maix-bit/README-qemu.txt raiden00@railab.me Documentation/platforms/risc-v/k210/boards/maix-bit/README.txt raiden00@railab.me Documentation/platforms/risc-v/k210/boards/maix-bit/index.rst raiden00@railab.me Documentation/platforms/risc-v/k210/index.rst raiden00@railab.me diff --git a/Documentation/platforms/risc-v/k210/boards/maix-bit/index.rst b/Documentation/platforms/risc-v/k210/boards/maix-bit/index.rst index 8ab90c7e9b847..83bb368ab9bcf 100644 --- a/Documentation/platforms/risc-v/k210/boards/maix-bit/index.rst +++ b/Documentation/platforms/risc-v/k210/boards/maix-bit/index.rst @@ -30,7 +30,7 @@ Features .. todo:: - If you are intersted in using this board, please consider contributing + If you are interested in using this board, please consider contributing implementations for the above missing features. Installation @@ -77,51 +77,6 @@ Write ``nuttx.bin`` to SPI-Flash: The ``kflash_gui`` is not recommended because it's unstable. -QEMU Process -============ - -In order to run this board's version of NuttX on QEMU, make the following -adjustments: - -QEMU Installation ------------------ - -Installing and building QEMU can be done with: - -.. code:: console - - $ git clone https://github.com/qemu/qemu - $ cd qemu - $ ./configure --target-list=riscv64-softmmu - $ make - $ sudo make install - -Building NuttX for QEMU ------------------------ - -Building NuttX follows the same process, but you will need to modify your chosen -configuration to include the option ``CONFIG_K210_WITH_QEMU=y``. - -Running on QEMU ---------------- - -Run the following: - -.. code:: console - - $ qemu-system-riscv64 -nographic -machine sifive_u -bios ./nuttx - - -.. note:: - - To run Nuttx for kostest, ``gdb`` needs to be used to load both - ``nuttx_user.elf`` and ``nuttx``. - - .. code:: console - - $ qemu-system-riscv64 -nographic -machine sifive_u -s -S - $ riscv64-unknown-elf-gdb -ex 'target extended-remote:1234' -ex 'load nuttx_user.elf' -ex 'load nuttx' -ex 'c' - Configurations ============== diff --git a/arch/risc-v/Kconfig b/arch/risc-v/Kconfig index 3dfdd26ec0973..e7446507a96bd 100644 --- a/arch/risc-v/Kconfig +++ b/arch/risc-v/Kconfig @@ -29,8 +29,8 @@ config ARCH_CHIP_K210 select ARCH_RV_ISA_M select ARCH_RV_ISA_A select ARCH_RV_ISA_C - select ARCH_HAVE_FPU if !K210_WITH_QEMU - select ARCH_HAVE_DPFPU if !K210_WITH_QEMU + select ARCH_HAVE_FPU + select ARCH_HAVE_DPFPU select ARCH_HAVE_MPU select ARCH_HAVE_TESTSET select ARCH_HAVE_MULTICPU diff --git a/arch/risc-v/include/k210/irq.h b/arch/risc-v/include/k210/irq.h index 728da5b5fa65f..c2aa519490027 100644 --- a/arch/risc-v/include/k210/irq.h +++ b/arch/risc-v/include/k210/irq.h @@ -33,13 +33,9 @@ /* Map RISC-V exception code to NuttX IRQ */ -#ifdef CONFIG_K210_WITH_QEMU -#define K210_IRQ_UART0 (RISCV_IRQ_MEXT + 4) -#else #define K210_IRQ_WDT0 (RISCV_IRQ_MEXT + 21) #define K210_IRQ_WDT1 (RISCV_IRQ_MEXT + 22) #define K210_IRQ_UART0 (RISCV_IRQ_MEXT + 33) -#endif /* Total number of IRQs */ diff --git a/arch/risc-v/src/k210/Kconfig b/arch/risc-v/src/k210/Kconfig index 385fc6843c4f3..74b3411c8bce3 100644 --- a/arch/risc-v/src/k210/Kconfig +++ b/arch/risc-v/src/k210/Kconfig @@ -50,11 +50,3 @@ config K210_CPU_FREQ Set the K210 CPU target frequency in Hz. Default is 400000000 (400 MHz). Valid range: 40000000-600000000 Hz (40-600 MHz). - -menu "K210 Others" - -config K210_WITH_QEMU - bool "qemu support" - default n - -endmenu diff --git a/arch/risc-v/src/k210/hardware/k210_memorymap.h b/arch/risc-v/src/k210/hardware/k210_memorymap.h index 59f6ab15a1798..2ef0db1827a30 100644 --- a/arch/risc-v/src/k210/hardware/k210_memorymap.h +++ b/arch/risc-v/src/k210/hardware/k210_memorymap.h @@ -32,11 +32,7 @@ #define K210_CLINT_BASE 0x02000000 #define K210_PLIC_BASE 0x0c000000 -#ifdef CONFIG_K210_WITH_QEMU -#define K210_UART0_BASE 0x10010000 -#else #define K210_UART0_BASE 0x38000000 -#endif #define K210_GPIOHS_BASE 0x38001000 #define K210_FPIOA_BASE 0x502B0000 diff --git a/arch/risc-v/src/k210/k210_clockconfig.c b/arch/risc-v/src/k210/k210_clockconfig.c index b911cd3d4b638..0cd68f10cece9 100644 --- a/arch/risc-v/src/k210/k210_clockconfig.c +++ b/arch/risc-v/src/k210/k210_clockconfig.c @@ -66,7 +66,6 @@ uint32_t k210_get_cpuclk(void) * Name: k210_get_pll0clk ****************************************************************************/ -#ifndef CONFIG_K210_WITH_QEMU uint32_t k210_get_pll0clk(void) { uint32_t pll0; @@ -81,7 +80,6 @@ uint32_t k210_get_pll0clk(void) return OSC_FREQ / nr * nf / od; } -#endif /**************************************************************************** * Name: k210_clockconfig @@ -89,7 +87,6 @@ uint32_t k210_get_pll0clk(void) void k210_clockconfig(void) { -#ifndef CONFIG_K210_WITH_QEMU uint32_t clksel0; uint32_t div; @@ -133,5 +130,4 @@ void k210_clockconfig(void) /* Workaround for stabilization */ up_udelay(1); -#endif } diff --git a/arch/risc-v/src/k210/k210_timerisr.c b/arch/risc-v/src/k210/k210_timerisr.c index 514e29065c8f6..066663721bda8 100644 --- a/arch/risc-v/src/k210/k210_timerisr.c +++ b/arch/risc-v/src/k210/k210_timerisr.c @@ -46,11 +46,7 @@ * Pre-processor Definitions ****************************************************************************/ -#ifdef CONFIG_K210_WITH_QEMU -#define MTIMER_FREQ 1000000 -#else #define MTIMER_FREQ (k210_get_cpuclk() / 50) -#endif /**************************************************************************** * Public Functions diff --git a/boards/Kconfig b/boards/Kconfig index 0ae1906040db2..b67776a957f77 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -1116,7 +1116,7 @@ config ARCH_BOARD_LX_CPU config ARCH_BOARD_MAIX_BIT bool "Sipeed Maix Bit board" depends on ARCH_CHIP_K210 - select ARCH_HAVE_LEDS if !K210_WITH_QEMU + select ARCH_HAVE_LEDS ---help--- This is the board configuration for the port of NuttX to the Sipeed Maix Bit board. This board features the RISC-V K210