|
1 | | -/** |
2 | | - * Copyright (C) 2019 - 2022 Xilinx, Inc |
3 | | - * Copyright (C) 2022 Advanced Micro Devices, Inc. |
4 | | - * |
5 | | - * Licensed under the Apache License, Version 2.0 (the "License"). You may |
6 | | - * not use this file except in compliance with the License. A copy of the |
7 | | - * License is located at |
8 | | - * |
9 | | - * http://www.apache.org/licenses/LICENSE-2.0 |
10 | | - * |
11 | | - * Unless required by applicable law or agreed to in writing, software |
12 | | - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
13 | | - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
14 | | - * License for the specific language governing permissions and limitations |
15 | | - * under the License. |
16 | | - */ |
| 1 | +// SPDX-License-Identifier: Apache-2.0 |
| 2 | +// Copyright (C) 2019-2022 Xilinx, Inc. All rights reserved. |
| 3 | +// Copyright (C) 2022-2026 Advanced Micro Devices, Inc. All rights reserved. |
17 | 4 | #include "xspi.h" |
18 | 5 | #include "core/common/system.h" |
19 | 6 | #include "core/common/device.h" |
@@ -669,9 +656,7 @@ int XSPI_Flasher::parseMCS(std::istream& mcsStream) { |
669 | 656 | ELARecord record; |
670 | 657 | bool endRecordFound = false; |
671 | 658 |
|
672 | | - int lineno = 0; |
673 | 659 | while (!mcsStream.eof() && !endRecordFound) { |
674 | | - lineno++; |
675 | 660 | std::string line; |
676 | 661 | std::getline(mcsStream, line); |
677 | 662 | if (line.size() == 0) { |
@@ -1153,7 +1138,6 @@ bool XSPI_Flasher::finalTransfer(uint8_t *SendBufPtr, uint8_t *RecvBufPtr, int B |
1153 | 1138 | uint8_t* RecvBufferPtr = RecvBufPtr; |
1154 | 1139 |
|
1155 | 1140 | int RemainingBytes = ByteCount; |
1156 | | - unsigned int BytesTransferred = 0; |
1157 | 1141 |
|
1158 | 1142 | /* |
1159 | 1143 | * Fill the DTR/FIFO with as many bytes as it will take (or as many as |
@@ -1288,7 +1272,6 @@ bool XSPI_Flasher::finalTransfer(uint8_t *SendBufPtr, uint8_t *RecvBufPtr, int B |
1288 | 1272 | } |
1289 | 1273 | } |
1290 | 1274 |
|
1291 | | - BytesTransferred += (DataWidth >> 3); |
1292 | 1275 | ByteCount -= (DataWidth >> 3); |
1293 | 1276 | StatusReg = XSpi_GetStatusReg(); |
1294 | 1277 | if((StatusReg & (1<<10)) != 0) { |
|
0 commit comments