Convert driver to use DT_INST_ defines. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
70 lines
3 KiB
C
70 lines
3 KiB
C
/*
|
|
* Copyright (c) 2018-2019 Intel Corporation Inc.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/* SoC level DTS fixup file */
|
|
|
|
#define DT_PHYS_RAM_ADDR CONFIG_SRAM_BASE_ADDRESS
|
|
#define DT_PHYS_LOAD_ADDR CONFIG_FLASH_BASE_ADDRESS
|
|
#define DT_RAM_SIZE CONFIG_SRAM_SIZE
|
|
#define DT_ROM_SIZE CONFIG_FLASH_SIZE
|
|
|
|
#define DT_UART_NS16550_PORT_0_BASE_ADDR DT_INST_0_NS16550_BASE_ADDRESS
|
|
#define DT_UART_NS16550_PORT_0_SIZE DT_INST_0_NS16550_SIZE
|
|
#define DT_UART_NS16550_PORT_0_BAUD_RATE DT_INST_0_NS16550_CURRENT_SPEED
|
|
#define DT_UART_NS16550_PORT_0_NAME DT_INST_0_NS16550_LABEL
|
|
#define DT_UART_NS16550_PORT_0_IRQ DT_INST_0_NS16550_IRQ_0
|
|
#define DT_UART_NS16550_PORT_0_IRQ_PRI DT_INST_0_NS16550_IRQ_0_PRIORITY
|
|
#define DT_UART_NS16550_PORT_0_IRQ_FLAGS DT_INST_0_NS16550_IRQ_0_SENSE
|
|
#define DT_UART_NS16550_PORT_0_CLK_FREQ DT_INST_0_NS16550_CLOCK_FREQUENCY
|
|
#define DT_UART_NS16550_PORT_0_PCIE DT_INST_0_NS16550_PCIE
|
|
|
|
#ifdef DT_NS16550_0_PCP
|
|
#define DT_UART_NS16550_PORT_0_PCP DT_NS16550_0_PCP
|
|
#endif
|
|
|
|
#define DT_UART_NS16550_PORT_1_BASE_ADDR DT_INST_1_NS16550_BASE_ADDRESS
|
|
#define DT_UART_NS16550_PORT_1_SIZE DT_INST_1_NS16550_SIZE
|
|
#define DT_UART_NS16550_PORT_1_BAUD_RATE DT_INST_1_NS16550_CURRENT_SPEED
|
|
#define DT_UART_NS16550_PORT_1_NAME DT_INST_1_NS16550_LABEL
|
|
#define DT_UART_NS16550_PORT_1_IRQ DT_INST_1_NS16550_IRQ_0
|
|
#define DT_UART_NS16550_PORT_1_IRQ_PRI DT_INST_1_NS16550_IRQ_0_PRIORITY
|
|
#define DT_UART_NS16550_PORT_1_IRQ_FLAGS DT_INST_1_NS16550_IRQ_0_SENSE
|
|
#define DT_UART_NS16550_PORT_1_CLK_FREQ DT_INST_1_NS16550_CLOCK_FREQUENCY
|
|
#define DT_UART_NS16550_PORT_1_PCIE DT_INST_1_NS16550_PCIE
|
|
|
|
#ifdef DT_NS16550_1_PCP
|
|
#define DT_UART_NS16550_PORT_1_PCP DT_NS16550_1_PCP
|
|
#endif
|
|
|
|
#define DT_UART_NS16550_PORT_2_BASE_ADDR DT_INST_2_NS16550_BASE_ADDRESS
|
|
#define DT_UART_NS16550_PORT_2_SIZE DT_INST_2_NS16550_SIZE
|
|
#define DT_UART_NS16550_PORT_2_BAUD_RATE DT_INST_2_NS16550_CURRENT_SPEED
|
|
#define DT_UART_NS16550_PORT_2_NAME DT_INST_2_NS16550_LABEL
|
|
#define DT_UART_NS16550_PORT_2_IRQ DT_INST_2_NS16550_IRQ_0
|
|
#define DT_UART_NS16550_PORT_2_IRQ_PRI DT_INST_2_NS16550_IRQ_0_PRIORITY
|
|
#define DT_UART_NS16550_PORT_2_IRQ_FLAGS DT_INST_2_NS16550_IRQ_0_SENSE
|
|
#define DT_UART_NS16550_PORT_2_CLK_FREQ DT_INST_2_NS16550_CLOCK_FREQUENCY
|
|
#define DT_UART_NS16550_PORT_2_PCIE DT_INST_2_NS16550_PCIE
|
|
|
|
#ifdef DT_NS16550_2_PCP
|
|
#define DT_UART_NS16550_PORT_2_PCP DT_NS16550_2_PCP
|
|
#endif
|
|
|
|
#define DT_UART_NS16550_PORT_3_BASE_ADDR DT_INST_3_NS16550_BASE_ADDRESS
|
|
#define DT_UART_NS16550_PORT_3_SIZE DT_INST_3_NS16550_SIZE
|
|
#define DT_UART_NS16550_PORT_3_BAUD_RATE DT_INST_3_NS16550_CURRENT_SPEED
|
|
#define DT_UART_NS16550_PORT_3_NAME DT_INST_3_NS16550_LABEL
|
|
#define DT_UART_NS16550_PORT_3_IRQ DT_INST_3_NS16550_IRQ_0
|
|
#define DT_UART_NS16550_PORT_3_IRQ_PRI DT_INST_3_NS16550_IRQ_0_PRIORITY
|
|
#define DT_UART_NS16550_PORT_3_IRQ_FLAGS DT_INST_3_NS16550_IRQ_0_SENSE
|
|
#define DT_UART_NS16550_PORT_3_CLK_FREQ DT_INST_3_NS16550_CLOCK_FREQUENCY
|
|
#define DT_UART_NS16550_PORT_3_PCIE DT_INST_3_NS16550_PCIE
|
|
|
|
#ifdef DT_NS16550_3_PCP
|
|
#define DT_UART_NS16550_PORT_3_PCP DT_NS16550_3_PCP
|
|
#endif
|
|
|
|
/* End of SoC Level DTS fixup file */
|