-
Notifications
You must be signed in to change notification settings - Fork 7.3k
drivers: usb: rename UDC buffer to USB buffer #86920
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
base: main
Are you sure you want to change the base?
Conversation
drivers/usb/udc/Kconfig
Outdated
@@ -25,7 +25,7 @@ config UDC_BUF_POOL_SIZE | |||
help | |||
Total amount of memory available for UDC requests. | |||
|
|||
config UDC_BUF_FORCE_NOCACHE | |||
config USB_BUF_FORCE_NOCACHE |
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.
already see it in drivers/usb/Kconfig.
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.
Indeed, the config was supposedly moved but the old entry is not removed.
Move the common rounding pattern to the UDC_ROUND_UP macro. Signed-off-by: Johann Fischer <[email protected]>
Let's organize the common USB driver headers in include. Signed-off-by: Johann Fischer <[email protected]>
Move it to USB common so that it can be used on the host side in the future. Signed-off-by: Johann Fischer <[email protected]>
@@ -3,6 +3,13 @@ | |||
# Copyright (c) 2016 Wind River Systems, Inc. | |||
# SPDX-License-Identifier: Apache-2.0 | |||
|
|||
config USB_BUF_FORCE_NOCACHE | |||
bool |
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 wouldn't remove the prompt as part of rename macro commit.
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.
Changing functional behavior is something that should not be done in rename commit.
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.
Changing functional behavior is something that should not be done in rename commit.
Where did you get that?
What functional behavior has been changed that is not described in the commit message?
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.
The Kconfig symbol is now promptless.
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.
It should not have a prompt. And now it is moved up one level and it must not have a prompt. Rather there also should be menu USB
.
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.
Hi @jfischer-no Could you please help to explain why it should not have a prompt? Without prompt, it can't be configured in application. Take NXP USB controller as one example, USB_BUF_FORCE_NOCACHE
can be true default. application can set it as false, then data is in cached ram and data size aligned with cache line size, NXP USB controller will do the cached data maintenance.
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.
then data is in cached ram and data size aligned with cache line size, NXP USB controller will do the cached data maintenance.
If your driver can handle it, the driver should not select this option at all.
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.
OK, I understand your point. My original thought is: USB_BUF_FORCE_NOCACHE
can give option that can be selected by User/Application. For example: User put the USB transfer buffer to non-cached ram that is faster (internal ram) than cached ram (external ram) in order that CPU can process the USB data faster, then the USB_BUF_FORCE_NOCACHE
can be enabled by application. Anyway the USB buffer of application can be put in non-cached ram even USB_BUF_FORCE_NOCACHE
is disabled. But the stack's USB transfer buffer's location can only be controlled by USB_BUF_FORCE_NOCACHE
, application can't control it.
If you think it should not be controlled by application, I don't see the strong request now.
After this is merged, I can create PR to not select USB_BUF_FORCE_NOCACHE
default in NXP controller drivers.
drivers/usb/udc/Kconfig
Outdated
@@ -25,7 +25,7 @@ config UDC_BUF_POOL_SIZE | |||
help | |||
Total amount of memory available for UDC requests. | |||
|
|||
config UDC_BUF_FORCE_NOCACHE | |||
config USB_BUF_FORCE_NOCACHE |
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.
Indeed, the config was supposedly moved but the old entry is not removed.
Rename it to USB buffers so we can use it in host support without confusion. Keep the UDC_* macros for now, we can deprecate and remove them later. Move the UDC_BUF_FORCE_NOCACHE Kconfig option level up and also rename it so that it can be used by the UHC drivers. Do not keep the prompt, as it is not something a user would select in menuconfig. Signed-off-by: Johann Fischer <[email protected]>
Allow to use DMAable buffers in UHC driver and host support. Signed-off-by: Johann Fischer <[email protected]>
@@ -3,6 +3,13 @@ | |||
# Copyright (c) 2016 Wind River Systems, Inc. | |||
# SPDX-License-Identifier: Apache-2.0 | |||
|
|||
config USB_BUF_FORCE_NOCACHE | |||
bool |
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.
Changing functional behavior is something that should not be done in rename commit.
Rename it to USB buffers so we can use it in host support without
confusion. Keep the UDC_* macros for now, we can deprecate and remove
them later.