Unverified Commit 5963edd9 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'soc_fsl-6.16-1' of https://github.com/chleroy/linux into soc/drivers

FSL SOC Changes for 6.16:
  - Various fixes and cleanups from Ioana on fsl-mc bus driver
  - Other misc fixes on fsl-mc bus driver
  - A build fix on DPAA2 driver
  - Some preparation work from Kees on qbman driver
  - Some cleanup on FSL qe interrupt driver init

* tag 'soc_fsl-6.16-1' of https://github.com/chleroy/linux:
  soc: fsl: qe: Consolidate chained IRQ handler install/remove
  bus: fsl-mc: Use strscpy() instead of strscpy_pad()
  soc: fsl: qbman: Remove const from portal->cgrs allocation type
  bus: fsl_mc: Fix driver_managed_dma check
  bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
  bus: fsl-mc: drop useless cleanup
  bus: fsl-mc: add the dprc_get_mem() command to the whitelist
  bus: fsl-mc: fix GET/SET_TAILDROP command ids
  bus: fsl-mc: do not add a device-link for the UAPI used DPMCP device
  bus: fsl-mc: fix double-free on mc_dev
  soc: fsl: Do not enable DPAA2_CONSOLE by default during compile testing

Link: https://lore.kernel.org/r/9e5b3e8e-3280-4ff9-915b-9a8b934bac22@csgroup.eu


Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 4d1c69e5 695d702f
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -806,8 +806,6 @@ int dprc_cleanup(struct fsl_mc_device *mc_dev)
		dev_set_msi_domain(&mc_dev->dev, NULL);
	}

	fsl_mc_cleanup_all_resource_pools(mc_dev);

	/* if this step fails we cannot go further with cleanup as there is no way of
	 * communicating with the firmware
	 */
+2 −2
Original line number Diff line number Diff line
@@ -489,7 +489,7 @@ int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
	cmd_params->irq_addr = cpu_to_le64(irq_cfg->paddr);
	cmd_params->irq_num = cpu_to_le32(irq_cfg->irq_num);
	cmd_params->obj_id = cpu_to_le32(obj_id);
	strscpy_pad(cmd_params->obj_type, obj_type, 16);
	strscpy(cmd_params->obj_type, obj_type);

	/* send command to mc*/
	return mc_send_command(mc_io, &cmd);
@@ -561,7 +561,7 @@ int dprc_get_obj_region(struct fsl_mc_io *mc_io,
	cmd_params = (struct dprc_cmd_get_obj_region *)cmd.params;
	cmd_params->obj_id = cpu_to_le32(obj_id);
	cmd_params->region_index = region_index;
	strscpy_pad(cmd_params->obj_type, obj_type, 16);
	strscpy(cmd_params->obj_type, obj_type);

	/* send command to mc*/
	err = mc_send_command(mc_io, &cmd);
+0 −21
Original line number Diff line number Diff line
@@ -555,27 +555,6 @@ void fsl_mc_init_all_resource_pools(struct fsl_mc_device *mc_bus_dev)
	}
}

static void fsl_mc_cleanup_resource_pool(struct fsl_mc_device *mc_bus_dev,
					 enum fsl_mc_pool_type pool_type)
{
	struct fsl_mc_resource *resource;
	struct fsl_mc_resource *next;
	struct fsl_mc_bus *mc_bus = to_fsl_mc_bus(mc_bus_dev);
	struct fsl_mc_resource_pool *res_pool =
					&mc_bus->resource_pools[pool_type];

	list_for_each_entry_safe(resource, next, &res_pool->free_list, node)
		devm_kfree(&mc_bus_dev->dev, resource);
}

void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev)
{
	int pool_type;

	for (pool_type = 0; pool_type < FSL_MC_NUM_POOL_TYPES; pool_type++)
		fsl_mc_cleanup_resource_pool(mc_bus_dev, pool_type);
}

/*
 * fsl_mc_allocator_probe - callback invoked when an allocatable device is
 * being added to the system
+7 −5
Original line number Diff line number Diff line
@@ -139,9 +139,9 @@ static int fsl_mc_bus_uevent(const struct device *dev, struct kobj_uevent_env *e

static int fsl_mc_dma_configure(struct device *dev)
{
	const struct device_driver *drv = READ_ONCE(dev->driver);
	struct device *dma_dev = dev;
	struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
	struct fsl_mc_driver *mc_drv = to_fsl_mc_driver(dev->driver);
	u32 input_id = mc_dev->icid;
	int ret;

@@ -153,8 +153,8 @@ static int fsl_mc_dma_configure(struct device *dev)
	else
		ret = acpi_dma_configure_id(dev, DEV_DMA_COHERENT, &input_id);

	/* @mc_drv may not be valid when we're called from the IOMMU layer */
	if (!ret && dev->driver && !mc_drv->driver_managed_dma) {
	/* @drv may not be valid when we're called from the IOMMU layer */
	if (!ret && drv && !to_fsl_mc_driver(drv)->driver_managed_dma) {
		ret = iommu_device_use_default_domain(dev);
		if (ret)
			arch_teardown_dma_ops(dev);
@@ -906,7 +906,9 @@ int fsl_mc_device_add(struct fsl_mc_obj_desc *obj_desc,

error_cleanup_dev:
	kfree(mc_dev->regions);
	if (mc_bus)
		kfree(mc_bus);
	else
		kfree(mc_dev);

	return error;
+0 −2
Original line number Diff line number Diff line
@@ -629,8 +629,6 @@ int __init fsl_mc_allocator_driver_init(void);

void fsl_mc_init_all_resource_pools(struct fsl_mc_device *mc_bus_dev);

void fsl_mc_cleanup_all_resource_pools(struct fsl_mc_device *mc_bus_dev);

int __must_check fsl_mc_resource_allocate(struct fsl_mc_bus *mc_bus,
					  enum fsl_mc_pool_type pool_type,
					  struct fsl_mc_resource
Loading