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

Commit ea76f0b3 authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by Ralf Baechle
Browse files

DMA: TXx9 Soc DMA Controller driver



This patch adds support for the integrated DMAC of the TXx9 family.

Signed-off-by: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent a43da03c
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
/*
 * TXx9 SoC DMA Controller
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __ASM_TXX9_DMAC_H
#define __ASM_TXX9_DMAC_H

#include <linux/dmaengine.h>

#define TXX9_DMA_MAX_NR_CHANNELS	4

/**
 * struct txx9dmac_platform_data - Controller configuration parameters
 * @memcpy_chan: Channel used for DMA_MEMCPY
 * @have_64bit_regs: DMAC have 64 bit registers
 */
struct txx9dmac_platform_data {
	int	memcpy_chan;
	bool	have_64bit_regs;
};

/**
 * struct txx9dmac_chan_platform_data - Channel configuration parameters
 * @dmac_dev: A platform device for DMAC
 */
struct txx9dmac_chan_platform_data {
	struct platform_device *dmac_dev;
};

/**
 * struct txx9dmac_slave - Controller-specific information about a slave
 * @tx_reg: physical address of data register used for
 *	memory-to-peripheral transfers
 * @rx_reg: physical address of data register used for
 *	peripheral-to-memory transfers
 * @reg_width: peripheral register width
 */
struct txx9dmac_slave {
	u64		tx_reg;
	u64		rx_reg;
	unsigned int	reg_width;
};

#endif /* __ASM_TXX9_DMAC_H */
+8 −0
Original line number Diff line number Diff line
@@ -81,6 +81,14 @@ config MX3_IPU_IRQS
	  To avoid bloating the irq_desc[] array we allocate a sufficient
	  number of IRQ slots and map them dynamically to specific sources.

config TXX9_DMAC
	tristate "Toshiba TXx9 SoC DMA support"
	depends on MACH_TX49XX || MACH_TX39XX
	select DMA_ENGINE
	help
	  Support the TXx9 SoC internal DMA controller.  This can be
	  integrated in chips such as the Toshiba TX4927/38/39.

config DMA_ENGINE
	bool

+1 −0
Original line number Diff line number Diff line
@@ -8,3 +8,4 @@ obj-$(CONFIG_FSL_DMA) += fsldma.o
obj-$(CONFIG_MV_XOR) += mv_xor.o
obj-$(CONFIG_DW_DMAC) += dw_dmac.o
obj-$(CONFIG_MX3_IPU) += ipu/
obj-$(CONFIG_TXX9_DMAC) += txx9dmac.o