blob: 6f9501b47ff4acf7991d0296ffbb730457d5723e [file] [log] [blame]
Nobuhiro Iwamatsu113a37e2008-06-09 13:39:57 +09001/*
2 * Copyright (C) 2008 Renesas Solutions Corp.
3 * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
4 * Copyright (C) 2007 Kenati Technologies, Inc.
5 *
6 * board/sh7763rdp/sh7763rdp.c
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
28#define CPU_CMDREG 0xB1000006
29#define PDCR 0xffef0006
30#define PECR 0xffef0008
31#define PFCR 0xffef000a
32#define PGCR 0xffef000c
33#define PHCR 0xffef000e
34#define PJCR 0xffef0012
35#define PKCR 0xffef0014
36#define PLCR 0xffef0016
37#define PMCR 0xffef0018
38#define PSEL1 0xffef0072
39#define PSEL2 0xffef0074
40#define PSEL3 0xffef0076
41
42int checkboard(void)
43{
44 puts("BOARD: Renesas SH7763 RDP\n");
45 return 0;
46}
47
48int board_init(void)
49{
50 vu_short dat;
51
52 *(vu_short *)(CPU_CMDREG) |= 0x0001;
53
54 /* GPIO Setting (eth1) */
55 dat = *(vu_short *)(PSEL1);
56 *(vu_short *)PSEL1 = ((dat & ~0xff00) | 0x2400);
57 *(vu_short *)PFCR = 0;
58 *(vu_short *)PGCR = 0;
59 *(vu_short *)PHCR = 0;
60
61 return 0;
62}
63
64int dram_init (void)
65{
66 DECLARE_GLOBAL_DATA_PTR;
67
68 gd->bd->bi_memstart = CFG_SDRAM_BASE;
69 gd->bd->bi_memsize = CFG_SDRAM_SIZE;
70 printf("DRAM: %dMB\n", CFG_SDRAM_SIZE / (1024 * 1024));
71 return 0;
72}
73
74void led_set_state (unsigned short value)
75{
76}