Am 14.05.2010 00:25, schrieb Bernhard Loos:
> Hello
> Do you have any clue, what could produce b43? Because, after looking
> at the code, I'm kinda at a loss, where this comes from. And do you
> know, which patch exactly produces the problem?
> I will split the patch up, but it may take a day or two, until I have
> the time. Some of the other patches are possible also mixed up.
> Your patch unfortunetly doesn't work as a general solution, because
> the 4716 hangs, if any of the id registers is accessed.
> Thanks again, for looking at this.
> 
>      Bernhard
> 
> 2010/5/13 Hauke Mehrtens <[email protected]>:
>> Am 13.05.2010 20:54, schrieb Hauke Mehrtens:
>>> Hi Bernhard,
>>>
>>> I have changed the code to do the same things it did before your changes
>>> at that position. My patch is attached.
>>>
>>> With this patch all ssb Cores are found, but I get a oops in b43 driver
>>> now. "Reserved instruction in kernel code"
>>>
>>> I have not activated symbols will do now. Here is the log for now:
>>> http://hauke-m.de/fileadmin/openwrt/brcm47xx-log/boot-not-working2.log
>>>
>>> Could you please split 952-ai-scan.patch into two patches. One just
>>> reorganizing the existing code without changing any functionality and
>>> one adding the ai scan.
>>>
>>> Hauke
>> Hi Bernhard,
>>
>> I get the following kernel oops with your patches:
>>
>> Reserved instruction in kernel code[#1]:
>> ...
>> Call Trace:
>> [<80cc4908>] b43info+0x560/0x2754 [b43]
>> [<8018a27c>] ssb_device_probe+0x44/0x80
>> [<80167d24>] driver_probe_device+0x13c/0x28c
>> [<800e78ec>] sysfs_create_dir+0x44/0x68
>> [<8012b83c>] kobject_get+0x1c/0x30
>> [<80167e74>] __driver_attach+0x0/0xa4
>> [<80167ee0>] __driver_attach+0x6c/0xa4
>> [<8012bf2c>] kobject_add_varg+0x28/0x78
>> [<801673dc>] bus_for_each_dev+0x64/0xb4
>> [<8012bfbc>] kobject_init_and_add+0x40/0x58
>> [<80166b2c>] bus_add_driver+0xd0/0x274
>> [<80056d20>] load_module+0x1980/0x1b4c
>> [<80168290>] driver_register+0xe0/0x19c
>> [<80ce8000>] init_module+0x0/0x70 [b43]
>> [<80ce8020>] init_module+0x20/0x70 [b43]
>> [<8000d650>] do_one_initcall+0x70/0x1f4
>> [<800437f0>] blocking_notifier_call_chain+0x14/0x20
>> [<80057408>] sys_init_module+0xe0/0x224
>> [<80092924>] sys_close+0x9c/0xe4
>> [<80003230>] stack_done+0x20/0x3c
>>
>> Full log:
>> http://hauke-m.de/fileadmin/openwrt/brcm47xx-log/boot-not-working3.log
>>
>> Hauke
>>
Hi Bernhard,

I found the cause of the problem. It was not in your patch series, but
the some other openwrt parts. While building b43 from compat-wireless
CONFIG_SSB_BLOCKIO was activated, when building ssb in the kernel is was
deactivated. This causes the struct ssb_bus_ops to be different in ssb
and b43. The Pointers to device_enable and so on are wrong. When they
were called it jumped to somewhere else in the code.
This problem is fixed in r21449 https://dev.openwrt.org/changeset/21449

Now everything works for me like before with your patches when also
adding the attached patch.

In function ssb_bus_scan rev is not the same as bus->chip_rev.

Hauke
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -545,7 +545,7 @@ int ssb_bus_scan(struct ssb_bus *bus,
 {
 	int err = -ENOMEM;
 	void __iomem *mmio;
-	u32 tmp, chiptype = SSB_CHIPCO_TYPE_SB;
+	u32 tmp, idhi, rev, chiptype = SSB_CHIPCO_TYPE_SB;
 	bool have_chipcommon = true;
 
 	mmio = ssb_ioremap(bus, baseaddr);
@@ -572,6 +572,9 @@ int ssb_bus_scan(struct ssb_bus *bus,
 	
 	bus->nr_devices = 0;
 	if (have_chipcommon) {
+		idhi = scan_read32(bus, 0, SSB_IDHIGH);
+		rev = (idhi & SSB_IDHIGH_RCLO);
+		rev |= (idhi & SSB_IDHIGH_RCHI) >> SSB_IDHIGH_RCHI_SHIFT;
 		tmp = scan_read32(bus, 0, SSB_CHIPCO_CHIPID);
 
 		bus->chip_id = (tmp & SSB_CHIPCO_IDMASK);
@@ -580,7 +583,7 @@ int ssb_bus_scan(struct ssb_bus *bus,
 		bus->chip_package = (tmp & SSB_CHIPCO_PACKMASK) >>
 				    SSB_CHIPCO_PACKSHIFT;
 		chiptype = tmp & SSB_CHIPCO_TYPE_MASK;
-		if (bus->chip_rev >= 4) {
+		if (rev >= 4) {
 			bus->nr_devices = (tmp & SSB_CHIPCO_NRCORESMASK) >>
 					  SSB_CHIPCO_NRCORESSHIFT;
 		}
--- a/drivers/ssb/driver_chipcommon_pmu.c
+++ b/drivers/ssb/driver_chipcommon_pmu.c
@@ -324,7 +324,7 @@ static void ssb_pmu_pll_init(struct ssb_
 		break; 
 	case 0x4322:
 		if (cc->pmu.rev == 2)
-			ssb_chipco_pll_write(0xa, 0x380005C0);
+			ssb_chipco_pll_write(cc, 0xa, 0x380005C0);
 		break;
 	default:
 		ssb_printk(KERN_ERR PFX
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to