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