aboutsummaryrefslogtreecommitdiff
path: root/board/rda/rdaarm926ejs/rdaarm926ejs.c
blob: 97c795960392a968d459f02f3dbc5993c21d346d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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;
}