diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-03-24 02:17:25 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-24 02:17:25 -0400 |
commit | a3d3362287fbe96fe90abdb5c6d1a35471129a8c (patch) | |
tree | ad3c85ed1feef470c66599eb514e30f43c2db5dd /arch | |
parent | fb7f045ace0624f1e59a7db8497e460bd54b1cbc (diff) | |
parent | 4bbba111d94781d34081c37856bbc5eb33f6c72a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
Diffstat (limited to 'arch')
97 files changed, 576 insertions, 380 deletions
diff --git a/arch/alpha/include/asm/types.h b/arch/alpha/include/asm/types.h index bd621ecd1eb3..e46e50382d28 100644 --- a/arch/alpha/include/asm/types.h +++ b/arch/alpha/include/asm/types.h | |||
@@ -27,7 +27,6 @@ typedef unsigned int umode_t; | |||
27 | #ifdef __KERNEL__ | 27 | #ifdef __KERNEL__ |
28 | #ifndef __ASSEMBLY__ | 28 | #ifndef __ASSEMBLY__ |
29 | 29 | ||
30 | typedef u64 dma_addr_t; | ||
31 | typedef u64 dma64_addr_t; | 30 | typedef u64 dma64_addr_t; |
32 | 31 | ||
33 | #endif /* __ASSEMBLY__ */ | 32 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/arm/include/asm/types.h b/arch/arm/include/asm/types.h index 345df01534a4..c684e3769f47 100644 --- a/arch/arm/include/asm/types.h +++ b/arch/arm/include/asm/types.h | |||
@@ -18,9 +18,6 @@ typedef unsigned short umode_t; | |||
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | /* Dma addresses are 32-bits wide. */ | ||
22 | |||
23 | typedef u32 dma_addr_t; | ||
24 | typedef u32 dma64_addr_t; | 21 | typedef u32 dma64_addr_t; |
25 | 22 | ||
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/arm/mach-mmp/include/mach/mmp2.h b/arch/arm/mach-mmp/include/mach/mmp2.h index 4aec493640b4..2cbf6df09b82 100644 --- a/arch/arm/mach-mmp/include/mach/mmp2.h +++ b/arch/arm/mach-mmp/include/mach/mmp2.h | |||
@@ -11,8 +11,8 @@ extern void __init mmp2_init_irq(void); | |||
11 | extern void mmp2_clear_pmic_int(void); | 11 | extern void mmp2_clear_pmic_int(void); |
12 | 12 | ||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/i2c/pxa-i2c.h> | ||
14 | #include <mach/devices.h> | 15 | #include <mach/devices.h> |
15 | #include <plat/i2c.h> | ||
16 | 16 | ||
17 | extern struct pxa_device_desc mmp2_device_uart1; | 17 | extern struct pxa_device_desc mmp2_device_uart1; |
18 | extern struct pxa_device_desc mmp2_device_uart2; | 18 | extern struct pxa_device_desc mmp2_device_uart2; |
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h index 1801e4206232..a52b3d2f325c 100644 --- a/arch/arm/mach-mmp/include/mach/pxa168.h +++ b/arch/arm/mach-mmp/include/mach/pxa168.h | |||
@@ -8,8 +8,8 @@ extern void __init pxa168_init_irq(void); | |||
8 | extern void pxa168_clear_keypad_wakeup(void); | 8 | extern void pxa168_clear_keypad_wakeup(void); |
9 | 9 | ||
10 | #include <linux/i2c.h> | 10 | #include <linux/i2c.h> |
11 | #include <linux/i2c/pxa-i2c.h> | ||
11 | #include <mach/devices.h> | 12 | #include <mach/devices.h> |
12 | #include <plat/i2c.h> | ||
13 | #include <plat/pxa3xx_nand.h> | 13 | #include <plat/pxa3xx_nand.h> |
14 | #include <video/pxa168fb.h> | 14 | #include <video/pxa168fb.h> |
15 | #include <plat/pxa27x_keypad.h> | 15 | #include <plat/pxa27x_keypad.h> |
diff --git a/arch/arm/mach-mmp/include/mach/pxa910.h b/arch/arm/mach-mmp/include/mach/pxa910.h index f13c49d6f8dc..91be75591398 100644 --- a/arch/arm/mach-mmp/include/mach/pxa910.h +++ b/arch/arm/mach-mmp/include/mach/pxa910.h | |||
@@ -7,8 +7,8 @@ extern struct sys_timer pxa910_timer; | |||
7 | extern void __init pxa910_init_irq(void); | 7 | extern void __init pxa910_init_irq(void); |
8 | 8 | ||
9 | #include <linux/i2c.h> | 9 | #include <linux/i2c.h> |
10 | #include <linux/i2c/pxa-i2c.h> | ||
10 | #include <mach/devices.h> | 11 | #include <mach/devices.h> |
11 | #include <plat/i2c.h> | ||
12 | #include <plat/pxa3xx_nand.h> | 12 | #include <plat/pxa3xx_nand.h> |
13 | 13 | ||
14 | extern struct pxa_device_desc pxa910_device_uart1; | 14 | extern struct pxa_device_desc pxa910_device_uart1; |
diff --git a/arch/arm/mach-mxs/include/mach/dma.h b/arch/arm/mach-mxs/include/mach/dma.h new file mode 100644 index 000000000000..7f4aeeaba8df --- /dev/null +++ b/arch/arm/mach-mxs/include/mach/dma.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * Copyright 2011 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef __MACH_MXS_DMA_H__ | ||
10 | #define __MACH_MXS_DMA_H__ | ||
11 | |||
12 | struct mxs_dma_data { | ||
13 | int chan_irq; | ||
14 | }; | ||
15 | |||
16 | static inline int mxs_dma_is_apbh(struct dma_chan *chan) | ||
17 | { | ||
18 | return !strcmp(dev_name(chan->device->dev), "mxs-dma-apbh"); | ||
19 | } | ||
20 | |||
21 | static inline int mxs_dma_is_apbx(struct dma_chan *chan) | ||
22 | { | ||
23 | return !strcmp(dev_name(chan->device->dev), "mxs-dma-apbx"); | ||
24 | } | ||
25 | |||
26 | #endif /* __MACH_MXS_DMA_H__ */ | ||
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c index e194d928cdaa..d2af73321dae 100644 --- a/arch/arm/mach-pxa/balloon3.c +++ b/arch/arm/mach-pxa/balloon3.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
29 | #include <linux/i2c/pcf857x.h> | 29 | #include <linux/i2c/pcf857x.h> |
30 | #include <linux/i2c/pxa-i2c.h> | ||
30 | #include <linux/mtd/nand.h> | 31 | #include <linux/mtd/nand.h> |
31 | #include <linux/mtd/physmap.h> | 32 | #include <linux/mtd/physmap.h> |
32 | #include <linux/regulator/max1586.h> | 33 | #include <linux/regulator/max1586.h> |
@@ -51,8 +52,6 @@ | |||
51 | #include <mach/irda.h> | 52 | #include <mach/irda.h> |
52 | #include <mach/ohci.h> | 53 | #include <mach/ohci.h> |
53 | 54 | ||
54 | #include <plat/i2c.h> | ||
55 | |||
56 | #include "generic.h" | 55 | #include "generic.h" |
57 | #include "devices.h" | 56 | #include "devices.h" |
58 | 57 | ||
diff --git a/arch/arm/mach-pxa/cm-x300.c b/arch/arm/mach-pxa/cm-x300.c index 7984268508b6..bfca7ed2fea3 100644 --- a/arch/arm/mach-pxa/cm-x300.c +++ b/arch/arm/mach-pxa/cm-x300.c | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
31 | #include <linux/i2c/pca953x.h> | 31 | #include <linux/i2c/pca953x.h> |
32 | #include <linux/i2c/pxa-i2c.h> | ||
32 | 33 | ||
33 | #include <linux/mfd/da903x.h> | 34 | #include <linux/mfd/da903x.h> |
34 | #include <linux/regulator/machine.h> | 35 | #include <linux/regulator/machine.h> |
@@ -48,7 +49,6 @@ | |||
48 | #include <mach/pxafb.h> | 49 | #include <mach/pxafb.h> |
49 | #include <mach/mmc.h> | 50 | #include <mach/mmc.h> |
50 | #include <mach/ohci.h> | 51 | #include <mach/ohci.h> |
51 | #include <plat/i2c.h> | ||
52 | #include <plat/pxa3xx_nand.h> | 52 | #include <plat/pxa3xx_nand.h> |
53 | #include <mach/audio.h> | 53 | #include <mach/audio.h> |
54 | #include <mach/pxa3xx-u2d.h> | 54 | #include <mach/pxa3xx-u2d.h> |
diff --git a/arch/arm/mach-pxa/colibri-evalboard.c b/arch/arm/mach-pxa/colibri-evalboard.c index 28f667e52ef9..81c3c433e2d6 100644 --- a/arch/arm/mach-pxa/colibri-evalboard.c +++ b/arch/arm/mach-pxa/colibri-evalboard.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
21 | #include <asm/mach/arch.h> | 21 | #include <asm/mach/arch.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/i2c/pxa-i2c.h> | ||
23 | 24 | ||
24 | #include <mach/pxa27x.h> | 25 | #include <mach/pxa27x.h> |
25 | #include <mach/colibri.h> | 26 | #include <mach/colibri.h> |
@@ -27,8 +28,6 @@ | |||
27 | #include <mach/ohci.h> | 28 | #include <mach/ohci.h> |
28 | #include <mach/pxa27x-udc.h> | 29 | #include <mach/pxa27x-udc.h> |
29 | 30 | ||
30 | #include <plat/i2c.h> | ||
31 | |||
32 | #include "generic.h" | 31 | #include "generic.h" |
33 | #include "devices.h" | 32 | #include "devices.h" |
34 | 33 | ||
diff --git a/arch/arm/mach-pxa/colibri-pxa270-income.c b/arch/arm/mach-pxa/colibri-pxa270-income.c index 07b62a096f17..ee797397dc5b 100644 --- a/arch/arm/mach-pxa/colibri-pxa270-income.c +++ b/arch/arm/mach-pxa/colibri-pxa270-income.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/pwm_backlight.h> | 23 | #include <linux/pwm_backlight.h> |
24 | #include <linux/i2c/pxa-i2c.h> | ||
24 | #include <linux/sysdev.h> | 25 | #include <linux/sysdev.h> |
25 | 26 | ||
26 | #include <asm/irq.h> | 27 | #include <asm/irq.h> |
@@ -33,8 +34,6 @@ | |||
33 | #include <mach/pxa27x-udc.h> | 34 | #include <mach/pxa27x-udc.h> |
34 | #include <mach/pxafb.h> | 35 | #include <mach/pxafb.h> |
35 | 36 | ||
36 | #include <plat/i2c.h> | ||
37 | |||
38 | #include "devices.h" | 37 | #include "devices.h" |
39 | #include "generic.h" | 38 | #include "generic.h" |
40 | 39 | ||
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c index a5452a3a276d..d4e705caefea 100644 --- a/arch/arm/mach-pxa/corgi.c +++ b/arch/arm/mach-pxa/corgi.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/backlight.h> | 25 | #include <linux/backlight.h> |
26 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
27 | #include <linux/i2c/pxa-i2c.h> | ||
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
28 | #include <linux/spi/spi.h> | 29 | #include <linux/spi/spi.h> |
29 | #include <linux/spi/ads7846.h> | 30 | #include <linux/spi/ads7846.h> |
@@ -45,7 +46,6 @@ | |||
45 | #include <asm/mach/irq.h> | 46 | #include <asm/mach/irq.h> |
46 | 47 | ||
47 | #include <mach/pxa25x.h> | 48 | #include <mach/pxa25x.h> |
48 | #include <plat/i2c.h> | ||
49 | #include <mach/irda.h> | 49 | #include <mach/irda.h> |
50 | #include <mach/mmc.h> | 50 | #include <mach/mmc.h> |
51 | #include <mach/udc.h> | 51 | #include <mach/udc.h> |
diff --git a/arch/arm/mach-pxa/csb726.c b/arch/arm/mach-pxa/csb726.c index a305424a967d..0481c29a70e8 100644 --- a/arch/arm/mach-pxa/csb726.c +++ b/arch/arm/mach-pxa/csb726.c | |||
@@ -17,12 +17,12 @@ | |||
17 | #include <linux/mtd/partitions.h> | 17 | #include <linux/mtd/partitions.h> |
18 | #include <linux/sm501.h> | 18 | #include <linux/sm501.h> |
19 | #include <linux/smsc911x.h> | 19 | #include <linux/smsc911x.h> |
20 | #include <linux/i2c/pxa-i2c.h> | ||
20 | 21 | ||
21 | #include <asm/mach-types.h> | 22 | #include <asm/mach-types.h> |
22 | #include <asm/mach/arch.h> | 23 | #include <asm/mach/arch.h> |
23 | #include <mach/csb726.h> | 24 | #include <mach/csb726.h> |
24 | #include <mach/mfp-pxa27x.h> | 25 | #include <mach/mfp-pxa27x.h> |
25 | #include <plat/i2c.h> | ||
26 | #include <mach/mmc.h> | 26 | #include <mach/mmc.h> |
27 | #include <mach/ohci.h> | 27 | #include <mach/ohci.h> |
28 | #include <mach/pxa2xx-regs.h> | 28 | #include <mach/pxa2xx-regs.h> |
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index 4c766e3b4af3..c4bf08b3eb61 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/platform_device.h> | 4 | #include <linux/platform_device.h> |
5 | #include <linux/dma-mapping.h> | 5 | #include <linux/dma-mapping.h> |
6 | #include <linux/spi/pxa2xx_spi.h> | 6 | #include <linux/spi/pxa2xx_spi.h> |
7 | #include <linux/i2c/pxa-i2c.h> | ||
7 | 8 | ||
8 | #include <asm/pmu.h> | 9 | #include <asm/pmu.h> |
9 | #include <mach/udc.h> | 10 | #include <mach/udc.h> |
@@ -16,7 +17,6 @@ | |||
16 | #include <mach/camera.h> | 17 | #include <mach/camera.h> |
17 | #include <mach/audio.h> | 18 | #include <mach/audio.h> |
18 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
19 | #include <plat/i2c.h> | ||
20 | #include <plat/pxa3xx_nand.h> | 20 | #include <plat/pxa3xx_nand.h> |
21 | 21 | ||
22 | #include "devices.h" | 22 | #include "devices.h" |
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index a78bb3097739..b411d7cbf5a1 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/apm-emulation.h> | 31 | #include <linux/apm-emulation.h> |
32 | #include <linux/i2c.h> | 32 | #include <linux/i2c.h> |
33 | #include <linux/i2c/pca953x.h> | 33 | #include <linux/i2c/pca953x.h> |
34 | #include <linux/i2c/pxa-i2c.h> | ||
34 | #include <linux/regulator/userspace-consumer.h> | 35 | #include <linux/regulator/userspace-consumer.h> |
35 | 36 | ||
36 | #include <media/soc_camera.h> | 37 | #include <media/soc_camera.h> |
@@ -45,7 +46,6 @@ | |||
45 | #include <mach/ohci.h> | 46 | #include <mach/ohci.h> |
46 | #include <mach/mmc.h> | 47 | #include <mach/mmc.h> |
47 | #include <plat/pxa27x_keypad.h> | 48 | #include <plat/pxa27x_keypad.h> |
48 | #include <plat/i2c.h> | ||
49 | #include <mach/camera.h> | 49 | #include <mach/camera.h> |
50 | 50 | ||
51 | #include "generic.h" | 51 | #include "generic.h" |
diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c index 87cec0abe5b0..93f05e024313 100644 --- a/arch/arm/mach-pxa/ezx.c +++ b/arch/arm/mach-pxa/ezx.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/gpio.h> | 20 | #include <linux/gpio.h> |
21 | #include <linux/gpio_keys.h> | 21 | #include <linux/gpio_keys.h> |
22 | #include <linux/leds-lp3944.h> | 22 | #include <linux/leds-lp3944.h> |
23 | #include <linux/i2c/pxa-i2c.h> | ||
23 | 24 | ||
24 | #include <media/soc_camera.h> | 25 | #include <media/soc_camera.h> |
25 | 26 | ||
@@ -30,7 +31,6 @@ | |||
30 | #include <mach/pxa27x.h> | 31 | #include <mach/pxa27x.h> |
31 | #include <mach/pxafb.h> | 32 | #include <mach/pxafb.h> |
32 | #include <mach/ohci.h> | 33 | #include <mach/ohci.h> |
33 | #include <plat/i2c.h> | ||
34 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
35 | #include <plat/pxa27x_keypad.h> | 35 | #include <plat/pxa27x_keypad.h> |
36 | #include <mach/camera.h> | 36 | #include <mach/camera.h> |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index a908e0a5f396..6de0ad0eea65 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/pxa2xx_spi.h> | 36 | #include <linux/spi/pxa2xx_spi.h> |
37 | #include <linux/usb/gpio_vbus.h> | 37 | #include <linux/usb/gpio_vbus.h> |
38 | #include <linux/i2c/pxa-i2c.h> | ||
38 | 39 | ||
39 | #include <mach/hardware.h> | 40 | #include <mach/hardware.h> |
40 | #include <asm/mach-types.h> | 41 | #include <asm/mach-types.h> |
@@ -42,7 +43,6 @@ | |||
42 | 43 | ||
43 | #include <mach/pxa27x.h> | 44 | #include <mach/pxa27x.h> |
44 | #include <mach/hx4700.h> | 45 | #include <mach/hx4700.h> |
45 | #include <plat/i2c.h> | ||
46 | #include <mach/irda.h> | 46 | #include <mach/irda.h> |
47 | 47 | ||
48 | #include <video/platform_lcd.h> | 48 | #include <video/platform_lcd.h> |
diff --git a/arch/arm/mach-pxa/littleton.c b/arch/arm/mach-pxa/littleton.c index ccb7bfad17ca..87c1ed9ccd2f 100644 --- a/arch/arm/mach-pxa/littleton.c +++ b/arch/arm/mach-pxa/littleton.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/leds.h> | 28 | #include <linux/leds.h> |
29 | #include <linux/mfd/da903x.h> | 29 | #include <linux/mfd/da903x.h> |
30 | #include <linux/i2c/max732x.h> | 30 | #include <linux/i2c/max732x.h> |
31 | #include <linux/i2c/pxa-i2c.h> | ||
31 | 32 | ||
32 | #include <asm/types.h> | 33 | #include <asm/types.h> |
33 | #include <asm/setup.h> | 34 | #include <asm/setup.h> |
@@ -45,7 +46,6 @@ | |||
45 | #include <mach/mmc.h> | 46 | #include <mach/mmc.h> |
46 | #include <plat/pxa27x_keypad.h> | 47 | #include <plat/pxa27x_keypad.h> |
47 | #include <mach/littleton.h> | 48 | #include <mach/littleton.h> |
48 | #include <plat/i2c.h> | ||
49 | #include <plat/pxa3xx_nand.h> | 49 | #include <plat/pxa3xx_nand.h> |
50 | 50 | ||
51 | #include "generic.h" | 51 | #include "generic.h" |
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c index 41198f0dc3ac..5535991c4a3c 100644 --- a/arch/arm/mach-pxa/magician.c +++ b/arch/arm/mach-pxa/magician.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <linux/regulator/bq24022.h> | 28 | #include <linux/regulator/bq24022.h> |
29 | #include <linux/regulator/machine.h> | 29 | #include <linux/regulator/machine.h> |
30 | #include <linux/usb/gpio_vbus.h> | 30 | #include <linux/usb/gpio_vbus.h> |
31 | #include <linux/i2c/pxa-i2c.h> | ||
31 | 32 | ||
32 | #include <mach/hardware.h> | 33 | #include <mach/hardware.h> |
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
@@ -36,7 +37,6 @@ | |||
36 | #include <mach/pxa27x.h> | 37 | #include <mach/pxa27x.h> |
37 | #include <mach/magician.h> | 38 | #include <mach/magician.h> |
38 | #include <mach/pxafb.h> | 39 | #include <mach/pxafb.h> |
39 | #include <plat/i2c.h> | ||
40 | #include <mach/mmc.h> | 40 | #include <mach/mmc.h> |
41 | #include <mach/irda.h> | 41 | #include <mach/irda.h> |
42 | #include <mach/ohci.h> | 42 | #include <mach/ohci.h> |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index d4b6f2375f2c..f9542220595a 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/gpio_keys.h> | 27 | #include <linux/gpio_keys.h> |
28 | #include <linux/pwm_backlight.h> | 28 | #include <linux/pwm_backlight.h> |
29 | #include <linux/smc91x.h> | 29 | #include <linux/smc91x.h> |
30 | #include <linux/i2c/pxa-i2c.h> | ||
30 | 31 | ||
31 | #include <asm/types.h> | 32 | #include <asm/types.h> |
32 | #include <asm/setup.h> | 33 | #include <asm/setup.h> |
@@ -46,7 +47,6 @@ | |||
46 | #include <mach/mainstone.h> | 47 | #include <mach/mainstone.h> |
47 | #include <mach/audio.h> | 48 | #include <mach/audio.h> |
48 | #include <mach/pxafb.h> | 49 | #include <mach/pxafb.h> |
49 | #include <plat/i2c.h> | ||
50 | #include <mach/mmc.h> | 50 | #include <mach/mmc.h> |
51 | #include <mach/irda.h> | 51 | #include <mach/irda.h> |
52 | #include <mach/ohci.h> | 52 | #include <mach/ohci.h> |
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c index faafea3542fb..78d98a8607ec 100644 --- a/arch/arm/mach-pxa/mioa701.c +++ b/arch/arm/mach-pxa/mioa701.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/usb/gpio_vbus.h> | 39 | #include <linux/usb/gpio_vbus.h> |
40 | #include <linux/regulator/max1586.h> | 40 | #include <linux/regulator/max1586.h> |
41 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
42 | #include <linux/i2c/pxa-i2c.h> | ||
42 | 43 | ||
43 | #include <asm/mach-types.h> | 44 | #include <asm/mach-types.h> |
44 | #include <asm/mach/arch.h> | 45 | #include <asm/mach/arch.h> |
@@ -50,7 +51,6 @@ | |||
50 | #include <mach/mmc.h> | 51 | #include <mach/mmc.h> |
51 | #include <mach/udc.h> | 52 | #include <mach/udc.h> |
52 | #include <mach/pxa27x-udc.h> | 53 | #include <mach/pxa27x-udc.h> |
53 | #include <plat/i2c.h> | ||
54 | #include <mach/camera.h> | 54 | #include <mach/camera.h> |
55 | #include <mach/audio.h> | 55 | #include <mach/audio.h> |
56 | #include <media/soc_camera.h> | 56 | #include <media/soc_camera.h> |
diff --git a/arch/arm/mach-pxa/mxm8x10.c b/arch/arm/mach-pxa/mxm8x10.c index cdf7f41e2bb3..b5a8fd3fce04 100644 --- a/arch/arm/mach-pxa/mxm8x10.c +++ b/arch/arm/mach-pxa/mxm8x10.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <linux/serial_8250.h> | 22 | #include <linux/serial_8250.h> |
23 | #include <linux/dm9000.h> | 23 | #include <linux/dm9000.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/i2c/pxa-i2c.h> | ||
25 | 26 | ||
26 | #include <plat/i2c.h> | ||
27 | #include <plat/pxa3xx_nand.h> | 27 | #include <plat/pxa3xx_nand.h> |
28 | 28 | ||
29 | #include <mach/pxafb.h> | 29 | #include <mach/pxafb.h> |
diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c index 35572c427fa8..72adb3ae2b43 100644 --- a/arch/arm/mach-pxa/palm27x.c +++ b/arch/arm/mach-pxa/palm27x.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/power_supply.h> | 22 | #include <linux/power_supply.h> |
23 | #include <linux/usb/gpio_vbus.h> | 23 | #include <linux/usb/gpio_vbus.h> |
24 | #include <linux/regulator/max1586.h> | 24 | #include <linux/regulator/max1586.h> |
25 | #include <linux/i2c/pxa-i2c.h> | ||
25 | 26 | ||
26 | #include <asm/mach-types.h> | 27 | #include <asm/mach-types.h> |
27 | #include <asm/mach/arch.h> | 28 | #include <asm/mach/arch.h> |
@@ -36,8 +37,6 @@ | |||
36 | #include <mach/palmasoc.h> | 37 | #include <mach/palmasoc.h> |
37 | #include <mach/palm27x.h> | 38 | #include <mach/palm27x.h> |
38 | 39 | ||
39 | #include <plat/i2c.h> | ||
40 | |||
41 | #include "generic.h" | 40 | #include "generic.h" |
42 | #include "devices.h" | 41 | #include "devices.h" |
43 | 42 | ||
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c index 90820faa711a..9dbf3ccd4150 100644 --- a/arch/arm/mach-pxa/pcm990-baseboard.c +++ b/arch/arm/mach-pxa/pcm990-baseboard.c | |||
@@ -23,12 +23,12 @@ | |||
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/i2c/pxa-i2c.h> | ||
26 | #include <linux/pwm_backlight.h> | 27 | #include <linux/pwm_backlight.h> |
27 | 28 | ||
28 | #include <media/soc_camera.h> | 29 | #include <media/soc_camera.h> |
29 | 30 | ||
30 | #include <asm/gpio.h> | 31 | #include <asm/gpio.h> |
31 | #include <plat/i2c.h> | ||
32 | #include <mach/camera.h> | 32 | #include <mach/camera.h> |
33 | #include <asm/mach/map.h> | 33 | #include <asm/mach/map.h> |
34 | #include <mach/pxa27x.h> | 34 | #include <mach/pxa27x.h> |
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c index 4f0ff1ab623d..35353af345d5 100644 --- a/arch/arm/mach-pxa/poodle.c +++ b/arch/arm/mach-pxa/poodle.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mtd/physmap.h> | 23 | #include <linux/mtd/physmap.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/i2c/pxa-i2c.h> | ||
26 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
27 | #include <linux/spi/ads7846.h> | 28 | #include <linux/spi/ads7846.h> |
28 | #include <linux/spi/pxa2xx_spi.h> | 29 | #include <linux/spi/pxa2xx_spi.h> |
@@ -44,7 +45,6 @@ | |||
44 | #include <mach/irda.h> | 45 | #include <mach/irda.h> |
45 | #include <mach/poodle.h> | 46 | #include <mach/poodle.h> |
46 | #include <mach/pxafb.h> | 47 | #include <mach/pxafb.h> |
47 | #include <plat/i2c.h> | ||
48 | 48 | ||
49 | #include <asm/hardware/scoop.h> | 49 | #include <asm/hardware/scoop.h> |
50 | #include <asm/hardware/locomo.h> | 50 | #include <asm/hardware/locomo.h> |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 28b11be00b3f..1cb5d0f9723f 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/i2c/pxa-i2c.h> | ||
22 | 23 | ||
23 | #include <asm/mach/map.h> | 24 | #include <asm/mach/map.h> |
24 | #include <mach/hardware.h> | 25 | #include <mach/hardware.h> |
@@ -32,8 +33,6 @@ | |||
32 | #include <mach/dma.h> | 33 | #include <mach/dma.h> |
33 | #include <mach/smemc.h> | 34 | #include <mach/smemc.h> |
34 | 35 | ||
35 | #include <plat/i2c.h> | ||
36 | |||
37 | #include "generic.h" | 36 | #include "generic.h" |
38 | #include "devices.h" | 37 | #include "devices.h" |
39 | #include "clock.h" | 38 | #include "clock.h" |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 1230343d9c70..f374247b8466 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/sysdev.h> | 23 | #include <linux/sysdev.h> |
24 | #include <linux/i2c/pxa-i2c.h> | ||
24 | 25 | ||
25 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
26 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
@@ -32,7 +33,6 @@ | |||
32 | #include <mach/dma.h> | 33 | #include <mach/dma.h> |
33 | #include <mach/regs-intc.h> | 34 | #include <mach/regs-intc.h> |
34 | #include <mach/smemc.h> | 35 | #include <mach/smemc.h> |
35 | #include <plat/i2c.h> | ||
36 | 36 | ||
37 | #include "generic.h" | 37 | #include "generic.h" |
38 | #include "devices.h" | 38 | #include "devices.h" |
diff --git a/arch/arm/mach-pxa/pxa95x.c b/arch/arm/mach-pxa/pxa95x.c index 437980f72710..23b229bd06e9 100644 --- a/arch/arm/mach-pxa/pxa95x.c +++ b/arch/arm/mach-pxa/pxa95x.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/i2c/pxa-i2c.h> | ||
18 | #include <linux/irq.h> | 19 | #include <linux/irq.h> |
19 | #include <linux/io.h> | 20 | #include <linux/io.h> |
20 | #include <linux/sysdev.h> | 21 | #include <linux/sysdev.h> |
@@ -27,7 +28,6 @@ | |||
27 | #include <mach/pm.h> | 28 | #include <mach/pm.h> |
28 | #include <mach/dma.h> | 29 | #include <mach/dma.h> |
29 | #include <mach/regs-intc.h> | 30 | #include <mach/regs-intc.h> |
30 | #include <plat/i2c.h> | ||
31 | 31 | ||
32 | #include "generic.h" | 32 | #include "generic.h" |
33 | #include "devices.h" | 33 | #include "devices.h" |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 8361151be054..47094188e029 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/sched.h> | 32 | #include <linux/sched.h> |
33 | #include <linux/pwm_backlight.h> | 33 | #include <linux/pwm_backlight.h> |
34 | #include <linux/i2c.h> | 34 | #include <linux/i2c.h> |
35 | #include <linux/i2c/pxa-i2c.h> | ||
35 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/spi_gpio.h> | 37 | #include <linux/spi/spi_gpio.h> |
37 | #include <linux/lis3lv02d.h> | 38 | #include <linux/lis3lv02d.h> |
@@ -53,7 +54,6 @@ | |||
53 | #include <mach/ohci.h> | 54 | #include <mach/ohci.h> |
54 | #include <mach/pxafb.h> | 55 | #include <mach/pxafb.h> |
55 | #include <mach/mmc.h> | 56 | #include <mach/mmc.h> |
56 | #include <plat/i2c.h> | ||
57 | #include <plat/pxa3xx_nand.h> | 57 | #include <plat/pxa3xx_nand.h> |
58 | 58 | ||
59 | #include "generic.h" | 59 | #include "generic.h" |
diff --git a/arch/arm/mach-pxa/saar.c b/arch/arm/mach-pxa/saar.c index c1ca8cb467fc..eb83c89428ef 100644 --- a/arch/arm/mach-pxa/saar.c +++ b/arch/arm/mach-pxa/saar.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
21 | #include <linux/fb.h> | 21 | #include <linux/fb.h> |
22 | #include <linux/i2c.h> | 22 | #include <linux/i2c.h> |
23 | #include <linux/i2c/pxa-i2c.h> | ||
23 | #include <linux/smc91x.h> | 24 | #include <linux/smc91x.h> |
24 | #include <linux/mfd/da903x.h> | 25 | #include <linux/mfd/da903x.h> |
25 | #include <linux/mtd/mtd.h> | 26 | #include <linux/mtd/mtd.h> |
@@ -31,7 +32,6 @@ | |||
31 | #include <asm/mach/flash.h> | 32 | #include <asm/mach/flash.h> |
32 | 33 | ||
33 | #include <mach/pxa930.h> | 34 | #include <mach/pxa930.h> |
34 | #include <plat/i2c.h> | ||
35 | #include <mach/pxafb.h> | 35 | #include <mach/pxafb.h> |
36 | 36 | ||
37 | #include "devices.h" | 37 | #include "devices.h" |
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c index e497922f761a..9322fe527c7f 100644 --- a/arch/arm/mach-pxa/saarb.c +++ b/arch/arm/mach-pxa/saarb.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/i2c/pxa-i2c.h> | ||
16 | #include <linux/mfd/88pm860x.h> | 17 | #include <linux/mfd/88pm860x.h> |
17 | 18 | ||
18 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
@@ -24,8 +25,6 @@ | |||
24 | #include <mach/mfp-pxa930.h> | 25 | #include <mach/mfp-pxa930.h> |
25 | #include <mach/gpio.h> | 26 | #include <mach/gpio.h> |
26 | 27 | ||
27 | #include <plat/i2c.h> | ||
28 | |||
29 | #include "generic.h" | 28 | #include "generic.h" |
30 | 29 | ||
31 | #define SAARB_NR_IRQS (IRQ_BOARD_START + 40) | 30 | #define SAARB_NR_IRQS (IRQ_BOARD_START + 40) |
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c index b49a2c21124c..38e2c0912b9a 100644 --- a/arch/arm/mach-pxa/spitz.c +++ b/arch/arm/mach-pxa/spitz.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/leds.h> | 20 | #include <linux/leds.h> |
21 | #include <linux/i2c.h> | 21 | #include <linux/i2c.h> |
22 | #include <linux/i2c/pxa-i2c.h> | ||
22 | #include <linux/i2c/pca953x.h> | 23 | #include <linux/i2c/pca953x.h> |
23 | #include <linux/spi/spi.h> | 24 | #include <linux/spi/spi.h> |
24 | #include <linux/spi/ads7846.h> | 25 | #include <linux/spi/ads7846.h> |
@@ -47,8 +48,6 @@ | |||
47 | #include <mach/sharpsl_pm.h> | 48 | #include <mach/sharpsl_pm.h> |
48 | #include <mach/smemc.h> | 49 | #include <mach/smemc.h> |
49 | 50 | ||
50 | #include <plat/i2c.h> | ||
51 | |||
52 | #include "generic.h" | 51 | #include "generic.h" |
53 | #include "devices.h" | 52 | #include "devices.h" |
54 | 53 | ||
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index 9a14fdb83c82..cb5611daf5fe 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mtd/plat-ram.h> | 25 | #include <linux/mtd/plat-ram.h> |
26 | #include <linux/mtd/partitions.h> | 26 | #include <linux/mtd/partitions.h> |
27 | 27 | ||
28 | #include <linux/i2c/pxa-i2c.h> | ||
28 | #include <linux/i2c/pcf857x.h> | 29 | #include <linux/i2c/pcf857x.h> |
29 | #include <linux/i2c/at24.h> | 30 | #include <linux/i2c/at24.h> |
30 | #include <linux/smc91x.h> | 31 | #include <linux/smc91x.h> |
@@ -43,7 +44,6 @@ | |||
43 | #include <asm/mach/flash.h> | 44 | #include <asm/mach/flash.h> |
44 | 45 | ||
45 | #include <mach/pxa27x.h> | 46 | #include <mach/pxa27x.h> |
46 | #include <plat/i2c.h> | ||
47 | #include <mach/mmc.h> | 47 | #include <mach/mmc.h> |
48 | #include <mach/udc.h> | 48 | #include <mach/udc.h> |
49 | #include <mach/pxa27x-udc.h> | 49 | #include <mach/pxa27x-udc.h> |
diff --git a/arch/arm/mach-pxa/tavorevb3.c b/arch/arm/mach-pxa/tavorevb3.c index 70191a9450eb..79f4422f12f4 100644 --- a/arch/arm/mach-pxa/tavorevb3.c +++ b/arch/arm/mach-pxa/tavorevb3.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/i2c.h> | 17 | #include <linux/i2c.h> |
18 | #include <linux/i2c/pxa-i2c.h> | ||
18 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
19 | #include <linux/mfd/88pm860x.h> | 20 | #include <linux/mfd/88pm860x.h> |
20 | 21 | ||
@@ -23,8 +24,6 @@ | |||
23 | 24 | ||
24 | #include <mach/pxa930.h> | 25 | #include <mach/pxa930.h> |
25 | 26 | ||
26 | #include <plat/i2c.h> | ||
27 | |||
28 | #include "devices.h" | 27 | #include "devices.h" |
29 | #include "generic.h" | 28 | #include "generic.h" |
30 | 29 | ||
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index f2582ec300d9..5ad3807af334 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
35 | #include <linux/spi/pxa2xx_spi.h> | 35 | #include <linux/spi/pxa2xx_spi.h> |
36 | #include <linux/input/matrix_keypad.h> | 36 | #include <linux/input/matrix_keypad.h> |
37 | #include <linux/i2c/pxa-i2c.h> | ||
37 | 38 | ||
38 | #include <asm/setup.h> | 39 | #include <asm/setup.h> |
39 | #include <asm/mach-types.h> | 40 | #include <asm/mach-types.h> |
@@ -41,7 +42,6 @@ | |||
41 | #include <mach/pxa25x.h> | 42 | #include <mach/pxa25x.h> |
42 | #include <mach/reset.h> | 43 | #include <mach/reset.h> |
43 | #include <mach/irda.h> | 44 | #include <mach/irda.h> |
44 | #include <plat/i2c.h> | ||
45 | #include <mach/mmc.h> | 45 | #include <mach/mmc.h> |
46 | #include <mach/udc.h> | 46 | #include <mach/udc.h> |
47 | #include <mach/tosa_bt.h> | 47 | #include <mach/tosa_bt.h> |
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 423261d63d07..857bb2e63486 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/dm9000.h> | 26 | #include <linux/dm9000.h> |
27 | #include <linux/mtd/physmap.h> | 27 | #include <linux/mtd/physmap.h> |
28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
29 | #include <linux/i2c/pxa-i2c.h> | ||
29 | 30 | ||
30 | #include <asm/types.h> | 31 | #include <asm/types.h> |
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
@@ -47,7 +48,6 @@ | |||
47 | #include <mach/irda.h> | 48 | #include <mach/irda.h> |
48 | #include <mach/ohci.h> | 49 | #include <mach/ohci.h> |
49 | #include <mach/smemc.h> | 50 | #include <mach/smemc.h> |
50 | #include <plat/i2c.h> | ||
51 | 51 | ||
52 | #include "generic.h" | 52 | #include "generic.h" |
53 | #include "devices.h" | 53 | #include "devices.h" |
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c index 49eeeab23689..12279214c875 100644 --- a/arch/arm/mach-pxa/viper.c +++ b/arch/arm/mach-pxa/viper.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/gpio.h> | 36 | #include <linux/gpio.h> |
37 | #include <linux/jiffies.h> | 37 | #include <linux/jiffies.h> |
38 | #include <linux/i2c-gpio.h> | 38 | #include <linux/i2c-gpio.h> |
39 | #include <linux/i2c/pxa-i2c.h> | ||
39 | #include <linux/serial_8250.h> | 40 | #include <linux/serial_8250.h> |
40 | #include <linux/smc91x.h> | 41 | #include <linux/smc91x.h> |
41 | #include <linux/pwm_backlight.h> | 42 | #include <linux/pwm_backlight.h> |
@@ -47,7 +48,6 @@ | |||
47 | #include <mach/pxa25x.h> | 48 | #include <mach/pxa25x.h> |
48 | #include <mach/audio.h> | 49 | #include <mach/audio.h> |
49 | #include <mach/pxafb.h> | 50 | #include <mach/pxafb.h> |
50 | #include <plat/i2c.h> | ||
51 | #include <mach/regs-uart.h> | 51 | #include <mach/regs-uart.h> |
52 | #include <mach/arcom-pcmcia.h> | 52 | #include <mach/arcom-pcmcia.h> |
53 | #include <mach/viper.h> | 53 | #include <mach/viper.h> |
diff --git a/arch/arm/mach-pxa/vpac270.c b/arch/arm/mach-pxa/vpac270.c index b9b579715ff6..e709fd459268 100644 --- a/arch/arm/mach-pxa/vpac270.c +++ b/arch/arm/mach-pxa/vpac270.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/ucb1400.h> | 26 | #include <linux/ucb1400.h> |
27 | #include <linux/ata_platform.h> | 27 | #include <linux/ata_platform.h> |
28 | #include <linux/regulator/max1586.h> | 28 | #include <linux/regulator/max1586.h> |
29 | #include <linux/i2c/pxa-i2c.h> | ||
29 | 30 | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
@@ -40,8 +41,6 @@ | |||
40 | #include <mach/udc.h> | 41 | #include <mach/udc.h> |
41 | #include <mach/pata_pxa.h> | 42 | #include <mach/pata_pxa.h> |
42 | 43 | ||
43 | #include <plat/i2c.h> | ||
44 | |||
45 | #include "generic.h" | 44 | #include "generic.h" |
46 | #include "devices.h" | 45 | #include "devices.h" |
47 | 46 | ||
diff --git a/arch/arm/mach-pxa/xcep.c b/arch/arm/mach-pxa/xcep.c index 51c0281c6e0a..f55f8f2e0db3 100644 --- a/arch/arm/mach-pxa/xcep.c +++ b/arch/arm/mach-pxa/xcep.c | |||
@@ -16,6 +16,7 @@ | |||
16 | 16 | ||
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/i2c.h> | 18 | #include <linux/i2c.h> |
19 | #include <linux/i2c/pxa-i2c.h> | ||
19 | #include <linux/smc91x.h> | 20 | #include <linux/smc91x.h> |
20 | #include <linux/mtd/mtd.h> | 21 | #include <linux/mtd/mtd.h> |
21 | #include <linux/mtd/partitions.h> | 22 | #include <linux/mtd/partitions.h> |
@@ -26,8 +27,6 @@ | |||
26 | #include <asm/mach/irq.h> | 27 | #include <asm/mach/irq.h> |
27 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
28 | 29 | ||
29 | #include <plat/i2c.h> | ||
30 | |||
31 | #include <mach/hardware.h> | 30 | #include <mach/hardware.h> |
32 | #include <mach/pxa2xx-regs.h> | 31 | #include <mach/pxa2xx-regs.h> |
33 | #include <mach/mfp-pxa25x.h> | 32 | #include <mach/mfp-pxa25x.h> |
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index a323e076129e..aaf883754ef4 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/gpio_keys.h> | 29 | #include <linux/gpio_keys.h> |
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/regulator/machine.h> | 31 | #include <linux/regulator/machine.h> |
32 | #include <linux/i2c/pxa-i2c.h> | ||
32 | 33 | ||
33 | #include <asm/mach-types.h> | 34 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 35 | #include <asm/mach/arch.h> |
@@ -40,8 +41,6 @@ | |||
40 | #include <mach/mmc.h> | 41 | #include <mach/mmc.h> |
41 | #include <plat/pxa27x_keypad.h> | 42 | #include <plat/pxa27x_keypad.h> |
42 | 43 | ||
43 | #include <plat/i2c.h> | ||
44 | |||
45 | #include "generic.h" | 44 | #include "generic.h" |
46 | #include "devices.h" | 45 | #include "devices.h" |
47 | 46 | ||
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c index b92aa3b8c4f7..730f51e57c17 100644 --- a/arch/arm/mach-pxa/zeus.c +++ b/arch/arm/mach-pxa/zeus.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/mtd/partitions.h> | 25 | #include <linux/mtd/partitions.h> |
26 | #include <linux/mtd/physmap.h> | 26 | #include <linux/mtd/physmap.h> |
27 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
28 | #include <linux/i2c/pxa-i2c.h> | ||
28 | #include <linux/i2c/pca953x.h> | 29 | #include <linux/i2c/pca953x.h> |
29 | #include <linux/apm-emulation.h> | 30 | #include <linux/apm-emulation.h> |
30 | #include <linux/can/platform/mcp251x.h> | 31 | #include <linux/can/platform/mcp251x.h> |
@@ -33,8 +34,6 @@ | |||
33 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
34 | #include <asm/mach/map.h> | 35 | #include <asm/mach/map.h> |
35 | 36 | ||
36 | #include <plat/i2c.h> | ||
37 | |||
38 | #include <mach/pxa2xx-regs.h> | 37 | #include <mach/pxa2xx-regs.h> |
39 | #include <mach/regs-uart.h> | 38 | #include <mach/regs-uart.h> |
40 | #include <mach/ohci.h> | 39 | #include <mach/ohci.h> |
diff --git a/arch/arm/mach-pxa/zylonite_pxa300.c b/arch/arm/mach-pxa/zylonite_pxa300.c index 3aa73b3e33f2..93c64d8d7de9 100644 --- a/arch/arm/mach-pxa/zylonite_pxa300.c +++ b/arch/arm/mach-pxa/zylonite_pxa300.c | |||
@@ -17,11 +17,11 @@ | |||
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/i2c.h> | 19 | #include <linux/i2c.h> |
20 | #include <linux/i2c/pxa-i2c.h> | ||
20 | #include <linux/i2c/pca953x.h> | 21 | #include <linux/i2c/pca953x.h> |
21 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
22 | 23 | ||
23 | #include <mach/pxa300.h> | 24 | #include <mach/pxa300.h> |
24 | #include <plat/i2c.h> | ||
25 | #include <mach/zylonite.h> | 25 | #include <mach/zylonite.h> |
26 | 26 | ||
27 | #include "generic.h" | 27 | #include "generic.h" |
diff --git a/arch/arm/mach-s3c2410/h1940-bluetooth.c b/arch/arm/mach-s3c2410/h1940-bluetooth.c index 6b86a722a7db..2c126bbca08d 100644 --- a/arch/arm/mach-s3c2410/h1940-bluetooth.c +++ b/arch/arm/mach-s3c2410/h1940-bluetooth.c | |||
@@ -18,12 +18,14 @@ | |||
18 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
19 | #include <linux/gpio.h> | 19 | #include <linux/gpio.h> |
20 | #include <linux/rfkill.h> | 20 | #include <linux/rfkill.h> |
21 | #include <linux/leds.h> | ||
21 | 22 | ||
22 | #include <mach/regs-gpio.h> | 23 | #include <mach/regs-gpio.h> |
23 | #include <mach/hardware.h> | 24 | #include <mach/hardware.h> |
24 | #include <mach/h1940-latch.h> | 25 | #include <mach/h1940-latch.h> |
26 | #include <mach/h1940.h> | ||
25 | 27 | ||
26 | #define DRV_NAME "h1940-bt" | 28 | #define DRV_NAME "h1940-bt" |
27 | 29 | ||
28 | /* Bluetooth control */ | 30 | /* Bluetooth control */ |
29 | static void h1940bt_enable(int on) | 31 | static void h1940bt_enable(int on) |
@@ -37,6 +39,8 @@ static void h1940bt_enable(int on) | |||
37 | gpio_set_value(S3C2410_GPH(1), 1); | 39 | gpio_set_value(S3C2410_GPH(1), 1); |
38 | mdelay(10); | 40 | mdelay(10); |
39 | gpio_set_value(S3C2410_GPH(1), 0); | 41 | gpio_set_value(S3C2410_GPH(1), 0); |
42 | |||
43 | h1940_led_blink_set(-EINVAL, GPIO_LED_BLINK, NULL, NULL); | ||
40 | } | 44 | } |
41 | else { | 45 | else { |
42 | gpio_set_value(S3C2410_GPH(1), 1); | 46 | gpio_set_value(S3C2410_GPH(1), 1); |
@@ -44,6 +48,8 @@ static void h1940bt_enable(int on) | |||
44 | gpio_set_value(S3C2410_GPH(1), 0); | 48 | gpio_set_value(S3C2410_GPH(1), 0); |
45 | mdelay(10); | 49 | mdelay(10); |
46 | gpio_set_value(H1940_LATCH_BLUETOOTH_POWER, 0); | 50 | gpio_set_value(H1940_LATCH_BLUETOOTH_POWER, 0); |
51 | |||
52 | h1940_led_blink_set(-EINVAL, GPIO_LED_NO_BLINK_LOW, NULL, NULL); | ||
47 | } | 53 | } |
48 | } | 54 | } |
49 | 55 | ||
@@ -85,7 +91,6 @@ static int __devinit h1940bt_probe(struct platform_device *pdev) | |||
85 | s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0); | 91 | s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0); |
86 | s3c_gpio_setpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE); | 92 | s3c_gpio_setpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE); |
87 | 93 | ||
88 | |||
89 | rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH, | 94 | rfk = rfkill_alloc(DRV_NAME, &pdev->dev, RFKILL_TYPE_BLUETOOTH, |
90 | &h1940bt_rfkill_ops, NULL); | 95 | &h1940bt_rfkill_ops, NULL); |
91 | if (!rfk) { | 96 | if (!rfk) { |
@@ -93,8 +98,6 @@ static int __devinit h1940bt_probe(struct platform_device *pdev) | |||
93 | goto err_rfk_alloc; | 98 | goto err_rfk_alloc; |
94 | } | 99 | } |
95 | 100 | ||
96 | rfkill_set_led_trigger_name(rfk, "h1940-bluetooth"); | ||
97 | |||
98 | ret = rfkill_register(rfk); | 101 | ret = rfkill_register(rfk); |
99 | if (ret) | 102 | if (ret) |
100 | goto err_rfkill; | 103 | goto err_rfkill; |
diff --git a/arch/arm/mach-s3c2410/include/mach/h1940.h b/arch/arm/mach-s3c2410/include/mach/h1940.h index 4559784129c0..2aa683c8d3d6 100644 --- a/arch/arm/mach-s3c2410/include/mach/h1940.h +++ b/arch/arm/mach-s3c2410/include/mach/h1940.h | |||
@@ -17,5 +17,8 @@ | |||
17 | #define H1940_SUSPEND_CHECK (0x30080000) | 17 | #define H1940_SUSPEND_CHECK (0x30080000) |
18 | 18 | ||
19 | extern void h1940_pm_return(void); | 19 | extern void h1940_pm_return(void); |
20 | extern int h1940_led_blink_set(unsigned gpio, int state, | ||
21 | unsigned long *delay_on, unsigned long *delay_off); | ||
22 | |||
20 | 23 | ||
21 | #endif /* __ASM_ARCH_H1940_H */ | 24 | #endif /* __ASM_ARCH_H1940_H */ |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 1e93f176c1de..2a2fa0620133 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -23,8 +23,15 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/input.h> | ||
27 | #include <linux/gpio_keys.h> | ||
26 | #include <linux/pwm_backlight.h> | 28 | #include <linux/pwm_backlight.h> |
27 | #include <linux/i2c.h> | 29 | #include <linux/i2c.h> |
30 | #include <linux/leds.h> | ||
31 | #include <linux/pda_power.h> | ||
32 | #include <linux/s3c_adc_battery.h> | ||
33 | #include <linux/delay.h> | ||
34 | |||
28 | #include <video/platform_lcd.h> | 35 | #include <video/platform_lcd.h> |
29 | 36 | ||
30 | #include <linux/mmc/host.h> | 37 | #include <linux/mmc/host.h> |
@@ -203,20 +210,239 @@ static struct s3c2410fb_mach_info h1940_fb_info __initdata = { | |||
203 | .num_displays = 1, | 210 | .num_displays = 1, |
204 | .default_display = 0, | 211 | .default_display = 0, |
205 | 212 | ||
206 | .lpcsel= 0x02, | 213 | .lpcsel = 0x02, |
207 | .gpccon= 0xaa940659, | 214 | .gpccon = 0xaa940659, |
208 | .gpccon_mask= 0xffffffff, | 215 | .gpccon_mask = 0xffffc0f0, |
209 | .gpcup= 0x0000ffff, | 216 | .gpcup = 0x0000ffff, |
210 | .gpcup_mask= 0xffffffff, | 217 | .gpcup_mask = 0xffffffff, |
211 | .gpdcon= 0xaa84aaa0, | 218 | .gpdcon = 0xaa84aaa0, |
212 | .gpdcon_mask= 0xffffffff, | 219 | .gpdcon_mask = 0xffffffff, |
213 | .gpdup= 0x0000faff, | 220 | .gpdup = 0x0000faff, |
214 | .gpdup_mask= 0xffffffff, | 221 | .gpdup_mask = 0xffffffff, |
215 | }; | 222 | }; |
216 | 223 | ||
217 | static struct platform_device h1940_device_leds = { | 224 | static int power_supply_init(struct device *dev) |
218 | .name = "h1940-leds", | 225 | { |
226 | return gpio_request(S3C2410_GPF(2), "cable plugged"); | ||
227 | } | ||
228 | |||
229 | static int h1940_is_ac_online(void) | ||
230 | { | ||
231 | return !gpio_get_value(S3C2410_GPF(2)); | ||
232 | } | ||
233 | |||
234 | static void power_supply_exit(struct device *dev) | ||
235 | { | ||
236 | gpio_free(S3C2410_GPF(2)); | ||
237 | } | ||
238 | |||
239 | static char *h1940_supplicants[] = { | ||
240 | "main-battery", | ||
241 | "backup-battery", | ||
242 | }; | ||
243 | |||
244 | static struct pda_power_pdata power_supply_info = { | ||
245 | .init = power_supply_init, | ||
246 | .is_ac_online = h1940_is_ac_online, | ||
247 | .exit = power_supply_exit, | ||
248 | .supplied_to = h1940_supplicants, | ||
249 | .num_supplicants = ARRAY_SIZE(h1940_supplicants), | ||
250 | }; | ||
251 | |||
252 | static struct resource power_supply_resources[] = { | ||
253 | [0] = { | ||
254 | .name = "ac", | ||
255 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE | | ||
256 | IORESOURCE_IRQ_HIGHEDGE, | ||
257 | .start = IRQ_EINT2, | ||
258 | .end = IRQ_EINT2, | ||
259 | }, | ||
260 | }; | ||
261 | |||
262 | static struct platform_device power_supply = { | ||
263 | .name = "pda-power", | ||
264 | .id = -1, | ||
265 | .dev = { | ||
266 | .platform_data = | ||
267 | &power_supply_info, | ||
268 | }, | ||
269 | .resource = power_supply_resources, | ||
270 | .num_resources = ARRAY_SIZE(power_supply_resources), | ||
271 | }; | ||
272 | |||
273 | static const struct s3c_adc_bat_thresh bat_lut_noac[] = { | ||
274 | { .volt = 4070, .cur = 162, .level = 100}, | ||
275 | { .volt = 4040, .cur = 165, .level = 95}, | ||
276 | { .volt = 4016, .cur = 164, .level = 90}, | ||
277 | { .volt = 3996, .cur = 166, .level = 85}, | ||
278 | { .volt = 3971, .cur = 168, .level = 80}, | ||
279 | { .volt = 3951, .cur = 168, .level = 75}, | ||
280 | { .volt = 3931, .cur = 170, .level = 70}, | ||
281 | { .volt = 3903, .cur = 172, .level = 65}, | ||
282 | { .volt = 3886, .cur = 172, .level = 60}, | ||
283 | { .volt = 3858, .cur = 176, .level = 55}, | ||
284 | { .volt = 3842, .cur = 176, .level = 50}, | ||
285 | { .volt = 3818, .cur = 176, .level = 45}, | ||
286 | { .volt = 3789, .cur = 180, .level = 40}, | ||
287 | { .volt = 3769, .cur = 180, .level = 35}, | ||
288 | { .volt = 3749, .cur = 184, .level = 30}, | ||
289 | { .volt = 3732, .cur = 184, .level = 25}, | ||
290 | { .volt = 3716, .cur = 184, .level = 20}, | ||
291 | { .volt = 3708, .cur = 184, .level = 15}, | ||
292 | { .volt = 3716, .cur = 96, .level = 10}, | ||
293 | { .volt = 3700, .cur = 96, .level = 5}, | ||
294 | { .volt = 3684, .cur = 96, .level = 0}, | ||
295 | }; | ||
296 | |||
297 | static const struct s3c_adc_bat_thresh bat_lut_acin[] = { | ||
298 | { .volt = 4130, .cur = 0, .level = 100}, | ||
299 | { .volt = 3982, .cur = 0, .level = 50}, | ||
300 | { .volt = 3854, .cur = 0, .level = 10}, | ||
301 | { .volt = 3841, .cur = 0, .level = 0}, | ||
302 | }; | ||
303 | |||
304 | int h1940_bat_init(void) | ||
305 | { | ||
306 | int ret; | ||
307 | |||
308 | ret = gpio_request(H1940_LATCH_SM803_ENABLE, "h1940-charger-enable"); | ||
309 | if (ret) | ||
310 | return ret; | ||
311 | gpio_direction_output(H1940_LATCH_SM803_ENABLE, 0); | ||
312 | |||
313 | return 0; | ||
314 | |||
315 | } | ||
316 | |||
317 | void h1940_bat_exit(void) | ||
318 | { | ||
319 | gpio_free(H1940_LATCH_SM803_ENABLE); | ||
320 | } | ||
321 | |||
322 | void h1940_enable_charger(void) | ||
323 | { | ||
324 | gpio_set_value(H1940_LATCH_SM803_ENABLE, 1); | ||
325 | } | ||
326 | |||
327 | void h1940_disable_charger(void) | ||
328 | { | ||
329 | gpio_set_value(H1940_LATCH_SM803_ENABLE, 0); | ||
330 | } | ||
331 | |||
332 | static struct s3c_adc_bat_pdata h1940_bat_cfg = { | ||
333 | .init = h1940_bat_init, | ||
334 | .exit = h1940_bat_exit, | ||
335 | .enable_charger = h1940_enable_charger, | ||
336 | .disable_charger = h1940_disable_charger, | ||
337 | .gpio_charge_finished = S3C2410_GPF(3), | ||
338 | .gpio_inverted = 1, | ||
339 | .lut_noac = bat_lut_noac, | ||
340 | .lut_noac_cnt = ARRAY_SIZE(bat_lut_noac), | ||
341 | .lut_acin = bat_lut_acin, | ||
342 | .lut_acin_cnt = ARRAY_SIZE(bat_lut_acin), | ||
343 | .volt_channel = 0, | ||
344 | .current_channel = 1, | ||
345 | .volt_mult = 4056, | ||
346 | .current_mult = 1893, | ||
347 | .internal_impedance = 200, | ||
348 | .backup_volt_channel = 3, | ||
349 | /* TODO Check backup volt multiplier */ | ||
350 | .backup_volt_mult = 4056, | ||
351 | .backup_volt_min = 0, | ||
352 | .backup_volt_max = 4149288 | ||
353 | }; | ||
354 | |||
355 | static struct platform_device h1940_battery = { | ||
356 | .name = "s3c-adc-battery", | ||
219 | .id = -1, | 357 | .id = -1, |
358 | .dev = { | ||
359 | .parent = &s3c_device_adc.dev, | ||
360 | .platform_data = &h1940_bat_cfg, | ||
361 | }, | ||
362 | }; | ||
363 | |||
364 | DEFINE_SPINLOCK(h1940_blink_spin); | ||
365 | |||
366 | int h1940_led_blink_set(unsigned gpio, int state, | ||
367 | unsigned long *delay_on, unsigned long *delay_off) | ||
368 | { | ||
369 | int blink_gpio, check_gpio1, check_gpio2; | ||
370 | |||
371 | switch (gpio) { | ||
372 | case H1940_LATCH_LED_GREEN: | ||
373 | blink_gpio = S3C2410_GPA(7); | ||
374 | check_gpio1 = S3C2410_GPA(1); | ||
375 | check_gpio2 = S3C2410_GPA(3); | ||
376 | break; | ||
377 | case H1940_LATCH_LED_RED: | ||
378 | blink_gpio = S3C2410_GPA(1); | ||
379 | check_gpio1 = S3C2410_GPA(7); | ||
380 | check_gpio2 = S3C2410_GPA(3); | ||
381 | break; | ||
382 | default: | ||
383 | blink_gpio = S3C2410_GPA(3); | ||
384 | check_gpio1 = S3C2410_GPA(1); | ||
385 | check_gpio1 = S3C2410_GPA(7); | ||
386 | break; | ||
387 | } | ||
388 | |||
389 | if (delay_on && delay_off && !*delay_on && !*delay_off) | ||
390 | *delay_on = *delay_off = 500; | ||
391 | |||
392 | spin_lock(&h1940_blink_spin); | ||
393 | |||
394 | switch (state) { | ||
395 | case GPIO_LED_NO_BLINK_LOW: | ||
396 | case GPIO_LED_NO_BLINK_HIGH: | ||
397 | if (!gpio_get_value(check_gpio1) && | ||
398 | !gpio_get_value(check_gpio2)) | ||
399 | gpio_set_value(H1940_LATCH_LED_FLASH, 0); | ||
400 | gpio_set_value(blink_gpio, 0); | ||
401 | if (gpio_is_valid(gpio)) | ||
402 | gpio_set_value(gpio, state); | ||
403 | break; | ||
404 | case GPIO_LED_BLINK: | ||
405 | if (gpio_is_valid(gpio)) | ||
406 | gpio_set_value(gpio, 0); | ||
407 | gpio_set_value(H1940_LATCH_LED_FLASH, 1); | ||
408 | gpio_set_value(blink_gpio, 1); | ||
409 | break; | ||
410 | } | ||
411 | |||
412 | spin_unlock(&h1940_blink_spin); | ||
413 | |||
414 | return 0; | ||
415 | } | ||
416 | EXPORT_SYMBOL(h1940_led_blink_set); | ||
417 | |||
418 | static struct gpio_led h1940_leds_desc[] = { | ||
419 | { | ||
420 | .name = "Green", | ||
421 | .default_trigger = "main-battery-full", | ||
422 | .gpio = H1940_LATCH_LED_GREEN, | ||
423 | .retain_state_suspended = 1, | ||
424 | }, | ||
425 | { | ||
426 | .name = "Red", | ||
427 | .default_trigger | ||
428 | = "main-battery-charging-blink-full-solid", | ||
429 | .gpio = H1940_LATCH_LED_RED, | ||
430 | .retain_state_suspended = 1, | ||
431 | }, | ||
432 | }; | ||
433 | |||
434 | static struct gpio_led_platform_data h1940_leds_pdata = { | ||
435 | .num_leds = ARRAY_SIZE(h1940_leds_desc), | ||
436 | .leds = h1940_leds_desc, | ||
437 | .gpio_blink_set = h1940_led_blink_set, | ||
438 | }; | ||
439 | |||
440 | static struct platform_device h1940_device_leds = { | ||
441 | .name = "leds-gpio", | ||
442 | .id = -1, | ||
443 | .dev = { | ||
444 | .platform_data = &h1940_leds_pdata, | ||
445 | }, | ||
220 | }; | 446 | }; |
221 | 447 | ||
222 | static struct platform_device h1940_device_bluetooth = { | 448 | static struct platform_device h1940_device_bluetooth = { |
@@ -302,14 +528,14 @@ static struct platform_device h1940_backlight = { | |||
302 | static void h1940_lcd_power_set(struct plat_lcd_data *pd, | 528 | static void h1940_lcd_power_set(struct plat_lcd_data *pd, |
303 | unsigned int power) | 529 | unsigned int power) |
304 | { | 530 | { |
305 | int value; | 531 | int value, retries = 100; |
306 | 532 | ||
307 | if (!power) { | 533 | if (!power) { |
308 | gpio_set_value(S3C2410_GPC(0), 0); | 534 | gpio_set_value(S3C2410_GPC(0), 0); |
309 | /* wait for 3ac */ | 535 | /* wait for 3ac */ |
310 | do { | 536 | do { |
311 | value = gpio_get_value(S3C2410_GPC(6)); | 537 | value = gpio_get_value(S3C2410_GPC(6)); |
312 | } while (value); | 538 | } while (value && retries--); |
313 | 539 | ||
314 | gpio_set_value(H1940_LATCH_LCD_P2, 0); | 540 | gpio_set_value(H1940_LATCH_LCD_P2, 0); |
315 | gpio_set_value(H1940_LATCH_LCD_P3, 0); | 541 | gpio_set_value(H1940_LATCH_LCD_P3, 0); |
@@ -327,6 +553,9 @@ static void h1940_lcd_power_set(struct plat_lcd_data *pd, | |||
327 | gpio_set_value(H1940_LATCH_LCD_P0, 1); | 553 | gpio_set_value(H1940_LATCH_LCD_P0, 1); |
328 | gpio_set_value(H1940_LATCH_LCD_P1, 1); | 554 | gpio_set_value(H1940_LATCH_LCD_P1, 1); |
329 | 555 | ||
556 | gpio_direction_input(S3C2410_GPC(1)); | ||
557 | gpio_direction_input(S3C2410_GPC(4)); | ||
558 | mdelay(10); | ||
330 | s3c_gpio_cfgpin(S3C2410_GPC(1), S3C_GPIO_SFN(2)); | 559 | s3c_gpio_cfgpin(S3C2410_GPC(1), S3C_GPIO_SFN(2)); |
331 | s3c_gpio_cfgpin(S3C2410_GPC(4), S3C_GPIO_SFN(2)); | 560 | s3c_gpio_cfgpin(S3C2410_GPC(4), S3C_GPIO_SFN(2)); |
332 | 561 | ||
@@ -362,7 +591,44 @@ static struct i2c_board_info h1940_i2c_devices[] = { | |||
362 | }, | 591 | }, |
363 | }; | 592 | }; |
364 | 593 | ||
594 | #define DECLARE_BUTTON(p, k, n, w) \ | ||
595 | { \ | ||
596 | .gpio = p, \ | ||
597 | .code = k, \ | ||
598 | .desc = n, \ | ||
599 | .wakeup = w, \ | ||
600 | .active_low = 1, \ | ||
601 | } | ||
602 | |||
603 | static struct gpio_keys_button h1940_buttons[] = { | ||
604 | DECLARE_BUTTON(S3C2410_GPF(0), KEY_POWER, "Power", 1), | ||
605 | DECLARE_BUTTON(S3C2410_GPF(6), KEY_ENTER, "Select", 1), | ||
606 | DECLARE_BUTTON(S3C2410_GPF(7), KEY_RECORD, "Record", 0), | ||
607 | DECLARE_BUTTON(S3C2410_GPG(0), KEY_F11, "Calendar", 0), | ||
608 | DECLARE_BUTTON(S3C2410_GPG(2), KEY_F12, "Contacts", 0), | ||
609 | DECLARE_BUTTON(S3C2410_GPG(3), KEY_MAIL, "Mail", 0), | ||
610 | DECLARE_BUTTON(S3C2410_GPG(6), KEY_LEFT, "Left_arrow", 0), | ||
611 | DECLARE_BUTTON(S3C2410_GPG(7), KEY_HOMEPAGE, "Home", 0), | ||
612 | DECLARE_BUTTON(S3C2410_GPG(8), KEY_RIGHT, "Right_arrow", 0), | ||
613 | DECLARE_BUTTON(S3C2410_GPG(9), KEY_UP, "Up_arrow", 0), | ||
614 | DECLARE_BUTTON(S3C2410_GPG(10), KEY_DOWN, "Down_arrow", 0), | ||
615 | }; | ||
616 | |||
617 | static struct gpio_keys_platform_data h1940_buttons_data = { | ||
618 | .buttons = h1940_buttons, | ||
619 | .nbuttons = ARRAY_SIZE(h1940_buttons), | ||
620 | }; | ||
621 | |||
622 | static struct platform_device h1940_dev_buttons = { | ||
623 | .name = "gpio-keys", | ||
624 | .id = -1, | ||
625 | .dev = { | ||
626 | .platform_data = &h1940_buttons_data, | ||
627 | } | ||
628 | }; | ||
629 | |||
365 | static struct platform_device *h1940_devices[] __initdata = { | 630 | static struct platform_device *h1940_devices[] __initdata = { |
631 | &h1940_dev_buttons, | ||
366 | &s3c_device_ohci, | 632 | &s3c_device_ohci, |
367 | &s3c_device_lcd, | 633 | &s3c_device_lcd, |
368 | &s3c_device_wdt, | 634 | &s3c_device_wdt, |
@@ -379,6 +645,8 @@ static struct platform_device *h1940_devices[] __initdata = { | |||
379 | &h1940_lcd_powerdev, | 645 | &h1940_lcd_powerdev, |
380 | &s3c_device_adc, | 646 | &s3c_device_adc, |
381 | &s3c_device_ts, | 647 | &s3c_device_ts, |
648 | &power_supply, | ||
649 | &h1940_battery, | ||
382 | }; | 650 | }; |
383 | 651 | ||
384 | static void __init h1940_map_io(void) | 652 | static void __init h1940_map_io(void) |
@@ -461,6 +729,15 @@ static void __init h1940_init(void) | |||
461 | 729 | ||
462 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); | 730 | platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); |
463 | 731 | ||
732 | gpio_request(S3C2410_GPA(1), "Red LED blink"); | ||
733 | gpio_request(S3C2410_GPA(3), "Blue LED blink"); | ||
734 | gpio_request(S3C2410_GPA(7), "Green LED blink"); | ||
735 | gpio_request(H1940_LATCH_LED_FLASH, "LED blink"); | ||
736 | gpio_direction_output(S3C2410_GPA(1), 0); | ||
737 | gpio_direction_output(S3C2410_GPA(3), 0); | ||
738 | gpio_direction_output(S3C2410_GPA(7), 0); | ||
739 | gpio_direction_output(H1940_LATCH_LED_FLASH, 0); | ||
740 | |||
464 | i2c_register_board_info(0, h1940_i2c_devices, | 741 | i2c_register_board_info(0, h1940_i2c_devices, |
465 | ARRAY_SIZE(h1940_i2c_devices)); | 742 | ARRAY_SIZE(h1940_i2c_devices)); |
466 | } | 743 | } |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index d80f129bca94..dfedc9c9e005 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
@@ -488,6 +488,11 @@ static struct i2c_board_info mini2440_i2c_devs[] __initdata = { | |||
488 | }, | 488 | }, |
489 | }; | 489 | }; |
490 | 490 | ||
491 | static struct platform_device uda1340_codec = { | ||
492 | .name = "uda134x-codec", | ||
493 | .id = -1, | ||
494 | }; | ||
495 | |||
491 | static struct platform_device *mini2440_devices[] __initdata = { | 496 | static struct platform_device *mini2440_devices[] __initdata = { |
492 | &s3c_device_ohci, | 497 | &s3c_device_ohci, |
493 | &s3c_device_wdt, | 498 | &s3c_device_wdt, |
@@ -503,7 +508,9 @@ static struct platform_device *mini2440_devices[] __initdata = { | |||
503 | &s3c_device_nand, | 508 | &s3c_device_nand, |
504 | &s3c_device_sdi, | 509 | &s3c_device_sdi, |
505 | &s3c_device_iis, | 510 | &s3c_device_iis, |
511 | &uda1340_codec, | ||
506 | &mini2440_audio, | 512 | &mini2440_audio, |
513 | &samsung_asoc_dma, | ||
507 | }; | 514 | }; |
508 | 515 | ||
509 | static void __init mini2440_map_io(void) | 516 | static void __init mini2440_map_io(void) |
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c index 86bbc233b31c..27ea95096fe1 100644 --- a/arch/arm/mach-s3c2440/mach-rx1950.c +++ b/arch/arm/mach-s3c2440/mach-rx1950.c | |||
@@ -263,27 +263,78 @@ void rx1950_disable_charger(void) | |||
263 | gpio_direction_output(S3C2410_GPJ(3), 0); | 263 | gpio_direction_output(S3C2410_GPJ(3), 0); |
264 | } | 264 | } |
265 | 265 | ||
266 | DEFINE_SPINLOCK(rx1950_blink_spin); | ||
267 | |||
268 | static int rx1950_led_blink_set(unsigned gpio, int state, | ||
269 | unsigned long *delay_on, unsigned long *delay_off) | ||
270 | { | ||
271 | int blink_gpio, check_gpio; | ||
272 | |||
273 | switch (gpio) { | ||
274 | case S3C2410_GPA(6): | ||
275 | blink_gpio = S3C2410_GPA(4); | ||
276 | check_gpio = S3C2410_GPA(3); | ||
277 | break; | ||
278 | case S3C2410_GPA(7): | ||
279 | blink_gpio = S3C2410_GPA(3); | ||
280 | check_gpio = S3C2410_GPA(4); | ||
281 | break; | ||
282 | default: | ||
283 | return -EINVAL; | ||
284 | break; | ||
285 | } | ||
286 | |||
287 | if (delay_on && delay_off && !*delay_on && !*delay_off) | ||
288 | *delay_on = *delay_off = 500; | ||
289 | |||
290 | spin_lock(&rx1950_blink_spin); | ||
291 | |||
292 | switch (state) { | ||
293 | case GPIO_LED_NO_BLINK_LOW: | ||
294 | case GPIO_LED_NO_BLINK_HIGH: | ||
295 | if (!gpio_get_value(check_gpio)) | ||
296 | gpio_set_value(S3C2410_GPJ(6), 0); | ||
297 | gpio_set_value(blink_gpio, 0); | ||
298 | gpio_set_value(gpio, state); | ||
299 | break; | ||
300 | case GPIO_LED_BLINK: | ||
301 | gpio_set_value(gpio, 0); | ||
302 | gpio_set_value(S3C2410_GPJ(6), 1); | ||
303 | gpio_set_value(blink_gpio, 1); | ||
304 | break; | ||
305 | } | ||
306 | |||
307 | spin_unlock(&rx1950_blink_spin); | ||
308 | |||
309 | return 0; | ||
310 | } | ||
311 | |||
266 | static struct gpio_led rx1950_leds_desc[] = { | 312 | static struct gpio_led rx1950_leds_desc[] = { |
267 | { | 313 | { |
268 | .name = "Green", | 314 | .name = "Green", |
269 | .default_trigger = "main-battery-charging-or-full", | 315 | .default_trigger = "main-battery-full", |
270 | .gpio = S3C2410_GPA(6), | 316 | .gpio = S3C2410_GPA(6), |
317 | .retain_state_suspended = 1, | ||
271 | }, | 318 | }, |
272 | { | 319 | { |
273 | .name = "Red", | 320 | .name = "Red", |
274 | .default_trigger = "main-battery-full", | 321 | .default_trigger |
275 | .gpio = S3C2410_GPA(7), | 322 | = "main-battery-charging-blink-full-solid", |
323 | .gpio = S3C2410_GPA(7), | ||
324 | .retain_state_suspended = 1, | ||
276 | }, | 325 | }, |
277 | { | 326 | { |
278 | .name = "Blue", | 327 | .name = "Blue", |
279 | .default_trigger = "rx1950-acx-mem", | 328 | .default_trigger = "rx1950-acx-mem", |
280 | .gpio = S3C2410_GPA(11), | 329 | .gpio = S3C2410_GPA(11), |
330 | .retain_state_suspended = 1, | ||
281 | }, | 331 | }, |
282 | }; | 332 | }; |
283 | 333 | ||
284 | static struct gpio_led_platform_data rx1950_leds_pdata = { | 334 | static struct gpio_led_platform_data rx1950_leds_pdata = { |
285 | .num_leds = ARRAY_SIZE(rx1950_leds_desc), | 335 | .num_leds = ARRAY_SIZE(rx1950_leds_desc), |
286 | .leds = rx1950_leds_desc, | 336 | .leds = rx1950_leds_desc, |
337 | .gpio_blink_set = rx1950_led_blink_set, | ||
287 | }; | 338 | }; |
288 | 339 | ||
289 | static struct platform_device rx1950_leds = { | 340 | static struct platform_device rx1950_leds = { |
@@ -752,6 +803,13 @@ static void __init rx1950_init_machine(void) | |||
752 | 803 | ||
753 | WARN_ON(gpio_request(S3C2410_GPB(1), "LCD power")); | 804 | WARN_ON(gpio_request(S3C2410_GPB(1), "LCD power")); |
754 | 805 | ||
806 | WARN_ON(gpio_request(S3C2410_GPA(3), "Red blink")); | ||
807 | WARN_ON(gpio_request(S3C2410_GPA(4), "Green blink")); | ||
808 | WARN_ON(gpio_request(S3C2410_GPJ(6), "LED blink")); | ||
809 | gpio_direction_output(S3C2410_GPA(3), 0); | ||
810 | gpio_direction_output(S3C2410_GPA(4), 0); | ||
811 | gpio_direction_output(S3C2410_GPJ(6), 0); | ||
812 | |||
755 | platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); | 813 | platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); |
756 | 814 | ||
757 | i2c_register_board_info(0, rx1950_i2c_devices, | 815 | i2c_register_board_info(0, rx1950_i2c_devices, |
diff --git a/arch/arm/plat-nomadik/include/plat/ste_dma40.h b/arch/arm/plat-nomadik/include/plat/ste_dma40.h index 4d6dd4c39b75..c44886062f8e 100644 --- a/arch/arm/plat-nomadik/include/plat/ste_dma40.h +++ b/arch/arm/plat-nomadik/include/plat/ste_dma40.h | |||
@@ -104,6 +104,8 @@ struct stedma40_half_channel_info { | |||
104 | * | 104 | * |
105 | * @dir: MEM 2 MEM, PERIPH 2 MEM , MEM 2 PERIPH, PERIPH 2 PERIPH | 105 | * @dir: MEM 2 MEM, PERIPH 2 MEM , MEM 2 PERIPH, PERIPH 2 PERIPH |
106 | * @high_priority: true if high-priority | 106 | * @high_priority: true if high-priority |
107 | * @realtime: true if realtime mode is to be enabled. Only available on DMA40 | ||
108 | * version 3+, i.e DB8500v2+ | ||
107 | * @mode: channel mode: physical, logical, or operation | 109 | * @mode: channel mode: physical, logical, or operation |
108 | * @mode_opt: options for the chosen channel mode | 110 | * @mode_opt: options for the chosen channel mode |
109 | * @src_dev_type: Src device type | 111 | * @src_dev_type: Src device type |
@@ -119,6 +121,7 @@ struct stedma40_half_channel_info { | |||
119 | struct stedma40_chan_cfg { | 121 | struct stedma40_chan_cfg { |
120 | enum stedma40_xfer_dir dir; | 122 | enum stedma40_xfer_dir dir; |
121 | bool high_priority; | 123 | bool high_priority; |
124 | bool realtime; | ||
122 | enum stedma40_mode mode; | 125 | enum stedma40_mode mode; |
123 | enum stedma40_mode_opt mode_opt; | 126 | enum stedma40_mode_opt mode_opt; |
124 | int src_dev_type; | 127 | int src_dev_type; |
@@ -169,25 +172,6 @@ struct stedma40_platform_data { | |||
169 | bool stedma40_filter(struct dma_chan *chan, void *data); | 172 | bool stedma40_filter(struct dma_chan *chan, void *data); |
170 | 173 | ||
171 | /** | 174 | /** |
172 | * stedma40_memcpy_sg() - extension of the dma framework, memcpy to/from | ||
173 | * scattergatter lists. | ||
174 | * | ||
175 | * @chan: dmaengine handle | ||
176 | * @sgl_dst: Destination scatter list | ||
177 | * @sgl_src: Source scatter list | ||
178 | * @sgl_len: The length of each scatterlist. Both lists must be of equal length | ||
179 | * and each element must match the corresponding element in the other scatter | ||
180 | * list. | ||
181 | * @flags: is actually enum dma_ctrl_flags. See dmaengine.h | ||
182 | */ | ||
183 | |||
184 | struct dma_async_tx_descriptor *stedma40_memcpy_sg(struct dma_chan *chan, | ||
185 | struct scatterlist *sgl_dst, | ||
186 | struct scatterlist *sgl_src, | ||
187 | unsigned int sgl_len, | ||
188 | unsigned long flags); | ||
189 | |||
190 | /** | ||
191 | * stedma40_slave_mem() - Transfers a raw data buffer to or from a slave | 175 | * stedma40_slave_mem() - Transfers a raw data buffer to or from a slave |
192 | * (=device) | 176 | * (=device) |
193 | * | 177 | * |
diff --git a/arch/arm/plat-pxa/include/plat/i2c.h b/arch/arm/plat-pxa/include/plat/i2c.h deleted file mode 100644 index 1a9f65e6ec0f..000000000000 --- a/arch/arm/plat-pxa/include/plat/i2c.h +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * i2c_pxa.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intrinsyc Software Inc. | ||
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 | #ifndef _I2C_PXA_H_ | ||
12 | #define _I2C_PXA_H_ | ||
13 | |||
14 | #if 0 | ||
15 | #define DEF_TIMEOUT 3 | ||
16 | #else | ||
17 | /* need a longer timeout if we're dealing with the fact we may well be | ||
18 | * looking at a multi-master environment | ||
19 | */ | ||
20 | #define DEF_TIMEOUT 32 | ||
21 | #endif | ||
22 | |||
23 | #define BUS_ERROR (-EREMOTEIO) | ||
24 | #define XFER_NAKED (-ECONNREFUSED) | ||
25 | #define I2C_RETRY (-2000) /* an error has occurred retry transmit */ | ||
26 | |||
27 | /* ICR initialize bit values | ||
28 | * | ||
29 | * 15. FM 0 (100 Khz operation) | ||
30 | * 14. UR 0 (No unit reset) | ||
31 | * 13. SADIE 0 (Disables the unit from interrupting on slave addresses | ||
32 | * matching its slave address) | ||
33 | * 12. ALDIE 0 (Disables the unit from interrupt when it loses arbitration | ||
34 | * in master mode) | ||
35 | * 11. SSDIE 0 (Disables interrupts from a slave stop detected, in slave mode) | ||
36 | * 10. BEIE 1 (Enable interrupts from detected bus errors, no ACK sent) | ||
37 | * 9. IRFIE 1 (Enable interrupts from full buffer received) | ||
38 | * 8. ITEIE 1 (Enables the I2C unit to interrupt when transmit buffer empty) | ||
39 | * 7. GCD 1 (Disables i2c unit response to general call messages as a slave) | ||
40 | * 6. IUE 0 (Disable unit until we change settings) | ||
41 | * 5. SCLE 1 (Enables the i2c clock output for master mode (drives SCL) | ||
42 | * 4. MA 0 (Only send stop with the ICR stop bit) | ||
43 | * 3. TB 0 (We are not transmitting a byte initially) | ||
44 | * 2. ACKNAK 0 (Send an ACK after the unit receives a byte) | ||
45 | * 1. STOP 0 (Do not send a STOP) | ||
46 | * 0. START 0 (Do not send a START) | ||
47 | * | ||
48 | */ | ||
49 | #define I2C_ICR_INIT (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE) | ||
50 | |||
51 | /* I2C status register init values | ||
52 | * | ||
53 | * 10. BED 1 (Clear bus error detected) | ||
54 | * 9. SAD 1 (Clear slave address detected) | ||
55 | * 7. IRF 1 (Clear IDBR Receive Full) | ||
56 | * 6. ITE 1 (Clear IDBR Transmit Empty) | ||
57 | * 5. ALD 1 (Clear Arbitration Loss Detected) | ||
58 | * 4. SSD 1 (Clear Slave Stop Detected) | ||
59 | */ | ||
60 | #define I2C_ISR_INIT 0x7FF /* status register init */ | ||
61 | |||
62 | struct i2c_slave_client; | ||
63 | |||
64 | struct i2c_pxa_platform_data { | ||
65 | unsigned int slave_addr; | ||
66 | struct i2c_slave_client *slave; | ||
67 | unsigned int class; | ||
68 | unsigned int use_pio :1; | ||
69 | unsigned int fast_mode :1; | ||
70 | }; | ||
71 | |||
72 | extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info); | ||
73 | |||
74 | #ifdef CONFIG_PXA27x | ||
75 | extern void pxa27x_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
76 | #endif | ||
77 | |||
78 | #ifdef CONFIG_PXA3xx | ||
79 | extern void pxa3xx_set_i2c_power_info(struct i2c_pxa_platform_data *info); | ||
80 | #endif | ||
81 | |||
82 | #endif | ||
diff --git a/arch/avr32/include/asm/types.h b/arch/avr32/include/asm/types.h index 9cefda6f534a..72667a3b1af7 100644 --- a/arch/avr32/include/asm/types.h +++ b/arch/avr32/include/asm/types.h | |||
@@ -23,14 +23,6 @@ typedef unsigned short umode_t; | |||
23 | 23 | ||
24 | #define BITS_PER_LONG 32 | 24 | #define BITS_PER_LONG 32 |
25 | 25 | ||
26 | #ifndef __ASSEMBLY__ | ||
27 | |||
28 | /* Dma addresses are 32-bits wide. */ | ||
29 | |||
30 | typedef u32 dma_addr_t; | ||
31 | |||
32 | #endif /* __ASSEMBLY__ */ | ||
33 | |||
34 | #endif /* __KERNEL__ */ | 26 | #endif /* __KERNEL__ */ |
35 | 27 | ||
36 | 28 | ||
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index e67c99945428..bfc9d071db9b 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c | |||
@@ -2048,6 +2048,11 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data, | |||
2048 | rx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT; | 2048 | rx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT; |
2049 | rx_dws->cfg_hi = DWC_CFGH_SRC_PER(3); | 2049 | rx_dws->cfg_hi = DWC_CFGH_SRC_PER(3); |
2050 | rx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); | 2050 | rx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); |
2051 | rx_dws->src_master = 0; | ||
2052 | rx_dws->dst_master = 1; | ||
2053 | rx_dws->src_msize = DW_DMA_MSIZE_1; | ||
2054 | rx_dws->dst_msize = DW_DMA_MSIZE_1; | ||
2055 | rx_dws->fc = DW_DMA_FC_D_P2M; | ||
2051 | } | 2056 | } |
2052 | 2057 | ||
2053 | /* Check if DMA slave interface for playback should be configured. */ | 2058 | /* Check if DMA slave interface for playback should be configured. */ |
@@ -2056,6 +2061,11 @@ at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data, | |||
2056 | tx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT; | 2061 | tx_dws->reg_width = DW_DMA_SLAVE_WIDTH_16BIT; |
2057 | tx_dws->cfg_hi = DWC_CFGH_DST_PER(4); | 2062 | tx_dws->cfg_hi = DWC_CFGH_DST_PER(4); |
2058 | tx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); | 2063 | tx_dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); |
2064 | tx_dws->src_master = 0; | ||
2065 | tx_dws->dst_master = 1; | ||
2066 | tx_dws->src_msize = DW_DMA_MSIZE_1; | ||
2067 | tx_dws->dst_msize = DW_DMA_MSIZE_1; | ||
2068 | tx_dws->fc = DW_DMA_FC_D_M2P; | ||
2059 | } | 2069 | } |
2060 | 2070 | ||
2061 | if (platform_device_add_data(pdev, data, | 2071 | if (platform_device_add_data(pdev, data, |
@@ -2128,6 +2138,11 @@ at32_add_device_abdac(unsigned int id, struct atmel_abdac_pdata *data) | |||
2128 | dws->reg_width = DW_DMA_SLAVE_WIDTH_32BIT; | 2138 | dws->reg_width = DW_DMA_SLAVE_WIDTH_32BIT; |
2129 | dws->cfg_hi = DWC_CFGH_DST_PER(2); | 2139 | dws->cfg_hi = DWC_CFGH_DST_PER(2); |
2130 | dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); | 2140 | dws->cfg_lo &= ~(DWC_CFGL_HS_DST_POL | DWC_CFGL_HS_SRC_POL); |
2141 | dws->src_master = 0; | ||
2142 | dws->dst_master = 1; | ||
2143 | dws->src_msize = DW_DMA_MSIZE_1; | ||
2144 | dws->dst_msize = DW_DMA_MSIZE_1; | ||
2145 | dws->fc = DW_DMA_FC_D_M2P; | ||
2131 | 2146 | ||
2132 | if (platform_device_add_data(pdev, data, | 2147 | if (platform_device_add_data(pdev, data, |
2133 | sizeof(struct atmel_abdac_pdata))) | 2148 | sizeof(struct atmel_abdac_pdata))) |
diff --git a/arch/cris/include/asm/thread_info.h b/arch/cris/include/asm/thread_info.h index 91776069ca80..29b74a105830 100644 --- a/arch/cris/include/asm/thread_info.h +++ b/arch/cris/include/asm/thread_info.h | |||
@@ -68,7 +68,7 @@ struct thread_info { | |||
68 | #define init_thread_info (init_thread_union.thread_info) | 68 | #define init_thread_info (init_thread_union.thread_info) |
69 | 69 | ||
70 | /* thread information allocation */ | 70 | /* thread information allocation */ |
71 | #define alloc_thread_info(tsk) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) | 71 | #define alloc_thread_info(tsk, node) ((struct thread_info *) __get_free_pages(GFP_KERNEL,1)) |
72 | #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) | 72 | #define free_thread_info(ti) free_pages((unsigned long) (ti), 1) |
73 | 73 | ||
74 | #endif /* !__ASSEMBLY__ */ | 74 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/cris/include/asm/types.h b/arch/cris/include/asm/types.h index 5790262cbe8a..44055087c932 100644 --- a/arch/cris/include/asm/types.h +++ b/arch/cris/include/asm/types.h | |||
@@ -18,9 +18,6 @@ typedef unsigned short umode_t; | |||
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | /* Dma addresses are 32-bits wide, just like our other addresses. */ | ||
22 | |||
23 | typedef u32 dma_addr_t; | ||
24 | typedef u32 dma64_addr_t; | 21 | typedef u32 dma64_addr_t; |
25 | 22 | ||
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/frv/include/asm/processor.h b/arch/frv/include/asm/processor.h index 3744f2e47f48..4b789ab182b0 100644 --- a/arch/frv/include/asm/processor.h +++ b/arch/frv/include/asm/processor.h | |||
@@ -137,7 +137,7 @@ unsigned long get_wchan(struct task_struct *p); | |||
137 | #define KSTK_ESP(tsk) ((tsk)->thread.frame0->sp) | 137 | #define KSTK_ESP(tsk) ((tsk)->thread.frame0->sp) |
138 | 138 | ||
139 | /* Allocation and freeing of basic task resources. */ | 139 | /* Allocation and freeing of basic task resources. */ |
140 | extern struct task_struct *alloc_task_struct(void); | 140 | extern struct task_struct *alloc_task_struct_node(int node); |
141 | extern void free_task_struct(struct task_struct *p); | 141 | extern void free_task_struct(struct task_struct *p); |
142 | 142 | ||
143 | #define cpu_relax() barrier() | 143 | #define cpu_relax() barrier() |
diff --git a/arch/frv/include/asm/thread_info.h b/arch/frv/include/asm/thread_info.h index 11f33ead29bf..8582e9c7531c 100644 --- a/arch/frv/include/asm/thread_info.h +++ b/arch/frv/include/asm/thread_info.h | |||
@@ -84,16 +84,11 @@ register struct thread_info *__current_thread_info asm("gr15"); | |||
84 | 84 | ||
85 | /* thread information allocation */ | 85 | /* thread information allocation */ |
86 | #ifdef CONFIG_DEBUG_STACK_USAGE | 86 | #ifdef CONFIG_DEBUG_STACK_USAGE |
87 | #define alloc_thread_info(tsk) \ | 87 | #define alloc_thread_info_node(tsk, node) \ |
88 | ({ \ | 88 | kzalloc_node(THREAD_SIZE, GFP_KERNEL, node) |
89 | struct thread_info *ret; \ | ||
90 | \ | ||
91 | ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \ | ||
92 | \ | ||
93 | ret; \ | ||
94 | }) | ||
95 | #else | 89 | #else |
96 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) | 90 | #define alloc_thread_info_node(tsk) \ |
91 | kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
97 | #endif | 92 | #endif |
98 | 93 | ||
99 | #define free_thread_info(info) kfree(info) | 94 | #define free_thread_info(info) kfree(info) |
diff --git a/arch/frv/include/asm/types.h b/arch/frv/include/asm/types.h index 613bf1e962f0..aa3e7fdc7f29 100644 --- a/arch/frv/include/asm/types.h +++ b/arch/frv/include/asm/types.h | |||
@@ -27,14 +27,6 @@ typedef unsigned short umode_t; | |||
27 | 27 | ||
28 | #define BITS_PER_LONG 32 | 28 | #define BITS_PER_LONG 32 |
29 | 29 | ||
30 | #ifndef __ASSEMBLY__ | ||
31 | |||
32 | /* Dma addresses are 32-bits wide. */ | ||
33 | |||
34 | typedef u32 dma_addr_t; | ||
35 | |||
36 | #endif /* __ASSEMBLY__ */ | ||
37 | |||
38 | #endif /* __KERNEL__ */ | 30 | #endif /* __KERNEL__ */ |
39 | 31 | ||
40 | #endif /* _ASM_TYPES_H */ | 32 | #endif /* _ASM_TYPES_H */ |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index efad12071c2e..9d3597526467 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -44,9 +44,10 @@ asmlinkage void ret_from_fork(void); | |||
44 | void (*pm_power_off)(void); | 44 | void (*pm_power_off)(void); |
45 | EXPORT_SYMBOL(pm_power_off); | 45 | EXPORT_SYMBOL(pm_power_off); |
46 | 46 | ||
47 | struct task_struct *alloc_task_struct(void) | 47 | struct task_struct *alloc_task_struct_node(int node) |
48 | { | 48 | { |
49 | struct task_struct *p = kmalloc(THREAD_SIZE, GFP_KERNEL); | 49 | struct task_struct *p = kmalloc_node(THREAD_SIZE, GFP_KERNEL, node); |
50 | |||
50 | if (p) | 51 | if (p) |
51 | atomic_set((atomic_t *)(p+1), 1); | 52 | atomic_set((atomic_t *)(p+1), 1); |
52 | return p; | 53 | return p; |
diff --git a/arch/h8300/include/asm/types.h b/arch/h8300/include/asm/types.h index 12875190b156..bb2c91a3522e 100644 --- a/arch/h8300/include/asm/types.h +++ b/arch/h8300/include/asm/types.h | |||
@@ -22,10 +22,6 @@ typedef unsigned short umode_t; | |||
22 | 22 | ||
23 | #define BITS_PER_LONG 32 | 23 | #define BITS_PER_LONG 32 |
24 | 24 | ||
25 | /* Dma addresses are 32-bits wide. */ | ||
26 | |||
27 | typedef u32 dma_addr_t; | ||
28 | |||
29 | #endif /* __KERNEL__ */ | 25 | #endif /* __KERNEL__ */ |
30 | 26 | ||
31 | #endif /* __ASSEMBLY__ */ | 27 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/ia64/include/asm/thread_info.h b/arch/ia64/include/asm/thread_info.h index b6a5ba2aca34..6392908e8f98 100644 --- a/arch/ia64/include/asm/thread_info.h +++ b/arch/ia64/include/asm/thread_info.h | |||
@@ -59,11 +59,12 @@ struct thread_info { | |||
59 | #ifndef ASM_OFFSETS_C | 59 | #ifndef ASM_OFFSETS_C |
60 | /* how to get the thread information struct from C */ | 60 | /* how to get the thread information struct from C */ |
61 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) | 61 | #define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) |
62 | #define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | 62 | #define alloc_thread_info_node(tsk, node) \ |
63 | ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | ||
63 | #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) | 64 | #define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) |
64 | #else | 65 | #else |
65 | #define current_thread_info() ((struct thread_info *) 0) | 66 | #define current_thread_info() ((struct thread_info *) 0) |
66 | #define alloc_thread_info(tsk) ((struct thread_info *) 0) | 67 | #define alloc_thread_info_node(tsk, node) ((struct thread_info *) 0) |
67 | #define task_thread_info(tsk) ((struct thread_info *) 0) | 68 | #define task_thread_info(tsk) ((struct thread_info *) 0) |
68 | #endif | 69 | #endif |
69 | #define free_thread_info(ti) /* nothing */ | 70 | #define free_thread_info(ti) /* nothing */ |
@@ -84,7 +85,14 @@ struct thread_info { | |||
84 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) | 85 | #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET) |
85 | 86 | ||
86 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR | 87 | #define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR |
87 | #define alloc_task_struct() ((struct task_struct *)__get_free_pages(GFP_KERNEL | __GFP_COMP, KERNEL_STACK_SIZE_ORDER)) | 88 | #define alloc_task_struct_node(node) \ |
89 | ({ \ | ||
90 | struct page *page = alloc_pages_node(node, GFP_KERNEL | __GFP_COMP, \ | ||
91 | KERNEL_STACK_SIZE_ORDER); \ | ||
92 | struct task_struct *ret = page ? page_address(page) : NULL; \ | ||
93 | \ | ||
94 | ret; | ||
95 | }) | ||
88 | #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) | 96 | #define free_task_struct(tsk) free_pages((unsigned long) (tsk), KERNEL_STACK_SIZE_ORDER) |
89 | 97 | ||
90 | #endif /* !__ASSEMBLY */ | 98 | #endif /* !__ASSEMBLY */ |
diff --git a/arch/ia64/include/asm/types.h b/arch/ia64/include/asm/types.h index 93773fd37be0..82b3939d2718 100644 --- a/arch/ia64/include/asm/types.h +++ b/arch/ia64/include/asm/types.h | |||
@@ -40,9 +40,6 @@ struct fnptr { | |||
40 | unsigned long gp; | 40 | unsigned long gp; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | /* DMA addresses are 64-bits wide, in general. */ | ||
44 | typedef u64 dma_addr_t; | ||
45 | |||
46 | # endif /* __KERNEL__ */ | 43 | # endif /* __KERNEL__ */ |
47 | #endif /* !__ASSEMBLY__ */ | 44 | #endif /* !__ASSEMBLY__ */ |
48 | 45 | ||
diff --git a/arch/m32r/include/asm/thread_info.h b/arch/m32r/include/asm/thread_info.h index 71faff5bcc27..0227dba44068 100644 --- a/arch/m32r/include/asm/thread_info.h +++ b/arch/m32r/include/asm/thread_info.h | |||
@@ -96,16 +96,11 @@ static inline struct thread_info *current_thread_info(void) | |||
96 | 96 | ||
97 | /* thread information allocation */ | 97 | /* thread information allocation */ |
98 | #ifdef CONFIG_DEBUG_STACK_USAGE | 98 | #ifdef CONFIG_DEBUG_STACK_USAGE |
99 | #define alloc_thread_info(tsk) \ | 99 | #define alloc_thread_info_node(tsk, node) \ |
100 | ({ \ | 100 | kzalloc_node(THREAD_SIZE, GFP_KERNEL, node) |
101 | struct thread_info *ret; \ | ||
102 | \ | ||
103 | ret = kzalloc(THREAD_SIZE, GFP_KERNEL); \ | ||
104 | \ | ||
105 | ret; \ | ||
106 | }) | ||
107 | #else | 101 | #else |
108 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) | 102 | #define alloc_thread_info_node(tsk, node) \ |
103 | kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
109 | #endif | 104 | #endif |
110 | 105 | ||
111 | #define free_thread_info(info) kfree(info) | 106 | #define free_thread_info(info) kfree(info) |
diff --git a/arch/m32r/include/asm/types.h b/arch/m32r/include/asm/types.h index bc9f7fff0ac3..fd84b4898e30 100644 --- a/arch/m32r/include/asm/types.h +++ b/arch/m32r/include/asm/types.h | |||
@@ -18,9 +18,6 @@ typedef unsigned short umode_t; | |||
18 | 18 | ||
19 | #ifndef __ASSEMBLY__ | 19 | #ifndef __ASSEMBLY__ |
20 | 20 | ||
21 | /* DMA addresses are 32-bits wide. */ | ||
22 | |||
23 | typedef u32 dma_addr_t; | ||
24 | typedef u64 dma64_addr_t; | 21 | typedef u64 dma64_addr_t; |
25 | 22 | ||
26 | #endif /* __ASSEMBLY__ */ | 23 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/m68k/include/asm/types.h b/arch/m68k/include/asm/types.h index 6441cb5f8e7c..10ad92f1c173 100644 --- a/arch/m68k/include/asm/types.h +++ b/arch/m68k/include/asm/types.h | |||
@@ -25,9 +25,6 @@ typedef unsigned short umode_t; | |||
25 | 25 | ||
26 | #ifndef __ASSEMBLY__ | 26 | #ifndef __ASSEMBLY__ |
27 | 27 | ||
28 | /* DMA addresses are always 32-bits wide */ | ||
29 | |||
30 | typedef u32 dma_addr_t; | ||
31 | typedef u32 dma64_addr_t; | 28 | typedef u32 dma64_addr_t; |
32 | 29 | ||
33 | #endif /* __ASSEMBLY__ */ | 30 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h index d309556cacf8..d71160de4d10 100644 --- a/arch/mips/include/asm/thread_info.h +++ b/arch/mips/include/asm/thread_info.h | |||
@@ -88,9 +88,11 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
88 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | 88 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR |
89 | 89 | ||
90 | #ifdef CONFIG_DEBUG_STACK_USAGE | 90 | #ifdef CONFIG_DEBUG_STACK_USAGE |
91 | #define alloc_thread_info(tsk) kzalloc(THREAD_SIZE, GFP_KERNEL) | 91 | #define alloc_thread_info_node(tsk, node) \ |
92 | kzalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
92 | #else | 93 | #else |
93 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) | 94 | #define alloc_thread_info_node(tsk, node) \ |
95 | kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
94 | #endif | 96 | #endif |
95 | 97 | ||
96 | #define free_thread_info(info) kfree(info) | 98 | #define free_thread_info(info) kfree(info) |
diff --git a/arch/mips/include/asm/types.h b/arch/mips/include/asm/types.h index 544a2854598f..9520dc894989 100644 --- a/arch/mips/include/asm/types.h +++ b/arch/mips/include/asm/types.h | |||
@@ -33,12 +33,6 @@ typedef unsigned short umode_t; | |||
33 | #ifdef __KERNEL__ | 33 | #ifdef __KERNEL__ |
34 | #ifndef __ASSEMBLY__ | 34 | #ifndef __ASSEMBLY__ |
35 | 35 | ||
36 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ | ||
37 | || defined(CONFIG_64BIT) | ||
38 | typedef u64 dma_addr_t; | ||
39 | #else | ||
40 | typedef u32 dma_addr_t; | ||
41 | #endif | ||
42 | typedef u64 dma64_addr_t; | 36 | typedef u64 dma64_addr_t; |
43 | 37 | ||
44 | /* | 38 | /* |
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h index aa07a4a5d794..8d53f09c878d 100644 --- a/arch/mn10300/include/asm/thread_info.h +++ b/arch/mn10300/include/asm/thread_info.h | |||
@@ -124,9 +124,11 @@ static inline unsigned long current_stack_pointer(void) | |||
124 | 124 | ||
125 | /* thread information allocation */ | 125 | /* thread information allocation */ |
126 | #ifdef CONFIG_DEBUG_STACK_USAGE | 126 | #ifdef CONFIG_DEBUG_STACK_USAGE |
127 | #define alloc_thread_info(tsk) kzalloc(THREAD_SIZE, GFP_KERNEL) | 127 | #define alloc_thread_info_node(tsk, node) \ |
128 | kzalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
128 | #else | 129 | #else |
129 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) | 130 | #define alloc_thread_info_node(tsk, node) \ |
131 | kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) | ||
130 | #endif | 132 | #endif |
131 | 133 | ||
132 | #define free_thread_info(ti) kfree((ti)) | 134 | #define free_thread_info(ti) kfree((ti)) |
diff --git a/arch/mn10300/include/asm/types.h b/arch/mn10300/include/asm/types.h index 7b9f01042fd4..c1833eb192e3 100644 --- a/arch/mn10300/include/asm/types.h +++ b/arch/mn10300/include/asm/types.h | |||
@@ -26,13 +26,6 @@ typedef unsigned short umode_t; | |||
26 | 26 | ||
27 | #define BITS_PER_LONG 32 | 27 | #define BITS_PER_LONG 32 |
28 | 28 | ||
29 | #ifndef __ASSEMBLY__ | ||
30 | |||
31 | /* Dma addresses are 32-bits wide. */ | ||
32 | typedef u32 dma_addr_t; | ||
33 | |||
34 | #endif /* __ASSEMBLY__ */ | ||
35 | |||
36 | #endif /* __KERNEL__ */ | 29 | #endif /* __KERNEL__ */ |
37 | 30 | ||
38 | #endif /* _ASM_TYPES_H */ | 31 | #endif /* _ASM_TYPES_H */ |
diff --git a/arch/parisc/include/asm/types.h b/arch/parisc/include/asm/types.h index 20135cc80039..bc164ddffb78 100644 --- a/arch/parisc/include/asm/types.h +++ b/arch/parisc/include/asm/types.h | |||
@@ -16,9 +16,6 @@ typedef unsigned short umode_t; | |||
16 | 16 | ||
17 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
18 | 18 | ||
19 | /* Dma addresses are 32-bits wide. */ | ||
20 | |||
21 | typedef u32 dma_addr_t; | ||
22 | typedef u64 dma64_addr_t; | 19 | typedef u64 dma64_addr_t; |
23 | 20 | ||
24 | #endif /* __ASSEMBLY__ */ | 21 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/powerpc/include/asm/thread_info.h b/arch/powerpc/include/asm/thread_info.h index 65eb85976a03..d8529ef13b23 100644 --- a/arch/powerpc/include/asm/thread_info.h +++ b/arch/powerpc/include/asm/thread_info.h | |||
@@ -72,7 +72,7 @@ struct thread_info { | |||
72 | 72 | ||
73 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | 73 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR |
74 | 74 | ||
75 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); | 75 | extern struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node); |
76 | extern void free_thread_info(struct thread_info *ti); | 76 | extern void free_thread_info(struct thread_info *ti); |
77 | 77 | ||
78 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ | 78 | #endif /* THREAD_SHIFT < PAGE_SHIFT */ |
diff --git a/arch/powerpc/include/asm/types.h b/arch/powerpc/include/asm/types.h index a5aea0ca34e9..e16a6b2d96f1 100644 --- a/arch/powerpc/include/asm/types.h +++ b/arch/powerpc/include/asm/types.h | |||
@@ -44,11 +44,6 @@ typedef struct { | |||
44 | 44 | ||
45 | typedef __vector128 vector128; | 45 | typedef __vector128 vector128; |
46 | 46 | ||
47 | #if defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT) | ||
48 | typedef u64 dma_addr_t; | ||
49 | #else | ||
50 | typedef u32 dma_addr_t; | ||
51 | #endif | ||
52 | typedef u64 dma64_addr_t; | 47 | typedef u64 dma64_addr_t; |
53 | 48 | ||
54 | typedef struct { | 49 | typedef struct { |
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 8303a6c65ef7..f74f355a9617 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
@@ -1218,11 +1218,11 @@ void __ppc64_runlatch_off(void) | |||
1218 | 1218 | ||
1219 | static struct kmem_cache *thread_info_cache; | 1219 | static struct kmem_cache *thread_info_cache; |
1220 | 1220 | ||
1221 | struct thread_info *alloc_thread_info(struct task_struct *tsk) | 1221 | struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node) |
1222 | { | 1222 | { |
1223 | struct thread_info *ti; | 1223 | struct thread_info *ti; |
1224 | 1224 | ||
1225 | ti = kmem_cache_alloc(thread_info_cache, GFP_KERNEL); | 1225 | ti = kmem_cache_alloc_node(thread_info_cache, GFP_KERNEL, node); |
1226 | if (unlikely(ti == NULL)) | 1226 | if (unlikely(ti == NULL)) |
1227 | return NULL; | 1227 | return NULL; |
1228 | #ifdef CONFIG_DEBUG_STACK_USAGE | 1228 | #ifdef CONFIG_DEBUG_STACK_USAGE |
diff --git a/arch/s390/include/asm/types.h b/arch/s390/include/asm/types.h index 04d6b95a89c6..f7f6ae6bed8f 100644 --- a/arch/s390/include/asm/types.h +++ b/arch/s390/include/asm/types.h | |||
@@ -31,12 +31,6 @@ typedef __signed__ long saddr_t; | |||
31 | #ifndef __ASSEMBLY__ | 31 | #ifndef __ASSEMBLY__ |
32 | 32 | ||
33 | typedef u64 dma64_addr_t; | 33 | typedef u64 dma64_addr_t; |
34 | #ifdef __s390x__ | ||
35 | /* DMA addresses come in 32-bit and 64-bit flavours. */ | ||
36 | typedef u64 dma_addr_t; | ||
37 | #else | ||
38 | typedef u32 dma_addr_t; | ||
39 | #endif | ||
40 | 34 | ||
41 | #ifndef __s390x__ | 35 | #ifndef __s390x__ |
42 | typedef union { | 36 | typedef union { |
diff --git a/arch/score/include/asm/thread_info.h b/arch/score/include/asm/thread_info.h index 8570d08f58c1..2205c62284db 100644 --- a/arch/score/include/asm/thread_info.h +++ b/arch/score/include/asm/thread_info.h | |||
@@ -71,7 +71,7 @@ struct thread_info { | |||
71 | register struct thread_info *__current_thread_info __asm__("r28"); | 71 | register struct thread_info *__current_thread_info __asm__("r28"); |
72 | #define current_thread_info() __current_thread_info | 72 | #define current_thread_info() __current_thread_info |
73 | 73 | ||
74 | #define alloc_thread_info(tsk) kmalloc(THREAD_SIZE, GFP_KERNEL) | 74 | #define alloc_thread_info_node(tsk, node) kmalloc_node(THREAD_SIZE, GFP_KERNEL, node) |
75 | #define free_thread_info(info) kfree(info) | 75 | #define free_thread_info(info) kfree(info) |
76 | 76 | ||
77 | #endif /* !__ASSEMBLY__ */ | 77 | #endif /* !__ASSEMBLY__ */ |
diff --git a/arch/sh/include/asm/thread_info.h b/arch/sh/include/asm/thread_info.h index c228946926ed..ea2d5089de1e 100644 --- a/arch/sh/include/asm/thread_info.h +++ b/arch/sh/include/asm/thread_info.h | |||
@@ -95,7 +95,7 @@ static inline struct thread_info *current_thread_info(void) | |||
95 | 95 | ||
96 | #endif | 96 | #endif |
97 | 97 | ||
98 | extern struct thread_info *alloc_thread_info(struct task_struct *tsk); | 98 | extern struct thread_info *alloc_thread_info_node(struct task_struct *tsk, int node); |
99 | extern void free_thread_info(struct thread_info *ti); | 99 | extern void free_thread_info(struct thread_info *ti); |
100 | extern void arch_task_cache_init(void); | 100 | extern void arch_task_cache_init(void); |
101 | #define arch_task_cache_init arch_task_cache_init | 101 | #define arch_task_cache_init arch_task_cache_init |
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index dcb126dc76fd..f39ad57296b7 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -32,16 +32,16 @@ void free_thread_xstate(struct task_struct *tsk) | |||
32 | #if THREAD_SHIFT < PAGE_SHIFT | 32 | #if THREAD_SHIFT < PAGE_SHIFT |
33 | static struct kmem_cache *thread_info_cache; | 33 | static struct kmem_cache *thread_info_cache; |
34 | 34 | ||
35 | struct thread_info *alloc_thread_info(struct task_struct *tsk) | 35 | struct thread_info *alloc_thread_info(struct task_struct *tsk, int node) |
36 | { | 36 | { |
37 | struct thread_info *ti; | 37 | struct thread_info *ti; |
38 | |||
39 | ti = kmem_cache_alloc(thread_info_cache, GFP_KERNEL); | ||
40 | if (unlikely(ti == NULL)) | ||
41 | return NULL; | ||
42 | #ifdef CONFIG_DEBUG_STACK_USAGE | 38 | #ifdef CONFIG_DEBUG_STACK_USAGE |
43 | memset(ti, 0, THREAD_SIZE); | 39 | gfp_t mask = GFP_KERNEL | __GFP_ZERO; |
40 | #else | ||
41 | gfp_t mask = GFP_KERNEL; | ||
44 | #endif | 42 | #endif |
43 | |||
44 | ti = kmem_cache_alloc_node(thread_info_cache, mask, node); | ||
45 | return ti; | 45 | return ti; |
46 | } | 46 | } |
47 | 47 | ||
@@ -64,7 +64,9 @@ struct thread_info *alloc_thread_info(struct task_struct *tsk) | |||
64 | #else | 64 | #else |
65 | gfp_t mask = GFP_KERNEL; | 65 | gfp_t mask = GFP_KERNEL; |
66 | #endif | 66 | #endif |
67 | return (struct thread_info *)__get_free_pages(mask, THREAD_SIZE_ORDER); | 67 | struct page *page = alloc_pages_node(node, mask, THREAD_SIZE_ORDER); |
68 | |||
69 | return page ? page_address(page) : NULL; | ||
68 | } | 70 | } |
69 | 71 | ||
70 | void free_thread_info(struct thread_info *ti) | 72 | void free_thread_info(struct thread_info *ti) |
diff --git a/arch/sparc/include/asm/thread_info_32.h b/arch/sparc/include/asm/thread_info_32.h index 9dd0318d3ddf..fa5753233410 100644 --- a/arch/sparc/include/asm/thread_info_32.h +++ b/arch/sparc/include/asm/thread_info_32.h | |||
@@ -82,8 +82,8 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
82 | 82 | ||
83 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | 83 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR |
84 | 84 | ||
85 | BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info, void) | 85 | BTFIXUPDEF_CALL(struct thread_info *, alloc_thread_info_node, int) |
86 | #define alloc_thread_info(tsk) BTFIXUP_CALL(alloc_thread_info)() | 86 | #define alloc_thread_info_node(tsk, node) BTFIXUP_CALL(alloc_thread_info_node)(node) |
87 | 87 | ||
88 | BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) | 88 | BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) |
89 | #define free_thread_info(ti) BTFIXUP_CALL(free_thread_info)(ti) | 89 | #define free_thread_info(ti) BTFIXUP_CALL(free_thread_info)(ti) |
@@ -92,7 +92,7 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *) | |||
92 | 92 | ||
93 | /* | 93 | /* |
94 | * Size of kernel stack for each process. | 94 | * Size of kernel stack for each process. |
95 | * Observe the order of get_free_pages() in alloc_thread_info(). | 95 | * Observe the order of get_free_pages() in alloc_thread_info_node(). |
96 | * The sun4 has 8K stack too, because it's short on memory, and 16K is a waste. | 96 | * The sun4 has 8K stack too, because it's short on memory, and 16K is a waste. |
97 | */ | 97 | */ |
98 | #define THREAD_SIZE 8192 | 98 | #define THREAD_SIZE 8192 |
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h index fb2ea7705a46..60d86be1a533 100644 --- a/arch/sparc/include/asm/thread_info_64.h +++ b/arch/sparc/include/asm/thread_info_64.h | |||
@@ -146,21 +146,21 @@ register struct thread_info *current_thread_info_reg asm("g6"); | |||
146 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | 146 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR |
147 | 147 | ||
148 | #ifdef CONFIG_DEBUG_STACK_USAGE | 148 | #ifdef CONFIG_DEBUG_STACK_USAGE |
149 | #define alloc_thread_info(tsk) \ | 149 | #define THREAD_FLAGS (GFP_KERNEL | __GFP_ZERO) |
150 | ({ \ | ||
151 | struct thread_info *ret; \ | ||
152 | \ | ||
153 | ret = (struct thread_info *) \ | ||
154 | __get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER); \ | ||
155 | if (ret) \ | ||
156 | memset(ret, 0, PAGE_SIZE<<__THREAD_INFO_ORDER); \ | ||
157 | ret; \ | ||
158 | }) | ||
159 | #else | 150 | #else |
160 | #define alloc_thread_info(tsk) \ | 151 | #define THREAD_FLAGS (GFP_KERNEL) |
161 | ((struct thread_info *)__get_free_pages(GFP_KERNEL, __THREAD_INFO_ORDER)) | ||
162 | #endif | 152 | #endif |
163 | 153 | ||
154 | #define alloc_thread_info_node(tsk, node) \ | ||
155 | ({ \ | ||
156 | struct page *page = alloc_pages_node(node, THREAD_FLAGS, \ | ||
157 | __THREAD_INFO_ORDER); \ | ||
158 | struct thread_info *ret; \ | ||
159 | \ | ||
160 | ret = page ? page_address(page) : NULL; \ | ||
161 | ret; \ | ||
162 | }) | ||
163 | |||
164 | #define free_thread_info(ti) \ | 164 | #define free_thread_info(ti) \ |
165 | free_pages((unsigned long)(ti),__THREAD_INFO_ORDER) | 165 | free_pages((unsigned long)(ti),__THREAD_INFO_ORDER) |
166 | 166 | ||
diff --git a/arch/sparc/include/asm/types.h b/arch/sparc/include/asm/types.h index 09c79a9c8516..f02d330cb9f1 100644 --- a/arch/sparc/include/asm/types.h +++ b/arch/sparc/include/asm/types.h | |||
@@ -22,10 +22,6 @@ typedef unsigned short umode_t; | |||
22 | 22 | ||
23 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
24 | 24 | ||
25 | /* Dma addresses come in generic and 64-bit flavours. */ | ||
26 | |||
27 | typedef u32 dma_addr_t; | ||
28 | |||
29 | #if defined(__arch64__) | 25 | #if defined(__arch64__) |
30 | 26 | ||
31 | /*** SPARC 64 bit ***/ | 27 | /*** SPARC 64 bit ***/ |
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 92319aa8b662..fe09fd8be695 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -650,7 +650,7 @@ static void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len) | |||
650 | * mappings on the kernel stack without any special code as we did | 650 | * mappings on the kernel stack without any special code as we did |
651 | * need on the sun4c. | 651 | * need on the sun4c. |
652 | */ | 652 | */ |
653 | static struct thread_info *srmmu_alloc_thread_info(void) | 653 | static struct thread_info *srmmu_alloc_thread_info_node(int node) |
654 | { | 654 | { |
655 | struct thread_info *ret; | 655 | struct thread_info *ret; |
656 | 656 | ||
@@ -2271,7 +2271,7 @@ void __init ld_mmu_srmmu(void) | |||
2271 | 2271 | ||
2272 | BTFIXUPSET_CALL(mmu_info, srmmu_mmu_info, BTFIXUPCALL_NORM); | 2272 | BTFIXUPSET_CALL(mmu_info, srmmu_mmu_info, BTFIXUPCALL_NORM); |
2273 | 2273 | ||
2274 | BTFIXUPSET_CALL(alloc_thread_info, srmmu_alloc_thread_info, BTFIXUPCALL_NORM); | 2274 | BTFIXUPSET_CALL(alloc_thread_info_node, srmmu_alloc_thread_info_node, BTFIXUPCALL_NORM); |
2275 | BTFIXUPSET_CALL(free_thread_info, srmmu_free_thread_info, BTFIXUPCALL_NORM); | 2275 | BTFIXUPSET_CALL(free_thread_info, srmmu_free_thread_info, BTFIXUPCALL_NORM); |
2276 | 2276 | ||
2277 | BTFIXUPSET_CALL(pte_to_pgoff, srmmu_pte_to_pgoff, BTFIXUPCALL_NORM); | 2277 | BTFIXUPSET_CALL(pte_to_pgoff, srmmu_pte_to_pgoff, BTFIXUPCALL_NORM); |
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index b5137cc2aba3..a2350b5e68aa 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
@@ -922,7 +922,7 @@ static inline void garbage_collect(int entry) | |||
922 | free_locked_segment(BUCKET_ADDR(entry)); | 922 | free_locked_segment(BUCKET_ADDR(entry)); |
923 | } | 923 | } |
924 | 924 | ||
925 | static struct thread_info *sun4c_alloc_thread_info(void) | 925 | static struct thread_info *sun4c_alloc_thread_info_node(int node) |
926 | { | 926 | { |
927 | unsigned long addr, pages; | 927 | unsigned long addr, pages; |
928 | int entry; | 928 | int entry; |
@@ -2155,7 +2155,7 @@ void __init ld_mmu_sun4c(void) | |||
2155 | BTFIXUPSET_CALL(__swp_offset, sun4c_swp_offset, BTFIXUPCALL_NORM); | 2155 | BTFIXUPSET_CALL(__swp_offset, sun4c_swp_offset, BTFIXUPCALL_NORM); |
2156 | BTFIXUPSET_CALL(__swp_entry, sun4c_swp_entry, BTFIXUPCALL_NORM); | 2156 | BTFIXUPSET_CALL(__swp_entry, sun4c_swp_entry, BTFIXUPCALL_NORM); |
2157 | 2157 | ||
2158 | BTFIXUPSET_CALL(alloc_thread_info, sun4c_alloc_thread_info, BTFIXUPCALL_NORM); | 2158 | BTFIXUPSET_CALL(alloc_thread_info_node, sun4c_alloc_thread_info_node, BTFIXUPCALL_NORM); |
2159 | BTFIXUPSET_CALL(free_thread_info, sun4c_free_thread_info, BTFIXUPCALL_NORM); | 2159 | BTFIXUPSET_CALL(free_thread_info, sun4c_free_thread_info, BTFIXUPCALL_NORM); |
2160 | 2160 | ||
2161 | BTFIXUPSET_CALL(mmu_info, sun4c_mmu_info, BTFIXUPCALL_NORM); | 2161 | BTFIXUPSET_CALL(mmu_info, sun4c_mmu_info, BTFIXUPCALL_NORM); |
diff --git a/arch/tile/include/asm/thread_info.h b/arch/tile/include/asm/thread_info.h index 9e8e9c4dfa2a..3405b52853b8 100644 --- a/arch/tile/include/asm/thread_info.h +++ b/arch/tile/include/asm/thread_info.h | |||
@@ -84,7 +84,7 @@ register unsigned long stack_pointer __asm__("sp"); | |||
84 | ((struct thread_info *)(stack_pointer & -THREAD_SIZE)) | 84 | ((struct thread_info *)(stack_pointer & -THREAD_SIZE)) |
85 | 85 | ||
86 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | 86 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR |
87 | extern struct thread_info *alloc_thread_info(struct task_struct *task); | 87 | extern struct thread_info *alloc_thread_info_node(struct task_struct *task, int node); |
88 | extern void free_thread_info(struct thread_info *info); | 88 | extern void free_thread_info(struct thread_info *info); |
89 | 89 | ||
90 | /* Sit on a nap instruction until interrupted. */ | 90 | /* Sit on a nap instruction until interrupted. */ |
diff --git a/arch/tile/kernel/process.c b/arch/tile/kernel/process.c index b9cd962e1d30..d0065103eb7b 100644 --- a/arch/tile/kernel/process.c +++ b/arch/tile/kernel/process.c | |||
@@ -109,7 +109,7 @@ void cpu_idle(void) | |||
109 | } | 109 | } |
110 | } | 110 | } |
111 | 111 | ||
112 | struct thread_info *alloc_thread_info(struct task_struct *task) | 112 | struct thread_info *alloc_thread_info_node(struct task_struct *task, int node) |
113 | { | 113 | { |
114 | struct page *page; | 114 | struct page *page; |
115 | gfp_t flags = GFP_KERNEL; | 115 | gfp_t flags = GFP_KERNEL; |
@@ -118,7 +118,7 @@ struct thread_info *alloc_thread_info(struct task_struct *task) | |||
118 | flags |= __GFP_ZERO; | 118 | flags |= __GFP_ZERO; |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | page = alloc_pages(flags, THREAD_SIZE_ORDER); | 121 | page = alloc_pages_node(node, flags, THREAD_SIZE_ORDER); |
122 | if (!page) | 122 | if (!page) |
123 | return NULL; | 123 | return NULL; |
124 | 124 | ||
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 050e4ddbbb65..35dd0b86401a 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -255,8 +255,8 @@ static const struct { | |||
255 | { KDSIGACCEPT, KERN_INFO, "KDSIGACCEPT" }, | 255 | { KDSIGACCEPT, KERN_INFO, "KDSIGACCEPT" }, |
256 | }; | 256 | }; |
257 | 257 | ||
258 | int line_ioctl(struct tty_struct *tty, struct file * file, | 258 | int line_ioctl(struct tty_struct *tty, unsigned int cmd, |
259 | unsigned int cmd, unsigned long arg) | 259 | unsigned long arg) |
260 | { | 260 | { |
261 | int ret; | 261 | int ret; |
262 | int i; | 262 | int i; |
diff --git a/arch/um/include/asm/processor-generic.h b/arch/um/include/asm/processor-generic.h index bed668824b5f..d1d1b0d8a0cd 100644 --- a/arch/um/include/asm/processor-generic.h +++ b/arch/um/include/asm/processor-generic.h | |||
@@ -66,7 +66,7 @@ struct thread_struct { | |||
66 | .request = { 0 } \ | 66 | .request = { 0 } \ |
67 | } | 67 | } |
68 | 68 | ||
69 | extern struct task_struct *alloc_task_struct(void); | 69 | extern struct task_struct *alloc_task_struct_node(int node); |
70 | 70 | ||
71 | static inline void release_thread(struct task_struct *task) | 71 | static inline void release_thread(struct task_struct *task) |
72 | { | 72 | { |
diff --git a/arch/um/include/shared/line.h b/arch/um/include/shared/line.h index 311a0d3d93af..72f4f25af247 100644 --- a/arch/um/include/shared/line.h +++ b/arch/um/include/shared/line.h | |||
@@ -77,8 +77,8 @@ extern int line_chars_in_buffer(struct tty_struct *tty); | |||
77 | extern void line_flush_buffer(struct tty_struct *tty); | 77 | extern void line_flush_buffer(struct tty_struct *tty); |
78 | extern void line_flush_chars(struct tty_struct *tty); | 78 | extern void line_flush_chars(struct tty_struct *tty); |
79 | extern int line_write_room(struct tty_struct *tty); | 79 | extern int line_write_room(struct tty_struct *tty); |
80 | extern int line_ioctl(struct tty_struct *tty, struct file * file, | 80 | extern int line_ioctl(struct tty_struct *tty, unsigned int cmd, |
81 | unsigned int cmd, unsigned long arg); | 81 | unsigned long arg); |
82 | extern void line_throttle(struct tty_struct *tty); | 82 | extern void line_throttle(struct tty_struct *tty); |
83 | extern void line_unthrottle(struct tty_struct *tty); | 83 | extern void line_unthrottle(struct tty_struct *tty); |
84 | 84 | ||
diff --git a/arch/um/sys-i386/asm/elf.h b/arch/um/sys-i386/asm/elf.h index a979a22a8d9f..d964a4111ac6 100644 --- a/arch/um/sys-i386/asm/elf.h +++ b/arch/um/sys-i386/asm/elf.h | |||
@@ -75,6 +75,8 @@ typedef struct user_i387_struct elf_fpregset_t; | |||
75 | pr_reg[16] = PT_REGS_SS(regs); \ | 75 | pr_reg[16] = PT_REGS_SS(regs); \ |
76 | } while (0); | 76 | } while (0); |
77 | 77 | ||
78 | #define task_pt_regs(t) (&(t)->thread.regs) | ||
79 | |||
78 | struct task_struct; | 80 | struct task_struct; |
79 | 81 | ||
80 | extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu); | 82 | extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu); |
diff --git a/arch/um/sys-x86_64/asm/elf.h b/arch/um/sys-x86_64/asm/elf.h index d760967f33a7..d6d5af376251 100644 --- a/arch/um/sys-x86_64/asm/elf.h +++ b/arch/um/sys-x86_64/asm/elf.h | |||
@@ -95,6 +95,8 @@ typedef struct user_i387_struct elf_fpregset_t; | |||
95 | (pr_reg)[25] = 0; \ | 95 | (pr_reg)[25] = 0; \ |
96 | (pr_reg)[26] = 0; | 96 | (pr_reg)[26] = 0; |
97 | 97 | ||
98 | #define task_pt_regs(t) (&(t)->thread.regs) | ||
99 | |||
98 | struct task_struct; | 100 | struct task_struct; |
99 | 101 | ||
100 | extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu); | 102 | extern int elf_core_copy_fpregs(struct task_struct *t, elf_fpregset_t *fpu); |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index e1f65c46bc93..d57ddd7573cc 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -123,7 +123,7 @@ config NEED_SG_DMA_LENGTH | |||
123 | def_bool y | 123 | def_bool y |
124 | 124 | ||
125 | config GENERIC_ISA_DMA | 125 | config GENERIC_ISA_DMA |
126 | def_bool y | 126 | def_bool ISA_DMA_API |
127 | 127 | ||
128 | config GENERIC_IOMAP | 128 | config GENERIC_IOMAP |
129 | def_bool y | 129 | def_bool y |
@@ -143,7 +143,7 @@ config GENERIC_GPIO | |||
143 | bool | 143 | bool |
144 | 144 | ||
145 | config ARCH_MAY_HAVE_PC_FDC | 145 | config ARCH_MAY_HAVE_PC_FDC |
146 | def_bool y | 146 | def_bool ISA_DMA_API |
147 | 147 | ||
148 | config RWSEM_GENERIC_SPINLOCK | 148 | config RWSEM_GENERIC_SPINLOCK |
149 | def_bool !X86_XADD | 149 | def_bool !X86_XADD |
@@ -2002,9 +2002,13 @@ source "drivers/pci/pcie/Kconfig" | |||
2002 | 2002 | ||
2003 | source "drivers/pci/Kconfig" | 2003 | source "drivers/pci/Kconfig" |
2004 | 2004 | ||
2005 | # x86_64 have no ISA slots, but do have ISA-style DMA. | 2005 | # x86_64 have no ISA slots, but can have ISA-style DMA. |
2006 | config ISA_DMA_API | 2006 | config ISA_DMA_API |
2007 | def_bool y | 2007 | bool "ISA-style DMA support" if (X86_64 && EXPERT) |
2008 | default y | ||
2009 | help | ||
2010 | Enables ISA-style DMA support for devices requiring such controllers. | ||
2011 | If unsure, say Y. | ||
2008 | 2012 | ||
2009 | if X86_32 | 2013 | if X86_32 |
2010 | 2014 | ||
diff --git a/arch/x86/include/asm/dma.h b/arch/x86/include/asm/dma.h index ca1098a7e580..97b6d8114a43 100644 --- a/arch/x86/include/asm/dma.h +++ b/arch/x86/include/asm/dma.h | |||
@@ -151,6 +151,7 @@ | |||
151 | #define DMA_AUTOINIT 0x10 | 151 | #define DMA_AUTOINIT 0x10 |
152 | 152 | ||
153 | 153 | ||
154 | #ifdef CONFIG_ISA_DMA_API | ||
154 | extern spinlock_t dma_spin_lock; | 155 | extern spinlock_t dma_spin_lock; |
155 | 156 | ||
156 | static inline unsigned long claim_dma_lock(void) | 157 | static inline unsigned long claim_dma_lock(void) |
@@ -164,6 +165,7 @@ static inline void release_dma_lock(unsigned long flags) | |||
164 | { | 165 | { |
165 | spin_unlock_irqrestore(&dma_spin_lock, flags); | 166 | spin_unlock_irqrestore(&dma_spin_lock, flags); |
166 | } | 167 | } |
168 | #endif /* CONFIG_ISA_DMA_API */ | ||
167 | 169 | ||
168 | /* enable/disable a specific DMA channel */ | 170 | /* enable/disable a specific DMA channel */ |
169 | static inline void enable_dma(unsigned int dmanr) | 171 | static inline void enable_dma(unsigned int dmanr) |
@@ -303,9 +305,11 @@ static inline int get_dma_residue(unsigned int dmanr) | |||
303 | } | 305 | } |
304 | 306 | ||
305 | 307 | ||
306 | /* These are in kernel/dma.c: */ | 308 | /* These are in kernel/dma.c because x86 uses CONFIG_GENERIC_ISA_DMA */ |
309 | #ifdef CONFIG_ISA_DMA_API | ||
307 | extern int request_dma(unsigned int dmanr, const char *device_id); | 310 | extern int request_dma(unsigned int dmanr, const char *device_id); |
308 | extern void free_dma(unsigned int dmanr); | 311 | extern void free_dma(unsigned int dmanr); |
312 | #endif | ||
309 | 313 | ||
310 | /* From PCI */ | 314 | /* From PCI */ |
311 | 315 | ||
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h index f0b6e5dbc5a0..1f2e61e28981 100644 --- a/arch/x86/include/asm/thread_info.h +++ b/arch/x86/include/asm/thread_info.h | |||
@@ -161,8 +161,14 @@ struct thread_info { | |||
161 | 161 | ||
162 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR | 162 | #define __HAVE_ARCH_THREAD_INFO_ALLOCATOR |
163 | 163 | ||
164 | #define alloc_thread_info(tsk) \ | 164 | #define alloc_thread_info_node(tsk, node) \ |
165 | ((struct thread_info *)__get_free_pages(THREAD_FLAGS, THREAD_ORDER)) | 165 | ({ \ |
166 | struct page *page = alloc_pages_node(node, THREAD_FLAGS, \ | ||
167 | THREAD_ORDER); \ | ||
168 | struct thread_info *ret = page ? page_address(page) : NULL; \ | ||
169 | \ | ||
170 | ret; \ | ||
171 | }) | ||
166 | 172 | ||
167 | #ifdef CONFIG_X86_32 | 173 | #ifdef CONFIG_X86_32 |
168 | 174 | ||
diff --git a/arch/x86/include/asm/types.h b/arch/x86/include/asm/types.h index df1da20f4534..88102055a4b8 100644 --- a/arch/x86/include/asm/types.h +++ b/arch/x86/include/asm/types.h | |||
@@ -1,20 +1,12 @@ | |||
1 | #ifndef _ASM_X86_TYPES_H | 1 | #ifndef _ASM_X86_TYPES_H |
2 | #define _ASM_X86_TYPES_H | 2 | #define _ASM_X86_TYPES_H |
3 | 3 | ||
4 | #define dma_addr_t dma_addr_t | ||
5 | |||
6 | #include <asm-generic/types.h> | 4 | #include <asm-generic/types.h> |
7 | 5 | ||
8 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
9 | #ifndef __ASSEMBLY__ | 7 | #ifndef __ASSEMBLY__ |
10 | 8 | ||
11 | typedef u64 dma64_addr_t; | 9 | typedef u64 dma64_addr_t; |
12 | #if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G) | ||
13 | /* DMA addresses come in 32-bit and 64-bit flavours. */ | ||
14 | typedef u64 dma_addr_t; | ||
15 | #else | ||
16 | typedef u32 dma_addr_t; | ||
17 | #endif | ||
18 | 10 | ||
19 | #endif /* __ASSEMBLY__ */ | 11 | #endif /* __ASSEMBLY__ */ |
20 | #endif /* __KERNEL__ */ | 12 | #endif /* __KERNEL__ */ |
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 743642f1a36c..7338ef2218bc 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -41,7 +41,7 @@ obj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o | |||
41 | obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o | 41 | obj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o |
42 | obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o | 42 | obj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o |
43 | obj-y += bootflag.o e820.o | 43 | obj-y += bootflag.o e820.o |
44 | obj-y += pci-dma.o quirks.o i8237.o topology.o kdebugfs.o | 44 | obj-y += pci-dma.o quirks.o topology.o kdebugfs.o |
45 | obj-y += alternative.o i8253.o pci-nommu.o hw_breakpoint.o | 45 | obj-y += alternative.o i8253.o pci-nommu.o hw_breakpoint.o |
46 | obj-y += tsc.o io_delay.o rtc.o | 46 | obj-y += tsc.o io_delay.o rtc.o |
47 | obj-y += pci-iommu_table.o | 47 | obj-y += pci-iommu_table.o |
@@ -55,6 +55,7 @@ obj-$(CONFIG_X86_32) += tls.o | |||
55 | obj-$(CONFIG_IA32_EMULATION) += tls.o | 55 | obj-$(CONFIG_IA32_EMULATION) += tls.o |
56 | obj-y += step.o | 56 | obj-y += step.o |
57 | obj-$(CONFIG_INTEL_TXT) += tboot.o | 57 | obj-$(CONFIG_INTEL_TXT) += tboot.o |
58 | obj-$(CONFIG_ISA_DMA_API) += i8237.o | ||
58 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 59 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
59 | obj-y += cpu/ | 60 | obj-y += cpu/ |
60 | obj-y += acpi/ | 61 | obj-y += acpi/ |
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 999e2793590b..81ac6c78c01c 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -322,16 +322,6 @@ void die(const char *str, struct pt_regs *regs, long err) | |||
322 | oops_end(flags, regs, sig); | 322 | oops_end(flags, regs, sig); |
323 | } | 323 | } |
324 | 324 | ||
325 | static int __init oops_setup(char *s) | ||
326 | { | ||
327 | if (!s) | ||
328 | return -EINVAL; | ||
329 | if (!strcmp(s, "panic")) | ||
330 | panic_on_oops = 1; | ||
331 | return 0; | ||
332 | } | ||
333 | early_param("oops", oops_setup); | ||
334 | |||
335 | static int __init kstack_setup(char *s) | 325 | static int __init kstack_setup(char *s) |
336 | { | 326 | { |
337 | if (!s) | 327 | if (!s) |
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 2d2673c28aff..5655c2272adb 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -77,9 +77,6 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
77 | /* Make NULL pointers segfault */ | 77 | /* Make NULL pointers segfault */ |
78 | zap_identity_mappings(); | 78 | zap_identity_mappings(); |
79 | 79 | ||
80 | /* Cleanup the over mapped high alias */ | ||
81 | cleanup_highmap(); | ||
82 | |||
83 | max_pfn_mapped = KERNEL_IMAGE_SIZE >> PAGE_SHIFT; | 80 | max_pfn_mapped = KERNEL_IMAGE_SIZE >> PAGE_SHIFT; |
84 | 81 | ||
85 | for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) { | 82 | for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) { |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 9d43b28e0728..32bd87cbf982 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -294,30 +294,11 @@ static void __init init_gbpages(void) | |||
294 | else | 294 | else |
295 | direct_gbpages = 0; | 295 | direct_gbpages = 0; |
296 | } | 296 | } |
297 | |||
298 | static void __init cleanup_highmap_brk_end(void) | ||
299 | { | ||
300 | pud_t *pud; | ||
301 | pmd_t *pmd; | ||
302 | |||
303 | mmu_cr4_features = read_cr4(); | ||
304 | |||
305 | /* | ||
306 | * _brk_end cannot change anymore, but it and _end may be | ||
307 | * located on different 2M pages. cleanup_highmap(), however, | ||
308 | * can only consider _end when it runs, so destroy any | ||
309 | * mappings beyond _brk_end here. | ||
310 | */ | ||
311 | pud = pud_offset(pgd_offset_k(_brk_end), _brk_end); | ||
312 | pmd = pmd_offset(pud, _brk_end - 1); | ||
313 | while (++pmd <= pmd_offset(pud, (unsigned long)_end - 1)) | ||
314 | pmd_clear(pmd); | ||
315 | } | ||
316 | #else | 297 | #else |
317 | static inline void init_gbpages(void) | 298 | static inline void init_gbpages(void) |
318 | { | 299 | { |
319 | } | 300 | } |
320 | static inline void cleanup_highmap_brk_end(void) | 301 | static void __init cleanup_highmap(void) |
321 | { | 302 | { |
322 | } | 303 | } |
323 | #endif | 304 | #endif |
@@ -330,8 +311,6 @@ static void __init reserve_brk(void) | |||
330 | /* Mark brk area as locked down and no longer taking any | 311 | /* Mark brk area as locked down and no longer taking any |
331 | new allocations */ | 312 | new allocations */ |
332 | _brk_start = 0; | 313 | _brk_start = 0; |
333 | |||
334 | cleanup_highmap_brk_end(); | ||
335 | } | 314 | } |
336 | 315 | ||
337 | #ifdef CONFIG_BLK_DEV_INITRD | 316 | #ifdef CONFIG_BLK_DEV_INITRD |
@@ -950,6 +929,8 @@ void __init setup_arch(char **cmdline_p) | |||
950 | */ | 929 | */ |
951 | reserve_brk(); | 930 | reserve_brk(); |
952 | 931 | ||
932 | cleanup_highmap(); | ||
933 | |||
953 | memblock.current_limit = get_max_mapped(); | 934 | memblock.current_limit = get_max_mapped(); |
954 | memblock_x86_fill(); | 935 | memblock_x86_fill(); |
955 | 936 | ||
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 0aa34669ed3f..2362b646178e 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -52,6 +52,7 @@ | |||
52 | #include <asm/cacheflush.h> | 52 | #include <asm/cacheflush.h> |
53 | #include <asm/init.h> | 53 | #include <asm/init.h> |
54 | #include <asm/uv/uv.h> | 54 | #include <asm/uv/uv.h> |
55 | #include <asm/setup.h> | ||
55 | 56 | ||
56 | static int __init parse_direct_gbpages_off(char *arg) | 57 | static int __init parse_direct_gbpages_off(char *arg) |
57 | { | 58 | { |
@@ -294,18 +295,18 @@ void __init init_extra_mapping_uc(unsigned long phys, unsigned long size) | |||
294 | * to the compile time generated pmds. This results in invalid pmds up | 295 | * to the compile time generated pmds. This results in invalid pmds up |
295 | * to the point where we hit the physaddr 0 mapping. | 296 | * to the point where we hit the physaddr 0 mapping. |
296 | * | 297 | * |
297 | * We limit the mappings to the region from _text to _end. _end is | 298 | * We limit the mappings to the region from _text to _brk_end. _brk_end |
298 | * rounded up to the 2MB boundary. This catches the invalid pmds as | 299 | * is rounded up to the 2MB boundary. This catches the invalid pmds as |
299 | * well, as they are located before _text: | 300 | * well, as they are located before _text: |
300 | */ | 301 | */ |
301 | void __init cleanup_highmap(void) | 302 | void __init cleanup_highmap(void) |
302 | { | 303 | { |
303 | unsigned long vaddr = __START_KERNEL_map; | 304 | unsigned long vaddr = __START_KERNEL_map; |
304 | unsigned long end = roundup((unsigned long)_end, PMD_SIZE) - 1; | 305 | unsigned long vaddr_end = __START_KERNEL_map + (max_pfn_mapped << PAGE_SHIFT); |
306 | unsigned long end = roundup((unsigned long)_brk_end, PMD_SIZE) - 1; | ||
305 | pmd_t *pmd = level2_kernel_pgt; | 307 | pmd_t *pmd = level2_kernel_pgt; |
306 | pmd_t *last_pmd = pmd + PTRS_PER_PMD; | ||
307 | 308 | ||
308 | for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) { | 309 | for (; vaddr + PMD_SIZE - 1 < vaddr_end; pmd++, vaddr += PMD_SIZE) { |
309 | if (pmd_none(*pmd)) | 310 | if (pmd_none(*pmd)) |
310 | continue; | 311 | continue; |
311 | if (vaddr < (unsigned long) _text || vaddr > end) | 312 | if (vaddr < (unsigned long) _text || vaddr > end) |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 39ee7182fd18..c82df6c9c0f0 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1487,10 +1487,12 @@ static __init pte_t mask_rw_pte(pte_t *ptep, pte_t pte) | |||
1487 | /* | 1487 | /* |
1488 | * If the new pfn is within the range of the newly allocated | 1488 | * If the new pfn is within the range of the newly allocated |
1489 | * kernel pagetable, and it isn't being mapped into an | 1489 | * kernel pagetable, and it isn't being mapped into an |
1490 | * early_ioremap fixmap slot, make sure it is RO. | 1490 | * early_ioremap fixmap slot as a freshly allocated page, make sure |
1491 | * it is RO. | ||
1491 | */ | 1492 | */ |
1492 | if (!is_early_ioremap_ptep(ptep) && | 1493 | if (((!is_early_ioremap_ptep(ptep) && |
1493 | pfn >= pgt_buf_start && pfn < pgt_buf_end) | 1494 | pfn >= pgt_buf_start && pfn < pgt_buf_end)) || |
1495 | (is_early_ioremap_ptep(ptep) && pfn != (pgt_buf_end - 1))) | ||
1494 | pte = pte_wrprotect(pte); | 1496 | pte = pte_wrprotect(pte); |
1495 | 1497 | ||
1496 | return pte; | 1498 | return pte; |
@@ -1700,9 +1702,6 @@ static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | |||
1700 | for (pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) { | 1702 | for (pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) { |
1701 | pte_t pte; | 1703 | pte_t pte; |
1702 | 1704 | ||
1703 | if (pfn > max_pfn_mapped) | ||
1704 | max_pfn_mapped = pfn; | ||
1705 | |||
1706 | if (!pte_none(pte_page[pteidx])) | 1705 | if (!pte_none(pte_page[pteidx])) |
1707 | continue; | 1706 | continue; |
1708 | 1707 | ||
@@ -1760,6 +1759,12 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, | |||
1760 | pud_t *l3; | 1759 | pud_t *l3; |
1761 | pmd_t *l2; | 1760 | pmd_t *l2; |
1762 | 1761 | ||
1762 | /* max_pfn_mapped is the last pfn mapped in the initial memory | ||
1763 | * mappings. Considering that on Xen after the kernel mappings we | ||
1764 | * have the mappings of some pages that don't exist in pfn space, we | ||
1765 | * set max_pfn_mapped to the last real pfn mapped. */ | ||
1766 | max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->mfn_list)); | ||
1767 | |||
1763 | /* Zap identity mapping */ | 1768 | /* Zap identity mapping */ |
1764 | init_level4_pgt[0] = __pgd(0); | 1769 | init_level4_pgt[0] = __pgd(0); |
1765 | 1770 | ||
@@ -1864,9 +1869,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, | |||
1864 | initial_kernel_pmd = | 1869 | initial_kernel_pmd = |
1865 | extend_brk(sizeof(pmd_t) * PTRS_PER_PMD, PAGE_SIZE); | 1870 | extend_brk(sizeof(pmd_t) * PTRS_PER_PMD, PAGE_SIZE); |
1866 | 1871 | ||
1867 | max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) + | 1872 | max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->mfn_list)); |
1868 | xen_start_info->nr_pt_frames * PAGE_SIZE + | ||
1869 | 512*1024); | ||
1870 | 1873 | ||
1871 | kernel_pmd = m2v(pgd[KERNEL_PGD_BOUNDARY].pgd); | 1874 | kernel_pmd = m2v(pgd[KERNEL_PGD_BOUNDARY].pgd); |
1872 | memcpy(initial_kernel_pmd, kernel_pmd, sizeof(pmd_t) * PTRS_PER_PMD); | 1875 | memcpy(initial_kernel_pmd, kernel_pmd, sizeof(pmd_t) * PTRS_PER_PMD); |
diff --git a/arch/xtensa/include/asm/types.h b/arch/xtensa/include/asm/types.h index c89569a8da0c..b1c981e39b52 100644 --- a/arch/xtensa/include/asm/types.h +++ b/arch/xtensa/include/asm/types.h | |||
@@ -32,10 +32,6 @@ typedef unsigned short umode_t; | |||
32 | 32 | ||
33 | #define BITS_PER_LONG 32 | 33 | #define BITS_PER_LONG 32 |
34 | 34 | ||
35 | /* Dma addresses are 32-bits wide. */ | ||
36 | |||
37 | typedef u32 dma_addr_t; | ||
38 | |||
39 | #endif /* __KERNEL__ */ | 35 | #endif /* __KERNEL__ */ |
40 | #endif | 36 | #endif |
41 | 37 | ||