[pxa] refresh kernel patches
[openwrt.git] / target / linux / brcm47xx / patches-2.6.23 / 610-ssb-watchdog-fix.patch
1 Index: linux-2.6.23.17/drivers/ssb/Kconfig
2 ===================================================================
3 --- linux-2.6.23.17.orig/drivers/ssb/Kconfig
4 +++ linux-2.6.23.17/drivers/ssb/Kconfig
5 @@ -105,6 +105,12 @@ config SSB_DRIVER_MIPS
6
7 If unsure, say N
8
9 +# Assumption: We are on embedded, if we compile the MIPS core.
10 +config SSB_EMBEDDED
11 + bool
12 + depends on SSB_DRIVER_MIPS
13 + default y
14 +
15 config SSB_DRIVER_EXTIF
16 bool "SSB Broadcom EXTIF core driver (EXPERIMENTAL)"
17 depends on SSB_DRIVER_MIPS && EXPERIMENTAL
18 Index: linux-2.6.23.17/drivers/ssb/Makefile
19 ===================================================================
20 --- linux-2.6.23.17.orig/drivers/ssb/Makefile
21 +++ linux-2.6.23.17/drivers/ssb/Makefile
22 @@ -1,5 +1,6 @@
23 # core
24 ssb-y += main.o scan.o
25 +ssb-$(CONFIG_SSB_EMBEDDED) += embedded.o
26
27 # host support
28 ssb-$(CONFIG_SSB_PCIHOST) += pci.o pcihost_wrapper.o
29 Index: linux-2.6.23.17/drivers/ssb/driver_extif.c
30 ===================================================================
31 --- linux-2.6.23.17.orig/drivers/ssb/driver_extif.c
32 +++ linux-2.6.23.17/drivers/ssb/driver_extif.c
33 @@ -37,6 +37,12 @@ static inline u32 extif_write32_masked(s
34 return value;
35 }
36
37 +void ssb_extif_watchdog_timer_set(struct ssb_extif *extif,
38 + u32 ticks)
39 +{
40 + extif_write32(extif, SSB_EXTIF_WATCHDOG, ticks);
41 +}
42 +
43 #ifdef CONFIG_SSB_SERIAL
44 static bool serial_exists(u8 *regs)
45 {
46 Index: linux-2.6.23.17/drivers/ssb/embedded.c
47 ===================================================================
48 --- /dev/null
49 +++ linux-2.6.23.17/drivers/ssb/embedded.c
50 @@ -0,0 +1,26 @@
51 +/*
52 + * Sonics Silicon Backplane
53 + * Embedded systems support code
54 + *
55 + * Copyright 2005-2008, Broadcom Corporation
56 + * Copyright 2006-2008, Michael Buesch <mb@bu3sch.de>
57 + *
58 + * Licensed under the GNU/GPL. See COPYING for details.
59 + */
60 +
61 +#include <linux/ssb/ssb.h>
62 +#include <linux/ssb/ssb_embedded.h>
63 +
64 +
65 +int ssb_watchdog_timer_set(struct ssb_bus *bus, u32 ticks)
66 +{
67 + if (ssb_chipco_available(&bus->chipco)) {
68 + ssb_chipco_watchdog_timer_set(&bus->chipco, ticks);
69 + return 0;
70 + }
71 + if (ssb_extif_available(&bus->extif)) {
72 + ssb_extif_watchdog_timer_set(&bus->extif, ticks);
73 + return 0;
74 + }
75 + return -ENODEV;
76 +}
77 Index: linux-2.6.23.17/include/linux/ssb/ssb_driver_chipcommon.h
78 ===================================================================
79 --- linux-2.6.23.17.orig/include/linux/ssb/ssb_driver_chipcommon.h
80 +++ linux-2.6.23.17/include/linux/ssb/ssb_driver_chipcommon.h
81 @@ -360,6 +360,11 @@ struct ssb_chipcommon {
82 u16 fast_pwrup_delay;
83 };
84
85 +static inline bool ssb_chipco_available(struct ssb_chipcommon *cc)
86 +{
87 + return (cc->dev != NULL);
88 +}
89 +
90 extern void ssb_chipcommon_init(struct ssb_chipcommon *cc);
91
92 #include <linux/pm.h>
93 Index: linux-2.6.23.17/include/linux/ssb/ssb_driver_extif.h
94 ===================================================================
95 --- linux-2.6.23.17.orig/include/linux/ssb/ssb_driver_extif.h
96 +++ linux-2.6.23.17/include/linux/ssb/ssb_driver_extif.h
97 @@ -178,6 +178,9 @@ u32 ssb_extif_gpio_outen(struct ssb_exti
98 u32 ssb_extif_gpio_polarity(struct ssb_extif *extif, u32 mask, u32 value);
99 u32 ssb_extif_gpio_intmask(struct ssb_extif *extif, u32 mask, u32 value);
100
101 +extern void ssb_extif_watchdog_timer_set(struct ssb_extif *extif,
102 + u32 ticks);
103 +
104 #ifdef CONFIG_SSB_SERIAL
105 extern int ssb_extif_serial_init(struct ssb_extif *extif,
106 struct ssb_serial_port *ports);
107 @@ -201,5 +204,11 @@ void ssb_extif_get_clockcontrol(struct s
108 {
109 }
110
111 +static inline
112 +void ssb_extif_watchdog_timer_set(struct ssb_extif *extif,
113 + u32 ticks)
114 +{
115 +}
116 +
117 #endif /* CONFIG_SSB_DRIVER_EXTIF */
118 #endif /* LINUX_SSB_EXTIFCORE_H_ */
119 Index: linux-2.6.23.17/include/linux/ssb/ssb_embedded.h
120 ===================================================================
121 --- /dev/null
122 +++ linux-2.6.23.17/include/linux/ssb/ssb_embedded.h
123 @@ -0,0 +1,10 @@
124 +#ifndef LINUX_SSB_EMBEDDED_H_
125 +#define LINUX_SSB_EMBEDDED_H_
126 +
127 +#include <linux/types.h>
128 +#include <linux/ssb/ssb.h>
129 +
130 +
131 +extern int ssb_watchdog_timer_set(struct ssb_bus *bus, u32 ticks);
132 +
133 +#endif /* LINUX_SSB_EMBEDDED_H_ */
This page took 0.061555 seconds and 5 git commands to generate.