aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRobin Getz2009-12-21 16:35:48 -0500
committerMike Frysinger2010-01-17 20:36:09 -0500
commitf19fd87e9387282b5abbfdafe46ac272320643d8 (patch)
tree853df8844855d7025a271f01abb45eb4d1c24fa1 /include
parent3869453f659c22396fecb7c8ed7af909e89f461c (diff)
Blackfin: add support for kgdb
Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r--include/asm-blackfin/config.h7
-rw-r--r--include/asm-blackfin/deferred.h20
-rw-r--r--include/asm-blackfin/entry.h10
-rw-r--r--include/asm-blackfin/mach-common/bits/core.h3
-rw-r--r--include/asm-blackfin/signal.h1
-rw-r--r--include/configs/bfin_adi_common.h1
6 files changed, 42 insertions, 0 deletions
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 <asm-generic/signal.h>
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__)