diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clock_legacy.h | 14 | ||||
-rw-r--r-- | include/common.h | 149 | ||||
-rw-r--r-- | include/compiler.h | 4 | ||||
-rw-r--r-- | include/configs/am57xx_evm.h | 3 | ||||
-rw-r--r-- | include/configs/am65x_evm.h | 11 | ||||
-rw-r--r-- | include/configs/j721e_evm.h | 34 | ||||
-rw-r--r-- | include/configs/stm32mp1.h | 39 | ||||
-rw-r--r-- | include/configs/ti_armv7_common.h | 1 | ||||
-rw-r--r-- | include/cpu_func.h | 2 | ||||
-rw-r--r-- | include/eeprom.h | 4 | ||||
-rw-r--r-- | include/environment/ti/boot.h | 2 | ||||
-rw-r--r-- | include/environment/ti/k3_dfu.h | 46 | ||||
-rw-r--r-- | include/environment/ti/mmc.h | 5 | ||||
-rw-r--r-- | include/exports.h | 3 | ||||
-rw-r--r-- | include/fdt_support.h | 14 | ||||
-rw-r--r-- | include/fdtdec.h | 3 | ||||
-rw-r--r-- | include/flash.h | 7 | ||||
-rw-r--r-- | include/fs.h | 22 | ||||
-rw-r--r-- | include/hang.h | 22 | ||||
-rw-r--r-- | include/image.h | 16 | ||||
-rw-r--r-- | include/init.h | 29 | ||||
-rw-r--r-- | include/linux/bitmap.h | 133 | ||||
-rw-r--r-- | include/linux/bitops.h | 12 | ||||
-rw-r--r-- | include/linux/kernel.h | 13 | ||||
-rw-r--r-- | include/linux/types.h | 4 | ||||
-rw-r--r-- | include/net.h | 19 | ||||
-rw-r--r-- | include/ns87308.h | 233 | ||||
-rw-r--r-- | include/time.h | 2 |
28 files changed, 449 insertions, 397 deletions
diff --git a/include/clock_legacy.h b/include/clock_legacy.h new file mode 100644 index 0000000000..b0a8333ea6 --- /dev/null +++ b/include/clock_legacy.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __CLOCK_LEGACY_H +#define __CLOCK_LEGACY_H + +int get_clocks(void); +unsigned long get_bus_freq(unsigned long dummy); +int get_serial_clock(void); + +#endif diff --git a/include/common.h b/include/common.h index 52c02185f4..0ef8505fc7 100644 --- a/include/common.h +++ b/include/common.h @@ -2,9 +2,8 @@ /* * Common header file for U-Boot * - * This file still includes quite a bit of stuff that should be in separate - * headers. Please think before adding more things. - * Patches to remove things are welcome. + * This file still includes quite a few headers that should be included + * individually as needed. Patches to remove things are welcome. * * (C) Copyright 2000-2009 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. @@ -14,11 +13,6 @@ #define __COMMON_H_ 1 #ifndef __ASSEMBLY__ /* put C only stuff in this section */ - -typedef volatile unsigned long vu_long; -typedef volatile unsigned short vu_short; -typedef volatile unsigned char vu_char; - #include <config.h> #include <errno.h> #include <time.h> @@ -34,159 +28,20 @@ typedef volatile unsigned char vu_char; #include <stdarg.h> #include <stdio.h> #include <linux/kernel.h> - #include <part.h> #include <flash.h> #include <image.h> - -#ifdef __LP64__ -#define CONFIG_SYS_SUPPORT_64BIT_DATA -#endif - #include <log.h> - #include <asm/u-boot.h> /* boot information for Linux kernel */ #include <asm/global_data.h> /* global data used for startup functions */ - -/* startup functions, used in: - * common/board_f.c - * common/init/board_init.c - * common/board_r.c - * common/board_info.c - */ #include <init.h> - -/* - * Function Prototypes - */ -void hang (void) __attribute__ ((noreturn)); - #include <display_options.h> - -/* common/main.c */ -void main_loop (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 mdm_init(void); - -/** - * arch_fixup_fdt() - Write arch-specific information to fdt - * - * 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_fdt(void *blob); - -/* common/flash.c */ -void flash_perror (int); - -/* common/cmd_source.c */ -int source (ulong addr, const char *fit_uname); - -extern ulong load_addr; /* Default Load Address */ -extern ulong save_addr; /* Default Save Address */ -extern ulong save_size; /* Default Save Size */ - -/* common/cmd_net.c */ -int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); - -/* common/cmd_fat.c */ -int do_fat_fsload(cmd_tbl_t *, int, int, char * const []); - -/* common/cmd_ext2.c */ -int do_ext2load(cmd_tbl_t *, int, int, char * const []); - -/* common/exports.c */ -void jumptable_init(void); - -/* common/kallsysm.c */ -const char *symbol_lookup(unsigned long addr, unsigned long *caddr); - -/* common/memsize.c */ -long get_ram_size (long *, long); -phys_size_t get_effective_memsize(void); - -/* $(BOARD)/$(BOARD).c */ -void reset_phy (void); -void fdc_hw_init (void); - -#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 - -#if defined(CONFIG_SYS_DRAM_TEST) -int testdram(void); -#endif /* CONFIG_SYS_DRAM_TEST */ - -#if defined(CONFIG_ARM) -void relocate_code(ulong); -#else -void relocate_code(ulong, gd_t *, ulong) __attribute__ ((noreturn)); -#endif - -void s_init(void); - -void upmconfig (unsigned int, unsigned int *, unsigned int); -ulong get_tbclk (void); -void reset_misc (void); -void reset_cpu (ulong addr); -void ft_cpu_setup(void *blob, bd_t *bd); -void ft_pci_setup(void *blob, bd_t *bd); - -/* $(CPU)/speed.c */ -int get_clocks (void); -ulong get_bus_freq (ulong); -int get_serial_clock(void); - -/* lib/uuid.c */ #include <uuid.h> - -/* lib/vsprintf.c */ #include <vsprintf.h> - -/* lib/net_utils.c */ #include <net.h> - #include <bootstage.h> - -#else /* __ASSEMBLY__ */ - #endif /* __ASSEMBLY__ */ -/* Put only stuff here that the assembler can digest */ - -#ifdef CONFIG_POST -#define CONFIG_HAS_POST -#ifndef CONFIG_POST_ALT_LIST -#define CONFIG_POST_STD_LIST -#endif -#endif - -#define ROUND(a,b) (((a) + (b) - 1) & ~((b) - 1)) - -/* - * check_member() - Check the offset of a structure member - * - * @structure: Name of structure (e.g. global_data) - * @member: Name of member (e.g. baudrate) - * @offset: Expected offset in bytes - */ -#define check_member(structure, member, offset) _Static_assert( \ - offsetof(struct structure, member) == offset, \ - "`struct " #structure "` offset for `" #member "` is not " #offset) - -/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */ -#ifdef CONFIG_EFI_STUB -#define ll_boot_init() false -#else -#define ll_boot_init() true -#endif - /* Pull in stuff for the build system */ #ifdef DO_DEPS_ONLY # include <env_internal.h> diff --git a/include/compiler.h b/include/compiler.h index 90372f239c..ed74c272b8 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -144,4 +144,8 @@ typedef unsigned long int uintptr_t; #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) +#ifdef __LP64__ +#define MEM_SUPPORT_64BIT_DATA +#endif + #endif diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index cdab9246f2..fea9300a67 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -22,7 +22,6 @@ #define CONFIG_SYS_BOOTM_LEN SZ_64M -#define CONSOLEDEV "ttyS2" #define CONFIG_SYS_NS16550_COM1 UART1_BASE /* Base EVM has UART0 */ #define CONFIG_SYS_NS16550_COM2 UART2_BASE /* UART2 */ #define CONFIG_SYS_NS16550_COM3 UART3_BASE /* UART3 */ @@ -33,7 +32,6 @@ #define CONFIG_SYS_OMAP_ABE_SYSCK -#ifdef CONFIG_SPL_DFU #ifndef CONFIG_SPL_BUILD #define DFUARGS \ "dfu_bufsiz=0x10000\0" \ @@ -43,6 +41,7 @@ DFU_ALT_INFO_QSPI #else #undef CONFIG_CMD_BOOTD +#ifdef CONFIG_SPL_DFU #define CONFIG_SPL_LOAD_FIT_ADDRESS 0x80200000 #define DFUARGS \ "dfu_bufsiz=0x10000\0" \ diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h index 06be7cc8a4..7d7f86a059 100644 --- a/include/configs/am65x_evm.h +++ b/include/configs/am65x_evm.h @@ -13,6 +13,7 @@ #include <config_distro_bootcmd.h> #include <environment/ti/mmc.h> #include <environment/ti/k3_rproc.h> +#include <environment/ti/k3_dfu.h> /* DDR Configuration */ #define CONFIG_SYS_SDRAM_BASE1 0x880000000 @@ -71,6 +72,7 @@ "overlayaddr=0x83000000\0" \ "name_kern=Image\0" \ "console=ttyS2,115200n8\0" \ + "stdin=serial,usbkbd\0" \ "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000\0" \ "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" \ @@ -104,13 +106,20 @@ "0 /lib/firmware/am65x-mcu-r5f0_0-fw " \ "1 /lib/firmware/am65x-mcu-r5f0_1-fw " +#define EXTRA_ENV_DFUARGS \ + "dfu_bufsiz=0x20000\0" \ + DFU_ALT_INFO_MMC \ + DFU_ALT_INFO_EMMC \ + DFU_ALT_INFO_OSPI + /* Incorporate settings into the U-Boot environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_MMC_TI_ARGS \ DEFAULT_FIT_TI_ARGS \ EXTRA_ENV_AM65X_BOARD_SETTINGS \ EXTRA_ENV_AM65X_BOARD_SETTINGS_MMC \ - EXTRA_ENV_RPROC_SETTINGS + EXTRA_ENV_RPROC_SETTINGS \ + EXTRA_ENV_DFUARGS /* MMC ENV related defines */ #ifdef CONFIG_ENV_IS_IN_MMC diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index 84518786c7..eaed520e6b 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -14,6 +14,7 @@ #include <environment/ti/mmc.h> #include <environment/ti/k3_rproc.h> #include <environment/ti/ufs.h> +#include <environment/ti/k3_dfu.h> /* DDR Configuration */ #define CONFIG_SYS_SDRAM_BASE1 0x880000000 @@ -61,7 +62,9 @@ /* U-Boot general configuration */ #define EXTRA_ENV_J721E_BOARD_SETTINGS \ "default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ - "findfdt=setenv fdtfile ${default_device_tree}\0" \ + "findfdt=" \ + "setenv name_fdt ${default_device_tree};" \ + "setenv fdtfile ${name_fdt}\0" \ "loadaddr=0x80080000\0" \ "fdtaddr=0x82000000\0" \ "overlayaddr=0x83000000\0" \ @@ -70,6 +73,11 @@ "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000\0" \ "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" +#define PARTS_DEFAULT \ + /* Linux partitions */ \ + "uuid_disk=${uuid_gpt_disk};" \ + "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" + /* U-Boot MMC-specific configuration */ #define EXTRA_ENV_J721E_BOARD_SETTINGS_MMC \ "boot=mmc\0" \ @@ -78,7 +86,7 @@ "bootdir=/boot\0" \ "rd_spec=-\0" \ "init_mmc=run args_all args_mmc\0" \ - "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}\0" \ + "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \ "get_overlay_mmc=" \ "fdt address ${fdtaddr};" \ "fdt resize 0x100000;" \ @@ -87,8 +95,12 @@ "load mmc ${bootpart} ${overlayaddr} ${bootdir}/${overlay} && " \ "fdt apply ${overlayaddr};" \ "done;\0" \ + "partitions=" PARTS_DEFAULT \ "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \ - "${bootdir}/${name_kern}\0" + "${bootdir}/${name_kern}\0" \ + "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \ + "${bootdir}/${name_fit}\0" \ + "partitions=" PARTS_DEFAULT #ifdef DEFAULT_RPROCS #undef DEFAULT_RPROCS @@ -100,15 +112,31 @@ "7 /lib/firmware/j7-c66_1-fw " \ "8 /lib/firmware/j7-c71_0-fw " +/* set default dfu_bufsiz to 128KB (sector size of OSPI) */ +#define EXTRA_ENV_DFUARGS \ + "dfu_bufsiz=0x20000\0" \ + DFU_ALT_INFO_MMC \ + DFU_ALT_INFO_EMMC \ + DFU_ALT_INFO_RAM \ + DFU_ALT_INFO_OSPI + /* Incorporate settings into the U-Boot environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_MMC_TI_ARGS \ + DEFAULT_FIT_TI_ARGS \ EXTRA_ENV_J721E_BOARD_SETTINGS \ EXTRA_ENV_J721E_BOARD_SETTINGS_MMC \ EXTRA_ENV_RPROC_SETTINGS \ + EXTRA_ENV_DFUARGS \ DEFAULT_UFS_TI_ARGS /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> +/* MMC ENV related defines */ +#ifdef CONFIG_ENV_IS_IN_MMC +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_SYS_MMC_ENV_PART 1 +#endif + #endif /* __CONFIG_J721E_EVM_H */ diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index d42a7860be..a66534e027 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -33,9 +33,10 @@ #define CONFIG_SYS_CBSIZE SZ_1K /* - * Needed by "loadb" + * default load address used for command tftp, bootm , loadb, ... */ -#define CONFIG_SYS_LOAD_ADDR STM32_DDR_BASE +#define CONFIG_LOADADDR 0xc2000000 +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR /* ATAGs */ #define CONFIG_CMDLINE_TAG @@ -98,12 +99,34 @@ #if !defined(CONFIG_SPL_BUILD) -#define BOOT_TARGET_DEVICES(func) \ - func(MMC, mmc, 1) \ - func(UBIFS, ubifs, 0) \ - func(MMC, mmc, 0) \ - func(MMC, mmc, 2) \ - func(PXE, pxe, na) +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_MMC0(func) func(MMC, mmc, 0) +#define BOOT_TARGET_MMC1(func) func(MMC, mmc, 1) +#define BOOT_TARGET_MMC2(func) func(MMC, mmc, 2) +#else +#define BOOT_TARGET_MMC0(func) +#define BOOT_TARGET_MMC1(func) +#define BOOT_TARGET_MMC2(func) +#endif + +#ifdef CONFIG_NET +#define BOOT_TARGET_PXE(func) func(PXE, pxe, na) +#else +#define BOOT_TARGET_PXE(func) +#endif + +#ifdef CONFIG_CMD_UBIFS +#define BOOT_TARGET_UBIFS(func) func(UBIFS, ubifs, 0) +#else +#define BOOT_TARGET_UBIFS(func) +#endif + +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_MMC1(func) \ + BOOT_TARGET_UBIFS(func) \ + BOOT_TARGET_MMC0(func) \ + BOOT_TARGET_MMC2(func) \ + BOOT_TARGET_PXE(func) /* * bootcmd for stm32mp1: diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index adc7861539..a1a053e675 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -61,7 +61,6 @@ "setenv overlaystring ${overlaystring}'#'${overlay};" \ "done;\0" \ "run_fit=bootm ${addr_fit}#${fdtfile}${overlaystring}\0" \ - "loadfit=run args_mmc; run run_fit;\0" \ /* * DDR information. If the CONFIG_NR_DRAM_BANKS is not defined, diff --git a/include/cpu_func.h b/include/cpu_func.h index 46f3d92459..f701f02bfe 100644 --- a/include/cpu_func.h +++ b/include/cpu_func.h @@ -83,5 +83,7 @@ enum { * @param flags Flags to control what is done */ int cleanup_before_linux_select(int flags); + +void reset_cpu(ulong addr); ; #endif diff --git a/include/eeprom.h b/include/eeprom.h index 61eb826a73..79118eb83d 100644 --- a/include/eeprom.h +++ b/include/eeprom.h @@ -21,4 +21,8 @@ int eeprom_write(uint dev_addr, uint offset, uchar *buffer, uint cnt); #define eeprom_write(dev_addr, offset, buffer, cnt) ((void)-ENOSYS) #endif +#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 diff --git a/include/environment/ti/boot.h b/include/environment/ti/boot.h index 684a744f31..6313f3e328 100644 --- a/include/environment/ti/boot.h +++ b/include/environment/ti/boot.h @@ -185,6 +185,8 @@ "setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;" \ "if test $board_name = beagle_x15_revc; then " \ "setenv fdtfile am57xx-beagle-x15-revc.dtb; fi;" \ + "if test $board_name = am5729_beagleboneai; then " \ + "setenv fdtfile am5729-beagleboneai.dtb; fi;" \ "if test $board_name = am572x_idk; then " \ "setenv fdtfile am572x-idk.dtb; fi;" \ "if test $board_name = am574x_idk; then " \ diff --git a/include/environment/ti/k3_dfu.h b/include/environment/ti/k3_dfu.h new file mode 100644 index 0000000000..2f503b8de8 --- /dev/null +++ b/include/environment/ti/k3_dfu.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com + * + * Environment variable definitions for DFU on TI K3 SoCs. + * + */ + +#ifndef __TI_DFU_H +#define __TI_DFU_H + +#define DFU_ALT_INFO_MMC \ + "dfu_alt_info_mmc=" \ + "boot part 1 1;" \ + "rootfs part 1 2;" \ + "tiboot3.bin fat 1 1;" \ + "tispl.bin fat 1 1;" \ + "u-boot.img fat 1 1;" \ + "uEnv.txt fat 1 1;" \ + "sysfw.itb fat 1 1\0" + +#define DFU_ALT_INFO_EMMC \ + "dfu_alt_info_emmc=" \ + "rawemmc raw 0 0x800000 mmcpart 1;" \ + "rootfs part 0 1 mmcpart 0;" \ + "tiboot3.bin.raw raw 0x0 0x400 mmcpart 1;" \ + "tispl.bin.raw raw 0x400 0x1000 mmcpart 1;" \ + "u-boot.img.raw raw 0x1400 0x2000 mmcpart 1;" \ + "u-env.raw raw 0x3400 0x100 mmcpart 1;" \ + "sysfw.itb.raw raw 0x3600 0x800 mmcpart 1\0" + +#define DFU_ALT_INFO_OSPI \ + "dfu_alt_info_ospi=" \ + "tiboot3.bin raw 0x0 0x080000;" \ + "tispl.bin raw 0x080000 0x200000;" \ + "u-boot.img raw 0x280000 0x400000;" \ + "u-boot-env raw 0x680000 0x020000;" \ + "sysfw.itb raw 0x6c0000 0x100000;" \ + "rootfs raw 0x800000 0x3800000\0" + +#define DFU_ALT_INFO_RAM \ + "dfu_alt_info_ram=" \ + "tispl.bin ram 0x80080000 0x100000;" \ + "u-boot.img ram 0x81000000 0x100000\0" \ + +#endif /* __TI_DFU_H */ diff --git a/include/environment/ti/mmc.h b/include/environment/ti/mmc.h index bb4af0a3d5..1c8e49a8b3 100644 --- a/include/environment/ti/mmc.h +++ b/include/environment/ti/mmc.h @@ -41,7 +41,7 @@ "fi;" \ "fi;" \ "fi;\0" \ - "mmcloados=run args_mmc; " \ + "mmcloados=" \ "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ "if run loadfdt; then " \ "bootz ${loadaddr} - ${fdtaddr}; " \ @@ -61,8 +61,9 @@ "if mmc rescan; then " \ "echo SD/MMC found on device ${mmcdev};" \ "if run loadimage; then " \ + "run args_mmc; " \ "if test ${boot_fit} -eq 1; then " \ - "run loadfit; " \ + "run run_fit; " \ "else " \ "run mmcloados;" \ "fi;" \ diff --git a/include/exports.h b/include/exports.h index 35f463287f..cbd16fc518 100644 --- a/include/exports.h +++ b/include/exports.h @@ -13,6 +13,9 @@ struct spi_slave; +/* Set up the jump table for use by the API */ +void jumptable_init(void); + /* These are declarations of exported functions available in C code */ unsigned long get_version(void); int getc(void); diff --git a/include/fdt_support.h b/include/fdt_support.h index 3f4bc643d4..ba14acd7f6 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -12,6 +12,20 @@ #include <asm/u-boot.h> #include <linux/libfdt.h> +/** + * arch_fixup_fdt() - Write arch-specific information to fdt + * + * 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_fdt(void *blob); + +void ft_cpu_setup(void *blob, bd_t *bd); + +void ft_pci_setup(void *blob, bd_t *bd); + u32 fdt_getprop_u32_default_node(const void *fdt, int off, int cell, const char *prop, const u32 dflt); u32 fdt_getprop_u32_default(const void *fdt, const char *path, diff --git a/include/fdtdec.h b/include/fdtdec.h index 696e0fd024..c8a143db5f 100644 --- a/include/fdtdec.h +++ b/include/fdtdec.h @@ -111,6 +111,9 @@ struct fdt_pci_addr { u32 phys_lo; }; +extern u8 __dtb_dt_begin[]; /* embedded device tree blob */ +extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */ + /** * Compute the size of a resource. * diff --git a/include/flash.h b/include/flash.h index 807800b524..2655c72087 100644 --- a/include/flash.h +++ b/include/flash.h @@ -117,6 +117,13 @@ extern int jedec_flash_match(flash_info_t *info, ulong base); #define CFI_CMDSET_AMD_LEGACY 0xFFF0 #endif +/** + * flash_perror() - Print a flash error + * + * @err: Error number of message to print (ERR_... as below) + */ +void flash_perror(int err); + /*----------------------------------------------------------------------- * return codes from flash_write(): */ diff --git a/include/fs.h b/include/fs.h index 742a535b5f..37e35c2120 100644 --- a/include/fs.h +++ b/include/fs.h @@ -14,6 +14,28 @@ #define FS_TYPE_UBIFS 4 #define FS_TYPE_BTRFS 5 +/** + * do_fat_fsload - Run the fatload command + * + * @cmdtp: Command information for fatload + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_fat_fsload(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + +/** + * do_ext2load - Run the ext2load command + * + * @cmdtp: Command information for ext2load + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_ext2load(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + /* * Tell the fs layer which block device an partition to use for future * commands. This also internally identifies the filesystem that is present diff --git a/include/hang.h b/include/hang.h new file mode 100644 index 0000000000..27cda49359 --- /dev/null +++ b/include/hang.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * (C) Copyright 2000-2009 + * Wolfgang Denk, DENX Software Engineering, wd@denx.de. + */ + +#ifndef __HANG_H +#define __HANG_H + +#ifndef __ASSEMBLY__ +/** + * hang() - Print a message and stop execution + * + * This shows a 'hang' message where possible and then goes into an infinite + * loop. This is called by panic() if CONFIG_PANIC_HANG is enabled. + * + * This function does not return. + */ +void hang(void) __attribute__ ((noreturn)); +#endif + +#endif diff --git a/include/image.h b/include/image.h index 86ebaae4fe..9c6b6d6054 100644 --- a/include/image.h +++ b/include/image.h @@ -112,6 +112,10 @@ struct fdt_region; # define IMAGE_OF_SYSTEM_SETUP 0 #endif +extern ulong image_load_addr; /* Default Load Address */ +extern ulong image_save_addr; /* Default Save Address */ +extern ulong image_save_size; /* Default Save Size */ + enum ih_category { IH_ARCH, IH_COMP, @@ -670,6 +674,18 @@ int fit_image_load(bootm_headers_t *images, ulong addr, int arch, int image_type, int bootstage_id, enum fit_load_op load_op, ulong *datap, ulong *lenp); +/** + * image_source_script() - Execute a script + * + * Executes a U-Boot script at a particular address in memory. The script should + * have a header (FIT or legacy) with the script type (IH_TYPE_SCRIPT). + * + * @addr: Address of script + * @fit_uname: FIT subimage name + * @return result code (enum command_ret_t) + */ +int image_source_script(ulong addr, const char *fit_uname); + #ifndef USE_HOSTCC /** * fit_get_node_from_config() - Look up an image a FIT by type diff --git a/include/init.h b/include/init.h index 970a39a6a0..2a33a3fd1e 100644 --- a/include/init.h +++ b/include/init.h @@ -12,8 +12,17 @@ #include <linux/types.h> +struct global_data; + #ifndef __ASSEMBLY__ /* put C only stuff in this section */ +/* Avoid using CONFIG_EFI_STUB directly as we may boot from other loaders */ +#ifdef CONFIG_EFI_STUB +#define ll_boot_init() false +#else +#define ll_boot_init() true +#endif + /* * Function Prototypes */ @@ -97,6 +106,11 @@ int dram_init(void); */ int dram_init_banksize(void); +long get_ram_size(long *base, long size); +phys_size_t get_effective_memsize(void); + +int testdram(void); + /** * arch_reserve_stacks() - Reserve all necessary stacks * @@ -221,6 +235,21 @@ void pci_init_board(void); void trap_init(unsigned long reloc_addr); +/** + * main_loop() - Enter the main loop of U-Boot + * + * This normally runs the command line. + */ +void main_loop(void); + +#if defined(CONFIG_ARM) +void relocate_code(ulong addr_moni); +#else +void relocate_code(ulong start_addr_sp, struct global_data *new_gd, + ulong relocaddr) + __attribute__ ((noreturn)); +#endif + #endif /* __ASSEMBLY__ */ /* Put only stuff here that the assembler can digest */ diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index fbbb67c8b2..dae4225be5 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h @@ -5,10 +5,88 @@ #include <asm/types.h> #include <linux/types.h> #include <linux/bitops.h> +#include <linux/string.h> +#ifdef __LITTLE_ENDIAN +#define BITMAP_MEM_ALIGNMENT 8 +#else +#define BITMAP_MEM_ALIGNMENT (8 * sizeof(unsigned long)) +#endif +#define BITMAP_MEM_MASK (BITMAP_MEM_ALIGNMENT - 1) + +#define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) & (BITS_PER_LONG - 1))) +#define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1))) #define small_const_nbits(nbits) \ (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG) +static inline void +__bitmap_or(unsigned long *dst, const unsigned long *bitmap1, + const unsigned long *bitmap2, unsigned int bits) +{ + unsigned int k; + unsigned int nr = BITS_TO_LONGS(bits); + + for (k = 0; k < nr; k++) + dst[k] = bitmap1[k] | bitmap2[k]; +} + +static inline int +__bitmap_weight(const unsigned long *bitmap, unsigned int bits) +{ + unsigned int k, lim = bits / BITS_PER_LONG; + int w = 0; + + for (k = 0; k < lim; k++) + w += hweight_long(bitmap[k]); + + if (bits % BITS_PER_LONG) + w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits)); + + return w; +} + +static inline void +__bitmap_set(unsigned long *map, unsigned int start, int len) +{ + unsigned long *p = map + BIT_WORD(start); + const unsigned int size = start + len; + int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG); + unsigned long mask_to_set = BITMAP_FIRST_WORD_MASK(start); + + while (len - bits_to_set >= 0) { + *p |= mask_to_set; + len -= bits_to_set; + bits_to_set = BITS_PER_LONG; + mask_to_set = ~0UL; + p++; + } + if (len) { + mask_to_set &= BITMAP_LAST_WORD_MASK(size); + *p |= mask_to_set; + } +} + +static inline void +__bitmap_clear(unsigned long *map, unsigned int start, int len) +{ + unsigned long *p = map + BIT_WORD(start); + const unsigned int size = start + len; + int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG); + unsigned long mask_to_clear = BITMAP_FIRST_WORD_MASK(start); + + while (len - bits_to_clear >= 0) { + *p &= ~mask_to_clear; + len -= bits_to_clear; + bits_to_clear = BITS_PER_LONG; + mask_to_clear = ~0UL; + p++; + } + if (len) { + mask_to_clear &= BITMAP_LAST_WORD_MASK(size); + *p &= ~mask_to_clear; + } +} + static inline void bitmap_zero(unsigned long *dst, int nbits) { if (small_const_nbits(nbits)) { @@ -81,4 +159,59 @@ static inline unsigned long find_first_bit(const unsigned long *addr, unsigned l (bit) < (size); \ (bit) = find_next_bit((addr), (size), (bit) + 1)) +static inline void bitmap_fill(unsigned long *dst, unsigned int nbits) +{ + if (small_const_nbits(nbits)) { + *dst = ~0UL; + } else { + unsigned int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); + + memset(dst, 0xff, len); + } +} + +static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, + const unsigned long *src2, unsigned int nbits) +{ + if (small_const_nbits(nbits)) + *dst = *src1 | *src2; + else + __bitmap_or(dst, src1, src2, nbits); +} + +static inline int bitmap_weight(const unsigned long *src, unsigned int nbits) +{ + if (small_const_nbits(nbits)) + return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits)); + return __bitmap_weight(src, nbits); +} + +static inline void bitmap_set(unsigned long *map, unsigned int start, + unsigned int nbits) +{ + if (__builtin_constant_p(nbits) && nbits == 1) + __set_bit(start, map); + else if (__builtin_constant_p(start & BITMAP_MEM_MASK) && + IS_ALIGNED(start, BITMAP_MEM_ALIGNMENT) && + __builtin_constant_p(nbits & BITMAP_MEM_MASK) && + IS_ALIGNED(nbits, BITMAP_MEM_ALIGNMENT)) + memset((char *)map + start / 8, 0xff, nbits / 8); + else + __bitmap_set(map, start, nbits); +} + +static inline void bitmap_clear(unsigned long *map, unsigned int start, + unsigned int nbits) +{ + if (__builtin_constant_p(nbits) && nbits == 1) + __clear_bit(start, map); + else if (__builtin_constant_p(start & BITMAP_MEM_MASK) && + IS_ALIGNED(start, BITMAP_MEM_ALIGNMENT) && + __builtin_constant_p(nbits & BITMAP_MEM_MASK) && + IS_ALIGNED(nbits, BITMAP_MEM_ALIGNMENT)) + memset((char *)map + start / 8, 0, nbits / 8); + else + __bitmap_clear(map, start, nbits); +} + #endif /* __LINUX_BITMAP_H */ diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 259df43fb0..a07c70fd48 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -4,6 +4,7 @@ #include <asm/types.h> #include <asm-generic/bitsperlong.h> #include <linux/compiler.h> +#include <linux/kernel.h> #ifdef __KERNEL__ #define BIT(nr) (1UL << (nr)) @@ -133,6 +134,17 @@ static inline unsigned int generic_hweight8(unsigned int w) return (res & 0x0F) + ((res >> 4) & 0x0F); } +static inline unsigned long generic_hweight64(__u64 w) +{ + return generic_hweight32((unsigned int)(w >> 32)) + + generic_hweight32((unsigned int)w); +} + +static inline unsigned long hweight_long(unsigned long w) +{ + return sizeof(w) == 4 ? generic_hweight32(w) : generic_hweight64(w); +} + #include <asm/bitops.h> /* linux/include/asm-generic/bitops/non-atomic.h */ diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 564819a1c0..b88c210065 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -69,6 +69,8 @@ #define DIV_ROUND_UP_ULL(ll, d) DIV_ROUND_DOWN_ULL((ll) + (d) - 1, (d)) +#define ROUND(a, b) (((a) + (b) - 1) & ~((b) - 1)) + #if BITS_PER_LONG == 32 # define DIV_ROUND_UP_SECTOR_T(ll,d) DIV_ROUND_UP_ULL(ll, d) #else @@ -268,4 +270,15 @@ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) +/* + * check_member() - Check the offset of a structure member + * + * @structure: Name of structure (e.g. global_data) + * @member: Name of member (e.g. baudrate) + * @offset: Expected offset in bytes + */ +#define check_member(structure, member, offset) _Static_assert( \ + offsetof(struct structure, member) == (offset), \ + "`struct " #structure "` offset for `" #member "` is not " #offset) + #endif diff --git a/include/linux/types.h b/include/linux/types.h index bd912bcb42..baa2c491ea 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -163,4 +163,8 @@ struct ustat { #define DECLARE_BITMAP(name, bits) \ unsigned long name[BITS_TO_LONGS(bits)] +typedef volatile unsigned long vu_long; +typedef volatile unsigned short vu_short; +typedef volatile unsigned char vu_char; + #endif /* _LINUX_TYPES_H */ diff --git a/include/net.h b/include/net.h index 834f244982..8a02c923a4 100644 --- a/include/net.h +++ b/include/net.h @@ -51,6 +51,17 @@ struct in_addr { }; /** + * do_tftpb - Run the tftpboot command + * + * @cmdtp: Command information for tftpboot + * @flag: Command flags (CMD_FLAG_...) + * @argc: Number of arguments + * @argv: List of arguments + * @return result (see enum command_ret_t) + */ +int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]); + +/** * An incoming packet handler. * @param pkt pointer to the application packet * @param dport destination UDP port @@ -906,4 +917,12 @@ static inline struct in_addr env_get_ip(char *var) { return string_to_ip(env_get(var)); } + +/** + * reset_phy() - Reset the Ethernet PHY + * + * This should be implemented by boards if CONFIG_RESET_PHY_R is enabled + */ +void reset_phy(void); + #endif /* __NET_H__ */ diff --git a/include/ns87308.h b/include/ns87308.h deleted file mode 100644 index d5ccd3ba3b..0000000000 --- a/include/ns87308.h +++ /dev/null @@ -1,233 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * (C) Copyright 2000 - * Rob Taylor, Flying Pig Systems. robt@flyingpig.com. - */ - -#ifndef _NS87308_H_ -#define _NS87308_H_ - -#include <asm/pci_io.h> - -/* Note: I couldn't find a full data sheet for the ns87308, but the ns87307 seems to be pretty - functionally- (and pin-) equivalent to the 87308, but the 308 has better ir support. */ - -void initialise_ns87308(void); - -/* - * The following struct represents the GPIO registers on the NS87308/NS97307 - */ -struct GPIO -{ - unsigned char dta1; /* 0 data port 1 */ - unsigned char dir1; /* 1 direction port 1 */ - unsigned char out1; /* 2 output type port 1 */ - unsigned char puc1; /* 3 pull-up control port 1 */ - unsigned char dta2; /* 4 data port 2 */ - unsigned char dir2; /* 5 direction port 2 */ - unsigned char out2; /* 6 output type port 2 */ - unsigned char puc2; /* 7 pull-up control port 2 */ -}; - -/* - * The following represents the power management registers on the NS87308/NS97307 - */ -#define PWM_FER1 0 /* 0 function enable reg. 1 */ -#define PWM_FER2 1 /* 1 function enable reg. 2 */ -#define PWM_PMC1 2 /* 2 power mgmt. control 1 */ -#define PWM_PMC2 3 /* 3 power mgmt. control 2 */ -#define PWM_PMC3 4 /* 4 power mgmt. control 3 */ -#define PWM_WDTO 5 /* 5 watchdog time-out */ -#define PWM_WDCF 6 /* 6 watchdog config. */ -#define PWM_WDST 7 /* 7 watchdog status */ - -/*PNP config registers: - * these depend on the stated of BADDR1 and BADDR0 on startup - * so there's three versions here with the last two digits indicating - * for which configuration their valid - * the 1st of the two digits indicates the state of BADDR1 - * the 2st of the two digits indicates the state of BADDR0 - */ - - -#define IO_INDEX_OFFSET_0x 0x0279 /* full PnP isa Mode */ -#define IO_INDEX_OFFSET_10 0x015C /* PnP motherboard mode */ -#define IO_INDEX_OFFSET_11 0x002E /* PnP motherboard mode */ -#define IO_DATA_OFFSET_0x 0x0A79 /* full PnP isa Mode */ -#define IO_DATA_OFFSET_10 0x015D /* PnP motherboard mode */ -#define IO_DATA_OFFSET_11 0x002F /* PnP motherboard mode */ - -#if defined(CONFIG_SYS_NS87308_BADDR_0x) -#define IO_INDEX (CONFIG_SYS_ISA_IO + IO_INDEX_OFFSET_0x) -#define IO_DATA (CONFIG_SYS_ISA_IO + IO_DATA_OFFSET_0x) -#elif defined(CONFIG_SYS_NS87308_BADDR_10) -#define IO_INDEX (CONFIG_SYS_ISA_IO + IO_INDEX_OFFSET_10) -#define IO_DATA (CONFIG_SYS_ISA_IO + IO_DATA_OFFSET_10) -#elif defined(CONFIG_SYS_NS87308_BADDR_11) -#define IO_INDEX (CONFIG_SYS_ISA_IO + IO_INDEX_OFFSET_11) -#define IO_DATA (CONFIG_SYS_ISA_IO + IO_DATA_OFFSET_11) -#endif - -/* PnP register definitions */ - -#define SET_RD_DATA_PORT 0x00 -#define SERIAL_ISOLATION 0x01 -#define CONFIG_CONTROL 0x02 -#define WAKE_CSN 0x03 -#define RES_DATA 0x04 -#define STATUS 0x05 -#define SET_CSN 0x06 -#define LOGICAL_DEVICE 0x07 - -/*vendor defined values */ -#define SID_REG 0x20 -#define SUPOERIO_CONF1 0x21 -#define SUPOERIO_CONF2 0x22 -#define PGCS_INDEX 0x23 -#define PGCS_DATA 0x24 - -/* values above 30 are different for each logical device - but I can't be arsed to enter them all. the ones here - are pretty consistent between all logical devices - feel free to correct the situation if you want.. ;) - */ -#define ACTIVATE 0x30 -#define ACTIVATE_OFF 0x00 -#define ACTIVATE_ON 0x01 - -#define BASE_ADDR_HIGH 0x60 -#define BASE_ADDR_LOW 0x61 -#define LUN_CONFIG_REG 0xF0 -#define DBASE_HIGH 0x60 /* SIO KBC data base address, 15:8 */ -#define DBASE_LOW 0x61 /* SIO KBC data base address, 7:0 */ -#define CBASE_HIGH 0x62 /* SIO KBC command base addr, 15:8 */ -#define CBASE_LOW 0x63 /* SIO KBC command base addr, 7:0 */ - -/* the logical devices*/ -#define LDEV_KBC1 0x00 /* 2 devices for keyboard and mouse controller*/ -#define LDEV_KBC2 0x01 -#define LDEV_MOUSE 0x01 -#define LDEV_RTC_APC 0x02 /*Real Time Clock and Advanced Power Control*/ -#define LDEV_FDC 0x03 /*floppy disk controller*/ -#define LDEV_PARP 0x04 /*Parallel port*/ -#define LDEV_UART2 0x05 -#define LDEV_UART1 0x06 -#define LDEV_GPIO 0x07 /*General Purpose IO and chip select output signals*/ -#define LDEV_POWRMAN 0x08 /*Power Managment*/ - -#define CONFIG_SYS_NS87308_KBC1 (1 << LDEV_KBC1) -#define CONFIG_SYS_NS87308_KBC2 (1 << LDEV_KBC2) -#define CONFIG_SYS_NS87308_MOUSE (1 << LDEV_MOUSE) -#define CONFIG_SYS_NS87308_RTC_APC (1 << LDEV_RTC_APC) -#define CONFIG_SYS_NS87308_FDC (1 << LDEV_FDC) -#define CONFIG_SYS_NS87308_PARP (1 << LDEV_PARP) -#define CONFIG_SYS_NS87308_UART2 (1 << LDEV_UART2) -#define CONFIG_SYS_NS87308_UART1 (1 << LDEV_UART1) -#define CONFIG_SYS_NS87308_GPIO (1 << LDEV_GPIO) -#define CONFIG_SYS_NS87308_POWRMAN (1 << LDEV_POWRMAN) - -/*some functions and macro's for doing configuration */ - -static inline void read_pnp_config(unsigned char index, unsigned char *data) -{ - pci_writeb(index,IO_INDEX); - pci_readb(IO_DATA, *data); -} - -static inline void write_pnp_config(unsigned char index, unsigned char data) -{ - pci_writeb(index,IO_INDEX); - pci_writeb(data, IO_DATA); -} - -static inline void pnp_set_device(unsigned char dev) -{ - write_pnp_config(LOGICAL_DEVICE, dev); -} - -static inline void write_pm_reg(unsigned short base, unsigned char index, unsigned char data) -{ - pci_writeb(index, CONFIG_SYS_ISA_IO + base); - eieio(); - pci_writeb(data, CONFIG_SYS_ISA_IO + base + 1); -} - -/*void write_pnp_config(unsigned char index, unsigned char data); -void pnp_set_device(unsigned char dev); -*/ - -#define PNP_SET_DEVICE_BASE(dev,base) \ - pnp_set_device(dev); \ - write_pnp_config(ACTIVATE, ACTIVATE_OFF); \ - write_pnp_config(BASE_ADDR_HIGH, ((base) >> 8) & 0xff ); \ - write_pnp_config(BASE_ADDR_LOW, (base) &0xff); \ - write_pnp_config(ACTIVATE, ACTIVATE_ON); - -#define PNP_ACTIVATE_DEVICE(dev) \ - pnp_set_device(dev); \ - write_pnp_config(ACTIVATE, ACTIVATE_ON); - -#define PNP_DEACTIVATE_DEVICE(dev) \ - pnp_set_device(dev); \ - write_pnp_config(ACTIVATE, ACTIVATE_OFF); - - -static inline void write_pgcs_config(unsigned char index, unsigned char data) -{ - write_pnp_config(PGCS_INDEX, index); - write_pnp_config(PGCS_DATA, data); -} - -/* these macrose configure the 3 CS lines - on the sandpoint board these controll NVRAM - CS0 is connected to NVRAMCS - CS1 is connected to NVRAMAS0 - CS2 is connected to NVRAMAS1 - */ -#define PGCS_CS_ASSERT_ON_WRITE 0x10 -#define PGCS_CS_ASSERT_ON_READ 0x20 - -#define PNP_PGCS_CSLINE_BASE(cs, base) \ - write_pgcs_config((cs) << 2, ((base) >> 8) & 0xff ); \ - write_pgcs_config(((cs) << 2) + 1, (base) & 0xff ); - -#define PNP_PGCS_CSLINE_CONF(cs, conf) \ - write_pgcs_config(((cs) << 2) + 2, (conf) ); - - -/* The following sections are for 87308 extensions to the standard compoents it emulates */ - -/* extensions to 16550*/ - -#define MCR_MDSL_MSK 0xe0 /*mode select mask*/ -#define MCR_MDSL_UART 0x00 /*uart, default*/ -#define MCR_MDSL_SHRPIR 0x02 /*Sharp IR*/ -#define MCR_MDSL_SIR 0x03 /*SIR*/ -#define MCR_MDSL_CIR 0x06 /*Consumer IR*/ - -#define FCR_TXFTH0 0x10 /* these bits control threshod of data level in fifo */ -#define FCR_TXFTH1 0x20 /* for interrupt trigger */ - -/* - * Default NS87308 configuration - */ -#ifndef CONFIG_SYS_NS87308_KBC1_BASE -#define CONFIG_SYS_NS87308_KBC1_BASE 0x0060 -#endif -#ifndef CONFIG_SYS_NS87308_RTC_BASE -#define CONFIG_SYS_NS87308_RTC_BASE 0x0070 -#endif -#ifndef CONFIG_SYS_NS87308_FDC_BASE -#define CONFIG_SYS_NS87308_FDC_BASE 0x03F0 -#endif -#ifndef CONFIG_SYS_NS87308_LPT_BASE -#define CONFIG_SYS_NS87308_LPT_BASE 0x0278 -#endif -#ifndef CONFIG_SYS_NS87308_UART1_BASE -#define CONFIG_SYS_NS87308_UART1_BASE 0x03F8 -#endif -#ifndef CONFIG_SYS_NS87308_UART2_BASE -#define CONFIG_SYS_NS87308_UART2_BASE 0x02F8 -#endif - -#endif /*_NS87308_H_*/ diff --git a/include/time.h b/include/time.h index 71446c3171..e99f9c8012 100644 --- a/include/time.h +++ b/include/time.h @@ -6,6 +6,8 @@ #include <linux/typecheck.h> #include <linux/types.h> +ulong get_tbclk(void); + unsigned long get_timer(unsigned long base); /* |