From: Adrian Cox <adrian@humboldt.co.uk>
To: Sylvain Munaut <tnt@246tnt.com>
Cc: mcclintock@freescale.com,
Embedded Linux PPC list <linuxppc-embedded@lists.linuxppc.org>,
"Kumar K. Gala" <kumar.gala@motorola.com>
Subject: Re: [PATCH][RFC]Updated MPC I2C driver
Date: Fri, 02 Jul 2004 14:44:25 +0100 [thread overview]
Message-ID: <1088775864.933.60.camel@localhost> (raw)
In-Reply-To: <40E54074.2010801@246tNt.com>
It looks to me that supporting the 5200 will require a lot of small
changes.
On Fri, 2004-07-02 at 12:01, Sylvain Munaut wrote:
> #include <asm/ppcboot.h>
> extern bd_t __res;
> u32 ipbfreq = __res.bi_ipbfreq;
>
> But this field will only exists when :
> - CONFIG_PPC_MPC52xx symbol is defined.
> - When the MPC52xx patch is applied to the kernel
Maybe we should define two more fields in the ocp_fs_i2c_data structure:
one for base clock, and one for i2c clock. Then platform code could fill
in the clocks as necessary.
> Also, there is no DFSRR register on the 5200.
I noticed that. I don't think anybody ever used anything but the default
value on the other chips.
> >To use my driver, just set IE1 and IE2. The other flags are for a
> >different approach using DMA to load the TX and RX registers. That would
> >give a lower CPU overhead, but would also require a separate driver.
> Are you sure ? If I don't set the BNBE (Bus Not Busy Enable) bit, I just
> get timeouts.
>From the manual it looks as if setting BNBE might cause extra
interrupts, which the driver has no way to handle. Could you try
enabling the interrupts, and see if this happens?
> Yes sure, that's the easiest way. It's just that I'd like to avoid it.
> Especially when it's content is dependent on if the user has choosed to
> use irq or not.
> But It's sure is a pity that the register is shared between the two I2C
> ... Because even with a flag, the driver should be passed the address of
> this register, and what bits to use.
How about putting a function pointer for platform interrupt enabling and
disabling into the ocp_fs_i2c_data?
- Adrian Cox
Humboldt Solutions Ltd.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-07-02 13:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-01 18:19 [PATCH][RFC]Updated MPC I2C driver Adrian Cox
2004-07-01 14:59 ` Matthew McClintock
2004-07-01 21:25 ` Adrian Cox
2004-07-01 22:32 ` Sylvain Munaut
2004-07-02 9:05 ` Adrian Cox
2004-07-02 11:01 ` Sylvain Munaut
2004-07-02 13:44 ` Adrian Cox [this message]
2004-07-02 15:11 ` Sylvain Munaut
2004-07-01 18:59 ` Eugene Surovegin
2004-07-01 19:20 ` Sylvain Munaut
2004-07-01 15:48 ` Matthew McClintock
2004-07-01 21:07 ` Sylvain Munaut
2004-07-01 20:54 ` Adrian Cox
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=1088775864.933.60.camel@localhost \
--to=adrian@humboldt.co.uk \
--cc=kumar.gala@motorola.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=mcclintock@freescale.com \
--cc=tnt@246tnt.com \
/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).