aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bcma/bcma_driver_chipcommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/bcma/bcma_driver_chipcommon.h')
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index 1cf1749440ac..9a0e3fa3ca95 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -1,6 +1,9 @@
1#ifndef LINUX_BCMA_DRIVER_CC_H_ 1#ifndef LINUX_BCMA_DRIVER_CC_H_
2#define LINUX_BCMA_DRIVER_CC_H_ 2#define LINUX_BCMA_DRIVER_CC_H_
3 3
4#include <linux/platform_device.h>
5#include <linux/gpio.h>
6
4/** ChipCommon core registers. **/ 7/** ChipCommon core registers. **/
5#define BCMA_CC_ID 0x0000 8#define BCMA_CC_ID 0x0000
6#define BCMA_CC_ID_ID 0x0000FFFF 9#define BCMA_CC_ID_ID 0x0000FFFF
@@ -510,6 +513,7 @@ struct bcma_chipcommon_pmu {
510 513
511#ifdef CONFIG_BCMA_DRIVER_MIPS 514#ifdef CONFIG_BCMA_DRIVER_MIPS
512struct bcma_pflash { 515struct bcma_pflash {
516 bool present;
513 u8 buswidth; 517 u8 buswidth;
514 u32 window; 518 u32 window;
515 u32 window_size; 519 u32 window_size;
@@ -532,6 +536,7 @@ struct mtd_info;
532 536
533struct bcma_nflash { 537struct bcma_nflash {
534 bool present; 538 bool present;
539 bool boot; /* This is the flash the SoC boots from */
535 540
536 struct mtd_info *mtd; 541 struct mtd_info *mtd;
537}; 542};
@@ -552,6 +557,7 @@ struct bcma_drv_cc {
552 u32 capabilities; 557 u32 capabilities;
553 u32 capabilities_ext; 558 u32 capabilities_ext;
554 u8 setup_done:1; 559 u8 setup_done:1;
560 u8 early_setup_done:1;
555 /* Fast Powerup Delay constant */ 561 /* Fast Powerup Delay constant */
556 u16 fast_pwrup_delay; 562 u16 fast_pwrup_delay;
557 struct bcma_chipcommon_pmu pmu; 563 struct bcma_chipcommon_pmu pmu;
@@ -567,6 +573,14 @@ struct bcma_drv_cc {
567 int nr_serial_ports; 573 int nr_serial_ports;
568 struct bcma_serial_port serial_ports[4]; 574 struct bcma_serial_port serial_ports[4];
569#endif /* CONFIG_BCMA_DRIVER_MIPS */ 575#endif /* CONFIG_BCMA_DRIVER_MIPS */
576 u32 ticks_per_ms;
577 struct platform_device *watchdog;
578
579 /* Lock for GPIO register access. */
580 spinlock_t gpio_lock;
581#ifdef CONFIG_BCMA_DRIVER_GPIO
582 struct gpio_chip gpio;
583#endif
570}; 584};
571 585
572/* Register access */ 586/* Register access */
@@ -583,14 +597,14 @@ struct bcma_drv_cc {
583 bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set)) 597 bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set))
584 598
585extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc); 599extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
600extern void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
586 601
587extern void bcma_chipco_suspend(struct bcma_drv_cc *cc); 602extern void bcma_chipco_suspend(struct bcma_drv_cc *cc);
588extern void bcma_chipco_resume(struct bcma_drv_cc *cc); 603extern void bcma_chipco_resume(struct bcma_drv_cc *cc);
589 604
590void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable); 605void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
591 606
592extern void bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, 607extern u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks);
593 u32 ticks);
594 608
595void bcma_chipco_irq_mask(struct bcma_drv_cc *cc, u32 mask, u32 value); 609void bcma_chipco_irq_mask(struct bcma_drv_cc *cc, u32 mask, u32 value);
596 610
@@ -603,9 +617,12 @@ u32 bcma_chipco_gpio_outen(struct bcma_drv_cc *cc, u32 mask, u32 value);
603u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value); 617u32 bcma_chipco_gpio_control(struct bcma_drv_cc *cc, u32 mask, u32 value);
604u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value); 618u32 bcma_chipco_gpio_intmask(struct bcma_drv_cc *cc, u32 mask, u32 value);
605u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value); 619u32 bcma_chipco_gpio_polarity(struct bcma_drv_cc *cc, u32 mask, u32 value);
620u32 bcma_chipco_gpio_pullup(struct bcma_drv_cc *cc, u32 mask, u32 value);
621u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value);
606 622
607/* PMU support */ 623/* PMU support */
608extern void bcma_pmu_init(struct bcma_drv_cc *cc); 624extern void bcma_pmu_init(struct bcma_drv_cc *cc);
625extern void bcma_pmu_early_init(struct bcma_drv_cc *cc);
609 626
610extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset, 627extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset,
611 u32 value); 628 u32 value);