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 <asm/arch/clock_sun8i_a83t.h>
#elif defined(CONFIG_MACH_SUN50I_H6)
#include <asm/arch/clock_sun50i_h6.h>
#elif defined(CONFIG_MACH_SUN6I) || defined(CONFIG_MACH_SUN8I) || \
      defined(CONFIG_MACH_SUN50I)
#include <asm/arch/clock_sun6i.h>
#elif defined(CONFIG_MACH_SUN9I)
#include <asm/arch/clock_sun9i.h>
#else
#include <asm/arch/clock_sun4i.h>
#endif

The AHB_GATE_OFFSET_SPI0 should be defined in asm/arch/clock_sun6i.h

- Arjan


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to