From 3869453f659c22396fecb7c8ed7af909e89f461c Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 21 Dec 2009 17:55:22 -0500 Subject: asm-generic/signal.h: import from linux We need signal.h for Blackfin/KGDB, so import the asm-generic/signal.h for people to leverage. Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger --- include/asm-generic/signal.h | 101 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 include/asm-generic/signal.h (limited to 'include') diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h new file mode 100644 index 00000000000..af939478c68 --- /dev/null +++ b/include/asm-generic/signal.h @@ -0,0 +1,101 @@ +#ifndef __ASM_GENERIC_SIGNAL_H +#define __ASM_GENERIC_SIGNAL_H + +#include + +#define _NSIG 64 +#define _NSIG_BPW BITS_PER_LONG +#define _NSIG_WORDS (_NSIG / _NSIG_BPW) + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT 6 +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGIO 29 +#define SIGPOLL SIGIO +/* +#define SIGLOST 29 +*/ +#define SIGPWR 30 +#define SIGSYS 31 +#define SIGUNUSED 31 + +/* These should not be considered constants from userland. */ +#define SIGRTMIN 32 +#ifndef SIGRTMAX +#define SIGRTMAX _NSIG +#endif + +/* + * SA_FLAGS values: + * + * SA_ONSTACK indicates that a registered stack_t will be used. + * SA_RESTART flag to get restarting signals (which were the default long ago) + * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. + * SA_RESETHAND clears the handler when the signal is delivered. + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. + * SA_NODEFER prevents the current signal from being masked in the handler. + * + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single + * Unix names RESETHAND and NODEFER respectively. + */ +#define SA_NOCLDSTOP 0x00000001 +#define SA_NOCLDWAIT 0x00000002 +#define SA_SIGINFO 0x00000004 +#define SA_ONSTACK 0x08000000 +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 +#define SA_RESETHAND 0x80000000 + +#define SA_NOMASK SA_NODEFER +#define SA_ONESHOT SA_RESETHAND + +/* + * New architectures should not define the obsolete + * SA_RESTORER 0x04000000 + */ + +/* + * sigaltstack controls + */ +#define SS_ONSTACK 1 +#define SS_DISABLE 2 + +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 + +#ifndef __ASSEMBLY__ +typedef struct { + unsigned long sig[_NSIG_WORDS]; +} sigset_t; + +/* not actually used, but required for linux/syscalls.h */ + +#endif /* __ASSEMBLY__ */ + +#endif /* _ASM_GENERIC_SIGNAL_H */ -- cgit v1.2.3 From f19fd87e9387282b5abbfdafe46ac272320643d8 Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 21 Dec 2009 16:35:48 -0500 Subject: Blackfin: add support for kgdb Signed-off-by: Robin Getz Signed-off-by: Mike Frysinger --- include/asm-blackfin/config.h | 7 +++++++ include/asm-blackfin/deferred.h | 20 ++++++++++++++++++++ include/asm-blackfin/entry.h | 10 ++++++++++ include/asm-blackfin/mach-common/bits/core.h | 3 +++ include/asm-blackfin/signal.h | 1 + include/configs/bfin_adi_common.h | 1 + 6 files changed, 42 insertions(+) create mode 100644 include/asm-blackfin/deferred.h create mode 100644 include/asm-blackfin/signal.h (limited to 'include') diff --git a/include/asm-blackfin/config.h b/include/asm-blackfin/config.h index 0ae838abea4..74556850573 100644 --- a/include/asm-blackfin/config.h +++ b/include/asm-blackfin/config.h @@ -66,6 +66,11 @@ # error CONFIG_PLL_BYPASS: Invalid value: must be 0 or 1 #endif +/* If we are using KGDB, make sure we defer exceptions */ +#ifdef CONFIG_CMD_KGDB +# define CONFIG_EXCEPTION_DEFER 1 +#endif + /* Using L1 scratch pad makes sense for everyone by default. */ #ifndef CONFIG_LINUX_CMDLINE_ADDR # define CONFIG_LINUX_CMDLINE_ADDR L1_SRAM_SCRATCH @@ -138,6 +143,8 @@ #endif #ifndef CONFIG_SYS_CBSIZE # define CONFIG_SYS_CBSIZE 1024 +#elif defined(CONFIG_CMD_KGDB) && CONFIG_SYS_CBSIZE < 1024 +# error "kgdb needs cbsize to be >= 1024" #endif #ifndef CONFIG_SYS_BARGSIZE # define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE diff --git a/include/asm-blackfin/deferred.h b/include/asm-blackfin/deferred.h new file mode 100644 index 00000000000..82ceda3e4db --- /dev/null +++ b/include/asm-blackfin/deferred.h @@ -0,0 +1,20 @@ +/* + * U-boot - deferred register layout + * + * Copyright 2004-2009 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ + +#ifndef _BLACKFIN_DEFER_H +#define _BLACKFIN_DEFER_H + +#define deferred_regs_DCPLB_FAULT_ADDR 0 +#define deferred_regs_ICPLB_FAULT_ADDR 1 +#define deferred_regs_retx 2 +#define deferred_regs_SEQSTAT 3 +#define deferred_regs_SYSCFG 4 +#define deferred_regs_IMASK 5 +#define deferred_regs_last 6 + +#endif /* _BLACKFIN_DEFER_H */ diff --git a/include/asm-blackfin/entry.h b/include/asm-blackfin/entry.h index ef74d686af8..404144f4f8a 100644 --- a/include/asm-blackfin/entry.h +++ b/include/asm-blackfin/entry.h @@ -86,6 +86,11 @@ [--sp] = RETE; [--sp] = SEQSTAT; [--sp] = SYSCFG; +#ifdef CONFIG_CMD_KGDB + p0.l = lo(IPEND) + p0.h = hi(IPEND) + r0 = [p0]; +#endif [--sp] = r0; /* Skip IPEND as well. */ .endm @@ -137,6 +142,11 @@ [--sp] = RETE; [--sp] = SEQSTAT; [--sp] = SYSCFG; +#ifdef CONFIG_CMD_KGDB + p0.l = lo(IPEND) + p0.h = hi(IPEND) + r0 = [p0]; +#endif [--sp] = r0; /* Skip IPEND as well. */ .endm diff --git a/include/asm-blackfin/mach-common/bits/core.h b/include/asm-blackfin/mach-common/bits/core.h index d8cee1032a4..6db4f818268 100644 --- a/include/asm-blackfin/mach-common/bits/core.h +++ b/include/asm-blackfin/mach-common/bits/core.h @@ -105,5 +105,8 @@ #define SSSTEP 0x00000001 /* Supervisor Single Step */ #define CCEN 0x00000002 /* Cycle Counter Enable */ #define SNEN 0x00000004 /* Self-Nesting Interrupt Enable */ +#define SYSCFG_SSSTEP_P 0 +#define SYSCFG_CCEN_P 1 +#define SYSCFG_SCEN_P 2 #endif diff --git a/include/asm-blackfin/signal.h b/include/asm-blackfin/signal.h new file mode 100644 index 00000000000..7b1573ce19d --- /dev/null +++ b/include/asm-blackfin/signal.h @@ -0,0 +1 @@ +#include diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h index 6a2f1c7aa5a..1896cf53d57 100644 --- a/include/configs/bfin_adi_common.h +++ b/include/configs/bfin_adi_common.h @@ -83,6 +83,7 @@ # define CONFIG_CMD_CPLBINFO # define CONFIG_CMD_ELF # define CONFIG_ELF_SIMPLE_LOAD +# define CONFIG_CMD_KGDB # define CONFIG_CMD_REGINFO # define CONFIG_CMD_STRINGS # if defined(__ADSPBF51x__) || defined(__ADSPBF52x__) || defined(__ADSPBF54x__) -- cgit v1.2.3 From 50ef25ef24eccd8e69d2c1ccc97b3f7e30109f51 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Tue, 19 Jan 2010 12:03:25 +0100 Subject: microblaze: zlib needs asm/unaligned.h Microblaze has own hw unaligned handler if is available. Use big endian version. Signed-off-by: Michal Simek --- include/asm-microblaze/unaligned.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 include/asm-microblaze/unaligned.h (limited to 'include') diff --git a/include/asm-microblaze/unaligned.h b/include/asm-microblaze/unaligned.h new file mode 100644 index 00000000000..785c2e91578 --- /dev/null +++ b/include/asm-microblaze/unaligned.h @@ -0,0 +1,16 @@ +#ifndef _ASM_MICROBLAZE_UNALIGNED_H +#define _ASM_MICROBLAZE_UNALIGNED_H + +#ifdef __KERNEL__ + +/* + * The Microblaze can do unaligned accesses itself in big endian mode. + */ +#include +#include + +#define get_unaligned __get_unaligned_be +#define put_unaligned __put_unaligned_be + +#endif /* __KERNEL__ */ +#endif /* _ASM_MICROBLAZE_UNALIGNED_H */ -- cgit v1.2.3 From c816dcb118e26ba17e7d73989514fec08a3823ac Mon Sep 17 00:00:00 2001 From: Magnus Lilja Date: Wed, 11 Nov 2009 20:18:42 +0100 Subject: MX31: Add struct definition for clock control module in i.MX31. Signed-off-by: Magnus Lilja --- include/asm-arm/arch-mx31/mx31-regs.h | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'include') diff --git a/include/asm-arm/arch-mx31/mx31-regs.h b/include/asm-arm/arch-mx31/mx31-regs.h index 51b02a2a260..6f6e9a4048e 100644 --- a/include/asm-arm/arch-mx31/mx31-regs.h +++ b/include/asm-arm/arch-mx31/mx31-regs.h @@ -24,6 +24,45 @@ #ifndef __ASM_ARCH_MX31_REGS_H #define __ASM_ARCH_MX31_REGS_H +#if !(defined(__KERNEL_STRICT_NAMES) || defined(__ASSEMBLY__)) +#include + +/* Clock control module registers */ +struct clock_control_regs { + u32 ccmr; + u32 pdr0; + u32 pdr1; + u32 rcsr; + u32 mpctl; + u32 upctl; + u32 spctl; + u32 cosr; + u32 cgr0; + u32 cgr1; + u32 cgr2; + u32 wimr0; + u32 ldc; + u32 dcvr0; + u32 dcvr1; + u32 dcvr2; + u32 dcvr3; + u32 ltr0; + u32 ltr1; + u32 ltr2; + u32 ltr3; + u32 ltbr0; + u32 ltbr1; + u32 pmcr0; + u32 pmcr1; + u32 pdr2; +}; + +/* Bit definitions for RCSR register in CCM */ +#define CCM_RCSR_NF16B (1 << 31) +#define CCM_RCSR_NFMS (1 << 30) + +#endif + #define __REG(x) (*((volatile u32 *)(x))) #define __REG16(x) (*((volatile u16 *)(x))) #define __REG8(x) (*((volatile u8 *)(x))) -- cgit v1.2.3 From 38a8b3eafb17d61690e5fc93e6dc45120f79d7d0 Mon Sep 17 00:00:00 2001 From: Magnus Lilja Date: Sun, 17 Jan 2010 17:46:11 +0100 Subject: MX31: Activate NAND environment on i.MX31 PDK board. Signed-off-by: Magnus Lilja --- include/configs/mx31pdk.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index fb61432e7ff..bee2f45a158 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -30,6 +30,8 @@ #ifndef __CONFIG_H #define __CONFIG_H +#include + /* High Level Configuration Options */ #define CONFIG_ARM1136 1 /* This is an arm1136 CPU core */ #define CONFIG_MX31 1 /* in a mx31 */ @@ -51,7 +53,7 @@ /* * Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128 * 1024) +#define CONFIG_SYS_MALLOC_LEN (2*CONFIG_ENV_SIZE + 2 * 128 * 1024) /* Bytes reserved for initial data */ #define CONFIG_SYS_GBL_DATA_SIZE 128 @@ -89,6 +91,7 @@ #define CONFIG_CMD_PING #define CONFIG_CMD_SPI #define CONFIG_CMD_DATE +#define CONFIG_CMD_NAND /* * Disabled due to compilation errors in cmd_bootm.c (IMLS seems to require @@ -104,7 +107,10 @@ "ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp\0" \ "bootcmd=run bootcmd_net\0" \ "bootcmd_net=run bootargs_base bootargs_mtd bootargs_nfs; " \ - "tftpboot 0x81000000 uImage-mx31; bootm\0" + "tftpboot 0x81000000 uImage-mx31; bootm\0" \ + "prg_uboot=tftpboot 0x81000000 u-boot-nand.bin; " \ + "nand erase 0x0 0x40000; " \ + "nand write 0x81000000 0x0 0x40000\0" #define CONFIG_NET_MULTI #define CONFIG_SMC911X 1 @@ -156,9 +162,20 @@ /* No NOR flash present */ #define CONFIG_SYS_NO_FLASH 1 -#define CONFIG_ENV_IS_NOWHERE 1 +#define CONFIG_ENV_IS_IN_NAND 1 +#define CONFIG_ENV_OFFSET 0x40000 +#define CONFIG_ENV_OFFSET_REDUND 0x60000 +#define CONFIG_ENV_SIZE (128 * 1024) -#define CONFIG_ENV_SIZE (128 * 1024) +/* + * NAND driver + */ +#define CONFIG_NAND_MXC +#define CONFIG_MXC_NAND_REGS_BASE NFC_BASE_ADDR +#define CONFIG_SYS_MAX_NAND_DEVICE 1 +#define CONFIG_SYS_NAND_BASE NFC_BASE_ADDR +#define CONFIG_MXC_NAND_HWECC +#define CONFIG_SYS_NAND_LARGEPAGE /* NAND configuration for the NAND_SPL */ -- cgit v1.2.3 From 19c292999732996e071caa0782eeef0ce0a60ac0 Mon Sep 17 00:00:00 2001 From: Shinya Kuribayashi Date: Wed, 20 Jan 2010 21:07:00 +0900 Subject: MIPS: qemu_mips: Import asm/unaligned.h from the Linux kernel with a few adjustments for U-Boot. This fixes the following build error: make -C lib_generic/ zlib.c:31:27: error: asm/unaligned.h: No such file or directory zlib.c: In function 'inflate_fast': zlib.c:641: warning: implicit declaration of function 'get_unaligned' make[1]: *** [zlib.o] Error 1 make[1]: Leaving directory `/home/skuribay/git/u-boot.git/lib_generic' make: *** [lib_generic/libgeneric.a] Error 2 Reported-by: Himanshu Chauhan Signed-off-by: Shinya Kuribayashi --- include/asm-mips/unaligned.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 include/asm-mips/unaligned.h (limited to 'include') diff --git a/include/asm-mips/unaligned.h b/include/asm-mips/unaligned.h new file mode 100644 index 00000000000..1d5112ea69f --- /dev/null +++ b/include/asm-mips/unaligned.h @@ -0,0 +1,26 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org) + */ +#ifndef _ASM_MIPS_UNALIGNED_H +#define _ASM_MIPS_UNALIGNED_H + +#include +#if defined(__MIPSEB__) +#define get_unaligned __get_unaligned_be +#define put_unaligned __put_unaligned_be +#elif defined(__MIPSEL__) +#define get_unaligned __get_unaligned_le +#define put_unaligned __put_unaligned_le +#else +#error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" +#endif + +#include +#include +#include + +#endif /* _ASM_MIPS_UNALIGNED_H */ -- cgit v1.2.3 From dac4d7e8849d275023ea2fcae6caf941db91c042 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 17 Jan 2010 21:08:00 -0500 Subject: sha1: add dedicated config option The sha1 code is currently compiled for everyone, but in reality, it's only used by the FIT code. So make it optional just like MD5. Signed-off-by: Mike Frysinger --- include/image.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/image.h b/include/image.h index d2e78fe2983..dcf3a7bb18a 100644 --- a/include/image.h +++ b/include/image.h @@ -56,6 +56,7 @@ #include #include #define CONFIG_MD5 /* FIT images need MD5 support */ +#define CONFIG_SHA1 /* and SHA1 */ #endif /* -- cgit v1.2.3 From a16028da63c78001823bfb375b3f6d9d86e5a534 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 3 Nov 2009 11:35:59 -0500 Subject: lmb: only force on arches that use it Signed-off-by: Mike Frysinger --- include/asm-m68k/config.h | 2 ++ include/asm-ppc/config.h | 2 ++ include/asm-sparc/config.h | 2 ++ include/image.h | 2 +- include/lmb.h | 4 ++++ 5 files changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-m68k/config.h b/include/asm-m68k/config.h index 049c44eaf84..36438be112f 100644 --- a/include/asm-m68k/config.h +++ b/include/asm-m68k/config.h @@ -21,4 +21,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ +#define CONFIG_LMB + #endif diff --git a/include/asm-ppc/config.h b/include/asm-ppc/config.h index 796707eaf74..0d78aa400e5 100644 --- a/include/asm-ppc/config.h +++ b/include/asm-ppc/config.h @@ -21,6 +21,8 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ +#define CONFIG_LMB + #ifndef CONFIG_MAX_MEM_MAPPED #if defined(CONFIG_4xx) || defined(CONFIG_E500) || defined(CONFIG_MPC86xx) #define CONFIG_MAX_MEM_MAPPED ((phys_size_t)2 << 30) diff --git a/include/asm-sparc/config.h b/include/asm-sparc/config.h index 049c44eaf84..36438be112f 100644 --- a/include/asm-sparc/config.h +++ b/include/asm-sparc/config.h @@ -21,4 +21,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ +#define CONFIG_LMB + #endif diff --git a/include/image.h b/include/image.h index dcf3a7bb18a..4ed03791069 100644 --- a/include/image.h +++ b/include/image.h @@ -256,7 +256,7 @@ typedef struct bootm_headers { #define BOOTM_STATE_OS_GO (0x00000080) int state; -#ifndef USE_HOSTCC +#ifdef CONFIG_LMB struct lmb lmb; /* for memory mgmt */ #endif } bootm_headers_t; diff --git a/include/lmb.h b/include/lmb.h index 14e8727f066..43082a393fd 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -52,6 +52,10 @@ 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); + #endif /* __KERNEL__ */ #endif /* _LINUX_LMB_H */ -- cgit v1.2.3 From 5daa1c18b6a6877b0619a8dbaad0afd783f79e4f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 21 Jan 2010 04:03:20 -0500 Subject: image.h: avoid command.h for host tools The u-boot command structures don't get used with host systems, so don't bother including it when building host code. This avoids an implicit need on config.h in the process. Signed-off-by: Mike Frysinger --- include/image.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/image.h b/include/image.h index 4ed03791069..acc553cae9c 100644 --- a/include/image.h +++ b/include/image.h @@ -46,11 +46,10 @@ #include #include +#include #endif /* USE_HOSTCC */ -#include - #if defined(CONFIG_FIT) #include #include -- cgit v1.2.3