summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-03-12 02:10:00 +0100
committerWolfgang Denk <wd@pollux.denx.de>2006-03-12 02:10:00 +0100
commit0afe519a433184fb1270ff0823971130353a807f (patch)
treedcf4e84ada0961ded5df9ebfc2804e882bca57b0 /drivers
parentdc013d464000635a5b8ae841c6e683f94a6bee3d (diff)
downloadu-boot-imx-0afe519a433184fb1270ff0823971130353a807f.zip
u-boot-imx-0afe519a433184fb1270ff0823971130353a807f.tar.gz
u-boot-imx-0afe519a433184fb1270ff0823971130353a807f.tar.bz2
Add ADI Blackfin support
- add support for Analog Devices Blackfin BF533 CPU - add support for the ADI BF533 Stamp uClinux board - add support for the ADI BF533 EZKit board Patches by Richard Klingler, June 11th 2005:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cfi_flash.c12
-rw-r--r--drivers/smc91111.c9
-rw-r--r--drivers/smc91111.h4
3 files changed, 25 insertions, 0 deletions
diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c
index ff4d85f..a989d34 100644
--- a/drivers/cfi_flash.c
+++ b/drivers/cfi_flash.c
@@ -878,18 +878,27 @@ static void flash_write_cmd (flash_info_t * info, flash_sect_t sect, uint offset
debug ("fwc addr %p cmd %x %x 8bit x %d bit\n", addr.cp, cmd,
cword.c, info->chipwidth << CFI_FLASH_SHIFT_WIDTH);
*addr.cp = cword.c;
+#ifdef CONFIG_BLACKFIN
+ asm("ssync;");
+#endif
break;
case FLASH_CFI_16BIT:
debug ("fwc addr %p cmd %x %4.4x 16bit x %d bit\n", addr.wp,
cmd, cword.w,
info->chipwidth << CFI_FLASH_SHIFT_WIDTH);
*addr.wp = cword.w;
+#ifdef CONFIG_BLACKFIN
+ asm("ssync;");
+#endif
break;
case FLASH_CFI_32BIT:
debug ("fwc addr %p cmd %x %8.8lx 32bit x %d bit\n", addr.lp,
cmd, cword.l,
info->chipwidth << CFI_FLASH_SHIFT_WIDTH);
*addr.lp = cword.l;
+#ifdef CONFIG_BLACKFIN
+ asm("ssync;");
+#endif
break;
case FLASH_CFI_64BIT:
#ifdef DEBUG
@@ -904,6 +913,9 @@ static void flash_write_cmd (flash_info_t * info, flash_sect_t sect, uint offset
}
#endif
*addr.llp = cword.ll;
+#ifdef CONFIG_BLACKFIN
+ asm("ssync;");
+#endif
break;
}
}
diff --git a/drivers/smc91111.c b/drivers/smc91111.c
index 84e243d..f91e4b9 100644
--- a/drivers/smc91111.c
+++ b/drivers/smc91111.c
@@ -160,6 +160,9 @@ extern void eth_halt(void);
extern int eth_rx(void);
extern int eth_send(volatile void *packet, int length);
+#ifdef SHARED_RESOURCES
+ extern void swap_to(int device_id);
+#endif
/*
. This is called by register_netdev(). It is responsible for
@@ -533,6 +536,9 @@ static void smc_shutdown()
SMC_SELECT_BANK( 0 );
SMC_outb( RCR_CLEAR, RCR_REG );
SMC_outb( TCR_CLEAR, TCR_REG );
+#ifdef SHARED_RESOURCES
+ swap_to(FLASH);
+#endif
}
@@ -1511,6 +1517,9 @@ static void print_packet( byte * buf, int length )
#endif
int eth_init(bd_t *bd) {
+#ifdef SHARED_RESOURCES
+ swap_to(ETHERNET);
+#endif
return (smc_open(bd));
}
diff --git a/drivers/smc91111.h b/drivers/smc91111.h
index c3c3367..d03cbc3 100644
--- a/drivers/smc91111.h
+++ b/drivers/smc91111.h
@@ -185,6 +185,8 @@ typedef unsigned long int dword;
#ifdef CONFIG_ADNPESC1
#define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+((r)<<1))))
+#elif CONFIG_BLACKFIN
+#define SMC_inw(r) ({ word __v = (*((volatile word *)(SMC_BASE_ADDRESS+(r)))); asm("ssync;"); __v;})
#else
#define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+(r))))
#endif
@@ -192,6 +194,8 @@ typedef unsigned long int dword;
#ifdef CONFIG_ADNPESC1
#define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+((r)<<1))) = d)
+#elif CONFIG_BLACKFIN
+#define SMC_outw(d,r) {(*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d);asm("ssync;");}
#else
#define SMC_outw(d,r) (*((volatile word *)(SMC_BASE_ADDRESS+(r))) = d)
#endif