Skip to content

bcm2708_fb: Add ARCH_BCM2835 support #970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 19, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi-b-plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
bus-width = <4>;
};

&fb {
status = "okay";
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/bcm2708-rpi-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
bus-width = <4>;
};

&fb {
status = "okay";
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
Expand Down
5 changes: 5 additions & 0 deletions arch/arm/boot/dts/bcm2708_common.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@
leds: leds {
compatible = "gpio-leds";
};

fb: fb {
compatible = "brcm,bcm2708-fb";
status = "disabled";
};
};

clocks {
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/bcm2709-rpi-2-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
bus-width = <4>;
};

&fb {
status = "okay";
};

&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/bcm2835-rpi.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@
status = "okay";
bus-width = <4>;
};

&fb {
status = "okay";
};
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/bcm2835.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -158,6 +159,11 @@
arm-pmu {
compatible = "arm,arm1176-pmu";
};

fb: fb {
compatible = "brcm,bcm2708-fb";
status = "disabled";
};
};

clocks {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/configs/bcm2835_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-bcm2708/bcm2708.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-bcm2708/include/mach/dma.h

This file was deleted.

2 changes: 1 addition & 1 deletion arch/arm/mach-bcm2709/bcm2709.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions arch/arm/mach-bcm2709/include/mach/dma.h

This file was deleted.

14 changes: 9 additions & 5 deletions drivers/video/fbdev/bcm2708_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
},
};

Expand Down