diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/global_data.h | 2 | ||||
-rw-r--r-- | include/cbfs.h | 29 | ||||
-rw-r--r-- | include/configs/x86-common.h | 11 |
3 files changed, 37 insertions, 5 deletions
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 5372d5d8cd9..7587ba2ee58 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -150,7 +150,7 @@ typedef struct global_data { #endif /* - * Global Data Flags - the top 16 bits are reserved for arch-specific flags + * Global Data Flags */ #define GD_FLG_RELOC 0x00001 /* Code was relocated to RAM */ #define GD_FLG_DEVINIT 0x00002 /* Devices have been initialized */ diff --git a/include/cbfs.h b/include/cbfs.h index b8d1dabbf63..6d4c4d4b065 100644 --- a/include/cbfs.h +++ b/include/cbfs.h @@ -91,6 +91,13 @@ extern enum cbfs_result file_cbfs_result; const char *file_cbfs_error(void); /** + * cbfs_get_result() - Get the result of the last CBFS operation + * + *@return last result + */ +enum cbfs_result cbfs_get_result(void); + +/** * file_cbfs_init() - Initialize the CBFS driver and load metadata into RAM. * * @end_of_rom: Points to the end of the ROM the CBFS should be read @@ -128,6 +135,28 @@ void file_cbfs_get_next(const struct cbfs_cachenode **file); */ const struct cbfs_cachenode *file_cbfs_find(const char *name); +struct cbfs_priv *priv; + +/** + * cbfs_find_file() - Find a file in a given CBFS + * + * @cbfs: CBFS to look in (use cbfs_init_mem() to set it up) + * @name: Filename to look for + * @return pointer to CBFS node if found, else NULL + */ +const struct cbfs_cachenode *cbfs_find_file(struct cbfs_priv *cbfs, + const char *name); + +/** + * cbfs_init_mem() - Set up a new CBFS + * + * @base: Base address of CBFS + * @size: Size of CBFS in bytes + * @cbfsp: Returns a pointer to CBFS on success + * @return 0 if OK, -ve on error + */ +int cbfs_init_mem(ulong base, ulong size, struct cbfs_priv **privp); + /***************************************************************************/ /* All of the functions below can be used without first initializing CBFS. */ diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h index ca27a4f9e24..54214f99e9a 100644 --- a/include/configs/x86-common.h +++ b/include/configs/x86-common.h @@ -105,11 +105,14 @@ #define CONFIG_OTHBOOTARGS "othbootargs=acpi=off\0" #endif -#ifndef CONFIG_DISTRO_DEFAULTS -#define BOOTENV +#if defined(CONFIG_DISTRO_DEFAULTS) +#define DISTRO_BOOTENV BOOTENV +#else +#define DISTRO_BOOTENV #endif #define CONFIG_EXTRA_ENV_SETTINGS \ + DISTRO_BOOTENV \ CONFIG_STD_DEVICES_SETTINGS \ "pciconfighost=1\0" \ "netdev=eth0\0" \ @@ -118,8 +121,8 @@ "scriptaddr=0x7000000\0" \ "kernel_addr_r=0x1000000\0" \ "ramdisk_addr_r=0x4000000\0" \ - "ramdiskfile=initramfs.gz\0" \ - BOOTENV + "ramdiskfile=initramfs.gz\0" + #define CONFIG_RAMBOOTCOMMAND \ "setenv bootargs root=/dev/ram rw " \ |