/* HDMI HW IP initialisation */ static int __init omapdss_hdmihw_probe(struct platform_device *pdev) { struct resource *res; int r; hdmi.pdev = pdev; mutex_init(&hdmi.lock); mutex_init(&hdmi.ip_data.lock); res = platform_get_resource(hdmi.pdev, IORESOURCE_MEM, 0); if (!res) { DSSERR("can't get IORESOURCE_MEM HDMI\n"); return -EINVAL; } /* Base address taken from platform */ hdmi.ip_data.base_wp = devm_request_and_ioremap(&pdev->dev, res); if (!hdmi.ip_data.base_wp) { DSSERR("can't ioremap WP\n"); return -ENOMEM; } r = hdmi_get_clocks(pdev); if (r) { DSSERR("can't get clocks\n"); return r; } pm_runtime_enable(&pdev->dev); hdmi.ip_data.core_sys_offset = HDMI_CORE_SYS; hdmi.ip_data.core_av_offset = HDMI_CORE_AV; hdmi.ip_data.pll_offset = HDMI_PLLCTRL; hdmi.ip_data.phy_offset = HDMI_PHY; r = hdmi_panel_init(); if (r) { DSSERR("can't init panel\n"); goto err_panel_init; } dss_debugfs_create_file("hdmi", hdmi_dump_regs); hdmi_init_output(pdev); hdmi_probe_pdata(pdev); return 0; err_panel_init: hdmi_put_clocks(); return r; }
/* HDMI HW IP initialisation */ static int omapdss_hdmihw_probe(struct platform_device *pdev) { struct resource *res; int r; hdmi.pdev = pdev; mutex_init(&hdmi.lock); mutex_init(&hdmi.ip_data.lock); res = platform_get_resource(hdmi.pdev, IORESOURCE_MEM, 0); /* Base address taken from platform */ hdmi.ip_data.base_wp = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(hdmi.ip_data.base_wp)) return PTR_ERR(hdmi.ip_data.base_wp); r = hdmi_get_clocks(pdev); if (r) { DSSERR("can't get clocks\n"); return r; } pm_runtime_enable(&pdev->dev); hdmi.ip_data.core_sys_offset = HDMI_CORE_SYS; hdmi.ip_data.core_av_offset = HDMI_CORE_AV; hdmi.ip_data.pll_offset = HDMI_PLLCTRL; hdmi.ip_data.phy_offset = HDMI_PHY; hdmi_init_output(pdev); r = hdmi_panel_init(); if (r) { DSSERR("can't init panel\n"); return r; } dss_debugfs_create_file("hdmi", hdmi_dump_regs); r = hdmi_probe_pdata(pdev); if (r) { hdmi_panel_exit(); hdmi_uninit_output(pdev); pm_runtime_disable(&pdev->dev); return r; } return 0; }
/* HDMI HW IP initialisation */ static int __init omapdss_hdmihw_probe(struct platform_device *pdev) { struct resource *hdmi_mem; int r; hdmi.pdev = pdev; mutex_init(&hdmi.lock); hdmi_mem = platform_get_resource(hdmi.pdev, IORESOURCE_MEM, 0); if (!hdmi_mem) { DSSERR("can't get IORESOURCE_MEM HDMI\n"); return -EINVAL; } /* Base address taken from platform */ hdmi.ip_data.base_wp = ioremap(hdmi_mem->start, resource_size(hdmi_mem)); if (!hdmi.ip_data.base_wp) { DSSERR("can't ioremap WP\n"); return -ENOMEM; } r = hdmi_get_clocks(pdev); if (r) { iounmap(hdmi.ip_data.base_wp); return r; } pm_runtime_enable(&pdev->dev); hdmi.ip_data.core_sys_offset = HDMI_CORE_SYS; hdmi.ip_data.core_av_offset = HDMI_CORE_AV; hdmi.ip_data.pll_offset = HDMI_PLLCTRL; hdmi.ip_data.phy_offset = HDMI_PHY; mutex_init(&hdmi.ip_data.lock); hdmi_panel_init(); dss_debugfs_create_file("hdmi", hdmi_dump_regs); hdmi_init_output(pdev); hdmi_probe_pdata(pdev); return 0; }