Skip to content

Commit

Permalink
espi: Add asynchronous sequence support
Browse files Browse the repository at this point in the history
This patch adds asynchronous sequence for silicon test.

Signed-off-by: Lv Zheng <zhenglv@hotmail.com>
  • Loading branch information
zetalog committed Aug 13, 2024
1 parent bce3976 commit d7aca50
Show file tree
Hide file tree
Showing 6 changed files with 445 additions and 295 deletions.
4 changes: 2 additions & 2 deletions arch/riscv/include/asm/mach-k1matrix/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
*/

#include <asm/mach/cpus.h>
#ifdef CONFIG_K1MATRIX_APU
#include <asm/x100.h>
#include <asm/c910.h>
#ifdef CONFIG_K1MATRIX_APU
#if defined(__ASSEMBLY__) && !defined(__DTS__) && !defined(LINKER_SCRIPT)
.macro k1matrix_cpu_smp_init
x100_smp_init
Expand All @@ -59,7 +60,6 @@
#endif
#endif
#ifdef CONFIG_K1MATRIX_RMU
#include <asm/c910.h>
#if defined(__ASSEMBLY__) && !defined(__DTS__) && !defined(LINKER_SCRIPT)
.macro k1matrix_cpu_smp_init
c910_smp_init
Expand Down
8 changes: 8 additions & 0 deletions arch/riscv/include/asm/mach-k1matrix/espi.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#define espi_mrst rmu_espi_rst
#define espi_srst rmu_espi_rst

#define ESPI_IRQ IRQ_ESPI_CON

#define SPACEMIT_ESPI_BASE __RMU_ESPI_CFG_BASE
#define SPACEMIT_ESPI_IO_BASE __RMU_ESPI_IO_BASE
#define SPACEMIT_ESPI_FLASH_BASE __RMU_ESPI_FLASH_BASE
Expand All @@ -25,6 +27,12 @@
#endif

#define espi_hw_ctrl_init() k1matrix_espi_init()
#define espi_hw_get_cfg() spacemit_espi_get_cfg()
#define espi_hw_set_cfg(cfgs) spacemit_espi_set_cfg(cfgs)
#define espi_hw_write_cmd(opcode, hlen, hbuf, dlen, dbuf) \
spacemit_espi_write_cmd(opcode, hlen, hbuf, dlen, dbuf)
#define espi_hw_irq_init() spacemit_espi_irq_init()
#define espi_hw_handle_irq() spacemit_espi_handle_irq()

void k1matrix_espi_init(void);

Expand Down
Loading

0 comments on commit d7aca50

Please sign in to comment.