diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-24 13:05:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-24 13:05:50 -0400 |
commit | 698158c799c7961824ccdb773250e16c0dd5d9e4 (patch) | |
tree | 96f034be9e9a95e6f68b5d20d1a3df7a3cbf724a /include | |
parent | 4c7827eec78abe6fe68fd29305806467f2a51e63 (diff) | |
parent | 338b9bb3adac0d2c5a1e180491d9b001d624c402 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'include')
46 files changed, 1615 insertions, 278 deletions
diff --git a/include/asm-arm/arch-iop13xx/adma.h b/include/asm-arm/arch-iop13xx/adma.h index 90d14ee564f5..ef4f5da2029f 100644 --- a/include/asm-arm/arch-iop13xx/adma.h +++ b/include/asm-arm/arch-iop13xx/adma.h | |||
@@ -198,17 +198,13 @@ iop_chan_memset_slot_count(size_t len, int *slots_per_op) | |||
198 | static inline int | 198 | static inline int |
199 | iop_chan_xor_slot_count(size_t len, int src_cnt, int *slots_per_op) | 199 | iop_chan_xor_slot_count(size_t len, int src_cnt, int *slots_per_op) |
200 | { | 200 | { |
201 | int num_slots; | 201 | static const char slot_count_table[] = { 1, 2, 2, 2, |
202 | /* slots_to_find = 1 for basic descriptor + 1 per 4 sources above 1 | 202 | 2, 3, 3, 3, |
203 | * (1 source => 8 bytes) (1 slot => 32 bytes) | 203 | 3, 4, 4, 4, |
204 | */ | 204 | 4, 5, 5, 5, |
205 | num_slots = 1 + (((src_cnt - 1) << 3) >> 5); | 205 | }; |
206 | if (((src_cnt - 1) << 3) & 0x1f) | 206 | *slots_per_op = slot_count_table[src_cnt - 1]; |
207 | num_slots++; | 207 | return *slots_per_op; |
208 | |||
209 | *slots_per_op = num_slots; | ||
210 | |||
211 | return num_slots; | ||
212 | } | 208 | } |
213 | 209 | ||
214 | #define ADMA_MAX_BYTE_COUNT (16 * 1024 * 1024) | 210 | #define ADMA_MAX_BYTE_COUNT (16 * 1024 * 1024) |
diff --git a/include/asm-arm/arch-pxa/cm-x270.h b/include/asm-arm/arch-pxa/cm-x270.h deleted file mode 100644 index f8fac9e18009..000000000000 --- a/include/asm-arm/arch-pxa/cm-x270.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm/arch-pxa/cm-x270.h | ||
3 | * | ||
4 | * Copyright Compulab Ltd., 2003, 2007 | ||
5 | * Mike Rapoport <mike@compulab.co.il> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | |||
13 | /* CM-x270 device physical addresses */ | ||
14 | #define CMX270_CS1_PHYS (PXA_CS1_PHYS) | ||
15 | #define MARATHON_PHYS (PXA_CS2_PHYS) | ||
16 | #define CMX270_IDE104_PHYS (PXA_CS3_PHYS) | ||
17 | #define CMX270_IT8152_PHYS (PXA_CS4_PHYS) | ||
18 | |||
19 | /* Statically mapped regions */ | ||
20 | #define CMX270_VIRT_BASE (0xe8000000) | ||
21 | #define CMX270_IT8152_VIRT (CMX270_VIRT_BASE) | ||
22 | #define CMX270_IDE104_VIRT (CMX270_IT8152_VIRT + SZ_64M) | ||
23 | |||
24 | /* GPIO related definitions */ | ||
25 | #define GPIO_IT8152_IRQ (22) | ||
26 | |||
27 | #define IRQ_GPIO_IT8152_IRQ IRQ_GPIO(GPIO_IT8152_IRQ) | ||
28 | #define PME_IRQ IRQ_GPIO(0) | ||
29 | #define CMX270_IDE_IRQ IRQ_GPIO(100) | ||
30 | #define CMX270_GPIRQ1 IRQ_GPIO(101) | ||
31 | #define CMX270_TOUCHIRQ IRQ_GPIO(96) | ||
32 | #define CMX270_ETHIRQ IRQ_GPIO(10) | ||
33 | #define CMX270_GFXIRQ IRQ_GPIO(95) | ||
34 | #define CMX270_NANDIRQ IRQ_GPIO(89) | ||
35 | #define CMX270_MMC_IRQ IRQ_GPIO(83) | ||
36 | |||
37 | /* PCMCIA related definitions */ | ||
38 | #define PCC_DETECT(x) (GPLR(84 - (x)) & GPIO_bit(84 - (x))) | ||
39 | #define PCC_READY(x) (GPLR(82 - (x)) & GPIO_bit(82 - (x))) | ||
40 | |||
41 | #define PCMCIA_S0_CD_VALID IRQ_GPIO(84) | ||
42 | #define PCMCIA_S0_CD_VALID_EDGE GPIO_BOTH_EDGES | ||
43 | |||
44 | #define PCMCIA_S1_CD_VALID IRQ_GPIO(83) | ||
45 | #define PCMCIA_S1_CD_VALID_EDGE GPIO_BOTH_EDGES | ||
46 | |||
47 | #define PCMCIA_S0_RDYINT IRQ_GPIO(82) | ||
48 | #define PCMCIA_S1_RDYINT IRQ_GPIO(81) | ||
49 | |||
50 | #define PCMCIA_RESET_GPIO 53 | ||
diff --git a/include/asm-arm/arch-pxa/eseries-gpio.h b/include/asm-arm/arch-pxa/eseries-gpio.h new file mode 100644 index 000000000000..4c90b1310270 --- /dev/null +++ b/include/asm-arm/arch-pxa/eseries-gpio.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * eseries-gpio.h | ||
3 | * | ||
4 | * Copyright (C) Ian Molton <spyro@f2s.com> | ||
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 | */ | ||
11 | |||
12 | /* e-series power button */ | ||
13 | #define GPIO_ESERIES_POWERBTN 0 | ||
14 | |||
15 | /* UDC GPIO definitions */ | ||
16 | #define GPIO_E7XX_USB_DISC 13 | ||
17 | #define GPIO_E7XX_USB_PULLUP 3 | ||
18 | |||
19 | #define GPIO_E800_USB_DISC 4 | ||
20 | #define GPIO_E800_USB_PULLUP 84 | ||
21 | |||
22 | /* e740 PCMCIA GPIO definitions */ | ||
23 | /* Note: PWR1 seems to be inverted */ | ||
24 | #define GPIO_E740_PCMCIA_CD0 8 | ||
25 | #define GPIO_E740_PCMCIA_CD1 44 | ||
26 | #define GPIO_E740_PCMCIA_RDY0 11 | ||
27 | #define GPIO_E740_PCMCIA_RDY1 6 | ||
28 | #define GPIO_E740_PCMCIA_RST0 27 | ||
29 | #define GPIO_E740_PCMCIA_RST1 24 | ||
30 | #define GPIO_E740_PCMCIA_PWR0 20 | ||
31 | #define GPIO_E740_PCMCIA_PWR1 23 | ||
32 | |||
33 | /* e750 PCMCIA GPIO definitions */ | ||
34 | #define GPIO_E750_PCMCIA_CD0 8 | ||
35 | #define GPIO_E750_PCMCIA_RDY0 12 | ||
36 | #define GPIO_E750_PCMCIA_RST0 27 | ||
37 | #define GPIO_E750_PCMCIA_PWR0 20 | ||
38 | |||
39 | /* e800 PCMCIA GPIO definitions */ | ||
40 | #define GPIO_E800_PCMCIA_RST0 69 | ||
41 | #define GPIO_E800_PCMCIA_RST1 72 | ||
42 | #define GPIO_E800_PCMCIA_PWR0 20 | ||
43 | #define GPIO_E800_PCMCIA_PWR1 73 | ||
44 | |||
45 | /* e7xx IrDA power control */ | ||
46 | #define GPIO_E7XX_IR_ON 38 | ||
47 | |||
48 | /* ASIC related GPIOs */ | ||
49 | #define GPIO_ESERIES_TMIO_IRQ 5 | ||
50 | #define GPIO_E800_ANGELX_IRQ 8 | ||
diff --git a/include/asm-arm/arch-pxa/eseries-irq.h b/include/asm-arm/arch-pxa/eseries-irq.h new file mode 100644 index 000000000000..f2a93d5e31d3 --- /dev/null +++ b/include/asm-arm/arch-pxa/eseries-irq.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * eseries-irq.h | ||
3 | * | ||
4 | * Copyright (C) Ian Molton <spyro@f2s.com> | ||
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 | */ | ||
11 | |||
12 | #define ANGELX_IRQ_BASE (IRQ_BOARD_START+8) | ||
13 | #define IRQ_ANGELX(n) (ANGELX_IRQ_BASE + (n)) | ||
14 | |||
15 | #define ANGELX_RDY0_IRQ IRQ_ANGELX(0) | ||
16 | #define ANGELX_ST0_IRQ IRQ_ANGELX(1) | ||
17 | #define ANGELX_CD0_IRQ IRQ_ANGELX(2) | ||
18 | #define ANGELX_RDY1_IRQ IRQ_ANGELX(3) | ||
19 | #define ANGELX_ST1_IRQ IRQ_ANGELX(4) | ||
20 | #define ANGELX_CD1_IRQ IRQ_ANGELX(5) | ||
21 | |||
22 | #define TMIO_IRQ_BASE (IRQ_BOARD_START+0) | ||
23 | #define IRQ_TMIO(n) (TMIO_IRQ_BASE + (n)) | ||
24 | |||
25 | #define TMIO_SD_IRQ IRQ_TMIO(1) | ||
26 | #define TMIO_USB_IRQ IRQ_TMIO(2) | ||
27 | |||
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index d9af6dabc899..979a45695d7d 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h | |||
@@ -69,6 +69,12 @@ | |||
69 | _id == 0x212; \ | 69 | _id == 0x212; \ |
70 | }) | 70 | }) |
71 | 71 | ||
72 | #define __cpu_is_pxa255(id) \ | ||
73 | ({ \ | ||
74 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
75 | _id == 0x2d0; \ | ||
76 | }) | ||
77 | |||
72 | #define __cpu_is_pxa25x(id) \ | 78 | #define __cpu_is_pxa25x(id) \ |
73 | ({ \ | 79 | ({ \ |
74 | unsigned int _id = (id) >> 4 & 0xfff; \ | 80 | unsigned int _id = (id) >> 4 & 0xfff; \ |
@@ -76,6 +82,7 @@ | |||
76 | }) | 82 | }) |
77 | #else | 83 | #else |
78 | #define __cpu_is_pxa21x(id) (0) | 84 | #define __cpu_is_pxa21x(id) (0) |
85 | #define __cpu_is_pxa255(id) (0) | ||
79 | #define __cpu_is_pxa25x(id) (0) | 86 | #define __cpu_is_pxa25x(id) (0) |
80 | #endif | 87 | #endif |
81 | 88 | ||
@@ -119,11 +126,26 @@ | |||
119 | #define __cpu_is_pxa320(id) (0) | 126 | #define __cpu_is_pxa320(id) (0) |
120 | #endif | 127 | #endif |
121 | 128 | ||
129 | #ifdef CONFIG_CPU_PXA930 | ||
130 | #define __cpu_is_pxa930(id) \ | ||
131 | ({ \ | ||
132 | unsigned int _id = (id) >> 4 & 0xfff; \ | ||
133 | _id == 0x683; \ | ||
134 | }) | ||
135 | #else | ||
136 | #define __cpu_is_pxa930(id) (0) | ||
137 | #endif | ||
138 | |||
122 | #define cpu_is_pxa21x() \ | 139 | #define cpu_is_pxa21x() \ |
123 | ({ \ | 140 | ({ \ |
124 | __cpu_is_pxa21x(read_cpuid_id()); \ | 141 | __cpu_is_pxa21x(read_cpuid_id()); \ |
125 | }) | 142 | }) |
126 | 143 | ||
144 | #define cpu_is_pxa255() \ | ||
145 | ({ \ | ||
146 | __cpu_is_pxa255(read_cpuid_id()); \ | ||
147 | }) | ||
148 | |||
127 | #define cpu_is_pxa25x() \ | 149 | #define cpu_is_pxa25x() \ |
128 | ({ \ | 150 | ({ \ |
129 | __cpu_is_pxa25x(read_cpuid_id()); \ | 151 | __cpu_is_pxa25x(read_cpuid_id()); \ |
@@ -149,6 +171,12 @@ | |||
149 | __cpu_is_pxa320(read_cpuid_id()); \ | 171 | __cpu_is_pxa320(read_cpuid_id()); \ |
150 | }) | 172 | }) |
151 | 173 | ||
174 | #define cpu_is_pxa930() \ | ||
175 | ({ \ | ||
176 | unsigned int id = read_cpuid(CPUID_ID); \ | ||
177 | __cpu_is_pxa930(id); \ | ||
178 | }) | ||
179 | |||
152 | /* | 180 | /* |
153 | * CPUID Core Generation Bit | 181 | * CPUID Core Generation Bit |
154 | * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x | 182 | * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x |
@@ -196,6 +224,11 @@ extern void pxa_gpio_set_value(unsigned gpio, int value); | |||
196 | */ | 224 | */ |
197 | extern unsigned int get_memclk_frequency_10khz(void); | 225 | extern unsigned int get_memclk_frequency_10khz(void); |
198 | 226 | ||
227 | /* | ||
228 | * register GPIO as reset generator | ||
229 | */ | ||
230 | extern int init_gpio_reset(int gpio); | ||
231 | |||
199 | #endif | 232 | #endif |
200 | 233 | ||
201 | #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) | 234 | #if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) |
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index b6c8fe377683..9413121b0ed9 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h | |||
@@ -180,10 +180,13 @@ | |||
180 | #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) | 180 | #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) |
181 | #elif defined(CONFIG_ARCH_LUBBOCK) || \ | 181 | #elif defined(CONFIG_ARCH_LUBBOCK) || \ |
182 | defined(CONFIG_MACH_LOGICPD_PXA270) || \ | 182 | defined(CONFIG_MACH_LOGICPD_PXA270) || \ |
183 | defined(CONFIG_MACH_TOSA) || \ | ||
183 | defined(CONFIG_MACH_MAINSTONE) || \ | 184 | defined(CONFIG_MACH_MAINSTONE) || \ |
184 | defined(CONFIG_MACH_PCM027) || \ | 185 | defined(CONFIG_MACH_PCM027) || \ |
185 | defined(CONFIG_MACH_MAGICIAN) | 186 | defined(CONFIG_MACH_MAGICIAN) |
186 | #define NR_IRQS (IRQ_BOARD_END) | 187 | #define NR_IRQS (IRQ_BOARD_END) |
188 | #elif defined(CONFIG_MACH_ZYLONITE) | ||
189 | #define NR_IRQS (IRQ_BOARD_START + 32) | ||
187 | #else | 190 | #else |
188 | #define NR_IRQS (IRQ_BOARD_START) | 191 | #define NR_IRQS (IRQ_BOARD_START) |
189 | #endif | 192 | #endif |
diff --git a/include/asm-arm/arch-pxa/mfp-pxa2xx.h b/include/asm-arm/arch-pxa/mfp-pxa2xx.h index db8d890d237c..8de1c0dae624 100644 --- a/include/asm-arm/arch-pxa/mfp-pxa2xx.h +++ b/include/asm-arm/arch-pxa/mfp-pxa2xx.h | |||
@@ -128,5 +128,6 @@ | |||
128 | #define GPIO84_GPIO MFP_CFG_IN(GPIO84, AF0) | 128 | #define GPIO84_GPIO MFP_CFG_IN(GPIO84, AF0) |
129 | 129 | ||
130 | extern void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num); | 130 | extern void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num); |
131 | extern void pxa2xx_mfp_set_lpm(int mfp, unsigned long lpm); | ||
131 | extern int gpio_set_wake(unsigned int gpio, unsigned int on); | 132 | extern int gpio_set_wake(unsigned int gpio, unsigned int on); |
132 | #endif /* __ASM_ARCH_MFP_PXA2XX_H */ | 133 | #endif /* __ASM_ARCH_MFP_PXA2XX_H */ |
diff --git a/include/asm-arm/arch-pxa/mfp-pxa930.h b/include/asm-arm/arch-pxa/mfp-pxa930.h new file mode 100644 index 000000000000..c4e945ab1923 --- /dev/null +++ b/include/asm-arm/arch-pxa/mfp-pxa930.h | |||
@@ -0,0 +1,491 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pxa/mfp-pxa930.h | ||
3 | * | ||
4 | * PXA930 specific MFP configuration definitions | ||
5 | * | ||
6 | * Copyright (C) 2007-2008 Marvell International Ltd. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MFP_PXA9xx_H | ||
14 | #define __ASM_ARCH_MFP_PXA9xx_H | ||
15 | |||
16 | #include <asm/arch/mfp.h> | ||
17 | #include <asm/arch/mfp-pxa3xx.h> | ||
18 | |||
19 | /* GPIO */ | ||
20 | #define GPIO46_GPIO MFP_CFG(GPIO46, AF0) | ||
21 | #define GPIO49_GPIO MFP_CFG(GPIO49, AF0) | ||
22 | #define GPIO50_GPIO MFP_CFG(GPIO50, AF0) | ||
23 | #define GPIO51_GPIO MFP_CFG(GPIO51, AF0) | ||
24 | #define GPIO52_GPIO MFP_CFG(GPIO52, AF0) | ||
25 | #define GPIO56_GPIO MFP_CFG(GPIO56, AF0) | ||
26 | #define GPIO58_GPIO MFP_CFG(GPIO58, AF0) | ||
27 | #define GPIO59_GPIO MFP_CFG(GPIO59, AF0) | ||
28 | #define GPIO60_GPIO MFP_CFG(GPIO60, AF0) | ||
29 | #define GPIO61_GPIO MFP_CFG(GPIO61, AF0) | ||
30 | #define GPIO62_GPIO MFP_CFG(GPIO62, AF0) | ||
31 | |||
32 | #define GSIM_UCLK_GPIO_79 MFP_CFG(GSIM_UCLK, AF0) | ||
33 | #define GSIM_UIO_GPIO_80 MFP_CFG(GSIM_UIO, AF0) | ||
34 | #define GSIM_nURST_GPIO_81 MFP_CFG(GSIM_nURST, AF0) | ||
35 | #define GSIM_UDET_GPIO_82 MFP_CFG(GSIM_UDET, AF0) | ||
36 | |||
37 | #define DF_IO15_GPIO_28 MFP_CFG(DF_IO15, AF0) | ||
38 | #define DF_IO14_GPIO_29 MFP_CFG(DF_IO14, AF0) | ||
39 | #define DF_IO13_GPIO_30 MFP_CFG(DF_IO13, AF0) | ||
40 | #define DF_IO12_GPIO_31 MFP_CFG(DF_IO12, AF0) | ||
41 | #define DF_IO11_GPIO_32 MFP_CFG(DF_IO11, AF0) | ||
42 | #define DF_IO10_GPIO_33 MFP_CFG(DF_IO10, AF0) | ||
43 | #define DF_IO9_GPIO_34 MFP_CFG(DF_IO9, AF0) | ||
44 | #define DF_IO8_GPIO_35 MFP_CFG(DF_IO8, AF0) | ||
45 | #define DF_IO7_GPIO_36 MFP_CFG(DF_IO7, AF0) | ||
46 | #define DF_IO6_GPIO_37 MFP_CFG(DF_IO6, AF0) | ||
47 | #define DF_IO5_GPIO_38 MFP_CFG(DF_IO5, AF0) | ||
48 | #define DF_IO4_GPIO_39 MFP_CFG(DF_IO4, AF0) | ||
49 | #define DF_IO3_GPIO_40 MFP_CFG(DF_IO3, AF0) | ||
50 | #define DF_IO2_GPIO_41 MFP_CFG(DF_IO2, AF0) | ||
51 | #define DF_IO1_GPIO_42 MFP_CFG(DF_IO1, AF0) | ||
52 | #define DF_IO0_GPIO_43 MFP_CFG(DF_IO0, AF0) | ||
53 | #define DF_nCS0_GPIO_44 MFP_CFG(DF_nCS0, AF0) | ||
54 | #define DF_nCS1_GPIO_45 MFP_CFG(DF_nCS1, AF0) | ||
55 | #define DF_nWE_GPIO_46 MFP_CFG(DF_nWE, AF0) | ||
56 | #define DF_nRE_nOE_GPIO_47 MFP_CFG(DF_nRE_nOE, AF0) | ||
57 | #define DF_CLE_nOE_GPIO_48 MFP_CFG(DF_CLE_nOE, AF0) | ||
58 | #define DF_nADV1_ALE_GPIO_49 MFP_CFG(DF_nADV1_ALE, AF0) | ||
59 | #define DF_nADV2_ALE_GPIO_50 MFP_CFG(DF_nADV2_ALE, AF0) | ||
60 | #define DF_INT_RnB_GPIO_51 MFP_CFG(DF_INT_RnB, AF0) | ||
61 | #define DF_SCLK_E_GPIO_52 MFP_CFG(DF_SCLK_E, AF0) | ||
62 | |||
63 | #define DF_ADDR0_GPIO_53 MFP_CFG(DF_ADDR0, AF0) | ||
64 | #define DF_ADDR1_GPIO_54 MFP_CFG(DF_ADDR1, AF0) | ||
65 | #define DF_ADDR2_GPIO_55 MFP_CFG(DF_ADDR2, AF0) | ||
66 | #define DF_ADDR3_GPIO_56 MFP_CFG(DF_ADDR3, AF0) | ||
67 | #define nXCVREN_GPIO_57 MFP_CFG(nXCVREN, AF0) | ||
68 | #define nLUA_GPIO_58 MFP_CFG(nLUA, AF0) | ||
69 | #define nLLA_GPIO_59 MFP_CFG(nLLA, AF0) | ||
70 | #define nBE0_GPIO_60 MFP_CFG(nBE0, AF0) | ||
71 | #define nBE1_GPIO_61 MFP_CFG(nBE1, AF0) | ||
72 | #define RDY_GPIO_62 MFP_CFG(RDY, AF0) | ||
73 | |||
74 | /* Chip Select */ | ||
75 | #define DF_nCS0_nCS2 MFP_CFG_LPM(DF_nCS0, AF3, PULL_HIGH) | ||
76 | #define DF_nCS1_nCS3 MFP_CFG_LPM(DF_nCS1, AF3, PULL_HIGH) | ||
77 | |||
78 | /* AC97 */ | ||
79 | #define GPIO83_BAC97_SYSCLK MFP_CFG(GPIO83, AF3) | ||
80 | #define GPIO84_BAC97_SDATA_IN0 MFP_CFG(GPIO84, AF3) | ||
81 | #define GPIO85_BAC97_BITCLK MFP_CFG(GPIO85, AF3) | ||
82 | #define GPIO86_BAC97_nRESET MFP_CFG(GPIO86, AF3) | ||
83 | #define GPIO87_BAC97_SYNC MFP_CFG(GPIO87, AF3) | ||
84 | #define GPIO88_BAC97_SDATA_OUT MFP_CFG(GPIO88, AF3) | ||
85 | |||
86 | /* I2C */ | ||
87 | #define GPIO39_CI2C_SCL MFP_CFG_LPM(GPIO39, AF3, PULL_HIGH) | ||
88 | #define GPIO40_CI2C_SDA MFP_CFG_LPM(GPIO40, AF3, PULL_HIGH) | ||
89 | |||
90 | #define GPIO51_CI2C_SCL MFP_CFG_LPM(GPIO51, AF3, PULL_HIGH) | ||
91 | #define GPIO52_CI2C_SDA MFP_CFG_LPM(GPIO52, AF3, PULL_HIGH) | ||
92 | |||
93 | #define GPIO63_CI2C_SCL MFP_CFG_LPM(GPIO63, AF4, PULL_HIGH) | ||
94 | #define GPIO64_CI2C_SDA MFP_CFG_LPM(GPIO64, AF4, PULL_HIGH) | ||
95 | |||
96 | #define GPIO77_CI2C_SCL MFP_CFG_LPM(GPIO77, AF2, PULL_HIGH) | ||
97 | #define GPIO78_CI2C_SDA MFP_CFG_LPM(GPIO78, AF2, PULL_HIGH) | ||
98 | |||
99 | #define GPIO89_CI2C_SCL MFP_CFG_LPM(GPIO89, AF1, PULL_HIGH) | ||
100 | #define GPIO90_CI2C_SDA MFP_CFG_LPM(GPIO90, AF1, PULL_HIGH) | ||
101 | |||
102 | #define GPIO95_CI2C_SCL MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH) | ||
103 | #define GPIO96_CI2C_SDA MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH) | ||
104 | |||
105 | #define GPIO97_CI2C_SCL MFP_CFG_LPM(GPIO97, AF3, PULL_HIGH) | ||
106 | #define GPIO98_CI2C_SDA MFP_CFG_LPM(GPIO98, AF3, PULL_HIGH) | ||
107 | |||
108 | /* QCI */ | ||
109 | #define GPIO63_CI_DD_9 MFP_CFG_LPM(GPIO63, AF1, PULL_LOW) | ||
110 | #define GPIO64_CI_DD_8 MFP_CFG_LPM(GPIO64, AF1, PULL_LOW) | ||
111 | #define GPIO65_CI_DD_7 MFP_CFG_LPM(GPIO65, AF1, PULL_LOW) | ||
112 | #define GPIO66_CI_DD_6 MFP_CFG_LPM(GPIO66, AF1, PULL_LOW) | ||
113 | #define GPIO67_CI_DD_5 MFP_CFG_LPM(GPIO67, AF1, PULL_LOW) | ||
114 | #define GPIO68_CI_DD_4 MFP_CFG_LPM(GPIO68, AF1, PULL_LOW) | ||
115 | #define GPIO69_CI_DD_3 MFP_CFG_LPM(GPIO69, AF1, PULL_LOW) | ||
116 | #define GPIO70_CI_DD_2 MFP_CFG_LPM(GPIO70, AF1, PULL_LOW) | ||
117 | #define GPIO71_CI_DD_1 MFP_CFG_LPM(GPIO71, AF1, PULL_LOW) | ||
118 | #define GPIO72_CI_DD_0 MFP_CFG_LPM(GPIO72, AF1, PULL_LOW) | ||
119 | #define GPIO73_CI_HSYNC MFP_CFG_LPM(GPIO73, AF1, PULL_LOW) | ||
120 | #define GPIO74_CI_VSYNC MFP_CFG_LPM(GPIO74, AF1, PULL_LOW) | ||
121 | #define GPIO75_CI_MCLK MFP_CFG_LPM(GPIO75, AF1, PULL_LOW) | ||
122 | #define GPIO76_CI_PCLK MFP_CFG_LPM(GPIO76, AF1, PULL_LOW) | ||
123 | |||
124 | /* KEYPAD */ | ||
125 | #define GPIO4_KP_DKIN_4 MFP_CFG_LPM(GPIO4, AF3, FLOAT) | ||
126 | #define GPIO5_KP_DKIN_5 MFP_CFG_LPM(GPIO5, AF3, FLOAT) | ||
127 | #define GPIO6_KP_DKIN_6 MFP_CFG_LPM(GPIO6, AF3, FLOAT) | ||
128 | #define GPIO7_KP_DKIN_7 MFP_CFG_LPM(GPIO7, AF3, FLOAT) | ||
129 | #define GPIO8_KP_DKIN_4 MFP_CFG_LPM(GPIO8, AF3, FLOAT) | ||
130 | #define GPIO9_KP_DKIN_5 MFP_CFG_LPM(GPIO9, AF3, FLOAT) | ||
131 | #define GPIO10_KP_DKIN_6 MFP_CFG_LPM(GPIO10, AF3, FLOAT) | ||
132 | #define GPIO11_KP_DKIN_7 MFP_CFG_LPM(GPIO11, AF3, FLOAT) | ||
133 | |||
134 | #define GPIO12_KP_DKIN_0 MFP_CFG_LPM(GPIO12, AF2, FLOAT) | ||
135 | #define GPIO13_KP_DKIN_1 MFP_CFG_LPM(GPIO13, AF2, FLOAT) | ||
136 | #define GPIO14_KP_DKIN_2 MFP_CFG_LPM(GPIO14, AF2, FLOAT) | ||
137 | #define GPIO15_KP_DKIN_3 MFP_CFG_LPM(GPIO15, AF2, FLOAT) | ||
138 | |||
139 | #define GPIO41_KP_DKIN_0 MFP_CFG_LPM(GPIO41, AF2, FLOAT) | ||
140 | #define GPIO42_KP_DKIN_1 MFP_CFG_LPM(GPIO42, AF2, FLOAT) | ||
141 | #define GPIO43_KP_DKIN_2 MFP_CFG_LPM(GPIO43, AF2, FLOAT) | ||
142 | #define GPIO44_KP_DKIN_3 MFP_CFG_LPM(GPIO44, AF2, FLOAT) | ||
143 | #define GPIO41_KP_DKIN_4 MFP_CFG_LPM(GPIO41, AF4, FLOAT) | ||
144 | #define GPIO42_KP_DKIN_5 MFP_CFG_LPM(GPIO42, AF4, FLOAT) | ||
145 | |||
146 | #define GPIO0_KP_MKIN_0 MFP_CFG_LPM(GPIO0, AF1, FLOAT) | ||
147 | #define GPIO2_KP_MKIN_1 MFP_CFG_LPM(GPIO2, AF1, FLOAT) | ||
148 | #define GPIO4_KP_MKIN_2 MFP_CFG_LPM(GPIO4, AF1, FLOAT) | ||
149 | #define GPIO6_KP_MKIN_3 MFP_CFG_LPM(GPIO6, AF1, FLOAT) | ||
150 | #define GPIO8_KP_MKIN_4 MFP_CFG_LPM(GPIO8, AF1, FLOAT) | ||
151 | #define GPIO10_KP_MKIN_5 MFP_CFG_LPM(GPIO10, AF1, FLOAT) | ||
152 | #define GPIO12_KP_MKIN_6 MFP_CFG_LPM(GPIO12, AF1, FLOAT) | ||
153 | #define GPIO14_KP_MKIN_7 MFP_CFG(GPIO14, AF1) | ||
154 | #define GPIO35_KP_MKIN_5 MFP_CFG(GPIO35, AF4) | ||
155 | |||
156 | #define GPIO1_KP_MKOUT_0 MFP_CFG_LPM(GPIO1, AF1, DRIVE_HIGH) | ||
157 | #define GPIO3_KP_MKOUT_1 MFP_CFG_LPM(GPIO3, AF1, DRIVE_HIGH) | ||
158 | #define GPIO5_KP_MKOUT_2 MFP_CFG_LPM(GPIO5, AF1, DRIVE_HIGH) | ||
159 | #define GPIO7_KP_MKOUT_3 MFP_CFG_LPM(GPIO7, AF1, DRIVE_HIGH) | ||
160 | #define GPIO9_KP_MKOUT_4 MFP_CFG_LPM(GPIO9, AF1, DRIVE_HIGH) | ||
161 | #define GPIO11_KP_MKOUT_5 MFP_CFG_LPM(GPIO11, AF1, DRIVE_HIGH) | ||
162 | #define GPIO13_KP_MKOUT_6 MFP_CFG_LPM(GPIO13, AF1, DRIVE_HIGH) | ||
163 | #define GPIO15_KP_MKOUT_7 MFP_CFG_LPM(GPIO15, AF1, DRIVE_HIGH) | ||
164 | #define GPIO36_KP_MKOUT_5 MFP_CFG_LPM(GPIO36, AF4, DRIVE_HIGH) | ||
165 | |||
166 | /* LCD */ | ||
167 | #define GPIO17_LCD_FCLK_RD MFP_CFG(GPIO17, AF1) | ||
168 | #define GPIO18_LCD_LCLK_A0 MFP_CFG(GPIO18, AF1) | ||
169 | #define GPIO19_LCD_PCLK_WR MFP_CFG(GPIO19, AF1) | ||
170 | #define GPIO20_LCD_BIAS MFP_CFG(GPIO20, AF1) | ||
171 | #define GPIO21_LCD_CS MFP_CFG(GPIO21, AF1) | ||
172 | #define GPIO22_LCD_CS2 MFP_CFG(GPIO22, AF2) | ||
173 | #define GPIO22_LCD_VSYNC MFP_CFG(GPIO22, AF1) | ||
174 | #define GPIO23_LCD_DD0 MFP_CFG(GPIO23, AF1) | ||
175 | #define GPIO24_LCD_DD1 MFP_CFG(GPIO24, AF1) | ||
176 | #define GPIO25_LCD_DD2 MFP_CFG(GPIO25, AF1) | ||
177 | #define GPIO26_LCD_DD3 MFP_CFG(GPIO26, AF1) | ||
178 | #define GPIO27_LCD_DD4 MFP_CFG(GPIO27, AF1) | ||
179 | #define GPIO28_LCD_DD5 MFP_CFG(GPIO28, AF1) | ||
180 | #define GPIO29_LCD_DD6 MFP_CFG(GPIO29, AF1) | ||
181 | #define GPIO30_LCD_DD7 MFP_CFG(GPIO30, AF1) | ||
182 | #define GPIO31_LCD_DD8 MFP_CFG(GPIO31, AF1) | ||
183 | #define GPIO32_LCD_DD9 MFP_CFG(GPIO32, AF1) | ||
184 | #define GPIO33_LCD_DD10 MFP_CFG(GPIO33, AF1) | ||
185 | #define GPIO34_LCD_DD11 MFP_CFG(GPIO34, AF1) | ||
186 | #define GPIO35_LCD_DD12 MFP_CFG(GPIO35, AF1) | ||
187 | #define GPIO36_LCD_DD13 MFP_CFG(GPIO36, AF1) | ||
188 | #define GPIO37_LCD_DD14 MFP_CFG(GPIO37, AF1) | ||
189 | #define GPIO38_LCD_DD15 MFP_CFG(GPIO38, AF1) | ||
190 | #define GPIO39_LCD_DD16 MFP_CFG(GPIO39, AF1) | ||
191 | #define GPIO40_LCD_DD17 MFP_CFG(GPIO40, AF1) | ||
192 | #define GPIO41_LCD_CS2 MFP_CFG(GPIO41, AF3) | ||
193 | #define GPIO42_LCD_VSYNC2 MFP_CFG(GPIO42, AF3) | ||
194 | #define GPIO44_LCD_DD7 MFP_CFG(GPIO44, AF1) | ||
195 | |||
196 | /* Mini-LCD */ | ||
197 | #define GPIO17_MLCD_FCLK MFP_CFG(GPIO17, AF3) | ||
198 | #define GPIO18_MLCD_LCLK MFP_CFG(GPIO18, AF3) | ||
199 | #define GPIO19_MLCD_PCLK MFP_CFG(GPIO19, AF3) | ||
200 | #define GPIO20_MLCD_BIAS MFP_CFG(GPIO20, AF3) | ||
201 | #define GPIO23_MLCD_DD0 MFP_CFG(GPIO23, AF3) | ||
202 | #define GPIO24_MLCD_DD1 MFP_CFG(GPIO24, AF3) | ||
203 | #define GPIO25_MLCD_DD2 MFP_CFG(GPIO25, AF3) | ||
204 | #define GPIO26_MLCD_DD3 MFP_CFG(GPIO26, AF3) | ||
205 | #define GPIO27_MLCD_DD4 MFP_CFG(GPIO27, AF3) | ||
206 | #define GPIO28_MLCD_DD5 MFP_CFG(GPIO28, AF3) | ||
207 | #define GPIO29_MLCD_DD6 MFP_CFG(GPIO29, AF3) | ||
208 | #define GPIO30_MLCD_DD7 MFP_CFG(GPIO30, AF3) | ||
209 | #define GPIO31_MLCD_DD8 MFP_CFG(GPIO31, AF3) | ||
210 | #define GPIO32_MLCD_DD9 MFP_CFG(GPIO32, AF3) | ||
211 | #define GPIO33_MLCD_DD10 MFP_CFG(GPIO33, AF3) | ||
212 | #define GPIO34_MLCD_DD11 MFP_CFG(GPIO34, AF3) | ||
213 | #define GPIO35_MLCD_DD12 MFP_CFG(GPIO35, AF3) | ||
214 | #define GPIO36_MLCD_DD13 MFP_CFG(GPIO36, AF3) | ||
215 | #define GPIO37_MLCD_DD14 MFP_CFG(GPIO37, AF3) | ||
216 | #define GPIO38_MLCD_DD15 MFP_CFG(GPIO38, AF3) | ||
217 | #define GPIO44_MLCD_DD7 MFP_CFG(GPIO44, AF5) | ||
218 | |||
219 | /* MMC1 */ | ||
220 | #define GPIO10_MMC1_DAT3 MFP_CFG(GPIO10, AF4) | ||
221 | #define GPIO11_MMC1_DAT2 MFP_CFG(GPIO11, AF4) | ||
222 | #define GPIO12_MMC1_DAT1 MFP_CFG(GPIO12, AF4) | ||
223 | #define GPIO13_MMC1_DAT0 MFP_CFG(GPIO13, AF4) | ||
224 | #define GPIO14_MMC1_CMD MFP_CFG(GPIO14, AF4) | ||
225 | #define GPIO15_MMC1_CLK MFP_CFG(GPIO15, AF4) | ||
226 | #define GPIO55_MMC1_CMD MFP_CFG(GPIO55, AF3) | ||
227 | #define GPIO56_MMC1_CLK MFP_CFG(GPIO56, AF3) | ||
228 | #define GPIO57_MMC1_DAT0 MFP_CFG(GPIO57, AF3) | ||
229 | #define GPIO58_MMC1_DAT1 MFP_CFG(GPIO58, AF3) | ||
230 | #define GPIO59_MMC1_DAT2 MFP_CFG(GPIO59, AF3) | ||
231 | #define GPIO60_MMC1_DAT3 MFP_CFG(GPIO60, AF3) | ||
232 | |||
233 | #define DF_ADDR0_MMC1_CLK MFP_CFG(DF_ADDR0, AF2) | ||
234 | #define DF_ADDR1_MMC1_CMD MFP_CFG(DF_ADDR1, AF2) | ||
235 | #define DF_ADDR2_MMC1_DAT0 MFP_CFG(DF_ADDR2, AF2) | ||
236 | #define DF_ADDR3_MMC1_DAT1 MFP_CFG(DF_ADDR3, AF3) | ||
237 | #define nXCVREN_MMC1_DAT2 MFP_CFG(nXCVREN, AF2) | ||
238 | |||
239 | /* MMC2 */ | ||
240 | #define GPIO31_MMC2_CMD MFP_CFG(GPIO31, AF7) | ||
241 | #define GPIO32_MMC2_CLK MFP_CFG(GPIO32, AF7) | ||
242 | #define GPIO33_MMC2_DAT0 MFP_CFG(GPIO33, AF7) | ||
243 | #define GPIO34_MMC2_DAT1 MFP_CFG(GPIO34, AF7) | ||
244 | #define GPIO35_MMC2_DAT2 MFP_CFG(GPIO35, AF7) | ||
245 | #define GPIO36_MMC2_DAT3 MFP_CFG(GPIO36, AF7) | ||
246 | |||
247 | #define GPIO101_MMC2_DAT3 MFP_CFG(GPIO101, AF1) | ||
248 | #define GPIO102_MMC2_DAT2 MFP_CFG(GPIO102, AF1) | ||
249 | #define GPIO103_MMC2_DAT1 MFP_CFG(GPIO103, AF1) | ||
250 | #define GPIO104_MMC2_DAT0 MFP_CFG(GPIO104, AF1) | ||
251 | #define GPIO105_MMC2_CMD MFP_CFG(GPIO105, AF1) | ||
252 | #define GPIO106_MMC2_CLK MFP_CFG(GPIO106, AF1) | ||
253 | |||
254 | #define DF_IO10_MMC2_DAT3 MFP_CFG(DF_IO10, AF3) | ||
255 | #define DF_IO11_MMC2_DAT2 MFP_CFG(DF_IO11, AF3) | ||
256 | #define DF_IO12_MMC2_DAT1 MFP_CFG(DF_IO12, AF3) | ||
257 | #define DF_IO13_MMC2_DAT0 MFP_CFG(DF_IO13, AF3) | ||
258 | #define DF_IO14_MMC2_CLK MFP_CFG(DF_IO14, AF3) | ||
259 | #define DF_IO15_MMC2_CMD MFP_CFG(DF_IO15, AF3) | ||
260 | |||
261 | /* BSSP1 */ | ||
262 | #define GPIO12_BSSP1_CLK MFP_CFG(GPIO12, AF3) | ||
263 | #define GPIO13_BSSP1_FRM MFP_CFG(GPIO13, AF3) | ||
264 | #define GPIO14_BSSP1_RXD MFP_CFG(GPIO14, AF3) | ||
265 | #define GPIO15_BSSP1_TXD MFP_CFG(GPIO15, AF3) | ||
266 | #define GPIO97_BSSP1_CLK MFP_CFG(GPIO97, AF5) | ||
267 | #define GPIO98_BSSP1_FRM MFP_CFG(GPIO98, AF5) | ||
268 | |||
269 | /* BSSP2 */ | ||
270 | #define GPIO84_BSSP2_SDATA_IN MFP_CFG(GPIO84, AF1) | ||
271 | #define GPIO85_BSSP2_BITCLK MFP_CFG(GPIO85, AF1) | ||
272 | #define GPIO86_BSSP2_SYSCLK MFP_CFG(GPIO86, AF1) | ||
273 | #define GPIO87_BSSP2_SYNC MFP_CFG(GPIO87, AF1) | ||
274 | #define GPIO88_BSSP2_DATA_OUT MFP_CFG(GPIO88, AF1) | ||
275 | #define GPIO86_BSSP2_SDATA_IN MFP_CFG(GPIO86, AF4) | ||
276 | |||
277 | /* BSSP3 */ | ||
278 | #define GPIO79_BSSP3_CLK MFP_CFG(GPIO79, AF1) | ||
279 | #define GPIO80_BSSP3_FRM MFP_CFG(GPIO80, AF1) | ||
280 | #define GPIO81_BSSP3_TXD MFP_CFG(GPIO81, AF1) | ||
281 | #define GPIO82_BSSP3_RXD MFP_CFG(GPIO82, AF1) | ||
282 | #define GPIO83_BSSP3_SYSCLK MFP_CFG(GPIO83, AF1) | ||
283 | |||
284 | /* BSSP4 */ | ||
285 | #define GPIO43_BSSP4_CLK MFP_CFG(GPIO43, AF4) | ||
286 | #define GPIO44_BSSP4_FRM MFP_CFG(GPIO44, AF4) | ||
287 | #define GPIO45_BSSP4_TXD MFP_CFG(GPIO45, AF4) | ||
288 | #define GPIO46_BSSP4_RXD MFP_CFG(GPIO46, AF4) | ||
289 | |||
290 | #define GPIO51_BSSP4_CLK MFP_CFG(GPIO51, AF4) | ||
291 | #define GPIO52_BSSP4_FRM MFP_CFG(GPIO52, AF4) | ||
292 | #define GPIO53_BSSP4_TXD MFP_CFG(GPIO53, AF4) | ||
293 | #define GPIO54_BSSP4_RXD MFP_CFG(GPIO54, AF4) | ||
294 | |||
295 | /* GSSP1 */ | ||
296 | #define GPIO79_GSSP1_CLK MFP_CFG(GPIO79, AF2) | ||
297 | #define GPIO80_GSSP1_FRM MFP_CFG(GPIO80, AF2) | ||
298 | #define GPIO81_GSSP1_TXD MFP_CFG(GPIO81, AF2) | ||
299 | #define GPIO82_GSSP1_RXD MFP_CFG(GPIO82, AF2) | ||
300 | #define GPIO83_GSSP1_SYSCLK MFP_CFG(GPIO83, AF2) | ||
301 | |||
302 | #define GPIO93_GSSP1_CLK MFP_CFG(GPIO93, AF4) | ||
303 | #define GPIO94_GSSP1_FRM MFP_CFG(GPIO94, AF4) | ||
304 | #define GPIO95_GSSP1_TXD MFP_CFG(GPIO95, AF4) | ||
305 | #define GPIO96_GSSP1_RXD MFP_CFG(GPIO96, AF4) | ||
306 | |||
307 | /* GSSP2 */ | ||
308 | #define GPIO47_GSSP2_CLK MFP_CFG(GPIO47, AF4) | ||
309 | #define GPIO48_GSSP2_FRM MFP_CFG(GPIO48, AF4) | ||
310 | #define GPIO49_GSSP2_RXD MFP_CFG(GPIO49, AF4) | ||
311 | #define GPIO50_GSSP2_TXD MFP_CFG(GPIO50, AF4) | ||
312 | |||
313 | #define GPIO69_GSSP2_CLK MFP_CFG(GPIO69, AF4) | ||
314 | #define GPIO70_GSSP2_FRM MFP_CFG(GPIO70, AF4) | ||
315 | #define GPIO71_GSSP2_RXD MFP_CFG(GPIO71, AF4) | ||
316 | #define GPIO72_GSSP2_TXD MFP_CFG(GPIO72, AF4) | ||
317 | |||
318 | #define GPIO84_GSSP2_RXD MFP_CFG(GPIO84, AF2) | ||
319 | #define GPIO85_GSSP2_CLK MFP_CFG(GPIO85, AF2) | ||
320 | #define GPIO86_GSSP2_SYSCLK MFP_CFG(GPIO86, AF2) | ||
321 | #define GPIO87_GSSP2_FRM MFP_CFG(GPIO87, AF2) | ||
322 | #define GPIO88_GSSP2_TXD MFP_CFG(GPIO88, AF2) | ||
323 | #define GPIO86_GSSP2_RXD MFP_CFG(GPIO86, AF5) | ||
324 | |||
325 | #define GPIO103_GSSP2_CLK MFP_CFG(GPIO103, AF2) | ||
326 | #define GPIO104_GSSP2_FRM MFP_CFG(GPIO104, AF2) | ||
327 | #define GPIO105_GSSP2_RXD MFP_CFG(GPIO105, AF2) | ||
328 | #define GPIO106_GSSP2_TXD MFP_CFG(GPIO106, AF2) | ||
329 | |||
330 | /* UART1 - FFUART */ | ||
331 | #define GPIO47_UART1_DSR_N MFP_CFG(GPIO47, AF1) | ||
332 | #define GPIO48_UART1_DTR_N MFP_CFG(GPIO48, AF1) | ||
333 | #define GPIO49_UART1_RI MFP_CFG(GPIO49, AF1) | ||
334 | #define GPIO50_UART1_DCD MFP_CFG(GPIO50, AF1) | ||
335 | #define GPIO51_UART1_CTS MFP_CFG(GPIO51, AF1) | ||
336 | #define GPIO52_UART1_RTS MFP_CFG(GPIO52, AF1) | ||
337 | #define GPIO53_UART1_RXD MFP_CFG(GPIO53, AF1) | ||
338 | #define GPIO54_UART1_TXD MFP_CFG(GPIO54, AF1) | ||
339 | |||
340 | #define GPIO63_UART1_TXD MFP_CFG(GPIO63, AF2) | ||
341 | #define GPIO64_UART1_RXD MFP_CFG(GPIO64, AF2) | ||
342 | #define GPIO65_UART1_DSR MFP_CFG(GPIO65, AF2) | ||
343 | #define GPIO66_UART1_DTR MFP_CFG(GPIO66, AF2) | ||
344 | #define GPIO67_UART1_RI MFP_CFG(GPIO67, AF2) | ||
345 | #define GPIO68_UART1_DCD MFP_CFG(GPIO68, AF2) | ||
346 | #define GPIO69_UART1_CTS MFP_CFG(GPIO69, AF2) | ||
347 | #define GPIO70_UART1_RTS MFP_CFG(GPIO70, AF2) | ||
348 | |||
349 | /* UART2 - BTUART */ | ||
350 | #define GPIO91_UART2_RXD MFP_CFG(GPIO91, AF1) | ||
351 | #define GPIO92_UART2_TXD MFP_CFG(GPIO92, AF1) | ||
352 | #define GPIO93_UART2_CTS MFP_CFG(GPIO93, AF1) | ||
353 | #define GPIO94_UART2_RTS MFP_CFG(GPIO94, AF1) | ||
354 | |||
355 | /* UART3 - STUART */ | ||
356 | #define GPIO43_UART3_RTS MFP_CFG(GPIO43, AF3) | ||
357 | #define GPIO44_UART3_CTS MFP_CFG(GPIO44, AF3) | ||
358 | #define GPIO45_UART3_RXD MFP_CFG(GPIO45, AF3) | ||
359 | #define GPIO46_UART3_TXD MFP_CFG(GPIO46, AF3) | ||
360 | |||
361 | #define GPIO75_UART3_RTS MFP_CFG(GPIO75, AF5) | ||
362 | #define GPIO76_UART3_CTS MFP_CFG(GPIO76, AF5) | ||
363 | #define GPIO77_UART3_TXD MFP_CFG(GPIO77, AF5) | ||
364 | #define GPIO78_UART3_RXD MFP_CFG(GPIO78, AF5) | ||
365 | |||
366 | /* DFI */ | ||
367 | #define DF_IO0_DF_IO0 MFP_CFG(DF_IO0, AF2) | ||
368 | #define DF_IO1_DF_IO1 MFP_CFG(DF_IO1, AF2) | ||
369 | #define DF_IO2_DF_IO2 MFP_CFG(DF_IO2, AF2) | ||
370 | #define DF_IO3_DF_IO3 MFP_CFG(DF_IO3, AF2) | ||
371 | #define DF_IO4_DF_IO4 MFP_CFG(DF_IO4, AF2) | ||
372 | #define DF_IO5_DF_IO5 MFP_CFG(DF_IO5, AF2) | ||
373 | #define DF_IO6_DF_IO6 MFP_CFG(DF_IO6, AF2) | ||
374 | #define DF_IO7_DF_IO7 MFP_CFG(DF_IO7, AF2) | ||
375 | #define DF_IO8_DF_IO8 MFP_CFG(DF_IO8, AF2) | ||
376 | #define DF_IO9_DF_IO9 MFP_CFG(DF_IO9, AF2) | ||
377 | #define DF_IO10_DF_IO10 MFP_CFG(DF_IO10, AF2) | ||
378 | #define DF_IO11_DF_IO11 MFP_CFG(DF_IO11, AF2) | ||
379 | #define DF_IO12_DF_IO12 MFP_CFG(DF_IO12, AF2) | ||
380 | #define DF_IO13_DF_IO13 MFP_CFG(DF_IO13, AF2) | ||
381 | #define DF_IO14_DF_IO14 MFP_CFG(DF_IO14, AF2) | ||
382 | #define DF_IO15_DF_IO15 MFP_CFG(DF_IO15, AF2) | ||
383 | #define DF_nADV1_ALE_DF_nADV1 MFP_CFG(DF_nADV1_ALE, AF2) | ||
384 | #define DF_nADV2_ALE_DF_nADV2 MFP_CFG(DF_nADV2_ALE, AF2) | ||
385 | #define DF_nCS0_DF_nCS0 MFP_CFG(DF_nCS0, AF2) | ||
386 | #define DF_nCS1_DF_nCS1 MFP_CFG(DF_nCS1, AF2) | ||
387 | #define DF_nRE_nOE_DF_nOE MFP_CFG(DF_nRE_nOE, AF2) | ||
388 | #define DF_nWE_DF_nWE MFP_CFG(DF_nWE, AF2) | ||
389 | |||
390 | /* DFI - NAND */ | ||
391 | #define DF_CLE_nOE_ND_CLE MFP_CFG_LPM(DF_CLE_nOE, AF1, PULL_HIGH) | ||
392 | #define DF_INT_RnB_ND_INT_RnB MFP_CFG_LPM(DF_INT_RnB, AF1, PULL_LOW) | ||
393 | #define DF_IO0_ND_IO0 MFP_CFG_LPM(DF_IO0, AF1, PULL_LOW) | ||
394 | #define DF_IO1_ND_IO1 MFP_CFG_LPM(DF_IO1, AF1, PULL_LOW) | ||
395 | #define DF_IO2_ND_IO2 MFP_CFG_LPM(DF_IO2, AF1, PULL_LOW) | ||
396 | #define DF_IO3_ND_IO3 MFP_CFG_LPM(DF_IO3, AF1, PULL_LOW) | ||
397 | #define DF_IO4_ND_IO4 MFP_CFG_LPM(DF_IO4, AF1, PULL_LOW) | ||
398 | #define DF_IO5_ND_IO5 MFP_CFG_LPM(DF_IO5, AF1, PULL_LOW) | ||
399 | #define DF_IO6_ND_IO6 MFP_CFG_LPM(DF_IO6, AF1, PULL_LOW) | ||
400 | #define DF_IO7_ND_IO7 MFP_CFG_LPM(DF_IO7, AF1, PULL_LOW) | ||
401 | #define DF_IO8_ND_IO8 MFP_CFG_LPM(DF_IO8, AF1, PULL_LOW) | ||
402 | #define DF_IO9_ND_IO9 MFP_CFG_LPM(DF_IO9, AF1, PULL_LOW) | ||
403 | #define DF_IO10_ND_IO10 MFP_CFG_LPM(DF_IO10, AF1, PULL_LOW) | ||
404 | #define DF_IO11_ND_IO11 MFP_CFG_LPM(DF_IO11, AF1, PULL_LOW) | ||
405 | #define DF_IO12_ND_IO12 MFP_CFG_LPM(DF_IO12, AF1, PULL_LOW) | ||
406 | #define DF_IO13_ND_IO13 MFP_CFG_LPM(DF_IO13, AF1, PULL_LOW) | ||
407 | #define DF_IO14_ND_IO14 MFP_CFG_LPM(DF_IO14, AF1, PULL_LOW) | ||
408 | #define DF_IO15_ND_IO15 MFP_CFG_LPM(DF_IO15, AF1, PULL_LOW) | ||
409 | #define DF_nADV1_ALE_ND_ALE MFP_CFG_LPM(DF_nADV1_ALE, AF1, PULL_HIGH) | ||
410 | #define DF_nADV2_ALE_ND_ALE MFP_CFG_LPM(DF_nADV2_ALE, AF1, PULL_HIGH) | ||
411 | #define DF_nADV2_ALE_nCS3 MFP_CFG_LPM(DF_nADV2_ALE, AF3, PULL_HIGH) | ||
412 | #define DF_nCS0_ND_nCS0 MFP_CFG_LPM(DF_nCS0, AF1, PULL_HIGH) | ||
413 | #define DF_nCS1_ND_nCS1 MFP_CFG_LPM(DF_nCS1, AF1, PULL_HIGH) | ||
414 | #define DF_nRE_nOE_ND_nRE MFP_CFG_LPM(DF_nRE_nOE, AF1, PULL_HIGH) | ||
415 | #define DF_nWE_ND_nWE MFP_CFG_LPM(DF_nWE, AF1, PULL_HIGH) | ||
416 | |||
417 | /* PWM */ | ||
418 | #define GPIO41_PWM0 MFP_CFG_LPM(GPIO41, AF1, PULL_LOW) | ||
419 | #define GPIO42_PWM1 MFP_CFG_LPM(GPIO42, AF1, PULL_LOW) | ||
420 | #define GPIO43_PWM3 MFP_CFG_LPM(GPIO43, AF1, PULL_LOW) | ||
421 | #define GPIO20_PWM0 MFP_CFG_LPM(GPIO20, AF2, PULL_LOW) | ||
422 | #define GPIO21_PWM2 MFP_CFG_LPM(GPIO21, AF3, PULL_LOW) | ||
423 | #define GPIO22_PWM3 MFP_CFG_LPM(GPIO22, AF3, PULL_LOW) | ||
424 | |||
425 | /* CIR */ | ||
426 | #define GPIO46_CIR_OUT MFP_CFG(GPIO46, AF1) | ||
427 | #define GPIO77_CIR_OUT MFP_CFG(GPIO77, AF3) | ||
428 | |||
429 | /* USB P2 */ | ||
430 | #define GPIO0_USB_P2_7 MFP_CFG(GPIO0, AF3) | ||
431 | #define GPIO15_USB_P2_7 MFP_CFG(GPIO15, AF5) | ||
432 | #define GPIO16_USB_P2_7 MFP_CFG(GPIO16, AF2) | ||
433 | #define GPIO48_USB_P2_7 MFP_CFG(GPIO48, AF7) | ||
434 | #define GPIO49_USB_P2_7 MFP_CFG(GPIO49, AF6) | ||
435 | #define DF_IO9_USB_P2_7 MFP_CFG(DF_IO9, AF3) | ||
436 | |||
437 | #define GPIO48_USB_P2_8 MFP_CFG(GPIO48, AF2) | ||
438 | #define GPIO50_USB_P2_7 MFP_CFG_X(GPIO50, AF2, DS02X, FLOAT) | ||
439 | #define GPIO51_USB_P2_5 MFP_CFG(GPIO51, AF2) | ||
440 | #define GPIO47_USB_P2_4 MFP_CFG(GPIO47, AF2) | ||
441 | #define GPIO53_USB_P2_3 MFP_CFG(GPIO53, AF2) | ||
442 | #define GPIO54_USB_P2_6 MFP_CFG(GPIO54, AF2) | ||
443 | #define GPIO49_USB_P2_2 MFP_CFG(GPIO49, AF2) | ||
444 | #define GPIO52_USB_P2_1 MFP_CFG(GPIO52, AF2) | ||
445 | |||
446 | #define GPIO63_USB_P2_8 MFP_CFG(GPIO63, AF3) | ||
447 | #define GPIO64_USB_P2_7 MFP_CFG(GPIO64, AF3) | ||
448 | #define GPIO65_USB_P2_6 MFP_CFG(GPIO65, AF3) | ||
449 | #define GPIO66_USG_P2_5 MFP_CFG(GPIO66, AF3) | ||
450 | #define GPIO67_USB_P2_4 MFP_CFG(GPIO67, AF3) | ||
451 | #define GPIO68_USB_P2_3 MFP_CFG(GPIO68, AF3) | ||
452 | #define GPIO69_USB_P2_2 MFP_CFG(GPIO69, AF3) | ||
453 | #define GPIO70_USB_P2_1 MFP_CFG(GPIO70, AF3) | ||
454 | |||
455 | /* ULPI */ | ||
456 | #define GPIO31_USB_ULPI_D0 MFP_CFG(GPIO31, AF4) | ||
457 | #define GPIO30_USB_ULPI_D1 MFP_CFG(GPIO30, AF7) | ||
458 | #define GPIO33_USB_ULPI_D2 MFP_CFG(GPIO33, AF5) | ||
459 | #define GPIO34_USB_ULPI_D3 MFP_CFG(GPIO34, AF5) | ||
460 | #define GPIO35_USB_ULPI_D4 MFP_CFG(GPIO35, AF5) | ||
461 | #define GPIO36_USB_ULPI_D5 MFP_CFG(GPIO36, AF5) | ||
462 | #define GPIO41_USB_ULPI_D6 MFP_CFG(GPIO41, AF5) | ||
463 | #define GPIO42_USB_ULPI_D7 MFP_CFG(GPIO42, AF5) | ||
464 | #define GPIO37_USB_ULPI_DIR MFP_CFG(GPIO37, AF4) | ||
465 | #define GPIO38_USB_ULPI_CLK MFP_CFG(GPIO38, AF4) | ||
466 | #define GPIO39_USB_ULPI_STP MFP_CFG(GPIO39, AF4) | ||
467 | #define GPIO40_USB_ULPI_NXT MFP_CFG(GPIO40, AF4) | ||
468 | |||
469 | #define GPIO3_CLK26MOUTDMD MFP_CFG(GPIO3, AF3) | ||
470 | #define GPIO40_CLK26MOUTDMD MFP_CFG(GPIO40, AF7) | ||
471 | #define GPIO94_CLK26MOUTDMD MFP_CFG(GPIO94, AF5) | ||
472 | #define GPIO104_CLK26MOUTDMD MFP_CFG(GPIO104, AF4) | ||
473 | #define DF_ADDR1_CLK26MOUTDMD MFP_CFG(DF_ADDR2, AF3) | ||
474 | #define DF_ADDR3_CLK26MOUTDMD MFP_CFG(DF_ADDR3, AF3) | ||
475 | |||
476 | #define GPIO14_CLK26MOUT MFP_CFG(GPIO14, AF5) | ||
477 | #define GPIO38_CLK26MOUT MFP_CFG(GPIO38, AF7) | ||
478 | #define GPIO92_CLK26MOUT MFP_CFG(GPIO92, AF5) | ||
479 | #define GPIO105_CLK26MOUT MFP_CFG(GPIO105, AF4) | ||
480 | |||
481 | #define GPIO2_CLK13MOUTDMD MFP_CFG(GPIO2, AF3) | ||
482 | #define GPIO39_CLK13MOUTDMD MFP_CFG(GPIO39, AF7) | ||
483 | #define GPIO50_CLK13MOUTDMD MFP_CFG(GPIO50, AF3) | ||
484 | #define GPIO93_CLK13MOUTDMD MFP_CFG(GPIO93, AF5) | ||
485 | #define GPIO103_CLK13MOUTDMD MFP_CFG(GPIO103, AF4) | ||
486 | #define DF_ADDR2_CLK13MOUTDMD MFP_CFG(DF_ADDR2, AF3) | ||
487 | |||
488 | /* 1 wire */ | ||
489 | #define GPIO95_OW_DQ_IN MFP_CFG(GPIO95, AF5) | ||
490 | |||
491 | #endif /* __ASM_ARCH_MFP_PXA9xx_H */ | ||
diff --git a/include/asm-arm/arch-pxa/mfp.h b/include/asm-arm/arch-pxa/mfp.h index 02f6157396d3..e7d58798da67 100644 --- a/include/asm-arm/arch-pxa/mfp.h +++ b/include/asm-arm/arch-pxa/mfp.h | |||
@@ -210,6 +210,14 @@ enum { | |||
210 | MFP_PIN_DF_IO14, | 210 | MFP_PIN_DF_IO14, |
211 | MFP_PIN_DF_IO15, | 211 | MFP_PIN_DF_IO15, |
212 | 212 | ||
213 | /* additional pins on PXA930 */ | ||
214 | MFP_PIN_GSIM_UIO, | ||
215 | MFP_PIN_GSIM_UCLK, | ||
216 | MFP_PIN_GSIM_UDET, | ||
217 | MFP_PIN_GSIM_nURST, | ||
218 | MFP_PIN_PMIC_INT, | ||
219 | MFP_PIN_RDY, | ||
220 | |||
213 | MFP_PIN_MAX, | 221 | MFP_PIN_MAX, |
214 | }; | 222 | }; |
215 | 223 | ||
diff --git a/include/asm-arm/arch-pxa/palmtx.h b/include/asm-arm/arch-pxa/palmtx.h new file mode 100644 index 000000000000..1e8bccbda510 --- /dev/null +++ b/include/asm-arm/arch-pxa/palmtx.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /* | ||
2 | * GPIOs and interrupts for Palm T|X Handheld Computer | ||
3 | * | ||
4 | * Based on palmld-gpio.h by Alex Osborne | ||
5 | * | ||
6 | * Authors: Marek Vasut <marek.vasut@gmail.com> | ||
7 | * Cristiano P. <cristianop@users.sourceforge.net> | ||
8 | * Jan Herman <2hp@seznam.cz> | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef _INCLUDE_PALMTX_H_ | ||
17 | #define _INCLUDE_PALMTX_H_ | ||
18 | |||
19 | /** HERE ARE GPIOs **/ | ||
20 | |||
21 | /* GPIOs */ | ||
22 | #define GPIO_NR_PALMTX_GPIO_RESET 1 | ||
23 | |||
24 | #define GPIO_NR_PALMTX_POWER_DETECT 12 /* 90 */ | ||
25 | #define GPIO_NR_PALMTX_HOTSYNC_BUTTON_N 10 | ||
26 | #define GPIO_NR_PALMTX_EARPHONE_DETECT 107 | ||
27 | |||
28 | /* SD/MMC */ | ||
29 | #define GPIO_NR_PALMTX_SD_DETECT_N 14 | ||
30 | #define GPIO_NR_PALMTX_SD_POWER 114 /* probably */ | ||
31 | #define GPIO_NR_PALMTX_SD_READONLY 115 /* probably */ | ||
32 | |||
33 | /* TOUCHSCREEN */ | ||
34 | #define GPIO_NR_PALMTX_WM9712_IRQ 27 | ||
35 | |||
36 | /* IRDA - disable GPIO connected to SD pin of tranceiver (TFBS4710?) ? */ | ||
37 | #define GPIO_NR_PALMTX_IR_DISABLE 40 | ||
38 | |||
39 | /* USB */ | ||
40 | #define GPIO_NR_PALMTX_USB_DETECT_N 13 | ||
41 | #define GPIO_NR_PALMTX_USB_POWER 95 | ||
42 | #define GPIO_NR_PALMTX_USB_PULLUP 93 | ||
43 | |||
44 | /* LCD/BACKLIGHT */ | ||
45 | #define GPIO_NR_PALMTX_BL_POWER 84 | ||
46 | #define GPIO_NR_PALMTX_LCD_POWER 96 | ||
47 | |||
48 | /* LCD BORDER */ | ||
49 | #define GPIO_NR_PALMTX_BORDER_SWITCH 98 | ||
50 | #define GPIO_NR_PALMTX_BORDER_SELECT 22 | ||
51 | |||
52 | /* BLUETOOTH */ | ||
53 | #define GPIO_NR_PALMTX_BT_POWER 17 | ||
54 | #define GPIO_NR_PALMTX_BT_RESET 83 | ||
55 | |||
56 | /* PCMCIA (WiFi) */ | ||
57 | #define GPIO_NR_PALMTX_PCMCIA_POWER1 94 | ||
58 | #define GPIO_NR_PALMTX_PCMCIA_POWER2 108 | ||
59 | #define GPIO_NR_PALMTX_PCMCIA_RESET 79 | ||
60 | #define GPIO_NR_PALMTX_PCMCIA_READY 116 | ||
61 | |||
62 | /* NAND Flash ... this GPIO may be incorrect! */ | ||
63 | #define GPIO_NR_PALMTX_NAND_BUFFER_DIR 79 | ||
64 | |||
65 | /* INTERRUPTS */ | ||
66 | #define IRQ_GPIO_PALMTX_SD_DETECT_N IRQ_GPIO(GPIO_NR_PALMTX_SD_DETECT_N) | ||
67 | #define IRQ_GPIO_PALMTX_WM9712_IRQ IRQ_GPIO(GPIO_NR_PALMTX_WM9712_IRQ) | ||
68 | #define IRQ_GPIO_PALMTX_USB_DETECT IRQ_GPIO(GPIO_NR_PALMTX_USB_DETECT) | ||
69 | #define IRQ_GPIO_PALMTX_GPIO_RESET IRQ_GPIO(GPIO_NR_PALMTX_GPIO_RESET) | ||
70 | |||
71 | /** HERE ARE INIT VALUES **/ | ||
72 | |||
73 | /* Various addresses */ | ||
74 | #define PALMTX_PCMCIA_PHYS 0x28000000 | ||
75 | #define PALMTX_PCMCIA_VIRT 0xf0000000 | ||
76 | #define PALMTX_PCMCIA_SIZE 0x100000 | ||
77 | |||
78 | #define PALMTX_PHYS_RAM_START 0xa0000000 | ||
79 | #define PALMTX_PHYS_IO_START 0x40000000 | ||
80 | |||
81 | #define PALMTX_PHYS_FLASH_START PXA_CS0_PHYS /* ChipSelect 0 */ | ||
82 | #define PALMTX_PHYS_NAND_START PXA_CS1_PHYS /* ChipSelect 1 */ | ||
83 | |||
84 | /* TOUCHSCREEN */ | ||
85 | #define AC97_LINK_FRAME 21 | ||
86 | |||
87 | |||
88 | /* BATTERY */ | ||
89 | #define PALMTX_BAT_MAX_VOLTAGE 4000 /* 4.00v current voltage */ | ||
90 | #define PALMTX_BAT_MIN_VOLTAGE 3550 /* 3.55v critical voltage */ | ||
91 | #define PALMTX_BAT_MAX_CURRENT 0 /* unknokn */ | ||
92 | #define PALMTX_BAT_MIN_CURRENT 0 /* unknown */ | ||
93 | #define PALMTX_BAT_MAX_CHARGE 1 /* unknown */ | ||
94 | #define PALMTX_BAT_MIN_CHARGE 1 /* unknown */ | ||
95 | #define PALMTX_MAX_LIFE_MINS 360 /* on-life in minutes */ | ||
96 | |||
97 | #define PALMTX_BAT_MEASURE_DELAY (HZ * 1) | ||
98 | |||
99 | /* BACKLIGHT */ | ||
100 | #define PALMTX_MAX_INTENSITY 0xFE | ||
101 | #define PALMTX_DEFAULT_INTENSITY 0x7E | ||
102 | #define PALMTX_LIMIT_MASK 0x7F | ||
103 | #define PALMTX_PRESCALER 0x3F | ||
104 | #define PALMTX_PERIOD_NS 3500 | ||
105 | |||
106 | #endif | ||
diff --git a/include/asm-arm/arch-pxa/pxa27x-udc.h b/include/asm-arm/arch-pxa/pxa27x-udc.h index bc1cf7d0773a..ab1443f8bd89 100644 --- a/include/asm-arm/arch-pxa/pxa27x-udc.h +++ b/include/asm-arm/arch-pxa/pxa27x-udc.h | |||
@@ -97,7 +97,7 @@ | |||
97 | #define UP2OCR_IDON (1 << 10) /* OTG ID Read Enable */ | 97 | #define UP2OCR_IDON (1 << 10) /* OTG ID Read Enable */ |
98 | #define UP2OCR_HXS (1 << 16) /* Host Port 2 Transceiver Output Select */ | 98 | #define UP2OCR_HXS (1 << 16) /* Host Port 2 Transceiver Output Select */ |
99 | #define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */ | 99 | #define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */ |
100 | #define UP2OCR_SEOS (1 << 24) /* Single-Ended Output Select */ | 100 | #define UP2OCR_SEOS(x) ((x & 7) << 24) /* Single-Ended Output Select */ |
101 | 101 | ||
102 | #define UDCCSN(x) __REG2(0x40600100, (x) << 2) | 102 | #define UDCCSN(x) __REG2(0x40600100, (x) << 2) |
103 | #define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */ | 103 | #define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */ |
diff --git a/include/asm-arm/arch-pxa/pxa2xx_spi.h b/include/asm-arm/arch-pxa/pxa2xx_spi.h index 3459fb26ce97..2206cb61a9f9 100644 --- a/include/asm-arm/arch-pxa/pxa2xx_spi.h +++ b/include/asm-arm/arch-pxa/pxa2xx_spi.h | |||
@@ -41,4 +41,6 @@ struct pxa2xx_spi_chip { | |||
41 | void (*cs_control)(u32 command); | 41 | void (*cs_control)(u32 command); |
42 | }; | 42 | }; |
43 | 43 | ||
44 | extern void pxa2xx_set_spi_info(unsigned id, struct pxa2xx_spi_master *info); | ||
45 | |||
44 | #endif /*PXA2XX_SPI_H_*/ | 46 | #endif /*PXA2XX_SPI_H_*/ |
diff --git a/include/asm-arm/arch-pxa/pxa3xx_nand.h b/include/asm-arm/arch-pxa/pxa3xx_nand.h index 81a8937486cb..eb4b190b6657 100644 --- a/include/asm-arm/arch-pxa/pxa3xx_nand.h +++ b/include/asm-arm/arch-pxa/pxa3xx_nand.h | |||
@@ -15,4 +15,6 @@ struct pxa3xx_nand_platform_data { | |||
15 | struct mtd_partition *parts; | 15 | struct mtd_partition *parts; |
16 | unsigned int nr_parts; | 16 | unsigned int nr_parts; |
17 | }; | 17 | }; |
18 | |||
19 | extern void pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info); | ||
18 | #endif /* __ASM_ARCH_PXA3XX_NAND_H */ | 20 | #endif /* __ASM_ARCH_PXA3XX_NAND_H */ |
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h index bbd22396841a..daf018d0c604 100644 --- a/include/asm-arm/arch-pxa/pxafb.h +++ b/include/asm-arm/arch-pxa/pxafb.h | |||
@@ -71,7 +71,8 @@ struct pxafb_mode_info { | |||
71 | 71 | ||
72 | u_char bpp; | 72 | u_char bpp; |
73 | u_int cmap_greyscale:1, | 73 | u_int cmap_greyscale:1, |
74 | unused:31; | 74 | depth:8, |
75 | unused:23; | ||
75 | 76 | ||
76 | /* Parallel Mode Timing */ | 77 | /* Parallel Mode Timing */ |
77 | u_char hsync_len; | 78 | u_char hsync_len; |
diff --git a/include/asm-arm/arch-pxa/regs-lcd.h b/include/asm-arm/arch-pxa/regs-lcd.h index 3ba464c913a5..820a189684a9 100644 --- a/include/asm-arm/arch-pxa/regs-lcd.h +++ b/include/asm-arm/arch-pxa/regs-lcd.h | |||
@@ -27,6 +27,12 @@ | |||
27 | #define LCCR3_4BPP (2 << 24) | 27 | #define LCCR3_4BPP (2 << 24) |
28 | #define LCCR3_8BPP (3 << 24) | 28 | #define LCCR3_8BPP (3 << 24) |
29 | #define LCCR3_16BPP (4 << 24) | 29 | #define LCCR3_16BPP (4 << 24) |
30 | #define LCCR3_18BPP (5 << 24) | ||
31 | #define LCCR3_18BPP_P (6 << 24) | ||
32 | #define LCCR3_19BPP (7 << 24) | ||
33 | #define LCCR3_19BPP_P (1 << 29) | ||
34 | #define LCCR3_24BPP ((1 << 29) | (1 << 24)) | ||
35 | #define LCCR3_25BPP ((1 << 29) | (2 << 24)) | ||
30 | 36 | ||
31 | #define LCCR3_PDFOR_0 (0 << 30) | 37 | #define LCCR3_PDFOR_0 (0 << 30) |
32 | #define LCCR3_PDFOR_1 (1 << 30) | 38 | #define LCCR3_PDFOR_1 (1 << 30) |
diff --git a/include/asm-arm/arch-pxa/regs-ssp.h b/include/asm-arm/arch-pxa/regs-ssp.h index 0255328c3c18..3c04cde2cf1f 100644 --- a/include/asm-arm/arch-pxa/regs-ssp.h +++ b/include/asm-arm/arch-pxa/regs-ssp.h | |||
@@ -20,6 +20,10 @@ | |||
20 | #define SSTSS (0x38) /* SSP Timeslot Status */ | 20 | #define SSTSS (0x38) /* SSP Timeslot Status */ |
21 | #define SSACD (0x3C) /* SSP Audio Clock Divider */ | 21 | #define SSACD (0x3C) /* SSP Audio Clock Divider */ |
22 | 22 | ||
23 | #if defined(CONFIG_PXA3xx) | ||
24 | #define SSACDD (0x40) /* SSP Audio Clock Dither Divider */ | ||
25 | #endif | ||
26 | |||
23 | /* Common PXA2xx bits first */ | 27 | /* Common PXA2xx bits first */ |
24 | #define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */ | 28 | #define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */ |
25 | #define SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..16] */ | 29 | #define SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..16] */ |
@@ -29,10 +33,12 @@ | |||
29 | #define SSCR0_National (0x2 << 4) /* National Microwire */ | 33 | #define SSCR0_National (0x2 << 4) /* National Microwire */ |
30 | #define SSCR0_ECS (1 << 6) /* External clock select */ | 34 | #define SSCR0_ECS (1 << 6) /* External clock select */ |
31 | #define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ | 35 | #define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ |
36 | |||
32 | #if defined(CONFIG_PXA25x) | 37 | #if defined(CONFIG_PXA25x) |
33 | #define SSCR0_SCR (0x0000ff00) /* Serial Clock Rate (mask) */ | 38 | #define SSCR0_SCR (0x0000ff00) /* Serial Clock Rate (mask) */ |
34 | #define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8) /* Divisor [2..512] */ | 39 | #define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8) /* Divisor [2..512] */ |
35 | #elif defined(CONFIG_PXA27x) | 40 | |
41 | #elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | ||
36 | #define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */ | 42 | #define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */ |
37 | #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */ | 43 | #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */ |
38 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ | 44 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ |
@@ -45,6 +51,10 @@ | |||
45 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ | 51 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ |
46 | #endif | 52 | #endif |
47 | 53 | ||
54 | #if defined(CONFIG_PXA3xx) | ||
55 | #define SSCR0_FPCKE (1 << 29) /* FIFO packing enable */ | ||
56 | #endif | ||
57 | |||
48 | #define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */ | 58 | #define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */ |
49 | #define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */ | 59 | #define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */ |
50 | #define SSCR1_LBM (1 << 2) /* Loop-Back Mode */ | 60 | #define SSCR1_LBM (1 << 2) /* Loop-Back Mode */ |
@@ -109,5 +119,9 @@ | |||
109 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ | 119 | #define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */ |
110 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ | 120 | #define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */ |
111 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ | 121 | #define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */ |
122 | #if defined(CONFIG_PXA3xx) | ||
123 | #define SSACD_SCDX8 (1 << 7) /* SYSCLK division ratio select */ | ||
124 | #endif | ||
125 | |||
112 | 126 | ||
113 | #endif /* __ASM_ARCH_REGS_SSP_H */ | 127 | #endif /* __ASM_ARCH_REGS_SSP_H */ |
diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h index ba7e132de1b3..6956fc5235f8 100644 --- a/include/asm-arm/arch-pxa/system.h +++ b/include/asm-arm/arch-pxa/system.h | |||
@@ -21,19 +21,4 @@ static inline void arch_idle(void) | |||
21 | } | 21 | } |
22 | 22 | ||
23 | 23 | ||
24 | static inline void arch_reset(char mode) | 24 | void arch_reset(char mode); |
25 | { | ||
26 | if (cpu_is_pxa2xx()) | ||
27 | RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR; | ||
28 | |||
29 | if (mode == 's') { | ||
30 | /* Jump into ROM at address 0 */ | ||
31 | cpu_reset(0); | ||
32 | } else { | ||
33 | /* Initialize the watchdog and let it fire */ | ||
34 | OWER = OWER_WME; | ||
35 | OSSR = OSSR_M3; | ||
36 | OSMR3 = OSCR + 368640; /* ... in 100 ms */ | ||
37 | } | ||
38 | } | ||
39 | |||
diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h index c5b6fde6907c..a72803f0461b 100644 --- a/include/asm-arm/arch-pxa/tosa.h +++ b/include/asm-arm/arch-pxa/tosa.h | |||
@@ -25,21 +25,18 @@ | |||
25 | */ | 25 | */ |
26 | #define TOSA_SCOOP_GPIO_BASE NR_BUILTIN_GPIO | 26 | #define TOSA_SCOOP_GPIO_BASE NR_BUILTIN_GPIO |
27 | #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11 | 27 | #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11 |
28 | #define TOSA_SCOOP_TC6393_REST_IN SCOOP_GPCR_PA12 | 28 | #define TOSA_GPIO_TC6393XB_REST_IN (TOSA_SCOOP_GPIO_BASE + 1) |
29 | #define TOSA_GPIO_IR_POWERDWN (TOSA_SCOOP_GPIO_BASE + 2) | 29 | #define TOSA_GPIO_IR_POWERDWN (TOSA_SCOOP_GPIO_BASE + 2) |
30 | #define TOSA_GPIO_SD_WP (TOSA_SCOOP_GPIO_BASE + 3) | 30 | #define TOSA_GPIO_SD_WP (TOSA_SCOOP_GPIO_BASE + 3) |
31 | #define TOSA_GPIO_PWR_ON (TOSA_SCOOP_GPIO_BASE + 4) | 31 | #define TOSA_GPIO_PWR_ON (TOSA_SCOOP_GPIO_BASE + 4) |
32 | #define TOSA_SCOOP_AUD_PWR_ON SCOOP_GPCR_PA16 | 32 | #define TOSA_SCOOP_AUD_PWR_ON SCOOP_GPCR_PA16 |
33 | #define TOSA_SCOOP_BT_RESET SCOOP_GPCR_PA17 | 33 | #define TOSA_GPIO_BT_RESET (TOSA_SCOOP_GPIO_BASE + 6) |
34 | #define TOSA_SCOOP_BT_PWR_EN SCOOP_GPCR_PA18 | 34 | #define TOSA_GPIO_BT_PWR_EN (TOSA_SCOOP_GPIO_BASE + 7) |
35 | #define TOSA_SCOOP_AC_IN_OL SCOOP_GPCR_PA19 | 35 | #define TOSA_SCOOP_AC_IN_OL SCOOP_GPCR_PA19 |
36 | 36 | ||
37 | /* GPIO Direction 1 : output mode / 0:input mode */ | 37 | /* GPIO Direction 1 : output mode / 0:input mode */ |
38 | #define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393_REST_IN | \ | 38 | #define TOSA_SCOOP_IO_DIR (TOSA_SCOOP_PXA_VCORE1 | \ |
39 | TOSA_SCOOP_AUD_PWR_ON |\ | 39 | TOSA_SCOOP_AUD_PWR_ON) |
40 | TOSA_SCOOP_BT_RESET | TOSA_SCOOP_BT_PWR_EN ) | ||
41 | /* GPIO out put level when init 1: Hi */ | ||
42 | #define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393_REST_IN ) | ||
43 | 40 | ||
44 | /* | 41 | /* |
45 | * SCOOP2 jacket GPIOs | 42 | * SCOOP2 jacket GPIOs |
@@ -49,16 +46,34 @@ | |||
49 | #define TOSA_GPIO_NOTE_LED (TOSA_SCOOP_JC_GPIO_BASE + 1) | 46 | #define TOSA_GPIO_NOTE_LED (TOSA_SCOOP_JC_GPIO_BASE + 1) |
50 | #define TOSA_GPIO_CHRG_ERR_LED (TOSA_SCOOP_JC_GPIO_BASE + 2) | 47 | #define TOSA_GPIO_CHRG_ERR_LED (TOSA_SCOOP_JC_GPIO_BASE + 2) |
51 | #define TOSA_GPIO_USB_PULLUP (TOSA_SCOOP_JC_GPIO_BASE + 3) | 48 | #define TOSA_GPIO_USB_PULLUP (TOSA_SCOOP_JC_GPIO_BASE + 3) |
52 | #define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15 | 49 | #define TOSA_GPIO_TC6393XB_SUSPEND (TOSA_SCOOP_JC_GPIO_BASE + 4) |
53 | #define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16 | 50 | #define TOSA_GPIO_TC6393XB_L3V_ON (TOSA_SCOOP_JC_GPIO_BASE + 5) |
54 | #define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17 | 51 | #define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17 |
55 | #define TOSA_GPIO_WLAN_LED (TOSA_SCOOP_JC_GPIO_BASE + 7) | 52 | #define TOSA_GPIO_WLAN_LED (TOSA_SCOOP_JC_GPIO_BASE + 7) |
56 | #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19 | 53 | #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19 |
57 | 54 | ||
58 | /* GPIO Direction 1 : output mode / 0:input mode */ | 55 | /* GPIO Direction 1 : output mode / 0:input mode */ |
59 | #define TOSA_SCOOP_JC_IO_DIR ( \ | 56 | #define TOSA_SCOOP_JC_IO_DIR (TOSA_SCOOP_JC_CARD_LIMIT_SEL) |
60 | TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \ | 57 | |
61 | TOSA_SCOOP_JC_CARD_LIMIT_SEL ) | 58 | /* |
59 | * TC6393XB GPIOs | ||
60 | */ | ||
61 | #define TOSA_TC6393XB_GPIO_BASE (NR_BUILTIN_GPIO + 2 * 12) | ||
62 | #define TOSA_TC6393XB_GPIO(i) (TOSA_TC6393XB_GPIO_BASE + (i)) | ||
63 | #define TOSA_TC6393XB_GPIO_BIT(gpio) (1 << (gpio - TOSA_TC6393XB_GPIO_BASE)) | ||
64 | |||
65 | #define TOSA_GPIO_TG_ON (TOSA_TC6393XB_GPIO_BASE + 0) | ||
66 | #define TOSA_GPIO_L_MUTE (TOSA_TC6393XB_GPIO_BASE + 1) | ||
67 | #define TOSA_GPIO_BL_C20MA (TOSA_TC6393XB_GPIO_BASE + 3) | ||
68 | #define TOSA_GPIO_CARD_VCC_ON (TOSA_TC6393XB_GPIO_BASE + 4) | ||
69 | #define TOSA_GPIO_CHARGE_OFF (TOSA_TC6393XB_GPIO_BASE + 6) | ||
70 | #define TOSA_GPIO_CHARGE_OFF_JC (TOSA_TC6393XB_GPIO_BASE + 7) | ||
71 | #define TOSA_GPIO_BAT0_V_ON (TOSA_TC6393XB_GPIO_BASE + 9) | ||
72 | #define TOSA_GPIO_BAT1_V_ON (TOSA_TC6393XB_GPIO_BASE + 10) | ||
73 | #define TOSA_GPIO_BU_CHRG_ON (TOSA_TC6393XB_GPIO_BASE + 11) | ||
74 | #define TOSA_GPIO_BAT_SW_ON (TOSA_TC6393XB_GPIO_BASE + 12) | ||
75 | #define TOSA_GPIO_BAT0_TH_ON (TOSA_TC6393XB_GPIO_BASE + 14) | ||
76 | #define TOSA_GPIO_BAT1_TH_ON (TOSA_TC6393XB_GPIO_BASE + 15) | ||
62 | 77 | ||
63 | /* | 78 | /* |
64 | * Timing Generator | 79 | * Timing Generator |
@@ -84,13 +99,13 @@ | |||
84 | #define TOSA_GPIO_JACKET_DETECT (7) | 99 | #define TOSA_GPIO_JACKET_DETECT (7) |
85 | #define TOSA_GPIO_nSD_DETECT (9) | 100 | #define TOSA_GPIO_nSD_DETECT (9) |
86 | #define TOSA_GPIO_nSD_INT (10) | 101 | #define TOSA_GPIO_nSD_INT (10) |
87 | #define TOSA_GPIO_TC6393_CLK (11) | 102 | #define TOSA_GPIO_TC6393XB_CLK (11) |
88 | #define TOSA_GPIO_BAT1_CRG (12) | 103 | #define TOSA_GPIO_BAT1_CRG (12) |
89 | #define TOSA_GPIO_CF_CD (13) | 104 | #define TOSA_GPIO_CF_CD (13) |
90 | #define TOSA_GPIO_BAT0_CRG (14) | 105 | #define TOSA_GPIO_BAT0_CRG (14) |
91 | #define TOSA_GPIO_TC6393_INT (15) | 106 | #define TOSA_GPIO_TC6393XB_INT (15) |
92 | #define TOSA_GPIO_BAT0_LOW (17) | 107 | #define TOSA_GPIO_BAT0_LOW (17) |
93 | #define TOSA_GPIO_TC6393_RDY (18) | 108 | #define TOSA_GPIO_TC6393XB_RDY (18) |
94 | #define TOSA_GPIO_ON_RESET (19) | 109 | #define TOSA_GPIO_ON_RESET (19) |
95 | #define TOSA_GPIO_EAR_IN (20) | 110 | #define TOSA_GPIO_EAR_IN (20) |
96 | #define TOSA_GPIO_CF_IRQ (21) /* CF slot0 Ready */ | 111 | #define TOSA_GPIO_CF_IRQ (21) /* CF slot0 Ready */ |
@@ -99,6 +114,7 @@ | |||
99 | #define TOSA_GPIO_TP_INT (32) /* Touch Panel pen down interrupt */ | 114 | #define TOSA_GPIO_TP_INT (32) /* Touch Panel pen down interrupt */ |
100 | #define TOSA_GPIO_JC_CF_IRQ (36) /* CF slot1 Ready */ | 115 | #define TOSA_GPIO_JC_CF_IRQ (36) /* CF slot1 Ready */ |
101 | #define TOSA_GPIO_BAT_LOCKED (38) /* Battery locked */ | 116 | #define TOSA_GPIO_BAT_LOCKED (38) /* Battery locked */ |
117 | #define TOSA_GPIO_IRDA_TX (47) | ||
102 | #define TOSA_GPIO_TG_SPI_SCLK (81) | 118 | #define TOSA_GPIO_TG_SPI_SCLK (81) |
103 | #define TOSA_GPIO_TG_SPI_CS (82) | 119 | #define TOSA_GPIO_TG_SPI_CS (82) |
104 | #define TOSA_GPIO_TG_SPI_MOSI (83) | 120 | #define TOSA_GPIO_TG_SPI_MOSI (83) |
@@ -137,7 +153,7 @@ | |||
137 | #define TOSA_IRQ_GPIO_BAT1_CRG IRQ_GPIO(TOSA_GPIO_BAT1_CRG) | 153 | #define TOSA_IRQ_GPIO_BAT1_CRG IRQ_GPIO(TOSA_GPIO_BAT1_CRG) |
138 | #define TOSA_IRQ_GPIO_CF_CD IRQ_GPIO(TOSA_GPIO_CF_CD) | 154 | #define TOSA_IRQ_GPIO_CF_CD IRQ_GPIO(TOSA_GPIO_CF_CD) |
139 | #define TOSA_IRQ_GPIO_BAT0_CRG IRQ_GPIO(TOSA_GPIO_BAT0_CRG) | 155 | #define TOSA_IRQ_GPIO_BAT0_CRG IRQ_GPIO(TOSA_GPIO_BAT0_CRG) |
140 | #define TOSA_IRQ_GPIO_TC6393_INT IRQ_GPIO(TOSA_GPIO_TC6393_INT) | 156 | #define TOSA_IRQ_GPIO_TC6393XB_INT IRQ_GPIO(TOSA_GPIO_TC6393XB_INT) |
141 | #define TOSA_IRQ_GPIO_BAT0_LOW IRQ_GPIO(TOSA_GPIO_BAT0_LOW) | 157 | #define TOSA_IRQ_GPIO_BAT0_LOW IRQ_GPIO(TOSA_GPIO_BAT0_LOW) |
142 | #define TOSA_IRQ_GPIO_EAR_IN IRQ_GPIO(TOSA_GPIO_EAR_IN) | 158 | #define TOSA_IRQ_GPIO_EAR_IN IRQ_GPIO(TOSA_GPIO_EAR_IN) |
143 | #define TOSA_IRQ_GPIO_CF_IRQ IRQ_GPIO(TOSA_GPIO_CF_IRQ) | 159 | #define TOSA_IRQ_GPIO_CF_IRQ IRQ_GPIO(TOSA_GPIO_CF_IRQ) |
diff --git a/include/asm-arm/arch-pxa/tosa_bt.h b/include/asm-arm/arch-pxa/tosa_bt.h new file mode 100644 index 000000000000..efc3c3d3b75d --- /dev/null +++ b/include/asm-arm/arch-pxa/tosa_bt.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Tosa bluetooth built-in chip control. | ||
3 | * | ||
4 | * Later it may be shared with some other platforms. | ||
5 | * | ||
6 | * Copyright (c) 2008 Dmitry Baryshkov | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | #ifndef TOSA_BT_H | ||
14 | #define TOSA_BT_H | ||
15 | |||
16 | struct tosa_bt_data { | ||
17 | int gpio_pwr; | ||
18 | int gpio_reset; | ||
19 | }; | ||
20 | |||
21 | #endif | ||
22 | |||
diff --git a/include/asm-arm/arch-pxa/uncompress.h b/include/asm-arm/arch-pxa/uncompress.h index dadf4c20b622..f4551269aaf2 100644 --- a/include/asm-arm/arch-pxa/uncompress.h +++ b/include/asm-arm/arch-pxa/uncompress.h | |||
@@ -11,11 +11,11 @@ | |||
11 | 11 | ||
12 | #include <linux/serial_reg.h> | 12 | #include <linux/serial_reg.h> |
13 | #include <asm/arch/pxa-regs.h> | 13 | #include <asm/arch/pxa-regs.h> |
14 | #include <asm/mach-types.h> | ||
14 | 15 | ||
15 | #define __REG(x) ((volatile unsigned long *)x) | 16 | #define __REG(x) ((volatile unsigned long *)x) |
16 | |||
17 | #define UART FFUART | ||
18 | 17 | ||
18 | static volatile unsigned long *UART = FFUART; | ||
19 | 19 | ||
20 | static inline void putc(char c) | 20 | static inline void putc(char c) |
21 | { | 21 | { |
@@ -33,8 +33,13 @@ static inline void flush(void) | |||
33 | { | 33 | { |
34 | } | 34 | } |
35 | 35 | ||
36 | static inline void arch_decomp_setup(void) | ||
37 | { | ||
38 | if (machine_is_littleton()) | ||
39 | UART = STUART; | ||
40 | } | ||
41 | |||
36 | /* | 42 | /* |
37 | * nothing to do | 43 | * nothing to do |
38 | */ | 44 | */ |
39 | #define arch_decomp_setup() | ||
40 | #define arch_decomp_wdog() | 45 | #define arch_decomp_wdog() |
diff --git a/include/asm-arm/arch-pxa/zylonite.h b/include/asm-arm/arch-pxa/zylonite.h index de577de8d18c..0d35ca04731e 100644 --- a/include/asm-arm/arch-pxa/zylonite.h +++ b/include/asm-arm/arch-pxa/zylonite.h | |||
@@ -16,6 +16,8 @@ struct platform_mmc_slot { | |||
16 | extern struct platform_mmc_slot zylonite_mmc_slot[]; | 16 | extern struct platform_mmc_slot zylonite_mmc_slot[]; |
17 | 17 | ||
18 | extern int gpio_eth_irq; | 18 | extern int gpio_eth_irq; |
19 | extern int gpio_debug_led1; | ||
20 | extern int gpio_debug_led2; | ||
19 | 21 | ||
20 | extern int wm9713_irq; | 22 | extern int wm9713_irq; |
21 | 23 | ||
diff --git a/include/asm-arm/hardware/iop3xx-adma.h b/include/asm-arm/hardware/iop3xx-adma.h index a32b86ac62aa..af64676650a2 100644 --- a/include/asm-arm/hardware/iop3xx-adma.h +++ b/include/asm-arm/hardware/iop3xx-adma.h | |||
@@ -260,7 +260,7 @@ static inline int iop_chan_memset_slot_count(size_t len, int *slots_per_op) | |||
260 | static inline int iop3xx_aau_xor_slot_count(size_t len, int src_cnt, | 260 | static inline int iop3xx_aau_xor_slot_count(size_t len, int src_cnt, |
261 | int *slots_per_op) | 261 | int *slots_per_op) |
262 | { | 262 | { |
263 | static const int slot_count_table[] = { 0, | 263 | static const char slot_count_table[] = { |
264 | 1, 1, 1, 1, /* 01 - 04 */ | 264 | 1, 1, 1, 1, /* 01 - 04 */ |
265 | 2, 2, 2, 2, /* 05 - 08 */ | 265 | 2, 2, 2, 2, /* 05 - 08 */ |
266 | 4, 4, 4, 4, /* 09 - 12 */ | 266 | 4, 4, 4, 4, /* 09 - 12 */ |
@@ -270,7 +270,7 @@ static inline int iop3xx_aau_xor_slot_count(size_t len, int src_cnt, | |||
270 | 8, 8, 8, 8, /* 25 - 28 */ | 270 | 8, 8, 8, 8, /* 25 - 28 */ |
271 | 8, 8, 8, 8, /* 29 - 32 */ | 271 | 8, 8, 8, 8, /* 29 - 32 */ |
272 | }; | 272 | }; |
273 | *slots_per_op = slot_count_table[src_cnt]; | 273 | *slots_per_op = slot_count_table[src_cnt - 1]; |
274 | return *slots_per_op; | 274 | return *slots_per_op; |
275 | } | 275 | } |
276 | 276 | ||
diff --git a/include/asm-arm/kgdb.h b/include/asm-arm/kgdb.h new file mode 100644 index 000000000000..67af4b841984 --- /dev/null +++ b/include/asm-arm/kgdb.h | |||
@@ -0,0 +1,104 @@ | |||
1 | /* | ||
2 | * ARM KGDB support | ||
3 | * | ||
4 | * Author: Deepak Saxena <dsaxena@mvista.com> | ||
5 | * | ||
6 | * Copyright (C) 2002 MontaVista Software Inc. | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #ifndef __ARM_KGDB_H__ | ||
11 | #define __ARM_KGDB_H__ | ||
12 | |||
13 | #include <linux/ptrace.h> | ||
14 | |||
15 | /* | ||
16 | * GDB assumes that we're a user process being debugged, so | ||
17 | * it will send us an SWI command to write into memory as the | ||
18 | * debug trap. When an SWI occurs, the next instruction addr is | ||
19 | * placed into R14_svc before jumping to the vector trap. | ||
20 | * This doesn't work for kernel debugging as we are already in SVC | ||
21 | * we would loose the kernel's LR, which is a bad thing. This | ||
22 | * is bad thing. | ||
23 | * | ||
24 | * By doing this as an undefined instruction trap, we force a mode | ||
25 | * switch from SVC to UND mode, allowing us to save full kernel state. | ||
26 | * | ||
27 | * We also define a KGDB_COMPILED_BREAK which can be used to compile | ||
28 | * in breakpoints. This is important for things like sysrq-G and for | ||
29 | * the initial breakpoint from trap_init(). | ||
30 | * | ||
31 | * Note to ARM HW designers: Add real trap support like SH && PPC to | ||
32 | * make our lives much much simpler. :) | ||
33 | */ | ||
34 | #define BREAK_INSTR_SIZE 4 | ||
35 | #define GDB_BREAKINST 0xef9f0001 | ||
36 | #define KGDB_BREAKINST 0xe7ffdefe | ||
37 | #define KGDB_COMPILED_BREAK 0xe7ffdeff | ||
38 | #define CACHE_FLUSH_IS_SAFE 1 | ||
39 | |||
40 | #ifndef __ASSEMBLY__ | ||
41 | |||
42 | static inline void arch_kgdb_breakpoint(void) | ||
43 | { | ||
44 | asm(".word 0xe7ffdeff"); | ||
45 | } | ||
46 | |||
47 | extern void kgdb_handle_bus_error(void); | ||
48 | extern int kgdb_fault_expected; | ||
49 | |||
50 | #endif /* !__ASSEMBLY__ */ | ||
51 | |||
52 | /* | ||
53 | * From Kevin Hilman: | ||
54 | * | ||
55 | * gdb is expecting the following registers layout. | ||
56 | * | ||
57 | * r0-r15: 1 long word each | ||
58 | * f0-f7: unused, 3 long words each !! | ||
59 | * fps: unused, 1 long word | ||
60 | * cpsr: 1 long word | ||
61 | * | ||
62 | * Even though f0-f7 and fps are not used, they need to be | ||
63 | * present in the registers sent for correct processing in | ||
64 | * the host-side gdb. | ||
65 | * | ||
66 | * In particular, it is crucial that CPSR is in the right place, | ||
67 | * otherwise gdb will not be able to correctly interpret stepping over | ||
68 | * conditional branches. | ||
69 | */ | ||
70 | #define _GP_REGS 16 | ||
71 | #define _FP_REGS 8 | ||
72 | #define _EXTRA_REGS 2 | ||
73 | #define GDB_MAX_REGS (_GP_REGS + (_FP_REGS * 3) + _EXTRA_REGS) | ||
74 | |||
75 | #define KGDB_MAX_NO_CPUS 1 | ||
76 | #define BUFMAX 400 | ||
77 | #define NUMREGBYTES (GDB_MAX_REGS << 2) | ||
78 | #define NUMCRITREGBYTES (32 << 2) | ||
79 | |||
80 | #define _R0 0 | ||
81 | #define _R1 1 | ||
82 | #define _R2 2 | ||
83 | #define _R3 3 | ||
84 | #define _R4 4 | ||
85 | #define _R5 5 | ||
86 | #define _R6 6 | ||
87 | #define _R7 7 | ||
88 | #define _R8 8 | ||
89 | #define _R9 9 | ||
90 | #define _R10 10 | ||
91 | #define _FP 11 | ||
92 | #define _IP 12 | ||
93 | #define _SPT 13 | ||
94 | #define _LR 14 | ||
95 | #define _PC 15 | ||
96 | #define _CPSR (GDB_MAX_REGS - 1) | ||
97 | |||
98 | /* | ||
99 | * So that we can denote the end of a frame for tracing, | ||
100 | * in the simple case: | ||
101 | */ | ||
102 | #define CFI_END_FRAME(func) __CFI_END_FRAME(_PC, _SPT, func) | ||
103 | |||
104 | #endif /* __ASM_KGDB_H__ */ | ||
diff --git a/include/asm-arm/mach/udc_pxa2xx.h b/include/asm-arm/mach/udc_pxa2xx.h index f9f3606986c2..9e5ed7c0f27f 100644 --- a/include/asm-arm/mach/udc_pxa2xx.h +++ b/include/asm-arm/mach/udc_pxa2xx.h | |||
@@ -23,6 +23,7 @@ struct pxa2xx_udc_mach_info { | |||
23 | */ | 23 | */ |
24 | bool gpio_vbus_inverted; | 24 | bool gpio_vbus_inverted; |
25 | u16 gpio_vbus; /* high == vbus present */ | 25 | u16 gpio_vbus; /* high == vbus present */ |
26 | bool gpio_pullup_inverted; | ||
26 | u16 gpio_pullup; /* high == pullup activated */ | 27 | u16 gpio_pullup; /* high == pullup activated */ |
27 | }; | 28 | }; |
28 | 29 | ||
diff --git a/include/asm-arm/plat-orion/mv_xor.h b/include/asm-arm/plat-orion/mv_xor.h new file mode 100644 index 000000000000..c349e8ff5cc0 --- /dev/null +++ b/include/asm-arm/plat-orion/mv_xor.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * Marvell XOR platform device data definition file. | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_PLAT_ORION_MV_XOR_H | ||
6 | #define __ASM_PLAT_ORION_MV_XOR_H | ||
7 | |||
8 | #include <linux/dmaengine.h> | ||
9 | #include <linux/mbus.h> | ||
10 | |||
11 | #define MV_XOR_SHARED_NAME "mv_xor_shared" | ||
12 | #define MV_XOR_NAME "mv_xor" | ||
13 | |||
14 | struct mbus_dram_target_info; | ||
15 | |||
16 | struct mv_xor_platform_shared_data { | ||
17 | struct mbus_dram_target_info *dram; | ||
18 | }; | ||
19 | |||
20 | struct mv_xor_platform_data { | ||
21 | struct platform_device *shared; | ||
22 | int hw_id; | ||
23 | dma_cap_mask_t cap_mask; | ||
24 | size_t pool_size; | ||
25 | }; | ||
26 | |||
27 | |||
28 | #endif | ||
diff --git a/include/asm-arm/traps.h b/include/asm-arm/traps.h index f1541afcf85c..aa399aec568e 100644 --- a/include/asm-arm/traps.h +++ b/include/asm-arm/traps.h | |||
@@ -24,4 +24,6 @@ static inline int in_exception_text(unsigned long ptr) | |||
24 | ptr < (unsigned long)&__exception_text_end; | 24 | ptr < (unsigned long)&__exception_text_end; |
25 | } | 25 | } |
26 | 26 | ||
27 | extern void __init early_trap_init(void); | ||
28 | |||
27 | #endif | 29 | #endif |
diff --git a/include/asm-avr32/arch-at32ap/at32ap700x.h b/include/asm-avr32/arch-at32ap/at32ap700x.h index 31e48b0e7324..d18a3053be0d 100644 --- a/include/asm-avr32/arch-at32ap/at32ap700x.h +++ b/include/asm-avr32/arch-at32ap/at32ap700x.h | |||
@@ -30,4 +30,20 @@ | |||
30 | #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) | 30 | #define GPIO_PIN_PD(N) (GPIO_PIOD_BASE + (N)) |
31 | #define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N)) | 31 | #define GPIO_PIN_PE(N) (GPIO_PIOE_BASE + (N)) |
32 | 32 | ||
33 | |||
34 | /* | ||
35 | * DMAC peripheral hardware handshaking interfaces, used with dw_dmac | ||
36 | */ | ||
37 | #define DMAC_MCI_RX 0 | ||
38 | #define DMAC_MCI_TX 1 | ||
39 | #define DMAC_DAC_TX 2 | ||
40 | #define DMAC_AC97_A_RX 3 | ||
41 | #define DMAC_AC97_A_TX 4 | ||
42 | #define DMAC_AC97_B_RX 5 | ||
43 | #define DMAC_AC97_B_TX 6 | ||
44 | #define DMAC_DMAREQ_0 7 | ||
45 | #define DMAC_DMAREQ_1 8 | ||
46 | #define DMAC_DMAREQ_2 9 | ||
47 | #define DMAC_DMAREQ_3 10 | ||
48 | |||
33 | #endif /* __ASM_ARCH_AT32AP700X_H__ */ | 49 | #endif /* __ASM_ARCH_AT32AP700X_H__ */ |
diff --git a/include/asm-powerpc/kgdb.h b/include/asm-powerpc/kgdb.h index b617dac82969..1399caf719ae 100644 --- a/include/asm-powerpc/kgdb.h +++ b/include/asm-powerpc/kgdb.h | |||
@@ -1,57 +1,65 @@ | |||
1 | /* | 1 | /* |
2 | * kgdb.h: Defines and declarations for serial line source level | 2 | * include/asm-powerpc/kgdb.h |
3 | * remote debugging of the Linux kernel using gdb. | ||
4 | * | 3 | * |
4 | * The PowerPC (32/64) specific defines / externs for KGDB. Based on | ||
5 | * the previous 32bit and 64bit specific files, which had the following | ||
6 | * copyrights: | ||
7 | * | ||
8 | * PPC64 Mods (C) 2005 Frank Rowand (frowand@mvista.com) | ||
9 | * PPC Mods (C) 2004 Tom Rini (trini@mvista.com) | ||
10 | * PPC Mods (C) 2003 John Whitney (john.whitney@timesys.com) | ||
5 | * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu) | 11 | * PPC Mods (C) 1998 Michael Tesch (tesch@cs.wisc.edu) |
6 | * | 12 | * |
13 | * | ||
7 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 14 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
15 | * Author: Tom Rini <trini@kernel.crashing.org> | ||
16 | * | ||
17 | * 2006 (c) MontaVista Software, Inc. This file is licensed under | ||
18 | * the terms of the GNU General Public License version 2. This program | ||
19 | * is licensed "as is" without any warranty of any kind, whether express | ||
20 | * or implied. | ||
8 | */ | 21 | */ |
9 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
10 | #ifndef _PPC_KGDB_H | 23 | #ifndef __POWERPC_KGDB_H__ |
11 | #define _PPC_KGDB_H | 24 | #define __POWERPC_KGDB_H__ |
12 | 25 | ||
13 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
14 | 27 | ||
15 | /* Things specific to the gen550 backend. */ | 28 | #define BREAK_INSTR_SIZE 4 |
16 | struct uart_port; | 29 | #define BUFMAX ((NUMREGBYTES * 2) + 512) |
17 | 30 | #define OUTBUFMAX ((NUMREGBYTES * 2) + 512) | |
18 | extern void gen550_progress(char *, unsigned short); | 31 | static inline void arch_kgdb_breakpoint(void) |
19 | extern void gen550_kgdb_map_scc(void); | 32 | { |
20 | extern void gen550_init(int, struct uart_port *); | 33 | asm(".long 0x7d821008"); /* twge r2, r2 */ |
21 | 34 | } | |
22 | /* Things specific to the pmac backend. */ | 35 | #define CACHE_FLUSH_IS_SAFE 1 |
23 | extern void zs_kgdb_hook(int tty_num); | ||
24 | |||
25 | /* To init the kgdb engine. (called by serial hook)*/ | ||
26 | extern void set_debug_traps(void); | ||
27 | |||
28 | /* To enter the debugger explicitly. */ | ||
29 | extern void breakpoint(void); | ||
30 | |||
31 | /* For taking exceptions | ||
32 | * these are defined in traps.c | ||
33 | */ | ||
34 | extern int (*debugger)(struct pt_regs *regs); | ||
35 | extern int (*debugger_bpt)(struct pt_regs *regs); | ||
36 | extern int (*debugger_sstep)(struct pt_regs *regs); | ||
37 | extern int (*debugger_iabr_match)(struct pt_regs *regs); | ||
38 | extern int (*debugger_dabr_match)(struct pt_regs *regs); | ||
39 | extern void (*debugger_fault_handler)(struct pt_regs *regs); | ||
40 | |||
41 | /* What we bring to the party */ | ||
42 | int kgdb_bpt(struct pt_regs *regs); | ||
43 | int kgdb_sstep(struct pt_regs *regs); | ||
44 | void kgdb(struct pt_regs *regs); | ||
45 | int kgdb_iabr_match(struct pt_regs *regs); | ||
46 | int kgdb_dabr_match(struct pt_regs *regs); | ||
47 | 36 | ||
37 | /* The number bytes of registers we have to save depends on a few | ||
38 | * things. For 64bit we default to not including vector registers and | ||
39 | * vector state registers. */ | ||
40 | #ifdef CONFIG_PPC64 | ||
48 | /* | 41 | /* |
49 | * external low-level support routines (ie macserial.c) | 42 | * 64 bit (8 byte) registers: |
43 | * 32 gpr, 32 fpr, nip, msr, link, ctr | ||
44 | * 32 bit (4 byte) registers: | ||
45 | * ccr, xer, fpscr | ||
50 | */ | 46 | */ |
51 | extern void kgdb_interruptible(int); /* control interrupts from serial */ | 47 | #define NUMREGBYTES ((68 * 8) + (3 * 4)) |
52 | extern void putDebugChar(char); /* write a single character */ | 48 | #define NUMCRITREGBYTES 184 |
53 | extern char getDebugChar(void); /* read and return a single char */ | 49 | #else /* CONFIG_PPC32 */ |
54 | 50 | /* On non-E500 family PPC32 we determine the size by picking the last | |
51 | * register we need, but on E500 we skip sections so we list what we | ||
52 | * need to store, and add it up. */ | ||
53 | #ifndef CONFIG_E500 | ||
54 | #define MAXREG (PT_FPSCR+1) | ||
55 | #else | ||
56 | /* 32 GPRs (8 bytes), nip, msr, ccr, link, ctr, xer, acc (8 bytes), spefscr*/ | ||
57 | #define MAXREG ((32*2)+6+2+1) | ||
58 | #endif | ||
59 | #define NUMREGBYTES (MAXREG * sizeof(int)) | ||
60 | /* CR/LR, R1, R2, R13-R31 inclusive. */ | ||
61 | #define NUMCRITREGBYTES (23 * sizeof(int)) | ||
62 | #endif /* 32/64 */ | ||
55 | #endif /* !(__ASSEMBLY__) */ | 63 | #endif /* !(__ASSEMBLY__) */ |
56 | #endif /* !(_PPC_KGDB_H) */ | 64 | #endif /* !__POWERPC_KGDB_H__ */ |
57 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-x86/ipi.h b/include/asm-x86/ipi.h index 196d63c28aa4..bb1c09f7a76c 100644 --- a/include/asm-x86/ipi.h +++ b/include/asm-x86/ipi.h | |||
@@ -122,7 +122,7 @@ static inline void send_IPI_mask_sequence(cpumask_t mask, int vector) | |||
122 | * - mbligh | 122 | * - mbligh |
123 | */ | 123 | */ |
124 | local_irq_save(flags); | 124 | local_irq_save(flags); |
125 | for_each_cpu_mask(query_cpu, mask) { | 125 | for_each_cpu_mask_nr(query_cpu, mask) { |
126 | __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu), | 126 | __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu), |
127 | vector, APIC_DEST_PHYSICAL); | 127 | vector, APIC_DEST_PHYSICAL); |
128 | } | 128 | } |
diff --git a/include/asm-x86/processor.h b/include/asm-x86/processor.h index 15cb82a44e89..5f58da401b43 100644 --- a/include/asm-x86/processor.h +++ b/include/asm-x86/processor.h | |||
@@ -134,7 +134,7 @@ extern __u32 cleared_cpu_caps[NCAPINTS]; | |||
134 | #ifdef CONFIG_SMP | 134 | #ifdef CONFIG_SMP |
135 | DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); | 135 | DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); |
136 | #define cpu_data(cpu) per_cpu(cpu_info, cpu) | 136 | #define cpu_data(cpu) per_cpu(cpu_info, cpu) |
137 | #define current_cpu_data cpu_data(smp_processor_id()) | 137 | #define current_cpu_data __get_cpu_var(cpu_info) |
138 | #else | 138 | #else |
139 | #define cpu_data(cpu) boot_cpu_data | 139 | #define cpu_data(cpu) boot_cpu_data |
140 | #define current_cpu_data boot_cpu_data | 140 | #define current_cpu_data boot_cpu_data |
diff --git a/include/asm-x86/thread_info.h b/include/asm-x86/thread_info.h index 0a8f27d31d0d..3f2de1050988 100644 --- a/include/asm-x86/thread_info.h +++ b/include/asm-x86/thread_info.h | |||
@@ -79,7 +79,6 @@ struct thread_info { | |||
79 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 79 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
80 | #define TIF_SECCOMP 8 /* secure computing */ | 80 | #define TIF_SECCOMP 8 /* secure computing */ |
81 | #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */ | 81 | #define TIF_MCE_NOTIFY 10 /* notify userspace of an MCE */ |
82 | #define TIF_HRTICK_RESCHED 11 /* reprogram hrtick timer */ | ||
83 | #define TIF_NOTSC 16 /* TSC is not accessible in userland */ | 82 | #define TIF_NOTSC 16 /* TSC is not accessible in userland */ |
84 | #define TIF_IA32 17 /* 32bit process */ | 83 | #define TIF_IA32 17 /* 32bit process */ |
85 | #define TIF_FORK 18 /* ret_from_fork */ | 84 | #define TIF_FORK 18 /* ret_from_fork */ |
@@ -102,7 +101,6 @@ struct thread_info { | |||
102 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | 101 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) |
103 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) | 102 | #define _TIF_SECCOMP (1 << TIF_SECCOMP) |
104 | #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) | 103 | #define _TIF_MCE_NOTIFY (1 << TIF_MCE_NOTIFY) |
105 | #define _TIF_HRTICK_RESCHED (1 << TIF_HRTICK_RESCHED) | ||
106 | #define _TIF_NOTSC (1 << TIF_NOTSC) | 104 | #define _TIF_NOTSC (1 << TIF_NOTSC) |
107 | #define _TIF_IA32 (1 << TIF_IA32) | 105 | #define _TIF_IA32 (1 << TIF_IA32) |
108 | #define _TIF_FORK (1 << TIF_FORK) | 106 | #define _TIF_FORK (1 << TIF_FORK) |
@@ -135,7 +133,7 @@ struct thread_info { | |||
135 | 133 | ||
136 | /* Only used for 64 bit */ | 134 | /* Only used for 64 bit */ |
137 | #define _TIF_DO_NOTIFY_MASK \ | 135 | #define _TIF_DO_NOTIFY_MASK \ |
138 | (_TIF_SIGPENDING|_TIF_MCE_NOTIFY|_TIF_HRTICK_RESCHED) | 136 | (_TIF_SIGPENDING|_TIF_MCE_NOTIFY) |
139 | 137 | ||
140 | /* flags to check in __switch_to() */ | 138 | /* flags to check in __switch_to() */ |
141 | #define _TIF_WORK_CTXSW \ | 139 | #define _TIF_WORK_CTXSW \ |
diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h index eb640f0acfac..0f50d4cc4360 100644 --- a/include/linux/async_tx.h +++ b/include/linux/async_tx.h | |||
@@ -101,21 +101,14 @@ async_tx_find_channel(struct dma_async_tx_descriptor *depend_tx, | |||
101 | 101 | ||
102 | /** | 102 | /** |
103 | * async_tx_sync_epilog - actions to take if an operation is run synchronously | 103 | * async_tx_sync_epilog - actions to take if an operation is run synchronously |
104 | * @flags: async_tx flags | ||
105 | * @depend_tx: transaction depends on depend_tx | ||
106 | * @cb_fn: function to call when the transaction completes | 104 | * @cb_fn: function to call when the transaction completes |
107 | * @cb_fn_param: parameter to pass to the callback routine | 105 | * @cb_fn_param: parameter to pass to the callback routine |
108 | */ | 106 | */ |
109 | static inline void | 107 | static inline void |
110 | async_tx_sync_epilog(unsigned long flags, | 108 | async_tx_sync_epilog(dma_async_tx_callback cb_fn, void *cb_fn_param) |
111 | struct dma_async_tx_descriptor *depend_tx, | ||
112 | dma_async_tx_callback cb_fn, void *cb_fn_param) | ||
113 | { | 109 | { |
114 | if (cb_fn) | 110 | if (cb_fn) |
115 | cb_fn(cb_fn_param); | 111 | cb_fn(cb_fn_param); |
116 | |||
117 | if (depend_tx && (flags & ASYNC_TX_DEP_ACK)) | ||
118 | async_tx_ack(depend_tx); | ||
119 | } | 112 | } |
120 | 113 | ||
121 | void | 114 | void |
@@ -152,4 +145,6 @@ struct dma_async_tx_descriptor * | |||
152 | async_trigger_callback(enum async_tx_flags flags, | 145 | async_trigger_callback(enum async_tx_flags flags, |
153 | struct dma_async_tx_descriptor *depend_tx, | 146 | struct dma_async_tx_descriptor *depend_tx, |
154 | dma_async_tx_callback cb_fn, void *cb_fn_param); | 147 | dma_async_tx_callback cb_fn, void *cb_fn_param); |
148 | |||
149 | void async_tx_quiesce(struct dma_async_tx_descriptor **tx); | ||
155 | #endif /* _ASYNC_TX_H_ */ | 150 | #endif /* _ASYNC_TX_H_ */ |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index c24875bd9c5b..1b5c98e7fef7 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -17,6 +17,20 @@ | |||
17 | * For details of cpus_onto(), see bitmap_onto in lib/bitmap.c. | 17 | * For details of cpus_onto(), see bitmap_onto in lib/bitmap.c. |
18 | * For details of cpus_fold(), see bitmap_fold in lib/bitmap.c. | 18 | * For details of cpus_fold(), see bitmap_fold in lib/bitmap.c. |
19 | * | 19 | * |
20 | * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | ||
21 | * Note: The alternate operations with the suffix "_nr" are used | ||
22 | * to limit the range of the loop to nr_cpu_ids instead of | ||
23 | * NR_CPUS when NR_CPUS > 64 for performance reasons. | ||
24 | * If NR_CPUS is <= 64 then most assembler bitmask | ||
25 | * operators execute faster with a constant range, so | ||
26 | * the operator will continue to use NR_CPUS. | ||
27 | * | ||
28 | * Another consideration is that nr_cpu_ids is initialized | ||
29 | * to NR_CPUS and isn't lowered until the possible cpus are | ||
30 | * discovered (including any disabled cpus). So early uses | ||
31 | * will span the entire range of NR_CPUS. | ||
32 | * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . | ||
33 | * | ||
20 | * The available cpumask operations are: | 34 | * The available cpumask operations are: |
21 | * | 35 | * |
22 | * void cpu_set(cpu, mask) turn on bit 'cpu' in mask | 36 | * void cpu_set(cpu, mask) turn on bit 'cpu' in mask |
@@ -38,18 +52,60 @@ | |||
38 | * int cpus_empty(mask) Is mask empty (no bits sets)? | 52 | * int cpus_empty(mask) Is mask empty (no bits sets)? |
39 | * int cpus_full(mask) Is mask full (all bits sets)? | 53 | * int cpus_full(mask) Is mask full (all bits sets)? |
40 | * int cpus_weight(mask) Hamming weigh - number of set bits | 54 | * int cpus_weight(mask) Hamming weigh - number of set bits |
55 | * int cpus_weight_nr(mask) Same using nr_cpu_ids instead of NR_CPUS | ||
41 | * | 56 | * |
42 | * void cpus_shift_right(dst, src, n) Shift right | 57 | * void cpus_shift_right(dst, src, n) Shift right |
43 | * void cpus_shift_left(dst, src, n) Shift left | 58 | * void cpus_shift_left(dst, src, n) Shift left |
44 | * | 59 | * |
45 | * int first_cpu(mask) Number lowest set bit, or NR_CPUS | 60 | * int first_cpu(mask) Number lowest set bit, or NR_CPUS |
46 | * int next_cpu(cpu, mask) Next cpu past 'cpu', or NR_CPUS | 61 | * int next_cpu(cpu, mask) Next cpu past 'cpu', or NR_CPUS |
62 | * int next_cpu_nr(cpu, mask) Next cpu past 'cpu', or nr_cpu_ids | ||
47 | * | 63 | * |
48 | * cpumask_t cpumask_of_cpu(cpu) Return cpumask with bit 'cpu' set | 64 | * cpumask_t cpumask_of_cpu(cpu) Return cpumask with bit 'cpu' set |
65 | *ifdef CONFIG_HAS_CPUMASK_OF_CPU | ||
66 | * cpumask_of_cpu_ptr_declare(v) Declares cpumask_t *v | ||
67 | * cpumask_of_cpu_ptr_next(v, cpu) Sets v = &cpumask_of_cpu_map[cpu] | ||
68 | * cpumask_of_cpu_ptr(v, cpu) Combines above two operations | ||
69 | *else | ||
70 | * cpumask_of_cpu_ptr_declare(v) Declares cpumask_t _v and *v = &_v | ||
71 | * cpumask_of_cpu_ptr_next(v, cpu) Sets _v = cpumask_of_cpu(cpu) | ||
72 | * cpumask_of_cpu_ptr(v, cpu) Combines above two operations | ||
73 | *endif | ||
49 | * CPU_MASK_ALL Initializer - all bits set | 74 | * CPU_MASK_ALL Initializer - all bits set |
50 | * CPU_MASK_NONE Initializer - no bits set | 75 | * CPU_MASK_NONE Initializer - no bits set |
51 | * unsigned long *cpus_addr(mask) Array of unsigned long's in mask | 76 | * unsigned long *cpus_addr(mask) Array of unsigned long's in mask |
52 | * | 77 | * |
78 | * CPUMASK_ALLOC kmalloc's a structure that is a composite of many cpumask_t | ||
79 | * variables, and CPUMASK_PTR provides pointers to each field. | ||
80 | * | ||
81 | * The structure should be defined something like this: | ||
82 | * struct my_cpumasks { | ||
83 | * cpumask_t mask1; | ||
84 | * cpumask_t mask2; | ||
85 | * }; | ||
86 | * | ||
87 | * Usage is then: | ||
88 | * CPUMASK_ALLOC(my_cpumasks); | ||
89 | * CPUMASK_PTR(mask1, my_cpumasks); | ||
90 | * CPUMASK_PTR(mask2, my_cpumasks); | ||
91 | * | ||
92 | * --- DO NOT reference cpumask_t pointers until this check --- | ||
93 | * if (my_cpumasks == NULL) | ||
94 | * "kmalloc failed"... | ||
95 | * | ||
96 | * References are now pointers to the cpumask_t variables (*mask1, ...) | ||
97 | * | ||
98 | *if NR_CPUS > BITS_PER_LONG | ||
99 | * CPUMASK_ALLOC(m) Declares and allocates struct m *m = | ||
100 | * kmalloc(sizeof(*m), GFP_KERNEL) | ||
101 | * CPUMASK_FREE(m) Macro for kfree(m) | ||
102 | *else | ||
103 | * CPUMASK_ALLOC(m) Declares struct m _m, *m = &_m | ||
104 | * CPUMASK_FREE(m) Nop | ||
105 | *endif | ||
106 | * CPUMASK_PTR(v, m) Declares cpumask_t *v = &(m->v) | ||
107 | * ------------------------------------------------------------------------ | ||
108 | * | ||
53 | * int cpumask_scnprintf(buf, len, mask) Format cpumask for printing | 109 | * int cpumask_scnprintf(buf, len, mask) Format cpumask for printing |
54 | * int cpumask_parse_user(ubuf, ulen, mask) Parse ascii string as cpumask | 110 | * int cpumask_parse_user(ubuf, ulen, mask) Parse ascii string as cpumask |
55 | * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing | 111 | * int cpulist_scnprintf(buf, len, mask) Format cpumask as list for printing |
@@ -59,7 +115,8 @@ | |||
59 | * void cpus_onto(dst, orig, relmap) *dst = orig relative to relmap | 115 | * void cpus_onto(dst, orig, relmap) *dst = orig relative to relmap |
60 | * void cpus_fold(dst, orig, sz) dst bits = orig bits mod sz | 116 | * void cpus_fold(dst, orig, sz) dst bits = orig bits mod sz |
61 | * | 117 | * |
62 | * for_each_cpu_mask(cpu, mask) for-loop cpu over mask | 118 | * for_each_cpu_mask(cpu, mask) for-loop cpu over mask using NR_CPUS |
119 | * for_each_cpu_mask_nr(cpu, mask) for-loop cpu over mask using nr_cpu_ids | ||
63 | * | 120 | * |
64 | * int num_online_cpus() Number of online CPUs | 121 | * int num_online_cpus() Number of online CPUs |
65 | * int num_possible_cpus() Number of all possible CPUs | 122 | * int num_possible_cpus() Number of all possible CPUs |
@@ -216,23 +273,19 @@ static inline void __cpus_shift_left(cpumask_t *dstp, | |||
216 | bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); | 273 | bitmap_shift_left(dstp->bits, srcp->bits, n, nbits); |
217 | } | 274 | } |
218 | 275 | ||
219 | #ifdef CONFIG_SMP | ||
220 | int __first_cpu(const cpumask_t *srcp); | ||
221 | #define first_cpu(src) __first_cpu(&(src)) | ||
222 | int __next_cpu(int n, const cpumask_t *srcp); | ||
223 | #define next_cpu(n, src) __next_cpu((n), &(src)) | ||
224 | #else | ||
225 | #define first_cpu(src) ({ (void)(src); 0; }) | ||
226 | #define next_cpu(n, src) ({ (void)(src); 1; }) | ||
227 | #endif | ||
228 | 276 | ||
229 | #ifdef CONFIG_HAVE_CPUMASK_OF_CPU_MAP | 277 | #ifdef CONFIG_HAVE_CPUMASK_OF_CPU_MAP |
230 | extern cpumask_t *cpumask_of_cpu_map; | 278 | extern cpumask_t *cpumask_of_cpu_map; |
231 | #define cpumask_of_cpu(cpu) (cpumask_of_cpu_map[cpu]) | 279 | #define cpumask_of_cpu(cpu) (cpumask_of_cpu_map[cpu]) |
232 | 280 | #define cpumask_of_cpu_ptr(v, cpu) \ | |
281 | const cpumask_t *v = &cpumask_of_cpu(cpu) | ||
282 | #define cpumask_of_cpu_ptr_declare(v) \ | ||
283 | const cpumask_t *v | ||
284 | #define cpumask_of_cpu_ptr_next(v, cpu) \ | ||
285 | v = &cpumask_of_cpu(cpu) | ||
233 | #else | 286 | #else |
234 | #define cpumask_of_cpu(cpu) \ | 287 | #define cpumask_of_cpu(cpu) \ |
235 | (*({ \ | 288 | ({ \ |
236 | typeof(_unused_cpumask_arg_) m; \ | 289 | typeof(_unused_cpumask_arg_) m; \ |
237 | if (sizeof(m) == sizeof(unsigned long)) { \ | 290 | if (sizeof(m) == sizeof(unsigned long)) { \ |
238 | m.bits[0] = 1UL<<(cpu); \ | 291 | m.bits[0] = 1UL<<(cpu); \ |
@@ -240,8 +293,16 @@ extern cpumask_t *cpumask_of_cpu_map; | |||
240 | cpus_clear(m); \ | 293 | cpus_clear(m); \ |
241 | cpu_set((cpu), m); \ | 294 | cpu_set((cpu), m); \ |
242 | } \ | 295 | } \ |
243 | &m; \ | 296 | m; \ |
244 | })) | 297 | }) |
298 | #define cpumask_of_cpu_ptr(v, cpu) \ | ||
299 | cpumask_t _##v = cpumask_of_cpu(cpu); \ | ||
300 | const cpumask_t *v = &_##v | ||
301 | #define cpumask_of_cpu_ptr_declare(v) \ | ||
302 | cpumask_t _##v; \ | ||
303 | const cpumask_t *v = &_##v | ||
304 | #define cpumask_of_cpu_ptr_next(v, cpu) \ | ||
305 | _##v = cpumask_of_cpu(cpu) | ||
245 | #endif | 306 | #endif |
246 | 307 | ||
247 | #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) | 308 | #define CPU_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(NR_CPUS) |
@@ -281,6 +342,15 @@ extern cpumask_t cpu_mask_all; | |||
281 | 342 | ||
282 | #define cpus_addr(src) ((src).bits) | 343 | #define cpus_addr(src) ((src).bits) |
283 | 344 | ||
345 | #if NR_CPUS > BITS_PER_LONG | ||
346 | #define CPUMASK_ALLOC(m) struct m *m = kmalloc(sizeof(*m), GFP_KERNEL) | ||
347 | #define CPUMASK_FREE(m) kfree(m) | ||
348 | #else | ||
349 | #define CPUMASK_ALLOC(m) struct m _m, *m = &_m | ||
350 | #define CPUMASK_FREE(m) | ||
351 | #endif | ||
352 | #define CPUMASK_PTR(v, m) cpumask_t *v = &(m->v) | ||
353 | |||
284 | #define cpumask_scnprintf(buf, len, src) \ | 354 | #define cpumask_scnprintf(buf, len, src) \ |
285 | __cpumask_scnprintf((buf), (len), &(src), NR_CPUS) | 355 | __cpumask_scnprintf((buf), (len), &(src), NR_CPUS) |
286 | static inline int __cpumask_scnprintf(char *buf, int len, | 356 | static inline int __cpumask_scnprintf(char *buf, int len, |
@@ -343,29 +413,59 @@ static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp, | |||
343 | bitmap_fold(dstp->bits, origp->bits, sz, nbits); | 413 | bitmap_fold(dstp->bits, origp->bits, sz, nbits); |
344 | } | 414 | } |
345 | 415 | ||
346 | #if NR_CPUS > 1 | 416 | #if NR_CPUS == 1 |
347 | #define for_each_cpu_mask(cpu, mask) \ | 417 | |
348 | for ((cpu) = first_cpu(mask); \ | 418 | #define nr_cpu_ids 1 |
349 | (cpu) < NR_CPUS; \ | 419 | #define first_cpu(src) ({ (void)(src); 0; }) |
350 | (cpu) = next_cpu((cpu), (mask))) | 420 | #define next_cpu(n, src) ({ (void)(src); 1; }) |
351 | #else /* NR_CPUS == 1 */ | 421 | #define any_online_cpu(mask) 0 |
352 | #define for_each_cpu_mask(cpu, mask) \ | 422 | #define for_each_cpu_mask(cpu, mask) \ |
353 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) | 423 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask) |
354 | #endif /* NR_CPUS */ | 424 | |
425 | #else /* NR_CPUS > 1 */ | ||
426 | |||
427 | extern int nr_cpu_ids; | ||
428 | int __first_cpu(const cpumask_t *srcp); | ||
429 | int __next_cpu(int n, const cpumask_t *srcp); | ||
430 | int __any_online_cpu(const cpumask_t *mask); | ||
431 | |||
432 | #define first_cpu(src) __first_cpu(&(src)) | ||
433 | #define next_cpu(n, src) __next_cpu((n), &(src)) | ||
434 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) | ||
435 | #define for_each_cpu_mask(cpu, mask) \ | ||
436 | for ((cpu) = -1; \ | ||
437 | (cpu) = next_cpu((cpu), (mask)), \ | ||
438 | (cpu) < NR_CPUS; ) | ||
439 | #endif | ||
440 | |||
441 | #if NR_CPUS <= 64 | ||
355 | 442 | ||
356 | #define next_cpu_nr(n, src) next_cpu(n, src) | 443 | #define next_cpu_nr(n, src) next_cpu(n, src) |
357 | #define cpus_weight_nr(cpumask) cpus_weight(cpumask) | 444 | #define cpus_weight_nr(cpumask) cpus_weight(cpumask) |
358 | #define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask) | 445 | #define for_each_cpu_mask_nr(cpu, mask) for_each_cpu_mask(cpu, mask) |
359 | 446 | ||
447 | #else /* NR_CPUS > 64 */ | ||
448 | |||
449 | int __next_cpu_nr(int n, const cpumask_t *srcp); | ||
450 | #define next_cpu_nr(n, src) __next_cpu_nr((n), &(src)) | ||
451 | #define cpus_weight_nr(cpumask) __cpus_weight(&(cpumask), nr_cpu_ids) | ||
452 | #define for_each_cpu_mask_nr(cpu, mask) \ | ||
453 | for ((cpu) = -1; \ | ||
454 | (cpu) = next_cpu_nr((cpu), (mask)), \ | ||
455 | (cpu) < nr_cpu_ids; ) | ||
456 | |||
457 | #endif /* NR_CPUS > 64 */ | ||
458 | |||
360 | /* | 459 | /* |
361 | * The following particular system cpumasks and operations manage | 460 | * The following particular system cpumasks and operations manage |
362 | * possible, present and online cpus. Each of them is a fixed size | 461 | * possible, present, active and online cpus. Each of them is a fixed size |
363 | * bitmap of size NR_CPUS. | 462 | * bitmap of size NR_CPUS. |
364 | * | 463 | * |
365 | * #ifdef CONFIG_HOTPLUG_CPU | 464 | * #ifdef CONFIG_HOTPLUG_CPU |
366 | * cpu_possible_map - has bit 'cpu' set iff cpu is populatable | 465 | * cpu_possible_map - has bit 'cpu' set iff cpu is populatable |
367 | * cpu_present_map - has bit 'cpu' set iff cpu is populated | 466 | * cpu_present_map - has bit 'cpu' set iff cpu is populated |
368 | * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler | 467 | * cpu_online_map - has bit 'cpu' set iff cpu available to scheduler |
468 | * cpu_active_map - has bit 'cpu' set iff cpu available to migration | ||
369 | * #else | 469 | * #else |
370 | * cpu_possible_map - has bit 'cpu' set iff cpu is populated | 470 | * cpu_possible_map - has bit 'cpu' set iff cpu is populated |
371 | * cpu_present_map - copy of cpu_possible_map | 471 | * cpu_present_map - copy of cpu_possible_map |
@@ -416,14 +516,16 @@ static inline void __cpus_fold(cpumask_t *dstp, const cpumask_t *origp, | |||
416 | extern cpumask_t cpu_possible_map; | 516 | extern cpumask_t cpu_possible_map; |
417 | extern cpumask_t cpu_online_map; | 517 | extern cpumask_t cpu_online_map; |
418 | extern cpumask_t cpu_present_map; | 518 | extern cpumask_t cpu_present_map; |
519 | extern cpumask_t cpu_active_map; | ||
419 | 520 | ||
420 | #if NR_CPUS > 1 | 521 | #if NR_CPUS > 1 |
421 | #define num_online_cpus() cpus_weight(cpu_online_map) | 522 | #define num_online_cpus() cpus_weight_nr(cpu_online_map) |
422 | #define num_possible_cpus() cpus_weight(cpu_possible_map) | 523 | #define num_possible_cpus() cpus_weight_nr(cpu_possible_map) |
423 | #define num_present_cpus() cpus_weight(cpu_present_map) | 524 | #define num_present_cpus() cpus_weight_nr(cpu_present_map) |
424 | #define cpu_online(cpu) cpu_isset((cpu), cpu_online_map) | 525 | #define cpu_online(cpu) cpu_isset((cpu), cpu_online_map) |
425 | #define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map) | 526 | #define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map) |
426 | #define cpu_present(cpu) cpu_isset((cpu), cpu_present_map) | 527 | #define cpu_present(cpu) cpu_isset((cpu), cpu_present_map) |
528 | #define cpu_active(cpu) cpu_isset((cpu), cpu_active_map) | ||
427 | #else | 529 | #else |
428 | #define num_online_cpus() 1 | 530 | #define num_online_cpus() 1 |
429 | #define num_possible_cpus() 1 | 531 | #define num_possible_cpus() 1 |
@@ -431,21 +533,13 @@ extern cpumask_t cpu_present_map; | |||
431 | #define cpu_online(cpu) ((cpu) == 0) | 533 | #define cpu_online(cpu) ((cpu) == 0) |
432 | #define cpu_possible(cpu) ((cpu) == 0) | 534 | #define cpu_possible(cpu) ((cpu) == 0) |
433 | #define cpu_present(cpu) ((cpu) == 0) | 535 | #define cpu_present(cpu) ((cpu) == 0) |
536 | #define cpu_active(cpu) ((cpu) == 0) | ||
434 | #endif | 537 | #endif |
435 | 538 | ||
436 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | 539 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
437 | 540 | ||
438 | #ifdef CONFIG_SMP | 541 | #define for_each_possible_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_possible_map) |
439 | extern int nr_cpu_ids; | 542 | #define for_each_online_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_online_map) |
440 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) | 543 | #define for_each_present_cpu(cpu) for_each_cpu_mask_nr((cpu), cpu_present_map) |
441 | int __any_online_cpu(const cpumask_t *mask); | ||
442 | #else | ||
443 | #define nr_cpu_ids 1 | ||
444 | #define any_online_cpu(mask) 0 | ||
445 | #endif | ||
446 | |||
447 | #define for_each_possible_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map) | ||
448 | #define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) | ||
449 | #define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) | ||
450 | 544 | ||
451 | #endif /* __LINUX_CPUMASK_H */ | 545 | #endif /* __LINUX_CPUMASK_H */ |
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h index 038578362b47..e8f450c499b0 100644 --- a/include/linux/cpuset.h +++ b/include/linux/cpuset.h | |||
@@ -78,6 +78,8 @@ extern void cpuset_track_online_nodes(void); | |||
78 | 78 | ||
79 | extern int current_cpuset_is_being_rebound(void); | 79 | extern int current_cpuset_is_being_rebound(void); |
80 | 80 | ||
81 | extern void rebuild_sched_domains(void); | ||
82 | |||
81 | #else /* !CONFIG_CPUSETS */ | 83 | #else /* !CONFIG_CPUSETS */ |
82 | 84 | ||
83 | static inline int cpuset_init_early(void) { return 0; } | 85 | static inline int cpuset_init_early(void) { return 0; } |
@@ -156,6 +158,11 @@ static inline int current_cpuset_is_being_rebound(void) | |||
156 | return 0; | 158 | return 0; |
157 | } | 159 | } |
158 | 160 | ||
161 | static inline void rebuild_sched_domains(void) | ||
162 | { | ||
163 | partition_sched_domains(0, NULL, NULL); | ||
164 | } | ||
165 | |||
159 | #endif /* !CONFIG_CPUSETS */ | 166 | #endif /* !CONFIG_CPUSETS */ |
160 | 167 | ||
161 | #endif /* _LINUX_CPUSET_H */ | 168 | #endif /* _LINUX_CPUSET_H */ |
diff --git a/include/linux/dca.h b/include/linux/dca.h index af61cd1f37e9..b00a753eda53 100644 --- a/include/linux/dca.h +++ b/include/linux/dca.h | |||
@@ -10,6 +10,7 @@ void dca_unregister_notify(struct notifier_block *nb); | |||
10 | #define DCA_PROVIDER_REMOVE 0x0002 | 10 | #define DCA_PROVIDER_REMOVE 0x0002 |
11 | 11 | ||
12 | struct dca_provider { | 12 | struct dca_provider { |
13 | struct list_head node; | ||
13 | struct dca_ops *ops; | 14 | struct dca_ops *ops; |
14 | struct device *cd; | 15 | struct device *cd; |
15 | int id; | 16 | int id; |
@@ -18,7 +19,9 @@ struct dca_provider { | |||
18 | struct dca_ops { | 19 | struct dca_ops { |
19 | int (*add_requester) (struct dca_provider *, struct device *); | 20 | int (*add_requester) (struct dca_provider *, struct device *); |
20 | int (*remove_requester) (struct dca_provider *, struct device *); | 21 | int (*remove_requester) (struct dca_provider *, struct device *); |
21 | u8 (*get_tag) (struct dca_provider *, int cpu); | 22 | u8 (*get_tag) (struct dca_provider *, struct device *, |
23 | int cpu); | ||
24 | int (*dev_managed) (struct dca_provider *, struct device *); | ||
22 | }; | 25 | }; |
23 | 26 | ||
24 | struct dca_provider *alloc_dca_provider(struct dca_ops *ops, int priv_size); | 27 | struct dca_provider *alloc_dca_provider(struct dca_ops *ops, int priv_size); |
@@ -32,9 +35,11 @@ static inline void *dca_priv(struct dca_provider *dca) | |||
32 | } | 35 | } |
33 | 36 | ||
34 | /* Requester API */ | 37 | /* Requester API */ |
38 | #define DCA_GET_TAG_TWO_ARGS | ||
35 | int dca_add_requester(struct device *dev); | 39 | int dca_add_requester(struct device *dev); |
36 | int dca_remove_requester(struct device *dev); | 40 | int dca_remove_requester(struct device *dev); |
37 | u8 dca_get_tag(int cpu); | 41 | u8 dca_get_tag(int cpu); |
42 | u8 dca3_get_tag(struct device *dev, int cpu); | ||
38 | 43 | ||
39 | /* internal stuff */ | 44 | /* internal stuff */ |
40 | int __init dca_sysfs_init(void); | 45 | int __init dca_sysfs_init(void); |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index d08a5c5eb928..adb0b084eb5a 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -89,10 +89,23 @@ enum dma_transaction_type { | |||
89 | DMA_MEMSET, | 89 | DMA_MEMSET, |
90 | DMA_MEMCPY_CRC32C, | 90 | DMA_MEMCPY_CRC32C, |
91 | DMA_INTERRUPT, | 91 | DMA_INTERRUPT, |
92 | DMA_SLAVE, | ||
92 | }; | 93 | }; |
93 | 94 | ||
94 | /* last transaction type for creation of the capabilities mask */ | 95 | /* last transaction type for creation of the capabilities mask */ |
95 | #define DMA_TX_TYPE_END (DMA_INTERRUPT + 1) | 96 | #define DMA_TX_TYPE_END (DMA_SLAVE + 1) |
97 | |||
98 | /** | ||
99 | * enum dma_slave_width - DMA slave register access width. | ||
100 | * @DMA_SLAVE_WIDTH_8BIT: Do 8-bit slave register accesses | ||
101 | * @DMA_SLAVE_WIDTH_16BIT: Do 16-bit slave register accesses | ||
102 | * @DMA_SLAVE_WIDTH_32BIT: Do 32-bit slave register accesses | ||
103 | */ | ||
104 | enum dma_slave_width { | ||
105 | DMA_SLAVE_WIDTH_8BIT, | ||
106 | DMA_SLAVE_WIDTH_16BIT, | ||
107 | DMA_SLAVE_WIDTH_32BIT, | ||
108 | }; | ||
96 | 109 | ||
97 | /** | 110 | /** |
98 | * enum dma_ctrl_flags - DMA flags to augment operation preparation, | 111 | * enum dma_ctrl_flags - DMA flags to augment operation preparation, |
@@ -102,10 +115,14 @@ enum dma_transaction_type { | |||
102 | * @DMA_CTRL_ACK - the descriptor cannot be reused until the client | 115 | * @DMA_CTRL_ACK - the descriptor cannot be reused until the client |
103 | * acknowledges receipt, i.e. has has a chance to establish any | 116 | * acknowledges receipt, i.e. has has a chance to establish any |
104 | * dependency chains | 117 | * dependency chains |
118 | * @DMA_COMPL_SKIP_SRC_UNMAP - set to disable dma-unmapping the source buffer(s) | ||
119 | * @DMA_COMPL_SKIP_DEST_UNMAP - set to disable dma-unmapping the destination(s) | ||
105 | */ | 120 | */ |
106 | enum dma_ctrl_flags { | 121 | enum dma_ctrl_flags { |
107 | DMA_PREP_INTERRUPT = (1 << 0), | 122 | DMA_PREP_INTERRUPT = (1 << 0), |
108 | DMA_CTRL_ACK = (1 << 1), | 123 | DMA_CTRL_ACK = (1 << 1), |
124 | DMA_COMPL_SKIP_SRC_UNMAP = (1 << 2), | ||
125 | DMA_COMPL_SKIP_DEST_UNMAP = (1 << 3), | ||
109 | }; | 126 | }; |
110 | 127 | ||
111 | /** | 128 | /** |
@@ -115,6 +132,32 @@ enum dma_ctrl_flags { | |||
115 | typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t; | 132 | typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t; |
116 | 133 | ||
117 | /** | 134 | /** |
135 | * struct dma_slave - Information about a DMA slave | ||
136 | * @dev: device acting as DMA slave | ||
137 | * @dma_dev: required DMA master device. If non-NULL, the client can not be | ||
138 | * bound to other masters than this. | ||
139 | * @tx_reg: physical address of data register used for | ||
140 | * memory-to-peripheral transfers | ||
141 | * @rx_reg: physical address of data register used for | ||
142 | * peripheral-to-memory transfers | ||
143 | * @reg_width: peripheral register width | ||
144 | * | ||
145 | * If dma_dev is non-NULL, the client can not be bound to other DMA | ||
146 | * masters than the one corresponding to this device. The DMA master | ||
147 | * driver may use this to determine if there is controller-specific | ||
148 | * data wrapped around this struct. Drivers of platform code that sets | ||
149 | * the dma_dev field must therefore make sure to use an appropriate | ||
150 | * controller-specific dma slave structure wrapping this struct. | ||
151 | */ | ||
152 | struct dma_slave { | ||
153 | struct device *dev; | ||
154 | struct device *dma_dev; | ||
155 | dma_addr_t tx_reg; | ||
156 | dma_addr_t rx_reg; | ||
157 | enum dma_slave_width reg_width; | ||
158 | }; | ||
159 | |||
160 | /** | ||
118 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan | 161 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan |
119 | * @refcount: local_t used for open-coded "bigref" counting | 162 | * @refcount: local_t used for open-coded "bigref" counting |
120 | * @memcpy_count: transaction counter | 163 | * @memcpy_count: transaction counter |
@@ -139,6 +182,7 @@ struct dma_chan_percpu { | |||
139 | * @rcu: the DMA channel's RCU head | 182 | * @rcu: the DMA channel's RCU head |
140 | * @device_node: used to add this to the device chan list | 183 | * @device_node: used to add this to the device chan list |
141 | * @local: per-cpu pointer to a struct dma_chan_percpu | 184 | * @local: per-cpu pointer to a struct dma_chan_percpu |
185 | * @client-count: how many clients are using this channel | ||
142 | */ | 186 | */ |
143 | struct dma_chan { | 187 | struct dma_chan { |
144 | struct dma_device *device; | 188 | struct dma_device *device; |
@@ -154,6 +198,7 @@ struct dma_chan { | |||
154 | 198 | ||
155 | struct list_head device_node; | 199 | struct list_head device_node; |
156 | struct dma_chan_percpu *local; | 200 | struct dma_chan_percpu *local; |
201 | int client_count; | ||
157 | }; | 202 | }; |
158 | 203 | ||
159 | #define to_dma_chan(p) container_of(p, struct dma_chan, dev) | 204 | #define to_dma_chan(p) container_of(p, struct dma_chan, dev) |
@@ -202,11 +247,14 @@ typedef enum dma_state_client (*dma_event_callback) (struct dma_client *client, | |||
202 | * @event_callback: func ptr to call when something happens | 247 | * @event_callback: func ptr to call when something happens |
203 | * @cap_mask: only return channels that satisfy the requested capabilities | 248 | * @cap_mask: only return channels that satisfy the requested capabilities |
204 | * a value of zero corresponds to any capability | 249 | * a value of zero corresponds to any capability |
250 | * @slave: data for preparing slave transfer. Must be non-NULL iff the | ||
251 | * DMA_SLAVE capability is requested. | ||
205 | * @global_node: list_head for global dma_client_list | 252 | * @global_node: list_head for global dma_client_list |
206 | */ | 253 | */ |
207 | struct dma_client { | 254 | struct dma_client { |
208 | dma_event_callback event_callback; | 255 | dma_event_callback event_callback; |
209 | dma_cap_mask_t cap_mask; | 256 | dma_cap_mask_t cap_mask; |
257 | struct dma_slave *slave; | ||
210 | struct list_head global_node; | 258 | struct list_head global_node; |
211 | }; | 259 | }; |
212 | 260 | ||
@@ -263,6 +311,8 @@ struct dma_async_tx_descriptor { | |||
263 | * @device_prep_dma_zero_sum: prepares a zero_sum operation | 311 | * @device_prep_dma_zero_sum: prepares a zero_sum operation |
264 | * @device_prep_dma_memset: prepares a memset operation | 312 | * @device_prep_dma_memset: prepares a memset operation |
265 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation | 313 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation |
314 | * @device_prep_slave_sg: prepares a slave dma operation | ||
315 | * @device_terminate_all: terminate all pending operations | ||
266 | * @device_issue_pending: push pending transactions to hardware | 316 | * @device_issue_pending: push pending transactions to hardware |
267 | */ | 317 | */ |
268 | struct dma_device { | 318 | struct dma_device { |
@@ -279,7 +329,8 @@ struct dma_device { | |||
279 | int dev_id; | 329 | int dev_id; |
280 | struct device *dev; | 330 | struct device *dev; |
281 | 331 | ||
282 | int (*device_alloc_chan_resources)(struct dma_chan *chan); | 332 | int (*device_alloc_chan_resources)(struct dma_chan *chan, |
333 | struct dma_client *client); | ||
283 | void (*device_free_chan_resources)(struct dma_chan *chan); | 334 | void (*device_free_chan_resources)(struct dma_chan *chan); |
284 | 335 | ||
285 | struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)( | 336 | struct dma_async_tx_descriptor *(*device_prep_dma_memcpy)( |
@@ -297,6 +348,12 @@ struct dma_device { | |||
297 | struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)( | 348 | struct dma_async_tx_descriptor *(*device_prep_dma_interrupt)( |
298 | struct dma_chan *chan, unsigned long flags); | 349 | struct dma_chan *chan, unsigned long flags); |
299 | 350 | ||
351 | struct dma_async_tx_descriptor *(*device_prep_slave_sg)( | ||
352 | struct dma_chan *chan, struct scatterlist *sgl, | ||
353 | unsigned int sg_len, enum dma_data_direction direction, | ||
354 | unsigned long flags); | ||
355 | void (*device_terminate_all)(struct dma_chan *chan); | ||
356 | |||
300 | enum dma_status (*device_is_tx_complete)(struct dma_chan *chan, | 357 | enum dma_status (*device_is_tx_complete)(struct dma_chan *chan, |
301 | dma_cookie_t cookie, dma_cookie_t *last, | 358 | dma_cookie_t cookie, dma_cookie_t *last, |
302 | dma_cookie_t *used); | 359 | dma_cookie_t *used); |
@@ -318,16 +375,14 @@ dma_cookie_t dma_async_memcpy_pg_to_pg(struct dma_chan *chan, | |||
318 | void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx, | 375 | void dma_async_tx_descriptor_init(struct dma_async_tx_descriptor *tx, |
319 | struct dma_chan *chan); | 376 | struct dma_chan *chan); |
320 | 377 | ||
321 | static inline void | 378 | static inline void async_tx_ack(struct dma_async_tx_descriptor *tx) |
322 | async_tx_ack(struct dma_async_tx_descriptor *tx) | ||
323 | { | 379 | { |
324 | tx->flags |= DMA_CTRL_ACK; | 380 | tx->flags |= DMA_CTRL_ACK; |
325 | } | 381 | } |
326 | 382 | ||
327 | static inline int | 383 | static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx) |
328 | async_tx_test_ack(struct dma_async_tx_descriptor *tx) | ||
329 | { | 384 | { |
330 | return tx->flags & DMA_CTRL_ACK; | 385 | return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK; |
331 | } | 386 | } |
332 | 387 | ||
333 | #define first_dma_cap(mask) __first_dma_cap(&(mask)) | 388 | #define first_dma_cap(mask) __first_dma_cap(&(mask)) |
diff --git a/include/linux/dw_dmac.h b/include/linux/dw_dmac.h new file mode 100644 index 000000000000..04d217b442bf --- /dev/null +++ b/include/linux/dw_dmac.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * Driver for the Synopsys DesignWare DMA Controller (aka DMACA on | ||
3 | * AVR32 systems.) | ||
4 | * | ||
5 | * Copyright (C) 2007 Atmel Corporation | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef DW_DMAC_H | ||
12 | #define DW_DMAC_H | ||
13 | |||
14 | #include <linux/dmaengine.h> | ||
15 | |||
16 | /** | ||
17 | * struct dw_dma_platform_data - Controller configuration parameters | ||
18 | * @nr_channels: Number of channels supported by hardware (max 8) | ||
19 | */ | ||
20 | struct dw_dma_platform_data { | ||
21 | unsigned int nr_channels; | ||
22 | }; | ||
23 | |||
24 | /** | ||
25 | * struct dw_dma_slave - Controller-specific information about a slave | ||
26 | * @slave: Generic information about the slave | ||
27 | * @ctl_lo: Platform-specific initializer for the CTL_LO register | ||
28 | * @cfg_hi: Platform-specific initializer for the CFG_HI register | ||
29 | * @cfg_lo: Platform-specific initializer for the CFG_LO register | ||
30 | */ | ||
31 | struct dw_dma_slave { | ||
32 | struct dma_slave slave; | ||
33 | u32 cfg_hi; | ||
34 | u32 cfg_lo; | ||
35 | }; | ||
36 | |||
37 | /* Platform-configurable bits in CFG_HI */ | ||
38 | #define DWC_CFGH_FCMODE (1 << 0) | ||
39 | #define DWC_CFGH_FIFO_MODE (1 << 1) | ||
40 | #define DWC_CFGH_PROTCTL(x) ((x) << 2) | ||
41 | #define DWC_CFGH_SRC_PER(x) ((x) << 7) | ||
42 | #define DWC_CFGH_DST_PER(x) ((x) << 11) | ||
43 | |||
44 | /* Platform-configurable bits in CFG_LO */ | ||
45 | #define DWC_CFGL_PRIO(x) ((x) << 5) /* priority */ | ||
46 | #define DWC_CFGL_LOCK_CH_XFER (0 << 12) /* scope of LOCK_CH */ | ||
47 | #define DWC_CFGL_LOCK_CH_BLOCK (1 << 12) | ||
48 | #define DWC_CFGL_LOCK_CH_XACT (2 << 12) | ||
49 | #define DWC_CFGL_LOCK_BUS_XFER (0 << 14) /* scope of LOCK_BUS */ | ||
50 | #define DWC_CFGL_LOCK_BUS_BLOCK (1 << 14) | ||
51 | #define DWC_CFGL_LOCK_BUS_XACT (2 << 14) | ||
52 | #define DWC_CFGL_LOCK_CH (1 << 15) /* channel lockout */ | ||
53 | #define DWC_CFGL_LOCK_BUS (1 << 16) /* busmaster lockout */ | ||
54 | #define DWC_CFGL_HS_DST_POL (1 << 18) /* dst handshake active low */ | ||
55 | #define DWC_CFGL_HS_SRC_POL (1 << 19) /* src handshake active low */ | ||
56 | |||
57 | static inline struct dw_dma_slave *to_dw_dma_slave(struct dma_slave *slave) | ||
58 | { | ||
59 | return container_of(slave, struct dw_dma_slave, slave); | ||
60 | } | ||
61 | |||
62 | #endif /* DW_DMAC_H */ | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index fe56b86f2c67..ac4e678a04ed 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -512,7 +512,7 @@ struct hid_descriptor { | |||
512 | 512 | ||
513 | /* Applications from HID Usage Tables 4/8/99 Version 1.1 */ | 513 | /* Applications from HID Usage Tables 4/8/99 Version 1.1 */ |
514 | /* We ignore a few input applications that are not widely used */ | 514 | /* We ignore a few input applications that are not widely used */ |
515 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001)) | 515 | #define IS_INPUT_APPLICATION(a) (((a >= 0x00010000) && (a <= 0x00010008)) || (a == 0x00010080) || (a == 0x000c0001) || (a == 0x000d0002)) |
516 | 516 | ||
517 | /* HID core API */ | 517 | /* HID core API */ |
518 | 518 | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index 4726126f5a59..d67ccca2b964 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -178,6 +178,7 @@ typedef struct hw_regs_s { | |||
178 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ | 178 | ide_ack_intr_t *ack_intr; /* acknowledge interrupt */ |
179 | hwif_chipset_t chipset; | 179 | hwif_chipset_t chipset; |
180 | struct device *dev, *parent; | 180 | struct device *dev, *parent; |
181 | unsigned long config; | ||
181 | } hw_regs_t; | 182 | } hw_regs_t; |
182 | 183 | ||
183 | void ide_init_port_data(struct hwif_s *, unsigned int); | 184 | void ide_init_port_data(struct hwif_s *, unsigned int); |
@@ -307,7 +308,65 @@ struct ide_acpi_drive_link; | |||
307 | struct ide_acpi_hwif_link; | 308 | struct ide_acpi_hwif_link; |
308 | #endif | 309 | #endif |
309 | 310 | ||
310 | typedef struct ide_drive_s { | 311 | /* ATAPI device flags */ |
312 | enum { | ||
313 | IDE_AFLAG_DRQ_INTERRUPT = (1 << 0), | ||
314 | IDE_AFLAG_MEDIA_CHANGED = (1 << 1), | ||
315 | |||
316 | /* ide-cd */ | ||
317 | /* Drive cannot lock the door. */ | ||
318 | IDE_AFLAG_NO_DOORLOCK = (1 << 2), | ||
319 | /* Drive cannot eject the disc. */ | ||
320 | IDE_AFLAG_NO_EJECT = (1 << 3), | ||
321 | /* Drive is a pre ATAPI 1.2 drive. */ | ||
322 | IDE_AFLAG_PRE_ATAPI12 = (1 << 4), | ||
323 | /* TOC addresses are in BCD. */ | ||
324 | IDE_AFLAG_TOCADDR_AS_BCD = (1 << 5), | ||
325 | /* TOC track numbers are in BCD. */ | ||
326 | IDE_AFLAG_TOCTRACKS_AS_BCD = (1 << 6), | ||
327 | /* | ||
328 | * Drive does not provide data in multiples of SECTOR_SIZE | ||
329 | * when more than one interrupt is needed. | ||
330 | */ | ||
331 | IDE_AFLAG_LIMIT_NFRAMES = (1 << 7), | ||
332 | /* Seeking in progress. */ | ||
333 | IDE_AFLAG_SEEKING = (1 << 8), | ||
334 | /* Saved TOC information is current. */ | ||
335 | IDE_AFLAG_TOC_VALID = (1 << 9), | ||
336 | /* We think that the drive door is locked. */ | ||
337 | IDE_AFLAG_DOOR_LOCKED = (1 << 10), | ||
338 | /* SET_CD_SPEED command is unsupported. */ | ||
339 | IDE_AFLAG_NO_SPEED_SELECT = (1 << 11), | ||
340 | IDE_AFLAG_VERTOS_300_SSD = (1 << 12), | ||
341 | IDE_AFLAG_VERTOS_600_ESD = (1 << 13), | ||
342 | IDE_AFLAG_SANYO_3CD = (1 << 14), | ||
343 | IDE_AFLAG_FULL_CAPS_PAGE = (1 << 15), | ||
344 | IDE_AFLAG_PLAY_AUDIO_OK = (1 << 16), | ||
345 | IDE_AFLAG_LE_SPEED_FIELDS = (1 << 17), | ||
346 | |||
347 | /* ide-floppy */ | ||
348 | /* Format in progress */ | ||
349 | IDE_AFLAG_FORMAT_IN_PROGRESS = (1 << 18), | ||
350 | /* Avoid commands not supported in Clik drive */ | ||
351 | IDE_AFLAG_CLIK_DRIVE = (1 << 19), | ||
352 | /* Requires BH algorithm for packets */ | ||
353 | IDE_AFLAG_ZIP_DRIVE = (1 << 20), | ||
354 | |||
355 | /* ide-tape */ | ||
356 | IDE_AFLAG_IGNORE_DSC = (1 << 21), | ||
357 | /* 0 When the tape position is unknown */ | ||
358 | IDE_AFLAG_ADDRESS_VALID = (1 << 22), | ||
359 | /* Device already opened */ | ||
360 | IDE_AFLAG_BUSY = (1 << 23), | ||
361 | /* Attempt to auto-detect the current user block size */ | ||
362 | IDE_AFLAG_DETECT_BS = (1 << 24), | ||
363 | /* Currently on a filemark */ | ||
364 | IDE_AFLAG_FILEMARK = (1 << 25), | ||
365 | /* 0 = no tape is loaded, so we don't rewind after ejecting */ | ||
366 | IDE_AFLAG_MEDIUM_PRESENT = (1 << 26) | ||
367 | }; | ||
368 | |||
369 | struct ide_drive_s { | ||
311 | char name[4]; /* drive name, such as "hda" */ | 370 | char name[4]; /* drive name, such as "hda" */ |
312 | char driver_req[10]; /* requests specific driver */ | 371 | char driver_req[10]; /* requests specific driver */ |
313 | 372 | ||
@@ -355,7 +414,6 @@ typedef struct ide_drive_s { | |||
355 | unsigned nodma : 1; /* disallow DMA */ | 414 | unsigned nodma : 1; /* disallow DMA */ |
356 | unsigned remap_0_to_1 : 1; /* 0=noremap, 1=remap 0->1 (for EZDrive) */ | 415 | unsigned remap_0_to_1 : 1; /* 0=noremap, 1=remap 0->1 (for EZDrive) */ |
357 | unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */ | 416 | unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */ |
358 | unsigned vdma : 1; /* 1=doing PIO over DMA 0=doing normal DMA */ | ||
359 | unsigned scsi : 1; /* 0=default, 1=ide-scsi emulation */ | 417 | unsigned scsi : 1; /* 0=default, 1=ide-scsi emulation */ |
360 | unsigned sleeping : 1; /* 1=sleeping & sleep field valid */ | 418 | unsigned sleeping : 1; /* 1=sleeping & sleep field valid */ |
361 | unsigned post_reset : 1; | 419 | unsigned post_reset : 1; |
@@ -400,7 +458,14 @@ typedef struct ide_drive_s { | |||
400 | struct list_head list; | 458 | struct list_head list; |
401 | struct device gendev; | 459 | struct device gendev; |
402 | struct completion gendev_rel_comp; /* to deal with device release() */ | 460 | struct completion gendev_rel_comp; /* to deal with device release() */ |
403 | } ide_drive_t; | 461 | |
462 | /* callback for packet commands */ | ||
463 | void (*pc_callback)(struct ide_drive_s *); | ||
464 | |||
465 | unsigned long atapi_flags; | ||
466 | }; | ||
467 | |||
468 | typedef struct ide_drive_s ide_drive_t; | ||
404 | 469 | ||
405 | #define to_ide_device(dev)container_of(dev, ide_drive_t, gendev) | 470 | #define to_ide_device(dev)container_of(dev, ide_drive_t, gendev) |
406 | 471 | ||
@@ -408,8 +473,28 @@ typedef struct ide_drive_s { | |||
408 | ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) | 473 | ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) |
409 | #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) | 474 | #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) |
410 | 475 | ||
476 | struct ide_task_s; | ||
411 | struct ide_port_info; | 477 | struct ide_port_info; |
412 | 478 | ||
479 | struct ide_tp_ops { | ||
480 | void (*exec_command)(struct hwif_s *, u8); | ||
481 | u8 (*read_status)(struct hwif_s *); | ||
482 | u8 (*read_altstatus)(struct hwif_s *); | ||
483 | u8 (*read_sff_dma_status)(struct hwif_s *); | ||
484 | |||
485 | void (*set_irq)(struct hwif_s *, int); | ||
486 | |||
487 | void (*tf_load)(ide_drive_t *, struct ide_task_s *); | ||
488 | void (*tf_read)(ide_drive_t *, struct ide_task_s *); | ||
489 | |||
490 | void (*input_data)(ide_drive_t *, struct request *, void *, | ||
491 | unsigned int); | ||
492 | void (*output_data)(ide_drive_t *, struct request *, void *, | ||
493 | unsigned int); | ||
494 | }; | ||
495 | |||
496 | extern const struct ide_tp_ops default_tp_ops; | ||
497 | |||
413 | struct ide_port_ops { | 498 | struct ide_port_ops { |
414 | /* host specific initialization of a device */ | 499 | /* host specific initialization of a device */ |
415 | void (*init_dev)(ide_drive_t *); | 500 | void (*init_dev)(ide_drive_t *); |
@@ -447,8 +532,6 @@ struct ide_dma_ops { | |||
447 | void (*dma_timeout)(struct ide_drive_s *); | 532 | void (*dma_timeout)(struct ide_drive_s *); |
448 | }; | 533 | }; |
449 | 534 | ||
450 | struct ide_task_s; | ||
451 | |||
452 | typedef struct hwif_s { | 535 | typedef struct hwif_s { |
453 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ | 536 | struct hwif_s *next; /* for linked-list in ide_hwgroup_t */ |
454 | struct hwif_s *mate; /* other hwif from same PCI chip */ | 537 | struct hwif_s *mate; /* other hwif from same PCI chip */ |
@@ -486,22 +569,12 @@ typedef struct hwif_s { | |||
486 | 569 | ||
487 | void (*rw_disk)(ide_drive_t *, struct request *); | 570 | void (*rw_disk)(ide_drive_t *, struct request *); |
488 | 571 | ||
572 | const struct ide_tp_ops *tp_ops; | ||
489 | const struct ide_port_ops *port_ops; | 573 | const struct ide_port_ops *port_ops; |
490 | const struct ide_dma_ops *dma_ops; | 574 | const struct ide_dma_ops *dma_ops; |
491 | 575 | ||
492 | void (*tf_load)(ide_drive_t *, struct ide_task_s *); | ||
493 | void (*tf_read)(ide_drive_t *, struct ide_task_s *); | ||
494 | |||
495 | void (*input_data)(ide_drive_t *, struct request *, void *, unsigned); | ||
496 | void (*output_data)(ide_drive_t *, struct request *, void *, unsigned); | ||
497 | |||
498 | void (*ide_dma_clear_irq)(ide_drive_t *drive); | 576 | void (*ide_dma_clear_irq)(ide_drive_t *drive); |
499 | 577 | ||
500 | void (*OUTB)(u8 addr, unsigned long port); | ||
501 | void (*OUTBSYNC)(struct hwif_s *hwif, u8 addr, unsigned long port); | ||
502 | |||
503 | u8 (*INB)(unsigned long port); | ||
504 | |||
505 | /* dma physical region descriptor table (cpu view) */ | 578 | /* dma physical region descriptor table (cpu view) */ |
506 | unsigned int *dmatable_cpu; | 579 | unsigned int *dmatable_cpu; |
507 | /* dma physical region descriptor table (dma view) */ | 580 | /* dma physical region descriptor table (dma view) */ |
@@ -524,8 +597,6 @@ typedef struct hwif_s { | |||
524 | int irq; /* our irq number */ | 597 | int irq; /* our irq number */ |
525 | 598 | ||
526 | unsigned long dma_base; /* base addr for dma ports */ | 599 | unsigned long dma_base; /* base addr for dma ports */ |
527 | unsigned long dma_command; /* dma command register */ | ||
528 | unsigned long dma_status; /* dma status register */ | ||
529 | 600 | ||
530 | unsigned long config_data; /* for use by chipset-specific code */ | 601 | unsigned long config_data; /* for use by chipset-specific code */ |
531 | unsigned long select_data; /* for use by chipset-specific code */ | 602 | unsigned long select_data; /* for use by chipset-specific code */ |
@@ -552,6 +623,11 @@ typedef struct hwif_s { | |||
552 | #endif | 623 | #endif |
553 | } ____cacheline_internodealigned_in_smp ide_hwif_t; | 624 | } ____cacheline_internodealigned_in_smp ide_hwif_t; |
554 | 625 | ||
626 | struct ide_host { | ||
627 | ide_hwif_t *ports[MAX_HWIFS]; | ||
628 | unsigned int n_ports; | ||
629 | }; | ||
630 | |||
555 | /* | 631 | /* |
556 | * internal ide interrupt handler type | 632 | * internal ide interrupt handler type |
557 | */ | 633 | */ |
@@ -611,8 +687,6 @@ enum { | |||
611 | PC_FLAG_WRITING = (1 << 6), | 687 | PC_FLAG_WRITING = (1 << 6), |
612 | /* command timed out */ | 688 | /* command timed out */ |
613 | PC_FLAG_TIMEDOUT = (1 << 7), | 689 | PC_FLAG_TIMEDOUT = (1 << 7), |
614 | PC_FLAG_ZIP_DRIVE = (1 << 8), | ||
615 | PC_FLAG_DRQ_INTERRUPT = (1 << 9), | ||
616 | }; | 690 | }; |
617 | 691 | ||
618 | struct ide_atapi_pc { | 692 | struct ide_atapi_pc { |
@@ -646,8 +720,6 @@ struct ide_atapi_pc { | |||
646 | */ | 720 | */ |
647 | u8 pc_buf[256]; | 721 | u8 pc_buf[256]; |
648 | 722 | ||
649 | void (*callback)(ide_drive_t *); | ||
650 | |||
651 | /* idetape only */ | 723 | /* idetape only */ |
652 | struct idetape_bh *bh; | 724 | struct idetape_bh *bh; |
653 | char *b_data; | 725 | char *b_data; |
@@ -807,13 +879,6 @@ int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsig | |||
807 | extern int ide_vlb_clk; | 879 | extern int ide_vlb_clk; |
808 | extern int ide_pci_clk; | 880 | extern int ide_pci_clk; |
809 | 881 | ||
810 | ide_hwif_t *ide_find_port_slot(const struct ide_port_info *); | ||
811 | |||
812 | static inline ide_hwif_t *ide_find_port(void) | ||
813 | { | ||
814 | return ide_find_port_slot(NULL); | ||
815 | } | ||
816 | |||
817 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); | 882 | extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); |
818 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, | 883 | int ide_end_dequeued_request(ide_drive_t *drive, struct request *rq, |
819 | int uptodate, int nr_sectors); | 884 | int uptodate, int nr_sectors); |
@@ -884,6 +949,7 @@ enum { | |||
884 | IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_FEATURE | | 949 | IDE_TFLAG_IN_HOB = IDE_TFLAG_IN_HOB_FEATURE | |
885 | IDE_TFLAG_IN_HOB_NSECT | | 950 | IDE_TFLAG_IN_HOB_NSECT | |
886 | IDE_TFLAG_IN_HOB_LBA, | 951 | IDE_TFLAG_IN_HOB_LBA, |
952 | IDE_TFLAG_IN_FEATURE = (1 << 1), | ||
887 | IDE_TFLAG_IN_NSECT = (1 << 25), | 953 | IDE_TFLAG_IN_NSECT = (1 << 25), |
888 | IDE_TFLAG_IN_LBAL = (1 << 26), | 954 | IDE_TFLAG_IN_LBAL = (1 << 26), |
889 | IDE_TFLAG_IN_LBAM = (1 << 27), | 955 | IDE_TFLAG_IN_LBAM = (1 << 27), |
@@ -948,9 +1014,25 @@ typedef struct ide_task_s { | |||
948 | 1014 | ||
949 | void ide_tf_dump(const char *, struct ide_taskfile *); | 1015 | void ide_tf_dump(const char *, struct ide_taskfile *); |
950 | 1016 | ||
1017 | void ide_exec_command(ide_hwif_t *, u8); | ||
1018 | u8 ide_read_status(ide_hwif_t *); | ||
1019 | u8 ide_read_altstatus(ide_hwif_t *); | ||
1020 | u8 ide_read_sff_dma_status(ide_hwif_t *); | ||
1021 | |||
1022 | void ide_set_irq(ide_hwif_t *, int); | ||
1023 | |||
1024 | void ide_tf_load(ide_drive_t *, ide_task_t *); | ||
1025 | void ide_tf_read(ide_drive_t *, ide_task_t *); | ||
1026 | |||
1027 | void ide_input_data(ide_drive_t *, struct request *, void *, unsigned int); | ||
1028 | void ide_output_data(ide_drive_t *, struct request *, void *, unsigned int); | ||
1029 | |||
951 | extern void SELECT_DRIVE(ide_drive_t *); | 1030 | extern void SELECT_DRIVE(ide_drive_t *); |
952 | void SELECT_MASK(ide_drive_t *, int); | 1031 | void SELECT_MASK(ide_drive_t *, int); |
953 | 1032 | ||
1033 | u8 ide_read_error(ide_drive_t *); | ||
1034 | void ide_read_bcount_and_ireason(ide_drive_t *, u16 *, u8 *); | ||
1035 | |||
954 | extern int drive_is_ready(ide_drive_t *); | 1036 | extern int drive_is_ready(ide_drive_t *); |
955 | 1037 | ||
956 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); | 1038 | void ide_pktcmd_tf_load(ide_drive_t *, u32, u16, u8); |
@@ -1000,12 +1082,15 @@ extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *o | |||
1000 | #define ide_pci_register_driver(d) pci_register_driver(d) | 1082 | #define ide_pci_register_driver(d) pci_register_driver(d) |
1001 | #endif | 1083 | #endif |
1002 | 1084 | ||
1003 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, u8 *); | 1085 | void ide_pci_setup_ports(struct pci_dev *, const struct ide_port_info *, int, |
1086 | hw_regs_t *, hw_regs_t **); | ||
1004 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); | 1087 | void ide_setup_pci_noise(struct pci_dev *, const struct ide_port_info *); |
1005 | 1088 | ||
1006 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI | 1089 | #ifdef CONFIG_BLK_DEV_IDEDMA_PCI |
1007 | int ide_pci_set_master(struct pci_dev *, const char *); | 1090 | int ide_pci_set_master(struct pci_dev *, const char *); |
1008 | unsigned long ide_pci_dma_base(ide_hwif_t *, const struct ide_port_info *); | 1091 | unsigned long ide_pci_dma_base(ide_hwif_t *, const struct ide_port_info *); |
1092 | extern const struct ide_dma_ops sff_dma_ops; | ||
1093 | int ide_pci_check_simplex(ide_hwif_t *, const struct ide_port_info *); | ||
1009 | int ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); | 1094 | int ide_hwif_setup_dma(ide_hwif_t *, const struct ide_port_info *); |
1010 | #else | 1095 | #else |
1011 | static inline int ide_hwif_setup_dma(ide_hwif_t *hwif, | 1096 | static inline int ide_hwif_setup_dma(ide_hwif_t *hwif, |
@@ -1015,10 +1100,6 @@ static inline int ide_hwif_setup_dma(ide_hwif_t *hwif, | |||
1015 | } | 1100 | } |
1016 | #endif | 1101 | #endif |
1017 | 1102 | ||
1018 | extern void default_hwif_iops(ide_hwif_t *); | ||
1019 | extern void default_hwif_mmiops(ide_hwif_t *); | ||
1020 | extern void default_hwif_transport(ide_hwif_t *); | ||
1021 | |||
1022 | typedef struct ide_pci_enablebit_s { | 1103 | typedef struct ide_pci_enablebit_s { |
1023 | u8 reg; /* byte pci reg holding the enable-bit */ | 1104 | u8 reg; /* byte pci reg holding the enable-bit */ |
1024 | u8 mask; /* mask to isolate the enable-bit */ | 1105 | u8 mask; /* mask to isolate the enable-bit */ |
@@ -1081,7 +1162,6 @@ enum { | |||
1081 | IDE_HFLAG_IO_32BIT = (1 << 24), | 1162 | IDE_HFLAG_IO_32BIT = (1 << 24), |
1082 | /* unmask IRQs */ | 1163 | /* unmask IRQs */ |
1083 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), | 1164 | IDE_HFLAG_UNMASK_IRQS = (1 << 25), |
1084 | IDE_HFLAG_ABUSE_SET_DMA_MODE = (1 << 26), | ||
1085 | /* serialize ports if DMA is possible (for sl82c105) */ | 1165 | /* serialize ports if DMA is possible (for sl82c105) */ |
1086 | IDE_HFLAG_SERIALIZE_DMA = (1 << 27), | 1166 | IDE_HFLAG_SERIALIZE_DMA = (1 << 27), |
1087 | /* force host out of "simplex" mode */ | 1167 | /* force host out of "simplex" mode */ |
@@ -1092,8 +1172,6 @@ enum { | |||
1092 | IDE_HFLAG_NO_IO_32BIT = (1 << 30), | 1172 | IDE_HFLAG_NO_IO_32BIT = (1 << 30), |
1093 | /* never unmask IRQs */ | 1173 | /* never unmask IRQs */ |
1094 | IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31), | 1174 | IDE_HFLAG_NO_UNMASK_IRQS = (1 << 31), |
1095 | /* host uses VDMA (disabled for now) */ | ||
1096 | IDE_HFLAG_VDMA = 0, | ||
1097 | }; | 1175 | }; |
1098 | 1176 | ||
1099 | #ifdef CONFIG_BLK_DEV_OFFBOARD | 1177 | #ifdef CONFIG_BLK_DEV_OFFBOARD |
@@ -1110,6 +1188,7 @@ struct ide_port_info { | |||
1110 | int (*init_dma)(ide_hwif_t *, | 1188 | int (*init_dma)(ide_hwif_t *, |
1111 | const struct ide_port_info *); | 1189 | const struct ide_port_info *); |
1112 | 1190 | ||
1191 | const struct ide_tp_ops *tp_ops; | ||
1113 | const struct ide_port_ops *port_ops; | 1192 | const struct ide_port_ops *port_ops; |
1114 | const struct ide_dma_ops *dma_ops; | 1193 | const struct ide_dma_ops *dma_ops; |
1115 | 1194 | ||
@@ -1163,7 +1242,6 @@ void ide_destroy_dmatable(ide_drive_t *); | |||
1163 | extern int ide_build_dmatable(ide_drive_t *, struct request *); | 1242 | extern int ide_build_dmatable(ide_drive_t *, struct request *); |
1164 | int ide_allocate_dma_engine(ide_hwif_t *); | 1243 | int ide_allocate_dma_engine(ide_hwif_t *); |
1165 | void ide_release_dma_engine(ide_hwif_t *); | 1244 | void ide_release_dma_engine(ide_hwif_t *); |
1166 | void ide_setup_dma(ide_hwif_t *, unsigned long); | ||
1167 | 1245 | ||
1168 | void ide_dma_host_set(ide_drive_t *, int); | 1246 | void ide_dma_host_set(ide_drive_t *, int); |
1169 | extern int ide_dma_setup(ide_drive_t *); | 1247 | extern int ide_dma_setup(ide_drive_t *); |
@@ -1217,8 +1295,14 @@ void ide_undecoded_slave(ide_drive_t *); | |||
1217 | 1295 | ||
1218 | void ide_port_apply_params(ide_hwif_t *); | 1296 | void ide_port_apply_params(ide_hwif_t *); |
1219 | 1297 | ||
1220 | int ide_device_add_all(u8 *idx, const struct ide_port_info *); | 1298 | struct ide_host *ide_host_alloc_all(const struct ide_port_info *, hw_regs_t **); |
1221 | int ide_device_add(u8 idx[4], const struct ide_port_info *); | 1299 | struct ide_host *ide_host_alloc(const struct ide_port_info *, hw_regs_t **); |
1300 | void ide_host_free(struct ide_host *); | ||
1301 | int ide_host_register(struct ide_host *, const struct ide_port_info *, | ||
1302 | hw_regs_t **); | ||
1303 | int ide_host_add(const struct ide_port_info *, hw_regs_t **, | ||
1304 | struct ide_host **); | ||
1305 | void ide_host_remove(struct ide_host *); | ||
1222 | int ide_legacy_device_add(const struct ide_port_info *, unsigned long); | 1306 | int ide_legacy_device_add(const struct ide_port_info *, unsigned long); |
1223 | void ide_port_unregister_devices(ide_hwif_t *); | 1307 | void ide_port_unregister_devices(ide_hwif_t *); |
1224 | void ide_port_scan(ide_hwif_t *); | 1308 | void ide_port_scan(ide_hwif_t *); |
@@ -1350,33 +1434,4 @@ static inline ide_drive_t *ide_get_paired_drive(ide_drive_t *drive) | |||
1350 | 1434 | ||
1351 | return &hwif->drives[(drive->dn ^ 1) & 1]; | 1435 | return &hwif->drives[(drive->dn ^ 1) & 1]; |
1352 | } | 1436 | } |
1353 | |||
1354 | static inline void ide_set_irq(ide_drive_t *drive, int on) | ||
1355 | { | ||
1356 | ide_hwif_t *hwif = drive->hwif; | ||
1357 | |||
1358 | hwif->OUTBSYNC(hwif, ATA_DEVCTL_OBS | (on ? 0 : 2), | ||
1359 | hwif->io_ports.ctl_addr); | ||
1360 | } | ||
1361 | |||
1362 | static inline u8 ide_read_status(ide_drive_t *drive) | ||
1363 | { | ||
1364 | ide_hwif_t *hwif = drive->hwif; | ||
1365 | |||
1366 | return hwif->INB(hwif->io_ports.status_addr); | ||
1367 | } | ||
1368 | |||
1369 | static inline u8 ide_read_altstatus(ide_drive_t *drive) | ||
1370 | { | ||
1371 | ide_hwif_t *hwif = drive->hwif; | ||
1372 | |||
1373 | return hwif->INB(hwif->io_ports.ctl_addr); | ||
1374 | } | ||
1375 | |||
1376 | static inline u8 ide_read_error(ide_drive_t *drive) | ||
1377 | { | ||
1378 | ide_hwif_t *hwif = drive->hwif; | ||
1379 | |||
1380 | return hwif->INB(hwif->io_ports.error_addr); | ||
1381 | } | ||
1382 | #endif /* _IDE_H */ | 1437 | #endif /* _IDE_H */ |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h new file mode 100644 index 000000000000..bb3dd0545928 --- /dev/null +++ b/include/linux/mfd/core.h | |||
@@ -0,0 +1,55 @@ | |||
1 | #ifndef MFD_CORE_H | ||
2 | #define MFD_CORE_H | ||
3 | /* | ||
4 | * drivers/mfd/mfd-core.h | ||
5 | * | ||
6 | * core MFD support | ||
7 | * Copyright (c) 2006 Ian Molton | ||
8 | * Copyright (c) 2007 Dmitry Baryshkov | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #include <linux/platform_device.h> | ||
17 | |||
18 | /* | ||
19 | * This struct describes the MFD part ("cell"). | ||
20 | * After registration the copy of this structure will become the platform data | ||
21 | * of the resulting platform_device | ||
22 | */ | ||
23 | struct mfd_cell { | ||
24 | const char *name; | ||
25 | |||
26 | int (*enable)(struct platform_device *dev); | ||
27 | int (*disable)(struct platform_device *dev); | ||
28 | int (*suspend)(struct platform_device *dev); | ||
29 | int (*resume)(struct platform_device *dev); | ||
30 | |||
31 | void *driver_data; /* driver-specific data */ | ||
32 | |||
33 | /* | ||
34 | * This resources can be specified relatievly to the parent device. | ||
35 | * For accessing device you should use resources from device | ||
36 | */ | ||
37 | int num_resources; | ||
38 | const struct resource *resources; | ||
39 | }; | ||
40 | |||
41 | static inline struct mfd_cell * | ||
42 | mfd_get_cell(struct platform_device *pdev) | ||
43 | { | ||
44 | return (struct mfd_cell *)pdev->dev.platform_data; | ||
45 | } | ||
46 | |||
47 | extern int mfd_add_devices( | ||
48 | struct platform_device *parent, | ||
49 | const struct mfd_cell *cells, int n_devs, | ||
50 | struct resource *mem_base, | ||
51 | int irq_base); | ||
52 | |||
53 | extern void mfd_remove_devices(struct platform_device *parent); | ||
54 | |||
55 | #endif | ||
diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h new file mode 100644 index 000000000000..7cc824a58f7c --- /dev/null +++ b/include/linux/mfd/tc6393xb.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * Toshiba TC6393XB SoC support | ||
3 | * | ||
4 | * Copyright(c) 2005-2006 Chris Humbert | ||
5 | * Copyright(c) 2005 Dirk Opfer | ||
6 | * Copyright(c) 2005 Ian Molton <spyro@f2s.com> | ||
7 | * Copyright(c) 2007 Dmitry Baryshkov | ||
8 | * | ||
9 | * Based on code written by Sharp/Lineo for 2.4 kernels | ||
10 | * Based on locomo.c | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #ifndef TC6393XB_H | ||
18 | #define TC6393XB_H | ||
19 | |||
20 | /* Also one should provide the CK3P6MI clock */ | ||
21 | struct tc6393xb_platform_data { | ||
22 | u16 scr_pll2cr; /* PLL2 Control */ | ||
23 | u16 scr_gper; /* GP Enable */ | ||
24 | u32 scr_gpo_doecr; /* GPO Data OE Control */ | ||
25 | u32 scr_gpo_dsr; /* GPO Data Set */ | ||
26 | |||
27 | int (*enable)(struct platform_device *dev); | ||
28 | int (*disable)(struct platform_device *dev); | ||
29 | int (*suspend)(struct platform_device *dev); | ||
30 | int (*resume)(struct platform_device *dev); | ||
31 | |||
32 | int irq_base; /* a base for cascaded irq */ | ||
33 | int gpio_base; | ||
34 | |||
35 | struct tmio_nand_data *nand_data; | ||
36 | }; | ||
37 | |||
38 | /* | ||
39 | * Relative to irq_base | ||
40 | */ | ||
41 | #define IRQ_TC6393_NAND 0 | ||
42 | #define IRQ_TC6393_MMC 1 | ||
43 | #define IRQ_TC6393_OHCI 2 | ||
44 | #define IRQ_TC6393_SERIAL 3 | ||
45 | #define IRQ_TC6393_FB 4 | ||
46 | |||
47 | #define TC6393XB_NR_IRQS 8 | ||
48 | |||
49 | #endif | ||
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h new file mode 100644 index 000000000000..9438d8c9ac1c --- /dev/null +++ b/include/linux/mfd/tmio.h | |||
@@ -0,0 +1,17 @@ | |||
1 | #ifndef MFD_TMIO_H | ||
2 | #define MFD_TMIO_H | ||
3 | |||
4 | /* | ||
5 | * data for the NAND controller | ||
6 | */ | ||
7 | struct tmio_nand_data { | ||
8 | struct nand_bbt_descr *badblock_pattern; | ||
9 | struct mtd_partition *partition; | ||
10 | unsigned int num_partitions; | ||
11 | }; | ||
12 | |||
13 | #define TMIO_NAND_CONFIG "tmio-nand-config" | ||
14 | #define TMIO_NAND_CONTROL "tmio-nand-control" | ||
15 | #define TMIO_NAND_IRQ "tmio-nand" | ||
16 | |||
17 | #endif | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d8507eb394cf..119ae7b8f028 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2371,6 +2371,14 @@ | |||
2371 | #define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916 | 2371 | #define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916 |
2372 | #define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918 | 2372 | #define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918 |
2373 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2373 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2374 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG4 0x3429 | ||
2375 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG5 0x342a | ||
2376 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG6 0x342b | ||
2377 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG7 0x342c | ||
2378 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG0 0x3430 | ||
2379 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG1 0x3431 | ||
2380 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG2 0x3432 | ||
2381 | #define PCI_DEVICE_ID_INTEL_IOAT_TBG3 0x3433 | ||
2374 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2382 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2375 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2383 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
2376 | #define PCI_DEVICE_ID_INTEL_82855GM_HB 0x3580 | 2384 | #define PCI_DEVICE_ID_INTEL_82855GM_HB 0x3580 |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 71fc81360048..e5996984ddd0 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -224,4 +224,42 @@ size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, | |||
224 | */ | 224 | */ |
225 | #define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) | 225 | #define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) |
226 | 226 | ||
227 | |||
228 | /* | ||
229 | * Mapping sg iterator | ||
230 | * | ||
231 | * Iterates over sg entries mapping page-by-page. On each successful | ||
232 | * iteration, @miter->page points to the mapped page and | ||
233 | * @miter->length bytes of data can be accessed at @miter->addr. As | ||
234 | * long as an interation is enclosed between start and stop, the user | ||
235 | * is free to choose control structure and when to stop. | ||
236 | * | ||
237 | * @miter->consumed is set to @miter->length on each iteration. It | ||
238 | * can be adjusted if the user can't consume all the bytes in one go. | ||
239 | * Also, a stopped iteration can be resumed by calling next on it. | ||
240 | * This is useful when iteration needs to release all resources and | ||
241 | * continue later (e.g. at the next interrupt). | ||
242 | */ | ||
243 | |||
244 | #define SG_MITER_ATOMIC (1 << 0) /* use kmap_atomic */ | ||
245 | |||
246 | struct sg_mapping_iter { | ||
247 | /* the following three fields can be accessed directly */ | ||
248 | struct page *page; /* currently mapped page */ | ||
249 | void *addr; /* pointer to the mapped area */ | ||
250 | size_t length; /* length of the mapped area */ | ||
251 | size_t consumed; /* number of consumed bytes */ | ||
252 | |||
253 | /* these are internal states, keep away */ | ||
254 | struct scatterlist *__sg; /* current entry */ | ||
255 | unsigned int __nents; /* nr of remaining entries */ | ||
256 | unsigned int __offset; /* offset within sg */ | ||
257 | unsigned int __flags; | ||
258 | }; | ||
259 | |||
260 | void sg_miter_start(struct sg_mapping_iter *miter, struct scatterlist *sgl, | ||
261 | unsigned int nents, unsigned int flags); | ||
262 | bool sg_miter_next(struct sg_mapping_iter *miter); | ||
263 | void sg_miter_stop(struct sg_mapping_iter *miter); | ||
264 | |||
227 | #endif /* _LINUX_SCATTERLIST_H */ | 265 | #endif /* _LINUX_SCATTERLIST_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 1941d8b5cf11..dc7e592c473a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -295,10 +295,11 @@ extern void softlockup_tick(void); | |||
295 | extern void spawn_softlockup_task(void); | 295 | extern void spawn_softlockup_task(void); |
296 | extern void touch_softlockup_watchdog(void); | 296 | extern void touch_softlockup_watchdog(void); |
297 | extern void touch_all_softlockup_watchdogs(void); | 297 | extern void touch_all_softlockup_watchdogs(void); |
298 | extern unsigned long softlockup_thresh; | 298 | extern unsigned int softlockup_panic; |
299 | extern unsigned long sysctl_hung_task_check_count; | 299 | extern unsigned long sysctl_hung_task_check_count; |
300 | extern unsigned long sysctl_hung_task_timeout_secs; | 300 | extern unsigned long sysctl_hung_task_timeout_secs; |
301 | extern unsigned long sysctl_hung_task_warnings; | 301 | extern unsigned long sysctl_hung_task_warnings; |
302 | extern int softlockup_thresh; | ||
302 | #else | 303 | #else |
303 | static inline void softlockup_tick(void) | 304 | static inline void softlockup_tick(void) |
304 | { | 305 | { |
@@ -824,7 +825,16 @@ extern void partition_sched_domains(int ndoms_new, cpumask_t *doms_new, | |||
824 | struct sched_domain_attr *dattr_new); | 825 | struct sched_domain_attr *dattr_new); |
825 | extern int arch_reinit_sched_domains(void); | 826 | extern int arch_reinit_sched_domains(void); |
826 | 827 | ||
827 | #endif /* CONFIG_SMP */ | 828 | #else /* CONFIG_SMP */ |
829 | |||
830 | struct sched_domain_attr; | ||
831 | |||
832 | static inline void | ||
833 | partition_sched_domains(int ndoms_new, cpumask_t *doms_new, | ||
834 | struct sched_domain_attr *dattr_new) | ||
835 | { | ||
836 | } | ||
837 | #endif /* !CONFIG_SMP */ | ||
828 | 838 | ||
829 | struct io_context; /* See blkdev.h */ | 839 | struct io_context; /* See blkdev.h */ |
830 | #define NGROUPS_SMALL 32 | 840 | #define NGROUPS_SMALL 32 |
diff --git a/include/linux/smc91x.h b/include/linux/smc91x.h index 8e0556b8781c..3827b922ba1f 100644 --- a/include/linux/smc91x.h +++ b/include/linux/smc91x.h | |||
@@ -5,9 +5,19 @@ | |||
5 | #define SMC91X_USE_16BIT (1 << 1) | 5 | #define SMC91X_USE_16BIT (1 << 1) |
6 | #define SMC91X_USE_32BIT (1 << 2) | 6 | #define SMC91X_USE_32BIT (1 << 2) |
7 | 7 | ||
8 | #define SMC91X_NOWAIT (1 << 3) | ||
9 | |||
10 | /* two bits for IO_SHIFT, let's hope later designs will keep this sane */ | ||
11 | #define SMC91X_IO_SHIFT_0 (0 << 4) | ||
12 | #define SMC91X_IO_SHIFT_1 (1 << 4) | ||
13 | #define SMC91X_IO_SHIFT_2 (2 << 4) | ||
14 | #define SMC91X_IO_SHIFT_3 (3 << 4) | ||
15 | #define SMC91X_IO_SHIFT(x) (((x) >> 4) & 0x3) | ||
16 | |||
17 | #define SMC91X_USE_DMA (1 << 6) | ||
18 | |||
8 | struct smc91x_platdata { | 19 | struct smc91x_platdata { |
9 | unsigned long flags; | 20 | unsigned long flags; |
10 | unsigned long irq_flags; /* IRQF_... */ | ||
11 | }; | 21 | }; |
12 | 22 | ||
13 | #endif /* __SMC91X_H__ */ | 23 | #endif /* __SMC91X_H__ */ |