diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2012-07-05 16:07:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-09 16:36:36 -0400 |
commit | 3d9d8af330a891f141db420115238f01e4c6ece7 (patch) | |
tree | e184e7da8625c3de578e48a308f634eb68de0865 /drivers/bcma | |
parent | cddec90254c3c3d20752bf9053c496035cdfef6a (diff) |
bcma: use custom printing functions
Having bus number printed makes it much easier to anaylze logs on
systems with more buses. For example Netgear WNDR4500 has 3 AMBA buses
in total, which makes standard log really messy.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/bcma')
-rw-r--r-- | drivers/bcma/bcma_private.h | 9 | ||||
-rw-r--r-- | drivers/bcma/core.c | 10 | ||||
-rw-r--r-- | drivers/bcma/driver_chipcommon.c | 5 | ||||
-rw-r--r-- | drivers/bcma/driver_chipcommon_pmu.c | 26 | ||||
-rw-r--r-- | drivers/bcma/driver_mips.c | 16 | ||||
-rw-r--r-- | drivers/bcma/driver_pci_host.c | 10 | ||||
-rw-r--r-- | drivers/bcma/host_pci.c | 4 | ||||
-rw-r--r-- | drivers/bcma/main.c | 19 | ||||
-rw-r--r-- | drivers/bcma/scan.c | 24 | ||||
-rw-r--r-- | drivers/bcma/sprom.c | 8 |
10 files changed, 69 insertions, 62 deletions
diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h index b81755bb4798..f6589eb7c45f 100644 --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h | |||
@@ -10,6 +10,15 @@ | |||
10 | 10 | ||
11 | #define BCMA_CORE_SIZE 0x1000 | 11 | #define BCMA_CORE_SIZE 0x1000 |
12 | 12 | ||
13 | #define bcma_err(bus, fmt, ...) \ | ||
14 | pr_err("bus%d: " fmt, (bus)->num, ##__VA_ARGS__) | ||
15 | #define bcma_warn(bus, fmt, ...) \ | ||
16 | pr_warn("bus%d: " fmt, (bus)->num, ##__VA_ARGS__) | ||
17 | #define bcma_info(bus, fmt, ...) \ | ||
18 | pr_info("bus%d: " fmt, (bus)->num, ##__VA_ARGS__) | ||
19 | #define bcma_debug(bus, fmt, ...) \ | ||
20 | pr_debug("bus%d: " fmt, (bus)->num, ##__VA_ARGS__) | ||
21 | |||
13 | struct bcma_bus; | 22 | struct bcma_bus; |
14 | 23 | ||
15 | /* main.c */ | 24 | /* main.c */ |
diff --git a/drivers/bcma/core.c b/drivers/bcma/core.c index bc6e89212ad3..63c8b470536f 100644 --- a/drivers/bcma/core.c +++ b/drivers/bcma/core.c | |||
@@ -75,7 +75,7 @@ void bcma_core_set_clockmode(struct bcma_device *core, | |||
75 | udelay(10); | 75 | udelay(10); |
76 | } | 76 | } |
77 | if (i) | 77 | if (i) |
78 | pr_err("HT force timeout\n"); | 78 | bcma_err(core->bus, "HT force timeout\n"); |
79 | break; | 79 | break; |
80 | case BCMA_CLKMODE_DYNAMIC: | 80 | case BCMA_CLKMODE_DYNAMIC: |
81 | bcma_set32(core, BCMA_CLKCTLST, ~BCMA_CLKCTLST_FORCEHT); | 81 | bcma_set32(core, BCMA_CLKCTLST, ~BCMA_CLKCTLST_FORCEHT); |
@@ -102,9 +102,9 @@ void bcma_core_pll_ctl(struct bcma_device *core, u32 req, u32 status, bool on) | |||
102 | udelay(10); | 102 | udelay(10); |
103 | } | 103 | } |
104 | if (i) | 104 | if (i) |
105 | pr_err("PLL enable timeout\n"); | 105 | bcma_err(core->bus, "PLL enable timeout\n"); |
106 | } else { | 106 | } else { |
107 | pr_warn("Disabling PLL not supported yet!\n"); | 107 | bcma_warn(core->bus, "Disabling PLL not supported yet!\n"); |
108 | } | 108 | } |
109 | } | 109 | } |
110 | EXPORT_SYMBOL_GPL(bcma_core_pll_ctl); | 110 | EXPORT_SYMBOL_GPL(bcma_core_pll_ctl); |
@@ -120,8 +120,8 @@ u32 bcma_core_dma_translation(struct bcma_device *core) | |||
120 | else | 120 | else |
121 | return BCMA_DMA_TRANSLATION_DMA32_CMT; | 121 | return BCMA_DMA_TRANSLATION_DMA32_CMT; |
122 | default: | 122 | default: |
123 | pr_err("DMA translation unknown for host %d\n", | 123 | bcma_err(core->bus, "DMA translation unknown for host %d\n", |
124 | core->bus->hosttype); | 124 | core->bus->hosttype); |
125 | } | 125 | } |
126 | return BCMA_DMA_TRANSLATION_NONE; | 126 | return BCMA_DMA_TRANSLATION_NONE; |
127 | } | 127 | } |
diff --git a/drivers/bcma/driver_chipcommon.c b/drivers/bcma/driver_chipcommon.c index e9f1b3fd252c..61c19cef59a7 100644 --- a/drivers/bcma/driver_chipcommon.c +++ b/drivers/bcma/driver_chipcommon.c | |||
@@ -44,7 +44,7 @@ void bcma_core_chipcommon_init(struct bcma_drv_cc *cc) | |||
44 | if (cc->capabilities & BCMA_CC_CAP_PMU) | 44 | if (cc->capabilities & BCMA_CC_CAP_PMU) |
45 | bcma_pmu_init(cc); | 45 | bcma_pmu_init(cc); |
46 | if (cc->capabilities & BCMA_CC_CAP_PCTL) | 46 | if (cc->capabilities & BCMA_CC_CAP_PCTL) |
47 | pr_err("Power control not implemented!\n"); | 47 | bcma_err(cc->core->bus, "Power control not implemented!\n"); |
48 | 48 | ||
49 | if (cc->core->id.rev >= 16) { | 49 | if (cc->core->id.rev >= 16) { |
50 | if (cc->core->bus->sprom.leddc_on_time && | 50 | if (cc->core->bus->sprom.leddc_on_time && |
@@ -137,8 +137,7 @@ void bcma_chipco_serial_init(struct bcma_drv_cc *cc) | |||
137 | | BCMA_CC_CORECTL_UARTCLKEN); | 137 | | BCMA_CC_CORECTL_UARTCLKEN); |
138 | } | 138 | } |
139 | } else { | 139 | } else { |
140 | pr_err("serial not supported on this device ccrev: 0x%x\n", | 140 | bcma_err(bus, "serial not supported on this device ccrev: 0x%x\n", ccrev); |
141 | ccrev); | ||
142 | return; | 141 | return; |
143 | } | 142 | } |
144 | 143 | ||
diff --git a/drivers/bcma/driver_chipcommon_pmu.c b/drivers/bcma/driver_chipcommon_pmu.c index ca5a919133f7..74a87d530424 100644 --- a/drivers/bcma/driver_chipcommon_pmu.c +++ b/drivers/bcma/driver_chipcommon_pmu.c | |||
@@ -66,8 +66,8 @@ static void bcma_pmu_resources_init(struct bcma_drv_cc *cc) | |||
66 | max_msk = 0xFFFF; | 66 | max_msk = 0xFFFF; |
67 | break; | 67 | break; |
68 | default: | 68 | default: |
69 | pr_debug("PMU resource config unknown or not needed for device 0x%04X\n", | 69 | bcma_debug(bus, "PMU resource config unknown or not needed for device 0x%04X\n", |
70 | bus->chipinfo.id); | 70 | bus->chipinfo.id); |
71 | } | 71 | } |
72 | 72 | ||
73 | /* Set the resource masks. */ | 73 | /* Set the resource masks. */ |
@@ -136,8 +136,8 @@ void bcma_pmu_workarounds(struct bcma_drv_cc *cc) | |||
136 | } | 136 | } |
137 | break; | 137 | break; |
138 | default: | 138 | default: |
139 | pr_debug("Workarounds unknown or not needed for device 0x%04X\n", | 139 | bcma_debug(bus, "Workarounds unknown or not needed for device 0x%04X\n", |
140 | bus->chipinfo.id); | 140 | bus->chipinfo.id); |
141 | } | 141 | } |
142 | } | 142 | } |
143 | 143 | ||
@@ -148,8 +148,8 @@ void bcma_pmu_init(struct bcma_drv_cc *cc) | |||
148 | pmucap = bcma_cc_read32(cc, BCMA_CC_PMU_CAP); | 148 | pmucap = bcma_cc_read32(cc, BCMA_CC_PMU_CAP); |
149 | cc->pmu.rev = (pmucap & BCMA_CC_PMU_CAP_REVISION); | 149 | cc->pmu.rev = (pmucap & BCMA_CC_PMU_CAP_REVISION); |
150 | 150 | ||
151 | pr_debug("Found rev %u PMU (capabilities 0x%08X)\n", cc->pmu.rev, | 151 | bcma_debug(cc->core->bus, "Found rev %u PMU (capabilities 0x%08X)\n", |
152 | pmucap); | 152 | cc->pmu.rev, pmucap); |
153 | 153 | ||
154 | if (cc->pmu.rev == 1) | 154 | if (cc->pmu.rev == 1) |
155 | bcma_cc_mask32(cc, BCMA_CC_PMU_CTL, | 155 | bcma_cc_mask32(cc, BCMA_CC_PMU_CTL, |
@@ -181,9 +181,8 @@ u32 bcma_pmu_alp_clock(struct bcma_drv_cc *cc) | |||
181 | /* always 25Mhz */ | 181 | /* always 25Mhz */ |
182 | return 25000 * 1000; | 182 | return 25000 * 1000; |
183 | default: | 183 | default: |
184 | pr_warn("No ALP clock specified for %04X device, " | 184 | bcma_warn(bus, "No ALP clock specified for %04X device, pmu rev. %d, using default %d Hz\n", |
185 | "pmu rev. %d, using default %d Hz\n", | 185 | bus->chipinfo.id, cc->pmu.rev, BCMA_CC_PMU_ALP_CLOCK); |
186 | bus->chipinfo.id, cc->pmu.rev, BCMA_CC_PMU_ALP_CLOCK); | ||
187 | } | 186 | } |
188 | return BCMA_CC_PMU_ALP_CLOCK; | 187 | return BCMA_CC_PMU_ALP_CLOCK; |
189 | } | 188 | } |
@@ -251,9 +250,8 @@ u32 bcma_pmu_get_clockcontrol(struct bcma_drv_cc *cc) | |||
251 | case BCMA_CHIP_ID_BCM53572: | 250 | case BCMA_CHIP_ID_BCM53572: |
252 | return 75000000; | 251 | return 75000000; |
253 | default: | 252 | default: |
254 | pr_warn("No backplane clock specified for %04X device, " | 253 | bcma_warn(bus, "No backplane clock specified for %04X device, pmu rev. %d, using default %d Hz\n", |
255 | "pmu rev. %d, using default %d Hz\n", | 254 | bus->chipinfo.id, cc->pmu.rev, BCMA_CC_PMU_HT_CLOCK); |
256 | bus->chipinfo.id, cc->pmu.rev, BCMA_CC_PMU_HT_CLOCK); | ||
257 | } | 255 | } |
258 | return BCMA_CC_PMU_HT_CLOCK; | 256 | return BCMA_CC_PMU_HT_CLOCK; |
259 | } | 257 | } |
@@ -459,8 +457,8 @@ void bcma_pmu_spuravoid_pllupdate(struct bcma_drv_cc *cc, int spuravoid) | |||
459 | tmp = 1 << 10; | 457 | tmp = 1 << 10; |
460 | break; | 458 | break; |
461 | default: | 459 | default: |
462 | pr_err("unknown spuravoidance settings for chip 0x%04X, not changing PLL\n", | 460 | bcma_err(bus, "Unknown spuravoidance settings for chip 0x%04X, not changing PLL\n", |
463 | bus->chipinfo.id); | 461 | bus->chipinfo.id); |
464 | break; | 462 | break; |
465 | } | 463 | } |
466 | 464 | ||
diff --git a/drivers/bcma/driver_mips.c b/drivers/bcma/driver_mips.c index 73ed3017077f..ef34ed25bf00 100644 --- a/drivers/bcma/driver_mips.c +++ b/drivers/bcma/driver_mips.c | |||
@@ -143,8 +143,8 @@ static void bcma_core_mips_set_irq(struct bcma_device *dev, unsigned int irq) | |||
143 | 1 << irqflag); | 143 | 1 << irqflag); |
144 | } | 144 | } |
145 | 145 | ||
146 | pr_info("set_irq: core 0x%04x, irq %d => %d\n", | 146 | bcma_info(bus, "set_irq: core 0x%04x, irq %d => %d\n", |
147 | dev->id.id, oldirq + 2, irq + 2); | 147 | dev->id.id, oldirq + 2, irq + 2); |
148 | } | 148 | } |
149 | 149 | ||
150 | static void bcma_core_mips_print_irq(struct bcma_device *dev, unsigned int irq) | 150 | static void bcma_core_mips_print_irq(struct bcma_device *dev, unsigned int irq) |
@@ -173,7 +173,7 @@ u32 bcma_cpu_clock(struct bcma_drv_mips *mcore) | |||
173 | if (bus->drv_cc.capabilities & BCMA_CC_CAP_PMU) | 173 | if (bus->drv_cc.capabilities & BCMA_CC_CAP_PMU) |
174 | return bcma_pmu_get_clockcpu(&bus->drv_cc); | 174 | return bcma_pmu_get_clockcpu(&bus->drv_cc); |
175 | 175 | ||
176 | pr_err("No PMU available, need this to get the cpu clock\n"); | 176 | bcma_err(bus, "No PMU available, need this to get the cpu clock\n"); |
177 | return 0; | 177 | return 0; |
178 | } | 178 | } |
179 | EXPORT_SYMBOL(bcma_cpu_clock); | 179 | EXPORT_SYMBOL(bcma_cpu_clock); |
@@ -185,10 +185,10 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore) | |||
185 | switch (bus->drv_cc.capabilities & BCMA_CC_CAP_FLASHT) { | 185 | switch (bus->drv_cc.capabilities & BCMA_CC_CAP_FLASHT) { |
186 | case BCMA_CC_FLASHT_STSER: | 186 | case BCMA_CC_FLASHT_STSER: |
187 | case BCMA_CC_FLASHT_ATSER: | 187 | case BCMA_CC_FLASHT_ATSER: |
188 | pr_err("Serial flash not supported.\n"); | 188 | bcma_err(bus, "Serial flash not supported.\n"); |
189 | break; | 189 | break; |
190 | case BCMA_CC_FLASHT_PARA: | 190 | case BCMA_CC_FLASHT_PARA: |
191 | pr_info("found parallel flash.\n"); | 191 | bcma_info(bus, "found parallel flash.\n"); |
192 | bus->drv_cc.pflash.window = 0x1c000000; | 192 | bus->drv_cc.pflash.window = 0x1c000000; |
193 | bus->drv_cc.pflash.window_size = 0x02000000; | 193 | bus->drv_cc.pflash.window_size = 0x02000000; |
194 | 194 | ||
@@ -199,7 +199,7 @@ static void bcma_core_mips_flash_detect(struct bcma_drv_mips *mcore) | |||
199 | bus->drv_cc.pflash.buswidth = 2; | 199 | bus->drv_cc.pflash.buswidth = 2; |
200 | break; | 200 | break; |
201 | default: | 201 | default: |
202 | pr_err("flash not supported.\n"); | 202 | bcma_err(bus, "flash not supported.\n"); |
203 | } | 203 | } |
204 | } | 204 | } |
205 | 205 | ||
@@ -209,7 +209,7 @@ void bcma_core_mips_init(struct bcma_drv_mips *mcore) | |||
209 | struct bcma_device *core; | 209 | struct bcma_device *core; |
210 | bus = mcore->core->bus; | 210 | bus = mcore->core->bus; |
211 | 211 | ||
212 | pr_info("Initializing MIPS core...\n"); | 212 | bcma_info(bus, "Initializing MIPS core...\n"); |
213 | 213 | ||
214 | if (!mcore->setup_done) | 214 | if (!mcore->setup_done) |
215 | mcore->assigned_irqs = 1; | 215 | mcore->assigned_irqs = 1; |
@@ -244,7 +244,7 @@ void bcma_core_mips_init(struct bcma_drv_mips *mcore) | |||
244 | break; | 244 | break; |
245 | } | 245 | } |
246 | } | 246 | } |
247 | pr_info("IRQ reconfiguration done\n"); | 247 | bcma_info(bus, "IRQ reconfiguration done\n"); |
248 | bcma_core_mips_dump_irq(bus); | 248 | bcma_core_mips_dump_irq(bus); |
249 | 249 | ||
250 | if (mcore->setup_done) | 250 | if (mcore->setup_done) |
diff --git a/drivers/bcma/driver_pci_host.c b/drivers/bcma/driver_pci_host.c index d6e8a37e3e5f..cbae2c231336 100644 --- a/drivers/bcma/driver_pci_host.c +++ b/drivers/bcma/driver_pci_host.c | |||
@@ -36,7 +36,7 @@ bool __devinit bcma_core_pci_is_in_hostmode(struct bcma_drv_pci *pc) | |||
36 | return false; | 36 | return false; |
37 | 37 | ||
38 | if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) { | 38 | if (bus->sprom.boardflags_lo & BCMA_CORE_PCI_BFL_NOPCI) { |
39 | pr_info("This PCI core is disabled and not working\n"); | 39 | bcma_info(bus, "This PCI core is disabled and not working\n"); |
40 | return false; | 40 | return false; |
41 | } | 41 | } |
42 | 42 | ||
@@ -341,6 +341,7 @@ static u8 __devinit bcma_find_pci_capability(struct bcma_drv_pci *pc, | |||
341 | */ | 341 | */ |
342 | static void __devinit bcma_core_pci_enable_crs(struct bcma_drv_pci *pc) | 342 | static void __devinit bcma_core_pci_enable_crs(struct bcma_drv_pci *pc) |
343 | { | 343 | { |
344 | struct bcma_bus *bus = pc->core->bus; | ||
344 | u8 cap_ptr, root_ctrl, root_cap, dev; | 345 | u8 cap_ptr, root_ctrl, root_cap, dev; |
345 | u16 val16; | 346 | u16 val16; |
346 | int i; | 347 | int i; |
@@ -379,7 +380,8 @@ static void __devinit bcma_core_pci_enable_crs(struct bcma_drv_pci *pc) | |||
379 | udelay(10); | 380 | udelay(10); |
380 | } | 381 | } |
381 | if (val16 == 0x1) | 382 | if (val16 == 0x1) |
382 | pr_err("PCI: Broken device in slot %d\n", dev); | 383 | bcma_err(bus, "PCI: Broken device in slot %d\n", |
384 | dev); | ||
383 | } | 385 | } |
384 | } | 386 | } |
385 | } | 387 | } |
@@ -392,11 +394,11 @@ void __devinit bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc) | |||
392 | u32 pci_membase_1G; | 394 | u32 pci_membase_1G; |
393 | unsigned long io_map_base; | 395 | unsigned long io_map_base; |
394 | 396 | ||
395 | pr_info("PCIEcore in host mode found\n"); | 397 | bcma_info(bus, "PCIEcore in host mode found\n"); |
396 | 398 | ||
397 | pc_host = kzalloc(sizeof(*pc_host), GFP_KERNEL); | 399 | pc_host = kzalloc(sizeof(*pc_host), GFP_KERNEL); |
398 | if (!pc_host) { | 400 | if (!pc_host) { |
399 | pr_err("can not allocate memory"); | 401 | bcma_err(bus, "can not allocate memory"); |
400 | return; | 402 | return; |
401 | } | 403 | } |
402 | 404 | ||
diff --git a/drivers/bcma/host_pci.c b/drivers/bcma/host_pci.c index c693c0b2639c..11b32d2642df 100644 --- a/drivers/bcma/host_pci.c +++ b/drivers/bcma/host_pci.c | |||
@@ -18,7 +18,7 @@ static void bcma_host_pci_switch_core(struct bcma_device *core) | |||
18 | pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN2, | 18 | pci_write_config_dword(core->bus->host_pci, BCMA_PCI_BAR0_WIN2, |
19 | core->wrap); | 19 | core->wrap); |
20 | core->bus->mapped_core = core; | 20 | core->bus->mapped_core = core; |
21 | pr_debug("Switched to core: 0x%X\n", core->id.id); | 21 | bcma_debug(core->bus, "Switched to core: 0x%X\n", core->id.id); |
22 | } | 22 | } |
23 | 23 | ||
24 | /* Provides access to the requested core. Returns base offset that has to be | 24 | /* Provides access to the requested core. Returns base offset that has to be |
@@ -188,7 +188,7 @@ static int __devinit bcma_host_pci_probe(struct pci_dev *dev, | |||
188 | 188 | ||
189 | /* SSB needed additional powering up, do we have any AMBA PCI cards? */ | 189 | /* SSB needed additional powering up, do we have any AMBA PCI cards? */ |
190 | if (!pci_is_pcie(dev)) | 190 | if (!pci_is_pcie(dev)) |
191 | pr_err("PCI card detected, report problems.\n"); | 191 | bcma_err(bus, "PCI card detected, report problems.\n"); |
192 | 192 | ||
193 | /* Map MMIO */ | 193 | /* Map MMIO */ |
194 | err = -ENOMEM; | 194 | err = -ENOMEM; |
diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c index 7e138ec21357..7ff4bac6f9e1 100644 --- a/drivers/bcma/main.c +++ b/drivers/bcma/main.c | |||
@@ -118,8 +118,9 @@ static int bcma_register_cores(struct bcma_bus *bus) | |||
118 | 118 | ||
119 | err = device_register(&core->dev); | 119 | err = device_register(&core->dev); |
120 | if (err) { | 120 | if (err) { |
121 | pr_err("Could not register dev for core 0x%03X\n", | 121 | bcma_err(bus, |
122 | core->id.id); | 122 | "Could not register dev for core 0x%03X\n", |
123 | core->id.id); | ||
123 | continue; | 124 | continue; |
124 | } | 125 | } |
125 | core->dev_registered = true; | 126 | core->dev_registered = true; |
@@ -151,7 +152,7 @@ int __devinit bcma_bus_register(struct bcma_bus *bus) | |||
151 | /* Scan for devices (cores) */ | 152 | /* Scan for devices (cores) */ |
152 | err = bcma_bus_scan(bus); | 153 | err = bcma_bus_scan(bus); |
153 | if (err) { | 154 | if (err) { |
154 | pr_err("Failed to scan: %d\n", err); | 155 | bcma_err(bus, "Failed to scan: %d\n", err); |
155 | return -1; | 156 | return -1; |
156 | } | 157 | } |
157 | 158 | ||
@@ -179,14 +180,14 @@ int __devinit bcma_bus_register(struct bcma_bus *bus) | |||
179 | /* Try to get SPROM */ | 180 | /* Try to get SPROM */ |
180 | err = bcma_sprom_get(bus); | 181 | err = bcma_sprom_get(bus); |
181 | if (err == -ENOENT) { | 182 | if (err == -ENOENT) { |
182 | pr_err("No SPROM available\n"); | 183 | bcma_err(bus, "No SPROM available\n"); |
183 | } else if (err) | 184 | } else if (err) |
184 | pr_err("Failed to get SPROM: %d\n", err); | 185 | bcma_err(bus, "Failed to get SPROM: %d\n", err); |
185 | 186 | ||
186 | /* Register found cores */ | 187 | /* Register found cores */ |
187 | bcma_register_cores(bus); | 188 | bcma_register_cores(bus); |
188 | 189 | ||
189 | pr_info("Bus registered\n"); | 190 | bcma_info(bus, "Bus registered\n"); |
190 | 191 | ||
191 | return 0; | 192 | return 0; |
192 | } | 193 | } |
@@ -214,7 +215,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus, | |||
214 | /* Scan for chip common core */ | 215 | /* Scan for chip common core */ |
215 | err = bcma_bus_scan_early(bus, &match, core_cc); | 216 | err = bcma_bus_scan_early(bus, &match, core_cc); |
216 | if (err) { | 217 | if (err) { |
217 | pr_err("Failed to scan for common core: %d\n", err); | 218 | bcma_err(bus, "Failed to scan for common core: %d\n", err); |
218 | return -1; | 219 | return -1; |
219 | } | 220 | } |
220 | 221 | ||
@@ -226,7 +227,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus, | |||
226 | /* Scan for mips core */ | 227 | /* Scan for mips core */ |
227 | err = bcma_bus_scan_early(bus, &match, core_mips); | 228 | err = bcma_bus_scan_early(bus, &match, core_mips); |
228 | if (err) { | 229 | if (err) { |
229 | pr_err("Failed to scan for mips core: %d\n", err); | 230 | bcma_err(bus, "Failed to scan for mips core: %d\n", err); |
230 | return -1; | 231 | return -1; |
231 | } | 232 | } |
232 | 233 | ||
@@ -244,7 +245,7 @@ int __init bcma_bus_early_register(struct bcma_bus *bus, | |||
244 | bcma_core_mips_init(&bus->drv_mips); | 245 | bcma_core_mips_init(&bus->drv_mips); |
245 | } | 246 | } |
246 | 247 | ||
247 | pr_info("Early bus registered\n"); | 248 | bcma_info(bus, "Early bus registered\n"); |
248 | 249 | ||
249 | return 0; | 250 | return 0; |
250 | } | 251 | } |
diff --git a/drivers/bcma/scan.c b/drivers/bcma/scan.c index a3420585d942..a0272bbfc4f6 100644 --- a/drivers/bcma/scan.c +++ b/drivers/bcma/scan.c | |||
@@ -340,7 +340,7 @@ static int bcma_get_next_core(struct bcma_bus *bus, u32 __iomem **eromptr, | |||
340 | if (tmp <= 0) { | 340 | if (tmp <= 0) { |
341 | return -EILSEQ; | 341 | return -EILSEQ; |
342 | } else { | 342 | } else { |
343 | pr_info("Bridge found\n"); | 343 | bcma_info(bus, "Bridge found\n"); |
344 | return -ENXIO; | 344 | return -ENXIO; |
345 | } | 345 | } |
346 | } | 346 | } |
@@ -427,8 +427,8 @@ void bcma_init_bus(struct bcma_bus *bus) | |||
427 | chipinfo->id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT; | 427 | chipinfo->id = (tmp & BCMA_CC_ID_ID) >> BCMA_CC_ID_ID_SHIFT; |
428 | chipinfo->rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT; | 428 | chipinfo->rev = (tmp & BCMA_CC_ID_REV) >> BCMA_CC_ID_REV_SHIFT; |
429 | chipinfo->pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT; | 429 | chipinfo->pkg = (tmp & BCMA_CC_ID_PKG) >> BCMA_CC_ID_PKG_SHIFT; |
430 | pr_info("Found chip with id 0x%04X, rev 0x%02X and package 0x%02X\n", | 430 | bcma_info(bus, "Found chip with id 0x%04X, rev 0x%02X and package 0x%02X\n", |
431 | chipinfo->id, chipinfo->rev, chipinfo->pkg); | 431 | chipinfo->id, chipinfo->rev, chipinfo->pkg); |
432 | 432 | ||
433 | bus->init_done = true; | 433 | bus->init_done = true; |
434 | } | 434 | } |
@@ -482,11 +482,10 @@ int bcma_bus_scan(struct bcma_bus *bus) | |||
482 | other_core = bcma_find_core_reverse(bus, core->id.id); | 482 | other_core = bcma_find_core_reverse(bus, core->id.id); |
483 | core->core_unit = (other_core == NULL) ? 0 : other_core->core_unit + 1; | 483 | core->core_unit = (other_core == NULL) ? 0 : other_core->core_unit + 1; |
484 | 484 | ||
485 | pr_info("Core %d found: %s " | 485 | bcma_info(bus, "Core %d found: %s (manuf 0x%03X, id 0x%03X, rev 0x%02X, class 0x%X)\n", |
486 | "(manuf 0x%03X, id 0x%03X, rev 0x%02X, class 0x%X)\n", | 486 | core->core_index, bcma_device_name(&core->id), |
487 | core->core_index, bcma_device_name(&core->id), | 487 | core->id.manuf, core->id.id, core->id.rev, |
488 | core->id.manuf, core->id.id, core->id.rev, | 488 | core->id.class); |
489 | core->id.class); | ||
490 | 489 | ||
491 | list_add(&core->list, &bus->cores); | 490 | list_add(&core->list, &bus->cores); |
492 | } | 491 | } |
@@ -538,11 +537,10 @@ int __init bcma_bus_scan_early(struct bcma_bus *bus, | |||
538 | 537 | ||
539 | core->core_index = core_num++; | 538 | core->core_index = core_num++; |
540 | bus->nr_cores++; | 539 | bus->nr_cores++; |
541 | pr_info("Core %d found: %s " | 540 | bcma_info(bus, "Core %d found: %s (manuf 0x%03X, id 0x%03X, rev 0x%02X, class 0x%X)\n", |
542 | "(manuf 0x%03X, id 0x%03X, rev 0x%02X, class 0x%X)\n", | 541 | core->core_index, bcma_device_name(&core->id), |
543 | core->core_index, bcma_device_name(&core->id), | 542 | core->id.manuf, core->id.id, core->id.rev, |
544 | core->id.manuf, core->id.id, core->id.rev, | 543 | core->id.class); |
545 | core->id.class); | ||
546 | 544 | ||
547 | list_add(&core->list, &bus->cores); | 545 | list_add(&core->list, &bus->cores); |
548 | err = 0; | 546 | err = 0; |
diff --git a/drivers/bcma/sprom.c b/drivers/bcma/sprom.c index e1eb598ec702..26823d97fd9f 100644 --- a/drivers/bcma/sprom.c +++ b/drivers/bcma/sprom.c | |||
@@ -60,11 +60,11 @@ static int bcma_fill_sprom_with_fallback(struct bcma_bus *bus, | |||
60 | if (err) | 60 | if (err) |
61 | goto fail; | 61 | goto fail; |
62 | 62 | ||
63 | pr_debug("Using SPROM revision %d provided by" | 63 | bcma_debug(bus, "Using SPROM revision %d provided by platform.\n", |
64 | " platform.\n", bus->sprom.revision); | 64 | bus->sprom.revision); |
65 | return 0; | 65 | return 0; |
66 | fail: | 66 | fail: |
67 | pr_warn("Using fallback SPROM failed (err %d)\n", err); | 67 | bcma_warn(bus, "Using fallback SPROM failed (err %d)\n", err); |
68 | return err; | 68 | return err; |
69 | } | 69 | } |
70 | 70 | ||
@@ -583,7 +583,7 @@ int bcma_sprom_get(struct bcma_bus *bus) | |||
583 | bus->chipinfo.id == BCMA_CHIP_ID_BCM43431) | 583 | bus->chipinfo.id == BCMA_CHIP_ID_BCM43431) |
584 | bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false); | 584 | bcma_chipco_bcm4331_ext_pa_lines_ctl(&bus->drv_cc, false); |
585 | 585 | ||
586 | pr_debug("SPROM offset 0x%x\n", offset); | 586 | bcma_debug(bus, "SPROM offset 0x%x\n", offset); |
587 | bcma_sprom_read(bus, offset, sprom); | 587 | bcma_sprom_read(bus, offset, sprom); |
588 | 588 | ||
589 | if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 || | 589 | if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4331 || |