[PATCH] qe: add function qe_clock_source
Kumar Gala
galak at kernel.crashing.org
Wed Oct 10 02:18:28 EST 2007
On Oct 9, 2007, at 11:01 AM, Timur Tabi wrote:
> Kumar Gala wrote:
>> On Oct 9, 2007, at 10:53 AM, Timur Tabi wrote:
>>> Add function qe_clock_source() which takes a string containing
>>> the name of a
>>> QE clock source (as is typically found in device trees) and
>>> returns the
>>> matching enum qe_clock value.
>>>
>>> Signed-off-by: Timur Tabi <timur at freescale.com>
>>> ---
>>>
>>> This patch applies to Kumar's for-2.6.24 branch.
>>>
>>> arch/powerpc/sysdev/qe_lib/qe.c | 65 ++++++++++++++++++++++++++
>>> +++++++++++++
>>> include/asm-powerpc/qe.h | 3 ++
>>> 2 files changed, 68 insertions(+), 0 deletions(-)
>> I'm sure its asking to much of the QE HW for BRGs or CLKs to be
>> sequential.
>
> Well, this patch doesn't really address that anomaly. Its purpose
> is to help get rid of stuff like this in the device tree:
>
> ucc at 2200 {
> ...
> rx-clock = <19>;
> tx-clock = <1a>;
>
> 19 and 1a are the integer equivalents of enum qe_clock. As you can
> imagine, that's error prone.
>
> If this patch is accepted, I got another patch that changes
> qe_setbrg() to accept a qe_clock enum.
is 19 the actual value you'd end up using from the HW? or is it
related to some random enum value?
- k
More information about the Linuxppc-dev
mailing list