RobertCNelson / bb-kernel

MIT License
130 stars 102 forks source link

Patch for CPSW breaks if PM is disabled #66

Closed willeccles closed 3 years ago

willeccles commented 3 years ago

While building kernel 5.10 without CONFIG_PM, it was failing in the DaVinci MDIO driver, which I found odd. It turns out that this patch defines the function davinci_mdio_update_dt_from_phymask inside of a block checking if CONFIG_PM is enabled, which seems unrelated to the functionality of this patch. I have since patched it to move that function to just after that block and the kernel built successfully. I have attached the patch if it is of any use, though I doubt you'll need my patch for this. I just added this to the patches/drivers/ti/cpsw directory and it built fine. I'm not sure this issue will affect nearly anyone, as the vast majority of people will have CONFIG_PM enabled, but in any case this was an issue and this patch fixes it.

(Note: I had to add .txt for GitHub to allow me to upload the file, but of course it is a valid git patch.) Edit: updated the patch 0002-cpsw-fix-undefined-function-with-PM-disabled.patch.txt

willeccles commented 3 years ago

Aaaaand I just realized vim decided to format when I moved the function, so I'll have to fix that. However, the patch will work the same.

willeccles commented 3 years ago

I have updated the patch now so that it is readable.

RobertCNelson commented 3 years ago

Thanks @willeccles added this to our tree, it'll start hitting every branch. ;)

willeccles commented 3 years ago

Thanks! I'll close this issue now.