aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 21:17:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 21:17:02 -0400
commit9e4db1c3eed55c22328d8022c2c80adb3093833f (patch)
tree9643545e6bd182f1d3e19942f590a6a1e3198320 /include
parentde8856d2c11f562c60ed9340a83db4a4f829a6e6 (diff)
parentaae528d9a8ad79d4b21b1b723abc9447fdb0d200 (diff)
Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM platform updates from Russell King: "This covers platform stuff for platforms I have a direct interest in (iow, I have the hardware). Essentially: - as we no longer support any other Acorn platforms other than RiscPC anymore, we can collect all that code into mach-rpc. - convert Acorn expansion card stuff to use IRQ allocation functions, and get rid of NO_IRQ from there. - cleanups to the ebsa110 platform to move some private stuff out of its header files. - large amount of SA11x0 updates: - conversion of private DMA implementation to DMA engine support (this actually gives us greater flexibility in drivers over the old API.) - re-worked ucb1x00 updates - convert to genirq, remove sa11x0 dependencies, fix various minor issues - move platform specific sa11x0 framebuffer data into platform files in arch/arm instead of keeping this in the driver itself - update sa11x0 IrDA driver for DMA engine, and allow it to use DMA for SIR transmissions as well as FIR - rework sa1111 support for genirq, and irq allocation - fix sa1111 IRQ support so it works again - use sparse IRQ support After this, I have one more pull request remaining from my current set, which I think is going to be the most problematical as it generates 8 conflicts." Fixed up the trivial conflict in arch/arm/mach-rpc/Makefile as per Russell. * 'platforms' of git://git.linaro.org/people/rmk/linux-arm: (125 commits) ARM: 7343/1: sa11x0: convert to sparse IRQ ARM: 7342/2: sa1100: prepare for sparse irq conversion ARM: 7341/1: input: prepare jornada720 keyboard and ts for sa11x0 sparse irq ARM: 7340/1: rtc: sa1100: include mach/irqs.h instead of asm/irq.h ARM: sa11x0: remove unused DMA controller definitions ARM: sa11x0: remove old SoC private DMA driver USB: sa1111: add hcd .reset method USB: sa1111: add OHCI shutdown methods USB: sa1111: reorganize ohci-sa1111.c USB: sa1111: get rid of nasty printk(KERN_DEBUG "%s: ...", __FILE__) USB: sa1111: sparse and checkpatch cleanups ARM: sa11x0: don't static map sa1111 ARM: sa1111: use dev_err() rather than printk() ARM: sa1111: cleanup sub-device registration and unregistration ARM: sa1111: only setup DMA for DMA capable devices ARM: sa1111: register sa1111 devices with dmabounce in bus notifier ARM: sa1111: move USB interface register definitions to ohci-sa1111.c ARM: sa1111: move PCMCIA interface register definitions to sa1111_generic.c ARM: sa1111: move PS/2 interface register definitions to sa1111p2.c ARM: sa1111: delete unused physical GPIO register definitions ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/mcp.h14
-rw-r--r--include/linux/mfd/ucb1x00.h38
-rw-r--r--include/linux/sa11x0-dma.h24
-rw-r--r--include/video/sa1100fb.h63
4 files changed, 109 insertions, 30 deletions
diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h
index f88c1cc0cb0f..a9e8bd157673 100644
--- a/include/linux/mfd/mcp.h
+++ b/include/linux/mfd/mcp.h
@@ -10,8 +10,6 @@
10#ifndef MCP_H 10#ifndef MCP_H
11#define MCP_H 11#define MCP_H
12 12
13#include <mach/dma.h>
14
15struct mcp_ops; 13struct mcp_ops;
16 14
17struct mcp { 15struct mcp {
@@ -21,12 +19,7 @@ struct mcp {
21 int use_count; 19 int use_count;
22 unsigned int sclk_rate; 20 unsigned int sclk_rate;
23 unsigned int rw_timeout; 21 unsigned int rw_timeout;
24 dma_device_t dma_audio_rd;
25 dma_device_t dma_audio_wr;
26 dma_device_t dma_telco_rd;
27 dma_device_t dma_telco_wr;
28 struct device attached_device; 22 struct device attached_device;
29 int gpio_base;
30}; 23};
31 24
32struct mcp_ops { 25struct mcp_ops {
@@ -47,15 +40,14 @@ void mcp_disable(struct mcp *);
47#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate) 40#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate)
48 41
49struct mcp *mcp_host_alloc(struct device *, size_t); 42struct mcp *mcp_host_alloc(struct device *, size_t);
50int mcp_host_register(struct mcp *); 43int mcp_host_add(struct mcp *, void *);
51void mcp_host_unregister(struct mcp *); 44void mcp_host_del(struct mcp *);
45void mcp_host_free(struct mcp *);
52 46
53struct mcp_driver { 47struct mcp_driver {
54 struct device_driver drv; 48 struct device_driver drv;
55 int (*probe)(struct mcp *); 49 int (*probe)(struct mcp *);
56 void (*remove)(struct mcp *); 50 void (*remove)(struct mcp *);
57 int (*suspend)(struct mcp *, pm_message_t);
58 int (*resume)(struct mcp *);
59}; 51};
60 52
61int mcp_driver_register(struct mcp_driver *); 53int mcp_driver_register(struct mcp_driver *);
diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
index 4321f044d1e4..28af41756360 100644
--- a/include/linux/mfd/ucb1x00.h
+++ b/include/linux/mfd/ucb1x00.h
@@ -12,7 +12,7 @@
12 12
13#include <linux/mfd/mcp.h> 13#include <linux/mfd/mcp.h>
14#include <linux/gpio.h> 14#include <linux/gpio.h>
15#include <linux/semaphore.h> 15#include <linux/mutex.h>
16 16
17#define UCB_IO_DATA 0x00 17#define UCB_IO_DATA 0x00
18#define UCB_IO_DIR 0x01 18#define UCB_IO_DIR 0x01
@@ -104,17 +104,27 @@
104#define UCB_MODE_DYN_VFLAG_ENA (1 << 12) 104#define UCB_MODE_DYN_VFLAG_ENA (1 << 12)
105#define UCB_MODE_AUD_OFF_CAN (1 << 13) 105#define UCB_MODE_AUD_OFF_CAN (1 << 13)
106 106
107enum ucb1x00_reset {
108 UCB_RST_PROBE,
109 UCB_RST_RESUME,
110 UCB_RST_SUSPEND,
111 UCB_RST_REMOVE,
112 UCB_RST_PROBE_FAIL,
113};
107 114
108struct ucb1x00_irq { 115struct ucb1x00_plat_data {
109 void *devid; 116 void (*reset)(enum ucb1x00_reset);
110 void (*fn)(int, void *); 117 unsigned irq_base;
118 int gpio_base;
119 unsigned can_wakeup;
111}; 120};
112 121
113struct ucb1x00 { 122struct ucb1x00 {
114 spinlock_t lock; 123 raw_spinlock_t irq_lock;
115 struct mcp *mcp; 124 struct mcp *mcp;
116 unsigned int irq; 125 unsigned int irq;
117 struct semaphore adc_sem; 126 int irq_base;
127 struct mutex adc_mutex;
118 spinlock_t io_lock; 128 spinlock_t io_lock;
119 u16 id; 129 u16 id;
120 u16 io_dir; 130 u16 io_dir;
@@ -122,7 +132,8 @@ struct ucb1x00 {
122 u16 adc_cr; 132 u16 adc_cr;
123 u16 irq_fal_enbl; 133 u16 irq_fal_enbl;
124 u16 irq_ris_enbl; 134 u16 irq_ris_enbl;
125 struct ucb1x00_irq irq_handler[16]; 135 u16 irq_mask;
136 u16 irq_wake;
126 struct device dev; 137 struct device dev;
127 struct list_head node; 138 struct list_head node;
128 struct list_head devs; 139 struct list_head devs;
@@ -144,7 +155,7 @@ struct ucb1x00_driver {
144 struct list_head devs; 155 struct list_head devs;
145 int (*add)(struct ucb1x00_dev *dev); 156 int (*add)(struct ucb1x00_dev *dev);
146 void (*remove)(struct ucb1x00_dev *dev); 157 void (*remove)(struct ucb1x00_dev *dev);
147 int (*suspend)(struct ucb1x00_dev *dev, pm_message_t state); 158 int (*suspend)(struct ucb1x00_dev *dev);
148 int (*resume)(struct ucb1x00_dev *dev); 159 int (*resume)(struct ucb1x00_dev *dev);
149}; 160};
150 161
@@ -245,15 +256,4 @@ unsigned int ucb1x00_adc_read(struct ucb1x00 *ucb, int adc_channel, int sync);
245void ucb1x00_adc_enable(struct ucb1x00 *ucb); 256void ucb1x00_adc_enable(struct ucb1x00 *ucb);
246void ucb1x00_adc_disable(struct ucb1x00 *ucb); 257void ucb1x00_adc_disable(struct ucb1x00 *ucb);
247 258
248/*
249 * Which edges of the IRQ do you want to control today?
250 */
251#define UCB_RISING (1 << 0)
252#define UCB_FALLING (1 << 1)
253
254int ucb1x00_hook_irq(struct ucb1x00 *ucb, unsigned int idx, void (*fn)(int, void *), void *devid);
255void ucb1x00_enable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges);
256void ucb1x00_disable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges);
257int ucb1x00_free_irq(struct ucb1x00 *ucb, unsigned int idx, void *devid);
258
259#endif 259#endif
diff --git a/include/linux/sa11x0-dma.h b/include/linux/sa11x0-dma.h
new file mode 100644
index 000000000000..65839a58b8e5
--- /dev/null
+++ b/include/linux/sa11x0-dma.h
@@ -0,0 +1,24 @@
1/*
2 * SA11x0 DMA Engine support
3 *
4 * Copyright (C) 2012 Russell King
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __LINUX_SA11X0_DMA_H
11#define __LINUX_SA11X0_DMA_H
12
13struct dma_chan;
14
15#if defined(CONFIG_DMA_SA11X0) || defined(CONFIG_DMA_SA11X0_MODULE)
16bool sa11x0_dma_filter_fn(struct dma_chan *, void *);
17#else
18static inline bool sa11x0_dma_filter_fn(struct dma_chan *c, void *d)
19{
20 return false;
21}
22#endif
23
24#endif
diff --git a/include/video/sa1100fb.h b/include/video/sa1100fb.h
new file mode 100644
index 000000000000..4ab409653785
--- /dev/null
+++ b/include/video/sa1100fb.h
@@ -0,0 +1,63 @@
1/*
2 * StrongARM 1100 LCD Controller Frame Buffer Device
3 *
4 * Copyright (C) 1999 Eric A. Thomas
5 * Based on acornfb.c Copyright (C) Russell King.
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive
9 * for more details.
10 */
11#ifndef _VIDEO_SA1100FB_H
12#define _VIDEO_SA1100FB_H
13
14#include <linux/fb.h>
15#include <linux/types.h>
16
17#define RGB_4 0
18#define RGB_8 1
19#define RGB_16 2
20#define NR_RGB 3
21
22/* These are the bitfields for each display depth that we support. */
23struct sa1100fb_rgb {
24 struct fb_bitfield red;
25 struct fb_bitfield green;
26 struct fb_bitfield blue;
27 struct fb_bitfield transp;
28};
29
30/* This structure describes the machine which we are running on. */
31struct sa1100fb_mach_info {
32 u_long pixclock;
33
34 u_short xres;
35 u_short yres;
36
37 u_char bpp;
38 u_char hsync_len;
39 u_char left_margin;
40 u_char right_margin;
41
42 u_char vsync_len;
43 u_char upper_margin;
44 u_char lower_margin;
45 u_char sync;
46
47 u_int cmap_greyscale:1,
48 cmap_inverse:1,
49 cmap_static:1,
50 unused:29;
51
52 u_int lccr0;
53 u_int lccr3;
54
55 /* Overrides for the default RGB maps */
56 const struct sa1100fb_rgb *rgb[NR_RGB];
57
58 void (*backlight_power)(int);
59 void (*lcd_power)(int);
60 void (*set_visual)(u32);
61};
62
63#endif