diff options
author | Rainer Boschung <rainer.boschung@keymile.com> | 2014-01-27 11:49:04 +0100 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2014-02-03 08:38:49 -0800 |
commit | dd21f09669ee65500f1f9bce5c4024cf817f3c79 (patch) | |
tree | ae8b332e5102eeba1194fa660847ac08bc111de3 /board/keymile/kmp204x | |
parent | 714fd406daab6a98b2ee8d301c4888c113fdd818 (diff) | |
download | u-boot-imx-dd21f09669ee65500f1f9bce5c4024cf817f3c79.zip u-boot-imx-dd21f09669ee65500f1f9bce5c4024cf817f3c79.tar.gz u-boot-imx-dd21f09669ee65500f1f9bce5c4024cf817f3c79.tar.bz2 |
kmp204x: support for QRIO1 bootcounter
Make use of the QRIO1 32bit register at 0x20 as bootcounter register
Check for BOOTCOUNT_MAGIC pattern when before bootcounter value is read
Signed-off-by: Rainer Boschung <rainer.boschung@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
[York Sun: Minor change to commit message]
Signed-off-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board/keymile/kmp204x')
-rw-r--r-- | board/keymile/kmp204x/kmp204x.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/board/keymile/kmp204x/kmp204x.c b/board/keymile/kmp204x/kmp204x.c index f02642a..20a3264 100644 --- a/board/keymile/kmp204x/kmp204x.c +++ b/board/keymile/kmp204x/kmp204x.c @@ -133,26 +133,6 @@ void qrio_prstcfg(u8 bit, u8 mode) out_be32(qrio_base + PRSTCFG_OFF, prstcfg); } - -#define BOOTCOUNT_OFF 0x12 - -void bootcount_store(ulong counter) -{ - u8 val; - void __iomem *qrio_base = (void *)CONFIG_SYS_QRIO_BASE; - - val = (counter <= 255) ? (u8)counter : 255; - out_8(qrio_base + BOOTCOUNT_OFF, val); -} - -ulong bootcount_load(void) -{ - u8 val; - void __iomem *qrio_base = (void *)CONFIG_SYS_QRIO_BASE; - val = in_8(qrio_base + BOOTCOUNT_OFF); - return val; -} - #define NUM_SRDS_BANKS 2 #define PHY_RST 15 |