11#include "acflash_internal.h"
13static int flash_erase_0(flash_addr_t addr);
14static int flash_program_0(flash_addr_t addr,
const flash_data_t *buf,
int size);
15static int flash_reset_0(flash_addr_t addr);
16static int flash_status_0(flash_addr_t addr);
19 "Fujitsu 29F033C", 131072u, 64u, 0, &flash_erase_0, &flash_program_0, &flash_reset_0, &flash_status_0};
21static void flash_delay(
int x)
30static int flash_erase_0(flash_addr_t addr)
41 *(
volatile acUint16 *)addr = 0xAAAA;
42 *(
volatile acUint16 *)addr = 0x5555;
43 *(
volatile acUint16 *)addr = 0x8080;
44 *(
volatile acUint16 *)addr = 0xAAAA;
45 *(
volatile acUint16 *)addr = 0x5555;
46 *(
volatile acUint16 *)addr = 0x3030;
55 tmp_var = *(
volatile acUint16 *)addr >> (8 * i);
58 v8 = tmp_var ^ (*(
volatile acUint16 *)addr >> (shift & 0xFF));
59 tmp_var = *(
volatile acUint16 *)addr >> (shift & 0xFF);
60 if ( ((v8 >> 6) & 1) == 0 )
67 }
while ( ((uiptr)tmp_var & 0x20) == 0 );
68 if ( ((tmp_var ^ ((*(
volatile acUint16 *)addr >> (shift & 0xFF)) & 0xFF)) & 0x40) == 0 )
80static int flash_program_0(flash_addr_t addr,
const flash_data_t *buf,
int size)
107 *(
volatile acUint16 *)addr = 0xAAAA;
108 *(
volatile acUint16 *)addr = 0x5555;
109 *(
volatile acUint16 *)addr = 0xA0A0;
111 *(
volatile acUint16 *)addr = data;
115 d = (v11 >> (shift & 0xFF)) & 0xFF;
117 v15 = (v11 >> (shift & 0xFF)) & 0xFF;
120 x = ((int)*(
volatile acUint16 *)addr >> (shift & 0xFF)) & 0xFF;
123 if ( threshold <= 0 )
132 }
while ( (x & 0x20) == 0 );
133 if ( d == (((
int)*(
volatile acUint16 *)addr >> (shift & 0xFF)) & 0xFF) )
147static int flash_reset_0(flash_addr_t addr)
149 *(acUint16 *)addr = 0xF0F0;
154static int flash_status_0(flash_addr_t addr)
161 for ( i = 1; i >= 0; --i )
168flash_ops_t flash_probe_mbm29f033c(flash_addr_t addr)
174 *(
volatile acUint16 *)addr = 0xAAAA;
175 *(
volatile acUint16 *)addr = 0x5555;
176 *(
volatile acUint16 *)addr = 0x9090;
178 vendor = *(
volatile acUint16 *)addr;
179 device = *(
volatile acUint16 *)(addr + 2);
182 if ( vendor != 0x404 || device != 0xD4D4 )
u32 count
start sector of fragmented bd/file