Re: [PATCH] mmc: renesas_sdhi: fix WP detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 06, 2018 at 12:48:19PM +0900, Masahiro Yamada wrote:
> 2018-03-06 5:48 GMT+09:00 Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>:
> > Commit "mmc: renesas_sdhi: use MMC_CAP2_NO_WRITE_PROTECT instead of
> > TMIO own flag" activated MMC_CAP2_NO_WRITE_PROTECT for Renesas SDHI
> > which incorrectly disabled WP altogether instead of only disabling the
> > internal mechanism.
> 
> 
> I am not opposed to this patch,
> but I have a question.
> 
> Is this is a real problem in the upstream kernel?

Not upstream, but mmc/next. The patch I mentioned in the above commit
message is in mmc/next only. Yes, it is a real problem. As I said below,
"more testing revealed this" on Gen3, at least.

> (If so, how do renesas boards set-up WP GPIOs?)

Quite the standard way, I'd think:

$ grep 'wp-gpios' arch/arm64/boot/dts/renesas/*
arch/arm64/boot/dts/renesas/salvator-common.dtsi:	wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
arch/arm64/boot/dts/renesas/salvator-common.dtsi:	wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;

$ grep 'wp-gpios' arch/arm/boot/dts/r8a*
arch/arm/boot/dts/r8a7778-bockw.dts:	wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/r8a7791-koelsch.dts:	wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/r8a7791-koelsch.dts:	wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/r8a7791-porter.dts:	wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/r8a7793-gose.dts:	wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/r8a7793-gose.dts:	wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/r8a7794-alt.dts:	wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/r8a7794-alt.dts:	wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;

> When I wrote the addressed patch,
> I checked all renesas drivers and device trees,
> and confirmed no one set WP-GPIOs.

Yes, I saw this in the commit message and was confused, too. I seem to also
have overlooked it in my review. I can't really tell what changed or otherwise
went wrong, but fact is that Gen3 can't check RO currently im mmc/next and
after my patch it can. Well, this is why we do apply through testing, I
guess...

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux