Changeset 1561
Legend:
- Unmodified
- Added
- Removed
-
trunk/at25.c
r1560 r1561 165 165 return 0; 166 166 167 msg_cdbg("Some block protection in effect, disabling \n");167 msg_cdbg("Some block protection in effect, disabling... "); 168 168 if (status & (1 << 7)) { 169 169 msg_cdbg("Need to disable Sector Protection Register Lock\n"); … … 176 176 result = spi_write_status_register(flash, status & ~(1 << 7)); 177 177 if (result) { 178 msg_cerr("spi_write_status_register failed \n");178 msg_cerr("spi_write_status_register failed.\n"); 179 179 return result; 180 180 } … … 184 184 result = spi_write_status_register(flash, status & ~0xbc); 185 185 if (result) { 186 msg_cerr("spi_write_status_register failed \n");186 msg_cerr("spi_write_status_register failed.\n"); 187 187 return result; 188 188 } … … 192 192 return 1; 193 193 } 194 msg_cdbg("done.\n"); 194 195 return 0; 195 196 } … … 220 221 return 0; 221 222 222 msg_cdbg("Some block protection in effect, disabling \n");223 msg_cdbg("Some block protection in effect, disabling... "); 223 224 if (status & (1 << 7)) { 224 225 msg_cdbg("Need to disable Status Register Write Protect\n"); … … 226 227 result = spi_write_status_register(flash, status & ~(1 << 7)); 227 228 if (result) { 228 msg_cerr("spi_write_status_register failed \n");229 msg_cerr("spi_write_status_register failed.\n"); 229 230 return result; 230 231 } … … 233 234 result = spi_write_status_register(flash, status & ~0xec); 234 235 if (result) { 235 msg_cerr("spi_write_status_register failed \n");236 msg_cerr("spi_write_status_register failed.\n"); 236 237 return result; 237 238 } … … 241 242 return 1; 242 243 } 244 msg_cdbg("done.\n"); 243 245 return 0; 244 246 } … … 254 256 return 0; 255 257 256 msg_cdbg("Some block protection in effect, disabling \n");258 msg_cdbg("Some block protection in effect, disabling... "); 257 259 if (status & (1 << 7)) { 258 260 msg_cdbg("Need to disable Status Register Write Protect\n"); … … 260 262 result = spi_write_status_register(flash, status & ~(1 << 7)); 261 263 if (result) { 262 msg_cerr("spi_write_status_register failed \n");264 msg_cerr("spi_write_status_register failed.\n"); 263 265 return result; 264 266 } … … 267 269 result = spi_write_status_register(flash, status & ~0xfc); 268 270 if (result) { 269 msg_cerr("spi_write_status_register failed \n");271 msg_cerr("spi_write_status_register failed.\n"); 270 272 return result; 271 273 } … … 275 277 return 1; 276 278 } 277 return 0; 278 } 279 msg_cdbg("done.\n"); 280 return 0; 281 } -
trunk/spi25.c
r1560 r1561 934 934 return 0; 935 935 936 msg_cdbg("Some block protection in effect, disabling \n");936 msg_cdbg("Some block protection in effect, disabling... "); 937 937 result = spi_write_status_register(flash, status & ~0x3c); 938 938 if (result) { 939 msg_cerr("spi_write_status_register failed \n");939 msg_cerr("spi_write_status_register failed.\n"); 940 940 return result; 941 941 } … … 945 945 return 1; 946 946 } 947 msg_cdbg("done.\n"); 947 948 return 0; 948 949 }
Note: See TracChangeset
for help on using the changeset viewer.
