X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Farm.git;a=blobdiff_plain;f=betty%2Fflash.c;h=5e1a593a3c22c8206822de342b29d69db8100ecb;hp=f4be416ba03c060b9da558247a913ff4f6ff11f4;hb=ec21607f7dc421c6a474d93b90e9045ec465a222;hpb=be9286b8103eef7df95506c831b48ec5c1d6f32f diff --git a/betty/flash.c b/betty/flash.c index f4be416..5e1a593 100644 --- a/betty/flash.c +++ b/betty/flash.c @@ -29,30 +29,8 @@ unsigned long sector_address[20]={ void flash_init(void) { - /* - * idle clocks between rad & write: 0+1 - * length of read access: 1+3 - * bls lines high during write access - * length of write access: 0+1 - * no write protect, no burst-rom - * 16 bit data width - */ - - BCFG0=0x10000420; // flash 1 - BCFG2=0x10000420; // flash 2 - - /* - * p3.27: write enable - * p3.25: chip select 2 - * p2.15 - p2.8: data bus - * a[1:15] -> address lines - */ - - PINSEL2=(PINSEL2&P2MASK)|(1<<8); - PINSEL2=(PINSEL2&P2MASK&~((1<<15)|(1<<14)))|(1<<14); - PINSEL2=(PINSEL2&P2MASK&~((1<<5)|(1<<4)))|(1<<4); - PINSEL2=(PINSEL2&P2MASK)|(1<<24); - PINSEL2=(PINSEL2&P2MASK&~((1<<27)|(1<<26)|(1<<25)))|(1<<27)|(1<<26); + flash_reset('0'); + flash_reset('2'); } void flash_reset(u8 bank) {