summaryrefslogtreecommitdiff
path: root/board/innokom/innokom.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-03-06 13:39:27 +0000
committerwdenk <wdenk>2003-03-06 13:39:27 +0000
commit47cd00fa707af9de76408b69d3e911717dbbfab1 (patch)
treedd887729a4eaf11e7a225563f4c604ef4b7d695b /board/innokom/innokom.c
parentdb2f721ffcf9693086a7e5c6c7015f2019e7f52e (diff)
downloadu-boot-imx-47cd00fa707af9de76408b69d3e911717dbbfab1.zip
u-boot-imx-47cd00fa707af9de76408b69d3e911717dbbfab1.tar.gz
u-boot-imx-47cd00fa707af9de76408b69d3e911717dbbfab1.tar.bz2
* Patches by Robert Schwebel, 06 Mar 2003:
- fix bug in BOOTP code (must use NetCopyIP) - update of CSB226 port - clear BSS segment on XScale - added support for i2c_init_board() function - update to the Innokom plattform * Extend support for redundand environments for configurations where environment size < sector size
Diffstat (limited to 'board/innokom/innokom.c')
-rw-r--r--board/innokom/innokom.c50
1 files changed, 47 insertions, 3 deletions
diff --git a/board/innokom/innokom.c b/board/innokom/innokom.c
index 7d2702f..17f6353 100644
--- a/board/innokom/innokom.c
+++ b/board/innokom/innokom.c
@@ -25,6 +25,7 @@
#include <common.h>
#include <asm/arch/pxa-regs.h>
+#include <asm/mach-types.h>
#ifdef CONFIG_SHOW_BOOT_PROGRESS
# define SHOW_BOOT_PROGRESS(arg) show_boot_progress(arg)
@@ -32,10 +33,53 @@
# define SHOW_BOOT_PROGRESS(arg)
#endif
-/*
- * Miscelaneous platform dependent initialisations
+/**
+ * i2c_init_board - reset i2c bus. When the board is powercycled during a
+ * bus transfer it might hang; for details see doc/I2C_Edge_Conditions.
+ * The Innokom board has GPIO70 connected to SCLK which can be toggled
+ * until all chips think that their current cycles are finished.
+ */
+int i2c_init_board(void)
+{
+ int i;
+
+ /* set gpio pin to output */
+ GPDR(70) |= GPIO_bit(70);
+ for (i = 0; i < 11; i++) {
+ GPCR(70) = GPIO_bit(70);
+ udelay(10);
+ GPSR(70) = GPIO_bit(70);
+ udelay(10);
+ }
+ /* set gpio pin to input */
+ GPDR(70) &= ~GPIO_bit(70);
+
+ return 0;
+}
+
+
+/**
+ * misc_init_r: - misc initialisation routines
*/
+int misc_init_r(void)
+{
+ uchar *str;
+
+ /* determine if the software update key is pressed during startup */
+ if (GPLR0 & 0x00000800) {
+ printf("using bootcmd_normal (sw-update button not pressed)\n");
+ str = getenv("bootcmd_normal");
+ } else {
+ printf("using bootcmd_update (sw-update button pressed)\n");
+ str = getenv("bootcmd_update");
+ }
+
+ setenv("bootcmd",str);
+
+ return 0;
+}
+
/**
* board_init: - setup some data structures
@@ -51,7 +95,7 @@ int board_init (void)
/* so we do _nothing_ here */
/* arch number of Innokom board */
- gd->bd->bi_arch_number = 258;
+ gd->bd->bi_arch_number = MACH_TYPE_INNOKOM;
/* adress of boot parameters */
gd->bd->bi_boot_params = 0xa0000100;