diff options
Diffstat (limited to 'include/linux')
36 files changed, 683 insertions, 287 deletions
diff --git a/include/linux/bcma/bcma.h b/include/linux/bcma/bcma.h index eb1c6a47b67f..994739da827f 100644 --- a/include/linux/bcma/bcma.h +++ b/include/linux/bcma/bcma.h | |||
| @@ -318,6 +318,7 @@ struct bcma_bus { | |||
| 318 | const struct bcma_host_ops *ops; | 318 | const struct bcma_host_ops *ops; |
| 319 | 319 | ||
| 320 | enum bcma_hosttype hosttype; | 320 | enum bcma_hosttype hosttype; |
| 321 | bool host_is_pcie2; /* Used for BCMA_HOSTTYPE_PCI only */ | ||
| 321 | union { | 322 | union { |
| 322 | /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */ | 323 | /* Pointer to the PCI bus (only for BCMA_HOSTTYPE_PCI) */ |
| 323 | struct pci_dev *host_pci; | 324 | struct pci_dev *host_pci; |
diff --git a/include/linux/bcma/bcma_driver_pci.h b/include/linux/bcma/bcma_driver_pci.h index 0333e605ea0d..3f809ae372c4 100644 --- a/include/linux/bcma/bcma_driver_pci.h +++ b/include/linux/bcma/bcma_driver_pci.h | |||
| @@ -223,6 +223,7 @@ struct bcma_drv_pci_host { | |||
| 223 | 223 | ||
| 224 | struct bcma_drv_pci { | 224 | struct bcma_drv_pci { |
| 225 | struct bcma_device *core; | 225 | struct bcma_device *core; |
| 226 | u8 early_setup_done:1; | ||
| 226 | u8 setup_done:1; | 227 | u8 setup_done:1; |
| 227 | u8 hostmode:1; | 228 | u8 hostmode:1; |
| 228 | 229 | ||
| @@ -237,6 +238,7 @@ struct bcma_drv_pci { | |||
| 237 | #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val) | 238 | #define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val) |
| 238 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) | 239 | #define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val) |
| 239 | 240 | ||
| 241 | extern void bcma_core_pci_early_init(struct bcma_drv_pci *pc); | ||
| 240 | extern void bcma_core_pci_init(struct bcma_drv_pci *pc); | 242 | extern void bcma_core_pci_init(struct bcma_drv_pci *pc); |
| 241 | extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, | 243 | extern int bcma_core_pci_irq_ctl(struct bcma_drv_pci *pc, |
| 242 | struct bcma_device *core, bool enable); | 244 | struct bcma_device *core, bool enable); |
diff --git a/include/linux/bcma/bcma_regs.h b/include/linux/bcma/bcma_regs.h index e64ae7bf80a1..ebd5c1fcdea4 100644 --- a/include/linux/bcma/bcma_regs.h +++ b/include/linux/bcma/bcma_regs.h | |||
| @@ -64,6 +64,8 @@ | |||
| 64 | #define BCMA_PCI_GPIO_XTAL 0x40 /* PCI config space GPIO 14 for Xtal powerup */ | 64 | #define BCMA_PCI_GPIO_XTAL 0x40 /* PCI config space GPIO 14 for Xtal powerup */ |
| 65 | #define BCMA_PCI_GPIO_PLL 0x80 /* PCI config space GPIO 15 for PLL powerdown */ | 65 | #define BCMA_PCI_GPIO_PLL 0x80 /* PCI config space GPIO 15 for PLL powerdown */ |
| 66 | 66 | ||
| 67 | #define BCMA_PCIE2_BAR0_WIN2 0x70 | ||
| 68 | |||
| 67 | /* SiliconBackplane Address Map. | 69 | /* SiliconBackplane Address Map. |
| 68 | * All regions may not exist on all chips. | 70 | * All regions may not exist on all chips. |
| 69 | */ | 71 | */ |
diff --git a/include/linux/bcma/bcma_soc.h b/include/linux/bcma/bcma_soc.h index f24d245f8394..1b5fc0c3b1b5 100644 --- a/include/linux/bcma/bcma_soc.h +++ b/include/linux/bcma/bcma_soc.h | |||
| @@ -5,8 +5,6 @@ | |||
| 5 | 5 | ||
| 6 | struct bcma_soc { | 6 | struct bcma_soc { |
| 7 | struct bcma_bus bus; | 7 | struct bcma_bus bus; |
| 8 | struct bcma_device core_cc; | ||
| 9 | struct bcma_device core_mips; | ||
| 10 | }; | 8 | }; |
| 11 | 9 | ||
| 12 | int __init bcma_host_soc_register(struct bcma_soc *soc); | 10 | int __init bcma_host_soc_register(struct bcma_soc *soc); |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index abcafaa20b86..9c78d15d33e4 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
| @@ -18,8 +18,6 @@ | |||
| 18 | #include <asm/div64.h> | 18 | #include <asm/div64.h> |
| 19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
| 20 | 20 | ||
| 21 | /* clocksource cycle base type */ | ||
| 22 | typedef u64 cycle_t; | ||
| 23 | struct clocksource; | 21 | struct clocksource; |
| 24 | struct module; | 22 | struct module; |
| 25 | 23 | ||
| @@ -28,106 +26,6 @@ struct module; | |||
| 28 | #endif | 26 | #endif |
| 29 | 27 | ||
| 30 | /** | 28 | /** |
| 31 | * struct cyclecounter - hardware abstraction for a free running counter | ||
| 32 | * Provides completely state-free accessors to the underlying hardware. | ||
| 33 | * Depending on which hardware it reads, the cycle counter may wrap | ||
| 34 | * around quickly. Locking rules (if necessary) have to be defined | ||
| 35 | * by the implementor and user of specific instances of this API. | ||
| 36 | * | ||
| 37 | * @read: returns the current cycle value | ||
| 38 | * @mask: bitmask for two's complement | ||
| 39 | * subtraction of non 64 bit counters, | ||
| 40 | * see CLOCKSOURCE_MASK() helper macro | ||
| 41 | * @mult: cycle to nanosecond multiplier | ||
| 42 | * @shift: cycle to nanosecond divisor (power of two) | ||
| 43 | */ | ||
| 44 | struct cyclecounter { | ||
| 45 | cycle_t (*read)(const struct cyclecounter *cc); | ||
| 46 | cycle_t mask; | ||
| 47 | u32 mult; | ||
| 48 | u32 shift; | ||
| 49 | }; | ||
| 50 | |||
| 51 | /** | ||
| 52 | * struct timecounter - layer above a %struct cyclecounter which counts nanoseconds | ||
| 53 | * Contains the state needed by timecounter_read() to detect | ||
| 54 | * cycle counter wrap around. Initialize with | ||
| 55 | * timecounter_init(). Also used to convert cycle counts into the | ||
| 56 | * corresponding nanosecond counts with timecounter_cyc2time(). Users | ||
| 57 | * of this code are responsible for initializing the underlying | ||
| 58 | * cycle counter hardware, locking issues and reading the time | ||
| 59 | * more often than the cycle counter wraps around. The nanosecond | ||
| 60 | * counter will only wrap around after ~585 years. | ||
| 61 | * | ||
| 62 | * @cc: the cycle counter used by this instance | ||
| 63 | * @cycle_last: most recent cycle counter value seen by | ||
| 64 | * timecounter_read() | ||
| 65 | * @nsec: continuously increasing count | ||
| 66 | */ | ||
| 67 | struct timecounter { | ||
| 68 | const struct cyclecounter *cc; | ||
| 69 | cycle_t cycle_last; | ||
| 70 | u64 nsec; | ||
| 71 | }; | ||
| 72 | |||
| 73 | /** | ||
| 74 | * cyclecounter_cyc2ns - converts cycle counter cycles to nanoseconds | ||
| 75 | * @cc: Pointer to cycle counter. | ||
| 76 | * @cycles: Cycles | ||
| 77 | * | ||
| 78 | * XXX - This could use some mult_lxl_ll() asm optimization. Same code | ||
| 79 | * as in cyc2ns, but with unsigned result. | ||
| 80 | */ | ||
| 81 | static inline u64 cyclecounter_cyc2ns(const struct cyclecounter *cc, | ||
| 82 | cycle_t cycles) | ||
| 83 | { | ||
| 84 | u64 ret = (u64)cycles; | ||
| 85 | ret = (ret * cc->mult) >> cc->shift; | ||
| 86 | return ret; | ||
| 87 | } | ||
| 88 | |||
| 89 | /** | ||
| 90 | * timecounter_init - initialize a time counter | ||
| 91 | * @tc: Pointer to time counter which is to be initialized/reset | ||
| 92 | * @cc: A cycle counter, ready to be used. | ||
| 93 | * @start_tstamp: Arbitrary initial time stamp. | ||
| 94 | * | ||
| 95 | * After this call the current cycle register (roughly) corresponds to | ||
| 96 | * the initial time stamp. Every call to timecounter_read() increments | ||
| 97 | * the time stamp counter by the number of elapsed nanoseconds. | ||
| 98 | */ | ||
| 99 | extern void timecounter_init(struct timecounter *tc, | ||
| 100 | const struct cyclecounter *cc, | ||
| 101 | u64 start_tstamp); | ||
| 102 | |||
| 103 | /** | ||
| 104 | * timecounter_read - return nanoseconds elapsed since timecounter_init() | ||
| 105 | * plus the initial time stamp | ||
| 106 | * @tc: Pointer to time counter. | ||
| 107 | * | ||
