if (inst->ref_cnt > 1)
return 0;
- /* Order of initialisation is important - first power then isolation */
- exynos4210_phy_pwr(inst, 1);
exynos4210_isol(inst, 0);
+ exynos4210_phy_pwr(inst, 1);
+
+ /* Power on the device, as it is necessary for HSIC to work */
+ if (inst->cfg->id == EXYNOS4210_HOST) {
+ struct uphy_instance *device =
+ &drv->uphy_instances[EXYNOS4210_DEVICE];
+ device->ref_cnt++;
+ if (device->ref_cnt > 1)
+ return 0;
+ exynos4210_phy_pwr(device, 1);
+ exynos4210_isol(device, 0);
+ }
return 0;
}
exynos4210_phy_pwr(inst, 0);
exynos4210_isol(inst, 1);
+ if (inst->cfg->id == EXYNOS4210_HOST) {
+ struct uphy_instance *device =
+ &drv->uphy_instances[EXYNOS4210_DEVICE];
+ device->ref_cnt--;
+ if (device->ref_cnt > 0)
+ return 0;
+ exynos4210_phy_pwr(device, 0);
+ exynos4210_isol(device, 1);
+ }
+
return 0;
}
if (inst->ref_cnt > 1)
return 0;
- exynos4212_phy_pwr(inst, 1);
exynos4212_isol(inst, 0);
+ exynos4212_phy_pwr(inst, 1);
/* Power on the device, as it is necessary for HSIC to work */
if (inst->cfg->id == EXYNOS4212_HSIC0) {