1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20#include <common.h>
21#include <asm/io.h>
22#include <asm/processor.h>
23#include <asm/pci.h>
24#include <netdev.h>
25
26DECLARE_GLOBAL_DATA_PTR;
27
28int checkboard(void)
29{
30 puts("BOARD: Renesas Technology Corp. R0P7785LC0011RL\n");
31 return 0;
32}
33
34int board_init(void)
35{
36 return 0;
37}
38
39int dram_init(void)
40{
41 gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
42 gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
43 printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
44 return 0;
45}
46
47static struct pci_controller hose;
48void pci_init_board(void)
49{
50 pci_sh7780_init(&hose);
51}
52
53int board_eth_init(bd_t *bis)
54{
55 return pci_eth_init(bis);
56}
57
58#if defined(CONFIG_SH_32BIT)
59int do_pmb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
60{
61
62 writel(0x00000004, 0xff000010);
63
64
65 writel(0, PMB_ADDR_BASE(0));
66 writel(0, PMB_DATA_BASE(0));
67 writel(0, PMB_ADDR_BASE(1));
68 writel(0, PMB_DATA_BASE(1));
69 writel(0, PMB_ADDR_BASE(2));
70 writel(0, PMB_DATA_BASE(2));
71
72
73 writel(mk_pmb_addr_val(0x80), PMB_ADDR_BASE(8));
74 writel(mk_pmb_data_val(0x40, 0, 1, 1, 0, 1, 1), PMB_DATA_BASE(8));
75 writel(mk_pmb_addr_val(0xa0), PMB_ADDR_BASE(12));
76 writel(mk_pmb_data_val(0x40, 1, 1, 1, 0, 0, 1), PMB_DATA_BASE(12));
77
78 return 0;
79}
80
81U_BOOT_CMD(
82 pmb, 1, 1, do_pmb,
83 "pmb - PMB setting\n",
84 "\n"
85 " - PMB setting for all SDRAM mapping"
86);
87#endif
88