[RFC 08/10] fsl_qman: Add debugfs support

2015-02-04 Thread Emil Medve
From: Geoff Thorpe 

Change-Id: I59a75a91b289193b5ab1d30a08f60119dc4d7568
Signed-off-by: Geoff Thorpe 
---
 drivers/staging/fsl_qbman/Kconfig|7 +
 drivers/staging/fsl_qbman/Makefile   |2 +
 drivers/staging/fsl_qbman/qman_debugfs.c | 1326 ++
 drivers/staging/fsl_qbman/qman_high.c|   58 ++
 drivers/staging/fsl_qbman/qman_private.h |8 +
 include/linux/fsl_qman.h |6 +
 6 files changed, 1407 insertions(+)
 create mode 100644 drivers/staging/fsl_qbman/qman_debugfs.c

diff --git a/drivers/staging/fsl_qbman/Kconfig 
b/drivers/staging/fsl_qbman/Kconfig
index 66a8361..9e2a25f 100644
--- a/drivers/staging/fsl_qbman/Kconfig
+++ b/drivers/staging/fsl_qbman/Kconfig
@@ -125,6 +125,13 @@ config FSL_QMAN_TEST_STASH_POTATO
  across a series of FQs scheduled to different portals (and cpus), with
  DQRR, data and context stashing always on.
 
+config FSL_QMAN_DEBUGFS
+   tristate "QMan debugfs interface"
+   depends on DEBUG_FS
+   default y
+   ---help---
+ This option compiles debugfs code for QMan.
+
 # H/w settings that can be hard-coded for now.
 config FSL_QMAN_FQD_SZ
int "size of Frame Queue Descriptor region"
diff --git a/drivers/staging/fsl_qbman/Makefile 
b/drivers/staging/fsl_qbman/Makefile
index 0287eab..5e93fff 100644
--- a/drivers/staging/fsl_qbman/Makefile
+++ b/drivers/staging/fsl_qbman/Makefile
@@ -19,3 +19,5 @@ obj-$(CONFIG_FSL_QMAN_TEST)+= 
qman_tester.o
 qman_tester-y= qman_test.o
 qman_tester-$(CONFIG_FSL_QMAN_TEST_HIGH)+= qman_test_high.o
 qman_tester-$(CONFIG_FSL_QMAN_TEST_STASH_POTATO) += qman_test_hotpotato.o
+obj-$(CONFIG_FSL_QMAN_DEBUGFS)  += qman_debugfs_interface.o
+qman_debugfs_interface-y = qman_debugfs.o
diff --git a/drivers/staging/fsl_qbman/qman_debugfs.c 
b/drivers/staging/fsl_qbman/qman_debugfs.c
new file mode 100644
index 000..f5ab16d
--- /dev/null
+++ b/drivers/staging/fsl_qbman/qman_debugfs.c
@@ -0,0 +1,1326 @@
+/* Copyright 2010-2011 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.
+ */
+#include "qman_private.h"
+
+#define MAX_FQID (0x00ff)
+#define QM_FQD_BLOCK_SIZE 64
+#define QM_FQD_AR(0xC10)
+
+static u32 fqid_max;
+static u64 qman_ccsr_start;
+static u64 qman_ccsr_size;
+
+static const char * const state_txt[] = {
+   "Out of Service",
+   "Retired",
+   "Tentatively Scheduled",
+   "Truly Scheduled",
+   "Parked",
+   "Active, Active Held or Held Suspended",
+   "Unknown State 6",
+   "Unknown State 7",
+   NULL,
+};
+
+static const u8 fqd_states[] = {
+   QM_MCR_NP_STATE_OOS, QM_MCR_NP_STATE_RETIRED, QM_MCR_NP_STATE_TEN_SCHED,
+   QM_MCR_NP_STATE_TRU_SCHED, QM_MCR_NP_STATE_PARKED,
+   QM_MCR_NP_STATE_ACTIVE};
+
+struct mask_to_text {
+   u16 mask;
+   const char *txt;
+};
+
+struct mask_filter_s {
+   u16 mask;
+   u8 filter;
+};
+
+static const struct mask_filter_s mask_filter[] = {
+   {QM_FQCTRL_PREFERINCACHE, 0},
+   {QM_FQCTRL_PREFERINCACHE, 1},
+   {QM_FQCTRL_HOLDACTIVE, 0},
+   {QM_FQCTRL_HOLDACTIVE, 1},
+   {QM_FQCTRL_AVOI

[RFC 00/10] Freescale DPAA B/QMan drivers

2015-02-04 Thread Emil Medve

Hello,


This is the first attempt to publish the Freescale DPAA B/QMan drivers. They are
not to be applied yet.  At this stage, this is more or less the drivers from the
Freescale PowerPC SDK roughly squashed and split in a sequence of component
patches. They still needs some work and cleanup before we expect to have them
applied, but we appreciate early feedback


Cheers,


Geoff Thorpe (8):
  fsl_bman: Add drivers for the Freescale DPAA BMan
  fsl_qman: Add drivers for the Freescale DPAA QMan
  powerpc/mpc85xx: Add platform support for the Freescale DPAA BMan
  powerpc/mpc85xx: Add platform support for the Freescale DPAA QMan
  fsl_bman: Add self-tester
  fsl_qman: Add self-tester
  fsl_bman: Add debugfs support
  fsl_qman: Add debugfs support

Hai-Ying Wang (2):
  fsl_bman: Add HOTPLUG_CPU support
  fsl_qman: Add HOTPLUG_CPU support

 arch/powerpc/Kconfig|   33 +-
 arch/powerpc/platforms/85xx/Kconfig |   11 +-
 arch/powerpc/platforms/85xx/corenet_generic.c   |   26 +-
 arch/powerpc/platforms/85xx/p1023_rdb.c |   26 +-
 drivers/staging/Kconfig |4 +-
 drivers/staging/Makefile|1 +
 drivers/staging/fsl_qbman/Kconfig   |  188 ++
 drivers/staging/fsl_qbman/Makefile  |   23 +
 drivers/staging/fsl_qbman/bman_config.c |  611 ++
 drivers/staging/fsl_qbman/bman_debugfs.c|  119 +
 drivers/staging/fsl_qbman/bman_driver.c |  373 
 drivers/staging/fsl_qbman/bman_high.c   | 1055 +
 drivers/staging/fsl_qbman/bman_low.h|  524 +
 drivers/staging/fsl_qbman/bman_private.h|  149 ++
 drivers/staging/fsl_qbman/bman_test.c   |   56 +
 drivers/staging/fsl_qbman/bman_test.h   |   44 +
 drivers/staging/fsl_qbman/bman_test_high.c  |  181 ++
 drivers/staging/fsl_qbman/bman_test_thresh.c|  196 ++
 drivers/staging/fsl_qbman/dpa_alloc.c   |  573 +
 drivers/staging/fsl_qbman/dpa_sys.h |  294 +++
 drivers/staging/fsl_qbman/qbman_driver.c|   85 +
 drivers/staging/fsl_qbman/qman_config.c |  991 +
 drivers/staging/fsl_qbman/qman_debugfs.c| 1326 
 drivers/staging/fsl_qbman/qman_driver.c |  548 +
 drivers/staging/fsl_qbman/qman_high.c   | 2624 +++
 drivers/staging/fsl_qbman/qman_low.h| 1302 +++
 drivers/staging/fsl_qbman/qman_private.h|  283 +++
 drivers/staging/fsl_qbman/qman_test.c   |   57 +
 drivers/staging/fsl_qbman/qman_test.h   |   43 +
 drivers/staging/fsl_qbman/qman_test_high.c  |  213 ++
 drivers/staging/fsl_qbman/qman_test_hotpotato.c |  497 +
 drivers/staging/fsl_qbman/qman_utility.c|  129 ++
 include/linux/fsl_bman.h|  517 +
 include/linux/fsl_qman.h| 1955 +
 34 files changed, 15032 insertions(+), 25 deletions(-)
 create mode 100644 drivers/staging/fsl_qbman/Kconfig
 create mode 100644 drivers/staging/fsl_qbman/Makefile
 create mode 100644 drivers/staging/fsl_qbman/bman_config.c
 create mode 100644 drivers/staging/fsl_qbman/bman_debugfs.c
 create mode 100644 drivers/staging/fsl_qbman/bman_driver.c
 create mode 100644 drivers/staging/fsl_qbman/bman_high.c
 create mode 100644 drivers/staging/fsl_qbman/bman_low.h
 create mode 100644 drivers/staging/fsl_qbman/bman_private.h
 create mode 100644 drivers/staging/fsl_qbman/bman_test.c
 create mode 100644 drivers/staging/fsl_qbman/bman_test.h
 create mode 100644 drivers/staging/fsl_qbman/bman_test_high.c
 create mode 100644 drivers/staging/fsl_qbman/bman_test_thresh.c
 create mode 100644 drivers/staging/fsl_qbman/dpa_alloc.c
 create mode 100644 drivers/staging/fsl_qbman/dpa_sys.h
 create mode 100644 drivers/staging/fsl_qbman/qbman_driver.c
 create mode 100644 drivers/staging/fsl_qbman/qman_config.c
 create mode 100644 drivers/staging/fsl_qbman/qman_debugfs.c
 create mode 100644 drivers/staging/fsl_qbman/qman_driver.c
 create mode 100644 drivers/staging/fsl_qbman/qman_high.c
 create mode 100644 drivers/staging/fsl_qbman/qman_low.h
 create mode 100644 drivers/staging/fsl_qbman/qman_private.h
 create mode 100644 drivers/staging/fsl_qbman/qman_test.c
 create mode 100644 drivers/staging/fsl_qbman/qman_test.h
 create mode 100644 drivers/staging/fsl_qbman/qman_test_high.c
 create mode 100644 drivers/staging/fsl_qbman/qman_test_hotpotato.c
 create mode 100644 drivers/staging/fsl_qbman/qman_utility.c
 create mode 100644 include/linux/fsl_bman.h
 create mode 100644 include/linux/fsl_qman.h

-- 
2.2.2
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC 06/10] fsl_qman: Add self-tester

2015-02-04 Thread Emil Medve
From: Geoff Thorpe 

Change-Id: I314d36d94717cfc34053b6212899f71cb729d16c
Signed-off-by: Geoff Thorpe 
---
 drivers/staging/fsl_qbman/Kconfig   |  24 ++
 drivers/staging/fsl_qbman/Makefile  |  24 +-
 drivers/staging/fsl_qbman/qman_test.c   |  57 +++
 drivers/staging/fsl_qbman/qman_test.h   |  43 ++
 drivers/staging/fsl_qbman/qman_test_high.c  | 213 ++
 drivers/staging/fsl_qbman/qman_test_hotpotato.c | 497 
 6 files changed, 848 insertions(+), 10 deletions(-)
 create mode 100644 drivers/staging/fsl_qbman/qman_test.c
 create mode 100644 drivers/staging/fsl_qbman/qman_test.h
 create mode 100644 drivers/staging/fsl_qbman/qman_test_high.c
 create mode 100644 drivers/staging/fsl_qbman/qman_test_hotpotato.c

diff --git a/drivers/staging/fsl_qbman/Kconfig 
b/drivers/staging/fsl_qbman/Kconfig
index 1875dbf..fdf2f3b 100644
--- a/drivers/staging/fsl_qbman/Kconfig
+++ b/drivers/staging/fsl_qbman/Kconfig
@@ -94,6 +94,30 @@ config FSL_QMAN_CONFIG
  linux image is running as a guest OS under the hypervisor, only one
  guest OS ("the control plane") needs this option.
 
+config FSL_QMAN_TEST
+   tristate "QMan self-tests"
+   default n
+   ---help---
+ This option compiles self-test code for QMan.
+
+config FSL_QMAN_TEST_HIGH
+   bool "QMan high-level self-test"
+   depends on FSL_QMAN_TEST
+   default y
+   ---help---
+ This requires the presence of cpu-affine portals, and performs
+ high-level API testing with them (whichever portal(s) are affine to
+ the cpu(s) the test executes on).
+
+config FSL_QMAN_TEST_STASH_POTATO
+   bool "QMan 'hot potato' data-stashing self-test"
+   depends on FSL_QMAN_TEST
+   default y
+   ---help---
+ This performs a "hot potato" style test enqueuing/dequeuing a frame
+ across a series of FQs scheduled to different portals (and cpus), with
+ DQRR, data and context stashing always on.
+
 # H/w settings that can be hard-coded for now.
 config FSL_QMAN_FQD_SZ
int "size of Frame Queue Descriptor region"
diff --git a/drivers/staging/fsl_qbman/Makefile 
b/drivers/staging/fsl_qbman/Makefile
index 0fcdd84..04d61f7 100644
--- a/drivers/staging/fsl_qbman/Makefile
+++ b/drivers/staging/fsl_qbman/Makefile
@@ -1,15 +1,19 @@
 # Common
-obj-$(CONFIG_FSL_DPA)  += dpa_alloc.o
-obj-$(CONFIG_HAS_FSL_QBMAN)+= qbman_driver.o
+obj-$(CONFIG_FSL_DPA)   += dpa_alloc.o
+obj-$(CONFIG_HAS_FSL_QBMAN) += qbman_driver.o
 
 # Bman
-obj-$(CONFIG_FSL_BMAN) += bman_high.o
-obj-$(CONFIG_FSL_BMAN_CONFIG)  += bman_config.o bman_driver.o
-obj-$(CONFIG_FSL_BMAN_TEST)+= bman_tester.o
-bman_tester-y   = bman_test.o
-bman_tester-$(CONFIG_FSL_BMAN_TEST_HIGH)   += bman_test_high.o
-bman_tester-$(CONFIG_FSL_BMAN_TEST_THRESH) += bman_test_thresh.o
+obj-$(CONFIG_FSL_BMAN)  += bman_high.o
+obj-$(CONFIG_FSL_BMAN_CONFIG)   += bman_config.o bman_driver.o
+obj-$(CONFIG_FSL_BMAN_TEST) += bman_tester.o
+bman_tester-y= bman_test.o
+bman_tester-$(CONFIG_FSL_BMAN_TEST_HIGH)+= bman_test_high.o
+bman_tester-$(CONFIG_FSL_BMAN_TEST_THRESH)  += bman_test_thresh.o
 
 # Qman
-obj-$(CONFIG_FSL_QMAN) += qman_high.o qman_utility.o
-obj-$(CONFIG_FSL_QMAN_CONFIG)  += qman_config.o qman_driver.o
+obj-$(CONFIG_FSL_QMAN)  += qman_high.o qman_utility.o
+obj-$(CONFIG_FSL_QMAN_CONFIG)   += qman_config.o qman_driver.o
+obj-$(CONFIG_FSL_QMAN_TEST) += qman_tester.o
+qman_tester-y= qman_test.o
+qman_tester-$(CONFIG_FSL_QMAN_TEST_HIGH)+= qman_test_high.o
+qman_tester-$(CONFIG_FSL_QMAN_TEST_STASH_POTATO) += qman_test_hotpotato.o
diff --git a/drivers/staging/fsl_qbman/qman_test.c 
b/drivers/staging/fsl_qbman/qman_test.c
new file mode 100644
index 000..09d8ea6
--- /dev/null
+++ b/drivers/staging/fsl_qbman/qman_test.c
@@ -0,0 +1,57 @@
+/* Copyright 2008-2011 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 produ

[RFC 09/10] fsl_bman: Add HOTPLUG_CPU support

2015-02-04 Thread Emil Medve
From: Hai-Ying Wang 

Change-Id: I863d5c15c7f35f9de4ea3d985e4ff467167924b7
Signed-off-by: Hai-Ying Wang 
---
 drivers/staging/fsl_qbman/bman_driver.c | 45 -
 1 file changed, 44 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/fsl_qbman/bman_driver.c 
b/drivers/staging/fsl_qbman/bman_driver.c
index bab2283..18a6cdd 100644
--- a/drivers/staging/fsl_qbman/bman_driver.c
+++ b/drivers/staging/fsl_qbman/bman_driver.c
@@ -30,6 +30,9 @@
  */
 
 #include "bman_private.h"
+#ifdef CONFIG_HOTPLUG_CPU
+#include 
+#endif
 
 /*
  * Global variables of the max portal/pool number this bman version supported
@@ -180,7 +183,7 @@ static int __init parse_bportals(char *str)
 }
 __setup("bportals=", parse_bportals);
 
-static void bman_offline_cpu(unsigned int cpu)
+static void __cold bman_offline_cpu(unsigned int cpu)
 {
struct bman_portal *p = (struct bman_portal *)affine_bportals[cpu];
const struct bm_portal_config *pcfg;
@@ -192,6 +195,42 @@ static void bman_offline_cpu(unsigned int cpu)
}
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
+static void __cold bman_online_cpu(unsigned int cpu)
+{
+   struct bman_portal *p = (struct bman_portal *)affine_bportals[cpu];
+   const struct bm_portal_config *pcfg;
+
+   if (p) {
+   pcfg = bman_get_bm_portal_config(p);
+   if (pcfg)
+   irq_set_affinity(pcfg->public_cfg.irq, cpumask_of(cpu));
+   }
+}
+
+static int __cold bman_hotplug_cpu_callback(struct notifier_block *nfb,
+   unsigned long action, void *hcpu)
+{
+   unsigned int cpu = (unsigned long)hcpu;
+
+   switch (action) {
+   case CPU_ONLINE:
+   case CPU_ONLINE_FROZEN:
+   bman_online_cpu(cpu);
+   break;
+   case CPU_DOWN_PREPARE:
+   case CPU_DOWN_PREPARE_FROZEN:
+   bman_offline_cpu(cpu);
+   }
+
+   return NOTIFY_OK;
+}
+
+static struct notifier_block bman_hotplug_cpu_notifier = {
+   .notifier_call = bman_hotplug_cpu_callback,
+};
+#endif /* CONFIG_HOTPLUG_CPU */
+
 /* Initialise the Bman driver. The meat of this function deals with portals. 
The
  * following describes the flow of portal-handling, the code "steps" refer to
  * this description;
@@ -326,5 +365,9 @@ int __init bman_init(void)
for_each_cpu(cpu, &offline_cpus)
bman_offline_cpu(cpu);
 
+#ifdef CONFIG_HOTPLUG_CPU
+   register_hotcpu_notifier(&bman_hotplug_cpu_notifier);
+#endif
+
return 0;
 }
-- 
2.2.2
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC 10/10] fsl_qman: Add HOTPLUG_CPU support

2015-02-04 Thread Emil Medve
From: Hai-Ying Wang 

Change-Id: Ica4d1b2b0fd3c3ae5e043663febd9f4cb7c762cf
Signed-off-by: Hai-Ying Wang 
---
 drivers/staging/fsl_qbman/qman_driver.c | 45 +
 1 file changed, 45 insertions(+)

diff --git a/drivers/staging/fsl_qbman/qman_driver.c 
b/drivers/staging/fsl_qbman/qman_driver.c
index 5ca6221..7cd23bc 100644
--- a/drivers/staging/fsl_qbman/qman_driver.c
+++ b/drivers/staging/fsl_qbman/qman_driver.c
@@ -30,6 +30,9 @@
  */
 
 #include "qman_private.h"
+#ifdef CONFIG_HOTPLUG_CPU
+#include 
+#endif
 
 /* Global variable containing revision id (even on non-control plane systems
  * where CCSR isn't available) */
@@ -381,6 +384,45 @@ static void qman_offline_cpu(unsigned int cpu)
}
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
+static void qman_online_cpu(unsigned int cpu)
+{
+   struct qman_portal *p;
+   const struct qm_portal_config *pcfg;
+   p = (struct qman_portal *)affine_portals[cpu];
+   if (p) {
+   pcfg = qman_get_qm_portal_config(p);
+   if (pcfg) {
+   irq_set_affinity(pcfg->public_cfg.irq, cpumask_of(cpu));
+   qman_portal_update_sdest(pcfg, cpu);
+   }
+   }
+}
+
+static int __cpuinit qman_hotplug_cpu_callback(struct notifier_block *nfb,
+   unsigned long action, void *hcpu)
+{
+   unsigned int cpu = (unsigned long)hcpu;
+
+   switch (action) {
+   case CPU_ONLINE:
+   case CPU_ONLINE_FROZEN:
+   qman_online_cpu(cpu);
+   break;
+   case CPU_DOWN_PREPARE:
+   case CPU_DOWN_PREPARE_FROZEN:
+   qman_offline_cpu(cpu);
+   default:
+   break;
+   }
+   return NOTIFY_OK;
+}
+
+static struct notifier_block qman_hotplug_cpu_notifier = {
+   .notifier_call = qman_hotplug_cpu_callback,
+};
+#endif /* CONFIG_HOTPLUG_CPU */
+
 __init int qman_init(void)
 {
struct cpumask slave_cpus;
@@ -499,5 +541,8 @@ __init int qman_init(void)
cpumask_andnot(&offline_cpus, cpu_possible_mask, cpu_online_mask);
for_each_cpu(cpu, &offline_cpus)
qman_offline_cpu(cpu);
+#ifdef CONFIG_HOTPLUG_CPU
+   register_hotcpu_notifier(&qman_hotplug_cpu_notifier);
+#endif
return 0;
 }
-- 
2.2.2
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC 03/10] powerpc/mpc85xx: Add platform support for the Freescale DPAA BMan

2015-02-04 Thread Emil Medve
From: Geoff Thorpe 

Change-Id: I59de17c040cdd304f86306336fcf89f130f7db2d
Signed-off-by: Geoff Thorpe 
---
 arch/powerpc/Kconfig  | 33 +++
 arch/powerpc/platforms/85xx/Kconfig   | 11 +
 arch/powerpc/platforms/85xx/corenet_generic.c | 20 ++--
 arch/powerpc/platforms/85xx/p1023_rdb.c   | 20 +---
 4 files changed, 60 insertions(+), 24 deletions(-)

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 89996f3..7b2e673 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -361,7 +361,7 @@ config PPC_TRANSACTIONAL_MEM
select VSX
default n
---help---
- Support user-mode Transactional Memory on POWERPC.
+Support user-mode Transactional Memory on POWERPC.
 
 config IOMMU_HELPER
def_bool PPC64
@@ -374,7 +374,7 @@ config SWIOTLB
  Support for IO bounce buffering for systems without an IOMMU.
  This allows us to DMA to the full physical address space on
  platforms where the size of a physical address is larger
- than the bus address.  Not all platforms support this.
+ than the bus address.  Not all platforms support this.
 
 config HOTPLUG_CPU
bool "Support for enabling/disabling CPUs"
@@ -410,8 +410,8 @@ config KEXEC
depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP))
help
  kexec is a system call that implements the ability to shutdown your
- current kernel, and to start another kernel.  It is like a reboot
- but it is independent of the system firmware.   And like a reboot
+ current kernel, and to start another kernel.  It is like a reboot
+ but it is independent of the system firmware.   And like a reboot
  you can start any kernel with it, not just Linux.
 
  The name comes from the similarity to the exec system call.
@@ -450,7 +450,7 @@ config IRQ_ALL_CPUS
help
  This option gives the kernel permission to distribute IRQs across
  multiple CPUs.  Saying N here will route all IRQs to the first
- CPU.  Generally saying Y is safe, although some problems have been
+ CPU.  Generally saying Y is safe, although some problems have been
  reported with SMP Power Macintoshes with this option enabled.
 
 config NUMA
@@ -499,9 +499,9 @@ config ARCH_MEMORY_PROBE
depends on MEMORY_HOTPLUG
 
 # Some NUMA nodes have memory ranges that span
-# other nodes.  Even though a pfn is valid and
+# other nodes. Even though a pfn is valid and
 # between a node's start and end pfns, it may not
-# reside on that node.  See memmap_init_zone()
+# reside on that node. See memmap_init_zone()
 # for details.
 config NODES_SPAN_OTHER_NODES
def_bool y
@@ -600,8 +600,8 @@ config FORCE_MAX_ZONEORDER
  This config option is actually maximum order plus one. For example,
  a value of 11 means that the largest free memory block is 2^10 pages.
 
- The page size is not necessarily 4KB.  For example, on 64-bit
- systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES.  Keep
+ The page size is not necessarily 4KB.  For example, on 64-bit
+ systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES.  Keep
  this in mind when choosing a value for this option.
 
 config PPC_SUBPAGE_PROT
@@ -630,7 +630,7 @@ config PPC_DENORMALISATION
default "y" if PPC_POWERNV
---help---
  Add support for handling denormalisation of single precision
- values.  Useful for bare metal only.  If unsure say Y here.
+ values.  Useful for bare metal only.  If unsure say Y here.
 
 config CMDLINE_BOOL
bool "Default bootloader kernel arguments"
@@ -740,7 +740,7 @@ config FSL_SOC
bool
 
 config FSL_PCI
-   bool
+   bool
select PPC_INDIRECT_PCI
select PCI_QUIRKS
 
@@ -778,12 +778,17 @@ config FSL_GTM
help
  Freescale General-purpose Timers support
 
+config HAS_FSL_QBMAN
+   bool "Datapath Acceleration Queue and Buffer management"
+   help
+ Datapath Acceleration Queue and Buffer management
+
 # Yes MCA RS/6000s exist but Linux-PPC does not currently support any
 config MCA
bool
 
 # Platforms that what PCI turned unconditionally just do select PCI
-# in their config node.  Platforms that want to choose at config
+# in their config node. Platforms that want to choose at config
 # time should select PPC_PCI_CHOICE
 config PPC_PCI_CHOICE
bool
@@ -910,14 +915,14 @@ config DYNAMIC_MEMSTART
select NONSTATIC_KERNEL
help
  This option enables the kernel to be loaded at any page aligned
- physical address. The kernel creates a mapping from KERNELBASE to 
+ physical address. The kernel creates a mapping from KERNELBASE to
  the address where the kernel is loaded. The page size here implies
  the TLB page size

[RFC 04/10] powerpc/mpc85xx: Add platform support for the Freescale DPAA QMan

2015-02-04 Thread Emil Medve
From: Geoff Thorpe 

Change-Id: I59de17c040cdd304f86306336fcf89f130f7db2d
Signed-off-by: Geoff Thorpe 
---
 arch/powerpc/platforms/85xx/corenet_generic.c | 8 +++-
 arch/powerpc/platforms/85xx/p1023_rdb.c   | 8 +++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c 
b/arch/powerpc/platforms/85xx/corenet_generic.c
index 74faab7..20b8f9a 100644
--- a/arch/powerpc/platforms/85xx/corenet_generic.c
+++ b/arch/powerpc/platforms/85xx/corenet_generic.c
@@ -198,15 +198,21 @@ static int __init corenet_generic_probe(void)
 }
 
 /* Early setup is required for large chunks of contiguous (and 
coarsely-aligned)
- * memory. The following shoe-horns Bman "init_early" calls into the
+ * memory. The following shoe-horns Q/Bman "init_early" calls into the
  * platform setup to let them parse their CCSR nodes early on.
  */
+#ifdef CONFIG_FSL_QMAN_CONFIG
+void __init qman_init_early(void);
+#endif
 #ifdef CONFIG_FSL_BMAN_CONFIG
 void __init bman_init_early(void);
 #endif
 
 __init void corenet_ds_init_early(void)
 {
+#ifdef CONFIG_FSL_QMAN_CONFIG
+   qman_init_early();
+#endif
 #ifdef CONFIG_FSL_BMAN_CONFIG
bman_init_early();
 #endif
diff --git a/arch/powerpc/platforms/85xx/p1023_rdb.c 
b/arch/powerpc/platforms/85xx/p1023_rdb.c
index 624d3d6..dc69801 100644
--- a/arch/powerpc/platforms/85xx/p1023_rdb.c
+++ b/arch/powerpc/platforms/85xx/p1023_rdb.c
@@ -106,14 +106,20 @@ static int __init p1023_rdb_probe(void)
 }
 
 /* Early setup is required for large chunks of contiguous (and 
coarsely-aligned)
- * memory. The following shoe-horns Bman "init_early" calls into the
+ * memory. The following shoe-horns Q/Bman "init_early" calls into the
  * platform setup to let them parse their CCSR nodes early on. */
+#ifdef CONFIG_FSL_QMAN_CONFIG
+void __init qman_init_early(void);
+#endif
 #ifdef CONFIG_FSL_BMAN_CONFIG
 void __init bman_init_early(void);
 #endif
 
 static __init void p1023_rdb_init_early(void)
 {
+#ifdef CONFIG_FSL_QMAN_CONFIG
+   qman_init_early();
+#endif
 #ifdef CONFIG_FSL_BMAN_CONFIG
bman_init_early();
 #endif
-- 
2.2.2
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[RFC 07/10] fsl_bman: Add debugfs support

2015-02-04 Thread Emil Medve
From: Geoff Thorpe 

Change-Id: I7eea7aea8a58ad0c28451b70801c0d101e88d263
Signed-off-by: Geoff Thorpe 
---
 drivers/staging/fsl_qbman/Kconfig|   7 ++
 drivers/staging/fsl_qbman/Makefile   |   2 +
 drivers/staging/fsl_qbman/bman_debugfs.c | 119 +++
 drivers/staging/fsl_qbman/bman_high.c|  19 +
 drivers/staging/fsl_qbman/dpa_sys.h  |   1 +
 include/linux/fsl_bman.h |   6 ++
 6 files changed, 154 insertions(+)
 create mode 100644 drivers/staging/fsl_qbman/bman_debugfs.c

diff --git a/drivers/staging/fsl_qbman/Kconfig 
b/drivers/staging/fsl_qbman/Kconfig
index fdf2f3b..66a8361 100644
--- a/drivers/staging/fsl_qbman/Kconfig
+++ b/drivers/staging/fsl_qbman/Kconfig
@@ -74,6 +74,13 @@ config FSL_BMAN_TEST_THRESH
  "drainer" thread, and the other threads that they observe exactly
  the depletion state changes that are expected.
 
+config FSL_BMAN_DEBUGFS
+   tristate "BMan debugfs interface"
+   depends on DEBUG_FS
+   default y
+   ---help---
+ This option compiles debugfs code for BMan.
+
 endif # FSL_BMAN
 
 config FSL_QMAN
diff --git a/drivers/staging/fsl_qbman/Makefile 
b/drivers/staging/fsl_qbman/Makefile
index 04d61f7..0287eab 100644
--- a/drivers/staging/fsl_qbman/Makefile
+++ b/drivers/staging/fsl_qbman/Makefile
@@ -9,6 +9,8 @@ obj-$(CONFIG_FSL_BMAN_TEST)  += 
bman_tester.o
 bman_tester-y= bman_test.o
 bman_tester-$(CONFIG_FSL_BMAN_TEST_HIGH)+= bman_test_high.o
 bman_tester-$(CONFIG_FSL_BMAN_TEST_THRESH)  += bman_test_thresh.o
+obj-$(CONFIG_FSL_BMAN_DEBUGFS)  += bman_debugfs_interface.o
+bman_debugfs_interface-y = bman_debugfs.o
 
 # Qman
 obj-$(CONFIG_FSL_QMAN)  += qman_high.o qman_utility.o
diff --git a/drivers/staging/fsl_qbman/bman_debugfs.c 
b/drivers/staging/fsl_qbman/bman_debugfs.c
new file mode 100644
index 000..b93e705
--- /dev/null
+++ b/drivers/staging/fsl_qbman/bman_debugfs.c
@@ -0,0 +1,119 @@
+/* Copyright 2010-2011 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.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static struct dentry *dfs_root; /* debugfs root directory */
+
+/***
+ *  Query Buffer Pool State
+ 
**/
+static int query_bp_state_show(struct seq_file *file, void *offset)
+{
+   int ret;
+   struct bm_pool_state state;
+   int i, j;
+   u32 mask;
+
+   memset(&state, 0, sizeof(struct bm_pool_state));
+   ret = bman_query_pools(&state);
+   if (ret) {
+   seq_printf(file, "Error %d\n", ret);
+   return 0;
+   }
+   seq_puts(file, "bp_id  free_buffers_avail  bp_depleted\n");
+   for (i = 0; i < 2; i++) {
+   mask = 0x8000;
+   for (j = 0; j < 32; j++) {
+   seq_printf(file,
+"  %-2u   %-3s %-3s\n",
+(i*32)+j,
+(state.as.state.__state[i] & mask) ? "no" : "yes",
+  

[RFC 05/10] fsl_bman: Add self-tester

2015-02-04 Thread Emil Medve
From: Geoff Thorpe 

Change-Id: If1b44bb013addc1e855c73a4e6ff74bc8b6e4829
Signed-off-by: Geoff Thorpe 
---
 drivers/staging/fsl_qbman/Kconfig|  26 
 drivers/staging/fsl_qbman/Makefile   |  16 ++-
 drivers/staging/fsl_qbman/bman_test.c|  56 
 drivers/staging/fsl_qbman/bman_test.h|  44 ++
 drivers/staging/fsl_qbman/bman_test_high.c   | 181 +
 drivers/staging/fsl_qbman/bman_test_thresh.c | 196 +++
 6 files changed, 513 insertions(+), 6 deletions(-)
 create mode 100644 drivers/staging/fsl_qbman/bman_test.c
 create mode 100644 drivers/staging/fsl_qbman/bman_test.h
 create mode 100644 drivers/staging/fsl_qbman/bman_test_high.c
 create mode 100644 drivers/staging/fsl_qbman/bman_test_thresh.c

diff --git a/drivers/staging/fsl_qbman/Kconfig 
b/drivers/staging/fsl_qbman/Kconfig
index db90fe5..1875dbf 100644
--- a/drivers/staging/fsl_qbman/Kconfig
+++ b/drivers/staging/fsl_qbman/Kconfig
@@ -48,6 +48,32 @@ config FSL_BMAN_CONFIG
  linux image is running as a guest OS under the hypervisor, only one
  guest OS ("the control plane") needs this option.
 
+config FSL_BMAN_TEST
+   tristate "BMan self-tests"
+   default n
+   ---help---
+ This option compiles self-test code for BMan.
+
+config FSL_BMAN_TEST_HIGH
+   bool "BMan high-level self-test"
+   depends on FSL_BMAN_TEST
+   default y
+   ---help---
+ This requires the presence of cpu-affine portals, and performs
+ high-level API testing with them (whichever portal(s) are affine to
+ the cpu(s) the test executes on).
+
+config FSL_BMAN_TEST_THRESH
+   bool "BMan threshold test"
+   depends on FSL_BMAN_TEST
+   default y
+   ---help---
+ Multi-threaded (SMP) test of BMan pool depletion. A pool is seeded
+ before multiple threads (one per cpu) create pool objects to track
+ depletion state changes. The pool is then drained to empty by a
+ "drainer" thread, and the other threads that they observe exactly
+ the depletion state changes that are expected.
+
 endif # FSL_BMAN
 
 config FSL_QMAN
diff --git a/drivers/staging/fsl_qbman/Makefile 
b/drivers/staging/fsl_qbman/Makefile
index 399d87e..0fcdd84 100644
--- a/drivers/staging/fsl_qbman/Makefile
+++ b/drivers/staging/fsl_qbman/Makefile
@@ -1,11 +1,15 @@
 # Common
-obj-$(CONFIG_FSL_DPA)  += dpa_alloc.o
-obj-$(CONFIG_HAS_FSL_QBMAN)+= qbman_driver.o
+obj-$(CONFIG_FSL_DPA)  += dpa_alloc.o
+obj-$(CONFIG_HAS_FSL_QBMAN)+= qbman_driver.o
 
 # Bman
-obj-$(CONFIG_FSL_BMAN) += bman_high.o
-obj-$(CONFIG_FSL_BMAN_CONFIG)  += bman_config.o bman_driver.o
+obj-$(CONFIG_FSL_BMAN) += bman_high.o
+obj-$(CONFIG_FSL_BMAN_CONFIG)  += bman_config.o bman_driver.o
+obj-$(CONFIG_FSL_BMAN_TEST)+= bman_tester.o
+bman_tester-y   = bman_test.o
+bman_tester-$(CONFIG_FSL_BMAN_TEST_HIGH)   += bman_test_high.o
+bman_tester-$(CONFIG_FSL_BMAN_TEST_THRESH) += bman_test_thresh.o
 
 # Qman
-obj-$(CONFIG_FSL_QMAN) += qman_high.o qman_utility.o
-obj-$(CONFIG_FSL_QMAN_CONFIG)  += qman_config.o qman_driver.o
+obj-$(CONFIG_FSL_QMAN) += qman_high.o qman_utility.o
+obj-$(CONFIG_FSL_QMAN_CONFIG)  += qman_config.o qman_driver.o
diff --git a/drivers/staging/fsl_qbman/bman_test.c 
b/drivers/staging/fsl_qbman/bman_test.c
new file mode 100644
index 000..1a261ee
--- /dev/null
+++ b/drivers/staging/fsl_qbman/bman_test.c
@@ -0,0 +1,56 @@
+/* Copyright 2008-2011 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 Freesca

[RFC 01/10] fsl_bman: Add drivers for the Freescale DPAA BMan

2015-02-04 Thread Emil Medve
From: Geoff Thorpe 

Change-Id: I075944acf740dbaae861104c17a9ff7247dec1be
Signed-off-by: Geoff Thorpe 
---
 drivers/staging/Kconfig  |4 +-
 drivers/staging/Makefile |1 +
 drivers/staging/fsl_qbman/Kconfig|   52 ++
 drivers/staging/fsl_qbman/Makefile   |7 +
 drivers/staging/fsl_qbman/bman_config.c  |  611 ++
 drivers/staging/fsl_qbman/bman_driver.c  |  330 ++
 drivers/staging/fsl_qbman/bman_high.c| 1033 ++
 drivers/staging/fsl_qbman/bman_low.h |  524 +++
 drivers/staging/fsl_qbman/bman_private.h |  149 +
 drivers/staging/fsl_qbman/dpa_alloc.c|  404 
 drivers/staging/fsl_qbman/dpa_sys.h  |  235 +++
 drivers/staging/fsl_qbman/qbman_driver.c |   41 ++
 include/linux/fsl_bman.h |  511 +++
 13 files changed, 3901 insertions(+), 1 deletion(-)
 create mode 100644 drivers/staging/fsl_qbman/Kconfig
 create mode 100644 drivers/staging/fsl_qbman/Makefile
 create mode 100644 drivers/staging/fsl_qbman/bman_config.c
 create mode 100644 drivers/staging/fsl_qbman/bman_driver.c
 create mode 100644 drivers/staging/fsl_qbman/bman_high.c
 create mode 100644 drivers/staging/fsl_qbman/bman_low.h
 create mode 100644 drivers/staging/fsl_qbman/bman_private.h
 create mode 100644 drivers/staging/fsl_qbman/dpa_alloc.c
 create mode 100644 drivers/staging/fsl_qbman/dpa_sys.h
 create mode 100644 drivers/staging/fsl_qbman/qbman_driver.c
 create mode 100644 include/linux/fsl_bman.h

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 815de37..ffa8b2f 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -5,7 +5,7 @@ menuconfig STAGING
  This option allows you to select a number of drivers that are
  not of the "normal" Linux kernel quality level.  These drivers
  are placed here in order to get a wider audience to make use of
- them.  Please note that these drivers are under heavy
+ them.  Please note that these drivers are under heavy
  development, may or may not work, and may contain userspace
  interfaces that most likely will be changed in the near
  future.
@@ -106,4 +106,6 @@ source "drivers/staging/unisys/Kconfig"
 
 source "drivers/staging/clocking-wizard/Kconfig"
 
+source "drivers/staging/fsl_qbman/Kconfig"
+
 endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 33c640b..5403c54 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -45,3 +45,4 @@ obj-$(CONFIG_GS_FPGABOOT) += gs_fpgaboot/
 obj-$(CONFIG_CRYPTO_SKEIN) += skein/
 obj-$(CONFIG_UNISYSSPAR)   += unisys/
 obj-$(CONFIG_COMMON_CLK_XLNX_CLKWZRD)  += clocking-wizard/
+obj-$(CONFIG_FSL_DPA)  += fsl_qbman/
diff --git a/drivers/staging/fsl_qbman/Kconfig 
b/drivers/staging/fsl_qbman/Kconfig
new file mode 100644
index 000..9bf4e67
--- /dev/null
+++ b/drivers/staging/fsl_qbman/Kconfig
@@ -0,0 +1,52 @@
+config FSL_DPA
+   bool "Freescale Datapath Buffer management"
+   depends on HAS_FSL_QBMAN
+   default y
+
+menu "Freescale Datapath BMan options"
+   depends on FSL_DPA
+
+config FSL_DPA_CHECKING
+   bool "additional driver checking"
+   default n
+   ---help---
+ Compiles in additional checks to sanity-check the drivers and any
+ use of it by other code. Not recommended for performance.
+
+config FSL_DPA_CAN_WAIT
+   bool
+   default y
+
+config FSL_DPA_CAN_WAIT_SYNC
+   bool
+   default y
+
+config FSL_DPA_PIRQ_FAST
+   bool
+   default y
+
+config FSL_DPA_PIRQ_SLOW
+   bool
+   default y
+
+config FSL_DPA_PORTAL_SHARE
+   bool
+   default y
+
+config FSL_BMAN
+   bool "Freescale Buffer Manager (BMan) support"
+   default y
+
+if FSL_BMAN
+
+config FSL_BMAN_CONFIG
+   bool "BMan device management"
+   default y
+   ---help---
+ If this linux image is running natively, you need this option. If this
+ linux image is running as a guest OS under the hypervisor, only one
+ guest OS ("the control plane") needs this option.
+
+endif # FSL_BMAN
+
+endmenu
diff --git a/drivers/staging/fsl_qbman/Makefile 
b/drivers/staging/fsl_qbman/Makefile
new file mode 100644
index 000..d6e3605
--- /dev/null
+++ b/drivers/staging/fsl_qbman/Makefile
@@ -0,0 +1,7 @@
+# Common
+obj-$(CONFIG_FSL_DPA)  += dpa_alloc.o
+obj-$(CONFIG_HAS_FSL_QBMAN)+= qbman_driver.o
+
+# Bman
+obj-$(CONFIG_FSL_BMAN) += bman_high.o
+obj-$(CONFIG_FSL_BMAN_CONFIG)  += bman_config.o bman_driver.o
diff --git a/drivers/staging/fsl_qbman/bman_config.c 
b/drivers/staging/fsl_qbman/bman_config.c
new file mode 100644
index 000..1cd1d9a
--- /dev/null
+++ b/drivers/staging/fsl_qbman/bman_config.c
@@ -0,0 +1,611 @@
+/* Copyright (c) 2009-2012 Freescale Semiconductor, Inc.
+ *
+ * Redistribution and use in source and binary forms, with o

Re: [RFC 00/10] Freescale DPAA B/QMan drivers

2015-02-04 Thread Emil Medve
Hello Greg,


Thanks for looking at this

On 02/04/2015 12:40 PM, Greg KH wrote:
> On Wed, Feb 04, 2015 at 08:48:32AM -0600, Emil Medve wrote:
>>
>> Hello,
>>
>>
>> This is the first attempt to publish the Freescale DPAA B/QMan drivers. They 
>> are
>> not to be applied yet.  At this stage, this is more or less the drivers from 
>> the
>> Freescale PowerPC SDK roughly squashed and split in a sequence of component
>> patches. They still needs some work and cleanup before we expect to have them
>> applied, but we appreciate early feedback
> 
> First off, why put these in staging?  What's keeping them from being
> merged "properly"?

I was thinking they'll go into drivers/soc. Past some cleanup and some
integration issues, nothing holds them back

> Secondly, if they are going to go into staging, then I need a TODO file
> in the directory of the driver listing what needs to be done to move the
> code out of staging, and who is responsible for the code.  Ideally a
> MAINTAINERS entry as well.

Will get both lists, say, for the next post

> And finally, staging drivers should be self-contained, your .h files:
> 
>>  include/linux/fsl_bman.h|  517 +
>>  include/linux/fsl_qman.h| 1955 +
> 
> Need to be in drivers/staging// not in include/linux/
> espeically as nothing outside of your driver needs these .h files.

These files contain the public interface(s) used by other devices
connected to the B/QMan: FMan, PME, RMan, DCE, etc. Every driver/piece
of code in need of a HW queue (QMan) or HW buffer allocator (BMan) will
use these files


Cheers,
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC 00/10] Freescale DPAA B/QMan drivers

2015-02-05 Thread Emil Medve
Hello Dan,


Thanks for the reply

On 02/05/2015 02:41 AM, Dan Carpenter wrote:
> Normally, for staging drivers we just require the TODO and a maintainer
> and we merge things as-is.  There isn't really much review of the code.

I think I'll go for drivers/soc as we have quite a handful of other
drivers using this code that already decided not to be located into staging


Cheers,
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [RFC 00/10] Freescale DPAA B/QMan drivers

2015-02-05 Thread Emil Medve
Hello Bob,


On 02/05/2015 09:48 AM, Bob Cochran wrote:
> On 02/04/2015 09:48 AM, Emil Medve wrote:
>>
>> Hello,
>>
>>
>> This is the first attempt to publish the Freescale DPAA B/QMan
>> drivers. They are
>> not to be applied yet.  At this stage, this is more or less the
>> drivers from the
>> Freescale PowerPC SDK roughly squashed and split in a sequence of
>> component
>> patches. They still needs some work and cleanup before we expect to
>> have them
>> applied, but we appreciate early feedback
> 
> 
> Hi Emil,
> 
> I had thought to try to apply these patches and build it, but I won't
> get very far using it without FMAN (on my t1040).   I searched through
> the mail archives and didn't find FMAN patches other than for the device
> tree.   I also don't see it in the mainline tree.
> 
> If FMAN patches have already been submitted, please point me to it.
> 
> If not, then please let me know when we will see code to support FMAN.

Let me inquire with the FMan guy here. I'll get back to you on this,
however, don't hold your breath. There might be some weeks before the
FMan driver will hit the e-mail lists

> Also, is it your intention for the same QMAN/BMAN drivers to be used
> with both FMAN and the LS AIOP?

These drivers (with some upcoming updates) are expected to be use on all
QorIQ and LS1 devices. The programming model for LS2 (which includes the
AIOP and friends) seems to have a different programming model and these
drivers will not be usable there


Cheers,


> Thank you,
> 
> Bob
> 
> 
> 
> 
> 
>>
>>
>> Cheers,
>>
>>
>> Geoff Thorpe (8):
>>fsl_bman: Add drivers for the Freescale DPAA BMan
>>fsl_qman: Add drivers for the Freescale DPAA QMan
>>powerpc/mpc85xx: Add platform support for the Freescale DPAA BMan
>>powerpc/mpc85xx: Add platform support for the Freescale DPAA QMan
>>fsl_bman: Add self-tester
>>fsl_qman: Add self-tester
>>fsl_bman: Add debugfs support
>>fsl_qman: Add debugfs support
>>
>> Hai-Ying Wang (2):
>>fsl_bman: Add HOTPLUG_CPU support
>>fsl_qman: Add HOTPLUG_CPU support
>>
>>   arch/powerpc/Kconfig|   33 +-
>>   arch/powerpc/platforms/85xx/Kconfig |   11 +-
>>   arch/powerpc/platforms/85xx/corenet_generic.c   |   26 +-
>>   arch/powerpc/platforms/85xx/p1023_rdb.c |   26 +-
>>   drivers/staging/Kconfig |4 +-
>>   drivers/staging/Makefile|1 +
>>   drivers/staging/fsl_qbman/Kconfig   |  188 ++
>>   drivers/staging/fsl_qbman/Makefile  |   23 +
>>   drivers/staging/fsl_qbman/bman_config.c |  611 ++
>>   drivers/staging/fsl_qbman/bman_debugfs.c|  119 +
>>   drivers/staging/fsl_qbman/bman_driver.c |  373 
>>   drivers/staging/fsl_qbman/bman_high.c   | 1055 +
>>   drivers/staging/fsl_qbman/bman_low.h|  524 +
>>   drivers/staging/fsl_qbman/bman_private.h|  149 ++
>>   drivers/staging/fsl_qbman/bman_test.c   |   56 +
>>   drivers/staging/fsl_qbman/bman_test.h   |   44 +
>>   drivers/staging/fsl_qbman/bman_test_high.c  |  181 ++
>>   drivers/staging/fsl_qbman/bman_test_thresh.c|  196 ++
>>   drivers/staging/fsl_qbman/dpa_alloc.c   |  573 +
>>   drivers/staging/fsl_qbman/dpa_sys.h |  294 +++
>>   drivers/staging/fsl_qbman/qbman_driver.c|   85 +
>>   drivers/staging/fsl_qbman/qman_config.c |  991 +
>>   drivers/staging/fsl_qbman/qman_debugfs.c| 1326 
>>   drivers/staging/fsl_qbman/qman_driver.c |  548 +
>>   drivers/staging/fsl_qbman/qman_high.c   | 2624
>> +++
>>   drivers/staging/fsl_qbman/qman_low.h| 1302 +++
>>   drivers/staging/fsl_qbman/qman_private.h|  283 +++
>>   drivers/staging/fsl_qbman/qman_test.c   |   57 +
>>   drivers/staging/fsl_qbman/qman_test.h   |   43 +
>>   drivers/staging/fsl_qbman/qman_test_high.c  |  213 ++
>>   drivers/staging/fsl_qbman/qman_test_hotpotato.c |  497 +
>>   drivers/staging/fsl_qbman/qman_utility.c|  129 ++
>>   include/linux/fsl_bman.h|  517 +
>>   include/linux/fsl_qman.h| 1955
>> +
>>   34 files changed, 15032 insertions(+), 25 deletions(-)
>>   create mode 100644 drivers/staging/fsl_qbman/Kconfig
>>   create mode 100644 drivers/staging/fsl