[PATCH] qe: add function qe_clock_source

Timur Tabi timur at freescale.com
Wed Oct 10 02:01:35 EST 2007


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.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale



More information about the Linuxppc-dev mailing list