Skip to contentSkip to conversation

ARM: mx5: use config to define boot related addresses

PATCH New Richard Zhao 3 participants 13 messages Dec 30, 2010 – Jan 6, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/8 ARM: mx5: use config to define boot related addresses

---
 arch/arm/mach-mx5/Makefile.boot |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-mx5/Makefile.boot +3 -3
index 9939a19..fec7cd9 100644
@@ -1,3 +1,3 @@
-   zreladdr-y	:= 0x90008000
-params_phys-y	:= 0x90000100
-initrd_phys-y	:= 0x90800000
+   zreladdr-$(CONFIG_ARCH_MX51)	:= 0x90008000
+params_phys-$(CONFIG_ARCH_MX51)	:= 0x90000100
+initrd_phys-$(CONFIG_ARCH_MX51)	:= 0x90800000
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH v4 2/8 arm: plat-mxc: add full parameter macro to define gpio port

---
 arch/arm/plat-mxc/gpio.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
arch/arm/plat-mxc/gpio.c +4 -1
index 93a8d93..dd4f813 100644
@@ -350,15 +350,18 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt)
 	return 0;
 }
 
-#define DEFINE_IMX_GPIO_PORT_IRQ(soc, _id, _hwid, _irq)			\
+#define DEFINE_IMX_GPIO_PORT_IRQ_HIGH(soc, _id, _hwid, _irq, _irq_high)	\
 	{								\
 		.chip.label = "gpio-" #_id,				\
 		.irq = _irq,						\
+		.irq_high = _irq_high,					\
 		.base = soc ## _IO_ADDRESS(				\
 				soc ## _GPIO ## _hwid ## _BASE_ADDR),	\
 		.virtual_irq_start = MXC_GPIO_IRQ_START + (_id) * 32,	\
 	}
 
+#define DEFINE_IMX_GPIO_PORT_IRQ(soc, _id, _hwid, _irq)			\
+	DEFINE_IMX_GPIO_PORT_IRQ_HIGH(soc, _id, _hwid, _irq, 0)
 #define DEFINE_IMX_GPIO_PORT(soc, _id, _hwid)				\
 	DEFINE_IMX_GPIO_PORT_IRQ(soc, _id, _hwid, 0)
 
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH v4 3/8 arm: mx51: define mx51's own MXC_GPIO_IRQS

mx5 SoCs have different GPIO port count.

---
 arch/arm/plat-mxc/include/mach/irqs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-mxc/include/mach/irqs.h +1 -1
index 86781f7..769a137 100644
@@ -29,7 +29,7 @@
 #define MXC_GPIO_IRQS		(32 * 4)
 #elif defined CONFIG_ARCH_MX25
 #define MXC_GPIO_IRQS		(32 * 4)
-#elif defined CONFIG_ARCH_MX5
+#elif defined CONFIG_ARCH_MX51
 #define MXC_GPIO_IRQS		(32 * 4)
 #elif defined CONFIG_ARCH_MXC91231
 #define MXC_GPIO_IRQS		(32 * 4)
Signature · 1 line
1.6.3.3
#3 lore raw

PATCH v4 4/8 arm: mx5: mx51/53 have different mxc_cpu_type definition

---
 arch/arm/plat-mxc/include/mach/mxc.h |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)
arch/arm/plat-mxc/include/mach/mxc.h +13 -2
index 4abbdd1..eca8f83 100644
@@ -126,7 +126,7 @@ extern unsigned int __mxc_cpu_type;
 # define cpu_is_mx35()		(0)
 #endif
 
-#ifdef CONFIG_ARCH_MX5
+#ifdef CONFIG_ARCH_MX51
 # ifdef mxc_cpu_type
 #  undef mxc_cpu_type
 #  define mxc_cpu_type __mxc_cpu_type
@@ -134,11 +134,22 @@ extern unsigned int __mxc_cpu_type;
 #  define mxc_cpu_type MXC_CPU_MX51
 # endif
 # define cpu_is_mx51()		(mxc_cpu_type == MXC_CPU_MX51)
-# define cpu_is_mx53()		(mxc_cpu_type == MXC_CPU_MX53)
 #else
 # define cpu_is_mx51()		(0)
 #endif
 
+#ifdef CONFIG_ARCH_MX53
+# ifdef mxc_cpu_type
+#  undef mxc_cpu_type
+#  define mxc_cpu_type __mxc_cpu_type
+# else
+#  define mxc_cpu_type MXC_CPU_MX53
+# endif
+# define cpu_is_mx53()		(mxc_cpu_type == MXC_CPU_MX53)
+#else
+# define cpu_is_mx53()		(0)
+#endif
+
 #ifdef CONFIG_ARCH_MXC91231
 # ifdef mxc_cpu_type
 #  undef mxc_cpu_type
Signature · 1 line
1.6.3.3
#4 lore raw

PATCH v4 5/8 arm: mxc: move IOMUX_CONFIG_XXXX definitions to iomux-v3.h

IOMUX_CONFIG_GPIO is not for iomux-v3. It's for old freescale iomux routines. Remove it.

---
 arch/arm/plat-mxc/include/mach/iomux-mx51.h |   16 ----------------
 arch/arm/plat-mxc/include/mach/iomux-mx53.h |   16 ----------------
 arch/arm/plat-mxc/include/mach/iomux-v3.h   |   15 +++++++++++++++
 3 files changed, 15 insertions(+), 32 deletions(-)
arch/arm/plat-mxc/include/mach/iomux-mx51.h +0 -16
index e1600f3..31af1f5 100644
@@ -15,22 +15,6 @@
 
 #include <mach/iomux-v3.h>
 
-/*
- * various IOMUX alternate output functions (1-7)
- */
-typedef enum iomux_config {
-	IOMUX_CONFIG_ALT0,
-	IOMUX_CONFIG_ALT1,
-	IOMUX_CONFIG_ALT2,
-	IOMUX_CONFIG_ALT3,
-	IOMUX_CONFIG_ALT4,
-	IOMUX_CONFIG_ALT5,
-	IOMUX_CONFIG_ALT6,
-	IOMUX_CONFIG_ALT7,
-	IOMUX_CONFIG_GPIO,      /* added to help user use GPIO mode */
-	IOMUX_CONFIG_SION = 0x1 << 4,   /* LOOPBACK:MUX SION bit */
-} iomux_pin_cfg_t;
-
 /* Pad control groupings */
 #define MX51_UART1_PAD_CTRL	(PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \
 				PAD_CTL_DSE_HIGH)
arch/arm/plat-mxc/include/mach/iomux-mx53.h +0 -16
index 80cb3c5..4155124 100644
@@ -21,22 +21,6 @@
 
 #include <mach/iomux-v3.h>
 
-/*
- * various IOMUX alternate output functions (1-7)
- */
-typedef enum iomux_config {
-	IOMUX_CONFIG_ALT0,
-	IOMUX_CONFIG_ALT1,
-	IOMUX_CONFIG_ALT2,
-	IOMUX_CONFIG_ALT3,
-	IOMUX_CONFIG_ALT4,
-	IOMUX_CONFIG_ALT5,
-	IOMUX_CONFIG_ALT6,
-	IOMUX_CONFIG_ALT7,
-	IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */
-	IOMUX_CONFIG_SION = 0x1 << 4, /* LOOPBACK:MUX SION bit */
-} iomux_pin_cfg_t;
-
 /* These 2 defines are for pins that may not have a mux register, but could
  * have a pad setting register, and vice-versa. */
 #define NON_MUX_I	0x00
arch/arm/plat-mxc/include/mach/iomux-v3.h +15 -0
index 811716f..e1fd71b 100644
@@ -54,6 +54,21 @@ typedef struct deprecated_pad_desc {
 	unsigned select_input:3;
 } iomux_v3_cfg_t;
 
+/*
+ * various IOMUX alternate output functions (1-7)
+ */
+enum iomux_config {
+	IOMUX_CONFIG_ALT0,
+	IOMUX_CONFIG_ALT1,
+	IOMUX_CONFIG_ALT2,
+	IOMUX_CONFIG_ALT3,
+	IOMUX_CONFIG_ALT4,
+	IOMUX_CONFIG_ALT5,
+	IOMUX_CONFIG_ALT6,
+	IOMUX_CONFIG_ALT7,
+	IOMUX_CONFIG_SION = 0x1 << 4,	/* LOOPBACK:MUX SION bit */
+};
+
 static inline unsigned int MUX_CTRL_OFS(iomux_v3_cfg_t *pad)
 {
 	return pad->mux_ctrl_ofs;
Signature · 1 line
1.6.3.3
#5 lore raw

PATCH v4 5/8 arm: mxc: move IOMUX_CONFIG_XXXX definitions to iomux-v3.h

Hello Sascha,

Quoted 5 lines · Richard Zhao

IOMUX_CONFIG_GPIO is not for iomux-v3. It's for old freescale iomux routines. Remove it.

If you don't have comments, could you please merge this patch? It's causing arch/arm/plat-mxc/include/mach/iomux-mx50.h incomplete.

Thanks
Richard

Quoted 89 lines
---
 arch/arm/plat-mxc/include/mach/iomux-mx51.h |   16 ----------------
 arch/arm/plat-mxc/include/mach/iomux-mx53.h |   16 ----------------
 arch/arm/plat-mxc/include/mach/iomux-v3.h   |   15 +++++++++++++++
 3 files changed, 15 insertions(+), 32 deletions(-)
arch/arm/plat-mxc/include/mach/iomux-mx51.h +0 -16
index e1600f3..31af1f5 100644
@@ -15,22 +15,6 @@
 
 #include <mach/iomux-v3.h>
 
-/*
- * various IOMUX alternate output functions (1-7)
- */
-typedef enum iomux_config {
-	IOMUX_CONFIG_ALT0,
-	IOMUX_CONFIG_ALT1,
-	IOMUX_CONFIG_ALT2,
-	IOMUX_CONFIG_ALT3,
-	IOMUX_CONFIG_ALT4,
-	IOMUX_CONFIG_ALT5,
-	IOMUX_CONFIG_ALT6,
-	IOMUX_CONFIG_ALT7,
-	IOMUX_CONFIG_GPIO,      /* added to help user use GPIO mode */
-	IOMUX_CONFIG_SION = 0x1 << 4,   /* LOOPBACK:MUX SION bit */
-} iomux_pin_cfg_t;
-
 /* Pad control groupings */
 #define MX51_UART1_PAD_CTRL	(PAD_CTL_HYS | PAD_CTL_PKE | PAD_CTL_PUE | \
 				PAD_CTL_DSE_HIGH)
arch/arm/plat-mxc/include/mach/iomux-mx53.h +0 -16
index 80cb3c5..4155124 100644
@@ -21,22 +21,6 @@
 
 #include <mach/iomux-v3.h>
 
-/*
- * various IOMUX alternate output functions (1-7)
- */
-typedef enum iomux_config {
-	IOMUX_CONFIG_ALT0,
-	IOMUX_CONFIG_ALT1,
-	IOMUX_CONFIG_ALT2,
-	IOMUX_CONFIG_ALT3,
-	IOMUX_CONFIG_ALT4,
-	IOMUX_CONFIG_ALT5,
-	IOMUX_CONFIG_ALT6,
-	IOMUX_CONFIG_ALT7,
-	IOMUX_CONFIG_GPIO, /* added to help user use GPIO mode */
-	IOMUX_CONFIG_SION = 0x1 << 4, /* LOOPBACK:MUX SION bit */
-} iomux_pin_cfg_t;
-
 /* These 2 defines are for pins that may not have a mux register, but could
  * have a pad setting register, and vice-versa. */
 #define NON_MUX_I	0x00
arch/arm/plat-mxc/include/mach/iomux-v3.h +15 -0
index 811716f..e1fd71b 100644
@@ -54,6 +54,21 @@ typedef struct deprecated_pad_desc {
 	unsigned select_input:3;
 } iomux_v3_cfg_t;
 
+/*
+ * various IOMUX alternate output functions (1-7)
+ */
+enum iomux_config {
+	IOMUX_CONFIG_ALT0,
+	IOMUX_CONFIG_ALT1,
+	IOMUX_CONFIG_ALT2,
+	IOMUX_CONFIG_ALT3,
+	IOMUX_CONFIG_ALT4,
+	IOMUX_CONFIG_ALT5,
+	IOMUX_CONFIG_ALT6,
+	IOMUX_CONFIG_ALT7,
+	IOMUX_CONFIG_SION = 0x1 << 4,	/* LOOPBACK:MUX SION bit */
+};
+
 static inline unsigned int MUX_CTRL_OFS(iomux_v3_cfg_t *pad)
 {
 	return pad->mux_ctrl_ofs;
Signature · 1 line
1.6.3.3
maintainer
#6 lore raw

PATCH v4 5/8 arm: mxc: move IOMUX_CONFIG_XXXX definitions to iomux-v3.h

Quoted 10 lines · Richard Zhao

Hello Sascha,

Quoted 5 lines · Richard Zhao

IOMUX_CONFIG_GPIO is not for iomux-v3. It's for old freescale iomux routines. Remove it.

If you don't have comments, could you please merge this patch? It's causing arch/arm/plat-mxc/include/mach/iomux-mx50.h incomplete.

I didn't apply it because it conflicts with current imx-for-2.6.38 branch. Other than that I don't find the enum very useful at all, because we have problems with very long lines in these files and using IOMUX_CONFIG_ALT0 where we could use 0 does not exactly improve the situation.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#7 lore raw

PATCH v4 5/8 arm: mxc: move IOMUX_CONFIG_XXXX definitions to iomux-v3.h

Quoted 9 lines · Sascha Hauer
Quoted 8 lines · Richard Zhao

Hello Sascha,

Quoted 5 lines · Richard Zhao

IOMUX_CONFIG_GPIO is not for iomux-v3. It's for old freescale iomux routines. Remove it.

Quoted 8 lines
Quoted 2 lines

If you don't have comments, could you please merge this patch? It's causing arch/arm/plat-mxc/include/mach/iomux-mx50.h incomplete.

I didn't apply it because it conflicts with current imx-for-2.6.38 branch. Other than that I don't find the enum very useful at all, because we have problems with very long lines in these files and using IOMUX_CONFIG_ALT0 where we could use 0 does not exactly improve the situation.

Yes, correct. IOMUX_CONFIG_ALT0-7 is ok. But IOMUX_CONFIG_SION is more readable than 0x1 << 4, isn't it? If you don't agree put IOMUX_CONFIG_SION in iomux-v3.h, shall I put it in iomux-mx50.h?

Thanks
Richard

Quoted 10 lines

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
maintainer
#8 lore raw

PATCH v4 5/8 arm: mxc: move IOMUX_CONFIG_XXXX definitions to iomux-v3.h

Quoted 13 lines · Richard Zhao
Quoted 12 lines · Sascha Hauer
Quoted 10 lines · Richard Zhao

Hello Sascha,

Quoted 5 lines · Richard Zhao

IOMUX_CONFIG_GPIO is not for iomux-v3. It's for old freescale iomux routines. Remove it.

If you don't have comments, could you please merge this patch? It's causing arch/arm/plat-mxc/include/mach/iomux-mx50.h incomplete.

Quoted 8 lines
Quoted 5 lines

I didn't apply it because it conflicts with current imx-for-2.6.38 branch. Other than that I don't find the enum very useful at all, because we have problems with very long lines in these files and using IOMUX_CONFIG_ALT0 where we could use 0 does not exactly improve the situation.

Yes, correct. IOMUX_CONFIG_ALT0-7 is ok. But IOMUX_CONFIG_SION is more readable than 0x1 << 4, isn't it? If you don't agree put IOMUX_CONFIG_SION in iomux-v3.h, shall I put it in iomux-mx50.h?

IOMUX_CONFIG_SION is ok, but please drop the rest.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#9 lore raw

PATCH v4 5/8 arm: mxc: move IOMUX_CONFIG_XXXX definitions to iomux-v3.h

Quoted 19 lines · Sascha Hauer
Quoted 18 lines · Richard Zhao
Quoted 17 lines · Sascha Hauer
Quoted 10 lines · Richard Zhao

Hello Sascha,

Quoted 5 lines · Richard Zhao

IOMUX_CONFIG_GPIO is not for iomux-v3. It's for old freescale iomux routines. Remove it.

If you don't have comments, could you please merge this patch? It's causing arch/arm/plat-mxc/include/mach/iomux-mx50.h incomplete.

I didn't apply it because it conflicts with current imx-for-2.6.38 branch. Other than that I don't find the enum very useful at all, because we have problems with very long lines in these files and using IOMUX_CONFIG_ALT0 where we could use 0 does not exactly improve the situation.

Quoted 5 lines
Quoted 3 lines

Yes, correct. IOMUX_CONFIG_ALT0-7 is ok. But IOMUX_CONFIG_SION is more readable than 0x1 << 4, isn't it? If you don't agree put IOMUX_CONFIG_SION in iomux-v3.h, shall I put it in iomux-mx50.h?

IOMUX_CONFIG_SION is ok, but please drop the rest.

ok to put it into iomux-v3.h? I will sent out one patch.

Richard

Quoted 10 lines

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#10 lore raw

PATCH v4 5/8 arm: mxc: move IOMUX_CONFIG_XXXX definitions to iomux-v3.h

In reply to Sascha Hauer

Sascha Hauer <[email protected]> writes:
Hi,

Quoted 9 lines · Richard Zhao
Quoted 8 lines

Hello Sascha,

Quoted 5 lines · Richard Zhao

IOMUX_CONFIG_GPIO is not for iomux-v3. It's for old freescale iomux routines. Remove it.

Quoted 8 lines
Quoted 2 lines

If you don't have comments, could you please merge this patch? It's causing arch/arm/plat-mxc/include/mach/iomux-mx50.h incomplete.

I didn't apply it because it conflicts with current imx-for-2.6.38 branch. Other than that I don't find the enum very useful at all, because we have problems with very long lines in these files and using IOMUX_CONFIG_ALT0 where we could use 0 does not exactly improve the situation.

While I agree with this, there's a small exception. I found out yesterday that now, there's no more any macro/enum defined for the infamous SION bit. Theses means that currently to defined a PAD with SION bit set, we have to create a new macro with IOMUX_PAD instead of using the _MX51_PAD_* macro as basis. Did I miss something ?

Arnaud

#11 lore raw

PATCH v4 6/8 arm: mx50: add core functions support except clock

In reply to Richard Zhao

Add core definitions and memory map, gpio, irq, iomux, uart device support.

---
 arch/arm/mach-mx5/Kconfig                     |   13 +-
 arch/arm/mach-mx5/Makefile                    |    1 +
 arch/arm/mach-mx5/Makefile.boot               |    3 +
 arch/arm/mach-mx5/devices-mx50.h              |   26 +
 arch/arm/mach-mx5/mm-mx50.c                   |   59 ++
 arch/arm/plat-mxc/devices/platform-imx-uart.c |   12 +
 arch/arm/plat-mxc/gpio.c                      |   14 +
 arch/arm/plat-mxc/include/mach/common.h       |    2 +
 arch/arm/plat-mxc/include/mach/hardware.h     |    6 +
 arch/arm/plat-mxc/include/mach/iomux-mx50.h   |  977 +++++++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/irqs.h         |    2 +
 arch/arm/plat-mxc/include/mach/memory.h       |    3 +
 arch/arm/plat-mxc/include/mach/mx50.h         |  285 +++++++
 arch/arm/plat-mxc/include/mach/mxc.h          |   13 +
 14 files changed, 1415 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/mach-mx5/devices-mx50.h
 create mode 100644 arch/arm/mach-mx5/mm-mx50.c
 create mode 100644 arch/arm/plat-mxc/include/mach/iomux-mx50.h
 create mode 100644 arch/arm/plat-mxc/include/mach/mx50.h
arch/arm/mach-mx5/Kconfig +12 -1
index 5011f42..d2e0f98 100644
@@ -1,9 +1,20 @@
 if ARCH_MX5
-# ARCH_MX51 is left for compatibility
+# ARCH_MX51 and ARCH_MX50 are left for compatibility
+
+config ARCH_MX50
+	bool
 
 config ARCH_MX51
 	bool
 
+config SOC_IMX50
+	bool
+	select MXC_TZIC
+	select ARCH_MXC_IOMUX_V3
+	select ARCH_MXC_AUDMUX_V2
+	select ARCH_HAS_CPUFREQ
+	select ARCH_MX50
+
 config	SOC_IMX51
 	bool
 	select MXC_TZIC
arch/arm/mach-mx5/Makefile +1 -0
index 026cd85..e059c30 100644
@@ -4,6 +4,7 @@
 
 # Object file lists.
 obj-y   := cpu.o mm.o clock-mx51-mx53.o devices.o
+obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
 
 obj-$(CONFIG_CPU_FREQ_IMX)    += cpu_op-mx51.o
 obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o
arch/arm/mach-mx5/Makefile.boot +3 -0
index fec7cd9..854748f 100644
@@ -1,3 +1,6 @@
+   zreladdr-$(CONFIG_ARCH_MX50)	:= 0x70008000
+params_phys-$(CONFIG_ARCH_MX50)	:= 0x70000100
+initrd_phys-$(CONFIG_ARCH_MX50)	:= 0x70800000
    zreladdr-$(CONFIG_ARCH_MX51)	:= 0x90008000
 params_phys-$(CONFIG_ARCH_MX51)	:= 0x90000100
 initrd_phys-$(CONFIG_ARCH_MX51)	:= 0x90800000
arch/arm/mach-mx5/devices-mx50.h new file +26 -0
new file mode 100644
index 0000000..98ab074
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
+ */
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <mach/mx50.h>
+#include <mach/devices-common.h>
+
+extern const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst;
+#define imx50_add_imx_uart(id, pdata)	\
+	imx_add_imx_uart_1irq(&imx50_imx_uart_data[id], pdata)
arch/arm/mach-mx5/mm-mx50.c new file +59 -0

59 lines not on this page · raw message

arch/arm/plat-mxc/devices/platform-imx-uart.c +12 -0
index 7b45b78..0c69fbc 100644
@@ -94,6 +94,18 @@ const struct imx_imx_uart_1irq_data imx35_imx_uart_data[] __initconst = {
 };
 #endif /* ifdef CONFIG_SOC_IMX35 */
 
+#ifdef CONFIG_SOC_IMX50
+const struct imx_imx_uart_1irq_data imx50_imx_uart_data[] __initconst = {
+#define imx50_imx_uart_data_entry(_id, _hwid)				\
+	imx_imx_uart_1irq_data_entry(MX50, _id, _hwid, SZ_4K)
+	imx50_imx_uart_data_entry(0, 1),
+	imx50_imx_uart_data_entry(1, 2),
+	imx50_imx_uart_data_entry(2, 3),
+	imx50_imx_uart_data_entry(3, 4),
+	imx50_imx_uart_data_entry(4, 5),
+};
+#endif /* ifdef CONFIG_SOC_IMX50 */
+
 #ifdef CONFIG_SOC_IMX51
 const struct imx_imx_uart_1irq_data imx51_imx_uart_data[] __initconst = {
 #define imx51_imx_uart_data_entry(_id, _hwid)				\
arch/arm/plat-mxc/gpio.c +14 -0
index dd4f813..bc2c7bc 100644
@@ -445,3 +445,17 @@ static struct mxc_gpio_port imx35_gpio_ports[] = {
 DEFINE_REGISTER_FUNCTION(imx35)
 
 #endif /* if defined(CONFIG_SOC_IMX35) */
+
+#if defined(CONFIG_SOC_IMX50)
+static struct mxc_gpio_port imx50_gpio_ports[] = {
+	DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 0, 1, MX50_INT_GPIO1_LOW, MX50_INT_GPIO1_HIGH),
+	DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 1, 2, MX50_INT_GPIO2_LOW, MX50_INT_GPIO2_HIGH),
+	DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 2, 3, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH),
+	DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 3, 4, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH),
+	DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 4, 5, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH),
+	DEFINE_IMX_GPIO_PORT_IRQ_HIGH(MX50, 5, 6, MX50_INT_GPIO3_LOW, MX50_INT_GPIO3_HIGH),
+};
+
+DEFINE_REGISTER_FUNCTION(imx50)
+
+#endif /* if defined(CONFIG_SOC_IMX50) */
arch/arm/plat-mxc/include/mach/common.h +2 -0
index 9d58ce5..aea2cd3 100644
@@ -20,6 +20,7 @@ extern void mx25_map_io(void);
 extern void mx27_map_io(void);
 extern void mx31_map_io(void);
 extern void mx35_map_io(void);
+extern void mx50_map_io(void);
 extern void mx51_map_io(void);
 extern void mx53_map_io(void);
 extern void mxc91231_map_io(void);
@@ -31,6 +32,7 @@ extern void mx25_init_irq(void);
 extern void mx27_init_irq(void);
 extern void mx31_init_irq(void);
 extern void mx35_init_irq(void);
+extern void mx50_init_irq(void);
 extern void mx51_init_irq(void);
 extern void mx53_init_irq(void);
 extern void mxc91231_init_irq(void);
arch/arm/plat-mxc/include/mach/hardware.h +6 -0
index f9ed0ba..26bb1ba 100644
@@ -75,6 +75,11 @@
  *	AVIC	0x68000000+0x100000	->	0xf5800000+0x100000
  *	X_MEMC	0xb8000000+0x010000	->	0xf4c00000+0x010000
  *	SPBA0	0x50000000+0x100000	->	0xf5400000+0x100000
+ * mx50:
+ *	TZIC	0x0fffc000+0x004000	->	0xf4bfc000+0x004000
+ *	SPBA0	0x50000000+0x100000	->	0xf5400000+0x100000
+ *	AIPS1	0x53f00000+0x100000	->	0xf5700000+0x100000
+ *	AIPS2	0x63f00000+0x100000	->	0xf5300000+0x100000
  * mx51:
  *	IRAM	0x1ffe0000+0x020000	->	0xf4fe0000+0x020000
  *	DEBUG	0x60000000+0x100000	->	0xf5000000+0x100000
@@ -100,6 +105,7 @@
 #define IMX_IO_ADDRESS(x)	IOMEM(IMX_IO_P2V(x))
 
 #ifdef CONFIG_ARCH_MX5
+#include <mach/mx50.h>
 #include <mach/mx51.h>
 #include <mach/mx53.h>
 #endif
arch/arm/plat-mxc/include/mach/iomux-mx50.h new file +977 -0

977 lines not on this page · raw message

arch/arm/plat-mxc/include/mach/irqs.h +2 -0
index 769a137..064026b 100644
@@ -25,6 +25,8 @@
 /* these are ordered by size to support multi-SoC kernels */
 #if defined CONFIG_ARCH_MX2
 #define MXC_GPIO_IRQS		(32 * 6)
+#elif defined CONFIG_ARCH_MX50
+#define MXC_GPIO_IRQS		(32 * 6)
 #elif defined CONFIG_ARCH_MX1
 #define MXC_GPIO_IRQS		(32 * 4)
 #elif defined CONFIG_ARCH_MX25
arch/arm/plat-mxc/include/mach/memory.h +3 -0
index 9a9a000..8386140 100644
@@ -16,6 +16,7 @@
 #define MX25_PHYS_OFFSET	UL(0x80000000)
 #define MX27_PHYS_OFFSET	UL(0xa0000000)
 #define MX3x_PHYS_OFFSET	UL(0x80000000)
+#define MX50_PHYS_OFFSET	UL(0x70000000)
 #define MX51_PHYS_OFFSET	UL(0x90000000)
 #define MX53_PHYS_OFFSET	UL(0x70000000)
 #define MXC91231_PHYS_OFFSET	UL(0x90000000)
@@ -33,6 +34,8 @@
 #  define PHYS_OFFSET		MX3x_PHYS_OFFSET
 # elif defined CONFIG_ARCH_MXC91231
 #  define PHYS_OFFSET		MXC91231_PHYS_OFFSET
+# elif defined CONFIG_ARCH_MX50
+#  define PHYS_OFFSET		MX50_PHYS_OFFSET
 # elif defined CONFIG_ARCH_MX51
 #  define PHYS_OFFSET		MX51_PHYS_OFFSET
 # elif defined CONFIG_ARCH_MX53
arch/arm/plat-mxc/include/mach/mx50.h new file +285 -0

285 lines not on this page · raw message

arch/arm/plat-mxc/include/mach/mxc.h +13 -0
index eca8f83..04c7a26 100644
@@ -32,6 +32,7 @@
 #define MXC_CPU_MX27		27
 #define MXC_CPU_MX31		31
 #define MXC_CPU_MX35		35
+#define MXC_CPU_MX50		50
 #define MXC_CPU_MX51		51
 #define MXC_CPU_MX53		53
 #define MXC_CPU_MXC91231	91231
@@ -126,6 +127,18 @@ extern unsigned int __mxc_cpu_type;
 # define cpu_is_mx35()		(0)
 #endif
 
+#ifdef CONFIG_ARCH_MX50
+# ifdef mxc_cpu_type
+#  undef mxc_cpu_type
+#  define mxc_cpu_type __mxc_cpu_type
+# else
+#  define mxc_cpu_type MXC_CPU_MX50
+# endif
+# define cpu_is_mx50()		(mxc_cpu_type == MXC_CPU_MX50)
+#else
+# define cpu_is_mx50()		(0)
+#endif
+
 #ifdef CONFIG_ARCH_MX51
 # ifdef mxc_cpu_type
 #  undef mxc_cpu_type
Signature · 1 line
1.6.3.3
#12 lore raw

PATCH v4 7/8 arm: mx50: add mx50 reference design board support

Add basic function and uart device support.

---
 arch/arm/mach-mx5/Kconfig                   |   12 ++
 arch/arm/mach-mx5/Makefile                  |    1 +
 arch/arm/mach-mx5/board-mx50_rdp.c          |  197 +++++++++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/uncompress.h |    4 +
 4 files changed, 214 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-mx5/board-mx50_rdp.c
arch/arm/mach-mx5/Kconfig +12 -0
index d2e0f98..7c31757 100644
@@ -111,4 +111,16 @@ config MACH_MX51_EFIKAMX
 	  Include support for Genesi Efika MX nettop. This includes specific
 	  configurations for the board and its peripherals.
 
+config MACH_MX50_RDP
+	bool "Support MX50 reference design platform"
+	depends on BROKEN
+	select SOC_IMX50
+	select IMX_HAVE_PLATFORM_IMX_I2C
+	select IMX_HAVE_PLATFORM_IMX_UART
+	select IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX
+	select IMX_HAVE_PLATFORM_SPI_IMX
+	help
+	  Include support for MX50 reference design platform (RDP) board. This
+	  includes specific configurations for the board and its peripherals.
+
 endif
arch/arm/mach-mx5/Makefile +1 -0
index e059c30..d99d7ab 100644
@@ -14,3 +14,4 @@ obj-$(CONFIG_MACH_EUKREA_MBIMX51_BASEBOARD) += eukrea_mbimx51-baseboard.o
 obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += board-cpuimx51sd.o
 obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd-baseboard.o
 obj-$(CONFIG_MACH_MX51_EFIKAMX) += board-mx51_efikamx.o
+obj-$(CONFIG_MACH_MX50_RDP) += board-mx50_rdp.o
arch/arm/mach-mx5/board-mx50_rdp.c new file +197 -0

197 lines not on this page · raw message

arch/arm/plat-mxc/include/mach/uncompress.h +4 -0
index 9dd9c20..5ccf3ef 100644
@@ -63,6 +63,7 @@ static inline void flush(void)
 #define MX3X_UART1_BASE_ADDR	0x43F90000
 #define MX3X_UART2_BASE_ADDR	0x43F94000
 #define MX51_UART1_BASE_ADDR	0x73fbc000
+#define MX50_UART1_BASE_ADDR	0x53fbc000
 
 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
 {
@@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
 	case MACH_TYPE_EUKREA_CPUIMX51SD:
 		uart_base = MX51_UART1_BASE_ADDR;
 		break;
+	case MACH_TYPE_MX50_RDP:
+		uart_base = MX50_UART1_BASE_ADDR;
+		break;
 	default:
 		break;
 	}
Signature · 1 line
1.6.3.3