mcap: linux: Fix race condition while programming bitfiles

During programming the bit files as per flow
in case of errors need to do a full reset of mcap
config space. This patch fixes this issue.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
This commit is contained in:
Kedareswara rao Appana 2015-05-28 11:26:21 +05:30 committed by Nava kishore Manne
parent fab2546cd5
commit 7329bd7e91

View file

@ -275,6 +275,7 @@ static int MCapWritePartialBitStream(struct mcap_dev *mdev, u32 *data,
if (IsErrSet(mdev) || IsFifoOverflow(mdev)) {
pr_err("Failed to Write Bitstream\n");
MCapRegWrite(mdev, MCAP_CONTROL, restore);
MCapFullReset(mdev);
return -EMCAPWRITE;
}
@ -340,6 +341,7 @@ static int MCapWriteBitStream(struct mcap_dev *mdev, u32 *data,
if (IsErrSet(mdev) || IsFifoOverflow(mdev)) {
pr_err("Failed to Write Bitstream\n");
MCapRegWrite(mdev, MCAP_CONTROL, restore);
MCapFullReset(mdev);
return -EMCAPWRITE;
}