提交 b2395b8a 编写于 作者: H Hauke Mehrtens 提交者: David S. Miller

bcma: export bcma_find_core_unit()

This function is used to get a specific core when there is more than
one core of that specific type. This is used in bgmac to reset all GMAC
cores.
Signed-off-by: NHauke Mehrtens <hauke@hauke-m.de>
Acked-by: NRafał Miłecki <zajec5@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 eec73f1c
...@@ -33,8 +33,6 @@ int __init bcma_bus_early_register(struct bcma_bus *bus, ...@@ -33,8 +33,6 @@ int __init bcma_bus_early_register(struct bcma_bus *bus,
int bcma_bus_suspend(struct bcma_bus *bus); int bcma_bus_suspend(struct bcma_bus *bus);
int bcma_bus_resume(struct bcma_bus *bus); int bcma_bus_resume(struct bcma_bus *bus);
#endif #endif
struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
u8 unit);
/* scan.c */ /* scan.c */
int bcma_bus_scan(struct bcma_bus *bus); int bcma_bus_scan(struct bcma_bus *bus);
......
...@@ -78,18 +78,6 @@ static u16 bcma_cc_core_id(struct bcma_bus *bus) ...@@ -78,18 +78,6 @@ static u16 bcma_cc_core_id(struct bcma_bus *bus)
return BCMA_CORE_CHIPCOMMON; return BCMA_CORE_CHIPCOMMON;
} }
struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid)
{
struct bcma_device *core;
list_for_each_entry(core, &bus->cores, list) {
if (core->id.id == coreid)
return core;
}
return NULL;
}
EXPORT_SYMBOL_GPL(bcma_find_core);
struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid, struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
u8 unit) u8 unit)
{ {
...@@ -101,6 +89,7 @@ struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid, ...@@ -101,6 +89,7 @@ struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
} }
return NULL; return NULL;
} }
EXPORT_SYMBOL_GPL(bcma_find_core_unit);
bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value, bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value,
int timeout) int timeout)
......
...@@ -418,7 +418,14 @@ static inline void bcma_maskset16(struct bcma_device *cc, ...@@ -418,7 +418,14 @@ static inline void bcma_maskset16(struct bcma_device *cc,
bcma_write16(cc, offset, (bcma_read16(cc, offset) & mask) | set); bcma_write16(cc, offset, (bcma_read16(cc, offset) & mask) | set);
} }
extern struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid); extern struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid,
u8 unit);
static inline struct bcma_device *bcma_find_core(struct bcma_bus *bus,
u16 coreid)
{
return bcma_find_core_unit(bus, coreid, 0);
}
extern bool bcma_core_is_enabled(struct bcma_device *core); extern bool bcma_core_is_enabled(struct bcma_device *core);
extern void bcma_core_disable(struct bcma_device *core, u32 flags); extern void bcma_core_disable(struct bcma_device *core, u32 flags);
extern int bcma_core_enable(struct bcma_device *core, u32 flags); extern int bcma_core_enable(struct bcma_device *core, u32 flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册