drivers: espi: mchp_xec: convert to DT_INST defines

Convert driver to use DT_INST_ defines.  The preferred defines for
drivers are DT_INST_.  The driver mostly used DT_INST_ defines but
a few IRQ priority defines needed conversion.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2020-02-14 09:15:27 -06:00 committed by Kumar Gala
parent 9a8831b781
commit c68a1d427d
2 changed files with 6 additions and 10 deletions

View file

@ -1100,21 +1100,24 @@ static int espi_xec_init(struct device *dev)
/* Enable aggregated interrupt block for eSPI bus events */
MCHP_GIRQ_BLK_SETEN(config->bus_girq_id);
IRQ_CONNECT(DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_0,
DT_ESPI_MCHP_XEC_0_IRQ_PRIORITY, espi_xec_bus_isr,
DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_0_PRIORITY,
espi_xec_bus_isr,
DEVICE_GET(espi_xec_0), 0);
irq_enable(DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_0);
/* Enable aggregated interrupt block for eSPI VWire events */
MCHP_GIRQ_BLK_SETEN(config->vw_girq_id);
IRQ_CONNECT(DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_1,
DT_ESPI_MCHP_XEC_1_IRQ_PRIORITY, espi_xec_vw_isr,
DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_1_PRIORITY,
espi_xec_vw_isr,
DEVICE_GET(espi_xec_0), 0);
irq_enable(DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_1);
/* Enable aggregated interrupt block for eSPI peripheral channel */
MCHP_GIRQ_BLK_SETEN(config->pc_girq_id);
IRQ_CONNECT(DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_2,
DT_ESPI_MCHP_XEC_2_IRQ_PRIORITY, espi_xec_periph_isr,
DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_2_PRIORITY,
espi_xec_periph_isr,
DEVICE_GET(espi_xec_0), 0);
irq_enable(DT_INST_0_MICROCHIP_XEC_ESPI_IRQ_2);

View file

@ -147,10 +147,3 @@
DT_MICROCHIP_XEC_QMSPI_40070000_DLDH
#define DT_SPI_XEC_QMSPI_0_DCSDA \
DT_MICROCHIP_XEC_QMSPI_40070000_DCSDA
#define DT_ESPI_MCHP_XEC_0_IRQ_PRIORITY \
DT_MICROCHIP_XEC_ESPI_400F3400_IRQ_0_PRIORITY
#define DT_ESPI_MCHP_XEC_1_IRQ_PRIORITY \
DT_MICROCHIP_XEC_ESPI_400F3400_IRQ_1_PRIORITY
#define DT_ESPI_MCHP_XEC_2_IRQ_PRIORITY \
DT_MICROCHIP_XEC_ESPI_400F3400_IRQ_2_PRIORITY