aboutsummaryrefslogtreecommitdiffstats
path: root/package/uboot-xburst/files/board/sakc/sakc.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2010-04-12 18:17:26 +0000
committerLars-Peter Clausen <lars@metafoo.de>2010-04-12 18:17:26 +0000
commit9f68544705ed91439cb1104ef3e17b0f4a9f7853 (patch)
tree507db9e61d7632c134b60a5f8b53d266f2bd1254 /package/uboot-xburst/files/board/sakc/sakc.c
parentf46b3d70d30353c8d3d782dd1814028077edf96e (diff)
downloadmaster-187ad058-9f68544705ed91439cb1104ef3e17b0f4a9f7853.tar.gz
master-187ad058-9f68544705ed91439cb1104ef3e17b0f4a9f7853.tar.bz2
master-187ad058-9f68544705ed91439cb1104ef3e17b0f4a9f7853.zip
[package] Add uboot for xburst package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20832 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/uboot-xburst/files/board/sakc/sakc.c')
-rw-r--r--package/uboot-xburst/files/board/sakc/sakc.c94
1 files changed, 94 insertions, 0 deletions
diff --git a/package/uboot-xburst/files/board/sakc/sakc.c b/package/uboot-xburst/files/board/sakc/sakc.c
new file mode 100644
index 0000000000..85763c7546
--- /dev/null
+++ b/package/uboot-xburst/files/board/sakc/sakc.c
@@ -0,0 +1,94 @@
+/*
+ * Authors: Xiangfu Liu <xiangfu.z@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 3 of the License, or (at your option) any later version.
+ */
+
+#include <common.h>
+#include <command.h>
+#include <asm/mipsregs.h>
+#include <asm/jz4740.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static void gpio_init(void)
+{
+ /*
+ * Initialize NAND Flash Pins
+ */
+ __gpio_as_nand();
+
+ /*
+ * Initialize SDRAM pins
+ */
+ __gpio_as_sdram_16bit_4725();
+
+ /*
+ * Initialize UART0 pins
+ */
+ __gpio_as_uart0();
+
+ /*
+ * Initialize LCD pins
+ */
+ __gpio_as_lcd_18bit();
+
+ /*
+ * Initialize MSC pins
+ */
+ __gpio_as_msc();
+
+ /*
+ * Initialize SSI pins
+ */
+ __gpio_as_ssi();
+
+ /*
+ * Initialize I2C pins
+ */
+ __gpio_as_i2c();
+
+ /*
+ * Initialize MSC pins
+ */
+ __gpio_as_msc();
+
+ /*
+ * Initialize Other pins
+ */
+ __gpio_as_input(GPIO_SD_DETECT);
+ __gpio_disable_pull(GPIO_SD_DETECT);
+}
+/* TODO SAKC
+static void cpm_init(void)
+{
+ __cpm_stop_ipu();
+ __cpm_stop_cim();
+ __cpm_stop_i2c();
+ __cpm_stop_ssi();
+ __cpm_stop_uart1();
+ __cpm_stop_sadc();
+ __cpm_stop_uhc();
+ __cpm_stop_aic1();
+ __cpm_stop_aic2();
+}*/
+
+void board_early_init(void)
+{
+ gpio_init();
+ //cpm_init(); //TODO SAKC
+}
+
+/* U-Boot common routines */
+
+int checkboard (void)
+{
+
+ printf("Board: SAKC (Ingenic XBurst Jz4725 SoC, Speed %d MHz)\n",
+ gd->cpu_clk/1000000);
+
+ return 0; /* success */
+}