5 #include <asm/arch/pxa-regs.h>
8 static inline void msWait(unsigned msVal
)
15 unsigned int reg_arr
[] = {
16 0x48000028, CONFIG_SYS_MCMEM0_VAL
,
17 0x4800002c, CONFIG_SYS_MCMEM1_VAL
,
18 0x48000030, CONFIG_SYS_MCATT0_VAL
,
19 0x48000034, CONFIG_SYS_MCATT1_VAL
,
20 0x48000038, CONFIG_SYS_MCIO0_VAL
,
21 0x4800003c, CONFIG_SYS_MCIO1_VAL
,
27 #ifdef CONFIG_EXADRON1
29 volatile unsigned int *v_pBCRReg
=
30 (volatile unsigned int *) 0x08000000;
33 debug ("%s\n", __FUNCTION__
);
37 (*(volatile unsigned int *) reg_arr
[i
]) |= reg_arr
[i
+ 1];
42 debug ("%s: programmed mem controller \n", __FUNCTION__
);
44 #ifdef CONFIG_EXADRON1
46 /*define useful BCR masks */
47 #define BCR_CF_INIT_VAL 0x00007230
48 #define BCR_CF_PWRON_BUSOFF_RESETOFF_VAL 0x00007231
49 #define BCR_CF_PWRON_BUSOFF_RESETON_VAL 0x00007233
50 #define BCR_CF_PWRON_BUSON_RESETON_VAL 0x00007213
51 #define BCR_CF_PWRON_BUSON_RESETOFF_VAL 0x00007211
53 /* we see from the GPIO bit if the card is present */
54 cardDetect
= !(GPLR0
& GPIO_bit (14));
57 printf ("No PCMCIA card found!\n");
60 /* reset the card via the BCR line */
61 *v_pBCRReg
= (unsigned) BCR_CF_INIT_VAL
;
64 *v_pBCRReg
= (unsigned) BCR_CF_PWRON_BUSOFF_RESETOFF_VAL
;
67 *v_pBCRReg
= (unsigned) BCR_CF_PWRON_BUSOFF_RESETON_VAL
;
70 *v_pBCRReg
= (unsigned) BCR_CF_PWRON_BUSON_RESETON_VAL
;
73 *v_pBCRReg
= (unsigned) BCR_CF_PWRON_BUSON_RESETOFF_VAL
;
76 /* enable address bus */
78 /* and the first CF slot */
81 #endif /* EXADRON 1 */
83 rc
= check_ide_device (0); /* use just slot 0 */
88 #if defined(CONFIG_CMD_PCMCIA)