summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.h
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-02-19 23:29:16 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-22 08:11:18 +0100
commitf926ddbc4b29e1be3dd5924092676097434785df (patch)
tree1e2c7762f2ccb5e2d6893a2a9d49e9e33a600d78 /drivers/usb/host/xhci.h
parent7a0e0c3bf073fb876fc9bc2698e4e47946371f0b (diff)
downloadbarebox-f926ddbc4b29e1be3dd5924092676097434785df.tar.gz
barebox-f926ddbc4b29e1be3dd5924092676097434785df.tar.xz
usb: xhci-hcd: Simplify TRB initialization code
Current TRB initialization code in xHCI driver is: a) Somewhat inconsistent in endianness correctness: LE is insured in some places whereas in some places it isn't b) Somewhat inconsistent in how DMA buffer address is being written: some places utilize xhci_write_64, whereas others just assing cmd_trb field directly c) A bit wasetful since in a number of codepaths where TRB is used it is memset to zero first only to have 80+% of its fields changed to something else right after. To fix all of the above introduce xhci_init_event_cmd_trb(), that will initialize all of the fileds to desired values only once as well as taking care of endianness. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb/host/xhci.h')
0 files changed, 0 insertions, 0 deletions