histb              49 drivers/usb/host/xhci-histb.c static int xhci_histb_config(struct xhci_hcd_histb *histb)
histb              51 drivers/usb/host/xhci-histb.c 	struct device_node *np = histb->dev->of_node;
histb              56 drivers/usb/host/xhci-histb.c 		regval = readl(histb->ctrl + REG_GUSB2PHYCFG0);
histb              60 drivers/usb/host/xhci-histb.c 		writel(regval, histb->ctrl + REG_GUSB2PHYCFG0);
histb              71 drivers/usb/host/xhci-histb.c 		regval = readl(histb->ctrl + REG_GUSB3PIPECTL0);
histb              75 drivers/usb/host/xhci-histb.c 		writel(regval, histb->ctrl + REG_GUSB3PIPECTL0);
histb              78 drivers/usb/host/xhci-histb.c 	writel(0x23100000, histb->ctrl + GTXTHRCFG);
histb              79 drivers/usb/host/xhci-histb.c 	writel(0x23100000, histb->ctrl + GRXTHRCFG);
histb              84 drivers/usb/host/xhci-histb.c static int xhci_histb_clks_get(struct xhci_hcd_histb *histb)
histb              86 drivers/usb/host/xhci-histb.c 	struct device *dev = histb->dev;
histb              88 drivers/usb/host/xhci-histb.c 	histb->bus_clk = devm_clk_get(dev, "bus");
histb              89 drivers/usb/host/xhci-histb.c 	if (IS_ERR(histb->bus_clk)) {
histb              91 drivers/usb/host/xhci-histb.c 		return PTR_ERR(histb->bus_clk);
histb              94 drivers/usb/host/xhci-histb.c 	histb->utmi_clk = devm_clk_get(dev, "utmi");
histb              95 drivers/usb/host/xhci-histb.c 	if (IS_ERR(histb->utmi_clk)) {
histb              97 drivers/usb/host/xhci-histb.c 		return PTR_ERR(histb->utmi_clk);
histb             100 drivers/usb/host/xhci-histb.c 	histb->pipe_clk = devm_clk_get(dev, "pipe");
histb             101 drivers/usb/host/xhci-histb.c 	if (IS_ERR(histb->pipe_clk)) {
histb             103 drivers/usb/host/xhci-histb.c 		return PTR_ERR(histb->pipe_clk);
histb             106 drivers/usb/host/xhci-histb.c 	histb->suspend_clk = devm_clk_get(dev, "suspend");
histb             107 drivers/usb/host/xhci-histb.c 	if (IS_ERR(histb->suspend_clk)) {
histb             109 drivers/usb/host/xhci-histb.c 		return PTR_ERR(histb->suspend_clk);
histb             115 drivers/usb/host/xhci-histb.c static int xhci_histb_host_enable(struct xhci_hcd_histb *histb)
histb             119 drivers/usb/host/xhci-histb.c 	ret = clk_prepare_enable(histb->bus_clk);
histb             121 drivers/usb/host/xhci-histb.c 		dev_err(histb->dev, "failed to enable bus clk\n");
histb             125 drivers/usb/host/xhci-histb.c 	ret = clk_prepare_enable(histb->utmi_clk);
histb             127 drivers/usb/host/xhci-histb.c 		dev_err(histb->dev, "failed to enable utmi clk\n");
histb             131 drivers/usb/host/xhci-histb.c 	ret = clk_prepare_enable(histb->pipe_clk);
histb             133 drivers/usb/host/xhci-histb.c 		dev_err(histb->dev, "failed to enable pipe clk\n");
histb             137 drivers/usb/host/xhci-histb.c 	ret = clk_prepare_enable(histb->suspend_clk);
histb             139 drivers/usb/host/xhci-histb.c 		dev_err(histb->dev, "failed to enable suspend clk\n");
histb             143 drivers/usb/host/xhci-histb.c 	reset_control_deassert(histb->soft_reset);
histb             148 drivers/usb/host/xhci-histb.c 	clk_disable_unprepare(histb->pipe_clk);
histb             150 drivers/usb/host/xhci-histb.c 	clk_disable_unprepare(histb->utmi_clk);
histb             152 drivers/usb/host/xhci-histb.c 	clk_disable_unprepare(histb->bus_clk);
histb             157 drivers/usb/host/xhci-histb.c static void xhci_histb_host_disable(struct xhci_hcd_histb *histb)
histb             159 drivers/usb/host/xhci-histb.c 	reset_control_assert(histb->soft_reset);
histb             161 drivers/usb/host/xhci-histb.c 	clk_disable_unprepare(histb->suspend_clk);
histb             162 drivers/usb/host/xhci-histb.c 	clk_disable_unprepare(histb->pipe_clk);
histb             163 drivers/usb/host/xhci-histb.c 	clk_disable_unprepare(histb->utmi_clk);
histb             164 drivers/usb/host/xhci-histb.c 	clk_disable_unprepare(histb->bus_clk);
histb             180 drivers/usb/host/xhci-histb.c 	struct xhci_hcd_histb *histb = hcd_to_histb(hcd);
histb             184 drivers/usb/host/xhci-histb.c 		ret = xhci_histb_config(histb);
histb             200 drivers/usb/host/xhci-histb.c 	struct xhci_hcd_histb *histb;
histb             212 drivers/usb/host/xhci-histb.c 	histb = devm_kzalloc(dev, sizeof(*histb), GFP_KERNEL);
histb             213 drivers/usb/host/xhci-histb.c 	if (!histb)
histb             216 drivers/usb/host/xhci-histb.c 	histb->dev = dev;
histb             223 drivers/usb/host/xhci-histb.c 	histb->ctrl = devm_ioremap_resource(&pdev->dev, res);
histb             224 drivers/usb/host/xhci-histb.c 	if (IS_ERR(histb->ctrl))
histb             225 drivers/usb/host/xhci-histb.c 		return PTR_ERR(histb->ctrl);
histb             227 drivers/usb/host/xhci-histb.c 	ret = xhci_histb_clks_get(histb);
histb             231 drivers/usb/host/xhci-histb.c 	histb->soft_reset = devm_reset_control_get(dev, "soft");
histb             232 drivers/usb/host/xhci-histb.c 	if (IS_ERR(histb->soft_reset)) {
histb             234 drivers/usb/host/xhci-histb.c 		return PTR_ERR(histb->soft_reset);
histb             252 drivers/usb/host/xhci-histb.c 	hcd->regs = histb->ctrl;
histb             256 drivers/usb/host/xhci-histb.c 	histb->hcd = hcd;
histb             257 drivers/usb/host/xhci-histb.c 	dev_set_drvdata(hcd->self.controller, histb);
histb             259 drivers/usb/host/xhci-histb.c 	ret = xhci_histb_host_enable(histb);
histb             313 drivers/usb/host/xhci-histb.c 	xhci_histb_host_disable(histb);
histb             325 drivers/usb/host/xhci-histb.c 	struct xhci_hcd_histb *histb = platform_get_drvdata(dev);
histb             326 drivers/usb/host/xhci-histb.c 	struct usb_hcd *hcd = histb->hcd;
histb             339 drivers/usb/host/xhci-histb.c 	xhci_histb_host_disable(histb);
histb             349 drivers/usb/host/xhci-histb.c 	struct xhci_hcd_histb *histb = dev_get_drvdata(dev);
histb             350 drivers/usb/host/xhci-histb.c 	struct usb_hcd *hcd = histb->hcd;
histb             357 drivers/usb/host/xhci-histb.c 		xhci_histb_host_disable(histb);
histb             364 drivers/usb/host/xhci-histb.c 	struct xhci_hcd_histb *histb = dev_get_drvdata(dev);
histb             365 drivers/usb/host/xhci-histb.c 	struct usb_hcd *hcd = histb->hcd;
histb             369 drivers/usb/host/xhci-histb.c 		xhci_histb_host_enable(histb);