2 * Copyright (C) 2008 Renesas Solutions Corp.
3 * Copyright (C) 2008 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #include <asm/processor.h>
26 DECLARE_GLOBAL_DATA_PTR;
28 /* PRI control register */
29 #define PRPRICR5 0xFF800048 /* LMB */
30 #define PRPRICR5_D 0x2a
33 #define FPGA_NAND_CTL 0xB410020C
34 #define FPGA_NAND_RST 0x0008
35 #define FPGA_NAND_INIT 0x0000
36 #define FPGA_NAND_RST_WAIT 10000
63 /* Pin Function Controler data */
64 #define PSELA_D 0x1410
65 #define PSELB_D 0x0140
66 #define PSELC_D 0x0000
67 #define PSELD_D 0x0400
69 /* I/O Buffer Hi-Z data */
70 #define HIZCRA_D 0x0000
71 #define HIZCRB_D 0x1000
72 #define HIZCRC_D 0x0000
73 #define HIZCRD_D 0x0000
75 /* Module select reg data */
76 #define MSELCRA_D 0x0014
77 #define MSELCRB_D 0x0018
79 /* Module Stop reg Data */
80 #define MSTPCR2_D 0xFFD9F280
83 extern void init_cpld(void);
87 puts("BOARD: AP325RXA\n");
93 /* Pin Function Controler Init */
99 /* I/O Buffer Hi-Z Init */
100 outw(HIZCRA_D, HIZCRA);
101 outw(HIZCRB_D, HIZCRB);
102 outw(HIZCRC_D, HIZCRC);
103 outw(HIZCRD_D, HIZCRD);
105 /* Module select reg Init */
106 outw(MSELCRA_D, MSELCRA);
107 outw(MSELCRB_D, MSELCRB);
109 /* Module Stop reg Init */
110 outl(MSTPCR2_D, MSTPCR2);
137 /* PRI control register Init */
138 outl(PRPRICR5_D, PRPRICR5);
148 gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE;
149 gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
150 printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE / (1024 * 1024));
154 void led_set_state(unsigned short value)
158 void ide_set_reset(int idereset)
160 outw(FPGA_NAND_RST, FPGA_NAND_CTL); /* NAND RESET */
161 udelay(FPGA_NAND_RST_WAIT);
162 outw(FPGA_NAND_INIT, FPGA_NAND_CTL);
165 int board_eth_init(bd_t *bis)
168 #ifdef CONFIG_SMC911X
169 rc = smc911x_initialize(0, CONFIG_SMC911X_BASE);