X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fcommon.h;h=60c79137e212c0eb6f22a7f6ef4305d6b8583275;hb=ca70cbabdcd19bf157ae4fa984559b126071ccff;hp=53b82a0d9c034dac28a3104ded173101622971ad;hpb=d6f8771239b15e8a68b38fcde96977db212887bd;p=u-boot diff --git a/include/common.h b/include/common.h index 53b82a0d9c..60c79137e2 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_ @@ -64,6 +63,9 @@ typedef void (interrupt_handler_t)(void *); /* startup functions, used in: * common/board_f.c + * common/init/board_init.c + * common/board_r.c + * common/board_info.c */ #include @@ -94,56 +96,11 @@ int run_command_repeatable(const char *cmd, int flag); */ int run_command_list(const char *cmd, int len, int flag); -/* arch/$(ARCH)/lib/board.c */ -void board_init_r(gd_t *, ulong) __attribute__ ((noreturn)); - -/** - * ulong board_init_f_alloc_reserve - allocate reserved area - * - * This function is called by each architecture very early in the start-up - * code to allow the C runtime to reserve space on the stack for writable - * 'globals' such as GD and the malloc arena. - * - * @top: top of the reserve area, growing down. - * @return: bottom of reserved area - */ -ulong board_init_f_alloc_reserve(ulong top); - -/** - * board_init_f_init_reserve - initialize the reserved area(s) - * - * This function is called once the C runtime has allocated the reserved - * area on the stack. It must initialize the GD at the base of that area. - * - * @base: top from which reservation was done - */ -void board_init_f_init_reserve(ulong base); - -/** - * arch_setup_gd() - Set up the global_data pointer - * - * This pointer is special in some architectures and cannot easily be assigned - * to. For example on x86 it is implemented by adding a specific record to its - * Global Descriptor Table! So we we provide a function to carry out this task. - * For most architectures this can simply be: - * - * gd = gd_ptr; - * - * @gd_ptr: Pointer to global data - */ -void arch_setup_gd(gd_t *gd_ptr); - -int checkboard(void); -int show_board_info(void); -int last_stage_init(void); -extern ulong monitor_flash_len; -int mac_read_from_eeprom(void); +int checkflash(void); +int checkdram(void); extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ -int set_cpu_clk_info(void); int mdm_init(void); -int update_flash_size(int flash_size); -int arch_early_init_r(void); /** * Show the DRAM size in a board-specific way @@ -290,14 +247,8 @@ int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf); #endif int get_env_id (void); -void pci_init (void); void pci_init_board(void); -int misc_init_r (void); -#if defined(CONFIG_VID) -int init_func_vid(void); -#endif - /* common/exports.c */ void jumptable_init(void); @@ -327,19 +278,11 @@ 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) +#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); @@ -422,8 +365,6 @@ int get_clocks (void); ulong get_bus_freq (ulong); int get_serial_clock(void); -int cpu_init_r (void); - /* $(CPU)/interrupts.c */ int interrupt_init (void); void timer_interrupt (struct pt_regs *);