Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12

2013-08-13 Thread Sudeep KarkadaNagesha
Adding PowerPC list On 13/08/13 14:00, Rafael J. Wysocki wrote: > On Monday, August 12, 2013 02:27:47 PM Sudeep KarkadaNagesha wrote: >> The following changes since commit >> d4e4ab86bcba5a72779c43dc1459f71fea3d89c8: >> >> Linux 3.11-rc5 (2013-08-11 18:04:20 -0700)

Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12

2013-08-13 Thread Sudeep KarkadaNagesha
On 13/08/13 16:40, Sudeep KarkadaNagesha wrote: > Adding PowerPC list > > On 13/08/13 14:00, Rafael J. Wysocki wrote: >> On Monday, August 12, 2013 02:27:47 PM Sudeep KarkadaNagesha wrote: >>> The following changes since commit >>> d4e4ab86bcba5a72779c43dc1459f71

Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12

2013-08-14 Thread Sudeep KarkadaNagesha
On 13/08/13 19:37, Michal Simek wrote: > On 08/13/2013 05:40 PM, Sudeep KarkadaNagesha wrote: >> Adding PowerPC list >> >> On 13/08/13 14:00, Rafael J. Wysocki wrote: >>> On Monday, August 12, 2013 02:27:47 PM Sudeep KarkadaNagesha wrote: >>&

Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12

2013-08-14 Thread Sudeep KarkadaNagesha
On 13/08/13 20:45, Rafael J. Wysocki wrote: > On Tuesday, August 13, 2013 01:44:23 PM Rob Herring wrote: >> On Tue, Aug 13, 2013 at 10:40 AM, Sudeep KarkadaNagesha >> wrote: >>> Adding PowerPC list >>> >>> On 13/08/13 14:00, Rafael J. Wysocki wrote: &

Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12

2013-08-14 Thread Sudeep KarkadaNagesha
On 13/08/13 22:07, Benjamin Herrenschmidt wrote: > On Tue, 2013-08-13 at 19:29 +0100, Sudeep KarkadaNagesha wrote: >> I don't understand completely the use of ibm,ppc-interrupt-server#s and >> its implications on generic of_get_cpu_node implementation. >> I see the

Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12

2013-08-14 Thread Sudeep KarkadaNagesha
On 14/08/13 12:37, Benjamin Herrenschmidt wrote: > On Wed, 2013-08-14 at 11:01 +0100, Sudeep KarkadaNagesha wrote: >> Yes this doesn't cover the historical "ibm,ppc-interrupt-server#s", >> for >> which we can have PPC specific wrapper above the generic one i.e

Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12

2013-08-14 Thread Sudeep KarkadaNagesha
On 14/08/13 13:53, Rob Herring wrote: > On 08/14/2013 05:01 AM, Sudeep KarkadaNagesha wrote: >> On 13/08/13 22:07, Benjamin Herrenschmidt wrote: >>> On Tue, 2013-08-13 at 19:29 +0100, Sudeep KarkadaNagesha wrote: >>>> I don't understand completely the use of ibm,

[RFC PATCH 0/4] DT: move of_get_cpu_node from PPC to DT core

2013-08-15 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Hi, This series needs to be prepended with the original series[1][2][3] Except the first patch in the original series(which is merged into this as last patch), there is no other change(apart from function signature) I am posting only this part for feedback separately

[RFC PATCH 2/4] openrisc: remove undefined of_get_cpu_node declaration

2013-08-15 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha This patch removes the declaration of the function 'of_get_cpu_node' which is not defined for openrisc. This is in preparation to move it's definition from PPC to DT common code. Again it could be there as it was originally copied from powerpc. Signed

[RFC PATCH 1/4] microblaze: remove undefined of_get_cpu_node declaration

2013-08-15 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha This patch removes the declaration of the function 'of_get_cpu_node' which is not defined for microblaze. This is in preparation to move it's definition from PPC to DT common code. Michal Simek says: "it was just there because Microblaze was b

[RFC PATCH 4/4] of: move of_get_cpu_node implementation to DT core library

2013-08-15 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha This patch moves the generalized implementation of of_get_cpu_node from PowerPC to DT core library, thereby adding support for retrieving cpu node for a given logical cpu index on any architecture. The CPU subsystem can now use this function to assign of_node in the

[RFC PATCH 3/4] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-15 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Currently different drivers requiring to access cpu device node are parsing the device tree themselves. Since the ordering in the DT need not match the logical cpu ordering, the parsing logic needs to consider that. However, this has resulted in lots of code

Re: [RFC PATCH 3/4] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-16 Thread Sudeep KarkadaNagesha
On 16/08/13 05:50, Benjamin Herrenschmidt wrote: > On Thu, 2013-08-15 at 18:09 +0100, Sudeep KarkadaNagesha wrote: >>/* Check for ibm,ppc-interrupt-server#s. If it doesn't exist >> * fallback to "reg"

Re: [RFC PATCH 3/4] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-16 Thread Sudeep KarkadaNagesha
On 16/08/13 05:49, Benjamin Herrenschmidt wrote: > On Thu, 2013-08-15 at 18:09 +0100, Sudeep KarkadaNagesha wrote: >> From: Sudeep KarkadaNagesha >> >> Currently different drivers requiring to access cpu device node are >> parsing the device tree themselves. Since

Re: [RFC PATCH 2/4] openrisc: remove undefined of_get_cpu_node declaration

2013-08-16 Thread Sudeep KarkadaNagesha
On 15/08/13 18:09, Sudeep KarkadaNagesha wrote: > From: Sudeep KarkadaNagesha > > This patch removes the declaration of the function 'of_get_cpu_node' > which is not defined for openrisc. This is in preparation to move > it's definition from PPC to DT common code. &

Re: [RFC PATCH 3/4] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-16 Thread Sudeep KarkadaNagesha
On 16/08/13 13:32, Benjamin Herrenschmidt wrote: > On Fri, 2013-08-16 at 09:48 +0100, Sudeep KarkadaNagesha wrote: > >>> Naming is a bit gross. You might want to make it clearer that >>> we are talking about CPU IDs in the device-tree here. >>> >> Any part

[RFC PATCH v2 0/4] DT: move of_get_cpu_node from PPC to DT core

2013-08-16 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Hi, This series needs to be prepended with the original series[1][2][3] Except the first patch in the original series(which is merged into this as last patch), there is no other change(apart from function signature) I am posting only this part for feedback separately

[RFC PATCH v2 3/4] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-16 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Currently different drivers requiring to access cpu device node are parsing the device tree themselves. Since the ordering in the DT need not match the logical cpu ordering, the parsing logic needs to consider that. However, this has resulted in lots of code

[RFC PATCH v2 4/4] of: move of_get_cpu_node implementation to DT core library

2013-08-16 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha This patch moves the generalized implementation of of_get_cpu_node from PowerPC to DT core library, thereby adding support for retrieving cpu node for a given logical cpu index on any architecture. The CPU subsystem can now use this function to assign of_node in the

Re: [RFC PATCH v2 3/4] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-19 Thread Sudeep KarkadaNagesha
On 16/08/13 23:13, Benjamin Herrenschmidt wrote: > On Fri, 2013-08-16 at 18:39 +0100, Sudeep KarkadaNagesha wrote: >> +static bool __of_find_n_match_cpu_property(struct device_node *cpun, >> + const char *prop_name, int cpu, unsigned int >> *thread) &

Re: [RFC PATCH v2 4/4] of: move of_get_cpu_node implementation to DT core library

2013-08-19 Thread Sudeep KarkadaNagesha
On 16/08/13 23:14, Benjamin Herrenschmidt wrote: > On Fri, 2013-08-16 at 18:39 +0100, Sudeep KarkadaNagesha wrote: >> +#ifdef CONFIG_PPC >> + /* Check for historical "ibm,ppc-interrupt-server#s" property >> +* for thread ids on PowerPC.

Re: [RFC PATCH v2 4/4] of: move of_get_cpu_node implementation to DT core library

2013-08-19 Thread Sudeep KarkadaNagesha
On 19/08/13 14:11, Rob Herring wrote: > On 08/16/2013 12:39 PM, Sudeep KarkadaNagesha wrote: >> From: Sudeep KarkadaNagesha >> >> This patch moves the generalized implementation of of_get_cpu_node from >> PowerPC to DT core library, thereby adding support for retriev

Re: [RFC PATCH v2 3/4] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-19 Thread Sudeep KarkadaNagesha
On 19/08/13 14:02, Rob Herring wrote: > On 08/19/2013 05:19 AM, Mark Rutland wrote: >> On Sat, Aug 17, 2013 at 11:09:36PM +0100, Benjamin Herrenschmidt wrote: >>> On Sat, 2013-08-17 at 12:50 +0200, Tomasz Figa wrote: I wonder how would this handle uniprocessor ARM (pre-v7) cores, for whic

[PATCH v4 02/19] openrisc: remove undefined of_get_cpu_node declaration

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha This patch removes the declaration of the function 'of_get_cpu_node' which is not defined for openrisc. This is in preparation to move it's definition from PPC to DT common code. Again it could be there as it was originally copied from powerpc.

[PATCH v4 00/19] DT/core: update cpu device of_node

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha As more and more information is getting added into the cpu node, the number of drivers needing to parse the device tree for CPU nodes are increasing. Most of the time, the information needed from the cpu node is preferred in the logical CPU order. Hence many drivers

[PATCH v4 01/19] microblaze: remove undefined of_get_cpu_node declaration

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha This patch removes the declaration of the function 'of_get_cpu_node' which is not defined for microblaze. This is in preparation to move it's definition from PPC to DT common code. Michal Simek says: "it was just there because Microblaze was b

[PATCH v4 04/19] of: move of_get_cpu_node implementation to DT core library

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha This patch moves the generalized implementation of of_get_cpu_node from PowerPC to DT core library, thereby adding support for retrieving cpu node for a given logical cpu index on any architecture. The CPU subsystem can now use this function to assign of_node in the

[PATCH v4 03/19] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Currently different drivers requiring to access cpu device node are parsing the device tree themselves. Since the ordering in the DT need not match the logical cpu ordering, the parsing logic needs to consider that. However, this has resulted in lots of code

[PATCH v4 05/19] ARM: DT/kernel: define ARM specific arch_match_cpu_phys_id

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha OF/DT core library now provides architecture specific hook to match the logical cpu index with the corresponding physical identifier. Most of the cpu DT node parsing and initialisation is contained in devtree.c. So it's better to define ARM spe

[PATCH v4 06/19] driver/core: cpu: initialize of_node in cpu's device struture

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha CPUs are also registered as devices but the of_node in these cpu devices are not initialized. Currently different drivers requiring to access cpu device node are parsing the nodes themselves and initialising the of_node in cpu device. The of_node in all the cpu

[PATCH v4 07/19] of/device: add helper to get cpu device node from logical cpu index

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Multiple drivers need to get the cpu device node from the cpu logical index and then access the of_node. This patch adds helper function to fetch the device node directly. Acked-by: Rob Herring Signed-off-by: Sudeep KarkadaNagesha --- include/linux/of_device.h

[PATCH v4 08/19] ARM: topology: remove hwid/MPIDR dependency from cpu_capacity

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Currently the topology code computes cpu capacity and stores it in the list along with hwid(which is MPIDR) as it parses the CPU nodes in the device tree. This is required as it needs to be mapped to the logical CPU later. Since the CPU device nodes can be retrieved

[PATCH v4 09/19] ARM: mvebu: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Currently set_secondary_cpus_clock assume the CPU logical ordering and the MPDIR in DT are same, which is incorrect. Since the CPU device nodes can be retrieved in the logical ordering using the DT helper, we can remove the devices tree parsing. This patch removes

[PATCH v4 10/19] drivers/bus: arm-cci: avoid parsing DT for cpu device nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Since the CPU device nodes can be retrieved using arch_of_get_cpu_node, we can use it to avoid parsing the cpus node searching the cpu nodes and mapping to logical index. This patch removes parsing DT for cpu nodes by using of_get_cpu_node. Cc: Lorenzo Pieralisi

[PATCH v4 11/19] cpufreq: imx6q-cpufreq: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes all DT parsing and uses cpu->of_node instead. Acked-by: Shawn Guo Acked-by: Viresh Kumar Signed-off-by: Sud

[PATCH v4 12/19] cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes all DT parsing and uses cpu->of_node instead. Acked-by: Shawn Guo Acked-by: Rob Herring Acked-by: Viresh Ku

[PATCH v4 15/19] cpufreq: kirkwood-cpufreq: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes all DT parsing and uses cpu->of_node instead. Cc: Jason Cooper Acked-by: Andrew Lunn Acked-by: Viresh Ku

[PATCH v4 13/19] cpufreq: highbank-cpufreq: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes all DT parsing and uses cpu->of_node instead. Cc: Mark Langsdorf Acked-by: Rob Herring Acked-by: Viresh Ku

[PATCH v4 14/19] cpufreq: spear-cpufreq: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes all DT parsing and uses cpu->of_node instead. Cc: Deepak Sikri Acked-by: Viresh Kumar Signed-off-by: Sud

[PATCH v4 17/19] cpufreq: maple-cpufreq: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes all DT parsing and uses cpu->of_node instead. Cc: Dmitry Eremin-Solenikov Acked-by: Viresh Kumar Signed-off

[PATCH v4 18/19] cpufreq: pmac64-cpufreq: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes all DT parsing and uses cpu->of_node instead. Cc: Benjamin Herrenschmidt Acked-by: Viresh Kumar Signed-off

[PATCH v4 19/19] cpufreq: pmac32-cpufreq: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes DT parsing and uses cpu->of_node instead. Cc: Benjamin Herrenschmidt Acked-by: Viresh Kumar Signed-off

[PATCH v4 16/19] cpufreq: arm_big_little: remove device tree parsing for cpu nodes

2013-08-20 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes all DT parsing and uses cpu->of_node instead. Acked-by: Viresh Kumar Signed-off-by: Sudeep KarkadaNage

Re: [PATCH v4 03/19] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-20 Thread Sudeep KarkadaNagesha
On 20/08/13 13:27, Rafael J. Wysocki wrote: > On Tuesday, August 20, 2013 10:30:05 AM Sudeep KarkadaNagesha wrote: >> From: Sudeep KarkadaNagesha >> >> Currently different drivers requiring to access cpu device node are >> parsing the device tree themselves. Since

Re: [PATCH v4 03/19] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-22 Thread Sudeep KarkadaNagesha
On 22/08/13 07:15, Benjamin Herrenschmidt wrote: > On Tue, 2013-08-20 at 10:30 +0100, Sudeep KarkadaNagesha wrote: >> From: Sudeep KarkadaNagesha >> >> Currently different drivers requiring to access cpu device node are >> parsing the device tree themselves. Since

[GIT PULL v2] DT/core: cpu_ofnode updates for v3.12

2013-08-22 Thread Sudeep KarkadaNagesha
nges up to 1037b2752345cc5666e90b711a913ab2ae6c5920: cpufreq: pmac32-cpufreq: remove device tree parsing for cpu nodes (2013-08-21 10:29:56 +0100) -------- Sudeep KarkadaNagesha (19): microblaze: remove undefined of_get_cpu_node declaration openrisc: remove

Re: [RFC PATCH v2 3/4] powerpc: refactor of_get_cpu_node to support other architectures

2013-08-22 Thread Sudeep KarkadaNagesha
On 22/08/13 14:59, Mark Rutland wrote: > On Mon, Aug 19, 2013 at 02:56:10PM +0100, Sudeep KarkadaNagesha wrote: >> On 19/08/13 14:02, Rob Herring wrote: >>> On 08/19/2013 05:19 AM, Mark Rutland wrote: >>>> On Sat, Aug 17, 2013 at 11:09:36PM +0100, Benjamin Herrensch

Re: [PATCH v4 12/19] cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes

2013-09-09 Thread Sudeep KarkadaNagesha
On 06/09/13 14:44, Guennadi Liakhovetski wrote: > Hi > > On Tue, 20 Aug 2013, Sudeep KarkadaNagesha wrote: > >> From: Sudeep KarkadaNagesha >> >> Now that the cpu device registration initialises the of_node(if available) >> appropriately for all the cpus, p

Re: [PATCH v4 12/19] cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes

2013-09-09 Thread Sudeep KarkadaNagesha
On 09/09/13 15:32, Shawn Guo wrote: > Hi Sudeep, > > On Mon, Sep 09, 2013 at 10:24:39AM +0100, Sudeep KarkadaNagesha wrote: >> Hi Shawn, >> >> Can you please clarify ? The fix would be as below but I would like to >> know if setting cpu_dev to get_cpu_device(0)

Re: [PATCH v4 12/19] cpufreq: cpufreq-cpu0: remove device tree parsing for cpu nodes

2013-09-10 Thread Sudeep KarkadaNagesha
On 10/09/13 03:44, Shawn Guo wrote: > On Mon, Sep 09, 2013 at 04:24:18PM +0100, Sudeep KarkadaNagesha wrote: >> Hi Shawn, >> >> Ok. But I am bit suspicious about devm_clk_get(cpu_dev, NULL). >> I don't understand completely as how the clock are registere

[PATCH 0/2] move of_find_next_cache_node to DT core

2013-09-18 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Hi, The cache bindings are generic and used by many other architectures apart from PPC. These patches fixes and move the existing definition of of_find_next_cache_node to DT common code. Regards, Sudeep Sudeep KarkadaNagesha (2): powerpc: remove big endianness

[PATCH 1/2] powerpc: remove big endianness assumption in of_find_next_cache_node

2013-09-18 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Currently big endianness of the device tree data is assumed in of_find_next_cache_node for 'handle' when calling of_find_node_by_phandle. In preparation to move this function to common code, this patch fixes the endianness using 'be32_to_cpup

[PATCH 2/2] of: move definition of of_find_next_cache_node into common code.

2013-09-18 Thread Sudeep KarkadaNagesha
From: Sudeep KarkadaNagesha Since the definition of_find_next_cache_node is architecture independent, the existing definition in powerpc can be moved to driver/of/base.c Cc: Benjamin Herrenschmidt Cc: Grant Likely Cc: Rob Herring Signed-off-by: Sudeep KarkadaNagesha --- arch/powerpc

Re: [PATCH 0/2] move of_find_next_cache_node to DT core

2013-09-18 Thread Sudeep KarkadaNagesha
On 18/09/13 15:51, Grant Likely wrote: > On Wed, 18 Sep 2013 11:53:03 +0100, Sudeep KarkadaNagesha > wrote: >> From: Sudeep KarkadaNagesha >> >> Hi, >> >> The cache bindings are generic and used by many other architectures >> apart from PPC. These patc

Re: [PATCH 0/2] move of_find_next_cache_node to DT core

2013-10-04 Thread Sudeep KarkadaNagesha
Hi Grant, On 18/09/13 17:18, Sudeep KarkadaNagesha wrote: > On 18/09/13 15:51, Grant Likely wrote: >> On Wed, 18 Sep 2013 11:53:03 +0100, Sudeep KarkadaNagesha >> wrote: >>> From: Sudeep KarkadaNagesha >>> >>> Hi, >>> >>> The cac

Re: [PATCH 2/2] of: move definition of of_find_next_cache_node into common code.

2013-10-31 Thread Sudeep KarkadaNagesha
Hi Ben, On 31/10/13 05:20, Benjamin Herrenschmidt wrote: > On Wed, 2013-09-18 at 11:53 +0100, Sudeep KarkadaNagesha wrote: >> From: Sudeep KarkadaNagesha >> >> Since the definition of_find_next_cache_node is architecture independent, >> the existing definition in pow