]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/mpl/vcma9/vcma9.h
7a32343748dd467b956d3df19e096eeefb37cf11
2 * (C) Copyright 2002, 2003
3 * David Mueller, ELSOFT AG, d.mueller@elsoft.ch
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 /****************************************************************************
25 * Global routines used for VCMA9
26 *****************************************************************************/
30 extern int mem_test(unsigned long start
, unsigned long ramsize
,int mode
);
32 void print_vcma9_info(void);
34 #if defined(CONFIG_CMD_NAND)
40 static inline void NF_Conf(u16 conf
)
42 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
47 static inline void NF_Cmd(u8 cmd
)
49 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
54 static inline void NF_CmdW(u8 cmd
)
60 static inline void NF_Addr(u8 addr
)
62 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
67 static inline void NF_SetCE(NFCE_STATE s
)
69 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
73 nand
->NFCONF
&= ~(1<<11);
77 nand
->NFCONF
|= (1<<11);
82 static inline void NF_WaitRB(void)
84 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
86 while (!(nand
->NFSTAT
& (1<<0)));
89 static inline void NF_Write(u8 data
)
91 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
96 static inline u8
NF_Read(void)
98 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
100 return(nand
->NFDATA
);
103 static inline void NF_Init_ECC(void)
105 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
107 nand
->NFCONF
|= (1<<12);
110 static inline u32
NF_Read_ECC(void)
112 S3C2410_NAND
* const nand
= S3C2410_GetBase_NAND();
119 /* VCMA9 PLD regsiters */
128 } /*__attribute__((__packed__))*/ VCMA9_PLD
;
130 #define VCMA9_PLD_BASE 0x2C000100
131 static inline VCMA9_PLD
* const VCMA9_GetBase_PLD(void)
133 return (VCMA9_PLD
* const)VCMA9_PLD_BASE
;