Message ID | 20230103010904.3201835-1-bryan.odonoghue@linaro.org |
---|---|
Headers | show |
Series | Add MSM8939 SoC support with two devices | expand |
On 03/01/2023 09:14, Krzysztof Kozlowski wrote: > ../arch/arm64/boot/dts/qcom/msm8939.dtsi:1825.23-1842.5: Warning > (simple_bus_reg): /soc@0/mmc@7824000: simple-bus unit address format > error, expected "7824900 For the record the driver consuming this dt entry requires the host regs to come first followed by the core sdhc_1: mmc@7824000 { compatible = "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"; reg = <0x07824900 0x11c>, <0x07824000 0x800>; reg-names = "hc", "core"; } If I change this and the msm8916 to sdhc_1: mmc@7824000 { compatible = "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"; reg = <0x07824000 0x800>, <0x07824900 0x11c>; reg-names = "core", "hc"; } the warning goes away but then this code won't work as intended anymore. drivers/mmc/host/sdhci-msm.c: msm_host->core_mem = devm_platform_ioremap_resource(pdev, 1); Weirdly when I change the ordering of the registers in the dts the SD seems to work just fine, which is at variance to my reading of the code. Converting the sdhci driver to use the register name, instead of a static ordering of the regs feels like something to be done in a separate series. --- bod
On 10/01/2023 14:14, Bryan O'Donoghue wrote: > On 03/01/2023 09:14, Krzysztof Kozlowski wrote: >> ../arch/arm64/boot/dts/qcom/msm8939.dtsi:1825.23-1842.5: Warning >> (simple_bus_reg): /soc@0/mmc@7824000: simple-bus unit address format >> error, expected "7824900 > > For the record the driver consuming this dt entry requires the host regs > to come first followed by the core > > sdhc_1: mmc@7824000 { > compatible = "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"; > reg = <0x07824900 0x11c>, <0x07824000 0x800>; > reg-names = "hc", "core"; > } > > If I change this and the msm8916 to That's not the solution. The warning is saying that unit address does not match your reg. You need to correct unit address. Best regards, Krzysztof
On 10/01/2023 13:24, Krzysztof Kozlowski wrote: > On 10/01/2023 14:14, Bryan O'Donoghue wrote: >> On 03/01/2023 09:14, Krzysztof Kozlowski wrote: >>> ../arch/arm64/boot/dts/qcom/msm8939.dtsi:1825.23-1842.5: Warning >>> (simple_bus_reg): /soc@0/mmc@7824000: simple-bus unit address format >>> error, expected "7824900 >> >> For the record the driver consuming this dt entry requires the host regs >> to come first followed by the core >> >> sdhc_1: mmc@7824000 { >> compatible = "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"; >> reg = <0x07824900 0x11c>, <0x07824000 0x800>; >> reg-names = "hc", "core"; >> } >> >> If I change this and the msm8916 to > > That's not the solution. The warning is saying that unit address does > not match your reg. You need to correct unit address. > > Best regards, > Krzysztof > Is it not the case that the unit-address should match the first reg and that the first reg should also be the lowest address ? --- bod
On 10.01.2023 14:42, Bryan O'Donoghue wrote: > On 10/01/2023 13:24, Krzysztof Kozlowski wrote: >> On 10/01/2023 14:14, Bryan O'Donoghue wrote: >>> On 03/01/2023 09:14, Krzysztof Kozlowski wrote: >>>> ../arch/arm64/boot/dts/qcom/msm8939.dtsi:1825.23-1842.5: Warning >>>> (simple_bus_reg): /soc@0/mmc@7824000: simple-bus unit address format >>>> error, expected "7824900 >>> >>> For the record the driver consuming this dt entry requires the host regs >>> to come first followed by the core >>> >>> sdhc_1: mmc@7824000 { >>> compatible = "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"; >>> reg = <0x07824900 0x11c>, <0x07824000 0x800>; >>> reg-names = "hc", "core"; >>> } >>> >>> If I change this and the msm8916 to >> >> That's not the solution. The warning is saying that unit address does >> not match your reg. You need to correct unit address. >> >> Best regards, >> Krzysztof >> > > Is it not the case that the unit-address should match the first reg Yes and that the first reg should also be the lowest address ? Depends on what the first reg is, bindings usually dictate the order. Konrad > > --- > bod
On 10/01/2023 14:42, Bryan O'Donoghue wrote: > On 10/01/2023 13:24, Krzysztof Kozlowski wrote: >> On 10/01/2023 14:14, Bryan O'Donoghue wrote: >>> On 03/01/2023 09:14, Krzysztof Kozlowski wrote: >>>> ../arch/arm64/boot/dts/qcom/msm8939.dtsi:1825.23-1842.5: Warning >>>> (simple_bus_reg): /soc@0/mmc@7824000: simple-bus unit address format >>>> error, expected "7824900 >>> >>> For the record the driver consuming this dt entry requires the host regs >>> to come first followed by the core >>> >>> sdhc_1: mmc@7824000 { >>> compatible = "qcom,msm8916-sdhci", "qcom,sdhci-msm-v4"; >>> reg = <0x07824900 0x11c>, <0x07824000 0x800>; >>> reg-names = "hc", "core"; >>> } >>> >>> If I change this and the msm8916 to >> >> That's not the solution. The warning is saying that unit address does >> not match your reg. You need to correct unit address. >> >> Best regards, >> Krzysztof >> > > Is it not the case that the unit-address should match the first reg and As Konrad wrote, yes. > that the first reg should also be the lowest address ? I never heard such requirement, although it would be logical choice. In this case your solution is to use the higher address as unit address. apq8084, msm8226 and maybe more already do it. You can also look at this that HC was made as the main IO address of a device (if one can call something "main" here), thus it should be expressed in unit address. Best regards, Krzysztof