]> git.sur5r.net Git - u-boot/commitdiff
kmp204x/qrio: support for setting the CPU reset request mode
authorBoschung, Rainer <Rainer.Boschung@keymile.com>
Tue, 3 Jun 2014 07:05:19 +0000 (09:05 +0200)
committerYork Sun <yorksun@freescale.com>
Fri, 1 Aug 2014 21:18:53 +0000 (14:18 -0700)
To acheive this, the qrio_uprstreq() function that sets the UPRSTREQN
flag in the qrio RESCNF reg is added.

Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Reviewed-by: York Sun <yorksun@freescale.com>
board/keymile/kmp204x/kmp204x.h
board/keymile/kmp204x/qrio.c

index 64c0afb1be9b0b217c6fcd1436e1cb7c5e539319..e90e8abd43df2ac86248a52e01b5d48ee8d167bd 100644 (file)
@@ -27,4 +27,9 @@ 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);
index 92e80227315c4306eeeef017a425684a271b18cc..edf3bf11a89403c3d02026282aee77248157c45e 100644 (file)
@@ -188,3 +188,20 @@ void qrio_cpuwd_flag(bool flag)
                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);
+}