[PATCH] ramips: replace obsolete mx25l25635f hack

David Bauer mail at david-bauer.net
Thu Jan 21 04:37:43 EST 2021


Hi,

On 1/21/21 5:21 AM, DENG Qingfang wrote:
> The kernel bump to 5.4 removed the mx25l25635f hack, and the upstream
> property "broken-flash-reset" should be used instead.

Is this dependent on board design? The need for the old hack should be fixed by
this upstream commit [0]. Given that commit adds SNOR_F_4B_OPCODES for the
mx25l25635f, it should in turn disable the hack enabled by broken-flash-reset, as
this is dependend on 4B opcodes not being supported. [1]

Or am i missing something here?

[0] https://github.com/torvalds/linux/commit/2bffa65da43e399079dad5947c6aa9ab3cfa4ad4
[1] https://github.com/torvalds/linux/blob/master/drivers/mtd/spi-nor/core.c#L3270

Best wishes
David

> 
> Signed-off-by: DENG Qingfang <dqfext at gmail.com>
> ---
>  target/linux/ramips/dts/mt7620a_youku_yk1.dts        | 3 ++-
>  target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts  | 3 ++-
>  target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts | 3 ++-
>  target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts | 3 ++-
>  4 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/target/linux/ramips/dts/mt7620a_youku_yk1.dts b/target/linux/ramips/dts/mt7620a_youku_yk1.dts
> index 86e2031aa6..a3e73e52a7 100644
> --- a/target/linux/ramips/dts/mt7620a_youku_yk1.dts
> +++ b/target/linux/ramips/dts/mt7620a_youku_yk1.dts
> @@ -67,10 +67,11 @@
>  	status = "okay";
>  
>  	flash at 0 {
> -		compatible = "mx25l25635f", "jedec,spi-nor";
> +		compatible = "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <25000000>;
>  		m25p,fast-read;
> +		broken-flash-reset;
>  
>  		partitions {
>  			compatible = "fixed-partitions";
> diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
> index 49eeb46d5f..e805454bf6 100644
> --- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
> +++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
> @@ -65,10 +65,11 @@
>  	status = "okay";
>  
>  	flash at 0 {
> -		compatible = "mx25l25635f", "jedec,spi-nor";
> +		compatible = "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <80000000>;
>  		m25p,fast-read;
> +		broken-flash-reset;
>  
>  		partitions {
>  			compatible = "fixed-partitions";
> diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
> index f5425ccfee..2454e640a9 100644
> --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
> +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
> @@ -15,9 +15,10 @@
>  	status = "okay";
>  
>  	flash at 0 {
> -		compatible = "mx25l25635f", "jedec,spi-nor";
> +		compatible = "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <50000000>;
> +		broken-flash-reset;
>  
>  		partitions {
>  			compatible = "fixed-partitions";
> diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts
> index 401868362e..d5ed78d03f 100644
> --- a/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts
> +++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-nanohd.dts
> @@ -11,9 +11,10 @@
>  	status = "okay";
>  
>  	flash at 0 {
> -		compatible = "mx25l25635f", "jedec,spi-nor";
> +		compatible = "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <50000000>;
> +		broken-flash-reset;
>  
>  		partitions {
>  			compatible = "fixed-partitions";
> 



More information about the openwrt-devel mailing list