提交 a3299499 编写于 作者: F Felipe Balbi 提交者: Greg Kroah-Hartman

usb: dwc3: add struct dwc3_hwparams

That structure will hold a copy of readonly
GHWPARAMS* registers for ease accessing by
the driver.
Signed-off-by: NFelipe Balbi <balbi@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 879631aa
...@@ -506,6 +506,30 @@ static inline void dwc3_trb_to_nat(struct dwc3_trb_hw *hw, struct dwc3_trb *nat) ...@@ -506,6 +506,30 @@ static inline void dwc3_trb_to_nat(struct dwc3_trb_hw *hw, struct dwc3_trb *nat)
nat->control = le32_to_cpup(&hw->ctrl); nat->control = le32_to_cpup(&hw->ctrl);
} }
/**
* dwc3_hwparams - copy of HWPARAMS registers
* @hwparams0 - GHWPARAMS0
* @hwparams1 - GHWPARAMS1
* @hwparams2 - GHWPARAMS2
* @hwparams3 - GHWPARAMS3
* @hwparams4 - GHWPARAMS4
* @hwparams5 - GHWPARAMS5
* @hwparams6 - GHWPARAMS6
* @hwparams7 - GHWPARAMS7
* @hwparams8 - GHWPARAMS8
*/
struct dwc3_hwparams {
u32 hwparams0;
u32 hwparams1;
u32 hwparams2;
u32 hwparams3;
u32 hwparams4;
u32 hwparams5;
u32 hwparams6;
u32 hwparams7;
u32 hwparams8;
};
/** /**
* struct dwc3 - representation of our controller * struct dwc3 - representation of our controller
* @ctrl_req: usb control request which is used for ep0 * @ctrl_req: usb control request which is used for ep0
...@@ -537,6 +561,7 @@ static inline void dwc3_trb_to_nat(struct dwc3_trb_hw *hw, struct dwc3_trb *nat) ...@@ -537,6 +561,7 @@ static inline void dwc3_trb_to_nat(struct dwc3_trb_hw *hw, struct dwc3_trb *nat)
* @link_state: link state * @link_state: link state
* @speed: device speed (super, high, full, low) * @speed: device speed (super, high, full, low)
* @mem: points to start of memory which is used for this struct. * @mem: points to start of memory which is used for this struct.
* @hwparams: copy of hwparams registers
* @root: debugfs root folder pointer * @root: debugfs root folder pointer
*/ */
struct dwc3 { struct dwc3 {
...@@ -589,6 +614,7 @@ struct dwc3 { ...@@ -589,6 +614,7 @@ struct dwc3 {
u8 speed; u8 speed;
void *mem; void *mem;
struct dwc3_hwparams hwparams;
struct dentry *root; struct dentry *root;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册