diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/dma/ipu-dma.h | 177 | ||||
| -rw-r--r-- | include/linux/mmc/dw_mmc.h | 6 | ||||
| -rw-r--r-- | include/linux/mmc/sdhci.h | 1 | ||||
| -rw-r--r-- | include/linux/of_address.h | 2 | ||||
| -rw-r--r-- | include/linux/platform_data/asoc-imx-ssi.h | 2 | ||||
| -rw-r--r-- | include/linux/platform_data/dma-imx.h | 4 | ||||
| -rw-r--r-- | include/linux/ptp_clock_kernel.h | 3 | ||||
| -rw-r--r-- | include/uapi/linux/eventpoll.h | 1 | ||||
| -rw-r--r-- | include/xen/hvm.h | 34 | 
9 files changed, 222 insertions, 8 deletions
diff --git a/include/linux/dma/ipu-dma.h b/include/linux/dma/ipu-dma.h new file mode 100644 index 00000000000..18031115c66 --- /dev/null +++ b/include/linux/dma/ipu-dma.h @@ -0,0 +1,177 @@ +/* + * Copyright (C) 2008 + * Guennadi Liakhovetski, DENX Software Engineering, <lg@denx.de> + * + * Copyright (C) 2005-2007 Freescale Semiconductor, Inc. + * + * 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 __LINUX_DMA_IPU_DMA_H +#define __LINUX_DMA_IPU_DMA_H + +#include <linux/types.h> +#include <linux/dmaengine.h> + +/* IPU DMA Controller channel definitions. */ +enum ipu_channel { +	IDMAC_IC_0 = 0,		/* IC (encoding task) to memory */ +	IDMAC_IC_1 = 1,		/* IC (viewfinder task) to memory */ +	IDMAC_ADC_0 = 1, +	IDMAC_IC_2 = 2, +	IDMAC_ADC_1 = 2, +	IDMAC_IC_3 = 3, +	IDMAC_IC_4 = 4, +	IDMAC_IC_5 = 5, +	IDMAC_IC_6 = 6, +	IDMAC_IC_7 = 7,		/* IC (sensor data) to memory */ +	IDMAC_IC_8 = 8, +	IDMAC_IC_9 = 9, +	IDMAC_IC_10 = 10, +	IDMAC_IC_11 = 11, +	IDMAC_IC_12 = 12, +	IDMAC_IC_13 = 13, +	IDMAC_SDC_0 = 14,	/* Background synchronous display data */ +	IDMAC_SDC_1 = 15,	/* Foreground data (overlay) */ +	IDMAC_SDC_2 = 16, +	IDMAC_SDC_3 = 17, +	IDMAC_ADC_2 = 18, +	IDMAC_ADC_3 = 19, +	IDMAC_ADC_4 = 20, +	IDMAC_ADC_5 = 21, +	IDMAC_ADC_6 = 22, +	IDMAC_ADC_7 = 23, +	IDMAC_PF_0 = 24, +	IDMAC_PF_1 = 25, +	IDMAC_PF_2 = 26, +	IDMAC_PF_3 = 27, +	IDMAC_PF_4 = 28, +	IDMAC_PF_5 = 29, +	IDMAC_PF_6 = 30, +	IDMAC_PF_7 = 31, +}; + +/* Order significant! */ +enum ipu_channel_status { +	IPU_CHANNEL_FREE, +	IPU_CHANNEL_INITIALIZED, +	IPU_CHANNEL_READY, +	IPU_CHANNEL_ENABLED, +}; + +#define IPU_CHANNELS_NUM 32 + +enum pixel_fmt { +	/* 1 byte */ +	IPU_PIX_FMT_GENERIC, +	IPU_PIX_FMT_RGB332, +	IPU_PIX_FMT_YUV420P, +	IPU_PIX_FMT_YUV422P, +	IPU_PIX_FMT_YUV420P2, +	IPU_PIX_FMT_YVU422P, +	/* 2 bytes */ +	IPU_PIX_FMT_RGB565, +	IPU_PIX_FMT_RGB666, +	IPU_PIX_FMT_BGR666, +	IPU_PIX_FMT_YUYV, +	IPU_PIX_FMT_UYVY, +	/* 3 bytes */ +	IPU_PIX_FMT_RGB24, +	IPU_PIX_FMT_BGR24, +	/* 4 bytes */ +	IPU_PIX_FMT_GENERIC_32, +	IPU_PIX_FMT_RGB32, +	IPU_PIX_FMT_BGR32, +	IPU_PIX_FMT_ABGR32, +	IPU_PIX_FMT_BGRA32, +	IPU_PIX_FMT_RGBA32, +}; + +enum ipu_color_space { +	IPU_COLORSPACE_RGB, +	IPU_COLORSPACE_YCBCR, +	IPU_COLORSPACE_YUV +}; + +/* + * Enumeration of IPU rotation modes + */ +enum ipu_rotate_mode { +	/* Note the enum values correspond to BAM value */ +	IPU_ROTATE_NONE = 0, +	IPU_ROTATE_VERT_FLIP = 1, +	IPU_ROTATE_HORIZ_FLIP = 2, +	IPU_ROTATE_180 = 3, +	IPU_ROTATE_90_RIGHT = 4, +	IPU_ROTATE_90_RIGHT_VFLIP = 5, +	IPU_ROTATE_90_RIGHT_HFLIP = 6, +	IPU_ROTATE_90_LEFT = 7, +}; + +/* + * Enumeration of DI ports for ADC. + */ +enum display_port { +	DISP0, +	DISP1, +	DISP2, +	DISP3 +}; + +struct idmac_video_param { +	unsigned short		in_width; +	unsigned short		in_height; +	uint32_t		in_pixel_fmt; +	unsigned short		out_width; +	unsigned short		out_height; +	uint32_t		out_pixel_fmt; +	unsigned short		out_stride; +	bool			graphics_combine_en; +	bool			global_alpha_en; +	bool			key_color_en; +	enum display_port	disp; +	unsigned short		out_left; +	unsigned short		out_top; +}; + +/* + * Union of initialization parameters for a logical channel. So far only video + * parameters are used. + */ +union ipu_channel_param { +	struct idmac_video_param video; +}; + +struct idmac_tx_desc { +	struct dma_async_tx_descriptor	txd; +	struct scatterlist		*sg;	/* scatterlist for this */ +	unsigned int			sg_len;	/* tx-descriptor. */ +	struct list_head		list; +}; + +struct idmac_channel { +	struct dma_chan		dma_chan; +	dma_cookie_t		completed;	/* last completed cookie	   */ +	union ipu_channel_param	params; +	enum ipu_channel	link;	/* input channel, linked to the output	   */ +	enum ipu_channel_status	status; +	void			*client;	/* Only one client per channel	   */ +	unsigned int		n_tx_desc; +	struct idmac_tx_desc	*desc;		/* allocated tx-descriptors	   */ +	struct scatterlist	*sg[2];	/* scatterlist elements in buffer-0 and -1 */ +	struct list_head	free_list;	/* free tx-descriptors		   */ +	struct list_head	queue;		/* queued tx-descriptors	   */ +	spinlock_t		lock;		/* protects sg[0,1], queue	   */ +	struct mutex		chan_mutex; /* protects status, cookie, free_list  */ +	bool			sec_chan_en; +	int			active_buffer; +	unsigned int		eof_irq; +	char			eof_name[16];	/* EOF IRQ name for request_irq()  */ +}; + +#define to_tx_desc(tx) container_of(tx, struct idmac_tx_desc, txd) +#define to_idmac_chan(c) container_of(c, struct idmac_channel, dma_chan) + +#endif /* __LINUX_DMA_IPU_DMA_H */ diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 7c6a1139d8f..96531664a06 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h @@ -137,7 +137,7 @@ struct dw_mci {  	dma_addr_t		sg_dma;  	void			*sg_cpu; -	struct dw_mci_dma_ops	*dma_ops; +	const struct dw_mci_dma_ops	*dma_ops;  #ifdef CONFIG_MMC_DW_IDMAC  	unsigned int		ring_size;  #else @@ -162,7 +162,7 @@ struct dw_mci {  	u16			data_offset;  	struct device		*dev;  	struct dw_mci_board	*pdata; -	struct dw_mci_drv_data	*drv_data; +	const struct dw_mci_drv_data	*drv_data;  	void			*priv;  	struct clk		*biu_clk;  	struct clk		*ciu_clk; @@ -186,7 +186,7 @@ struct dw_mci {  	struct regulator	*vmmc;	/* Power regulator */  	unsigned long		irq_flags; /* IRQ flags */ -	unsigned int		irq; +	int			irq;  };  /* DMA ops for Internal/External DMAC interface */ diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index fa8529a859b..1edcb4dad8c 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -91,6 +91,7 @@ struct sdhci_host {  	unsigned int quirks2;	/* More deviations from spec. */  #define SDHCI_QUIRK2_HOST_OFF_CARD_ON			(1<<0) +#define SDHCI_QUIRK2_HOST_NO_CMD23			(1<<1)  	int irq;		/* Device IRQ */  	void __iomem *ioaddr;	/* Mapped address */ diff --git a/include/linux/of_address.h b/include/linux/of_address.h index a1984dd037d..e20e3af68fb 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h @@ -28,11 +28,13 @@ static inline unsigned long pci_address_to_pio(phys_addr_t addr) { return -1; }  #endif  #else /* CONFIG_OF_ADDRESS */ +#ifndef of_address_to_resource  static inline int of_address_to_resource(struct device_node *dev, int index,  					 struct resource *r)  {  	return -EINVAL;  } +#endif  static inline struct device_node *of_find_matching_node_by_address(  					struct device_node *from,  					const struct of_device_id *matches, diff --git a/include/linux/platform_data/asoc-imx-ssi.h b/include/linux/platform_data/asoc-imx-ssi.h index 63f3c280423..92c7fd72f63 100644 --- a/include/linux/platform_data/asoc-imx-ssi.h +++ b/include/linux/platform_data/asoc-imx-ssi.h @@ -17,5 +17,7 @@ struct imx_ssi_platform_data {  	void (*ac97_warm_reset)(struct snd_ac97 *ac97);  }; +extern int mxc_set_irq_fiq(unsigned int irq, unsigned int type); +  #endif /* __MACH_SSI_H */ diff --git a/include/linux/platform_data/dma-imx.h b/include/linux/platform_data/dma-imx.h index 1b9080385b4..f6d30cc1cb7 100644 --- a/include/linux/platform_data/dma-imx.h +++ b/include/linux/platform_data/dma-imx.h @@ -61,7 +61,9 @@ static inline int imx_dma_is_ipu(struct dma_chan *chan)  static inline int imx_dma_is_general_purpose(struct dma_chan *chan)  {  	return strstr(dev_name(chan->device->dev), "sdma") || -		!strcmp(dev_name(chan->device->dev), "imx-dma"); +		!strcmp(dev_name(chan->device->dev), "imx1-dma") || +		!strcmp(dev_name(chan->device->dev), "imx21-dma") || +		!strcmp(dev_name(chan->device->dev), "imx27-dma");  }  #endif diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index f2dc6d8fc68..38a99350832 100644 --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h @@ -54,7 +54,8 @@ struct ptp_clock_request {   * clock operations   *   * @adjfreq:  Adjusts the frequency of the hardware clock. - *            parameter delta: Desired period change in parts per billion. + *            parameter delta: Desired frequency offset from nominal frequency + *            in parts per billion   *   * @adjtime:  Shifts the time of the hardware clock.   *            parameter delta: Desired change in nanoseconds. diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h index 8c99ce7202c..2c267bcbb85 100644 --- a/include/uapi/linux/eventpoll.h +++ b/include/uapi/linux/eventpoll.h @@ -25,7 +25,6 @@  #define EPOLL_CTL_ADD 1  #define EPOLL_CTL_DEL 2  #define EPOLL_CTL_MOD 3 -#define EPOLL_CTL_DISABLE 4  /*   * Request the handling of system wakeup events so as to prevent system suspends diff --git a/include/xen/hvm.h b/include/xen/hvm.h index b193fa2f9fd..13e43e41637 100644 --- a/include/xen/hvm.h +++ b/include/xen/hvm.h @@ -5,6 +5,36 @@  #include <xen/interface/hvm/params.h>  #include <asm/xen/hypercall.h> +static const char *param_name(int op) +{ +#define PARAM(x) [HVM_PARAM_##x] = #x +	static const char *const names[] = { +		PARAM(CALLBACK_IRQ), +		PARAM(STORE_PFN), +		PARAM(STORE_EVTCHN), +		PARAM(PAE_ENABLED), +		PARAM(IOREQ_PFN), +		PARAM(BUFIOREQ_PFN), +		PARAM(TIMER_MODE), +		PARAM(HPET_ENABLED), +		PARAM(IDENT_PT), +		PARAM(DM_DOMAIN), +		PARAM(ACPI_S_STATE), +		PARAM(VM86_TSS), +		PARAM(VPT_ALIGN), +		PARAM(CONSOLE_PFN), +		PARAM(CONSOLE_EVTCHN), +	}; +#undef PARAM + +	if (op >= ARRAY_SIZE(names)) +		return "unknown"; + +	if (!names[op]) +		return "reserved"; + +	return names[op]; +}  static inline int hvm_get_parameter(int idx, uint64_t *value)  {  	struct xen_hvm_param xhv; @@ -14,8 +44,8 @@ static inline int hvm_get_parameter(int idx, uint64_t *value)  	xhv.index = idx;  	r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv);  	if (r < 0) { -		printk(KERN_ERR "Cannot get hvm parameter %d: %d!\n", -			idx, r); +		printk(KERN_ERR "Cannot get hvm parameter %s (%d): %d!\n", +			param_name(idx), idx, r);  		return r;  	}  	*value = xhv.value;  |