aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mxs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:11:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-01 23:11:00 -0400
commit952414505f55afe5cd6dc004765076aa22b3ed7e (patch)
treeeba11ed702ae02fea7f1a0d422346454fc98296f /arch/arm/mach-mxs
parent68e24ba70465b82ad24e0774ceab5360180d4627 (diff)
parent3e965b176341b78620f7404fd8b7f9a0d061f8a2 (diff)
Merge branch 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc
* 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc: (125 commits) ARM: mach-mxs: fix machines' initializers order mmc: mxcmmc: explicitly includes mach/hardware.h arm/imx: explicitly includes mach/hardware.h in pm-imx27.c arm/imx: remove mx27_setup_weimcs() from mx27.h arm/imx: explicitly includes mach/hardware.h in mach-kzm_arm11_01.c arm/imx: remove mx31_setup_weimcs() from mx31.h ARM: tegra: devices.c should include devices.h ARM: tegra: cpu-tegra: unexport two functions ARM: tegra: cpu-tegra: sparse type fix ARM: tegra: dma: staticify some tables and functions ARM: tegra: tegra2_clocks: don't export some tables ARM: tegra: tegra_powergate_is_powered should be static ARM: tegra: tegra_rtc_read_ms should be static ARM: tegra: tegra_init_cache should be static ARM: tegra: pcie: 0 -> NULL changes ARM: tegra: pcie: include board.h ARM: tegra: pcie: don't cast __iomem pointers ARM: tegra: tegra2_clocks: 0 -> NULL changes ARM: tegra: tegra2_clocks: don't cast __iomem pointers ARM: tegra: timer: don't cast __iomem pointers ... Fix up trivial conflicts in arch/arm/mach-omap2/Makefile, arch/arm/mach-u300/{Makefile.boot,core.c} arch/arm/plat-{mxc,omap}/devices.c
Diffstat (limited to 'arch/arm/mach-mxs')
-rw-r--r--arch/arm/mach-mxs/Makefile6
-rw-r--r--arch/arm/mach-mxs/include/mach/gpio.h28
-rw-r--r--arch/arm/mach-mxs/include/mach/mxs.h2
-rw-r--r--arch/arm/mach-mxs/mach-mx23evk.c3
-rw-r--r--arch/arm/mach-mxs/mach-mx28evk.c26
-rw-r--r--arch/arm/mach-mxs/mach-stmp378x_devb.c1
-rw-r--r--arch/arm/mach-mxs/mach-tx28.c2
-rw-r--r--arch/arm/mach-mxs/mm-mx28.c44
-rw-r--r--arch/arm/mach-mxs/mm.c (renamed from arch/arm/mach-mxs/mm-mx23.c)19
9 files changed, 39 insertions, 92 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
2obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o 2obj-y := clock.o devices.o icoll.o iomux.o system.o timer.o mm.o
3 3
4obj-$(CONFIG_MXS_OCOTP) += ocotp.o 4obj-$(CONFIG_MXS_OCOTP) += ocotp.o
5obj-$(CONFIG_PM) += pm.o 5obj-$(CONFIG_PM) += pm.o
6 6
7obj-$(CONFIG_SOC_IMX23) += clock-mx23.o mm-mx23.o 7obj-$(CONFIG_SOC_IMX23) += clock-mx23.o
8obj-$(CONFIG_SOC_IMX28) += clock-mx28.o mm-mx28.o 8obj-$(CONFIG_SOC_IMX28) += clock-mx28.o
9 9
10obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o 10obj-$(CONFIG_MACH_STMP378X_DEVB) += mach-stmp378x_devb.o
11obj-$(CONFIG_MACH_MX23EVK) += mach-mx23evk.o 11obj-$(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 bb11e63261e4..40a8c178f10d 100644
--- a/arch/arm/mach-mxs/include/mach/gpio.h
+++ b/arch/arm/mach-mxs/include/mach/gpio.h
@@ -1,27 +1 @@
1/* /* empty */
2 * Copyright 2007 Freescale Semiconductor, Inc. All Rights Reserved.
3 * Copyright 2008 Juergen Beisert, kernel@pengutronix.de
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301, USA.
18 */
19
20#ifndef __MACH_MXS_GPIO_H__
21#define __MACH_MXS_GPIO_H__
22
23#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
24
25#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
26
27#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 3c2de33803ab..69e218de536e 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>
@@ -182,6 +181,6 @@ MACHINE_START(MX23EVK, "Freescale MX23 EVK")
182 /* Maintainer: Freescale Semiconductor, Inc. */ 181 /* Maintainer: Freescale Semiconductor, Inc. */
183 .map_io = mx23_map_io, 182 .map_io = mx23_map_io,
184 .init_irq = mx23_init_irq, 183 .init_irq = mx23_init_irq,
185 .init_machine = mx23evk_init,
186 .timer = &mx23evk_timer, 184 .timer = &mx23evk_timer,
185 .init_machine = mx23evk_init,
187MACHINE_END 186MACHINE_END
diff --git a/arch/arm/mach-mxs/mach-mx28evk.c b/arch/arm/mach-mxs/mach-mx28evk.c
index eaaf6ff28990..0173c3bce4ef 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 20
22#include <asm/mach-types.h> 21#include <asm/mach-types.h>
@@ -352,6 +351,11 @@ static struct mxs_mmc_platform_data mx28evk_mmc_pdata[] __initdata = {
352 }, 351 },
353}; 352};
354 353
354static struct gpio mx28evk_lcd_gpios[] = {
355 { MX28EVK_LCD_ENABLE, GPIOF_OUT_INIT_HIGH, "lcd-enable" },
356 { MX28EVK_BL_ENABLE, GPIOF_OUT_INIT_HIGH, "bl-enable" },
357};
358
355static void __init mx28evk_init(void) 359static void __init mx28evk_init(void)
356{ 360{
357 int ret; 361 int ret;
@@ -378,19 +382,12 @@ static void __init mx28evk_init(void)
378 mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]); 382 mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
379 } 383 }
380 384
381 ret = gpio_request_one(MX28EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable"); 385 ret = gpio_request_array(mx28evk_lcd_gpios,
382 if (ret) 386 ARRAY_SIZE(mx28evk_lcd_gpios));
383 pr_warn("failed to request gpio lcd-enable: %d\n", ret);
384 else
385 gpio_set_value(MX28EVK_LCD_ENABLE, 1);
386
387 ret = gpio_request_one(MX28EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable");
388 if (ret) 387 if (ret)
389 pr_warn("failed to request gpio bl-enable: %d\n", ret); 388 pr_warn("failed to request gpio pins for lcd: %d\n", ret);
390 else 389 else
391 gpio_set_value(MX28EVK_BL_ENABLE, 1); 390 mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
392
393 mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
394 391
395 /* power on mmc slot by writing 0 to the gpio */ 392 /* power on mmc slot by writing 0 to the gpio */
396 ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW, 393 ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
@@ -403,7 +400,8 @@ static void __init mx28evk_init(void)
403 "mmc1-slot-power"); 400 "mmc1-slot-power");
404 if (ret) 401 if (ret)
405 pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret); 402 pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret);
406 mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]); 403 else
404 mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);
407 405
408 gpio_led_register_device(0, &mx28evk_led_data); 406 gpio_led_register_device(0, &mx28evk_led_data);
409} 407}
@@ -421,6 +419,6 @@ MACHINE_START(MX28EVK, "Freescale MX28 EVK")
421 /* Maintainer: Freescale Semiconductor, Inc. */ 419 /* Maintainer: Freescale Semiconductor, Inc. */
422 .map_io = mx28_map_io, 420 .map_io = mx28_map_io,
423 .init_irq = mx28_init_irq, 421 .init_irq = mx28_init_irq,
424 .init_machine = mx28evk_init,
425 .timer = &mx28evk_timer, 422 .timer = &mx28evk_timer,
423 .init_machine = mx28evk_init,
426MACHINE_END 424MACHINE_END
diff --git a/arch/arm/mach-mxs/mach-stmp378x_devb.c b/arch/arm/mach-mxs/mach-stmp378x_devb.c
index 7f38d82b69af..3fe5dd532145 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/mach-tx28.c b/arch/arm/mach-mxs/mach-tx28.c
index 515a423f82cd..955593806fd2 100644
--- a/arch/arm/mach-mxs/mach-tx28.c
+++ b/arch/arm/mach-mxs/mach-tx28.c
@@ -175,6 +175,6 @@ static struct sys_timer tx28_timer = {
175MACHINE_START(TX28, "Ka-Ro electronics TX28 module") 175MACHINE_START(TX28, "Ka-Ro electronics TX28 module")
176 .map_io = mx28_map_io, 176 .map_io = mx28_map_io,
177 .init_irq = mx28_init_irq, 177 .init_irq = mx28_init_irq,
178 .init_machine = tx28_stk5v3_init,
179 .timer = &tx28_timer, 178 .timer = &tx28_timer,
179 .init_machine = tx28_stk5v3_init,
180MACHINE_END 180MACHINE_END
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 */
26static 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 */
36void __init mx28_map_io(void)
37{
38 iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc));
39}
40
41void __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 */
35static 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
55void __init mx28_map_io(void)
56{
57 iotable_init(mx28_io_desc, ARRAY_SIZE(mx28_io_desc));
58}
59
60void __init mx28_init_irq(void)
61{
62 icoll_init_irq();
63}