Skip to content

Commit 0a4e699

Browse files
rmileckiKalle Valo
authored andcommitted
bcma: move internal function declarations to private header
These functions are not exported nor used anywhere, so there is no reason to put them in public headers. Also drop unused bcma_chipco_(suspend|resume). Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent c32ec2a commit 0a4e699

File tree

6 files changed

+41
-36
lines changed

6 files changed

+41
-36
lines changed

drivers/bcma/bcma_private.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ int bcma_bus_scan(struct bcma_bus *bus);
4343
int bcma_sprom_get(struct bcma_bus *bus);
4444

4545
/* driver_chipcommon.c */
46+
void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
47+
void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
48+
void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
4649
#ifdef CONFIG_BCMA_DRIVER_MIPS
4750
void bcma_chipco_serial_init(struct bcma_drv_cc *cc);
4851
extern struct platform_device bcma_pflash_dev;
@@ -53,6 +56,8 @@ int bcma_core_chipcommon_b_init(struct bcma_drv_cc_b *ccb);
5356
void bcma_core_chipcommon_b_free(struct bcma_drv_cc_b *ccb);
5457

5558
/* driver_chipcommon_pmu.c */
59+
void bcma_pmu_early_init(struct bcma_drv_cc *cc);
60+
void bcma_pmu_init(struct bcma_drv_cc *cc);
5661
u32 bcma_pmu_get_alp_clock(struct bcma_drv_cc *cc);
5762
u32 bcma_pmu_get_cpu_clock(struct bcma_drv_cc *cc);
5863

@@ -102,10 +107,13 @@ static inline void __exit bcma_host_soc_unregister_driver(void)
102107

103108
/* driver_pci.c */
104109
u32 bcma_pcie_read(struct bcma_drv_pci *pc, u32 address);
110+
void bcma_core_pci_early_init(struct bcma_drv_pci *pc);
111+
void bcma_core_pci_init(struct bcma_drv_pci *pc);
105112
void bcma_core_pci_up(struct bcma_drv_pci *pc);
106113
void bcma_core_pci_down(struct bcma_drv_pci *pc);
107114

108115
/* driver_pcie2.c */
116+
void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2);
109117
void bcma_core_pcie2_up(struct bcma_drv_pcie2 *pcie2);
110118

111119
extern int bcma_chipco_watchdog_register(struct bcma_drv_cc *cc);
@@ -123,6 +131,39 @@ static inline void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
123131
}
124132
#endif /* CONFIG_BCMA_DRIVER_PCI_HOSTMODE */
125133

134+
/**************************************************
135+
* driver_mips.c
136+
**************************************************/
137+
138+
#ifdef CONFIG_BCMA_DRIVER_MIPS
139+
unsigned int bcma_core_mips_irq(struct bcma_device *dev);
140+
void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
141+
void bcma_core_mips_init(struct bcma_drv_mips *mcore);
142+
#else
143+
static inline unsigned int bcma_core_mips_irq(struct bcma_device *dev)
144+
{
145+
return 0;
146+
}
147+
static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore)
148+
{
149+
}
150+
static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore)
151+
{
152+
}
153+
#endif
154+
155+
/**************************************************
156+
* driver_gmac_cmn.c
157+
**************************************************/
158+
159+
#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN
160+
void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
161+
#else
162+
static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc)
163+
{
164+
}
165+
#endif
166+
126167
#ifdef CONFIG_BCMA_DRIVER_GPIO
127168
/* driver_gpio.c */
128169
int bcma_gpio_init(struct bcma_drv_cc *cc);

include/linux/bcma/bcma_driver_chipcommon.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -663,14 +663,6 @@ struct bcma_drv_cc_b {
663663
#define bcma_cc_maskset32(cc, offset, mask, set) \
664664
bcma_cc_write32(cc, offset, (bcma_cc_read32(cc, offset) & (mask)) | (set))
665665

666-
extern void bcma_core_chipcommon_init(struct bcma_drv_cc *cc);
667-
extern void bcma_core_chipcommon_early_init(struct bcma_drv_cc *cc);
668-
669-
extern void bcma_chipco_suspend(struct bcma_drv_cc *cc);
670-
extern void bcma_chipco_resume(struct bcma_drv_cc *cc);
671-
672-
void bcma_chipco_bcm4331_ext_pa_lines_ctl(struct bcma_drv_cc *cc, bool enable);
673-
674666
extern u32 bcma_chipco_watchdog_timer_set(struct bcma_drv_cc *cc, u32 ticks);
675667

676668
extern u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc);
@@ -690,9 +682,6 @@ u32 bcma_chipco_gpio_pullup(struct bcma_drv_cc *cc, u32 mask, u32 value);
690682
u32 bcma_chipco_gpio_pulldown(struct bcma_drv_cc *cc, u32 mask, u32 value);
691683

692684
/* PMU support */
693-
extern void bcma_pmu_init(struct bcma_drv_cc *cc);
694-
extern void bcma_pmu_early_init(struct bcma_drv_cc *cc);
695-
696685
extern void bcma_chipco_pll_write(struct bcma_drv_cc *cc, u32 offset,
697686
u32 value);
698687
extern void bcma_chipco_pll_maskset(struct bcma_drv_cc *cc, u32 offset,

include/linux/bcma/bcma_driver_gmac_cmn.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,4 @@ struct bcma_drv_gmac_cmn {
9191
#define gmac_cmn_write16(gc, offset, val) bcma_write16((gc)->core, offset, val)
9292
#define gmac_cmn_write32(gc, offset, val) bcma_write32((gc)->core, offset, val)
9393

94-
#ifdef CONFIG_BCMA_DRIVER_GMAC_CMN
95-
extern void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc);
96-
#else
97-
static inline void bcma_core_gmac_cmn_init(struct bcma_drv_gmac_cmn *gc) { }
98-
#endif
99-
10094
#endif /* LINUX_BCMA_DRIVER_GMAC_CMN_H_ */

include/linux/bcma/bcma_driver_mips.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,6 @@ struct bcma_drv_mips {
3939
u8 early_setup_done:1;
4040
};
4141

42-
#ifdef CONFIG_BCMA_DRIVER_MIPS
43-
extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
44-
extern void bcma_core_mips_early_init(struct bcma_drv_mips *mcore);
45-
46-
extern unsigned int bcma_core_mips_irq(struct bcma_device *dev);
47-
#else
48-
static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
49-
static inline void bcma_core_mips_early_init(struct bcma_drv_mips *mcore) { }
50-
51-
static inline unsigned int bcma_core_mips_irq(struct bcma_device *dev)
52-
{
53-
return 0;
54-
}
55-
#endif
56-
5742
extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
5843

5944
#endif /* LINUX_BCMA_DRIVER_MIPS_H_ */

include/linux/bcma/bcma_driver_pci.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,6 @@ struct bcma_drv_pci {
238238
#define pcicore_write16(pc, offset, val) bcma_write16((pc)->core, offset, val)
239239
#define pcicore_write32(pc, offset, val) bcma_write32((pc)->core, offset, val)
240240

241-
extern void bcma_core_pci_early_init(struct bcma_drv_pci *pc);
242-
extern void bcma_core_pci_init(struct bcma_drv_pci *pc);
243241
extern int bcma_core_pci_irq_ctl(struct bcma_bus *bus,
244242
struct bcma_device *core, bool enable);
245243
extern void bcma_core_pci_power_save(struct bcma_bus *bus, bool up);

include/linux/bcma/bcma_driver_pcie2.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,4 @@ struct bcma_drv_pcie2 {
155155
#define pcie2_set32(pcie2, offset, set) bcma_set32((pcie2)->core, offset, set)
156156
#define pcie2_mask32(pcie2, offset, mask) bcma_mask32((pcie2)->core, offset, mask)
157157

158-
void bcma_core_pcie2_init(struct bcma_drv_pcie2 *pcie2);
159-
160158
#endif /* LINUX_BCMA_DRIVER_PCIE2_H_ */

0 commit comments

Comments
 (0)