Re: [PATCH 2/2] clk: ppc-corenet: don't use platform_driver to init the clock device

2014-10-17 Thread Scott Wood
On Fri, 2014-10-17 at 06:55 +0800, Kevin Hao wrote:
 On Thu, Oct 16, 2014 at 11:55:23PM +0200, Scott Wood wrote:
  On Thu, 2014-10-16 at 19:18 +0800, Kevin Hao wrote:
   diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c 
   b/arch/powerpc/platforms/85xx/corenet_generic.c
   index e56b89a792ed..7677cfecb787 100644
   --- a/arch/powerpc/platforms/85xx/corenet_generic.c
   +++ b/arch/powerpc/platforms/85xx/corenet_generic.c
   @@ -16,6 +16,7 @@
#include linux/kdev_t.h
#include linux/delay.h
#include linux/interrupt.h
   +#include linux/clk-provider.h

#include asm/time.h
#include asm/machdep.h
   @@ -188,11 +189,17 @@ static int __init corenet_generic_probe(void)
 return 0;
}

   +static void __init corenet_gen_init(void)
   +{
   + of_clk_init(NULL);
   +}
  
  Why is this board-specific?
 
 I have thought about to put it in a more common place such as time_init(),
 but this will be in conflict with mpc512x board. How about add an
 arch_initcall(mpc85xx_clk_init) in arch/powerpc/platforms/85xx/common.c?

Gerhard, does 512x really require of_clk_init() to be called at that
specific time, or can it be replaced by a common of_clk_init()?

-Scott


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

Re: [PATCH v3 21/27] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-17 Thread Michael Ellerman
On Wed, 2014-10-15 at 11:07 +0800, Yijing Wang wrote:
 Use MSI chip framework instead of arch MSI functions to configure
 MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.
 
 Signed-off-by: Yijing Wang wangyij...@huawei.com
 ---
 Hi Michael,
I dropped the Acked-by , because this version has a
 lot changes compared to last. So, I guess you may want to check it again.

OK thanks.

Still looks OK and boots on one of my test systems that uses MSI.

Acked-by: Michael Ellerman m...@ellerman.id.au (for powerpc)


cheers


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

Re: [PATCH v3 21/27] Powerpc/MSI: Use MSI chip framework to configure MSI/MSI-X irq

2014-10-17 Thread Yijing Wang
On 2014/10/17 15:23, Michael Ellerman wrote:
 On Wed, 2014-10-15 at 11:07 +0800, Yijing Wang wrote:
 Use MSI chip framework instead of arch MSI functions to configure
 MSI/MSI-X irq. So we can manage MSI/MSI-X irq in a unified framework.

 Signed-off-by: Yijing Wang wangyij...@huawei.com
 ---
 Hi Michael,
I dropped the Acked-by , because this version has a
 lot changes compared to last. So, I guess you may want to check it again.
 
 OK thanks.
 
 Still looks OK and boots on one of my test systems that uses MSI.

Good!

 
 Acked-by: Michael Ellerman m...@ellerman.id.au (for powerpc)

Thanks very much!

Thanks!
Yijing.

 
 
 cheers
 
 
 
 .
 


-- 
Thanks!
Yijing

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

Re: [PATCH 3/3] rheap: move rheap.c from arch/powerpc/lib/ to lib/

2014-10-17 Thread Kumar Gala

On Sep 25, 2014, at 4:47 AM, Zhao Qiang b45...@freescale.com wrote:

 qe need to use the rheap, so move it to public directory.
 
 Signed-off-by: Zhao Qiang b45...@freescale.com
 ---
 arch/powerpc/Kconfig| 3 ---
 arch/powerpc/include/asm/fsl_85xx_cache_sram.h  | 2 +-
 arch/powerpc/lib/Makefile   | 2 --
 arch/powerpc/platforms/44x/Kconfig  | 2 +-
 arch/powerpc/platforms/85xx/Kconfig | 2 +-
 arch/powerpc/platforms/Kconfig  | 2 +-
 arch/powerpc/platforms/Kconfig.cputype  | 2 +-
 arch/powerpc/sysdev/cpm1.c  | 2 +-
 arch/powerpc/sysdev/cpm2.c  | 2 +-
 arch/powerpc/sysdev/cpm_common.c| 2 +-
 arch/powerpc/sysdev/ppc4xx_ocm.c| 2 +-
 drivers/dma/bestcomm/Kconfig| 2 +-
 drivers/soc/qe/Kconfig  | 2 +-
 drivers/soc/qe/qe.c | 2 +-
 drivers/soc/qe/qe_common.c  | 2 +-
 drivers/video/Kconfig   | 2 +-
 include/linux/fsl/bestcomm/sram.h   | 2 +-
 {arch/powerpc/include/asm = include/linux/fsl}/rheap.h | 0
 lib/Kconfig | 3 +++
 lib/Makefile| 2 ++
 {arch/powerpc/lib = lib}/rheap.c   | 2 +-
 21 files changed, 21 insertions(+), 21 deletions(-)
 rename {arch/powerpc/include/asm = include/linux/fsl}/rheap.h (100%)
 rename {arch/powerpc/lib = lib}/rheap.c (99%)

Have you guys looked at moving to lib/genalloc.c.  If we are going to keep 
rheap around the include should be just in include/linux/rheap.h not 
include/linux/fsl/rheap.h

However, I think genalloc should be used and kill off rheap usage.

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

Re: [PATCH] cpufreq: qoriq: Make the driver usable on all QorIQ platforms

2014-10-17 Thread Kumar Gala

On Oct 17, 2014, at 5:13 AM, b29...@freescale.com wrote:

 From: Tang Yuantian yuantian.t...@freescale.com
 
 Freescale introduced new ARM core-based SoCs which support dynamic
 frequency switch feature. DFS on new SoCs are compatible with current
 PowerPC CoreNet platforms. In order to support those new platforms,
 this driver needs to be slightly adjusted. The main changes include:
 
 1. Changed the names of driver and functions in driver.

split the name changes/renaming into a separate patch from the other changes.

 2. Added two new functions get_cpu_physical_id() and get_bus_freq().
 3. Used a new way to get all the CPUs which sharing clock wire.
 
 Signed-off-by: Tang Yuantian yuantian.t...@freescale.com
 ---
 drivers/cpufreq/Kconfig.arm|   8 ++
 drivers/cpufreq/Kconfig.powerpc|  11 +-
 drivers/cpufreq/Makefile   |   2 +-
 .../{ppc-corenet-cpufreq.c = qoriq-cpufreq.c} | 150 ++---
 4 files changed, 114 insertions(+), 57 deletions(-)
 rename drivers/cpufreq/{ppc-corenet-cpufreq.c = qoriq-cpufreq.c} (72%)
 
 diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
 index 83a75dc..1925ae94 100644
 --- a/drivers/cpufreq/Kconfig.arm
 +++ b/drivers/cpufreq/Kconfig.arm
 @@ -247,3 +247,11 @@ config ARM_TEGRA_CPUFREQ
   default y
   help
 This adds the CPUFreq driver support for TEGRA SOCs.
 +
 +config QORIQ_CPUFREQ
 + tristate CPU frequency scaling driver for Freescale QorIQ SoCs
 + depends on OF  COMMON_CLK
 + select CLK_PPC_CORENET

Why are you not also renaming ‘CLK_PPC_CORENET’ to ‘CLK_QORIQ’ or something 
like that?  Seems rather odd to select a PPC CLK support on ARM ;)

 + help
 +   This adds the CPUFreq driver support for Freescale QorIQ SoCs
 +   which are capable of changing the CPU's frequency dynamically.
 diff --git a/drivers/cpufreq/Kconfig.powerpc b/drivers/cpufreq/Kconfig.powerpc
 index 72564b7..3a34248 100644
 --- a/drivers/cpufreq/Kconfig.powerpc
 +++ b/drivers/cpufreq/Kconfig.powerpc
 @@ -23,14 +23,13 @@ config CPU_FREQ_MAPLE
 This adds support for frequency switching on Maple 970FX
 Evaluation Board and compatible boards (IBM JS2x blades).
 
 -config PPC_CORENET_CPUFREQ
 - tristate CPU frequency scaling driver for Freescale E500MC SoCs
 - depends on PPC_E500MC  OF  COMMON_CLK
 +config QORIQ_CPUFREQ
 + tristate CPU frequency scaling driver for Freescale QorIQ SoCs
 + depends on OF  COMMON_CLK
   select CLK_PPC_CORENET
   help
 -   This adds the CPUFreq driver support for Freescale e500mc,
 -   e5500 and e6500 series SoCs which are capable of changing
 -   the CPU's frequency dynamically.
 +   This adds the CPUFreq driver support for Freescale QorIQ SoCs
 +   which are capable of changing the CPU's frequency dynamically.
 
 config CPU_FREQ_PMAC
   bool Support for Apple PowerBooks
 diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
 index 40c53dc..0020049 100644
 --- a/drivers/cpufreq/Makefile
 +++ b/drivers/cpufreq/Makefile
 @@ -84,7 +84,7 @@ obj-$(CONFIG_CPU_FREQ_CBE)  += ppc-cbe-cpufreq.o
 ppc-cbe-cpufreq-y += ppc_cbe_cpufreq_pervasive.o 
 ppc_cbe_cpufreq.o
 obj-$(CONFIG_CPU_FREQ_CBE_PMI)+= ppc_cbe_cpufreq_pmi.o
 obj-$(CONFIG_CPU_FREQ_MAPLE)  += maple-cpufreq.o
 -obj-$(CONFIG_PPC_CORENET_CPUFREQ)   += ppc-corenet-cpufreq.o
 +obj-$(CONFIG_QORIQ_CPUFREQ)  += qoriq-cpufreq.o
 obj-$(CONFIG_CPU_FREQ_PMAC)   += pmac32-cpufreq.o
 obj-$(CONFIG_CPU_FREQ_PMAC64) += pmac64-cpufreq.o
 obj-$(CONFIG_PPC_PASEMI_CPUFREQ)  += pasemi-cpufreq.o
 diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c 
 b/drivers/cpufreq/qoriq-cpufreq.c
 similarity index 72%
 rename from drivers/cpufreq/ppc-corenet-cpufreq.c
 rename to drivers/cpufreq/qoriq-cpufreq.c
 index bee5df7..80def0c 100644
 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c
 +++ b/drivers/cpufreq/qoriq-cpufreq.c
 @@ -1,7 +1,7 @@
 /*
  * Copyright 2013 Freescale Semiconductor, Inc.
  *
 - * CPU Frequency Scaling driver for Freescale PowerPC corenet SoCs.
 + * CPU Frequency Scaling driver for Freescale QorIQ SoCs.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 @@ -20,7 +20,6 @@
 #include linux/of.h
 #include linux/slab.h
 #include linux/smp.h
 -#include sysdev/fsl_soc.h
 
 /**
  * struct cpu_data - per CPU data struct
 @@ -69,9 +68,6 @@ static const u32 *fmask;
 
 static DEFINE_PER_CPU(struct cpu_data *, cpu_data);
 
 -/* cpumask in a cluster */
 -static DEFINE_PER_CPU(cpumask_var_t, cpu_mask);
 -
 #ifndef CONFIG_SMP
 static inline const struct cpumask *cpu_core_mask(int cpu)
 {
 @@ -79,6 +75,79 @@ static inline const struct cpumask *cpu_core_mask(int cpu)
 }
 #endif
 
 +#if defined(CONFIG_PPC_E500MC)

Probably should just be CONFIG_PPC, but do we need this at 

Re: [PATCH v3] dmaengine: driver support for FSL RaidEngine device.

2014-10-17 Thread Vinod Koul
On Fri, Oct 17, 2014 at 02:13:20AM +, Xuelin Shi wrote:
 Hi Dan  Vinod,
 
 I have sent out the v4 of this patch and not received any further feedback 
 yet.
 
 This patch looks ruled out from the patchwork. 
 https://patchwork.kernel.org/project/linux-dmaengine/list/?page=2
 
 So do you know what happened to this patch?

First pls do not top post on mailing list

Yes I did clean patchworks this week for older patches, can you please
resubmit and we can review them

Thanks
-- 
~Vinod

 
 Thanks,
 Xuelin Shi
 
 
 -Original Message-
 From: Shi Xuelin-B29237 
 Sent: 2014年4月15日 11:08
 To: 'Dan Williams'
 Cc: Koul, Vinod; andriy.shevche...@intel.com; dmaeng...@vger.kernel.org; 
 linuxppc-dev; Rai Harninder-B01044; Burmi Naveen-B16502
 Subject: RE: [PATCH v3] dmaengine: driver support for FSL RaidEngine device.
 
 Yes, depend on !ASYNC_TX_CHANNEL_SWITCH is better since fsldma selects this 
 condition.
 
 Thanks,
 Xuelin Shi
 
 -Original Message-
 From: Dan Williams [mailto:dan.j.willi...@intel.com]
 Sent: 2014年4月15日 8:30
 To: Shi Xuelin-B29237
 Cc: Koul, Vinod; andriy.shevche...@intel.com; dmaeng...@vger.kernel.org; 
 linuxppc-dev; Rai Harninder-B01044; Burmi Naveen-B16502
 Subject: Re: [PATCH v3] dmaengine: driver support for FSL RaidEngine device.
 
 On Sun, Apr 13, 2014 at 7:48 PM, Xuelin Shi xuelin@freescale.com wrote:
  Hi Dan,
 
  fsl dma device and fsl raid device are two differenct devices that 
  both provide async_memcpy capability, so I use !FSL_DMA to disable the fsl 
  dma device.
 
  That's to say, either select fsldma device, either fsl raid device.
 
 
 Right, but that's not what your proposed Kconfig dependency line does.
 
 You want something like depends on FSL_SOC  !(FSL_DMA || FSL_DMA=m)
 
 However, the more problematic option is ASYNC_TX_CHANNEL_SWITCH.  That option 
 is problematic for RAID, so I propose depend on !ASYNC_TX_CHANNEL_SWITCH 
 since that addresses both problems.
 
 

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

Re: [PATCH] cpufreq: qoriq: Make the driver usable on all QorIQ platforms

2014-10-17 Thread Viresh Kumar
On 17 October 2014 08:43,  b29...@freescale.com wrote:

Hi B29983 :)

 From: Tang Yuantian yuantian.t...@freescale.com

 Freescale introduced new ARM core-based SoCs which support dynamic
 frequency switch feature. DFS on new SoCs are compatible with current
 PowerPC CoreNet platforms. In order to support those new platforms,
 this driver needs to be slightly adjusted. The main changes include:

 1. Changed the names of driver and functions in driver.
 2. Added two new functions get_cpu_physical_id() and get_bus_freq().
 3. Used a new way to get all the CPUs which sharing clock wire.

 Signed-off-by: Tang Yuantian yuantian.t...@freescale.com
 ---
  drivers/cpufreq/Kconfig.arm|   8 ++
  drivers/cpufreq/Kconfig.powerpc|  11 +-
  drivers/cpufreq/Makefile   |   2 +-
  .../{ppc-corenet-cpufreq.c = qoriq-cpufreq.c} | 150 
 ++---
  4 files changed, 114 insertions(+), 57 deletions(-)
  rename drivers/cpufreq/{ppc-corenet-cpufreq.c = qoriq-cpufreq.c} (72%)

 diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm
 index 83a75dc..1925ae94 100644
 --- a/drivers/cpufreq/Kconfig.arm
 +++ b/drivers/cpufreq/Kconfig.arm
 @@ -247,3 +247,11 @@ config ARM_TEGRA_CPUFREQ
 default y
 help
   This adds the CPUFreq driver support for TEGRA SOCs.
 +
 +config QORIQ_CPUFREQ
 +   tristate CPU frequency scaling driver for Freescale QorIQ SoCs
 +   depends on OF  COMMON_CLK
 +   select CLK_PPC_CORENET
 +   help
 + This adds the CPUFreq driver support for Freescale QorIQ SoCs
 + which are capable of changing the CPU's frequency dynamically.
 diff --git a/drivers/cpufreq/Kconfig.powerpc b/drivers/cpufreq/Kconfig.powerpc
 index 72564b7..3a34248 100644
 --- a/drivers/cpufreq/Kconfig.powerpc
 +++ b/drivers/cpufreq/Kconfig.powerpc
 @@ -23,14 +23,13 @@ config CPU_FREQ_MAPLE
   This adds support for frequency switching on Maple 970FX
   Evaluation Board and compatible boards (IBM JS2x blades).

 -config PPC_CORENET_CPUFREQ
 -   tristate CPU frequency scaling driver for Freescale E500MC SoCs
 -   depends on PPC_E500MC  OF  COMMON_CLK
 +config QORIQ_CPUFREQ
 +   tristate CPU frequency scaling driver for Freescale QorIQ SoCs
 +   depends on OF  COMMON_CLK
 select CLK_PPC_CORENET
 help
 - This adds the CPUFreq driver support for Freescale e500mc,
 - e5500 and e6500 series SoCs which are capable of changing
 - the CPU's frequency dynamically.
 + This adds the CPUFreq driver support for Freescale QorIQ SoCs
 + which are capable of changing the CPU's frequency dynamically.

  config CPU_FREQ_PMAC
 bool Support for Apple PowerBooks

Don't need this duplication at all. Just move this to Kconfig instead
of .arm and ppc.

 diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c 
 b/drivers/cpufreq/qoriq-cpufreq.c

  /**
   * struct cpu_data - per CPU data struct
 @@ -69,9 +68,6 @@ static const u32 *fmask;

  static DEFINE_PER_CPU(struct cpu_data *, cpu_data);

 -/* cpumask in a cluster */
 -static DEFINE_PER_CPU(cpumask_var_t, cpu_mask);
 -
  #ifndef CONFIG_SMP
  static inline const struct cpumask *cpu_core_mask(int cpu)
  {
 @@ -79,6 +75,79 @@ static inline const struct cpumask *cpu_core_mask(int cpu)
  }
  #endif

 +#if defined(CONFIG_PPC_E500MC)
 +static int get_cpu_physical_id(int cpu)
 +{
 +   return get_hard_smp_processor_id(cpu);
 +}
 +#elif defined(CONFIG_ARM)

Wouldn't a #else work here as there are just two platforms we are
talking about ?

 +static int get_cpu_physical_id(int cpu)
 +{
 +   return topology_core_id(cpu);
 +}
 +#endif
 +
 +static u32 get_bus_freq(void)
 +{
 +   struct device_node *soc;
 +   u32 sysfreq;
 +
 +   soc = of_find_node_by_type(NULL, soc);
 +   if (!soc)
 +   return 0;
 +
 +   if (of_property_read_u32(soc, bus-frequency, sysfreq))
 +   sysfreq = 0;
 +
 +   of_node_put(soc);
 +
 +   return sysfreq;
 +}
 +
 +static struct device_node *cpu_to_clk_node(int cpu)
 +{
 +   struct device_node *np, *clk_np;
 +
 +   if (!cpu_present(cpu))
 +   return NULL;
 +
 +   np = of_get_cpu_node(cpu, NULL);
 +   if (!np)
 +   return NULL;
 +
 +   clk_np = of_parse_phandle(np, clocks, 0);
 +   if (!clk_np)
 +   return NULL;
 +
 +   of_node_put(np);
 +
 +   return clk_np;
 +}
 +
 +/* traverse cpu nodes to get cpu mask of sharing clock wire */
 +static void set_affected_cpus(struct cpufreq_policy *policy)
 +{
 +   struct device_node *np, *clk_np;
 +   struct cpumask *dstp = policy-cpus;
 +   int i;
 +
 +   np = cpu_to_clk_node(policy-cpu);
 +   if (!np)
 +   return;
 +
 +   for_each_present_cpu(i) {
 +   clk_np = cpu_to_clk_node(i);
 +   if (!clk_np)
 +   continue;
 +
 +   if 

[RESEND PATCH v4] dmaengine: Driver support for FSL RaidEngine device.

2014-10-17 Thread xuelin.shi
From: Xuelin Shi xuelin@freescale.com

The RaidEngine is a new FSL hardware used for Raid5/6 acceration.

This patch enables the RaidEngine functionality and provides
hardware offloading capability for memcpy, xor and pq computation.
It works with async_tx.

Signed-off-by: Harninder Rai harninder@freescale.com
Signed-off-by: Naveen Burmi naveenbu...@freescale.com
Signed-off-by: Xuelin Shi xuelin@freescale.com
---
 changes for v4:
  - use upper/lower_32_bits(...) instead of direct shift.
  - change FSL_RAID dependency !ASYNC_TX_ENABLE_CHANNEL_SWITCH in Kconfig.

 changes for v3:
  - fix memory allocation flag GFP_xxx usage.
  - add re_jr_issue_pending call in cleanup.
  - remove unnecessary dma_run_dependencies(...).
  - use dma_cookie_complete(...) instead of direct updating cookie.

 drivers/dma/Kconfig|  11 +
 drivers/dma/Makefile   |   1 +
 drivers/dma/fsl_raid.c | 875 +
 drivers/dma/fsl_raid.h | 307 +
 4 files changed, 1194 insertions(+)
 create mode 100644 drivers/dma/fsl_raid.c
 create mode 100644 drivers/dma/fsl_raid.h

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index 605b016..b85880c 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -100,6 +100,17 @@ config FSL_DMA
  EloPlus is on mpc85xx and mpc86xx and Pxxx parts, and the Elo3 is on
  some Txxx and Bxxx parts.
 
+config FSL_RAID
+tristate Freescale RAID engine Support
+depends on FSL_SOC  !ASYNC_TX_ENABLE_CHANNEL_SWITCH
+select DMA_ENGINE
+select DMA_ENGINE_RAID
+---help---
+  Enable support for Freescale RAID Engine. RAID Engine is
+  available on some QorIQ SoCs (like P5020). It has
+  the capability to offload memcpy, xor and pq computation
+ for raid5/6.
+
 config MPC512X_DMA
tristate Freescale MPC512x built-in DMA engine support
depends on PPC_MPC512x || PPC_MPC831x
diff --git a/drivers/dma/Makefile b/drivers/dma/Makefile
index a029d0f4..60b163b 100644
--- a/drivers/dma/Makefile
+++ b/drivers/dma/Makefile
@@ -44,3 +44,4 @@ obj-$(CONFIG_DMA_JZ4740) += dma-jz4740.o
 obj-$(CONFIG_TI_CPPI41) += cppi41.o
 obj-$(CONFIG_K3_DMA) += k3dma.o
 obj-$(CONFIG_MOXART_DMA) += moxart-dma.o
+obj-$(CONFIG_FSL_RAID) += fsl_raid.o
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
new file mode 100644
index 000..1dc5981
--- /dev/null
+++ b/drivers/dma/fsl_raid.c
@@ -0,0 +1,875 @@
+/*
+ * drivers/dma/fsl_raid.c
+ *
+ * Freescale RAID Engine device driver
+ *
+ * Author:
+ * Harninder Rai harninder@freescale.com
+ * Naveen Burmi naveenbu...@freescale.com
+ *
+ * Rewrite:
+ * Xuelin Shi xuelin@freescale.com
+ *
+ * Copyright (c) 2010-2014 Freescale Semiconductor, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * * Neither the name of Freescale Semiconductor nor the
+ *   names of its contributors may be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License (GPL) as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Theory of operation:
+ *
+ * General capabilities:
+ * RAID Engine (RE) block is capable of offloading XOR, memcpy and P/Q
+ * calculations required in RAID5 and RAID6 operations. RE driver
+ * registers with Linux's ASYNC layer as dma driver. RE hardware
+ * maintains strict ordering of the requests through chained
+ * command queueing.
+ *
+ * Data flow:
+ * Software RAID layer of Linux (MD 

Re: [PATCH] drivers/crypto/nx: prevent oops on module exit

2014-10-17 Thread Seth Jennings
 On Fri, 2014-10-17 at 09:43 +1100, Michael Ellerman wrote:
 On Thu, 2014-10-16 at 15:30 -0400, Dan Streetman wrote:
  Check old_devdata-dev in nx-842 driver before accessing it, as
  on systems without any nx-842 hardware, the -dev will never be
  set.  Currently, the module will cause an oops during unload
  since old_devdata-dev is null.

 Hi Dan,

 Patch looks reasonable. But I can't merge it, at least not without an
 ACK:

 $ ./scripts/get_maintainer.pl -f drivers/crypto/nx/
 Nathan Fontenot nf...@linux.vnet.ibm.com (supporter:IBM Power 842
 com...)
 Marcelo Henrique Cerri mhce...@linux.vnet.ibm.com (supporter:IBM Power
 in-Nest...)
 Fionnuala Gunter f...@linux.vnet.ibm.com (supporter:IBM Power
 in-Nest...)
 Herbert Xu herb...@gondor.apana.org.au (maintainer:CRYPTO API)
 David S. Miller da...@davemloft.net (maintainer:CRYPTO API)
 linux-cry...@vger.kernel.org (open list:IBM Power in-Nest...)
 linux-ker...@vger.kernel.org (open list)


 If any of the above is out of date please send me a patch for
 MAINTAINERS.

 I think Dan now owns that driver, Dan, please confirm.

I guess I'm not on the maintainer list anymore, as I shouldn't be
since I don't work at IBM anymore.

So... yeah.  I was the original co-author of driver so I acked it
but I'm not the maintainer anymore.  Which I shouldn't be, since
I don't work at IBM anymore.

Seth


 Cheers,
 Ben.




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

Re: [PATCH] drivers/crypto/nx: prevent oops on module exit

2014-10-17 Thread Seth Jennings
 On Fri, 2014-10-17 at 09:43 +1100, Michael Ellerman wrote:
 On Thu, 2014-10-16 at 15:30 -0400, Dan Streetman wrote:
  Check old_devdata-dev in nx-842 driver before accessing it, as
  on systems without any nx-842 hardware, the -dev will never be
  set.  Currently, the module will cause an oops during unload
  since old_devdata-dev is null.

 Hi Dan,

 Patch looks reasonable. But I can't merge it, at least not without an
 ACK:

 $ ./scripts/get_maintainer.pl -f drivers/crypto/nx/
 Nathan Fontenot nf...@linux.vnet.ibm.com (supporter:IBM Power 842
 com...)
 Marcelo Henrique Cerri mhce...@linux.vnet.ibm.com (supporter:IBM
 Power
 in-Nest...)
 Fionnuala Gunter f...@linux.vnet.ibm.com (supporter:IBM Power
 in-Nest...)
 Herbert Xu herb...@gondor.apana.org.au (maintainer:CRYPTO API)
 David S. Miller da...@davemloft.net (maintainer:CRYPTO API)
 linux-cry...@vger.kernel.org (open list:IBM Power in-Nest...)
 linux-ker...@vger.kernel.org (open list)


 If any of the above is out of date please send me a patch for
 MAINTAINERS.

 I think Dan now owns that driver, Dan, please confirm.

 I guess I'm not on the maintainer list anymore, as I shouldn't be
 since I don't work at IBM anymore.

Wow, I messed that up.  Repeating myself :-/  Sorry for the noise.

Seth


 So... yeah.  I was the original co-author of driver so I acked it
 but I'm not the maintainer anymore.  Which I shouldn't be, since
 I don't work at IBM anymore.

 Seth


 Cheers,
 Ben.






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

[PATCH] i2c-qoriq: modified compatibility for correct prescaler

2014-10-17 Thread Valentin Longchamp
With fsl-i2c compatibility the i2c frequency is not set
correctly, because it sets no prescaler. According to the AN2919 from
Freescale and the QorIQ (P2041) documentation, the source clock is 1/2
the platform clock. This implies that a prescaler of 2 must be used.

This changes the compatibility of the qoriq-i2c .dtsi files to pick the
mpc8543, which uses the same driver but sets the correct prescaler.

Signed-off-by: Rainer Boschung rainer.bosch...@keymile.com
Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com
---

 arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi | 4 ++--
 arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi 
b/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi
index 5f9bf7d..aa6c366 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-i2c-0.dtsi
@@ -36,7 +36,7 @@ i2c@118000 {
#address-cells = 1;
#size-cells = 0;
cell-index = 0;
-   compatible = fsl-i2c;
+   compatible = fsl,mpc8543-i2c, fsl-i2c;
reg = 0x118000 0x100;
interrupts = 38 2 0 0;
dfsrr;
@@ -46,7 +46,7 @@ i2c@118100 {
#address-cells = 1;
#size-cells = 0;
cell-index = 1;
-   compatible = fsl-i2c;
+   compatible = fsl,mpc8543-i2c, fsl-i2c;
reg = 0x118100 0x100;
interrupts = 38 2 0 0;
dfsrr;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi 
b/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi
index 7989bf5..b697a3b 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-i2c-1.dtsi
@@ -36,7 +36,7 @@ i2c@119000 {
#address-cells = 1;
#size-cells = 0;
cell-index = 2;
-   compatible = fsl-i2c;
+   compatible = fsl,mpc8543-i2c, fsl-i2c;
reg = 0x119000 0x100;
interrupts = 39 2 0 0;
dfsrr;
@@ -46,7 +46,7 @@ i2c@119100 {
#address-cells = 1;
#size-cells = 0;
cell-index = 3;
-   compatible = fsl-i2c;
+   compatible = fsl,mpc8543-i2c, fsl-i2c;
reg = 0x119100 0x100;
interrupts = 39 2 0 0;
dfsrr;
-- 
1.8.0.1

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

Re: [PATCH] drivers/crypto/nx: prevent oops on module exit

2014-10-17 Thread Dan Streetman
Yep, I own the driver now, I'll send a maintainers patch.


On Thu, Oct 16, 2014 at 6:52 PM, Benjamin Herrenschmidt
b...@kernel.crashing.org wrote:
 On Fri, 2014-10-17 at 09:43 +1100, Michael Ellerman wrote:
 On Thu, 2014-10-16 at 15:30 -0400, Dan Streetman wrote:
  Check old_devdata-dev in nx-842 driver before accessing it, as
  on systems without any nx-842 hardware, the -dev will never be
  set.  Currently, the module will cause an oops during unload
  since old_devdata-dev is null.

 Hi Dan,

 Patch looks reasonable. But I can't merge it, at least not without an ACK:

 $ ./scripts/get_maintainer.pl -f drivers/crypto/nx/
 Nathan Fontenot nf...@linux.vnet.ibm.com (supporter:IBM Power 842 com...)
 Marcelo Henrique Cerri mhce...@linux.vnet.ibm.com (supporter:IBM Power 
 in-Nest...)
 Fionnuala Gunter f...@linux.vnet.ibm.com (supporter:IBM Power in-Nest...)
 Herbert Xu herb...@gondor.apana.org.au (maintainer:CRYPTO API)
 David S. Miller da...@davemloft.net (maintainer:CRYPTO API)
 linux-cry...@vger.kernel.org (open list:IBM Power in-Nest...)
 linux-ker...@vger.kernel.org (open list)


 If any of the above is out of date please send me a patch for MAINTAINERS.

 I think Dan now owns that driver, Dan, please confirm.

 Cheers,
 Ben.


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

[PATCH] MAINTAINERS: nx-842 driver maintainer change

2014-10-17 Thread Dan Streetman
Change maintainer of nx-842 compression coprocessor driver
to Dan Streetman.

Signed-off-by: Dan Streetman ddstr...@ieee.org
Cc: Nathan Fontenot nf...@linux.vnet.ibm.com
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index b0f17d5..3cc3e41 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4605,7 +4605,7 @@ S:Supported
 F: drivers/crypto/nx/
 
 IBM Power 842 compression accelerator
-M: Nathan Fontenot nf...@linux.vnet.ibm.com
+M: Dan Streetman ddstr...@us.ibm.com
 S: Supported
 F: drivers/crypto/nx/nx-842.c
 F: include/linux/nx842.h
-- 
1.8.3.1

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

[PATCH] drivers: depend on instead of select BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO

2014-10-17 Thread Jani Nikula
Documentation/kbuild/kconfig-language.txt warns to use select with care,
and in general use select only for non-visible symbols and for symbols
with no dependencies, because select will force a symbol to a value
without visiting the dependencies.

Select has become particularly problematic, interdependently, with the
BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO configs. For example:

scripts/kconfig/conf --randconfig Kconfig
KCONFIG_SEED=0x48312B00
warning: (DRM_RADEON  DRM_NOUVEAU  DRM_I915  DRM_GMA500 
DRM_SHMOBILE  DRM_TILCDC  FB_BACKLIGHT  FB_MX3  USB_APPLEDISPLAY
 FB_OLPC_DCON  ASUS_LAPTOP  SONY_LAPTOP  THINKPAD_ACPI 
EEEPC_LAPTOP  ACPI_CMPC  SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE
which has unmet direct dependencies (HAS_IOMEM  BACKLIGHT_LCD_SUPPORT)
warning: (DRM_RADEON  DRM_NOUVEAU  DRM_I915  DRM_GMA500 
DRM_SHMOBILE  DRM_TILCDC  FB_BACKLIGHT  FB_MX3  USB_APPLEDISPLAY
 FB_OLPC_DCON  ASUS_LAPTOP  SONY_LAPTOP  THINKPAD_ACPI 
EEEPC_LAPTOP  ACPI_CMPC  SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE
which has unmet direct dependencies (HAS_IOMEM  BACKLIGHT_LCD_SUPPORT)

With tristates it's possible to end up selecting FOO=y depending on
BAR=m in the config, which gets discovered at build time, not config
time, like reported in the thread referenced below.

Do the following to fix the dependencies:

* Depend on instead of select BACKLIGHT_CLASS_DEVICE everywhere. Drop
  select BACKLIGHT_LCD_SUPPORT in such cases, as it's a dependency of
  BACKLIGHT_CLASS_DEVICE.

* Remove config FB_BACKLIGHT altogether, and replace it with a
  dependency on BACKLIGHT_CLASS_DEVICE. All configs selecting
  FB_BACKLIGHT select or depend on FB anyway, so we can simplify.

* Depend on (ACPI  ACPI_VIDEO) || ACPI=n in several places instead of
  selecting ACPI_VIDEO and a number of its dependencies if ACPI is
  enabled. This is tied to backlight, as ACPI_VIDEO depends on
  BACKLIGHT_CLASS_DEVICE.

* Replace a couple of select INPUT/VT with depends as it seemed to be
  necessary.

Reference: 
http://lkml.kernel.org/r/ca+r1zhhmt4drwtf6mbrqo5eqxwx+lxcqh15vsu_d9wpftlh...@mail.gmail.com
Reported-by: Jim Davis jim.ep...@gmail.com
Cc: Randy Dunlap rdun...@infradead.org
Cc: David Airlie airl...@linux.ie
Cc: Daniel Vetter daniel.vet...@intel.com
Cc: Greg Kroah-Hartman gre...@linuxfoundation.org
Cc: Darren Hart dvh...@infradead.org
Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Jens Frederich jfreder...@gmail.com
Cc: Daniel Drake d...@laptop.org
Cc: Jon Nettleton jon.nettle...@gmail.com
Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com
Cc: Tomi Valkeinen tomi.valkei...@ti.com
Signed-off-by: Jani Nikula jani.nik...@intel.com

---

Sorry for the huge distribution; this is really quite hard to split up
sensibly without breaking the build!
---
 drivers/gpu/drm/Kconfig|  2 +-
 drivers/gpu/drm/gma500/Kconfig |  4 +---
 drivers/gpu/drm/i915/Kconfig   |  9 ++---
 drivers/gpu/drm/nouveau/Kconfig| 10 ++
 drivers/gpu/drm/shmobile/Kconfig   |  2 +-
 drivers/gpu/drm/tilcdc/Kconfig |  3 +--
 drivers/macintosh/Kconfig  |  2 +-
 drivers/platform/x86/Kconfig   | 19 ---
 drivers/staging/olpc_dcon/Kconfig  |  2 +-
 drivers/usb/misc/Kconfig   |  3 +--
 drivers/video/fbdev/Kconfig| 29 +++--
 drivers/video/fbdev/core/fbsysfs.c |  8 
 include/linux/fb.h |  2 +-
 include/uapi/linux/fb.h|  2 +-
 14 files changed, 36 insertions(+), 61 deletions(-)

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index e3b4b0f02b3d..dc789d0e293c 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -99,6 +99,7 @@ config DRM_R128
 config DRM_RADEON
tristate ATI Radeon
depends on DRM  PCI
+   depends on BACKLIGHT_CLASS_DEVICE || BACKLIGHT_CLASS_DEVICE=n
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT
@@ -108,7 +109,6 @@ config DRM_RADEON
 select DRM_TTM
select POWER_SUPPLY
select HWMON
-   select BACKLIGHT_CLASS_DEVICE
select INTERVAL_TREE
select MMU_NOTIFIER
help
diff --git a/drivers/gpu/drm/gma500/Kconfig b/drivers/gpu/drm/gma500/Kconfig
index 17f928ec84ea..a84d0a4fcc58 100644
--- a/drivers/gpu/drm/gma500/Kconfig
+++ b/drivers/gpu/drm/gma500/Kconfig
@@ -8,9 +8,7 @@ config DRM_GMA500
select DRM_KMS_FB_HELPER
select DRM_TTM
# GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915
-   select ACPI_VIDEO if ACPI
-   select BACKLIGHT_CLASS_DEVICE if ACPI
-   select INPUT if ACPI
+   depends on (ACPI  ACPI_VIDEO) || ACPI=n
help
  Say yes for an experimental 2D KMS framebuffer driver for the
  Intel GMA500 ('Poulsbo') and other Intel IMG based graphics
diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig
index 4e39ab34eb1c..75d4c52c0971 

Re: [PATCH] MAINTAINERS: nx-842 driver maintainer change

2014-10-17 Thread Nathan Fontenot
On 10/17/2014 06:19 PM, Dan Streetman wrote:
 Change maintainer of nx-842 compression coprocessor driver
 to Dan Streetman.
 
 Signed-off-by: Dan Streetman ddstr...@ieee.org
 Cc: Nathan Fontenot nf...@linux.vnet.ibm.com

Acked-by: Nathan Fontenot nf...@linux.vnet.ibm.com

 ---
  MAINTAINERS | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/MAINTAINERS b/MAINTAINERS
 index b0f17d5..3cc3e41 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -4605,7 +4605,7 @@ S:  Supported
  F:   drivers/crypto/nx/
 
  IBM Power 842 compression accelerator
 -M:   Nathan Fontenot nf...@linux.vnet.ibm.com
 +M:   Dan Streetman ddstr...@us.ibm.com
  S:   Supported
  F:   drivers/crypto/nx/nx-842.c
  F:   include/linux/nx842.h
 

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

[PATCH 1/2] powerpc/numa: use cached value of update-cpu in update_cpu_topology

2014-10-17 Thread Nishanth Aravamudan
There isn't any need to keep referring to update-cpu, as we've already
checked cpu == update-cpu at this point.

Signed-off-by: Nishanth Aravamudan n...@linux.vnet.ibm.com

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 649666d5d1c2..86fdb004ad2f 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1491,8 +1491,8 @@ static int update_cpu_topology(void *data)
if (cpu != update-cpu)
continue;
 
-   unmap_cpu_from_node(update-cpu);
-   map_cpu_to_node(update-cpu, update-new_nid);
+   unmap_cpu_from_node(cpu);
+   map_cpu_to_node(cpu, update-new_nid);
vdso_getcpu_init();
}
 

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

[PATCH 2/2] powerpc/numa: ensure per-cpu NUMA mappings are correct on topology update

2014-10-17 Thread Nishanth Aravamudan
We received a report of warning in kernel/sched/core.c where the sched
group was NULL on an LPAR after a topology update. This seems to occur
because after the topology update has moved the CPUs, cpu_to_node is
returning the old value still, which ends up breaking the consistency of
the NUMA topology in the per-cpu maps. Ensure that we update the per-cpu
fields when we re-map CPUs.

Signed-off-by: Nishanth Aravamudan n...@linux.vnet.ibm.com

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 86fdb004ad2f..048be62dc979 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1488,11 +1488,14 @@ static int update_cpu_topology(void *data)
cpu = smp_processor_id();
 
for (update = data; update; update = update-next) {
+   int new_nid = update-new_nid;
if (cpu != update-cpu)
continue;
 
unmap_cpu_from_node(cpu);
-   map_cpu_to_node(cpu, update-new_nid);
+   map_cpu_to_node(cpu, new_nid);
+   set_cpu_numa_node(cpu, new_nid);
+   set_cpu_numa_mem(cpu, local_memory_node(new_nid));
vdso_getcpu_init();
}
 

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