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

Commit 2e18e047 authored by Paul Mundt's avatar Paul Mundt
Browse files

Merge branch 'sh/dmaengine'

Conflicts:
	arch/sh/drivers/dma/dma-sh.c
parents b06ede84 cfefe997
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ Description:
			lsm:	[[subj_user=] [subj_role=] [subj_type=]
				 [obj_user=] [obj_role=] [obj_type=]]

		base: 	func:= [BPRM_CHECK][FILE_MMAP][INODE_PERMISSION]
		base: 	func:= [BPRM_CHECK][FILE_MMAP][FILE_CHECK]
			mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC]
			fsmagic:= hex value
			uid:= decimal value
@@ -40,11 +40,11 @@ Description:

			measure func=BPRM_CHECK
			measure func=FILE_MMAP mask=MAY_EXEC
			measure func=INODE_PERM mask=MAY_READ uid=0
			measure func=FILE_CHECK mask=MAY_READ uid=0

		The default policy measures all executables in bprm_check,
		all files mmapped executable in file_mmap, and all files
		open for read by root in inode_permission.
		open for read by root in do_filp_open.

		Examples of LSM specific definitions:

@@ -54,8 +54,8 @@ Description:

			dont_measure obj_type=var_log_t
			dont_measure obj_type=auditd_log_t
			measure subj_user=system_u func=INODE_PERM mask=MAY_READ
			measure subj_role=system_r func=INODE_PERM mask=MAY_READ
			measure subj_user=system_u func=FILE_CHECK mask=MAY_READ
			measure subj_role=system_r func=FILE_CHECK mask=MAY_READ

		Smack:
			measure subj_user=_ func=INODE_PERM mask=MAY_READ
			measure subj_user=_ func=FILE_CHECK mask=MAY_READ
+1 −1
Original line number Diff line number Diff line
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 33
EXTRAVERSION = -rc6
EXTRAVERSION = -rc7
NAME = Man-Eating Seals of Antiquity

# *DOCUMENTATION*
+4 −1
Original line number Diff line number Diff line
@@ -52,11 +52,14 @@ static inline unsigned int get_dmte_irq(unsigned int chan)
 *
 * iterations to complete the transfer.
 */
static unsigned int ts_shift[] = TS_SHIFT;
static inline unsigned int calc_xmit_shift(struct dma_channel *chan)
{
	u32 chcr = __raw_readl(dma_base_addr[chan->chan] + CHCR);
	int cnt = ((chcr & CHCR_TS_LOW_MASK) >> CHCR_TS_LOW_SHIFT) |
		((chcr & CHCR_TS_HIGH_MASK) >> CHCR_TS_HIGH_SHIFT);

	return ts_shift[(chcr & CHCR_TS_MASK)>>CHCR_TS_SHIFT];
	return ts_shift[cnt];
}

/*
+41 −2
Original line number Diff line number Diff line
@@ -64,8 +64,10 @@ static int dmte_irq_map[] __maybe_unused = {
#define ACK_L	0x00010000
#define DM_INC	0x00004000
#define DM_DEC	0x00008000
#define DM_FIX	0x0000c000
#define SM_INC	0x00001000
#define SM_DEC	0x00002000
#define SM_FIX	0x00003000
#define RS_IN	0x00000200
#define RS_OUT	0x00000300
#define TS_BLK	0x00000040
@@ -83,7 +85,7 @@ static int dmte_irq_map[] __maybe_unused = {
 * Define the default configuration for dual address memory-memory transfer.
 * The 0x400 value represents auto-request, external->external.
 */
#define RS_DUAL	(DM_INC | SM_INC | 0x400 | TS_32)
#define RS_DUAL	(DM_INC | SM_INC | 0x400 | TS_INDEX2VAL(XMIT_SZ_32BIT))

/* DMA base address */
static u32 dma_base_addr[] __maybe_unused = {
@@ -125,8 +127,45 @@ static u32 dma_base_addr[] __maybe_unused = {
#define SHDMA_DMAOR1	(1 << 2)
#define SHDMA_DMAE1	(1 << 3)

enum sh_dmae_slave_chan_id {
	SHDMA_SLAVE_SCIF0_TX,
	SHDMA_SLAVE_SCIF0_RX,
	SHDMA_SLAVE_SCIF1_TX,
	SHDMA_SLAVE_SCIF1_RX,
	SHDMA_SLAVE_SCIF2_TX,
	SHDMA_SLAVE_SCIF2_RX,
	SHDMA_SLAVE_SCIF3_TX,
	SHDMA_SLAVE_SCIF3_RX,
	SHDMA_SLAVE_SCIF4_TX,
	SHDMA_SLAVE_SCIF4_RX,
	SHDMA_SLAVE_SCIF5_TX,
	SHDMA_SLAVE_SCIF5_RX,
	SHDMA_SLAVE_SIUA_TX,
	SHDMA_SLAVE_SIUA_RX,
	SHDMA_SLAVE_SIUB_TX,
	SHDMA_SLAVE_SIUB_RX,
	SHDMA_SLAVE_NUMBER,	/* Must stay last */
};

struct sh_dmae_slave_config {
	enum sh_dmae_slave_chan_id	slave_id;
	dma_addr_t			addr;
	u32				chcr;
	char				mid_rid;
};

struct sh_dmae_pdata {
	unsigned int mode;
	struct sh_dmae_slave_config *config;
	int config_num;
};

struct device;

struct sh_dmae_slave {
	enum sh_dmae_slave_chan_id	slave_id; /* Set by the platform */
	struct device			*dma_dev; /* Set by the platform */
	struct sh_dmae_slave_config	*config;  /* Set by the driver */
};

#endif /* __DMA_SH_H */
+12 −8
Original line number Diff line number Diff line
@@ -20,8 +20,10 @@
#define TS_32		0x00000010
#define TS_128		0x00000018

#define CHCR_TS_MASK	0x18
#define CHCR_TS_SHIFT	3
#define CHCR_TS_LOW_MASK	0x18
#define CHCR_TS_LOW_SHIFT	3
#define CHCR_TS_HIGH_MASK	0
#define CHCR_TS_HIGH_SHIFT	0

#define DMAOR_INIT	DMAOR_DME

@@ -36,11 +38,13 @@ enum {
	XMIT_SZ_128BIT,
};

static unsigned int ts_shift[] __maybe_unused = {
	[XMIT_SZ_8BIT]		= 0,
	[XMIT_SZ_16BIT]		= 1,
	[XMIT_SZ_32BIT]		= 2,
	[XMIT_SZ_128BIT]	= 4,
};
#define TS_SHIFT {			\
	[XMIT_SZ_8BIT]		= 0,	\
	[XMIT_SZ_16BIT]		= 1,	\
	[XMIT_SZ_32BIT]		= 2,	\
	[XMIT_SZ_128BIT]	= 4,	\
}

#define TS_INDEX2VAL(i)	(((i) & 3) << CHCR_TS_LOW_SHIFT)

#endif /* __ASM_CPU_SH3_DMA_H */
Loading