| 25 | } |
| 26 | |
| 27 | static u16 read_500 (int channel, u16 addr, int split) |
| 28 | { |
| 29 | uint32_t val; |
| 30 | write_mchbar32 (0x500 + (channel << 10), 0); |
| 31 | while (read_mchbar32 (0x500 + (channel << 10)) & 0x800000); |
| 32 | write_mchbar32 (0x500 + (channel << 10), 0x80000000 | (((read_mchbar8 (0x246 + (channel << 10)) >> 2) & 3) + 0xb88 - addr)); |
| 33 | while (read_mchbar32 (0x500 + (channel << 10)) & 0x800000); |
| 34 | val = read_mchbar32 (0x508 + (channel << 10)); |
| 35 | |
| 36 | return val & ((1 << split) - 1); |
| 37 | } |
| 38 | |
| 39 | static inline u16 get_lane_offset (int slot, int rank, int lane) |
| 40 | { |
no test coverage detected