-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers/pcie: Change pcie_get_mbar() to return size and flags #29819
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if we still enforce 80 chars limit, but in doubt please do.
I needed something like that recently, in #29479 but getting both adress and size at once makes sense.
Actually, about differentiating IO and MEM. I don't know if that's relevant anymore since no platform so far make use of IO stuff. We only needed it for galileo board back in the days. |
I personally only care about this info, since e.g. The Realtek 8111G Controller has the following bars
I want to use the first MEM Bar. So I either need this info, or since as you said nobody uses the IO stuff, we could skip all IO Bars aswell. |
|
Ok I skip I/O Bars now aswell |
This comment has been minimized.
This comment has been minimized.
currently pcie_get_mbar only returns the physical address. This changes the function to return the size of the mbar and the flags (IO Bar vs MEM BAR). Signed-off-by: Maximilian Bachmann <[email protected]>
@jhedberg Can you merge this one? I need that function for msi-x and ivshmem |
Maybe proposing a function in parallel to the existing one would have been more aligned with https://docs.zephyrproject.org/latest/development_process/api_lifecycle.html |
currently pcie_get_mbar only returns the physical address.
This changes the function to return the size of the mbar and
the flags (IO Bar vs MEM BAR).
This implements #26491. I did decide to change the existing function instead of adding another function to retrieve the size for the following reasons:
This fixes the macros for the use with IO Bars