summaryrefslogtreecommitdiff
path: root/board/keymile
diff options
context:
space:
mode:
Diffstat (limited to 'board/keymile')
-rw-r--r--board/keymile/km82xx/Kconfig15
-rw-r--r--board/keymile/km82xx/MAINTAINERS7
-rw-r--r--board/keymile/km83xx/Kconfig47
-rw-r--r--board/keymile/km83xx/MAINTAINERS19
-rw-r--r--board/keymile/km_arm/Kconfig23
-rw-r--r--board/keymile/km_arm/MAINTAINERS14
-rw-r--r--board/keymile/kmp204x/Kconfig15
-rw-r--r--board/keymile/kmp204x/MAINTAINERS7
-rw-r--r--board/keymile/kmp204x/kmp204x.c15
-rw-r--r--board/keymile/kmp204x/kmp204x.h7
-rw-r--r--board/keymile/kmp204x/qrio.c32
11 files changed, 201 insertions, 0 deletions
diff --git a/board/keymile/km82xx/Kconfig b/board/keymile/km82xx/Kconfig
new file mode 100644
index 0000000..c29032a
--- /dev/null
+++ b/board/keymile/km82xx/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_KM82XX
+
+config SYS_BOARD
+ string
+ default "km82xx"
+
+config SYS_VENDOR
+ string
+ default "keymile"
+
+config SYS_CONFIG_NAME
+ string
+ default "km82xx"
+
+endif
diff --git a/board/keymile/km82xx/MAINTAINERS b/board/keymile/km82xx/MAINTAINERS
new file mode 100644
index 0000000..50e06b2
--- /dev/null
+++ b/board/keymile/km82xx/MAINTAINERS
@@ -0,0 +1,7 @@
+KM82XX BOARD
+M: Holger Brunck <holger.brunck@keymile.com>
+S: Maintained
+F: board/keymile/km82xx/
+F: include/configs/km82xx.h
+F: configs/mgcoge_defconfig
+F: configs/mgcoge3ne_defconfig
diff --git a/board/keymile/km83xx/Kconfig b/board/keymile/km83xx/Kconfig
new file mode 100644
index 0000000..934c45d
--- /dev/null
+++ b/board/keymile/km83xx/Kconfig
@@ -0,0 +1,47 @@
+if TARGET_KM8360
+
+config SYS_BOARD
+ string
+ default "km83xx"
+
+config SYS_VENDOR
+ string
+ default "keymile"
+
+config SYS_CONFIG_NAME
+ string
+ default "km8360"
+
+endif
+
+if TARGET_SUVD3
+
+config SYS_BOARD
+ string
+ default "km83xx"
+
+config SYS_VENDOR
+ string
+ default "keymile"
+
+config SYS_CONFIG_NAME
+ string
+ default "suvd3"
+
+endif
+
+if TARGET_TUXX1
+
+config SYS_BOARD
+ string
+ default "km83xx"
+
+config SYS_VENDOR
+ string
+ default "keymile"
+
+config SYS_CONFIG_NAME
+ string
+ default "tuxx1"
+
+endif
diff --git a/board/keymile/km83xx/MAINTAINERS b/board/keymile/km83xx/MAINTAINERS
new file mode 100644
index 0000000..cee7e08
--- /dev/null
+++ b/board/keymile/km83xx/MAINTAINERS
@@ -0,0 +1,19 @@
+KM83XX BOARD
+M: Holger Brunck <holger.brunck@keymile.com>
+S: Maintained
+F: board/keymile/km83xx/
+F: include/configs/km8360.h
+F: configs/kmcoge5ne_defconfig
+F: configs/kmeter1_defconfig
+F: include/configs/tuxx1.h
+F: configs/kmopti2_defconfig
+F: include/configs/suvd3.h
+F: configs/kmvect1_defconfig
+F: configs/suvd3_defconfig
+F: configs/tuge1_defconfig
+F: configs/tuxx1_defconfig
+
+KMSUPX5 BOARD
+M: Heiko Schocher <hs@denx.de>
+S: Maintained
+F: configs/kmsupx5_defconfig
diff --git a/board/keymile/km_arm/Kconfig b/board/keymile/km_arm/Kconfig
new file mode 100644
index 0000000..dec4626
--- /dev/null
+++ b/board/keymile/km_arm/Kconfig
@@ -0,0 +1,23 @@
+if TARGET_KM_KIRKWOOD
+
+config SYS_CPU
+ string
+ default "arm926ejs"
+
+config SYS_BOARD
+ string
+ default "km_arm"
+
+config SYS_VENDOR
+ string
+ default "keymile"
+
+config SYS_SOC
+ string
+ default "kirkwood"
+
+config SYS_CONFIG_NAME
+ string
+ default "km_kirkwood"
+
+endif
diff --git a/board/keymile/km_arm/MAINTAINERS b/board/keymile/km_arm/MAINTAINERS
new file mode 100644
index 0000000..079c803
--- /dev/null
+++ b/board/keymile/km_arm/MAINTAINERS
@@ -0,0 +1,14 @@
+KM_ARM BOARD
+M: Valentin Longchamp <valentin.longchamp@keymile.com>
+S: Maintained
+F: board/keymile/km_arm/
+F: include/configs/km_kirkwood.h
+F: configs/km_kirkwood_defconfig
+F: configs/km_kirkwood_128m16_defconfig
+F: configs/km_kirkwood_pci_defconfig
+F: configs/kmcoge5un_defconfig
+F: configs/kmnusa_defconfig
+F: configs/kmsugp1_defconfig
+F: configs/kmsuv31_defconfig
+F: configs/mgcoge3un_defconfig
+F: configs/portl2_defconfig
diff --git a/board/keymile/kmp204x/Kconfig b/board/keymile/kmp204x/Kconfig
new file mode 100644
index 0000000..0236f69
--- /dev/null
+++ b/board/keymile/kmp204x/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_KMP204X
+
+config SYS_BOARD
+ string
+ default "kmp204x"
+
+config SYS_VENDOR
+ string
+ default "keymile"
+
+config SYS_CONFIG_NAME
+ string
+ default "kmp204x"
+
+endif
diff --git a/board/keymile/kmp204x/MAINTAINERS b/board/keymile/kmp204x/MAINTAINERS
new file mode 100644
index 0000000..93b6bad
--- /dev/null
+++ b/board/keymile/kmp204x/MAINTAINERS
@@ -0,0 +1,7 @@
+KMP204X BOARD
+M: Valentin Longchamp <valentin.longchamp@keymile.com>
+S: Maintained
+F: board/keymile/kmp204x/
+F: include/configs/kmp204x.h
+F: configs/kmcoge4_defconfig
+F: configs/kmlion1_defconfig
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c
index 6bc8eb8..cd08379 100644
--- a/board/keymile/kmp204x/kmp204x.c
+++ b/board/keymile/kmp204x/kmp204x.c
@@ -80,14 +80,29 @@ int get_scl(void)
#define ZL30158_RST 8
#define BFTIC4_RST 0
+#define RSTRQSR1_WDT_RR 0x00200000
+#define RSTRQSR1_SW_RR 0x00100000
int board_early_init_f(void)
{
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
+ bool cpuwd_flag = false;
+
+ /* configure mode for uP reset request */
+ qrio_uprstreq(UPREQ_CORE_RST);
/* board only uses the DDR_MCK0, so disable the DDR_MCK1/2/3 */
setbits_be32(&gur->ddrclkdr, 0x001f000f);
+ /* set reset reason according CPU register */
+ if ((gur->rstrqsr1 & (RSTRQSR1_WDT_RR | RSTRQSR1_SW_RR)) ==
+ RSTRQSR1_WDT_RR)
+ cpuwd_flag = true;
+
+ qrio_cpuwd_flag(cpuwd_flag);
+ /* clear CPU bits by writing 1 */
+ setbits_be32(&gur->rstrqsr1, RSTRQSR1_WDT_RR | RSTRQSR1_SW_RR);
+
/* set the BFTIC's prstcfg to reset at power-up and unit reset only */
qrio_prstcfg(BFTIC4_RST, PRSTCFG_POWUP_UNIT_RST);
/* and enable WD on it */
diff --git a/board/keymile/kmp204x/kmp204x.h b/board/keymile/kmp204x/kmp204x.h
index afede99..e90e8ab 100644
--- a/board/keymile/kmp204x/kmp204x.h
+++ b/board/keymile/kmp204x/kmp204x.h
@@ -24,5 +24,12 @@ void qrio_wdmask(u8 bit, bool wden);
void qrio_prstcfg(u8 bit, u8 mode);
void qrio_set_leds(void);
void qrio_enable_app_buffer(void);
+void qrio_cpuwd_flag(bool flag);
+int qrio_reset_reason(void);
+
+#define UPREQ_UNIT_RST 0x0
+#define UPREQ_CORE_RST 0x1
+
+void qrio_uprstreq(u8 mode);
void pci_of_setup(void *blob, bd_t *bd);
diff --git a/board/keymile/kmp204x/qrio.c b/board/keymile/kmp204x/qrio.c
index b6ba93a..edf3bf1 100644
--- a/board/keymile/kmp204x/qrio.c
+++ b/board/keymile/kmp204x/qrio.c
@@ -173,3 +173,35 @@ void qrio_enable_app_buffer(void)
ctrll |= (CTRLL_WRB_BUFENA);
out_8(qrio_base + CTRLL_OFF, ctrll);
}
+
+#define REASON1_OFF 0x12
+#define REASON1_CPUWD 0x01
+
+void qrio_cpuwd_flag(bool flag)
+{
+ u8 reason1;
+ void __iomem *qrio_base = (void *)CONFIG_SYS_QRIO_BASE;
+ reason1 = in_8(qrio_base + REASON1_OFF);
+ if (flag)
+ reason1 |= REASON1_CPUWD;
+ else
+ reason1 &= ~REASON1_CPUWD;
+ out_8(qrio_base + REASON1_OFF, reason1);
+}
+
+#define RSTCFG_OFF 0x11
+
+void qrio_uprstreq(u8 mode)
+{
+ u32 rstcfg;
+ void __iomem *qrio_base = (void *)CONFIG_SYS_QRIO_BASE;
+
+ rstcfg = in_8(qrio_base + RSTCFG_OFF);
+
+ if (mode & UPREQ_CORE_RST)
+ rstcfg |= UPREQ_CORE_RST;
+ else
+ rstcfg &= ~UPREQ_CORE_RST;
+
+ out_8(qrio_base + RSTCFG_OFF, rstcfg);
+}