Просмотр исходного кода

linux: replace u-boot,env with nvmem,layout

The former is deprecated in favor of nvmem-layout. In preparation for
eventual removal from the kernel, do so here.

Signed-off-by: Rosen Penev <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/16097
Signed-off-by: Robert Marko <[email protected]>
Rosen Penev 1 год назад
Родитель
Сommit
fe17cc1bfd
24 измененных файлов с 127 добавлено и 52 удалено
  1. 4 1
      target/linux/apm821xx/dts/meraki-mr24.dts
  2. 4 1
      target/linux/apm821xx/dts/meraki-mx60.dts
  3. 13 10
      target/linux/apm821xx/dts/netgear-wndap6x0.dtsi
  4. 8 2
      target/linux/apm821xx/dts/netgear-wndr4700.dts
  5. 8 3
      target/linux/apm821xx/dts/wd-mybooklive.dts
  6. 4 1
      target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi
  7. 4 1
      target/linux/ath79/dts/ar7240_ruckus_zf7025.dts
  8. 4 1
      target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi
  9. 4 1
      target/linux/ath79/dts/qca955x_senao_loader.dtsi
  10. 4 1
      target/linux/ath79/dts/qca9563_dlink_dap-1720-a1.dts
  11. 5 2
      target/linux/ath79/dts/qca9563_dlink_dir-8x9-a1.dtsi
  12. 4 1
      target/linux/ath79/dts/qca9563_ubnt_amplifi-router-hd.dts
  13. 6 3
      target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
  14. 8 2
      target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap391x.dts
  15. 1 0
      target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts
  16. 1 0
      target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso
  17. 1 0
      target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso
  18. 4 1
      target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts
  19. 15 12
      target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-xe3-4.dts
  20. 4 1
      target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts
  21. 6 2
      target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts
  22. 6 3
      target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts
  23. 5 2
      target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts
  24. 4 1
      target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts

+ 4 - 1
target/linux/apm821xx/dts/meraki-mr24.dts

@@ -65,9 +65,12 @@
 				 * around for bad block management
 				 */
 				label = "u-boot-env";
-				compatible = "u-boot,env";
 				reg = <0x00150000 0x00010000>;
 				read-only;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			partition@160000 {

+ 4 - 1
target/linux/apm821xx/dts/meraki-mx60.dts

@@ -64,8 +64,11 @@
 			partition@100000 {
 				label = "u-boot-env";
 				reg = <0x00100000 0x00100000>;
-				compatible = "u-boot,env";
 				read-only;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			partition@200000 {

+ 13 - 10
target/linux/apm821xx/dts/netgear-wndap6x0.dtsi

@@ -47,24 +47,27 @@
 			};
 
 			partition@100000 {
-				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0x00100000 0x0004000>;
 				read-only;
 
-				ethaddr {
-				};
+				nvmem-layout {
+					compatible = "u-boot,env";
 
-				bootcmd {
-				};
+					ethaddr {
+					};
 
-				serno {
-				};
+					bootcmd {
+					};
 
-				ProductID {
-				};
+					serno {
+					};
+
+					ProductID {
+					};
 
-				HardwareVer {
+					HardwareVer {
+					};
 				};
 			};
 

+ 8 - 2
target/linux/apm821xx/dts/netgear-wndr4700.dts

@@ -188,9 +188,12 @@
 
 				partition@40000 {
 					label = "u-boot-env-main";
-					compatible = "u-boot,env-redundant-count";
 					reg = <0x00040000 0x20000>; /* one block is 128k */
 					read-only;
+
+					nvmem-layout {
+						compatible = "u-boot,env-redundant-count";
+					};
 				};
 
 /*
@@ -199,9 +202,12 @@
  *
  *				partition@60000 {
  *					label = "u-boot-env-redundant";
- *					compatible = "u-boot,env-redundant-count";
  *					reg = <0x00060000 0x20000>;
  *					read-only;
+ *
+ *					nvmem-layout {
+ *						compatible = "u-boot,env-redundant-count";
+ *					};
  *				};
  */
 			};

+ 8 - 3
target/linux/apm821xx/dts/wd-mybooklive.dts

@@ -48,11 +48,14 @@
 					#size-cells = <1>;
 
 					partition@0 {
-						compatible = "u-boot,env-redundant-bool";
 						reg = <0x00000000 0x00001000>;
 						label = "u-boot-env-1";
 
-						ethaddr {
+						nvmem-layout {
+							compatible = "u-boot,env-redundant-bool";
+
+							ethaddr {
+							};
 						};
 					};
 
@@ -60,10 +63,12 @@
  * Causes the following warning: * sysfs: cannot create duplicate filename '/bus/nvmem/devices/u-boot-env0'
  *
  *					partition@1000 {
- *						compatible = "u-boot,env-redundant-bool";
  *						reg = <0x00001000 0x00001000>;
  *						label = "u-boot-env-2";
  *
+ *						nvmem-layout {
+ *							compatible = "u-boot,env-redundant-bool";
+ *						};
  *					};
  */
 				};

+ 4 - 1
target/linux/ath79/dts/ar7161_ruckus_gd11.dtsi

@@ -201,9 +201,12 @@
 			};
 
 			partition@f80000 {
-				compatible = "u-boot,env";
 				reg = <0xf80000 0x40000>;
 				label = "u-boot-env";
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			board_data: partition@fc0000 {

+ 4 - 1
target/linux/ath79/dts/ar7240_ruckus_zf7025.dts

@@ -146,9 +146,12 @@
 			};
 
 			partition@f80000 {
-				compatible = "u-boot,env";
 				reg = <0xf80000 0x40000>;
 				label = "u-boot-env";
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			board_data: partition@fc0000 {

+ 4 - 1
target/linux/ath79/dts/ar934x_ruckus_zf73xx.dtsi

@@ -104,9 +104,12 @@
 			};
 
 			partition@f40000 {
-				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0xf40000 0x040000>;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			board_data: partition@f80000 {

+ 4 - 1
target/linux/ath79/dts/qca955x_senao_loader.dtsi

@@ -59,9 +59,12 @@
 			};
 
 			partition@40000 {
-				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0x040000 0x010000>;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			partition@50000 {

+ 4 - 1
target/linux/ath79/dts/qca9563_dlink_dap-1720-a1.dts

@@ -104,10 +104,13 @@
 			};
 
 			partition@40000 {
-				compatible = "u-boot,env";
 				label = "u-boot-env"; // vendor calls it `bdcfg`
 				reg = <0x040000 0x10000>;
 				read-only;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			partition@50000 {

+ 5 - 2
target/linux/ath79/dts/qca9563_dlink_dir-8x9-a1.dtsi

@@ -56,10 +56,13 @@
 				read-only;
 			};
 
-			bdcfg: partition@40000 {
-				compatible = "u-boot,env";
+			partition@40000 {
 				label = "bdcfg";
 				reg = <0x040000 0x010000>;
+
+				bdcfg: nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			partition@50000 {

+ 4 - 1
target/linux/ath79/dts/qca9563_ubnt_amplifi-router-hd.dts

@@ -56,9 +56,12 @@
 			};
 
 			partition@60000 {
-				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0x060000 0x010000>;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			partition@70000 {

+ 6 - 3
target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts

@@ -196,12 +196,15 @@
 				reg = <0x190000 0x1dc0000>;
 			};
 			partition9@1f50000 {
-				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0x01f50000 0x00010000>;
 
-				macaddr_ubootenv_ethaddr: ethaddr {
-					#nvmem-cell-cells = <1>;
+				nvmem-layout {
+					compatible = "u-boot,env";
+
+					macaddr_ubootenv_ethaddr: ethaddr {
+						#nvmem-cell-cells = <1>;
+					};
 				};
 			};
 			partition10@1f60000 {

+ 8 - 2
target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap391x.dts

@@ -278,9 +278,12 @@
 
 			partition@e0000 {
 				label = "CFG1";
-				compatible = "u-boot,env-redundant-bool";
 				reg = <0xe0000 0x10000>;
 				read-only;
+
+				nvmem-layout {
+					compatible = "u-boot,env-redundant-bool";
+				};
 			};
 
 			partition@f0000 {
@@ -331,9 +334,12 @@
 
 			partition@1fe0000 {
 				label = "CFG2";
-				compatible = "u-boot,env-redundant-bool";
 				reg = <0x1fe0000 0x10000>;
 				read-only;
+
+				nvmem-layout {
+					compatible = "u-boot,env-redundant-bool";
+				};
 			};
 		};
 	};

+ 1 - 0
target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dts

@@ -163,6 +163,7 @@
 			partitions {
 				block-partition-u-boot-env {
 					partname = "u-boot-env";
+
 					nvmem-layout {
 						compatible = "u-boot,env";
 					};

+ 1 - 0
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtso

@@ -40,6 +40,7 @@
 					partitions {
 						block-partition-env {
 							partname = "ubootenv";
+
 							nvmem-layout {
 								compatible = "u-boot,env";
 							};

+ 1 - 0
target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtso

@@ -38,6 +38,7 @@
 					partitions {
 						block-partition-env {
 							partname = "ubootenv";
+
 							nvmem-layout {
 								compatible = "u-boot,env";
 							};

+ 4 - 1
target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts

@@ -165,9 +165,12 @@
 
 			/* Empty space on NOR repurposed for U-Boot environment */
 			partition@fe0000 {
-				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0xfe0000 0x20000>;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 		};
 	};

+ 15 - 12
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6010-xe3-4.dts

@@ -353,24 +353,27 @@
 			};
 
 			partition@510000 {
-				compatible = "u-boot,env";
 				label = "0:APPSBLENV";
 				reg = <0x510000 0x10000>;
 
-				ethaddr: ethaddr {
-					#nvmem-cell-cells = <0>;
-				};
+				nvmem-layout {
+					compatible = "u-boot,env";
 
-				eth1addr: eth1addr {
-					#nvmem-cell-cells = <0>;
-				};
+					ethaddr: ethaddr {
+						#nvmem-cell-cells = <0>;
+					};
 
-				eth2addr: eth2addr {
-					#nvmem-cell-cells = <0>;
-				};
+					eth1addr: eth1addr {
+						#nvmem-cell-cells = <0>;
+					};
+
+					eth2addr: eth2addr {
+						#nvmem-cell-cells = <0>;
+					};
 
-				eth5addr: eth5addr {
-					#nvmem-cell-cells = <0>;
+					eth5addr: eth5addr {
+						#nvmem-cell-cells = <0>;
+					};
 				};
 			};
 

+ 4 - 1
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts

@@ -193,9 +193,12 @@
 			};
 
 			partition@480000 {
-				compatible = "u-boot,env";
 				label = "0:appsblenv";
 				reg = <0x480000 0x10000>;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			partition@490000 {

+ 6 - 2
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-wax218.dts

@@ -167,11 +167,15 @@
 				#size-cells = <1>;
 
 				partition@0 {
-					compatible = "u-boot,env";
 					label = "env-data";
 					reg = <0x0 0x40000>;
 
-					macaddr_ubootenv_ethaddr: ethaddr {};
+					nvmem-layout {
+						compatible = "u-boot,env";
+
+						macaddr_ubootenv_ethaddr: ethaddr {
+						};
+					};
 				};
 			};
 		};

+ 6 - 3
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts

@@ -212,12 +212,15 @@
 			};
 
 			partition@600000 {
-				compatible = "u-boot,env";
 				label = "0:appsblenv";
 				reg = <0x600000 0x10000>;
 
-				macaddr_lan: ethaddr {
-					#nvmem-cell-cells = <1>;
+				nvmem-layout {
+					compatible = "u-boot,env";
+
+					macaddr_lan: ethaddr {
+						#nvmem-cell-cells = <1>;
+					};
 				};
 			};
 

+ 5 - 2
target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-wxr-5950ax12.dts

@@ -195,11 +195,14 @@
 				#size-cells = <1>;
 
 				partition@0 {
-					compatible = "u-boot,env";
 					label = "env-data";
 					reg = <0x0 0x40000>;
 
-					macaddr_appsblenv_ethaddr: ethaddr {
+					nvmem-layout {
+						compatible = "u-boot,env";
+
+						macaddr_appsblenv_ethaddr: ethaddr {
+						};
 					};
 				};
 			};

+ 4 - 1
target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts

@@ -81,9 +81,12 @@
 			};
 
 			partition@40000 {
-				compatible = "u-boot,env";
 				label = "Config";
 				reg = <0x40000 0x10000>;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+				};
 			};
 
 			partition@50000 {