Commit 2d3f173c authored by Sachin Kamat's avatar Sachin Kamat Committed by Inki Dae

drm/exynos: Remove non-DT support in exynos_drm_fimd

Since commit 383ffda2 ("ARM: EXYNOS: no more support non-DT
for EXYNOS SoCs"), Exynos platform is DT only. Hence remove
all the conditional macros and make the driver DT only.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 88c49815
...@@ -126,7 +126,6 @@ struct fimd_context { ...@@ -126,7 +126,6 @@ struct fimd_context {
struct fimd_driver_data *driver_data; struct fimd_driver_data *driver_data;
}; };
#ifdef CONFIG_OF
static const struct of_device_id fimd_driver_dt_match[] = { static const struct of_device_id fimd_driver_dt_match[] = {
{ .compatible = "samsung,s3c6400-fimd", { .compatible = "samsung,s3c6400-fimd",
.data = &s3c64xx_fimd_driver_data }, .data = &s3c64xx_fimd_driver_data },
...@@ -136,21 +135,14 @@ static const struct of_device_id fimd_driver_dt_match[] = { ...@@ -136,21 +135,14 @@ static const struct of_device_id fimd_driver_dt_match[] = {
.data = &exynos5_fimd_driver_data }, .data = &exynos5_fimd_driver_data },
{}, {},
}; };
#endif
static inline struct fimd_driver_data *drm_fimd_get_driver_data( static inline struct fimd_driver_data *drm_fimd_get_driver_data(
struct platform_device *pdev) struct platform_device *pdev)
{ {
#ifdef CONFIG_OF
const struct of_device_id *of_id = const struct of_device_id *of_id =
of_match_device(fimd_driver_dt_match, &pdev->dev); of_match_device(fimd_driver_dt_match, &pdev->dev);
if (of_id)
return (struct fimd_driver_data *)of_id->data; return (struct fimd_driver_data *)of_id->data;
#endif
return (struct fimd_driver_data *)
platform_get_device_id(pdev)->driver_data;
} }
static bool fimd_display_is_connected(struct device *dev) static bool fimd_display_is_connected(struct device *dev)
...@@ -894,7 +886,6 @@ static int fimd_activate(struct fimd_context *ctx, bool enable) ...@@ -894,7 +886,6 @@ static int fimd_activate(struct fimd_context *ctx, bool enable)
static int fimd_get_platform_data(struct fimd_context *ctx, struct device *dev) static int fimd_get_platform_data(struct fimd_context *ctx, struct device *dev)
{ {
if (dev->of_node) {
struct videomode *vm; struct videomode *vm;
int ret; int ret;
...@@ -913,17 +904,6 @@ static int fimd_get_platform_data(struct fimd_context *ctx, struct device *dev) ...@@ -913,17 +904,6 @@ static int fimd_get_platform_data(struct fimd_context *ctx, struct device *dev)
ctx->vidcon1 |= VIDCON1_INV_VDEN; ctx->vidcon1 |= VIDCON1_INV_VDEN;
if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
ctx->vidcon1 |= VIDCON1_INV_VCLK; ctx->vidcon1 |= VIDCON1_INV_VCLK;
} else {
struct exynos_drm_fimd_pdata *pdata = dev->platform_data;
if (!pdata) {
DRM_ERROR("no platform data specified\n");
return -EINVAL;
}
ctx->vidcon0 = pdata->vidcon0;
ctx->vidcon1 = pdata->vidcon1;
ctx->default_win = pdata->default_win;
ctx->panel = pdata->panel;
}
return 0; return 0;
} }
...@@ -937,6 +917,9 @@ static int fimd_probe(struct platform_device *pdev) ...@@ -937,6 +917,9 @@ static int fimd_probe(struct platform_device *pdev)
int win; int win;
int ret = -EINVAL; int ret = -EINVAL;
if (!dev->of_node)
return -ENODEV;
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx) if (!ctx)
return -ENOMEM; return -ENOMEM;
...@@ -1076,20 +1059,6 @@ static int fimd_runtime_resume(struct device *dev) ...@@ -1076,20 +1059,6 @@ static int fimd_runtime_resume(struct device *dev)
} }
#endif #endif
static struct platform_device_id fimd_driver_ids[] = {
{
.name = "s3c64xx-fb",
.driver_data = (unsigned long)&s3c64xx_fimd_driver_data,
}, {
.name = "exynos4-fb",
.driver_data = (unsigned long)&exynos4_fimd_driver_data,
}, {
.name = "exynos5-fb",
.driver_data = (unsigned long)&exynos5_fimd_driver_data,
},
{},
};
static const struct dev_pm_ops fimd_pm_ops = { static const struct dev_pm_ops fimd_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(fimd_suspend, fimd_resume) SET_SYSTEM_SLEEP_PM_OPS(fimd_suspend, fimd_resume)
SET_RUNTIME_PM_OPS(fimd_runtime_suspend, fimd_runtime_resume, NULL) SET_RUNTIME_PM_OPS(fimd_runtime_suspend, fimd_runtime_resume, NULL)
...@@ -1098,11 +1067,10 @@ static const struct dev_pm_ops fimd_pm_ops = { ...@@ -1098,11 +1067,10 @@ static const struct dev_pm_ops fimd_pm_ops = {
struct platform_driver fimd_driver = { struct platform_driver fimd_driver = {
.probe = fimd_probe, .probe = fimd_probe,
.remove = fimd_remove, .remove = fimd_remove,
.id_table = fimd_driver_ids,
.driver = { .driver = {
.name = "exynos4-fb", .name = "exynos4-fb",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = &fimd_pm_ops, .pm = &fimd_pm_ops,
.of_match_table = of_match_ptr(fimd_driver_dt_match), .of_match_table = fimd_driver_dt_match,
}, },
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment