Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Nobuhiro Iwamatsu | f5e2466 | 2008-03-25 17:11:24 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2007,2008 |
| 4 | * Nobuhiro Iwamatsu <iwamatsu@nigauri.org> |
Nobuhiro Iwamatsu | f5e2466 | 2008-03-25 17:11:24 +0900 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <ide.h> |
Nobuhiro Iwamatsu | 3c094b6 | 2008-09-11 17:28:18 +0900 | [diff] [blame] | 9 | #include <netdev.h> |
Nobuhiro Iwamatsu | f5e2466 | 2008-03-25 17:11:24 +0900 | [diff] [blame] | 10 | #include <asm/processor.h> |
Nobuhiro Iwamatsu | 5cd5b2c | 2008-06-17 16:27:44 +0900 | [diff] [blame] | 11 | #include <asm/io.h> |
Nobuhiro Iwamatsu | f5e2466 | 2008-03-25 17:11:24 +0900 | [diff] [blame] | 12 | |
| 13 | int checkboard(void) |
| 14 | { |
| 15 | puts("BOARD: Renesas Solutions R2D Plus\n"); |
| 16 | return 0; |
| 17 | } |
| 18 | |
| 19 | int board_init(void) |
| 20 | { |
| 21 | return 0; |
| 22 | } |
| 23 | |
Nobuhiro Iwamatsu | f5e2466 | 2008-03-25 17:11:24 +0900 | [diff] [blame] | 24 | int board_late_init(void) |
| 25 | { |
| 26 | return 0; |
| 27 | } |
| 28 | |
Nobuhiro Iwamatsu | 5cd5b2c | 2008-06-17 16:27:44 +0900 | [diff] [blame] | 29 | #define FPGA_BASE 0xA4000000 |
| 30 | #define FPGA_CFCTL (FPGA_BASE + 0x04) |
| 31 | #define CFCTL_EN (0x432) |
| 32 | #define FPGA_CFPOW (FPGA_BASE + 0x06) |
| 33 | #define CFPOW_ON (0x02) |
| 34 | #define FPGA_CFCDINTCLR (FPGA_BASE + 0x2A) |
| 35 | #define CFCDINTCLR_EN (0x01) |
Nobuhiro Iwamatsu | f5e2466 | 2008-03-25 17:11:24 +0900 | [diff] [blame] | 36 | |
Nobuhiro Iwamatsu | 5cd5b2c | 2008-06-17 16:27:44 +0900 | [diff] [blame] | 37 | void ide_set_reset(int idereset) |
Nobuhiro Iwamatsu | f5e2466 | 2008-03-25 17:11:24 +0900 | [diff] [blame] | 38 | { |
| 39 | /* if reset = 1 IDE reset will be asserted */ |
Nobuhiro Iwamatsu | 5cd5b2c | 2008-06-17 16:27:44 +0900 | [diff] [blame] | 40 | if (idereset) { |
| 41 | outw(CFCTL_EN, FPGA_CFCTL); /* CF enable */ |
| 42 | outw(inw(FPGA_CFPOW)|CFPOW_ON, FPGA_CFPOW); /* Power OM */ |
| 43 | outw(CFCDINTCLR_EN, FPGA_CFCDINTCLR); /* Int clear */ |
Nobuhiro Iwamatsu | f5e2466 | 2008-03-25 17:11:24 +0900 | [diff] [blame] | 44 | } |
| 45 | } |
| 46 | |
Ben Warren | 0b252f5 | 2008-08-31 21:41:08 -0700 | [diff] [blame] | 47 | int board_eth_init(bd_t *bis) |
| 48 | { |
| 49 | return pci_eth_init(bis); |
| 50 | } |