Re: [PATCH v2 1/7] staging: fsl-mc: MC bus IRQ support

2015-05-07 Thread German Rivera
On 05/07/2015 08:03 AM, Dan Carpenter wrote: On Wed, May 06, 2015 at 04:28:22PM -0500, J. German Rivera wrote: +/* + * FIXME: Enable this code when the GIC-ITS MC support patch is merged + */ +#ifdef GIC_ITS_MC_SUPPORT +static int mc_bus_msi_prepare(struct irq_domain *domain, struct device

[PATCH 5/7] staging: fsl-mc: Allow the MC bus driver to run without GIC support

2015-04-28 Thread J. German Rivera
fsl_mc_interrupts_supported(), which can be called from DPAA2 object drivers. Signed-off-by: J. German Rivera Change-Id: I881ab2c45c949e55cfafe1d281a7a31560955e5b Reviewed-on: http://git.am.freescale.net:8181/34712 Tested-by: Review Code-CDREVIEW Reviewed-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/dprc

[PATCH 0/7] staging: fsl-mc: New functionality to the MC bus driver

2015-04-28 Thread J. German Rivera
This patch series includes new functionality for the Freescale fsl-mc bus driver. Patch 1: MC bus IRQ support Patch 2: add device binding path 'driver_override' Patch 3: Propagate driver_override for a child DPRC's children Patch 4: Upgraded MC bus driver to match MC fw 7.0.0 Patch 5: Allow the MC

[PATCH 6/7] staging: fsl-mc: Add locking to serialize mc_send_command() calls

2015-04-28 Thread J. German Rivera
with it will be serialized using a mutex. Otherwise, if the fsl_mc_io object is going to be used in atomic context, mc_semd_command() calls with it will be serialized using a spinlock. Signed-off-by: J. German Rivera Change-Id: Icb770cd36e204ee6a17ad0f81e1d31cc9fe96816 Reviewed-on: http

[PATCH 7/7] staging: fsl-mc: Use DPMCP IRQ and completion var to wait for MC

2015-04-28 Thread J. German Rivera
For most cases, mc_send_command() will wait on this completion variable, instead of doing polling. This completion variable will be signaled from the DPMCP IRQ handler. Signed-off-by: J. German Rivera Change-Id: Iab294be9c00fb029702cc8625eaf29ba058fa960 Reviewed-on: http://git.am.freescal

[PATCH 3/7] staging: fsl-mc: Propagate driver_override for a child DPRC's children

2015-04-28 Thread J. German Rivera
sysfs attribute to vfio_fsl_mc driver, for each of them and rebind them. Signed-off-by: J. German Rivera Change-Id: I51e633367b019da1cd45bd4898e46be577b8ce42 Reviewed-on: http://git.am.freescale.net:8181/34567 Tested-by: Review Code-CDREVIEW Reviewed-by: Stuart Yoder Tested-by: Stuart Yoder

[PATCH 1/7] staging: fsl-mc: MC bus IRQ support

2015-04-28 Thread J. German Rivera
/destroying DPAA2 objects in the DPRC, changing the "plugged" state of DPAA2 objects and moving objects between DPRCs. Signed-off-by: J. German Rivera Change-Id: I2a986c465989c3811de19cfe9ed0b77168250cb1 Reviewed-on: http://git.am.freescale.net:8181/33626 Tested-by: Review Code-CDREVIEW R

[PATCH 2/7] staging: fsl_-mc: add device binding path 'driver_override'

2015-04-28 Thread J. German Rivera
(dprc.1) to specifically bind with driver (vfio-fsl-mc):- - echo vfio-fsl-mc > /sys/bus/fsl-mc/devices/dprc.1/driver_override - echo dprc.1 > /sys/bus/fsl-mc/drivers/fsl_mc_dprc/unbind - echo dprc.1 > /sys/bus/fsl-mc/drivers/vfio-fsl-mc/bind Signed-off-by: J. German Rivera

[PATCH 4/7] staging: fsl-mc: Upgraded MC bus driver to match MC fw 7.0.0

2015-04-28 Thread J. German Rivera
- Migrated MC bus driver to use DPRC flib 0.6. - Changed IRQ setup infrastructure to be able to program MSIs for MC objects in an object-independent way. Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 79 drivers/staging/fsl-mc/bus/dprc-cmd.h

[PATCH v2 2/7] staging: fsl_-mc: add device binding path 'driver_override'

2015-05-06 Thread J. German Rivera
(dprc.1) to specifically bind with driver (vfio-fsl-mc):- - echo vfio-fsl-mc > /sys/bus/fsl-mc/devices/dprc.1/driver_override - echo dprc.1 > /sys/bus/fsl-mc/drivers/fsl_mc_dprc/unbind - echo dprc.1 > /sys/bus/fsl-mc/drivers/vfio-fsl-mc/bind Signed-off-by: J. German Rivera Reviewed-by: Stu

[PATCH v2 0/7] staging: fsl-mc: New functionality to the MC bus driver

2015-05-06 Thread J. German Rivera
This patch series includes new functionality for the Freescale fsl-mc bus driver. Patch 1: MC bus IRQ support Patch 2: add device binding path 'driver_override' Patch 3: Propagate driver_override for a child DPRC's children Patch 4: Upgraded MC bus driver to match MC fw 7.0.0 Patch 5: Allow the MC

[PATCH v2 7/7] staging: fsl-mc: Use DPMCP IRQ and completion var to wait for MC

2015-05-06 Thread J. German Rivera
For most cases, mc_send_command() will wait on this completion variable, instead of doing polling. This completion variable will be signaled from the DPMCP IRQ handler. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder --- Changes in v2: - Use msecs_to_jiffies() instead of HZ in timeo

[PATCH v2 1/7] staging: fsl-mc: MC bus IRQ support

2015-05-06 Thread J. German Rivera
/destroying DPAA2 objects in the DPRC, changing the "plugged" state of DPAA2 objects and moving objects between DPRCs. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder --- Changes in v2: - Addressed comments from Dan Carpenter and Scott Wood: * Removed unnecessary lines f

[PATCH v2 3/7] staging: fsl-mc: Propagate driver_override for a child DPRC's children

2015-05-06 Thread J. German Rivera
sysfs attribute to vfio_fsl_mc driver, for each of them and rebind them. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder Tested-by: Stuart Yoder --- Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c| 14 ++ drivers/staging/fsl-mc/bus/mc-bus.c | 16

[PATCH v2 4/7] staging: fsl-mc: Upgraded MC bus driver to match MC fw 7.0.0

2015-05-06 Thread J. German Rivera
- Migrated MC bus driver to use DPRC API 0.6. - Changed IRQ setup infrastructure to be able to program MSIs for MC objects in an object-independent way. Signed-off-by: J. German Rivera --- Changes in v2: - Addressed comments from Dan Carpenter: * Added #ifdef GIC_ITS_MC_SUPPORT's tha

[PATCH v2 6/7] staging: fsl-mc: Add locking to serialize mc_send_command() calls

2015-05-06 Thread J. German Rivera
() calls with it will be serialized using a spinlock. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder --- Changes in v2: - Relaxed rules for FSL_MC_IO_ATOMIC_CONTEXT_PORTAL. Some drivers (e.g., DPNI) need to send MC commands with the same mc_io object, from both atomic and non

[PATCH v2 5/7] staging: fsl-mc: Allow the MC bus driver to run without GIC support

2015-05-06 Thread J. German Rivera
fsl_mc_interrupts_supported(), which can be called from DPAA2 object drivers. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder --- Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c| 31 +++-- drivers/staging/fsl-mc/bus/mc-allocator.c | 4 drivers

[PATCH RESEND v3 02/11] fsl-mc: msi: Added FSL-MC-specific member to the msi_desc's union

2015-11-24 Thread J. German Rivera
FSL-MC is a bus type different from PCI and platform, so it needs its own member in the msi_desc's union. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: - Addressed comment from Jiang Liu * Added a dedicated structure for FSL-MC in struct msi

[PATCH RESEND v3 05/11] staging: fsl-mc: Extended MC bus allocator to include IRQs

2015-11-24 Thread J. German Rivera
bus object allocator is extended to also provide services to allocate IRQs to DPAA2 devices, from their parent fsl-mc bus IRQ pool. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/mc-allocator.c | 199

[PATCH RESEND v3 09/11] staging: fsl-mc: Fixed bug in dprc_probe() error path

2015-11-24 Thread J. German Rivera
Destroy mc_io in error path in dprc_probe() only if the mc_io was created in this function. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: - Addressed comment from Dan Carpenter: * Renamed goto error labels to indicate what the goto does drivers

[PATCH RESEND v3 03/11] staging: fsl-mc: Added generic MSI support for FSL-MC devices

2015-11-24 Thread J. German Rivera
Created an MSI domain for the fsl-mc bus-- including functions to create a domain, find a domain, alloc/free domain irqs, and bus specific overrides for domain and irq_chip ops. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: - Addressed comments from Marc Zyngier: * Added

[PATCH RESEND v3 06/11] staging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic

2015-11-24 Thread J. German Rivera
tomic mc_io. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c | 4 +++- drivers/staging/fsl-mc/bus/mc-bus.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fsl-mc/bus

[PATCH RESEND v3 00/11] staging: fsl-mc: MC bus MSI support

2015-11-24 Thread J. German Rivera
*** This is a resend of the last iteration of this patch series *** This patch series addresses the following item from the TODO list for the MC bus driver to exit staging: * Interrupt support. For meaningful driver support we need interrupts, and thus need message interrupt support by the bus

[PATCH RESEND v3 08/11] staging: fsl-mc: set MSI domain for DPRC objects

2015-11-24 Thread J. German Rivera
THE MSI domain associated with a root DPRC object is obtained form the device tree. Child DPRCs inherit the parent DPRC MSI domain. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c | 39

[PATCH RESEND v3 01/11] irqdomain: Added domain bus token DOMAIN_BUS_FSL_MC_MSI

2015-11-24 Thread J. German Rivera
Since an FSL-MC bus is a new bus type that is neither PCI nor PLATFORM, we need a new domain bus token to disambiguate the IRQ domain for FSL-MC MSIs. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: none include/linux/irqdomain.h | 1 + 1 file changed, 1

[PATCH RESEND v3 04/11] staging: fsl-mc: Added GICv3-ITS support for FSL-MC MSIs

2015-11-24 Thread J. German Rivera
Added platform-specific MSI support layer for FSL-MC devices. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/Makefile| 1 + .../staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 127

[PATCH RESEND v3 07/11] staging: fsl-mc: Populate the IRQ pool for an MC bus instance

2015-11-24 Thread J. German Rivera
l allocate their necessary MSI IRQs from the DPRC's IRQ pool, in their driver probe function. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c| 24 ++-- drivers/staging/fsl-mc/include/mc

[PATCH RESEND v3 11/11] staging: fsl-mc: Added MSI support to the MC bus driver

2015-11-24 Thread J. German Rivera
Initialize/Cleanup ITS-MSI support for the MC bus driver at driver init/exit time. Associate an MSI domain with each DPAA2 child device. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/mc-bus.c | 12 1 file

[PATCH RESEND v3 10/11] staging: fsl-mc: Added DPRC interrupt handler

2015-11-24 Thread J. German Rivera
-off-by: J. German Rivera --- CHANGE HISTORY Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c | 247 +++ 1 file changed, 247 insertions(+) diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driv

[PATCH v4 01/11] irqdomain: Added domain bus token DOMAIN_BUS_FSL_MC_MSI

2015-12-11 Thread J. German Rivera
Since an FSL-MC bus is a new bus type that is neither PCI nor PLATFORM, we need a new domain bus token to disambiguate the IRQ domain for FSL-MC MSIs. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: none include/linux/irqdomain.h | 1

[PATCH v4 03/11] staging: fsl-mc: Added generic MSI support for FSL-MC devices

2015-12-11 Thread J. German Rivera
Created an MSI domain for the fsl-mc bus-- including functions to create a domain, find a domain, alloc/free domain irqs, and bus specific overrides for domain and irq_chip ops. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: - Addressed comments from Marc Zyngier: * Re

[PATCH v4 10/11] staging: fsl-mc: Added DPRC interrupt handler

2015-12-11 Thread J. German Rivera
-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c | 247 +++ 1 file changed, 247 insertions(+) diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/

[PATCH v4 00/11] staging: fsl-mc: MC bus MSI support

2015-12-11 Thread J. German Rivera
This patch series addresses the following item from the TODO list for the MC bus driver to exit staging: * Interrupt support. For meaningful driver support we need interrupts, and thus need message interrupt support by the bus driver. MC Bus MSI Support Architecture ==

[PATCH v4 08/11] staging: fsl-mc: set MSI domain for DPRC objects

2015-12-11 Thread J. German Rivera
THE MSI domain associated with a root DPRC object is obtained form the device tree. Child DPRCs inherit the parent DPRC MSI domain. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: - Addressed comments from Marc Zyngier: * Changed call to fsl_mc_find_msi_domain() to match new

[PATCH v4 11/11] staging: fsl-mc: Added MSI support to the MC bus driver

2015-12-11 Thread J. German Rivera
Initialize/Cleanup ITS-MSI support for the MC bus driver at driver init/exit time. Associate an MSI domain with each DPAA2 child device. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/mc-bus.c | 12

[PATCH v4 02/11] fsl-mc: msi: Added FSL-MC-specific member to the msi_desc's union

2015-12-11 Thread J. German Rivera
FSL-MC is a bus type different from PCI and platform, so it needs its own member in the msi_desc's union. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: - Addressed comment from Jiang Liu * Added a dedicated structure for FSL-

[PATCH v4 06/11] staging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic

2015-12-11 Thread J. German Rivera
tomic mc_io. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c | 4 +++- drivers/staging/fsl-mc/bus/mc-bus.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH v4 07/11] staging: fsl-mc: Populate the IRQ pool for an MC bus instance

2015-12-11 Thread J. German Rivera
l allocate their necessary MSI IRQs from the DPRC's IRQ pool, in their driver probe function. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/dprc-driver.c| 24 ++-- drivers

[PATCH v4 04/11] staging: fsl-mc: Added GICv3-ITS support for FSL-MC MSIs

2015-12-11 Thread J. German Rivera
Added platform-specific MSI support layer for FSL-MC devices. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: - Addressed comments from Marc Zyngier: * Moved bus type check earlier in its_fsl_mc_msi_prepare() * Removed its_dev_id variable * Changed some assignments to

[PATCH v4 05/11] staging: fsl-mc: Extended MC bus allocator to include IRQs

2015-12-11 Thread J. German Rivera
bus object allocator is extended to also provide services to allocate IRQs to DPAA2 devices, from their parent fsl-mc bus IRQ pool. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: none drivers/staging/fsl-mc/bus/mc-allocator.c | 199

[PATCH v4 09/11] staging: fsl-mc: Fixed bug in dprc_probe() error path

2015-12-11 Thread J. German Rivera
Destroy mc_io in error path in dprc_probe() only if the mc_io was created in this function. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: - Addressed comment from Dan Carpenter: * Renamed goto error labels to indicate what the goto

[PATCH RESEND v4 08/11] staging: fsl-mc: set MSI domain for DPRC objects

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" THE MSI domain associated with a root DPRC object is obtained form the device tree. Child DPRCs inherit the parent DPRC MSI domain. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: - Addressed comments from Marc Zyngier: * Chang

[PATCH RESEND v4 11/11] staging: fsl-mc: Added MSI support to the MC bus driver

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" Initialize/Cleanup ITS-MSI support for the MC bus driver at driver init/exit time. Associate an MSI domain with each DPAA2 child device. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: none drive

[PATCH RESEND v4 05/11] staging: fsl-mc: Extended MC bus allocator to include IRQs

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" All the IRQs for DPAA2 objects in the same DPRC must use the ICID of that DPRC, as their device Id in the GIC-ITS. Thus, all these IRQs must share the same ITT table in the GIC. As a result, a pool of IRQs with the same device Id must be preallocated per DPRC (

[PATCH RESEND v4 09/11] staging: fsl-mc: Fixed bug in dprc_probe() error path

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" Destroy mc_io in error path in dprc_probe() only if the mc_io was created in this function. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: - Addressed comment from Dan Carpenter: * Renamed

[PATCH RESEND v4 03/11] staging: fsl-mc: Added generic MSI support for FSL-MC devices

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" Created an MSI domain for the fsl-mc bus-- including functions to create a domain, find a domain, alloc/free domain irqs, and bus specific overrides for domain and irq_chip ops. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: - Addresse

[PATCH RESEND v4 10/11] staging: fsl-mc: Added DPRC interrupt handler

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" The interrupt handler for DPRC IRQs is added. DPRC IRQs are generated for hot plug events related to DPAA2 objects in a given DPRC. These events include, creating/destroying DPAA2 objects in the DPRC, changing the "plugged" state of DPAA2 object

[PATCH RESEND v4 04/11] staging: fsl-mc: Added GICv3-ITS support for FSL-MC MSIs

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" Added platform-specific MSI support layer for FSL-MC devices. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: - Addressed comments from Marc Zyngier: * Moved bus type check earlier in its_fsl_mc_msi_prepare() * Removed its_dev_i

[PATCH RESEND v4 06/11] staging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" The DPRC built-in portal's mc_io is used to send commands to the MC to program MSIs for MC objects. This is done by the fsl_mc_msi_write_msg() callback, which is invoked by the generic MSI layer with interrupts disabled. As a result, th

[PATCH RESEND v4 07/11] staging: fsl-mc: Populate the IRQ pool for an MC bus instance

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" Scan the corresponding DPRC container to get total count of IRQs needed by all its child DPAA2 objects. Then, preallocate a set of MSI IRQs with the DPRC's ICID (GIT-ITS device Id) to populate the the DPRC's IRQ pool. Each child DPAA2 object in t

[PATCH RESEND v4 00/11] staging: fsl-mc: MC bus MSI support

2016-01-06 Thread J. German Rivera
*** This is a resend of the last iteration of this patch series *** This patch series addresses the following item from the TODO list for the MC bus driver to exit staging: * Interrupt support. For meaningful driver support we need interrupts, and thus need message interrupt support by the bus

[PATCH RESEND v4 01/11] irqdomain: Added domain bus token DOMAIN_BUS_FSL_MC_MSI

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" Since an FSL-MC bus is a new bus type that is neither PCI nor PLATFORM, we need a new domain bus token to disambiguate the IRQ domain for FSL-MC MSIs. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes i

[PATCH RESEND v4 02/11] fsl-mc: msi: Added FSL-MC-specific member to the msi_desc's union

2016-01-06 Thread J. German Rivera
From: "J. German Rivera" FSL-MC is a bus type different from PCI and platform, so it needs its own member in the msi_desc's union. Signed-off-by: J. German Rivera --- CHANGE HISTORY Changes in v4: none Changes in v3: none Changes in v2: - Addressed comment from Jiang

[PATCH v4 0/7] staging: fsl-mc: New functionality to the MC bus driver

2015-06-09 Thread J. German Rivera
This patch series includes new functionality for the Freescale fsl-mc bus driver. Patch 1: MC bus IRQ support Patch 2: add device binding path 'driver_override' Patch 3: Propagate driver_override for a child DPRC's children Patch 4: Upgraded MC bus driver to match MC fw 7.0.0 Patch 5: Allow the MC

[PATCH v4 6/7] staging: fsl-mc: Add locking to serialize mc_send_command() calls

2015-06-09 Thread J. German Rivera
() calls with it will be serialized using a spinlock. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder --- Changes in v4: - Fixed new checkpatch checks drivers/staging/fsl-mc/bus/mc-sys.c | 40 ++--- drivers/staging/fsl-mc/include/mc-sys.h | 23

[PATCH v4 3/7] staging: fsl-mc: Propagate driver_override for a child DPRC's children

2015-06-09 Thread J. German Rivera
sysfs attribute to vfio_fsl_mc driver, for each of them and rebind them. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder Tested-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/dprc-driver.c| 14 ++ drivers/staging/fsl-mc/bus/mc-bus.c | 16 +++- drivers

[PATCH v4 2/7] staging: fsl_-mc: add device binding path 'driver_override'

2015-06-09 Thread J. German Rivera
(dprc.1) to specifically bind with driver (vfio-fsl-mc):- - echo vfio-fsl-mc > /sys/bus/fsl-mc/devices/dprc.1/driver_override - echo dprc.1 > /sys/bus/fsl-mc/drivers/fsl_mc_dprc/unbind - echo dprc.1 > /sys/bus/fsl-mc/drivers/vfio-fsl-mc/bind Signed-off-by: J. German Rivera Reviewed-by: Stu

[PATCH v4 5/7] staging: fsl-mc: Allow the MC bus driver to run without GIC support

2015-06-09 Thread J. German Rivera
fsl_mc_interrupts_supported(), which can be called from DPAA2 object drivers. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder --- drivers/staging/fsl-mc/bus/dprc-driver.c| 31 +++-- drivers/staging/fsl-mc/bus/mc-allocator.c | 4 drivers/staging/fsl-mc/bus/mc-bus.c

[PATCH v4 7/7] staging: fsl-mc: Use DPMCP IRQ and completion var to wait for MC

2015-06-09 Thread J. German Rivera
For most cases, mc_send_command() will wait on this completion variable, instead of doing polling. This completion variable will be signaled from the DPMCP IRQ handler. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder --- Changes in v4: - Fixed new checkpatch warnings and checks

[PATCH v4 1/7] staging: fsl-mc: MC bus IRQ support

2015-06-09 Thread J. German Rivera
/destroying DPAA2 objects in the DPRC, changing the "plugged" state of DPAA2 objects and moving objects between DPRCs. Signed-off-by: J. German Rivera Reviewed-by: Stuart Yoder --- Changes in v4: - Addressed comments from Dan Carpenter and Greg Kroah-Hartman: * Removed all #ifdefe

[PATCH v4 4/7] staging: fsl-mc: Upgraded MC bus driver to match MC fw 7.0.0

2015-06-09 Thread J. German Rivera
- Migrated MC bus driver to use DPRC API 0.6. - Changed IRQ setup infrastructure to be able to program MSIs for MC objects in an object-independent way. Signed-off-by: J. German Rivera --- Changes in v4: - Fixed new checkpatch warnings and checks - Add missing error handling in dprc_probe

[PATCH v8 0/3] staging: fsl-mc: Freescale Management Complex bus driver patch series

2015-03-05 Thread J. German Rivera
This patch series introduces Linux support for the Freescale Management Complex (fsl-mc) hardware. This patch series is dependent on the patch series "ARM64: Add support for FSL's LS2085A SoC" (http://thread.gmane.org/gmane.linux.ports.arm.kernel/351829) The fsl-mc is a hardware resource manager t

[PATCH v8 3/3] staging: fsl-mc: Device driver for FSL-MC DPRC devices

2015-03-05 Thread J. German Rivera
A DPRC (Data Path Resource Container) is an isolation device that contains a set of DPAA networking devices to be assigned to an isolation domain (e.g., a virtual machine). Signed-off-by: J. German Rivera Signed-off-by: Stuart Yoder --- Changes in v8: - Addressed comments from Greg Kroah

[PATCH v8 1/3] staging: fsl-mc: Added Freescale Management Complex APIs

2015-03-05 Thread J. German Rivera
APIs to access the Management Complex (MC) hardware module of Freescale LS2 SoCs. This patch includes APIs to check the MC firmware version and to manipulate DPRC objects in the MC. Signed-off-by: J. German Rivera Signed-off-by: Stuart Yoder --- Changes in v8: - Addressed comments from Greg

[PATCH v8 2/3] staging: fsl-mc: Freescale Management Complex (fsl-mc) bus driver

2015-03-05 Thread J. German Rivera
Platform device driver that sets up the basic bus infrastructure for the fsl-mc bus type, including support for adding/removing fsl-mc devices, register/unregister of fsl-mc drivers, and bus match support to bind devices to drivers. Signed-off-by: J. German Rivera Signed-off-by: Stuart Yoder

[PATCH v9 0/3] staging: fsl-mc: Freescale Management Complex bus driver patch series

2015-03-05 Thread J. German Rivera
This patch series introduces Linux support for the Freescale Management Complex (fsl-mc) hardware. This patch series is dependent on the patch series "ARM64: Add support for FSL's LS2085A SoC" (http://thread.gmane.org/gmane.linux.ports.arm.kernel/351829) The fsl-mc is a hardware resource manager t

[PATCH v9 2/3] staging: fsl-mc: Freescale Management Complex (fsl-mc) bus driver

2015-03-05 Thread J. German Rivera
Platform device driver that sets up the basic bus infrastructure for the fsl-mc bus type, including support for adding/removing fsl-mc devices, register/unregister of fsl-mc drivers, and bus match support to bind devices to drivers. Signed-off-by: J. German Rivera Signed-off-by: Stuart Yoder

[PATCH v9 3/3] staging: fsl-mc: Device driver for FSL-MC DPRC devices

2015-03-05 Thread J. German Rivera
A DPRC (Data Path Resource Container) is an isolation device that contains a set of DPAA networking devices to be assigned to an isolation domain (e.g., a virtual machine). Signed-off-by: J. German Rivera Signed-off-by: Stuart Yoder --- Changes in v9: None Changes in v8: - Addressed comments

[PATCH v9 1/3] staging: fsl-mc: Added Freescale Management Complex APIs

2015-03-05 Thread J. German Rivera
APIs to access the Management Complex (MC) hardware module of Freescale LS2 SoCs. This patch includes APIs to check the MC firmware version and to manipulate DPRC objects in the MC. Signed-off-by: J. German Rivera Signed-off-by: Stuart Yoder --- Changes in v9: - Fixed compilation errors that

[PATCH v3 1/1] staging: fsl-mc: fsl-mc object allocator driver

2015-03-05 Thread J. German Rivera
The fsl-mc object allocator driver manages "allocatable" fsl-mc objects such as DPBPs, DPMCPs and DPCONs. It provides services to other fsl-mc drivers to allocate/deallocate these types of objects. Signed-off-by: J. German Rivera Signed-off-by: Stuart Yoder --- Changes in v3: - Move

[PATCH v3 0/1] drivers/bus: fsl-mc object allocator driver

2015-03-05 Thread J. German Rivera
This patch series introduces the object allocator driver for the Freescale Management Complex (fsl-mc) of QorIQ Ls2 SoCs This patch series is dependent on the patch series drivers/bus: "Freescale Management Complex bus driver patch series Besides adding the object allocator functionality". CHANGE

[PATCH] staging: fsl-mc: Corrected email addresses in TODO file

2015-03-11 Thread J. German Rivera
Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/TODO | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/fsl-mc/TODO b/drivers/staging/fsl-mc/TODO index 49ebfd9..d78288b 100644 --- a/drivers/staging/fsl-mc/TODO +++ b/drivers/staging/fsl-mc/TODO

[PATCH 4/6] staging: fsl-mc: Fix crash in fsl_mc_device_remove()

2015-03-27 Thread J. German Rivera
Only call fsl_mc_io_destroy() if the DPRC being removed actually had an mc_io object associated with. Child DPRCs that have not been bound to the DPRC driver or the VFIO driver will not have an mc_io associated with them. Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/bus/dprc

[PATCH 2/6] staging: fsl-mc: Removed reordering of MC objects during bus scan

2015-03-27 Thread J. German Rivera
-EPROBE_DEFER if such allocations fail. Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/bus/dprc-driver.c | 32 1 file changed, 32 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c index 65de1d75

[PATCH 0/6] staging: fsl-mc: cleanup and minor corrections

2015-03-27 Thread J. German Rivera
This patch series includes some cleanup/refactoring and minor correction patches for the Freescale fsl-mc bus driver. Patch 1: Name MC object devices using decimal numbers Patch 2: Removed reordering of MC objects during bus scan Patch 3: Bind/unbind driver when MC object is plugged/unplugged Patc

[PATCH 1/6] staging: fsl-mc: Name MC object devices using decimal numbers

2015-03-27 Thread J. German Rivera
MC object devices were being named using hexadecimaal numbers. This was not consistent with the object naming conventions used by MC DPLs and the MC restool. Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/bus/mc-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/6] staging: fsl-mc: Bind/unbind driver when MC object is plugged/unplugged

2015-03-27 Thread J. German Rivera
Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/bus/dprc-driver.c | 39 +++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c index f02e5e4..9568eea 100644

[PATCH 6/6] staging: fsl-mc: Changed version matching rules for MC object drivers

2015-03-27 Thread J. German Rivera
object may decide to run even though it cannot use newer functionality of the MC object. As part of this change, the dpmng Flib version was also updated to match the latest MC firmware version. Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/bus/mc-bus.c| 29

[PATCH 5/6] staging: fsl-mc: Refactored fsl_mc_object_allocator driver init/exit

2015-03-27 Thread J. German Rivera
want it to happen before any driver that depends on the MC bus driver gets initialized. Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/bus/Makefile | 12 +--- drivers/staging/fsl-mc/bus/mc-allocator.c | 12 drivers/staging/fsl-mc/bus/mc-bus.c | 8

[PATCH 00/12] staging: fsl-mc: Cleanup and bug fixes

2015-10-13 Thread J. German Rivera
This patch series includes the following code cleanup and bug fixes for the fsl-mc bus driver: Patch 1: Naming cleanup in fsl_mc-portal_allocate Patch 2: fsl_mc_io object refactoring Patch 3: dpmcp opening/closing refactoring Patch 4: Changed dev_info() calls to dev_dbg() Patch 5: Changed types of

[PATCH 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate

2015-10-13 Thread J. German Rivera
mc_adev is a local variable for the allocated dpmcp object. Renamed mc_adev as dpmcp_dev for clarity. --- drivers/staging/fsl-mc/bus/mc-allocator.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc

[PATCH 03/12] staging: fsl-mc: dpmcp opening/closing refactoring

2015-10-13 Thread J. German Rivera
Before, we were opening and closing a mc_io's dpmcp object in fsl_mc_portal_reset(), since that was the only function that was calling dpmcp MC operations. However, it is better for maintainability to open the dpmcp object when it gets associated with an mc_io object, and close it when this associa

[PATCH 04/12] staging: fsl-mc: Changed dev_info() calls to dev_dbg()

2015-10-13 Thread J. German Rivera
Changed dev_info() calls to dev_dbg() in fsl_mc_allocator_probe/fsl_mc_allocator_remove, as they are useful only for debugging. --- drivers/staging/fsl-mc/bus/mc-allocator.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/dri

[PATCH 11/12] staging: fsl-mc: fixed bug in uninitialized root dprc irq count

2015-10-13 Thread J. German Rivera
When initializing the object attributes for the root dprc, the irq_count was uninitialized. Initialize it to 1. --- drivers/staging/fsl-mc/bus/mc-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c index fd13053..4ac3

[PATCH 08/12] staging: fsl-mc: Fixed bug in fsl_mc_allocator_remove

2015-10-13 Thread J. German Rivera
Call fsl_mc_resource_pool_remove_device() only if mc_dev->resource is not NULL. --- drivers/staging/fsl-mc/bus/mc-allocator.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c index 527

[PATCH 09/12] staging: fsl-mc: refactored error exit in allocator probe/remove

2015-10-13 Thread J. German Rivera
Replaced error gotos with direct returns in fsl_mc_allocator_probe() and fsl_mc_allocator_remove(), since the only error handling done in those functions is to exit. Signed-off-by: J. German Rivera --- drivers/staging/fsl-mc/bus/mc-allocator.c | 23 +-- 1 file changed, 9

[PATCH 06/12] staging: fsl-mc: Removed unused DPMCP macros

2015-10-13 Thread J. German Rivera
The macros were a left-over from a previous implementation of the dpmcp APIs and are no longer used. --- drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 79 -- 1 file changed, 79 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h b/drivers/staging/fsl-mc/bu

[PATCH 05/12] staging_fsl-mc: Changed types of flags, portal size in

2015-10-13 Thread J. German Rivera
Changed these two fields from 32-bit integers to 16-bit integers in struct fsl_mc_io, as 32 bits is too much for these fields. This change does not affect other components since fsl_mc_io is an opaque type. --- drivers/staging/fsl-mc/include/mc-sys.h | 4 ++-- 1 file changed, 2 insertions(+), 2 de

[PATCH 07/12] staging: fsl-mc: Fixed alignment of copyright comment

2015-10-13 Thread J. German Rivera
Whitespace cleanup-- add missing spaces in column 1 of copyright --- drivers/staging/fsl-mc/include/dpcon-cmd.h | 60 +++--- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/fsl-mc/include/dpcon-cmd.h b/drivers/staging/fsl-mc/include/dpcon-cm

[PATCH 02/12] staging: fsl-mc: fsl_mc_io object refactoring

2015-10-13 Thread J. German Rivera
Each fsl_mc_io object is associated with an fsl_mc_device object of type "dpmcp" representing the MC portal associated with the fsl_mc_io object. Before, we were representing this association with an fsl_mc_resource pointer. To enhance code clarity, it is more straight forward to use an fsl_mc_devi

[PATCH 12/12] staging: fsl-mc: Added missing initializer in fsl_mc_bus_driver

2015-10-13 Thread J. German Rivera
owner needs to be initialized as THIS_MOUDLE. --- drivers/staging/fsl-mc/bus/mc-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c index 4ac3d07..84db55b 100644 --- a/drivers/staging/fsl-mc/bus/mc-bus.c +++ b/drivers

[PATCH 10/12] staging: fsl-mc: Fixed WARN_ON() in fsl_mc_resource_pool_remove_device

2015-10-13 Thread J. German Rivera
Check that resource is not NULL before de-referencing it. --- drivers/staging/fsl-mc/bus/mc-allocator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/staging/fsl-mc/bus/mc-allocator.c index a45293b..88d1857 100644 --- a/dri

[PATCH v2 01/12] staging: fsl-mc: Naming cleanup in fsl_mc-portal_allocate

2015-10-14 Thread J. German Rivera
mc_adev is a local variable for the allocated dpmcp object. Renamed mc_adev as dpmcp_dev for clarity. --- CHANGE HISTORY Changes in v2: none drivers/staging/fsl-mc/bus/mc-allocator.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-

[PATCH v2 07/12] staging: fsl-mc: Fixed alignment of copyright comment

2015-10-14 Thread J. German Rivera
Whitespace cleanup-- add missing spaces in column 1 of copyright --- CHANGE HISTORY Changes in v2: none drivers/staging/fsl-mc/include/dpcon-cmd.h | 60 +++--- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/staging/fsl-mc/include/dpcon-cmd.h b/dr

[PATCH v2 08/12] staging: fsl-mc: Fixed bug in fsl_mc_allocator_remove

2015-10-14 Thread J. German Rivera
Call fsl_mc_resource_pool_remove_device() only if mc_dev->resource is not NULL. --- CHANGE HISTORY Changes in v2: none drivers/staging/fsl-mc/bus/mc-allocator.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c b/drivers/stagin

[PATCH v2 03/12] staging: fsl-mc: dpmcp opening/closing refactoring

2015-10-14 Thread J. German Rivera
Before, we were opening and closing a mc_io's dpmcp object in fsl_mc_portal_reset(), since that was the only function that was calling dpmcp MC operations. However, it is better for maintainability to open the dpmcp object when it gets associated with an mc_io object, and close it when this associa

[PATCH v2 06/12] staging: fsl-mc: Removed unused DPMCP macros

2015-10-14 Thread J. German Rivera
The macros were a left-over from a previous implementation of the dpmcp APIs and are no longer used. --- CHANGE HISTORY Changes in v2: none drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 79 -- 1 file changed, 79 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpm

[PATCH v2 05/12] staging_fsl-mc: Changed types of flags, portal size in

2015-10-14 Thread J. German Rivera
Changed these two fields from 32-bit integers to 16-bit integers in struct fsl_mc_io, as 32 bits is too much for these fields. This change does not affect other components since fsl_mc_io is an opaque type. --- CHANGE HISTORY Changes in v2: none drivers/staging/fsl-mc/include/mc-sys.h | 4 ++--

[PATCH v2 02/12] staging: fsl-mc: fsl_mc_io object refactoring

2015-10-14 Thread J. German Rivera
Each fsl_mc_io object is associated with an fsl_mc_device object of type "dpmcp" representing the MC portal associated with the fsl_mc_io object. Before, we were representing this association with an fsl_mc_resource pointer. To enhance code clarity, it is more straight forward to use an fsl_mc_devi

[PATCH v2 12/12] staging: fsl-mc: Added missing initializer in fsl_mc_bus_driver

2015-10-14 Thread J. German Rivera
owner needs to be initialized as THIS_MOUDLE. --- CHANGE HISTORY Changes in v2: none drivers/staging/fsl-mc/bus/mc-bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c index 4ac3d07..84db55b 100644 --- a/drivers/stag

  1   2   >