* mpc8270 : i2c support
@ 2006-05-11 5:12 Heiko Schocher
0 siblings, 0 replies; 4+ messages in thread
From: Heiko Schocher @ 2006-05-11 5:12 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
on Thu May 4 06:11:17 2006 i wrote:
> 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 don t know, if this was necessary to solve the problem, but i think
the follwing patch is useful, but I have no Hardware to try it out.
Any comments?
Best regards
Heiko
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h
index 6197986..738259c 100644
--- a/include/asm-ppc/cpm2.h
+++ b/include/asm-ppc/cpm2.h
@@ -181,7 +181,11 @@ #define PROFF_IDMA4_BASE ((uint)0x8afe)
*/
#define PROFF_SMC1 (0)
#define PROFF_SMC2 (64)
+#if defined(CONFIG_8272) || defined(CONFIG_MPC8555)
+#define PROFF_I2C ((8 * 1024) - 64)
+#else
#define PROFF_I2C ((16 * 1024) - 64)
+#endif
/* Define enough so I can at least use the serial port as a UART.
*/
^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <20060503205654.39188.qmail@web26605.mail.ukl.yahoo.com>]
* Re: mpc8270 : i2c support
@ 2006-05-03 20:11 Heiko Schocher
0 siblings, 0 replies; 4+ messages in thread
From: Heiko Schocher @ 2006-05-03 20:11 UTC (permalink / raw)
To: linuxppc-embedded
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
^ permalink raw reply [flat|nested] 4+ messages in thread* mpc8270 : i2c support
@ 2006-05-03 12:33 jfaslist
0 siblings, 0 replies; 4+ messages in thread
From: jfaslist @ 2006-05-03 12:33 UTC (permalink / raw)
To: linuxppc-embedded
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii; format=flowed, Size: 1153 bytes --]
Hi,
We have designed a system using a mpc8270 cpu. The firmware we
use is u-boot and we can access all our i2c devices from u-boot.
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?
Why is this driver registering as a platform driver and not as a
i2c bus driver?
In DENX ELDK there is also a i2c-mpc8260.c, but we couldn't get
that to work either.
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?
Thx for any help,
-jf simon
___________________________________________________________________________
Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services préférés : vérifiez vos nouveaux mails, lancez vos recherches et suivez l'actualité en temps réel.
Rendez-vous sur http://fr.yahoo.com/set
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-11 5:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- strict thread matches above, loose matches on Subject: below --
2006-05-03 20:11 Heiko Schocher
2006-05-03 12:33 jfaslist
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).