From: Arjan van Vught Date: Thu, 18 Oct 2018 19:22:39 +0200 Subject: [U-Boot] =?utf-8?q?=5BBUG=5D_H2+/H3_=3A_SPI_driver_=3A_error=3A_?= =?utf-8?b?4oCYQUhCX0dBVEVfT0ZGU0VUX1NQSTDigJkgdW5kZWNsYXJlZCAoZmlyc3Qg?= =?utf-8?q?use_in_this_function=29?= Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: u-boot@lists.denx.de Version: u-boot-2018.09 Configuration : orangepi_zero_defconfig In file included from include/wait_bit.h:15:0,                  from drivers/spi/sun4i_spi.c:26: drivers/spi/sun4i_spi.c: In function 'sun4i_spi_enable_clock':   LD      drivers/usb/musb-new/built-in.o drivers/spi/sun4i_spi.c:246:38: error: 'AHB_GATE_OFFSET_SPI0' undeclared (first use in this function); did you mean 'AHB_GATE_OFFSET_MMC0'?   setbits_le32(&ccm->ahb_gate0, (1 << AHB_GATE_OFFSET_SPI0)); AHB_GATE_OFFSET_SPI0 can be found in: ./arch/arm/include/asm/arch-sunxi/clock_sun4i.h:#define AHB_GATE_OFFSET_SPI0            20 ./arch/arm/include/asm/arch-sunxi/clock_sun8i_a83t.h:#define AHB_GATE_OFFSET_SPI0               20 ~/uboot/u-boot-2018.09$ grep -a CONFIG_MACH_SUN8I .config # CONFIG_MACH_SUN8I_A23 is not set # CONFIG_MACH_SUN8I_A33 is not set # CONFIG_MACH_SUN8I_A83T is not set CONFIG_MACH_SUN8I_H3=y # CONFIG_MACH_SUN8I_R40 is not set # CONFIG_MACH_SUN8I_V3S is not set CONFIG_MACH_SUN8I=y With  arch/arm/include/asm/arch/clock.h #if defined(CONFIG_MACH_SUN8I_A83T) #include #elif defined(CONFIG_MACH_SUN50I_H6) #include #elif defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I) || \       defined(CONFIG_MACH_SUN50I) #include #elif defined(CONFIG_MACH_SUN9I) #include #else #include #endif The AHB_GATE_OFFSET_SPI0 should be defined in asm/arch/clock_sun6i.h - Arjan