]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/common.h
ARM: mx6: Enable Thumb build for SPL
[karo-tx-uboot.git] / include / common.h
index 15f5834474203b61142b8805a51975b790bb14b2..1d6cb48ff0787f1260366530f989d6d656b95be4 100644 (file)
@@ -28,10 +28,8 @@ typedef volatile unsigned char       vu_char;
 #endif
 #if defined(CONFIG_8xx)
 #include <asm/8xx_immap.h>
-#if defined(CONFIG_MPC852)     || defined(CONFIG_MPC852T)      || \
-    defined(CONFIG_MPC859)     || defined(CONFIG_MPC859T)      || \
-    defined(CONFIG_MPC859DSL)  || \
-    defined(CONFIG_MPC866)     || defined(CONFIG_MPC866T)      || \
+#if defined(CONFIG_MPC859)     || defined(CONFIG_MPC859T)      || \
+    defined(CONFIG_MPC866)     || \
     defined(CONFIG_MPC866P)
 # define CONFIG_MPC866_FAMILY 1
 #elif defined(CONFIG_MPC870) \
@@ -52,16 +50,11 @@ typedef volatile unsigned char      vu_char;
 #include <mpc5xxx.h>
 #elif defined(CONFIG_MPC512X)
 #include <asm/immap_512x.h>
-#elif defined(CONFIG_8260)
+#elif defined(CONFIG_MPC8260)
 #if   defined(CONFIG_MPC8247) \
-   || defined(CONFIG_MPC8248) \
-   || defined(CONFIG_MPC8271) \
    || defined(CONFIG_MPC8272)
 #define CONFIG_MPC8272_FAMILY  1
 #endif
-#if defined(CONFIG_MPC8272_FAMILY)
-#define CONFIG_MPC8260 1
-#endif
 #include <asm/immap_8260.h>
 #endif
 #ifdef CONFIG_MPC86xx
@@ -276,6 +269,7 @@ int print_buffer(ulong addr, const void *data, uint width, uint count,
 /* common/main.c */
 void   main_loop       (void);
 int run_command(const char *cmd, int flag);
+int run_command_repeatable(const char *cmd, int flag);
 
 /**
  * Run a list of commands separated by ; or even \0
@@ -289,12 +283,6 @@ int run_command(const char *cmd, int flag);
  * @return 0 on success, or != 0 on error.
  */
 int run_command_list(const char *cmd, int len, int flag);
-int    readline        (const char *const prompt);
-int    readline_into_buffer(const char *const prompt, char *buffer,
-                       int timeout);
-int    parse_line (char *, char *[]);
-void   init_cmd_timeout(void);
-void   reset_cmd_timeout(void);
 extern char console_buffer[];
 
 /* arch/$(ARCH)/lib/board.c */
@@ -308,6 +296,7 @@ extern ulong monitor_flash_len;
 int mac_read_from_eeprom(void);
 extern u8 __dtb_dt_begin[];    /* embedded device tree blob */
 int set_cpu_clk_info(void);
+int mdm_init(void);
 #if defined(CONFIG_DISPLAY_CPUINFO)
 int print_cpuinfo(void);
 #else
@@ -317,6 +306,7 @@ static inline int print_cpuinfo(void)
 }
 #endif
 int update_flash_size(int flash_size);
+int arch_early_init_r(void);
 
 /**
  * Show the DRAM size in a board-specific way
@@ -328,14 +318,14 @@ int update_flash_size(int flash_size);
 void board_show_dram(ulong size);
 
 /**
- * arch_fixup_memory_node() - Write arch-specific memory information to fdt
+ * arch_fixup_fdt() - Write arch-specific information to fdt
  *
- * Defined in arch/$(ARCH)/lib/bootm.c
+ * 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_memory_node(void *blob);
+int arch_fixup_fdt(void *blob);
 
 /* common/flash.c */
 void flash_perror (int);
@@ -363,6 +353,11 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []);
 int    env_init     (void);
 void   env_relocate (void);
 int    envmatch     (uchar *, int);
+
+/* Avoid unfortunate conflict with libc's getenv() */
+#ifdef CONFIG_SANDBOX
+#define getenv uboot_getenv
+#endif
 char   *getenv      (const char *);
 int    getenv_f     (const char *name, char *buf, unsigned len);
 ulong getenv_ulong(const char *name, int base, ulong default_val);
@@ -502,19 +497,6 @@ extern ssize_t spi_read     (uchar *, int, uchar *, int);
 extern ssize_t spi_write (uchar *, int, uchar *, int);
 #endif
 
-#ifdef CONFIG_RPXCLASSIC
-void rpxclassic_init (void);
-#endif
-
-void rpxlite_init (void);
-
-#ifdef CONFIG_MBX
-/* $(BOARD)/mbx8xx.c */
-void   mbx_init (void);
-void   board_serial_init (void);
-void   board_ether_init (void);
-#endif
-
 #ifdef CONFIG_HERMES
 /* $(BOARD)/hermes.c */
 void hermes_start_lxt980 (int speed);
@@ -657,6 +639,11 @@ void       serial_puts   (const char *);
 int    serial_getc   (void);
 int    serial_tstc   (void);
 
+/* These versions take a stdio_dev pointer */
+struct stdio_dev;
+int serial_stub_getc(struct stdio_dev *sdev);
+int serial_stub_tstc(struct stdio_dev *sdev);
+
 void   _serial_setbrg (const int);
 void   _serial_putc   (const char, const int);
 void   _serial_putc_raw(const char, const int);
@@ -669,7 +656,7 @@ int get_clocks (void);
 int    get_clocks_866 (void);
 int    sdram_adjust_866 (void);
 int    adjust_sdram_tbs_8xx (void);
-#if defined(CONFIG_8260)
+#if defined(CONFIG_MPC8260)
 int    prt_8260_clks (void);
 #elif defined(CONFIG_MPC5xxx)
 int    prt_mpc5xxx_clks (void);
@@ -689,9 +676,6 @@ ulong       get_UCLK (void);
 #if defined(CONFIG_LH7A40X)
 ulong  get_PLLCLK (void);
 #endif
-#if defined CONFIG_INCA_IP
-uint   incaip_get_cpuclk (void);
-#endif
 #if defined(CONFIG_IMX)
 ulong get_systemPLLCLK(void);
 ulong get_FCLK(void);
@@ -704,9 +688,6 @@ ulong get_PERCLK3(void);
 ulong  get_bus_freq  (ulong);
 int get_serial_clock(void);
 
-#if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx)
-ulong get_ddr_freq(ulong);
-#endif
 #if defined(CONFIG_MPC85xx)
 typedef MPC85xx_SYS_INFO sys_info_t;
 void   get_sys_info  ( sys_info_t * );
@@ -722,6 +703,8 @@ static inline ulong get_ddr_freq(ulong dummy)
 {
        return get_bus_freq(dummy);
 }
+#else
+ulong get_ddr_freq(ulong);
 #endif
 
 #if defined(CONFIG_4xx)
@@ -737,15 +720,18 @@ void      get_sys_info  ( sys_info_t * );
 #endif
 
 /* $(CPU)/cpu_init.c */
-#if defined(CONFIG_8xx) || defined(CONFIG_8260)
+#if defined(CONFIG_8xx) || defined(CONFIG_MPC8260)
 void   cpu_init_f    (volatile immap_t *immr);
 #endif
-#if defined(CONFIG_4xx) || defined(CONFIG_MPC85xx) || defined(CONFIG_MCF52x2) ||defined(CONFIG_MPC86xx)
+#if defined(CONFIG_4xx) || defined(CONFIG_MCF52x2) || defined(CONFIG_MPC86xx)
 void   cpu_init_f    (void);
 #endif
+#ifdef CONFIG_MPC85xx
+ulong cpu_init_f(void);
+#endif
 
 int    cpu_init_r    (void);
-#if defined(CONFIG_8260)
+#if defined(CONFIG_MPC8260)
 int    prt_8260_rsr  (void);
 #elif defined(CONFIG_MPC83xx)
 int    prt_83xx_rsr  (void);
@@ -819,8 +805,7 @@ void        udelay        (unsigned long);
 void mdelay(unsigned long);
 
 /* lib/uuid.c */
-void uuid_str_to_bin(const char *uuid, unsigned char *out);
-int uuid_str_valid(const char *uuid);
+#include <uuid.h>
 
 /* lib/vsprintf.c */
 #include <vsprintf.h>
@@ -832,14 +817,10 @@ char *    strmhz(char *buf, unsigned long hz);
 #include <u-boot/crc.h>
 
 /* lib/rand.c */
-#if defined(CONFIG_RANDOM_MACADDR) || \
-       defined(CONFIG_BOOTP_RANDOM_DELAY) || \
-       defined(CONFIG_CMD_LINK_LOCAL)
 #define RAND_MAX -1U
 void srand(unsigned int seed);
 unsigned int rand(void);
 unsigned int rand_r(unsigned int *seedp);
-#endif
 
 /* common/console.c */
 int    console_init_f(void);   /* Before relocation; uses the serial  stuff    */
@@ -849,7 +830,7 @@ int ctrlc (void);
 int    had_ctrlc (void);       /* have we had a Control-C since last clear? */
 void   clear_ctrlc (void);     /* clear the Control-C condition */
 int    disable_ctrlc (int);    /* 1 to disable, 0 to enable Control-C detect */
-
+int confirm_yesno(void);        /*  1 if input is "y", "Y", "yes" or "YES" */
 /*
  * STDIO based functions (can always be used)
  */