X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fcommon.h;h=2c21dee8505cf6ba0d2c3815fe1ef2362e9e60f0;hb=696f02d99b41190786b17ad28316a0cd45792c2c;hp=6e7110c3f8d689add07fe1a7a364f7b0be458660;hpb=e2c219cd7103761826f4ca99c905f547ade34c97;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/common.h b/include/common.h index 6e7110c..2c21dee 100644 --- a/include/common.h +++ b/include/common.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __COMMON_H_ @@ -15,9 +14,6 @@ typedef volatile unsigned long vu_long; typedef volatile unsigned short vu_short; typedef volatile unsigned char vu_char; -/* Allow sharing constants with type modifiers between C and assembly. */ -#define _AC(X, Y) (X##Y) - #include #include #include @@ -38,9 +34,6 @@ typedef volatile unsigned char vu_char; #include #include -/* Bring in printf format macros if inttypes.h is included */ -#define __STDC_FORMAT_MACROS - #ifdef __LP64__ #define CONFIG_SYS_SUPPORT_64BIT_DATA #endif @@ -66,6 +59,7 @@ typedef void (interrupt_handler_t)(void *); * common/board_f.c * common/init/board_init.c * common/board_r.c + * common/board_info.c */ #include @@ -96,8 +90,6 @@ int run_command_repeatable(const char *cmd, int flag); */ int run_command_list(const char *cmd, int len, int flag); -int checkboard(void); -int show_board_info(void); int checkflash(void); int checkdram(void); extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ @@ -114,6 +106,17 @@ int mdm_init(void); void board_show_dram(phys_size_t size); /** + * Get the uppermost pointer that is valid to access + * + * Some systems may not map all of their address space. This function allows + * boards to indicate what their highest support pointer value is for DRAM + * access. + * + * @param total_size Size of U-Boot (unused?) + */ +ulong board_get_usable_ram_top(ulong total_size); + +/** * arch_fixup_fdt() - Write arch-specific information to fdt * * Defined in arch/$(ARCH)/lib/bootm-fdt.c @@ -245,7 +248,8 @@ static inline int env_set_addr(const char *varname, const void *addr) } #ifdef CONFIG_AUTO_COMPLETE -int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf); +int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf, + bool dollar_comp); #endif int get_env_id (void); @@ -280,24 +284,9 @@ int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned c #define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) #endif -/* - * Set this up regardless of board - * type, to prevent errors. - */ -#if defined(CONFIG_SPI) || !defined(CONFIG_SYS_I2C_EEPROM_ADDR) -# define CONFIG_SYS_DEF_EEPROM_ADDR 0 -#else -#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) +#if !defined(CONFIG_ENV_EEPROM_IS_ON_I2C) && defined(CONFIG_SYS_I2C_EEPROM_ADDR) # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR #endif -#endif /* CONFIG_SPI || !defined(CONFIG_SYS_I2C_EEPROM_ADDR) */ - -#if defined(CONFIG_SPI) -extern void spi_init_f (void); -extern void spi_init_r (void); -extern ssize_t spi_read (uchar *, int, uchar *, int); -extern ssize_t spi_write (uchar *, int, uchar *, int); -#endif /* $(BOARD)/$(BOARD).c */ int board_early_init_f (void); @@ -397,7 +386,6 @@ uint dpram_alloc(uint size); uint dpram_alloc_align(uint size,uint align); void bootcount_store (ulong); ulong bootcount_load (void); -#define BOOTCOUNT_MAGIC 0xB001C041 /* $(CPU)/.../ */ void mii_init (void); @@ -546,24 +534,18 @@ void show_activity(int arg); /* Multicore arch functions */ #ifdef CONFIG_MP -int cpu_status(int nr); -int cpu_reset(int nr); -int cpu_disable(int nr); -int cpu_release(int nr, int argc, char * const argv[]); +int cpu_status(u32 nr); +int cpu_reset(u32 nr); +int cpu_disable(u32 nr); +int cpu_release(u32 nr, int argc, char * const argv[]); #endif #else /* __ASSEMBLY__ */ -/* Drop a C type modifier (like in 3UL) for constants used in assembly. */ -#define _AC(X, Y) X - #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ -/* Declare an unsigned long constant digestable both by C and an assembler. */ -#define UL(x) _AC(x, UL) - #ifdef CONFIG_POST #define CONFIG_HAS_POST #ifndef CONFIG_POST_ALT_LIST @@ -571,11 +553,6 @@ int cpu_release(int nr, int argc, char * const argv[]); #endif #endif -#ifdef CONFIG_INIT_CRITICAL -#error CONFIG_INIT_CRITICAL is deprecated! -#error Read section CONFIG_SKIP_LOWLEVEL_INIT in README. -#endif - #define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) /*