Commit 67a5c29e authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville
Browse files

bcma: move initializing of struct bcma_bus to own function.

This makes it possible to use this code in some other method.

Acked-by: default avatarRafał Miłecki <>
Signed-off-by: default avatarHauke Mehrtens <>
Acked-by: default avatarRalf Baechle <>
Signed-off-by: default avatarJohn W. Linville <>
parent 982eee67
......@@ -312,15 +312,10 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr,
return 0;
int bcma_bus_scan(struct bcma_bus *bus)
static void bcma_init_bus(struct bcma_bus *bus)
u32 erombase;
u32 __iomem *eromptr, *eromend;
s32 tmp;
int err;
bus->nr_cores = 0;
......@@ -330,6 +325,16 @@ int bcma_bus_scan(struct bcma_bus *bus)
bus-> = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT;
bus->chipinfo.rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT;
bus->chipinfo.pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT;
int bcma_bus_scan(struct bcma_bus *bus)
u32 erombase;
u32 __iomem *eromptr, *eromend;
int err;
erombase = bcma_scan_read32(bus, 0, BCMA_CC_EROM);
eromptr = bus->mmio;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment