linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* I2C module problem on 8260
@ 2002-02-12 22:49 Eric.Oosterhof
  2002-02-12 23:10 ` Dan Malek
  0 siblings, 1 reply; 6+ messages in thread
From: Eric.Oosterhof @ 2002-02-12 22:49 UTC (permalink / raw)
  To: linuxppc-dev


I'm having a problem with the I2C on a custom 8260 board.  I modified the
8xx device driver (I've seen it called the Dan Malek driver) and am trying
to load it as a module.  I discovered in so doing that the virtual address
space that the module is placed in does not allow the use of __pa to get a
virtual address.  I looked at the 860 driver that we are using on a
different board, and it has the same issue.  But, it is compiled into the
kernel, hence won't have that problem.  My question is two-fold.  First, is
there a smarter version of __pa that understand how to get the physical
address of a construct in a dynamically loaded module?  Second, is this a
bug in the I2C, and I just happened to be using the module form where the
bug shows up?  I have included below the output (snipped) of insmod -m to
show the symbol.  My system has only 64 MB of SDRAM, hence virtual SDRAM
addresses range from 0xc0000000 to 0xc3ffffff.  Thanks!

sh-2.04# insmod -m i2c-algo-8260.o
Sections:       Size      Address   Align
.this           00000060  c5008000  2**2
.text           00000ad8  c5008060  2**2
.rodata         000004bc  c5008b38  2**2
.kstrtab        0000010a  c5008ff4  2**2
__ksymtab       00000038  c5009100  2**2
.data           0000003c  c5009138  2**2
.sdata          00000008  c5009174  2**2
.vtop_fixup     0000001c  c500917c  2**1
.bss            00000010  c5009198  2**2
.sbss           00000004  c50091a8  2**1
.plt            00000080  c50091b0  2**4
.kmodtab        0000000c  c5009230  2**2
__archdata      00000000  c5009240  2**4

Symbols:
00000000 a i2c-algo-8260.c
...
...


Eric.Oosterhof@RadiSys.com    503-615-1283
5445 NE Dawson Creek Drive
Hillsboro, Oregon, 97124
USA


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: I2C module problem on 8260
@ 2002-02-20 19:26 Eric.Oosterhof
  0 siblings, 0 replies; 6+ messages in thread
From: Eric.Oosterhof @ 2002-02-20 19:26 UTC (permalink / raw)
  To: linuxppc-dev


On Wed, 13 Feb 2002 17:43:57 +1100, Murray Jensen <
Murray.Jensen@cmst.csiro.au> writes:
>Well, I have an i2c driver for the CPM which supports both 8xx and 8260
>(and potentially anything else that has a CPM) in the same source
(although
>I still haven't got around to testing the 8xx code). I avoid the issue
raised
>here by using kmalloc(). The code works fine as a loadable module, and it
>only allocates the dual port ram once, the first time the module is
loaded.
>Of course, it is called drivers/i2c/i2c{-algo,}cpm.c.

Yes, thanks for the responses.  That was my solution too, and it is now
working.  Next up, how to get it to respond as a slave.  My hardware has 4
8260's, and they communicate via I2C.  I want one CPU to be the I2C master
and the other 3 to be slaves.  Potentially, I could make them all masters,
but that might require SW mods to support the multi-master environment.  Is
anyone aware of either solution?

Eric.Oosterhof@RadiSys.com 503-615-1283
5445 NE Dawson Creek Drive
Hillsboro, Oregon, 97124
USA


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-02-20 19:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-12 22:49 I2C module problem on 8260 Eric.Oosterhof
2002-02-12 23:10 ` Dan Malek
2002-02-12 23:18   ` Wolfgang Denk
2002-02-13  6:43     ` Murray Jensen
2002-02-12 23:21   ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2002-02-20 19:26 Eric.Oosterhof

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).