Revert "mmc: dw_mmc: Add check for IDMAC configuration"
Subsystems (2)
PATCH 1/1 Revert "mmc: dw_mmc: Add check for IDMAC configuration"
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in DMA_INTERFACE of HCON is reasonable. DMA_INTERFACE indicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.
--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)
drivers/mmc/host/dw_mmc.c +2 -13
@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));
@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops)
Signature · 1 line
1.7.0.4
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.
There is no register, or a field in any register which says IDMAC present. I can see only use_idmac bit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert back
Quoted 48 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --1.7.0.4
Jaehoon Chung
maintainerQuoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.
Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert back
I understood that if INTERNAL_DMAC at HCON register is set to 1, we didn't consdier the DMA_INTERFACE's value. So although dma_interface is set to 0 or others, host can use the internal DMA.
Best Regards,
Jaehoon Chung
Quoted 54 lines
Quoted 46 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 9 lines · Jaehoon Chung
Quoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.
Quoted 7 lines
Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert backI understood that if
INTERNAL_DMACat HCON register is set to 1, we didn't consdier the DMA_INTERFACE's value.
I cannot see any field by name INTERNAL_DMAC in the HCON: can you please tell me the bit position of it.
I think INTERNAL_DMAC is the signal interface to AXI master.
Quoted 59 lines
So although
dma_interfaceis set to 0 or others, host can use the internal DMA.Best Regards,
Jaehoon ChungQuoted 54 lines
Quoted 46 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jaehoon Chung
maintainerQuoted 16 lines · Girish K S
Quoted 15 lines · Jaehoon Chung
Quoted 14 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert back
Quoted 4 lines
Quoted 1 line
I understood that if
INTERNAL_DMACat HCON register is set to 1, we didn't consdier the DMA_INTERFACE's value.I cannot see any field by name
INTERNAL_DMACin the HCON: can you please tell me the bit position of it.
I thinkINTERNAL_DMACis the signal interface to AXI master.
Sorry, You're right. there is no field for INTERNAL_DMAC at HCON register.
Quoted 64 lines
Quoted 59 lines
So although
dma_interfaceis set to 0 or others, host can use the internal DMA.Best Regards,
Jaehoon ChungQuoted 54 lines
Quoted 46 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.
Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert back
There is no way to see the presence of idmac from host controller on the runtime.
But enabling idmac is not selected in the menuconfig just with assuming its presence.
User can find the support of idmac from manual at least, I know the lack of this information in manual though.
Thanks,
Seungwon Jeon
Quoted 53 lines
Quoted 46 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · Seungwon Jeon
Quoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert back
Quoted 3 lines
There is no way to see the presence of idmac from host controller on the runtime.
But enabling idmac is not selected in the menuconfig just with assuming its presence.
User can find the support of idmac from manual at least, I know the lack of this information in manual though.
I cannot find any line in the manual saying "Support IDMAC". Keeping this in mind and the with the literal meaning what the HCON field DMA_INTERFACE means, the above patch was made.
i had posted a patch for adding quirk to this (was waiting for some dt patches to be accepted to resend it). Once that patch gets merged it will be helpful for the user to use it comfortably. If QUIRK is enabled it means there is IDMAC and the driver user is intentionally enabling it.
Quoted 58 lines
Thanks,
Seungwon JeonQuoted 53 lines
Quoted 46 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 19 lines · Girish K S
Quoted 15 lines · Seungwon Jeon
Quoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert backQuoted 3 lines
There is no way to see the presence of idmac from host controller on the runtime. But enabling idmac is not selected in the menuconfig just with assuming its presence. User can find the support of idmac from manual at least, I know the lack of this information in
Quoted 9 lines
manual though.
I cannot find any line in the manual saying "Support IDMAC". Keeping this in mind and the with the literal meaning what the HCON fieldDMA_INTERFACEmeans, the above patch was made.
i had posted a patch for adding quirk to this (was waiting for some dt patches to be accepted to resend it). Once that patch gets merged it will be helpful for the user to use it comfortably. If QUIRK is enabled it means there is IDMAC and the driver user is intentionally enabling it.
I mentioned the lack of description of feature in manual.
When we consider the real meaning of DMA_INTERFACE, '0' value doen't indicate the absence of idmac. So, we cannot decide the support of idmac with the DMA_INTERFACE.
Do you mean this patch:"mmc: dwmmc: Add quirk for broken Hardware Config"? HCON register in the original Synopsys doesn't include information of internal dmac. Do you think it's also broken?
Thanks,
Seungwon Jeon
Quoted 63 lines
Quoted 59 lines
Thanks,
Seungwon JeonQuoted 53 lines
Quoted 46 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 29 lines · Seungwon Jeon
Quoted 19 lines · Girish K S
Quoted 15 lines · Seungwon Jeon
Quoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert backQuoted 3 lines
There is no way to see the presence of idmac from host controller on the runtime. But enabling idmac is not selected in the menuconfig just with assuming its presence. User can find the support of idmac from manual at least, I know the lack of this information in
Quoted 9 lines
manual though.
I cannot find any line in the manual saying "Support IDMAC". Keeping this in mind and the with the literal meaning what the HCON fieldDMA_INTERFACEmeans, the above patch was made.
i had posted a patch for adding quirk to this (was waiting for some dt patches to be accepted to resend it). Once that patch gets merged it will be helpful for the user to use it comfortably. If QUIRK is enabled it means there is IDMAC and the driver user is intentionally enabling it.
Quoted 7 lines
I mentioned the lack of description of feature in manual.
When we consider the real meaning ofDMA_INTERFACE, '0' value doen't indicate the absence of idmac. So, we cannot decide the support of idmac with theDMA_INTERFACE.Do you mean this patch:"mmc: dwmmc: Add quirk for broken Hardware Config"? HCON register in the original Synopsys doesn't include information of internal dmac. Do you think it's also broken?
As per the current available information from the manual i think the HCON is broken.
May be the synopsys is the right person to clarify this.
Quoted 67 lines
Thanks,
Seungwon JeonQuoted 63 lines
Quoted 59 lines
Thanks,
Seungwon JeonQuoted 53 lines
Quoted 46 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 34 lines · Girish K S
Quoted 33 lines · Seungwon Jeon
Quoted 19 lines · Girish K S
Quoted 15 lines · Seungwon Jeon
Quoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert backQuoted 3 lines
There is no way to see the presence of idmac from host controller on the runtime. But enabling idmac is not selected in the menuconfig just with assuming its presence. User can find the support of idmac from manual at least, I know the lack of this information in
Quoted 9 lines
manual though.
I cannot find any line in the manual saying "Support IDMAC". Keeping this in mind and the with the literal meaning what the HCON fieldDMA_INTERFACEmeans, the above patch was made.
i had posted a patch for adding quirk to this (was waiting for some dt patches to be accepted to resend it). Once that patch gets merged it will be helpful for the user to use it comfortably. If QUIRK is enabled it means there is IDMAC and the driver user is intentionally enabling it.I mentioned the lack of description of feature in manual.
When we consider the real meaning ofDMA_INTERFACE, '0' value doen't indicate the absence of idmac. So, we cannot decide the support of idmac with theDMA_INTERFACE.
Quoted 6 lines
Quoted 3 lines
Do you mean this patch:"mmc: dwmmc: Add quirk for broken Hardware Config"? HCON register in the original Synopsys doesn't include information of internal dmac. Do you think it's also broken?
As per the current available information from the manual i think the HCON is broken.
May be the synopsys is the right person to clarify this.
If you have some confirmation regarding the DMA_INTERFACE from the synopsys. please post it, It will be really helpful in correcting my understanding abt the dma interface
Quoted 67 lines
Quoted 67 lines
Thanks,
Seungwon JeonQuoted 63 lines
Quoted 59 lines
Thanks,
Seungwon JeonQuoted 53 lines
Quoted 46 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)drivers/mmc/host/dw_mmc.c +2
-14@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len)static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 38 lines · Girish K S
Quoted 37 lines · Girish K S
Quoted 36 lines · Seungwon Jeon
Quoted 19 lines · Girish K S
Quoted 15 lines · Seungwon Jeon
Quoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert backQuoted 3 lines
There is no way to see the presence of idmac from host controller on the runtime. But enabling idmac is not selected in the menuconfig just with assuming its presence. User can find the support of idmac from manual at least, I know the lack of this information in
Quoted 9 lines
manual though.
I cannot find any line in the manual saying "Support IDMAC". Keeping this in mind and the with the literal meaning what the HCON fieldDMA_INTERFACEmeans, the above patch was made.
i had posted a patch for adding quirk to this (was waiting for some dt patches to be accepted to resend it). Once that patch gets merged it will be helpful for the user to use it comfortably. If QUIRK is enabled it means there is IDMAC and the driver user is intentionally enabling it.I mentioned the lack of description of feature in manual.
When we consider the real meaning ofDMA_INTERFACE, '0' value doen't indicate the absence of idmac. So, we cannot decide the support of idmac with theDMA_INTERFACE.Do you mean this patch:"mmc: dwmmc: Add quirk for broken Hardware Config"? HCON register in the original Synopsys doesn't include information of internal dmac. Do you think it's also broken?
Quoted 6 lines
Quoted 3 lines
As per the current available information from the manual i think the HCON is broken.
May be the synopsys is the right person to clarify this.If you have some confirmation regarding the
DMA_INTERFACEfrom the synopsys. please post it, It will be really helpful in correcting my understanding abt the dma interface
Information regarding DMA_INTERFACE can be referred enough in Synopsys manual. As mentioned above commit message, DMA_INTERFACE specifies the external dma interface. '0'(DMA_INTERFACE) means that there is no external dma interface in current host controller. Synopsys may supply the idmac for host controller basically.
If Soc's vendor decides to use external dma interface instead of idmac,
then DMA_INTERFACE parameter should be configured before synthesizing RTL.
I hope it helpful to you. If there is something wrong, please let me know.
Thanks,
Seungwon Jeon
Quoted 65 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/host/dw_mmc.c static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int
Quoted 5 lines
drivers/mmc/host/dw_mmc.c +0
-0@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int
sg_len)Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 40 lines
Quoted 33 lines
drivers/mmc/host/dw_mmc.c +2
-14static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 5 lines
Quoted 5 lines
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 39 lines · Seungwon Jeon
Quoted 38 lines · Girish K S
Quoted 37 lines · Girish K S
Quoted 36 lines · Seungwon Jeon
Quoted 19 lines · Girish K S
Quoted 15 lines · Seungwon Jeon
Quoted 8 lines · Girish K S
Quoted 6 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.Quoted 6 lines
There is no register, or a field in any register which says IDMAC present. I can see only
use_idmacbit field in CTRL register.
So in first place how will i know whether IDMAC is present? Have you assumed that IDMAC is present.
I would like to know without assuming, whether IDMAC is present. If i have missed out something let me know. i will check and revert backQuoted 3 lines
There is no way to see the presence of idmac from host controller on the runtime. But enabling idmac is not selected in the menuconfig just with assuming its presence. User can find the support of idmac from manual at least, I know the lack of this information in
Quoted 9 lines
manual though.
I cannot find any line in the manual saying "Support IDMAC". Keeping this in mind and the with the literal meaning what the HCON fieldDMA_INTERFACEmeans, the above patch was made.
i had posted a patch for adding quirk to this (was waiting for some dt patches to be accepted to resend it). Once that patch gets merged it will be helpful for the user to use it comfortably. If QUIRK is enabled it means there is IDMAC and the driver user is intentionally enabling it.I mentioned the lack of description of feature in manual.
When we consider the real meaning ofDMA_INTERFACE, '0' value doen't indicate the absence of idmac. So, we cannot decide the support of idmac with theDMA_INTERFACE.Do you mean this patch:"mmc: dwmmc: Add quirk for broken Hardware Config"? HCON register in the original Synopsys doesn't include information of internal dmac. Do you think it's also broken?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
As per the current available information from the manual i think the HCON is broken.
May be the synopsys is the right person to clarify this.If you have some confirmation regarding the
DMA_INTERFACEfrom the synopsys. please post it, It will be really helpful in correcting my understanding abt the dma interfaceInformation regarding
DMA_INTERFACEcan be referred enough in Synopsys manual. As mentioned above commit message,DMA_INTERFACEspecifies the external dma interface.
If this is true (because my discussion is based on the information available in the SOc's manual). then i go with the decision of reverting.
Quoted 74 lines
'0'(DMA_INTERFACE) means that there is no external dma interface in current host controller. Synopsys may supply the idmac for host controller basically.
If Soc's vendor decides to use external dma interface instead of idmac,
thenDMA_INTERFACEparameter should be configured before synthesizing RTL.
I hope it helpful to you. If there is something wrong, please let me know.Thanks,
Seungwon JeonQuoted 65 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
drivers/mmc/host/dw_mmc.c static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int
Quoted 5 lines
drivers/mmc/host/dw_mmc.c +0
-0@@ -405,23 +405,11 @@ static void dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int
sg_len)Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 41 lines
Quoted 40 lines
Quoted 33 lines
drivers/mmc/host/dw_mmc.c +2
-14static int dw_mci_idmac_init (struct dw_mci *host) {struct idmac_desc *p; -int i, dma_support; +int i;/* Number of descriptors in the ring buffer */ host->ring_size =PAGE_SIZE /sizeof (struct idmac_desc ); -/* Check if Hardware Configuration Register has support for DMA */ - dma_support = (mci_readl (host,HCON ) >>16 ) &0x3 ; - -if (!dma_support || dma_support >2 ) { -dev_err (&host->dev, -"Host Controller does not support IDMA Tx.\n" ); - host->dma_ops =NULL ; -return -ENODEV ; - } - -dev_info (&host->dev,"Using internal DMA controller.\n" ); -/* Forward link the descriptor list */ for (i =0 , p = host->sg_cpu; i < host->ring_size -1 ; i++, p++) p->des3 = host->sg_dma + (sizeof (struct idmac_desc ) * (i +1 ));@@ -1895,6 +1883,7 @@ static void dw_mci_init_dma(struct dw_mci *host)/* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; +dev_info (&host->dev,"Using internal DMA controller.\n" );#endif if (!host->dma_ops) --Quoted 3 lines
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 5 lines
Quoted 5 lines
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.
Quoted 5 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)
I think this revert is a good idea. The original patch tries to check whether IDMAC is supported and falls back to PIO, but it is not clear to me that HCON gives you the appropriate information to do this (at least in my version of the manual, I have not tried to clarify this with Synopsys). Also falling back to PIO mode seems like it would provide pretty awful performance, I would not expect to see instances of this block with no DMA support anywhere other than FPGA so configuring with IDMAC without it's presence would be a serious misconfiguration in any case.
Hi,
Quoted 24 lines · Will Newton
Quoted 7 lines · Seungwon Jeon
This reverts commit 94c6cee91(Add check for IDMAC configuration). Synopsys says that only if internal dmac is not present, optional external dma interface is present. When internal dmac is present, '0' value in
DMA_INTERFACEof HCON is reasonable.DMA_INTERFACEindicates external dma interface. And idmac initialization is prohibited now. So, let's revert this commit.Quoted 5 lines
CC Girish K S <[email protected]>Signed-off-by Seungwon Jeon <[email protected]>--- drivers/mmc/host/dw_mmc.c | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-)I think this revert is a good idea. The original patch tries to check whether IDMAC is supported and falls back to PIO, but it is not clear to me that HCON gives you the appropriate information to do this (at least in my version of the manual, I have not tried to clarify this with Synopsys). Also falling back to PIO mode seems like it would provide pretty awful performance, I would not expect to see instances of this block with no DMA support anywhere other than FPGA so configuring with IDMAC without it's presence would be a serious misconfiguration in any case.
Quoted 1 line
Acked-by Will Newton <[email protected]>
Thanks, pushed to mmc-next for 3.7.
- Chris.
Signature · 2 lines
Chris Ball <[email protected]> <http://printf.net/> One Laptop Per Child