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

Commit 720fcb36 authored by Paul Mundt's avatar Paul Mundt
Browse files

Merge branches 'sh/intc-extension', 'sh/dmaengine', 'sh/serial-dma' and 'sh/clkfwk'



Conflicts:
	arch/sh/kernel/cpu/clock.c

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
Loading
Loading
Loading
Loading
+35 −0
Original line number Diff line number Diff line
/*
 *  arch/sh/include/asm/clkdev.h
 *
 * Cloned from arch/arm/include/asm/clkdev.h:
 *
 *  Copyright (C) 2008 Russell King.
 *
 * 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.
 *
 * Helper for the clk API to assist looking up a struct clk.
 */
#ifndef __ASM_CLKDEV_H
#define __ASM_CLKDEV_H

struct clk;

struct clk_lookup {
	struct list_head	node;
	const char		*dev_id;
	const char		*con_id;
	struct clk		*clk;
};

struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id,
	const char *dev_fmt, ...);

void clkdev_add(struct clk_lookup *cl);
void clkdev_drop(struct clk_lookup *cl);

void clkdev_add_table(struct clk_lookup *, size_t);
int clk_add_alias(const char *, const char *, char *, struct device *);

#endif
+0 −7
Original line number Diff line number Diff line
@@ -45,13 +45,6 @@ struct clk {
	struct cpufreq_frequency_table *freq_table;
};

struct clk_lookup {
	struct list_head	node;
	const char		*dev_id;
	const char		*con_id;
	struct clk		*clk;
};

#define CLK_ENABLE_ON_INIT	(1 << 0)

/* Should be defined by processor-specific code */
+2 −61
Original line number Diff line number Diff line
@@ -10,14 +10,9 @@
#ifndef ASM_DMAENGINE_H
#define ASM_DMAENGINE_H

#include <linux/dmaengine.h>
#include <linux/list.h>
#include <linux/sh_dma.h>

#include <asm/dma-register.h>

#define SH_DMAC_MAX_CHANNELS	6

enum sh_dmae_slave_chan_id {
enum {
	SHDMA_SLAVE_SCIF0_TX,
	SHDMA_SLAVE_SCIF0_RX,
	SHDMA_SLAVE_SCIF1_TX,
@@ -34,60 +29,6 @@ enum sh_dmae_slave_chan_id {
	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_channel {
	unsigned int	offset;
	unsigned int	dmars;
	unsigned int	dmars_bit;
};

struct sh_dmae_pdata {
	struct sh_dmae_slave_config *slave;
	int slave_num;
	struct sh_dmae_channel *channel;
	int channel_num;
	unsigned int ts_low_shift;
	unsigned int ts_low_mask;
	unsigned int ts_high_shift;
	unsigned int ts_high_mask;
	unsigned int *ts_shift;
	int ts_shift_num;
	u16 dmaor_init;
};

struct device;

/* Used by slave DMA clients to request DMA to/from a specific peripheral */
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 */
};

struct sh_dmae_regs {
	u32 sar; /* SAR / source address */
	u32 dar; /* DAR / destination address */
	u32 tcr; /* TCR / transfer count */
};

struct sh_desc {
	struct sh_dmae_regs hw;
	struct list_head node;
	struct dma_async_tx_descriptor async_tx;
	enum dma_data_direction direction;
	dma_cookie_t cookie;
	size_t partial;
	int chunks;
	int mark;
};

#endif
+4 −4
Original line number Diff line number Diff line
@@ -17,10 +17,10 @@ struct device;

struct siu_platform {
	struct device *dma_dev;
	enum sh_dmae_slave_chan_id dma_slave_tx_a;
	enum sh_dmae_slave_chan_id dma_slave_rx_a;
	enum sh_dmae_slave_chan_id dma_slave_tx_b;
	enum sh_dmae_slave_chan_id dma_slave_rx_b;
	unsigned int dma_slave_tx_a;
	unsigned int dma_slave_rx_a;
	unsigned int dma_slave_tx_b;
	unsigned int dma_slave_rx_b;
};

#endif /* ASM_SIU_H */
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ endif

CFLAGS_REMOVE_return_address.o = -pg

obj-y	:= debugtraps.o dma-nommu.o dumpstack.o 			\
obj-y	:= clkdev.o debugtraps.o dma-nommu.o dumpstack.o 		\
	   idle.o io.o io_generic.o irq.o				\
	   irq_$(BITS).o machvec.o nmi_debug.o process.o		\
	   process_$(BITS).o ptrace_$(BITS).o				\
Loading