Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2008 Renesas Solutions Corp. |
| 4 | * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> |
| 5 | * Copyright (C) 2007 Kenati Technologies, Inc. |
| 6 | * |
| 7 | * board/sh7763rdp/sh7763rdp.c |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #include <common.h> |
| 11 | #include <asm/io.h> |
| 12 | #include <asm/processor.h> |
| 13 | |
| 14 | #define CPU_CMDREG 0xB1000006 |
| 15 | #define PDCR 0xffef0006 |
| 16 | #define PECR 0xffef0008 |
| 17 | #define PFCR 0xffef000a |
| 18 | #define PGCR 0xffef000c |
| 19 | #define PHCR 0xffef000e |
| 20 | #define PJCR 0xffef0012 |
| 21 | #define PKCR 0xffef0014 |
| 22 | #define PLCR 0xffef0016 |
| 23 | #define PMCR 0xffef0018 |
| 24 | #define PSEL1 0xffef0072 |
| 25 | #define PSEL2 0xffef0074 |
| 26 | #define PSEL3 0xffef0076 |
| 27 | |
| 28 | int checkboard(void) |
| 29 | { |
| 30 | puts("BOARD: Renesas SH7763 RDP\n"); |
| 31 | return 0; |
| 32 | } |
| 33 | |
| 34 | int board_init(void) |
| 35 | { |
| 36 | vu_short dat; |
| 37 | |
Nobuhiro Iwamatsu | 73c4019 | 2008-06-17 16:27:48 +0900 | [diff] [blame] | 38 | /* Enable mode */ |
| 39 | writew(inw(CPU_CMDREG)|0x0001, CPU_CMDREG); |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 40 | |
| 41 | /* GPIO Setting (eth1) */ |
Nobuhiro Iwamatsu | 73c4019 | 2008-06-17 16:27:48 +0900 | [diff] [blame] | 42 | dat = inw(PSEL1); |
| 43 | writew(((dat & ~0xff00) | 0x2400), PSEL1); |
| 44 | writew(0, PFCR); |
| 45 | writew(0, PGCR); |
| 46 | writew(0, PHCR); |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 47 | |
| 48 | return 0; |
| 49 | } |
| 50 | |
Nobuhiro Iwamatsu | 73c4019 | 2008-06-17 16:27:48 +0900 | [diff] [blame] | 51 | void led_set_state(unsigned short value) |
Nobuhiro Iwamatsu | 113a37e | 2008-06-09 13:39:57 +0900 | [diff] [blame] | 52 | { |
| 53 | } |