summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Herzmann <thomas.herzmann@keymile.com>2012-05-04 10:55:57 +0200
committerKim Phillips <kim.phillips@freescale.com>2012-06-15 17:12:51 -0500
commit13fff2229178ab3d7f8d6b8fda37873c7a8cb1eb (patch)
tree61b55a6737302056255d8848029daebe84f59b03
parent95209b66846276d1d598f579ae2dcd1988c49a53 (diff)
downloadu-boot-imx-13fff2229178ab3d7f8d6b8fda37873c7a8cb1eb.zip
u-boot-imx-13fff2229178ab3d7f8d6b8fda37873c7a8cb1eb.tar.gz
u-boot-imx-13fff2229178ab3d7f8d6b8fda37873c7a8cb1eb.tar.bz2
powerpc/83xx/km: readout dip_switch on kmcoge5ne
On kmcoge5ne we have a dip switch present. If this switch was switched on the actual_bank is set to 0 and this SW will be booted. Signed-off-by: Thomas Herzmann <thomas.herzmann@keymile.com> Signed-off-by: Holger Brunck <holger.brunck@keymile.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
-rw-r--r--board/keymile/km83xx/km83xx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/keymile/km83xx/km83xx.c b/board/keymile/km83xx/km83xx.c
index f05cdfd..e01a633 100644
--- a/board/keymile/km83xx/km83xx.c
+++ b/board/keymile/km83xx/km83xx.c
@@ -195,6 +195,17 @@ int misc_init_r(void)
int last_stage_init(void)
{
+#if defined(CONFIG_KMCOGE5NE)
+ struct bfticu_iomap *base =
+ (struct bfticu_iomap *)CONFIG_SYS_BFTIC3_BASE;
+ u8 dip_switch = in_8((u8 *)&(base->mswitch)) & BFTICU_DIPSWITCH_MASK;
+
+ if (dip_switch != 0) {
+ /* start bootloader */
+ puts("DIP: Enabled\n");
+ setenv("actual_bank", "0");
+ }
+#endif
set_km_env();
return 0;
}