void mrfld_early_console_init(void)
{
	u32 ctrlr0 = 0;

	set_fixmap_nocache(FIX_EARLYCON_MEM_BASE, MRFLD_REGBASE_SSP5);

	pssp = (void *)(__fix_to_virt(FIX_EARLYCON_MEM_BASE) +
			(MRFLD_REGBASE_SSP5 & (PAGE_SIZE - 1)));

	if (intel_mid_identify_sim() == INTEL_MID_CPU_SIMULATION_NONE)
		ssp_timing_wr = 1;

	/* mask interrupts, clear enable and set DSS config */
	/* SSPSCLK on active transfers only */
	if (intel_mid_identify_sim() != INTEL_MID_CPU_SIMULATION_SLE) {
		if (ssp_timing_wr) {
			dw_writel(pssp, ctrl0, 0xc12c0f);
			dw_writel(pssp, ctrl1, 0x0);
		} else {
			dw_writel(pssp, ctrl0, 0xc0000f);
			dw_writel(pssp, ctrl1, 0x10000000);
		}
	}

	dw_readl(pssp, sr);

	/* enable port */
	if (intel_mid_identify_sim() != INTEL_MID_CPU_SIMULATION_SLE) {
		ctrlr0 = dw_readl(pssp, ctrl0);
		ctrlr0 |= 0x80;
		dw_writel(pssp, ctrl0, ctrlr0);
	}

}
static struct intel_dwc_otg_pdata *get_otg_platform_data(struct pci_dev *pdev)
{
	switch (pdev->device) {
	case PCI_DEVICE_ID_INTEL_MRFL_DWC3_OTG:
		if (INTEL_MID_BOARD(1, PHONE, MOFD)) {
			dwc_otg_pdata.pmic_type = SHADY_COVE;
			dwc_otg_pdata.charger_detect_enable = 0;
			dwc_otg_pdata.usb2_phy_type = get_usb2_phy_type();
			 dwc_otg_pdata.charging_compliance =
				dwc_otg_get_usbspecoverride(MOFD_SMIP_VIOLATE_BC_ADDR);

			if (dwc_otg_pdata.usb2_phy_type == USB2_PHY_ULPI)
				dwc_otg_pdata.charger_detect_enable = 1;
			dwc_otg_pdata.ulpi_eye_calibrate = 0x7F;

		} else if (INTEL_MID_BOARD(1, PHONE, MRFL)) {
			dwc_otg_pdata.pmic_type = BASIN_COVE;
			dwc_otg_pdata.charger_detect_enable = 1;

			dwc_otg_pdata.charging_compliance =
				dwc_otg_get_usbspecoverride(MERR_SMIP_VIOLATE_BC_ADDR);
			dwc_otg_pdata.usb2_phy_type = USB2_PHY_ULPI;
			dwc_otg_pdata.ulpi_eye_calibrate = 0x7D;

		} else if (intel_mid_identify_sim() ==
				INTEL_MID_CPU_SIMULATION_HVP) {
			dwc_otg_pdata.pmic_type = NO_PMIC;
			dwc_otg_pdata.is_hvp = 1;
			dwc_otg_pdata.charger_detect_enable = 0;
			dwc_otg_pdata.usb2_phy_type = USB2_PHY_ULPI;
		}
		return &dwc_otg_pdata;
	case PCI_DEVICE_ID_INTEL_BYT_OTG:
		/* FIXME: Hardcode now, but need to use ACPI table for GPIO */
		if (INTEL_MID_BOARD(3, TABLET, BYT, BLK, PRO, RVP3) ||
			INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, RVP3)) {
			dwc_otg_pdata.gpio_cs = 156;
			dwc_otg_pdata.gpio_reset = 144;
			dwc_otg_pdata.ulpi_eye_calibrate = 0x4f;
		} else if (INTEL_MID_BOARD(3, TABLET, BYT, BLK, PRO, 8PR0) ||
			INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, 8PR0)) {
			dwc_otg_pdata.gpio_cs = 54;
			dwc_otg_pdata.gpio_reset = 144;
			dwc_otg_pdata.ulpi_eye_calibrate = 0x4f;
		} else if (INTEL_MID_BOARD(3, TABLET, BYT, BLK, PRO, 8PR1) ||
			INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, 8PR1)) {
			dwc_otg_pdata.gpio_cs = 54;
			dwc_otg_pdata.gpio_reset = 144;
			dwc_otg_pdata.ulpi_eye_calibrate = 0x7f;
			dwc_otg_pdata.sdp_charging = 0;
			dwc_otg_pdata.charger_detect_enable = 1;
			dwc_otg_pdata.gpio_id = 69;
			dwc_otg_pdata.charging_compliance =
				!dwc_otg_byt_get_usbspecoverride();
		} else if (INTEL_MID_BOARD(3, TABLET, BYT, BLK, PRO, CRV2) ||
			INTEL_MID_BOARD(3, TABLET, BYT, BLK, ENG, CRV2)) {
			dwc_otg_pdata.gpio_cs = 54;
			dwc_otg_pdata.gpio_reset = 144;
			dwc_otg_pdata.ulpi_eye_calibrate = 0x7f;
			dwc_otg_pdata.gpio_id = 156;
			dwc_otg_pdata.sdp_charging = 1;
			dwc_otg_pdata.charging_compliance =
				!dwc_otg_byt_get_usbspecoverride();
		}
		return &dwc_otg_pdata;
	default:
		break;
	}

	return NULL;
}