From: Michal Simek Date: Sat, 30 Jun 2018 02:45:17 +0000 (+0530) Subject: spi: xilinx: Read reg base address from DTS file X-Git-Tag: v2018.09-rc1~143^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4e7c1a26518fc4332f23c3ee001e10a31555b2b1;p=platform%2Fkernel%2Fu-boot.git spi: xilinx: Read reg base address from DTS file This patch added support to read register base address from DTS file. Signed-off-by: Michal Simek Signed-off-by: Vipul Kumar Reviewed-by: Jagan Teki --- diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index 8f0f32f..cc5ac51 100644 --- a/drivers/spi/xilinx_spi.c +++ b/drivers/spi/xilinx_spi.c @@ -77,10 +77,6 @@ #define CONFIG_XILINX_SPI_IDLE_VAL GENMASK(7, 0) #endif -#ifndef CONFIG_SYS_XILINX_SPI_LIST -#define CONFIG_SYS_XILINX_SPI_LIST { CONFIG_SYS_SPI_BASE } -#endif - /* xilinx spi register set */ struct xilinx_spi_regs { u32 __space0__[7]; @@ -107,13 +103,12 @@ struct xilinx_spi_priv { unsigned int mode; }; -static unsigned long xilinx_spi_base_list[] = CONFIG_SYS_XILINX_SPI_LIST; static int xilinx_spi_probe(struct udevice *bus) { struct xilinx_spi_priv *priv = dev_get_priv(bus); struct xilinx_spi_regs *regs = priv->regs; - priv->regs = (struct xilinx_spi_regs *)xilinx_spi_base_list[bus->seq]; + priv->regs = (struct xilinx_spi_regs *)devfdt_get_addr(bus); writel(SPISSR_RESET_VALUE, ®s->srr);