Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7435bb79 authored by Jaehoon Chung's avatar Jaehoon Chung Committed by Chris Ball
Browse files

mmc: core: use defined R1_STATE_PRG macro for card status

parent 65be3fef
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -224,7 +224,7 @@ static void mmc_test_prepare_mrq(struct mmc_test_card *test,
static int mmc_test_busy(struct mmc_command *cmd)
static int mmc_test_busy(struct mmc_command *cmd)
{
{
	return !(cmd->resp[0] & R1_READY_FOR_DATA) ||
	return !(cmd->resp[0] & R1_READY_FOR_DATA) ||
		(R1_CURRENT_STATE(cmd->resp[0]) == 7);
		(R1_CURRENT_STATE(cmd->resp[0]) == R1_STATE_PRG);
}
}


/*
/*
+1 −1
Original line number Original line Diff line number Diff line
@@ -1502,7 +1502,7 @@ static int mmc_do_erase(struct mmc_card *card, unsigned int from,
			goto out;
			goto out;
		}
		}
	} while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
	} while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
		 R1_CURRENT_STATE(cmd.resp[0]) == 7);
		 R1_CURRENT_STATE(cmd.resp[0]) == R1_STATE_PRG);
out:
out:
	return err;
	return err;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -407,7 +407,7 @@ int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
			break;
			break;
		if (mmc_host_is_spi(card->host))
		if (mmc_host_is_spi(card->host))
			break;
			break;
	} while (R1_CURRENT_STATE(status) == 7);
	} while (R1_CURRENT_STATE(status) == R1_STATE_PRG);


	if (mmc_host_is_spi(card->host)) {
	if (mmc_host_is_spi(card->host)) {
		if (status & R1_SPI_ILLEGAL_COMMAND)
		if (status & R1_SPI_ILLEGAL_COMMAND)