Skip to content
Commit 51f8d022 authored by Johann Fischer's avatar Johann Fischer Committed by Fabio Baltieri
Browse files

drivers: usb_dc_dw: cleanup, move USB_DW macros to driver code



Cleanup includes, fix build and missing kernel header include.
Move copyright notice to the top.

USB_DW_* macros are a bit misplaced in register header,
which is supposed to be about registers only.

USB_DW macro is used to point to base of controller register set.
Move it to driver code and add a new variable in driver's configuration
that takes the base address of the instance. This also makes later
porting to UDC API and support multiple instances easier.

Remove redundant DW_USB_IN_EP_NUM and DW_USB_OUT_EP_NUM
macros. Do not limit number of endpoint register in
struct usb_dw_in_ep_reg as it does not reflect common
register mapping of the controller.

Fix build warnings caused by USB_DW_EP_FIFO and use base variable
to calculate data FIFO access register.

Signed-off-by: default avatarJohann Fischer <johann.fischer@nordicsemi.no>
parent 87f50bb7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment