mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-08 10:25:20 +02:00
ANDROID: scsi: ufs: core: Add 36-bit DMA addressing support
Add support for 36-bit DMA addressing. This CL has the prefix "ANDROID:" because a more flexible solution will be proposed for inclusion in the upstream Linux kernel. Bug: 368427699 Bug: 369330025 Change-Id: I2c062e176d0a6432af5f0b69c2622f9f8bd2adc2 Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
parent
9b212a6305
commit
96533d6ac8
|
@ -10322,6 +10322,8 @@ EXPORT_SYMBOL_GPL(ufshcd_dealloc_host);
|
||||||
*/
|
*/
|
||||||
static int ufshcd_set_dma_mask(struct ufs_hba *hba)
|
static int ufshcd_set_dma_mask(struct ufs_hba *hba)
|
||||||
{
|
{
|
||||||
|
if (hba->android_quirks & UFSHCD_ANDROID_QUIRK_36BIT_ADDRESS_DMA)
|
||||||
|
return dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(36));
|
||||||
if (hba->capabilities & MASK_64_ADDRESSING_SUPPORT) {
|
if (hba->capabilities & MASK_64_ADDRESSING_SUPPORT) {
|
||||||
if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
|
if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -685,6 +685,12 @@ enum ufshcd_android_quirks {
|
||||||
* keys were stored in it.
|
* keys were stored in it.
|
||||||
*/
|
*/
|
||||||
UFSHCD_ANDROID_QUIRK_KEYS_IN_PRDT = 1 << 2,
|
UFSHCD_ANDROID_QUIRK_KEYS_IN_PRDT = 1 << 2,
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Use 36-bit DMA no matter whether or not the controller reports
|
||||||
|
* 64-bit addressing support.
|
||||||
|
*/
|
||||||
|
UFSHCD_ANDROID_QUIRK_36BIT_ADDRESS_DMA = 1 << 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ufshcd_caps {
|
enum ufshcd_caps {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user