X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=include%2Fcommon.h;h=d5020c8c45d1afc515e02433ea2513ab6b99d28e;hb=fbb099183e3a53f77a975964cdf2e73d11e565af;hp=baf361b3e556e1c112a04ae2ce3ea92a177b827c;hpb=4fb3925ff8b64422eb904c630e914c29ed824e85;p=karo-tx-uboot.git diff --git a/include/common.h b/include/common.h index baf361b3e5..d5020c8c45 100644 --- a/include/common.h +++ b/include/common.h @@ -28,16 +28,11 @@ typedef volatile unsigned char vu_char; #endif #if defined(CONFIG_8xx) #include -#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) \ - || defined(CONFIG_MPC875) \ - || defined(CONFIG_MPC880) \ - || defined(CONFIG_MPC885) +#elif defined(CONFIG_MPC885) # define CONFIG_MPC885_FAMILY 1 #endif #if defined(CONFIG_MPC860) \ @@ -54,8 +49,6 @@ typedef volatile unsigned char vu_char; #include #elif defined(CONFIG_MPC8260) #if defined(CONFIG_MPC8247) \ - || defined(CONFIG_MPC8248) \ - || defined(CONFIG_MPC8271) \ || defined(CONFIG_MPC8272) #define CONFIG_MPC8272_FAMILY 1 #endif @@ -188,9 +181,6 @@ typedef void (interrupt_handler_t)(void *); typeof(Y) __y = (Y); \ (__x > __y) ? __x : __y; }) -#define MIN(x, y) min(x, y) -#define MAX(x, y) max(x, y) - #define min3(X, Y, Z) \ ({ typeof(X) __x = (X); \ typeof(Y) __y = (Y); \ @@ -205,9 +195,6 @@ typedef void (interrupt_handler_t)(void *); __x > __y ? (__x > __z ? __x : __z) : \ (__y > __z ? __y : __z); }) -#define MIN3(x, y, z) min3(x, y, z) -#define MAX3(x, y, z) max3(x, y, z) - /* * Return the absolute value of a number. * @@ -273,6 +260,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 @@ -286,12 +274,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 */ @@ -305,6 +287,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 @@ -326,14 +309,14 @@ int arch_early_init_r(void); 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); @@ -505,8 +488,6 @@ extern ssize_t spi_read (uchar *, int, uchar *, int); extern ssize_t spi_write (uchar *, int, uchar *, int); #endif -void rpxlite_init (void); - #ifdef CONFIG_HERMES /* $(BOARD)/hermes.c */ void hermes_start_lxt980 (int speed); @@ -629,6 +610,7 @@ int checkicache (void); int checkdcache (void); void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); +void reset_misc (void); void reset_cpu (ulong addr); #if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP) void ft_cpu_setup(void *blob, bd_t *bd); @@ -649,6 +631,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); @@ -681,9 +668,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); @@ -696,9 +680,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 * ); @@ -714,6 +695,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) @@ -732,9 +715,12 @@ void get_sys_info ( sys_info_t * ); #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_MPC8260) @@ -823,12 +809,10 @@ char * strmhz(char *buf, unsigned long hz); #include /* lib/rand.c */ -#if defined(CONFIG_LIB_RAND) || defined(CONFIG_LIB_HW_RAND) #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 */ @@ -838,7 +822,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) */