aboutsummaryrefslogtreecommitdiff
path: root/roms
diff options
context:
space:
mode:
authorBin Meng <bin.meng@windriver.com>2021-01-23 18:39:59 +0800
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-01-24 20:11:05 +0100
commit3a67cbe619179c390908bf415159290acbe96ccd (patch)
tree48108c38315716686a9e1792b30dc951ac0e4bff /roms
parent2d174cc38bf1e86ff0cf534510c0d097e3b23680 (diff)
hw/sd: ssi-sd: Add a state representing Nac
Per the "Physical Layer Specification Version 8.00" chapter 7.5.2, "Data Read", there is a minimum 8 clock cycles (Nac) after the card response and before data block shows up on the data out line. This applies to both single and multiple block read operations. Current implementation of single block read already satisfies the timing requirement as in the RESPONSE state after all responses are transferred the state remains unchanged. In the next 8 clock cycles it jumps to DATA_START state if data is ready. However we need an explicit state when expanding our support to multiple block read in the future. Let's add a new state PREP_DATA explicitly in the ssi-sd state machine to represent Nac. Note we don't change the single block read state machine to let it jump from RESPONSE state to DATA_START state as that effectively generates a 16 clock cycles Nac, which might not be safe. As the spec says the maximum Nac shall be calculated from several fields encoded in the CSD register, we don't want to bother updating CSD to ensure our Nac is within range to complicate things. Signed-off-by: Bin Meng <bin.meng@windriver.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20210123104016.17485-9-bmeng.cn@gmail.com> [PMD: Change VMState version id 4 -> 5] Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'roms')
0 files changed, 0 insertions, 0 deletions