diff options
author | 2021-06-08 15:57:49 +0800 | |
---|---|---|
committer | 2021-06-15 15:46:45 +0200 | |
commit | cd59ea91ea7dd68b31e5d6156078b29123842ed7 (patch) | |
tree | 3acb580d938e9e1b49f2c992e80ab2b41a844a67 /drivers/usb/mtu3/mtu3.h | |
parent | usb: mtu3: rebuild role switch get/set hooks (diff) | |
download | linux-dev-cd59ea91ea7dd68b31e5d6156078b29123842ed7.tar.xz linux-dev-cd59ea91ea7dd68b31e5d6156078b29123842ed7.zip |
usb: mtu3: use clock bulk to get clocks
Use clock bulk helpers to get/enable/disable clocks, meanwhile
make sys_ck optional, then will be easier to handle clocks.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1623139069-8173-24-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/mtu3/mtu3.h')
-rw-r--r-- | drivers/usb/mtu3/mtu3.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/mtu3/mtu3.h b/drivers/usb/mtu3/mtu3.h index daf2b294ccdf..5546b868b08b 100644 --- a/drivers/usb/mtu3/mtu3.h +++ b/drivers/usb/mtu3/mtu3.h @@ -10,6 +10,7 @@ #ifndef __MTU3_H__ #define __MTU3_H__ +#include <linux/clk.h> #include <linux/device.h> #include <linux/dmapool.h> #include <linux/extcon.h> @@ -89,6 +90,8 @@ struct mtu3_request; */ #define EP0_RESPONSE_BUF 6 +#define BULK_CLKS_CNT 4 + /* device operated link and speed got from DEVICE_CONF register */ enum mtu3_speed { MTU3_SPEED_INACTIVE = 0, @@ -219,10 +222,6 @@ struct otg_switch_mtk { * @mac_base: register base address of device MAC, exclude xHCI's * @ippc_base: register base address of IP Power and Clock interface (IPPC) * @vusb33: usb3.3V shared by device/host IP - * @sys_clk: system clock of mtu3, shared by device/host IP - * @ref_clk: reference clock - * @mcu_clk: mcu_bus_ck clock for AHB bus etc - * @dma_clk: dma_bus_ck clock for AXI bus etc * @dr_mode: works in which mode: * host only, device only or dual-role mode * @u2_ports: number of usb2.0 host ports @@ -244,10 +243,7 @@ struct ssusb_mtk { int num_phys; /* common power & clock */ struct regulator *vusb33; - struct clk *sys_clk; - struct clk *ref_clk; - struct clk *mcu_clk; - struct clk *dma_clk; + struct clk_bulk_data clks[BULK_CLKS_CNT]; /* otg */ struct otg_switch_mtk otg_switch; enum usb_dr_mode dr_mode; |