soc/miv: Use DTS to generate PLIC addresses
Describe the MMIO register regions for the PLIC in the DTS instead of hardcoded in soc.h. Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
This commit is contained in:
parent
c48c94c9e6
commit
8907c09fee
3 changed files with 14 additions and 10 deletions
|
@ -36,8 +36,10 @@
|
||||||
compatible = "riscv,plic0";
|
compatible = "riscv,plic0";
|
||||||
interrupt-controller;
|
interrupt-controller;
|
||||||
interrupts-extended = <&hlic 11>;
|
interrupts-extended = <&hlic 11>;
|
||||||
reg = <0x40000000 0x4000000>;
|
reg = <0x40000000 0x2000
|
||||||
reg-names = "control";
|
0x40002000 0x1fe000
|
||||||
|
0x40200000 0x2000000>;
|
||||||
|
reg-names = "prio", "irq_en", "reg";
|
||||||
riscv,max-priority = <1>;
|
riscv,max-priority = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,14 @@
|
||||||
|
|
||||||
|
/* PLIC */
|
||||||
|
#define DT_PLIC_MAX_PRIORITY \
|
||||||
|
DT_RISCV_PLIC0_40000000_RISCV_MAX_PRIORITY
|
||||||
|
#define DT_PLIC_PRIO_BASE_ADDR \
|
||||||
|
DT_RISCV_PLIC0_40000000_PRIO_BASE_ADDRESS
|
||||||
|
#define DT_PLIC_IRQ_EN_BASE_ADDR \
|
||||||
|
DT_RISCV_PLIC0_40000000_IRQ_EN_BASE_ADDRESS
|
||||||
|
#define DT_PLIC_REG_BASE_ADDR \
|
||||||
|
DT_RISCV_PLIC0_40000000_REG_BASE_ADDRESS
|
||||||
|
|
||||||
/* UART 0 */
|
/* UART 0 */
|
||||||
#define DT_MIV_UART_0_BASE_ADDR DT_MICROSEMI_COREUART_70001000_BASE_ADDRESS
|
#define DT_MIV_UART_0_BASE_ADDR DT_MICROSEMI_COREUART_70001000_BASE_ADDRESS
|
||||||
#define DT_MIV_UART_0_CLOCK_FREQUENCY DT_MICROSEMI_COREUART_70001000_CLOCK_FREQUENCY
|
#define DT_MIV_UART_0_CLOCK_FREQUENCY DT_MICROSEMI_COREUART_70001000_CLOCK_FREQUENCY
|
||||||
|
|
|
@ -43,14 +43,6 @@
|
||||||
/* GPIO Configuration */
|
/* GPIO Configuration */
|
||||||
#define MIV_GPIO_0_BASE_ADDR 0x70002000
|
#define MIV_GPIO_0_BASE_ADDR 0x70002000
|
||||||
|
|
||||||
/* Platform Level Interrupt Controller Configuration */
|
|
||||||
#define MIV_PLIC_BASE_ADDR 0x40000000
|
|
||||||
#define MIV_PLIC_PRIO_BASE_ADDR MIV_PLIC_BASE_ADDR
|
|
||||||
#define MIV_PLIC_IRQ_EN_BASE_ADDR (MIV_PLIC_BASE_ADDR + 0x2000)
|
|
||||||
#define MIV_PLIC_REG_BASE_ADDR (MIV_PLIC_BASE_ADDR + 0x200000)
|
|
||||||
|
|
||||||
#define MIV_PLIC_MAX_PRIORITY 7
|
|
||||||
|
|
||||||
/* Clock controller. */
|
/* Clock controller. */
|
||||||
#define PRCI_BASE_ADDR 0x44000000
|
#define PRCI_BASE_ADDR 0x44000000
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue