Go to the source code of this file.
◆ GDDR_CA_OCD_PULLDOWN_OFFSET_MAX
| #define GDDR_CA_OCD_PULLDOWN_OFFSET_MAX 7 |
Widest CA driver strength code the 3-bit OCD pulldown field can hold.
◆ GDDR_CA_OCD_PULLDOWN_UNSET
| #define GDDR_CA_OCD_PULLDOWN_UNSET 0xFF |
CA driver strength sentinel: not seeded, MRISC keeps its board-type default.
◆ GDDR_CA_TERMINATION_OFFSET_MAX
| #define GDDR_CA_TERMINATION_OFFSET_MAX 3 |
Widest CA termination offset the MR3 field can hold.
◆ GDDR_CA_VREFC_OFFSET_MAX
| #define GDDR_CA_VREFC_OFFSET_MAX 0xF |
Widest CA VREFC offset code the 4-bit MR10 field can hold.
◆ GDDR_CAL_NUM_ASICS
| #define GDDR_CAL_NUM_ASICS 8 |
◆ GDDR_CAL_NUM_CONTROLLERS
| #define GDDR_CAL_NUM_CONTROLLERS 8 |
◆ gddr_cal_read()
Read and validate the CA calibration table from flash.
Reads both banks, prefers the one with the newer sequence number, and falls back to the other if it fails validation. Erased banks fail the magic check and are treated as absent, as are banks written by an older firmware whose table layout differed.
CONFIG_TT_BH_ARC_GDDR_CA_LATCH requires gddrcal_a and gddrcal_b in the devicetree; a build without those nodes is rejected at compile time.
- Parameters
-
| [out] | table | Destination table; only written on success. |
- Return values
-
| 0 | on success. |
| -ENODEV | if the flash device is not ready. |
| -ENOENT | if neither bank holds a valid table. |
| -ENOSYS | if the latch Kconfig is off and the partitions are absent. |
◆ gddr_cal_write()
Write the CA calibration table to flash.
Writes to whichever bank is not currently active, with a sequence number one greater than the active bank's, then reads the bank back and verifies it. The active bank is never erased, so a power loss at any point leaves the previous table intact and readable.
- Parameters
-
- Return values
-
| 0 | on success, negative error code on failure. |
| -ENOSYS | if the latch Kconfig is off and the partitions are absent. |