Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'devicetree-fixes-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:

- Fix DT memory scanning for some MIPS boards when memory is not
specified in DT

- Redo CONFIG_CMDLINE* handling for missing /chosen node. The first
attempt broke PS3 (and possibly other PPC platforms).

- Fix constraints in QCom Soundwire schema

* tag 'devicetree-fixes-for-6.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of: fdt: Honor CONFIG_CMDLINE* even without /chosen node, take 2
Revert "of: fdt: Honor CONFIG_CMDLINE* even without /chosen node"
dt-bindings: soundwire: qcom,soundwire: correct sizes related to number of ports
of/fdt: run soc memory setup when early_init_dt_scan_memory fails

+38 -34
+5 -5
Documentation/devicetree/bindings/soundwire/qcom,soundwire.yaml
··· 80 80 or applicable for the respective data port. 81 81 More info in MIPI Alliance SoundWire 1.0 Specifications. 82 82 minItems: 3 83 - maxItems: 5 83 + maxItems: 8 84 84 85 85 qcom,ports-sinterval-low: 86 86 $ref: /schemas/types.yaml#/definitions/uint8-array ··· 124 124 or applicable for the respective data port. 125 125 More info in MIPI Alliance SoundWire 1.0 Specifications. 126 126 minItems: 3 127 - maxItems: 5 127 + maxItems: 8 128 128 129 129 qcom,ports-block-pack-mode: 130 130 $ref: /schemas/types.yaml#/definitions/uint8-array ··· 154 154 or applicable for the respective data port. 155 155 More info in MIPI Alliance SoundWire 1.0 Specifications. 156 156 minItems: 3 157 - maxItems: 5 157 + maxItems: 8 158 158 items: 159 159 oneOf: 160 160 - minimum: 0 ··· 171 171 or applicable for the respective data port. 172 172 More info in MIPI Alliance SoundWire 1.0 Specifications. 173 173 minItems: 3 174 - maxItems: 5 174 + maxItems: 8 175 175 items: 176 176 oneOf: 177 177 - minimum: 0 ··· 187 187 or applicable for the respective data port. 188 188 More info in MIPI Alliance SoundWire 1.0 Specifications. 189 189 minItems: 3 190 - maxItems: 5 190 + maxItems: 8 191 191 items: 192 192 oneOf: 193 193 - minimum: 0
+1 -1
arch/mips/ralink/of.c
··· 64 64 dtb = get_fdt(); 65 65 __dt_setup_arch(dtb); 66 66 67 - if (!early_init_dt_scan_memory()) 67 + if (early_init_dt_scan_memory()) 68 68 return; 69 69 70 70 if (soc_info.mem_detect)
+32 -28
drivers/of/fdt.c
··· 1099 1099 */ 1100 1100 int __init early_init_dt_scan_memory(void) 1101 1101 { 1102 - int node; 1102 + int node, found_memory = 0; 1103 1103 const void *fdt = initial_boot_params; 1104 1104 1105 1105 fdt_for_each_subnode(node, fdt, 0) { ··· 1139 1139 1140 1140 early_init_dt_add_memory_arch(base, size); 1141 1141 1142 + found_memory = 1; 1143 + 1142 1144 if (!hotpluggable) 1143 1145 continue; 1144 1146 ··· 1149 1147 base, base + size); 1150 1148 } 1151 1149 } 1152 - return 0; 1150 + return found_memory; 1153 1151 } 1154 1152 1155 1153 int __init early_init_dt_scan_chosen(char *cmdline) ··· 1163 1161 if (node < 0) 1164 1162 node = fdt_path_offset(fdt, "/chosen@0"); 1165 1163 if (node < 0) 1166 - return -ENOENT; 1164 + /* Handle the cmdline config options even if no /chosen node */ 1165 + goto handle_cmdline; 1167 1166 1168 1167 chosen_node_offset = node; 1169 1168 1170 1169 early_init_dt_check_for_initrd(node); 1171 1170 early_init_dt_check_for_elfcorehdr(node); 1172 - 1173 - /* Retrieve command line */ 1174 - p = of_get_flat_dt_prop(node, "bootargs", &l); 1175 - if (p != NULL && l > 0) 1176 - strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE)); 1177 1171 1178 1172 rng_seed = of_get_flat_dt_prop(node, "rng-seed", &l); 1179 1173 if (rng_seed && l > 0) { ··· 1182 1184 of_fdt_crc32 = crc32_be(~0, initial_boot_params, 1183 1185 fdt_totalsize(initial_boot_params)); 1184 1186 } 1187 + 1188 + /* Retrieve command line */ 1189 + p = of_get_flat_dt_prop(node, "bootargs", &l); 1190 + if (p != NULL && l > 0) 1191 + strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE)); 1192 + 1193 + handle_cmdline: 1194 + /* 1195 + * CONFIG_CMDLINE is meant to be a default in case nothing else 1196 + * managed to set the command line, unless CONFIG_CMDLINE_FORCE 1197 + * is set in which case we override whatever was found earlier. 1198 + */ 1199 + #ifdef CONFIG_CMDLINE 1200 + #if defined(CONFIG_CMDLINE_EXTEND) 1201 + strlcat(cmdline, " ", COMMAND_LINE_SIZE); 1202 + strlcat(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 1203 + #elif defined(CONFIG_CMDLINE_FORCE) 1204 + strscpy(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 1205 + #else 1206 + /* No arguments from boot loader, use kernel's cmdl*/ 1207 + if (!((char *)cmdline)[0]) 1208 + strscpy(cmdline, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 1209 + #endif 1210 + #endif /* CONFIG_CMDLINE */ 1211 + 1212 + pr_debug("Command line is: %s\n", (char *)cmdline); 1185 1213 1186 1214 return 0; 1187 1215 } ··· 1300 1276 rc = early_init_dt_scan_chosen(boot_command_line); 1301 1277 if (rc) 1302 1278 pr_warn("No chosen node found, continuing without\n"); 1303 - 1304 - /* 1305 - * CONFIG_CMDLINE is meant to be a default in case nothing else 1306 - * managed to set the command line, unless CONFIG_CMDLINE_FORCE 1307 - * is set in which case we override whatever was found earlier. 1308 - */ 1309 - #ifdef CONFIG_CMDLINE 1310 - #if defined(CONFIG_CMDLINE_EXTEND) 1311 - strlcat(boot_command_line, " ", COMMAND_LINE_SIZE); 1312 - strlcat(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 1313 - #elif defined(CONFIG_CMDLINE_FORCE) 1314 - strscpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 1315 - #else 1316 - /* No arguments from boot loader, use kernel's cmdl */ 1317 - if (!boot_command_line[0]) 1318 - strscpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 1319 - #endif 1320 - #endif /* CONFIG_CMDLINE */ 1321 - 1322 - pr_debug("Command line is: %s\n", boot_command_line); 1323 1279 1324 1280 /* Setup memory, calling early_init_dt_add_memory_arch */ 1325 1281 early_init_dt_scan_memory();