// /usr/lib/gcc/arm-linux-gnueabi/4.6.1/cc1 -quiet -nostdinc -I /home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include -imultilib . -imultiarch arm-linux-gnueabi -D __KERNEL__ -D CONFIG_SYS_TEXT_BASE=0x80100000 -D CONFIG_SPL_TEXT_BASE=0x40303080 -D CONFIG_ARM -D __ARM__ -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6.1/include clocks.c -quiet -dumpbase clocks.c -msoft-float -marm -mabi=aapcs-linux -mno-thumb-interwork -march=armv5 -mfpu=vfpv3-d16 -auxbase-strip clocks.o -g -Os -Wall -Wstrict-prototypes -Wno-format-nonliteral -Wno-format-security -fno-common -ffixed-r8 -fno-builtin -ffreestanding -fno-stack-protector -o - -frandom-seed=0 # 1 "clocks.c" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/arch/arm/cpu/armv7/omap4//" # 1 "" # 1 "" # 1 "clocks.c" # 32 "clocks.c" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 1 # 32 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" typedef unsigned char uchar; typedef volatile unsigned long vu_long; typedef volatile unsigned short vu_short; typedef volatile unsigned char vu_char; # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config.h" 1 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config_cmd_defaults.h" 1 # 4 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config_defaults.h" 1 # 5 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_panda.h" 1 # 64 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_panda.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_common.h" 1 # 41 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_common.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/cpu.h" 1 # 29 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/cpu.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/types.h" 1 typedef unsigned short umode_t; typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; __extension__ typedef __signed__ long long __s64; __extension__ typedef unsigned long long __u64; typedef signed char s8; typedef unsigned char u8; typedef signed short s16; typedef unsigned short u16; typedef signed int s32; typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; typedef u32 dma_addr_t; typedef unsigned long phys_addr_t; typedef unsigned long phys_size_t; # 30 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/cpu.h" 2 struct gpmc_cs { u32 config1; u32 config2; u32 config3; u32 config4; u32 config5; u32 config6; u32 config7; u32 nand_cmd; u32 nand_adr; u32 nand_dat; u8 res[8]; }; struct gpmc { u8 res1[0x10]; u32 sysconfig; u8 res2[0x4]; u32 irqstatus; u32 irqenable; u8 res3[0x20]; u32 timeout_control; u8 res4[0xC]; u32 config; u32 status; u8 res5[0x8]; struct gpmc_cs cs[8]; u8 res6[0x14]; u32 ecc_config; u32 ecc_control; u32 ecc_size_config; u32 ecc1_result; u32 ecc2_result; u32 ecc3_result; u32 ecc4_result; u32 ecc5_result; u32 ecc6_result; u32 ecc7_result; u32 ecc8_result; u32 ecc9_result; }; extern struct gpmc *gpmc_cfg; struct gptimer { u32 tidr; u8 res[0xc]; u32 tiocp_cfg; u32 tistat; u32 tisr; u32 tier; u32 twer; u32 tclr; u32 tcrr; u32 tldr; u32 ttgr; u32 twpc; u32 tmar; u32 tcar1; u32 tcicr; u32 tcar2; }; struct ctrl_id { u32 die_id_0; u32 idcode; u32 die_id_1; u32 die_id_2; u32 die_id_3; u32 prod_id_0; u32 prod_id_1; }; # 118 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/cpu.h" struct watchdog { u8 res1[0x34]; u32 wwps; u8 res2[0x10]; u32 wspr; }; # 42 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/omap4.h" 1 # 137 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/omap4.h" struct s32ktimer { unsigned char res[0x10]; unsigned int s32k_cr; }; struct omap4_sys_ctrl_regs { unsigned int pad1[129]; unsigned int control_id_code; unsigned int pad11[22]; unsigned int control_std_fuse_opp_bgap; unsigned int pad2[47]; unsigned int control_ldosram_iva_voltage_ctrl; unsigned int control_ldosram_mpu_voltage_ctrl; unsigned int control_ldosram_core_voltage_ctrl; unsigned int pad3[260341]; unsigned int control_efuse_1; unsigned int control_efuse_2; }; struct control_lpddr2io_regs { unsigned int control_lpddr2io1_0; unsigned int control_lpddr2io1_1; unsigned int control_lpddr2io1_2; unsigned int control_lpddr2io1_3; unsigned int control_lpddr2io2_0; unsigned int control_lpddr2io2_1; unsigned int control_lpddr2io2_2; unsigned int control_lpddr2io2_3; }; # 43 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_common.h" 2 # 126 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_common.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config_cmd_default.h" 1 # 127 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_common.h" 2 # 65 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/configs/omap4_panda.h" 2 # 6 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/config.h" 1 # 6 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config.h" 2 # 38 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm-offsets.h" 1 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/generated/generic-asm-offsets.h" 1 # 4 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm-offsets.h" 2 # 39 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/bitops.h" 1 # 12 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/bitops.h" static inline int generic_ffs(int x) { int r = 1; if (!x) return 0; if (!(x & 0xffff)) { x >>= 16; r += 16; } if (!(x & 0xff)) { x >>= 8; r += 8; } if (!(x & 0xf)) { x >>= 4; r += 4; } if (!(x & 3)) { x >>= 2; r += 2; } if (!(x & 1)) { x >>= 1; r += 1; } return r; } # 48 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/bitops.h" static inline int generic_fls(int x) { int r = 32; if (!x) return 0; if (!(x & 0xffff0000u)) { x <<= 16; r -= 16; } if (!(x & 0xff000000u)) { x <<= 8; r -= 8; } if (!(x & 0xf0000000u)) { x <<= 4; r -= 4; } if (!(x & 0xc0000000u)) { x <<= 2; r -= 2; } if (!(x & 0x80000000u)) { x <<= 1; r -= 1; } return r; } static inline unsigned int generic_hweight32(unsigned int w) { unsigned int res = (w & 0x55555555) + ((w >> 1) & 0x55555555); res = (res & 0x33333333) + ((res >> 2) & 0x33333333); res = (res & 0x0F0F0F0F) + ((res >> 4) & 0x0F0F0F0F); res = (res & 0x00FF00FF) + ((res >> 8) & 0x00FF00FF); return (res & 0x0000FFFF) + ((res >> 16) & 0x0000FFFF); } static inline unsigned int generic_hweight16(unsigned int w) { unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555); res = (res & 0x3333) + ((res >> 2) & 0x3333); res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F); return (res & 0x00FF) + ((res >> 8) & 0x00FF); } static inline unsigned int generic_hweight8(unsigned int w) { unsigned int res = (w & 0x55) + ((w >> 1) & 0x55); res = (res & 0x33) + ((res >> 2) & 0x33); return (res & 0x0F) + ((res >> 4) & 0x0F); } # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/bitops.h" 1 # 20 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/bitops.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/proc/system.h" 1 # 13 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/proc/system.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/config.h" 1 # 14 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/proc/system.h" 2 # 128 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/proc/system.h" static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) { extern void __bad_xchg(volatile void *, int); unsigned long ret; switch (size) { # 152 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/proc/system.h" case 1: __asm__ __volatile__ ("swpb %0, %1, [%2]" : "=&r" (ret) : "r" (x), "r" (ptr) : "memory"); break; case 4: __asm__ __volatile__ ("swp %0, %1, [%2]" : "=&r" (ret) : "r" (x), "r" (ptr) : "memory"); break; default: __bad_xchg(ptr, size), ret = 0; } return ret; } # 21 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/bitops.h" 2 extern void set_bit(int nr, volatile void * addr); extern void clear_bit(int nr, volatile void * addr); extern void change_bit(int nr, volatile void * addr); static inline void __change_bit(int nr, volatile void *addr) { unsigned long mask = (1UL << ((nr) % 32)); unsigned long *p = ((unsigned long *)addr) + ((nr) / 32); *p ^= mask; } static inline int __test_and_set_bit(int nr, volatile void *addr) { unsigned long mask = (1UL << ((nr) % 32)); unsigned long *p = ((unsigned long *)addr) + ((nr) / 32); unsigned long old = *p; *p = old | mask; return (old & mask) != 0; } static inline int test_and_set_bit(int nr, volatile void * addr) { unsigned long flags; int out; ({ unsigned long temp; __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory"); }); out = __test_and_set_bit(nr, addr); __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory"); return out; } static inline int __test_and_clear_bit(int nr, volatile void *addr) { unsigned long mask = (1UL << ((nr) % 32)); unsigned long *p = ((unsigned long *)addr) + ((nr) / 32); unsigned long old = *p; *p = old & ~mask; return (old & mask) != 0; } static inline int test_and_clear_bit(int nr, volatile void * addr) { unsigned long flags; int out; ({ unsigned long temp; __asm__ __volatile__( "mrs %0, cpsr @ local_irq_save\n" " orr %1, %0, #128\n" " msr cpsr_c, %1" : "=r" (flags), "=r" (temp) : : "memory"); }); out = __test_and_clear_bit(nr, addr); __asm__ __volatile__( "msr cpsr_c, %0 @ local_irq_restore\n" : : "r" (flags) : "memory"); return out; } extern int test_and_change_bit(int nr, volatile void * addr); static inline int __test_and_change_bit(int nr, volatile void *addr) { unsigned long mask = (1UL << ((nr) % 32)); unsigned long *p = ((unsigned long *)addr) + ((nr) / 32); unsigned long old = *p; *p = old ^ mask; return (old & mask) != 0; } extern int find_first_zero_bit(void * addr, unsigned size); extern int find_next_zero_bit(void * addr, int size, int offset); static inline int test_bit(int nr, const void * addr) { return ((unsigned char *) addr)[nr >> 3] & (1U << (nr & 7)); } static inline int __ilog2(unsigned int x) { return generic_fls(x) - 1; } static inline unsigned long ffz(unsigned long word) { int k; word = ~word; k = 31; if (word & 0x0000ffff) { k -= 16; word <<= 16; } if (word & 0x00ff0000) { k -= 8; word <<= 8; } if (word & 0x0f000000) { k -= 4; word <<= 4; } if (word & 0x30000000) { k -= 2; word <<= 2; } if (word & 0x40000000) { k -= 1; } return k; } # 111 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/bitops.h" 2 # 139 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/bitops.h" static inline void generic_set_bit(int nr, volatile unsigned long *addr) { unsigned long mask = (1UL << ((nr) % 32)); unsigned long *p = ((unsigned long *)addr) + ((nr) / 32); *p |= mask; } static inline void generic_clear_bit(int nr, volatile unsigned long *addr) { unsigned long mask = (1UL << ((nr) % 32)); unsigned long *p = ((unsigned long *)addr) + ((nr) / 32); *p &= ~mask; } # 40 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/types.h" 1 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/posix_types.h" 1 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/stddef.h" 1 # 12 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/stddef.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/types.h" 1 # 13 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/stddef.h" 2 # 5 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/posix_types.h" 2 # 36 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/posix_types.h" typedef struct { unsigned long fds_bits [(1024/(8 * sizeof(unsigned long)))]; } __kernel_fd_set; typedef void (*__kernel_sighandler_t)(int); typedef int __kernel_key_t; # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/posix_types.h" 1 # 22 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/posix_types.h" typedef unsigned short __kernel_dev_t; typedef unsigned long __kernel_ino_t; typedef unsigned short __kernel_mode_t; typedef unsigned short __kernel_nlink_t; typedef long __kernel_off_t; typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; typedef long __kernel_time_t; typedef long __kernel_suseconds_t; typedef long __kernel_clock_t; typedef int __kernel_daddr_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef unsigned short __kernel_old_uid_t; typedef unsigned short __kernel_old_gid_t; typedef long long __kernel_loff_t; typedef struct { int val[2]; } __kernel_fsid_t; # 47 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/posix_types.h" 2 # 9 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/types.h" 2 typedef __kernel_fd_set fd_set; typedef __kernel_dev_t dev_t; typedef __kernel_ino_t ino_t; typedef __kernel_mode_t mode_t; typedef __kernel_nlink_t nlink_t; typedef __kernel_off_t off_t; typedef __kernel_pid_t pid_t; typedef __kernel_daddr_t daddr_t; typedef __kernel_key_t key_t; typedef __kernel_suseconds_t suseconds_t; typedef __kernel_uid32_t uid_t; typedef __kernel_gid32_t gid_t; typedef __kernel_uid16_t uid16_t; typedef __kernel_gid16_t gid16_t; # 45 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/types.h" typedef __kernel_loff_t loff_t; # 54 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/types.h" typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef __kernel_ptrdiff_t ptrdiff_t; typedef __kernel_time_t time_t; typedef __kernel_clock_t clock_t; typedef __kernel_caddr_t caddr_t; typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef unsigned char unchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; typedef __u8 u_int8_t; typedef __s8 int8_t; typedef __u16 u_int16_t; typedef __s16 int16_t; typedef __u32 u_int32_t; typedef __s32 int32_t; typedef __u8 uint8_t; typedef __u16 uint16_t; typedef __u32 uint32_t; typedef __u64 uint64_t; typedef __u64 u_int64_t; typedef __s64 int64_t; # 133 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/types.h" typedef __u16 __le16; typedef __u16 __be16; typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; typedef __u16 __sum16; typedef __u32 __wsum; typedef unsigned gfp_t; struct ustat { __kernel_daddr_t f_tfree; __kernel_ino_t f_tinode; char f_fname[6]; char f_fpack[6]; }; # 41 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/string.h" 1 # 11 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/string.h" extern char * ___strtok; extern char * strpbrk(const char *,const char *); extern char * strtok(char *,const char *); extern char * strsep(char **,const char *); extern __kernel_size_t strspn(const char *,const char *); # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/string.h" 1 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config.h" 1 # 5 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/string.h" 2 extern char * strrchr(const char * s, int c); extern char * strchr(const char * s, int c); extern void * memcpy(void *, const void *, __kernel_size_t); extern void * memmove(void *, const void *, __kernel_size_t); extern void * memchr(const void *, int, __kernel_size_t); extern void * memset(void *, int, __kernel_size_t); # 50 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/string.h" extern void memzero(void *ptr, __kernel_size_t n); # 22 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/string.h" 2 extern char * strcpy(char *,const char *); extern char * strncpy(char *,const char *, __kernel_size_t); extern char * strcat(char *, const char *); extern char * strncat(char *, const char *, __kernel_size_t); extern int strcmp(const char *,const char *); extern int strncmp(const char *,const char *,__kernel_size_t); extern char * strchr(const char *,int); extern char * strrchr(const char *,int); extern char * strstr(const char *,const char *); extern __kernel_size_t strlen(const char *); extern __kernel_size_t strnlen(const char *,__kernel_size_t); extern char * strdup(const char *); extern char * strswab(const char *); extern void * memset(void *,int,__kernel_size_t); extern void * memcpy(void *,const void *,__kernel_size_t); extern void * memmove(void *,const void *,__kernel_size_t); extern void * memscan(void *,int,__kernel_size_t); extern int memcmp(const void *,const void *,__kernel_size_t); extern void * memchr(const void *,int,__kernel_size_t); # 42 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/ptrace.h" 1 # 14 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/ptrace.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/proc/ptrace.h" 1 # 41 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/proc/ptrace.h" struct pt_regs { long uregs[18]; }; # 91 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/proc/ptrace.h" static inline int valid_user_regs(struct pt_regs *regs) { if ((regs->uregs[16] & 0xf) == 0 && (regs->uregs[16] & (0x40|0x80)) == 0) return 1; regs->uregs[16] &= ((1 << 28)|(1 << 29)|(1 << 30)|(1 << 31)|0x10); return 0; } # 15 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/ptrace.h" 2 # 24 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/ptrace.h" extern void show_regs(struct pt_regs *); # 43 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/usr/lib/gcc/arm-linux-gnueabi/4.6.1/include/stdarg.h" 1 3 4 # 40 "/usr/lib/gcc/arm-linux-gnueabi/4.6.1/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 102 "/usr/lib/gcc/arm-linux-gnueabi/4.6.1/include/stdarg.h" 3 4 typedef __gnuc_va_list va_list; # 44 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 115 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/part.h" 1 # 26 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/part.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/ide.h" 1 # 46 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/ide.h" typedef ulong lbaint_t; void ide_init(void); ulong ide_read(int device, lbaint_t blknr, ulong blkcnt, void *buffer); ulong ide_write(int device, lbaint_t blknr, ulong blkcnt, const void *buffer); # 27 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/part.h" 2 typedef struct block_dev_desc { int if_type; int dev; unsigned char part_type; unsigned char target; unsigned char lun; unsigned char type; unsigned char removable; lbaint_t lba; unsigned long blksz; char vendor [40+1]; char product[20+1]; char revision[8+1]; unsigned long (*block_read)(int dev, unsigned long start, lbaint_t blkcnt, void *buffer); unsigned long (*block_write)(int dev, unsigned long start, lbaint_t blkcnt, const void *buffer); unsigned long (*block_erase)(int dev, unsigned long start, lbaint_t blkcnt); void *priv; }block_dev_desc_t; # 90 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/part.h" typedef struct disk_partition { ulong start; ulong size; ulong blksz; uchar name[32]; uchar type[32]; } disk_partition_t; block_dev_desc_t* get_dev(char* ifname, int dev); block_dev_desc_t* ide_get_dev(int dev); block_dev_desc_t* sata_get_dev(int dev); block_dev_desc_t* scsi_get_dev(int dev); block_dev_desc_t* usb_stor_get_dev(int dev); block_dev_desc_t* mmc_get_dev(int dev); block_dev_desc_t* systemace_get_dev(int dev); block_dev_desc_t* mg_disk_get_dev(int dev); int get_partition_info (block_dev_desc_t * dev_desc, int part, disk_partition_t *info); void print_part (block_dev_desc_t *dev_desc); void init_part (block_dev_desc_t *dev_desc); void dev_print(block_dev_desc_t *dev_desc); # 140 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/part.h" int get_partition_info_dos (block_dev_desc_t * dev_desc, int part, disk_partition_t *info); void print_part_dos (block_dev_desc_t *dev_desc); int test_part_dos (block_dev_desc_t *dev_desc); # 116 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/flash.h" 1 # 117 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" 1 # 36 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/compiler.h" 1 # 1 "/usr/lib/gcc/arm-linux-gnueabi/4.6.1/include/stddef.h" 1 3 4 # 324 "/usr/lib/gcc/arm-linux-gnueabi/4.6.1/include/stddef.h" 3 4 typedef unsigned int wchar_t; # 9 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/compiler.h" 2 # 112 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/compiler.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/byteorder.h" 1 # 29 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/byteorder.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/little_endian.h" 1 # 12 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/little_endian.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/swab.h" 1 # 99 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/swab.h" static __inline__ __attribute__((const)) __u16 __fswab16(__u16 x) { return ((__u16)( (((__u16)(x) & (__u16)0x00ffU) << 8) | (((__u16)(x) & (__u16)0xff00U) >> 8) )); } static __inline__ __u16 __swab16p(__u16 *x) { return (__builtin_constant_p((__u16)(*(x))) ? ((__u16)( (((__u16)((*(x))) & (__u16)0x00ffU) << 8) | (((__u16)((*(x))) & (__u16)0xff00U) >> 8) )) : __fswab16((*(x)))); } static __inline__ void __swab16s(__u16 *addr) { do { *(addr) = __swab16p((addr)); } while (0); } static __inline__ __attribute__((const)) __u32 __fswab32(__u32 x) { return ((__u32)( (((__u32)(x) & (__u32)0x000000ffUL) << 24) | (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(x) & (__u32)0xff000000UL) >> 24) )); } static __inline__ __u32 __swab32p(__u32 *x) { return (__builtin_constant_p((__u32)(*(x))) ? ((__u32)( (((__u32)((*(x))) & (__u32)0x000000ffUL) << 24) | (((__u32)((*(x))) & (__u32)0x0000ff00UL) << 8) | (((__u32)((*(x))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((*(x))) & (__u32)0xff000000UL) >> 24) )) : __fswab32((*(x)))); } static __inline__ void __swab32s(__u32 *addr) { do { *(addr) = __swab32p((addr)); } while (0); } static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x) { __u32 h = x >> 32; __u32 l = x & ((1ULL<<32)-1); return (((__u64)(__builtin_constant_p((__u32)(l)) ? ((__u32)( (((__u32)((l)) & (__u32)0x000000ffUL) << 24) | (((__u32)((l)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((l)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((l)) & (__u32)0xff000000UL) >> 24) )) : __fswab32((l)))) << 32) | ((__u64)((__builtin_constant_p((__u32)(h)) ? ((__u32)( (((__u32)((h)) & (__u32)0x000000ffUL) << 24) | (((__u32)((h)) & (__u32)0x0000ff00UL) << 8) | (((__u32)((h)) & (__u32)0x00ff0000UL) >> 8) | (((__u32)((h)) & (__u32)0xff000000UL) >> 24) )) : __fswab32((h))))); } static __inline__ __u64 __swab64p(__u64 *x) { return (__builtin_constant_p((__u64)(*(x))) ? ((__u64)( (__u64)(((__u64)((*(x))) & (__u64)0x00000000000000ffULL) << 56) | (__u64)(((__u64)((*(x))) & (__u64)0x000000000000ff00ULL) << 40) | (__u64)(((__u64)((*(x))) & (__u64)0x0000000000ff0000ULL) << 24) | (__u64)(((__u64)((*(x))) & (__u64)0x00000000ff000000ULL) << 8) | (__u64)(((__u64)((*(x))) & (__u64)0x000000ff00000000ULL) >> 8) | (__u64)(((__u64)((*(x))) & (__u64)0x0000ff0000000000ULL) >> 24) | (__u64)(((__u64)((*(x))) & (__u64)0x00ff000000000000ULL) >> 40) | (__u64)(((__u64)((*(x))) & (__u64)0xff00000000000000ULL) >> 56) )) : __fswab64((*(x)))); } static __inline__ void __swab64s(__u64 *addr) { do { *(addr) = __swab64p((addr)); } while (0); } # 13 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/little_endian.h" 2 # 67 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/little_endian.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/generic.h" 1 # 150 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/generic.h" extern __u32 ntohl(__u32); extern __u32 htonl(__u32); extern unsigned short int ntohs(unsigned short int); extern unsigned short int htons(unsigned short int); # 68 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/linux/byteorder/little_endian.h" 2 # 30 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/byteorder.h" 2 # 113 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/compiler.h" 2 typedef unsigned int uintptr_t; # 37 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" 2 # 47 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/lmb.h" 1 # 19 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/lmb.h" struct lmb_property { phys_addr_t base; phys_size_t size; }; struct lmb_region { unsigned long cnt; phys_size_t size; struct lmb_property region[8 +1]; }; struct lmb { struct lmb_region memory; struct lmb_region reserved; }; extern struct lmb lmb; extern void lmb_init(struct lmb *lmb); extern long lmb_add(struct lmb *lmb, phys_addr_t base, phys_size_t size); extern long lmb_reserve(struct lmb *lmb, phys_addr_t base, phys_size_t size); extern phys_addr_t lmb_alloc(struct lmb *lmb, phys_size_t size, ulong align); extern phys_addr_t lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align, phys_addr_t max_addr); extern phys_addr_t __lmb_alloc_base(struct lmb *lmb, phys_size_t size, ulong align, phys_addr_t max_addr); extern int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr); extern long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size); extern void lmb_dump_all(struct lmb *lmb); static inline phys_size_t lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) { return type->region[region_nr].size; } void board_lmb_reserve(struct lmb *lmb); void arch_lmb_reserve(struct lmb *lmb); # 48 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/u-boot.h" 1 # 39 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/u-boot.h" typedef struct bd_info { int bi_baudrate; unsigned long bi_ip_addr; ulong bi_arch_number; ulong bi_boot_params; struct { ulong start; ulong size; } bi_dram[1]; } bd_t; # 49 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/command.h" 1 # 30 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/command.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/config.h" 1 # 31 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/command.h" 2 # 46 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/command.h" struct cmd_tbl_s { char *name; int maxargs; int repeatable; int (*cmd)(struct cmd_tbl_s *, int, int, char * const []); char *usage; char *help; int (*complete)(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]); }; typedef struct cmd_tbl_s cmd_tbl_t; extern cmd_tbl_t __u_boot_cmd_start; extern cmd_tbl_t __u_boot_cmd_end; int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]); cmd_tbl_t *find_cmd(const char *cmd); cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len); extern int cmd_usage(const cmd_tbl_t *cmdtp); extern int var_complete(int argc, char * const argv[], char last_char, int maxv, char *cmdv[]); extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp); # 95 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/command.h" extern int cmd_get_data_size(char* arg, int default_size); extern int do_bootd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern int do_bootm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); extern int bootm_maybe_autostart(cmd_tbl_t *cmdtp, const char *cmd); extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); # 50 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" 2 # 179 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" typedef struct image_header { uint32_t ih_magic; uint32_t ih_hcrc; uint32_t ih_time; uint32_t ih_size; uint32_t ih_load; uint32_t ih_ep; uint32_t ih_dcrc; uint8_t ih_os; uint8_t ih_arch; uint8_t ih_type; uint8_t ih_comp; uint8_t ih_name[32]; } image_header_t; typedef struct image_info { ulong start, end; ulong image_start, image_len; ulong load; uint8_t comp, type, os; } image_info_t; typedef struct bootm_headers { image_header_t *legacy_hdr_os; image_header_t legacy_hdr_os_copy; ulong legacy_hdr_valid; # 232 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" image_info_t os; ulong ep; ulong rd_start, rd_end; char *ft_addr; ulong ft_len; ulong initrd_start; ulong initrd_end; ulong cmdline_start; ulong cmdline_end; bd_t *kbd; int verify; # 259 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" int state; struct lmb lmb; } bootm_headers_t; # 294 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" typedef struct table_entry { int id; char *sname; char *lname; } table_entry_t; int get_table_entry_id(const table_entry_t *table, const char *table_name, const char *name); char *get_table_entry_name(const table_entry_t *table, char *msg, int id); const char *genimg_get_os_name (uint8_t os); const char *genimg_get_arch_name (uint8_t arch); const char *genimg_get_type_name (uint8_t type); const char *genimg_get_comp_name (uint8_t comp); int genimg_get_os_id (const char *name); int genimg_get_arch_id (const char *name); int genimg_get_type_id (const char *name); int genimg_get_comp_id (const char *name); void genimg_print_size (uint32_t size); int genimg_get_format (void *img_addr); int genimg_has_config (bootm_headers_t *images); ulong genimg_get_image (ulong img_addr); int boot_get_ramdisk (int argc, char * const argv[], bootm_headers_t *images, uint8_t arch, ulong *rd_start, ulong *rd_end); int boot_get_fdt (int flag, int argc, char * const argv[], bootm_headers_t *images, char **of_flat_tree, ulong *of_size); void boot_fdt_add_mem_rsv_regions(struct lmb *lmb, void *fdt_blob); int boot_relocate_fdt (struct lmb *lmb, char **of_flat_tree, ulong *of_size); int boot_ramdisk_high (struct lmb *lmb, ulong rd_data, ulong rd_len, ulong *initrd_start, ulong *initrd_end); # 360 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" static inline uint32_t image_get_header_size (void) { return (sizeof (image_header_t)); } static inline uint32_t image_get_magic(const image_header_t *hdr) { return (__builtin_constant_p((__u32)((hdr->ih_magic))) ? ((__u32)( (((__u32)(((hdr->ih_magic))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((hdr->ih_magic))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((hdr->ih_magic))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((hdr->ih_magic))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((hdr->ih_magic)))); } static inline uint32_t image_get_hcrc(const image_header_t *hdr) { return (__builtin_constant_p((__u32)((hdr->ih_hcrc))) ? ((__u32)( (((__u32)(((hdr->ih_hcrc))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((hdr->ih_hcrc))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((hdr->ih_hcrc))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((hdr->ih_hcrc))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((hdr->ih_hcrc)))); } static inline uint32_t image_get_time(const image_header_t *hdr) { return (__builtin_constant_p((__u32)((hdr->ih_time))) ? ((__u32)( (((__u32)(((hdr->ih_time))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((hdr->ih_time))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((hdr->ih_time))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((hdr->ih_time))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((hdr->ih_time)))); } static inline uint32_t image_get_size(const image_header_t *hdr) { return (__builtin_constant_p((__u32)((hdr->ih_size))) ? ((__u32)( (((__u32)(((hdr->ih_size))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((hdr->ih_size))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((hdr->ih_size))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((hdr->ih_size))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((hdr->ih_size)))); } static inline uint32_t image_get_load(const image_header_t *hdr) { return (__builtin_constant_p((__u32)((hdr->ih_load))) ? ((__u32)( (((__u32)(((hdr->ih_load))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((hdr->ih_load))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((hdr->ih_load))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((hdr->ih_load))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((hdr->ih_load)))); } static inline uint32_t image_get_ep(const image_header_t *hdr) { return (__builtin_constant_p((__u32)((hdr->ih_ep))) ? ((__u32)( (((__u32)(((hdr->ih_ep))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((hdr->ih_ep))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((hdr->ih_ep))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((hdr->ih_ep))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((hdr->ih_ep)))); } static inline uint32_t image_get_dcrc(const image_header_t *hdr) { return (__builtin_constant_p((__u32)((hdr->ih_dcrc))) ? ((__u32)( (((__u32)(((hdr->ih_dcrc))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((hdr->ih_dcrc))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((hdr->ih_dcrc))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((hdr->ih_dcrc))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((hdr->ih_dcrc)))); } static inline uint8_t image_get_os(const image_header_t *hdr) { return hdr->ih_os; } static inline uint8_t image_get_arch(const image_header_t *hdr) { return hdr->ih_arch; } static inline uint8_t image_get_type(const image_header_t *hdr) { return hdr->ih_type; } static inline uint8_t image_get_comp(const image_header_t *hdr) { return hdr->ih_comp; } static inline char *image_get_name (const image_header_t *hdr) { return (char *)hdr->ih_name; } static inline uint32_t image_get_data_size (const image_header_t *hdr) { return image_get_size (hdr); } # 409 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" static inline ulong image_get_data (const image_header_t *hdr) { return ((ulong)hdr + image_get_header_size ()); } static inline uint32_t image_get_image_size (const image_header_t *hdr) { return (image_get_size (hdr) + image_get_header_size ()); } static inline ulong image_get_image_end (const image_header_t *hdr) { return ((ulong)hdr + image_get_image_size (hdr)); } static inline void image_set_magic(image_header_t *hdr, uint32_t val) { hdr->ih_magic = (__builtin_constant_p((__u32)((val))) ? ((__u32)( (((__u32)(((val))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((val))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((val))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((val))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((val)))); } static inline void image_set_hcrc(image_header_t *hdr, uint32_t val) { hdr->ih_hcrc = (__builtin_constant_p((__u32)((val))) ? ((__u32)( (((__u32)(((val))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((val))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((val))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((val))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((val)))); } static inline void image_set_time(image_header_t *hdr, uint32_t val) { hdr->ih_time = (__builtin_constant_p((__u32)((val))) ? ((__u32)( (((__u32)(((val))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((val))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((val))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((val))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((val)))); } static inline void image_set_size(image_header_t *hdr, uint32_t val) { hdr->ih_size = (__builtin_constant_p((__u32)((val))) ? ((__u32)( (((__u32)(((val))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((val))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((val))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((val))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((val)))); } static inline void image_set_load(image_header_t *hdr, uint32_t val) { hdr->ih_load = (__builtin_constant_p((__u32)((val))) ? ((__u32)( (((__u32)(((val))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((val))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((val))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((val))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((val)))); } static inline void image_set_ep(image_header_t *hdr, uint32_t val) { hdr->ih_ep = (__builtin_constant_p((__u32)((val))) ? ((__u32)( (((__u32)(((val))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((val))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((val))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((val))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((val)))); } static inline void image_set_dcrc(image_header_t *hdr, uint32_t val) { hdr->ih_dcrc = (__builtin_constant_p((__u32)((val))) ? ((__u32)( (((__u32)(((val))) & (__u32)0x000000ffUL) << 24) | (((__u32)(((val))) & (__u32)0x0000ff00UL) << 8) | (((__u32)(((val))) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(((val))) & (__u32)0xff000000UL) >> 24) )) : __fswab32(((val)))); } static inline void image_set_os(image_header_t *hdr, uint8_t val) { hdr->ih_os = val; } static inline void image_set_arch(image_header_t *hdr, uint8_t val) { hdr->ih_arch = val; } static inline void image_set_type(image_header_t *hdr, uint8_t val) { hdr->ih_type = val; } static inline void image_set_comp(image_header_t *hdr, uint8_t val) { hdr->ih_comp = val; } static inline void image_set_name (image_header_t *hdr, const char *name) { strncpy (image_get_name (hdr), name, 32); } int image_check_hcrc (const image_header_t *hdr); int image_check_dcrc (const image_header_t *hdr); int getenv_yesno (char *var); ulong getenv_bootm_low(void); phys_size_t getenv_bootm_size(void); phys_size_t getenv_bootm_mapsize(void); void memmove_wd (void *to, void *from, size_t len, ulong chunksz); static inline int image_check_magic (const image_header_t *hdr) { return (image_get_magic (hdr) == 0x27051956); } static inline int image_check_type (const image_header_t *hdr, uint8_t type) { return (image_get_type (hdr) == type); } static inline int image_check_arch (const image_header_t *hdr, uint8_t arch) { return (image_get_arch (hdr) == arch); } static inline int image_check_os (const image_header_t *hdr, uint8_t os) { return (image_get_os (hdr) == os); } ulong image_multi_count (const image_header_t *hdr); void image_multi_getimg (const image_header_t *hdr, ulong idx, ulong *data, ulong *len); void image_print_contents (const void *hdr); static inline int image_check_target_arch (const image_header_t *hdr) { if (!image_check_arch (hdr, 2)) # 512 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/image.h" return 0; return 1; } # 118 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 142 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" void __assert_fail(const char *assertion, const char *file, unsigned line, const char *function); # 164 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" typedef void (interrupt_handler_t)(void *); # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/global_data.h" 1 # 36 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/global_data.h" typedef struct global_data { bd_t *bd; unsigned long flags; unsigned long baudrate; unsigned long have_console; unsigned long env_addr; unsigned long env_valid; unsigned long fb_base; # 58 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/global_data.h" unsigned long timer_rate_hz; unsigned long tbl; unsigned long tbu; unsigned long long timer_reset_value; unsigned long lastinc; unsigned long relocaddr; phys_size_t ram_size; unsigned long mon_len; unsigned long irq_sp; unsigned long start_addr_sp; unsigned long reloc_off; unsigned long tlb_addr; void **jt; char env_buf[32]; } gd_t; # 168 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 244 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" void hang (void) __attribute__ ((noreturn)); int timer_init(void); 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); void main_loop (void); int run_command (const char *cmd, int flag); int run_command2(const char *cmd, int flag); int readline (const char *const prompt); int readline_into_buffer (const char *const prompt, char * buffer); int parse_line (char *, char *[]); void init_cmd_timeout(void); void reset_cmd_timeout(void); int abortboot(int bootdelay); void board_init_f (ulong) __attribute__ ((noreturn)); void board_init_r (gd_t *, ulong) __attribute__ ((noreturn)); int checkboard (void); int checkflash (void); int checkdram (void); int last_stage_init(void); extern ulong monitor_flash_len; int mac_read_from_eeprom(void); void flash_perror (int); int source (ulong addr, const char *fit_uname); extern ulong load_addr; void doc_probe(unsigned long physadr); int do_tftpb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); int env_init (void); void env_relocate (void); int envmatch (uchar *, int); char *getenv (const char *); int getenv_f (const char *name, char *buf, unsigned len); int saveenv (void); int setenv (const char *, const char *); # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/mach-types.h" 1 # 11 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/mach-types.h" extern unsigned int __machine_arch_type; # 308 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/setup.h" 1 # 36 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/setup.h" struct param_struct { union { struct { unsigned long page_size; unsigned long nr_pages; unsigned long ramdisk_size; unsigned long flags; unsigned long rootdev; unsigned long video_num_cols; unsigned long video_num_rows; unsigned long video_x; unsigned long video_y; unsigned long memc_control_reg; unsigned char sounddefault; unsigned char adfsdrives; unsigned char bytes_per_char_h; unsigned char bytes_per_char_v; unsigned long pages_in_bank[4]; unsigned long pages_in_vram; unsigned long initrd_start; unsigned long initrd_size; unsigned long rd_start; unsigned long system_rev; unsigned long system_serial_low; unsigned long system_serial_high; unsigned long mem_fclk_21285; } s; char unused[256]; } u1; union { char paths[8][128]; struct { unsigned long magic; char n[1024 - sizeof(unsigned long)]; } s; } u2; char commandline[1024]; }; # 86 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/setup.h" struct tag_header { u32 size; u32 tag; }; struct tag_core { u32 flags; u32 pagesize; u32 rootdev; }; struct tag_mem32 { u32 size; u32 start; }; struct tag_videotext { u8 x; u8 y; u16 video_page; u8 video_mode; u8 video_cols; u16 video_ega_bx; u8 video_lines; u8 video_isvga; u16 video_points; }; struct tag_ramdisk { u32 flags; u32 size; u32 start; }; # 142 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/setup.h" struct tag_initrd { u32 start; u32 size; }; struct tag_serialnr { u32 low; u32 high; }; struct tag_revision { u32 rev; }; struct tag_videolfb { u16 lfb_width; u16 lfb_height; u16 lfb_depth; u16 lfb_linelength; u32 lfb_base; u32 lfb_size; u8 red_size; u8 red_pos; u8 green_size; u8 green_pos; u8 blue_size; u8 blue_pos; u8 rsvd_size; u8 rsvd_pos; }; struct tag_cmdline { char cmdline[1]; }; struct tag_acorn { u32 memc_control_reg; u32 vram_pages; u8 sounddefault; u8 adfsdrives; }; struct tag_memclk { u32 fmemclk; }; struct tag { struct tag_header hdr; union { struct tag_core core; struct tag_mem32 mem; struct tag_videotext videotext; struct tag_ramdisk ramdisk; struct tag_initrd initrd; struct tag_serialnr serialnr; struct tag_revision revision; struct tag_videolfb videolfb; struct tag_cmdline cmdline; struct tag_acorn acorn; struct tag_memclk memclk; } u; }; struct tagtable { u32 tag; int (*parse)(const struct tag *); }; # 257 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/setup.h" struct meminfo { int nr_banks; unsigned long end; struct { unsigned long start; unsigned long size; int node; } bank[8]; }; extern struct meminfo meminfo; # 309 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/u-boot-arm.h" 1 # 33 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/u-boot-arm.h" extern ulong _bss_start_ofs; extern ulong _bss_end_ofs; extern ulong _end_ofs; extern ulong IRQ_STACK_START; extern ulong FIQ_STACK_START; extern ulong _TEXT_BASE; extern ulong _datarel_start_ofs; extern ulong _datarelrolocal_start_ofs; extern ulong _datarellocal_start_ofs; extern ulong _datarelro_start_ofs; extern ulong IRQ_STACK_START_IN; int cpu_init(void); int cleanup_before_linux(void); int arch_cpu_init(void); int arch_misc_init(void); int board_init(void); int dram_init (void); void dram_init_banksize (void); void setup_serial_tag (struct tag **params); void setup_revision_tag (struct tag **params); int arch_interrupt_init (void); void reset_timer_masked (void); ulong get_timer_masked (void); void udelay_masked (unsigned long usec); # 310 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 int env_complete(char *var, int maxv, char *cmdv[], int maxsz, char *buf); int get_env_id (void); void pci_init (void); void pci_init_board(void); void pciinfo (int, int); # 343 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" int misc_init_f (void); int misc_init_r (void); void jumptable_init(void); const char *symbol_lookup(unsigned long addr, unsigned long *caddr); void api_init (void); long get_ram_size (long *, long); void reset_phy (void); void fdc_hw_init (void); void eeprom_init (void); int eeprom_probe (unsigned dev_addr, unsigned offset); int eeprom_read (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt); int eeprom_write (unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt); # 397 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" void rpxlite_init (void); # 419 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" int board_early_init_f (void); int board_late_init (void); int board_postclk_init (void); int board_early_init_r (void); void board_poweroff (void); # 434 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" uint get_pir (void); uint get_pvr (void); uint get_svr (void); uint rd_ic_cst (void); void wr_ic_cst (uint); void wr_ic_adr (uint); uint rd_dc_cst (void); void wr_dc_cst (uint); void wr_dc_adr (uint); int icache_status (void); void icache_enable (void); void icache_disable(void); int dcache_status (void); void dcache_enable (void); void dcache_disable(void); void mmu_disable(void); void relocate_code (ulong, gd_t *, ulong) __attribute__ ((noreturn)); ulong get_endaddr (void); void trap_init (ulong); # 497 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" int cpu_numcores (void); int probecpu (void); int checkcpu (void); int checkicache (void); int checkdcache (void); void upmconfig (unsigned int, unsigned int *, unsigned int); ulong get_tbclk (void); void reset_cpu (ulong addr); # 514 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" int serial_init (void); void serial_exit (void); void serial_setbrg (void); void serial_putc (const char); void serial_putc_raw(const char); void serial_puts (const char *); int serial_getc (void); int serial_tstc (void); void _serial_setbrg (const int); void _serial_putc (const char, const int); void _serial_putc_raw(const char, const int); void _serial_puts (const char *, const int); int _serial_getc (const int); int _serial_tstc (const int); int get_clocks (void); int get_clocks_866 (void); int sdram_adjust_866 (void); int adjust_sdram_tbs_8xx (void); # 574 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" ulong get_bus_freq (ulong); int get_serial_clock(void); # 611 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" int cpu_init_r (void); int interrupt_init (void); void timer_interrupt (struct pt_regs *); void external_interrupt (struct pt_regs *); void irq_install_handler(int, interrupt_handler_t *, void *); void irq_free_handler (int); void reset_timer (void); ulong get_timer (ulong base); void enable_interrupts (void); int disable_interrupts (void); int dpram_init (void); uint dpram_base(void); uint dpram_base_align(uint align); uint dpram_alloc(uint size); uint dpram_alloc_align(uint size,uint align); void bootcount_store (ulong); ulong bootcount_load (void); void mii_init (void); ulong lcd_setmem (ulong); ulong video_setmem (ulong); void enable_caches(void); void flush_cache (unsigned long, unsigned long); void flush_dcache_all(void); void flush_dcache_range(unsigned long start, unsigned long stop); void invalidate_dcache_range(unsigned long start, unsigned long stop); void invalidate_dcache_all(void); void invalidate_icache_all(void); unsigned long long get_ticks(void); void wait_ticks (unsigned long); void __udelay (unsigned long); ulong usec2ticks (unsigned long usec); ulong ticks2usec (unsigned long ticks); int init_timebase (void); int gunzip(void *, int, unsigned char *, unsigned long *); int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, int stoponerr, int offset); # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" 1 # 72 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" typedef ulong IPaddr_t; # 83 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" typedef void rxhand_f(uchar *pkt, unsigned dport, IPaddr_t sip, unsigned sport, unsigned len); typedef void thand_f(void); enum eth_state_t { ETH_STATE_INIT, ETH_STATE_PASSIVE, ETH_STATE_ACTIVE }; struct eth_device { char name[16]; unsigned char enetaddr[6]; int iobase; int state; int (*init) (struct eth_device*, bd_t*); int (*send) (struct eth_device*, volatile void* packet, int length); int (*recv) (struct eth_device*); void (*halt) (struct eth_device*); int (*write_hwaddr) (struct eth_device*); struct eth_device *next; void *priv; }; extern int eth_initialize(bd_t *bis); extern int eth_register(struct eth_device* dev); extern void eth_try_another(int first_restart); extern void eth_set_current(void); extern struct eth_device *eth_get_dev(void); extern struct eth_device *eth_get_dev_by_name(const char *devname); extern struct eth_device *eth_get_dev_by_index(int index); extern int eth_get_dev_index (void); extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr); extern int eth_getenv_enetaddr(char *name, uchar *enetaddr); extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr); # 141 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" extern int eth_getenv_enetaddr_by_index(const char *base_name, int index, uchar *enetaddr); extern int usb_eth_initialize(bd_t *bi); extern int eth_init(bd_t *bis); extern int eth_send(volatile void *packet, int length); extern int eth_rx(void); extern void eth_halt(void); extern char *eth_get_name(void); # 164 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" int eth_write_hwaddr(struct eth_device *dev, const char *base_name, int eth_number); # 181 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" typedef struct { uchar et_dest[6]; uchar et_src[6]; ushort et_protlen; uchar et_dsap; uchar et_ssap; uchar et_ctl; uchar et_snap1; uchar et_snap2; uchar et_snap3; ushort et_prot; } Ethernet_t; typedef struct { uchar vet_dest[6]; uchar vet_src[6]; ushort vet_vlan_type; ushort vet_tag; ushort vet_type; } VLAN_Ethernet_t; # 221 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" typedef struct { uchar ip_hl_v; uchar ip_tos; ushort ip_len; ushort ip_id; ushort ip_off; uchar ip_ttl; uchar ip_p; ushort ip_sum; IPaddr_t ip_src; IPaddr_t ip_dst; ushort udp_src; ushort udp_dst; ushort udp_len; ushort udp_xsum; } IP_t; # 251 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" typedef struct { ushort ar_hrd; ushort ar_pro; uchar ar_hln; uchar ar_pln; ushort ar_op; # 270 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" uchar ar_data[0]; } ARP_t; # 292 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" typedef struct icmphdr { uchar type; uchar code; ushort checksum; union { struct { ushort id; ushort sequence; } echo; ulong gateway; struct { ushort __unused; ushort mtu; } frag; } un; } ICMP_t; # 347 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" extern IPaddr_t NetOurGatewayIP; extern IPaddr_t NetOurSubnetMask; extern IPaddr_t NetOurDNSIP; extern char NetOurNISDomain[32]; extern char NetOurHostName[32]; extern char NetOurRootPath[64]; extern ushort NetBootFileSize; extern ulong NetBootFileXferSize; extern uchar NetOurEther[6]; extern uchar NetServerEther[6]; extern IPaddr_t NetOurIP; extern IPaddr_t NetServerIP; extern volatile uchar * NetTxPacket; extern volatile uchar * NetRxPackets[4]; extern volatile uchar * NetRxPacket; extern int NetRxPacketLen; extern unsigned NetIPID; extern uchar NetBcastAddr[6]; extern uchar NetEtherNullAddr[6]; extern ushort NetOurVLAN; extern ushort NetOurNativeVLAN; extern uchar NetCDPAddr[6]; extern ushort CDPNativeVLAN; extern ushort CDPApplianceVLAN; extern int NetState; extern int NetRestartWrap; typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP, TFTPSRV } proto_t; extern char BootFile[128]; extern IPaddr_t NetPingIP; # 417 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" extern int NetLoop(proto_t); extern void NetStop(void); extern void NetStartAgain(void); extern int NetEthHdrSize(void); extern int NetSetEther(volatile uchar *, uchar *, uint); extern void NetSetIP(volatile uchar *, IPaddr_t, int, int, int); extern int NetCksumOk(uchar *, int); extern uint NetCksum(uchar *, int); extern void NetSetHandler(rxhand_f *); extern void NetSetTimeout(ulong, thand_f *); extern void NetSendPacket(volatile uchar *, int); extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int len); extern void NetReceive(volatile uchar *, int); # 459 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" static inline IPaddr_t NetReadIP(volatile void *from) { IPaddr_t ip; memcpy((void*)&ip, (void*)from, sizeof(ip)); return ip; } static inline ulong NetReadLong(ulong *from) { ulong l; memcpy((void*)&l, (void*)from, sizeof(l)); return l; } static inline void NetWriteIP(void *to, IPaddr_t ip) { memcpy(to, (void*)&ip, sizeof(ip)); } static inline void NetCopyIP(volatile void *to, void *from) { memcpy((void*)to, from, sizeof(IPaddr_t)); } static inline void NetCopyLong(ulong *to, ulong *from) { memcpy((void*)to, (void*)from, sizeof(ulong)); } static inline int is_zero_ether_addr(const u8 *addr) { return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); } # 510 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" static inline int is_multicast_ether_addr(const u8 *addr) { return (0x01 & addr[0]); } static inline int is_broadcast_ether_addr(const u8 *addr) { return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff; } # 535 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/net.h" static inline int is_valid_ether_addr(const u8 *addr) { return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); } extern void ip_to_string (IPaddr_t x, char *s); extern IPaddr_t string_to_ip(const char *s); extern void VLAN_to_string (ushort x, char *s); extern ushort string_to_VLAN(const char *s); extern ushort getenv_VLAN(char *); extern void copy_filename (char *dst, const char *src, int size); extern unsigned int random_port(void); # 674 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 static inline IPaddr_t getenv_IPaddr (char *var) { return (string_to_ip(getenv(var))); } void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); int strcmp_compar(const void *, const void *); void udelay (unsigned long); void uuid_str_to_bin(const char *uuid, unsigned char *out); int uuid_str_valid(const char *uuid); ulong simple_strtoul(const char *cp,char **endp,unsigned int base); int strict_strtoul(const char *cp, unsigned int base, unsigned long *res); unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base); long simple_strtol(const char *cp,char **endp,unsigned int base); void panic(const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2), noreturn)); int sprintf(char * buf, const char *fmt, ...) __attribute__ ((format (__printf__, 2, 3))); int vsprintf(char *buf, const char *fmt, va_list args); char * strmhz(char *buf, unsigned long hz); # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/u-boot/crc.h" 1 # 29 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/u-boot/crc.h" uint32_t crc32 (uint32_t, const unsigned char *, uint); uint32_t crc32_wd (uint32_t, const unsigned char *, uint, uint); uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint); # 707 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" 2 int console_init_f(void); int console_init_r(void); int console_assign(int file, const char *devname); int ctrlc (void); int had_ctrlc (void); void clear_ctrlc (void); int disable_ctrlc (int); int serial_printf (const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2))); int getc(void); int tstc(void); void putc(const char c); void puts(const char *s); int printf(const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2))); int vprintf(const char *fmt, va_list args); # 747 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" int fprintf(int file, const char *fmt, ...) __attribute__ ((format (__printf__, 2, 3))); void fputs(int file, const char *s); void fputc(int file, const char c); int ftstc(int file); int fgetc(int file); # 761 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/common.h" int pcmcia_init (void); void show_boot_progress(int val); # 33 "clocks.c" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/omap_common.h" 1 # 37 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/omap_common.h" void preloader_console_init(void); # 53 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/omap_common.h" u32 omap_boot_device(void); u32 omap_boot_mode(void); # 34 "clocks.c" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/gpio.h" 1 # 25 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/gpio.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/gpio.h" 1 # 41 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/gpio.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/omap_gpio.h" 1 # 43 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/omap_gpio.h" struct gpio_bank { void *base; int method; }; extern const struct gpio_bank *const omap_gpio_bank; # 42 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/gpio.h" 2 # 26 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/gpio.h" 2 int gpio_request(int gp, const char *label); void gpio_free(int gp); void gpio_toggle_value(int gp); int gpio_direction_input(int gp); int gpio_direction_output(int gp, int value); int gpio_get_value(int gp); void gpio_set_value(int gp, int value); # 35 "clocks.c" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/clocks.h" 1 # 41 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/clocks.h" struct omap4_prcm_regs { u32 cm_clksel_core; u32 pad001[1]; u32 cm_clksel_abe; u32 pad002[1]; u32 cm_dll_ctrl; u32 pad003[3]; u32 cm_clkmode_dpll_core; u32 cm_idlest_dpll_core; u32 cm_autoidle_dpll_core; u32 cm_clksel_dpll_core; u32 cm_div_m2_dpll_core; u32 cm_div_m3_dpll_core; u32 cm_div_m4_dpll_core; u32 cm_div_m5_dpll_core; u32 cm_div_m6_dpll_core; u32 cm_div_m7_dpll_core; u32 cm_ssc_deltamstep_dpll_core; u32 cm_ssc_modfreqdiv_dpll_core; u32 cm_emu_override_dpll_core; u32 pad004[3]; u32 cm_clkmode_dpll_mpu; u32 cm_idlest_dpll_mpu; u32 cm_autoidle_dpll_mpu; u32 cm_clksel_dpll_mpu; u32 cm_div_m2_dpll_mpu; u32 pad005[5]; u32 cm_ssc_deltamstep_dpll_mpu; u32 cm_ssc_modfreqdiv_dpll_mpu; u32 pad006[3]; u32 cm_bypclk_dpll_mpu; u32 cm_clkmode_dpll_iva; u32 cm_idlest_dpll_iva; u32 cm_autoidle_dpll_iva; u32 cm_clksel_dpll_iva; u32 pad007[2]; u32 cm_div_m4_dpll_iva; u32 cm_div_m5_dpll_iva; u32 pad008[2]; u32 cm_ssc_deltamstep_dpll_iva; u32 cm_ssc_modfreqdiv_dpll_iva; u32 pad009[3]; u32 cm_bypclk_dpll_iva; u32 cm_clkmode_dpll_abe; u32 cm_idlest_dpll_abe; u32 cm_autoidle_dpll_abe; u32 cm_clksel_dpll_abe; u32 cm_div_m2_dpll_abe; u32 cm_div_m3_dpll_abe; u32 pad010[4]; u32 cm_ssc_deltamstep_dpll_abe; u32 cm_ssc_modfreqdiv_dpll_abe; u32 pad011[4]; u32 cm_clkmode_dpll_ddrphy; u32 cm_idlest_dpll_ddrphy; u32 cm_autoidle_dpll_ddrphy; u32 cm_clksel_dpll_ddrphy; u32 cm_div_m2_dpll_ddrphy; u32 pad012[1]; u32 cm_div_m4_dpll_ddrphy; u32 cm_div_m5_dpll_ddrphy; u32 cm_div_m6_dpll_ddrphy; u32 pad013[1]; u32 cm_ssc_deltamstep_dpll_ddrphy; u32 pad014[5]; u32 cm_shadow_freq_config1; u32 pad0141[47]; u32 cm_mpu_mpu_clkctrl; u32 pad015[55]; u32 cm_dsp_clkstctrl; u32 pad016[7]; u32 cm_dsp_dsp_clkctrl; u32 pad017[55]; u32 cm1_abe_clkstctrl; u32 pad018[7]; u32 cm1_abe_l4abe_clkctrl; u32 pad019[1]; u32 cm1_abe_aess_clkctrl; u32 pad020[1]; u32 cm1_abe_pdm_clkctrl; u32 pad021[1]; u32 cm1_abe_dmic_clkctrl; u32 pad022[1]; u32 cm1_abe_mcasp_clkctrl; u32 pad023[1]; u32 cm1_abe_mcbsp1_clkctrl; u32 pad024[1]; u32 cm1_abe_mcbsp2_clkctrl; u32 pad025[1]; u32 cm1_abe_mcbsp3_clkctrl; u32 pad026[1]; u32 cm1_abe_slimbus_clkctrl; u32 pad027[1]; u32 cm1_abe_timer5_clkctrl; u32 pad028[1]; u32 cm1_abe_timer6_clkctrl; u32 pad029[1]; u32 cm1_abe_timer7_clkctrl; u32 pad030[1]; u32 cm1_abe_timer8_clkctrl; u32 pad031[1]; u32 cm1_abe_wdt3_clkctrl; u32 pad032[3805]; u32 cm_clksel_mpu_m3_iss_root; u32 cm_clksel_usb_60mhz; u32 cm_scale_fclk; u32 pad033[1]; u32 cm_core_dvfs_perf1; u32 cm_core_dvfs_perf2; u32 cm_core_dvfs_perf3; u32 cm_core_dvfs_perf4; u32 pad034[1]; u32 cm_core_dvfs_current; u32 cm_iva_dvfs_perf_tesla; u32 cm_iva_dvfs_perf_ivahd; u32 cm_iva_dvfs_perf_abe; u32 pad035[1]; u32 cm_iva_dvfs_current; u32 pad036[1]; u32 cm_clkmode_dpll_per; u32 cm_idlest_dpll_per; u32 cm_autoidle_dpll_per; u32 cm_clksel_dpll_per; u32 cm_div_m2_dpll_per; u32 cm_div_m3_dpll_per; u32 cm_div_m4_dpll_per; u32 cm_div_m5_dpll_per; u32 cm_div_m6_dpll_per; u32 cm_div_m7_dpll_per; u32 cm_ssc_deltamstep_dpll_per; u32 cm_ssc_modfreqdiv_dpll_per; u32 cm_emu_override_dpll_per; u32 pad037[3]; u32 cm_clkmode_dpll_usb; u32 cm_idlest_dpll_usb; u32 cm_autoidle_dpll_usb; u32 cm_clksel_dpll_usb; u32 cm_div_m2_dpll_usb; u32 pad038[5]; u32 cm_ssc_deltamstep_dpll_usb; u32 cm_ssc_modfreqdiv_dpll_usb; u32 pad039[1]; u32 cm_clkdcoldo_dpll_usb; u32 pad040[2]; u32 cm_clkmode_dpll_unipro; u32 cm_idlest_dpll_unipro; u32 cm_autoidle_dpll_unipro; u32 cm_clksel_dpll_unipro; u32 cm_div_m2_dpll_unipro; u32 pad041[5]; u32 cm_ssc_deltamstep_dpll_unipro; u32 cm_ssc_modfreqdiv_dpll_unipro; u32 pad0411[324]; u32 cm_l3_1_clkstctrl; u32 pad042[1]; u32 cm_l3_1_dynamicdep; u32 pad043[5]; u32 cm_l3_1_l3_1_clkctrl; u32 pad044[55]; u32 cm_l3_2_clkstctrl; u32 pad045[1]; u32 cm_l3_2_dynamicdep; u32 pad046[5]; u32 cm_l3_2_l3_2_clkctrl; u32 pad047[1]; u32 cm_l3_2_gpmc_clkctrl; u32 pad048[1]; u32 cm_l3_2_ocmc_ram_clkctrl; u32 pad049[51]; u32 cm_mpu_m3_clkstctrl; u32 cm_mpu_m3_staticdep; u32 cm_mpu_m3_dynamicdep; u32 pad050[5]; u32 cm_mpu_m3_mpu_m3_clkctrl; u32 pad051[55]; u32 cm_sdma_clkstctrl; u32 cm_sdma_staticdep; u32 cm_sdma_dynamicdep; u32 pad052[5]; u32 cm_sdma_sdma_clkctrl; u32 pad053[55]; u32 cm_memif_clkstctrl; u32 pad054[7]; u32 cm_memif_dmm_clkctrl; u32 pad055[1]; u32 cm_memif_emif_fw_clkctrl; u32 pad056[1]; u32 cm_memif_emif_1_clkctrl; u32 pad057[1]; u32 cm_memif_emif_2_clkctrl; u32 pad058[1]; u32 cm_memif_dll_clkctrl; u32 pad059[3]; u32 cm_memif_emif_h1_clkctrl; u32 pad060[1]; u32 cm_memif_emif_h2_clkctrl; u32 pad061[1]; u32 cm_memif_dll_h_clkctrl; u32 pad062[39]; u32 cm_c2c_clkstctrl; u32 cm_c2c_staticdep; u32 cm_c2c_dynamicdep; u32 pad063[5]; u32 cm_c2c_sad2d_clkctrl; u32 pad064[1]; u32 cm_c2c_modem_icr_clkctrl; u32 pad065[1]; u32 cm_c2c_sad2d_fw_clkctrl; u32 pad066[51]; u32 cm_l4cfg_clkstctrl; u32 pad067[1]; u32 cm_l4cfg_dynamicdep; u32 pad068[5]; u32 cm_l4cfg_l4_cfg_clkctrl; u32 pad069[1]; u32 cm_l4cfg_hw_sem_clkctrl; u32 pad070[1]; u32 cm_l4cfg_mailbox_clkctrl; u32 pad071[1]; u32 cm_l4cfg_sar_rom_clkctrl; u32 pad072[49]; u32 cm_l3instr_clkstctrl; u32 pad073[7]; u32 cm_l3instr_l3_3_clkctrl; u32 pad074[1]; u32 cm_l3instr_l3_instr_clkctrl; u32 pad075[5]; u32 cm_l3instr_intrconn_wp1_clkctrl; u32 pad076[47]; u32 cm_ivahd_clkstctrl; u32 pad077[7]; u32 cm_ivahd_ivahd_clkctrl; u32 pad078[1]; u32 cm_ivahd_sl2_clkctrl; u32 pad079[53]; u32 cm_cam_clkstctrl; u32 pad080[7]; u32 cm_cam_iss_clkctrl; u32 pad081[1]; u32 cm_cam_fdif_clkctrl; u32 pad082[53]; u32 cm_dss_clkstctrl; u32 pad083[7]; u32 cm_dss_dss_clkctrl; u32 pad084[55]; u32 cm_sgx_clkstctrl; u32 pad085[7]; u32 cm_sgx_sgx_clkctrl; u32 pad086[55]; u32 cm_l3init_clkstctrl; u32 pad087[9]; u32 cm_l3init_hsmmc1_clkctrl; u32 pad088[1]; u32 cm_l3init_hsmmc2_clkctrl; u32 pad089[1]; u32 cm_l3init_hsi_clkctrl; u32 pad090[7]; u32 cm_l3init_hsusbhost_clkctrl; u32 pad091[1]; u32 cm_l3init_hsusbotg_clkctrl; u32 pad092[1]; u32 cm_l3init_hsusbtll_clkctrl; u32 pad093[3]; u32 cm_l3init_p1500_clkctrl; u32 pad094[21]; u32 cm_l3init_fsusb_clkctrl; u32 pad095[3]; u32 cm_l3init_usbphy_clkctrl; u32 pad096[7]; u32 cm_l4per_clkstctrl; u32 pad097[1]; u32 cm_l4per_dynamicdep; u32 pad098[5]; u32 cm_l4per_adc_clkctrl; u32 pad100[1]; u32 cm_l4per_gptimer10_clkctrl; u32 pad101[1]; u32 cm_l4per_gptimer11_clkctrl; u32 pad102[1]; u32 cm_l4per_gptimer2_clkctrl; u32 pad103[1]; u32 cm_l4per_gptimer3_clkctrl; u32 pad104[1]; u32 cm_l4per_gptimer4_clkctrl; u32 pad105[1]; u32 cm_l4per_gptimer9_clkctrl; u32 pad106[1]; u32 cm_l4per_elm_clkctrl; u32 pad107[1]; u32 cm_l4per_gpio2_clkctrl; u32 pad108[1]; u32 cm_l4per_gpio3_clkctrl; u32 pad109[1]; u32 cm_l4per_gpio4_clkctrl; u32 pad110[1]; u32 cm_l4per_gpio5_clkctrl; u32 pad111[1]; u32 cm_l4per_gpio6_clkctrl; u32 pad112[1]; u32 cm_l4per_hdq1w_clkctrl; u32 pad113[1]; u32 cm_l4per_hecc1_clkctrl; u32 pad114[1]; u32 cm_l4per_hecc2_clkctrl; u32 pad115[1]; u32 cm_l4per_i2c1_clkctrl; u32 pad116[1]; u32 cm_l4per_i2c2_clkctrl; u32 pad117[1]; u32 cm_l4per_i2c3_clkctrl; u32 pad118[1]; u32 cm_l4per_i2c4_clkctrl; u32 pad119[1]; u32 cm_l4per_l4per_clkctrl; u32 pad1191[3]; u32 cm_l4per_mcasp2_clkctrl; u32 pad120[1]; u32 cm_l4per_mcasp3_clkctrl; u32 pad121[1]; u32 cm_l4per_mcbsp4_clkctrl; u32 pad122[1]; u32 cm_l4per_mgate_clkctrl; u32 pad123[1]; u32 cm_l4per_mcspi1_clkctrl; u32 pad124[1]; u32 cm_l4per_mcspi2_clkctrl; u32 pad125[1]; u32 cm_l4per_mcspi3_clkctrl; u32 pad126[1]; u32 cm_l4per_mcspi4_clkctrl; u32 pad127[5]; u32 cm_l4per_mmcsd3_clkctrl; u32 pad128[1]; u32 cm_l4per_mmcsd4_clkctrl; u32 pad129[1]; u32 cm_l4per_msprohg_clkctrl; u32 pad130[1]; u32 cm_l4per_slimbus2_clkctrl; u32 pad131[1]; u32 cm_l4per_uart1_clkctrl; u32 pad132[1]; u32 cm_l4per_uart2_clkctrl; u32 pad133[1]; u32 cm_l4per_uart3_clkctrl; u32 pad134[1]; u32 cm_l4per_uart4_clkctrl; u32 pad135[1]; u32 cm_l4per_mmcsd5_clkctrl; u32 pad136[1]; u32 cm_l4per_i2c5_clkctrl; u32 pad137[5]; u32 cm_l4sec_clkstctrl; u32 cm_l4sec_staticdep; u32 cm_l4sec_dynamicdep; u32 pad138[5]; u32 cm_l4sec_aes1_clkctrl; u32 pad139[1]; u32 cm_l4sec_aes2_clkctrl; u32 pad140[1]; u32 cm_l4sec_des3des_clkctrl; u32 pad141[1]; u32 cm_l4sec_pkaeip29_clkctrl; u32 pad142[1]; u32 cm_l4sec_rng_clkctrl; u32 pad143[1]; u32 cm_l4sec_sha2md51_clkctrl; u32 pad144[3]; u32 cm_l4sec_cryptodma_clkctrl; u32 pad145[776841]; u32 pad201[6211]; u32 cm_abe_pll_ref_clksel; u32 cm_sys_clksel; u32 pad202[1467]; u32 cm_wkup_clkstctrl; u32 pad203[7]; u32 cm_wkup_l4wkup_clkctrl; u32 pad204; u32 cm_wkup_wdtimer1_clkctrl; u32 pad205; u32 cm_wkup_wdtimer2_clkctrl; u32 pad206; u32 cm_wkup_gpio1_clkctrl; u32 pad207; u32 cm_wkup_gptimer1_clkctrl; u32 pad208; u32 cm_wkup_gptimer12_clkctrl; u32 pad209; u32 cm_wkup_synctimer_clkctrl; u32 pad210; u32 cm_wkup_usim_clkctrl; u32 pad211; u32 cm_wkup_sarram_clkctrl; u32 pad212[5]; u32 cm_wkup_keyboard_clkctrl; u32 pad213; u32 cm_wkup_rtc_clkctrl; u32 pad214; u32 cm_wkup_bandgap_clkctrl; u32 pad215[197]; u32 prm_vc_val_bypass; u32 prm_vc_cfg_channel; u32 prm_vc_cfg_i2c_mode; u32 prm_vc_cfg_i2c_clk; }; # 665 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/clocks.h" struct dpll_regs { u32 cm_clkmode_dpll; u32 cm_idlest_dpll; u32 cm_autoidle_dpll; u32 cm_clksel_dpll; u32 cm_div_m2_dpll; u32 cm_div_m3_dpll; u32 cm_div_m4_dpll; u32 cm_div_m5_dpll; u32 cm_div_m6_dpll; u32 cm_div_m7_dpll; }; struct dpll_params { u32 m; u32 n; s8 m2; s8 m3; s8 m4; s8 m5; s8 m6; s8 m7; }; # 36 "clocks.c" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/sys_proto.h" 1 # 26 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/sys_proto.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/io.h" 1 # 27 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/io.h" # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/memory.h" 1 # 28 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/io.h" 2 static inline void sync(void) { } # 46 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/io.h" static inline void * map_physmem(phys_addr_t paddr, unsigned long len, unsigned long flags) { return (void *)paddr; } static inline void unmap_physmem(void *vaddr, unsigned long flags) { } static inline phys_addr_t virt_to_phys(void * vaddr) { return (phys_addr_t)(vaddr); } # 78 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/io.h" extern inline void __raw_writesb(unsigned int addr, const void *data, int bytelen) { uint8_t *buf = (uint8_t *)data; while(bytelen--) (*(volatile unsigned char *)(addr) = (*buf++)); } extern inline void __raw_writesw(unsigned int addr, const void *data, int wordlen) { uint16_t *buf = (uint16_t *)data; while(wordlen--) (*(volatile unsigned short *)(addr) = (*buf++)); } extern inline void __raw_writesl(unsigned int addr, const void *data, int longlen) { uint32_t *buf = (uint32_t *)data; while(longlen--) (*(volatile unsigned int *)(addr) = (*buf++)); } extern inline void __raw_readsb(unsigned int addr, void *data, int bytelen) { uint8_t *buf = (uint8_t *)data; while(bytelen--) *buf++ = (*(volatile unsigned char *)(addr)); } extern inline void __raw_readsw(unsigned int addr, void *data, int wordlen) { uint16_t *buf = (uint16_t *)data; while(wordlen--) *buf++ = (*(volatile unsigned short *)(addr)); } extern inline void __raw_readsl(unsigned int addr, void *data, int longlen) { uint32_t *buf = (uint32_t *)data; while(longlen--) *buf++ = (*(volatile unsigned int *)(addr)); } # 282 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/io.h" extern void * __ioremap(unsigned long offset, size_t size, unsigned long flags); extern void __iounmap(void *addr); # 315 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/io.h" extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle); extern void consistent_free(void *vaddr, size_t size, dma_addr_t handle); extern void consistent_sync(void *vaddr, size_t size, int rw); extern void _memcpy_fromio(void *, unsigned long, size_t); extern void _memcpy_toio(unsigned long, const void *, size_t); extern void _memset_io(unsigned long, int, size_t); extern void __readwrite_bug(const char *fn); # 27 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/sys_proto.h" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/mux_omap4.h" 1 # 31 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/mux_omap4.h" struct pad_conf_entry { u16 offset; u16 val; } __attribute__ ((packed)); # 29 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/sys_proto.h" 2 struct omap_sysinfo { char *board_string; }; extern const struct omap_sysinfo sysinfo; extern struct omap4_prcm_regs *const prcm; void gpmc_init(void); void watchdog_init(void); u32 get_device_type(void); void do_set_mux(u32 base, struct pad_conf_entry const *array, int size); void set_muxconf_regs_non_essential(void); void sr32(void *, u32, u32, u32); u32 wait_on_value(u32, u32, void *, u32); void sdelay(unsigned long); void set_pl310_ctrl_reg(u32 val); void omap_rev_string(char *omap4_rev_string); void setup_clocks_for_console(void); void prcm_init(void); void bypass_dpll(u32 *const base); void freq_update_core(void); u32 get_sys_clk_freq(void); u32 omap4_ddr_clk(void); void cancel_out(u32 *num, u32 *den, u32 den_limit); void sdram_init(void); u32 omap4_sdram_size(void); void omap4_die_id_to_ethernet_mac(u8 *, int); static inline u32 running_from_sdram(void) { u32 pc; asm volatile ("mov %0, pc" : "=r" (pc)); return ((pc >= 0x80000000) && (pc < 0xD0000000)); } static inline u8 uboot_loaded_by_spl(void) { # 77 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/sys_proto.h" return running_from_sdram(); } # 91 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/arch/sys_proto.h" static inline u32 omap4_hw_init_context(void) { if (uboot_loaded_by_spl()) return 2; else if (running_from_sdram()) return 3; else return 1; } static inline u32 omap_revision(void) { extern u32 *const omap4_revision; return *omap4_revision; } # 37 "clocks.c" 2 # 1 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/utils.h" 1 # 27 "/home/riedel/Data/Ubuntu/omap4dev/u-boot/u-boot-linaro-2011.09.6/include/asm/utils.h" static inline s32 log_2_n_round_up(u32 n) { s32 log2n = -1; u32 temp = n; while (temp) { log2n++; temp >>= 1; } if (n & (n - 1)) return log2n + 1; else return log2n; } static inline s32 log_2_n_round_down(u32 n) { s32 log2n = -1; u32 temp = n; while (temp) { log2n++; temp >>= 1; } return log2n; } # 38 "clocks.c" 2 # 51 "clocks.c" struct omap4_prcm_regs *const prcm = (struct omap4_prcm_regs *)0x4A004100; static const u32 sys_clk_array[8] = { 12000000, 13000000, 16800000, 19200000, 26000000, 27000000, 38400000, }; # 71 "clocks.c" static const struct dpll_params mpu_dpll_params_1400mhz[7] = { {175, 2, 1, -1, -1, -1, -1, -1}, {700, 12, 1, -1, -1, -1, -1, -1}, {125, 2, 1, -1, -1, -1, -1, -1}, {401, 10, 1, -1, -1, -1, -1, -1}, {350, 12, 1, -1, -1, -1, -1, -1}, {700, 26, 1, -1, -1, -1, -1, -1}, {638, 34, 1, -1, -1, -1, -1, -1} }; static const struct dpll_params mpu_dpll_params_1584mhz[7] = { {66, 0, 1, -1, -1, -1, -1, -1}, {792, 12, 1, -1, -1, -1, -1, -1}, {330, 6, 1, -1, -1, -1, -1, -1}, {165, 3, 1, -1, -1, -1, -1, -1}, {396, 12, 1, -1, -1, -1, -1, -1}, {88, 2, 1, -1, -1, -1, -1, -1}, {165, 7, 1, -1, -1, -1, -1, -1} }; static const struct dpll_params mpu_dpll_params_1200mhz[7] = { {50, 0, 1, -1, -1, -1, -1, -1}, {600, 12, 1, -1, -1, -1, -1, -1}, {250, 6, 1, -1, -1, -1, -1, -1}, {125, 3, 1, -1, -1, -1, -1, -1}, {300, 12, 1, -1, -1, -1, -1, -1}, {200, 8, 1, -1, -1, -1, -1, -1}, {125, 7, 1, -1, -1, -1, -1, -1} }; static const struct dpll_params core_dpll_params_1600mhz[7] = { {200, 2, 1, 5, 8, 4, 6, 5}, {800, 12, 1, 5, 8, 4, 6, 5}, {619, 12, 1, 5, 8, 4, 6, 5}, {125, 2, 1, 5, 8, 4, 6, 5}, {400, 12, 1, 5, 8, 4, 6, 5}, {800, 26, 1, 5, 8, 4, 6, 5}, {125, 5, 1, 5, 8, 4, 6, 5} }; static const struct dpll_params core_dpll_params_es1_1524mhz[7] = { {127, 1, 1, 5, 8, 4, 6, 5}, {762, 12, 1, 5, 8, 4, 6, 5}, {635, 13, 1, 5, 8, 4, 6, 5}, {635, 15, 1, 5, 8, 4, 6, 5}, {381, 12, 1, 5, 8, 4, 6, 5}, {254, 8, 1, 5, 8, 4, 6, 5}, {496, 24, 1, 5, 8, 4, 6, 5} }; static const struct dpll_params core_dpll_params_es2_1600mhz_ddr200mhz[7] = { {200, 2, 2, 5, 8, 4, 6, 5}, {800, 12, 2, 5, 8, 4, 6, 5}, {619, 12, 2, 5, 8, 4, 6, 5}, {125, 2, 2, 5, 8, 4, 6, 5}, {400, 12, 2, 5, 8, 4, 6, 5}, {800, 26, 2, 5, 8, 4, 6, 5}, {125, 5, 2, 5, 8, 4, 6, 5} }; static const struct dpll_params per_dpll_params_1536mhz[7] = { {64, 0, 8, 6, 12, 9, 4, 5}, {768, 12, 8, 6, 12, 9, 4, 5}, {320, 6, 8, 6, 12, 9, 4, 5}, {40, 0, 8, 6, 12, 9, 4, 5}, {384, 12, 8, 6, 12, 9, 4, 5}, {256, 8, 8, 6, 12, 9, 4, 5}, {20, 0, 8, 6, 12, 9, 4, 5} }; static const struct dpll_params iva_dpll_params_1862mhz[7] = { {931, 11, -1, -1, 4, 7, -1, -1}, {931, 12, -1, -1, 4, 7, -1, -1}, {665, 11, -1, -1, 4, 7, -1, -1}, {727, 14, -1, -1, 4, 7, -1, -1}, {931, 25, -1, -1, 4, 7, -1, -1}, {931, 26, -1, -1, 4, 7, -1, -1}, {412, 16, -1, -1, 4, 7, -1, -1} }; static const struct dpll_params abe_dpll_params_sysclk_196608khz[7] = { {49, 5, 1, 1, -1, -1, -1, -1}, {68, 8, 1, 1, -1, -1, -1, -1}, {35, 5, 1, 1, -1, -1, -1, -1}, {46, 8, 1, 1, -1, -1, -1, -1}, {34, 8, 1, 1, -1, -1, -1, -1}, {29, 7, 1, 1, -1, -1, -1, -1}, {64, 24, 1, 1, -1, -1, -1, -1} }; static const struct dpll_params abe_dpll_params_32k_196608khz = { 750, 0, 1, 1, -1, -1, -1, -1 }; static const struct dpll_params usb_dpll_params_1920mhz[7] = { {80, 0, 2, -1, -1, -1, -1, -1}, {960, 12, 2, -1, -1, -1, -1, -1}, {400, 6, 2, -1, -1, -1, -1, -1}, {50, 0, 2, -1, -1, -1, -1, -1}, {480, 12, 2, -1, -1, -1, -1, -1}, {320, 8, 2, -1, -1, -1, -1, -1}, {25, 0, 2, -1, -1, -1, -1, -1} }; static inline u32 __get_sys_clk_index(void) { u32 ind; if (omap_revision() == 0x44300100) ind = 6; else { ind = (({ u32 __v = (*(volatile unsigned int *)(&prcm->cm_sys_clksel)); __asm__ __volatile__ ("" : : : "memory"); __v; }) & 7) - 1; } return ind; } u32 get_sys_clk_index(void) __attribute__ ((weak, alias("__get_sys_clk_index"))); u32 get_sys_clk_freq(void) { u8 index = get_sys_clk_index(); return sys_clk_array[index]; } static inline void do_bypass_dpll(u32 *const base) { struct dpll_regs *dpll_regs = (struct dpll_regs *)base; (*(volatile unsigned int *)((&dpll_regs->cm_clkmode_dpll)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&dpll_regs->cm_clkmode_dpll)))) & ~(7)) | (6 << 0))))); } static inline void wait_for_bypass(u32 *const base) { struct dpll_regs *const dpll_regs = (struct dpll_regs *)base; if (!wait_on_value(1, 0, &dpll_regs->cm_idlest_dpll, 1000000)) { ; } } static inline void do_lock_dpll(u32 *const base) { struct dpll_regs *const dpll_regs = (struct dpll_regs *)base; (*(volatile unsigned int *)((&dpll_regs->cm_clkmode_dpll)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&dpll_regs->cm_clkmode_dpll)))) & ~(7)) | (7 << 0))))); } static inline void wait_for_lock(u32 *const base) { struct dpll_regs *const dpll_regs = (struct dpll_regs *)base; if (!wait_on_value(1, 1, &dpll_regs->cm_idlest_dpll, 1000000)) { ; hang(); } } static void force_on(u32 *const reg, u32 val) { u32 temp; temp = ({ u32 __v = (*(volatile unsigned int *)(reg)); __asm__ __volatile__ ("" : : : "memory"); __v; }); temp |= val; ({ u32 __v = temp; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(reg) = (__v)); __v; }); } static void do_setup_dpll(u32 *const base, const struct dpll_params *params, u8 lock) { u32 temp; struct dpll_regs *const dpll_regs = (struct dpll_regs *)base; bypass_dpll(base); temp = ({ u32 __v = (*(volatile unsigned int *)(&dpll_regs->cm_clksel_dpll)); __asm__ __volatile__ ("" : : : "memory"); __v; }); temp &= ~(0x7FF << 8); temp |= (params->m << 8) & (0x7FF << 8); temp &= ~0x7F; temp |= (params->n << 0) & 0x7F; ({ u32 __v = temp; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&dpll_regs->cm_clksel_dpll) = (__v)); __v; }); if (lock) do_lock_dpll(base); if (params->m2 >= 0) ({ u32 __v = params->m2; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&dpll_regs->cm_div_m2_dpll) = (__v)); __v; }); if (params->m3 >= 0) ({ u32 __v = params->m3; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&dpll_regs->cm_div_m3_dpll) = (__v)); __v; }); if (params->m4 >= 0) ({ u32 __v = params->m4; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&dpll_regs->cm_div_m4_dpll) = (__v)); __v; }); if (params->m5 >= 0) ({ u32 __v = params->m5; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&dpll_regs->cm_div_m5_dpll) = (__v)); __v; }); if (params->m6 >= 0) ({ u32 __v = params->m6; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&dpll_regs->cm_div_m6_dpll) = (__v)); __v; }); if (params->m7 >= 0) ({ u32 __v = params->m7; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&dpll_regs->cm_div_m7_dpll) = (__v)); __v; }); if (lock) wait_for_lock(base); } const struct dpll_params *get_core_dpll_params(void) { u32 sysclk_ind = get_sys_clk_index(); switch (omap_revision()) { case 0x44300100: return &core_dpll_params_es1_1524mhz[sysclk_ind]; case 0x44300200: case 0xFFFFFFFF: return &core_dpll_params_es2_1600mhz_ddr200mhz[sysclk_ind]; default: return &core_dpll_params_1600mhz[sysclk_ind]; } } u32 omap4_ddr_clk(void) { u32 ddr_clk, sys_clk_khz; const struct dpll_params *core_dpll_params; sys_clk_khz = get_sys_clk_freq() / 1000; core_dpll_params = get_core_dpll_params(); ; ddr_clk = sys_clk_khz * 2 * core_dpll_params->m / (core_dpll_params->n + 1); ddr_clk = ddr_clk / 4 / core_dpll_params->m2; ddr_clk *= 1000; ; return ddr_clk; } # 352 "clocks.c" void configure_mpu_dpll(void) { const struct dpll_params *params; struct dpll_regs *mpu_dpll_regs; u32 omap4_rev, sysclk_ind; omap4_rev = omap_revision(); sysclk_ind = get_sys_clk_index(); if (omap4_rev == 0x44300100) params = &mpu_dpll_params_1200mhz[sysclk_ind]; else if (omap4_rev < 0x44600100) params = &mpu_dpll_params_1584mhz[sysclk_ind]; else params = &mpu_dpll_params_1400mhz[sysclk_ind]; if (omap4_rev >= 0x44600100) { mpu_dpll_regs = (struct dpll_regs *)&prcm->cm_clkmode_dpll_mpu; bypass_dpll(&prcm->cm_clkmode_dpll_mpu); (*(volatile unsigned int *)((&prcm->cm_mpu_mpu_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_mpu_mpu_clkctrl)))) & ~((1 << 24)))))); (*(volatile unsigned int *)((&prcm->cm_mpu_mpu_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_mpu_mpu_clkctrl)))) | ((1 << 25)))))); (*(volatile unsigned int *)((&mpu_dpll_regs->cm_clksel_dpll)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&mpu_dpll_regs->cm_clksel_dpll)))) & ~((1 << 22)))))); } do_setup_dpll(&prcm->cm_clkmode_dpll_mpu, params, 1); ; } static void setup_dplls(void) { u32 sysclk_ind, temp; const struct dpll_params *params; ; sysclk_ind = get_sys_clk_index(); params = get_core_dpll_params(); do_setup_dpll(&prcm->cm_clkmode_dpll_core, params, 0); temp = (0 << 0) | (1 << 4) | (1 << 8); ({ u32 __v = temp; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&prcm->cm_clksel_core) = (__v)); __v; }); ; do_setup_dpll(&prcm->cm_clkmode_dpll_per, &per_dpll_params_1536mhz[sysclk_ind], 1); ; configure_mpu_dpll(); } static void setup_non_essential_dplls(void) { u32 sys_clk_khz, abe_ref_clk; u32 sysclk_ind, sd_div, num, den; const struct dpll_params *params; sysclk_ind = get_sys_clk_index(); sys_clk_khz = get_sys_clk_freq() / 1000; (*(volatile unsigned int *)((&prcm->cm_bypclk_dpll_iva)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_bypclk_dpll_iva)))) & ~(3)) | (1))))); do_setup_dpll(&prcm->cm_clkmode_dpll_iva, &iva_dpll_params_1862mhz[sysclk_ind], 1); # 441 "clocks.c" params = &usb_dpll_params_1920mhz[sysclk_ind]; num = params->m * sys_clk_khz; den = (params->n + 1) * 250 * 1000; num += den - 1; sd_div = num / den; (*(volatile unsigned int *)((&prcm->cm_clksel_dpll_usb)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_clksel_dpll_usb)))) & ~((0xFF << 24))) | (sd_div << 24))))); do_setup_dpll(&prcm->cm_clkmode_dpll_usb, params, 1); force_on(&prcm->cm_div_m2_dpll_usb, 1 << 8); force_on(&prcm->cm_clkdcoldo_dpll_usb, 1 << 8); params = &abe_dpll_params_32k_196608khz; abe_ref_clk = 1; (*(volatile unsigned int *)((&prcm->cm_clkmode_dpll_abe)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_clkmode_dpll_abe)))) | ((1 << 8)| (1 << 9)| (1 << 10)| (1 << 11)))))); (*(volatile unsigned int *)((&prcm->cm_clkmode_dpll_abe)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_clkmode_dpll_abe)))) & ~((0x7 << 5))) | (1 << 5))))); (*(volatile unsigned int *)((&prcm->cm_abe_pll_ref_clksel)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_abe_pll_ref_clksel)))) & ~(1)) | (abe_ref_clk << 0))))); do_setup_dpll(&prcm->cm_clkmode_dpll_abe, params, 1); } static void do_scale_tps62361(u32 reg, u32 volt_mv) { u32 temp, step; step = volt_mv - 500; step /= 10; temp = 0x60 | (reg << 8) | (step << 16) | 0x1000000; ; ({ u32 __v = temp; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&prcm->prm_vc_val_bypass) = (__v)); __v; }); if (!wait_on_value(0x1000000, 0, &prcm->prm_vc_val_bypass, 1000000)) { ; } } static void do_scale_vcore(u32 vcore_reg, u32 volt_mv) { u32 temp, offset_code; u32 step = 12660; u32 offset = volt_mv; offset *= 1000; if (omap_revision() == 0x44300100) offset -= 607700; else offset -= 709000; offset_code = (offset + step - 1) / step; offset_code++; ; temp = 0x12 | (vcore_reg << 8) | (offset_code << 16) | 0x1000000; ({ u32 __v = temp; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&prcm->prm_vc_val_bypass) = (__v)); __v; }); if (!wait_on_value(0x1000000, 0, &prcm->prm_vc_val_bypass, 1000000)) { ; } } static void scale_vcores(void) { u32 volt, sys_clk_khz, cycles_hi, cycles_low, temp, omap4_rev; sys_clk_khz = get_sys_clk_freq() / 1000; cycles_hi = sys_clk_khz * 4 / 400 / 10; cycles_low = sys_clk_khz * 6 / 400 / 10; cycles_hi -= 5; cycles_low -= 7; temp = (cycles_hi << 0) | (cycles_low << 8); ({ u32 __v = temp; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&prcm->prm_vc_cfg_i2c_clk) = (__v)); __v; }); ({ u32 __v = 0x0; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&prcm->prm_vc_cfg_i2c_mode) = (__v)); __v; }); omap4_rev = omap_revision(); if (omap4_rev >= 0x44600100) { volt = 1430; do_scale_tps62361(0x0, volt); do_scale_tps62361(0x1, volt); gpio_direction_output(7, 0); gpio_set_value(7, 1); } # 597 "clocks.c" if (omap4_rev < 0x44600100) { volt = 1417; do_scale_vcore(0x55, volt); } else { volt = 1200; do_scale_vcore(0x55, volt); } volt = 1200; do_scale_vcore(0x5B, volt); if (omap4_rev < 0x44600100) { volt = 1200; do_scale_vcore(0x61, volt); } } static inline void enable_clock_domain(u32 *const clkctrl_reg, u32 enable_mode) { (*(volatile unsigned int *)((clkctrl_reg)) = (((__u32)((((__u32)((*(volatile unsigned int *)(clkctrl_reg)))) & ~(3)) | (enable_mode << 0))))); ; } static inline void wait_for_clk_enable(u32 *clkctrl_addr) { u32 clkctrl, idlest = 3; u32 bound = 1000000; while ((idlest == 3) || (idlest == 1)) { clkctrl = ({ u32 __v = (*(volatile unsigned int *)(clkctrl_addr)); __asm__ __volatile__ ("" : : : "memory"); __v; }); idlest = (clkctrl & (3 << 16)) >> 16; if (--bound == 0) { ; return; } } } static inline void enable_clock_module(u32 *const clkctrl_addr, u32 enable_mode, u32 wait_for_enable) { (*(volatile unsigned int *)((clkctrl_addr)) = (((__u32)((((__u32)((*(volatile unsigned int *)(clkctrl_addr)))) & ~(3)) | (enable_mode << 0))))); ; if (wait_for_enable) wait_for_clk_enable(clkctrl_addr); } static void enable_basic_clocks(void) { u32 i, max = 100, wait_for_enable = 1; u32 *const clk_domains_essential[] = { &prcm->cm_l4per_clkstctrl, &prcm->cm_l3init_clkstctrl, &prcm->cm_memif_clkstctrl, &prcm->cm_l4cfg_clkstctrl, 0 }; u32 *const clk_modules_hw_auto_essential[] = { &prcm->cm_wkup_gpio1_clkctrl, &prcm->cm_l4per_gpio2_clkctrl, &prcm->cm_l4per_gpio3_clkctrl, &prcm->cm_l4per_gpio4_clkctrl, &prcm->cm_l4per_gpio5_clkctrl, &prcm->cm_l4per_gpio6_clkctrl, &prcm->cm_memif_emif_1_clkctrl, &prcm->cm_memif_emif_2_clkctrl, &prcm->cm_l3init_hsusbotg_clkctrl, &prcm->cm_l3init_usbphy_clkctrl, &prcm->cm_l4cfg_l4_cfg_clkctrl, 0 }; u32 *const clk_modules_explicit_en_essential[] = { &prcm->cm_l4per_gptimer2_clkctrl, &prcm->cm_l3init_hsmmc1_clkctrl, &prcm->cm_l3init_hsmmc2_clkctrl, &prcm->cm_l4per_mcspi1_clkctrl, &prcm->cm_wkup_gptimer1_clkctrl, &prcm->cm_l4per_i2c1_clkctrl, &prcm->cm_l4per_i2c2_clkctrl, &prcm->cm_l4per_i2c3_clkctrl, &prcm->cm_l4per_i2c4_clkctrl, &prcm->cm_wkup_wdtimer2_clkctrl, &prcm->cm_l4per_uart3_clkctrl, 0 }; (*(volatile unsigned int *)((&prcm->cm_l4per_gpio4_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_l4per_gpio4_clkctrl)))) | ((1 << 8)))))); (*(volatile unsigned int *)((&prcm->cm_l3init_hsmmc1_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_l3init_hsmmc1_clkctrl)))) | ((1 << 24)))))); (*(volatile unsigned int *)((&prcm->cm_l3init_hsmmc2_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_l3init_hsmmc2_clkctrl)))) | ((1 << 24)))))); (*(volatile unsigned int *)((&prcm->cm_wkup_gptimer1_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_wkup_gptimer1_clkctrl)))) | ((1 << 24)))))); (*(volatile unsigned int *)((&prcm->cm_l3init_usbphy_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_l3init_usbphy_clkctrl)))) | (8))))); for (i = 0; (i < max) && clk_domains_essential[i]; i++) { enable_clock_domain(clk_domains_essential[i], 2); } for (i = 0; (i < max) && clk_modules_hw_auto_essential[i]; i++) { enable_clock_module(clk_modules_hw_auto_essential[i], 1, wait_for_enable); }; for (i = 0; (i < max) && clk_modules_explicit_en_essential[i]; i++) { enable_clock_module(clk_modules_explicit_en_essential[i], 2, wait_for_enable); }; for (i = 0; (i < max) && clk_domains_essential[i]; i++) { enable_clock_domain(clk_domains_essential[i], 3); } } static void enable_non_essential_clocks(void) { u32 i, max = 100, wait_for_enable = 0; u32 *const clk_domains_non_essential[] = { &prcm->cm_mpu_m3_clkstctrl, &prcm->cm_ivahd_clkstctrl, &prcm->cm_dsp_clkstctrl, &prcm->cm_dss_clkstctrl, &prcm->cm_sgx_clkstctrl, &prcm->cm1_abe_clkstctrl, &prcm->cm_c2c_clkstctrl, &prcm->cm_cam_clkstctrl, &prcm->cm_dss_clkstctrl, &prcm->cm_sdma_clkstctrl, 0 }; u32 *const clk_modules_hw_auto_non_essential[] = { &prcm->cm_mpu_m3_mpu_m3_clkctrl, &prcm->cm_ivahd_ivahd_clkctrl, &prcm->cm_ivahd_sl2_clkctrl, &prcm->cm_dsp_dsp_clkctrl, &prcm->cm_l3_2_gpmc_clkctrl, &prcm->cm_l3instr_l3_3_clkctrl, &prcm->cm_l3instr_l3_instr_clkctrl, &prcm->cm_l3instr_intrconn_wp1_clkctrl, &prcm->cm_l3init_hsi_clkctrl, &prcm->cm_l3init_hsusbtll_clkctrl, 0 }; u32 *const clk_modules_explicit_en_non_essential[] = { &prcm->cm1_abe_aess_clkctrl, &prcm->cm1_abe_pdm_clkctrl, &prcm->cm1_abe_dmic_clkctrl, &prcm->cm1_abe_mcasp_clkctrl, &prcm->cm1_abe_mcbsp1_clkctrl, &prcm->cm1_abe_mcbsp2_clkctrl, &prcm->cm1_abe_mcbsp3_clkctrl, &prcm->cm1_abe_slimbus_clkctrl, &prcm->cm1_abe_timer5_clkctrl, &prcm->cm1_abe_timer6_clkctrl, &prcm->cm1_abe_timer7_clkctrl, &prcm->cm1_abe_timer8_clkctrl, &prcm->cm1_abe_wdt3_clkctrl, &prcm->cm_l4per_gptimer9_clkctrl, &prcm->cm_l4per_gptimer10_clkctrl, &prcm->cm_l4per_gptimer11_clkctrl, &prcm->cm_l4per_gptimer3_clkctrl, &prcm->cm_l4per_gptimer4_clkctrl, &prcm->cm_l4per_hdq1w_clkctrl, &prcm->cm_l4per_mcbsp4_clkctrl, &prcm->cm_l4per_mcspi2_clkctrl, &prcm->cm_l4per_mcspi3_clkctrl, &prcm->cm_l4per_mcspi4_clkctrl, &prcm->cm_l4per_mmcsd3_clkctrl, &prcm->cm_l4per_mmcsd4_clkctrl, &prcm->cm_l4per_mmcsd5_clkctrl, &prcm->cm_l4per_uart1_clkctrl, &prcm->cm_l4per_uart2_clkctrl, &prcm->cm_l4per_uart4_clkctrl, &prcm->cm_wkup_keyboard_clkctrl, &prcm->cm_wkup_wdtimer2_clkctrl, &prcm->cm_cam_iss_clkctrl, &prcm->cm_cam_fdif_clkctrl, &prcm->cm_dss_dss_clkctrl, &prcm->cm_sgx_sgx_clkctrl, &prcm->cm_l3init_hsusbhost_clkctrl, &prcm->cm_l3init_fsusb_clkctrl, 0 }; (*(volatile unsigned int *)((&prcm->cm_cam_iss_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_cam_iss_clkctrl)))) | ((1 << 8)))))); (*(volatile unsigned int *)((&prcm->cm_dss_dss_clkctrl)) = (((__u32)(((__u32)((*(volatile unsigned int *)(&prcm->cm_dss_dss_clkctrl)))) | (0xF00))))); for (i = 0; (i < max) && clk_domains_non_essential[i]; i++) { enable_clock_domain(clk_domains_non_essential[i], 2); } for (i = 0; (i < max) && clk_modules_hw_auto_non_essential[i]; i++) { enable_clock_module(clk_modules_hw_auto_non_essential[i], 1, wait_for_enable); }; for (i = 0; (i < max) && clk_modules_explicit_en_non_essential[i]; i++) { enable_clock_module(clk_modules_explicit_en_non_essential[i], 2, wait_for_enable); }; for (i = 0; (i < max) && clk_domains_non_essential[i]; i++) { enable_clock_domain(clk_domains_non_essential[i], 3); } (*(volatile unsigned int *)((&prcm->cm_cam_clkstctrl)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_cam_clkstctrl)))) & ~(3)) | (0 << 0))))); } void freq_update_core(void) { u32 freq_config1 = 0; const struct dpll_params *core_dpll_params; core_dpll_params = get_core_dpll_params(); enable_clock_domain(&prcm->cm_memif_clkstctrl, 2); wait_for_clk_enable(&prcm->cm_memif_emif_1_clkctrl); wait_for_clk_enable(&prcm->cm_memif_emif_2_clkctrl); freq_config1 = 1 | 8; freq_config1 |= (7 << 8) & (7 << 8); freq_config1 |= (core_dpll_params->m2 << 11) & (0x1F << 11); ({ u32 __v = freq_config1; __asm__ __volatile__ ("" : : : "memory"); (*(volatile unsigned int *)(&prcm->cm_shadow_freq_config1) = (__v)); __v; }); if (!wait_on_value(1, 0, &prcm->cm_shadow_freq_config1, 1000000)) { ; hang(); } enable_clock_domain(&prcm->cm_memif_clkstctrl, 3); wait_for_clk_enable(&prcm->cm_memif_emif_1_clkctrl); wait_for_clk_enable(&prcm->cm_memif_emif_2_clkctrl); } void bypass_dpll(u32 *const base) { do_bypass_dpll(base); wait_for_bypass(base); } void lock_dpll(u32 *const base) { do_lock_dpll(base); wait_for_lock(base); } void setup_clocks_for_console(void) { (*(volatile unsigned int *)((&prcm->cm_l4per_clkstctrl)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_l4per_clkstctrl)))) & ~(3)) | (2 << 0))))); (*(volatile unsigned int *)((&prcm->cm_l4per_uart1_clkctrl)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_l4per_uart1_clkctrl)))) & ~(3)) | (2 << 0))))); (*(volatile unsigned int *)((&prcm->cm_l4per_uart2_clkctrl)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_l4per_uart2_clkctrl)))) & ~(3)) | (2 << 0))))); (*(volatile unsigned int *)((&prcm->cm_l4per_uart3_clkctrl)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_l4per_uart3_clkctrl)))) & ~(3)) | (2 << 0))))); (*(volatile unsigned int *)((&prcm->cm_l4per_uart3_clkctrl)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_l4per_uart3_clkctrl)))) & ~(3)) | (2 << 0))))); (*(volatile unsigned int *)((&prcm->cm_l4per_clkstctrl)) = (((__u32)((((__u32)((*(volatile unsigned int *)(&prcm->cm_l4per_clkstctrl)))) & ~(3)) | (3 << 0))))); } void prcm_init(void) { switch (omap4_hw_init_context()) { case 0: if (omap_revision() >= 0x44600100) { sr32(&prcm->cm_wkup_gpio1_clkctrl, 0, 32, 0x1); wait_on_value((1 << 17)|(1 << 16), 0, &prcm->cm_wkup_gpio1_clkctrl, 1000000); } case 1: case 3: enable_basic_clocks(); scale_vcores(); setup_dplls(); setup_non_essential_dplls(); enable_non_essential_clocks(); break; default: break; } }