Message ID | 1499238645-29178-1-git-send-email-shawn.lin@rock-chips.com |
---|---|
State | New |
Headers | show |
Hi Shawn, On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: > dwmmc driver deprecated num-slots and plan to get rid > of it finally. Just move a step to cleanup it from DT. Hm, that's interesting. In our upcoming devboard (HSDK, see http://lists.infradead.org/pipermail/linux-snps-arc/2017-July/002667.html) we do use 2 slots of DW MobileStorage controller (even though it's not yet mentioned in its .dts). So the question is if multi-slot support gets removed from dwmmc driver or it's just a .dts option gets obsoleted. In latter case I'm wondering how to enable a second slot in dwmmc driver (will it just auto-probe it etc)? -Alexey
Hi Alexey, On 07/05/2017 06:05 PM, Alexey Brodkin wrote: > Hi Shawn, > > On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: >> dwmmc driver deprecated num-slots and plan to get rid >> of it finally. Just move a step to cleanup it from DT. > > Hm, that's interesting. > In our upcoming devboard (HSDK, see > http://lists.infradead.org/pipermail/linux-snps-arc/2017-July/002667.html) > we do use 2 slots of DW MobileStorage controller (even though it's not yet > mentioned in its .dts). I didn't see about multiple slot for dwmmc controller. > > So the question is if multi-slot support gets removed from dwmmc driver or > it's just a .dts option gets obsoleted. In latter case I'm wondering how to > enable a second slot in dwmmc driver (will it just auto-probe it etc)? In dwmmc controller, already removed the multiple slot concept. Best Regards, Jaehoon Chung > > -Alexey >
Hi Jaehoon, On Wed, 2017-07-05 at 18:13 +0900, Jaehoon Chung wrote: > Hi Alexey, > > On 07/05/2017 06:05 PM, Alexey Brodkin wrote: > > > > Hi Shawn, > > > > On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: > > > > > > dwmmc driver deprecated num-slots and plan to get rid > > > of it finally. Just move a step to cleanup it from DT. > > > > Hm, that's interesting. > > In our upcoming devboard (HSDK, see > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dsnps-2Darc_2017-2DJuly_002667.html&d=DwICaQ&c=DPL6_X_6Jk > > XFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=b7bMsqUn3obLZnR09LeBC0q6AouAgBH_cIlb0VcM43U&s=yMZ4dGcco3uL5H1m51kiI8d2sF6MCA_IdFwT326 > > IOGk&e= ) > > we do use 2 slots of DW MobileStorage controller (even though it's not yet > > mentioned in its .dts). > > I didn't see about multiple slot for dwmmc controller. I was about to add a second SD-card slot to hsdk.dts once we have a peripheral attached to it working. > > So the question is if multi-slot support gets removed from dwmmc driver or > > it's just a .dts option gets obsoleted. In latter case I'm wondering how to > > enable a second slot in dwmmc driver (will it just auto-probe it etc)? > > In dwmmc controller, already removed the multiple slot concept. Too bad for us as the second slot is attached to SDIO peripheral we really need. What was a reason to get rid of multi-slot support on DW MMC? -Alexey
Hi Alexey, On 07/05/2017 06:23 PM, Alexey Brodkin wrote: > Hi Jaehoon, > > On Wed, 2017-07-05 at 18:13 +0900, Jaehoon Chung wrote: >> Hi Alexey, >> >> On 07/05/2017 06:05 PM, Alexey Brodkin wrote: >>> >>> Hi Shawn, >>> >>> On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: >>>> >>>> dwmmc driver deprecated num-slots and plan to get rid >>>> of it finally. Just move a step to cleanup it from DT. >>> >>> Hm, that's interesting. >>> In our upcoming devboard (HSDK, see >>> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dsnps-2Darc_2017-2DJuly_002667.html&d=DwICaQ&c=DPL6_X_6Jk >>> XFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=b7bMsqUn3obLZnR09LeBC0q6AouAgBH_cIlb0VcM43U&s=yMZ4dGcco3uL5H1m51kiI8d2sF6MCA_IdFwT326 >>> IOGk&e= ) >>> we do use 2 slots of DW MobileStorage controller (even though it's not yet >>> mentioned in its .dts). >> >> I didn't see about multiple slot for dwmmc controller. > > I was about to add a second SD-card slot to hsdk.dts > once we have a peripheral attached to it working. Sorry, Have we discuss about this? > >>> So the question is if multi-slot support gets removed from dwmmc driver or >>> it's just a .dts option gets obsoleted. In latter case I'm wondering how to >>> enable a second slot in dwmmc driver (will it just auto-probe it etc)? >> >> In dwmmc controller, already removed the multiple slot concept. > > Too bad for us as the second slot is attached to SDIO peripheral we really need. > What was a reason to get rid of multi-slot support on DW MMC? After merged dwmmc in mainline, we were keeping the slot concept. During 6 years, we didn't see the use-case about multi-slots.. In all dts files, num-slots were used to "1" like "by-default". It was meaningless value. when we kept the multiple slot concept, it's complex to handle the driver. e,g) if upstream some patch, it has to check "cur_slot" and "slot" ..because dwmmc controller was doing context switch for slot. Sometime slot was not assigned..occurred the panic or NULL pointer dereference error. If there is no advantage for maintaining it, then i felt that the removing multiple slot is better than keeping. Then we can focus on one slot..and maintenance is more easier... And as i know, MMC subsystem doesn't consider the multiple slot. That's why i have removed it. Best Regards, Jaehoon Chung > > -Alexey >
Hi Jaehoon, On Wed, 2017-07-05 at 18:58 +0900, Jaehoon Chung wrote: > Hi Alexey, > > On 07/05/2017 06:23 PM, Alexey Brodkin wrote: > > > > Hi Jaehoon, > > > > On Wed, 2017-07-05 at 18:13 +0900, Jaehoon Chung wrote: > > > > > > Hi Alexey, > > > > > > On 07/05/2017 06:05 PM, Alexey Brodkin wrote: > > > > > > > > > > > > Hi Shawn, > > > > > > > > On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: > > > > > > > > > > > > > > > dwmmc driver deprecated num-slots and plan to get rid > > > > > of it finally. Just move a step to cleanup it from DT. > > > > > > > > Hm, that's interesting. > > > > In our upcoming devboard (HSDK, see > > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dsnps-2Darc_2017-2DJuly_002667.html&d=DwICaQ&c=DPL6_X > > > > _6Jk > > > > XFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=b7bMsqUn3obLZnR09LeBC0q6AouAgBH_cIlb0VcM43U&s=yMZ4dGcco3uL5H1m51kiI8d2sF6MCA_IdFw > > > > T326 > > > > IOGk&e= ) > > > > we do use 2 slots of DW MobileStorage controller (even though it's not yet > > > > mentioned in its .dts). > > > > > > I didn't see about multiple slot for dwmmc controller. > > > > I was about to add a second SD-card slot to hsdk.dts > > once we have a peripheral attached to it working. > > Sorry, Have we discuss about this? I think it was never discussed unfortunately. > > > > So the question is if multi-slot support gets removed from dwmmc driver or > > > > it's just a .dts option gets obsoleted. In latter case I'm wondering how to > > > > enable a second slot in dwmmc driver (will it just auto-probe it etc)? > > > > > > In dwmmc controller, already removed the multiple slot concept. > > > > Too bad for us as the second slot is attached to SDIO peripheral we really need. > > What was a reason to get rid of multi-slot support on DW MMC? > > After merged dwmmc in mainline, we were keeping the slot concept. > During 6 years, we didn't see the use-case about multi-slots.. > In all dts files, num-slots were used to "1" like "by-default". > It was meaningless value. > > when we kept the multiple slot concept, it's complex to handle the driver. > e,g) if upstream some patch, it has to check "cur_slot" and "slot" ..because dwmmc controller was doing context switch for slot. > Sometime slot was not assigned..occurred the panic or NULL pointer dereference error. > > If there is no advantage for maintaining it, then i felt that the removing multiple slot is better than keeping. > Then we can focus on one slot..and maintenance is more easier... > And as i know, MMC subsystem doesn't consider the multiple slot. > > That's why i have removed it. Ok that's a good reason to do it. I was really surprised to see people prefer to add a few more instances of DW MMC controolers in their systems (I did see about 5 of them on some boards) instead of using extra slots of the same one controller. I guess that's because all slots reuse the same data lines and so performance degradation is inevitable. Anyways we still don't have that SDIO peripheral working as expected and for now only 1 slot is fine. Though it might become a nightmare for me if the need for the second slot really arises. But let's see how it goes. BTW do you know if that multi-slot functionality was ever tested at all? Now I have a feeling that our SDIO peripheral attached to the second slot of DW MMC is not working because: a) Linux driver support for multi-slot is not functional b) Hardware itself is not working as expected as nobody ever tried that functionality. -Alexey
On 07/05/2017 07:14 PM, Alexey Brodkin wrote: > Hi Jaehoon, > > On Wed, 2017-07-05 at 18:58 +0900, Jaehoon Chung wrote: >> Hi Alexey, >> >> On 07/05/2017 06:23 PM, Alexey Brodkin wrote: >>> >>> Hi Jaehoon, >>> >>> On Wed, 2017-07-05 at 18:13 +0900, Jaehoon Chung wrote: >>>> >>>> Hi Alexey, >>>> >>>> On 07/05/2017 06:05 PM, Alexey Brodkin wrote: >>>>> >>>>> >>>>> Hi Shawn, >>>>> >>>>> On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: >>>>>> >>>>>> >>>>>> dwmmc driver deprecated num-slots and plan to get rid >>>>>> of it finally. Just move a step to cleanup it from DT. >>>>> >>>>> Hm, that's interesting. >>>>> In our upcoming devboard (HSDK, see >>>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.infradead.org_pipermail_linux-2Dsnps-2Darc_2017-2DJuly_002667.html&d=DwICaQ&c=DPL6_X >>>>> _6Jk >>>>> XFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=b7bMsqUn3obLZnR09LeBC0q6AouAgBH_cIlb0VcM43U&s=yMZ4dGcco3uL5H1m51kiI8d2sF6MCA_IdFw >>>>> T326 >>>>> IOGk&e= ) >>>>> we do use 2 slots of DW MobileStorage controller (even though it's not yet >>>>> mentioned in its .dts). >>>> >>>> I didn't see about multiple slot for dwmmc controller. >>> >>> I was about to add a second SD-card slot to hsdk.dts >>> once we have a peripheral attached to it working. >> >> Sorry, Have we discuss about this? > > I think it was never discussed unfortunately. > >>>>> So the question is if multi-slot support gets removed from dwmmc driver or >>>>> it's just a .dts option gets obsoleted. In latter case I'm wondering how to >>>>> enable a second slot in dwmmc driver (will it just auto-probe it etc)? >>>> >>>> In dwmmc controller, already removed the multiple slot concept. >>> >>> Too bad for us as the second slot is attached to SDIO peripheral we really need. >>> What was a reason to get rid of multi-slot support on DW MMC? >> >> After merged dwmmc in mainline, we were keeping the slot concept. >> During 6 years, we didn't see the use-case about multi-slots.. >> In all dts files, num-slots were used to "1" like "by-default". >> It was meaningless value. >> >> when we kept the multiple slot concept, it's complex to handle the driver. >> e,g) if upstream some patch, it has to check "cur_slot" and "slot" ..because dwmmc controller was doing context switch for slot. >> Sometime slot was not assigned..occurred the panic or NULL pointer dereference error. >> >> If there is no advantage for maintaining it, then i felt that the removing multiple slot is better than keeping. >> Then we can focus on one slot..and maintenance is more easier... >> And as i know, MMC subsystem doesn't consider the multiple slot. >> >> That's why i have removed it. > > Ok that's a good reason to do it. > > I was really surprised to see people prefer to add a few more > instances of DW MMC controolers in their systems (I did see about 5 of them > on some boards) instead of using extra slots of the same one controller. > I guess that's because all slots reuse the same data lines and so performance > degradation is inevitable. Right, that's why doesn't use the multiple slot. Company hopes to make the product that costumer is satisfied. Performance is one of important things... For saving about the cost that using more IP ...use the multiple slots via one IP? It doesn't make sense..but i don't know why your board is using the multiple slot.. Maybe there are some reasons..? > > Anyways we still don't have that SDIO peripheral working as expected > and for now only 1 slot is fine. Though it might become a nightmare for me > if the need for the second slot really arises. But let's see how it goes. > > BTW do you know if that multi-slot functionality was ever tested at all? I know...i didn't never test the multi-slot..did you check the slot->sdio_id? Rockchip is using the slot 8 as sdio peripheral. As you already know, dwmmc needs to shift the bit according to slot. Best Regards, Jaehoon Chung > Now I have a feeling that our SDIO peripheral attached to the second slot of DW MMC > is not working because: > a) Linux driver support for multi-slot is not functional > b) Hardware itself is not working as expected as nobody ever tried that functionality. > > -Alexey >
Hi Jaehoon, On Thu, 2017-07-06 at 13:17 +0900, Jaehoon Chung wrote: > On 07/05/ > Right, that's why doesn't use the multiple slot. > Company hopes to make the product that costumer is satisfied. > Performance is one of important things... > For saving about the cost that using more IP ...use the multiple slots via one IP? > It doesn't make sense..but i don't know why your board is using the multiple slot.. > Maybe there are some reasons..? Indeed there is. As it was quite late decision so we thought why not to use this nice feature and serve yet another SDIO device for free with just addition of a couple of wires (compare it with another controller integration in a SoC). > > Anyways we still don't have that SDIO peripheral working as expected > > and for now only 1 slot is fine. Though it might become a nightmare for me > > if the need for the second slot really arises. But let's see how it goes. > > > > BTW do you know if that multi-slot functionality was ever tested at all? > > I know...i didn't never test the multi-slot..did you check the slot->sdio_id? Well I think to some extent it worked for me but for some reason attached peripheral was not answering to any command so there could be another problem not related to DW MMC controller. Again as I understood slot is selected simply by supplying a clock. I.e. data is put on the same lines for all attached SD-devices and who gets a clock from the controller becomes active. We'll see if I get this peripheral working then probably I'll need to revisit that slot-related topic. > Rockchip is using the slot 8 as sdio peripheral. Still slot support is getting dropped? :) Like Rockchip people don't care? > As you already know, dwmmc needs to shift the bit according to slot. Yeah, I saw that. -Alexey
Hi Alexey, On 2017/7/6 19:33, Alexey Brodkin wrote: > Hi Jaehoon, > > On Thu, 2017-07-06 at 13:17 +0900, Jaehoon Chung wrote: >> On 07/05/ >> Right, that's why doesn't use the multiple slot. >> Company hopes to make the product that costumer is satisfied. >> Performance is one of important things... >> For saving about the cost that using more IP ...use the multiple slots via one IP? >> It doesn't make sense..but i don't know why your board is using the multiple slot.. >> Maybe there are some reasons..? > > Indeed there is. As it was quite late decision so we thought why not to use > this nice feature and serve yet another SDIO device for free with just addition of > a couple of wires (compare it with another controller integration in a SoC). > >>> Anyways we still don't have that SDIO peripheral working as expected >>> and for now only 1 slot is fine. Though it might become a nightmare for me >>> if the need for the second slot really arises. But let's see how it goes. >>> >>> BTW do you know if that multi-slot functionality was ever tested at all? >> >> I know...i didn't never test the multi-slot..did you check the slot->sdio_id? > > Well I think to some extent it worked for me but for some reason attached peripheral > was not answering to any command so there could be another problem not related to DW MMC > controller. Again as I understood slot is selected simply by supplying a clock. > I.e. data is put on the same lines for all attached SD-devices and who gets a clock from > the controller becomes active. > > We'll see if I get this peripheral working then probably I'll need to revisit that > slot-related topic. > >> Rockchip is using the slot 8 as sdio peripheral. > > Still slot support is getting dropped? :) > Like Rockchip people don't care? As we hard-code the slot number for sdio peripheral and won't change anymore, so we actually don't object killing slot concept. And we haven't come up with any use case for multi-slot for the past years for any rockchip platforms, but instead we have to carefully carry on the code to check the slot which makes the code hard to be improved. > >> As you already know, dwmmc needs to shift the bit according to slot. > > Yeah, I saw that. > > -Alexey >
Hi Shawn, On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: > dwmmc driver deprecated num-slots and plan to get rid > of it finally. Just move a step to cleanup it from DT. > > Cc: Jaehoon Chung <jh80.chung@samsung.com> > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> > --- Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Probably it worth for Vineet to pull this patch to his ARC tree. -Alexey
On 07/07/2017 05:13 PM, Alexey Brodkin wrote: > Hi Shawn, > > On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: >> dwmmc driver deprecated num-slots and plan to get rid >> of it finally. Just move a step to cleanup it from DT. >> >> Cc: Jaehoon Chung <jh80.chung@samsung.com> >> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> >> --- > > Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Best Regards, Jaehoon Chung > > Probably it worth for Vineet to pull this patch to his ARC tree. > > -Alexey >
On 07/07/2017 01:13 AM, Alexey Brodkin wrote: > Hi Shawn, > > On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: >> dwmmc driver deprecated num-slots and plan to get rid >> of it finally. Just move a step to cleanup it from DT. >> >> Cc: Jaehoon Chung <jh80.chung@samsung.com> >> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> >> --- > Acked-by: Alexey Brodkin <abrodkin@synopsys.com> > > Probably it worth for Vineet to pull this patch to his ARC tree. > > -Alexey I'd prefer it goes via the tree which changed the driver in first place ! BTW we do need this multi-slot support in driver for HSDK - NO ? -Vineet
Hi Vineet, On Fri, 2017-07-07 at 15:35 -0700, Vineet Gupta wrote: > On 07/07/2017 01:13 AM, Alexey Brodkin wrote: > > > > Hi Shawn, > > > > On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: > > > > > > dwmmc driver deprecated num-slots and plan to get rid > > > of it finally. Just move a step to cleanup it from DT. > > > > > > Cc: Jaehoon Chung <jh80.chung@samsung.com> > > > Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> > > > --- > > Acked-by: Alexey Brodkin <abrodkin@synopsys.com> > > > > Probably it worth for Vineet to pull this patch to his ARC tree. > > > > -Alexey > > I'd prefer it goes via the tree which changed the driver in first place ! That's OK. > BTW we do need this multi-slot support in driver for HSDK - NO ? We do need this but: 1) We still cannot get that Wi-Fi module to work in SDIO mode on HSDK. 2) It is unclear if multi-slot support was ever tested at all as it turned out nobody ever used that for real. So I'd better return to this topic once we have SDIO on the second slot working at least in bare-metal test app. -Alexey
Hi Vineet, On 2017/7/8 6:35, Vineet Gupta wrote: > On 07/07/2017 01:13 AM, Alexey Brodkin wrote: >> Hi Shawn, >> >> On Wed, 2017-07-05 at 15:10 +0800, Shawn Lin wrote: >>> dwmmc driver deprecated num-slots and plan to get rid >>> of it finally. Just move a step to cleanup it from DT. >>> >>> Cc: Jaehoon Chung <jh80.chung@samsung.com> >>> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> >>> --- >> Acked-by: Alexey Brodkin <abrodkin@synopsys.com> >> >> Probably it worth for Vineet to pull this patch to his ARC tree. >> >> -Alexey > > I'd prefer it goes via the tree which changed the driver in first place ! So does it mean that you are okay for mmc maintainer to pick this up with your and Alexey's ack? > > BTW we do need this multi-slot support in driver for HSDK - NO ? > > -Vineet > > >
On 07/18/2017 01:11 AM, Shawn Lin wrote: >> I'd prefer it goes via the tree which changed the driver in first place ! > So does it mean that you are okay for mmc maintainer to pick this up > with your and Alexey's ack? > Yes please. Thx, -Vineet
diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi index 41cfb29..82e26ad 100644 --- a/arch/arc/boot/dts/axs10x_mb.dtsi +++ b/arch/arc/boot/dts/axs10x_mb.dtsi @@ -101,7 +101,6 @@ mmc@0x15000 { compatible = "altr,socfpga-dw-mshc"; reg = < 0x15000 0x400 >; - num-slots = < 1 >; fifo-depth = < 16 >; card-detect-delay = < 200 >; clocks = <&apbclk>, <&mmcclk>; diff --git a/arch/arc/boot/dts/vdk_axs10x_mb.dtsi b/arch/arc/boot/dts/vdk_axs10x_mb.dtsi index 459fc65..48bb4b4 100644 --- a/arch/arc/boot/dts/vdk_axs10x_mb.dtsi +++ b/arch/arc/boot/dts/vdk_axs10x_mb.dtsi @@ -104,7 +104,6 @@ mmc@0x15000 { compatible = "snps,dw-mshc"; reg = <0x15000 0x400>; - num-slots = <1>; fifo-depth = <1024>; card-detect-delay = <200>; clocks = <&apbclk>, <&mmcclk>;
dwmmc driver deprecated num-slots and plan to get rid of it finally. Just move a step to cleanup it from DT. Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> --- arch/arc/boot/dts/axs10x_mb.dtsi | 1 - arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 1 - 2 files changed, 2 deletions(-)