summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Elwell <pelwell@users.noreply.github.com>2015-05-19 09:17:19 +0100
committerPhil Elwell <pelwell@users.noreply.github.com>2015-05-19 09:17:19 +0100
commit9112b62cec10ca617232b817ca37f0858323ca7c (patch)
treeb8780872b14b0b906803cac3bfd1bfbb67fbe428
parent3048b2ee0cb7710595443e2bf748235d43fdb47b (diff)
parent182827458d3ac2b530c0c41414793a3379a3243a (diff)
downloadlinux-9112b62cec10ca617232b817ca37f0858323ca7c.tar.gz
Merge pull request #970 from notro/fb
bcm2708_fb: Add ARCH_BCM2835 support
-rw-r--r--arch/arm/boot/dts/bcm2708-rpi-b-plus.dts4
-rw-r--r--arch/arm/boot/dts/bcm2708-rpi-b.dts4
-rw-r--r--arch/arm/boot/dts/bcm2708_common.dtsi5
-rw-r--r--arch/arm/boot/dts/bcm2709-rpi-2-b.dts4
-rw-r--r--arch/arm/boot/dts/bcm2835-rpi.dtsi4
-rw-r--r--arch/arm/boot/dts/bcm2835.dtsi6
-rw-r--r--arch/arm/configs/bcm2835_defconfig2
-rw-r--r--arch/arm/mach-bcm2708/bcm2708.c2
-rw-r--r--arch/arm/mach-bcm2708/include/mach/dma.h2
-rw-r--r--arch/arm/mach-bcm2709/bcm2709.c2
-rw-r--r--arch/arm/mach-bcm2709/include/mach/dma.h2
-rw-r--r--drivers/video/fbdev/bcm2708_fb.c14
12 files changed, 39 insertions, 12 deletions
diff --git a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
index f25563aee35d..9a8fed03ada7 100644
--- a/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
@@ -49,6 +49,10 @@
bus-width = <4>;
};
+&fb {
+ status = "okay";
+};
+
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
diff --git a/arch/arm/boot/dts/bcm2708-rpi-b.dts b/arch/arm/boot/dts/bcm2708-rpi-b.dts
index 17b4b8c7d12a..cf67ec94e91c 100644
--- a/arch/arm/boot/dts/bcm2708-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2708-rpi-b.dts
@@ -49,6 +49,10 @@
bus-width = <4>;
};
+&fb {
+ status = "okay";
+};
+
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
diff --git a/arch/arm/boot/dts/bcm2708_common.dtsi b/arch/arm/boot/dts/bcm2708_common.dtsi
index 1c8c1af9a1ff..c5ed34bda237 100644
--- a/arch/arm/boot/dts/bcm2708_common.dtsi
+++ b/arch/arm/boot/dts/bcm2708_common.dtsi
@@ -109,6 +109,11 @@
leds: leds {
compatible = "gpio-leds";
};
+
+ fb: fb {
+ compatible = "brcm,bcm2708-fb";
+ status = "disabled";
+ };
};
clocks {
diff --git a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
index c73249b2f2f0..1c865de5daf7 100644
--- a/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2709-rpi-2-b.dts
@@ -49,6 +49,10 @@
bus-width = <4>;
};
+&fb {
+ status = "okay";
+};
+
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index 9f4ed2f4d2e4..f2ce8031a2a5 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -49,3 +49,7 @@
status = "okay";
bus-width = <4>;
};
+
+&fb {
+ status = "okay";
+};
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index 06cba29c9645..f3ab9b383972 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -14,6 +14,7 @@
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x7e000000 0x20000000 0x02000000>;
+ dma-ranges = <0x40000000 0x00000000 0x20000000>;
timer@7e003000 {
compatible = "brcm,bcm2835-system-timer";
@@ -158,6 +159,11 @@
arm-pmu {
compatible = "arm,arm1176-pmu";
};
+
+ fb: fb {
+ compatible = "brcm,bcm2708-fb";
+ status = "disabled";
+ };
};
clocks {
diff --git a/arch/arm/configs/bcm2835_defconfig b/arch/arm/configs/bcm2835_defconfig
index 26b4c7588373..1af6069fcaf2 100644
--- a/arch/arm/configs/bcm2835_defconfig
+++ b/arch/arm/configs/bcm2835_defconfig
@@ -72,7 +72,7 @@ CONFIG_SPI_BCM2835=y
CONFIG_GPIO_SYSFS=y
# CONFIG_HWMON is not set
CONFIG_FB=y
-CONFIG_FB_SIMPLE=y
+CONFIG_FB_BCM2708=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_USB=y
diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
index 7cc47c1fdb71..cde2124566fe 100644
--- a/arch/arm/mach-bcm2708/bcm2708.c
+++ b/arch/arm/mach-bcm2708/bcm2708.c
@@ -928,7 +928,7 @@ void __init bcm2708_init(void)
bcm_register_device_dt(&w1_device);
#endif
bcm_register_device(&bcm2708_systemtimer_device);
- bcm_register_device(&bcm2708_fb_device);
+ bcm_register_device_dt(&bcm2708_fb_device);
bcm_register_device(&bcm2708_usb_device);
bcm_register_device(&bcm2708_uart1_device);
bcm_register_device(&bcm2708_powerman_device);
diff --git a/arch/arm/mach-bcm2708/include/mach/dma.h b/arch/arm/mach-bcm2708/include/mach/dma.h
deleted file mode 100644
index d826705e1574..000000000000
--- a/arch/arm/mach-bcm2708/include/mach/dma.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* This file can be removed when all the drivers have been updated */
-#include <linux/platform_data/dma-bcm2708.h>
diff --git a/arch/arm/mach-bcm2709/bcm2709.c b/arch/arm/mach-bcm2709/bcm2709.c
index 2c0a664825f0..95db41ff2601 100644
--- a/arch/arm/mach-bcm2709/bcm2709.c
+++ b/arch/arm/mach-bcm2709/bcm2709.c
@@ -951,7 +951,7 @@ void __init bcm2709_init(void)
#ifdef SYSTEM_TIMER
bcm_register_device(&bcm2708_systemtimer_device);
#endif
- bcm_register_device(&bcm2708_fb_device);
+ bcm_register_device_dt(&bcm2708_fb_device);
bcm_register_device(&bcm2708_usb_device);
bcm_register_device(&bcm2708_uart1_device);
bcm_register_device(&bcm2708_powerman_device);
diff --git a/arch/arm/mach-bcm2709/include/mach/dma.h b/arch/arm/mach-bcm2709/include/mach/dma.h
deleted file mode 100644
index d826705e1574..000000000000
--- a/arch/arm/mach-bcm2709/include/mach/dma.h
+++ /dev/null
@@ -1,2 +0,0 @@
-/* This file can be removed when all the drivers have been updated */
-#include <linux/platform_data/dma-bcm2708.h>
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,
},
};