[Skiboot] [PATCH 3/3] npu2: hw-procedures: Update PHY DC calibration procedure
Reza Arbab
arbab at linux.vnet.ibm.com
Fri Sep 1 01:30:19 AEST 2017
On Thu, Aug 31, 2017 at 01:11:30PM +1000, Andrew Donnellan wrote:
>On 31/08/17 08:38, Reza Arbab wrote:
>>@@ -521,6 +523,9 @@ static uint32_t phy_rx_dccal(struct npu2_dev *ndev)
>> int lane;
>> FOR_EACH_LANE(ndev, lane)
>>+ phy_write_lane(ndev, &NPU2_PHY_RX_PR_FW_OFF, lane, 1);
>>+
>>+ FOR_EACH_LANE(ndev, lane)
>> phy_write_lane(ndev, &NPU2_PHY_RX_RUN_DCCAL, lane, 1);
>
>Could probably put these in the same FOR_EACH_LANE block?
Well, the pseudocode in the programming guide does separate loops for
each item like this. Maybe I'm cargo culting, but it seems significant
because right below, it does three items in the same loop:
>>@@ -537,8 +542,11 @@ static uint32_t phy_rx_dccal_complete(struct npu2_dev *ndev)
>> FOR_EACH_LANE(ndev, lane)
>> phy_write_lane(ndev, &NPU2_PHY_RX_RUN_DCCAL, lane, 0);
>>- FOR_EACH_LANE(ndev, lane)
>>+ FOR_EACH_LANE(ndev, lane) {
>> phy_write_lane(ndev, &NPU2_PHY_RX_B_BANK_CONTROLS, lane, 0);
>>+ phy_write_lane(ndev, &NPU2_PHY_RX_PR_EDGE_TRACK_CNTL, lane, 0);
>>+ phy_write_lane(ndev, &NPU2_PHY_RX_PR_FW_OFF, lane, 0);
>>+ }
>> return PROCEDURE_NEXT;
>> }
--
Reza Arbab
More information about the Skiboot
mailing list