Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Nobuhiro Iwamatsu | 52f73c0 | 2008-08-31 22:45:08 +0900 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2008 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> |
Nobuhiro Iwamatsu | 52f73c0 | 2008-08-31 22:45:08 +0900 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include <common.h> |
| 7 | #include <asm/io.h> |
| 8 | #include <asm/processor.h> |
| 9 | #include <asm/pci.h> |
Yoshihiro Shimoda | b163fcf | 2008-09-09 17:52:47 +0900 | [diff] [blame] | 10 | #include <netdev.h> |
Nobuhiro Iwamatsu | 52f73c0 | 2008-08-31 22:45:08 +0900 | [diff] [blame] | 11 | |
| 12 | int checkboard(void) |
| 13 | { |
| 14 | puts("BOARD: Renesas Technology Corp. R0P7785LC0011RL\n"); |
| 15 | return 0; |
| 16 | } |
| 17 | |
| 18 | int board_init(void) |
| 19 | { |
Nobuhiro Iwamatsu | 52f73c0 | 2008-08-31 22:45:08 +0900 | [diff] [blame] | 20 | return 0; |
| 21 | } |
| 22 | |
| 23 | static struct pci_controller hose; |
| 24 | void pci_init_board(void) |
| 25 | { |
| 26 | pci_sh7780_init(&hose); |
| 27 | } |
| 28 | |
Yoshihiro Shimoda | b163fcf | 2008-09-09 17:52:47 +0900 | [diff] [blame] | 29 | int board_eth_init(bd_t *bis) |
| 30 | { |
| 31 | return pci_eth_init(bis); |
| 32 | } |
Yoshihiro Shimoda | 22dc9ec | 2009-03-03 15:11:17 +0900 | [diff] [blame] | 33 | |
| 34 | #if defined(CONFIG_SH_32BIT) |
Wolfgang Denk | 6262d021 | 2010-06-28 22:00:46 +0200 | [diff] [blame] | 35 | int do_pmb(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) |
Yoshihiro Shimoda | 22dc9ec | 2009-03-03 15:11:17 +0900 | [diff] [blame] | 36 | { |
| 37 | /* clear ITLB */ |
| 38 | writel(0x00000004, 0xff000010); |
| 39 | |
| 40 | /* delete PMB for peripheral */ |
| 41 | writel(0, PMB_ADDR_BASE(0)); |
| 42 | writel(0, PMB_DATA_BASE(0)); |
| 43 | writel(0, PMB_ADDR_BASE(1)); |
| 44 | writel(0, PMB_DATA_BASE(1)); |
| 45 | writel(0, PMB_ADDR_BASE(2)); |
| 46 | writel(0, PMB_DATA_BASE(2)); |
| 47 | |
| 48 | /* add PMB for SDRAM(0x40000000 - 0x47ffffff) */ |
| 49 | writel(mk_pmb_addr_val(0x80), PMB_ADDR_BASE(8)); |
| 50 | writel(mk_pmb_data_val(0x40, 0, 1, 1, 0, 1, 1), PMB_DATA_BASE(8)); |
| 51 | writel(mk_pmb_addr_val(0xa0), PMB_ADDR_BASE(12)); |
| 52 | writel(mk_pmb_data_val(0x40, 1, 1, 1, 0, 0, 1), PMB_DATA_BASE(12)); |
| 53 | |
| 54 | return 0; |
| 55 | } |
| 56 | |
| 57 | U_BOOT_CMD( |
| 58 | pmb, 1, 1, do_pmb, |
| 59 | "pmb - PMB setting\n", |
| 60 | "\n" |
Wolfgang Denk | c54781c | 2009-05-24 17:06:54 +0200 | [diff] [blame] | 61 | " - PMB setting for all SDRAM mapping" |
Yoshihiro Shimoda | 22dc9ec | 2009-03-03 15:11:17 +0900 | [diff] [blame] | 62 | ); |
| 63 | #endif |