2 * Copyright (C) 2011 Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
3 * Copyright (C) 2011 Renesas Solutions Corp.
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/processor.h>
14 DECLARE_GLOBAL_DATA_PTR;
16 #define MODEMR (0xFFCC0020)
17 #define MODEMR_MASK (0x6)
18 #define MODEMR_533MHZ (0x2)
22 u32 r = readl(MODEMR);
23 if ((r & MODEMR_MASK) & MODEMR_533MHZ)
24 puts("CPU Clock: 533MHz\n");
26 puts("CPU Clock: 400MHz\n");
28 puts("BOARD: Renesas Technology Corp. R0P7734C00000RZ\n");
32 #define MSTPSR1 (0xFFC80044)
33 #define MSTPCR1 (0xFFC80034)
34 #define MSTPSR1_GETHER (1 << 14)
38 #if defined(CONFIG_SH_ETHER)
39 u32 r = readl(MSTPSR1);
40 if (r & MSTPSR1_GETHER)
41 writel((r & ~MSTPSR1_GETHER), MSTPCR1);
47 int board_late_init(void)
51 /* Read Mac Address and set*/
52 i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
53 i2c_set_bus_num(CONFIG_SYS_I2C_MODULE);
55 /* Read MAC address */
56 i2c_read(0x50, 0x10, 0, mac, 6);
58 if (is_valid_ethaddr(mac))
59 eth_setenv_enetaddr("ethaddr", mac);
66 gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
67 gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
68 printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
74 int board_eth_init(bd_t *bis)
77 rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);