diff options
author | Arnd Bergmann <arnd@arndb.de> | 2011-10-07 15:57:31 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2011-10-07 15:57:31 -0400 |
commit | 526b264163068f77c5f2409031f5e25caf3900a9 (patch) | |
tree | 196e7581f1546e48ba392ff099f369e5c622636b /arch/arm/mach-mxs | |
parent | 4c4cbce68f57555cddb9d77da333bf50875148ce (diff) | |
parent | 05d900c9d8ce536c6792efb323c82b1c97b54bf9 (diff) |
Merge branch 'imx/cleanup' into imx/devel
This helps resolve the conflicts between the imx cleanups and the
new code that has gone into the imx tree.
Conflict resolution was originally done by Sascha Hauer.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r-- | arch/arm/mach-mxs/Makefile | 6 | ||||
-rw-r--r-- | arch/arm/mach-mxs/include/mach/gpio.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mxs/include/mach/mxs.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mach-mx23evk.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mach-mx28evk.c | 24 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mach-stmp378x_devb.c | 1 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mm-mx28.c | 44 | ||||
-rw-r--r-- | arch/arm/mach-mxs/mm.c (renamed from arch/arm/mach-mxs/mm-mx23.c) | 19 |
8 files changed, 36 insertions, 65 deletions
diff --git a/arch/arm/mach-mxs/Makefile b/arch/arm/mach-mxs/Makefile index 6c38262a3aaa..ea8dcb7742bc 100644 --- a/arch/arm/mach-mxs/Makefile +++ b/arch/arm/mach-mxs/Makefile | |||
@@ -1,11 +1,11 @@ | |||
1 | # Common support | 1 | # Common support |
2 | obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o | 2 | obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o mm.o |
3 | 3 | ||
4 | obj-$(CONFIG_MXS_OCOTP) += ocotp.o | 4 | obj-$(CONFIG_MXS_OCOTP) += ocotp.o |
5 | obj-$(CONFIG_PM) += pm.o | 5 | obj-$(CONFIG_PM) += pm.o |
6 | 6 | ||
7 | obj-$(CONFIG_SOC_IMX23) += clock-mx23.o mm-mx23.o | 7 | obj-$(CONFIG_SOC_IMX23) += clock-mx23.o |
8 | obj-$(CONFIG_SOC_IMX28) += clock-mx28.o mm-mx28.o | 8 | obj-$(CONFIG_SOC_IMX28) += clock-mx28.o |
9 | 9 | ||
10 | obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o | 10 | obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o |
11 | obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o | 11 | obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o |
diff --git a/arch/arm/mach-mxs/include/mach/gpio.h b/arch/arm/mach-mxs/include/mach/gpio.h index 828ccccb6aad..56025aa0a639 100644 --- a/arch/arm/mach-mxs/include/mach/gpio.h +++ b/arch/arm/mach-mxs/include/mach/gpio.h | |||
@@ -22,14 +22,10 @@ | |||
22 | 22 | ||
23 | #include <asm-generic/gpio.h> | 23 | #include <asm-generic/gpio.h> |
24 | 24 | ||
25 | #define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr)) | ||
26 | |||
27 | /* use gpiolib dispatchers */ | 25 | /* use gpiolib dispatchers */ |
28 | #define gpio_get_value __gpio_get_value | 26 | #define gpio_get_value __gpio_get_value |
29 | #define gpio_set_value __gpio_set_value | 27 | #define gpio_set_value __gpio_set_value |
30 | #define gpio_cansleep __gpio_cansleep | 28 | #define gpio_cansleep __gpio_cansleep |
31 | #define gpio_to_irq __gpio_to_irq | 29 | #define gpio_to_irq __gpio_to_irq |
32 | 30 | ||
33 | #define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START) | ||
34 | |||
35 | #endif /* __MACH_MXS_GPIO_H__ */ | 31 | #endif /* __MACH_MXS_GPIO_H__ */ |
diff --git a/arch/arm/mach-mxs/include/mach/mxs.h b/arch/arm/mach-mxs/include/mach/mxs.h index 35a89dd27242..5aa5f754c846 100644 --- a/arch/arm/mach-mxs/include/mach/mxs.h +++ b/arch/arm/mach-mxs/include/mach/mxs.h | |||
@@ -86,6 +86,8 @@ | |||
86 | .type = _type, \ | 86 | .type = _type, \ |
87 | } | 87 | } |
88 | 88 | ||
89 | #define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr)) | ||
90 | |||
89 | #define MXS_SET_ADDR 0x4 | 91 | #define MXS_SET_ADDR 0x4 |
90 | #define MXS_CLR_ADDR 0x8 | 92 | #define MXS_CLR_ADDR 0x8 |
91 | #define MXS_TOG_ADDR 0xc | 93 | #define MXS_TOG_ADDR 0xc |
diff --git a/arch/arm/mach-mxs/mach-mx23evk.c b/arch/arm/mach-mxs/mach-mx23evk.c index 2c8eb7c43f82..a1d132dce5c3 100644 --- a/arch/arm/mach-mxs/mach-mx23evk.c +++ b/arch/arm/mach-mxs/mach-mx23evk.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/delay.h> | 15 | #include <linux/delay.h> |
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/irq.h> | ||
19 | 18 | ||
20 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c index 4a3cca3725f2..e7bff1e2cd2b 100644 --- a/arch/arm/mach-mxs/mach-mx28evk.c +++ b/arch/arm/mach-mxs/mach-mx28evk.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
19 | #include <linux/irq.h> | ||
20 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
21 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
22 | #include <linux/regulator/machine.h> | 21 | #include <linux/regulator/machine.h> |
@@ -417,6 +416,11 @@ static void __init mx28evk_add_regulators(void) | |||
417 | static void __init mx28evk_add_regulators(void) {} | 416 | static void __init mx28evk_add_regulators(void) {} |
418 | #endif | 417 | #endif |
419 | 418 | ||
419 | static struct gpio mx28evk_lcd_gpios[] = { | ||
420 | { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" }, | ||
421 | { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" }, | ||
422 | }; | ||
423 | |||
420 | static void __init mx28evk_init(void) | 424 | static void __init mx28evk_init(void) |
421 | { | 425 | { |
422 | int ret; | 426 | int ret; |
@@ -443,19 +447,12 @@ static void __init mx28evk_init(void) | |||
443 | mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]); | 447 | mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]); |
444 | } | 448 | } |
445 | 449 | ||
446 | ret = gpio_request_one(MX28EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); | 450 | ret = gpio_request_array(mx28evk_lcd_gpios, |
447 | if (ret) | 451 | ARRAY_SIZE(mx28evk_lcd_gpios)); |
448 | pr_warn("failed to request gpio lcd-enable: %d\n", ret); | ||
449 | else | ||
450 | gpio_set_value(MX28EVK_LCD_ENABLE, 1); | ||
451 | |||
452 | ret = gpio_request_one(MX28EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable"); | ||
453 | if (ret) | 452 | if (ret) |
454 | pr_warn("failed to request gpio bl-enable: %d\n", ret); | 453 | pr_warn("failed to request gpio pins for lcd: %d\n", ret); |
455 | else | 454 | else |
456 | gpio_set_value(MX28EVK_BL_ENABLE, 1); | 455 | mx28_add_mxsfb(&mx28evk_mxsfb_pdata); |
457 | |||
458 | mx28_add_mxsfb(&mx28evk_mxsfb_pdata); | ||
459 | 456 | ||
460 | mx28_add_saif(0); | 457 | mx28_add_saif(0); |
461 | mx28_add_saif(1); | 458 | mx28_add_saif(1); |
@@ -480,6 +477,9 @@ static void __init mx28evk_init(void) | |||
480 | "mmc1-slot-power"); | 477 | "mmc1-slot-power"); |
481 | if (ret) | 478 | if (ret) |
482 | pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret); | 479 | pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret); |
480 | else | ||
481 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); | ||
482 | |||
483 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); | 483 | mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); |
484 | mx28_add_rtc_stmp3xxx(); | 484 | mx28_add_rtc_stmp3xxx(); |
485 | 485 | ||
diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c index afec337cb0c4..177e53123a02 100644 --- a/arch/arm/mach-mxs/mach-stmp378x_devb.c +++ b/arch/arm/mach-mxs/mach-stmp378x_devb.c | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
22 | #include <linux/irq.h> | ||
23 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
24 | 23 | ||
25 | #include <asm/mach-types.h> | 24 | #include <asm/mach-types.h> |
diff --git a/arch/arm/mach-mxs/mm-mx28.c b/arch/arm/mach-mxs/mm-mx28.c deleted file mode 100644 index b6e18ddb92c0..000000000000 --- a/arch/arm/mach-mxs/mm-mx28.c +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. | ||
3 | * | ||
4 | * The code contained herein is licensed under the GNU General Public | ||
5 | * License. You may obtain a copy of the GNU General Public License | ||
6 | * Version 2 or later at the following locations: | ||
7 | * | ||
8 | * http://www.opensource.org/licenses/gpl-license.html | ||
9 | * http://www.gnu.org/copyleft/gpl.html | ||
10 | * | ||
11 | * Create static mapping between physical to virtual memory. | ||
12 | */ | ||
13 | |||
14 | #include <linux/mm.h> | ||
15 | #include <linux/init.h> | ||
16 | |||
17 | #include <asm/mach/map.h> | ||
18 | |||
19 | #include <mach/mx28.h> | ||
20 | #include <mach/common.h> | ||
21 | #include <mach/iomux.h> | ||
22 | |||
23 | /* | ||
24 | * Define the MX28 memory map. | ||
25 | */ | ||
26 | static struct map_desc mx28_io_desc[] __initdata = { | ||
27 | mxs_map_entry(MX28, OCRAM, MT_DEVICE), | ||
28 | mxs_map_entry(MX28, IO, MT_DEVICE), | ||
29 | }; | ||
30 | |||
31 | /* | ||
32 | * This function initializes the memory map. It is called during the | ||
33 | * system startup to create static physical to virtual memory mappings | ||
34 | * for the IO modules. | ||
35 | */ | ||
36 | void __init mx28_map_io(void) | ||
37 | { | ||
38 | iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc)); | ||
39 | } | ||
40 | |||
41 | void __init mx28_init_irq(void) | ||
42 | { | ||
43 | icoll_init_irq(); | ||
44 | } | ||
diff --git a/arch/arm/mach-mxs/mm-mx23.c b/arch/arm/mach-mxs/mm.c index 1b2345ac1a87..50af5ceebf6d 100644 --- a/arch/arm/mach-mxs/mm-mx23.c +++ b/arch/arm/mach-mxs/mm.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/mach/map.h> | 17 | #include <asm/mach/map.h> |
18 | 18 | ||
19 | #include <mach/mx23.h> | 19 | #include <mach/mx23.h> |
20 | #include <mach/mx28.h> | ||
20 | #include <mach/common.h> | 21 | #include <mach/common.h> |
21 | #include <mach/iomux.h> | 22 | #include <mach/iomux.h> |
22 | 23 | ||
@@ -29,6 +30,14 @@ static struct map_desc mx23_io_desc[] __initdata = { | |||
29 | }; | 30 | }; |
30 | 31 | ||
31 | /* | 32 | /* |
33 | * Define the MX28 memory map. | ||
34 | */ | ||
35 | static struct map_desc mx28_io_desc[] __initdata = { | ||
36 | mxs_map_entry(MX28, OCRAM, MT_DEVICE), | ||
37 | mxs_map_entry(MX28, IO, MT_DEVICE), | ||
38 | }; | ||
39 | |||
40 | /* | ||
32 | * This function initializes the memory map. It is called during the | 41 | * This function initializes the memory map. It is called during the |
33 | * system startup to create static physical to virtual memory mappings | 42 | * system startup to create static physical to virtual memory mappings |
34 | * for the IO modules. | 43 | * for the IO modules. |
@@ -42,3 +51,13 @@ void __init mx23_init_irq(void) | |||
42 | { | 51 | { |
43 | icoll_init_irq(); | 52 | icoll_init_irq(); |
44 | } | 53 | } |
54 | |||
55 | void __init mx28_map_io(void) | ||
56 | { | ||
57 | iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc)); | ||
58 | } | ||
59 | |||
60 | void __init mx28_init_irq(void) | ||
61 | { | ||
62 | icoll_init_irq(); | ||
63 | } | ||