]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/ap325rxa/ap325rxa.c
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,
23 #include <asm/processor.h>
25 /* PRI control register */
26 #define PRPRICR5 0xFF800048 /* LMB */
27 #define PRPRICR5_D 0x2a
30 #define FPGA_NAND_CTL 0xB410020C
31 #define FPGA_NAND_RST 0x0008
32 #define FPGA_NAND_INIT 0x0000
33 #define FPGA_NAND_RST_WAIT 10000
60 /* Pin Function Controler data */
61 #define PSELA_D 0x1410
62 #define PSELB_D 0x0140
63 #define PSELC_D 0x0000
64 #define PSELD_D 0x0400
66 /* I/O Buffer Hi-Z data */
67 #define HIZCRA_D 0x0000
68 #define HIZCRB_D 0x1000
69 #define HIZCRC_D 0x0000
70 #define HIZCRD_D 0x0000
72 /* Module select reg data */
73 #define MSELCRA_D 0x0014
74 #define MSELCRB_D 0x0018
76 /* Module Stop reg Data */
77 #define MSTPCR2_D 0xFFD9F280
80 extern void init_cpld(void);
84 puts("BOARD: AP325RXA\n");
90 /* Pin Function Controler Init */
96 /* I/O Buffer Hi-Z Init */
97 outw(HIZCRA_D
, HIZCRA
);
98 outw(HIZCRB_D
, HIZCRB
);
99 outw(HIZCRC_D
, HIZCRC
);
100 outw(HIZCRD_D
, HIZCRD
);
102 /* Module select reg Init */
103 outw(MSELCRA_D
, MSELCRA
);
104 outw(MSELCRB_D
, MSELCRB
);
106 /* Module Stop reg Init */
107 outl(MSTPCR2_D
, MSTPCR2
);
134 /* PRI control register Init */
135 outl(PRPRICR5_D
, PRPRICR5
);
145 DECLARE_GLOBAL_DATA_PTR
;
147 gd
->bd
->bi_memstart
= CONFIG_SYS_SDRAM_BASE
;
148 gd
->bd
->bi_memsize
= CONFIG_SYS_SDRAM_SIZE
;
149 printf("DRAM: %dMB\n", CONFIG_SYS_SDRAM_SIZE
/ (1024 * 1024));
153 void led_set_state(unsigned short value
)
157 void ide_set_reset(int idereset
)
159 outw(FPGA_NAND_RST
, FPGA_NAND_CTL
); /* NAND RESET */
160 udelay(FPGA_NAND_RST_WAIT
);
161 outw(FPGA_NAND_INIT
, FPGA_NAND_CTL
);