From: Heiko Schocher <hs@denx.de>
To: linuxppc-embedded@ozlabs.org
Subject: Re: mpc8270 : i2c support
Date: Wed, 03 May 2006 22:11:17 +0200 [thread overview]
Message-ID: <1146687078.5942.36.camel@Zeus.EmbLux> (raw)
In-Reply-To:
Hello jfaslist,
on Wed, 03 May 2006 14:33:37 jfaslist wrote:
> But when we try to access i2c devices from under linux 2.6 using
> the /dev/i2c-0 special file we get an ENODEV on opening that
> file. I think it is because we lack an adapter driver.
>
> If I look in the official kernel, it looks like the adapter
> driver for the mpc8270 i2c system is
> ./drivers/i2c/busses/i2c-mpc.c. Is this correct?
No. It is for:
MODULE_DESCRIPTION
("I2C-Bus adapter for MPC107 bridge and MPC824x/85xx/52xx processors");
> In DENX ELDK there is also a i2c-mpc8260.c, but we couldn't get
> that to work either.
OK, this was the right driver ... but it was tested on a MPC826x
Processor.
Hmmm.... I think there are differences in the memory map between
MPC826x and MPC827x ... can you try following Hack in
include/asm-ppc/cpm_8260.h?
-#define PROFF_I2C ((16 * 1024) - 64)
+#define PROFF_I2C ((8 * 1024) - 64)
[If it solves the problem, we must do this on a better way ;-)]
I think i had the same problem with a 2.4er Kernel ... Yes,
this is in my queue, but not merged in our official 2.4er Tree ...
Maybe you have to set other Portsettings in
drivers/i2c/busses/i2c-cpm2.c cpm2_iic_init() ... ?
> What should I do to be able to access i2c devices using the
> /dev/i2c-0 file? I feel I need to modify the i2c adapter driver
> to follow the driver model, but in what ways?
Bring up the driver running, and then read:
Documentation/i2c/dev-interface.
Best regards
Heiko
next reply other threads:[~2006-05-03 20:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-03 20:11 Heiko Schocher [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-05-11 5:12 mpc8270 : i2c support Heiko Schocher
[not found] <20060503205654.39188.qmail@web26605.mail.ukl.yahoo.com>
2006-05-04 4:34 ` Heiko Schocher
2006-05-03 12:33 jfaslist
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=1146687078.5942.36.camel@Zeus.EmbLux \
--to=hs@denx.de \
--cc=linuxppc-embedded@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).