aboutsummaryrefslogtreecommitdiff
path: root/board/rda/rdaarm926ejs/rdaarm926ejs.c
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2017-07-31 17:23:07 +0100
committerDaniel Thompson <daniel.thompson@linaro.org>2017-07-31 17:23:07 +0100
commite5b9b8c8b78096e961f4a45b9d1418e4641f24f9 (patch)
treea88f532f386376fca6a376e2c362173f971dc144 /board/rda/rdaarm926ejs/rdaarm926ejs.c
parent415d386877df49eb051b85ef74fa59a16dc17c7d (diff)
Orangepi i96 support (mega patch)rda/v2012.04.01-r0
This is https://github.com/orangepi-xunlong/OrangePiRDA_u-boot 5ee06c1afb7c ("add new patch a patch") as a single patch against a guestimated upstream version. This is merely a reference tree for later comparisons. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> NOT-Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'board/rda/rdaarm926ejs/rdaarm926ejs.c')
-rw-r--r--board/rda/rdaarm926ejs/rdaarm926ejs.c67
1 files changed, 67 insertions, 0 deletions
diff --git a/board/rda/rdaarm926ejs/rdaarm926ejs.c b/board/rda/rdaarm926ejs/rdaarm926ejs.c
new file mode 100644
index 0000000000..97c7959603
--- /dev/null
+++ b/board/rda/rdaarm926ejs/rdaarm926ejs.c
@@ -0,0 +1,67 @@
+#include <common.h>
+#include <asm/arch/hardware.h>
+#include <asm/io.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void rda_dump_buf(char *data, size_t len)
+{
+ char temp_buf[64];
+ size_t i, off = 0;
+
+ memset(temp_buf, 0, 64);
+ for (i=0;i<len;i++) {
+ if(i%8 == 0) {
+ sprintf(&temp_buf[off], " ");
+ off += 2;
+ }
+ sprintf(&temp_buf[off], "%02x ", data[i]);
+ off += 3;
+ if((i+1)%16 == 0 || (i+1) == len) {
+ printf("%s\n", temp_buf);
+ memset(temp_buf, 0, 64);
+ off = 0;
+ }
+ }
+ printf("\n");
+}
+
+/*
+ * get_board_rev() - setup to pass kernel board revision information
+ * Returns:
+ * bit[0-3] Maximum cpu clock rate supported by onboard SoC
+ */
+u32 get_board_rev(void)
+{
+ u32 rev = 0;
+ return rev;
+}
+
+int board_init(void)
+{
+ /* arch number of the board */
+ gd->bd->bi_arch_number = MACH_TYPE_RDAARM926EJS;
+
+ /* address of boot parameters */
+ gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
+
+ return 0;
+}
+
+#ifdef CONFIG_RDA_MMC
+int rda_mmc_init(void);
+#endif
+
+int board_mmc_init(bd_t *bis)
+{
+ int err = -1;
+
+#ifdef CONFIG_RDA_MMC
+ err = rda_mmc_init();
+ if (err)
+ return err;
+#endif
+
+ return err;
+}
+