LARGE_FLASH check now more explicit

This commit is contained in:
Benjamin Sølberg 2023-08-22 09:08:03 +02:00 committed by Konrad Beckmann
parent 64cd24396d
commit 7f402f4c6f
1 changed files with 4 additions and 4 deletions

View File

@ -64,12 +64,12 @@ proc hxa-001_qspi_init { } {
mmw 0x52005000 0x30000000 0x00000001 ;# OCTOSPI_CR |= FMODE=0x3, &= ~EN
if { [env LARGE_FLASH] == 0 } {
# OCTOSPI1: memory-mapped 1-line read mode with 3-byte addresses
mww 0x52005100 0x01002101 ;# OCTOSPI_CCR: DMODE=0x1, ABMODE=0x0, ADSIZE=0x2, ADMODE=0x1, ISIZE=0x0, IMODE=0x1
} else {
if { [info exists ::env(LARGE_FLASH)] == 1 && [env LARGE_FLASH] == 1 } {
# OCTOSPI1: memory-mapped 1-line read mode with 4-byte addresses
mww 0x52005100 0x01003101 ;# OCTOSPI_CCR: DMODE=0x1, ABMODE=0x0, ADSIZE=0x3, ADMODE=0x1, ISIZE=0x0, IMODE=0x1
} else {
# OCTOSPI1: memory-mapped 1-line read mode with 3-byte addresses
mww 0x52005100 0x01002101 ;# OCTOSPI_CCR: DMODE=0x1, ABMODE=0x0, ADSIZE=0x2, ADMODE=0x1, ISIZE=0x0, IMODE=0x1
}
mww 0x52005110 0x00000003 ;# OCTOSPI_IR: INSTR=READ
mmw 0x52005000 0x00000001 0x00000000 ;# OCTOSPI_CR |= EN