VER-721: ath12k: select default board file based on machine compatible#70
VER-721: ath12k: select default board file based on machine compatible#70adrian-nicolau wants to merge 2 commits intotg-v6.18-ath12k-nextfrom
Conversation
|
|
||
| bd_api = 1; | ||
| ret = ath12k_core_fetch_board_data_api_1(ab, bd, ATH12K_DEFAULT_BOARD_FILE); | ||
|
|
There was a problem hiding this comment.
I think it would be a better idea to use the same method as we did for the TG brd file:
make board.bin a symbolic link, and then link it to the correct file in boot time, and then load the driver.
This will allow us more flexibility (e.g. we might have 10s of board files in the future) and also is more flexible since we don't do change in the kernel.
There was a problem hiding this comment.
The filesystem is read-only, I cannot create a link after boot, need to do it from Yocto and there's no differentiation for machines there.
There was a problem hiding this comment.
in the TG project,
/lib/firmware/wil6210.brd is a symlink to /run/selected_board_file.brd (or something similar).
When the system boots, we create /run/selected_board_file.brd as a symlink to /lib/firmware/xyz.brd (based on the machine's JSON file).
When the driver starts, it loads /lib/firmware/wil6210.brd which redirects to -> /run/selected_board_file.brd -> /lib/firmware/xyz.brd.
/run/ is a temporary file system and is RW.
There was a problem hiding this comment.
Oh understood, two levels of symlinks, closing this PR.
Currently ath12k is loaded on two platforms: "siklu,n366" (using 8devices noni card) and "siklu,ipq6018-ctu" (using vvdn card). Load specific board firmware based on DT compatible string and fallback to default one if neither.