sunxi: board: annotate #endif lines
The legacy Allwinner code is cluttered with #ifdef's, some of them even nested, which makes the code hard to read and error prone. Eventually we will get rid of most of them, but for now let's at least annotate the #endif lines with the corresponding symbol the bracket started with. Reviewed-by: Samuel Holland <samuel@sholland.org> Tested-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
parent
eeaca6ac27
commit
64531496f9
@ -73,7 +73,7 @@ phys_size_t board_get_usable_ram_top(phys_size_t total_size)
|
|||||||
|
|
||||||
return gd->ram_top;
|
return gd->ram_top;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_ARM64 */
|
||||||
|
|
||||||
#ifdef CONFIG_SPL_BUILD
|
#ifdef CONFIG_SPL_BUILD
|
||||||
static int gpio_init(void)
|
static int gpio_init(void)
|
||||||
@ -196,7 +196,7 @@ static int spl_board_load_image(struct spl_image_info *spl_image,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
SPL_LOAD_IMAGE_METHOD("FEL", 0, BOOT_DEVICE_BOARD, spl_board_load_image);
|
SPL_LOAD_IMAGE_METHOD("FEL", 0, BOOT_DEVICE_BOARD, spl_board_load_image);
|
||||||
#endif
|
#endif /* CONFIG_SPL_BUILD */
|
||||||
|
|
||||||
#define SUNXI_INVALID_BOOT_SOURCE -1
|
#define SUNXI_INVALID_BOOT_SOURCE -1
|
||||||
|
|
||||||
@ -457,7 +457,7 @@ void board_init_f(ulong dummy)
|
|||||||
#endif
|
#endif
|
||||||
sunxi_board_init();
|
sunxi_board_init();
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_SPL_BUILD */
|
||||||
|
|
||||||
#if !CONFIG_IS_ENABLED(SYSRESET)
|
#if !CONFIG_IS_ENABLED(SYSRESET)
|
||||||
void reset_cpu(void)
|
void reset_cpu(void)
|
||||||
@ -490,7 +490,7 @@ void reset_cpu(void)
|
|||||||
while (1) { }
|
while (1) { }
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_SYSRESET */
|
||||||
|
|
||||||
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && defined(CONFIG_CPU_V7A)
|
#if !CONFIG_IS_ENABLED(SYS_DCACHE_OFF) && defined(CONFIG_CPU_V7A)
|
||||||
void enable_caches(void)
|
void enable_caches(void)
|
||||||
|
@ -63,7 +63,7 @@ void clock_init_safe(void)
|
|||||||
setbits_le32(&ccm->sata_clk_cfg, CCM_SATA_CTRL_ENABLE);
|
setbits_le32(&ccm->sata_clk_cfg, CCM_SATA_CTRL_ENABLE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_SPL_BUILD */
|
||||||
|
|
||||||
void clock_init_sec(void)
|
void clock_init_sec(void)
|
||||||
{
|
{
|
||||||
@ -172,7 +172,7 @@ void clock_set_pll1(unsigned int clk)
|
|||||||
&ccm->cpu_axi_cfg);
|
&ccm->cpu_axi_cfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_SPL_BUILD */
|
||||||
|
|
||||||
void clock_set_pll3(unsigned int clk)
|
void clock_set_pll3(unsigned int clk)
|
||||||
{
|
{
|
||||||
|
@ -351,7 +351,7 @@ void board_nand_init(void)
|
|||||||
sunxi_nand_init();
|
sunxi_nand_init();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_NAND_SUNXI */
|
||||||
|
|
||||||
#ifdef CONFIG_MMC
|
#ifdef CONFIG_MMC
|
||||||
static void mmc_pinmux_setup(int sdc)
|
static void mmc_pinmux_setup(int sdc)
|
||||||
@ -554,7 +554,7 @@ int mmc_get_env_dev(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif /* CONFIG_MMC */
|
||||||
|
|
||||||
#ifdef CONFIG_SPL_BUILD
|
#ifdef CONFIG_SPL_BUILD
|
||||||
|
|
||||||
@ -670,7 +670,7 @@ void sunxi_board_init(void)
|
|||||||
else
|
else
|
||||||
printf("Failed to set core voltage! Can't set CPU frequency\n");
|
printf("Failed to set core voltage! Can't set CPU frequency\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_SPL_BUILD */
|
||||||
|
|
||||||
#ifdef CONFIG_USB_GADGET
|
#ifdef CONFIG_USB_GADGET
|
||||||
int g_dnl_board_usb_cable_connected(void)
|
int g_dnl_board_usb_cable_connected(void)
|
||||||
@ -699,7 +699,7 @@ int g_dnl_board_usb_cable_connected(void)
|
|||||||
|
|
||||||
return sun4i_usb_phy_vbus_detect(&phy);
|
return sun4i_usb_phy_vbus_detect(&phy);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_USB_GADGET */
|
||||||
|
|
||||||
#ifdef CONFIG_SERIAL_TAG
|
#ifdef CONFIG_SERIAL_TAG
|
||||||
void get_board_serial(struct tag_serialnr *serialnr)
|
void get_board_serial(struct tag_serialnr *serialnr)
|
||||||
@ -928,7 +928,6 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SPL_LOAD_FIT
|
#ifdef CONFIG_SPL_LOAD_FIT
|
||||||
|
|
||||||
static void set_spl_dt_name(const char *name)
|
static void set_spl_dt_name(const char *name)
|
||||||
{
|
{
|
||||||
struct boot_file_head *spl = get_spl_header(SPL_ENV_HEADER_VERSION);
|
struct boot_file_head *spl = get_spl_header(SPL_ENV_HEADER_VERSION);
|
||||||
@ -996,4 +995,4 @@ int board_fit_config_name_match(const char *name)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* CONFIG_SPL_LOAD_FIT */
|
||||||
|
Loading…
Reference in New Issue
Block a user