Skip to content

Commit

Permalink
gatemate: remove flash reset, power_up and read_id duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
pu-cc committed Mar 14, 2024
1 parent 1304f67 commit 2e5c35e
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/colognechip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ bool CologneChip::dumpFlash(uint32_t base_addr, uint32_t len)
std::unique_ptr<SPIFlash> flash(_spi ?
new SPIFlash(reinterpret_cast<SPIInterface *>(_spi), false, _verbose):
new SPIFlash(this, false, _verbose));
flash->reset();
flash->power_up();
flash->dump(_filename, base_addr, len);
} catch (std::exception &e) {
printError("Fail");
Expand Down Expand Up @@ -243,11 +241,6 @@ void CologneChip::programSPI_flash(unsigned int offset, const uint8_t *data,

SPIFlash flash(reinterpret_cast<SPIInterface *>(_spi), unprotect_flash,
_verbose);
flash.reset();
flash.power_up();

printf("%02x\n", flash.read_status_reg());
flash.read_id();
flash.erase_and_prog(offset, data, length);

/* verify write if required */
Expand Down Expand Up @@ -334,11 +327,6 @@ void CologneChip::programJTAG_flash(unsigned int offset, const uint8_t *data,
reset();

SPIFlash flash(this, unprotect_flash, _verbose);
flash.reset();
flash.power_up();

printf("%02x\n", flash.read_status_reg());
flash.read_id();
flash.erase_and_prog(offset, data, length);

/* verify write if required */
Expand Down

0 comments on commit 2e5c35e

Please sign in to comment.