static void msm_xusb_uninit_host(struct msmusb_hcd *mhcd)
{
    struct usb_hcd *hcd = mhcd_to_hcd(mhcd);
    struct msm_usb_host_platform_data *pdata = mhcd->pdata;

    switch (PHY_TYPE(pdata->phy_info)) {
    case USB_PHY_INTEGRATED:
        if (pdata->vbus_init)
            pdata->vbus_init(0);
        hcd_to_ehci(hcd)->transceiver = NULL;
        otg_set_host(mhcd->xceiv->otg, NULL);
        usb_put_transceiver(mhcd->xceiv);
        cancel_work_sync(&mhcd->otg_work);
        break;
    case USB_PHY_SERIAL_PMIC:
        iounmap(hcd->regs);
        clk_put(mhcd->alt_core_clk);
        clk_put(mhcd->iface_clk);
        msm_fsusb_reset_phy();
        msm_fsusb_rpc_deinit();
        break;
    default:
        pr_err("phy type is bad\n");
    }
}
static int msm_xusb_rpc_close(struct msmusb_hcd *mhcd)
{
	int retval = -ENODEV;
	struct msm_usb_host_platform_data *pdata = mhcd->pdata;

	switch (PHY_TYPE(pdata->phy_info)) {
	case USB_PHY_INTEGRATED:
		if (!mhcd->xceiv)
			retval = msm_hsusb_rpc_close();
		break;
	case USB_PHY_SERIAL_PMIC:
		retval = msm_fsusb_reset_phy();
		msm_fsusb_rpc_deinit();
		break;
	default:
		pr_err("%s: undefined phy type ( %X ) \n", __func__,
						pdata->phy_info);
	}
	return retval;
}