Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 1 | /* |
| 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 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 8 | * SPDX-License-Identifier: GPL-2.0+ |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #include <common.h> |
| 12 | #include <asm/io.h> |
| 13 | #include <asm/processor.h> |
| 14 | |
| 15 | #define CPU_CMDREG 0xB1000006 |
| 16 | #define PDCR 0xffef0006 |
| 17 | #define PECR 0xffef0008 |
| 18 | #define PFCR 0xffef000a |
| 19 | #define PGCR 0xffef000c |
| 20 | #define PHCR 0xffef000e |
| 21 | #define PJCR 0xffef0012 |
| 22 | #define PKCR 0xffef0014 |
| 23 | #define PLCR 0xffef0016 |
| 24 | #define PMCR 0xffef0018 |
| 25 | #define PSEL1 0xffef0072 |
| 26 | #define PSEL2 0xffef0074 |
| 27 | #define PSEL3 0xffef0076 |
| 28 | |
| 29 | int checkboard(void) |
| 30 | { |
| 31 | puts("BOARD: Renesas SH7763 RDP\n"); |
| 32 | return 0; |
| 33 | } |
| 34 | |
| 35 | int board_init(void) |
| 36 | { |
| 37 | vu_short dat; |
| 38 | |
Nobuhiro Iwamatsu | 73c4019 | 2008-06-17 16:27:48 +0900 | [diff] [blame] | 39 | /* Enable mode */ |
| 40 | writew(inw(CPU_CMDREG)|0x0001, CPU_CMDREG); |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 41 | |
| 42 | /* GPIO Setting (eth1) */ |
Nobuhiro Iwamatsu | 73c4019 | 2008-06-17 16:27:48 +0900 | [diff] [blame] | 43 | dat = inw(PSEL1); |
| 44 | writew(((dat & ~0xff00) | 0x2400), PSEL1); |
| 45 | writew(0, PFCR); |
| 46 | writew(0, PGCR); |
| 47 | writew(0, PHCR); |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 48 | |
| 49 | return 0; |
| 50 | } |
| 51 | |
Nobuhiro Iwamatsu | 73c4019 | 2008-06-17 16:27:48 +0900 | [diff] [blame] | 52 | void led_set_state(unsigned short value) |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 53 | { |
| 54 | } |