From bb39b8d99aae1f7eb13a97bd874838da91080de6 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Fri, 28 Feb 2014 20:30:08 +0000 Subject: brcm2708: update against latest rpi-3.10.y branch Update our copies of the brcm2708 patches to the latest rpi-3.10-y rebased against linux-3.10.y stable (3.10.32). This should hopefully make it easier for us in the future to leverage the raspberry/rpi-* branches. Signed-off-by: Florian Fainelli SVN-Revision: 39770 --- ...e-realtime-clock-1-wire-chip-DS1307-and-1.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch (limited to 'target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch') diff --git a/target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch b/target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch new file mode 100644 index 0000000000..dd4f7dbb39 --- /dev/null +++ b/target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch @@ -0,0 +1,60 @@ +From d3ea04a7506cca51d1e154cde5bcc7063595c98c Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Wed, 8 May 2013 11:46:50 +0100 +Subject: [PATCH 025/174] enabling the realtime clock 1-wire chip DS1307 and + 1-wire on GPIO4 (as a module) + +--- + arch/arm/mach-bcm2708/bcm2708.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +--- a/arch/arm/mach-bcm2708/bcm2708.c ++++ b/arch/arm/mach-bcm2708/bcm2708.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -71,6 +72,9 @@ + */ + #define DMA_MASK_BITS_COMMON 32 + ++// use GPIO 4 for the one-wire GPIO pin, if enabled ++#define W1_GPIO 4 ++ + /* command line parameters */ + static unsigned boardrev, serial; + static unsigned uart_clock; +@@ -251,6 +255,19 @@ static struct platform_device bcm2708_dm + .num_resources = ARRAY_SIZE(bcm2708_dmaman_resources), + }; + ++#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE) ++static struct w1_gpio_platform_data w1_gpio_pdata = { ++ .pin = W1_GPIO, ++ .is_open_drain = 0, ++}; ++ ++static struct platform_device w1_device = { ++ .name = "w1-gpio", ++ .id = -1, ++ .dev.platform_data = &w1_gpio_pdata, ++}; ++#endif ++ + static u64 fb_dmamask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON); + + static struct platform_device bcm2708_fb_device = { +@@ -620,6 +637,9 @@ void __init bcm2708_init(void) + #ifdef CONFIG_BCM2708_GPIO + bcm_register_device(&bcm2708_gpio_device); + #endif ++#if defined(CONFIG_W1_MASTER_GPIO) || defined(CONFIG_W1_MASTER_GPIO_MODULE) ++ platform_device_register(&w1_device); ++#endif + bcm_register_device(&bcm2708_systemtimer_device); + bcm_register_device(&bcm2708_fb_device); + bcm_register_device(&bcm2708_usb_device); -- cgit v1.2.3