Skip to content

Conversation

@feeRnt
Copy link

@feeRnt feeRnt commented Aug 25, 2025

Fixes: Card detection and functionality for the Marvell 88w8897 Chip
(PlayStation internal codename Torus 2.0).

The affected cards are present in the console models :-
CUH-1216{A,B},
CUH-1215{A,B},
CUH-1003{A},
... and maybe more.

Files changed:
- include/linux/mmc/sdio_ids.h
Marvell 8897 F0 (function 0) ID in include/linux/mmc/sdio_ids.h. To be polled by SDIO/SDHCI driver during card func initialization.

- drivers/mmc/core/quirks.h
Added MMC SDR104 mode with 150 MHz quirk for MARVELL_8897_F0 in drivers/mmc/core/quirks.h.

- drivers/mmc/host/sdhci-pci-core.c
Added SDHCI host controller quirk for correct clock tuning on affected systems.
Adding .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN, in drivers/mmc/host/sdhci-pci-core.c .

Added a check for SD host controller version (Aeolia or Belize only) before applying the host quirk.

- drivers/mmc/core/sdio_ops.c
Added skeleton comment to have 3 retries on each CMD52 or 53 in mmc_wait_for_cmd function.
Is not needed now, but for future reference in case some card fails at
card function init.

Fixes card detection and functionality for the Marvell 88w8897 Chip
(PlayStation internal codename Torus 2.0).

The affected cards are present in the console models :-
CUH-1216{A,B},
CUH-1215{A,B},
CUH-1003{A},
... and maybe more.

Files changed:
- include/linux/mmc/sdio_ids.h:
Marvell 8897 F0 (function 0) ID in include/linux/mmc/sdio_ids.h.
To be polled by SDIO/SDHCI driver during card func initialization.

- drivers/mmc/core/quirks.h
Added MMC SDR104 mode with 150 MHz quirk for MARVELL_8897_F0 in drivers/mmc/core/quirks.h.

- drivers/mmc/host/sdhci-pci-core.c
Added SDHCI host controller quirk for correct clock tuning on affected
systems.
Adding .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN,
in drivers/mmc/host/sdhci-pci-core.c .

Added a check for SD host controller version (Aeolia or Belize only) before applying
the host quirk.

- drivers/mmc/core/sdio_ops.c
Added skeleton comment to have 3 retries on each CMD52 or 53 in mmc_wait_for_cmd function.
Is not needed now, but for future reference in case some card fails at
card function init.

Signed-off-by: feeRnt <81442162+feeRnt@users.noreply.github.com>
@feeRnt
Copy link
Author

feeRnt commented Aug 25, 2025

Let me know if the comments are excessive.
Though in my opinion excessive comments are better than no comments- for patches, maintenance, and study ^^

@feeRnt feeRnt marked this pull request as ready for review August 25, 2025 04:51
@crashniels
Copy link
Owner

Let me know if the comments are excessive. Though in my opinion excessive comments are better than no comments- for patches, maintenance, and study ^^

The comments are fine. We should better leave them in for someone who might work on it in the future.

@crashniels
Copy link
Owner

LGTM

Will look at it next week as well. Thanks for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants