diff options
| author | Tom Rini <trini@ti.com> | 2013-03-04 11:14:27 -0500 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-03-04 11:14:27 -0500 | 
| commit | 1c9f47ab2a2e9b62d08d39bfb9c4adc8f8edc5da (patch) | |
| tree | fa4ee32d67f02d1c8fa80a55b9d85982cedac062 /include/common.h | |
| parent | c259188b203d95e4a854e7e29b9e4472cc982f65 (diff) | |
| parent | 218da0f35f4b5e5bf13d3dba6d975d4d5d65516f (diff) | |
| download | olio-uboot-2014.01-1c9f47ab2a2e9b62d08d39bfb9c4adc8f8edc5da.tar.xz olio-uboot-2014.01-1c9f47ab2a2e9b62d08d39bfb9c4adc8f8edc5da.zip | |
Merge branch 'mem' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'include/common.h')
| -rw-r--r-- | include/common.h | 29 | 
1 files changed, 27 insertions, 2 deletions
| diff --git a/include/common.h b/include/common.h index 4ad17eafb..6d5292422 100644 --- a/include/common.h +++ b/include/common.h @@ -270,7 +270,8 @@ int	cpu_init(void);  phys_size_t initdram (int);  int	display_options (void);  void	print_size(unsigned long long, const char *); -int	print_buffer (ulong addr, void* data, uint width, uint count, uint linelen); +int print_buffer(ulong addr, const void *data, uint width, uint count, +		 uint linelen);  /* common/main.c */  void	main_loop	(void); @@ -357,7 +358,19 @@ int getenv_yesno(const char *var);  int	saveenv	     (void);  int	setenv	     (const char *, const char *);  int setenv_ulong(const char *varname, ulong value); -int setenv_addr(const char *varname, const void *addr); +int setenv_hex(const char *varname, ulong value); +/** + * setenv_addr - Set an environment variable to an address in hex + * + * @varname:	Environmet variable to set + * @addr:	Value to set it to + * @return 0 if ok, 1 on error + */ +static inline int setenv_addr(const char *varname, const void *addr) +{ +	return setenv_hex(varname, (ulong)addr); +} +  #ifdef CONFIG_ARM  # include <asm/mach-types.h>  # include <asm/setup.h> @@ -869,6 +882,18 @@ int cpu_disable(int nr);  int cpu_release(int nr, int argc, char * const argv[]);  #endif +/* Define a null map_sysmem() if the architecture doesn't use it */ +# ifndef CONFIG_ARCH_MAP_SYSMEM +static inline void *map_sysmem(phys_addr_t paddr, unsigned long len) +{ +	return (void *)(uintptr_t)paddr; +} + +static inline void unmap_sysmem(const void *vaddr) +{ +} +# endif +  #endif /* __ASSEMBLY__ */  #ifdef CONFIG_PPC |