linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Knutsson <tobias.knutsson@gmail.com>
To: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: writel hangs system
Date: Tue, 10 Feb 2009 14:07:54 +0100	[thread overview]
Message-ID: <ccb913ac0902100507x69113827m757f3b8fbd0ac6f4@mail.gmail.com> (raw)

Hello,

I'm in the process of porting a PCI-driver for a dsp-board from 2.4 to
2.6. The probing of the driver goes well, IRQs are setup, resources
are claimed and remapped without any problems. Reading from I/O
regions also works well. However, when i try to read or write to a
memory region using readl/writel, the system instantly hangs. No
stacktrace or anything, it just stops.

My question is what could cause the writel operation to hang the
system? As far as I can tell, writel is a macro that expands to:

*(volatile unsigned int*)(addr) =3D val;

The addresses returned by io_remap are as follows:

[   13.200287] c64x.c: probing C64X board at pci slot 0000:00:17.0
[   13.206263] c64x.c: BAR0: (0x52000000-0x523fffff) 0x21208
[   13.211705] c64x.c: BAR1: (0x50000000-0x507fffff) 0x20200
[   13.217152] c64x.c: BAR2: (0x1000-0x100f) 0x20101
[   13.221899] c64x.c: BAR3: (0x0-0x0) 0x0
[   13.225787] c64x.c: BAR4: (0x0-0x0) 0x0
[   13.229670] c64x.c: BAR5: (0x0-0x0) 0x0
[   13.233765] BAR0 mapped to c9100000
[   13.237622] BAR1 mapped to c9580000
[   13.241286] c64x.c: board c64x0 registered
[   13.248924] c64x.c: probing C64X board at pci slot 0000:00:18.0
[   13.254888] c64x.c: BAR0: (0x52400000-0x527fffff) 0x21208
[   13.260328] c64x.c: BAR1: (0x50800000-0x50ffffff) 0x20200
[   13.265776] c64x.c: BAR2: (0x1010-0x101f) 0x20101
[   13.270528] c64x.c: BAR3: (0x0-0x0) 0x0
[   13.274415] c64x.c: BAR4: (0x0-0x0) 0x0
[   13.278302] c64x.c: BAR5: (0x0-0x0) 0x0
[   13.282389] BAR0 mapped to c9e00000
[   13.286250] BAR1 mapped to ca280000
[   13.289845] c64x.c: board c64x1 registered
[   13.297468] c64x.c: probing C64X board at pci slot 0000:00:19.0
[   13.303434] c64x.c: BAR0: (0x52800000-0x52bfffff) 0x21208
[   13.308885] c64x.c: BAR1: (0x51000000-0x517fffff) 0x20200
[   13.314328] c64x.c: BAR2: (0x1020-0x102f) 0x20101
[   13.319079] c64x.c: BAR3: (0x0-0x0) 0x0
[   13.322966] c64x.c: BAR4: (0x0-0x0) 0x0
[   13.326855] c64x.c: BAR5: (0x0-0x0) 0x0
[   13.330939] BAR0 mapped to cab00000
[   13.334797] BAR1 mapped to caf80000
[   13.338392] c64x.c: board c64x2 registered
[   13.346017] c64x.c: probing C64X board at pci slot 0000:00:1a.0
[   13.351983] c64x.c: BAR0: (0x52c00000-0x52ffffff) 0x21208
[   13.357435] c64x.c: BAR1: (0x51800000-0x51ffffff) 0x20200
[   13.362877] c64x.c: BAR2: (0x1030-0x103f) 0x20101
[   13.367627] c64x.c: BAR3: (0x0-0x0) 0x0
[   13.371521] c64x.c: BAR4: (0x0-0x0) 0x0
[   13.375409] c64x.c: BAR5: (0x0-0x0) 0x0
[   13.379489] BAR0 mapped to cb800000
[   13.383355] BAR1 mapped to cbc80000
[   13.386953] c64x.c: board c64x3 registered

The system is MPC5200b-based. lspci is not available, but the
resources are located in the following manner:

# cat /sys/bus/pci/devices/0000\:00\:17.0/resource
0x0000000052000000 0x00000000523fffff 0x0000000000021208
0x0000000050000000 0x00000000507fffff 0x0000000000020200
0x0000000000001000 0x000000000000100f 0x0000000000020101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
# cat /sys/bus/pci/devices/0000\:00\:18.0/resource
0x0000000052400000 0x00000000527fffff 0x0000000000021208
0x0000000050800000 0x0000000050ffffff 0x0000000000020200
0x0000000000001010 0x000000000000101f 0x0000000000020101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
# cat /sys/bus/pci/devices/0000\:00\:19.0/resource
0x0000000052800000 0x0000000052bfffff 0x0000000000021208
0x0000000051000000 0x00000000517fffff 0x0000000000020200
0x0000000000001020 0x000000000000102f 0x0000000000020101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
# cat /sys/bus/pci/devices/0000\:00\:1a.0/resource
0x0000000052c00000 0x0000000052ffffff 0x0000000000021208
0x0000000051800000 0x0000000051ffffff 0x0000000000020200
0x0000000000001030 0x000000000000103f 0x0000000000020101
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 0x0000000000000000


--=20

H=E4lsningar/Regards
Tobias Knutsson

             reply	other threads:[~2009-02-10 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 13:07 Tobias Knutsson [this message]
2009-02-12 21:18 ` writel hangs system Grant Likely
2009-02-13  6:30   ` Tobias Knutsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ccb913ac0902100507x69113827m757f3b8fbd0ac6f4@mail.gmail.com \
    --to=tobias.knutsson@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).