Commit 2c3165eb authored by Olof Johansson's avatar Olof Johansson
Browse files

Merge tag 'ux500-dma40-for-arm-soc-2' of...

Merge tag 'ux500-dma40-for-arm-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/drivers

From Linus Walleij:
Second set of DMA40 changes: refactorings and device tree
support for the DMA40. Now with MUSB and some platform
data removal.

* tag 'ux500-dma40-for-arm-soc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  dmaengine: ste_dma40: Fetch disabled channels from DT
  dmaengine: ste_dma40: Fetch the number of physical channels from DT
  ARM: ux500: Stop passing DMA platform data though AUXDATA
  dmaengine: ste_dma40: Allow memcpy channels to be configured from DT
  dmaengine: ste_dma40_ll: Replace meaningless register set with comment
  dmaengine: ste_dma40: Convert data_width from register bit format to value
  dmaengine: ste_dma40_ll: Use the BIT macro to replace ugly '(1 << x)'s
  ARM: ux500: Remove recently unused stedma40_xfer_dir enums
  dmaengine: ste_dma40: Replace ST-E's home-brew DMA direction defs with generic ones
  ARM: ux500: Replace ST-E's home-brew DMA direction definition with the generic one
  dmaengine: ste_dma40: Use the BIT macro to replace ugly '(1 << x)'s
  ARM: ux500: Remove empty function u8500_of_init_devices()
  ARM: ux500: Remove ux500-musb platform registation when booting with DT
  usb: musb: ux500: add device tree probing support
  usb: musb: ux500: attempt to find channels by name before using pdata
  usb: musb: ux500: harden checks for platform data
  usb: musb: ux500: take the dma_mask from coherent_dma_mask
  usb: musb: ux500: move the MUSB HDRC configuration into the driver
  usb: musb: ux500: move channel number knowledge into the driver
parents 0d86331b 499c2bc3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6,10 +6,12 @@ Required properties:
- reg-names: Names of the above areas to use during resource look-up
- interrupt: Should contain the DMAC interrupt number
- #dma-cells: must be <3>
- memcpy-channels: Channels to be used for memcpy

Optional properties:
- dma-channels: Number of channels supported by hardware - if not present
		the driver will attempt to obtain the information from H/W
- disabled-channels: Channels which can not be used

Example:

@@ -21,6 +23,8 @@ Example:
		interrupts = <0 25 0x4>;

		#dma-cells = <2>;
		memcpy-channels  = <56 57 58 59 60>;
		disabled-channels  = <12>;
		dma-channels = <8>;
	};

+50 −0
Original line number Diff line number Diff line
Ux500 MUSB

Required properties:
 - compatible : Should be "stericsson,db8500-musb"
 - reg        : Offset and length of registers
 - interrupts : Interrupt; mode, number and trigger
 - dr_mode    : Dual-role; either host mode "host", peripheral mode "peripheral"
                or both "otg"

Optional properties:
 - dmas       : A list of dma channels;
                dma-controller, event-line, fixed-channel, flags
 - dma-names  : An ordered list of channel names affiliated to the above

Example:

usb_per5@a03e0000 {
	compatible = "stericsson,db8500-musb", "mentor,musb";
	reg = <0xa03e0000 0x10000>;
	interrupts = <0 23 0x4>;
	interrupt-names = "mc";

	dr_mode = "otg";

	dmas = <&dma 38 0 0x2>, /* Logical - DevToMem */
	       <&dma 38 0 0x0>, /* Logical - MemToDev */
	       <&dma 37 0 0x2>, /* Logical - DevToMem */
	       <&dma 37 0 0x0>, /* Logical - MemToDev */
	       <&dma 36 0 0x2>, /* Logical - DevToMem */
	       <&dma 36 0 0x0>, /* Logical - MemToDev */
	       <&dma 19 0 0x2>, /* Logical - DevToMem */
	       <&dma 19 0 0x0>, /* Logical - MemToDev */
	       <&dma 18 0 0x2>, /* Logical - DevToMem */
	       <&dma 18 0 0x0>, /* Logical - MemToDev */
	       <&dma 17 0 0x2>, /* Logical - DevToMem */
	       <&dma 17 0 0x0>, /* Logical - MemToDev */
	       <&dma 16 0 0x2>, /* Logical - DevToMem */
	       <&dma 16 0 0x0>, /* Logical - MemToDev */
	       <&dma 39 0 0x2>, /* Logical - DevToMem */
	       <&dma 39 0 0x0>; /* Logical - MemToDev */

	dma-names = "iep_1_9",  "oep_1_9",
		    "iep_2_10", "oep_2_10",
		    "iep_3_11", "oep_3_11",
		    "iep_4_12", "oep_4_12",
		    "iep_5_13", "oep_5_13",
		    "iep_6_14", "oep_6_14",
		    "iep_7_15", "oep_7_15",
		    "iep_8",    "oep_8";
};
+6 −6
Original line number Diff line number Diff line
@@ -21,13 +21,13 @@

static struct stedma40_chan_cfg msp0_dma_rx = {
	.high_priority = true,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
};

static struct stedma40_chan_cfg msp0_dma_tx = {
	.high_priority = true,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV31_MSP0_SLIM0_CH0,
};

@@ -39,13 +39,13 @@ struct msp_i2s_platform_data msp0_platform_data = {

static struct stedma40_chan_cfg msp1_dma_rx = {
	.high_priority = true,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV30_MSP3,
};

static struct stedma40_chan_cfg msp1_dma_tx = {
	.high_priority = true,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV30_MSP1,
};

@@ -57,13 +57,13 @@ struct msp_i2s_platform_data msp1_platform_data = {

static struct stedma40_chan_cfg msp2_dma_rx = {
	.high_priority = true,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV14_MSP2,
};

static struct stedma40_chan_cfg msp2_dma_tx = {
	.high_priority = true,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV14_MSP2,
	.use_fixed_channel = true,
	.phy_channel = 1,
+8 −8
Original line number Diff line number Diff line
@@ -34,13 +34,13 @@
#ifdef CONFIG_STE_DMA40
struct stedma40_chan_cfg mop500_sdi0_dma_cfg_rx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV29_SD_MM0,
};

static struct stedma40_chan_cfg mop500_sdi0_dma_cfg_tx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV29_SD_MM0,
};
#endif
@@ -81,13 +81,13 @@ void mop500_sdi_tc35892_init(struct device *parent)
#ifdef CONFIG_STE_DMA40
static struct stedma40_chan_cfg sdi1_dma_cfg_rx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV32_SD_MM1,
};

static struct stedma40_chan_cfg sdi1_dma_cfg_tx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV32_SD_MM1,
};
#endif
@@ -112,13 +112,13 @@ struct mmci_platform_data mop500_sdi1_data = {
#ifdef CONFIG_STE_DMA40
struct stedma40_chan_cfg mop500_sdi2_dma_cfg_rx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type =  DB8500_DMA_DEV28_SD_MM2,
};

static struct stedma40_chan_cfg mop500_sdi2_dma_cfg_tx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV28_SD_MM2,
};
#endif
@@ -144,13 +144,13 @@ struct mmci_platform_data mop500_sdi2_data = {
#ifdef CONFIG_STE_DMA40
struct stedma40_chan_cfg mop500_sdi4_dma_cfg_rx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type =  DB8500_DMA_DEV42_SD_MM4,
};

static struct stedma40_chan_cfg mop500_sdi4_dma_cfg_tx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV42_SD_MM4,
};
#endif
+11 −11
Original line number Diff line number Diff line
@@ -424,19 +424,19 @@ void mop500_snowball_ethernet_clock_enable(void)

static struct cryp_platform_data u8500_cryp1_platform_data = {
		.mem_to_engine = {
				.dir = STEDMA40_MEM_TO_PERIPH,
				.dir = DMA_MEM_TO_DEV,
				.dev_type = DB8500_DMA_DEV48_CAC1,
				.mode = STEDMA40_MODE_LOGICAL,
		},
		.engine_to_mem = {
				.dir = STEDMA40_PERIPH_TO_MEM,
				.dir = DMA_DEV_TO_MEM,
				.dev_type = DB8500_DMA_DEV48_CAC1,
				.mode = STEDMA40_MODE_LOGICAL,
		}
};

static struct stedma40_chan_cfg u8500_hash_dma_cfg_tx = {
		.dir = STEDMA40_MEM_TO_PERIPH,
		.dir = DMA_MEM_TO_DEV,
		.dev_type = DB8500_DMA_DEV50_HAC1_TX,
		.mode = STEDMA40_MODE_LOGICAL,
};
@@ -455,13 +455,13 @@ static struct platform_device *mop500_platform_devs[] __initdata = {
#ifdef CONFIG_STE_DMA40
static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV8_SSP0,
};

static struct stedma40_chan_cfg ssp0_dma_cfg_tx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV8_SSP0,
};
#endif
@@ -490,37 +490,37 @@ static void __init mop500_spi_init(struct device *parent)
#ifdef CONFIG_STE_DMA40
static struct stedma40_chan_cfg uart0_dma_cfg_rx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV13_UART0,
};

static struct stedma40_chan_cfg uart0_dma_cfg_tx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV13_UART0,
};

static struct stedma40_chan_cfg uart1_dma_cfg_rx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV12_UART1,
};

static struct stedma40_chan_cfg uart1_dma_cfg_tx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV12_UART1,
};

static struct stedma40_chan_cfg uart2_dma_cfg_rx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_PERIPH_TO_MEM,
	.dir = DMA_DEV_TO_MEM,
	.dev_type = DB8500_DMA_DEV11_UART2,
};

static struct stedma40_chan_cfg uart2_dma_cfg_tx = {
	.mode = STEDMA40_MODE_LOGICAL,
	.dir = STEDMA40_MEM_TO_PERIPH,
	.dir = DMA_MEM_TO_DEV,
	.dev_type = DB8500_DMA_DEV11_UART2,
};
#endif
Loading