Skip to content

Commit 9640639

Browse files
dianderscjb
authored andcommitted
mmc: dw_mmc: Remove DW_MCI_QUIRK_NO_WRITE_PROTECT
The original quirk was added in the change 'mmc: dw_mmc: add quirk to indicate missing write protect line'. The original quirk was added at a controller level even though each slot has its own write protect (so the quirk should be at the slot level). A recent change (mmc: dw_mmc: Add "disable-wp" device tree property) added a slot-level quirk and support for the quirk directly to dw_mmc. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Will Newton <will.newton@imgtec.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Chris Ball <cjb@laptop.org>
1 parent 55a6ceb commit 9640639

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

‎drivers/mmc/host/dw_mmc.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -831,13 +831,7 @@ static int dw_mci_get_ro(struct mmc_host *mmc)
831831
struct dw_mci_board *brd = slot->host->pdata;
832832

833833
/* Use platform get_ro function, else try on board write protect */
834-
835-
/*
836-
* NOTE: DW_MCI_QUIRK_NO_WRITE_PROTECT will be removed in a future
837-
* patch in the series once reference to it is removed.
838-
*/
839-
if ((brd->quirks & DW_MCI_QUIRK_NO_WRITE_PROTECT) ||
840-
(slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT))
834+
if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT)
841835
read_only = 0;
842836
else if (brd->get_ro)
843837
read_only = brd->get_ro(slot->id);

‎include/linux/mmc/dw_mmc.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,6 @@ struct dw_mci_dma_ops {
210210
/* Unreliable card detection */
211211
#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3)
212212

213-
/* Write Protect detection not available */
214-
/*
215-
* NOTE: DW_MCI_QUIRK_NO_WRITE_PROTECT will be removed in a future
216-
* patch in the series once reference to it is removed.
217-
*/
218-
#define DW_MCI_QUIRK_NO_WRITE_PROTECT BIT(4)
219-
220213
/* Slot level quirks */
221214
/* This slot has no write protect */
222215
#define DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT BIT(0)

0 commit comments

Comments
 (0)