aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ssb/ssb_driver_chipcommon.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-03-03 05:31:09 -0500
committerPaul Mackerras <paulus@samba.org>2008-03-03 05:31:09 -0500
commit3cecdda3f169f22f324f78fd544beee68e3cc6a4 (patch)
treee7c2995ddc2690d1be695a1525bcd16d3965548d /include/linux/ssb/ssb_driver_chipcommon.h
parentb9c64498f53e0f4d90eec03048f73ac215bb6f79 (diff)
parentda40451bba23b51eaca4170a095891646ce72104 (diff)
Merge branch 'for-2.6.25' of master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6 into merge
Diffstat (limited to 'include/linux/ssb/ssb_driver_chipcommon.h')
-rw-r--r--include/linux/ssb/ssb_driver_chipcommon.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/ssb/ssb_driver_chipcommon.h b/include/linux/ssb/ssb_driver_chipcommon.h
index 4cb995494662..536851b946f6 100644
--- a/include/linux/ssb/ssb_driver_chipcommon.h
+++ b/include/linux/ssb/ssb_driver_chipcommon.h
@@ -51,9 +51,12 @@
51#define SSB_CHIPCO_CAP_JTAGM 0x00400000 /* JTAG master present */ 51#define SSB_CHIPCO_CAP_JTAGM 0x00400000 /* JTAG master present */
52#define SSB_CHIPCO_CAP_BROM 0x00800000 /* Internal boot ROM active */ 52#define SSB_CHIPCO_CAP_BROM 0x00800000 /* Internal boot ROM active */
53#define SSB_CHIPCO_CAP_64BIT 0x08000000 /* 64-bit Backplane */ 53#define SSB_CHIPCO_CAP_64BIT 0x08000000 /* 64-bit Backplane */
54#define SSB_CHIPCO_CAP_PMU 0x10000000 /* PMU available (rev >= 20) */
55#define SSB_CHIPCO_CAP_ECI 0x20000000 /* ECI available (rev >= 20) */
54#define SSB_CHIPCO_CORECTL 0x0008 56#define SSB_CHIPCO_CORECTL 0x0008
55#define SSB_CHIPCO_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */ 57#define SSB_CHIPCO_CORECTL_UARTCLK0 0x00000001 /* Drive UART with internal clock */
56#define SSB_CHIPCO_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */ 58#define SSB_CHIPCO_CORECTL_SE 0x00000002 /* sync clk out enable (corerev >= 3) */
59#define SSB_CHIPCO_CORECTL_UARTCLKEN 0x00000008 /* UART clock enable (rev >= 21) */
57#define SSB_CHIPCO_BIST 0x000C 60#define SSB_CHIPCO_BIST 0x000C
58#define SSB_CHIPCO_OTPS 0x0010 /* OTP status */ 61#define SSB_CHIPCO_OTPS 0x0010 /* OTP status */
59#define SSB_CHIPCO_OTPS_PROGFAIL 0x80000000 62#define SSB_CHIPCO_OTPS_PROGFAIL 0x80000000
@@ -357,6 +360,11 @@ struct ssb_chipcommon {
357 u16 fast_pwrup_delay; 360 u16 fast_pwrup_delay;
358}; 361};
359 362
363static inline bool ssb_chipco_available(struct ssb_chipcommon *cc)
364{
365 return (cc->dev != NULL);
366}
367
360extern void ssb_chipcommon_init(struct ssb_chipcommon *cc); 368extern void ssb_chipcommon_init(struct ssb_chipcommon *cc);
361 369
362#include <linux/pm.h> 370#include <linux/pm.h>
@@ -382,11 +390,13 @@ extern void ssb_chipco_set_clockmode(struct ssb_chipcommon *cc,
382extern void ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc, 390extern void ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc,
383 u32 ticks); 391 u32 ticks);
384 392
393/* Chipcommon GPIO pin access. */
385u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask); 394u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask);
386 395u32 ssb_chipco_gpio_out(struct ssb_chipcommon *cc, u32 mask, u32 value);
387void ssb_chipco_gpio_out(struct ssb_chipcommon *cc, u32 mask, u32 value); 396u32 ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value);
388 397u32 ssb_chipco_gpio_control(struct ssb_chipcommon *cc, u32 mask, u32 value);
389void ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value); 398u32 ssb_chipco_gpio_intmask(struct ssb_chipcommon *cc, u32 mask, u32 value);
399u32 ssb_chipco_gpio_polarity(struct ssb_chipcommon *cc, u32 mask, u32 value);
390 400
391#ifdef CONFIG_SSB_SERIAL 401#ifdef CONFIG_SSB_SERIAL
392extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, 402extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc,