Modify

Opened 11 years ago

Closed 10 years ago

#1858 closed defect (fixed)

ar7-2.6 with r7540 hangs after printing CPU revision

Reported by: Nabcore Owned by: florian
Priority: highest Milestone: Kamikaze 8.09 RC1
Component: kernel Version:
Keywords: Cc:

Description

Running on a netgear DG834G(v2). Kernel hangs shortly after start up. Some information is emitted via the serial port:

ADAM2 Revision 0.18.01
(C) Copyright 1996-2003 Texas Instruments Inc. All Rights Reserved.
(C) Copyright 2003 Telogy Networks, Inc.
Usage: setmfreq [-d] [-s sys_freq, in MHz] [cpu_freq, in MHz]
Memory optimization Complete!

DGB34 >
Press any key to abort OS load, or wait 3 seconds for OS to boot...
checksum error
Linux version 2.6.21.1 (user@host) (gcc version 4.1.2) #1 Sat Jun 9 16:21:44 BST 2007
CPU revision is: 00018448


Looking at a working kernel (r7128 with the r7119 volatile changes reversed):

Linux version 2.6.19.2 (user@host) (gcc version 4.1.2) #1 Mon May 7 21:58:55 BST 2007
CPU revision is: 00018448
Clocks: prediv: 1, postdiv: 1, mul: 2
Clocks: prediv: 1, postdiv: 1, mul: 10
Determined physical RAM map:
 memory: 01000000 @ 14000000 (usable)
On node 0 totalpages: 4096
.....etc...

Could this still be a clocks issue? Note this is not same behaviour as #1649 since with that bug, there is actually no serial output.

Attachments (0)

Change History (17)

comment:1 Changed 11 years ago by nabcore

More debugging with lots of printk()calls.

Linux version 2.6.21.1 (user@host) (gcc version 4.1.2) #8 Sun Jun 10 18:53:28 BST 2007
CPU revision is: 00018448
About to call plat_mem_setup in arch_mem_init():
plat_mem_setup() called
About to call prom_meminit()
About to call ar7_init_clocks()
case AR7_CHIP_7300 switch() selected
ar7_dsp_clock set with tnetd7300_dsp_clock()
About to call  tnetd7300_init_clocks()
tnetd7300_init_clocks() called
clocks struct tnetd7300_clocks about to be set
clocks struct tnetd7300_clocks set
ar7_bus_clock set with tnetd7300_get_clock()
ar7_cpu_clock set with tnetd7300_get_clock()
About to call tnetd7300_set_clock(USB_PLL_SOURCE_SHIFT)
Base clock in tnetd7300_set_clock() set to ar7_bus_clock
Switch in tnetd7300_set_clock() BOOT_PLL_SOURCE_XTAL
tnetd7300_set_clock() about to call calculate()
tnetd7300_set_clock() about to clock->ctrl =
tnetd7300_set_clock() about to mdelay()
tnetd7300_set_clock() about to clock->pll = 4
tnetd7300_set_clock() about to enter do loop
status is 5
status is 5
status is 5
status is 5
status is 5
status is 5
status is 5
...and on forever....

(status is being printed with printk("status is %x\n",clock->pll); )

Kernel then remains locked in this do while loop. As an aside, why is there a mention of tnetd7300_set_clock(USB_PLL_SOURCE_SHIFT) since there is no USB on this board?

With this finding, it seems like it is the same bug as #1649

comment:2 Changed 11 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to assigned

comment:3 Changed 11 years ago by nabcore

Repeated testing above with more printk details in the do/while loops

printk("status is %#x, PLL_STATUS is %#x \n", clock->pll, PLL_STATUS);

And the result is:

...blah....
tnetd7300_set_clock() about to mdelay()
tnetd7300_set_clock() about to clock->pll = 4
tnetd7300_set_clock() about to enter do loop
status is 0x5, PLL_STATUS is 0x1
status is 0x5, PLL_STATUS is 0x1
status is 0x5, PLL_STATUS is 0x1
status is 0x5, PLL_STATUS is 0x1

comment:4 Changed 11 years ago by nabcore

Commenting out ar7_init_clocks(); in setup.c enables booting of the kernel!

comment:5 Changed 11 years ago by KillaB

r7577 works on my DG834Gv2 with the above change applied.

comment:6 Changed 11 years ago by florian

  • Resolution set to fixed
  • Status changed from assigned to closed

Should be fixed with [8036]

comment:7 Changed 11 years ago by nabcore

  • Resolution fixed deleted
  • Status changed from closed to reopened
ADAM2 Revision 0.18.01
(C) Copyright 1996-2003 Texas Instruments Inc. All Rights Reserved.
(C) Copyright 2003 Telogy Networks, Inc.
Usage: setmfreq [-d] [-s sys_freq, in MHz] [cpu_freq, in MHz]
Memory optimization Complete!

DGB34 >
Press any key to abort OS load, or wait 3 seconds for OS to boot...
checksum error
Linux version 2.6.21.5 (user@host) (gcc version 4.1.2) #1 Fri Jul 20 17:01:08 BST 2007
CPU revision is: 00018448

**hangs**

The tnetd7200 related patches in r8036 may have fixed the clocks issue for the tnetd7200, but the original issue still remains on the tnetd7300. The re-enabling of ar7_init_clocks()in setup.c with r8036 has caused the problem to come to light again.

comment:8 Changed 11 years ago by nabcore

The above output was with r8076

comment:9 Changed 11 years ago by rootkit85@…

works with 2.6.22 and TNETD300

comment:10 Changed 11 years ago by florian

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:11 Changed 11 years ago by nabcore

  • Resolution fixed deleted
  • Status changed from closed to reopened

Still seeing this :(

comment:12 Changed 11 years ago by nico

Should be fixed in [8189], can you confirm with a fresh trunk update?

comment:13 Changed 11 years ago by nabcore

Hmmm still no joy :(

ADAM2 Revision 0.18.01
(C) Copyright 1996-2003 Texas Instruments Inc. All Rights Reserved.
(C) Copyright 2003 Telogy Networks, Inc.
Usage: setmfreq [-d] [-s sys_freq, in MHz] [cpu_freq, in MHz]
Memory optimization Complete!

DGB34 >
Press any key to abort OS load, or wait 3 seconds for OS to boot...
checksum error
Linux version 2.6.22.1 (user@host) (gcc version 4.1.2) #1 Fri Jul 27 16:48:24 BST 2007
CPU revision is: 00018448

(This was built using make target/linux-clean world )

comment:14 Changed 11 years ago by florian

  • Milestone changed from Kamikaze to Afterburner 7.09
  • Priority changed from high to highest

comment:15 Changed 11 years ago by nabcore

More info on the previous attempt. A printk() was inserted in the following region of clock.c:

        do {
                status = clock->pll;
                printk("status is %#x, PLL_STATUS is %#x \n", clock->pll, PLL_STATUS);
        } while (status & PLL_STATUS);
        clock->pll = ((mul - 1) << MUL_SHIFT) | (0xff << 3) | 0x0e;
        mdelay(75);

And the resulting output on boot is:

ADAM2 Revision 0.18.01
(C) Copyright 1996-2003 Texas Instruments Inc. All Rights Reserved.
(C) Copyright 2003 Telogy Networks, Inc.
Usage: setmfreq [-d] [-s sys_freq, in MHz] [cpu_freq, in MHz]
Memory optimization Complete!

DGB34 >
Press any key to abort OS load, or wait 3 seconds for OS to boot...
checksum error
Linux version 2.6.22.1 (user@host) (gcc version 4.1.2) #2 Sat Jul 28 14:37:30 BST 2007
CPU revision is: 00018448
status is 0x5, PLL_STATUS is 0x1
status is 0x5, PLL_STATUS is 0x1
status is 0x5, PLL_STATUS is 0x1
status is 0x5, PLL_STATUS is 0x1
...ad infinitum....

comment:16 Changed 11 years ago by nabcore

Interestingly, commenting out the USB_PLL_SOURCE_SHIFT related tnetd7300_set_clock() call in clock.c (r8313):

        } else {
                ar7_cpu_clock = ar7_bus_clock;
        }

        /*
        tnetd7300_set_clock(USB_PLL_SOURCE_SHIFT, &clocks->usb,
                            bootcr, 48000000);
        */

        if (ar7_dsp_clock == 250000000)
                tnetd7300_set_clock(DSP_PLL_SOURCE_SHIFT, &clocks->dsp,
                                    bootcr, ar7_dsp_clock);

enables booting:

Linux version 2.6.22.1 (user@host) (gcc version 4.1.2) #4 Thu Aug 2 03:35:34 BST 2007
CPU revision is: 00018448
Clocks: prediv: 1, postdiv: 1, mul: 10
status is 0x4, PLL_STATUS is 0x1
TI AR7 (TNETD7300), ID: 0x0005, Revision: 0x02
Determined physical RAM map:
 memory: 01000000 @ 14000000 (usable)
On node 0 totalpages: 4096
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
...etc...

comment:17 Changed 10 years ago by florian

  • Resolution set to fixed
  • Status changed from reopened to closed

Worked around with [8649], this is not a real fix, because we will need to properly set the USB clock sooner or later.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.