* [RFC PATCH 10/10] mx5: Add MX53 EVK board support
@ 2010-04-16 19:35 Rob Herring
2010-04-16 22:15 ` Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Rob Herring @ 2010-04-16 19:35 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Rob Herring <r.herring@freescale.com>
---
arch/arm/mach-mx5/Kconfig | 7 +++
arch/arm/mach-mx5/Makefile | 1 +
arch/arm/mach-mx5/board-mx53_evk.c | 88 ++++++++++++++++++++++++++++++++++++
3 files changed, 96 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/mach-mx5/board-mx53_evk.c
diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
index 12e9ce7..cc08120 100644
--- a/arch/arm/mach-mx5/Kconfig
+++ b/arch/arm/mach-mx5/Kconfig
@@ -20,4 +20,11 @@ config MACH_MX51_BABBAGE
u-boot. This includes specific configurations for the board and its
peripherals.
+config MACH_MX53_EVK
+ bool "Support MX53 EVK platform"
+ select ARCH_MX53
+ help
+ Include support for MX53 EVK platform. This includes specific
+ configurations for the board and its peripherals.
+
endif
diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile
index e4cf91f..201f01b 100644
--- a/arch/arm/mach-mx5/Makefile
+++ b/arch/arm/mach-mx5/Makefile
@@ -6,4 +6,5 @@
obj-y := cpu.o mm.o clock.o devices.o
obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o
+obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o
diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
new file mode 100644
index 0000000..b9d3b55
--- /dev/null
+++ b/arch/arm/mach-mx5/board-mx53_evk.c
@@ -0,0 +1,88 @@
+/*
+ * 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 <linux/init.h>
+#include <linux/io.h>
+#include <linux/platform_device.h>
+
+#include <mach/common.h>
+#include <mach/hardware.h>
+#include <mach/imx-uart.h>
+#include <mach/iomux-mx53.h>
+
+#include <asm/irq.h>
+#include <asm/setup.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/time.h>
+
+#include "devices.h"
+
+static struct pad_desc mx51evk_pads[] = {
+ /* UART1 */
+ MX53_PAD_CSI0_D11__UART1_RXD,
+ MX53_PAD_CSI0_D10__UART1_TXD,
+};
+
+/* Serial ports */
+#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
+static struct imxuart_platform_data uart_pdata = {
+// .flags = IMXUART_HAVE_RTSCTS,
+};
+
+static inline void mxc_init_imx_uart(void)
+{
+ mxc_register_device(&mxc_uart_device0, &uart_pdata);
+ mxc_register_device(&mxc_uart_device1, &uart_pdata);
+ mxc_register_device(&mxc_uart_device2, &uart_pdata);
+}
+#else /* !SERIAL_IMX */
+static inline void mxc_init_imx_uart(void)
+{
+}
+#endif /* SERIAL_IMX */
+
+/*
+ * Board specific initialization.
+ */
+static void __init mxc_board_init(void)
+{
+// mxc_iomux_v3_setup_multiple_pads(mx51evk_pads,
+// ARRAY_SIZE(mx51evk_pads));
+ mxc_init_imx_uart();
+ mxc_register_device(&mxc_fec_device, NULL);
+}
+
+static void __init mx53_evk_timer_init(void)
+{
+ mx53_clocks_init(32768, 24000000, 22579200, 0);
+}
+
+static struct sys_timer mxc_timer = {
+ .init = mx53_evk_timer_init,
+};
+
+MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board")
+ /* Maintainer: Rob Herring <r.herring@freescale.com> */
+ .phys_io = MX51_AIPS1_BASE_ADDR - 0x20000000,
+ .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
+ .map_io = mx5_map_io,
+ .init_irq = mx5x_init_irq,
+ .init_machine = mxc_board_init,
+ .timer = &mxc_timer,
+MACHINE_END
--
1.6.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [RFC PATCH 10/10] mx5: Add MX53 EVK board support
2010-04-16 19:35 [RFC PATCH 10/10] mx5: Add MX53 EVK board support Rob Herring
@ 2010-04-16 22:15 ` Fabio Estevam
2010-04-19 13:33 ` Herring Robert-RA7055
2010-04-17 16:00 ` Xianghua Xiao
2010-04-19 20:40 ` Timur Tabi
2 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2010-04-16 22:15 UTC (permalink / raw)
To: linux-arm-kernel
Rob,
--- On Fri, 4/16/10, Rob Herring <r.herring@freescale.com> wrote:
> From: Rob Herring <r.herring@freescale.com>
> Subject: [RFC PATCH 10/10] mx5: Add MX53 EVK board support
> To: linux-arm-kernel at lists.infradead.org, s.hauer at pengutronix.de, amit.kucheria at canonical.com
> Cc: "Rob Herring" <r.herring@freescale.com>
> Date: Friday, April 16, 2010, 4:35 PM
> Signed-off-by: Rob Herring <r.herring@freescale.com>
> ---
> arch/arm/mach-mx5/Kconfig? ? ? ?
> ? |? ? 7 +++
> arch/arm/mach-mx5/Makefile? ? ?
> ???|? ? 1 +
> arch/arm/mach-mx5/board-mx53_evk.c |???88
> ++++++++++++++++++++++++++++++++++++
> 3 files changed, 96 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/mach-mx5/board-mx53_evk.c
Shouldn't the name of this file be mach-mx53_evk.c to match the naming convention patches that Uwe sent?
Regards,
Fabio Estevam
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC PATCH 10/10] mx5: Add MX53 EVK board support
2010-04-16 19:35 [RFC PATCH 10/10] mx5: Add MX53 EVK board support Rob Herring
2010-04-16 22:15 ` Fabio Estevam
@ 2010-04-17 16:00 ` Xianghua Xiao
2010-04-19 20:40 ` Timur Tabi
2 siblings, 0 replies; 8+ messages in thread
From: Xianghua Xiao @ 2010-04-17 16:00 UTC (permalink / raw)
To: linux-arm-kernel
a dumb question here, I know Freescale has evk for i.mx51, what's this
mx53 evk here? I did not find anything related at freescale.com
either.
thanks,
On Fri, Apr 16, 2010 at 2:35 PM, Rob Herring <r.herring@freescale.com> wrote:
> Signed-off-by: Rob Herring <r.herring@freescale.com>
> ---
> ?arch/arm/mach-mx5/Kconfig ? ? ? ? ?| ? ?7 +++
> ?arch/arm/mach-mx5/Makefile ? ? ? ? | ? ?1 +
> ?arch/arm/mach-mx5/board-mx53_evk.c | ? 88 ++++++++++++++++++++++++++++++++++++
> ?3 files changed, 96 insertions(+), 0 deletions(-)
> ?create mode 100644 arch/arm/mach-mx5/board-mx53_evk.c
>
> diff --git a/arch/arm/mach-mx5/Kconfig b/arch/arm/mach-mx5/Kconfig
> index 12e9ce7..cc08120 100644
> --- a/arch/arm/mach-mx5/Kconfig
> +++ b/arch/arm/mach-mx5/Kconfig
> @@ -20,4 +20,11 @@ config MACH_MX51_BABBAGE
> ? ? ? ? ?u-boot. This includes specific configurations for the board and its
> ? ? ? ? ?peripherals.
>
> +config MACH_MX53_EVK
> + ? ? ? bool "Support MX53 EVK platform"
> + ? ? ? select ARCH_MX53
> + ? ? ? help
> + ? ? ? ? Include support for MX53 EVK platform. This includes specific
> + ? ? ? ? configurations for the board and its peripherals.
> +
> ?endif
> diff --git a/arch/arm/mach-mx5/Makefile b/arch/arm/mach-mx5/Makefile
> index e4cf91f..201f01b 100644
> --- a/arch/arm/mach-mx5/Makefile
> +++ b/arch/arm/mach-mx5/Makefile
> @@ -6,4 +6,5 @@
> ?obj-y ? := cpu.o mm.o clock.o devices.o
>
> ?obj-$(CONFIG_MACH_MX51_BABBAGE) += board-mx51_babbage.o
> +obj-$(CONFIG_MACH_MX53_EVK) += board-mx53_evk.o
>
> diff --git a/arch/arm/mach-mx5/board-mx53_evk.c b/arch/arm/mach-mx5/board-mx53_evk.c
> new file mode 100644
> index 0000000..b9d3b55
> --- /dev/null
> +++ b/arch/arm/mach-mx5/board-mx53_evk.c
> @@ -0,0 +1,88 @@
> +/*
> + * 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 <linux/init.h>
> +#include <linux/io.h>
> +#include <linux/platform_device.h>
> +
> +#include <mach/common.h>
> +#include <mach/hardware.h>
> +#include <mach/imx-uart.h>
> +#include <mach/iomux-mx53.h>
> +
> +#include <asm/irq.h>
> +#include <asm/setup.h>
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach/time.h>
> +
> +#include "devices.h"
> +
> +static struct pad_desc mx51evk_pads[] = {
> + ? ? ? /* UART1 */
> + ? ? ? MX53_PAD_CSI0_D11__UART1_RXD,
> + ? ? ? MX53_PAD_CSI0_D10__UART1_TXD,
> +};
> +
> +/* Serial ports */
> +#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
> +static struct imxuart_platform_data uart_pdata = {
> +// ? ? .flags = IMXUART_HAVE_RTSCTS,
> +};
> +
> +static inline void mxc_init_imx_uart(void)
> +{
> + ? ? ? mxc_register_device(&mxc_uart_device0, &uart_pdata);
> + ? ? ? mxc_register_device(&mxc_uart_device1, &uart_pdata);
> + ? ? ? mxc_register_device(&mxc_uart_device2, &uart_pdata);
> +}
> +#else /* !SERIAL_IMX */
> +static inline void mxc_init_imx_uart(void)
> +{
> +}
> +#endif /* SERIAL_IMX */
> +
> +/*
> + * Board specific initialization.
> + */
> +static void __init mxc_board_init(void)
> +{
> +// ? ? mxc_iomux_v3_setup_multiple_pads(mx51evk_pads,
> +// ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ARRAY_SIZE(mx51evk_pads));
> + ? ? ? mxc_init_imx_uart();
> + ? ? ? mxc_register_device(&mxc_fec_device, NULL);
> +}
> +
> +static void __init mx53_evk_timer_init(void)
> +{
> + ? ? ? mx53_clocks_init(32768, 24000000, 22579200, 0);
> +}
> +
> +static struct sys_timer mxc_timer = {
> + ? ? ? .init ? = mx53_evk_timer_init,
> +};
> +
> +MACHINE_START(MX53_EVK, "Freescale MX53 EVK Board")
> + ? ? ? /* Maintainer: Rob Herring <r.herring@freescale.com> */
> + ? ? ? .phys_io = MX51_AIPS1_BASE_ADDR - 0x20000000,
> + ? ? ? .io_pg_offst = ((MX51_AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
> + ? ? ? .map_io = mx5_map_io,
> + ? ? ? .init_irq = mx5x_init_irq,
> + ? ? ? .init_machine = mxc_board_init,
> + ? ? ? .timer = &mxc_timer,
> +MACHINE_END
> --
> 1.6.0.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC PATCH 10/10] mx5: Add MX53 EVK board support
2010-04-16 22:15 ` Fabio Estevam
@ 2010-04-19 13:33 ` Herring Robert-RA7055
2010-04-19 13:55 ` Amit Kucheria
0 siblings, 1 reply; 8+ messages in thread
From: Herring Robert-RA7055 @ 2010-04-19 13:33 UTC (permalink / raw)
To: linux-arm-kernel
Fabio,
> -----Original Message-----
> From: Fabio Estevam [mailto:fabioestevam at yahoo.com]
> Sent: Friday, April 16, 2010 5:15 PM
> To: linux-arm-kernel at lists.infradead.org;
> s.hauer at pengutronix.de; amit.kucheria at canonical.com; Herring
> Robert-RA7055
> Cc: Herring Robert-RA7055; u.kleine-koenig at pengutronix.de
> Subject: Re: [RFC PATCH 10/10] mx5: Add MX53 EVK board support
>
> Rob,
>
> --- On Fri, 4/16/10, Rob Herring <r.herring@freescale.com> wrote:
>
> > From: Rob Herring <r.herring@freescale.com>
> > Subject: [RFC PATCH 10/10] mx5: Add MX53 EVK board support
> > To: linux-arm-kernel at lists.infradead.org,
> s.hauer at pengutronix.de, amit.kucheria at canonical.com
> > Cc: "Rob Herring" <r.herring@freescale.com>
> > Date: Friday, April 16, 2010, 4:35 PM
> > Signed-off-by: Rob Herring <r.herring@freescale.com>
> > ---
> > arch/arm/mach-mx5/Kconfig? ? ? ?
> > ? |? ? 7 +++
> > arch/arm/mach-mx5/Makefile? ? ?
> > ???|? ? 1 +
> > arch/arm/mach-mx5/board-mx53_evk.c |???88
> > ++++++++++++++++++++++++++++++++++++
> > 3 files changed, 96 insertions(+), 0 deletions(-)
> > create mode 100644 arch/arm/mach-mx5/board-mx53_evk.c
>
> Shouldn't the name of this file be mach-mx53_evk.c to match
> the naming convention patches that Uwe sent?
Not when Babbage board is named board-mx51_babbage.c.
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC PATCH 10/10] mx5: Add MX53 EVK board support
2010-04-19 13:33 ` Herring Robert-RA7055
@ 2010-04-19 13:55 ` Amit Kucheria
0 siblings, 0 replies; 8+ messages in thread
From: Amit Kucheria @ 2010-04-19 13:55 UTC (permalink / raw)
To: linux-arm-kernel
On 10 Apr 19, Herring Robert-RA7055 wrote:
> Fabio,
>
> > -----Original Message-----
> > From: Fabio Estevam [mailto:fabioestevam at yahoo.com]
> > Sent: Friday, April 16, 2010 5:15 PM
> > To: linux-arm-kernel at lists.infradead.org;
> > s.hauer at pengutronix.de; amit.kucheria at canonical.com; Herring
> > Robert-RA7055
> > Cc: Herring Robert-RA7055; u.kleine-koenig at pengutronix.de
> > Subject: Re: [RFC PATCH 10/10] mx5: Add MX53 EVK board support
> >
> > Rob,
> >
> > --- On Fri, 4/16/10, Rob Herring <r.herring@freescale.com> wrote:
> >
> > > From: Rob Herring <r.herring@freescale.com>
> > > Subject: [RFC PATCH 10/10] mx5: Add MX53 EVK board support
> > > To: linux-arm-kernel at lists.infradead.org,
> > s.hauer at pengutronix.de, amit.kucheria at canonical.com
> > > Cc: "Rob Herring" <r.herring@freescale.com>
> > > Date: Friday, April 16, 2010, 4:35 PM
> > > Signed-off-by: Rob Herring <r.herring@freescale.com>
> > > ---
> > > arch/arm/mach-mx5/Kconfig? ? ? ?
> > > ? |? ? 7 +++
> > > arch/arm/mach-mx5/Makefile? ? ?
> > > ???|? ? 1 +
> > > arch/arm/mach-mx5/board-mx53_evk.c |???88
> > > ++++++++++++++++++++++++++++++++++++
> > > 3 files changed, 96 insertions(+), 0 deletions(-)
> > > create mode 100644 arch/arm/mach-mx5/board-mx53_evk.c
> >
> > Shouldn't the name of this file be mach-mx53_evk.c to match
> > the naming convention patches that Uwe sent?
>
> Not when Babbage board is named board-mx51_babbage.c.
>
IMO, the current naming scheme of mach-* for SoC platforms and board-* for
specific boards is a lot more intuitive than converting everything to mach-*.
Currently inside arch/arm/mach-*/ some platforms use the board-* scheme and
some use the mach-* scheme.
Regards,
Amit
--
----------------------------------------------------------------------
Amit Kucheria, Kernel Engineer || amit.kucheria at canonical.com
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC PATCH 10/10] mx5: Add MX53 EVK board support
2010-04-16 19:35 [RFC PATCH 10/10] mx5: Add MX53 EVK board support Rob Herring
2010-04-16 22:15 ` Fabio Estevam
2010-04-17 16:00 ` Xianghua Xiao
@ 2010-04-19 20:40 ` Timur Tabi
2010-04-19 20:47 ` Herring Robert-RA7055
2 siblings, 1 reply; 8+ messages in thread
From: Timur Tabi @ 2010-04-19 20:40 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 16, 2010 at 2:35 PM, Rob Herring <r.herring@freescale.com> wrote:
> +/* Serial ports */
> +#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
> +static struct imxuart_platform_data uart_pdata = {
> +// ? ? .flags = IMXUART_HAVE_RTSCTS,
You forgot to run checkpatch.pl. C++ comments are not allowed.
> +#else /* !SERIAL_IMX */
> +static inline void mxc_init_imx_uart(void)
> +{
> +}
> +#endif /* SERIAL_IMX */
How about:
#define mxc_init_imx_uart() do { } while (0)
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC PATCH 10/10] mx5: Add MX53 EVK board support
2010-04-19 20:40 ` Timur Tabi
@ 2010-04-19 20:47 ` Herring Robert-RA7055
2010-04-19 20:53 ` Timur Tabi
0 siblings, 1 reply; 8+ messages in thread
From: Herring Robert-RA7055 @ 2010-04-19 20:47 UTC (permalink / raw)
To: linux-arm-kernel
Timur,
> -----Original Message-----
> From: Timur Tabi [mailto:timur.tabi at gmail.com]
> Sent: Monday, April 19, 2010 3:40 PM
> To: Herring Robert-RA7055
> Cc: linux-arm-kernel at lists.infradead.org;
> s.hauer at pengutronix.de; amit.kucheria at canonical.com
> Subject: Re: [RFC PATCH 10/10] mx5: Add MX53 EVK board support
>
> On Fri, Apr 16, 2010 at 2:35 PM, Rob Herring
> <r.herring@freescale.com> wrote:
>
> > +/* Serial ports */
> > +#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
> > +static struct imxuart_platform_data uart_pdata = {
> > +// ? ? .flags = IMXUART_HAVE_RTSCTS,
>
> You forgot to run checkpatch.pl. C++ comments are not allowed.
Yes I know. I'm only soliciting comments on the way I have structured adding MX53 to MX51 codebase.
>
> > +#else /* !SERIAL_IMX */
> > +static inline void mxc_init_imx_uart(void)
> > +{
> > +}
> > +#endif /* SERIAL_IMX */
>
> How about:
>
> #define mxc_init_imx_uart() do { } while (0)
Just following existing code style in board-mx51_babbage.c.
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC PATCH 10/10] mx5: Add MX53 EVK board support
2010-04-19 20:47 ` Herring Robert-RA7055
@ 2010-04-19 20:53 ` Timur Tabi
0 siblings, 0 replies; 8+ messages in thread
From: Timur Tabi @ 2010-04-19 20:53 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Apr 19, 2010 at 3:47 PM, Herring Robert-RA7055
<ra7055@freescale.com> wrote:
>> You forgot to run checkpatch.pl. ?C++ comments are not allowed.
>
> Yes I know. I'm only soliciting comments on the way I have structured adding MX53 to MX51 codebase.
Ok.
>> How about:
>>
>> #define mxc_init_imx_uart() do { } while (0)
>
> Just following existing code style in board-mx51_babbage.c.
I understand, but I believe the consensus for general kernel
development is to use "#define .. do while(0)" to represent a no-op
function.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-04-19 20:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-16 19:35 [RFC PATCH 10/10] mx5: Add MX53 EVK board support Rob Herring
2010-04-16 22:15 ` Fabio Estevam
2010-04-19 13:33 ` Herring Robert-RA7055
2010-04-19 13:55 ` Amit Kucheria
2010-04-17 16:00 ` Xianghua Xiao
2010-04-19 20:40 ` Timur Tabi
2010-04-19 20:47 ` Herring Robert-RA7055
2010-04-19 20:53 ` Timur Tabi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.