/*
* U-boot - stamp.c STAMP board specific routines
*
- * Copyright (c) 2005 blackfin.uclinux.org
+ * Copyright (c) 2005-2007 Analog Devices Inc.
*
* (C) Copyright 2000-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
*/
#include <common.h>
#include <asm/mem_init.h>
+#include <asm/io.h>
#include "bf533-stamp.h"
+DECLARE_GLOBAL_DATA_PTR;
+
#define STATUS_LED_OFF 0
#define STATUS_LED_ON 1
int checkboard(void)
{
-#if (BFIN_CPU == ADSP_BF531)
- printf("CPU: ADSP BF531 Rev.: 0.%d\n", *pCHIPID >> 28);
-#elif (BFIN_CPU == ADSP_BF532)
- printf("CPU: ADSP BF532 Rev.: 0.%d\n", *pCHIPID >> 28);
-#else
- printf("CPU: ADSP BF533 Rev.: 0.%d\n", *pCHIPID >> 28);
-#endif
printf("Board: ADI BF533 Stamp board\n");
printf(" Support: http://blackfin.uclinux.org/\n");
return 0;
}
-long int initdram(int board_type)
+phys_size_t initdram(int board_type)
{
- DECLARE_GLOBAL_DATA_PTR;
#ifdef DEBUG
printf("SDRAM attributes:\n");
printf
if (device_id == ETHERNET) {
*pFIO_DIR = PF0;
- __builtin_bfin_ssync();
+ SSYNC();
*pFIO_FLAG_S = PF0;
- __builtin_bfin_ssync();
+ SSYNC();
} else if (device_id == FLASH) {
*pFIO_DIR = (PF4 | PF3 | PF2 | PF1 | PF0);
*pFIO_FLAG_S = (PF4 | PF3 | PF2);
*pFIO_EDGE = (PF8 | PF7 | PF6 | PF5);
*pFIO_INEN = (PF8 | PF7 | PF6 | PF5);
*pFIO_FLAG_D = (PF4 | PF3 | PF2);
- __builtin_bfin_ssync();
+ SSYNC();
} else {
printf("Unknown bank to switch\n");
}
*/
*pFIO_FLAG_S = CF_PF0;
*pFIO_FLAG_C = CF_PF1;
- __builtin_bfin_ssync();
+ SSYNC();
*(addr) = val;
- __builtin_bfin_ssync();
+ SSYNC();
/* Setback PF1 PF0 to 0 0 to address external
* memory banks */
*(volatile unsigned short *)pFIO_FLAG_C = CF_PF1_PF0;
- __builtin_bfin_ssync();
+ SSYNC();
}
unsigned char cf_inb(volatile unsigned char *addr)
*pFIO_FLAG_S = CF_PF0;
*pFIO_FLAG_C = CF_PF1;
- __builtin_bfin_ssync();
+ SSYNC();
c = *(addr);
- __builtin_bfin_ssync();
+ SSYNC();
*pFIO_FLAG_C = CF_PF1_PF0;
- __builtin_bfin_ssync();
+ SSYNC();
return c;
}
*pFIO_FLAG_S = CF_PF0;
*pFIO_FLAG_C = CF_PF1;
- __builtin_bfin_ssync();
+ SSYNC();
for (i = 0; i < words; i++) {
*(sect_buf + i) = *(addr);
- __builtin_bfin_ssync();
+ SSYNC();
}
*pFIO_FLAG_C = CF_PF1_PF0;
- __builtin_bfin_ssync();
+ SSYNC();
}
void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
*pFIO_FLAG_S = CF_PF0;
*pFIO_FLAG_C = CF_PF1;
- __builtin_bfin_ssync();
+ SSYNC();
for (i = 0; i < words; i++) {
*(addr) = *(sect_buf + i);
- __builtin_bfin_ssync();
+ SSYNC();
}
*pFIO_FLAG_C = CF_PF1_PF0;
- __builtin_bfin_ssync();
+ SSYNC();
}
#endif
*pFIO_FLAG_S = PF4;
else
*pFIO_FLAG_C = PF4;
- __builtin_bfin_ssync();
+ SSYNC();
}
void show_boot_progress(int status)