mirror of
https://github.com/captain-amygdala/pistorm.git
synced 2026-04-27 20:38:37 +00:00
Some stability improvements for Chip fastpath?
This commit is contained in:
@@ -232,7 +232,10 @@ void ps_write_status_reg(unsigned int value) {
|
||||
*(gpio + 7) = ((value & 0xffff) << 8) | (REG_STATUS << PIN_A0);
|
||||
|
||||
*(gpio + 7) = 1 << PIN_WR;
|
||||
*(gpio + 7) = 1 << PIN_WR; // delay
|
||||
*(gpio + 7) = 1 << PIN_WR; // delay
|
||||
#ifdef CHIP_FASTPATH
|
||||
*(gpio + 7) = 1 << PIN_WR; // delay 210810
|
||||
#endif
|
||||
*(gpio + 10) = 1 << PIN_WR;
|
||||
*(gpio + 10) = 0xffffec;
|
||||
|
||||
@@ -247,9 +250,14 @@ unsigned int ps_read_status_reg() {
|
||||
*(gpio + 7) = 1 << PIN_RD;
|
||||
*(gpio + 7) = 1 << PIN_RD;
|
||||
*(gpio + 7) = 1 << PIN_RD;
|
||||
#ifdef CHIP_FASTPATH
|
||||
*(gpio + 7) = 1 << PIN_RD; // delay 210810
|
||||
*(gpio + 7) = 1 << PIN_RD; // delay 210810
|
||||
#endif
|
||||
|
||||
unsigned int value = *(gpio + 13);
|
||||
|
||||
while ((value=*(gpio + 13)) & (1 << PIN_TXN_IN_PROGRESS)) {}
|
||||
|
||||
*(gpio + 10) = 0xffffec;
|
||||
|
||||
return (value >> 8) & 0xffff;
|
||||
@@ -270,6 +278,7 @@ void ps_pulse_reset() {
|
||||
|
||||
unsigned int ps_get_ipl_zero() {
|
||||
unsigned int value = *(gpio + 13);
|
||||
while ((value=*(gpio + 13)) & (1 << PIN_TXN_IN_PROGRESS)) {}
|
||||
return value & (1 << PIN_IPL_ZERO);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user