aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
committerFlorian Fainelli <florian@openwrt.org>2014-02-28 20:30:08 +0000
commitbb39b8d99aae1f7eb13a97bd874838da91080de6 (patch)
tree3046f53937c0bc5dc13e2b2ab7b688a1932199bf /target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch
parentc6c0d09f85c211560a1405441925681cfa25e8b1 (diff)
downloadupstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.gz
upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.tar.bz2
upstream-bb39b8d99aae1f7eb13a97bd874838da91080de6.zip
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 <florian@openwrt.org> SVN-Revision: 39770
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0025-enabling-the-realtime-clock-1-wire-chip-DS1307-and-1.patch60
1 files changed, 60 insertions, 0 deletions
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 <popcornmix@gmail.com>
+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 <linux/io.h>
+ #include <linux/module.h>
+ #include <linux/spi/spi.h>
++#include <linux/w1-gpio.h>
+
+ #include <linux/version.h>
+ #include <linux/clkdev.h>
+@@ -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);