Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2155e69a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'dmaengine-4.16-rc1' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine updates from Vinod Koul:
 "This time is smallish update with updates mainly to drivers:

   - updates to xilinx and zynqmp dma controllers

   - update reside calculation for rcar controller

   - more RSTify fixes for documentation

   - add support for race free transfer termination and updating for
     users for that

   - support for new rev of hidma with addition new APIs to get device
     match data in ACPI/OF

   - random updates to bunch of other drivers"

* tag 'dmaengine-4.16-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (47 commits)
  dmaengine: dmatest: fix container_of member in dmatest_callback
  dmaengine: stm32-dmamux: Remove unnecessary platform_get_resource() error check
  dmaengine: sprd: statify 'sprd_dma_prep_dma_memcpy'
  dmaengine: qcom_hidma: simplify DT resource parsing
  dmaengine: xilinx_dma: Free BD consistent memory
  dmaengine: xilinx_dma: Fix warning variable prev set but not used
  dmaengine: xilinx_dma: properly configure the SG mode bit in the driver for cdma
  dmaengine: doc: format struct fields using monospace
  dmaengine: doc: fix bullet list formatting
  dmaengine: ti-dma-crossbar: Fix event mapping for TPCC_EVT_MUX_60_63
  dmaengine: cppi41: Fix channel queues array size check
  dmaengine: imx-sdma: Add MODULE_FIRMWARE
  dmaengine: xilinx_dma: Fix typos
  dmaengine: xilinx_dma: Differentiate probe based on the ip type
  dmaengine: xilinx_dma: fix style issues from checkpatch
  dmaengine: xilinx_dma: Fix kernel doc warnings
  dmaengine: xilinx_dma: Fix race condition in the driver for multiple descriptor scenario
  dmaeninge: xilinx_dma: Fix bug in multiple frame stores scenario in vdma
  dmaengine: xilinx_dma: Check for channel idle state before submitting dma descriptor
  dmaengine: zynqmp_dma: Fix race condition in the probe
  ...
parents 2382dc9a 330542fc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@ When the OS is not in control of the management interface (i.e. it's a guest),
the channel nodes appear on their own, not under a management node.

Required properties:
- compatible: must contain "qcom,hidma-1.0" for initial HW or "qcom,hidma-1.1"
for MSI capable HW.
- compatible: must contain "qcom,hidma-1.0" for initial HW or
  "qcom,hidma-1.1"/"qcom,hidma-1.2" for MSI capable HW.
- reg: Addresses for the transfer and event channel
- interrupts: Should contain the event interrupt
- desc-count: Number of asynchronous requests this channel can handle
+17 −21
Original line number Diff line number Diff line
@@ -111,39 +111,35 @@ The first thing you need to do in your driver is to allocate this
structure. Any of the usual memory allocators will do, but you'll also
need to initialize a few fields in there:

- channels: should be initialized as a list using the
- ``channels``: should be initialized as a list using the
  INIT_LIST_HEAD macro for example

- src_addr_widths:
- ``src_addr_widths``:
  should contain a bitmask of the supported source transfer width

- dst_addr_widths:
- ``dst_addr_widths``:
  should contain a bitmask of the supported destination transfer width

- directions:
- ``directions``:
  should contain a bitmask of the supported slave directions
  (i.e. excluding mem2mem transfers)

- residue_granularity:

  - Granularity of the transfer residue reported to dma_set_residue.
- ``residue_granularity``:
  granularity of the transfer residue reported to dma_set_residue.
  This can be either:

  - Descriptor

    - Your device doesn't support any kind of residue
  - Descriptor:
    your device doesn't support any kind of residue
    reporting. The framework will only know that a particular
    transaction descriptor is done.

      - Segment

        - Your device is able to report which chunks have been transferred

      - Burst
  - Segment:
    your device is able to report which chunks have been transferred

        - Your device is able to report which burst have been transferred
  - Burst:
    your device is able to report which burst have been transferred

  - dev: should hold the pointer to the ``struct device`` associated
- ``dev``: should hold the pointer to the ``struct device`` associated
  to your current driver instance.

Supported transaction types
+18 −0
Original line number Diff line number Diff line
@@ -785,6 +785,24 @@ const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids,
}
EXPORT_SYMBOL_GPL(acpi_match_device);

void *acpi_get_match_data(const struct device *dev)
{
	const struct acpi_device_id *match;

	if (!dev->driver)
		return NULL;

	if (!dev->driver->acpi_match_table)
		return NULL;

	match = acpi_match_device(dev->driver->acpi_match_table, dev);
	if (!match)
		return NULL;

	return (void *)match->driver_data;
}
EXPORT_SYMBOL_GPL(acpi_get_match_data);

int acpi_match_device_ids(struct acpi_device *device,
			  const struct acpi_device_id *ids)
{
+8 −0
Original line number Diff line number Diff line
@@ -1271,9 +1271,17 @@ static int acpi_fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
	return 0;
}

static void *
acpi_fwnode_device_get_match_data(const struct fwnode_handle *fwnode,
				  const struct device *dev)
{
	return acpi_get_match_data(dev);
}

#define DECLARE_ACPI_FWNODE_OPS(ops) \
	const struct fwnode_operations ops = {				\
		.device_is_available = acpi_fwnode_device_is_available, \
		.device_get_match_data = acpi_fwnode_device_get_match_data, \
		.property_present = acpi_fwnode_property_present,	\
		.property_read_int_array =				\
			acpi_fwnode_property_read_int_array,		\
+7 −0
Original line number Diff line number Diff line
@@ -1340,3 +1340,10 @@ int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
	return fwnode_call_int_op(fwnode, graph_parse_endpoint, endpoint);
}
EXPORT_SYMBOL(fwnode_graph_parse_endpoint);

void *device_get_match_data(struct device *dev)
{
	return fwnode_call_ptr_op(dev_fwnode(dev), device_get_match_data,
				  dev);
}
EXPORT_SYMBOL_GPL(device_get_match_data);
Loading