Commit 9640639b09313af4cd37a465408643aba927808e
Committed by
Chris Ball
1 parent
55a6ceb2d5
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 2 changed files with 1 additions and 14 deletions Side-by-side Diff
drivers/mmc/host/dw_mmc.c
... | ... | @@ -831,13 +831,7 @@ |
831 | 831 | struct dw_mci_board *brd = slot->host->pdata; |
832 | 832 | |
833 | 833 | /* 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) | |
841 | 835 | read_only = 0; |
842 | 836 | else if (brd->get_ro) |
843 | 837 | read_only = brd->get_ro(slot->id); |
include/linux/mmc/dw_mmc.h
... | ... | @@ -210,13 +210,6 @@ |
210 | 210 | /* Unreliable card detection */ |
211 | 211 | #define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3) |
212 | 212 | |
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 | - | |
220 | 213 | /* Slot level quirks */ |
221 | 214 | /* This slot has no write protect */ |
222 | 215 | #define DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT BIT(0) |