mmc: sunxi: Declare ERASE capability
Subsystems (2)
PATCH 1/1 mmc: sunxi: Declare ERASE capability
Declare ERASE capability so we can use filesystems with the discard option and the fstrim tool.
--- drivers/mmc/host/sunxi-mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mmc/host/sunxi-mmc.c +2 -1
@@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)/* 400kHz ~ 50MHz */ mmc->f_min =400000 ; mmc->f_max =50000000 ; - mmc->caps |=MMC_CAP_MMC_HIGHSPEED |MMC_CAP_SD_HIGHSPEED ; + mmc->caps |=MMC_CAP_MMC_HIGHSPEED |MMC_CAP_SD_HIGHSPEED | +MMC_CAP_ERASE ; ret =mmc_of_parse (mmc);if (ret)
Signature · 1 line
2.1.0
PATCH 1/1 mmc: sunxi: Declare ERASE capability
Hi
Quoted 2 lines
Declare ERASE capability so we can use filesystems with the discard option and the fstrim tool.
I totally agree with you that information about such capabilities should be exposed but maybe it would be wiser to use DT instead of hardcoding it? I mean a WiFi device won't support erase functionality...
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-October/068210.html
Quoted 19 lines
Signed-off-by Chen-Yu Tsai <[email protected]>--- drivers/mmc/host/sunxi-mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mmc/host/sunxi-mmc.c +2
-1@@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)/* 400kHz ~ 50MHz */ mmc->f_min =400000 ; mmc->f_max =50000000 ; - mmc->caps |=MMC_CAP_MMC_HIGHSPEED |MMC_CAP_SD_HIGHSPEED ; + mmc->caps |=MMC_CAP_MMC_HIGHSPEED |MMC_CAP_SD_HIGHSPEED | +MMC_CAP_ERASE ; ret =mmc_of_parse (mmc);if (ret)
Signature · 11 lines
David Lanzend?rfer OpenSourceSupport GmbH System engineer and supporter http://www.o2s.ch/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140820/f6b553d1/attachment.sig>
PATCH 1/1 mmc: sunxi: Declare ERASE capability
Quoted 5 lines · David Lanzend?rfer
Hi
Quoted 2 lines
Declare ERASE capability so we can use filesystems with the discard option and the fstrim tool.
I totally agree with you that information about such capabilities should be exposed but maybe it would be wiser to use DT instead of hardcoding it?
Nope, this is pure software support. No HW config.
What we should do future wise, is to remove the MMC_CAP_ERASE entirely. Due to current existing bugs, mainly in mmc core layer regarding erase, we can't do it yet.
Quoted 1 line
I mean a WiFi device won't support erase functionality...
That's already covered by the mmc core layer. No worries.
Kind regards
Uffe
PATCH 1/1 mmc: sunxi: Declare ERASE capability
Hi
Quoted 5 lines
Quoted 3 lines
I totally agree with you that information about such capabilities should be
exposed but maybe it would be wiser to use DT instead of hardcoding it?Nope, this is pure software support. No HW config.
Okey!
Quoted 3 lines
What we should do future wise, is to remove the
MMC_CAP_ERASEentirely. Due to current existing bugs, mainly in mmc core layer regarding erase, we can't do it yet.
I see.
Quoted 3 lines
Quoted 1 line
I mean a WiFi device won't support erase functionality...
That's already covered by the mmc core layer. No worries.
Splendid!
Ok then. Let's have it in our driver so far until we can get rid of this flag for good.
cheers
Signature · 11 lines
David Lanzend?rfer OpenSourceSupport GmbH System engineer and supporter http://www.o2s.ch/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part. URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140830/239fdd5a/attachment.sig>
PATCH 1/1 mmc: sunxi: Declare ERASE capability
In reply to Chen-Yu TsaiHi,
Quoted 4 lines · Chen-Yu Tsai
Declare ERASE capability so we can use filesystems with the discard option and the fstrim tool.
Signed-off-by Chen-Yu Tsai <[email protected]>
Good one:
Regards,
Hans
Quoted 19 lines
--- drivers/mmc/host/sunxi-mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mmc/host/sunxi-mmc.c +2
-1@@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)/* 400kHz ~ 50MHz */ mmc->f_min =400000 ; mmc->f_max =50000000 ; - mmc->caps |=MMC_CAP_MMC_HIGHSPEED |MMC_CAP_SD_HIGHSPEED ; + mmc->caps |=MMC_CAP_MMC_HIGHSPEED |MMC_CAP_SD_HIGHSPEED | +MMC_CAP_ERASE ; ret =mmc_of_parse (mmc);if (ret)
Ulf Hansson
AppliedPATCH 1/1 mmc: sunxi: Declare ERASE capability
In reply to Chen-Yu TsaiQuoted 4 lines · Chen-Yu Tsai
Declare ERASE capability so we can use filesystems with the discard option and the fstrim tool.
Signed-off-by Chen-Yu Tsai <[email protected]>
Thanks! Applied for next!
Kind regards
Uffe
Quoted 21 lines
--- drivers/mmc/host/sunxi-mmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/mmc/host/sunxi-mmc.c +2
-2@@ -990,7 +990,8 @@ static int sunxi_mmc_probe(struct platform_device *pdev)/* 400kHz ~ 50MHz */ mmc->f_min =400000 ; mmc->f_max =50000000 ; - mmc->caps |=MMC_CAP_MMC_HIGHSPEED |MMC_CAP_SD_HIGHSPEED ; + mmc->caps |=MMC_CAP_MMC_HIGHSPEED |MMC_CAP_SD_HIGHSPEED | +MMC_CAP_ERASE ; ret =mmc_of_parse (mmc);if (ret) --2.1.0