Re: powerpc/cell/cpufreq: add spu aware cpufreq governor

2008-07-09 Thread Dave Jones
On Wed, Jul 09, 2008 at 03:18:59PM +1000, Ben Herrenschmidt wrote:
  On Mon, 2008-07-07 at 17:02 +0200, Arnd Bergmann wrote:
   From: Christian Krafft [EMAIL PROTECTED]
   
   This patch adds a cpufreq governor that takes the number of running spus
   into account. It's very similar to the ondemand governor, but not as 
   complex.
   Instead of hacking spu load into the ondemand governor it might be easier 
   to
   have cpufreq accepting multiple governors per cpu in future.
   Don't know if this is the right way, but it would keep the governors 
   simple.
   
   Signed-off-by: Christian Krafft [EMAIL PROTECTED]
   Signed-off-by: Arnd Bergmann [EMAIL PROTECTED]
   ---
   
   Dave or other cpufreq people, can you take a look at this
   and add an Acked-by when you're happy?
   
   We have one prerequisite patch in the powerpc code (in spufs),
   so should it get merged through powerpc.git?
  
  Hrm... taking whatever test config I have at hand, applying the patch
  and doing make oldconfig  make, I get:
  
  ERROR: .cpufreq_register_governor 
  [arch/powerpc/platforms/cell/cbe_spu_governor.ko] undefined!
  ERROR: .__cpufreq_driver_target 
  [arch/powerpc/platforms/cell/cbe_spu_governor.ko] undefined!
  ERROR: .cpufreq_unregister_governor 
  [arch/powerpc/platforms/cell/cbe_spu_governor.ko] undefined!
  ERROR: .cpufreq_frequency_table_target 
  [arch/powerpc/platforms/cell/cbe-cpufreq.ko] undefined!
  ERROR: .cpufreq_register_driver 
  [arch/powerpc/platforms/cell/cbe-cpufreq.ko] undefined!
  ERROR: .cpufreq_frequency_table_verify 
  [arch/powerpc/platforms/cell/cbe-cpufreq.ko] undefined!
  ERROR: .cpufreq_frequency_table_get_attr 
  [arch/powerpc/platforms/cell/cbe-cpufreq.ko] undefined!
  ERROR: .cpufreq_notify_transition 
  [arch/powerpc/platforms/cell/cbe-cpufreq.ko] undefined!
  ERROR: .cpufreq_frequency_table_cpuinfo 
  [arch/powerpc/platforms/cell/cbe-cpufreq.ko] undefined!
  ERROR: .cpufreq_unregister_driver 
  [arch/powerpc/platforms/cell/cbe-cpufreq.ko] undefined!
  ERROR: .cpufreq_frequency_table_put_attr 
  [arch/powerpc/platforms/cell/cbe-cpufreq.ko] undefined!

Does this help ?

Dave
 
diff --git a/arch/powerpc/platforms/cell/Kconfig 
b/arch/powerpc/platforms/cell/Kconfig
index 3959fcf..19f4b4d 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -91,6 +91,7 @@ config CBE_THERM
 config CBE_CPUFREQ
tristate CBE frequency scaling
depends on CBE_RAS  CPU_FREQ
+   select CPU_FREQ_TABLE
default m
help
  This adds the cpufreq driver for Cell BE processors.
-- 
http://www.codemonkey.org.uk
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: AZFS file system proposal

2008-07-09 Thread Benjamin Herrenschmidt

 Cc:'ing some more people that might have more of a clue on this question.
 _memcpy_fromio does a sync at the start and an eieio at the end.
 IFAICT, neither are needed here because the source is always memory.
 
 It also handles unaligned memory accesses, which copy_to_user should
 also do correctly, so it *looks* like it should work with just a
 copy_to_user, but it still feels wrong to use an __iomem pointer
 as the source for a copy_to_user.
 
 Any ideas?

It's a bit nasty yes. The problem is that copy_to/from_user might
do cache tricks which will blow up if the area is non-cacheable.

We have a similar problem with Mark's work on faster copy functions
since things like sys_read() can be called on userspace non-cacheable
memory such as spu local stores.

So I'm not 100% sure what the right approach here. Our copy_tofrom_user
today does dcbt on the source for example, which I hope only turns into
a no-op... The risk is if we start using dcbz.

Cheers,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Updates to powerpc.git

2008-07-09 Thread Benjamin Herrenschmidt
I've pushed some updates to my version of powerpc.git.

The tree itself is at:

  git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git

It contains 3 branches:

  - merge  : this is for merging with the current stable and doesn't
 currently contain anything interesting

  - master : this is our current powerpc.git tree, it may contain
 various experimental stuff that may or may not go upstream
 or may contain dependent patches that we rely on but that
 are to be merged via some other tree.

  - next   : this is the candidate stuff for linux-next and the next
 merge window

(Andrew, you -may- want to pull that instead of paulus one until
he's back from vacation).

Until today, master and next pointed to the same commit, which was
the same as paulus master and powerpc-next branches. Tonight, I've
pushed some patches to master that I intend to have in next, but
I'd like to let them sit in master for a couple of days to make sure
nothing is badly broken mostly and make sure I didn't screw up in
my various patch monkeying operations.

Here are the newly applied patches:

Benjamin Herrenschmidt (1):
  powerpc: Use new printk extension %pS to print symbols on oops

Dave Kleikamp (5):
  mm: Allow architectures to define additional protection bits
  powerpc/mm: Define flags for Strong Access Ordering
  powerpc/mm: Add SAO Feature bit to the cputable
  powerpc/mm: Add Strong Access Ordering support
  powerpc/mm: Don't clear _PAGE_COHERENT when _PAGE_SAO is set

Geoff Levand (1):
  powerpc/ps3: Quiet system bus match output

Grant Erickson (1):
  ibm_newemac: Parameterize EMAC Multicast Match Handling

Jeremy Kerr (4):
  powerpc/spufs: avoid magic numbers for mapping sizes
  powerpc/spufs: allow spufs files to specify sizes
  powerpc/spufs: add sizes for context files
  powerpc/spufs: only add .ctx file with debug mount option

Luke Browning (2):
  powerpc/spufs: provide context debug file
  powerpc/spufs: don't extend time time slice if context is not in spu_run

Mark Nelson (4):
  powerpc/dma: Add struct iommu_table argument to iommu_map_sg()
  powerpc/dma: implement new dma_*map*_attrs() interfaces
  powerpc/cell: cell_dma_dev_setup_iommu() return the iommu table
  powerpc: move device_to_mask() to dma-mapping.h

Maxim Shchetynin (1):
  powerpc/spufs: add atomic busy_spus counter to struct cbe_spu_info

Michael Neuling (2):
  powerpc: fix swapcontext backwards compat. with VSX ucontext changes
  powerpc: remove unused variable in emulate_fp_pair

Mike Mason (1):
  powerpc/eeh: PERR/SERR bit settings during EEH device recovery

Paul Gortmaker (1):
  powerpc/ibmebus: more meaningful variable name

Srinivasa Ds (1):
  powerpc: Implement task_pt_regs() accessor



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 0/3] ALSA fixes for non-coherent ppc32

2008-07-09 Thread Gerhard Pircher
Hi,

 Original-Nachricht 
 Datum: Wed, 18 Jun 2008 12:38:31 +0200
 Von: Takashi Iwai [EMAIL PROTECTED]
 An: [EMAIL PROTECTED]
 CC: linuxppc-dev@ozlabs.org, [EMAIL PROTECTED]
 Betreff: [PATCH 0/3] ALSA fixes for non-coherent ppc32

 Hi,
 
 I've tried to renew the fixes of ALSA issues about non-coherent DMA
 memories.  The last patch worked for SG-buffers somehow but would
 result in a problem if many pages are allocated because of
 dma_alloc_coherent() handling.  Now, I chose a more simpler
 workaround: the SG-buffers are handled as simple continuous buffers.
 
 This time I split the patches to several parts.  The first patch
 contains a very lazy dma_mmap_coherent() implementation for ppc32.
 The next patch adds the call of dma_mmap_coherent() for the default
 mmap of ALSA PCM.  And the last one is to add the conversion of
 SG-buffer handling as above.
 
 The patches are created against the latest ALSA tree, and the last
 patch won't be applicable fully to 2.6.26-rc6.  But, it's only for
 snd-hda-intel and there is no PPC32 hardware supporting this, AFAIK.
 So just ignore the reject.
 
 The patches are found also on my git tree, dma-fix branch of
 git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
 
 Any comments and test reports are appreciated, especially about
 dma_mmap_coherent() addition.
I know this answer comes a little bit late, but my PPC machine was not
working for two weeks due to a hardware failure. I tested the patch on
2.6.26-rc9 and it seems to work fine so far with my emu10k soundcard.
I just had to add #include linux/dma-mapping.h to pcm_native.c.
Otherwise it wouldn't compile.

Thanks!

regards,

Gerhard

-- 
Pt! Schon das coole Video vom GMX MultiMessenger gesehen?
Der Eine für Alle: http://www.gmx.net/de/go/messenger03
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: AZFS file system proposal

2008-07-09 Thread Benjamin Herrenschmidt
On Tue, 2008-07-01 at 16:59 +0200, Arnd Bergmann wrote:
 I wouldn't hold up merging the file system for this problem, but
 until it is solved, the Kconfig entry should probably have
 a depends on PPC.

Better, use an ifdef for powerpc flags, and #else to pgprot_noncached.

Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: AZFS file system proposal

2008-07-09 Thread Maxim Shchetynin
Am Wed, 09 Jul 2008 18:58:38 +1000
schrieb Benjamin Herrenschmidt [EMAIL PROTECTED]:

 On Tue, 2008-07-01 at 16:59 +0200, Arnd Bergmann wrote:
  I wouldn't hold up merging the file system for this problem, but
  until it is solved, the Kconfig entry should probably have
  a depends on PPC.
 
 Better, use an ifdef for powerpc flags, and #else to pgprot_noncached.

Thank you Ben. Then, how about this?

azfs_mmap(struct file *file, struct vm_area_struct *vma)
{
...
...
...
#ifdef CONFIG_PPC
pgprot_t page_prot;
#endif
...
...
...
#ifdef CONFIG_PPC
page_prot = pgprot_val(vma-vm_page_prot);
page_prot |= (_PAGE_NO_CACHE | _PAGE_RW);
page_prot = ~_PAGE_GUARDED;
vma-vm_page_prot = __pgprot(page_prot);
#else
vma-vm_page_prot = pgprot_noncached(vma-vm_page_prot);
#endif
...
...
...

-- 
Mit freundlichen Grüßen / met vriendelijke groeten / avec regards

Maxim V. Shchetynin
Linux Kernel Entwicklung
IBM Deutschland Research  Development GmbH
Linux für Cell, Abteilung 3250
Schönaicher Straße 220
71032 Böblingen

Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Herbert Kircher
Sitz der Gesellschaft: Böblingen
Registriergericht: Amtsgericht Stuttgart, HRB 243294

Fahr nur so schnell wie dein Schutzengel fliegen kann!
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

[PATCH v3] Add MPC5200B base board mvBC-P

2008-07-09 Thread Andre Schwarz
The mvBlueCOUGAR-P is a MPC5200B based camera system with Intel Gigabit ethernet
controller (using e1000). It's just another MPC5200_simple board.

Signed-off-by: Andre Schwarz [EMAIL PROTECTED]
---

Grant,

I've fixed the dts issues from David (cell-index on gpt).

Please let me know if v3 still contains errors.


Thanks again for helping !

regards,
Andre



MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: 
Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
 arch/powerpc/boot/dts/mvbc-p.dts |  254 ++
 arch/powerpc/configs/52xx/mvbc_p_defconfig   | 1158 ++
 arch/powerpc/platforms/52xx/Kconfig  |3 +-
 arch/powerpc/platforms/52xx/mpc5200_simple.c |1 +
 4 files changed, 1415 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/dts/mvbc-p.dts b/arch/powerpc/boot/dts/mvbc-p.dts
new file mode 100644
index 000..6167c0b
--- /dev/null
+++ b/arch/powerpc/boot/dts/mvbc-p.dts
@@ -0,0 +1,254 @@
+/*
+ * mvBlueCOUGAR-P device tree source
+ *
+ * Copyright (C) 2008 Matrix Vision GmbH
+ * Andre Schwarz [EMAIL PROTECTED]
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+/dts-v1/;
+
+/ {
+   model = matrix-vision,mvbc-p;
+   compatible = matrix-vision,mvbc-p;
+   #address-cells = 1;
+   #size-cells = 1;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   PowerPC,[EMAIL PROTECTED] {
+   device_type = cpu;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x4000;
+   i-cache-size = 0x4000;
+   timebase-frequency = 0;
+   bus-frequency = 0;
+   clock-frequency = 0;
+   };
+   };
+
+   memory {
+   device_type = memory;
+   reg = 0x 0x;
+   };
+
+   [EMAIL PROTECTED] {
+   #address-cells = 1;
+   #size-cells = 1;
+   compatible = fsl,mpc5200b-immr;
+   ranges = 0 0xf000 0xc000;
+   reg = 0xf000 0x0100;
+   bus-frequency = 0;
+   system-frequency = 0;
+
+   [EMAIL PROTECTED] {
+   compatible = fsl,mpc5200b-cdm,fsl,mpc5200-cdm;
+   reg = 0x200 0x38;
+   };
+
+   mpc5200_pic: [EMAIL PROTECTED] {
+   // 5200 interrupts are encoded into two levels;
+   interrupt-controller;
+   #interrupt-cells = 3;
+   compatible = fsl,mpc5200b-pic,fsl,mpc5200-pic;
+   reg = 0x500 0x80;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x600 0x10;
+   interrupts = 1 9 0;
+   interrupt-parent = mpc5200_pic;
+   fsl,has-wdt;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x610 0x10;
+   interrupts = 1 10 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x620 0x10;
+   interrupts = 1 11 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x630 0x10;
+   interrupts = 1 12 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x640 0x10;
+   interrupts = 1 13 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+   compatible = fsl,mpc5200b-gpt,fsl,mpc5200-gpt;
+   reg = 0x650 0x10;
+   interrupts = 1 14 0;
+   interrupt-parent = mpc5200_pic;
+   };
+
+   [EMAIL PROTECTED] { // General Purpose Timer
+

[PATCH] libfdt: Improve documentation in libfdt.h

2008-07-09 Thread Wolfram Sang
Fix a few typos and mistakes.

Signed-off-by: Wolfram Sang [EMAIL PROTECTED]
---

 libfdt/libfdt.h |   28 ++--
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libfdt/libfdt.h b/libfdt/libfdt.h
index 8645de0..dafb568 100644
--- a/libfdt/libfdt.h
+++ b/libfdt/libfdt.h
@@ -213,7 +213,7 @@ int fdt_move(const void *fdt, void *buf, int bufsize);
 /**/
 
 /**
- * fdt_string - retreive a string from the strings block of a device tree
+ * fdt_string - retrieve a string from the strings block of a device tree
  * @fdt: pointer to the device tree blob
  * @stroffset: offset of the string within the strings block (native endian)
  *
@@ -227,7 +227,7 @@ int fdt_move(const void *fdt, void *buf, int bufsize);
 const char *fdt_string(const void *fdt, int stroffset);
 
 /**
- * fdt_num_mem_rsv - retreive the number of memory reserve map entries
+ * fdt_num_mem_rsv - retrieve the number of memory reserve map entries
  * @fdt: pointer to the device tree blob
  *
  * Returns the number of entries in the device tree blob's memory
@@ -240,7 +240,7 @@ const char *fdt_string(const void *fdt, int stroffset);
 int fdt_num_mem_rsv(const void *fdt);
 
 /**
- * fdt_get_mem_rsv - retreive one memory reserve map entry
+ * fdt_get_mem_rsv - retrieve one memory reserve map entry
  * @fdt: pointer to the device tree blob
  * @address, @size: pointers to 64-bit variables
  *
@@ -320,7 +320,7 @@ int fdt_subnode_offset(const void *fdt, int parentoffset, 
const char *name);
 int fdt_path_offset(const void *fdt, const char *path);
 
 /**
- * fdt_get_name - retreive the name of a given node
+ * fdt_get_name - retrieve the name of a given node
  * @fdt: pointer to the device tree blob
  * @nodeoffset: structure block offset of the starting node
  * @lenp: pointer to an integer variable (will be overwritten) or NULL
@@ -352,7 +352,7 @@ const char *fdt_get_name(const void *fdt, int nodeoffset, 
int *lenp);
  * fdt_get_property() retrieves a pointer to the fdt_property
  * structure within the device tree blob corresponding to the property
  * named 'name' of the node at offset nodeoffset.  If lenp is
- * non-NULL, the length of the property value also returned, in the
+ * non-NULL, the length of the property value is also returned, in the
  * integer pointed to by lenp.
  *
  * returns:
@@ -389,7 +389,7 @@ static inline struct fdt_property *fdt_get_property_w(void 
*fdt, int nodeoffset,
  * fdt_getprop() retrieves a pointer to the value of the property
  * named 'name' of the node at offset nodeoffset (this will be a
  * pointer to within the device blob itself, not a copy of the value).
- * If lenp is non-NULL, the length of the property value also
+ * If lenp is non-NULL, the length of the property value is also
  * returned, in the integer pointed to by lenp.
  *
  * returns:
@@ -415,7 +415,7 @@ static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
 }
 
 /**
- * fdt_get_phandle - retreive the phandle of a given node
+ * fdt_get_phandle - retrieve the phandle of a given node
  * @fdt: pointer to the device tree blob
  * @nodeoffset: structure block offset of the node
  *
@@ -423,7 +423,7 @@ static inline void *fdt_getprop_w(void *fdt, int nodeoffset,
  * structure block offset nodeoffset.
  *
  * returns:
- * the phandle of the node at nodeoffset, on succes (!= 0, != -1)
+ * the phandle of the node at nodeoffset, on success (!= 0, != -1)
  * 0, if the node has no phandle, or another error occurs
  */
 uint32_t fdt_get_phandle(const void *fdt, int nodeoffset);
@@ -522,7 +522,7 @@ int fdt_node_depth(const void *fdt, int nodeoffset);
  * structure from the start to nodeoffset, *twice*.
  *
  * returns:
- * stucture block offset of the parent of the node at nodeoffset
+ * structure block offset of the parent of the node at nodeoffset
  * (=0), on success
  * -FDT_ERR_BADOFFSET, nodeoffset does not refer to a BEGIN_NODE tag
  * -FDT_ERR_BADMAGIC,
@@ -579,7 +579,7 @@ int fdt_node_offset_by_prop_value(const void *fdt, int 
startoffset,
  * @fdt: pointer to the device tree blob
  * @phandle: phandle value
  *
- * fdt_node_offset_by_prop_value() returns the offset of the node
+ * fdt_node_offset_by_phandle() returns the offset of the node
  * which has the given phandle value.  If there is more than one node
  * in the tree with the given phandle (an invalid tree), results are
  * undefined.
@@ -806,13 +806,13 @@ int fdt_pack(void *fdt);
 /**
  * fdt_add_mem_rsv - add one memory reserve map entry
  * @fdt: pointer to the device tree blob
- * @addres, @size: 64-bit values (native endian)
+ * @address, @size: 64-bit values (native endian)
  *
  * Adds a reserve map entry to the given blob reserving a region at
  * address address of length size.
  *
  * This function will insert data into the reserve map and will
- * therfore change the indexes of some entries in the table.
+ * therefore change the 

Re: AZFS file system proposal

2008-07-09 Thread Benjamin Herrenschmidt
On Wed, 2008-07-09 at 11:14 +0200, Maxim Shchetynin wrote:
 Am Wed, 09 Jul 2008 18:58:38 +1000
 schrieb Benjamin Herrenschmidt [EMAIL PROTECTED]:
 
  On Tue, 2008-07-01 at 16:59 +0200, Arnd Bergmann wrote:
   I wouldn't hold up merging the file system for this problem, but
   until it is solved, the Kconfig entry should probably have
   a depends on PPC.
  
  Better, use an ifdef for powerpc flags, and #else to pgprot_noncached.
 
 Thank you Ben. Then, how about this?
 
 azfs_mmap(struct file *file, struct vm_area_struct *vma)
 {
 ...
 ...
 ...
 #ifdef CONFIG_PPC
   pgprot_t page_prot;
 #endif
 ...
 ...
 ...
 #ifdef CONFIG_PPC
   page_prot = pgprot_val(vma-vm_page_prot);
   page_prot |= (_PAGE_NO_CACHE | _PAGE_RW);
   page_prot = ~_PAGE_GUARDED;
   vma-vm_page_prot = __pgprot(page_prot);
 #else
   vma-vm_page_prot = pgprot_noncached(vma-vm_page_prot);
 #endif
 ...

I'd rather do

pgprot_t  prot;

#ifdef CONFIG_PPC
prot = whatever
#else
prot = pgprot_noncached(...)
#endif
vma-vm_page_prot = prot;

To limit the number of ifdef's

Cheers,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: PReP residual to device-tree converter

2008-07-09 Thread Johannes Berg

 I would like people that have PReP machines to take a copy of
 /proc/residual, run this program on it, and check that the output is
 sane.  If it isn't, or if it is missing bits, send me the residual
 blob with a description of what's wrong in the generated dts.

Here's the output from qemu:

/dts-v1/;

/ {
model = Qemu;
compatible = prep;
#address-cells = 1;
#size-cells = 1;
serial-number = ;
clock-frequency = 1;

chosen {
};

cpus {
#address-cells = 1;
#size-cells = 0;
};

[EMAIL PROTECTED] {
device_type = memory;
reg = 0x0 0x900;
};
};

Let me know if you want the blob too (it's ~10k)

johannes


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: AZFS file system proposal

2008-07-09 Thread Maxim Shchetynin
 I'd rather do
 
   pgprot_t  prot;
 
 #ifdef CONFIG_PPC
   prot = whatever
 #else
   prot = pgprot_noncached(...)
 #endif
   vma-vm_page_prot = prot;

I have changed my patch accordinly. Thank you.

-- 
Mit freundlichen Grüßen / met vriendelijke groeten / avec regards

Maxim V. Shchetynin
Linux Kernel Entwicklung
IBM Deutschland Research  Development GmbH
Linux für Cell, Abteilung 3250
Schönaicher Straße 220
71032 Böblingen

Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Herbert Kircher
Sitz der Gesellschaft: Böblingen
Registriergericht: Amtsgericht Stuttgart, HRB 243294

Fahr nur so schnell wie dein Schutzengel fliegen kann!
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: PReP residual to device-tree converter

2008-07-09 Thread Johannes Berg
On Wed, 2008-07-09 at 12:48 +0200, Johannes Berg wrote:
  I would like people that have PReP machines to take a copy of
  /proc/residual, run this program on it, and check that the output is
  sane.  If it isn't, or if it is missing bits, send me the residual
  blob with a description of what's wrong in the generated dts.
 
 Here's the output from qemu:
[...]

Milton wanted iomem and ioports, I didn't manage to get userspace
working so I printed them in the kernel (hopefully correctly):

iomem:
c000-feff : PCI host bridge
  c8f0-c8ff : :00:01.0

ioports:
-007f : PCI host bridge
  -001f : dma1
  0020-0021 : 8259 (master)
  0040-005f : timer
  0080-008f : dma page reg
  00a0-00a1 : 8259 (slave)
  00c0-00df : dma2
  04d0-04d1 : 8259 edge control


FWIW, my qemu command line was:

qemu-system-ppc -initrd initrd  -kernel linux/arch/ppc/boot/images/zImage.prep 
-M prep -cpu 604 -serial stdio

johannes


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: PReP residual to device-tree converter

2008-07-09 Thread Johannes Berg
On Wed, 2008-07-09 at 13:29 +0200, Johannes Berg wrote:
 On Wed, 2008-07-09 at 12:48 +0200, Johannes Berg wrote:
   I would like people that have PReP machines to take a copy of
   /proc/residual, run this program on it, and check that the output is
   sane.  If it isn't, or if it is missing bits, send me the residual
   blob with a description of what's wrong in the generated dts.
  
  Here's the output from qemu:
 [...]
 
 Milton wanted iomem and ioports, I didn't manage to get userspace
 working so I printed them in the kernel (hopefully correctly):
 
 iomem:
 c000-feff : PCI host bridge
   c8f0-c8ff : :00:01.0

Oh and if I attach a virtual ne2k_pci, it changes:

c000-feff : PCI host bridge
  c110-c11f : :00:02.0
  c8f0-c8ff : :00:01.0

johannes


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: PReP residual to device-tree converter

2008-07-09 Thread Johannes Berg
On Wed, 2008-07-09 at 13:29 +0200, Johannes Berg wrote:
 On Wed, 2008-07-09 at 12:48 +0200, Johannes Berg wrote:
   I would like people that have PReP machines to take a copy of
   /proc/residual, run this program on it, and check that the output is
   sane.  If it isn't, or if it is missing bits, send me the residual
   blob with a description of what's wrong in the generated dts.
  
  Here's the output from qemu:
 [...]
 
 Milton wanted iomem and ioports, I didn't manage to get userspace
 working so I printed them in the kernel (hopefully correctly):

I printed them far too early. After letting it probe drivers first, I
get:

iomem:
c000-feff : PCI host bridge
  c000-c00f : :00:03.0
  c110-c11f : :00:02.0
  c8f0-c8ff : :00:01.0

ioport:
-007f : PCI host bridge
  -001f : dma1
  0020-0021 : 8259 (master)
  0040-005f : timer
  0080-008f : dma page reg
  00a0-00a1 : 8259 (slave)
  00c0-00df : dma2
  01f0-01f7 : ide0
  03f2-03f5 : floppy
  03f6-03f6 : ide0
  03f7-03f7 : floppy DIR
  03f8-03ff : serial
  04d0-04d1 : 8259 edge control

which was with usb too:

qemu-system-ppc -initrd initrd  -kernel linux/arch/ppc/boot/images/zImage.prep 
-M prep -cpu 604 -serial stdio -net nic,model=ne2k_pci -usb

johannes


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: libfdt: Increase namespace-pollution paranoia

2008-07-09 Thread Josh Boyer
On Wed, 2008-07-09 at 14:10 +1000, David Gibson wrote:
 libfdt is supposed to easy to embed in projects all and sundry.
 Often, it won't be practical to separate the embedded libfdt's
 namespace from that of the surrounding project.  Which means there can
 be namespace conflicts between even libfdt's internal/static functions
 and functions or macros coming from the surrounding project's headers
 via libfdt_env.h.
 
 This patch, therefore, renames a bunch of libfdt internal functions
 and macros and makes a few other chances to reduce the chances of
 namespace collisions with embedding projects.  Specifically:
   - Internal functions (even static ones) are now named _fdt_*()
 
   - The type and (static) global for the error table in
   fdt_strerror() gain an fdt_ prefix
 
   - The unused macro PALIGN is removed
 
   - The memeq and streq macros are removed and open-coded in the
   users (they were only used once each)
 
   - Other macros gain an FDT_ prefix
 
   - To save some of the bulk from the previous change, an
   FDT_TAGALIGN() macro is introduced, where FDT_TAGALIGN(x) ==
   FDT_ALIGN(x, FDT_TAGSIZE)
 
 Signed-off-by: David Gibson [EMAIL PROTECTED]

On a slightly unrelated note, are you planning to sync the in-kernel
dtc/libfdt version with the upstream version anytime soon?

josh

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: libfdt: Increase namespace-pollution paranoia

2008-07-09 Thread Kumar Gala


On Jul 9, 2008, at 6:42 AM, Josh Boyer wrote:


On Wed, 2008-07-09 at 14:10 +1000, David Gibson wrote:

libfdt is supposed to easy to embed in projects all and sundry.
Often, it won't be practical to separate the embedded libfdt's
namespace from that of the surrounding project.  Which means there  
can
be namespace conflicts between even libfdt's internal/static  
functions

and functions or macros coming from the surrounding project's headers
via libfdt_env.h.

This patch, therefore, renames a bunch of libfdt internal functions
and macros and makes a few other chances to reduce the chances of
namespace collisions with embedding projects.  Specifically:
- Internal functions (even static ones) are now named _fdt_*()

- The type and (static) global for the error table in
 fdt_strerror() gain an fdt_ prefix

- The unused macro PALIGN is removed

- The memeq and streq macros are removed and open-coded in the
 users (they were only used once each)

- Other macros gain an FDT_ prefix

- To save some of the bulk from the previous change, an
 FDT_TAGALIGN() macro is introduced, where FDT_TAGALIGN(x) ==
 FDT_ALIGN(x, FDT_TAGSIZE)

Signed-off-by: David Gibson [EMAIL PROTECTED]


On a slightly unrelated note, are you planning to sync the in-kernel
dtc/libfdt version with the upstream version anytime soon?


I know jon put an -rc, not sure if he plans to pick up the slew of  
patches for the next -rc or the next release, but it would be good to  
resync the in-kernel version for 2.6.27.


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Updates to powerpc.git

2008-07-09 Thread Kumar Gala


On Jul 9, 2008, at 2:34 AM, Benjamin Herrenschmidt wrote:


I've pushed some updates to my version of powerpc.git.

The tree itself is at:

 git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git

It contains 3 branches:

 - merge  : this is for merging with the current stable and doesn't
currently contain anything interesting

 - master : this is our current powerpc.git tree, it may contain
various experimental stuff that may or may not go upstream
or may contain dependent patches that we rely on but that
are to be merged via some other tree.

 - next   : this is the candidate stuff for linux-next and the next
merge window

(Andrew, you -may- want to pull that instead of paulus one until
he's back from vacation).

Until today, master and next pointed to the same commit, which was
the same as paulus master and powerpc-next branches. Tonight, I've
pushed some patches to master that I intend to have in next, but
I'd like to let them sit in master for a couple of days to make sure
nothing is badly broken mostly and make sure I didn't screw up in
my various patch monkeying operations.


What is your intent with the 'master' branch?  I hope you do NOT plan  
on ever rebasing it.  I assume if a patch gets into master and we drop  
it you'll do a git-revert of it?


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] Minor fixes for 85xxds and 8536ds board.

2008-07-09 Thread Kumar Gala


On Jul 7, 2008, at 8:21 PM, Jason Jin wrote:


Remove the uninitialized use compile warning and
avoid potential runtime issue.

Signed-off-by: Jason Jin [EMAIL PROTECTED]
---
arch/powerpc/platforms/85xx/mpc8536_ds.c |2 +-
arch/powerpc/platforms/85xx/mpc85xx_ds.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)


applied.

- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v4] powerpc: update crypto node definition and device tree instances

2008-07-09 Thread Kumar Gala


On Jul 8, 2008, at 7:13 PM, Kim Phillips wrote:


delete obsolete device-type property, delete model property
(use compatible property instead), prepend fsl, to Freescale
specific properties. Add nodes to device trees that are missing them,
and fix broken property values in other trees.

Signed-off-by: Kim Phillips [EMAIL PROTECTED]
---
changes from v3: sec.txt in new place following Kumar's latest
preference, cleaned up interrupt description and removed
interrupt-parent in documentation.


applied.

I fixed mpc832x_rdb.dts and mpc8536ds.dts as there were minor issues  
related to the interrupt props in those nodes.


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: libfdt: Increase namespace-pollution paranoia

2008-07-09 Thread Jon Loeliger
 
  On a slightly unrelated note, are you planning to sync the in-kernel
  dtc/libfdt version with the upstream version anytime soon?
 
 I know jon put an -rc, not sure if he plans to pick up the slew of  
 patches for the next -rc or the next release, but it would be good to  
 resync the in-kernel version for 2.6.27.
 
 - k

My (DTC) plan is to apply the single patch with some
include file fixes, and release that.

I'll line the slew of patches up for the following release.

jdl
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Please pull from 'powerpc-next' branch

2008-07-09 Thread Kumar Gala
Please pull from 'powerpc-next' branch of

master.kernel.org:/pub/scm/linux/kernel/git/galak/dts.git powerpc-next

to receive the following updates:

 Documentation/powerpc/booting-without-of.txt  | 1176 ---
 Documentation/powerpc/dts-bindings/fsl/board.txt  |   29
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm.txt |   67
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/brg.txt |   21
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/i2c.txt |   41
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/pic.txt |   18
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/usb.txt |   15
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/network.txt |   45
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt  |   58
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/firmware.txt |   24
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/par_io.txt   |   51
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/pincfg.txt   |   60
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/ucc.txt  |   70
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/usb.txt  |   22
 Documentation/powerpc/dts-bindings/fsl/cpm_qe/serial.txt  |   21
 Documentation/powerpc/dts-bindings/fsl/diu.txt|   18
 Documentation/powerpc/dts-bindings/fsl/dma.txt|  127
 Documentation/powerpc/dts-bindings/fsl/gtm.txt|   31
 Documentation/powerpc/dts-bindings/fsl/guts.txt   |   25
 Documentation/powerpc/dts-bindings/fsl/i2c.txt|   32
 Documentation/powerpc/dts-bindings/fsl/lbc.txt|   35
 Documentation/powerpc/dts-bindings/fsl/msi-pic.txt|   36
 Documentation/powerpc/dts-bindings/fsl/sata.txt   |   29
 Documentation/powerpc/dts-bindings/fsl/sec.txt|   68
 Documentation/powerpc/dts-bindings/fsl/spi.txt|   24
 Documentation/powerpc/dts-bindings/fsl/ssi.txt|   38
 Documentation/powerpc/dts-bindings/fsl/tsec.txt   |   69
 Documentation/powerpc/dts-bindings/fsl/usb.txt|   59
 arch/powerpc/boot/dts/ksi8560.dts |   20
 arch/powerpc/boot/dts/mpc8272ads.dts  |   32
 arch/powerpc/boot/dts/mpc8313erdb.dts |   15
 arch/powerpc/boot/dts/mpc8315erdb.dts |   15
 arch/powerpc/boot/dts/mpc832x_mds.dts |   15
 arch/powerpc/boot/dts/mpc832x_rdb.dts |   15
 arch/powerpc/boot/dts/mpc8349emitx.dts|   12
 arch/powerpc/boot/dts/mpc8349emitxgp.dts  |   12
 arch/powerpc/boot/dts/mpc834x_mds.dts |   15
 arch/powerpc/boot/dts/mpc836x_mds.dts |   13
 arch/powerpc/boot/dts/mpc8377_mds.dts |   13
 arch/powerpc/boot/dts/mpc8377_rdb.dts |   14
 arch/powerpc/boot/dts/mpc8378_mds.dts |   13
 arch/powerpc/boot/dts/mpc8378_rdb.dts |   14
 arch/powerpc/boot/dts/mpc8379_mds.dts |   13
 arch/powerpc/boot/dts/mpc8379_rdb.dts |   14
 arch/powerpc/boot/dts/mpc8536ds.dts   |  432 ++
 arch/powerpc/boot/dts/mpc8541cds.dts  |   11
 arch/powerpc/boot/dts/mpc8544ds.dts   |   11
 arch/powerpc/boot/dts/mpc8548cds.dts  |   11
 arch/powerpc/boot/dts/mpc8555cds.dts  |   11
 arch/powerpc/boot/dts/mpc8568mds.dts  |   14
 arch/powerpc/boot/dts/mpc8572ds.dts   |   12
 arch/powerpc/boot/dts/mpc8610_hpcd.dts|2
 arch/powerpc/boot/dts/mpc866ads.dts   |   11
 arch/powerpc/boot/dts/mpc885ads.dts   |   11
 arch/powerpc/boot/dts/sbc8349.dts |   14
 arch/powerpc/boot/dts/sbc8548.dts |   11
 arch/powerpc/boot/dts/tqm8541.dts |   11
 arch/powerpc/boot/dts/tqm8548.dts |5
 arch/powerpc/boot/dts/tqm8555.dts |   11
 arch/powerpc/configs/85xx/tqm8548_defconfig   |  143
 arch/powerpc/configs/mpc8536_ds_defconfig | 1637 ++
 arch/powerpc/kernel/time.c|4
 arch/powerpc/platforms/82xx/Kconfig   |   11
 arch/powerpc/platforms/82xx/mpc8272_ads.c |4
 arch/powerpc/platforms/82xx/pq2ads-pci-pic.c  |2
 arch/powerpc/platforms/83xx/Kconfig   |   10
 arch/powerpc/platforms/85xx/Kconfig   |6
 arch/powerpc/platforms/85xx/Makefile  |1
 arch/powerpc/platforms/85xx/mpc8536_ds.c  

Re: [Cbe-oss-dev] [patch 02/02] powerpc/cell: add support for power button of future IBM cell blades

2008-07-09 Thread Arnd Bergmann
On Wednesday 09 July 2008, Benjamin Herrenschmidt wrote:
 Sorry Christian, i'm still not too happy with this one.
 
 There are two issues at hand here:
 
  - The use of SELECT, that will be frowned on unfortunately.

Ok, this should be easy to fix, by making it depend on INPUT
instead, like the ACPI power button does. It's modeled after
that anyway.

  - I'm not too sure it's very safe the way you do it. If I understand
 correctly, you can get called for that sysreset at -any- time, including
 when interrupts are off right ?

Yes, that sounds like a problem.

 That means potentially, code that has interrupts off will be interrupted
 by input_report/input_sync, which is really bad (may corrupt the input
 layer internal list management for example).

I can't think of a case where this can realistically hit us (the blades
don't have any other input devices normally), but of course you are
right that it's broken anyway.

 You could solve both things with a little trick: Have the platform code
 just basically set a global flag when the button was pressed and have a
 module that depends on INPUT  INPUT_DEV poll for it (slowly pls) and do
 the input report.

Ugly, but doable, yes. I wonder if there is a way that we can trigger some
interrupt from system_reset_exception context in order to get around the
polling though. tasklets and workqueues unfortunately won't do us any good
here because they also depend on disabling interrupts.

Arnd 

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Updates to powerpc.git

2008-07-09 Thread Josh Boyer
On Wed, 09 Jul 2008 17:34:41 +1000
Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:

 I've pushed some updates to my version of powerpc.git.
 
 The tree itself is at:
 
   git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
 
 It contains 3 branches:
 
   - merge  : this is for merging with the current stable and doesn't
  currently contain anything interesting
 
   - master : this is our current powerpc.git tree, it may contain
  various experimental stuff that may or may not go upstream
  or may contain dependent patches that we rely on but that
  are to be merged via some other tree.
 
   - next   : this is the candidate stuff for linux-next and the next
  merge window
 
 (Andrew, you -may- want to pull that instead of paulus one until
 he's back from vacation).
 
 Until today, master and next pointed to the same commit, which was
 the same as paulus master and powerpc-next branches. Tonight, I've
 pushed some patches to master that I intend to have in next, but
 I'd like to let them sit in master for a couple of days to make sure
 nothing is badly broken mostly and make sure I didn't screw up in
 my various patch monkeying operations.

One thing to point out is that if you decide to only select a few of
those patches, you'll need to cherry-pick them into your next branch
(or rebase). That means that when you pull from Linus into your master
branch during/after the merge window, you'll get all kinds of funny
merge commits.

If you want to use your master branch as a place for experimental
stuff, that's fine by me.  But you'll want to keep next separate from
it so it's as clean as possible for those trying to track what is
definitely going into the next release.

If it were up to me (which it's not), I would have master just track
Linus, next track what's going into the next release, and bleeding or
experimental track stuff that isn't fully vetted yet.  I might start
doing that with my tree in the very near future.

Also, Paul is pretty good about not rebasing his branches when at all
possible, and I suspect that's why his master and next were often the
same.  It makes life lots easier for the sub-maintainers and anyone
trying to track against the tree.  I humbly beg you to keep that going.

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 0/3] ALSA fixes for non-coherent ppc32

2008-07-09 Thread Takashi Iwai
At Wed, 09 Jul 2008 10:31:11 +0200,
Gerhard Pircher wrote:
 
 Hi,
 
  Original-Nachricht 
  Datum: Wed, 18 Jun 2008 12:38:31 +0200
  Von: Takashi Iwai [EMAIL PROTECTED]
  An: [EMAIL PROTECTED]
  CC: linuxppc-dev@ozlabs.org, [EMAIL PROTECTED]
  Betreff: [PATCH 0/3] ALSA fixes for non-coherent ppc32
 
  Hi,
  
  I've tried to renew the fixes of ALSA issues about non-coherent DMA
  memories.  The last patch worked for SG-buffers somehow but would
  result in a problem if many pages are allocated because of
  dma_alloc_coherent() handling.  Now, I chose a more simpler
  workaround: the SG-buffers are handled as simple continuous buffers.
  
  This time I split the patches to several parts.  The first patch
  contains a very lazy dma_mmap_coherent() implementation for ppc32.
  The next patch adds the call of dma_mmap_coherent() for the default
  mmap of ALSA PCM.  And the last one is to add the conversion of
  SG-buffer handling as above.
  
  The patches are created against the latest ALSA tree, and the last
  patch won't be applicable fully to 2.6.26-rc6.  But, it's only for
  snd-hda-intel and there is no PPC32 hardware supporting this, AFAIK.
  So just ignore the reject.
  
  The patches are found also on my git tree, dma-fix branch of
  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
  
  Any comments and test reports are appreciated, especially about
  dma_mmap_coherent() addition.
 I know this answer comes a little bit late, but my PPC machine was not
 working for two weeks due to a hardware failure. I tested the patch on
 2.6.26-rc9 and it seems to work fine so far with my emu10k soundcard.
 I just had to add #include linux/dma-mapping.h to pcm_native.c.
 Otherwise it wouldn't compile.

Thanks, I fixed it now on my git tree.


Takashi
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 0/3] ALSA fixes for non-coherent ppc32

2008-07-09 Thread Takashi Iwai
At Wed, 09 Jul 2008 18:55:35 +1000,
Benjamin Herrenschmidt wrote:
 
 On Wed, 2008-07-09 at 10:31 +0200, Gerhard Pircher wrote:
   
   The patches are found also on my git tree, dma-fix branch of
  
  git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
   
   Any comments and test reports are appreciated, especially about
   dma_mmap_coherent() addition.
  I know this answer comes a little bit late, but my PPC machine was not
  working for two weeks due to a hardware failure. I tested the patch on
  2.6.26-rc9 and it seems to work fine so far with my emu10k soundcard.
  I just had to add #include linux/dma-mapping.h to pcm_native.c.
  Otherwise it wouldn't compile.
 
 Can I get the latest powerpc-side patches so I can review-ack them in
 time for the merge window ?

The changes in ppc are only the patch below.  The others are in
sound/*.  I wrote it as an inline function simply it's so short and I
didn't want extra exports.


thanks,

Takashi

---
commit 2c8662fde57af4cf928d17e089dc3dd2096f4b30
Author: Takashi Iwai [EMAIL PROTECTED]
Date:   Tue Jun 17 16:39:04 2008 +0200

ppc: Add dma_mmap_coherent() for PPC32

A very lazy version of dma_mmap_coherent() implementation for ppc32.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]

diff --git a/include/asm-powerpc/dma-mapping.h 
b/include/asm-powerpc/dma-mapping.h
index bbefb69..a6a9675 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -306,6 +306,24 @@ static inline void dma_unmap_sg(struct device *dev, struct 
scatterlist *sg,
/* We don't do anything here. */
 }
 
+/*
+ * A helper to mmap the pages allocated via dma_alloc_coherent()
+ */
+static inline int dma_mmap_coherent(struct device *dev,
+   struct vm_area_struct *vma,
+   void *cpu_addr, dma_addr_t handle,
+   size_t size)
+{
+   struct page *pg;
+#ifdef CONFIG_NOT_COHERENT_CACHE
+   /* I'm too lazy and can't stop using bus_to_virt() here... */
+   cpu_addr = bus_to_virt(handle);
+#endif
+   pg = virt_to_page(cpu_addr);
+   return remap_pfn_range(vma, vma-vm_start,
+  page_to_pfn(pg) + vma-vm_pgoff,
+  size, vma-vm_page_prot);
+}
 #endif /* CONFIG_PPC64 */
 
 static inline void dma_sync_single_for_cpu(struct device *dev,
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Updates to powerpc.git

2008-07-09 Thread Kumar Gala


On Jul 9, 2008, at 8:18 AM, Josh Boyer wrote:


On Wed, 09 Jul 2008 17:34:41 +1000
Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:


I've pushed some updates to my version of powerpc.git.

The tree itself is at:

 git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git

It contains 3 branches:

 - merge  : this is for merging with the current stable and doesn't
currently contain anything interesting

 - master : this is our current powerpc.git tree, it may contain
various experimental stuff that may or may not go  
upstream

or may contain dependent patches that we rely on but that
are to be merged via some other tree.

 - next   : this is the candidate stuff for linux-next and the next
merge window

(Andrew, you -may- want to pull that instead of paulus one until
he's back from vacation).

Until today, master and next pointed to the same commit, which was
the same as paulus master and powerpc-next branches. Tonight, I've
pushed some patches to master that I intend to have in next, but
I'd like to let them sit in master for a couple of days to make sure
nothing is badly broken mostly and make sure I didn't screw up in
my various patch monkeying operations.


One thing to point out is that if you decide to only select a few of
those patches, you'll need to cherry-pick them into your next branch
(or rebase). That means that when you pull from Linus into your master
branch during/after the merge window, you'll get all kinds of funny
merge commits.

If you want to use your master branch as a place for experimental
stuff, that's fine by me.  But you'll want to keep next separate from
it so it's as clean as possible for those trying to track what is
definitely going into the next release.

If it were up to me (which it's not), I would have master just track
Linus, next track what's going into the next release, and bleeding  
or

experimental track stuff that isn't fully vetted yet.  I might start
doing that with my tree in the very near future.


I do something similar, but my master is a merge of linus and my next  
branch, which is roughly what I think paul did.



Also, Paul is pretty good about not rebasing his branches when at all
possible, and I suspect that's why his master and next were often the
same.  It makes life lots easier for the sub-maintainers and anyone
trying to track against the tree.  I humbly beg you to keep that  
going.


I agree and I'm sure linus will tell you how evil it is to rebase as a  
maintainer.


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] powerpc: Fix problems with 32bit PPC's running with more than 2GB of RAM

2008-07-09 Thread Stefan Roese
This patch enables 32bit PPC's (with 36bit physical address space, e.g.
IBM/AMCC PPC44x) to run with more than 2GB of RAM. Mostly its just
replacing types (unsigned long - phys_addr_t).

Tested on an AMCC Katmai with 4GB of DDR2.

Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 arch/powerpc/mm/init_32.c  |4 ++--
 arch/powerpc/mm/mem.c  |8 
 arch/powerpc/mm/mmu_decl.h |4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 1952b4d..325ccdd 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -56,8 +56,8 @@
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 
-unsigned long total_memory;
-unsigned long total_lowmem;
+phys_addr_t total_memory;
+phys_addr_t total_lowmem;
 
 phys_addr_t memstart_addr = (phys_addr_t)~0ull;
 EXPORT_SYMBOL(memstart_addr);
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 51f82d8..55ef772 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -329,7 +329,7 @@ static int __init mark_nonram_nosave(void)
 void __init paging_init(void)
 {
unsigned long total_ram = lmb_phys_mem_size();
-   unsigned long top_of_ram = lmb_end_of_DRAM();
+   phys_addr_t top_of_ram = lmb_end_of_DRAM();
unsigned long max_zone_pfns[MAX_NR_ZONES];
 
 #ifdef CONFIG_PPC32
@@ -348,10 +348,10 @@ void __init paging_init(void)
kmap_prot = PAGE_KERNEL;
 #endif /* CONFIG_HIGHMEM */
 
-   printk(KERN_DEBUG Top of RAM: 0x%lx, Total RAM: 0x%lx\n,
-  top_of_ram, total_ram);
+   printk(KERN_DEBUG Top of RAM: 0x%llx, Total RAM: 0x%lx\n,
+  (u64)top_of_ram, total_ram);
printk(KERN_DEBUG Memory hole size: %ldMB\n,
-  (top_of_ram - total_ram)  20);
+  (long int)((top_of_ram - total_ram)  20));
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
 #ifdef CONFIG_HIGHMEM
max_zone_pfns[ZONE_DMA] = lowmem_end_addr  PAGE_SHIFT;
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 0480225..4e46c63 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -49,8 +49,8 @@ extern unsigned int num_tlbcam_entries;
 extern unsigned long ioremap_bot;
 extern unsigned long __max_low_memory;
 extern phys_addr_t __initial_memory_limit_addr;
-extern unsigned long total_memory;
-extern unsigned long total_lowmem;
+extern phys_addr_t total_memory;
+extern phys_addr_t total_lowmem;
 extern phys_addr_t memstart_addr;
 extern phys_addr_t lowmem_end_addr;
 
-- 
1.5.6.2

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [RFC/PATCH] powerpc/bootwrapper: Allow user to specify additional default targets

2008-07-09 Thread Josh Boyer
On Mon, 7 Jul 2008 08:29:47 -0600
Grant Likely [EMAIL PROTECTED] wrote:

 On Mon, Jul 7, 2008 at 8:07 AM, Josh Boyer [EMAIL PROTECTED] wrote:
  On Mon, 7 Jul 2008 07:34:23 -0600 Grant Likely wrote:
  Specifically the case I'm thinking of is when a user of a Xilinx FPGA
  drops a new .dts file into arch/powerpc/boot/dts (say
  'super-sexy-platform.dts').  However, instead of modifying the
  Makefile or always typing 'make simpleImage.super-sexy-platform', then
  can add 'simpleImage.super-sexy-platform' to their defconfig which I
  can see being easier for someone to get their head around.
 
  Yeah, I thought about the Virtex case with the differing bitstreams
  after I sent out my original question.  For purposes like that, this
  seems like a great fit.  For truly discrete boards, I prefer discrete
  defconfigs.
 
  So overall I see value in the patch.  If nobody else has objections,
  then it's fine with me.
 
 so can I have an ack?  :-)

Oops, sorry.  Of course.

Acked-by: Josh Boyer [EMAIL PROTECTED]

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Please pull linux-2.6-virtex.git

2008-07-09 Thread Josh Boyer
On Fri, 2008-07-04 at 11:22 -0600, Grant Likely wrote:
 Hi Josh,
 
 Here are the bulk of the Xilinx 440 support patches.  Please pull
 into your next branch.
 
 Thanks,
 g.
 
 The following changes since commit f3e909c2750eb20536bacacc867dc9047b70546a:
   Michael Neuling (1):
 powerpc: Update for VSX core file and ptrace
 
 are available in the git repository at:
 
   git://git.secretlab.ca/git/linux-2.6-virtex virtex-for-2.6.27

Any chance to get that updated with the latest fixes before I pull it
in?  Namely the DTS file for virtex5, but there might have been others.

josh

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc: rework 4xx PTE access and TLB miss

2008-07-09 Thread Josh Boyer
On Tue, 08 Jul 2008 15:54:40 +1000
Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:

 This is some preliminary work to improve TLB management on SW loaded
 TLB powerpc platforms. This introduce support for non-atomic PTE
 operations in pgtable-ppc32.h and removes write back to the PTE from
 the TLB miss handlers. In addition, the DSI interrupt code no longer
 tries to fixup write permission, this is left to generic code, and
 _PAGE_HWWRITE is gone.
 
 Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]

Boots for me now.  So far it's surviving a dbench run, and I'll try
hackbench/kernbench shortly.

I've got this queued up in my -next branch.

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Updates to powerpc.git

2008-07-09 Thread Grant Likely
On Wed, Jul 09, 2008 at 08:40:21AM -0500, Kumar Gala wrote:

 On Jul 9, 2008, at 8:18 AM, Josh Boyer wrote:

 On Wed, 09 Jul 2008 17:34:41 +1000
 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:
 Also, Paul is pretty good about not rebasing his branches when at all
 possible, and I suspect that's why his master and next were often the
 same.  It makes life lots easier for the sub-maintainers and anyone
 trying to track against the tree.  I humbly beg you to keep that  
 going.

 I agree and I'm sure linus will tell you how evil it is to rebase as a  
 maintainer.

Add my voice to the chorus.  Rebasing a branch that I commit on top of
really messes up the workflow.

g.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Please pull linux-2.6-virtex.git

2008-07-09 Thread Grant Likely
On Wed, Jul 09, 2008 at 10:15:04AM -0400, Josh Boyer wrote:
 On Fri, 2008-07-04 at 11:22 -0600, Grant Likely wrote:
  Hi Josh,
  
  Here are the bulk of the Xilinx 440 support patches.  Please pull
  into your next branch.
  
  Thanks,
  g.
  
  The following changes since commit f3e909c2750eb20536bacacc867dc9047b70546a:
Michael Neuling (1):
  powerpc: Update for VSX core file and ptrace
  
  are available in the git repository at:
  
git://git.secretlab.ca/git/linux-2.6-virtex virtex-for-2.6.27
 
 Any chance to get that updated with the latest fixes before I pull it
 in?  Namely the DTS file for virtex5, but there might have been others.

Yes, I'll do that this morning, along with the extra images patch.

g.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc: Fix problems with 32bit PPC's running with more than 2GB of RAM

2008-07-09 Thread Kumar Gala


On Jul 9, 2008, at 8:44 AM, Stefan Roese wrote:

This patch enables 32bit PPC's (with 36bit physical address space,  
e.g.

IBM/AMCC PPC44x) to run with more than 2GB of RAM. Mostly its just
replacing types (unsigned long - phys_addr_t).


should the commit header really be = 4G.  I don't think there is any  
issue with 2-4G support as it stands.



Tested on an AMCC Katmai with 4GB of DDR2.

Signed-off-by: Stefan Roese [EMAIL PROTECTED]


- k

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc: Fix problems with 32bit PPC's running with more than 2GB of RAM

2008-07-09 Thread Stefan Roese
On Wednesday 09 July 2008, Kumar Gala wrote:
 On Jul 9, 2008, at 8:44 AM, Stefan Roese wrote:
  This patch enables 32bit PPC's (with 36bit physical address space,
  e.g.
  IBM/AMCC PPC44x) to run with more than 2GB of RAM. Mostly its just
  replacing types (unsigned long - phys_addr_t).

 should the commit header really be = 4G.  I don't think there is any
 issue with 2-4G support as it stands.

Right. I'll fix this up and resubmit.

Thanks.

Best regards,
Stefan
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v2] powerpc: Fix problems with 32bit PPC's running with = 4GB of RAM

2008-07-09 Thread Stefan Roese
This patch enables 32bit PPC's (with 36bit physical address space, e.g.
IBM/AMCC PPC44x) to run with = 4GB of RAM. Mostly its just replacing types
(unsigned long - phys_addr_t).

Tested on an AMCC Katmai with 4GB of DDR2.

Signed-off-by: Stefan Roese [EMAIL PROTECTED]
---
 arch/powerpc/mm/init_32.c  |4 ++--
 arch/powerpc/mm/mem.c  |8 
 arch/powerpc/mm/mmu_decl.h |4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index 1952b4d..325ccdd 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -56,8 +56,8 @@
 
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
 
-unsigned long total_memory;
-unsigned long total_lowmem;
+phys_addr_t total_memory;
+phys_addr_t total_lowmem;
 
 phys_addr_t memstart_addr = (phys_addr_t)~0ull;
 EXPORT_SYMBOL(memstart_addr);
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 51f82d8..55ef772 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -329,7 +329,7 @@ static int __init mark_nonram_nosave(void)
 void __init paging_init(void)
 {
unsigned long total_ram = lmb_phys_mem_size();
-   unsigned long top_of_ram = lmb_end_of_DRAM();
+   phys_addr_t top_of_ram = lmb_end_of_DRAM();
unsigned long max_zone_pfns[MAX_NR_ZONES];
 
 #ifdef CONFIG_PPC32
@@ -348,10 +348,10 @@ void __init paging_init(void)
kmap_prot = PAGE_KERNEL;
 #endif /* CONFIG_HIGHMEM */
 
-   printk(KERN_DEBUG Top of RAM: 0x%lx, Total RAM: 0x%lx\n,
-  top_of_ram, total_ram);
+   printk(KERN_DEBUG Top of RAM: 0x%llx, Total RAM: 0x%lx\n,
+  (u64)top_of_ram, total_ram);
printk(KERN_DEBUG Memory hole size: %ldMB\n,
-  (top_of_ram - total_ram)  20);
+  (long int)((top_of_ram - total_ram)  20));
memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
 #ifdef CONFIG_HIGHMEM
max_zone_pfns[ZONE_DMA] = lowmem_end_addr  PAGE_SHIFT;
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 0480225..4e46c63 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -49,8 +49,8 @@ extern unsigned int num_tlbcam_entries;
 extern unsigned long ioremap_bot;
 extern unsigned long __max_low_memory;
 extern phys_addr_t __initial_memory_limit_addr;
-extern unsigned long total_memory;
-extern unsigned long total_lowmem;
+extern phys_addr_t total_memory;
+extern phys_addr_t total_lowmem;
 extern phys_addr_t memstart_addr;
 extern phys_addr_t lowmem_end_addr;
 
-- 
1.5.6.2

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH v3] Add PPC_FEATURE_PSERIES_PERFMON_COMPAT

2008-07-09 Thread Nathan Lynch
Background from Maynard Johnson:
As of POWER6, a set of 32 common events is defined that must be
supported on all future POWER processors.  The main impetus for this
compat set is the need to support partition migration, especially from
processor P(n) to processor P(n+1), where performance software that's
running in the new partition may not be knowledgeable about processor
P(n+1).  If a performance tool determines it does not support the
physical processor, but is told (via the
PPC_FEATURE_PSERIES_PERFMON_COMPAT bit) that the processor supports
the notion of the PMU compat set, then the performance tool can
surface just those events to the user of the tool.

PPC_FEATURE_PSERIES_PERFMON_COMPAT indicates that the PMU supports at
least this basic subset of events which is compatible across POWER
processor lines.

Signed-off-by: Nathan Lynch [EMAIL PROTECTED]
---

Changes since v2:
- Further disambiguated name of feature bit (PMU - PERFMON)

Changes since v1:
- make name of feature bit less generic
- provide more complete changelog

 arch/powerpc/kernel/cputable.c |6 --
 include/asm-powerpc/cputable.h |3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 817cea1..02088b0 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -70,10 +70,12 @@ extern void __restore_cpu_power7(void);
 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
 #define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
-PPC_FEATURE_TRUE_LE)
+PPC_FEATURE_TRUE_LE | \
+PPC_FEATURE_PSERIES_PERFMON_COMPAT)
 #define COMMON_USER_POWER7 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_06 |\
 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP | \
-PPC_FEATURE_TRUE_LE)
+PPC_FEATURE_TRUE_LE | \
+PPC_FEATURE_PSERIES_PERFMON_COMPAT)
 #define COMMON_USER_PA6T   (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
 PPC_FEATURE_TRUE_LE | \
 PPC_FEATURE_HAS_ALTIVEC_COMP)
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 3171ac9..58d4281 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -27,6 +27,9 @@
 #define PPC_FEATURE_ARCH_2_06  0x0100
 #define PPC_FEATURE_HAS_VSX0x0080
 
+#define PPC_FEATURE_PSERIES_PERFMON_COMPAT \
+   0x0040
+
 #define PPC_FEATURE_TRUE_LE0x0002
 #define PPC_FEATURE_PPC_LE 0x0001
 
-- 
1.5.6.2

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [patch 5/5] powerpc: Dont clear _PAGE_COHERENT when _PAGE_SAO is set

2008-07-09 Thread Dave Kleikamp
On Wed, 2008-07-09 at 13:46 +1000, Benjamin Herrenschmidt wrote:

 The old code looks bogus.. why clear M when G is set ? Only
 I should have mattered.

I can't find anywhere where G gets set without also setting I, so the
test seems redundant as well.

 I'll apply anyway as you aren't changing the existing behaviour here but
 maybe you can shoot me a fixup patch that removes the _PAGE_GUARDED
 condition completely here ?

No problem.  There is code in cell/beat_htab.c doing the same thing.
I've gone ahead and fixed it there too.

 It's legal to have G=1 M=1 pages and can even be useful under some
 circumstances.

It doesn't look like anyone is trying to take advantage of that
currently.

Here's your patch:

powerpc: Remove unnecessary condition when sanity-checking WIMG bits

It is okay for both _PAGE_GUARDED and _PAGE_COHERENT (G and M) to be set
in the same pte.  In fact, even if that were not the case, there doesn't
seem to be any place where G is set without also setting I (_PAGE_NO_CACHE),
so the test for I is sufficient.

Signed-off-by: Dave Kleikamp [EMAIL PROTECTED]

diff --git a/arch/powerpc/platforms/cell/beat_htab.c 
b/arch/powerpc/platforms/cell/beat_htab.c
index 81467ff..2e67bd8 100644
--- a/arch/powerpc/platforms/cell/beat_htab.c
+++ b/arch/powerpc/platforms/cell/beat_htab.c
@@ -112,7 +112,7 @@ static long beat_lpar_hpte_insert(unsigned long hpte_group,
if (!(vflags  HPTE_V_BOLTED))
DBG_LOW( hpte_v=%016lx, hpte_r=%016lx\n, hpte_v, hpte_r);
 
-   if (rflags  (_PAGE_GUARDED|_PAGE_NO_CACHE))
+   if (rflags  _PAGE_NO_CACHE)
hpte_r = ~_PAGE_COHERENT;
 
spin_lock(beat_htab_lock);
@@ -334,7 +334,7 @@ static long beat_lpar_hpte_insert_v3(unsigned long 
hpte_group,
if (!(vflags  HPTE_V_BOLTED))
DBG_LOW( hpte_v=%016lx, hpte_r=%016lx\n, hpte_v, hpte_r);
 
-   if (rflags  (_PAGE_GUARDED|_PAGE_NO_CACHE))
+   if (rflags  _PAGE_NO_CACHE)
hpte_r = ~_PAGE_COHERENT;
 
/* insert into not-volted entry */
diff --git a/arch/powerpc/platforms/pseries/lpar.c 
b/arch/powerpc/platforms/pseries/lpar.c
index 38b5927..52a80e5 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -305,8 +305,7 @@ static long pSeries_lpar_hpte_insert(unsigned long 
hpte_group,
flags = 0;
 
/* Make pHyp happy */
-   if ((rflags  _PAGE_GUARDED) ||
-   ((rflags  _PAGE_NO_CACHE)  !(rflags  _PAGE_WRITETHRU)))
+   if ((rflags  _PAGE_NO_CACHE)  !(rflags  _PAGE_WRITETHRU))
hpte_r = ~_PAGE_COHERENT;
 
lpar_rc = plpar_pte_enter(flags, hpte_group, hpte_v, hpte_r, slot);

-- 
David Kleikamp
IBM Linux Technology Center

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH][RT][PPC64] Fix preempt unsafe paths accessing per_cpu variables

2008-07-09 Thread Chirag Jog

Hi,
This patch fixes various paths in the -rt kernel on powerpc64 where per_cpu
variables are accessed in a preempt unsafe way.
When a power box with -rt kernel is booted, multiple BUG messages are
generated BUG: init:1 task might have lost a preemption check!.
After booting a kernel with these patches applied, these messages
don't appear.

Also I ran the realtime tests from ltp to ensure the stability.


Signed-Off-By: Chirag [EMAIL PROTECTED]

arch/powerpc/mm/tlb_64.c   |   29 -
arch/powerpc/platforms/pseries/iommu.c |   14 ++
include/asm-powerpc/tlb.h  |5 ++---
3 files changed, 28 insertions(+), 20 deletions(-)


Index: linux-2.6.25.8-rt7/arch/powerpc/mm/tlb_64.c
===
--- linux-2.6.25.8-rt7.orig/arch/powerpc/mm/tlb_64.c2008-07-07 
13:13:59.0 +0530
+++ linux-2.6.25.8-rt7/arch/powerpc/mm/tlb_64.c 2008-07-09 20:57:01.0 
+0530
@@ -38,7 +38,6 @@
  * include/asm-powerpc/tlb.h file -- tgall
  */
 DEFINE_PER_CPU_LOCKED(struct mmu_gather, mmu_gathers);
-DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
 unsigned long pte_freelist_forced_free;
 
 struct pte_freelist_batch
@@ -48,7 +47,7 @@
pgtable_free_t  tables[0];
 };
 
-DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
+DEFINE_PER_CPU_LOCKED(struct pte_freelist_batch *, pte_freelist_cur);
 unsigned long pte_freelist_forced_free;
 
 #define PTE_FREELIST_SIZE \
@@ -92,16 +91,14 @@
 
 void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf)
 {
-   /*
-* This is safe since tlb_gather_mmu has disabled preemption.
-* tlb-cpu is set by tlb_gather_mmu as well.
-*/
+   int cpu;
 cpumask_t local_cpumask = cpumask_of_cpu(tlb-cpu);
-   struct pte_freelist_batch **batchp = __get_cpu_var(pte_freelist_cur);
+   struct pte_freelist_batch **batchp = 
get_cpu_var_locked(pte_freelist_cur, cpu);
 
if (atomic_read(tlb-mm-mm_users)  2 ||
cpus_equal(tlb-mm-cpu_vm_mask, local_cpumask)) {
pgtable_free(pgf);
+   goto cleanup;
return;
}
 
@@ -109,6 +106,7 @@
*batchp = (struct pte_freelist_batch 
*)__get_free_page(GFP_ATOMIC);
if (*batchp == NULL) {
pgtable_free_now(pgf);
+   goto cleanup;
return;
}
(*batchp)-index = 0;
@@ -118,6 +116,9 @@
pte_free_submit(*batchp);
*batchp = NULL;
}
+
+ cleanup:
+   put_cpu_var_locked(pte_freelist_cur, cpu);
 }
 
 /*
@@ -253,13 +254,15 @@
 
 void pte_free_finish(void)
 {
-   /* This is safe since tlb_gather_mmu has disabled preemption */
-   struct pte_freelist_batch **batchp = __get_cpu_var(pte_freelist_cur);
+   int cpu;
+   struct pte_freelist_batch **batchp = 
get_cpu_var_locked(pte_freelist_cur, cpu);
 
-   if (*batchp == NULL)
-   return;
-   pte_free_submit(*batchp);
-   *batchp = NULL;
+   if (*batchp) {
+   pte_free_submit(*batchp);
+   *batchp = NULL;
+   }
+
+   put_cpu_var_locked(pte_freelist_cur, cpu);
 }
 
 /**
Index: linux-2.6.25.8-rt7/include/asm-powerpc/tlb.h
===
--- linux-2.6.25.8-rt7.orig/include/asm-powerpc/tlb.h   2008-07-07 
22:58:37.0 +0530
+++ linux-2.6.25.8-rt7/include/asm-powerpc/tlb.h2008-07-09 
10:22:51.0 +0530
@@ -40,18 +40,17 @@
 
 static inline void tlb_flush(struct mmu_gather *tlb)
 {
-   struct ppc64_tlb_batch *tlbbatch = __get_cpu_var(ppc64_tlb_batch);
+   struct ppc64_tlb_batch *tlbbatch = get_cpu_var(ppc64_tlb_batch);
 
/* If there's a TLB batch pending, then we must flush it because the
 * pages are going to be freed and we really don't want to have a CPU
 * access a freed page because it has a stale TLB
 */
if (tlbbatch-index) {
-   preempt_disable();
__flush_tlb_pending(tlbbatch);
-   preempt_enable();
}
 
+   put_cpu_var(ppc64_tlb_batch);
pte_free_finish();
 }
 
Index: linux-2.6.25.8-rt7/arch/powerpc/platforms/pseries/iommu.c
===
--- linux-2.6.25.8-rt7.orig/arch/powerpc/platforms/pseries/iommu.c  
2008-07-07 23:16:29.0 +0530
+++ linux-2.6.25.8-rt7/arch/powerpc/platforms/pseries/iommu.c   2008-07-09 
10:49:21.0 +0530
@@ -124,7 +124,7 @@
}
 }
 
-static DEFINE_PER_CPU(u64 *, tce_page) = NULL;
+static DEFINE_PER_CPU_LOCKED(u64 *, tce_page) = NULL;
 
 static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
 long npages, unsigned long uaddr,
@@ -135,12 +135,13 @@
u64 *tcep;
u64 rpn;
long l, 

Re: Please pull linux-2.6-virtex.git

2008-07-09 Thread Grant Likely
Hey Josh, here is the new pull request:

The following changes since commit f3e909c2750eb20536bacacc867dc9047b70546a:
  Michael Neuling (1):
powerpc: Update for VSX core file and ptrace

are available in the git repository at:

  git://git.secretlab.ca/git/linux-2.6-virtex virtex-for-2.6.27

Grant Likely (4):
  powerpc/bootwrapper: Add documentation of boot wrapper targets
  powerpc/bootwrapper: add missing bit of simpleImage target
  powerpc/bootwrapper: Allow user to specify additional default targets
  powerpc/440: Convert Virtex ML507 device tree to dts-v1

John Linn (5):
  powerpc/virtex: add dts file for ML507 reference design
  powerpc/virtex: Fix booting of Xilinx FPGAs with 16550 for 405 and 440
  powerpc/virtex: add Xilinx Virtex 5 ppc440 platform support
  powerpc/virtex: add Xilinx 440 cpu to the cputable
  powerpc/virtex: add defconfig for virtex 5 platforms

 Documentation/powerpc/bootwrapper.txt  |  141 
 arch/powerpc/Kconfig   |   13 +
 arch/powerpc/Makefile  |   15 +-
 arch/powerpc/boot/Makefile |5 +-
 arch/powerpc/boot/dts/virtex440-ml507.dts  |  296 
 arch/powerpc/boot/simpleboot.c |6 +
 arch/powerpc/boot/virtex.c |  100 +++
 arch/powerpc/boot/wrapper  |   10 +-
 arch/powerpc/configs/44x/virtex5_defconfig | 1107 
 arch/powerpc/kernel/cputable.c |   10 +
 arch/powerpc/platforms/44x/Kconfig |   26 +
 arch/powerpc/platforms/44x/Makefile|1 +
 arch/powerpc/platforms/44x/virtex.c|   60 ++
 13 files changed, 1787 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/powerpc/bootwrapper.txt
 create mode 100644 arch/powerpc/boot/dts/virtex440-ml507.dts
 create mode 100644 arch/powerpc/boot/virtex.c
 create mode 100644 arch/powerpc/configs/44x/virtex5_defconfig
 create mode 100644 arch/powerpc/platforms/44x/virtex.c


On Wed, Jul 9, 2008 at 8:15 AM, Josh Boyer [EMAIL PROTECTED] wrote:
 On Fri, 2008-07-04 at 11:22 -0600, Grant Likely wrote:
 Hi Josh,

 Here are the bulk of the Xilinx 440 support patches.  Please pull
 into your next branch.

 Thanks,
 g.

 The following changes since commit f3e909c2750eb20536bacacc867dc9047b70546a:
   Michael Neuling (1):
 powerpc: Update for VSX core file and ptrace

 are available in the git repository at:

   git://git.secretlab.ca/git/linux-2.6-virtex virtex-for-2.6.27

 Any chance to get that updated with the latest fixes before I pull it
 in?  Namely the DTS file for virtex5, but there might have been others.

 josh





-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH][RT][PPC64] Fix preempt unsafe paths accessing per_cpu variables

2008-07-09 Thread Chirag Jog

Hi,
This patch fixes various paths in the -rt kernel on powerpc64 where per_cpu
variables are accessed in a preempt unsafe way.
When a power box with -rt kernel is booted, multiple BUG messages are
generated BUG: init:1 task might have lost a preemption check!.
After booting a kernel with these patches applied, these messages
don't appear.

Also I ran the realtime tests from ltp to ensure the stability.


Signed-Off-By: Chirag [EMAIL PROTECTED]
arch/powerpc/mm/tlb_64.c   |   31 ---
arch/powerpc/platforms/pseries/iommu.c |   14 ++
include/asm-powerpc/tlb.h  |5 ++---
3 files changed, 28 insertions(+), 22 deletions(-)

 
Index: linux-2.6.25.8-rt7/arch/powerpc/mm/tlb_64.c
===
--- linux-2.6.25.8-rt7.orig/arch/powerpc/mm/tlb_64.c2008-07-09 
21:29:21.0 +0530
+++ linux-2.6.25.8-rt7/arch/powerpc/mm/tlb_64.c 2008-07-09 21:30:37.0 
+0530
@@ -38,7 +38,6 @@
  * include/asm-powerpc/tlb.h file -- tgall
  */
 DEFINE_PER_CPU_LOCKED(struct mmu_gather, mmu_gathers);
-DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
 unsigned long pte_freelist_forced_free;
 
 struct pte_freelist_batch
@@ -48,7 +47,7 @@
pgtable_free_t  tables[0];
 };
 
-DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
+DEFINE_PER_CPU_LOCKED(struct pte_freelist_batch *, pte_freelist_cur);
 unsigned long pte_freelist_forced_free;
 
 #define PTE_FREELIST_SIZE \
@@ -92,24 +91,21 @@
 
 void pgtable_free_tlb(struct mmu_gather *tlb, pgtable_free_t pgf)
 {
-   /*
-* This is safe since tlb_gather_mmu has disabled preemption.
-* tlb-cpu is set by tlb_gather_mmu as well.
-*/
+   int cpu;
 cpumask_t local_cpumask = cpumask_of_cpu(tlb-cpu);
-   struct pte_freelist_batch **batchp = __get_cpu_var(pte_freelist_cur);
+   struct pte_freelist_batch **batchp = 
get_cpu_var_locked(pte_freelist_cur, cpu);
 
if (atomic_read(tlb-mm-mm_users)  2 ||
cpus_equal(tlb-mm-cpu_vm_mask, local_cpumask)) {
pgtable_free(pgf);
-   return;
+   goto cleanup;
}
 
if (*batchp == NULL) {
*batchp = (struct pte_freelist_batch 
*)__get_free_page(GFP_ATOMIC);
if (*batchp == NULL) {
pgtable_free_now(pgf);
-   return;
+   goto cleanup;
}
(*batchp)-index = 0;
}
@@ -118,6 +114,9 @@
pte_free_submit(*batchp);
*batchp = NULL;
}
+
+ cleanup:
+   put_cpu_var_locked(pte_freelist_cur, cpu);
 }
 
 /*
@@ -253,13 +252,15 @@
 
 void pte_free_finish(void)
 {
-   /* This is safe since tlb_gather_mmu has disabled preemption */
-   struct pte_freelist_batch **batchp = __get_cpu_var(pte_freelist_cur);
+   int cpu;
+   struct pte_freelist_batch **batchp = 
get_cpu_var_locked(pte_freelist_cur, cpu);
 
-   if (*batchp == NULL)
-   return;
-   pte_free_submit(*batchp);
-   *batchp = NULL;
+   if (*batchp) {
+   pte_free_submit(*batchp);
+   *batchp = NULL;
+   }
+
+   put_cpu_var_locked(pte_freelist_cur, cpu);
 }
 
 /**
Index: linux-2.6.25.8-rt7/include/asm-powerpc/tlb.h
===
--- linux-2.6.25.8-rt7.orig/include/asm-powerpc/tlb.h   2008-07-09 
21:29:21.0 +0530
+++ linux-2.6.25.8-rt7/include/asm-powerpc/tlb.h2008-07-09 
21:29:41.0 +0530
@@ -40,18 +40,17 @@
 
 static inline void tlb_flush(struct mmu_gather *tlb)
 {
-   struct ppc64_tlb_batch *tlbbatch = __get_cpu_var(ppc64_tlb_batch);
+   struct ppc64_tlb_batch *tlbbatch = get_cpu_var(ppc64_tlb_batch);
 
/* If there's a TLB batch pending, then we must flush it because the
 * pages are going to be freed and we really don't want to have a CPU
 * access a freed page because it has a stale TLB
 */
if (tlbbatch-index) {
-   preempt_disable();
__flush_tlb_pending(tlbbatch);
-   preempt_enable();
}
 
+   put_cpu_var(ppc64_tlb_batch);
pte_free_finish();
 }
 
Index: linux-2.6.25.8-rt7/arch/powerpc/platforms/pseries/iommu.c
===
--- linux-2.6.25.8-rt7.orig/arch/powerpc/platforms/pseries/iommu.c  
2008-07-09 21:29:21.0 +0530
+++ linux-2.6.25.8-rt7/arch/powerpc/platforms/pseries/iommu.c   2008-07-09 
21:29:41.0 +0530
@@ -124,7 +124,7 @@
}
 }
 
-static DEFINE_PER_CPU(u64 *, tce_page) = NULL;
+static DEFINE_PER_CPU_LOCKED(u64 *, tce_page) = NULL;
 
 static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
 long npages, unsigned long uaddr,
@@ -135,12 +135,13 @@
u64 *tcep;
u64 rpn;
   

Re: Updates to powerpc.git

2008-07-09 Thread Stephen Rothwell
Kumar,

On Wed, 9 Jul 2008 07:58:38 -0500 Kumar Gala [EMAIL PROTECTED] wrote:

 What is your intent with the 'master' branch?  I hope you do NOT plan  
 on ever rebasing it.  I assume if a patch gets into master and we drop  
 it you'll do a git-revert of it?

Ever is such a strong word.  Even Paul on occasion rebased his master
branch.  I see no reason why Ben could not run his master (or maybe
better named test) branch as a place that patches come and go and his
next branch as something that never (or very rarely) gets rebased with
commits progressing from master (test) to next when he is satisfied with
them. People should then base further work in the next branch.

-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgpuQJckDgihf.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: Updates to powerpc.git

2008-07-09 Thread Grant Likely
On Thu, Jul 10, 2008 at 02:08:32AM +1000, Stephen Rothwell wrote:
 Kumar,
 
 On Wed, 9 Jul 2008 07:58:38 -0500 Kumar Gala [EMAIL PROTECTED] wrote:
 
  What is your intent with the 'master' branch?  I hope you do NOT plan  
  on ever rebasing it.  I assume if a patch gets into master and we drop  
  it you'll do a git-revert of it?
 
 Ever is such a strong word.  Even Paul on occasion rebased his master
 branch.  I see no reason why Ben could not run his master (or maybe
 better named test) branch as a place that patches come and go and his
 next branch as something that never (or very rarely) gets rebased with
 commits progressing from master (test) to next when he is satisfied with
 them. People should then base further work in the next branch.

I was under the impression that there was some consensus that -next
branches should be used for unstable experiments.  Am I mistaken?

g.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH v2] powerpc: Fix problems with 32bit PPC's running with = 4GB of RAM

2008-07-09 Thread Josh Boyer
On Wed,  9 Jul 2008 17:09:23 +0200
Stefan Roese [EMAIL PROTECTED] wrote:

 This patch enables 32bit PPC's (with 36bit physical address space, e.g.
 IBM/AMCC PPC44x) to run with = 4GB of RAM. Mostly its just replacing types
 (unsigned long - phys_addr_t).
 
 Tested on an AMCC Katmai with 4GB of DDR2.
 
 Signed-off-by: Stefan Roese [EMAIL PROTECTED]

Thanks :).  FWIW, I was just going to fixup the commit log manually,
but a new patch works too.

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Updates to powerpc.git

2008-07-09 Thread Josh Boyer
On Wed, 2008-07-09 at 10:20 -0600, Grant Likely wrote:
 On Thu, Jul 10, 2008 at 02:08:32AM +1000, Stephen Rothwell wrote:
  Kumar,
  
  On Wed, 9 Jul 2008 07:58:38 -0500 Kumar Gala [EMAIL PROTECTED] wrote:
  
   What is your intent with the 'master' branch?  I hope you do NOT plan  
   on ever rebasing it.  I assume if a patch gets into master and we drop  
   it you'll do a git-revert of it?
  
  Ever is such a strong word.  Even Paul on occasion rebased his master
  branch.  I see no reason why Ben could not run his master (or maybe
  better named test) branch as a place that patches come and go and his
  next branch as something that never (or very rarely) gets rebased with
  commits progressing from master (test) to next when he is satisfied with
  them. People should then base further work in the next branch.
 
 I was under the impression that there was some consensus that -next
 branches should be used for unstable experiments.  Am I mistaken?

Yes,  you are.  It's slightly confusing.  -next branches are for things
decidedly going into the next release of the kernel.  If they are
unstable, they aren't really proven to be ready then.

josh

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


RE: [PATCH] [V3] powerpc: Xilinx: PS2: Added new XPS PS2 driver

2008-07-09 Thread John Linn
These look like good comments from Peter.

Dmitry, how would you like to do this, would you prefer us to do an
incremental patch from the existing patch (V3)?  Or a new V4 for the
patch?

Peter, with regard to the data sheet, I would prefer not to put a
specific URL in as things always seem to get moved around so anything
beyond xilinx.com would likely be wrong sometime in the future.

Thanks,
John

 -Original Message-
 From: Peter Korsgaard [mailto:[EMAIL PROTECTED] On Behalf Of Peter
Korsgaard
 Sent: Tuesday, July 08, 2008 3:00 AM
 To: John Linn
 Cc: linuxppc-dev@ozlabs.org; [EMAIL PROTECTED];
[EMAIL PROTECTED];
 [EMAIL PROTECTED]; [EMAIL PROTECTED]; Sadanand
Mutyala
 Subject: Re: [PATCH] [V3] powerpc: Xilinx: PS2: Added new XPS PS2
driver
 
  John == John Linn [EMAIL PROTECTED] writes:
 
 Hi,
 
   Added a new driver for Xilinx XPS PS2 IP. This driver is
   a flat driver to better match the Linux driver pattern.
 
   Signed-off-by: Sadanand [EMAIL PROTECTED]
   Signed-off-by: John Linn [EMAIL PROTECTED]
   ---
   V2
  Updated the driver based on feedback from Dmitry, Peter, and
Grant.
  We believe Montavista copyright is still valid.
   V3
  Incorporated Dmitry and Grant's 2nd set of comments which were
some
  minor cleanup and removal of the mutex which was not needed.
 
drivers/input/serio/Kconfig  |5 +
drivers/input/serio/Makefile |1 +
drivers/input/serio/xilinx_ps2.c |  384
++
3 files changed, 390 insertions(+), 0 deletions(-)
create mode 100644 drivers/input/serio/xilinx_ps2.c
 
   diff --git a/drivers/input/serio/Kconfig
b/drivers/input/serio/Kconfig
   index ec4b661..0e62b39 100644
   --- a/drivers/input/serio/Kconfig
   +++ b/drivers/input/serio/Kconfig
   @@ -190,4 +190,9 @@ config SERIO_RAW
To compile this driver as a module, choose M here: the
module will be called serio_raw.
 
   +config SERIO_XILINX_XPS_PS2
   +  tristate Xilinx XPS PS/2 Controller Support
   +  help
   +This driver supports XPS PS/2 IP from Xilinx EDK.
   +
endif
   diff --git a/drivers/input/serio/Makefile
b/drivers/input/serio/Makefile
   index 38b8868..9b6c813 100644
   --- a/drivers/input/serio/Makefile
   +++ b/drivers/input/serio/Makefile
   @@ -21,3 +21,4 @@ obj-$(CONFIG_SERIO_PCIPS2)   += pcips2.o
obj-$(CONFIG_SERIO_MACEPS2)   += maceps2.o
obj-$(CONFIG_SERIO_LIBPS2)+= libps2.o
obj-$(CONFIG_SERIO_RAW)   += serio_raw.o
   +obj-$(CONFIG_SERIO_XILINX_XPS_PS2)+= xilinx_ps2.o
   diff --git a/drivers/input/serio/xilinx_ps2.c
b/drivers/input/serio/xilinx_ps2.c
   new file mode 100644
   index 000..e86f11b
   --- /dev/null
   +++ b/drivers/input/serio/xilinx_ps2.c
   @@ -0,0 +1,384 @@
   +/*
   + * Xilinx XPS PS/2 device driver
   + *
   + * (c) 2005 MontaVista Software, Inc.
   + * (c) 2008 Xilinx, Inc.
   + *
   + * This program is free software; you can redistribute it and/or
modify it
   + * under the terms of the GNU General Public License as published
by the
   + * Free Software Foundation; either version 2 of the License, or
(at your
   + * option) any later version.
   + *
   + * You should have received a copy of the GNU General Public
License along
   + * with this program; if not, write to the Free Software
Foundation, Inc.,
   + * 675 Mass Ave, Cambridge, MA 02139, USA.
   + */
   +
   +
   +#include linux/module.h
   +#include linux/serio.h
   +#include linux/interrupt.h
   +#include linux/errno.h
   +#include linux/init.h
   +#include linux/list.h
   +#include linux/io.h
   +
   +#include linux/of_device.h
   +#include linux/of_platform.h
   +
   +#define DRIVER_NAME   xilinx_ps2
   +
 
 Is there an online datasheet available somewhere on xilinx.com? (I
 couldn't find any right away) - If so, please add a link here.
 
   +/* Register offsets for the xps2 device */
   +#define XPS2_SRST_OFFSET  0x /* Software Reset register */
   +#define XPS2_STATUS_OFFSET0x0004 /* Status register */
   +#define XPS2_RX_DATA_OFFSET   0x0008 /* Receive Data
register */
   +#define XPS2_TX_DATA_OFFSET   0x000C /* Transmit Data
register */
   +#define XPS2_GIER_OFFSET  0x002C /* Global Interrupt Enable
reg */
   +#define XPS2_IPISR_OFFSET 0x0030 /* Interrupt Status register
*/
   +#define XPS2_IPIER_OFFSET 0x0038 /* Interrupt Enable register
*/
   +
   +/* Reset Register Bit Definitions */
   +#define XPS2_SRST_RESET   0x000A /* Software Reset  */
   +
   +/* Status Register Bit Positions */
   +#define XPS2_STATUS_RX_FULL   0x0001 /* Receive Full  */
   +#define XPS2_STATUS_TX_FULL   0x0002 /* Transmit Full  */
   +
   +/* Bit definitions for ISR/IER registers. Both the registers have
the same bit
   + * definitions and are only defined once. */
   +#define XPS2_IPIXR_WDT_TOUT   0x0001 /* Watchdog Timeout
Interrupt */
   +#define XPS2_IPIXR_TX_NOACK   0x0002 /* 

Re: Updates to powerpc.git

2008-07-09 Thread Kumar Gala


On Jul 9, 2008, at 11:31 AM, Josh Boyer wrote:


On Wed, 2008-07-09 at 10:20 -0600, Grant Likely wrote:

On Thu, Jul 10, 2008 at 02:08:32AM +1000, Stephen Rothwell wrote:

Kumar,

On Wed, 9 Jul 2008 07:58:38 -0500 Kumar Gala [EMAIL PROTECTED] 
 wrote:


What is your intent with the 'master' branch?  I hope you do NOT  
plan
on ever rebasing it.  I assume if a patch gets into master and we  
drop

it you'll do a git-revert of it?


Ever is such a strong word.  Even Paul on occasion rebased his  
master

branch.  I see no reason why Ben could not run his master (or maybe
better named test) branch as a place that patches come and go  
and his
next branch as something that never (or very rarely) gets  
rebased with
commits progressing from master (test) to next when he is  
satisfied with

them. People should then base further work in the next branch.


I was under the impression that there was some consensus that -next
branches should be used for unstable experiments.  Am I mistaken?


Yes,  you are.  It's slightly confusing.  -next branches are for  
things

decidedly going into the next release of the kernel.  If they are
unstable, they aren't really proven to be ready then.


Did, GregKH start up a tree for code not quite ready ( -staging).

I think master and -next should not be rebased (if it can be  
avoided).  and -staging can be.


- k
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Please pull from 'powerpc-next' branch

2008-07-09 Thread Stephen Rothwell
Hi Kumar,

On Wed, 9 Jul 2008 08:13:03 -0500 (CDT) Kumar Gala [EMAIL PROTECTED] wrote:

 Please pull from 'powerpc-next' branch of
 
   master.kernel.org:/pub/scm/linux/kernel/git/galak/dts.git powerpc-next

$ git ls-remote ssh://master.kernel.org/pub/scm/linux/kernel/git/galak/dts.git
fatal: '/pub/scm/linux/kernel/git/galak/dts.git': unable to chdir or not a git 
archive
fatal: The remote end hung up unexpectedly

Did you mean .../powerpc.git?

Also, the master branch of that tree has the same problem I came up
against in linux-next today: include/asm-powerpc/pgtable-ppc64.h
mismerges between Linus' tree and the Paul's tree so you end up with two
copies of huge_ptep_set_wrprotect.  So you should amend the merge to
remove one.

-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgp54GpUwkYTb.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: Updates to powerpc.git

2008-07-09 Thread Stephen Rothwell
Hi Grant,

On Wed, 9 Jul 2008 10:20:08 -0600 Grant Likely [EMAIL PROTECTED] wrote:

 I was under the impression that there was some consensus that -next
 branches should be used for unstable experiments.  Am I mistaken?

Completely.  Anything that will end up in linux-next must be posted,
reviewed, unit tested and intended for the next merge window.  i.e. you
must have basically finished with it (except for inter-subsystem merge
problems and bugs, or course).

-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgp1fCoTbFGAW.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: Updates to powerpc.git

2008-07-09 Thread Josh Boyer
On Wed, 9 Jul 2008 11:47:45 -0500
Kumar Gala [EMAIL PROTECTED] wrote:

 
 On Jul 9, 2008, at 11:31 AM, Josh Boyer wrote:
 
  On Wed, 2008-07-09 at 10:20 -0600, Grant Likely wrote:
  On Thu, Jul 10, 2008 at 02:08:32AM +1000, Stephen Rothwell wrote:
  Kumar,
 
  On Wed, 9 Jul 2008 07:58:38 -0500 Kumar Gala [EMAIL PROTECTED] 
   wrote:
 
  What is your intent with the 'master' branch?  I hope you do NOT  
  plan
  on ever rebasing it.  I assume if a patch gets into master and we  
  drop
  it you'll do a git-revert of it?
 
  Ever is such a strong word.  Even Paul on occasion rebased his  
  master
  branch.  I see no reason why Ben could not run his master (or maybe
  better named test) branch as a place that patches come and go  
  and his
  next branch as something that never (or very rarely) gets  
  rebased with
  commits progressing from master (test) to next when he is  
  satisfied with
  them. People should then base further work in the next branch.
 
  I was under the impression that there was some consensus that -next
  branches should be used for unstable experiments.  Am I mistaken?
 
  Yes,  you are.  It's slightly confusing.  -next branches are for  
  things
  decidedly going into the next release of the kernel.  If they are
  unstable, they aren't really proven to be ready then.
 
 Did, GregKH start up a tree for code not quite ready ( -staging).

Yes.  The proliferation of trees is getting to be a bit ridiculous.
We have Linus, -next, -mm, -staging, plus all the subsystem variants of
those.

The answer to What tree do I develop against _should_ be -next, but
sometimes that isn't the case and finding the answer isn't getting
easier.

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Updates to powerpc.git

2008-07-09 Thread Stephen Rothwell
Hi Kumar,

On Wed, 9 Jul 2008 11:47:45 -0500 Kumar Gala [EMAIL PROTECTED] wrote:

 Did, GregKH start up a tree for code not quite ready ( -staging).

Greg's staging tree is for whole drivers etc not in the kernel yet that
need work to get there.

-- 
Cheers,
Stephen Rothwell[EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/


pgpB0LW7CJ3ZL.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: Updates to powerpc.git

2008-07-09 Thread Grant Likely
On Thu, Jul 10, 2008 at 03:23:46AM +1000, Stephen Rothwell wrote:
 Hi Grant,
 
 On Wed, 9 Jul 2008 10:20:08 -0600 Grant Likely [EMAIL PROTECTED] wrote:
 
  I was under the impression that there was some consensus that -next
  branches should be used for unstable experiments.  Am I mistaken?
 
 Completely.  Anything that will end up in linux-next must be posted,
 reviewed, unit tested and intended for the next merge window.  i.e. you
 must have basically finished with it (except for inter-subsystem merge
 problems and bugs, or course).

Okay, thanks for the correction.

Cheers,
g.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] PowerPC 44x: Adjust warp-nand resource end address

2008-07-09 Thread Valentine Barshak
Adjust the NDFC resource end value (resource size = end - start + 1).

Signed-off-by: Valentine Barshak [EMAIL PROTECTED]
---
 arch/powerpc/platforms/44x/warp-nand.c |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- a/arch/powerpc/platforms/44x/warp-nand.c2008-07-01 20:39:07.0 
+0400
+++ b/arch/powerpc/platforms/44x/warp-nand.c2008-07-09 20:22:31.0 
+0400
@@ -24,7 +24,7 @@
 
 static struct resource warp_ndfc = {
.start = WARP_NAND_FLASH_REG_ADDR,
-   .end   = WARP_NAND_FLASH_REG_ADDR + WARP_NAND_FLASH_REG_SIZE,
+   .end   = WARP_NAND_FLASH_REG_ADDR + WARP_NAND_FLASH_REG_SIZE - 1,
.flags = IORESOURCE_MEM,
 };
 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] [V3] powerpc: Xilinx: PS2: Added new XPS PS2 driver

2008-07-09 Thread Dmitry Torokhov
On Wed, Jul 9, 2008 at 12:14 PM, John Linn [EMAIL PROTECTED] wrote:
 These look like good comments from Peter.

 Dmitry, how would you like to do this, would you prefer us to do an
 incremental patch from the existing patch (V3)?  Or a new V4 for the
 patch?


Incremental please. I already committed V3 to the 'next' branch and I
don't want to rebuild it unless the patch is completely broken so
incremental cleanup is the way to go.

Thanks.

-- 
Dmitry
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Please pull 'next' branch of 4xx tree

2008-07-09 Thread Josh Boyer
Hi Ben and Paul,

Please pull from:

 master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git next

to get some more changes for .27.  These include the TLB rework patch,
support for the Virtex5 platform, some bootwrapper documentation and
patches, and various other fixes.

josh

Benjamin Herrenschmidt (1):
  powerpc: rework 4xx PTE access and TLB miss

Grant Likely (4):
  powerpc/bootwrapper: Add documentation of boot wrapper targets
  powerpc/bootwrapper: add missing bit of simpleImage target
  powerpc/bootwrapper: Allow user to specify additional default targets
  powerpc/440: Convert Virtex ML507 device tree to dts-v1

John Linn (5):
  powerpc/virtex: add dts file for ML507 reference design
  powerpc/virtex: Fix booting of Xilinx FPGAs with 16550 for 405 and 440
  powerpc/virtex: add Xilinx Virtex 5 ppc440 platform support
  powerpc/virtex: add Xilinx 440 cpu to the cputable
  powerpc/virtex: add defconfig for virtex 5 platforms

Josh Boyer (2):
  Merge branch 'virtex-for-2.6.27' of git://git.secretlab.ca/git/linux-2.6-v
  powerpc/44x: Update ppc44x_defconfig

Sean MacLennan (1):
  powerpc/44x: Support NAND boot for Rev A Warp boards

Stefan Roese (1):
  powerpc: Fix problems with 32bit PPC's running with = 4GB of RAM

 Documentation/powerpc/bootwrapper.txt  |  141 
 arch/powerpc/Kconfig   |   13 +
 arch/powerpc/Makefile  |   15 +-
 arch/powerpc/boot/Makefile |5 +-
 arch/powerpc/boot/dts/virtex440-ml507.dts  |  296 
 arch/powerpc/boot/simpleboot.c |6 +
 arch/powerpc/boot/virtex.c |  100 +++
 arch/powerpc/boot/wrapper  |   10 +-
 arch/powerpc/configs/44x/virtex5_defconfig | 1107 
 arch/powerpc/configs/ppc44x_defconfig  |  149 +++--
 arch/powerpc/kernel/cputable.c |   10 +
 arch/powerpc/kernel/head_44x.S |  286 +++-
 arch/powerpc/kernel/head_booke.h   |8 +
 arch/powerpc/mm/44x_mmu.c  |   29 +-
 arch/powerpc/mm/fault.c|3 +-
 arch/powerpc/mm/init_32.c  |4 +-
 arch/powerpc/mm/mem.c  |8 +-
 arch/powerpc/mm/mmu_decl.h |4 +-
 arch/powerpc/platforms/44x/Kconfig |   26 +
 arch/powerpc/platforms/44x/Makefile|1 +
 arch/powerpc/platforms/44x/virtex.c|   60 ++
 arch/powerpc/platforms/44x/warp-nand.c |9 +-
 include/asm-powerpc/pgtable-ppc32.h|   61 ++-
 23 files changed, 2086 insertions(+), 265 deletions(-)
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 0/3] ALSA fixes for non-coherent ppc32

2008-07-09 Thread Benjamin Herrenschmidt

 The changes in ppc are only the patch below.  The others are in
 sound/*.  I wrote it as an inline function simply it's so short and I
 didn't want extra exports.

Thanks. I -may- do something nicer, we'll see, but in any case, I'll
try to have something in .27

Cheers,
Ben.

 
 thanks,
 
 Takashi
 
 ---
 commit 2c8662fde57af4cf928d17e089dc3dd2096f4b30
 Author: Takashi Iwai [EMAIL PROTECTED]
 Date:   Tue Jun 17 16:39:04 2008 +0200
 
 ppc: Add dma_mmap_coherent() for PPC32
 
 A very lazy version of dma_mmap_coherent() implementation for ppc32.
 
 Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
 
 diff --git a/include/asm-powerpc/dma-mapping.h 
 b/include/asm-powerpc/dma-mapping.h
 index bbefb69..a6a9675 100644
 --- a/include/asm-powerpc/dma-mapping.h
 +++ b/include/asm-powerpc/dma-mapping.h
 @@ -306,6 +306,24 @@ static inline void dma_unmap_sg(struct device *dev, 
 struct scatterlist *sg,
   /* We don't do anything here. */
  }
  
 +/*
 + * A helper to mmap the pages allocated via dma_alloc_coherent()
 + */
 +static inline int dma_mmap_coherent(struct device *dev,
 + struct vm_area_struct *vma,
 + void *cpu_addr, dma_addr_t handle,
 + size_t size)
 +{
 + struct page *pg;
 +#ifdef CONFIG_NOT_COHERENT_CACHE
 + /* I'm too lazy and can't stop using bus_to_virt() here... */
 + cpu_addr = bus_to_virt(handle);
 +#endif
 + pg = virt_to_page(cpu_addr);
 + return remap_pfn_range(vma, vma-vm_start,
 +page_to_pfn(pg) + vma-vm_pgoff,
 +size, vma-vm_page_prot);
 +}
  #endif /* CONFIG_PPC64 */
  
  static inline void dma_sync_single_for_cpu(struct device *dev,

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc: Fix problems with 32bit PPC's running with more than 2GB of RAM

2008-07-09 Thread Benjamin Herrenschmidt
On Wed, 2008-07-09 at 15:44 +0200, Stefan Roese wrote:
 This patch enables 32bit PPC's (with 36bit physical address space, e.g.
 IBM/AMCC PPC44x) to run with more than 2GB of RAM. Mostly its just
 replacing types (unsigned long - phys_addr_t).
 
 Tested on an AMCC Katmai with 4GB of DDR2.
 
 Signed-off-by: Stefan Roese [EMAIL PROTECTED]

But DMAs will break no ?

Ben.

 ---
  arch/powerpc/mm/init_32.c  |4 ++--
  arch/powerpc/mm/mem.c  |8 
  arch/powerpc/mm/mmu_decl.h |4 ++--
  3 files changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
 index 1952b4d..325ccdd 100644
 --- a/arch/powerpc/mm/init_32.c
 +++ b/arch/powerpc/mm/init_32.c
 @@ -56,8 +56,8 @@
  
  DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
  
 -unsigned long total_memory;
 -unsigned long total_lowmem;
 +phys_addr_t total_memory;
 +phys_addr_t total_lowmem;
  
  phys_addr_t memstart_addr = (phys_addr_t)~0ull;
  EXPORT_SYMBOL(memstart_addr);
 diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
 index 51f82d8..55ef772 100644
 --- a/arch/powerpc/mm/mem.c
 +++ b/arch/powerpc/mm/mem.c
 @@ -329,7 +329,7 @@ static int __init mark_nonram_nosave(void)
  void __init paging_init(void)
  {
   unsigned long total_ram = lmb_phys_mem_size();
 - unsigned long top_of_ram = lmb_end_of_DRAM();
 + phys_addr_t top_of_ram = lmb_end_of_DRAM();
   unsigned long max_zone_pfns[MAX_NR_ZONES];
  
  #ifdef CONFIG_PPC32
 @@ -348,10 +348,10 @@ void __init paging_init(void)
   kmap_prot = PAGE_KERNEL;
  #endif /* CONFIG_HIGHMEM */
  
 - printk(KERN_DEBUG Top of RAM: 0x%lx, Total RAM: 0x%lx\n,
 -top_of_ram, total_ram);
 + printk(KERN_DEBUG Top of RAM: 0x%llx, Total RAM: 0x%lx\n,
 +(u64)top_of_ram, total_ram);
   printk(KERN_DEBUG Memory hole size: %ldMB\n,
 -(top_of_ram - total_ram)  20);
 +(long int)((top_of_ram - total_ram)  20));
   memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
  #ifdef CONFIG_HIGHMEM
   max_zone_pfns[ZONE_DMA] = lowmem_end_addr  PAGE_SHIFT;
 diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
 index 0480225..4e46c63 100644
 --- a/arch/powerpc/mm/mmu_decl.h
 +++ b/arch/powerpc/mm/mmu_decl.h
 @@ -49,8 +49,8 @@ extern unsigned int num_tlbcam_entries;
  extern unsigned long ioremap_bot;
  extern unsigned long __max_low_memory;
  extern phys_addr_t __initial_memory_limit_addr;
 -extern unsigned long total_memory;
 -extern unsigned long total_lowmem;
 +extern phys_addr_t total_memory;
 +extern phys_addr_t total_lowmem;
  extern phys_addr_t memstart_addr;
  extern phys_addr_t lowmem_end_addr;
  

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc: Fix problems with 32bit PPC's running with more than 2GB of RAM

2008-07-09 Thread Josh Boyer
On Thu, 10 Jul 2008 06:02:38 +1000
Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:

 On Wed, 2008-07-09 at 15:44 +0200, Stefan Roese wrote:
  This patch enables 32bit PPC's (with 36bit physical address space, e.g.
  IBM/AMCC PPC44x) to run with more than 2GB of RAM. Mostly its just
  replacing types (unsigned long - phys_addr_t).
  
  Tested on an AMCC Katmai with 4GB of DDR2.
  
  Signed-off-by: Stefan Roese [EMAIL PROTECTED]
 
 But DMAs will break no ?

How?

josh
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] powerpc: Fix problems with 32bit PPC's running with more than 2GB of RAM

2008-07-09 Thread Benjamin Herrenschmidt
On Wed, 2008-07-09 at 16:22 -0400, Josh Boyer wrote:
 On Thu, 10 Jul 2008 06:02:38 +1000
 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote:
 
  On Wed, 2008-07-09 at 15:44 +0200, Stefan Roese wrote:
   This patch enables 32bit PPC's (with 36bit physical address space, e.g.
   IBM/AMCC PPC44x) to run with more than 2GB of RAM. Mostly its just
   replacing types (unsigned long - phys_addr_t).
   
   Tested on an AMCC Katmai with 4GB of DDR2.
   
   Signed-off-by: Stefan Roese [EMAIL PROTECTED]
  
  But DMAs will break no ?
 
 How?

Hrm... forget it. It's fine up to 4G of RAM... (ie. as long as DMA is
below 32 bits).

Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 1/4][Version 3] MPC5121 Update MPC5121ADS device tree

2008-07-09 Thread John Rigby
Current device tree is only bare bones.  This patch
adds nodes to make it a complete tree for MPC5121ads.

Added nodes include:
mbx  - opengl coprocessor
nfc  - nand flash controller
cpld-pic - on board cpld
rtc
clock- clock control
pmc  - power management control
gpio
mscan- can module
i2c
axe  - audio coprocessor
display  - display interface unit
mdio
ethernet
usb
ioctl- pin config
pata
ac97 - PSC configured as AC97
pscfifo  - psc fifo configuration
dma
pci

Fix typo in header changing MDS to ADS.

Add a compatible property of the form fsl,mpc5121-...
to nodes missing one.

Changed localbus compatible to fsl,mpc5121-localbus, this does
not break anything because the only code that uses it finds it
via the node name, not compatible.

Signed-off-by: John Rigby [EMAIL PROTECTED]
---
 arch/powerpc/boot/dts/mpc5121ads.dts |  310 --
 1 files changed, 299 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/boot/dts/mpc5121ads.dts 
b/arch/powerpc/boot/dts/mpc5121ads.dts
index 94ad7b2..1f9036c 100644
--- a/arch/powerpc/boot/dts/mpc5121ads.dts
+++ b/arch/powerpc/boot/dts/mpc5121ads.dts
@@ -1,7 +1,7 @@
 /*
- * MPC5121E MDS Device Tree Source
+ * MPC5121E ADS Device Tree Source
  *
- * Copyright 2007 Freescale Semiconductor Inc.
+ * Copyright 2007,2008 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
@@ -17,6 +17,10 @@
#address-cells = 1;
#size-cells = 1;
 
+   aliases {
+   pci = pci;
+   };
+
cpus {
#address-cells = 1;
#size-cells = 0;
@@ -39,8 +43,41 @@
reg = 0x 0x1000;  // 256MB at 0
};
 
+   [EMAIL PROTECTED] {
+   compatible = fsl,mpc5121-mbx;
+   reg = 0x2000 0x4000;
+   interrupts = 66 0x8;
+   interrupt-parent =  ipic ;
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = fsl,mpc5121-sram;
+   reg = 0x3000 0x2; // 128K at 0x3000
+   };
+
+   [EMAIL PROTECTED] {
+   compatible = fsl,mpc5121-nfc;
+   reg = 0x4000 0x10;// 1M at 0x4000
+   interrupts = 6 8;
+   interrupt-parent =  ipic ;
+   #address-cells = 1;
+   #size-cells = 1;
+   bank-width = 1;
+   // ADS has two Hynix 512MB Nand flash chips in a single
+   // stacked package .
+   chips = 2;
+   [EMAIL PROTECTED] {
+   label = nand0;
+   reg = 0x 0x0200;  // first 32 MB of chip 0
+   };
+   [EMAIL PROTECTED] {
+   label = nand1;
+   reg = 0x2000 0x0200;  // first 32 MB of chip 1
+   };
+   };
+
[EMAIL PROTECTED] {
-   compatible = fsl,mpc5121ads-localbus;
+   compatible = fsl,mpc5121-localbus;
#address-cells = 2;
#size-cells = 1;
reg = 0x8020 0x40;
@@ -51,14 +88,51 @@
[EMAIL PROTECTED],0 {
compatible = cfi-flash;
reg = 0 0x0 0x400;
+   #address-cells = 1;
+   #size-cells = 1;
bank-width = 4;
-   device-width = 1;
+   device-width = 2;
+   [EMAIL PROTECTED] {
+   label = protected;
+   reg = 0x 0x0004;  // first sector 
is protected
+   read-only;
+   };
+   [EMAIL PROTECTED] {
+   label = filesystem;
+   reg = 0x0004 0x03c0;  // 60M for 
filesystem
+   };
+   [EMAIL PROTECTED] {
+   label = kernel;
+   reg = 0x03c4 0x0028;  // 2.5M for 
kernel
+   };
+   [EMAIL PROTECTED] {
+   label = device-tree;
+   reg = 0x03ec 0x0004;  // one sector 
for device tree
+   };
+   [EMAIL PROTECTED] {
+   label = u-boot;
+   reg = 0x03f0 0x0010;  // 1M for u-boot
+   read-only;
+   };
};
 
[EMAIL PROTECTED],0 {
compatible = fsl,mpc5121ads-cpld;
reg = 0x2 0x0 0x8000;

[PATCH 3/4][Version 3] MPC5121 Add generic board support

2008-07-09 Thread John Rigby
Move shared code from mpc5121_ads.c to new file mpc512x_shared.c
mpc512x_find_ips_freq - unchanged
contents of mpc5121_ads_init_IRQ - mpc512x_init_IRQ
looking for fsl,mpc5121-ipic instead of fsl,ipic
mpc5121_ads_declare_of_platform_devices - 
mpc5121_declare_of_platform_devices
and use compatible for lookup instead of node name

Add new generic board setup mpc5121_generic.c

Signed-off-by: John Rigby [EMAIL PROTECTED]
---
 arch/powerpc/platforms/512x/Kconfig|   15 -
 arch/powerpc/platforms/512x/Makefile   |3 +-
 arch/powerpc/platforms/512x/mpc5121_ads.c  |   64 ++--
 arch/powerpc/platforms/512x/mpc5121_generic.c  |   58 ++
 arch/powerpc/platforms/512x/mpc512x.h  |   17 +
 .../512x/{mpc5121_ads.c = mpc512x_shared.c}   |   57 ++
 6 files changed, 112 insertions(+), 102 deletions(-)
 create mode 100644 arch/powerpc/platforms/512x/mpc5121_generic.c
 create mode 100644 arch/powerpc/platforms/512x/mpc512x.h
 copy arch/powerpc/platforms/512x/{mpc5121_ads.c = mpc512x_shared.c} (55%)

diff --git a/arch/powerpc/platforms/512x/Kconfig 
b/arch/powerpc/platforms/512x/Kconfig
index 162af06..5d72dc3 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -3,12 +3,10 @@ config PPC_MPC512x
select FSL_SOC
select IPIC
select PPC_CLOCK
-   default n
 
 config PPC_MPC5121
bool
select PPC_MPC512x
-   default n
 
 config MPC5121_ADS
bool Freescale MPC5121E ADS
@@ -17,4 +15,15 @@ config MPC5121_ADS
select PPC_MPC5121
help
  This option enables support for the MPC5121E ADS board.
-   default n
+
+config MPC5121_GENERIC
+   bool Generic support for simple MPC5121 based boards
+   depends on PPC_MULTIPLATFORM  PPC32
+   select DEFAULT_UIMAGE
+   select PPC_MPC5121
+   help
+ This option enables support for simple MPC5121 based boards
+ which do not need custom platform specific setup.
+
+ Compatible boards include:  Protonic LVT base boards (ZANMCU
+ and VICVT2).
diff --git a/arch/powerpc/platforms/512x/Makefile 
b/arch/powerpc/platforms/512x/Makefile
index 90910c1..8090e22 100644
--- a/arch/powerpc/platforms/512x/Makefile
+++ b/arch/powerpc/platforms/512x/Makefile
@@ -1,5 +1,6 @@
 #
 # Makefile for the Freescale PowerPC 512x linux kernel.
 #
-obj-y  += clock.o
+obj-y  += clock.o mpc512x_shared.o
 obj-$(CONFIG_MPC5121_ADS)  += mpc5121_ads.o
+obj-$(CONFIG_MPC5121_GENERIC)  += mpc5121_generic.o
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c 
b/arch/powerpc/platforms/512x/mpc5121_ads.c
index 50bd3a3..3ec9ca3 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
+ * Copyright (C) 2007, 2008 Freescale Semiconductor, Inc. All rights reserved.
  *
  * Author: John Rigby, [EMAIL PROTECTED], Thur Mar 29 2007
  *
@@ -15,7 +15,6 @@
 
 #include linux/kernel.h
 #include linux/io.h
-#include linux/irq.h
 #include linux/of_platform.h
 
 #include asm/machdep.h
@@ -23,65 +22,11 @@
 #include asm/prom.h
 #include asm/time.h
 
-/**
- * mpc512x_find_ips_freq - Find the IPS bus frequency for a device
- * @node:  device node
- *
- * Returns IPS bus frequency, or 0 if the bus frequency cannot be found.
- */
-unsigned long
-mpc512x_find_ips_freq(struct device_node *node)
-{
-   struct device_node *np;
-   const unsigned int *p_ips_freq = NULL;
-
-   of_node_get(node);
-   while (node) {
-   p_ips_freq = of_get_property(node, bus-frequency, NULL);
-   if (p_ips_freq)
-   break;
-
-   np = of_get_parent(node);
-   of_node_put(node);
-   node = np;
-   }
-   if (node)
-   of_node_put(node);
-
-   return p_ips_freq ? *p_ips_freq : 0;
-}
-EXPORT_SYMBOL(mpc512x_find_ips_freq);
-
-static struct of_device_id __initdata of_bus_ids[] = {
-   { .name = soc, },
-   { .name = localbus, },
-   {},
-};
-
-static void __init mpc5121_ads_declare_of_platform_devices(void)
-{
-   /* Find every child of the SOC node and add it to of_platform */
-   if (of_platform_bus_probe(NULL, of_bus_ids, NULL))
-   printk(KERN_ERR __FILE__ : 
-   Error while probing of_platform bus\n);
-}
+#include mpc512x.h
 
 static void __init mpc5121_ads_init_IRQ(void)
 {
-   struct device_node *np;
-
-   np = of_find_compatible_node(NULL, NULL, fsl,ipic);
-   if (!np)
-   return;
-
-   ipic_init(np, 0);
-   of_node_put(np);
-
-   /*
-* Initialize the default interrupt mapping priorities,
-* in case the boot rom changed something on us.
-*/
-   

[PATCH 4/4][Version 3] MPC5121 Add MPC5121ADS cpld support

2008-07-09 Thread John Rigby
Add a interrupt host for the interrupt
controller in the mpc5121ads cpld.
PCI interrupts are 0-7 the rest are 8-15
Touchscreen pendown irq is hardwired to irq1
All other irqs are chained to irq0

Signed-off-by: John Rigby [EMAIL PROTECTED]
---
 arch/powerpc/platforms/512x/Kconfig|1 +
 arch/powerpc/platforms/512x/Makefile   |2 +-
 arch/powerpc/platforms/512x/mpc5121_ads.c  |   11 ++
 arch/powerpc/platforms/512x/mpc5121_ads.h  |   16 ++
 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c |  204 
 5 files changed, 233 insertions(+), 1 deletions(-)
 create mode 100644 arch/powerpc/platforms/512x/mpc5121_ads.h
 create mode 100644 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c

diff --git a/arch/powerpc/platforms/512x/Kconfig 
b/arch/powerpc/platforms/512x/Kconfig
index 5d72dc3..c62f893 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -13,6 +13,7 @@ config MPC5121_ADS
depends on PPC_MULTIPLATFORM  PPC32
select DEFAULT_UIMAGE
select PPC_MPC5121
+   select MPC5121_ADS_CPLD
help
  This option enables support for the MPC5121E ADS board.
 
diff --git a/arch/powerpc/platforms/512x/Makefile 
b/arch/powerpc/platforms/512x/Makefile
index 8090e22..90be2f5 100644
--- a/arch/powerpc/platforms/512x/Makefile
+++ b/arch/powerpc/platforms/512x/Makefile
@@ -2,5 +2,5 @@
 # Makefile for the Freescale PowerPC 512x linux kernel.
 #
 obj-y  += clock.o mpc512x_shared.o
-obj-$(CONFIG_MPC5121_ADS)  += mpc5121_ads.o
+obj-$(CONFIG_MPC5121_ADS)  += mpc5121_ads.o mpc5121_ads_cpld.o
 obj-$(CONFIG_MPC5121_GENERIC)  += mpc5121_generic.o
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.c 
b/arch/powerpc/platforms/512x/mpc5121_ads.c
index 3ec9ca3..5ebf693 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads.c
@@ -23,10 +23,21 @@
 #include asm/time.h
 
 #include mpc512x.h
+#include mpc5121_ads.h
+
+static void __init mpc5121_ads_setup_arch(void)
+{
+   printk(KERN_INFO MPC5121 ADS board from Freescale Semiconductor\n);
+   /*
+* cpld regs are needed early
+*/
+   mpc5121_ads_cpld_map();
+}
 
 static void __init mpc5121_ads_init_IRQ(void)
 {
mpc512x_init_IRQ();
+   mpc5121_ads_cpld_pic_init();
 }
 
 /*
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads.h 
b/arch/powerpc/platforms/512x/mpc5121_ads.h
new file mode 100644
index 000..662076c
--- /dev/null
+++ b/arch/powerpc/platforms/512x/mpc5121_ads.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ *
+ * Prototypes for ADS5121 specific code
+ */
+
+#ifndef __MPC512ADS_H__
+#define __MPC512ADS_H__
+extern void __init mpc5121_ads_cpld_map(void);
+extern void __init mpc5121_ads_cpld_pic_init(void);
+#endif /* __MPC512ADS_H__ */
diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c 
b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
new file mode 100644
index 000..a6ce805
--- /dev/null
+++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
@@ -0,0 +1,204 @@
+/*
+ * Copyright (C) 2008 Freescale Semiconductor, Inc. All rights reserved.
+ *
+ * Author: John Rigby, [EMAIL PROTECTED]
+ *
+ * Description:
+ * MPC5121ADS CPLD irq handling
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#undef DEBUG
+
+#include linux/kernel.h
+#include linux/interrupt.h
+#include linux/irq.h
+#include linux/io.h
+#include asm/prom.h
+
+static struct device_node *cpld_pic_node;
+static struct irq_host *cpld_pic_host;
+
+/*
+ * Bits to ignore in the misc_status register
+ * 0x10 touch screen pendown is hard routed to irq1
+ * 0x02 pci status is read from pci status register
+ */
+#define MISC_IGNORE 0x12
+
+/*
+ * Nothing to ignore in pci status register
+ */
+#define PCI_IGNORE 0x00
+
+struct cpld_pic {
+   u8 pci_mask;
+   u8 pci_status;
+   u8 route;
+   u8 misc_mask;
+   u8 misc_status;
+   u8 misc_control;
+};
+
+static struct cpld_pic __iomem *cpld_regs;
+
+static void __iomem *
+irq_to_pic_mask(unsigned int irq)
+{
+   return irq = 7 ? cpld_regs-pci_mask : cpld_regs-misc_mask;
+}
+
+static unsigned int
+irq_to_pic_bit(unsigned int irq)
+{
+   return 1  (irq  0x7);
+}
+
+static void
+cpld_mask_irq(unsigned int irq)
+{
+   unsigned int cpld_irq = (unsigned int)irq_map[irq].hwirq;
+   void __iomem *pic_mask = irq_to_pic_mask(cpld_irq);
+
+   out_8(pic_mask,
+ 

[PATCH 2/4][Version 3] MPC5121 clock driver

2008-07-09 Thread John Rigby
Plugs into the generic powerpc clock driver in
arch/powerpc/kernel/clock.c

The following subset of clk_interface is implemented:
clk_get, clk_put:  get clock via name, release clock
clk_enable, clk_disable:  enable or disable clock
clk_get_rate:  get clock rate in Hz
clk_set_rate:  stubbed
clk_round_rate:  stubbed
clk_set_parent: NULL
clk_get_parent: NULL

Signed-off-by: John Rigby [EMAIL PROTECTED]
---
 Makefile |1 +
 arch/powerpc/platforms/512x/Kconfig  |1 +
 arch/powerpc/platforms/512x/Makefile |1 +
 arch/powerpc/platforms/512x/clock.c  |  729 ++
 4 files changed, 732 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/platforms/512x/clock.c

diff --git a/Makefile b/Makefile
index 6aff5f4..fc3ae9f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+FRED=42
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 26
diff --git a/arch/powerpc/platforms/512x/Kconfig 
b/arch/powerpc/platforms/512x/Kconfig
index 4c0da0c..162af06 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -2,6 +2,7 @@ config PPC_MPC512x
bool
select FSL_SOC
select IPIC
+   select PPC_CLOCK
default n
 
 config PPC_MPC5121
diff --git a/arch/powerpc/platforms/512x/Makefile 
b/arch/powerpc/platforms/512x/Makefile
index 232c89f..90910c1 100644
--- a/arch/powerpc/platforms/512x/Makefile
+++ b/arch/powerpc/platforms/512x/Makefile
@@ -1,4 +1,5 @@
 #
 # Makefile for the Freescale PowerPC 512x linux kernel.
 #
+obj-y  += clock.o
 obj-$(CONFIG_MPC5121_ADS)  += mpc5121_ads.o
diff --git a/arch/powerpc/platforms/512x/clock.c 
b/arch/powerpc/platforms/512x/clock.c
new file mode 100644
index 000..f416014
--- /dev/null
+++ b/arch/powerpc/platforms/512x/clock.c
@@ -0,0 +1,729 @@
+/*
+ * Copyright (C) 2007,2008 Freescale Semiconductor, Inc. All rights reserved.
+ *
+ * Author: John Rigby [EMAIL PROTECTED]
+ *
+ * Implements the clk api defined in include/linux/clk.h
+ *
+ *Original based on linux/arch/arm/mach-integrator/clock.c
+ *
+ *Copyright (C) 2004 ARM Limited.
+ *Written by Deep Blue Solutions Limited.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include linux/kernel.h
+#include linux/list.h
+#include linux/errno.h
+#include linux/err.h
+#include linux/string.h
+#include linux/clk.h
+#include linux/mutex.h
+#include linux/io.h
+
+#include linux/of_platform.h
+#include asm/mpc512x.h
+#include asm/clk_interface.h
+
+#undef CLK_DEBUG
+
+static int clocks_initialized;
+
+#define CLK_HAS_RATE   0x1 /* has rate in MHz */
+#define CLK_HAS_CTRL   0x2 /* has control reg and bit */
+
+struct clk {
+   struct list_head node;
+   char name[32];
+   int flags;
+   struct device *dev;
+   unsigned long rate;
+   struct module *owner;
+   void (*calc) (struct clk *);
+   struct clk *parent;
+   int reg, bit;   /* CLK_HAS_CTRL */
+   int div_shift;  /* only used by generic_div_clk_calc */
+};
+
+static LIST_HEAD(clocks);
+static DEFINE_MUTEX(clocks_mutex);
+
+static struct clk *mpc5121_clk_get(struct device *dev, const char *id)
+{
+   struct clk *p, *clk = ERR_PTR(-ENOENT);
+   int dev_match = 0;
+   int id_match = 0;
+
+   if (dev == NULL  id == NULL)
+   return NULL;
+
+   mutex_lock(clocks_mutex);
+   list_for_each_entry(p, clocks, node) {
+   if (dev  dev == p-dev)
+   dev_match++;
+   if (strcmp(id, p-name) == 0)
+   id_match++;
+   if ((dev_match || id_match)  try_module_get(p-owner)) {
+   clk = p;
+   break;
+   }
+   }
+   mutex_unlock(clocks_mutex);
+
+   return clk;
+}
+
+#ifdef CLK_DEBUG
+static void dump_clocks(void)
+{
+   struct clk *p;
+
+   mutex_lock(clocks_mutex);
+   printk(KERN_INFO CLOCKS:\n);
+   list_for_each_entry(p, clocks, node) {
+   printk(KERN_INFO   %s %ld, p-name, p-rate);
+   if (p-parent)
+   printk(KERN_INFO  %s %ld, p-parent-name,
+  p-parent-rate);
+   if (p-flags  CLK_HAS_CTRL)
+   printk(KERN_INFO  reg/bit %d/%d, p-reg, p-bit);
+   printk(\n);
+   }
+   mutex_unlock(clocks_mutex);
+}
+#defineDEBUG_CLK_DUMP() dump_clocks()
+#else
+#defineDEBUG_CLK_DUMP()
+#endif
+
+
+static void mpc5121_clk_put(struct clk *clk)
+{
+   module_put(clk-owner);
+}
+
+#define NRPSC 12
+
+struct mpc512x_clockctl {
+   u32 spmr;   /* System PLL Mode Reg */
+   u32 sccr[2];/* System Clk Ctrl Reg 1  2 */
+   u32 scfr1;  /* System Clk Freq 

Two pci patches that are prereq's for MPC5121 pci

2008-07-09 Thread John Rigby
Ben,

Could you pick up these two powerpc pci patches.  Grant Likely ack'd
them both. No one nak'd them.

powerpc: pci config cleanup [rev2]
http://patchwork.ozlabs.org/linuxppc/patchcontent?id=19299

powerpc: Move mpc83xx_add_bridge to fsl_pci.c [rev2]
http://patchwork.ozlabs.org/linuxppc/patchcontent?id=19300

Thanks
John
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Two pci patches that are prereq's for MPC5121 pci

2008-07-09 Thread Benjamin Herrenschmidt
On Wed, 2008-07-09 at 15:07 -0600, John Rigby wrote:
 Ben,
 
 Could you pick up these two powerpc pci patches.  Grant Likely ack'd
 them both. No one nak'd them.
 
 powerpc: pci config cleanup [rev2]
 http://patchwork.ozlabs.org/linuxppc/patchcontent?id=19299

Hrm.. I'm not necessarily fan of the above but I'll give a second look.

 powerpc: Move mpc83xx_add_bridge to fsl_pci.c [rev2]
 http://patchwork.ozlabs.org/linuxppc/patchcontent?id=19300

FSL stuff though go via Kumar.

Cheers,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


initrd problem with device tree

2008-07-09 Thread John Linn
I realize I'm asking below about u-boot, but I'm really trying to better
understand how initrd should work with device trees.  I have also posted
a question to the u-boot user group.

 

When I build the device tree blob into the kernel image and load the
kernel image with my probe, it finds the initrd fine just using
root=/dev/ram and with the kernel configured properly.

 

With the same kernel configuration, when I run with u-boot, the only way
for the kernel to find the initrd is to put linux,initrd-start and
initrd-end in my device tree. I found these items in an old patch from
David Gibson and I'm not sure if or when they should be used.

 

I also notice in booting-without-of.txt, off_mem_rsvmap, but it's not
clear if and how I should be using it to help the problem.

 

Thanks,

John

 

 



This email and any attachments are intended for the sole use of the named 
recipient(s) and contain(s) confidential information that may be proprietary, 
privileged or copyrighted under applicable law. If you are not the intended 
recipient, do not read, copy, or forward this email message or any attachments. 
Delete this email message and any attachments immediately.

___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: Two pci patches that are prereq's for MPC5121 pci

2008-07-09 Thread John Rigby
On Wed, Jul 9, 2008 at 3:52 PM, Benjamin Herrenschmidt
[EMAIL PROTECTED] wrote:
 On Wed, 2008-07-09 at 15:07 -0600, John Rigby wrote:
 Ben,

 Could you pick up these two powerpc pci patches.  Grant Likely ack'd
 them both. No one nak'd them.

 powerpc: pci config cleanup [rev2]
 http://patchwork.ozlabs.org/linuxppc/patchcontent?id=19299

 Hrm.. I'm not necessarily fan of the above but I'll give a second look.

I have no particular attachment to this.  In my first attempt I just
added 5121 to the existing mess, Kumar asked if it could be cleaned
up.  Looks like I can please about one person at a time, but no more
than one:).
 powerpc: Move mpc83xx_add_bridge to fsl_pci.c [rev2]
 http://patchwork.ozlabs.org/linuxppc/patchcontent?id=19300

 FSL stuff though go via Kumar.
Ok.  Kumar can you pick this up?  PCI for 5121 needs it.

 Cheers,
 Ben.



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


latencytop support for powerpc?

2008-07-09 Thread Chris Friesen
Just wondering if anyone has looked at what it would take to support 
latency top on powerpc?


I've got a dual G5 and I'd like to be able to track causes of latency. 
Based on the s390 implementation it doesn't look all that complicated 
for someone who understands what's going on...


Chris
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: linux-next: kbuild tree build failure

2008-07-09 Thread Michael Ellerman
On Tue, 2008-07-08 at 04:55 +0200, Roman Zippel wrote:
 Hi,
 
 On Tue, 8 Jul 2008, Michael Ellerman wrote:
 
  I don't really see why it doesn't make sense for users to input 64-bit
  values, they're configuring addresses for a 64-bit kernel, so some of
  the values are going to be 64 bit.
 
 Do you really expect users to insert random 64bit addresses without making 
 a mistake?

Well yes :)  But I think that's because you're thinking of 
end-users and I'm thinking of users like myself - ie. _I_ use
Kconfig and I do expect myself to be able to type a 64-bit address.


  --- .config.orig2008-07-08 09:30:00.0 +1000
  +++ .config 2008-07-08 09:30:43.0 +1000
  @@ -370,9 +370,8 @@
   CONFIG_HOTPLUG_PCI_RPA=m
   CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
   # CONFIG_HAS_RAPIDIO is not set
  -CONFIG_PAGE_OFFSET=0xc000
  -CONFIG_KERNEL_START=0xc200
  -CONFIG_PHYSICAL_START=0x0200
  +CONFIG_PAGE_OFFSET=0xc000
  +CONFIG_PHYSICAL_START=0x200
 
 Why is this worse? These are constants, you're not supposed to change them 
 anyway.
 The remaining values are generated in page.h and should be the same as 
 before. If that isn't the case and this patch produces a nonworking 
 kernel, I'd like to hear about it.

You're right the built kernel is fine. So it's not a bug, but I think it
is nicer to have the real values in the .config.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH v3] Add MPC5200B base board mvBC-P

2008-07-09 Thread David Gibson
On Wed, Jul 09, 2008 at 11:17:17AM +0200, Andre Schwarz wrote:
 The mvBlueCOUGAR-P is a MPC5200B based camera system with Intel Gigabit 
 ethernet
 controller (using e1000). It's just another MPC5200_simple board.
 
 Signed-off-by: Andre Schwarz [EMAIL PROTECTED]
 ---
 
 Grant,
 
 I've fixed the dts issues from David (cell-index on gpt).

Sorry, found a couple more tiny ones.

[snip]
 +/dts-v1/;
 +
 +/ {
 + model = matrix-vision,mvbc-p;
 + compatible = matrix-vision,mvbc-p;
 + #address-cells = 1;
 + #size-cells = 1;
 +
 + cpus {
 + #address-cells = 1;
 + #size-cells = 0;
 +
 + PowerPC,[EMAIL PROTECTED] {
 + device_type = cpu;
 + reg = 0;
 + d-cache-line-size = 32;
 + i-cache-line-size = 32;
 + d-cache-size = 0x4000;
 + i-cache-size = 0x4000;
 + timebase-frequency = 0;
 + bus-frequency = 0;
 + clock-frequency = 0;
 + };
 + };
 +
 + memory {
 + device_type = memory;
 + reg = 0x 0x;
 + };
 +
 + [EMAIL PROTECTED] {

The new convention is to use simply [EMAIL PROTECTED] here.  However, I think at
least some u-boot versions break without the old name.  Except that, I
would have thought the fact you don't need the device_type=soc field
- also a hack for dealing with older u-boot - meant you had a new
enough u-boot version to cope with [EMAIL PROTECTED]

[snip]
 + [EMAIL PROTECTED] {

Err.. the unit addresses in the name should be bare hex, without '0x'

 + reg = 0x0 0x80;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x0 0x4;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x4 0x1;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x5 0x1;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x6 0x4;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0xa 0x6;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x10 0x30;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x40 0x3c;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x7c 0x1;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x7d 0x1;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x7e 0x1;
 + };
 + [EMAIL PROTECTED] {
 + reg = 0x7f 0x1;
 + };
 + };
 + };
 +
 + pci: [EMAIL PROTECTED] {
 + #interrupt-cells = 1;
 + #size-cells = 2;
 + #address-cells = 3;
 + device_type = pci;
 + compatible = fsl,mpc5200-pci;
 + reg = 0xfd00 0x100;
 + interrupt-map-mask = 0xf800 0 0 7;
 + interrupt-map = 0x5800 0 0 1 mpc5200_pic 1 2 3
 + 0x5000 0 0 1 mpc5200_pic 1 3 3;
 + clock-frequency = 0;
 + interrupts = 2 8 0 2 9 0 2 10 0;
 + interrupt-parent = mpc5200_pic;
 + bus-range = 0 0;
 + ranges = 0x4200 0 0x8000 0x8000 0 0x2000
 + 0x0200 0 0xa000 0xa000 0 0x1000
 + 0x0100 0 0x 0xb000 0 0x0100;
 + };
 +};
 diff --git a/arch/powerpc/configs/52xx/mvbc_p_defconfig 
 b/arch/powerpc/configs/52xx/mvbc_p_defconfig
 new file mode 100644
 index 000..1dd1460
 --- /dev/null
 +++ b/arch/powerpc/configs/52xx/mvbc_p_defconfig
 @@ -0,0 +1,1158 @@
 +#
 +# Automatically generated make config: don't edit
 +# Linux kernel version: 2.6.26-rc6
 +# Fri Jul  4 18:00:23 2008
 +#
 +# CONFIG_PPC64 is not set
 +
 +#
 +# Processor support
 +#
 +CONFIG_6xx=y
 +# CONFIG_PPC_85xx is not set
 +# CONFIG_PPC_8xx is not set
 +# CONFIG_40x is not set
 +# CONFIG_44x is not set
 +# CONFIG_E200 is not set
 +CONFIG_PPC_FPU=y
 +# CONFIG_ALTIVEC is not set
 +CONFIG_PPC_STD_MMU=y
 +CONFIG_PPC_STD_MMU_32=y
 +# CONFIG_PPC_MM_SLICES is not set
 +# CONFIG_SMP is not set
 +CONFIG_PPC32=y
 +CONFIG_WORD_SIZE=32
 +CONFIG_PPC_MERGE=y
 +CONFIG_MMU=y
 +CONFIG_GENERIC_CMOS_UPDATE=y
 +CONFIG_GENERIC_TIME=y
 +CONFIG_GENERIC_TIME_VSYSCALL=y
 +CONFIG_GENERIC_CLOCKEVENTS=y
 +CONFIG_GENERIC_HARDIRQS=y
 +# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 

Re: [PATCH] [V2] powerpc: Xilinx: add dts file for ML507 board

2008-07-09 Thread David Gibson
On Tue, Jul 08, 2008 at 08:41:11AM -0600, John Linn wrote:
 Thanks for the comments David.  
[snip]
   + chosen {
   + bootargs = console=ttyS0 ip=on root=/dev/ram;
  
  Bootargs like this should not typically go in the dts file.
  
 
 My understanding is the bootloader would also fill these in.
 With the FGPA, a bootloader is not used many times so that's the 
 reason we have put it into the dts file.

Hrm.  There are several places you can encode a default command line
into a zImage, and I don't think the dts is the most sensible.  I'd
suggest in the config instead, it's easier for users to change if
necessary that way.

   + linux,stdout-path = /[EMAIL PROTECTED]/[EMAIL PROTECTED];
   + } ;
   + cpus {
   + #address-cells = 1;
   + #cpus = 1;
   + #size-cells = 0;
   + ppc440_0: [EMAIL PROTECTED] {
   + clock-frequency = ;
  
  Presumably this is supposed to be filled in by the bootloader.  But in
  any case it shouldn't be a string.
  
 
 I think this was my screw-up as it should have the same value as the
 timebase. 
 Interesting, it's not being used for anything that stops the system from
 working.

Ok.

  [snip]
   + DMA0: [EMAIL PROTECTED] {
   + compatible = xlnx,ll-dma-1.00.a;
   + dcr-reg =  0x80 0x11 ;
   + interrupt-parent = xps_intc_0;
   + interrupts =  9 2 0xa 2 ;
   + } ;
  
  Putting devices under the cpu node is certainly... atypical.  It's not
  obviously wrong, for a dcr device like this, but we probably want a
  little more discussion before establishing a convention like this.
 
 We had this discussion somewhat in a earlier message, 6/23 adding
 virtex5 
 Powerpc 440 support, and Stephen answered with the following which still
 seems
 applicable.
 
 From Stephenn:
 
 In Virtex 5 FX, the processor block (as represented in all the processor
 design tools) is actually a processor block, plus a crossbar switch,
 plus dma blocks.  I think there's a tradeoff between modeling this
 independently, or modeling it as an FPGA user sees it.  From the
 perspective of the FPGA user, this is the way the system looks (although
 I agree that it's odd).   What would be even better, is if the processor
 block was modeled as a DTS I could write by hand, and to include it into
 the generated DTS.  (Another good use for grafting of device trees...)

Hmm.  Not really convinced either way.

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] libfdt: Improve documentation in libfdt.h

2008-07-09 Thread David Gibson
On Wed, Jul 09, 2008 at 11:22:44AM +0200, Wolfram Sang wrote:
 Fix a few typos and mistakes.

Oops, some of those are rather embarrassing.

 Signed-off-by: Wolfram Sang [EMAIL PROTECTED]
Acked-by: David Gibson [EMAIL PROTECTED]

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [RFC][WIP][PATCH] powerpc: Refactor device bindings

2008-07-09 Thread David Gibson
On Tue, Jul 08, 2008 at 08:20:56AM -0500, Kumar Gala wrote:
 Moved Freescale SoC related bindings out of booting-without-of.txt and into
 their own files.
 
 Signed-off-by: Kumar Gala [EMAIL PROTECTED]

Acked-by: David Gibson [EMAIL PROTECTED]

Of course, what I'd *really* like to do is to get a website / wiki set
up somewhere to be the definitive home of all bindings, but I don't
think it's going to happen any time real soon.

-- 
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 1/2] Fix copper/fiber auto-selection for 88e1111

2008-07-09 Thread Wang Jian
The 27.15 bit (MII_M_HWCFG_FIBER_COPPER_AUTO) is disable bit. When
set to 1, copper/fiber auto selection is disabled. The current code
to enable but actually disable auto selection.

Signed-off-by: Wang Jian [EMAIL PROTECTED]
---
 drivers/net/phy/marvell.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 32a8503..737512c 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -162,7 +162,7 @@ static int m88e_config_init(struct phy_device
*phydev)

/* Enable Fiber/Copper auto selection */
temp = phy_read(phydev, MII_M_PHY_EXT_SR);
-   temp |= MII_M_HWCFG_FIBER_COPPER_AUTO;
+   temp = ~MII_M_HWCFG_FIBER_COPPER_AUTO;
phy_write(phydev, MII_M_PHY_EXT_SR, temp);

temp = phy_read(phydev, MII_BMCR);
-- 
1.5.5.4



___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 0/2] Fix register misuse in drivers/net/phy/marvel.c

2008-07-09 Thread Wang Jian
These 2 patches fixed misuse of register for 88e.

Notice: These two patches didn't fix some auto selection problem yet. I
will discuss the problem in seperate email.


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 2/2] Fix 88e1111 copper/fiber selection in RGMII mode

2008-07-09 Thread Wang Jian
MII_M_HWCFG_FIBER_COPPER_RES is a bit of MII_M_PHY_EXT_SR, not
MII_M_PHY_EXT_CR.

Signed-off-by: Wang Jian [EMAIL PROTECTED]
---
 drivers/net/phy/marvell.c |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 737512c..4aa5479 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -158,7 +158,6 @@ static int m88e_config_init(struct phy_device
*phydev)
 {
int err;
int temp;
-   int mode;

/* Enable Fiber/Copper auto selection */
temp = phy_read(phydev, MII_M_PHY_EXT_SR);
@@ -198,9 +197,7 @@ static int m88e_config_init(struct phy_device
*phydev)

temp = ~(MII_M_HWCFG_MODE_MASK);

-   mode = phy_read(phydev, MII_M_PHY_EXT_CR);
-
-   if (mode  MII_M_HWCFG_FIBER_COPPER_RES)
+   if (temp  MII_M_HWCFG_FIBER_COPPER_RES)
temp |= MII_M_HWCFG_MODE_FIBER_RGMII;
else
temp |= MII_M_HWCFG_MODE_COPPER_RGMII;
-- 
1.5.5.4


___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev