litex: Allow custom peripheral memory mapping and IRQ.
This commit is contained in:
parent
92d23e7d6d
commit
34fdc3da0d
@ -25,6 +25,10 @@
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LITEX_USE_CUSTOM_IRQ_DEFINITIONS
|
||||
#include CONFIG_LITEX_CUSTOM_IRQ_DEFINITIONS_PATH
|
||||
#else
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@ -40,4 +44,5 @@
|
||||
|
||||
#define NR_IRQS (LITEX_IRQ_SDCARD + 1)
|
||||
|
||||
#endif /* CONFIG_LITEX_USE_CUSTOM_IRQ_DEFINITIONS */
|
||||
#endif /* __ARCH_RISCV_INCLUDE_LITEX_IRQ_H */
|
||||
|
@ -16,6 +16,44 @@ menu "LITEX Peripheral Support"
|
||||
# These "hidden" settings determine whether a peripheral option is available
|
||||
# for the selected MCU
|
||||
|
||||
config LITEX_USE_CUSTOM_MEMORY_MAP
|
||||
bool "Custom peripheral memory mapping"
|
||||
default n
|
||||
---help---
|
||||
Use a custom memory map for the peripheral base addresses defined in
|
||||
arch/risc-v/src/litex/hardware/litex_memorymap.h.
|
||||
|
||||
if LITEX_USE_CUSTOM_MEMORY_MAP
|
||||
|
||||
config LITEX_CUSTOM_MEMORY_MAP_PATH
|
||||
string "Path to custom memory map include file."
|
||||
default ""
|
||||
---help---
|
||||
Specify the path to the file containing the peripheral memory mapping.
|
||||
The path specified must be relative to arch/risc-v/src/litex/hardware/litex_memorymap.h.
|
||||
The file must redefine any symbols which are intended to be overridden.
|
||||
|
||||
endif
|
||||
|
||||
config LITEX_USE_CUSTOM_IRQ_DEFINITIONS
|
||||
bool "Custom IRQ mapping"
|
||||
default n
|
||||
---help---
|
||||
Use custom definitions for risc-v IRQ numbers and sequence.
|
||||
Allowing for the definitions in arch/risc-v/include/litex/irq.h to be overridden.
|
||||
|
||||
if LITEX_USE_CUSTOM_IRQ_DEFINITIONS
|
||||
|
||||
config LITEX_CUSTOM_IRQ_DEFINITIONS_PATH
|
||||
string "Path to custom IRQ mapping include file."
|
||||
default ""
|
||||
---help---
|
||||
Specify the path to the file containing the custom IRQ definitions.
|
||||
The path specified must be relative to arch/risc-v/include/litex/irq.
|
||||
The file must redefine any symbols which are intended to be overridden.
|
||||
|
||||
endif
|
||||
|
||||
config LITEX_HAVE_UART0
|
||||
bool
|
||||
default y
|
||||
|
@ -21,6 +21,14 @@
|
||||
#ifndef __ARCH_RISCV_SRC_LITEX_HARDWARE_LITEX_MEMORYMAP_H
|
||||
#define __ARCH_RISCV_SRC_LITEX_HARDWARE_LITEX_MEMORYMAP_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LITEX_USE_CUSTOM_MEMORY_MAP
|
||||
#include CONFIG_LITEX_CUSTOM_MEMORY_MAP_PATH
|
||||
#else
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@ -45,4 +53,5 @@
|
||||
#define LITEX_ETHMAC_RXBASE 0x80000000
|
||||
#define LITEX_ETHMAC_TXBASE 0x80001000
|
||||
|
||||
#endif /* CONFIG_LITEX_USE_CUSTOM_MEMORY_MAP */
|
||||
#endif /* __ARCH_RISCV_SRC_LITEX_HARDWARE_LITEX_MEMORYMAP_H */
|
||||
|
Loading…
Reference in New Issue
Block a user