diff options
author | Paul Mackerras <paulus@samba.org> | 2008-03-03 05:31:09 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-03-03 05:31:09 -0500 |
commit | 3cecdda3f169f22f324f78fd544beee68e3cc6a4 (patch) | |
tree | e7c2995ddc2690d1be695a1525bcd16d3965548d /include/linux/ssb/ssb_driver_chipcommon.h | |
parent | b9c64498f53e0f4d90eec03048f73ac215bb6f79 (diff) | |
parent | da40451bba23b51eaca4170a095891646ce72104 (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.h | 18 |
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 | ||
363 | static inline bool ssb_chipco_available(struct ssb_chipcommon *cc) | ||
364 | { | ||
365 | return (cc->dev != NULL); | ||
366 | } | ||
367 | |||
360 | extern void ssb_chipcommon_init(struct ssb_chipcommon *cc); | 368 | extern 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, | |||
382 | extern void ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc, | 390 | extern void ssb_chipco_watchdog_timer_set(struct ssb_chipcommon *cc, |
383 | u32 ticks); | 391 | u32 ticks); |
384 | 392 | ||
393 | /* Chipcommon GPIO pin access. */ | ||
385 | u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask); | 394 | u32 ssb_chipco_gpio_in(struct ssb_chipcommon *cc, u32 mask); |
386 | 395 | u32 ssb_chipco_gpio_out(struct ssb_chipcommon *cc, u32 mask, u32 value); | |
387 | void ssb_chipco_gpio_out(struct ssb_chipcommon *cc, u32 mask, u32 value); | 396 | u32 ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value); |
388 | 397 | u32 ssb_chipco_gpio_control(struct ssb_chipcommon *cc, u32 mask, u32 value); | |
389 | void ssb_chipco_gpio_outen(struct ssb_chipcommon *cc, u32 mask, u32 value); | 398 | u32 ssb_chipco_gpio_intmask(struct ssb_chipcommon *cc, u32 mask, u32 value); |
399 | u32 ssb_chipco_gpio_polarity(struct ssb_chipcommon *cc, u32 mask, u32 value); | ||
390 | 400 | ||
391 | #ifdef CONFIG_SSB_SERIAL | 401 | #ifdef CONFIG_SSB_SERIAL |
392 | extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, | 402 | extern int ssb_chipco_serial_init(struct ssb_chipcommon *cc, |