]>
Commit | Line | Data |
---|---|---|
8ca805e1 NI |
1 | /* |
2 | * Copyright (C) 2011 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> | |
3 | * Copyright (C) 2011 Renesas Solutions Corp. | |
4 | * | |
5 | * See file CREDITS for list of people who contributed to this | |
6 | * project. | |
7 | * | |
8 | * This program is free software; you can redistribute it and/or | |
9 | * modify it under the terms of the GNU General Public License as | |
10 | * published by the Free Software Foundation; either version 2 of | |
11 | * the License, or (at your option) any later version. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, | |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | * GNU General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with this program; if not, write to the Free Software | |
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
21 | * MA 02111-1307 USA | |
22 | */ | |
23 | ||
24 | #include <common.h> | |
25 | #include <asm/io.h> | |
26 | #include <asm/processor.h> | |
27 | #include <netdev.h> | |
28 | ||
29 | DECLARE_GLOBAL_DATA_PTR; | |
30 | ||
31 | #define MODEMR (0xFFCC0020) | |
32 | #define MODEMR_MASK (0x6) | |
33 | #define MODEMR_533MHZ (0x2) | |
34 | ||
35 | int checkboard(void) | |
36 | { | |
37 | u32 r = readl(MODEMR); | |
38 | if ((r & MODEMR_MASK) & MODEMR_533MHZ) | |
39 | puts("CPU Clock: 533MHz\n"); | |
40 | else | |
41 | puts("CPU Clock: 400MHz\n"); | |
42 | ||
43 | puts("BOARD: Renesas Technology Corp. R0P7734C00000RZ\n"); | |
44 | return 0; | |
45 | } | |
46 | ||
47 | #define MSTPSR1 (0xFFC80044) | |
48 | #define MSTPCR1 (0xFFC80034) | |
49 | #define MSTPSR1_GETHER (1 << 14) | |
50 | ||
51 | int board_init(void) | |
52 | { | |
53 | #if defined(CONFIG_SH_ETHER) | |
54 | u32 r = readl(MSTPSR1); | |
55 | if (r & MSTPSR1_GETHER) | |
56 | writel((r & ~MSTPSR1_GETHER), MSTPCR1); | |
57 | #endif | |
58 | return 0; | |
59 | } | |
60 | ||
61 | int dram_init(void) | |
62 | { | |
63 | gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; | |
64 | gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; | |
65 | printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024)); | |
66 | ||
67 | return 0; | |
68 | } | |
69 | ||
70 | #ifdef CONFIG_SMC911X | |
71 | int board_eth_init(bd_t *bis) | |
72 | { | |
73 | int rc = 0; | |
74 | rc = smc911x_initialize(0, CONFIG_SMC911X_BASE); | |
75 | return rc; | |
76 | } | |
77 | #endif | |
78 |