1 Index: linux-2.6.23/drivers/ssb/driver_mipscore.c
2 ===================================================================
3 --- linux-2.6.23.orig/drivers/ssb/driver_mipscore.c 2007-10-14 04:32:45.793470742 +0200
4 +++ linux-2.6.23/drivers/ssb/driver_mipscore.c 2007-10-14 04:33:25.155713862 +0200
6 ssb_mips_serial_init(mcore);
7 ssb_mips_flash_detect(mcore);
10 +EXPORT_SYMBOL(ssb_mips_irq);
11 Index: linux-2.6.23/include/linux/ssb/ssb_driver_chipcommon.h
12 ===================================================================
13 --- linux-2.6.23.orig/include/linux/ssb/ssb_driver_chipcommon.h 2007-10-14 04:32:45.817472111 +0200
14 +++ linux-2.6.23/include/linux/ssb/ssb_driver_chipcommon.h 2007-10-14 04:33:25.159714091 +0200
16 extern void ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc,
19 -u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask);
21 +static inline u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc,
24 + return ssb_read32(cc->dev, SSB_CHIPCO_GPIOIN) & mask;
27 -void ssb_chipco_gpio_out(struct ssb_chipcommon *cc, u32 mask, u32 value);
28 +static inline u32 ssb_chipco_gpio_out(struct ssb_chipcommon *cc,
29 + u32 mask, u32 value)
31 + return ssb_write32_masked(cc->dev, SSB_CHIPCO_GPIOOUT, mask, value);
34 -void ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value);
35 +static inline u32 ssb_chipco_gpio_outen(struct ssb_chipcommon *cc,
36 + u32 mask, u32 value)
38 + return ssb_write32_masked(cc->dev, SSB_CHIPCO_GPIOOUTEN, mask, value);
41 +static inline u32 ssb_chipco_gpio_control(struct ssb_chipcommon *cc,
42 + u32 mask, u32 value)
44 + return ssb_write32_masked(cc->dev, SSB_CHIPCO_GPIOCTL, mask, value);
47 +static inline u32 ssb_chipco_gpio_intmask(struct ssb_chipcommon *cc,
48 + u32 mask, u32 value)
50 + return ssb_write32_masked(cc->dev, SSB_CHIPCO_GPIOIRQ, mask, value);
53 +static inline u32 ssb_chipco_gpio_polarity(struct ssb_chipcommon *cc,
54 + u32 mask, u32 value)
56 + return ssb_write32_masked(cc->dev, SSB_CHIPCO_GPIOPOL, mask, value);
58 +/* TODO: GPIO reservation */
60 +extern int ssb_chipco_watchdog(struct ssb_chipcommon *cc, uint ticks);
62 #ifdef CONFIG_SSB_SERIAL
63 extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc,
64 Index: linux-2.6.23/include/linux/ssb/ssb_driver_extif.h
65 ===================================================================
66 --- linux-2.6.23.orig/include/linux/ssb/ssb_driver_extif.h 2007-10-14 04:32:45.821472339 +0200
67 +++ linux-2.6.23/include/linux/ssb/ssb_driver_extif.h 2007-10-14 04:33:25.167714544 +0200
69 #define SSB_EXTIF_WATCHDOG_CLK 48000000 /* Hz */
73 #ifdef CONFIG_SSB_DRIVER_EXTIF
77 extern void ssb_extif_timing_init(struct ssb_extif *extif,
80 -u32 ssb_extif_gpio_in(struct ssb_extif *extif, u32 mask);
82 -void ssb_extif_gpio_out(struct ssb_extif *extif, u32 mask, u32 value);
84 -void ssb_extif_gpio_outen(struct ssb_extif *extif, u32 mask, u32 value);
86 #ifdef CONFIG_SSB_SERIAL
87 extern int ssb_extif_serial_init(struct ssb_extif *extif,
88 struct ssb_serial_port *ports);
89 #endif /* CONFIG_SSB_SERIAL */
92 +static inline u32 ssb_extif_gpio_in(struct ssb_extif *extif,
95 + return ssb_read32(extif->dev, SSB_EXTIF_GPIO_IN) & mask;
98 +static inline u32 ssb_extif_gpio_out(struct ssb_extif *extif,
99 + u32 mask, u32 value)
101 + return ssb_write32_masked(extif->dev, SSB_EXTIF_GPIO_OUT(0), mask, value);
104 +static inline u32 ssb_extif_gpio_outen(struct ssb_extif *extif,
105 + u32 mask, u32 value)
107 + return ssb_write32_masked(extif->dev, SSB_EXTIF_GPIO_OUTEN(0), mask, value);
110 +static inline u32 ssb_extif_gpio_polarity(struct ssb_extif *extif,
111 + u32 mask, u32 value)
113 + return ssb_write32_masked(extif->dev, SSB_EXTIF_GPIO_INTPOL, mask, value);
116 +static inline u32 ssb_extif_gpio_intmask(struct ssb_extif *extif,
117 + u32 mask, u32 value)
119 + return ssb_write32_masked(extif->dev, SSB_EXTIF_GPIO_INTMASK, mask, value);
123 #else /* CONFIG_SSB_DRIVER_EXTIF */
125 Index: linux-2.6.23/include/linux/ssb/ssb.h
126 ===================================================================
127 --- linux-2.6.23.orig/include/linux/ssb/ssb.h 2007-10-14 04:32:45.833473010 +0200
128 +++ linux-2.6.23/include/linux/ssb/ssb.h 2007-10-14 04:33:25.171714773 +0200
130 #define SSB_CHIPPACK_BCM4712M 2 /* Medium 225pin 4712 */
131 #define SSB_CHIPPACK_BCM4712L 0 /* Large 340pin 4712 */
133 +static inline u16 ssb_read16(struct ssb_device *dev, u16 offset);
134 +static inline u32 ssb_read32(struct ssb_device *dev, u16 offset);
135 +static inline void ssb_write16(struct ssb_device *dev, u16 offset, u16 value);
136 +static inline void ssb_write32(struct ssb_device *dev, u16 offset, u32 value);
137 +static inline u32 ssb_write32_masked(struct ssb_device *dev, u16 offset, u32 mask, u32 value);
139 #include <linux/ssb/ssb_driver_chipcommon.h>
140 #include <linux/ssb/ssb_driver_mips.h>
141 #include <linux/ssb/ssb_driver_extif.h>
143 dev->ops->write32(dev, offset, value);
146 +static inline u32 ssb_write32_masked(struct ssb_device *dev,
152 + value |= ssb_read32(dev, offset) & ~mask;
153 + ssb_write32(dev, offset, value);
157 /* Translation (routing) bits that need to be ORed to DMA
158 * addresses before they are given to a device. */
159 Index: linux-2.6.23/drivers/ssb/driver_chipcommon.c
160 ===================================================================
161 --- linux-2.6.23.orig/drivers/ssb/driver_chipcommon.c 2007-10-14 04:32:45.797470966 +0200
162 +++ linux-2.6.23/drivers/ssb/driver_chipcommon.c 2007-10-14 04:33:25.175715001 +0200
164 chipco_write32(cc, SSB_CHIPCO_WATCHDOG, ticks);
167 -u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask)
169 - return chipco_read32(cc, SSB_CHIPCO_GPIOIN) & mask;
172 -void ssb_chipco_gpio_out(struct ssb_chipcommon *cc, u32 mask, u32 value)
174 - chipco_write32_masked(cc, SSB_CHIPCO_GPIOOUT, mask, value);
177 -void ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value)
179 - chipco_write32_masked(cc, SSB_CHIPCO_GPIOOUTEN, mask, value);
182 #ifdef CONFIG_SSB_SERIAL
183 int ssb_chipco_serial_init(struct ssb_chipcommon *cc,
184 struct ssb_serial_port *ports)
185 Index: linux-2.6.23/drivers/ssb/driver_extif.c
186 ===================================================================
187 --- linux-2.6.23.orig/drivers/ssb/driver_extif.c 2007-10-14 04:32:45.809471640 +0200
188 +++ linux-2.6.23/drivers/ssb/driver_extif.c 2007-10-14 04:33:25.179715231 +0200
190 *m = extif_read32(extif, SSB_EXTIF_CLOCK_SB);
193 -u32 ssb_extif_gpio_in(struct ssb_extif *extif, u32 mask)
195 - return extif_read32(extif, SSB_EXTIF_GPIO_IN) & mask;
198 -void ssb_extif_gpio_out(struct ssb_extif *extif, u32 mask, u32 value)
200 - return extif_write32_masked(extif, SSB_EXTIF_GPIO_OUT(0),
204 -void ssb_extif_gpio_outen(struct ssb_extif *extif, u32 mask, u32 value)
206 - return extif_write32_masked(extif, SSB_EXTIF_GPIO_OUTEN(0),
210 Index: linux-2.6.23/include/linux/mod_devicetable.h
211 ===================================================================
212 --- linux-2.6.23.orig/include/linux/mod_devicetable.h 2007-10-14 04:35:22.102378272 +0200
213 +++ linux-2.6.23/include/linux/mod_devicetable.h 2007-10-14 04:34:41.172045787 +0200
215 #define PA_HVERSION_ANY_ID 0xffff
216 #define PA_SVERSION_ANY_ID 0xffffffff
218 +/* SSB core, see drivers/ssb/ */
219 +struct ssb_device_id {
224 +#define SSB_DEVICE(_vendor, _coreid, _revision) \
225 + { .vendor = _vendor, .coreid = _coreid, .revision = _revision, }
226 +#define SSB_DEVTABLE_END \
229 +#define SSB_ANY_VENDOR 0xFFFF
230 +#define SSB_ANY_ID 0xFFFF
231 +#define SSB_ANY_REV 0xFF
233 #endif /* LINUX_MOD_DEVICETABLE_H */