LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: [UNTESTED PATCH v2] 8xx: Convert mpc866ads to the new device binding.
From: Vitaly Bordug @ 2007-10-09  7:53 UTC (permalink / raw)
  To: Scott Wood; +Cc: linuxppc-dev
In-Reply-To: <20071008224847.GA4053@loki.buserror.net>

Hello Scott,

On Mon, 8 Oct 2007 17:48:47 -0500
Scott Wood wrote:

> Signed-off-by: Scott Wood <scottwood@freescale.com>

ok, will give it a try shortly. 
patch looks good after a quick glance.

-- 
Sincerely, Vitaly

^ permalink raw reply

* Re: [PATCH 4/5] ibmebus: Move to of_device and of_platform_driver, match eHCA and eHEA drivers
From: Jan-Bernd Themann @ 2007-10-09  8:21 UTC (permalink / raw)
  To: paulus, jeff
  Cc: Thomas Q Klein, Arnd Bergmann, Paul Mackerras, Roland Dreier,
	Joachim Fenkes, LKML, LinuxPPC-Dev, Christoph Raisch,
	Stefan Roscher
In-Reply-To: <adave9odqfb.fsf@cisco.com>

[-- Attachment #1: Type: text/plain, Size: 853 bytes --]

Roland Dreier <rdreier@cisco.com> wrote on 03.10.2007 20:05:44:

>  > > Replace struct ibmebus_dev and struct ibmebus_driver with 
> struct of_device
>  > > and struct of_platform_driver, respectively. Match the external 
ibmebus
>  > > interface and drivers using it.
>  > > 
>  > > Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
>  > 
>  > If not, then you need to get an Acked-by and an agreement that this
>  > change can go via the powerpc.git tree from Roland Dreier and Jeff
>  > Garzik.
> 
> I don't see anything objectionable in the infiniband parts of the
> patch -- I don't have any way to test the changes but it all looks
> like a straightforward conversion to a new platform API.  So:
> 
> Acked-by: Roland Dreier <rolandd@cisco.com>
> 
>  - R.

Looks good from eHEA driver perspective.

Acked-by: Jan-Bernd Themann <themann@de.ibm.com>

[-- Attachment #2: Type: text/html, Size: 1211 bytes --]

^ permalink raw reply

* Re: [PATCH 00/15] [POWERPC] TQM5200, CM5200 and Motion-PRO support
From: Marian Balakowicz @ 2007-10-09  9:08 UTC (permalink / raw)
  To: linuxppc-dev
In-Reply-To: <47075FA7.3030108@semihalf.com>


All,

Thanks for the review, will process all the comments and resend
updated patches soon.

Marian

^ permalink raw reply

* Re: [patch 6/6] PS3: Add os-area database routines
From: Geert Uytterhoeven @ 2007-10-09  9:35 UTC (permalink / raw)
  To: Ranulf Doswell; +Cc: linuxppc-dev
In-Reply-To: <18a15270710081559m3236126r85f797718300756f@mail.gmail.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1442 bytes --]

On Mon, 8 Oct 2007, Ranulf Doswell wrote:
> On 08/10/2007, Geoff Levand <geoffrey.levand@am.sony.com> wrote:
> > > How do we go about claiming one of these OS_AREA_DB_OWNER_ keys? I'd
> > > very much like to use this functionality in my python-ps3 games library.
> >
> > It sounds like you should be storing your info in the file system like
> > all other applications do.
> 
> 
> I'd agree that for large amounts of application specific data, the
> filesystem is the correct approach.
> 
> However, in this case the only data required is a single identifier used to
> identify one PS3 from another, and in fact this single 64-bit token can be
> shared amongst many other applications that require the same function -
> certainly I intend to expose it in a common way in my games library's API
> for all users of the library.

MAC address?

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

^ permalink raw reply

* reboot of mpc8270 sometimes fails
From: Theo Gjaltema @ 2007-10-09 10:23 UTC (permalink / raw)
  To: linux-ppc-embedded

hi,

I have an MPC8270 based board with linux 2.4.25 kernel (denx) and 
ramdisk (subset of ELDK3.1.1).
The system works fine, but sometimes after performing a reboot the 
system hangs after terminating the kernel and uboot doesn't come up.
Does someone have a clue about this?

Thanks,
   Theo.

^ permalink raw reply

* Re: [PATCH 2/3] [POWERPC] Add AMCC Kilauea eval board support to platforms/40x
From: Stefan Roese @ 2007-10-09 11:34 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Olof Johansson
In-Reply-To: <20071008193404.GA10348@lixom.net>

Hi Olof,

On Monday 08 October 2007, Olof Johansson wrote:
> > +config KILAUEA
> > +	bool "Kilauea"
> > +	depends on 40x
> > +	default y
> > +	select 405EX
> > +	help
> > +	  This option enables support for the AMCC PPC405EX evaluation board.
> > +
> >  #config REDWOOD_5
> >  #	bool "Redwood-5"
> >  #	depends on 40x
> > @@ -89,14 +97,17 @@ config 403GCX
> >  	#depends on OAK
> >  	select IBM405_ERR51
> >
> > +config 405EP
> > +	bool
> > +
> > +config 405EX
> > +	bool
> > +
>
> Do you really need config options for 405EP/EX? I don't seem them used
> anywhere else in the code (and it's also contradictory to the whole new
> multiplatform way of looking at stuff :).
>
> I know the 405/440 is still somewhat #ifdef:ed on the cpu here and there,
> but since this doesn't add any such code I don't see a need for the config
> options?

Yes, I'm still used to needing these defines from arch/ppc (for example for 
the 4xx EMAC driver). But its possible, that we really don't need it at all 
in arch/powerpc with all the device tree information. Not sure though.

Josh, what do you think? Should I remove the 405EX define completely?

Best regards,
Stefan

^ permalink raw reply

* Re: [patch v2] PS3: Add os-area database routines
From: Geert Uytterhoeven @ 2007-10-09 11:38 UTC (permalink / raw)
  To: Geoff Levand; +Cc: linuxppc-dev, paulus
In-Reply-To: <470AD44C.5080305@am.sony.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2048 bytes --]

On Mon, 8 Oct 2007, Geoff Levand wrote:
>   o Add a KERN_WARNING message when flash driver is not available.

> --- a/arch/powerpc/platforms/ps3/os-area.c
> +++ b/arch/powerpc/platforms/ps3/os-area.c

> +static void update_flash_db(void)
> +{
> +	int result;
> +	int file;
> +	off_t offset;
> +	ssize_t count;
> +	static const unsigned int buf_len = 8 * OS_AREA_SEGMENT_SIZE;
> +	const struct os_area_header *header;
> +	struct os_area_db* db;
> +
> +	/* Read in header and db from flash. */
> +
> +	file = sys_open("/dev/ps3flash", O_RDWR, 0);
> +
> +	if (file < 0) {
> +		pr_debug("%s:%d sys_open failed\n", __func__, __LINE__);
                ^^^^^^^^
pr_warn?

If the ps3flash module is not loaded, you want to see the warning.

> @@ -264,6 +664,12 @@ static void os_area_queue_work_handler(s
>  		pr_debug("%s:%d of_find_node_by_path failed\n",
>  			__func__, __LINE__);
>  
> +#if defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
> +	update_flash_db();
> +#else
> +	printk(KERN_WARNING "%s:%d: No flash rom driver configured.\n",
> +		__func__, __LINE__);
> +#endif
>  	pr_debug(" <- %s:%d\n", __func__, __LINE__);
>  }

Alternatively:

    #if defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
    static int update_flash_db(void)
    {
	...
	return error;
    }
    #else
    static inline int update_flash_db(void)
    {
	return -Exxx;
    }
    #endif

	if (update_flash_db())
	    printk(KERN_WARNING ...);


With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

^ permalink raw reply

* Re: [patch 6/6] PS3: Add os-area database routines
From: Ranulf Doswell @ 2007-10-09 12:23 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: linuxppc-dev
In-Reply-To: <Pine.LNX.4.62.0710091135240.6961@pademelon.sonytel.be>

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

On 09/10/2007, Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:
>
> On Mon, 8 Oct 2007, Ranulf Doswell wrote:
> > However, in this case the only data required is a single identifier used
> to
> > identify one PS3 from another, and in fact this single 64-bit token can
> be
> > shared amongst many other applications that require the same function -
> > certainly I intend to expose it in a common way in my games library's
> API
> > for all users of the library.
>
> MAC address?
>

Indeed, that's perfect! That solution also just occurred to me whilst
walking back from lunch and when I come back to check my e-mail you've
already suggested it! Funny how I've been ignoring the most obvious answer
for weeks!

Cheers,
    Ralf.

[-- Attachment #2: Type: text/html, Size: 1078 bytes --]

^ permalink raw reply

* crash on shutdown on rs/6000 powerpc
From: Paul Mackerras @ 2007-10-09 13:00 UTC (permalink / raw)
  To: torvalds, lkml, linuxppc-dev

I have just seen a crash at shutdown with 2.6.23-rc9 on an RS/6000
powerpc box (POWER3, 64-bit).  It crashed immediately after printing
"Disabling non-boot CPUs", so I tried reverting 4047727e and that
fixed it.  It's unfortunate that that commit added the
disable_nonboot_cpus for all architectures, when only x86[-64] needs
it.  (At least it sounds like only x86[-64] needs it; the commit
message seems quite x86-centric.)

In case anyone on the linuxppc-dev list wants to chase this further,
the crash looks like this:

Disabling non-boot CPUs ...
cpu 0x1: Vector: 300 (Data Access) at [c00000003f923950]
    pc: c00000000003bf98: .xics_set_cpu_priority+0x58/0x78
    lr: c00000000003bff4: .xics_migrate_irqs_away+0x3c/0x20c
    sp: c00000003f923bd0
   msr: a000000000001032
   dar: 4
 dsisr: 42000000
  current = 0xc0000000bfb6b060
  paca    = 0xc00000000071c600
    pid   = 2610, comm = kstopmachine
enter ? for help
[c00000003f923c40] c00000000003bff4 .xics_migrate_irqs_away+0x3c/0x20c
[c00000003f923d00] c000000000040d54 .pseries_cpu_disable+0x98/0xb4
[c00000003f923d80] c000000000028e4c .__cpu_disable+0x44/0x58
[c00000003f923df0] c00000000007e204 .take_cpu_down+0x34/0x60
[c00000003f923e70] c00000000008ba3c .do_stop+0x144/0x1e4
[c00000003f923f00] c00000000006fd74 .kthread+0x78/0xc4
[c00000003f923f90] c0000000000272a8 .kernel_thread+0x4c/0x68

I don't have time tonight or tomorrow to track this down further.  I'm
taking the kids to the coast tommorow. :)

Paul.

^ permalink raw reply

* Re: Build failure on treeboot-walnut.c
From: Kumar Gala @ 2007-10-09 13:30 UTC (permalink / raw)
  To: Grant Likely; +Cc: PowerPC dev list, Paul Mackerras, Timur Tabi
In-Reply-To: <fa686aa40710082100h29c1d2a8hf939ca3306562fac@mail.gmail.com>


On Oct 8, 2007, at 11:00 PM, Grant Likely wrote:

> On 10/8/07, Timur Tabi <timur@freescale.com> wrote:
>> Looks like the problem is back:
>>
>>    BOOTCC  arch/powerpc/boot/treeboot-walnut.o
>> Assembler messages:
>> Error: Internal assembler error for instruction icbt
>> Internal error, aborting at
>> /tmp/crosstool/crosstool-0.42/build/powerpc-unknown-linux-gnu/ 
>> gcc-4.0.2_e300-enabled-glibc-2.3.6/binutils-2.16.1-complete/gas/ 
>> config/tc-ppc.c
>> line 1314 in ppc_setup_opcodes
>> Please report this bug.
>> make[1]: *** [arch/powerpc/boot/treeboot-walnut.o] Error 2
>> make: *** [uImage] Error 2
>
> No; this is something different.  The assember itself is failing
> internally.  What version of binutils are you running?
>

2.61.1 if we believe his path :)

the assembler is failing because 'icbt' has several possible  
different instruction encodings and I'm guessing he's getting a  
conflict set.

What's the actual compile line?  Want to see the flags to assembler  
of -Wa to the compiler.

- k

^ permalink raw reply

* Re: [PATCH 3/6] Platforms shouldn't mess with ROOT_DEV
From: Kumar Gala @ 2007-10-09 13:53 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, paulus, arnd
In-Reply-To: <20071008222503.25840.37660.stgit@trillian.cg.shawcable.net>


On Oct 8, 2007, at 5:25 PM, Grant Likely wrote:

> From: Grant Likely <grant.likely@secretlab.ca>
>
> There is no good reason for board platform code to mess with the  
> ROOT_DEV.
> Remove it from all in-tree platforms except powermac
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
>  arch/powerpc/platforms/52xx/efika.c          |    9 ---------
>  arch/powerpc/platforms/52xx/lite5200.c       |   12 ------------
>  arch/powerpc/platforms/8xx/mpc86xads_setup.c |    2 --
>  arch/powerpc/platforms/cell/setup.c          |    5 -----
>  arch/powerpc/platforms/celleb/setup.c        |    5 -----
>  arch/powerpc/platforms/chrp/setup.c          |   10 ----------
>  arch/powerpc/platforms/pseries/setup.c       |    5 -----
>  7 files changed, 0 insertions(+), 48 deletions(-)

I'd drop mpc86xads_setup since I think Scott's rework will deal with it.

- k

^ permalink raw reply

* Re: [PATCH 3/6] Platforms shouldn't mess with ROOT_DEV
From: Grant Likely @ 2007-10-09 14:20 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev, paulus, arnd
In-Reply-To: <E82FBA5B-61A0-4A0A-886B-0FCDD6AFC255@kernel.crashing.org>

On 10/9/07, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Oct 8, 2007, at 5:25 PM, Grant Likely wrote:
>
> > From: Grant Likely <grant.likely@secretlab.ca>
> >
> > There is no good reason for board platform code to mess with the
> > ROOT_DEV.
> > Remove it from all in-tree platforms except powermac
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> > ---
> >
> >  arch/powerpc/platforms/52xx/efika.c          |    9 ---------
> >  arch/powerpc/platforms/52xx/lite5200.c       |   12 ------------
> >  arch/powerpc/platforms/8xx/mpc86xads_setup.c |    2 --
> >  arch/powerpc/platforms/cell/setup.c          |    5 -----
> >  arch/powerpc/platforms/celleb/setup.c        |    5 -----
> >  arch/powerpc/platforms/chrp/setup.c          |   10 ----------
> >  arch/powerpc/platforms/pseries/setup.c       |    5 -----
> >  7 files changed, 0 insertions(+), 48 deletions(-)
>
> I'd drop mpc86xads_setup since I think Scott's rework will deal with it.

Okay, will do.  I wasn't sure since you hadn't explicitly mentioned it.

Cheers,
g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: [PATCH 00/15] [POWERPC] TQM5200, CM5200 and Motion-PRO support
From: Grant Likely @ 2007-10-09 14:38 UTC (permalink / raw)
  To: Marian Balakowicz; +Cc: linuxppc-dev
In-Reply-To: <470B450E.4020708@semihalf.com>

On 10/9/07, Marian Balakowicz <m8@semihalf.com> wrote:
>
> All,
>
> Thanks for the review, will process all the comments and resend
> updated patches soon.

Make sure you take a look at the 6 patches I posted yesterday.  They
will probably go in before your changes and will cause conflicts.

Kumar, once I respin the ROOT_DEV patch, how does it look for merging
my patch set?

Cheers,
g.

>
> Marian
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply

* Re: Build failure on treeboot-walnut.c
From: Timur Tabi @ 2007-10-09 14:44 UTC (permalink / raw)
  To: Kumar Gala; +Cc: PowerPC dev list, Paul Mackerras
In-Reply-To: <E83F8EDA-95EF-4116-A214-D008BA70135D@kernel.crashing.org>

Kumar Gala wrote:

> What's the actual compile line?  Want to see the flags to assembler of 
> -Wa to the compiler.

How do I modify the makefiles to spit out that command line?

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply

* Re: Build failure on treeboot-walnut.c
From: Geert Uytterhoeven @ 2007-10-09 14:51 UTC (permalink / raw)
  To: Timur Tabi; +Cc: PowerPC dev list, Paul Mackerras
In-Reply-To: <470B93CC.6090400@freescale.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 840 bytes --]

On Tue, 9 Oct 2007, Timur Tabi wrote:
> Kumar Gala wrote:
> 
> > What's the actual compile line?  Want to see the flags to assembler of 
> > -Wa to the compiler.
> 
> How do I modify the makefiles to spit out that command line?

make V=1

With kind regards,
 
Geert Uytterhoeven
Software Architect

Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
 
Phone:    +32 (0)2 700 8453	
Fax:      +32 (0)2 700 8622	
E-mail:   Geert.Uytterhoeven@sonycom.com	
Internet: http://www.sony-europe.com/
 	
Sony Network and Software Technology Center Europe	
A division of Sony Service Centre (Europe) N.V.	
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium	
VAT BE 0413.825.160 · RPR Brussels	
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619

^ permalink raw reply

* Re: Build failure on treeboot-walnut.c
From: Kumar Gala @ 2007-10-09 14:51 UTC (permalink / raw)
  To: Timur Tabi; +Cc: PowerPC dev list, Paul Mackerras
In-Reply-To: <470B93CC.6090400@freescale.com>


On Oct 9, 2007, at 9:44 AM, Timur Tabi wrote:

> Kumar Gala wrote:
>
>> What's the actual compile line?  Want to see the flags to  
>> assembler of -Wa to the compiler.
>
> How do I modify the makefiles to spit out that command line?

try

$ make V=1

- k

^ permalink raw reply

* Re: Build failure on treeboot-walnut.c
From: Timur Tabi @ 2007-10-09 14:54 UTC (permalink / raw)
  To: Kumar Gala; +Cc: PowerPC dev list, Paul Mackerras
In-Reply-To: <E5596C2A-8304-4158-B580-CFF9F86F814E@kernel.crashing.org>

Kumar Gala wrote:

> $ make V=1

make ARCH=ppc64 -f scripts/Makefile.build obj=arch/powerpc/boot 
arch/powerpc/boot/uImage powerpc-unknown-linux-gnu-gcc -m32 
-Wp,-MD,arch/powerpc/boot/.treeboot-walnut.o.d -Wall -Wundef 
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -Os -msoft-float -pipe 
-fomit-frame-pointer -fno-builtin -fPIC -nostdinc -isystem 
/_TOOLS_/.dist0/gnu-gcc-4.0.2-binutils-2.16.1-glibc-2.3.6-e300c2-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/4.0.2/include 
-Iarch/powerpc/boot -I/temp/kumar.484/arch/powerpc/boot -mcpu=405 -c -o 
arch/powerpc/boot/treeboot-walnut.o arch/powerpc/boot/treeboot-walnut.c
Assembler messages:
Error: Internal assembler error for instruction icbt
Internal error, aborting at 
/tmp/crosstool/crosstool-0.42/build/powerpc-unknown-linux-gnu/gcc-4.0.2_e300-enabled-glibc-2.3.6/binutils-2.16.1-complete/gas/config/tc-ppc.c 
line 1314 in ppc_setup_opcodes
Please report this bug.
make[1]: *** [arch/powerpc/boot/treeboot-walnut.o] Error 2
make: *** [uImage] Error 2

ARCH=ppc64?  WTF?  I specifically said ARCH=powerpc on the make command line.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply

* [PATCH] qe: add function qe_clock_source
From: Timur Tabi @ 2007-10-09 15:53 UTC (permalink / raw)
  To: linuxppc-dev, galak; +Cc: Timur Tabi

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@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(-)

diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 3d57d38..da68534 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -199,6 +199,71 @@ void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
 	out_be32(&qe_immr->brg.brgc[brg - 1], tempval);
 }
 
+/* Convert a string to a QE clock source enum
+ *
+ * This function takes a string, typically from a property in the device
+ * tree, and returns the corresponding "enum qe_clock" value.
+*/
+enum qe_clock qe_clock_source(const char *source)
+{
+	/* This structure is designed so that it's 8 bytes in size */
+	static struct {
+		const char name[6];
+		u16 num;
+	} __attribute__((packed)) sources[QE_CLK_DUMMY] =
+	{
+		{"none", QE_CLK_NONE},
+		{"brg1", QE_BRG1},
+		{"brg2", QE_BRG2},
+		{"brg3", QE_BRG3},
+		{"brg4", QE_BRG4},
+		{"brg5", QE_BRG5},
+		{"brg6", QE_BRG6},
+		{"brg7", QE_BRG7},
+		{"brg8", QE_BRG8},
+		{"brg9", QE_BRG9},
+		{"brg10", QE_BRG10},
+		{"brg11", QE_BRG11},
+		{"brg12", QE_BRG12},
+		{"brg13", QE_BRG13},
+		{"brg14", QE_BRG14},
+		{"brg15", QE_BRG15},
+		{"brg16", QE_BRG16},
+		{"clk1", QE_CLK1},
+		{"clk2", QE_CLK2},
+		{"clk3", QE_CLK3},
+		{"clk4", QE_CLK4},
+		{"clk5", QE_CLK5},
+		{"clk6", QE_CLK6},
+		{"clk7", QE_CLK7},
+		{"clk8", QE_CLK8},
+		{"clk9", QE_CLK9},
+		{"clk10", QE_CLK10},
+		{"clk11", QE_CLK11},
+		{"clk12", QE_CLK12},
+		{"clk13", QE_CLK13},
+		{"clk14", QE_CLK14},
+		{"clk15", QE_CLK15},
+		{"clk16", QE_CLK16},
+		{"clk17", QE_CLK17},
+		{"clk18", QE_CLK18},
+		{"clk19", QE_CLK19},
+		{"clk20", QE_CLK20},
+		{"clk21", QE_CLK21},
+		{"clk22", QE_CLK22},
+		{"clk23", QE_CLK23},
+		{"clk24", QE_CLK24}
+	};
+	unsigned int i;
+
+	for (i = 0; i < QE_CLK_DUMMY; i++)
+		if (strcasecmp(source, sources[i].name) == 0)
+			return (enum qe_clock) sources[i].num;
+
+	return QE_CLK_DUMMY;
+}
+EXPORT_SYMBOL(qe_clock_source);
+
 /* Initialize SNUMs (thread serial numbers) according to
  * QE Module Control chapter, SNUM table
  */
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h
index 0dabe46..d28bc85 100644
--- a/include/asm-powerpc/qe.h
+++ b/include/asm-powerpc/qe.h
@@ -175,6 +175,9 @@ enum qe_clock {
 	QE_CLK_DUMMY,
 };
 
+/* Convert a string to a QE clock source enum */
+enum qe_clock qe_clock_source(const char *source);
+
 /* QE CMXUCR Registers.
  * There are two UCCs represented in each of the four CMXUCR registers.
  * These values are for the UCC in the LSBs
-- 
1.5.2.4

^ permalink raw reply related

* Re: [PATCH] qe: add function qe_clock_source
From: Kumar Gala @ 2007-10-09 15:56 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <1191945199488-git-send-email-timur@freescale.com>


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@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.

- k

^ permalink raw reply

* Re: [PATCH 00/15] [POWERPC] TQM5200, CM5200 and Motion-PRO support
From: Kumar Gala @ 2007-10-09 15:57 UTC (permalink / raw)
  To: Grant Likely; +Cc: linuxppc-dev, Marian Balakowicz
In-Reply-To: <fa686aa40710090738s748c17cdn6fa29cc6aea433d9@mail.gmail.com>


On Oct 9, 2007, at 9:38 AM, Grant Likely wrote:

> On 10/9/07, Marian Balakowicz <m8@semihalf.com> wrote:
>>
>> All,
>>
>> Thanks for the review, will process all the comments and resend
>> updated patches soon.
>
> Make sure you take a look at the 6 patches I posted yesterday.  They
> will probably go in before your changes and will cause conflicts.
>
> Kumar, once I respin the ROOT_DEV patch, how does it look for merging
> my patch set?

most likely, however I think the patchset should go via paul since  
you're touching things all over arch/powerpc (52xx, 4xx, cell,  
pseries, generic code, etc)

- k

^ permalink raw reply

* Re: [PATCH] qe: add function qe_clock_source
From: Timur Tabi @ 2007-10-09 16:01 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <B8D11E08-7AC5-4B21-9C40-1068B29B058B@kernel.crashing.org>

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@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@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

^ permalink raw reply

* Re: Build failure on treeboot-walnut.cg
From: Timur Tabi @ 2007-10-09 16:06 UTC (permalink / raw)
  To: David Gibson; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <20071009030729.GI12499@localhost.localdomain>

David Gibson wrote:

> Policy.  Compiling everything means build bugs - like this one - can
> be found by everybody, not just those building for the specific
> obscure platform.

Is this a new policy?  Modules in the kernel are not built unless you want 
them.  Even in arch/powerpc/platforms, only the specific platform file I'm 
targeting is built.  So I don't really understand why you claim it's normal 
for platform-specific files to be built, regardless of the actual platform.

And frankly, I don't like this "policy".  Build bugs for 4xx should not 
interfere in my 83xx development.  I can't build any kernels now because of 
this bug!

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply

* Re: Build failure on treeboot-walnut.cg
From: Scott Wood @ 2007-10-09 16:06 UTC (permalink / raw)
  To: David Gibson; +Cc: Paul Mackerras, linuxppc-dev, Timur Tabi
In-Reply-To: <20071009030729.GI12499@localhost.localdomain>

On Tue, Oct 09, 2007 at 01:07:29PM +1000, David Gibson wrote:
> On Mon, Oct 08, 2007 at 04:33:24PM -0500, Timur Tabi wrote:
> > Question: I'm building a kernel for the 8610.  Why is treeboot-walnut.c
> > being compiled at all?
> 
> Policy.  Compiling everything means build bugs - like this one - can
> be found by everybody, not just those building for the specific
> obscure platform.

Of course, it also introduces bugs that wouldn't have been an issue if we
didn't try to build everything with the same toolchain. :-P

I'm also somewhat worried what it'll do to build time as platforms
accumulate.

-Scott

^ permalink raw reply

* Re: [PATCH] qe: add function qe_clock_source
From: Kumar Gala @ 2007-10-09 16:18 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev
In-Reply-To: <470BA5DF.5060206@freescale.com>


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@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@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

^ permalink raw reply

* Re: [PATCH] qe: add function qe_clock_source
From: Timur Tabi @ 2007-10-09 16:21 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <2E830F97-ADAE-43CA-9BD3-BEBFEFBE1D5C@kernel.crashing.org>

Kumar Gala wrote:

> is 19 the actual value you'd end up using from the HW? or is it related 
> to some random enum value?

Random enum value.  Here's the code in ucc_geth:

	prop = of_get_property(np, "rx-clock", NULL);
	ug_info->uf_info.rx_clock = *prop;


Here's the data type:

struct ucc_fast_info {
	int ucc_num;
	enum qe_clock rx_clock;
	enum qe_clock tx_clock;
	...

As you can see, it doesn't even validate the property.

My uart driver has this:

	rx-clock-source = "BRG5";
	tx-clock-source = "BRG6";


	sprop = of_get_property(np, "rx-clock-source", NULL);
	if (!sprop) {
		printk(KERN_ERR
		       "ucc-uart: missing rx-clock-source in device tree\n");
		kfree(qe_port);
		return -ENODEV;
	}

	qe_port->us_info.rx_clock = of_clock_source(sprop);
	if ((qe_port->us_info.rx_clock < QE_BRG1) ||
	    (qe_port->us_info.rx_clock > QE_BRG16)) {
		printk(KERN_ERR
		       "ucc-uart: rx-clock-source must be a BRG for UART\n");
		kfree(qe_port);
		return -ENODEV;
	}

I will be submitting patches to ucc_geth to fix this problem.


-- 
Timur Tabi
Linux Kernel Developer @ Freescale

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox