summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2015-05-18 17:18:28 +0200
committerNoralf Trønnes <noralf@tronnes.org>2015-05-18 19:47:43 +0200
commit76842aa3ff48d7f799be268ba78a225ddbabfd82 (patch)
treeffb00596d67ebb07c2b4d321bba17efd4af3474b
parent3048b2ee0cb7710595443e2bf748235d43fdb47b (diff)
downloadlinux-76842aa3ff48d7f799be268ba78a225ddbabfd82.tar.gz
fbdev: bcm2708_fb: Add ARCH_BCM2835 support
Add Device Tree support. Pass the device to dma_alloc_coherent() in order to get the correct bus address on ARCH_BCM2835. Use the new DMA legacy API header file. Including <mach/platform.h> is not necessary. Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
-rw-r--r--drivers/video/fbdev/bcm2708_fb.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/video/fbdev/bcm2708_fb.c b/drivers/video/fbdev/bcm2708_fb.c
index 345c15e2b16b..f6ac7dad2af3 100644
--- a/drivers/video/fbdev/bcm2708_fb.c
+++ b/drivers/video/fbdev/bcm2708_fb.c
@@ -24,16 +24,13 @@
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/list.h>
+#include <linux/platform_data/dma-bcm2708.h>
#include <linux/platform_data/mailbox-bcm2708.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/printk.h>
#include <linux/console.h>
#include <linux/debugfs.h>
-
-#include <mach/dma.h>
-#include <mach/platform.h>
-
#include <asm/sizes.h>
#include <linux/io.h>
#include <linux/dma-mapping.h>
@@ -628,7 +625,7 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb)
void *mem;
mem =
- dma_alloc_coherent(NULL, PAGE_ALIGN(sizeof(*fb->info)), &dma,
+ dma_alloc_coherent(&fb->dev->dev, PAGE_ALIGN(sizeof(*fb->info)), &dma,
GFP_KERNEL);
if (NULL == mem) {
@@ -783,12 +780,19 @@ static int bcm2708_fb_remove(struct platform_device *dev)
return 0;
}
+static const struct of_device_id bcm2708_fb_of_match_table[] = {
+ { .compatible = "brcm,bcm2708-fb", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, bcm2708_fb_of_match_table);
+
static struct platform_driver bcm2708_fb_driver = {
.probe = bcm2708_fb_probe,
.remove = bcm2708_fb_remove,
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
+ .of_match_table = bcm2708_fb_of_match_table,
},
};