+/* 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_
#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
/* startup functions, used in:
* common/board_f.c
* common/init/board_init.c
+ * common/board_r.c
+ * common/board_info.c
*/
#include <init.h>
*/
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));
-
-int checkboard(void);
-int show_board_info(void);
-int last_stage_init(void);
-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
#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);
#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);
void serial_puts (const char *);
int serial_getc (void);
int serial_tstc (void);
+int serial_setconfig(uint config);
/* $(CPU)/speed.c */
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 *);
/* 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__ */