From: George Hilliard <thirtythreefo...@gmail.com>

suniv needs slightly different register settings to enable the SPI
peripheral.  The magic numbers are already provided by the architecture
support; we just have to check for them here.

Signed-off-by: George Hilliard <thirtythreefo...@gmail.com>
Signed-off-by: Yifan Gu <m...@yifangu.com>
---
 drivers/spi/spi-sunxi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c
index aa392502b7..320bd61d13 100644
--- a/drivers/spi/spi-sunxi.c
+++ b/drivers/spi/spi-sunxi.c
@@ -255,6 +255,8 @@ static int sun4i_spi_parse_pins(struct udevice *dev)
 
                        if (IS_ENABLED(CONFIG_MACH_SUN50I))
                                sunxi_gpio_set_cfgpin(pin, SUN50I_GPC_SPI0);
+                       else if (IS_ENABLED(CONFIG_MACH_SUNIV))
+                               sunxi_gpio_set_cfgpin(pin, SUNIV_GPC_SPI0);
                        else
                                sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SPI0);
                        sunxi_gpio_set_drv(pin, drive);
-- 
2.25.1

Reply via email to