BUG: mpc52xx_gpt mask/unmask of interrupts

2010-03-11 Thread Henk Stegeman
In mpc52xx_gpt.c

The functions

static void mpc52xx_gpt_irq_unmask(unsigned int virq)
static void mpc52xx_gpt_irq_mask(unsigned int virq)

Respectively clear and set bit IRQ_EN (INT_EN in MPC5200B user manual)
of the GPT's enable and mode select register.

Refer to Figure 7-45 and table 7-48 on page 229 of
http://www.freescale.com/files/32bit/doc/ref_manual/MPC5200BUM.pdf

I believe this is wrong (and I've seen this go wrong) because this bit
disables the generation of interrupts, and therefore kills detection
of edged interrupts between calls of mpc52xx_gpt_irq_mask and
mpc52xx_gpt_irq_unmask. I also suspect that clearing this bit clears
an already pending interrupt, which could be the cause of spurious
interrupts I am getting on my board.

Freescale has confirmed to me that this INT_EN bit is indeed not a
mask, but an enable for interrupts.

It seems to me that the only way to mask interrupts for this situation
is to set the TMRx bit for the gpt in the ICTL Critical Priority and
Main Interrupt mask register (table 7-9 on page 175). These bits are
now handled by mpc52xx_pic, the driver for the interrupt the gpt irq
is cascaded to from.

I have no complete idea for a fix yet.
Is it possible to somehow make use of the mpc52xx_pic mask funtions?
For this case that would be quite valid as the gpt as interrupt
controller only provides one interrupt, so masking one is the same as
masking 'all' on the parent.


Cheers,

Henk Stegeman
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Problem with PCI bus rescan on 460EX

2010-03-11 Thread Felix Radensky




Hi Alex,

Thanks a lot for replying.

Alex Chiang wrote:

  * Felix Radensky fe...@embedded-sol.com:
  
  

The problem arises when device is plugged in after boot. After doing
echo 1  /sys/bus/pci/rescan
the device is identified, but bridge memory window is not allocated,
and reads from device memory regions return 0x. Below is
relevant output:

  
  
Do you need firmware support on your platform for hotplug?
  

I don't think so, but I've added powerpc guys to CC to make sure.

  
Can you please send full dmesg during successful boot, full dmesg
log during unsuccessful rescan, and contents of /proc/iomem and
/proc/ioports during success and failure cases?

Be sure you have PCI_CONFIG_DEBUG turned on.
  

Attached. I really appreciate your help. Thanks a lot.

Felix.


Linux version 2.6.33 (fe...@felix-laptop.lan) (gcc version 4.2.2) #5 Thu Mar 11 
09:35:52 IST 2010
Found legacy serial port 0 for /plb/opb/ser...@ef600300
  mem=4ef600300, taddr=4ef600300, irq=0, clk=7407407, speed=0
Found legacy serial port 1 for /plb/opb/ser...@ef600400
  mem=4ef600400, taddr=4ef600400, irq=0, clk=7407407, speed=0
Found legacy serial port 2 for /plb/opb/ser...@ef600500
  mem=4ef600500, taddr=4ef600500, irq=0, clk=7407407, speed=0
Found legacy serial port 3 for /plb/opb/ser...@ef600600
  mem=4ef600600, taddr=4ef600600, irq=0, clk=7407407, speed=0
Top of RAM: 0x3000, Total RAM: 0x3000
Memory hole size: 0MB
Zone PFN ranges:
  DMA  0x - 0x0003
  Normal   0x0003 - 0x0003
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x - 0x0003
On node 0 totalpages: 196608
free_area_init_node: node 0, pgdat c035e76c, node_mem_map c0388000
  DMA zone: 1536 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 195072 pages, LIFO batch:31
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 195072
Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/ppc_4xxFP 
ip=10.0.0.30:10.0.0.10:10.0.0.138:255.0.0.0:smbe460:eth0:off panic=1 
console=ttyS0,115200
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 775552k/786432k available (3364k kernel code, 10604k reserved, 116k 
data, 128k bss, 144k init)
Kernel virtual memory layout:
  * 0xfffdf000..0xf000  : fixmap
  * 0xfde0..0xfe00  : consistent mem
  * 0xfde0..0xfde0  : early ioremap
  * 0xf100..0xfde0  : vmalloc  ioremap
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:512 nr_irqs:512
UIC0 (32 IRQ sources) at DCR 0xc0
UIC1 (32 IRQ sources) at DCR 0xd0
  alloc irq_desc for 30 on node 0
  alloc kstat_irqs on node 0
irq: irq 30 on host /interrupt-controller0 mapped to virtual irq 30
UIC2 (32 IRQ sources) at DCR 0xe0
  alloc irq_desc for 16 on node 0
  alloc kstat_irqs on node 0
irq: irq 10 on host /interrupt-controller0 mapped to virtual irq 16
UIC3 (32 IRQ sources) at DCR 0xf0
  alloc irq_desc for 17 on node 0
  alloc kstat_irqs on node 0
irq: irq 16 on host /interrupt-controller0 mapped to virtual irq 17
time_init: decrementer frequency = 1000.12 MHz
time_init: processor frequency   = 1000.12 MHz
clocksource: timebase mult[40] shift[22] registered
clockevent: decrementer mult[8019] shift[31] cpu[0]
Mount-cache hash table entries: 512
NET: Registered protocol family 16
  alloc irq_desc for 18 on node 0
  alloc kstat_irqs on node 0
irq: irq 11 on host /interrupt-controller1 mapped to virtual irq 18
256k L2-cache enabled
PCI host bridge /plb/p...@c0ec0 (primary) ranges:
 MEM 0x000d8000..0x000d - 0x8000 
 MEM 0x000c0ee0..0x000c0eef - 0x 
  IO 0x000c0800..0x000c0800 - 0x
 Removing ISA hole at 0x000c0ee0
4xx PCI DMA offset set to 0x
/plb/p...@c0ec0: Legacy ISA memory support enabled
PCI: Probing PCI hardware
pci_bus :00: scanning bus
pci :00:02.0: found [3388:0020] class 000604 header type 01
pci :00:02.0: calling pcibios_fixup_resources+0x0/0xf4
pci :00:02.0: calling fixup_ppc4xx_pci_bridge+0x0/0x154
pci :00:02.0: calling quirk_resource_alignment+0x0/0x200
pci :00:02.0: supports D1 D2
pci :00:02.0: PME# supported from D0 D1 D2 D3hot
pci :00:02.0: PME# disabled
pci_bus :00: fixups for bus
pci :00:02.0: scanning behind bridge, config 00, pass 0
pci :00:02.0: bus configuration invalid, reconfiguring
pci :00:02.0: scanning behind bridge, config 00, pass 1
pci_bus :01: scanning bus
pci_bus :01: fixups for bus
pci :00:02.0: PCI bridge to [bus 01-ff]
pci :00:02.0:   bridge window [io  0x-0x0fff]
pci :00:02.0:   bridge window [mem 0x-0x000f]
pci :00:02.0:   bridge window 

Re: PowerPC 85xx board are caused die by Commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: Use lwarx/ldarx hint in bit locks)

2010-03-11 Thread Andrew Liu
Just validated it, this fix can make fsl_p2020ds work again.

Andrew

On Thu, Mar 11, 2010 at 1:39 PM, Kumar Gala ga...@kernel.crashing.orgwrote:


 On Mar 10, 2010, at 11:20 PM, Kumar Gala wrote:

 
  On Mar 10, 2010, at 9:20 PM, Andrew Liu wrote:
 
  Hi Guys:
  I have done several experiments on  fsl_8548cds and fsl_p2020rdb,
 pinpointed the commit: 864b9e6fd76489aab422bac62162f57c52e06ed8(powerpc: Use
 lwarx/ldarx hint in bit locks)  cause the bootup stalledd.
 
  
  Filename 'fsl_8548cds/uImage'.
  Load address: 0x100
  Loading:
 #
  ###
  done
  Bytes transferred = 1526546 (174b12 hex)
  Speed: 100, full duplex
  Using eTSEC0 device
  Filename 'sliu/fsl_8548cds/mpc8548cds.dtb'.
  Load address: 0xc0
  Loading: #
  done
  Bytes transferred = 9993 (2709 hex)
  ## Booting image at 0100 ...
Image Name:   Linux-2.6.34-rc1-5-g522dba7
Image Type:   PowerPC Linux Kernel Image (gzip compressed)
Data Size:1526482 Bytes =  1.5 MB
Load Address: 
Entry Point:  
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Booting using the fdt at 0xc0
Loading Device Tree to 007fb000, end 007fd708 ... OK
  
 
  I guess all 85xx or booke board has this issue.
 
  that's very odd since __PPC_EH should be ignored on PPC32 and thus 85xx.

 Found the issue and posted a fix.

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

MTD partitions missing

2010-03-11 Thread garazi juez uriagereka

Hello,

I am Garazi and I am
working  in the Electronic Design Group at the University of the
Basque Country.


I'm running the Xilinx git kernel 2.6.31
from git.xilinx.com on a V5 PPC440 CORE( Xilinx ML507). We have a NOR CFI
flash device. 

Flash chip has been particionated according to
this table:
 
  
  
  START ADDRESS


  
  
  OFFSET
  
  
  SIZE


  
  
   
  
 
 
  
  LINUX
  
  
  0xFE00
  
  
  0x
  
  
  0x0050 (5M)
  
  
   
  
 
 
  
  JFFS2 Filesystem
  
  
  0xFE50
  
  
  0x0050
  
  
  0x0160 (22M)
  
  
   
  
 
 
  
  UNUSED
  
  
  0xFFB0
  
  
  0x01B0
  
  
  0x00114000(4896 K) 
  
  
   
  
 
 
  
  LOADER
  
  
  0xFFFE
  
  
  0x01FE
  
  
  0x0002(128K)

In order to get this four partitions, my .dts file has been
configured this way:

bootargs =
console=ttyS0 ip=on root=/dev/ram rw  
   
   
mtdparts=fe00.flash:5M(zImage),22M(rootfs),4896k(unused),128k(loader);

First
of all, linux kernel was booted from Flash, using a ramdisk for the
flash system and a loader , and it worked.

Now, I am trying to
mount JFFS2 file system but I can not. I have tried it in two
different ways:
1. Mounting JFFS2 file system when  the
kernel has already booted.
2. Changing my dts file and mounting JFFS2
automatically when kernel boots.

bootargs =
console=ttyS0 ip=on root=/dev/mtdblock1 rw  rootfs=jffs2

   
mtdparts=fe00.flash:5M(zImage),22M(rootfs),4896k(unused),128k(loader);

 I
guess that the problem is related to MTD driver, because mtd
partitions are not correctly created. I check partition file and just one of 
four partition appears
(cat  /proc/partitions -- mtdblock0 just
appears).

I have read in the Internet that there are other
people who have had the same problem when they have updated 2.6.28
kernel to 2.6.31 kernel. Although, there is no answer.

I would appreciate any kind of help.

Regards,

Garazi


  
_
Recibe en tu móvil un SMS con tu Hotmail recibido. ¡Date de alta ya!
http://serviciosmoviles.es.msn.com/___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 1/6] arch/powerpc/platforms/pseries: Use kasprintf

2010-03-11 Thread Nathan Fontenot

Julia Lawall wrote:

From: Julia Lawall ju...@diku.dk

kasprintf combines kmalloc and sprintf, and takes care of the size
calculation itself.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// smpl
@@
expression a,flag;
expression list args;
statement S;
@@

  a =
-  \(kmalloc\|kzalloc\)(...,flag)
+  kasprintf(flag,args)
  ... when != a
  if (a == NULL || ...) S
  ...
- sprintf(a,args);
// /smpl



Looks good, thanks.


Signed-off-by: Julia Lawall ju...@diku.dk

Acked-by: Nathan Fontenot nf...@austin.ibm.com



---
 arch/powerpc/platforms/pseries/dlpar.c |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff -u -p a/arch/powerpc/platforms/pseries/dlpar.c 
b/arch/powerpc/platforms/pseries/dlpar.c
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -78,13 +78,12 @@ static struct device_node *dlpar_parse_c
 * prepend this to the full_name.
 */
name = (char *)ccwa + ccwa-name_offset;
-   dn-full_name = kmalloc(strlen(name) + 2, GFP_KERNEL);
+   dn-full_name = kasprintf(GFP_KERNEL, /%s, name);
if (!dn-full_name) {
kfree(dn);
return NULL;
}
 
-	sprintf(dn-full_name, /%s, name);

return dn;
 }
 
@@ -409,15 +408,13 @@ static ssize_t dlpar_cpu_probe(const cha

 * directory of the device tree.  CPUs actually live in the
 * cpus directory so we need to fixup the full_name.
 */
-   cpu_name = kzalloc(strlen(dn-full_name) + strlen(/cpus) + 1,
-  GFP_KERNEL);
+   cpu_name = kasprintf(GFP_KERNEL, /cpus%s, dn-full_name);
if (!cpu_name) {
dlpar_free_cc_nodes(dn);
rc = -ENOMEM;
goto out;
}
 
-	sprintf(cpu_name, /cpus%s, dn-full_name);

kfree(dn-full_name);
dn-full_name = cpu_name;
 
___

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

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


Linus' kernel tree over ads5121-rev4

2010-03-11 Thread CTAG / Moisés Domínguez
Hi,

 

I am started with freescale LTIB but I decided to make a clone of Linus'
kernel tree mainly to have the latest and fixed mscan driver.

 

Linux is uncompressed and starts right, but when DIU driver probe function
is called (exactly when first framebuffer device is registered) linux
restarts. This behaviour repeats indefinitely.

(same behaviour with denx kernel tree).

 

I am using .dts that comes in the Linus’kernel tree. Maybe this .dts board
revision dependent? 

 

I updated u-boot to with the denx one but similar results.

 

 

Maybe basic questions. Sorry for that.

 

Regards, Moises.

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

[PATCH 00/37] OF: move device node pointer into struct device.

2010-03-11 Thread Grant Likely
Currently on OF enabled platforms, the device node pointer is stored in
both device.archdata.of_node (.prom_node on sparc), and in of_device.node
OF device tree support is being generalized to work on any platform, so
instead of adding the of_node pointer to each platform's archdata
individually, this patch series moves the of_node pointer into struct
device proper and fixes up all users to reference the new location.

The last 3 patches in this series remove the old .archdata.of_node,
.archdata.prom_node and of_device.node instances.

This series has been compile tested on powerpc, sparc and microblaze,
(allmodconfig used on sparc and powerpc) and boot tested on an mpc5200
powerpc.  All known (or at least all I could find) in-tree users of the
old names have been removed.

This series should also be fully bisectable.  After I collect acks, I
would like to get this whole series into linux-next to see if I've
missed any references, but I can probably hold off merging the last
three patches when the 2.6.35 merge window opens to give out of tree
users a bit more time to adapt.  In fact, I'd probably wait a few
extra days after pushing out the bulk of this series before I push the
last 3 patches into my linux-next branch to isolate the drivers that I
missed while fixing.

Cheers,
g.

---

Grant Likely (37):
  arch/sparc: Remove .archdata.of_node and use .of_node in struct device
  arch/microblaze: Remove .archdata.of_node and use .of_node in struct 
device
  arch/powerpc: Remove .archdata.of_node and use .of_node in struct device
  sound/sparc: use .dev.of_node instead of .node in struct of_device
  sound/soc: use .dev.of_node instead of .node in struct of_device
  sound/aoa: use .dev.of_node instead of .node in struct of_device
  drivers/of: use .of_node instead of .archdata.of_node in struct device
  drivers/cdrom: use .of_node instead of .archdata.of_node in struct device
  drivers/char: use .of_node instead of .archdata.of_node in struct device
  drivers/scsi: use .of_node instead of .archdata.of_node in struct device
  drivers/of: use .dev.of_node instead of .node in struct of_device
  drivers/mtd: use .dev.of_node instead of .node in struct of_device
  drivers/infiniband: use .dev.of_node instead of .node in struct of_device
  drivers/char: use .dev.of_node instead of .node in struct of_device
  drivers/i2c: use .dev.of_node instead of .node in struct of_device
  drivers/leds: use .dev.of_node instead of .node in struct of_device
  drivers/ata: use .dev.of_node instead of .node in struct of_device
  drivers/input: use .dev.of_node instead of .node in struct of_device
  drivers/serial: use .dev.of_node instead of .node in struct of_device
  drivers/pcmcia: use .dev.of_node instead of .node in struct of_device
  drivers/net: use .dev.of_node instead of .node in struct of_device
  drivers/sbus: use .dev.of_node instead of .node in struct of_device
  drivers/mmc: use .dev.of_node instead of .node in struct of_device
  drivers/spi: use .dev.of_node instead of .node in struct of_device
  drivers/macintosh: use .dev.of_node instead of .node in struct of_device
  drivers/usb: use .dev.of_node instead of .node in struct of_device
  drivers/scsi: use .dev.of_node instead of .node in struct of_device
  drivers/video: use .dev.of_node instead of .node in struct of_device
  drivers/atm: use .dev.of_node instead of .node in struct of_device
  drivers/watchdog: use .dev.of_node instead of .node in struct of_device
  drivers/serial: use .dev.of_node instead of .node in struct of_device
  arch/microblaze: use .dev.of_node instead of .node in struct of_device
  arch/powerpc: use .dev.of_node instead of .node in struct of_device
  arch/sparc: use .dev.of_node instead of .node in struct of_device
  of/sparc: use dev-of_node instead of dev-archdata.prom_node
  of: Eliminate dev_archdata_get_node()
  i2c/of: Allow device node to be passed via i2c_board_info


 arch/microblaze/include/asm/device.h  |   14 
 arch/microblaze/include/asm/of_device.h   |1 -
 arch/microblaze/kernel/of_device.c|   12 --
 arch/microblaze/kernel/of_platform.c  |4 ++-
 arch/powerpc/include/asm/device.h |   22 +++
 arch/powerpc/include/asm/macio.h  |2 +-
 arch/powerpc/include/asm/of_device.h  |1 -
 arch/powerpc/kernel/ibmebus.c |4 ++-
 arch/powerpc/kernel/of_device.c   |   12 --
 arch/powerpc/kernel/of_platform.c |   16 +++---
 arch/powerpc/kernel/pci-common.c  |1 -
 arch/powerpc/kernel/vio.c |   17 +++
 arch/powerpc/platforms/52xx/mpc52xx_gpio.c|4 ++-
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c |   16 +++---
 arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c |6 +++--
 

[PATCH 01/37] i2c/of: Allow device node to be passed via i2c_board_info

2010-03-11 Thread Grant Likely
The struct device_node *of_node pointer is moving out of dev-archdata
and into the struct device proper.  of_i2c.c needs to set the of_node
pointer before the device is registered.  Since the i2c subsystem
doesn't allow 2 stage allocation and registration of i2c devices, the
of_node pointer needs to be passed via the i2c_board_info structure
so that it is set prior to registration.

This patch adds of_node to struct i2c_board_info (conditional on
CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c
to use the new parameter.  The calling of dev_archdata_set_node()
from of_i2c will be removed in a subsequent patch when of_node is
removed from archdata and all users are converted over.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/i2c/i2c-core.c |3 +++
 drivers/of/of_i2c.c|3 ++-
 include/linux/i2c.h|4 
 3 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 3202a86..4099b2b 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -387,6 +387,9 @@ i2c_new_device(struct i2c_adapter *adap, struct 
i2c_board_info const *info)
client-dev.parent = client-adapter-dev;
client-dev.bus = i2c_bus_type;
client-dev.type = i2c_client_type;
+#ifdef CONFIG_OF
+   client-dev.of_node = info-of_node;
+#endif
 
dev_set_name(client-dev, %d-%04x, i2c_adapter_id(adap),
 client-addr);
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index a3a708e..605bc42 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
 
info.addr = be32_to_cpup(addr);
 
-   dev_archdata_set_node(dev_ad, node);
+   dev_archdata_set_node(dev_ad, node); /* temporary */
+   info.of_node = node;
info.archdata = dev_ad;
 
request_module(%s, info.type);
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 0a5da63..4f37ff1 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -34,6 +34,7 @@
 #include linux/device.h  /* for struct device */
 #include linux/sched.h   /* for completion */
 #include linux/mutex.h
+#include linux/of.h  /* for struct device_node */
 
 extern struct bus_type i2c_bus_type;
 
@@ -251,6 +252,9 @@ struct i2c_board_info {
unsigned short  addr;
void*platform_data;
struct dev_archdata *archdata;
+#ifdef CONFIG_OF
+   struct device_node *of_node;
+#endif
int irq;
 };
 

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


[PATCH 02/37] of: Eliminate dev_archdata_get_node()

2010-03-11 Thread Grant Likely
The device_node pointer is now stored in struct device-of_node so we
no longer need the dev_archdata_get_node() accessor.  Read the of_node
directly instead.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/microblaze/include/asm/device.h |6 --
 arch/powerpc/include/asm/device.h|6 --
 arch/sparc/include/asm/device.h  |6 --
 drivers/gpio/pca953x.c   |2 +-
 drivers/mmc/host/of_mmc_spi.c|4 ++--
 drivers/of/of_i2c.c  |2 +-
 drivers/of/of_mdio.c |4 ++--
 drivers/spi/spi_mpc8xxx.c|6 +++---
 8 files changed, 9 insertions(+), 27 deletions(-)

diff --git a/arch/microblaze/include/asm/device.h 
b/arch/microblaze/include/asm/device.h
index 78a0384..2370888 100644
--- a/arch/microblaze/include/asm/device.h
+++ b/arch/microblaze/include/asm/device.h
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata 
*ad,
ad-of_node = np;
 }
 
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
-   return ad-of_node;
-}
-
 #endif /* _ASM_MICROBLAZE_DEVICE_H */
 
 
diff --git a/arch/powerpc/include/asm/device.h 
b/arch/powerpc/include/asm/device.h
index 6d94d27..0aa81d3 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata 
*ad,
ad-of_node = np;
 }
 
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
-   return ad-of_node;
-}
-
 struct pdev_archdata {
 };
 
diff --git a/arch/sparc/include/asm/device.h b/arch/sparc/include/asm/device.h
index f3b85b6..55dadca 100644
--- a/arch/sparc/include/asm/device.h
+++ b/arch/sparc/include/asm/device.h
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata 
*ad,
ad-prom_node = np;
 }
 
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
-   return ad-prom_node;
-}
-
 struct pdev_archdata {
 };
 
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
index ab5daab..abc9b8c 100644
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -436,7 +436,7 @@ pca953x_get_alt_pdata(struct i2c_client *client)
struct device_node *node;
const uint16_t *val;
 
-   node = dev_archdata_get_node(client-dev.archdata);
+   node = client-dev.of_node;
if (node == NULL)
return NULL;
 
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c
index 0c7a63c..a1ec5d0 100644
--- a/drivers/mmc/host/of_mmc_spi.c
+++ b/drivers/mmc/host/of_mmc_spi.c
@@ -63,7 +63,7 @@ static int of_mmc_spi_get_ro(struct device *dev)
 struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
 {
struct device *dev = spi-dev;
-   struct device_node *np = dev_archdata_get_node(dev-archdata);
+   struct device_node *np = dev-of_node;
struct of_mmc_spi *oms;
const u32 *voltage_ranges;
int num_ranges;
@@ -134,7 +134,7 @@ EXPORT_SYMBOL(mmc_spi_get_pdata);
 void mmc_spi_put_pdata(struct spi_device *spi)
 {
struct device *dev = spi-dev;
-   struct device_node *np = dev_archdata_get_node(dev-archdata);
+   struct device_node *np = dev-of_node;
struct of_mmc_spi *oms = to_of_mmc_spi(dev);
int i;
 
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 605bc42..43f803e 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -69,7 +69,7 @@ EXPORT_SYMBOL(of_register_i2c_devices);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-return dev_archdata_get_node(dev-archdata) == data;
+return dev-of_node == data;
 }
 
 /* must call put_device() when done with returned i2c_client device */
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 3bf20bf..64e08d7 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -101,7 +101,7 @@ EXPORT_SYMBOL(of_mdiobus_register);
 /* Helper function for of_phy_find_device */
 static int of_phy_match(struct device *dev, void *phy_np)
 {
-   return dev_archdata_get_node(dev-archdata) == phy_np;
+   return dev-of_node == phy_np;
 }
 
 /**
@@ -167,7 +167,7 @@ struct phy_device *of_phy_connect_fixed_link(struct 
net_device *dev,
if (!dev-dev.parent)
return NULL;
 
-   net_np = dev_archdata_get_node(dev-dev.parent-archdata);
+   net_np = dev-dev.parent-of_node;
if (!net_np)
return NULL;
 
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index 4f0cc9d..38b9c32 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -796,7 +796,7 @@ static void mpc8xxx_spi_free_dummy_rx(void)
 static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
 {
struct device *dev = mspi-dev;
-   struct device_node *np = dev_archdata_get_node(dev-archdata);
+   

[PATCH 03/37] of/sparc: use dev-of_node instead of dev-archdata.prom_node

2010-03-11 Thread Grant Likely
The prom_node pointer is being moved out of archdata to dev-of_node.
This patch changes users of prom_node to use the new location.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/sparc/include/asm/fb.h  |2 +-
 arch/sparc/kernel/of_device_32.c |3 ++-
 arch/sparc/kernel/of_device_64.c |3 ++-
 arch/sparc/kernel/pci.c  |4 ++--
 4 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/sparc/include/asm/fb.h b/arch/sparc/include/asm/fb.h
index b83e447..e834880 100644
--- a/arch/sparc/include/asm/fb.h
+++ b/arch/sparc/include/asm/fb.h
@@ -18,7 +18,7 @@ static inline int fb_is_primary_device(struct fb_info *info)
struct device *dev = info-device;
struct device_node *node;
 
-   node = dev-archdata.prom_node;
+   node = dev-of_node;
if (node 
node == of_console_device)
return 1;
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index da527b3..5a5509c 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -345,8 +345,9 @@ static struct of_device * __init scan_one_device(struct 
device_node *dp,
return NULL;
 
sd = op-dev.archdata;
-   sd-prom_node = dp;
+   sd-prom_node = dp; /* temporary */
sd-op = op;
+   op-dev.of_node = dp;
 
op-node = dp;
 
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index b3d4cb5..9d30b07 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct 
device_node *dp,
return NULL;
 
sd = op-dev.archdata;
-   sd-prom_node = dp;
+   sd-prom_node = dp; /* temporary */
sd-op = op;
 
+   op-dev.of_node = dp;
op-node = dp;
 
op-clock_freq = of_getintprop_default(dp, clock-frequency,
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index cf73f43..40861ed 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -654,7 +654,7 @@ show_pciobppath_attr(struct device * dev, struct 
device_attribute * attr, char *
struct device_node *dp;
 
pdev = to_pci_dev(dev);
-   dp = pdev-dev.archdata.prom_node;
+   dp = pdev-dev.of_node;
 
return snprintf (buf, PAGE_SIZE, %s\n, dp-full_name);
 }
@@ -1023,7 +1023,7 @@ void arch_teardown_msi_irq(unsigned int virt_irq)
 
 struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
 {
-   return pdev-dev.archdata.prom_node;
+   return pdev-dev.of_node;
 }
 EXPORT_SYMBOL(pci_device_to_OF_node);
 

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


[PATCH 04/37] arch/sparc: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/sparc/include/asm/floppy_64.h   |4 ++--
 arch/sparc/include/asm/parport.h |2 +-
 arch/sparc/kernel/auxio_64.c |2 +-
 arch/sparc/kernel/central.c  |4 ++--
 arch/sparc/kernel/chmc.c |   10 +-
 arch/sparc/kernel/ioport.c   |2 +-
 arch/sparc/kernel/of_device_32.c |   14 +++---
 arch/sparc/kernel/of_device_64.c |   26 +-
 arch/sparc/kernel/of_device_common.c |4 ++--
 arch/sparc/kernel/pci.c  |8 +++-
 arch/sparc/kernel/pci_common.c   |9 +
 arch/sparc/kernel/pci_fire.c |4 ++--
 arch/sparc/kernel/pci_msi.c  |   18 +-
 arch/sparc/kernel/pci_psycho.c   |4 ++--
 arch/sparc/kernel/pci_sabre.c|4 ++--
 arch/sparc/kernel/pci_schizo.c   |   14 +++---
 arch/sparc/kernel/pci_sun4v.c|8 
 arch/sparc/kernel/power.c|4 ++--
 arch/sparc/kernel/psycho_common.c|2 +-
 arch/sparc/kernel/sbus.c |   16 
 arch/sparc/kernel/time_32.c  |2 +-
 arch/sparc/kernel/time_64.c  |6 +++---
 22 files changed, 83 insertions(+), 84 deletions(-)

diff --git a/arch/sparc/include/asm/floppy_64.h 
b/arch/sparc/include/asm/floppy_64.h
index 36439d6..8fac3ab 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -589,7 +589,7 @@ static unsigned long __init sun_floppy_init(void)
if (!op)
return 0;
 
-   state_prop = of_get_property(op-node, status, NULL);
+   state_prop = of_get_property(op-dev.of_node, status, NULL);
if (state_prop  !strncmp(state_prop, disabled, 8))
return 0;
 
@@ -716,7 +716,7 @@ static unsigned long __init sun_floppy_init(void)
 
return sun_floppy_types[0];
}
-   prop = of_get_property(op-node, status, NULL);
+   prop = of_get_property(op-dev.of_node, status, NULL);
if (prop  !strncmp(state, disabled, 8))
return 0;
 
diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h
index ff9ead6..1bb6a41 100644
--- a/arch/sparc/include/asm/parport.h
+++ b/arch/sparc/include/asm/parport.h
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const 
struct of_device_id
struct parport *p;
int slot, err;
 
-   parent = op-node-parent;
+   parent = op-dev.of_node-parent;
if (!strcmp(parent-name, dma)) {
p = parport_pc_probe_port(base, base + 0x400,
  op-irqs[0], PARPORT_DMA_NOFIFO,
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c
index 9f52db2..bd8421a 100644
--- a/arch/sparc/kernel/auxio_64.c
+++ b/arch/sparc/kernel/auxio_64.c
@@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(of, auxio_match);
 
 static int __devinit auxio_probe(struct of_device *dev, const struct 
of_device_id *match)
 {
-   struct device_node *dp = dev-node;
+   struct device_node *dp = dev-dev.of_node;
unsigned long size;
 
if (!strcmp(dp-parent-name, ebus)) {
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index 4589ca3..dfc3698 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -167,7 +167,7 @@ static int __devinit fhc_probe(struct of_device *op,
goto out;
}
 
-   if (!strcmp(op-node-parent-name, central))
+   if (!strcmp(op-dev.of_node-parent-name, central))
p-central = true;
 
p-pregs = of_ioremap(op-resource[0], 0,
@@ -182,7 +182,7 @@ static int __devinit fhc_probe(struct of_device *op,
reg = upa_readl(p-pregs + FHC_PREGS_BSR);
p-board_num = ((reg  16)  1) | ((reg  12)  0x0e);
} else {
-   p-board_num = of_getintprop_default(op-node, board#, -1);
+   p-board_num = of_getintprop_default(op-dev.of_node, board#, 
-1);
if (p-board_num == -1) {
printk(KERN_ERR fhc: No board# property\n);
goto out_unmap_pregs;
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c
index e1a9598..9368796 100644
--- a/arch/sparc/kernel/chmc.c
+++ b/arch/sparc/kernel/chmc.c
@@ -425,7 +425,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
INIT_LIST_HEAD(p-list);
 
err = -ENODEV;
-   prop = of_get_property(op-node, portid, len);
+   prop = of_get_property(op-dev.of_node, portid, len);
if (!prop || len != 4) {
printk(KERN_ERR PFX Cannot find portid.\n);
goto out_free;
@@ -433,7 +433,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
 
p-portid = *prop;
 
-   prop = of_get_property(op-node, 

[PATCH 05/37] arch/powerpc: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/powerpc/include/asm/macio.h  |2 +-
 arch/powerpc/kernel/ibmebus.c |4 ++--
 arch/powerpc/kernel/of_device.c   |8 
 arch/powerpc/kernel/of_platform.c |   16 
 arch/powerpc/platforms/52xx/mpc52xx_gpio.c|4 ++--
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c |   16 
 arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c |6 +++---
 arch/powerpc/platforms/82xx/ep8248e.c |6 +++---
 arch/powerpc/platforms/83xx/suspend.c |2 +-
 arch/powerpc/platforms/cell/axon_msi.c|2 +-
 arch/powerpc/platforms/pasemi/gpio_mdio.c |2 +-
 arch/powerpc/sysdev/axonram.c |6 +++---
 arch/powerpc/sysdev/bestcomm/bestcomm.c   |8 
 arch/powerpc/sysdev/fsl_msi.c |   14 +++---
 arch/powerpc/sysdev/fsl_pmc.c |2 +-
 arch/powerpc/sysdev/pmi.c |2 +-
 16 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h
index a062c57..19a661b 100644
--- a/arch/powerpc/include/asm/macio.h
+++ b/arch/powerpc/include/asm/macio.h
@@ -108,7 +108,7 @@ static inline void* macio_get_drvdata(struct macio_dev *dev)
 
 static inline struct device_node *macio_get_of_node(struct macio_dev *mdev)
 {
-   return mdev-ofdev.node;
+   return mdev-ofdev.dev.of_node;
 }
 
 #ifdef CONFIG_PCI
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index a4c8b38..797e9ac 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -139,14 +139,14 @@ static struct dma_map_ops ibmebus_dma_ops = {
 
 static int ibmebus_match_path(struct device *dev, void *data)
 {
-   struct device_node *dn = to_of_device(dev)-node;
+   struct device_node *dn = to_of_device(dev)-dev.of_node;
return (dn-full_name 
(strcasecmp((char *)data, dn-full_name) == 0));
 }
 
 static int ibmebus_match_node(struct device *dev, void *data)
 {
-   return to_of_device(dev)-node == data;
+   return to_of_device(dev)-dev.of_node == data;
 }
 
 static int ibmebus_create_device(struct device_node *dn)
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index efbc262..55dafc7 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -13,7 +13,7 @@
 static void of_device_make_bus_id(struct of_device *dev)
 {
static atomic_t bus_no_reg_magic;
-   struct device_node *node = dev-node;
+   struct device_node *node = dev-dev.of_node;
const u32 *reg;
u64 addr;
int magic;
@@ -96,17 +96,17 @@ int of_device_uevent(struct device *dev, struct 
kobj_uevent_env *env)
 
ofdev = to_of_device(dev);
 
-   if (add_uevent_var(env, OF_NAME=%s, ofdev-node-name))
+   if (add_uevent_var(env, OF_NAME=%s, ofdev-dev.of_node-name))
return -ENOMEM;
 
-   if (add_uevent_var(env, OF_TYPE=%s, ofdev-node-type))
+   if (add_uevent_var(env, OF_TYPE=%s, ofdev-dev.of_node-type))
return -ENOMEM;
 
 /* Since the compatible field can contain pretty much anything
  * it's not really legal to split it out with commas. We split it
  * up using a number of environment variables instead. */
 
-   compat = of_get_property(ofdev-node, compatible, cplen);
+   compat = of_get_property(ofdev-dev.of_node, compatible, cplen);
while (compat  *compat  cplen  0) {
if (add_uevent_var(env, OF_COMPATIBLE_%d=%s, seen, compat))
return -ENOMEM;
diff --git a/arch/powerpc/kernel/of_platform.c 
b/arch/powerpc/kernel/of_platform.c
index 666d08d..5a5f624 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -196,7 +196,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-   return to_of_device(dev)-node == data;
+   return to_of_device(dev)-dev.of_node == data;
 }
 
 struct of_device *of_find_device_by_node(struct device_node *np)
@@ -214,7 +214,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
 static int of_dev_phandle_match(struct device *dev, void *data)
 {
phandle *ph = data;
-   return to_of_device(dev)-node-phandle == *ph;
+   return to_of_device(dev)-dev.of_node-phandle == *ph;
 }
 
 struct of_device *of_find_device_by_phandle(phandle ph)
@@ -247,10 +247,10 @@ static int __devinit of_pci_phb_probe(struct of_device 
*dev,
if (ppc_md.pci_setup_phb == NULL)
return -ENODEV;
 
-   printk(KERN_INFO Setting up PCI bus %s\n, dev-node-full_name);
+   pr_info(Setting up PCI bus %s\n, dev-dev.of_node-full_name);
 
/* Alloc and setup PHB data structure */
-   phb = pcibios_alloc_controller(dev-node);
+   

[PATCH 06/37] arch/microblaze: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/microblaze/kernel/of_device.c   |8 
 arch/microblaze/kernel/of_platform.c |4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/microblaze/kernel/of_device.c 
b/arch/microblaze/kernel/of_device.c
index 12371bd..ae165fc 100644
--- a/arch/microblaze/kernel/of_device.c
+++ b/arch/microblaze/kernel/of_device.c
@@ -12,7 +12,7 @@
 void of_device_make_bus_id(struct of_device *dev)
 {
static atomic_t bus_no_reg_magic;
-   struct device_node *node = dev-node;
+   struct device_node *node = dev-dev.of_node;
const u32 *reg;
u64 addr;
int magic;
@@ -76,17 +76,17 @@ int of_device_uevent(struct device *dev, struct 
kobj_uevent_env *env)
 
ofdev = to_of_device(dev);
 
-   if (add_uevent_var(env, OF_NAME=%s, ofdev-node-name))
+   if (add_uevent_var(env, OF_NAME=%s, ofdev-dev.of_node-name))
return -ENOMEM;
 
-   if (add_uevent_var(env, OF_TYPE=%s, ofdev-node-type))
+   if (add_uevent_var(env, OF_TYPE=%s, ofdev-dev.of_node-type))
return -ENOMEM;
 
/* Since the compatible field can contain pretty much anything
 * it's not really legal to split it out with commas. We split it
 * up using a number of environment variables instead. */
 
-   compat = of_get_property(ofdev-node, compatible, cplen);
+   compat = of_get_property(ofdev-dev.of_node, compatible, cplen);
while (compat  *compat  cplen  0) {
if (add_uevent_var(env, OF_COMPATIBLE_%d=%s, seen, compat))
return -ENOMEM;
diff --git a/arch/microblaze/kernel/of_platform.c 
b/arch/microblaze/kernel/of_platform.c
index 1c6d684..ea7d024 100644
--- a/arch/microblaze/kernel/of_platform.c
+++ b/arch/microblaze/kernel/of_platform.c
@@ -167,7 +167,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-   return to_of_device(dev)-node == data;
+   return to_of_device(dev)-dev.of_node == data;
 }
 
 struct of_device *of_find_device_by_node(struct device_node *np)
@@ -185,7 +185,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
 static int of_dev_phandle_match(struct device *dev, void *data)
 {
phandle *ph = data;
-   return to_of_device(dev)-node-phandle == *ph;
+   return to_of_device(dev)-dev.of_node-phandle == *ph;
 }
 
 struct of_device *of_find_device_by_phandle(phandle ph)

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


[PATCH 08/37] drivers/watchdog: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/watchdog/cpwd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 37ea052..89da14f 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -576,7 +576,7 @@ static int __devinit cpwd_probe(struct of_device *op,
 * interrupt_mask register cannot be written, so no timer
 * interrupts can be masked within the PLD.
 */
-   str_prop = of_get_property(op-node, model, NULL);
+   str_prop = of_get_property(op-dev.of_node, model, NULL);
p-broken = (str_prop  !strcmp(str_prop, WD_BADMODEL));
 
if (!p-enabled)

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


[PATCH 09/37] drivers/atm: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/atm/fore200e.c |   16 +---
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index f7d6eba..593a03a 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -789,7 +789,7 @@ static int __init fore200e_sba_map(struct fore200e 
*fore200e)
fore200e-bus-write(0x02, fore200e-regs.sba.isr); /* XXX hardwired 
interrupt level */
 
/* get the supported DVMA burst sizes */
-   bursts = of_getintprop_default(op-node-parent, burst-sizes, 0x00);
+   bursts = of_getintprop_default(op-dev.of_node-parent, burst-sizes, 
0x00);
 
if (sbus_can_dma_64bit())
sbus_set_sbus64(op-dev, bursts);
@@ -820,18 +820,20 @@ static int __init fore200e_sba_prom_read(struct fore200e 
*fore200e, struct prom_
const u8 *prop;
int len;
 
-   prop = of_get_property(op-node, madaddrlo2, len);
+   prop = of_get_property(op-dev.of_node, madaddrlo2, len);
if (!prop)
return -ENODEV;
memcpy(prom-mac_addr[4], prop, 4);
 
-   prop = of_get_property(op-node, madaddrhi4, len);
+   prop = of_get_property(op-dev.of_node, madaddrhi4, len);
if (!prop)
return -ENODEV;
memcpy(prom-mac_addr[2], prop, 4);
 
-   prom-serial_number = of_getintprop_default(op-node, serialnumber, 
0);
-   prom-hw_revision = of_getintprop_default(op-node, promversion, 0);
+   prom-serial_number = of_getintprop_default(op-dev.of_node,
+   serialnumber, 0);
+   prom-hw_revision = of_getintprop_default(op-dev.of_node,
+ promversion, 0);
 
return 0;
 }
@@ -841,10 +843,10 @@ static int fore200e_sba_proc_read(struct fore200e 
*fore200e, char *page)
struct of_device *op = fore200e-bus_dev;
const struct linux_prom_registers *regs;
 
-   regs = of_get_property(op-node, reg, NULL);
+   regs = of_get_property(op-dev.of_node, reg, NULL);
 
return sprintf(page,SBUS slot/device:\t\t%d/'%s'\n,
-  (regs ? regs-which_io : 0), op-node-name);
+  (regs ? regs-which_io : 0), op-dev.of_node-name);
 }
 #endif /* CONFIG_SBUS */
 

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


[PATCH 10/37] drivers/video: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/video/cg6.c |2 +-
 drivers/video/ffb.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 0d47c60..978c15f 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -741,7 +741,7 @@ static void cg6_unmap_regs(struct of_device *op, struct 
fb_info *info,
 static int __devinit cg6_probe(struct of_device *op,
const struct of_device_id *match)
 {
-   struct device_node *dp = op-node;
+   struct device_node *dp = op-dev.of_node;
struct fb_info *info;
struct cg6_par *par;
int linebytes, err;
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index 9dbb964..be0c982 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -897,7 +897,7 @@ static void ffb_init_fix(struct fb_info *info)
 static int __devinit ffb_probe(struct of_device *op,
   const struct of_device_id *match)
 {
-   struct device_node *dp = op-node;
+   struct device_node *dp = op-dev.of_node;
struct ffb_fbc __iomem *fbc;
struct ffb_dac __iomem *dac;
struct fb_info *info;

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


[PATCH 11/37] drivers/scsi: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/scsi/qlogicpti.c |   10 +-
 drivers/scsi/sun_esp.c   |   16 
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index fa34b92..7374fbe 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -755,7 +755,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti 
*qpti)
struct of_device *op = qpti-op;
struct device_node *dp;
 
-   dp = op-node;
+   dp = op-dev.of_node;
 
qpti-scsi_id = of_getintprop_default(dp, initiator-id, -1);
if (qpti-scsi_id == -1)
@@ -776,8 +776,8 @@ static void qpti_get_bursts(struct qlogicpti *qpti)
struct of_device *op = qpti-op;
u8 bursts, bmask;
 
-   bursts = of_getintprop_default(op-node, burst-sizes, 0xff);
-   bmask = of_getintprop_default(op-node-parent, burst-sizes, 0xff);
+   bursts = of_getintprop_default(op-dev.of_node, burst-sizes, 0xff);
+   bmask = of_getintprop_default(op-dev.of_node-parent, burst-sizes, 
0xff);
if (bmask != 0xff)
bursts = bmask;
if (bursts == 0xff ||
@@ -1293,7 +1293,7 @@ static struct scsi_host_template qpti_template = {
 static int __devinit qpti_sbus_probe(struct of_device *op, const struct 
of_device_id *match)
 {
struct scsi_host_template *tpnt = match-data;
-   struct device_node *dp = op-node;
+   struct device_node *dp = op-dev.of_node;
struct Scsi_Host *host;
struct qlogicpti *qpti;
static int nqptis;
@@ -1315,7 +1315,7 @@ static int __devinit qpti_sbus_probe(struct of_device 
*op, const struct of_devic
qpti-qhost = host;
qpti-op = op;
qpti-qpti_id = nqptis;
-   strcpy(qpti-prom_name, op-node-name);
+   strcpy(qpti-prom_name, op-dev.of_node-name);
qpti-is_pti = strcmp(qpti-prom_name, QLGC,isp);
 
if (qpti_map_regs(qpti)  0)
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index 3d73aad..4369b76 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -124,7 +124,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, 
struct of_device *espdma)
struct of_device *op = esp-dev;
struct device_node *dp;
 
-   dp = op-node;
+   dp = op-dev.of_node;
esp-scsi_id = of_getintprop_default(dp, initiator-id, 0xff);
if (esp-scsi_id != 0xff)
goto done;
@@ -133,7 +133,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, 
struct of_device *espdma)
if (esp-scsi_id != 0xff)
goto done;
 
-   esp-scsi_id = of_getintprop_default(espdma-node,
+   esp-scsi_id = of_getintprop_default(espdma-dev.of_node,
 scsi-initiator-id, 7);
 
 done:
@@ -146,7 +146,7 @@ static void __devinit esp_get_differential(struct esp *esp)
struct of_device *op = esp-dev;
struct device_node *dp;
 
-   dp = op-node;
+   dp = op-dev.of_node;
if (of_find_property(dp, differential, NULL))
esp-flags |= ESP_FLAG_DIFFERENTIAL;
else
@@ -159,7 +159,7 @@ static void __devinit esp_get_clock_params(struct esp *esp)
struct device_node *bus_dp, *dp;
int fmhz;
 
-   dp = op-node;
+   dp = op-dev.of_node;
bus_dp = dp-parent;
 
fmhz = of_getintprop_default(dp, clock-frequency, 0);
@@ -171,12 +171,12 @@ static void __devinit esp_get_clock_params(struct esp 
*esp)
 
 static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of)
 {
-   struct device_node *dma_dp = dma_of-node;
+   struct device_node *dma_dp = dma_of-dev.of_node;
struct of_device *op = esp-dev;
struct device_node *dp;
u8 bursts, val;
 
-   dp = op-node;
+   dp = op-dev.of_node;
bursts = of_getintprop_default(dp, burst-sizes, 0xff);
val = of_getintprop_default(dma_dp, burst-sizes, 0xff);
if (val != 0xff)
@@ -564,7 +564,7 @@ fail:
 static int __devinit esp_sbus_probe(struct of_device *op, const struct 
of_device_id *match)
 {
struct device_node *dma_node = NULL;
-   struct device_node *dp = op-node;
+   struct device_node *dp = op-dev.of_node;
struct of_device *dma_of = NULL;
int hme = 0;
 
@@ -573,7 +573,7 @@ static int __devinit esp_sbus_probe(struct of_device *op, 
const struct of_device
 !strcmp(dp-parent-name, dma)))
dma_node = dp-parent;
else if (!strcmp(dp-name, SUNW,fas)) {
-   dma_node = op-node;
+   dma_node = op-dev.of_node;
hme = 1;
}
if (dma_node)

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


[PATCH 12/37] drivers/usb: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/usb/host/ehci-ppc-of.c |2 +-
 drivers/usb/host/isp1760-if.c  |2 +-
 drivers/usb/host/ohci-ppc-of.c |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index 8df33b8..ad06623 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -108,7 +108,7 @@ ppc44x_enable_bmt(struct device_node *dn)
 static int __devinit
 ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
 {
-   struct device_node *dn = op-node;
+   struct device_node *dn = op-dev.of_node;
struct usb_hcd *hcd;
struct ehci_hcd *ehci = NULL;
struct resource res;
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 4293cfd..36360e2 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -31,7 +31,7 @@ static int of_isp1760_probe(struct of_device *dev,
const struct of_device_id *match)
 {
struct usb_hcd *hcd;
-   struct device_node *dp = dev-node;
+   struct device_node *dp = dev-dev.of_node;
struct resource *res;
struct resource memory;
struct of_irq oirq;
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 103263c..003aea2 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -83,7 +83,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = {
 static int __devinit
 ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
 {
-   struct device_node *dn = op-node;
+   struct device_node *dn = op-dev.of_node;
struct usb_hcd *hcd;
struct ohci_hcd *ohci;
struct resource res;

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


[PATCH 13/37] drivers/macintosh: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/macintosh/macio_asic.c  |   16 
 drivers/macintosh/macio_sysfs.c |6 +++---
 drivers/macintosh/rack-meter.c  |4 ++--
 drivers/macintosh/therm_pm72.c  |2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 26a303a..67fe13f 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -248,7 +248,7 @@ static void macio_create_fixup_irq(struct macio_dev *dev, 
int index,
 
 static void macio_add_missing_resources(struct macio_dev *dev)
 {
-   struct device_node *np = dev-ofdev.node;
+   struct device_node *np = dev-ofdev.dev.of_node;
unsigned int irq_base;
 
/* Gatwick has some missing interrupts on child nodes */
@@ -289,7 +289,7 @@ static void macio_add_missing_resources(struct macio_dev 
*dev)
 
 static void macio_setup_interrupts(struct macio_dev *dev)
 {
-   struct device_node *np = dev-ofdev.node;
+   struct device_node *np = dev-ofdev.dev.of_node;
unsigned int irq;
int i = 0, j = 0;
 
@@ -317,7 +317,7 @@ static void macio_setup_interrupts(struct macio_dev *dev)
 static void macio_setup_resources(struct macio_dev *dev,
  struct resource *parent_res)
 {
-   struct device_node *np = dev-ofdev.node;
+   struct device_node *np = dev-ofdev.dev.of_node;
struct resource r;
int index;
 
@@ -373,7 +373,7 @@ static struct macio_dev * macio_add_one_device(struct 
macio_chip *chip,
 
dev-bus = chip-lbus;
dev-media_bay = in_bay;
-   dev-ofdev.node = np;
+   dev-ofdev.dev.of_node = np;
dev-ofdev.dma_mask = 0xUL;
dev-ofdev.dev.dma_mask = dev-ofdev.dma_mask;
dev-ofdev.dev.parent = parent;
@@ -494,9 +494,9 @@ static void macio_pci_add_devices(struct macio_chip *chip)
}
 
/* Add media bay devices if any */
+   pnode = mbdev-ofdev.dev.of_node;
if (mbdev)
-   for (np = NULL; (np = of_get_next_child(mbdev-ofdev.node, np))
-!= NULL;) {
+   for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
if (macio_skip_device(np))
continue;
of_node_get(np);
@@ -506,9 +506,9 @@ static void macio_pci_add_devices(struct macio_chip *chip)
}
 
/* Add serial ports if any */
+   pnode = sdev-ofdev.dev.of_node;
if (sdev) {
-   for (np = NULL; (np = of_get_next_child(sdev-ofdev.node, np))
-!= NULL;) {
+   for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
if (macio_skip_device(np))
continue;
of_node_get(np);
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
index 9e9453b..6999ce5 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute 
*attr,\
   char *buf)   \
 {  \
struct macio_dev *mdev = to_macio_device (dev); \
-   return sprintf (buf, format_string, mdev-ofdev.node-field);   \
+   return sprintf (buf, format_string, mdev-ofdev.dev.of_node-field); \
 }
 
 static ssize_t
@@ -21,7 +21,7 @@ compatible_show (struct device *dev, struct device_attribute 
*attr, char *buf)
int length = 0;
 
of = to_macio_device (dev)-ofdev;
-   compat = of_get_property(of-node, compatible, cplen);
+   compat = of_get_property(of-dev.of_node, compatible, cplen);
if (!compat) {
*buf = '\0';
return 0;
@@ -58,7 +58,7 @@ static ssize_t devspec_show(struct device *dev,
struct of_device *ofdev;
 
ofdev = to_of_device(dev);
-   return sprintf(buf, %s\n, ofdev-node-full_name);
+   return sprintf(buf, %s\n, ofdev-dev.of_node-full_name);
 }
 
 macio_config_of_attr (name, %s\n);
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
index 93fb320..6a715d0 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -374,7 +374,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev,
pr_debug(rackmeter_probe()\n);
 
/* Get i2s-a node */
-   while ((i2s = of_get_next_child(mdev-ofdev.node, i2s)) != NULL)
+   while ((i2s = of_get_next_child(mdev-ofdev.dev.of_node, i2s)) != NULL)
   if (strcmp(i2s-name, i2s-a) == 0)
   break;
if (i2s == NULL) {
@@ -430,7 +430,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev,
of_address_to_resource(i2s, 

[PATCH 14/37] drivers/spi: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/spi/mpc52xx_psc_spi.c |   11 ++-
 drivers/spi/mpc52xx_spi.c |   14 +++---
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index 0474786..f12cfd9 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -471,18 +471,18 @@ static int __init mpc52xx_psc_spi_of_probe(struct 
of_device *op,
s16 id = -1;
int rc;
 
-   regaddr_p = of_get_address(op-node, 0, size64, NULL);
+   regaddr_p = of_get_address(op-dev.of_node, 0, size64, NULL);
if (!regaddr_p) {
dev_err(op-dev, Invalid PSC address\n);
return -EINVAL;
}
-   regaddr64 = of_translate_address(op-node, regaddr_p);
+   regaddr64 = of_translate_address(op-dev.of_node, regaddr_p);
 
/* get PSC id (1..6, used by port_config) */
if (op-dev.platform_data == NULL) {
const u32 *psc_nump;
 
-   psc_nump = of_get_property(op-node, cell-index, NULL);
+   psc_nump = of_get_property(op-dev.of_node, cell-index, NULL);
if (!psc_nump || *psc_nump  5) {
dev_err(op-dev, Invalid cell-index property\n);
return -EINVAL;
@@ -491,9 +491,10 @@ static int __init mpc52xx_psc_spi_of_probe(struct 
of_device *op,
}
 
rc = mpc52xx_psc_spi_do_probe(op-dev, (u32)regaddr64, (u32)size64,
-   irq_of_parse_and_map(op-node, 0), id);
+   irq_of_parse_and_map(op-dev.of_node, 0), id);
if (rc == 0)
-   of_register_spi_devices(dev_get_drvdata(op-dev), op-node);
+   of_register_spi_devices(dev_get_drvdata(op-dev),
+   op-dev.of_node);
 
return rc;
 }
diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c
index 6eab465..907c39a 100644
--- a/drivers/spi/mpc52xx_spi.c
+++ b/drivers/spi/mpc52xx_spi.c
@@ -402,7 +402,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
 
/* MMIO registers */
dev_dbg(op-dev, probing mpc5200 SPI device\n);
-   regs = of_iomap(op-node, 0);
+   regs = of_iomap(op-dev.of_node, 0);
if (!regs)
return -ENODEV;
 
@@ -444,11 +444,11 @@ static int __devinit mpc52xx_spi_probe(struct of_device 
*op,
ms = spi_master_get_devdata(master);
ms-master = master;
ms-regs = regs;
-   ms-irq0 = irq_of_parse_and_map(op-node, 0);
-   ms-irq1 = irq_of_parse_and_map(op-node, 1);
+   ms-irq0 = irq_of_parse_and_map(op-dev.of_node, 0);
+   ms-irq1 = irq_of_parse_and_map(op-dev.of_node, 1);
ms-state = mpc52xx_spi_fsmstate_idle;
-   ms-ipb_freq = mpc5xxx_get_bus_frequency(op-node);
-   ms-gpio_cs_count = of_gpio_count(op-node);
+   ms-ipb_freq = mpc5xxx_get_bus_frequency(op-dev.of_node);
+   ms-gpio_cs_count = of_gpio_count(op-dev.of_node);
if (ms-gpio_cs_count  0) {
master-num_chipselect = ms-gpio_cs_count;
ms-gpio_cs = kmalloc(ms-gpio_cs_count * sizeof(unsigned int),
@@ -459,7 +459,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
}
 
for (i = 0; i  ms-gpio_cs_count; i++) {
-   gpio_cs = of_get_gpio(op-node, i);
+   gpio_cs = of_get_gpio(op-dev.of_node, i);
if (gpio_cs  0) {
dev_err(op-dev,
could not parse the gpio field 
@@ -511,7 +511,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
if (rc)
goto err_register;
 
-   of_register_spi_devices(master, op-node);
+   of_register_spi_devices(master, op-dev.of_node);
dev_info(ms-master-dev, registered MPC5200 SPI bus\n);
 
return rc;

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


[PATCH 15/37] drivers/mmc: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/mmc/host/sdhci-of-core.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
index 55e3313..dfe5cea 100644
--- a/drivers/mmc/host/sdhci-of-core.c
+++ b/drivers/mmc/host/sdhci-of-core.c
@@ -118,7 +118,7 @@ static bool __devinit sdhci_of_wp_inverted(struct 
device_node *np)
 static int __devinit sdhci_of_probe(struct of_device *ofdev,
 const struct of_device_id *match)
 {
-   struct device_node *np = ofdev-node;
+   struct device_node *np = ofdev-dev.of_node;
struct sdhci_of_data *sdhci_of_data = match-data;
struct sdhci_host *host;
struct sdhci_of_host *of_host;

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


[PATCH 16/37] drivers/sbus: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/sbus/char/bbc_envctrl.c |4 ++--
 drivers/sbus/char/bbc_i2c.c |4 ++--
 drivers/sbus/char/display7seg.c |2 +-
 drivers/sbus/char/envctrl.c |2 +-
 drivers/sbus/char/flash.c   |4 ++--
 drivers/sbus/char/uctrl.c   |2 +-
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c
index 28d86f9..53c0230 100644
--- a/drivers/sbus/char/bbc_envctrl.c
+++ b/drivers/sbus/char/bbc_envctrl.c
@@ -564,9 +564,9 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp)
int devidx = 0;
 
while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) {
-   if (!strcmp(op-node-name, temperature))
+   if (!strcmp(op-dev.of_node-name, temperature))
attach_one_temp(bp, op, temp_index++);
-   if (!strcmp(op-node-name, fan-control))
+   if (!strcmp(op-dev.of_node-name, fan-control))
attach_one_fan(bp, op, fan_index++);
}
if (temp_index != 0  fan_index != 0) {
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 7e30e5f..1543ac3 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -97,7 +97,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, 
struct of_device *
client-bp = bp;
client-op = op;
 
-   reg = of_get_property(op-node, reg, NULL);
+   reg = of_get_property(op-dev.of_node, reg, NULL);
if (!reg) {
kfree(client);
return NULL;
@@ -327,7 +327,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct 
of_device *op, int inde
spin_lock_init(bp-lock);
 
entry = 0;
-   for (dp = op-node-child;
+   for (dp = op-dev.of_node-child;
 dp  entry  8;
 dp = dp-sibling, entry++) {
struct of_device *child_op;
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 4431578..d0a10f4 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -215,7 +215,7 @@ static int __devinit d7s_probe(struct of_device *op,
writeb(regs,  p-regs);
 
printk(KERN_INFO PFX 7-Segment Display%s at [%s:0x%llx] %s\n,
-  op-node-full_name,
+  op-dev.of_node-full_name,
   (regs  D7S_FLIP) ?  (FLIPPED) : ,
   op-resource[0].start,
   sol_compat ? in sol_compat mode : );
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index aa2b60a..84a4310 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1042,7 +1042,7 @@ static int __devinit envctrl_probe(struct of_device *op,
return -ENOMEM;
 
index = 0;
-   dp = op-node-child;
+   dp = op-dev.of_node-child;
while (dp) {
if (!strcmp(dp-name, gpio)) {
i2c_childlist[index].i2ctype = I2C_GPIO;
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 4108347..dc8f95d 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -163,7 +163,7 @@ static struct miscdevice flash_dev = { FLASH_MINOR, 
flash, flash_fops };
 static int __devinit flash_probe(struct of_device *op,
 const struct of_device_id *match)
 {
-   struct device_node *dp = op-node;
+   struct device_node *dp = op-dev.of_node;
struct device_node *parent;
 
parent = dp-parent;
@@ -185,7 +185,7 @@ static int __devinit flash_probe(struct of_device *op,
flash.busy = 0;
 
printk(KERN_INFO %s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n,
-  op-node-full_name,
+  op-dev.of_node-full_name,
   flash.read_base, flash.read_size,
   flash.write_base, flash.write_size);
 
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 2c56fd5..acc6738 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -382,7 +382,7 @@ static int __devinit uctrl_probe(struct of_device *op,
 
sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, 
p-regs-uctrl_intr);
printk(KERN_INFO %s: uctrl regs[0x%p] (irq %d)\n,
-  op-node-full_name, p-regs, p-irq);
+  op-dev.of_node-full_name, p-regs, p-irq);
uctrl_get_event_status(p);
uctrl_get_external_status(p);
 

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


[PATCH 17/37] drivers/net: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/net/can/sja1000/sja1000_of_platform.c |4 ++--
 drivers/net/ehea/ehea_main.c  |   14 ++---
 drivers/net/greth.c   |3 ++-
 drivers/net/ibm_newemac/core.c|   13 ++--
 drivers/net/ibm_newemac/debug.c   |9 
 drivers/net/ibm_newemac/debug.h   |4 ++--
 drivers/net/ibm_newemac/mal.c |   28 +
 drivers/net/ibm_newemac/rgmii.c   |   12 +--
 drivers/net/ibm_newemac/tah.c |7 --
 drivers/net/ibm_newemac/zmii.c|9 
 drivers/net/myri_sbus.c   |2 +-
 drivers/net/niu.c |   10 -
 drivers/net/phy/mdio-gpio.c   |6 +++--
 drivers/net/sunbmac.c |6 +++--
 drivers/net/sunhme.c  |8 ---
 drivers/net/sunlance.c|6 +++--
 drivers/net/sunqe.c   |6 +++--
 drivers/net/xilinx_emaclite.c |   10 -
 18 files changed, 81 insertions(+), 76 deletions(-)

diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c 
b/drivers/net/can/sja1000/sja1000_of_platform.c
index 9dd076a..dc5f20c 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -72,7 +72,7 @@ static int __devexit sja1000_ofp_remove(struct of_device 
*ofdev)
 {
struct net_device *dev = dev_get_drvdata(ofdev-dev);
struct sja1000_priv *priv = netdev_priv(dev);
-   struct device_node *np = ofdev-node;
+   struct device_node *np = ofdev-dev.of_node;
struct resource res;
 
dev_set_drvdata(ofdev-dev, NULL);
@@ -91,7 +91,7 @@ static int __devexit sja1000_ofp_remove(struct of_device 
*ofdev)
 static int __devinit sja1000_ofp_probe(struct of_device *ofdev,
   const struct of_device_id *id)
 {
-   struct device_node *np = ofdev-node;
+   struct device_node *np = ofdev-dev.of_node;
struct net_device *dev;
struct sja1000_priv *priv;
struct resource res;
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index b004eab..3cdc938 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -3034,7 +3034,7 @@ static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | 
S_IROTH, ehea_show_port_id,
 static void __devinit logical_port_release(struct device *dev)
 {
struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev);
-   of_node_put(port-ofdev.node);
+   of_node_put(port-ofdev.dev.of_node);
 }
 
 static struct device *ehea_register_port(struct ehea_port *port,
@@ -3042,7 +3042,7 @@ static struct device *ehea_register_port(struct ehea_port 
*port,
 {
int ret;
 
-   port-ofdev.node = of_node_get(dn);
+   port-ofdev.dev.of_node = of_node_get(dn);
port-ofdev.dev.parent = port-adapter-ofdev-dev;
port-ofdev.dev.bus = ibmebus_bus_type;
 
@@ -3209,7 +3209,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter)
const u32 *dn_log_port_id;
int i = 0;
 
-   lhea_dn = adapter-ofdev-node;
+   lhea_dn = adapter-ofdev-dev.of_node;
while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
 
dn_log_port_id = of_get_property(eth_dn, ibm,hea-port-no,
@@ -3248,7 +3248,7 @@ static struct device_node *ehea_get_eth_dn(struct 
ehea_adapter *adapter,
struct device_node *eth_dn = NULL;
const u32 *dn_log_port_id;
 
-   lhea_dn = adapter-ofdev-node;
+   lhea_dn = adapter-ofdev-dev.of_node;
while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
 
dn_log_port_id = of_get_property(eth_dn, ibm,hea-port-no,
@@ -3378,7 +3378,7 @@ static int __devinit ehea_probe_adapter(struct of_device 
*dev,
const u64 *adapter_handle;
int ret;
 
-   if (!dev || !dev-node) {
+   if (!dev || !dev-dev.of_node) {
ehea_error(Invalid ibmebus device probed);
return -EINVAL;
}
@@ -3394,14 +3394,14 @@ static int __devinit ehea_probe_adapter(struct 
of_device *dev,
 
adapter-ofdev = dev;
 
-   adapter_handle = of_get_property(dev-node, ibm,hea-handle,
+   adapter_handle = of_get_property(dev-dev.of_node, ibm,hea-handle,
 NULL);
if (adapter_handle)
adapter-handle = *adapter_handle;
 
if (!adapter-handle) {
dev_err(dev-dev, failed getting handle for adapter
-'%s'\n, dev-node-full_name);
+'%s'\n, dev-dev.of_node-full_name);
ret = -ENODEV;
goto out_free_ad;
}
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 

[PATCH 18/37] drivers/pcmcia: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/pcmcia/electra_cf.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index 89cfddc..a4d821f 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -184,7 +184,7 @@ static int __devinit electra_cf_probe(struct of_device 
*ofdev,
  const struct of_device_id *match)
 {
struct device *device = ofdev-dev;
-   struct device_node *np = ofdev-node;
+   struct device_node *np = ofdev-dev.of_node;
struct electra_cf_socket   *cf;
struct resource mem, io;
int status;

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


[PATCH 19/37] drivers/serial: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/serial/apbuart.c|2 +-
 drivers/serial/nwpserial.c  |2 +-
 drivers/serial/of_serial.c  |4 ++--
 drivers/serial/pmac_zilog.c |2 +-
 drivers/serial/sunhv.c  |2 +-
 drivers/serial/sunsab.c |6 +++---
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
index fe91319..52015d7 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -559,7 +559,7 @@ static int __devinit apbuart_probe(struct of_device *op,
 
i = 0;
for (i = 0; i  grlib_apbuart_port_nr; i++) {
-   if (op-node == grlib_apbuart_nodes[i])
+   if (op-dev.of_node == grlib_apbuart_nodes[i])
break;
}
 
diff --git a/drivers/serial/nwpserial.c b/drivers/serial/nwpserial.c
index e1ab8ec..3c02fa9 100644
--- a/drivers/serial/nwpserial.c
+++ b/drivers/serial/nwpserial.c
@@ -344,7 +344,7 @@ int nwpserial_register_port(struct uart_port *port)
 
mutex_lock(nwpserial_mutex);
 
-   dn = to_of_device(port-dev)-node;
+   dn = to_of_device(port-dev)-dev.of_node;
if (dn == NULL)
goto out;
 
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index cdf172e..18bf39b 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -30,7 +30,7 @@ static int __devinit of_platform_serial_setup(struct 
of_device *ofdev,
int type, struct uart_port *port)
 {
struct resource resource;
-   struct device_node *np = ofdev-node;
+   struct device_node *np = ofdev-dev.of_node;
const unsigned int *clk, *spd;
const u32 *prop;
int ret, prop_size;
@@ -87,7 +87,7 @@ static int __devinit of_platform_serial_probe(struct 
of_device *ofdev,
int port_type;
int ret;
 
-   if (of_find_property(ofdev-node, used-by-rtas, NULL))
+   if (of_find_property(ofdev-dev.of_node, used-by-rtas, NULL))
return -EBUSY;
 
info = kmalloc(sizeof(*info), GFP_KERNEL);
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index f020de1..8a3 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -1610,7 +1610,7 @@ static int pmz_attach(struct macio_dev *mdev, const 
struct of_device_id *match)
/* Iterate the pmz_ports array to find a matching entry
 */
for (i = 0; i  MAX_ZS_PORTS; i++)
-   if (pmz_ports[i].node == mdev-ofdev.node) {
+   if (pmz_ports[i].node == mdev-ofdev.dev.of_node) {
struct uart_pmac_port *uap = pmz_ports[i];
 
uap-dev = mdev;
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index d14cca7..d1eedf1 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -565,7 +565,7 @@ static int __devinit hv_probe(struct of_device *op, const 
struct of_device_id *m
if (err)
goto out_free_con_read_page;
 
-   sunserial_console_match(sunhv_console, op-node,
+   sunserial_console_match(sunhv_console, op-dev.of_node,
sunhv_reg, port-line, false);
 
err = uart_add_one_port(sunhv_reg, port);
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index d514e28..2b8b2c2 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char 
*options)
printk(Console: ttyS%d (SAB82532)\n,
   (sunsab_reg.minor - 64) + con-index);
 
-   sunserial_console_termios(con, to_of_device(up-port.dev)-node);
+   sunserial_console_termios(con, to_of_device(up-port.dev)-dev.of_node);
 
switch (con-cflag  CBAUD) {
case B150: baud = 150; break;
@@ -1026,11 +1026,11 @@ static int __devinit sab_probe(struct of_device *op, 
const struct of_device_id *
if (err)
goto out1;
 
-   sunserial_console_match(SUNSAB_CONSOLE(), op-node,
+   sunserial_console_match(SUNSAB_CONSOLE(), op-dev.of_node,
sunsab_reg, up[0].port.line,
false);
 
-   sunserial_console_match(SUNSAB_CONSOLE(), op-node,
+   sunserial_console_match(SUNSAB_CONSOLE(), op-dev.of_node,
sunsab_reg, up[1].port.line,
false);
 

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


[PATCH 20/37] drivers/input: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/input/serio/i8042-sparcio.h |2 +-
 drivers/input/serio/xilinx_ps2.c|8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/input/serio/i8042-sparcio.h 
b/drivers/input/serio/i8042-sparcio.h
index 5071af2..29e1769 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -51,7 +51,7 @@ static inline void i8042_write_command(int val)
 
 static int __devinit sparc_i8042_probe(struct of_device *op, const struct 
of_device_id *match)
 {
-   struct device_node *dp = op-node;
+   struct device_node *dp = op-dev.of_node;
 
dp = dp-child;
while (dp) {
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
index 8298e1f..f154153 100644
--- a/drivers/input/serio/xilinx_ps2.c
+++ b/drivers/input/serio/xilinx_ps2.c
@@ -243,17 +243,17 @@ static int __devinit xps2_of_probe(struct of_device 
*ofdev,
int error;
 
dev_info(dev, Device Tree Probing \'%s\'\n,
-   ofdev-node-name);
+   ofdev-dev.of_node-name);
 
/* Get iospace for the device */
-   error = of_address_to_resource(ofdev-node, 0, r_mem);
+   error = of_address_to_resource(ofdev-dev.of_node, 0, r_mem);
if (error) {
dev_err(dev, invalid address\n);
return error;
}
 
/* Get IRQ for the device */
-   if (of_irq_to_resource(ofdev-node, 0, r_irq) == NO_IRQ) {
+   if (of_irq_to_resource(ofdev-dev.of_node, 0, r_irq) == NO_IRQ) {
dev_err(dev, no IRQ found\n);
return -ENODEV;
}
@@ -341,7 +341,7 @@ static int __devexit xps2_of_remove(struct of_device 
*of_dev)
iounmap(drvdata-base_address);
 
/* Get iospace of the device */
-   if (of_address_to_resource(of_dev-node, 0, r_mem))
+   if (of_address_to_resource(of_dev-dev.of_node, 0, r_mem))
dev_err(dev, invalid address\n);
else
release_mem_region(r_mem.start, resource_size(r_mem));

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


[PATCH 21/37] drivers/ata: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/ata/pata_macio.c   |2 +-
 drivers/ata/pata_of_platform.c |2 +-
 drivers/ide/pmac.c |   10 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index 4cc7bbd..2cf31e7 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -1138,7 +1138,7 @@ static int __devinit pata_macio_attach(struct macio_dev 
*mdev,
Failed to allocate private memory\n);
return -ENOMEM;
}
-   priv-node = of_node_get(mdev-ofdev.node);
+   priv-node = of_node_get(mdev-ofdev.dev.of_node);
priv-mdev = mdev;
priv-dev = mdev-ofdev.dev;
 
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index 1f18ad9..19da29f 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -18,7 +18,7 @@ static int __devinit pata_of_platform_probe(struct of_device 
*ofdev,
const struct of_device_id *match)
 {
int ret;
-   struct device_node *dn = ofdev-node;
+   struct device_node *dn = ofdev-dev.of_node;
struct resource io_res;
struct resource ctl_res;
struct resource irq_res;
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c
index 850ee45..9697de9 100644
--- a/drivers/ide/pmac.c
+++ b/drivers/ide/pmac.c
@@ -1152,7 +1152,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const 
struct of_device_id *match)
 
if (macio_resource_count(mdev) == 0) {
printk(KERN_WARNING ide-pmac: no address for %s\n,
-   mdev-ofdev.node-full_name);
+   mdev-ofdev.dev.of_node-full_name);
rc = -ENXIO;
goto out_free_pmif;
}
@@ -1160,7 +1160,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const 
struct of_device_id *match)
/* Request memory resource for IO ports */
if (macio_request_resource(mdev, 0, ide-pmac (ports))) {
printk(KERN_ERR ide-pmac: can't request MMIO resource for 
-   %s!\n, mdev-ofdev.node-full_name);
+   %s!\n, mdev-ofdev.dev.of_node-full_name);
rc = -EBUSY;
goto out_free_pmif;
}
@@ -1172,7 +1172,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const 
struct of_device_id *match)
 */
if (macio_irq_count(mdev) == 0) {
printk(KERN_WARNING ide-pmac: no intrs for device %s, using 
-   13\n, mdev-ofdev.node-full_name);
+   13\n, mdev-ofdev.dev.of_node-full_name);
irq = irq_create_mapping(NULL, 13);
} else
irq = macio_irq(mdev, 0);
@@ -1181,7 +1181,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const 
struct of_device_id *match)
regbase = (unsigned long) base;
 
pmif-mdev = mdev;
-   pmif-node = mdev-ofdev.node;
+   pmif-node = mdev-ofdev.dev.of_node;
pmif-regbase = regbase;
pmif-irq = irq;
pmif-kauai_fcr = NULL;
@@ -1190,7 +1190,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const 
struct of_device_id *match)
if (macio_request_resource(mdev, 1, ide-pmac (dma)))
printk(KERN_WARNING ide-pmac: can't request DMA 
resource for %s!\n,
-   mdev-ofdev.node-full_name);
+   mdev-ofdev.dev.of_node-full_name);
else
pmif-dma_regs = ioremap(macio_resource_start(mdev, 1), 
0x1000);
} else

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


[PATCH 22/37] drivers/leds: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/leds/leds-gpio.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index e5225d2..7ff758a 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -210,7 +210,7 @@ struct gpio_led_of_platform_data {
 static int __devinit of_gpio_leds_probe(struct of_device *ofdev,
const struct of_device_id *match)
 {
-   struct device_node *np = ofdev-node, *child;
+   struct device_node *np = ofdev-dev.of_node, *child;
struct gpio_led led;
struct gpio_led_of_platform_data *pdata;
int count = 0, ret;

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


[PATCH 23/37] drivers/i2c: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/i2c/busses/i2c-mpc.c |   17 +
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 78a15af..0123a6e 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -559,14 +559,14 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
 
init_waitqueue_head(i2c-queue);
 
-   i2c-base = of_iomap(op-node, 0);
+   i2c-base = of_iomap(op-dev.of_node, 0);
if (!i2c-base) {
dev_err(i2c-dev, failed to map controller\n);
result = -ENOMEM;
goto fail_map;
}
 
-   i2c-irq = irq_of_parse_and_map(op-node, 0);
+   i2c-irq = irq_of_parse_and_map(op-dev.of_node, 0);
if (i2c-irq != NO_IRQ) { /* i2c-irq = NO_IRQ implies polling */
result = request_irq(i2c-irq, mpc_i2c_isr,
 IRQF_SHARED, i2c-mpc, i2c);
@@ -576,21 +576,22 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
}
}
 
-   if (of_get_property(op-node, fsl,preserve-clocking, NULL)) {
+   if (of_get_property(op-dev.of_node, fsl,preserve-clocking, NULL)) {
clock = MPC_I2C_CLOCK_PRESERVE;
} else {
-   prop = of_get_property(op-node, clock-frequency, plen);
+   prop = of_get_property(op-dev.of_node, clock-frequency,
+   plen);
if (prop  plen == sizeof(u32))
clock = *prop;
}
 
if (match-data) {
struct mpc_i2c_data *data = match-data;
-   data-setup(op-node, i2c, clock, data-prescaler);
+   data-setup(op-dev.of_node, i2c, clock, data-prescaler);
} else {
/* Backwards compatibility */
-   if (of_get_property(op-node, dfsrr, NULL))
-   mpc_i2c_setup_8xxx(op-node, i2c, clock, 0);
+   if (of_get_property(op-dev.of_node, dfsrr, NULL))
+   mpc_i2c_setup_8xxx(op-dev.of_node, i2c, clock, 0);
}
 
dev_set_drvdata(op-dev, i2c);
@@ -604,7 +605,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
dev_err(i2c-dev, failed to add adapter\n);
goto fail_add;
}
-   of_register_i2c_devices(i2c-adap, op-node);
+   of_register_i2c_devices(i2c-adap, op-dev.of_node);
 
return result;
 

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


[PATCH 24/37] drivers/char: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/char/hw_random/n2-drv.c |2 +-
 drivers/char/hw_random/pasemi-rng.c |2 +-
 drivers/char/ipmi/ipmi_si_intf.c|4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c
index 9b3e09c..4d05003 100644
--- a/drivers/char/hw_random/n2-drv.c
+++ b/drivers/char/hw_random/n2-drv.c
@@ -660,7 +660,7 @@ static int __devinit n2rng_probe(struct of_device *op,
np-hvapi_major);
goto out_hvapi_unregister;
}
-   np-num_units = of_getintprop_default(op-node,
+   np-num_units = of_getintprop_default(op-dev.of_node,
  rng-#units, 0);
if (!np-num_units) {
dev_err(op-dev, VF RNG lacks rng-#units property\n);
diff --git a/drivers/char/hw_random/pasemi-rng.c 
b/drivers/char/hw_random/pasemi-rng.c
index 7fa61dd..b213855 100644
--- a/drivers/char/hw_random/pasemi-rng.c
+++ b/drivers/char/hw_random/pasemi-rng.c
@@ -98,7 +98,7 @@ static int __devinit rng_probe(struct of_device *ofdev,
   const struct of_device_id *match)
 {
void __iomem *rng_regs;
-   struct device_node *rng_np = ofdev-node;
+   struct device_node *rng_np = ofdev-dev.of_node;
struct resource res;
int err = 0;
 
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 176f175..45305f2 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2406,7 +2406,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
struct smi_info *info;
struct resource resource;
const int *regsize, *regspacing, *regshift;
-   struct device_node *np = dev-node;
+   struct device_node *np = dev-dev.of_node;
int ret;
int proplen;
 
@@ -2462,7 +2462,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
info-io.regspacing = regspacing ? *regspacing : DEFAULT_REGSPACING;
info-io.regshift   = regshift ? *regshift : 0;
 
-   info-irq   = irq_of_parse_and_map(dev-node, 0);
+   info-irq   = irq_of_parse_and_map(dev-dev.of_node, 0);
info-dev   = dev-dev;
 
dev_dbg(dev-dev, addr 0x%lx regsize %d spacing %d irq %x\n,

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


[PATCH 26/37] drivers/mtd: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/mtd/maps/physmap_of.c|6 +++---
 drivers/mtd/maps/sun_uflash.c|2 +-
 drivers/mtd/nand/fsl_elbc_nand.c |6 +++---
 drivers/mtd/nand/pasemi_nand.c   |2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 61e4eb4..494af8e 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -142,7 +142,7 @@ static int of_flash_remove(struct of_device *dev)
 static struct mtd_info * __devinit obsolete_probe(struct of_device *dev,
  struct map_info *map)
 {
-   struct device_node *dp = dev-node;
+   struct device_node *dp = dev-dev.of_node;
const char *of_probe;
struct mtd_info *mtd;
static const char *rom_probe_types[]
@@ -179,7 +179,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
static const char *part_probe_types[]
= { cmdlinepart, RedBoot, NULL };
 #endif
-   struct device_node *dp = dev-node;
+   struct device_node *dp = dev-dev.of_node;
struct resource res;
struct of_flash *info;
const char *probe_type = match-data;
@@ -203,7 +203,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
p = of_get_property(dp, reg, count);
if (count % reg_tuple_size != 0) {
dev_err(dev-dev, Malformed reg property on %s\n,
-   dev-node-full_name);
+   dev-dev.of_node-full_name);
err = -EINVAL;
goto err_flash_remove;
}
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index fd7a101..365811d 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -109,7 +109,7 @@ int uflash_devinit(struct of_device *op, struct device_node 
*dp)
 
 static int __devinit uflash_probe(struct of_device *op, const struct 
of_device_id *match)
 {
-   struct device_node *dp = op-node;
+   struct device_node *dp = op-dev.of_node;
 
/* Flashprom must have the user property in order to
 * be used by this driver.
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index ae30fb6..4a60795 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -1030,14 +1030,14 @@ static int __devinit fsl_elbc_ctrl_probe(struct 
of_device *ofdev,
init_waitqueue_head(ctrl-controller.wq);
init_waitqueue_head(ctrl-irq_wait);
 
-   ctrl-regs = of_iomap(ofdev-node, 0);
+   ctrl-regs = of_iomap(ofdev-dev.of_node, 0);
if (!ctrl-regs) {
dev_err(ofdev-dev, failed to get memory region\n);
ret = -ENODEV;
goto err;
}
 
-   ctrl-irq = of_irq_to_resource(ofdev-node, 0, NULL);
+   ctrl-irq = of_irq_to_resource(ofdev-dev.of_node, 0, NULL);
if (ctrl-irq == NO_IRQ) {
dev_err(ofdev-dev, failed to get irq resource\n);
ret = -ENODEV;
@@ -1058,7 +1058,7 @@ static int __devinit fsl_elbc_ctrl_probe(struct of_device 
*ofdev,
goto err;
}
 
-   for_each_child_of_node(ofdev-node, child)
+   for_each_child_of_node(ofdev-dev.of_node, child)
if (of_device_is_compatible(child, fsl,elbc-fcm-nand))
fsl_elbc_chip_probe(ctrl, child);
 
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c
index a8b9376..edfc27b 100644
--- a/drivers/mtd/nand/pasemi_nand.c
+++ b/drivers/mtd/nand/pasemi_nand.c
@@ -93,7 +93,7 @@ static int __devinit pasemi_nand_probe(struct of_device 
*ofdev,
  const struct of_device_id *match)
 {
struct pci_dev *pdev;
-   struct device_node *np = ofdev-node;
+   struct device_node *np = ofdev-dev.of_node;
struct resource res;
struct nand_chip *chip;
int err = 0;

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


[PATCH 27/37] drivers/of: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/of/device.c |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/of/device.c b/drivers/of/device.c
index 224ae6b..24068bb 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -21,9 +21,9 @@
 const struct of_device_id *of_match_device(const struct of_device_id *matches,
const struct of_device *dev)
 {
-   if (!dev-node)
+   if (!dev-dev.of_node)
return NULL;
-   return of_match_node(matches, dev-node);
+   return of_match_node(matches, dev-dev.of_node);
 }
 EXPORT_SYMBOL(of_match_device);
 
@@ -54,7 +54,7 @@ static ssize_t devspec_show(struct device *dev,
struct of_device *ofdev;
 
ofdev = to_of_device(dev);
-   return sprintf(buf, %s\n, ofdev-node-full_name);
+   return sprintf(buf, %s\n, ofdev-dev.of_node-full_name);
 }
 
 static ssize_t name_show(struct device *dev,
@@ -63,7 +63,7 @@ static ssize_t name_show(struct device *dev,
struct of_device *ofdev;
 
ofdev = to_of_device(dev);
-   return sprintf(buf, %s\n, ofdev-node-name);
+   return sprintf(buf, %s\n, ofdev-dev.of_node-name);
 }
 
 static ssize_t modalias_show(struct device *dev,
@@ -97,14 +97,14 @@ void of_release_dev(struct device *dev)
struct of_device *ofdev;
 
ofdev = to_of_device(dev);
-   of_node_put(ofdev-node);
+   of_node_put(ofdev-dev.of_node);
kfree(ofdev);
 }
 EXPORT_SYMBOL(of_release_dev);
 
 int of_device_register(struct of_device *ofdev)
 {
-   BUG_ON(ofdev-node == NULL);
+   BUG_ON(ofdev-dev.of_node == NULL);
 
device_initialize(ofdev-dev);
 
@@ -112,7 +112,7 @@ int of_device_register(struct of_device *ofdev)
 * the parent. If there is no parent defined, set the node
 * explicitly */
if (!ofdev-dev.parent)
-   set_dev_node(ofdev-dev, of_node_to_nid(ofdev-node));
+   set_dev_node(ofdev-dev, of_node_to_nid(ofdev-dev.of_node));
 
return device_add(ofdev-dev);
 }
@@ -132,11 +132,11 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,
ssize_t tsize, csize, repend;
 
/* Name  Type */
-   csize = snprintf(str, len, of:N%sT%s,
-   ofdev-node-name, ofdev-node-type);
+   csize = snprintf(str, len, of:N%sT%s, ofdev-dev.of_node-name,
+ofdev-dev.of_node-type);
 
/* Get compatible property if any */
-   compat = of_get_property(ofdev-node, compatible, cplen);
+   compat = of_get_property(ofdev-dev.of_node, compatible, cplen);
if (!compat)
return csize;
 

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


[PATCH 28/37] drivers/scsi: use .of_node instead of .archdata.of_node in struct device

2010-03-11 Thread Grant Likely
.archdata.node is being removed from Microblaze, SPARC and PowerPC.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/scsi/ibmvscsi/ibmvfc.c   |2 +-
 drivers/scsi/ibmvscsi/ibmvscsi.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c
index 732f6d3..e230cd4 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.c
+++ b/drivers/scsi/ibmvscsi/ibmvfc.c
@@ -1155,7 +1155,7 @@ static void ibmvfc_gather_partition_info(struct 
ibmvfc_host *vhost)
 static void ibmvfc_set_login_info(struct ibmvfc_host *vhost)
 {
struct ibmvfc_npiv_login *login_info = vhost-login_info;
-   struct device_node *of_node = vhost-dev-archdata.of_node;
+   struct device_node *of_node = vhost-dev-of_node;
const char *location;
 
memset(login_info, 0, sizeof(*login_info));
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index e3a18e0..c4b5af3 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -955,7 +955,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data 
*hostdata)
struct viosrp_capabilities *req;
struct srp_event_struct *evt_struct;
unsigned long flags;
-   struct device_node *of_node = hostdata-dev-archdata.of_node;
+   struct device_node *of_node = hostdata-dev-of_node;
const char *location;
 
evt_struct = get_event_struct(hostdata-pool);

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


[PATCH 29/37] drivers/char: use .of_node instead of .archdata.of_node in struct device

2010-03-11 Thread Grant Likely
.archdata.node is being removed from Microblaze, SPARC and PowerPC.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/char/viotape.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 042c814..f37935c 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -865,7 +865,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct 
vio_device_id *id)
 {
int i = vdev-unit_address;
int j;
-   struct device_node *node = vdev-dev.archdata.of_node;
+   struct device_node *node = vdev-dev.of_node;
 
if (i = VIOTAPE_MAX_TAPE)
return -ENODEV;

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


[PATCH 30/37] drivers/cdrom: use .of_node instead of .archdata.of_node in struct device

2010-03-11 Thread Grant Likely
.archdata.node is being removed from Microblaze, SPARC and PowerPC.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/cdrom/viocd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index cc435be..451cd70 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct 
vio_device_id *id)
struct disk_info *d;
struct cdrom_device_info *c;
struct request_queue *q;
-   struct device_node *node = vdev-dev.archdata.of_node;
+   struct device_node *node = vdev-dev.of_node;
 
deviceno = vdev-unit_address;
if (deviceno = VIOCD_MAX_CD)

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


[PATCH 31/37] drivers/of: use .of_node instead of .archdata.of_node in struct device

2010-03-11 Thread Grant Likely
.archdata.node is being removed from Microblaze, SPARC and PowerPC.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/of/of_i2c.c  |1 -
 drivers/of/of_mdio.c |1 -
 drivers/of/of_spi.c  |1 -
 3 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c
index 43f803e..ab6522c 100644
--- a/drivers/of/of_i2c.c
+++ b/drivers/of/of_i2c.c
@@ -42,7 +42,6 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
 
info.addr = be32_to_cpup(addr);
 
-   dev_archdata_set_node(dev_ad, node); /* temporary */
info.of_node = node;
info.archdata = dev_ad;
 
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 64e08d7..794fbc2 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -79,7 +79,6 @@ int of_mdiobus_register(struct mii_bus *mdio, struct 
device_node *np)
/* Associate the OF node with the device structure so it
 * can be looked up later */
of_node_get(child);
-   dev_archdata_set_node(phy-dev.archdata, child); /* temp */
phy-dev.of_node = child;
 
/* All data is now stored in the phy struct; register it */
diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c
index 433d76d..5fed7e3 100644
--- a/drivers/of/of_spi.c
+++ b/drivers/of/of_spi.c
@@ -80,7 +80,6 @@ void of_register_spi_devices(struct spi_master *master, 
struct device_node *np)
/* Store a pointer to the node in the device structure */
of_node_get(nc);
spi-dev.of_node = nc;
-   spi-dev.archdata.of_node = nc; /* temporary */
 
/* Register the new device */
request_module(spi-modalias);

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


[PATCH 32/37] sound/aoa: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 sound/aoa/fabrics/layout.c  |2 +-
 sound/aoa/soundbus/core.c   |8 
 sound/aoa/soundbus/i2sbus/control.c |2 +-
 sound/aoa/soundbus/i2sbus/core.c|4 ++--
 sound/aoa/soundbus/sysfs.c  |4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/aoa/fabrics/layout.c b/sound/aoa/fabrics/layout.c
index 7a437da..da38f2b 100644
--- a/sound/aoa/fabrics/layout.c
+++ b/sound/aoa/fabrics/layout.c
@@ -991,7 +991,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev 
*sdev)
return -ENODEV;
 
/* by breaking out we keep a reference */
-   while ((sound = of_get_next_child(sdev-ofdev.node, sound))) {
+   while ((sound = of_get_next_child(sdev-ofdev.dev.of_node, sound))) {
if (sound-type  strcasecmp(sound-type, soundchip) == 0)
break;
}
diff --git a/sound/aoa/soundbus/core.c b/sound/aoa/soundbus/core.c
index fa8ab28..99ca712 100644
--- a/sound/aoa/soundbus/core.c
+++ b/sound/aoa/soundbus/core.c
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct 
kobj_uevent_env *env)
of = soundbus_dev-ofdev;
 
/* stuff we want to pass to /sbin/hotplug */
-   retval = add_uevent_var(env, OF_NAME=%s, of-node-name);
+   retval = add_uevent_var(env, OF_NAME=%s, of-dev.of_node-name);
if (retval)
return retval;
 
-   retval = add_uevent_var(env, OF_TYPE=%s, of-node-type);
+   retval = add_uevent_var(env, OF_TYPE=%s, of-dev.of_node-type);
if (retval)
return retval;
 
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct 
kobj_uevent_env *env)
 * it's not really legal to split it out with commas. We split it
 * up using a number of environment variables instead. */
 
-   compat = of_get_property(of-node, compatible, cplen);
+   compat = of_get_property(of-dev.of_node, compatible, cplen);
while (compat  cplen  0) {
int tmp = env-buflen;
retval = add_uevent_var(env, OF_COMPATIBLE_%d=%s, seen, 
compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)
 
/* sanity checks */
if (!dev-attach_codec ||
-   !dev-ofdev.node ||
+   !dev-ofdev.dev.of_node ||
dev-pcmname ||
dev-pcmid != -1) {
printk(KERN_ERR soundbus: adding device failed sanity 
check!\n);
diff --git a/sound/aoa/soundbus/i2sbus/control.c 
b/sound/aoa/soundbus/i2sbus/control.c
index 87beb4a..799804d 100644
--- a/sound/aoa/soundbus/i2sbus/control.c
+++ b/sound/aoa/soundbus/i2sbus/control.c
@@ -41,7 +41,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c,
 {
struct device_node *np;
 
-   np = i2sdev-sound.ofdev.node;
+   np = i2sdev-sound.ofdev.dev.of_node;
i2sdev-enable = pmf_find_function(np, enable);
i2sdev-cell_enable = pmf_find_function(np, cell-enable);
i2sdev-clock_enable = pmf_find_function(np, clock-enable);
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index 4e3b819..ddb1577 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -220,8 +220,8 @@ static int i2sbus_add_dev(struct macio_dev *macio,
 
mutex_init(dev-lock);
spin_lock_init(dev-low_lock);
-   dev-sound.ofdev.node = np;
dev-sound.ofdev.dma_mask = macio-ofdev.dma_mask;
+   dev-sound.ofdev.dev.of_node = np;
dev-sound.ofdev.dev.dma_mask = dev-sound.ofdev.dma_mask;
dev-sound.ofdev.dev.parent = macio-ofdev.dev;
dev-sound.ofdev.dev.release = i2sbus_release_dev;
@@ -345,7 +345,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct 
of_device_id *match)
return -ENODEV;
}
 
-   while ((np = of_get_next_child(dev-ofdev.node, np))) {
+   while ((np = of_get_next_child(dev-ofdev.dev.of_node, np))) {
if (of_device_is_compatible(np, i2sbus) ||
of_device_is_compatible(np, i2s-modem)) {
got += i2sbus_add_dev(dev, control, np);
diff --git a/sound/aoa/soundbus/sysfs.c b/sound/aoa/soundbus/sysfs.c
index f580942..6496e75 100644
--- a/sound/aoa/soundbus/sysfs.c
+++ b/sound/aoa/soundbus/sysfs.c
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute 
*attr,\
   char *buf)   \
 {  \
struct soundbus_dev *mdev = to_soundbus_device (dev);   \
-   return sprintf (buf, format_string, mdev-ofdev.node-field);   \
+   return sprintf (buf, format_string, mdev-ofdev.dev.of_node-field); \
 }
 
 static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t 

[PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 sound/soc/fsl/mpc8610_hpcd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index ef67d1c..d7e1b9a 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
 static int mpc8610_hpcd_probe(struct of_device *ofdev,
const struct of_device_id *match)
 {
-   struct device_node *np = ofdev-node;
+   struct device_node *np = ofdev-dev.of_node;
struct device_node *codec_np = NULL;
struct device_node *guts_np = NULL;
struct device_node *dma_np = NULL;

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


[PATCH 34/37] sound/sparc: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 sound/sparc/cs4231.c |6 +++---
 sound/sparc/dbri.c   |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 8d13d93..14cb87c 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -2076,12 +2076,12 @@ static int __devinit cs4231_ebus_probe(struct of_device 
*op, const struct of_dev
 static int __devinit cs4231_probe(struct of_device *op, const struct 
of_device_id *match)
 {
 #ifdef EBUS_SUPPORT
-   if (!strcmp(op-node-parent-name, ebus))
+   if (!strcmp(op-dev.of_node-parent-name, ebus))
return cs4231_ebus_probe(op, match);
 #endif
 #ifdef SBUS_SUPPORT
-   if (!strcmp(op-node-parent-name, sbus) ||
-   !strcmp(op-node-parent-name, sbi))
+   if (!strcmp(op-dev.of_node-parent-name, sbus) ||
+   !strcmp(op-dev.of_node-parent-name, sbi))
return cs4231_sbus_probe(op, match);
 #endif
return -ENODEV;
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 1d2e51b..2734c36 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2650,7 +2650,7 @@ static int __devinit dbri_probe(struct of_device *op, 
const struct of_device_id
 
printk(KERN_INFO audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n,
   dev, dbri-regs,
-  dbri-irq, op-node-name[9], dbri-mm.version);
+  dbri-irq, op-dev.of_node-name[9], dbri-mm.version);
dev++;
 
return 0;

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


[PATCH 35/37] arch/powerpc: Remove .archdata.of_node and use .of_node in struct device

2010-03-11 Thread Grant Likely
.archdata.of_node is being removed from Microblaze, SPARC and PowerPC
because it duplicates the struct device .of_node pointer.  This patch
also removes .node from struct of_device for the same reason.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/powerpc/include/asm/device.h   |   16 
 arch/powerpc/include/asm/of_device.h|1 -
 arch/powerpc/kernel/of_device.c |4 +---
 arch/powerpc/kernel/pci-common.c|1 -
 arch/powerpc/kernel/vio.c   |   17 -
 arch/powerpc/platforms/cell/iommu.c |5 ++---
 arch/powerpc/platforms/pasemi/setup.c   |4 ++--
 arch/powerpc/platforms/ps3/system-bus.c |1 -
 arch/powerpc/platforms/pseries/iommu.c  |2 +-
 9 files changed, 22 insertions(+), 29 deletions(-)

diff --git a/arch/powerpc/include/asm/device.h 
b/arch/powerpc/include/asm/device.h
index 0aa81d3..3d6ff0a 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -10,8 +10,14 @@ struct dma_map_ops;
 struct device_node;
 
 struct dev_archdata {
-   /* Optional pointer to an OF device node */
-   struct device_node  *of_node;
+   /*
+* struct device_node *of_node;
+* This has been removed and moved into struct device proper.  If
+* this broke your code, then replace
+* (struct device *)-archdata.of_node
+*with
+* (struct device *)-of_node
+*/
 
/* DMA operations on that device */
struct dma_map_ops  *dma_ops;
@@ -30,12 +36,6 @@ struct dev_archdata {
 #endif
 };
 
-static inline void dev_archdata_set_node(struct dev_archdata *ad,
-struct device_node *np)
-{
-   ad-of_node = np;
-}
-
 struct pdev_archdata {
 };
 
diff --git a/arch/powerpc/include/asm/of_device.h 
b/arch/powerpc/include/asm/of_device.h
index a64debf..8b26f96 100644
--- a/arch/powerpc/include/asm/of_device.h
+++ b/arch/powerpc/include/asm/of_device.h
@@ -12,7 +12,6 @@
  */
 struct of_device
 {
-   struct device_node  *node;  /* to be obsoleted */
u64 dma_mask;   /* DMA mask */
struct device   dev;/* Generic device interface */
 };
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 55dafc7..20b3474 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -69,12 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,
if (!dev)
return NULL;
 
-   dev-node = of_node_get(np);
+   dev-dev.of_node = of_node_get(np);
dev-dev.dma_mask = dev-dma_mask;
dev-dev.parent = parent;
dev-dev.release = of_release_dev;
-   dev-dev.archdata.of_node = np; /* temporary; remove after merging */
-   dev-dev.of_node = np;
 
if (bus_id)
dev_set_name(dev-dev, %s, bus_id);
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 90501f2..ba3bb42 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -1112,7 +1112,6 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus 
*bus)
continue;
 
/* Setup OF node pointer in the device */
-   sd-of_node = pci_device_to_OF_node(dev); /* temporary */
dev-dev.of_node = pci_device_to_OF_node(dev);
 
/* Fixup NUMA node as it may not be setup yet by the generic
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 70b52c7..d4981c6 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -704,7 +704,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)
 * Check to see that device has a DMA window and configure
 * entitlement for the device.
 */
-   if (of_get_property(viodev-dev.archdata.of_node,
+   if (of_get_property(viodev-dev.of_node,
ibm,my-dma-window, NULL)) {
/* Check that the driver is CMO enabled and get desired DMA */
if (!viodrv-get_desired_dma) {
@@ -1048,7 +1048,7 @@ static struct iommu_table *vio_build_iommu_table(struct 
vio_dev *dev)
if (firmware_has_feature(FW_FEATURE_ISERIES))
return vio_build_iommu_table_iseries(dev);
 
-   dma_window = of_get_property(dev-dev.archdata.of_node,
+   dma_window = of_get_property(dev-dev.of_node,
  ibm,my-dma-window, NULL);
if (!dma_window)
return NULL;
@@ -1057,7 +1057,7 @@ static struct iommu_table *vio_build_iommu_table(struct 
vio_dev *dev)
if (tbl == NULL)
return NULL;
 
-   of_parse_dma_window(dev-dev.archdata.of_node, dma_window,
+   of_parse_dma_window(dev-dev.of_node, dma_window,
tbl-it_index, offset, size);
 
/* TCE table size - measured in tce entries 

[PATCH 36/37] arch/microblaze: Remove .archdata.of_node and use .of_node in struct device

2010-03-11 Thread Grant Likely
.archdata.of_node is being removed from Microblaze, SPARC and PowerPC
because it duplicates the struct device .of_node pointer.  This patch
also removes .node from struct of_device for the same reason.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/microblaze/include/asm/device.h|8 
 arch/microblaze/include/asm/of_device.h |1 -
 arch/microblaze/kernel/of_device.c  |4 +---
 3 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/arch/microblaze/include/asm/device.h 
b/arch/microblaze/include/asm/device.h
index 2370888..8d46822 100644
--- a/arch/microblaze/include/asm/device.h
+++ b/arch/microblaze/include/asm/device.h
@@ -12,19 +12,11 @@
 struct device_node;
 
 struct dev_archdata {
-   /* Optional pointer to an OF device node */
-   struct device_node  *of_node;
 };
 
 struct pdev_archdata {
 };
 
-static inline void dev_archdata_set_node(struct dev_archdata *ad,
-struct device_node *np)
-{
-   ad-of_node = np;
-}
-
 #endif /* _ASM_MICROBLAZE_DEVICE_H */
 
 
diff --git a/arch/microblaze/include/asm/of_device.h 
b/arch/microblaze/include/asm/of_device.h
index ba917cf..ab25a40 100644
--- a/arch/microblaze/include/asm/of_device.h
+++ b/arch/microblaze/include/asm/of_device.h
@@ -21,7 +21,6 @@
  * probed using OF properties.
  */
 struct of_device {
-   struct device_node  *node; /* to be obsoleted */
u64 dma_mask; /* DMA mask */
struct device   dev; /* Generic device interface */
 };
diff --git a/arch/microblaze/kernel/of_device.c 
b/arch/microblaze/kernel/of_device.c
index ae165fc..ac7e6e1 100644
--- a/arch/microblaze/kernel/of_device.c
+++ b/arch/microblaze/kernel/of_device.c
@@ -49,12 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,
if (!dev)
return NULL;
 
-   dev-node = of_node_get(np);
+   dev-dev.of_node = of_node_get(np);
dev-dev.dma_mask = dev-dma_mask;
dev-dev.parent = parent;
dev-dev.release = of_release_dev;
-   dev-dev.archdata.of_node = np; /* temporary; remove after merging */
-   dev-dev.of_node = np;
 
if (bus_id)
dev_set_name(dev-dev, bus_id);

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


[PATCH 37/37] arch/sparc: Remove .archdata.of_node and use .of_node in struct device

2010-03-11 Thread Grant Likely
.archdata.of_node is being removed from Microblaze, SPARC and PowerPC
because it duplicates the struct device .of_node pointer.  This patch
also removes .node from struct of_device for the same reason.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/sparc/include/asm/device.h|9 -
 arch/sparc/include/asm/of_device.h |1 -
 arch/sparc/kernel/of_device_32.c   |3 ---
 arch/sparc/kernel/of_device_64.c   |2 --
 arch/sparc/kernel/pci.c|1 -
 5 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/arch/sparc/include/asm/device.h b/arch/sparc/include/asm/device.h
index 55dadca..d4c4521 100644
--- a/arch/sparc/include/asm/device.h
+++ b/arch/sparc/include/asm/device.h
@@ -13,19 +13,10 @@ struct dev_archdata {
void*iommu;
void*stc;
void*host_controller;
-
-   struct device_node  *prom_node;
struct of_device*op;
-
int numa_node;
 };
 
-static inline void dev_archdata_set_node(struct dev_archdata *ad,
-struct device_node *np)
-{
-   ad-prom_node = np;
-}
-
 struct pdev_archdata {
 };
 
diff --git a/arch/sparc/include/asm/of_device.h 
b/arch/sparc/include/asm/of_device.h
index a5d9811..f320246 100644
--- a/arch/sparc/include/asm/of_device.h
+++ b/arch/sparc/include/asm/of_device.h
@@ -14,7 +14,6 @@
  */
 struct of_device
 {
-   struct device_node  *node;
struct device   dev;
struct resource resource[PROMREG_MAX];
unsigned intirqs[PROMINTR_MAX];
diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c
index 909bee0..37ab163 100644
--- a/arch/sparc/kernel/of_device_32.c
+++ b/arch/sparc/kernel/of_device_32.c
@@ -345,12 +345,9 @@ static struct of_device * __init scan_one_device(struct 
device_node *dp,
return NULL;
 
sd = op-dev.archdata;
-   sd-prom_node = dp; /* temporary */
sd-op = op;
op-dev.of_node = dp;
 
-   op-node = dp;
-
op-clock_freq = of_getintprop_default(dp, clock-frequency,
   (25*1000*1000));
op-portid = of_getintprop_default(dp, upa-portid, -1);
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
index e436381..1dae807 100644
--- a/arch/sparc/kernel/of_device_64.c
+++ b/arch/sparc/kernel/of_device_64.c
@@ -640,11 +640,9 @@ static struct of_device * __init scan_one_device(struct 
device_node *dp,
return NULL;
 
sd = op-dev.archdata;
-   sd-prom_node = dp; /* temporary */
sd-op = op;
 
op-dev.of_node = dp;
-   op-node = dp;
 
op-clock_freq = of_getintprop_default(dp, clock-frequency,
   (25*1000*1000));
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 89c17d0..8a8363a 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -261,7 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct 
pci_pbm_info *pbm,
sd-iommu = pbm-iommu;
sd-stc = pbm-stc;
sd-host_controller = pbm;
-   sd-prom_node = node; /* temporary */
sd-op = op = of_find_device_by_node(node);
sd-numa_node = pbm-numa_node;
 

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


Re: Linus' kernel tree over ads5121-rev4

2010-03-11 Thread Anatolij Gustschin
Hi,

On Thu, 11 Mar 2010 13:53:45 +0100
CTAG / Moisés Domínguez moises.doming...@ctag.com wrote:

 Linux is uncompressed and starts right, but when DIU driver probe function
 is called (exactly when first framebuffer device is registered) linux
 restarts. This behaviour repeats indefinitely.
 
 (same behaviour with denx kernel tree).

DIU support patch hasn't been merged yet, you can either
disable DIU frame buffer driver or use the DIU patch [1].

 I am using .dts that comes in the Linus’kernel tree. Maybe this .dts board
 revision dependent? 

DTS in 2.6.34-rc1 is ok for DIU if you use the patch. Note
that you need to rebase it as it depends on USB support patches
which haven't been merged yet.

DIU frame buffer support is work in progress, it hopefully will
be included in 2.6.35.

[1] http://patchwork.ozlabs.org/patch/44639/
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH 0/2] Stuff to make of_device more like platform_device

2010-03-11 Thread Grant Likely
These patches make it possible to use struct platform_device as a drop
in replacement for struct of_device, which is a stepping stone to
removing the duplication between the platform bus and the of bus.

g.

---

Grant Likely (2):
  arch/microblaze: Move dma_mask from of_device into pdev_archdata
  arch/powerpc: Move dma_mask from of_device into pdev_archdata


 arch/microblaze/include/asm/device.h|1 +
 arch/microblaze/include/asm/of_device.h |2 +-
 arch/microblaze/kernel/of_device.c  |2 +-
 arch/microblaze/kernel/of_platform.c|2 +-
 arch/powerpc/include/asm/device.h   |1 +
 arch/powerpc/include/asm/of_device.h|2 +-
 arch/powerpc/kernel/of_device.c |2 +-
 arch/powerpc/kernel/of_platform.c   |2 +-
 drivers/macintosh/macio_asic.c  |4 ++--
 sound/aoa/soundbus/i2sbus/core.c|4 ++--
 10 files changed, 12 insertions(+), 10 deletions(-)

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


[PATCH 1/2] arch/powerpc: Move dma_mask from of_device into pdev_archdata

2010-03-11 Thread Grant Likely
By moving dma_mask into pdev_archdata, and adding archdata to
struct of_device, it makes it possible to substitute of_device
with struct platform_device, which is a stepping stone to
removing the of_platform bus entirely.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/powerpc/include/asm/device.h|1 +
 arch/powerpc/include/asm/of_device.h |2 +-
 arch/powerpc/kernel/of_device.c  |2 +-
 arch/powerpc/kernel/of_platform.c|2 +-
 drivers/macintosh/macio_asic.c   |4 ++--
 sound/aoa/soundbus/i2sbus/core.c |4 ++--
 6 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/include/asm/device.h 
b/arch/powerpc/include/asm/device.h
index 3d6ff0a..17dd2b6 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -37,6 +37,7 @@ struct dev_archdata {
 };
 
 struct pdev_archdata {
+   u64 dma_mask;
 };
 
 #endif /* _ASM_POWERPC_DEVICE_H */
diff --git a/arch/powerpc/include/asm/of_device.h 
b/arch/powerpc/include/asm/of_device.h
index 8b26f96..444e97e 100644
--- a/arch/powerpc/include/asm/of_device.h
+++ b/arch/powerpc/include/asm/of_device.h
@@ -12,8 +12,8 @@
  */
 struct of_device
 {
-   u64 dma_mask;   /* DMA mask */
struct device   dev;/* Generic device interface */
+   struct pdev_archdataarchdata;
 };
 
 extern struct of_device *of_device_alloc(struct device_node *np,
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 20b3474..df78e02 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -70,7 +70,7 @@ struct of_device *of_device_alloc(struct device_node *np,
return NULL;
 
dev-dev.of_node = of_node_get(np);
-   dev-dev.dma_mask = dev-dma_mask;
+   dev-dev.dma_mask = dev-archdata.dma_mask;
dev-dev.parent = parent;
dev-dev.release = of_release_dev;
 
diff --git a/arch/powerpc/kernel/of_platform.c 
b/arch/powerpc/kernel/of_platform.c
index 5a5f624..e047126 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -75,7 +75,7 @@ struct of_device* of_platform_device_create(struct 
device_node *np,
if (!dev)
return NULL;
 
-   dev-dma_mask = 0xUL;
+   dev-archdata.dma_mask = 0xUL;
dev-dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
dev-dev.bus = of_platform_bus_type;
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 67fe13f..48a5f04 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -374,8 +374,8 @@ static struct macio_dev * macio_add_one_device(struct 
macio_chip *chip,
dev-bus = chip-lbus;
dev-media_bay = in_bay;
dev-ofdev.dev.of_node = np;
-   dev-ofdev.dma_mask = 0xUL;
-   dev-ofdev.dev.dma_mask = dev-ofdev.dma_mask;
+   dev-ofdev.archdata.dma_mask = 0xUL;
+   dev-ofdev.dev.dma_mask = dev-ofdev.archdata.dma_mask;
dev-ofdev.dev.parent = parent;
dev-ofdev.dev.bus = macio_bus_type;
dev-ofdev.dev.release = macio_release_dev;
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index ddb1577..eebdde4 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -220,9 +220,9 @@ static int i2sbus_add_dev(struct macio_dev *macio,
 
mutex_init(dev-lock);
spin_lock_init(dev-low_lock);
-   dev-sound.ofdev.dma_mask = macio-ofdev.dma_mask;
+   dev-sound.ofdev.archdata.dma_mask = macio-ofdev.archdata.dma_mask;
dev-sound.ofdev.dev.of_node = np;
-   dev-sound.ofdev.dev.dma_mask = dev-sound.ofdev.dma_mask;
+   dev-sound.ofdev.dev.dma_mask = dev-sound.ofdev.archdata.dma_mask;
dev-sound.ofdev.dev.parent = macio-ofdev.dev;
dev-sound.ofdev.dev.release = i2sbus_release_dev;
dev-sound.attach_codec = i2sbus_attach_codec;

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


[PATCH 2/2] arch/microblaze: Move dma_mask from of_device into pdev_archdata

2010-03-11 Thread Grant Likely
By moving dma_mask into pdev_archdata, and adding archdata to
struct of_device, it makes it possible to substitute of_device
with struct platform_device, which is a stepping stone to
removing the of_platform bus entirely.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/microblaze/include/asm/device.h|1 +
 arch/microblaze/include/asm/of_device.h |2 +-
 arch/microblaze/kernel/of_device.c  |2 +-
 arch/microblaze/kernel/of_platform.c|2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/microblaze/include/asm/device.h 
b/arch/microblaze/include/asm/device.h
index 8d46822..aae3b3c 100644
--- a/arch/microblaze/include/asm/device.h
+++ b/arch/microblaze/include/asm/device.h
@@ -15,6 +15,7 @@ struct dev_archdata {
 };
 
 struct pdev_archdata {
+   u64 dma_mask;
 };
 
 #endif /* _ASM_MICROBLAZE_DEVICE_H */
diff --git a/arch/microblaze/include/asm/of_device.h 
b/arch/microblaze/include/asm/of_device.h
index ab25a40..73cb980 100644
--- a/arch/microblaze/include/asm/of_device.h
+++ b/arch/microblaze/include/asm/of_device.h
@@ -21,8 +21,8 @@
  * probed using OF properties.
  */
 struct of_device {
-   u64 dma_mask; /* DMA mask */
struct device   dev; /* Generic device interface */
+   struct pdev_archdataarchdata;
 };
 
 extern ssize_t of_device_get_modalias(struct of_device *ofdev,
diff --git a/arch/microblaze/kernel/of_device.c 
b/arch/microblaze/kernel/of_device.c
index ac7e6e1..b372787 100644
--- a/arch/microblaze/kernel/of_device.c
+++ b/arch/microblaze/kernel/of_device.c
@@ -50,7 +50,7 @@ struct of_device *of_device_alloc(struct device_node *np,
return NULL;
 
dev-dev.of_node = of_node_get(np);
-   dev-dev.dma_mask = dev-dma_mask;
+   dev-dev.dma_mask = dev-archdata.dma_mask;
dev-dev.parent = parent;
dev-dev.release = of_release_dev;
 
diff --git a/arch/microblaze/kernel/of_platform.c 
b/arch/microblaze/kernel/of_platform.c
index ea7d024..f96a3a6 100644
--- a/arch/microblaze/kernel/of_platform.c
+++ b/arch/microblaze/kernel/of_platform.c
@@ -48,7 +48,7 @@ struct of_device *of_platform_device_create(struct 
device_node *np,
if (!dev)
return NULL;
 
-   dev-dma_mask = 0xUL;
+   dev-archdata.dma_mask = 0xUL;
dev-dev.bus = of_platform_bus_type;
 
/* We do not fill the DMA ops for platform devices by default.

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


Re: [PATCH 00/37] OF: move device node pointer into struct device.

2010-03-11 Thread David Miller
From: Grant Likely grant.lik...@secretlab.ca
Date: Thu, 11 Mar 2010 11:03:47 -0700

 Currently on OF enabled platforms, the device node pointer is stored in
 both device.archdata.of_node (.prom_node on sparc), and in of_device.node
 OF device tree support is being generalized to work on any platform, so
 instead of adding the of_node pointer to each platform's archdata
 individually, this patch series moves the of_node pointer into struct
 device proper and fixes up all users to reference the new location.
 
 The last 3 patches in this series remove the old .archdata.of_node,
 .archdata.prom_node and of_device.node instances.
 
 This series has been compile tested on powerpc, sparc and microblaze,
 (allmodconfig used on sparc and powerpc) and boot tested on an mpc5200
 powerpc.  All known (or at least all I could find) in-tree users of the
 old names have been removed.

Three or four of the patches don't apply because only your tree
has those /* temporary */ comments, f.e. in arch/sparc/kernel/pci.c

I took care of this when applying to my tree.

 This series should also be fully bisectable.  After I collect acks, I
 would like to get this whole series into linux-next to see if I've
 missed any references, but I can probably hold off merging the last
 three patches when the 2.6.35 merge window opens to give out of tree
 users a bit more time to adapt.  In fact, I'd probably wait a few
 extra days after pushing out the bulk of this series before I push the
 last 3 patches into my linux-next branch to isolate the drivers that I
 missed while fixing.

I'd rather you just apply the sparc one immediately in 2.6.35 and
not wait at all.

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


[PATCH 00/27] Clean up of_platform drivers

2010-03-11 Thread Grant Likely
struct of_platform_driver unnecessarily duplicates the .owner and
.name fields from the encapsulated struct device_driver.  This patch
series goes through all of_platform drivers and makes it use the
device_driver instance so that the duplicate field can be removed.

Since every of_platform_driver is getting touched anyway, this series
takes the opportunity to also move the of_device_id match table out
of struct of_platform_driver and into struct device_driver proper.
This makes it possible for all bus types to make use of OF-style
binding when CONFIG_OF is set.

I've compile tested this on sparc, powerpc and microblaze.  It should
all be fully bisectable, and only the last patch removes the old
fields (ie. nothing should break without the last patch).

g.

---

Grant Likely (27):
  of: remove obsolete members from of_platform_driver
  arch/sparc/of: don't use deprecated field in of_platform_driver
  arch/powerpc/of: don't use deprecated field in of_platform_driver
  sound/of: don't use deprecated fields in of_platform_driver
  drivers/infiniband/of: don't use deprecated fields in of_platform_driver
  drivers/i2c/of: don't use deprecated field in of_platform_driver
  drivers/hwmon/of: don't use deprecated field in of_platform_driver
  drivers/mmc/of: don't use deprecated field in of_platform_driver
  drivers/pcmcia/of: don't use deprecated field in of_platform_driver
  drivers/parport/of: don't use deprecated field in of_platform_driver
  drivers/sbus/of: don't use deprecated field in of_platform_driver
  drivers/scsi/of: don't use deprecated field in of_platform_driver
  drivers/spi/of: don't use deprecated field in of_platform_driver
  drivers/serial/of: don't use deprecated field in of_platform_driver
  drivers/net/of: don't use deprecated field in of_platform_driver
  drivers/mtd/of: don't use deprecated field in of_platform_driver
  drivers/macintosh/of: don't use deprecated field in of_platform_driver
  drivers/input/of: don't use deprecated field in of_platform_driver
  drivers/atm/of: don't use deprecated field in of_platform_driver
  drivers/crypto/of: don't use deprecated field in of_platform_driver
  drivers/char/of: don't use deprecated field in of_platform_driver
  drivers/block/of: don't use deprecated field in of_platform_driver
  drivers/usb/of: don't use deprecated field in of_platform_driver
  drivers/video/of: don't use deprecated field in of_platform_driver
  drivers/watchdog/of: don't use deprecated .name and .owner in 
of_platform_driver
  drivers/gpio/of: don't use deprecated fields in of_platform_driver
  drivercore: Add of_match_table to the common device drivers


 arch/powerpc/kernel/ibmebus.c |2 +-
 arch/powerpc/kernel/of_platform.c |3 ++-
 arch/powerpc/platforms/52xx/mpc52xx_gpio.c|   14 
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c |7 --
 arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c |8 ---
 arch/powerpc/platforms/82xx/ep8248e.c |3 ++-
 arch/powerpc/platforms/83xx/suspend.c |7 --
 arch/powerpc/platforms/cell/axon_msi.c|7 +++---
 arch/powerpc/platforms/pasemi/gpio_mdio.c |7 +++---
 arch/powerpc/sysdev/axonram.c |8 +++
 arch/powerpc/sysdev/bestcomm/bestcomm.c   |   10 +++-
 arch/powerpc/sysdev/fsl_msi.c |7 --
 arch/powerpc/sysdev/fsl_pmc.c |7 --
 arch/powerpc/sysdev/fsl_rio.c |7 --
 arch/powerpc/sysdev/pmi.c |7 +++---
 arch/powerpc/sysdev/qe_lib/qe.c   |7 --
 arch/sparc/include/asm/parport.h  |7 --
 arch/sparc/kernel/apc.c   |7 --
 arch/sparc/kernel/auxio_64.c  |7 +++---
 arch/sparc/kernel/central.c   |   14 +++-
 arch/sparc/kernel/chmc.c  |7 --
 arch/sparc/kernel/pci_fire.c  |7 --
 arch/sparc/kernel/pci_psycho.c|7 --
 arch/sparc/kernel/pci_sabre.c |7 --
 arch/sparc/kernel/pci_schizo.c|7 --
 arch/sparc/kernel/pci_sun4v.c |7 --
 arch/sparc/kernel/pmc.c   |7 --
 arch/sparc/kernel/power.c |7 +++---
 arch/sparc/kernel/time_32.c   |7 +++---
 arch/sparc/kernel/time_64.c   |   21 ++
 drivers/ata/pata_of_platform.c|7 --
 drivers/ata/sata_fsl.c|7 --
 drivers/atm/fore200e.c|7 --
 drivers/block/xsysace.c   |5 ++--
 drivers/char/hw_random/n2-drv.c   |7 --
 drivers/char/hw_random/pasemi-rng.c   |7 --
 drivers/char/ipmi/ipmi_si_intf.c 

[PATCH 02/27] drivers/gpio/of: don't use deprecated fields in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/leds/leds-gpio.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 7ff758a..0e6e9ac 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -291,8 +291,8 @@ static struct of_platform_driver of_gpio_leds_driver = {
.driver = {
.name = of_gpio_leds,
.owner = THIS_MODULE,
+   .of_match_table = of_gpio_leds_match,
},
-   .match_table = of_gpio_leds_match,
.probe = of_gpio_leds_probe,
.remove = __devexit_p(of_gpio_leds_remove),
 };

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


[PATCH 01/27] drivercore: Add of_match_table to the common device drivers

2010-03-11 Thread Grant Likely
OF-style matching can be available to any device, on any type of bus.
This patch allows any driver to provide an OF match table when CONFIG_OF
is enabled so that drivers can be bound against devices described in
the device tree.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
Acked-by: Greg Kroah-Hartman gre...@suse.de
---

 arch/powerpc/kernel/ibmebus.c  |2 +-
 drivers/macintosh/macio_asic.c |5 ++---
 drivers/of/platform.c  |7 ---
 include/linux/device.h |4 
 4 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 797e9ac..62ded8b 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -201,7 +201,7 @@ static int ibmebus_create_devices(const struct of_device_id 
*matches)
 int ibmebus_register_driver(struct of_platform_driver *drv)
 {
/* If the driver uses devices that ibmebus doesn't know, add them */
-   ibmebus_create_devices(drv-match_table);
+   ibmebus_create_devices(drv-driver.of_match_table);
 
return of_register_driver(drv, ibmebus_bus_type);
 }
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 48a5f04..e3ba1d8 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -40,8 +40,7 @@ static struct macio_chip  *macio_on_hold;
 static int macio_bus_match(struct device *dev, struct device_driver *drv) 
 {
struct macio_dev * macio_dev = to_macio_device(dev);
-   struct macio_driver * macio_drv = to_macio_driver(drv);
-   const struct of_device_id * matches = macio_drv-match_table;
+   const struct of_device_id * matches = drv-of_match_table;
 
if (!matches) 
return 0;
@@ -84,7 +83,7 @@ static int macio_device_probe(struct device *dev)
 
macio_dev_get(macio_dev);
 
-   match = of_match_device(drv-match_table, macio_dev-ofdev);
+   match = of_match_device(drv-driver.of_match_table, macio_dev-ofdev);
if (match)
error = drv-probe(macio_dev, match);
if (error)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index d58ade1..9fd7f7d 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -22,8 +22,7 @@ extern struct device_attribute of_platform_device_attrs[];
 static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
 {
struct of_device *of_dev = to_of_device(dev);
-   struct of_platform_driver *of_drv = to_of_platform_driver(drv);
-   const struct of_device_id *matches = of_drv-match_table;
+   const struct of_device_id *matches = drv-of_match_table;
 
if (!matches)
return 0;
@@ -46,7 +45,7 @@ static int of_platform_device_probe(struct device *dev)
 
of_dev_get(of_dev);
 
-   match = of_match_device(drv-match_table, of_dev);
+   match = of_match_device(drv-driver.of_match_table, of_dev);
if (match)
error = drv-probe(of_dev, match);
if (error)
@@ -391,6 +390,8 @@ int of_register_driver(struct of_platform_driver *drv, 
struct bus_type *bus)
drv-driver.name = drv-name;
if (!drv-driver.owner)
drv-driver.owner = drv-owner;
+   if (!drv-driver.of_match_table)
+   drv-driver.of_match_table = drv-match_table;
drv-driver.bus = bus;
 
/* register with core */
diff --git a/include/linux/device.h b/include/linux/device.h
index 7a968bd..cd7534c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -129,6 +129,10 @@ struct device_driver {
 
bool suppress_bind_attrs;   /* disables bind/unbind via sysfs */
 
+#if defined(CONFIG_OF)
+   const struct of_device_id   *of_match_table;
+#endif
+
int (*probe) (struct device *dev);
int (*remove) (struct device *dev);
void (*shutdown) (struct device *dev);

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


[PATCH 03/27] drivers/watchdog/of: don't use deprecated .name and .owner in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/watchdog/cpwd.c|7 +--
 drivers/watchdog/gef_wdt.c |8 +---
 drivers/watchdog/mpc8xxx_wdt.c |8 
 drivers/watchdog/riowd.c   |7 +--
 4 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 89da14f..4215b5d 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -676,8 +676,11 @@ static const struct of_device_id cpwd_match[] = {
 MODULE_DEVICE_TABLE(of, cpwd_match);
 
 static struct of_platform_driver cpwd_driver = {
-   .name   = DRIVER_NAME,
-   .match_table= cpwd_match,
+   .driver = {
+   .name = DRIVER_NAME,
+   .owner = THIS_MODULE,
+   .of_match_table = cpwd_match,
+   },
.probe  = cpwd_probe,
.remove = __devexit_p(cpwd_remove),
 };
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c
index abdbad0..ca0f4c6 100644
--- a/drivers/watchdog/gef_wdt.c
+++ b/drivers/watchdog/gef_wdt.c
@@ -303,9 +303,11 @@ static const struct of_device_id gef_wdt_ids[] = {
 };
 
 static struct of_platform_driver gef_wdt_driver = {
-   .owner  = THIS_MODULE,
-   .name   = gef_wdt,
-   .match_table= gef_wdt_ids,
+   .driver = {
+   .name = gef_wdt,
+   .owner = THIS_MODULE,
+   .of_match_table = gef_wdt_ids,
+   },
.probe  = gef_wdt_probe,
 };
 
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 4e3941c..7b55974 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -273,12 +273,12 @@ static const struct of_device_id mpc8xxx_wdt_match[] = {
 MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match);
 
 static struct of_platform_driver mpc8xxx_wdt_driver = {
-   .match_table= mpc8xxx_wdt_match,
.probe  = mpc8xxx_wdt_probe,
.remove = __devexit_p(mpc8xxx_wdt_remove),
-   .driver = {
-   .name   = mpc8xxx_wdt,
-   .owner  = THIS_MODULE,
+   .driver = {
+   .name = mpc8xxx_wdt,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc8xxx_wdt_match,
},
 };
 
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c
index ae57bf9..e7973bf 100644
--- a/drivers/watchdog/riowd.c
+++ b/drivers/watchdog/riowd.c
@@ -238,8 +238,11 @@ static const struct of_device_id riowd_match[] = {
 MODULE_DEVICE_TABLE(of, riowd_match);
 
 static struct of_platform_driver riowd_driver = {
-   .name   = DRIVER_NAME,
-   .match_table= riowd_match,
+   .driver = {
+   .name = DRIVER_NAME,
+   .owner = THIS_MODULE,
+   .of_match_table = riowd_match,
+   },
.probe  = riowd_probe,
.remove = __devexit_p(riowd_remove),
 };

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


[PATCH 04/27] drivers/video/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/video/bw2.c   |7 +--
 drivers/video/cg14.c  |7 +--
 drivers/video/cg3.c   |7 +--
 drivers/video/cg6.c   |7 +--
 drivers/video/ffb.c   |7 +--
 drivers/video/fsl-diu-fb.c|8 +---
 drivers/video/leo.c   |7 +--
 drivers/video/mb862xx/mb862xxfb.c |8 +---
 drivers/video/p9100.c |7 +--
 drivers/video/platinumfb.c|7 +--
 drivers/video/tcx.c   |7 +--
 drivers/video/xilinxfb.c  |5 ++---
 12 files changed, 57 insertions(+), 27 deletions(-)

diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
index b0b147c..05d6663 100644
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -377,8 +377,11 @@ static const struct of_device_id bw2_match[] = {
 MODULE_DEVICE_TABLE(of, bw2_match);
 
 static struct of_platform_driver bw2_driver = {
-   .name   = bw2,
-   .match_table= bw2_match,
+   .driver = {
+   .name = bw2,
+   .owner = THIS_MODULE,
+   .of_match_table = bw2_match,
+   },
.probe  = bw2_probe,
.remove = __devexit_p(bw2_remove),
 };
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c
index fe45a3b..5634131 100644
--- a/drivers/video/cg14.c
+++ b/drivers/video/cg14.c
@@ -597,8 +597,11 @@ static const struct of_device_id cg14_match[] = {
 MODULE_DEVICE_TABLE(of, cg14_match);
 
 static struct of_platform_driver cg14_driver = {
-   .name   = cg14,
-   .match_table= cg14_match,
+   .driver = {
+   .name = cg14,
+   .owner = THIS_MODULE,
+   .of_match_table = cg14_match,
+   },
.probe  = cg14_probe,
.remove = __devexit_p(cg14_remove),
 };
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
index b2319fa..a807823 100644
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -464,8 +464,11 @@ static const struct of_device_id cg3_match[] = {
 MODULE_DEVICE_TABLE(of, cg3_match);
 
 static struct of_platform_driver cg3_driver = {
-   .name   = cg3,
-   .match_table= cg3_match,
+   .driver = {
+   .name = cg3,
+   .owner = THIS_MODULE,
+   .of_match_table = cg3_match,
+   },
.probe  = cg3_probe,
.remove = __devexit_p(cg3_remove),
 };
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 978c15f..ecfcf69 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -857,8 +857,11 @@ static const struct of_device_id cg6_match[] = {
 MODULE_DEVICE_TABLE(of, cg6_match);
 
 static struct of_platform_driver cg6_driver = {
-   .name   = cg6,
-   .match_table= cg6_match,
+   .driver = {
+   .name = cg6,
+   .owner = THIS_MODULE,
+   .of_match_table = cg6_match,
+   },
.probe  = cg6_probe,
.remove = __devexit_p(cg6_remove),
 };
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index be0c982..d1a9515 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -1054,8 +1054,11 @@ static const struct of_device_id ffb_match[] = {
 MODULE_DEVICE_TABLE(of, ffb_match);
 
 static struct of_platform_driver ffb_driver = {
-   .name   = ffb,
-   .match_table= ffb_match,
+   .driver = {
+   .name = ffb,
+   .owner = THIS_MODULE,
+   .of_match_table = ffb_match,
+   },
.probe  = ffb_probe,
.remove = __devexit_p(ffb_remove),
 };
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index 4637bcb..94ac2c0 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -1646,9 +1646,11 @@ static struct of_device_id fsl_diu_match[] = {
 MODULE_DEVICE_TABLE(of, fsl_diu_match);
 
 static struct of_platform_driver fsl_diu_driver = {
-   .owner  = THIS_MODULE,
-   .name   = fsl_diu,
-   .match_table= fsl_diu_match,
+   .driver = {
+   .name = fsl_diu,
+   .owner = THIS_MODULE,
+   .of_match_table = fsl_diu_match,
+   },
.probe  = fsl_diu_probe,
.remove = fsl_diu_remove,
.suspend= fsl_diu_suspend,
diff --git a/drivers/video/leo.c b/drivers/video/leo.c
index e145e2d..cf79cb7 100644
--- a/drivers/video/leo.c
+++ b/drivers/video/leo.c
@@ -664,8 +664,11 @@ static const struct of_device_id leo_match[] = {
 MODULE_DEVICE_TABLE(of, leo_match);
 
 static struct of_platform_driver leo_driver = {
-   .name   = leo,
-   .match_table= leo_match,
+   .driver = {
+   .name = 

[PATCH 05/27] drivers/usb/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/usb/gadget/fsl_qe_udc.c   |7 +--
 drivers/usb/host/ehci-ppc-of.c|9 -
 drivers/usb/host/ehci-xilinx-of.c |9 -
 drivers/usb/host/fhci-hcd.c   |7 +--
 drivers/usb/host/isp1760-if.c |7 +--
 drivers/usb/host/ohci-ppc-of.c|   13 -
 6 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c
index 3537d51..2928523 100644
--- a/drivers/usb/gadget/fsl_qe_udc.c
+++ b/drivers/usb/gadget/fsl_qe_udc.c
@@ -2768,8 +2768,11 @@ static const struct of_device_id qe_udc_match[] 
__devinitconst = {
 MODULE_DEVICE_TABLE(of, qe_udc_match);
 
 static struct of_platform_driver udc_driver = {
-   .name   = (char *)driver_name,
-   .match_table= qe_udc_match,
+   .driver = {
+   .name = (char *)driver_name,
+   .owner = THIS_MODULE,
+   .of_match_table = qe_udc_match,
+   },
.probe  = qe_udc_probe,
.remove = __devexit_p(qe_udc_remove),
 #ifdef CONFIG_PM
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index ad06623..5aec928 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -274,13 +274,12 @@ MODULE_DEVICE_TABLE(of, ehci_hcd_ppc_of_match);
 
 
 static struct of_platform_driver ehci_hcd_ppc_of_driver = {
-   .name   = ppc-of-ehci,
-   .match_table= ehci_hcd_ppc_of_match,
.probe  = ehci_hcd_ppc_of_probe,
.remove = ehci_hcd_ppc_of_remove,
.shutdown   = ehci_hcd_ppc_of_shutdown,
-   .driver = {
-   .name   = ppc-of-ehci,
-   .owner  = THIS_MODULE,
+   .driver = {
+   .name = ppc-of-ehci,
+   .owner = THIS_MODULE,
+   .of_match_table = ehci_hcd_ppc_of_match,
},
 };
diff --git a/drivers/usb/host/ehci-xilinx-of.c 
b/drivers/usb/host/ehci-xilinx-of.c
index f603bb2..013972b 100644
--- a/drivers/usb/host/ehci-xilinx-of.c
+++ b/drivers/usb/host/ehci-xilinx-of.c
@@ -288,13 +288,12 @@ static const struct of_device_id 
ehci_hcd_xilinx_of_match[] = {
 MODULE_DEVICE_TABLE(of, ehci_hcd_xilinx_of_match);
 
 static struct of_platform_driver ehci_hcd_xilinx_of_driver = {
-   .name   = xilinx-of-ehci,
-   .match_table= ehci_hcd_xilinx_of_match,
.probe  = ehci_hcd_xilinx_of_probe,
.remove = ehci_hcd_xilinx_of_remove,
.shutdown   = ehci_hcd_xilinx_of_shutdown,
-   .driver = {
-   .name   = xilinx-of-ehci,
-   .owner  = THIS_MODULE,
+   .driver = {
+   .name = xilinx-of-ehci,
+   .owner = THIS_MODULE,
+   .of_match_table = ehci_hcd_xilinx_of_match,
},
 };
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index 5dcfb3d..dba7af7 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -812,8 +812,11 @@ static const struct of_device_id of_fhci_match[] = {
 MODULE_DEVICE_TABLE(of, of_fhci_match);
 
 static struct of_platform_driver of_fhci_driver = {
-   .name   = fsl,usb-fhci,
-   .match_table= of_fhci_match,
+   .driver = {
+   .name = fsl,usb-fhci,
+   .owner = THIS_MODULE,
+   .of_match_table = of_fhci_match,
+   },
.probe  = of_fhci_probe,
.remove = __devexit_p(of_fhci_remove),
 };
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index 36360e2..100d5fa 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -121,8 +121,11 @@ static const struct of_device_id of_isp1760_match[] = {
 MODULE_DEVICE_TABLE(of, of_isp1760_match);
 
 static struct of_platform_driver isp1760_of_driver = {
-   .name   = nxp-isp1760,
-   .match_table= of_isp1760_match,
+   .driver = {
+   .name = nxp-isp1760,
+   .owner = THIS_MODULE,
+   .of_match_table = of_isp1760_match,
+   },
.probe  = of_isp1760_probe,
.remove = of_isp1760_remove,
 };
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index 003aea2..df16591 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -244,18 +244,13 @@ MODULE_DEVICE_TABLE(of, ohci_hcd_ppc_of_match);
 
 
 static struct of_platform_driver ohci_hcd_ppc_of_driver = {
-   .name   = ppc-of-ohci,
-   .match_table= ohci_hcd_ppc_of_match,
.probe  = ohci_hcd_ppc_of_probe,
.remove = ohci_hcd_ppc_of_remove,
.shutdown   = ohci_hcd_ppc_of_shutdown,
-#ifdef 

[PATCH 06/27] drivers/block/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/ata/pata_of_platform.c |7 +--
 drivers/ata/sata_fsl.c |7 +--
 drivers/block/xsysace.c|5 ++---
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index 19da29f..5a1b82c 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -91,8 +91,11 @@ static struct of_device_id pata_of_platform_match[] = {
 MODULE_DEVICE_TABLE(of, pata_of_platform_match);
 
 static struct of_platform_driver pata_of_platform_driver = {
-   .name   = pata_of_platform,
-   .match_table= pata_of_platform_match,
+   .driver = {
+   .name = pata_of_platform,
+   .owner = THIS_MODULE,
+   .of_match_table = pata_of_platform_match,
+   },
.probe  = pata_of_platform_probe,
.remove = __devexit_p(pata_of_platform_remove),
 };
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index ce4136e..463fb9c 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1426,8 +1426,11 @@ static struct of_device_id fsl_sata_match[] = {
 MODULE_DEVICE_TABLE(of, fsl_sata_match);
 
 static struct of_platform_driver fsl_sata_driver = {
-   .name   = fsl-sata,
-   .match_table= fsl_sata_match,
+   .driver = {
+   .name = fsl-sata,
+   .owner = THIS_MODULE,
+   .of_match_table = fsl_sata_match,
+   },
.probe  = sata_fsl_probe,
.remove = sata_fsl_remove,
 #ifdef CONFIG_PM
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index e1c95e2..cffcd71 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1237,13 +1237,12 @@ static const struct of_device_id ace_of_match[] 
__devinitconst = {
 MODULE_DEVICE_TABLE(of, ace_of_match);
 
 static struct of_platform_driver ace_of_driver = {
-   .owner = THIS_MODULE,
-   .name = xsysace,
-   .match_table = ace_of_match,
.probe = ace_of_probe,
.remove = __devexit_p(ace_of_remove),
.driver = {
.name = xsysace,
+   .owner = THIS_MODULE,
+   .of_match_table = ace_of_match,
},
 };
 

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


[PATCH 07/27] drivers/char/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/char/hw_random/n2-drv.c|7 +--
 drivers/char/hw_random/pasemi-rng.c|7 +--
 drivers/char/ipmi/ipmi_si_intf.c   |7 +--
 drivers/char/xilinx_hwicap/xilinx_hwicap.c |5 ++---
 4 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c
index 4d05003..c82a571 100644
--- a/drivers/char/hw_random/n2-drv.c
+++ b/drivers/char/hw_random/n2-drv.c
@@ -751,8 +751,11 @@ static const struct of_device_id n2rng_match[] = {
 MODULE_DEVICE_TABLE(of, n2rng_match);
 
 static struct of_platform_driver n2rng_driver = {
-   .name   = n2rng,
-   .match_table= n2rng_match,
+   .driver = {
+   .name = n2rng,
+   .owner = THIS_MODULE,
+   .of_match_table = n2rng_match,
+   },
.probe  = n2rng_probe,
.remove = __devexit_p(n2rng_remove),
 };
diff --git a/drivers/char/hw_random/pasemi-rng.c 
b/drivers/char/hw_random/pasemi-rng.c
index b213855..261ba8f 100644
--- a/drivers/char/hw_random/pasemi-rng.c
+++ b/drivers/char/hw_random/pasemi-rng.c
@@ -140,8 +140,11 @@ static struct of_device_id rng_match[] = {
 };
 
 static struct of_platform_driver rng_driver = {
-   .name   = pasemi-rng,
-   .match_table= rng_match,
+   .driver = {
+   .name = pasemi-rng,
+   .owner = THIS_MODULE,
+   .of_match_table = rng_match,
+   },
.probe  = rng_probe,
.remove = rng_remove,
 };
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 45305f2..012e63b 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2492,8 +2492,11 @@ static struct of_device_id ipmi_match[] =
 };
 
 static struct of_platform_driver ipmi_of_platform_driver = {
-   .name   = ipmi,
-   .match_table= ipmi_match,
+   .driver = {
+   .name = ipmi,
+   .owner = THIS_MODULE,
+   .of_match_table = ipmi_match,
+   },
.probe  = ipmi_of_probe,
.remove = __devexit_p(ipmi_of_remove),
 };
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c 
b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
index 4846d50..1fb8665 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
@@ -811,13 +811,12 @@ static const struct of_device_id __devinitconst 
hwicap_of_match[] = {
 MODULE_DEVICE_TABLE(of, hwicap_of_match);
 
 static struct of_platform_driver hwicap_of_driver = {
-   .owner = THIS_MODULE,
-   .name = DRIVER_NAME,
-   .match_table = hwicap_of_match,
.probe = hwicap_of_probe,
.remove = __devexit_p(hwicap_of_remove),
.driver = {
.name = DRIVER_NAME,
+   .owner = THIS_MODULE,
+   .of_match_table = hwicap_of_match,
},
 };
 

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


[PATCH 08/27] drivers/crypto/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/crypto/amcc/crypto4xx_core.c |7 +--
 drivers/crypto/talitos.c |7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/amcc/crypto4xx_core.c 
b/drivers/crypto/amcc/crypto4xx_core.c
index 1c3849f..36b5fb1 100644
--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1280,8 +1280,11 @@ static const struct of_device_id crypto4xx_match[] = {
 };
 
 static struct of_platform_driver crypto4xx_driver = {
-   .name   = crypto4xx,
-   .match_table= crypto4xx_match,
+   .driver = {
+   .name = crypto4xx,
+   .owner = THIS_MODULE,
+   .of_match_table = crypto4xx_match,
+   },
.probe  = crypto4xx_probe,
.remove = crypto4xx_remove,
 };
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index fd529d6..917faf7 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -1967,8 +1967,11 @@ static const struct of_device_id talitos_match[] = {
 MODULE_DEVICE_TABLE(of, talitos_match);
 
 static struct of_platform_driver talitos_driver = {
-   .name = talitos,
-   .match_table = talitos_match,
+   .driver = {
+   .name = talitos,
+   .owner = THIS_MODULE,
+   .of_match_table = talitos_match,
+   },
.probe = talitos_probe,
.remove = talitos_remove,
 };

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


[PATCH 09/27] drivers/atm/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/atm/fore200e.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 593a03a..da8f176 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -2695,8 +2695,11 @@ static const struct of_device_id fore200e_sba_match[] = {
 MODULE_DEVICE_TABLE(of, fore200e_sba_match);
 
 static struct of_platform_driver fore200e_sba_driver = {
-   .name   = fore_200e,
-   .match_table= fore200e_sba_match,
+   .driver = {
+   .name = fore_200e,
+   .owner = THIS_MODULE,
+   .of_match_table = fore200e_sba_match,
+   },
.probe  = fore200e_sba_probe,
.remove = __devexit_p(fore200e_sba_remove),
 };

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


[PATCH 10/27] drivers/input/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/input/misc/sparcspkr.c  |   14 ++
 drivers/input/serio/i8042-sparcio.h |7 +--
 drivers/input/serio/xilinx_ps2.c|7 +--
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index b064419..11ad153 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -258,8 +258,11 @@ static const struct of_device_id bbc_beep_match[] = {
 };
 
 static struct of_platform_driver bbc_beep_driver = {
-   .name   = bbcbeep,
-   .match_table= bbc_beep_match,
+   .driver = {
+   .name = bbcbeep,
+   .owner = THIS_MODULE,
+   .of_match_table = bbc_beep_match,
+   },
.probe  = bbc_beep_probe,
.remove = __devexit_p(bbc_remove),
.shutdown   = sparcspkr_shutdown,
@@ -337,8 +340,11 @@ static const struct of_device_id grover_beep_match[] = {
 };
 
 static struct of_platform_driver grover_beep_driver = {
-   .name   = groverbeep,
-   .match_table= grover_beep_match,
+   .driver = {
+   .name = groverbeep,
+   .owner = THIS_MODULE,
+   .of_match_table = grover_beep_match,
+   },
.probe  = grover_beep_probe,
.remove = __devexit_p(grover_remove),
.shutdown   = sparcspkr_shutdown,
diff --git a/drivers/input/serio/i8042-sparcio.h 
b/drivers/input/serio/i8042-sparcio.h
index 29e1769..04e32f2 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -96,8 +96,11 @@ static const struct of_device_id sparc_i8042_match[] = {
 MODULE_DEVICE_TABLE(of, sparc_i8042_match);
 
 static struct of_platform_driver sparc_i8042_driver = {
-   .name   = i8042,
-   .match_table= sparc_i8042_match,
+   .driver = {
+   .name = i8042,
+   .owner = THIS_MODULE,
+   .of_match_table = sparc_i8042_match,
+   },
.probe  = sparc_i8042_probe,
.remove = __devexit_p(sparc_i8042_remove),
 };
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
index f154153..e787053 100644
--- a/drivers/input/serio/xilinx_ps2.c
+++ b/drivers/input/serio/xilinx_ps2.c
@@ -361,8 +361,11 @@ static const struct of_device_id xps2_of_match[] 
__devinitconst = {
 MODULE_DEVICE_TABLE(of, xps2_of_match);
 
 static struct of_platform_driver xps2_of_driver = {
-   .name   = DRIVER_NAME,
-   .match_table= xps2_of_match,
+   .driver = {
+   .name = DRIVER_NAME,
+   .owner = THIS_MODULE,
+   .of_match_table = xps2_of_match,
+   },
.probe  = xps2_of_probe,
.remove = __devexit_p(xps2_of_remove),
 };

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


[PATCH 11/27] drivers/macintosh/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/macintosh/smu.c  |7 +--
 drivers/macintosh/therm_pm72.c   |7 +--
 drivers/macintosh/therm_windtunnel.c |7 +--
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index f96feeb..4e912b2 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -670,8 +670,11 @@ static const struct of_device_id smu_platform_match[] =
 
 static struct of_platform_driver smu_of_platform_driver =
 {
-   .name   = smu,
-   .match_table= smu_platform_match,
+   .driver = {
+   .name = smu,
+   .owner = THIS_MODULE,
+   .of_match_table = smu_platform_match,
+   },
.probe  = smu_platform_probe,
 };
 
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index f5b0f9e..c99f937 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -2221,8 +2221,11 @@ static const struct of_device_id fcu_match[] =
 
 static struct of_platform_driver fcu_of_platform_driver = 
 {
-   .name   = temperature,
-   .match_table= fcu_match,
+   .driver = {
+   .name = temperature,
+   .owner = THIS_MODULE,
+   .of_match_table = fcu_match,
+   },
.probe  = fcu_of_probe,
.remove = fcu_of_remove
 };
diff --git a/drivers/macintosh/therm_windtunnel.c 
b/drivers/macintosh/therm_windtunnel.c
index 7fb8b4d..dc6a47a 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -464,8 +464,11 @@ static const struct of_device_id therm_of_match[] = {{
 };
 
 static struct of_platform_driver therm_of_driver = {
-   .name   = temperature,
-   .match_table= therm_of_match,
+   .driver = {
+   .name = temperature,
+   .owner = THIS_MODULE,
+   .of_match_table = therm_of_match,
+   },
.probe  = therm_of_probe,
.remove = therm_of_remove,
 };

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


[PATCH 12/27] drivers/mtd/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/mtd/maps/physmap_of.c|7 +--
 drivers/mtd/maps/sun_uflash.c|7 +--
 drivers/mtd/nand/fsl_elbc_nand.c |5 +++--
 drivers/mtd/nand/fsl_upm.c   |7 +--
 drivers/mtd/nand/ndfc.c  |5 +++--
 drivers/mtd/nand/pasemi_nand.c   |7 +--
 drivers/mtd/nand/socrates_nand.c |7 +--
 7 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 494af8e..997ee62 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -374,8 +374,11 @@ static struct of_device_id of_flash_match[] = {
 MODULE_DEVICE_TABLE(of, of_flash_match);
 
 static struct of_platform_driver of_flash_driver = {
-   .name   = of-flash,
-   .match_table= of_flash_match,
+   .driver = {
+   .name = of-flash,
+   .owner = THIS_MODULE,
+   .of_match_table = of_flash_match,
+   },
.probe  = of_flash_probe,
.remove = of_flash_remove,
 };
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index 365811d..b27be02 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -148,8 +148,11 @@ static const struct of_device_id uflash_match[] = {
 MODULE_DEVICE_TABLE(of, uflash_match);
 
 static struct of_platform_driver uflash_driver = {
-   .name   = DRIVER_NAME,
-   .match_table= uflash_match,
+   .driver = {
+   .name = DRIVER_NAME,
+   .owner = THIS_MODULE,
+   .of_match_table = uflash_match,
+   },
.probe  = uflash_probe,
.remove = __devexit_p(uflash_remove),
 };
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 4a60795..f45a8d0 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -1078,9 +1078,10 @@ static const struct of_device_id fsl_elbc_match[] = {
 
 static struct of_platform_driver fsl_elbc_ctrl_driver = {
.driver = {
-   .name   = fsl-elbc,
+   .name = fsl-elbc,
+   .owner = THIS_MODULE,
+   .of_match_table = fsl_elbc_match,
},
-   .match_table = fsl_elbc_match,
.probe = fsl_elbc_ctrl_probe,
.remove = fsl_elbc_ctrl_remove,
 };
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 071a60c..8dcbb18 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -356,8 +356,11 @@ static struct of_device_id of_fun_match[] = {
 MODULE_DEVICE_TABLE(of, of_fun_match);
 
 static struct of_platform_driver of_fun_driver = {
-   .name   = fsl,upm-nand,
-   .match_table= of_fun_match,
+   .driver = {
+   .name = fsl,upm-nand,
+   .owner = THIS_MODULE,
+   .of_match_table = of_fun_match,
+   },
.probe  = fun_probe,
.remove = __devexit_p(fun_remove),
 };
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 40b5658..19d94a2 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -293,9 +293,10 @@ MODULE_DEVICE_TABLE(of, ndfc_match);
 
 static struct of_platform_driver ndfc_driver = {
.driver = {
-   .name   = ndfc,
+   .name = ndfc,
+   .owner = THIS_MODULE,
+   .of_match_table = ndfc_match,
},
-   .match_table = ndfc_match,
.probe = ndfc_probe,
.remove = __devexit_p(ndfc_remove),
 };
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c
index edfc27b..a97e9c9 100644
--- a/drivers/mtd/nand/pasemi_nand.c
+++ b/drivers/mtd/nand/pasemi_nand.c
@@ -221,8 +221,11 @@ MODULE_DEVICE_TABLE(of, pasemi_nand_match);
 
 static struct of_platform_driver pasemi_nand_driver =
 {
-   .name   = (char*)driver_name,
-   .match_table= pasemi_nand_match,
+   .driver = {
+   .name = (char*)driver_name,
+   .owner = THIS_MODULE,
+   .of_match_table = pasemi_nand_match,
+   },
.probe  = pasemi_nand_probe,
.remove = pasemi_nand_remove,
 };
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c
index a4519a7..edb9b13 100644
--- a/drivers/mtd/nand/socrates_nand.c
+++ b/drivers/mtd/nand/socrates_nand.c
@@ -301,8 +301,11 @@ static struct of_device_id socrates_nand_match[] =
 MODULE_DEVICE_TABLE(of, socrates_nand_match);
 
 static struct of_platform_driver socrates_nand_driver = {
-   .name   = socrates_nand,
-   .match_table= socrates_nand_match,
+   .driver = {
+   .name = socrates_nand,
+   .owner = THIS_MODULE,
+  

[PATCH 13/27] drivers/net/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/net/can/mscan/mpc5xxx_can.c   |8 +---
 drivers/net/can/sja1000/sja1000_of_platform.c |8 +---
 drivers/net/ehea/ehea_main.c  |7 +--
 drivers/net/fs_enet/fs_enet-main.c|7 +--
 drivers/net/fs_enet/mii-bitbang.c |7 +--
 drivers/net/fs_enet/mii-fec.c |7 +--
 drivers/net/fsl_pq_mdio.c |7 +--
 drivers/net/gianfar.c |   10 ++
 drivers/net/ibm_newemac/core.c|8 +---
 drivers/net/ibm_newemac/mal.c |8 +---
 drivers/net/ibm_newemac/rgmii.c   |8 +---
 drivers/net/ibm_newemac/tah.c |8 +---
 drivers/net/ibm_newemac/zmii.c|8 +---
 drivers/net/ll_temac_main.c   |2 +-
 drivers/net/myri_sbus.c   |7 +--
 drivers/net/niu.c |7 +--
 drivers/net/phy/mdio-gpio.c   |7 +--
 drivers/net/sunbmac.c |7 +--
 drivers/net/sunhme.c  |7 +--
 drivers/net/sunlance.c|7 +--
 drivers/net/sunqe.c   |7 +--
 drivers/net/ucc_geth.c|7 +--
 drivers/net/xilinx_emaclite.c |7 +--
 23 files changed, 112 insertions(+), 54 deletions(-)

diff --git a/drivers/net/can/mscan/mpc5xxx_can.c 
b/drivers/net/can/mscan/mpc5xxx_can.c
index 03e7c48..2120784 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -393,15 +393,17 @@ static struct of_device_id __devinitdata 
mpc5xxx_can_table[] = {
 };
 
 static struct of_platform_driver mpc5xxx_can_driver = {
-   .owner = THIS_MODULE,
-   .name = mpc5xxx_can,
+   .driver = {
+   .name = mpc5xxx_can,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc5xxx_can_table,
+   },
.probe = mpc5xxx_can_probe,
.remove = __devexit_p(mpc5xxx_can_remove),
 #ifdef CONFIG_PM
.suspend = mpc5xxx_can_suspend,
.resume = mpc5xxx_can_resume,
 #endif
-   .match_table = mpc5xxx_can_table,
 };
 
 static int __init mpc5xxx_can_init(void)
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c 
b/drivers/net/can/sja1000/sja1000_of_platform.c
index dc5f20c..158b76e 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -216,11 +216,13 @@ static struct of_device_id __devinitdata 
sja1000_ofp_table[] = {
 MODULE_DEVICE_TABLE(of, sja1000_ofp_table);
 
 static struct of_platform_driver sja1000_ofp_driver = {
-   .owner = THIS_MODULE,
-   .name = DRV_NAME,
+   .driver = {
+   .owner = THIS_MODULE,
+   .name = DRV_NAME,
+   .of_match_table = sja1000_ofp_table,
+   },
.probe = sja1000_ofp_probe,
.remove = __devexit_p(sja1000_ofp_remove),
-   .match_table = sja1000_ofp_table,
 };
 
 static int __init sja1000_ofp_init(void)
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 3cdc938..08324e2 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -121,8 +121,11 @@ static struct of_device_id ehea_device_table[] = {
 MODULE_DEVICE_TABLE(of, ehea_device_table);
 
 static struct of_platform_driver ehea_driver = {
-   .name = ehea,
-   .match_table = ehea_device_table,
+   .driver = {
+   .owner = THIS_MODULE,
+   .name = ehea,
+   .of_match_table = ehea_device_table,
+   },
.probe = ehea_probe_adapter,
.remove = ehea_remove,
 };
diff --git a/drivers/net/fs_enet/fs_enet-main.c 
b/drivers/net/fs_enet/fs_enet-main.c
index 0770e2f..3e134de 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -1158,8 +1158,11 @@ static struct of_device_id fs_enet_match[] = {
 MODULE_DEVICE_TABLE(of, fs_enet_match);
 
 static struct of_platform_driver fs_enet_driver = {
-   .name   = fs_enet,
-   .match_table = fs_enet_match,
+   .driver = {
+   .owner = THIS_MODULE,
+   .name = fs_enet,
+   .of_match_table = fs_enet_match,
+   },
.probe = fs_enet_probe,
.remove = fs_enet_remove,
 };
diff --git a/drivers/net/fs_enet/mii-bitbang.c 
b/drivers/net/fs_enet/mii-bitbang.c
index 24ff9f4..a0afd0e 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -224,8 +224,11 @@ static struct of_device_id fs_enet_mdio_bb_match[] = {
 MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match);
 
 static struct 

[PATCH 14/27] drivers/serial/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/serial/apbuart.c|8 
 drivers/serial/cpm_uart/cpm_uart_core.c |7 +--
 drivers/serial/mpc52xx_uart.c   |7 ---
 drivers/serial/of_serial.c  |8 +---
 drivers/serial/sunhv.c  |7 +--
 drivers/serial/sunsab.c |7 +--
 drivers/serial/sunsu.c  |7 +--
 drivers/serial/sunzilog.c   |7 +--
 drivers/serial/uartlite.c   |5 ++---
 drivers/serial/ucc_uart.c   |8 +---
 10 files changed, 45 insertions(+), 26 deletions(-)

diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
index 52015d7..0099b86 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -584,12 +584,12 @@ static struct of_device_id __initdata apbuart_match[] = {
 };
 
 static struct of_platform_driver grlib_apbuart_of_driver = {
-   .match_table = apbuart_match,
.probe = apbuart_probe,
.driver = {
-  .owner = THIS_MODULE,
-  .name = grlib-apbuart,
-  },
+   .owner = THIS_MODULE,
+   .name = grlib-apbuart,
+   .of_match_table = apbuart_match,
+   },
 };
 
 
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c 
b/drivers/serial/cpm_uart/cpm_uart_core.c
index 300cea7..09962e0 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -1372,8 +1372,11 @@ static struct of_device_id cpm_uart_match[] = {
 };
 
 static struct of_platform_driver cpm_uart_driver = {
-   .name = cpm_uart,
-   .match_table = cpm_uart_match,
+   .driver = {
+   .name = cpm_uart,
+   .owner = THIS_MODULE,
+   .of_match_table = cpm_uart_match,
+   },
.probe = cpm_uart_probe,
.remove = cpm_uart_remove,
  };
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index cb07938..4fb32e3 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1464,15 +1464,16 @@ mpc52xx_uart_of_enumerate(void)
 MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);
 
 static struct of_platform_driver mpc52xx_uart_of_driver = {
-   .match_table= mpc52xx_uart_of_match,
.probe  = mpc52xx_uart_of_probe,
.remove = mpc52xx_uart_of_remove,
 #ifdef CONFIG_PM
.suspend= mpc52xx_uart_of_suspend,
.resume = mpc52xx_uart_of_resume,
 #endif
-   .driver = {
-   .name   = mpc52xx-psc-uart,
+   .driver = {
+   .name = mpc52xx-psc-uart,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc52xx_uart_of_match,
},
 };
 
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index 18bf39b..4166c23 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -174,11 +174,13 @@ static struct of_device_id __devinitdata 
of_platform_serial_table[] = {
 };
 
 static struct of_platform_driver of_platform_serial_driver = {
-   .owner = THIS_MODULE,
-   .name = of_serial,
+   .driver = {
+   .name = of_serial,
+   .owner = THIS_MODULE,
+   .of_match_table = of_platform_serial_table,
+   },
.probe = of_platform_serial_probe,
.remove = of_platform_serial_remove,
-   .match_table = of_platform_serial_table,
 };
 
 static int __init of_platform_serial_init(void)
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index d1eedf1..890f917 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -630,8 +630,11 @@ static const struct of_device_id hv_match[] = {
 MODULE_DEVICE_TABLE(of, hv_match);
 
 static struct of_platform_driver hv_driver = {
-   .name   = hv,
-   .match_table= hv_match,
+   .driver = {
+   .name = hv,
+   .owner = THIS_MODULE,
+   .of_match_table = hv_match,
+   },
.probe  = hv_probe,
.remove = __devexit_p(hv_remove),
 };
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index 2b8b2c2..fdb596c 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -1093,8 +1093,11 @@ static const struct of_device_id sab_match[] = {
 MODULE_DEVICE_TABLE(of, sab_match);
 
 static struct of_platform_driver sab_driver = {
-   .name   = sab,
-   .match_table= sab_match,
+   .driver = {
+   .name = sab,
+   .owner = THIS_MODULE,
+   .of_match_table = sab_match,
+   },
.probe  = sab_probe,
.remove = __devexit_p(sab_remove),
 };
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c

[PATCH 15/27] drivers/spi/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/spi/mpc52xx_psc_spi.c |4 +---
 drivers/spi/mpc52xx_spi.c |8 +---
 drivers/spi/spi_mpc8xxx.c |7 +--
 drivers/spi/spi_ppc4xx.c  |2 +-
 drivers/spi/xilinx_spi_of.c   |2 +-
 5 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index f12cfd9..babd529 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -513,14 +513,12 @@ static const struct of_device_id 
mpc52xx_psc_spi_of_match[] = {
 MODULE_DEVICE_TABLE(of, mpc52xx_psc_spi_of_match);
 
 static struct of_platform_driver mpc52xx_psc_spi_of_driver = {
-   .owner = THIS_MODULE,
-   .name = mpc52xx-psc-spi,
-   .match_table = mpc52xx_psc_spi_of_match,
.probe = mpc52xx_psc_spi_of_probe,
.remove = __exit_p(mpc52xx_psc_spi_of_remove),
.driver = {
.name = mpc52xx-psc-spi,
.owner = THIS_MODULE,
+   .of_match_table = mpc52xx_psc_spi_of_match,
},
 };
 
diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c
index 907c39a..792ffb9 100644
--- a/drivers/spi/mpc52xx_spi.c
+++ b/drivers/spi/mpc52xx_spi.c
@@ -557,9 +557,11 @@ static const struct of_device_id mpc52xx_spi_match[] 
__devinitconst = {
 MODULE_DEVICE_TABLE(of, mpc52xx_spi_match);
 
 static struct of_platform_driver mpc52xx_spi_of_driver = {
-   .owner = THIS_MODULE,
-   .name = mpc52xx-spi,
-   .match_table = mpc52xx_spi_match,
+   .driver = {
+   .name = mpc52xx-spi,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc52xx_spi_match,
+   },
.probe = mpc52xx_spi_probe,
.remove = __exit_p(mpc52xx_spi_remove),
 };
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index 38b9c32..fd90c30 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -1311,8 +1311,11 @@ static const struct of_device_id of_mpc8xxx_spi_match[] 
= {
 MODULE_DEVICE_TABLE(of, of_mpc8xxx_spi_match);
 
 static struct of_platform_driver of_mpc8xxx_spi_driver = {
-   .name   = mpc8xxx_spi,
-   .match_table= of_mpc8xxx_spi_match,
+   .driver = {
+   .name = mpc8xxx_spi,
+   .owner = THIS_MODULE,
+   .of_match_table = of_mpc8xxx_spi_match,
+   },
.probe  = of_mpc8xxx_spi_probe,
.remove = __devexit_p(of_mpc8xxx_spi_remove),
 };
diff --git a/drivers/spi/spi_ppc4xx.c b/drivers/spi/spi_ppc4xx.c
index 6d8d402..fa6f01c 100644
--- a/drivers/spi/spi_ppc4xx.c
+++ b/drivers/spi/spi_ppc4xx.c
@@ -586,12 +586,12 @@ static const struct of_device_id spi_ppc4xx_of_match[] = {
 MODULE_DEVICE_TABLE(of, spi_ppc4xx_of_match);
 
 static struct of_platform_driver spi_ppc4xx_of_driver = {
-   .match_table = spi_ppc4xx_of_match,
.probe = spi_ppc4xx_of_probe,
.remove = __exit_p(spi_ppc4xx_of_remove),
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
+   .of_match_table = spi_ppc4xx_of_match,
},
 };
 
diff --git a/drivers/spi/xilinx_spi_of.c b/drivers/spi/xilinx_spi_of.c
index ed34a8d..416a8cd 100644
--- a/drivers/spi/xilinx_spi_of.c
+++ b/drivers/spi/xilinx_spi_of.c
@@ -108,12 +108,12 @@ static const struct of_device_id xilinx_spi_of_match[] = {
 MODULE_DEVICE_TABLE(of, xilinx_spi_of_match);
 
 static struct of_platform_driver xilinx_spi_of_driver = {
-   .match_table = xilinx_spi_of_match,
.probe = xilinx_spi_of_probe,
.remove = __exit_p(xilinx_spi_of_remove),
.driver = {
.name = xilinx-xps-spi,
.owner = THIS_MODULE,
+   .of_match_table = xilinx_spi_of_match,
},
 };
 

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


[PATCH 16/27] drivers/scsi/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/scsi/qlogicpti.c |7 +--
 drivers/scsi/sun_esp.c   |7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 7374fbe..16dc12e 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1456,8 +1456,11 @@ static const struct of_device_id qpti_match[] = {
 MODULE_DEVICE_TABLE(of, qpti_match);
 
 static struct of_platform_driver qpti_sbus_driver = {
-   .name   = qpti,
-   .match_table= qpti_match,
+   .driver = {
+   .name = qpti,
+   .owner = THIS_MODULE,
+   .of_match_table = qpti_match,
+   },
.probe  = qpti_sbus_probe,
.remove = __devexit_p(qpti_sbus_remove),
 };
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index 4369b76..10ba30a 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -632,8 +632,11 @@ static const struct of_device_id esp_match[] = {
 MODULE_DEVICE_TABLE(of, esp_match);
 
 static struct of_platform_driver esp_sbus_driver = {
-   .name   = esp,
-   .match_table= esp_match,
+   .driver = {
+   .name = esp,
+   .owner = THIS_MODULE,
+   .of_match_table = esp_match,
+   },
.probe  = esp_sbus_probe,
.remove = __devexit_p(esp_sbus_remove),
 };

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


[PATCH 17/27] drivers/sbus/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/sbus/char/bbc_i2c.c |7 +--
 drivers/sbus/char/display7seg.c |7 +--
 drivers/sbus/char/envctrl.c |7 +--
 drivers/sbus/char/flash.c   |7 +--
 drivers/sbus/char/uctrl.c   |7 +--
 5 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 1543ac3..8bfdd63 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -414,8 +414,11 @@ static const struct of_device_id bbc_i2c_match[] = {
 MODULE_DEVICE_TABLE(of, bbc_i2c_match);
 
 static struct of_platform_driver bbc_i2c_driver = {
-   .name   = bbc_i2c,
-   .match_table= bbc_i2c_match,
+   .driver = {
+   .name = bbc_i2c,
+   .owner = THIS_MODULE,
+   .of_match_table = bbc_i2c_match,
+   },
.probe  = bbc_i2c_probe,
.remove = __devexit_p(bbc_i2c_remove),
 };
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index d0a10f4..e1db005 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -265,8 +265,11 @@ static const struct of_device_id d7s_match[] = {
 MODULE_DEVICE_TABLE(of, d7s_match);
 
 static struct of_platform_driver d7s_driver = {
-   .name   = DRIVER_NAME,
-   .match_table= d7s_match,
+   .driver = {
+   .name = DRIVER_NAME,
+   .owner = THIS_MODULE,
+   .of_match_table = d7s_match,
+   },
.probe  = d7s_probe,
.remove = __devexit_p(d7s_remove),
 };
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index 84a4310..dc9e8ef 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1130,8 +1130,11 @@ static const struct of_device_id envctrl_match[] = {
 MODULE_DEVICE_TABLE(of, envctrl_match);
 
 static struct of_platform_driver envctrl_driver = {
-   .name   = DRIVER_NAME,
-   .match_table= envctrl_match,
+   .driver = {
+   .name = DRIVER_NAME,
+   .owner = THIS_MODULE,
+   .of_match_table = envctrl_match,
+   },
.probe  = envctrl_probe,
.remove = __devexit_p(envctrl_remove),
 };
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index dc8f95d..0e8ae6b 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -208,8 +208,11 @@ static const struct of_device_id flash_match[] = {
 MODULE_DEVICE_TABLE(of, flash_match);
 
 static struct of_platform_driver flash_driver = {
-   .name   = flash,
-   .match_table= flash_match,
+   .driver = {
+   .name = flash,
+   .owner = THIS_MODULE,
+   .of_match_table = flash_match,
+   },
.probe  = flash_probe,
.remove = __devexit_p(flash_remove),
 };
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index acc6738..5f25366 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -425,8 +425,11 @@ static const struct of_device_id uctrl_match[] = {
 MODULE_DEVICE_TABLE(of, uctrl_match);
 
 static struct of_platform_driver uctrl_driver = {
-   .name   = uctrl,
-   .match_table= uctrl_match,
+   .driver = {
+   .name = uctrl,
+   .owner = THIS_MODULE,
+   .of_match_table = uctrl_match,
+   },
.probe  = uctrl_probe,
.remove = __devexit_p(uctrl_remove),
 };

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


[PATCH 18/27] drivers/parport/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/parport/parport_sunbpp.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c
index 065f229..9a5b4b8 100644
--- a/drivers/parport/parport_sunbpp.c
+++ b/drivers/parport/parport_sunbpp.c
@@ -382,8 +382,11 @@ static const struct of_device_id bpp_match[] = {
 MODULE_DEVICE_TABLE(of, bpp_match);
 
 static struct of_platform_driver bpp_sbus_driver = {
-   .name   = bpp,
-   .match_table= bpp_match,
+   .driver = {
+   .name = bpp,
+   .owner = THIS_MODULE,
+   .of_match_table = bpp_match,
+   },
.probe  = bpp_probe,
.remove = __devexit_p(bpp_remove),
 };

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


Re: [PATCH 00/37] OF: move device node pointer into struct device.

2010-03-11 Thread David Miller
From: David Miller da...@davemloft.net
Date: Thu, 11 Mar 2010 10:20:43 -0800 (PST)

 Three or four of the patches don't apply because only your tree
 has those /* temporary */ comments, f.e. in arch/sparc/kernel/pci.c
 
 I took care of this when applying to my tree.

It also doesn't build, what the heck is this against
Grant?

drivers/of/device.c: In function 'of_match_device':
drivers/of/device.c:24: error: 'const struct device' has no member named 
'of_node'
drivers/of/device.c:26: error: 'const struct device' has no member named 
'of_node'

Please make a patch set against Linus's vanilla tree so
I and others can test this.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 20/27] drivers/mmc/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/mmc/host/sdhci-of-core.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
index dfe5cea..7802a54 100644
--- a/drivers/mmc/host/sdhci-of-core.c
+++ b/drivers/mmc/host/sdhci-of-core.c
@@ -205,8 +205,11 @@ static const struct of_device_id sdhci_of_match[] = {
 MODULE_DEVICE_TABLE(of, sdhci_of_match);
 
 static struct of_platform_driver sdhci_of_driver = {
-   .driver.name = sdhci-of,
-   .match_table = sdhci_of_match,
+   .driver = {
+   .name = sdhci-of,
+   .owner = THIS_MODULE,
+   .of_match_table = sdhci_of_match,
+   },
.probe = sdhci_of_probe,
.remove = __devexit_p(sdhci_of_remove),
.suspend = sdhci_of_suspend,

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


[PATCH 19/27] drivers/pcmcia/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/pcmcia/electra_cf.c  |7 +--
 drivers/pcmcia/m8xx_pcmcia.c |7 +--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index a4d821f..4ea8530 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -356,8 +356,11 @@ static const struct of_device_id electra_cf_match[] = {
 MODULE_DEVICE_TABLE(of, electra_cf_match);
 
 static struct of_platform_driver electra_cf_driver = {
-   .name  = (char *)driver_name,
-   .match_table= electra_cf_match,
+   .driver = {
+   .name = (char *)driver_name,
+   .owner = THIS_MODULE,
+   .of_match_table = electra_cf_match,
+   },
.probe= electra_cf_probe,
.remove   = electra_cf_remove,
 };
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index 61c2159..af60745 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1314,8 +1314,11 @@ static const struct of_device_id m8xx_pcmcia_match[] = {
 MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match);
 
 static struct of_platform_driver m8xx_pcmcia_driver = {
-   .name = driver_name,
-   .match_table = m8xx_pcmcia_match,
+   .driver = {
+   .name = driver_name,
+   .owner = THIS_MODULE,
+   .match_table = m8xx_pcmcia_match,
+   },
.probe = m8xx_probe,
.remove = m8xx_remove,
.suspend = m8xx_suspend,

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


[PATCH 21/27] drivers/hwmon/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/hwmon/ultra45_env.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c
index 68e90ab..5da5942 100644
--- a/drivers/hwmon/ultra45_env.c
+++ b/drivers/hwmon/ultra45_env.c
@@ -300,8 +300,11 @@ static const struct of_device_id env_match[] = {
 MODULE_DEVICE_TABLE(of, env_match);
 
 static struct of_platform_driver env_driver = {
-   .name   = ultra45_env,
-   .match_table= env_match,
+   .driver = {
+   .name = ultra45_env,
+   .owner = THIS_MODULE,
+   .of_match_table = env_match,
+   },
.probe  = env_probe,
.remove = __devexit_p(env_remove),
 };

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


[PATCH 22/27] drivers/i2c/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/i2c/busses/i2c-cpm.c |   10 +-
 drivers/i2c/busses/i2c-ibm_iic.c |7 +--
 drivers/i2c/busses/i2c-mpc.c |8 
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index 9c2e100..47994d2 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -718,13 +718,13 @@ static const struct of_device_id cpm_i2c_match[] = {
 MODULE_DEVICE_TABLE(of, cpm_i2c_match);
 
 static struct of_platform_driver cpm_i2c_driver = {
-   .match_table= cpm_i2c_match,
.probe  = cpm_i2c_probe,
.remove = __devexit_p(cpm_i2c_remove),
-   .driver = {
-   .name   = fsl-i2c-cpm,
-   .owner  = THIS_MODULE,
-   }
+   .driver = {
+   .name = fsl-i2c-cpm,
+   .owner = THIS_MODULE,
+   .of_match_table = cpm_i2c_match,
+   },
 };
 
 static int __init cpm_i2c_init(void)
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index b1bc6e2..21dba9d 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -807,8 +807,11 @@ static const struct of_device_id ibm_iic_match[] = {
 };
 
 static struct of_platform_driver ibm_iic_driver = {
-   .name   = ibm-iic,
-   .match_table = ibm_iic_match,
+   .driver = {
+   .name = ibm-iic,
+   .owner = THIS_MODULE,
+   .of_match_table = ibm_iic_match,
+   },
.probe  = iic_probe,
.remove = __devexit_p(iic_remove),
 };
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 0123a6e..6063dc3 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -674,12 +674,12 @@ MODULE_DEVICE_TABLE(of, mpc_i2c_of_match);
 
 /* Structure for a device driver */
 static struct of_platform_driver mpc_i2c_driver = {
-   .match_table= mpc_i2c_of_match,
.probe  = fsl_i2c_probe,
.remove = __devexit_p(fsl_i2c_remove),
-   .driver = {
-   .owner  = THIS_MODULE,
-   .name   = DRV_NAME,
+   .driver = {
+   .owner = THIS_MODULE,
+   .name = DRV_NAME,
+   .of_match_table = mpc_i2c_of_match,
},
 };
 

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


[PATCH 23/27] drivers/infiniband/of: don't use deprecated fields in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/infiniband/hw/ehca/ehca_main.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/hw/ehca/ehca_main.c 
b/drivers/infiniband/hw/ehca/ehca_main.c
index 2639185..252489e 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -937,12 +937,13 @@ static struct of_device_id ehca_device_table[] =
 MODULE_DEVICE_TABLE(of, ehca_device_table);
 
 static struct of_platform_driver ehca_driver = {
-   .name= ehca,
-   .match_table = ehca_device_table,
.probe   = ehca_probe,
.remove  = ehca_remove,
-   .driver  = {
+   .driver = {
+   .name = ehca,
+   .owner = THIS_MODULE,
.groups = ehca_drv_attr_groups,
+   .of_match_table = ehca_device_table,
},
 };
 

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


[PATCH 24/27] sound/of: don't use deprecated fields in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 sound/soc/fsl/mpc5200_psc_ac97.c |2 +-
 sound/soc/fsl/mpc5200_psc_i2s.c  |2 +-
 sound/soc/fsl/mpc8610_hpcd.c |8 +---
 sound/sparc/amd7930.c|7 +--
 sound/sparc/cs4231.c |7 +--
 sound/sparc/dbri.c   |7 +--
 6 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c
index 3dbc7f7..e2ee220 100644
--- a/sound/soc/fsl/mpc5200_psc_ac97.c
+++ b/sound/soc/fsl/mpc5200_psc_ac97.c
@@ -317,12 +317,12 @@ static struct of_device_id psc_ac97_match[] __devinitdata 
= {
 MODULE_DEVICE_TABLE(of, psc_ac97_match);
 
 static struct of_platform_driver psc_ac97_driver = {
-   .match_table = psc_ac97_match,
.probe = psc_ac97_of_probe,
.remove = __devexit_p(psc_ac97_of_remove),
.driver = {
.name = mpc5200-psc-ac97,
.owner = THIS_MODULE,
+   .of_match_table = psc_ac97_match,
},
 };
 
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index ce8de90..f6c507c 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -220,12 +220,12 @@ static struct of_device_id psc_i2s_match[] __devinitdata 
= {
 MODULE_DEVICE_TABLE(of, psc_i2s_match);
 
 static struct of_platform_driver psc_i2s_driver = {
-   .match_table = psc_i2s_match,
.probe = psc_i2s_of_probe,
.remove = __devexit_p(psc_i2s_of_remove),
.driver = {
.name = mpc5200-psc-i2s,
.owner = THIS_MODULE,
+   .of_match_table = psc_i2s_match,
},
 };
 
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index d7e1b9a..511d721 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -579,9 +579,11 @@ static struct of_device_id mpc8610_hpcd_match[] = {
 MODULE_DEVICE_TABLE(of, mpc8610_hpcd_match);
 
 static struct of_platform_driver mpc8610_hpcd_of_driver = {
-   .owner  = THIS_MODULE,
-   .name   = mpc8610_hpcd,
-   .match_table= mpc8610_hpcd_match,
+   .driver = {
+   .name = mpc8610_hpcd,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc8610_hpcd_match,
+   },
.probe  = mpc8610_hpcd_probe,
.remove = mpc8610_hpcd_remove,
 };
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 574af56..71221fd 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -1065,8 +1065,11 @@ static const struct of_device_id amd7930_match[] = {
 };
 
 static struct of_platform_driver amd7930_sbus_driver = {
-   .name   = audio,
-   .match_table= amd7930_match,
+   .driver = {
+   .name = audio,
+   .owner = THIS_MODULE,
+   .of_match_table = amd7930_match,
+   },
.probe  = amd7930_sbus_probe,
 };
 
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 14cb87c..47db872 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -2110,8 +2110,11 @@ static const struct of_device_id cs4231_match[] = {
 MODULE_DEVICE_TABLE(of, cs4231_match);
 
 static struct of_platform_driver cs4231_driver = {
-   .name   = audio,
-   .match_table= cs4231_match,
+   .driver = {
+   .name = audio,
+   .owner = THIS_MODULE,
+   .of_match_table = cs4231_match,
+   },
.probe  = cs4231_probe,
.remove = __devexit_p(cs4231_remove),
 };
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 2734c36..6e5d1dd 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2686,8 +2686,11 @@ static const struct of_device_id dbri_match[] = {
 MODULE_DEVICE_TABLE(of, dbri_match);
 
 static struct of_platform_driver dbri_sbus_driver = {
-   .name   = dbri,
-   .match_table= dbri_match,
+   .driver = {
+   .name = dbri,
+   .owner = THIS_MODULE,
+   .of_match_table = dbri_match,
+   },
.probe  = dbri_probe,
.remove = __devexit_p(dbri_remove),
 };

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


[PATCH 25/27] arch/powerpc/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/powerpc/kernel/of_platform.c |3 ++-
 arch/powerpc/platforms/52xx/mpc52xx_gpio.c|   14 
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c |7 --
 arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c |8 ---
 arch/powerpc/platforms/82xx/ep8248e.c |3 ++-
 arch/powerpc/platforms/83xx/suspend.c |7 --
 arch/powerpc/platforms/cell/axon_msi.c|7 +++---
 arch/powerpc/platforms/pasemi/gpio_mdio.c |7 +++---
 arch/powerpc/sysdev/axonram.c |8 +++
 arch/powerpc/sysdev/bestcomm/bestcomm.c   |   10 +++-
 arch/powerpc/sysdev/fsl_msi.c |7 --
 arch/powerpc/sysdev/fsl_pmc.c |7 --
 arch/powerpc/sysdev/fsl_rio.c |7 --
 arch/powerpc/sysdev/pmi.c |7 +++---
 arch/powerpc/sysdev/qe_lib/qe.c   |7 --
 drivers/dma/fsldma.c  |   13 +++
 drivers/dma/ppc4xx/adma.c |2 +-
 drivers/edac/mpc85xx_edac.c   |   30 ++---
 drivers/edac/ppc4xx_edac.c|   10 
 19 files changed, 95 insertions(+), 69 deletions(-)

diff --git a/arch/powerpc/kernel/of_platform.c 
b/arch/powerpc/kernel/of_platform.c
index e047126..c08eb85 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -307,10 +307,11 @@ static struct of_device_id of_pci_phb_ids[] = {
 };
 
 static struct of_platform_driver of_pci_phb_driver = {
-   .match_table = of_pci_phb_ids,
.probe = of_pci_phb_probe,
.driver = {
.name = of-pci,
+   .owner = THIS_MODULE,
+   .of_match_table = of_pci_phb_ids,
},
 };
 
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c 
b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
index fce30e2..8f65de0 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpio.c
@@ -192,8 +192,11 @@ static const struct of_device_id 
mpc52xx_wkup_gpiochip_match[] = {
 };
 
 static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = {
-   .name = gpio_wkup,
-   .match_table = mpc52xx_wkup_gpiochip_match,
+   .driver = {
+   .name = gpio_wkup,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc52xx_wkup_gpiochip_match,
+   },
.probe = mpc52xx_wkup_gpiochip_probe,
.remove = mpc52xx_gpiochip_remove,
 };
@@ -348,8 +351,11 @@ static const struct of_device_id 
mpc52xx_simple_gpiochip_match[] = {
 };
 
 static struct of_platform_driver mpc52xx_simple_gpiochip_driver = {
-   .name = gpio,
-   .match_table = mpc52xx_simple_gpiochip_match,
+   .driver = {
+   .name = gpio,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc52xx_simple_gpiochip_match,
+   },
.probe = mpc52xx_simple_gpiochip_probe,
.remove = mpc52xx_gpiochip_remove,
 };
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c 
b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index a34bffa..59a58e9 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -779,8 +779,11 @@ static const struct of_device_id mpc52xx_gpt_match[] = {
 };
 
 static struct of_platform_driver mpc52xx_gpt_driver = {
-   .name = mpc52xx-gpt,
-   .match_table = mpc52xx_gpt_match,
+   .driver = {
+   .name = mpc52xx-gpt,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc52xx_gpt_match,
+   },
.probe = mpc52xx_gpt_probe,
.remove = mpc52xx_gpt_remove,
 };
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c 
b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
index 046d314..35baf0f 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -535,9 +535,11 @@ static struct of_device_id mpc52xx_lpbfifo_match[] 
__devinitconst = {
 };
 
 static struct of_platform_driver mpc52xx_lpbfifo_driver = {
-   .owner = THIS_MODULE,
-   .name = mpc52xx-lpbfifo,
-   .match_table = mpc52xx_lpbfifo_match,
+   .driver = {
+   .name = mpc52xx-lpbfifo,
+   .owner = THIS_MODULE,
+   .of_match_table = mpc52xx_lpbfifo_match,
+   },
.probe = mpc52xx_lpbfifo_probe,
.remove = __devexit_p(mpc52xx_lpbfifo_remove),
 };
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c 
b/arch/powerpc/platforms/82xx/ep8248e.c
index 3848500..3d1b718 100644
--- a/arch/powerpc/platforms/82xx/ep8248e.c
+++ b/arch/powerpc/platforms/82xx/ep8248e.c
@@ -169,8 +169,9 @@ static const struct of_device_id ep8248e_mdio_match[] = {
 static struct 

[PATCH 27/27] of: remove obsolete members from of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner already exist in struct device_driver.
Remove the duplication from struct of_platform_driver.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/of/platform.c   |7 ---
 include/linux/of_platform.h |4 
 2 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 9fd7f7d..ba402c6 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -385,13 +385,6 @@ int of_bus_type_init(struct bus_type *bus, const char 
*name)
 
 int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus)
 {
-   /* initialize common driver fields */
-   if (!drv-driver.name)
-   drv-driver.name = drv-name;
-   if (!drv-driver.owner)
-   drv-driver.owner = drv-owner;
-   if (!drv-driver.of_match_table)
-   drv-driver.of_match_table = drv-match_table;
drv-driver.bus = bus;
 
/* register with core */
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index ac3ae07..1643d37 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -31,10 +31,6 @@ extern struct bus_type of_platform_bus_type;
  */
 struct of_platform_driver
 {
-   const char  *name;
-   const struct of_device_id   *match_table;
-   struct module   *owner;
-
int (*probe)(struct of_device* dev,
 const struct of_device_id *match);
int (*remove)(struct of_device* dev);

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


Re: [PATCH 00/37] OF: move device node pointer into struct device.

2010-03-11 Thread Grant Likely
On Thu, Mar 11, 2010 at 11:23 AM, David Miller da...@davemloft.net wrote:
 From: David Miller da...@davemloft.net
 Date: Thu, 11 Mar 2010 10:20:43 -0800 (PST)

 Three or four of the patches don't apply because only your tree
 has those /* temporary */ comments, f.e. in arch/sparc/kernel/pci.c

 I took care of this when applying to my tree.

 It also doesn't build, what the heck is this against
 Grant?

 drivers/of/device.c: In function 'of_match_device':
 drivers/of/device.c:24: error: 'const struct device' has no member named 
 'of_node'
 drivers/of/device.c:26: error: 'const struct device' has no member named 
 'of_node'

 Please make a patch set against Linus's vanilla tree so
 I and others can test this.

Oops, sorry David, I accidentally dropped the top patch.  Give me a
moment and I'll send it out.

g.

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


[PATCH 26/27] arch/sparc/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Grant Likely
.name, .match_table and .owner are duplicated in both of_platform_driver
and device_driver, so the of_platform_driver copies will be removed soon.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/sparc/include/asm/parport.h |7 +--
 arch/sparc/kernel/apc.c  |7 +--
 arch/sparc/kernel/auxio_64.c |7 ---
 arch/sparc/kernel/central.c  |   14 --
 arch/sparc/kernel/chmc.c |7 +--
 arch/sparc/kernel/pci_fire.c |7 +--
 arch/sparc/kernel/pci_psycho.c   |7 +--
 arch/sparc/kernel/pci_sabre.c|7 +--
 arch/sparc/kernel/pci_schizo.c   |7 +--
 arch/sparc/kernel/pci_sun4v.c|7 +--
 arch/sparc/kernel/pmc.c  |7 +--
 arch/sparc/kernel/power.c|7 ---
 arch/sparc/kernel/time_32.c  |7 ---
 arch/sparc/kernel/time_64.c  |   21 -
 14 files changed, 77 insertions(+), 42 deletions(-)

diff --git a/arch/sparc/include/asm/parport.h b/arch/sparc/include/asm/parport.h
index 1bb6a41..c333b8d 100644
--- a/arch/sparc/include/asm/parport.h
+++ b/arch/sparc/include/asm/parport.h
@@ -232,8 +232,11 @@ static const struct of_device_id ecpp_match[] = {
 };
 
 static struct of_platform_driver ecpp_driver = {
-   .name   = ecpp,
-   .match_table= ecpp_match,
+   .driver = {
+   .name = ecpp,
+   .owner = THIS_MODULE,
+   .of_match_table = ecpp_match,
+   },
.probe  = ecpp_probe,
.remove = __devexit_p(ecpp_remove),
 };
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index 71ec90b..b27476c 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -174,8 +174,11 @@ static struct of_device_id __initdata apc_match[] = {
 MODULE_DEVICE_TABLE(of, apc_match);
 
 static struct of_platform_driver apc_driver = {
-   .name   = apc,
-   .match_table= apc_match,
+   .driver = {
+   .name = apc,
+   .owner = THIS_MODULE,
+   .of_match_table = apc_match,
+   },
.probe  = apc_probe,
 };
 
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c
index bd8421a..ddc8412 100644
--- a/arch/sparc/kernel/auxio_64.c
+++ b/arch/sparc/kernel/auxio_64.c
@@ -132,10 +132,11 @@ static int __devinit auxio_probe(struct of_device *dev, 
const struct of_device_i
 }
 
 static struct of_platform_driver auxio_driver = {
-   .match_table= auxio_match,
.probe  = auxio_probe,
-   .driver = {
-   .name   = auxio,
+   .driver = {
+   .name = auxio,
+   .owner = THIS_MODULE,
+   .of_match_table = auxio_match,
},
 };
 
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c
index dfc3698..818f62a 100644
--- a/arch/sparc/kernel/central.c
+++ b/arch/sparc/kernel/central.c
@@ -148,10 +148,11 @@ static struct of_device_id __initdata clock_board_match[] 
= {
 };
 
 static struct of_platform_driver clock_board_driver = {
-   .match_table= clock_board_match,
.probe  = clock_board_probe,
-   .driver = {
-   .name   = clock_board,
+   .driver = {
+   .name = clock_board,
+   .owner = THIS_MODULE,
+   .of_match_table = clock_board_match,
},
 };
 
@@ -253,10 +254,11 @@ static struct of_device_id __initdata fhc_match[] = {
 };
 
 static struct of_platform_driver fhc_driver = {
-   .match_table= fhc_match,
.probe  = fhc_probe,
-   .driver = {
-   .name   = fhc,
+   .driver = {
+   .name = fhc,
+   .owner = THIS_MODULE,
+   .of_match_table = fhc_match,
},
 };
 
diff --git a/arch/sparc/kernel/chmc.c b/arch/sparc/kernel/chmc.c
index 9368796..870cb65 100644
--- a/arch/sparc/kernel/chmc.c
+++ b/arch/sparc/kernel/chmc.c
@@ -811,8 +811,11 @@ static const struct of_device_id us3mc_match[] = {
 MODULE_DEVICE_TABLE(of, us3mc_match);
 
 static struct of_platform_driver us3mc_driver = {
-   .name   = us3mc,
-   .match_table= us3mc_match,
+   .driver = {
+   .name = us3mc,
+   .owner = THIS_MODULE,
+   .of_match_table = us3mc_match,
+   },
.probe  = us3mc_probe,
.remove = __devexit_p(us3mc_remove),
 };
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c
index ff844ba..51cfa09 100644
--- a/arch/sparc/kernel/pci_fire.c
+++ b/arch/sparc/kernel/pci_fire.c
@@ -508,8 +508,11 @@ static struct of_device_id __initdata fire_match[] = {
 };
 
 static struct of_platform_driver fire_driver = {
-   .name   = DRIVER_NAME,
-   .match_table= fire_match,
+   .driver = {
+   .name = DRIVER_NAME,
+   .owner = THIS_MODULE,
+ 

Re: [PATCH 00/37] OF: move device node pointer into struct device.

2010-03-11 Thread David Miller
From: Grant Likely grant.lik...@secretlab.ca
Date: Thu, 11 Mar 2010 11:25:46 -0700

 Oops, sorry David, I accidentally dropped the top patch.  Give me a
 moment and I'll send it out.

Sorry, now that you've just bombed us with 27 patches to
the same area, I've totally lost interest in testing this
work.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 00/27] Clean up of_platform drivers

2010-03-11 Thread David Miller

Grant you've just posted two enormous patch sets at the SAME EXACT
TIME to the SAME AREAS of the kernel.

One has 37 patches and this one has 27.

Not only are these sets enormous, you haven't specified what in the
world they are against.

The 37 patch set didn't apply cleanly to Linus tree and once I worked
through the rejects as best I could it didn't even compile.

How are people supposed to test this stuff? :-/
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 12/37] drivers/usb: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Greg KH
On Thu, Mar 11, 2010 at 11:04:54AM -0700, Grant Likely wrote:
 .node is being removed
 
 Signed-off-by: Grant Likely grant.lik...@secretlab.ca

Acked-by: Greg Kroah-Hartman gre...@suse.de
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 21/37] drivers/ata: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Jeff Garzik

On 03/11/2010 01:31 PM, Sergei Shtylyov wrote:

Hello.

Grant Likely wrote:


.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

drivers/ata/pata_macio.c | 2 +-
drivers/ata/pata_of_platform.c | 2 +-
drivers/ide/pmac.c | 10 +-
3 files changed, 7 insertions(+), 7 deletions(-)


Should probably have been 2 patches instead of one, as drivers/ata/ and
drivers/ide/ are different subsystems...


Possibly, but these patches should go in via the OF tree anyway, so 
collecting ACKs should be sufficient.


Jeff



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


[PATCH] driver-core: Add device node pointer to struct device

2010-03-11 Thread Grant Likely
Currently, platforms using CONFIG_OF add a 'struct device_node *of_node'
to dev-archdata.  However, with CONFIG_OF becoming generic for all
architectures, it makes sense for commonality to move it out of archdata
and into struct device proper.

This patch adds a struct device_node *of_node member to struct device
and updates all locations which currently write the device_node pointer
into archdata to also update dev-of_node.  Subsequent patches will
modify callers to use the archdata location and ultimately remove
the archdata member entirely.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
Acked-by: Greg Kroah-Hartman gre...@suse.de
---

This should have been the first patch in my 37 patch series
[PATCH 00/37] OF: move device node pointer into struct device.,
but I accidentally missed it.  Apply this patch before the rest of
the series.

I've also pushed out all the patches that I've just posted to the
'experimental-devicetree' branch of my git tree:

git://git.secretlab.ca/git/linux-2.6 experimental-devicetree

 arch/microblaze/kernel/of_device.c  |3 ++-
 arch/powerpc/kernel/of_device.c |3 ++-
 arch/powerpc/kernel/pci-common.c|5 +++--
 arch/powerpc/kernel/vio.c   |3 ++-
 arch/powerpc/platforms/ps3/system-bus.c |3 ++-
 arch/sparc/kernel/pci.c |3 ++-
 drivers/of/of_mdio.c|3 ++-
 drivers/of/of_spi.c |3 ++-
 include/linux/device.h  |4 
 9 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/arch/microblaze/kernel/of_device.c 
b/arch/microblaze/kernel/of_device.c
index 9a0f763..12371bd 100644
--- a/arch/microblaze/kernel/of_device.c
+++ b/arch/microblaze/kernel/of_device.c
@@ -53,7 +53,8 @@ struct of_device *of_device_alloc(struct device_node *np,
dev-dev.dma_mask = dev-dma_mask;
dev-dev.parent = parent;
dev-dev.release = of_release_dev;
-   dev-dev.archdata.of_node = np;
+   dev-dev.archdata.of_node = np; /* temporary; remove after merging */
+   dev-dev.of_node = np;
 
if (bus_id)
dev_set_name(dev-dev, bus_id);
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index a359cb0..efbc262 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -73,7 +73,8 @@ struct of_device *of_device_alloc(struct device_node *np,
dev-dev.dma_mask = dev-dma_mask;
dev-dev.parent = parent;
dev-dev.release = of_release_dev;
-   dev-dev.archdata.of_node = np;
+   dev-dev.archdata.of_node = np; /* temporary; remove after merging */
+   dev-dev.of_node = np;
 
if (bus_id)
dev_set_name(dev-dev, %s, bus_id);
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 2597f95..90501f2 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -,8 +,9 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus 
*bus)
if (dev-is_added)
continue;
 
-   /* Setup OF node pointer in archdata */
-   sd-of_node = pci_device_to_OF_node(dev);
+   /* Setup OF node pointer in the device */
+   sd-of_node = pci_device_to_OF_node(dev); /* temporary */
+   dev-dev.of_node = pci_device_to_OF_node(dev);
 
/* Fixup NUMA node as it may not be setup yet by the generic
 * code and is needed by the DMA init
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 77f6421..70b52c7 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1229,7 +1229,8 @@ struct vio_dev *vio_register_device_node(struct 
device_node *of_node)
if (unit_address != NULL)
viodev-unit_address = *unit_address;
}
-   viodev-dev.archdata.of_node = of_node_get(of_node);
+   viodev-dev.of_node = of_node_get(of_node);
+   viodev-dev.archdata.of_node = viodev-dev.of_node; /* temporary */
 
if (firmware_has_feature(FW_FEATURE_CMO))
vio_cmo_set_dma_ops(viodev);
diff --git a/arch/powerpc/platforms/ps3/system-bus.c 
b/arch/powerpc/platforms/ps3/system-bus.c
index e34b305..5f162c0 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -765,7 +765,8 @@ int ps3_system_bus_device_register(struct 
ps3_system_bus_device *dev)
BUG();
};
 
-   dev-core.archdata.of_node = NULL;
+   dev-core.of_node = NULL;
+   dev-core.archdata.of_node = NULL; /* temporary */
set_dev_node(dev-core, 0);
 
pr_debug(%s:%d add %s\n, __func__, __LINE__, dev_name(dev-core));
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c
index 5ac539a..cf73f43 100644
--- a/arch/sparc/kernel/pci.c
+++ b/arch/sparc/kernel/pci.c
@@ -261,7 +261,7 @@ static struct pci_dev 

Re: [PATCH 21/37] drivers/ata: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread David Miller
From: Sergei Shtylyov sshtyl...@mvista.com
Date: Thu, 11 Mar 2010 21:31:14 +0300

   Should probably have been 2 patches instead of one, as drivers/ata/
   and drivers/ide/ are different subsystems...

No, he should consolidate these changes _MORE_ not less.

The patch set is already too large to review at it is!
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 05/27] drivers/usb/of: don't use deprecated field in of_platform_driver

2010-03-11 Thread Greg KH
On Thu, Mar 11, 2010 at 11:22:15AM -0700, Grant Likely wrote:
 .name, .match_table and .owner are duplicated in both of_platform_driver
 and device_driver, so the of_platform_driver copies will be removed soon.
 
 Signed-off-by: Grant Likely grant.lik...@secretlab.ca

Acked-by: Greg Kroah-Hartman gre...@suse.de
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 1/2] powerpc: Partition hibernation support

2010-03-11 Thread Nathan Fontenot

Brian King wrote:

Enables support for HMC initiated partition hibernation. This is
a firmware assisted hibernation, since the firmware handles writing
the memory out to disk, along with other partition information,
so we just mimic suspend to ram.

Signed-off-by: Brian King brk...@linux.vnet.ibm.com
---

 arch/powerpc/Kconfig |2 
 arch/powerpc/include/asm/hvcall.h|1 
 arch/powerpc/include/asm/machdep.h   |1 
 arch/powerpc/include/asm/rtas.h  |   10 +

 arch/powerpc/kernel/rtas.c   |  118 ++-
 arch/powerpc/platforms/pseries/Makefile  |1 
 arch/powerpc/platforms/pseries/hotplug-cpu.c |6 
 arch/powerpc/platforms/pseries/suspend.c |  209 +++

 8 files changed, 312 insertions(+), 36 deletions(-)

diff -puN /dev/null arch/powerpc/platforms/pseries/suspend.c
--- /dev/null   2009-12-15 17:58:07.0 -0600
+++ linux-2.6-bjking1/arch/powerpc/platforms/pseries/suspend.c  2010-02-23 
16:29:25.0 -0600
@@ -0,0 +1,209 @@


-- snip --


+
+static SYSDEV_ATTR(hibernate, S_IWUSR, NULL, store_hibernate);
+
+static struct sysdev_class suspend_sysdev_class = {
+   .name = power,
+};
+
+static struct platform_suspend_ops pseries_suspend_ops = {
+   .valid  = suspend_valid_only_mem,
+   .begin  = pseries_suspend_begin,
+   .prepare_late   = pseries_prepare_late,
+   .enter  = pseries_suspend_enter,
+};
+
+/**
+ * pseries_suspend_sysfs_register - Register with sysfs
+ *
+ * Return value:
+ * 0 on success / other on failure
+ **/
+static int pseries_suspend_sysfs_register(struct sys_device *sysdev)
+{
+   int rc;
+
+   if ((rc = sysdev_class_register(suspend_sysdev_class)))
+   return rc;
+
+   sysdev-id = 0;
+   sysdev-cls = suspend_sysdev_class;
+
+   if ((rc = sysdev_register(sysdev)))
+   goto class_unregister;
+   if ((rc = sysdev_create_file(sysdev, attr_hibernate)))
+   goto fail;
+


Could you just do a sysdev_class_create_file(suspend_sysdev_class, 
attr_hibernate)
call to create the hibernate file instead of the sysdev_register() and
sysdev_create_file()?  I think this may make it a bit nicer since the file 
created
will be /sys/devices/system/power/hibernate instead of 
/sys/devices/system/power/power0/hibernate.


-Nathan


+   return 0;
+
+fail:
+   sysdev_unregister(sysdev);
+class_unregister:
+   sysdev_class_unregister(suspend_sysdev_class);
+   return rc;
+}
+

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


Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Mark Brown
On Thu, Mar 11, 2010 at 11:06:50AM -0700, Grant Likely wrote:
 .node is being removed
 
 Signed-off-by: Grant Likely grant.lik...@secretlab.ca

Acked-by: Mark Brown broo...@opensource.wolfsonmicro.com

but please ensure that Liam and especially Timur also check this (both
CCed).

For enormous patch serieses like this it's really nice if you can ensure
that each person is only CCed on the patches that they need to review.
Much less stuff in the inbox.

 ---
 
  sound/soc/fsl/mpc8610_hpcd.c |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
 index ef67d1c..d7e1b9a 100644
 --- a/sound/soc/fsl/mpc8610_hpcd.c
 +++ b/sound/soc/fsl/mpc8610_hpcd.c
 @@ -202,7 +202,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
  static int mpc8610_hpcd_probe(struct of_device *ofdev,
   const struct of_device_id *match)
  {
 - struct device_node *np = ofdev-node;
 + struct device_node *np = ofdev-dev.of_node;
   struct device_node *codec_np = NULL;
   struct device_node *guts_np = NULL;
   struct device_node *dma_np = NULL;
 
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 25/37] drivers/infiniband: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Roland Dreier
Seems fine... adding EHCA guys just to make sure.

  .node is being removed
  
  Signed-off-by: Grant Likely grant.lik...@secretlab.ca
  ---
  
   drivers/infiniband/hw/ehca/ehca_main.c |   11 ++-
   1 files changed, 6 insertions(+), 5 deletions(-)
  
  diff --git a/drivers/infiniband/hw/ehca/ehca_main.c 
  b/drivers/infiniband/hw/ehca/ehca_main.c
  index 129a6be..2639185 100644
  --- a/drivers/infiniband/hw/ehca/ehca_main.c
  +++ b/drivers/infiniband/hw/ehca/ehca_main.c
  @@ -291,8 +291,9 @@ static int ehca_sense_attributes(struct ehca_shca *shca)
   };
   
   ehca_gen_dbg(Probing adapter %s...,
  - shca-ofdev-node-full_name);
  -loc_code = of_get_property(shca-ofdev-node, ibm,loc-code, NULL);
  + shca-ofdev-dev.of_node-full_name);
  +loc_code = of_get_property(shca-ofdev-dev.of_node, ibm,loc-code,
  +   NULL);
   if (loc_code)
   ehca_gen_dbg( ... location lode=%s, loc_code);
   
  @@ -720,16 +721,16 @@ static int __devinit ehca_probe(struct of_device *dev,
   int ret, i, eq_size;
   unsigned long flags;
   
  -handle = of_get_property(dev-node, ibm,hca-handle, NULL);
  +handle = of_get_property(dev-dev.of_node, ibm,hca-handle, NULL);
   if (!handle) {
   ehca_gen_err(Cannot get eHCA handle for adapter: %s.,
  - dev-node-full_name);
  + dev-dev.of_node-full_name);
   return -ENODEV;
   }
   
   if (!(*handle)) {
   ehca_gen_err(Wrong eHCA handle for adapter: %s.,
  - dev-node-full_name);
  + dev-dev.of_node-full_name);
   return -ENODEV;
   }
   
  
  -- 
Roland Dreier  rola...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Problem with PCI bus rescan on 460EX

2010-03-11 Thread Benjamin Herrenschmidt
On Thu, 2010-03-11 at 09:45 +0200, Felix Radensky wrote:
 Hi Alex,
 
 Thanks a lot for replying.
 
 Alex Chiang wrote: 
  * Felix Radensky fe...@embedded-sol.com:

   The problem arises when device is plugged in after boot. After doing
   echo 1  /sys/bus/pci/rescan
   the device is identified, but bridge memory window is not allocated,
   and reads from device memory regions return 0x. Below is
   relevant output:
   
  
  Do you need firmware support on your platform for hotplug?

 I don't think so, but I've added powerpc guys to CC to make sure.
  Can you please send full dmesg during successful boot, full dmesg
  log during unsuccessful rescan, and contents of /proc/iomem and
  /proc/ioports during success and failure cases?
  
  Be sure you have PCI_CONFIG_DEBUG turned on.

 Attached. I really appreciate your help. Thanks a lot.

Yes, we need to do a resource allocation pass, setup DMA, etc... and
that is not done in that manual rescan case I suppose. I have to look.

Part of the problem is that there is no proper hooks in the generic
PCI code that I know of for that, but I'll have to double check the
code, things might have changed.

For boot time, we do this after we scan busses and before we add the
devices to sysfs. For hotplug, our hotplug drivers do something similar.
But that rescan sysfs hook seems to go directly into drivers/pci
causing a rescan but without a change to re-allocate resources etc...

You may be better off implementing a minimum hotplug driver I suppose...

Cheers,
Ben.

 Felix .
 plain text document attachment (failure.txt)
 Linux version 2.6.33 (fe...@felix-laptop.lan) (gcc version 4.2.2) #5 Thu Mar 
 11 09:35:52 IST 2010
 Found legacy serial port 0 for /plb/opb/ser...@ef600300
   mem=4ef600300, taddr=4ef600300, irq=0, clk=7407407, speed=0
 Found legacy serial port 1 for /plb/opb/ser...@ef600400
   mem=4ef600400, taddr=4ef600400, irq=0, clk=7407407, speed=0
 Found legacy serial port 2 for /plb/opb/ser...@ef600500
   mem=4ef600500, taddr=4ef600500, irq=0, clk=7407407, speed=0
 Found legacy serial port 3 for /plb/opb/ser...@ef600600
   mem=4ef600600, taddr=4ef600600, irq=0, clk=7407407, speed=0
 Top of RAM: 0x3000, Total RAM: 0x3000
 Memory hole size: 0MB
 Zone PFN ranges:
   DMA  0x - 0x0003
   Normal   0x0003 - 0x0003
 Movable zone start PFN for each node
 early_node_map[1] active PFN ranges
 0: 0x - 0x0003
 On node 0 totalpages: 196608
 free_area_init_node: node 0, pgdat c035e76c, node_mem_map c0388000
   DMA zone: 1536 pages used for memmap
   DMA zone: 0 pages reserved
   DMA zone: 195072 pages, LIFO batch:31
 MMU: Allocated 1088 bytes of context maps for 255 contexts
 Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 195072
 Kernel command line: root=/dev/nfs rw nfsroot=10.0.0.10:/opt/eldk/ppc_4xxFP 
 ip=10.0.0.30:10.0.0.10:10.0.0.138:255.0.0.0:smbe460:eth0:off panic=1 
 console=ttyS0,115200
 PID hash table entries: 4096 (order: 2, 16384 bytes)
 Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
 Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
 Memory: 775552k/786432k available (3364k kernel code, 10604k reserved, 116k 
 data, 128k bss, 144k init)
 Kernel virtual memory layout:
   * 0xfffdf000..0xf000  : fixmap
   * 0xfde0..0xfe00  : consistent mem
   * 0xfde0..0xfde0  : early ioremap
   * 0xf100..0xfde0  : vmalloc  ioremap
 SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
 Hierarchical RCU implementation.
 NR_IRQS:512 nr_irqs:512
 UIC0 (32 IRQ sources) at DCR 0xc0
 UIC1 (32 IRQ sources) at DCR 0xd0
   alloc irq_desc for 30 on node 0
   alloc kstat_irqs on node 0
 irq: irq 30 on host /interrupt-controller0 mapped to virtual irq 30
 UIC2 (32 IRQ sources) at DCR 0xe0
   alloc irq_desc for 16 on node 0
   alloc kstat_irqs on node 0
 irq: irq 10 on host /interrupt-controller0 mapped to virtual irq 16
 UIC3 (32 IRQ sources) at DCR 0xf0
   alloc irq_desc for 17 on node 0
   alloc kstat_irqs on node 0
 irq: irq 16 on host /interrupt-controller0 mapped to virtual irq 17
 time_init: decrementer frequency = 1000.12 MHz
 time_init: processor frequency   = 1000.12 MHz
 clocksource: timebase mult[40] shift[22] registered
 clockevent: decrementer mult[8019] shift[31] cpu[0]
 Mount-cache hash table entries: 512
 NET: Registered protocol family 16
   alloc irq_desc for 18 on node 0
   alloc kstat_irqs on node 0
 irq: irq 11 on host /interrupt-controller1 mapped to virtual irq 18
 256k L2-cache enabled
 PCI host bridge /plb/p...@c0ec0 (primary) ranges:
  MEM 0x000d8000..0x000d - 0x8000 
  MEM 0x000c0ee0..0x000c0eef - 0x 
   IO 0x000c0800..0x000c0800 - 0x
  Removing ISA hole at 0x000c0ee0
 4xx PCI DMA offset set to 0x
 /plb/p...@c0ec0: Legacy ISA memory support enabled
 PCI: Probing PCI 

[git pull] driver bug fixes and mpc5200 defconfig updates

2010-03-11 Thread Grant Likely
Hi Linus,

Here are some driver bug fixes, and the requisite powerpc-mpc5200
defconfig updates.  The defconfig updates would normally go through
Ben's tree, but since that is the only change I have that would go
through his tree I'm hoping that it is okay to have it here.

Cheers,
g.

The following changes since commit 57d54889cd00db2752994b389ba714138652e60c:
  Linus Torvalds (1):
Linux 2.6.34-rc1

are available in the git repository at:

  git://git.secretlab.ca/git/linux-2.6 merge

David Miller (1):
  uartlite: Fix build on sparc.

Grant Likely (1):
  powerpc/52xx: update defconfigs

Scott Ellis (2):
  spi/omap2_mcspi: fix NULL pointer dereference
  spi/omap2_mcspi: Use transaction speed if provided

 arch/powerpc/configs/52xx/cm5200_defconfig|   24 ++--
 arch/powerpc/configs/52xx/lite5200b_defconfig |   28 +++--
 arch/powerpc/configs/52xx/motionpro_defconfig |   25 +++--
 arch/powerpc/configs/52xx/pcm030_defconfig|   27 +++---
 arch/powerpc/configs/52xx/tqm5200_defconfig   |   28 +++---
 arch/powerpc/configs/mpc5200_defconfig|  134 -
 drivers/serial/uartlite.c |   10 +-
 drivers/spi/omap2_mcspi.c |   18 ++-
 8 files changed, 177 insertions(+), 117 deletions(-)


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


Re: [PATCH 33/37] sound/soc: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Grant Likely
On Thu, Mar 11, 2010 at 12:34 PM, Mark Brown
broo...@opensource.wolfsonmicro.com wrote:
 On Thu, Mar 11, 2010 at 11:06:50AM -0700, Grant Likely wrote:
 .node is being removed

 Signed-off-by: Grant Likely grant.lik...@secretlab.ca

 Acked-by: Mark Brown broo...@opensource.wolfsonmicro.com

 but please ensure that Liam and especially Timur also check this (both
 CCed).

 For enormous patch serieses like this it's really nice if you can ensure
 that each person is only CCed on the patches that they need to review.
 Much less stuff in the inbox.

Yeah, sorry about that (and to everyone receiving this thread, I'm
really sorry.  I won't do it again).  I've already been yelled at for
that.  What happened is that on a previous series I was yelled at for
not sending all patches to everyone (so that the patches could be
reviewed in context).  So, naturally, I made sure to include everyone
on the whole series this time  doh.

Next time I post I'll constrain it to small chunks.

Thanks for the review.

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


Re: Problem with PCI bus rescan on 460EX

2010-03-11 Thread Felix Radensky

Hi Ben,

Benjamin Herrenschmidt wrote:

Yes, we need to do a resource allocation pass, setup DMA, etc... and
that is not done in that manual rescan case I suppose. I have to look.

Part of the problem is that there is no proper hooks in the generic
PCI code that I know of for that, but I'll have to double check the
code, things might have changed.

For boot time, we do this after we scan busses and before we add the
devices to sysfs. For hotplug, our hotplug drivers do something similar.
But that rescan sysfs hook seems to go directly into drivers/pci
causing a rescan but without a change to re-allocate resources etc...

You may be better off implementing a minimum hotplug driver I suppose...

Cheers,
Ben.

  

I'm fine with creating a minimal hotplug driver. The device I'm dealing with
partially implements Compact PCI hotplug. It generates ENUM# interrupt, but
Hotswap Control register layout does not completely follow the standard.

Should I use drivers/pci/hotplug/cpci_hotplug_core.c as a base, or do 
you have

something more simple in mind ?

Thanks a lot.

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


Re: madness, was Re: [PATCH 2/2] Macintosh: fix coding style issues in adb.c This is a patch to the adb.c file that cleans up many warnings found by the checkpatch.pl tool

2010-03-11 Thread Benjamin Herrenschmidt
On Wed, 2010-03-10 at 14:48 +1100, fth...@telegraphics.com.au wrote:
 On Tue, 9 Mar 2010, Michael Beardsworth wrote:
 
  -   /* If a probe is in progress or we are sleeping, wait for it to 
  complete */
  +   /* If a probe is in progress or we are sleeping, wait until complete */
 
 If you must fix what aint broke, please try not to damage it. I'm sorry 
 if your VT52 is limited to 80 cols, but IMNSHO this sort of effort is 
 misguided.
 
 Maybe I could point out again (I do this periodically) that checkpatch.pl 
 is great but code that fails it is NOT always wrong.
 
 Check patch is a good idea but check existing code is a waste of 
 everyone's time.

Amen !

Cheers,
Ben.


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


Re: Problem with PCI bus rescan on 460EX

2010-03-11 Thread Benjamin Herrenschmidt
On Thu, 2010-03-11 at 23:41 +0200, Felix Radensky wrote:
 I'm fine with creating a minimal hotplug driver. The device I'm
 dealing with
 partially implements Compact PCI hotplug. It generates ENUM#
 interrupt, but
 Hotswap Control register layout does not completely follow the
 standard.
 
 Should I use drivers/pci/hotplug/cpci_hotplug_core.c as a base, or do 
 you have
 something more simple in mind ?

I don't have anything special in mind, but you may need to look at how
the pseries hotplug driver does to get those fixups and resource
management things done. That driver is mostly a horrible mess, though I
did clean quite a bit of it up recently...

The main thing of interest to you is pcibios_add_pci_devices() which
is called to probe below an existing bridge. It's currently in
arch/powerpc/platforms/pseries/pci_dlpar.c but we could move it or some
of it to our common code if needed. You also may safely ignore the eeh_*
bits on ppc32

Cheers,
Ben.


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


Re: [PATCH 21/37] drivers/ata: use .dev.of_node instead of .node in struct of_device

2010-03-11 Thread Sergei Shtylyov

Hello.

Grant Likely wrote:


.node is being removed

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 drivers/ata/pata_macio.c   |2 +-
 drivers/ata/pata_of_platform.c |2 +-
 drivers/ide/pmac.c |   10 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
  


  Should probably have been 2 patches instead of one, as drivers/ata/ 
and drivers/ide/ are different subsystems...


MBR, Sergei

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


RE: Linus' kernel tree over ads5121-rev4

2010-03-11 Thread Chen Hongjun-R66092
Pls make sure that you have the following enrionment variable in uboot bootargs.
 
diufb=15M
 
B.R,
Hongjun




From: linuxppc-dev-bounces+hong-jun.chen=freescale@lists.ozlabs.org 
[mailto:linuxppc-dev-bounces+hong-jun.chen=freescale@lists.ozlabs.org] On 
Behalf Of CTAG / Moisés Domínguez
Sent: Thursday, March 11, 2010 8:54 PM
To: linuxppc-dev@lists.ozlabs.org
Subject: Linus' kernel tree over ads5121-rev4



Hi,

 

I am started with freescale LTIB but I decided to make a clone of 
Linus' kernel tree mainly to have the latest and fixed mscan driver.

 

Linux is uncompressed and starts right, but when DIU driver probe 
function is called (exactly when first framebuffer device is registered) linux 
restarts. This behaviour repeats indefinitely.

(same behaviour with denx kernel tree).

 

I am using .dts that comes in the Linus'kernel tree. Maybe this .dts 
board revision dependent? 

 

I updated u-boot to with the denx one but similar results.

 

 

Maybe basic questions. Sorry for that.

 

Regards, Moises.

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

[PATCH] mpc52xx_lpbfifo: flag DMA irqs as enabled after requesting them

2010-03-11 Thread Roman Fietze
Hello,

This patch avoids unbalanced enable/disable messages for the DMA
interrupts when running the 5200 platform SCLPC/BestComm driver in DMA
mode.


Signed-off-by: Roman Fietze roman.fie...@telemotive.de
---
 arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c 
b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
index 929d017..d4f8be3 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -481,6 +481,8 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct 
of_device_id *match)
if (rc)
goto err_bcom_rx_irq;
 
+   lpbfifo.dma_irqs_enabled = 1;
+
/* Request the Bestcomm transmit (memory -- fifo) task and IRQ */
lpbfifo.bcom_tx_task =
bcom_gen_bd_tx_init(2, res.start + LPBFIFO_REG_FIFO_DATA,
-- 
1.7.0.1


Roman

-- 
Roman FietzeTelemotive AG Büro Mühlhausen
Breitwiesen  73347 Mühlhausen
Tel.: +49(0)7335/18493-45http://www.telemotive.de
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [Patch 1/1] PPC64-HWBKPT: Implement hw-breakpoints for PPC64

2010-03-11 Thread Benjamin Herrenschmidt

 Index: linux-2.6.ppc64_test/arch/powerpc/include/asm/hw_breakpoint.h
 ===
 --- /dev/null
 +++ linux-2.6.ppc64_test/arch/powerpc/include/asm/hw_breakpoint.h
 @@ -0,0 +1,54 @@
 +#ifndef  _PPC64_HW_BREAKPOINT_H
 +#define  _PPC64_HW_BREAKPOINT_H
 +
 +#ifdef   __KERNEL__
 +#define  __ARCH_HW_BREAKPOINT_H
 +#ifdef CONFIG_PPC64
 +
 +struct arch_hw_breakpoint {
 + u8  len; /* length of the target symbol */

I don't understand the usage of the word symbol above, can you
explain ?

 + int type;
 + unsigned long   address;
 +};
 +
 +#include linux/kdebug.h
 +#include asm/reg.h
 +#include asm/system.h
 +
 +/* Total number of available HW breakpoint registers */
 +#define HBP_NUM 1
 +
 +struct perf_event;
 +struct pmu;
 +struct perf_sample_data;
 +
 +#define HW_BREAKPOINT_ALIGN 0x7
 +/* Maximum permissible length of any HW Breakpoint */
 +#define HW_BREAKPOINT_LEN 0x8

That's a lot of server-only hard wired assumptions... I suppose the
DABR emulation of BookE will catch but do you intend to provide
proper BookE support at some stage ?

 +static inline void hw_breakpoint_disable(void)
 +{
 + set_dabr(0);
 +}

How much of these set_dabr() I see here are going to interact with
ptrace ? Is there some exclusion going on between ptrace and perf
event use of the DABR or none at all ? Or are you replacing the ptrace
bits ?

 +/*
 + * Install a perf counter breakpoint.
 + *
 + * We seek a free debug address register and use it for this
 + * breakpoint.
 + *
 + * Atomic: we hold the counter-ctx-lock and we only handle variables
 + * and registers local to this cpu.
 + */
 +int arch_install_hw_breakpoint(struct perf_event *bp)
 +{
 + struct arch_hw_breakpoint *info = counter_arch_bp(bp);
 + struct perf_event **slot = __get_cpu_var(bp_per_reg);
 +
 + if (!*slot)
 + *slot = bp;
 + else {
 + WARN_ONCE(1, Can't find any breakpoint slot);
 + return -EBUSY;
 + }
 +
 + set_dabr(info-address | info-type | DABR_TRANSLATION);
 + return 0;
 +}

Under which circumstances will the upper layer call that more than
once ? If it's a legit thing to do, then the WARN_ONCE() is a heavy
hammer here. I wouldn't even printk or only pr_debug() if it's
really worth it.

Or is that something that should just not happen ?

I would also use this coding style which is more compact and avoids
the horrible (!*slot) :

/* Check if the slot is busy */
if (*slot)
return -EBUSY;
set_dabr(...);

 +/*
 + * Uninstall the breakpoint contained in the given counter.
 + *
 + * First we search the debug address register it uses and then we disable
 + * it.
 + *
 + * Atomic: we hold the counter-ctx-lock and we only handle variables
 + * and registers local to this cpu.
 + */
 +void arch_uninstall_hw_breakpoint(struct perf_event *bp)
 +{
 + struct perf_event **slot = __get_cpu_var(bp_per_reg);
 +
 + if (*slot == bp)
 + *slot = NULL;
 + else {
 + WARN_ONCE(1, Can't find the breakpoint slot);
 + return;
 + }
 + set_dabr(0);
 +}

Similar coding style issues... That one might be worth the warning
as I suppose the core should -really- not try to uninstall a bp that
hasn't been installed in the first place.

 +/*
 + * Validate the arch-specific HW Breakpoint register settings
 + */
 +int arch_validate_hwbkpt_settings(struct perf_event *bp,
 + struct task_struct *tsk)
 +{
 + int is_kernel, ret = -EINVAL;
 + struct arch_hw_breakpoint *info = counter_arch_bp(bp);
 +
 + if (!bp)
 + return ret;
 +
 + switch (bp-attr.bp_type) {
 + case HW_BREAKPOINT_R:
 + info-type = DABR_DATA_READ;
 + break;
 + case HW_BREAKPOINT_W:
 + info-type = DABR_DATA_WRITE;
 + break;
 + case HW_BREAKPOINT_R | HW_BREAKPOINT_W:
 + info-type = (DABR_DATA_READ | DABR_DATA_WRITE);
 + break;
 + default:
 + return ret;
 + }

I'm not -too- fan of the above, I suppose I would have written it a bit
differently using if's but that's not a big deal... however:

 + /* TODO: Check for a valid triggered function */
 + /* if (!bp-triggered)
 + return -EINVAL; */

What is that ? Is the patch incomplete ? Don't leave commented out code
in there. If you think there's a worthwhile improvement, then add a
comment with maybe a bit more explanations, and make it clear that the
patch is still useful without the code, but don't just leave commented
out code like that without a good reason. A good reason would be some
optional debug stuff for example, but then an ifdef is preferrable to
comments.

 + is_kernel = is_kernel_addr(bp-attr.bp_addr);
 + if ((tsk  is_kernel) || (!tsk  !is_kernel))
 + return -EINVAL;
 +
 + info-address = 

[PATCH v2 (resend #3)] hvc_console: Fix race between hvc_close and hvc_remove

2010-03-11 Thread Amit Shah
Alan pointed out a race in the code where hvc_remove is invoked. The
recent virtio_console work is the first user of hvc_remove().

Alan describes it thus:

The hvc_console assumes that a close and remove call can't occur at the
same time.

In addition tty_hangup(tty) is problematic as tty_hangup is asynchronous
itself

So this can happen

hvc_close   hvc_remove
hung up ? - no
lock
tty = hp-tty
unlock
lock
hp-tty = NULL
unlock
notify del
kref_put the hvc struct
close completes
tty is destroyed
tty_hangup dead tty
tty-ops will be NULL
NULL-...

This patch adds some tty krefs and also converts to using tty_vhangup().

Reported-by: Alan Cox a...@lxorguk.ukuu.org.uk
Signed-off-by: Amit Shah amit.s...@redhat.com
CC: Alan Cox a...@lxorguk.ukuu.org.uk
CC: linuxppc-...@ozlabs.org
CC: Rusty Russell ru...@rustcorp.com.au
---

Linus, sending to you this time as I didn't receive any response from
Ben or Greg for the previous submissions.

 drivers/char/hvc_console.c |   31 +--
 1 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 4c3b59b..7e94b3c 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -312,6 +312,7 @@ static int hvc_open(struct tty_struct *tty, struct file * 
filp)
spin_lock_irqsave(hp-lock, flags);
/* Check and then increment for fast path open. */
if (hp-count++  0) {
+   tty_kref_get(tty);
spin_unlock_irqrestore(hp-lock, flags);
hvc_kick();
return 0;
@@ -319,7 +320,7 @@ static int hvc_open(struct tty_struct *tty, struct file * 
filp)
 
tty-driver_data = hp;
 
-   hp-tty = tty;
+   hp-tty = tty_kref_get(tty);
 
spin_unlock_irqrestore(hp-lock, flags);
 
@@ -336,6 +337,7 @@ static int hvc_open(struct tty_struct *tty, struct file * 
filp)
spin_lock_irqsave(hp-lock, flags);
hp-tty = NULL;
spin_unlock_irqrestore(hp-lock, flags);
+   tty_kref_put(tty);
tty-driver_data = NULL;
kref_put(hp-kref, destroy_hvc_struct);
printk(KERN_ERR hvc_open: request_irq failed with rc %d.\n, 
rc);
@@ -363,13 +365,18 @@ static void hvc_close(struct tty_struct *tty, struct file 
* filp)
return;
 
hp = tty-driver_data;
+
spin_lock_irqsave(hp-lock, flags);
+   tty_kref_get(tty);
 
if (--hp-count == 0) {
/* We are done with the tty pointer now. */
hp-tty = NULL;
spin_unlock_irqrestore(hp-lock, flags);
 
+   /* Put the ref obtained in hvc_open() */
+   tty_kref_put(tty);
+
if (hp-ops-notifier_del)
hp-ops-notifier_del(hp, hp-data);
 
@@ -389,6 +396,7 @@ static void hvc_close(struct tty_struct *tty, struct file * 
filp)
spin_unlock_irqrestore(hp-lock, flags);
}
 
+   tty_kref_put(tty);
kref_put(hp-kref, destroy_hvc_struct);
 }
 
@@ -424,10 +432,11 @@ static void hvc_hangup(struct tty_struct *tty)
spin_unlock_irqrestore(hp-lock, flags);
 
if (hp-ops-notifier_hangup)
-   hp-ops-notifier_hangup(hp, hp-data);
+   hp-ops-notifier_hangup(hp, hp-data);
 
while(temp_open_count) {
--temp_open_count;
+   tty_kref_put(tty);
kref_put(hp-kref, destroy_hvc_struct);
}
 }
@@ -592,7 +601,7 @@ int hvc_poll(struct hvc_struct *hp)
}
 
/* No tty attached, just skip */
-   tty = hp-tty;
+   tty = tty_kref_get(hp-tty);
if (tty == NULL)
goto bail;
 
@@ -672,6 +681,8 @@ int hvc_poll(struct hvc_struct *hp)
 
tty_flip_buffer_push(tty);
}
+   if (tty)
+   tty_kref_put(tty);
 
return poll_mask;
 }
@@ -807,7 +818,7 @@ int hvc_remove(struct hvc_struct *hp)
struct tty_struct *tty;
 
spin_lock_irqsave(hp-lock, flags);
-   tty = hp-tty;
+   tty = tty_kref_get(hp-tty);
 
if (hp-index  MAX_NR_HVC_CONSOLES)
vtermnos[hp-index] = -1;
@@ -819,18 +830,18 @@ int hvc_remove(struct hvc_struct *hp)
/*
 * We 'put' the instance that was grabbed when the kref instance
 * was initialized using kref_init().  Let the last holder of this
-* kref cause it to be removed, which will probably be the tty_hangup
+* kref cause it to be removed, which will probably be the tty_vhangup
 * 

Re: Freescale MPC5554 device tree (was: cross-compiling Linux for PowerPC e200 core?)

2010-03-11 Thread Németh Márton
Hi,

thank you for the comments, I reworked the Freescale MPC5554 device tree
accordingly. I'm listening for comments on this draft.

Regards,

Márton Németh

---
From: Márton Németh nm...@freemail.hu

Add device tree for Freescale MPC5554.

Signed-off-by: Márton Németh nm...@freemail.hu
---
diff -uprN linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts 
linux/arch/powerpc/boot/dts/mpc5554.dts
--- linux-2.6.33.orig/arch/powerpc/boot/dts/mpc5554.dts 1970-01-01 
01:00:00.0 +0100
+++ linux/arch/powerpc/boot/dts/mpc5554.dts 2010-03-12 07:22:37.0 
+0100
@@ -0,0 +1,189 @@
+/*
+ * Freescale MPC5554 Device Tree Source
+ *
+ * Based on MPC5553/5554 Microcontroller Reference Manual, Rev. 4.0, 04/2007
+ * http://www.freescale.com/files/32bit/doc/ref_manual/MPC5553_MPC5554_RM.pdf
+ *
+ * Copyright 2010 Márton Németh
+ * Márton Németh nm...@freemail.hu
+ *
+ * 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 = MPC5554;
+   compatible = fsl,MPC5554EVB;  // Freescale MPC5554 Evaluation 
Board
+   #address-cells = 1;
+   #size-cells = 1;
+
+   cpus {
+   #address-cells = 1;
+   #size-cells = 0;
+
+   c...@0 {
+   device_type = cpu;
+   compatible = PowerPC,5554;
+   reg = 0;
+   d-cache-line-size = 32;
+   i-cache-line-size = 32;
+   d-cache-size = 0x8000;// L1, 32KiB
+   i-cache-size = 0x8000;// L1, 32KiB
+   timebase-frequency = 0;   // from bootloader
+   bus-frequency = 0;// from bootloader
+   clock-frequency = 0;  // from bootloader
+   };
+   };
+
+   mem...@4000 {
+   device_type = memory;
+   reg = 0x4000 0x1; // 32KiB internal SRAM
+   };
+
+   x...@fff04000 { // System Bus Crossbar Switch (XBAR)
+   compatible = fsl,mpc5554-xbar;
+   #address-cells = 1;
+   #size-cells = 1;
+   // The full memory range is covered by XBAR
+   ranges = ;
+   reg = 0xfff04000 0x4000;
+
+   fl...@0 {   // read-only FLASH
+   compatible = fsl,mpc5554-flash;
+   reg = 0x 0x20;// 2MiB internal FLASH
+   };
+
+   bri...@c3f0 {
+   compatible = fsl,mpc5554-pbridge-a;
+   #address-cells = 1;
+   #size-cells = 1;
+   ranges = 0 0xc000 0x2000;
+   reg = 0xc3f0 0x4000;
+
+   fm...@3f8 { // Frequency Modulated PLL
+   compatible = fsl,mpc5554-fmpll;
+   reg = 0x03f8 0x4000;
+   };
+
+   flashcon...@3f88000 {   // Flash Configuration
+   compatible = fsl,mpc5554-flashconfig;
+   reg = 0x03f88000 0x4000;
+   };
+
+   s...@3f89000 {  // System Integration Unit
+   compatible = fsl,mpc5554-siu;
+   reg = 0x03f9 0x4000;
+   };
+
+   em...@3fa { // Modular Timer System
+   compatible = fsl,mpc5554-emios;
+   reg = 0x03fa 0x4000;
+   };
+
+   e...@3fc {  // Enhanced Time Processing Unit
+   compatible = fsl,mpc5554-etpu;
+   reg = 0x03fc 0x4000;
+   };
+
+   etpud...@3fc8000 {  // eTPU Shared Data Memory 
(Parameter RAM)
+   compatible = fsl,mpc5554-etpudata;
+   reg = 0x03fc8000 0x4000;
+   };
+
+   etpud...@3fcc000 {  // eTPU Shared Data Memory 
(Parameter RAM) mirror
+   compatible = fsl,mpc5554-etpudata;
+   reg = 0x03fcc000 0x4000;
+   };
+
+   etpuc...@3fd {  // eTPU Shared Code RAM
+   compatible = fsl,mpc5554-etpucode;
+   reg = 0x03fd 0x4000;
+   };
+   };
+
+   bri...@fff0 {
+   compatible = fsl,mpc5554-pbridge-b;
+   

[PATCH] powerpc: do not call printk when CONFIG_PRINTK is not defined

2010-03-11 Thread Németh Márton
From: Márton Németh nm...@freemail.hu

When printk() is disabled (CONFIG_PRINTK) at menu item
 General setup
 - Configure standard kernel features (for small systems)
- Enable support for printk
then there should be no printk() calls at all.

Signed-off-by: Márton Németh nm...@freemail.hu
---

Just a typo was fixed in the title.

---
diff -upr linux-2.6.33.orig/arch/powerpc/kernel/head_fsl_booke.S 
linux/arch/powerpc/kernel/head_fsl_booke.S
--- linux-2.6.33.orig/arch/powerpc/kernel/head_fsl_booke.S  2010-02-24 
19:52:17.0 +0100
+++ linux/arch/powerpc/kernel/head_fsl_booke.S  2010-03-07 09:28:05.0 
+0100
@@ -887,13 +887,17 @@ KernelSPE:
lwz r3,_MSR(r1)
orisr3,r3,msr_...@h
stw r3,_MSR(r1) /* enable use of SPE after return */
+#ifdef CONFIG_PRINTK
lis r3,8...@h
ori r3,r3,8...@l
mr  r4,r2   /* current */
lwz r5,_NIP(r1)
bl  printk
+#endif
b   ret_from_except
+#ifdef CONFIG_PRINTK
 87:.string SPE used in kernel  (task=%p, pc=%x)  \n
+#endif
.align  4,0

 #endif /* CONFIG_SPE */

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

  1   2   >