Merge tag 'u-boot-amlogic-20181207' of git://git.denx.de/u-boot-amlogic
[platform/kernel/u-boot.git] / include / common.h
index 940161f..657cc40 100644 (file)
@@ -14,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 <config.h>
 #include <errno.h>
 #include <time.h>
@@ -37,9 +34,6 @@ typedef volatile unsigned char        vu_char;
 #include <flash.h>
 #include <image.h>
 
-/* Bring in printf format macros if inttypes.h is included */
-#define __STDC_FORMAT_MACROS
-
 #ifdef __LP64__
 #define CONFIG_SYS_SUPPORT_64BIT_DATA
 #endif
@@ -112,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
@@ -282,13 +287,6 @@ int  eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned c
 # define CONFIG_SYS_DEF_EEPROM_ADDR CONFIG_SYS_I2C_EEPROM_ADDR
 #endif
 
-#if defined(CONFIG_MPC8XX_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);
 int board_fix_fdt (void *rw_fdt_blob); /* manipulate the U-Boot fdt before its relocation */
@@ -352,6 +350,8 @@ void smp_set_core_boot_addr(unsigned long addr, int corenr);
 void smp_kick_all_cpus(void);
 
 /* $(CPU)/serial.c */
+struct serial_device_info;
+
 int    serial_init   (void);
 void   serial_setbrg (void);
 void   serial_putc   (const char);
@@ -359,6 +359,9 @@ void        serial_putc_raw(const char);
 void   serial_puts   (const char *);
 int    serial_getc   (void);
 int    serial_tstc   (void);
+int    serial_getconfig(uint *config);
+int    serial_setconfig(uint config);
+int    serial_getinfo(struct serial_device_info *info);
 
 /* $(CPU)/speed.c */
 int    get_clocks (void);
@@ -387,7 +390,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)/.../<eth> */
 void mii_init (void);
@@ -544,16 +546,10 @@ int cpu_release(u32 nr, int argc, char * const argv[]);
 
 #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
@@ -561,11 +557,6 @@ int cpu_release(u32 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))
 
 /*