X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fbf533-stamp%2Fbf533-stamp.c;h=69e425bf974e7cf69a96d31067feca236416d3a4;hb=f930922f061ea7bf585296859d1c14194c24b840;hp=3e074e3a1b23f56f058980bdb61fc8e0895e8bb6;hpb=3f0606ad0b5639f7f22848fe5b4574e754d0470f;p=oweals%2Fu-boot.git diff --git a/board/bf533-stamp/bf533-stamp.c b/board/bf533-stamp/bf533-stamp.c index 3e074e3a1b..69e425bf97 100644 --- a/board/bf533-stamp/bf533-stamp.c +++ b/board/bf533-stamp/bf533-stamp.c @@ -1,7 +1,7 @@ /* * 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. @@ -21,14 +21,17 @@ * * 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 #include +#include #include "bf533-stamp.h" +DECLARE_GLOBAL_DATA_PTR; + #define STATUS_LED_OFF 0 #define STATUS_LED_ON 1 @@ -54,7 +57,6 @@ int checkboard(void) long int initdram(int board_type) { - DECLARE_GLOBAL_DATA_PTR; #ifdef DEBUG printf("SDRAM attributes:\n"); printf @@ -74,9 +76,9 @@ void swap_to(int device_id) if (device_id == ETHERNET) { *pFIO_DIR = PF0; - __builtin_bfin_ssync(); + sync(); *pFIO_FLAG_S = PF0; - __builtin_bfin_ssync(); + sync(); } else if (device_id == FLASH) { *pFIO_DIR = (PF4 | PF3 | PF2 | PF1 | PF0); *pFIO_FLAG_S = (PF4 | PF3 | PF2); @@ -86,7 +88,7 @@ void swap_to(int device_id) *pFIO_EDGE = (PF8 | PF7 | PF6 | PF5); *pFIO_INEN = (PF8 | PF7 | PF6 | PF5); *pFIO_FLAG_D = (PF4 | PF3 | PF2); - __builtin_bfin_ssync(); + sync(); } else { printf("Unknown bank to switch\n"); } @@ -153,15 +155,15 @@ void cf_outb(unsigned char val, volatile unsigned char *addr) */ *pFIO_FLAG_S = CF_PF0; *pFIO_FLAG_C = CF_PF1; - __builtin_bfin_ssync(); + sync(); *(addr) = val; - __builtin_bfin_ssync(); + sync(); /* Setback PF1 PF0 to 0 0 to address external * memory banks */ *(volatile unsigned short *)pFIO_FLAG_C = CF_PF1_PF0; - __builtin_bfin_ssync(); + sync(); } unsigned char cf_inb(volatile unsigned char *addr) @@ -170,13 +172,13 @@ unsigned char cf_inb(volatile unsigned char *addr) *pFIO_FLAG_S = CF_PF0; *pFIO_FLAG_C = CF_PF1; - __builtin_bfin_ssync(); + sync(); c = *(addr); - __builtin_bfin_ssync(); + sync(); *pFIO_FLAG_C = CF_PF1_PF0; - __builtin_bfin_ssync(); + sync(); return c; } @@ -187,15 +189,15 @@ void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words) *pFIO_FLAG_S = CF_PF0; *pFIO_FLAG_C = CF_PF1; - __builtin_bfin_ssync(); + sync(); for (i = 0; i < words; i++) { *(sect_buf + i) = *(addr); - __builtin_bfin_ssync(); + sync(); } *pFIO_FLAG_C = CF_PF1_PF0; - __builtin_bfin_ssync(); + sync(); } void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words) @@ -204,15 +206,15 @@ 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(); + sync(); for (i = 0; i < words; i++) { *(addr) = *(sect_buf + i); - __builtin_bfin_ssync(); + sync(); } *pFIO_FLAG_C = CF_PF1_PF0; - __builtin_bfin_ssync(); + sync(); } #endif @@ -233,7 +235,7 @@ void stamp_led_set(int LED1, int LED2, int LED3) *pFIO_FLAG_S = PF4; else *pFIO_FLAG_C = PF4; - __builtin_bfin_ssync(); + sync(); } void show_boot_progress(int status)