soc: arc: Convert to new DT_INST macros

Convert older DT_INST_ macro use the new include/devicetree.h
DT_INST macro APIs.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-03-30 11:06:22 -05:00 committed by Kumar Gala
commit 99b7f1772d
3 changed files with 16 additions and 16 deletions

View file

@ -3,11 +3,11 @@
/* SoC level DTS fixup file */
/* CCM configuration */
#define DT_DCCM_BASE_ADDRESS DT_INST_0_ARC_DCCM_BASE_ADDRESS
#define DT_DCCM_SIZE (DT_INST_0_ARC_DCCM_SIZE >> 10)
#define DT_DCCM_BASE_ADDRESS DT_REG_ADDR(DT_INST(0, arc_dccm))
#define DT_DCCM_SIZE (DT_REG_SIZE(DT_INST(0, arc_dccm)) >> 10)
#define DT_ICCM_BASE_ADDRESS DT_INST_0_ARC_ICCM_BASE_ADDRESS
#define DT_ICCM_SIZE (DT_INST_0_ARC_ICCM_SIZE >> 10)
#define DT_ICCM_BASE_ADDRESS DT_REG_ADDR(DT_INST(0, arc_iccm))
#define DT_ICCM_SIZE (DT_REG_SIZE(DT_INST(0, arc_iccm)) >> 10)
#define DT_DDR_BASE_ADDRESS DT_MMIO_SRAM_10000000_BASE_ADDRESS
#define DT_DDR_SIZE (DT_MMIO_SRAM_10000000_SIZE >> 10)

View file

@ -18,14 +18,14 @@ static int uart_ns16550_init(struct device *dev)
/* On ARC EM Starter kit board,
* send the UART the command to clear the interrupt
*/
#ifdef DT_INST_0_NS16550
sys_write32(0, DT_INST_0_NS16550_BASE_ADDRESS+0x4);
sys_write32(0, DT_INST_0_NS16550_BASE_ADDRESS+0x10);
#endif /* DT_INST_0_NS16550 */
#ifdef DT_INST_1_NS16550
sys_write32(0, DT_INST_1_NS16550_BASE_ADDRESS+0x4);
sys_write32(0, DT_INST_1_NS16550_BASE_ADDRESS+0x10);
#endif /* DT_INST_1_NS16550 */
#if DT_HAS_NODE(DT_INST(0, ns16550))
sys_write32(0, DT_REG_ADDR(DT_INST(0, ns16550))+0x4);
sys_write32(0, DT_REG_ADDR(DT_INST(0, ns16550))+0x10);
#endif /* DT_HAS_NODE(DT_INST(0, ns16550)) */
#if DT_HAS_NODE(DT_INST(1, ns16550))
sys_write32(0, DT_REG_ADDR(DT_INST(1, ns16550))+0x4);
sys_write32(0, DT_REG_ADDR(DT_INST(1, ns16550))+0x10);
#endif /* DT_HAS_NODE(DT_INST(1, ns16550)) */
return 0;
}

View file

@ -3,10 +3,10 @@
/* SoC level DTS fixup file */
/* CCM configuration */
#define DT_DCCM_BASE_ADDRESS DT_INST_0_ARC_DCCM_BASE_ADDRESS
#define DT_DCCM_SIZE (DT_INST_0_ARC_DCCM_SIZE >> 10)
#define DT_DCCM_BASE_ADDRESS DT_REG_ADDR(DT_INST(0, arc_dccm))
#define DT_DCCM_SIZE (DT_REG_SIZE(DT_INST(0, arc_dccm)) >> 10)
#define DT_ICCM_BASE_ADDRESS DT_INST_0_ARC_ICCM_BASE_ADDRESS
#define DT_ICCM_SIZE (DT_INST_0_ARC_ICCM_SIZE >> 10)
#define DT_ICCM_BASE_ADDRESS DT_REG_ADDR(DT_INST(0, arc_iccm))
#define DT_ICCM_SIZE (DT_REG_SIZE(DT_INST(0, arc_iccm)) >> 10)
/* End of SoC Level DTS fixup file */