aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-07-01 19:08:22 +0100
committerThomas White <taw@bitwiz.org.uk>2009-07-01 19:08:22 +0100
commit89815f11b50befdcff19dc8cb862549ea057715e (patch)
treea8df3d889b716b9c3389bae2ceeaa931906851a9
parent11954ff1745ec10e01db1d9b1e2037a5eea848ce (diff)
Compatibility glamo-drm <---> glamo-fb
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
-rw-r--r--drivers/mfd/glamo/glamo-core.c4
-rw-r--r--drivers/mfd/glamo/glamo-drm-drv.c7
-rw-r--r--drivers/mfd/glamo/glamo-fb.c8
3 files changed, 15 insertions, 4 deletions
diff --git a/drivers/mfd/glamo/glamo-core.c b/drivers/mfd/glamo/glamo-core.c
index 9e690b5db4b..d8ebf400180 100644
--- a/drivers/mfd/glamo/glamo-core.c
+++ b/drivers/mfd/glamo/glamo-core.c
@@ -202,7 +202,7 @@ static struct resource glamo_graphics_resources[] = {
};
static struct platform_device glamo_graphics_dev = {
- .name = "glamo-graphics",
+ .name = "glamo-fb",
.resource = glamo_graphics_resources,
.num_resources = ARRAY_SIZE(glamo_graphics_resources),
};
@@ -1244,7 +1244,7 @@ static int __init glamo_probe(struct platform_device *pdev)
/* Command queue device (for DRM) */
glamo_graphics_dev.dev.parent = &pdev->dev;
- glamo_graphics_dev.dev.platform_data = glamo;
+ glamo_graphics_dev.dev.platform_data = glamo->pdata;
mangle_mem_resources(glamo_graphics_dev.resource,
glamo_graphics_dev.num_resources, glamo->mem);
platform_device_register(&glamo_graphics_dev);
diff --git a/drivers/mfd/glamo/glamo-drm-drv.c b/drivers/mfd/glamo/glamo-drm-drv.c
index 2421f104035..97d058f57d6 100644
--- a/drivers/mfd/glamo/glamo-drm-drv.c
+++ b/drivers/mfd/glamo/glamo-drm-drv.c
@@ -26,6 +26,7 @@
#include <linux/platform_device.h>
#include <drm/drmP.h>
#include <drm/glamo_drm.h>
+#include <linux/glamofb.h>
#include "glamo-core.h"
#include "glamo-cmdq.h"
@@ -198,6 +199,7 @@ static int glamodrm_probe(struct platform_device *pdev)
{
int rc;
struct glamodrm_handle *gdrm;
+ struct glamofb_platform_data *mach_info;
printk(KERN_CRIT "[glamo-drm] SMedia Glamo Direct Rendering Support\n");
@@ -205,7 +207,8 @@ static int glamodrm_probe(struct platform_device *pdev)
if ( !gdrm )
return -ENOMEM;
platform_set_drvdata(pdev, gdrm);
- gdrm->glamo_core = pdev->dev.platform_data;
+ mach_info = pdev->dev.platform_data;
+ gdrm->glamo_core = mach_info->glamo;
gdrm->dev = &pdev->dev;
/* Find the command queue registers */
@@ -370,7 +373,7 @@ static struct platform_driver glamodrm_driver = {
.suspend = glamodrm_suspend,
.resume = glamodrm_resume,
.driver = {
- .name = "glamo-graphics",
+ .name = "glamo-fb",
.owner = THIS_MODULE,
},
};
diff --git a/drivers/mfd/glamo/glamo-fb.c b/drivers/mfd/glamo/glamo-fb.c
index d9a610eeda4..95d40d25cf7 100644
--- a/drivers/mfd/glamo/glamo-fb.c
+++ b/drivers/mfd/glamo/glamo-fb.c
@@ -996,6 +996,14 @@ static int __init glamofb_probe(struct platform_device *pdev)
goto out_free;
}
+ glamofb->fb_res = request_mem_region(glamofb->fb_res->start,
+ mach_info->fb_mem_size,
+ pdev->name);
+ if (!glamofb->fb_res) {
+ dev_err(&pdev->dev, "failed to request vram region\n");
+ goto out_release_reg;
+ }
+
/* we want to remap only the registers required for this core
* driver. */
glamofb->base = ioremap(glamofb->reg->start, RESSIZE(glamofb->reg));