X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fcommon.h;h=f0679ac70544fdf2f89812b8f2c9ff4d8334cf39;hb=915f15ac5746739da0aa2ee2840c2d00dc65aaaa;hp=4ee14f78d0ab5a3dc4aaf59411ee3432301f8aff;hpb=1318a0efade80d853e27280adcaf4812d16c742f;p=oweals%2Fu-boot.git diff --git a/include/common.h b/include/common.h index 4ee14f78d0..f0679ac705 100644 --- a/include/common.h +++ b/include/common.h @@ -2,9 +2,8 @@ /* * Common header file for U-Boot * - * This file still includes quite a bit of stuff that should be in separate - * headers. Please think before adding more things. - * Patches to remove things are welcome. + * This file still includes quite a few headers that should be included + * individually as needed. Patches to remove things are welcome. * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -14,127 +13,21 @@ #define __COMMON_H_ 1 #ifndef __ASSEMBLY__ /* put C only stuff in this section */ - #include #include #include -#include -#include -#include -#include #include #include #include -#include -#include #include #include #include - -#include -#include -#include - -#ifdef __LP64__ -#define CONFIG_SYS_SUPPORT_64BIT_DATA -#endif - -#include - #include /* boot information for Linux kernel */ #include /* global data used for startup functions */ - -/* startup functions, used in: - * common/board_f.c - * common/init/board_init.c - * common/board_r.c - * common/board_info.c - */ -#include - -/* - * Function Prototypes - */ -void hang (void) __attribute__ ((noreturn)); - #include - -/** - * arch_fixup_fdt() - Write arch-specific information to fdt - * - * Defined in arch/$(ARCH)/lib/bootm-fdt.c - * - * @blob: FDT blob to write to - * @return 0 if ok, or -ve FDT_ERR_... on failure - */ -int arch_fixup_fdt(void *blob); - -/* common/cmd_source.c */ -int source (ulong addr, const char *fit_uname); - -extern ulong load_addr; /* Default Load Address */ -extern ulong save_addr; /* Default Save Address */ -extern ulong save_size; /* Default Save Size */ - -/* common/memsize.c */ -long get_ram_size (long *, long); -phys_size_t get_effective_memsize(void); - -#if defined(CONFIG_SYS_DRAM_TEST) -int testdram(void); -#endif /* CONFIG_SYS_DRAM_TEST */ - -void s_init(void); - -void upmconfig (unsigned int, unsigned int *, unsigned int); -ulong get_tbclk (void); -void reset_misc (void); -void reset_cpu (ulong addr); -void ft_cpu_setup(void *blob, bd_t *bd); -void ft_pci_setup(void *blob, bd_t *bd); - -/* $(CPU)/speed.c */ -int get_clocks (void); -ulong get_bus_freq (ulong); -int get_serial_clock(void); - -/* lib/uuid.c */ -#include - -/* lib/vsprintf.c */ #include - -/* lib/net_utils.c */ -#include - -#include - -#else /* __ASSEMBLY__ */ - #endif /* __ASSEMBLY__ */ -/* Put only stuff here that the assembler can digest */ - -#define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) - -/* - * check_member() - Check the offset of a structure member - * - * @structure: Name of structure (e.g. global_data) - * @member: Name of member (e.g. baudrate) - * @offset: Expected offset in bytes - */ -#define check_member(structure, member, offset) _Static_assert( \ - offsetof(struct structure, member) == offset, \ - "`struct " #structure "` offset for `" #member "` is not " #offset) - -/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */ -#ifdef CONFIG_EFI_STUB -#define ll_boot_init() false -#else -#define ll_boot_init() true -#endif - /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY # include