All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
@ 2011-02-10 21:15 Denis 'GNUtoo' Carikli
  2011-02-10 21:41 ` Marc Kleine-Budde
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-10 21:15 UTC (permalink / raw)
  To: linux-arm-kernel

This work was based on bug-linux-2.6.30.patch that can be found
  in buglabs's svn here:
  svn://bugcamp.net/bug/branches/izzy/experimental

Note that the hardware schematics and documentations can be obtained
  here: http://www.bugcommunity.com/wiki/index.php/BUGbase

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
 arch/arm/mach-mx3/Kconfig            |    9 +++
 arch/arm/mach-mx3/Makefile           |    1 +
 arch/arm/mach-mx3/mach-mx31bugbase.c |   97 ++++++++++++++++++++++++++++++++++
 3 files changed, 107 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-mx3/mach-mx31bugbase.c

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index de80d98..4f57f13 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -199,6 +199,15 @@ config MACH_KZM_ARM11_01
 	  Include support for KZM-ARM11-01. This includes specific
 	  configurations for the board and its peripherals.
 
+config MACH_BUG
+	bool "Support Buglabs BUGBase platform"
+	select SOC_IMX31
+	select IMX_HAVE_PLATFORM_IMX_UART
+	default y
+	help
+	  Include support for BUGBase 1.3 platform. This includes specific
+	  configurations for the board and its peripherals.
+
 config MACH_EUKREA_CPUIMX35
 	bool "Support Eukrea CPUIMX35 Platform"
 	select SOC_IMX35
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
index bc7294f..98e5eb3 100644
--- a/arch/arm/mach-mx3/Makefile
+++ b/arch/arm/mach-mx3/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
 obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
 obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
 obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
+obj-$(CONFIG_MACH_BUG)          += mach-mx31bugbase.o
 obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
 obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
 obj-$(CONFIG_MACH_VPR200)	+= mach-vpr200.o
diff --git a/arch/arm/mach-mx3/mach-mx31bugbase.c b/arch/arm/mach-mx3/mach-mx31bugbase.c
new file mode 100644
index 0000000..e0ad0f0
--- /dev/null
+++ b/arch/arm/mach-mx3/mach-mx31bugbase.c
@@ -0,0 +1,97 @@
+/*
+ *  Copyright (C) 2000 Deep Blue Solutions Ltd
+ *  Copyright (C) 2002 Shane Nay (shane at minirl.com)
+ *  Copyright 2005-2007 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <mach/iomux-mx3.h>
+#include <mach/imx-uart.h>
+#include <mach/hardware.h>
+#include <mach/common.h>
+
+#include <asm/mach/time.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include "devices-imx31.h"
+
+/*!
+ * @file mx31bugbase.c
+ *
+ * @brief This file contains the board-specific initialization routines.
+ *
+ * @ingroup System
+ */
+
+#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
+static struct imxuart_platform_data uart_pdata = {
+	.flags = IMXUART_HAVE_RTSCTS,
+};
+
+static unsigned int uart5_pins[] = {
+	MX31_PIN_PC_RST__CTS5,
+	MX31_PIN_PC_VS2__RTS5,
+	MX31_PIN_PC_BVD2__TXD5,
+	MX31_PIN_PC_BVD1__RXD5
+};
+
+static inline void mxc_init_imx_uart(void)
+{
+	mxc_iomux_setup_multiple_pins(uart5_pins,
+				ARRAY_SIZE(uart5_pins), "uart-4");
+	imx31_add_imx_uart4(&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_init_imx_uart();
+}
+
+
+static void __init mx31bug_timer_init(void)
+{
+	mx31_clocks_init(26000000);
+}
+
+static struct sys_timer mx31bug_timer = {
+	.init	= mx31bug_timer_init,
+};
+
+/*
+ * The following uses standard kernel macros defined in arch.h in order to
+ * initialize __mach_desc_MX31BUG data structure.
+ */
+
+MACHINE_START(BUG, "BugLabs BUGBase")
+	.boot_params    = PHYS_OFFSET + 0x100,
+	.timer          = &mx31bug_timer,
+	.map_io         = mx31_map_io,
+	.init_irq       = mx31_init_irq,
+	.init_machine   = mxc_board_init,
+MACHINE_END
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-10 21:15 [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
@ 2011-02-10 21:41 ` Marc Kleine-Budde
  2011-02-11  2:42 ` Fabio Estevam
  2011-02-11  8:10 ` Uwe Kleine-König
  2 siblings, 0 replies; 26+ messages in thread
From: Marc Kleine-Budde @ 2011-02-10 21:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

(sorry if this mail is sent twice..)

On 02/10/2011 10:15 PM, Denis 'GNUtoo' Carikli wrote:
> This work was based on bug-linux-2.6.30.patch that can be found
>   in buglabs's svn here:
>   svn://bugcamp.net/bug/branches/izzy/experimental
> 
> Note that the hardware schematics and documentations can be obtained
>   here: http://www.bugcommunity.com/wiki/index.php/BUGbase

some nitpicking inside:

> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
> ---
>  arch/arm/mach-mx3/Kconfig            |    9 +++
>  arch/arm/mach-mx3/Makefile           |    1 +
>  arch/arm/mach-mx3/mach-mx31bugbase.c |   97 ++++++++++++++++++++++++++++++++++
>  3 files changed, 107 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-mx3/mach-mx31bugbase.c
> 
> diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
> index de80d98..4f57f13 100644
> --- a/arch/arm/mach-mx3/Kconfig
> +++ b/arch/arm/mach-mx3/Kconfig
> @@ -199,6 +199,15 @@ config MACH_KZM_ARM11_01
>  	  Include support for KZM-ARM11-01. This includes specific
>  	  configurations for the board and its peripherals.
>  
> +config MACH_BUG
> +	bool "Support Buglabs BUGBase platform"
> +	select SOC_IMX31
> +	select IMX_HAVE_PLATFORM_IMX_UART
> +	default y
> +	help
> +	  Include support for BUGBase 1.3 platform. This includes specific
> +	  configurations for the board and its peripherals.
> +
>  config MACH_EUKREA_CPUIMX35
>  	bool "Support Eukrea CPUIMX35 Platform"
>  	select SOC_IMX35
> diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
> index bc7294f..98e5eb3 100644
> --- a/arch/arm/mach-mx3/Makefile
> +++ b/arch/arm/mach-mx3/Makefile
> @@ -20,6 +20,7 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
>  obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
>  obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
>  obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
> +obj-$(CONFIG_MACH_BUG)          += mach-mx31bugbase.o
>  obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
>  obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
>  obj-$(CONFIG_MACH_VPR200)	+= mach-vpr200.o
> diff --git a/arch/arm/mach-mx3/mach-mx31bugbase.c b/arch/arm/mach-mx3/mach-mx31bugbase.c
> new file mode 100644
> index 0000000..e0ad0f0
> --- /dev/null
> +++ b/arch/arm/mach-mx3/mach-mx31bugbase.c
> @@ -0,0 +1,97 @@
> +/*
> + *  Copyright (C) 2000 Deep Blue Solutions Ltd
> + *  Copyright (C) 2002 Shane Nay (shane at minirl.com)
> + *  Copyright 2005-2007 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

The address isn't correct anymore, just remove the paragraph, see commit
aa71251c5b8c673361281fbfd8be5a9ee8b9f4cc.

> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +
> +#include <mach/iomux-mx3.h>
> +#include <mach/imx-uart.h>
> +#include <mach/hardware.h>
> +#include <mach/common.h>
> +
> +#include <asm/mach/time.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach-types.h>
> +
> +#include "devices-imx31.h"
> +
> +/*!
> + * @file mx31bugbase.c
> + *
> + * @brief This file contains the board-specific initialization routines.
> + *
> + * @ingroup System
> + */
> +
> +#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
> +static struct imxuart_platform_data uart_pdata = {
> +	.flags = IMXUART_HAVE_RTSCTS,
> +};
> +
> +static unsigned int uart5_pins[] = {
> +	MX31_PIN_PC_RST__CTS5,
> +	MX31_PIN_PC_VS2__RTS5,
> +	MX31_PIN_PC_BVD2__TXD5,
> +	MX31_PIN_PC_BVD1__RXD5

please add a ","

> +};
> +
> +static inline void mxc_init_imx_uart(void)
> +{
> +	mxc_iomux_setup_multiple_pins(uart5_pins,
> +				ARRAY_SIZE(uart5_pins), "uart-4");
> +	imx31_add_imx_uart4(&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_init_imx_uart();
> +}
> +
> +
> +static void __init mx31bug_timer_init(void)
> +{
> +	mx31_clocks_init(26000000);
> +}
> +
> +static struct sys_timer mx31bug_timer = {
> +	.init	= mx31bug_timer_init,
> +};
> +
> +/*
> + * The following uses standard kernel macros defined in arch.h in order to
> + * initialize __mach_desc_MX31BUG data structure.
> + */
> +
> +MACHINE_START(BUG, "BugLabs BUGBase")
> +	.boot_params    = PHYS_OFFSET + 0x100,
> +	.timer          = &mx31bug_timer,
> +	.map_io         = mx31_map_io,
> +	.init_irq       = mx31_init_irq,
> +	.init_machine   = mxc_board_init,
> +MACHINE_END

cheers, Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110210/79462723/attachment.sig>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-10 21:15 [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
  2011-02-10 21:41 ` Marc Kleine-Budde
@ 2011-02-11  2:42 ` Fabio Estevam
  2011-02-11  8:10 ` Uwe Kleine-König
  2 siblings, 0 replies; 26+ messages in thread
From: Fabio Estevam @ 2011-02-11  2:42 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Denis,

On Thu, Feb 10, 2011 at 7:15 PM, Denis 'GNUtoo' Carikli
<GNUtoo@no-log.org> wrote:
> This work was based on bug-linux-2.6.30.patch that can be found
> ?in buglabs's svn here:
> ?svn://bugcamp.net/bug/branches/izzy/experimental
>
> Note that the hardware schematics and documentations can be obtained
> ?here: http://www.bugcommunity.com/wiki/index.php/BUGbase
>
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
> ---
> ?arch/arm/mach-mx3/Kconfig ? ? ? ? ? ?| ? ?9 +++
> ?arch/arm/mach-mx3/Makefile ? ? ? ? ? | ? ?1 +
> ?arch/arm/mach-mx3/mach-mx31bugbase.c | ? 97 ++++++++++++++++++++++++++++++++++
> ?3 files changed, 107 insertions(+), 0 deletions(-)

Please add an entry for this board at
arch/arm/plat-mxc/include/mach/uncompress.h

Regards,

Fabio Estevam

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-10 21:15 [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
  2011-02-10 21:41 ` Marc Kleine-Budde
  2011-02-11  2:42 ` Fabio Estevam
@ 2011-02-11  8:10 ` Uwe Kleine-König
  2011-02-11  9:21   ` [PATCH 1/3] ARM: mx3+mx5: rename to ${machine}_init Uwe Kleine-König
                     ` (3 more replies)
  2 siblings, 4 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-11  8:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 10, 2011 at 10:15:54PM +0100, Denis 'GNUtoo' Carikli wrote:
> This work was based on bug-linux-2.6.30.patch that can be found
>   in buglabs's svn here:
>   svn://bugcamp.net/bug/branches/izzy/experimental
> 
> Note that the hardware schematics and documentations can be obtained
>   here: http://www.bugcommunity.com/wiki/index.php/BUGbase
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
> ---
>  arch/arm/mach-mx3/Kconfig            |    9 +++
>  arch/arm/mach-mx3/Makefile           |    1 +
>  arch/arm/mach-mx3/mach-mx31bugbase.c |   97 ++++++++++++++++++++++++++++++++++
>  3 files changed, 107 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-mx3/mach-mx31bugbase.c
> 
> diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
> index de80d98..4f57f13 100644
> --- a/arch/arm/mach-mx3/Kconfig
> +++ b/arch/arm/mach-mx3/Kconfig
> @@ -199,6 +199,15 @@ config MACH_KZM_ARM11_01
>  	  Include support for KZM-ARM11-01. This includes specific
>  	  configurations for the board and its peripherals.
>  
> +config MACH_BUG
> +	bool "Support Buglabs BUGBase platform"
> +	select SOC_IMX31
> +	select IMX_HAVE_PLATFORM_IMX_UART
> +	default y
> +	help
> +	  Include support for BUGBase 1.3 platform. This includes specific
> +	  configurations for the board and its peripherals.
> +
>  config MACH_EUKREA_CPUIMX35
>  	bool "Support Eukrea CPUIMX35 Platform"
>  	select SOC_IMX35
> diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
> index bc7294f..98e5eb3 100644
> --- a/arch/arm/mach-mx3/Makefile
> +++ b/arch/arm/mach-mx3/Makefile
> @@ -20,6 +20,7 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
>  obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
>  obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
>  obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
> +obj-$(CONFIG_MACH_BUG)          += mach-mx31bugbase.o
>  obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
>  obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
>  obj-$(CONFIG_MACH_VPR200)	+= mach-vpr200.o
> diff --git a/arch/arm/mach-mx3/mach-mx31bugbase.c b/arch/arm/mach-mx3/mach-mx31bugbase.c
> new file mode 100644
> index 0000000..e0ad0f0
> --- /dev/null
> +++ b/arch/arm/mach-mx3/mach-mx31bugbase.c
> @@ -0,0 +1,97 @@
> +/*
> + *  Copyright (C) 2000 Deep Blue Solutions Ltd
> + *  Copyright (C) 2002 Shane Nay (shane at minirl.com)
> + *  Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
If you ask me, remove the double space before the "Copyright"s.

> + * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +
> +#include <mach/iomux-mx3.h>
> +#include <mach/imx-uart.h>
> +#include <mach/hardware.h>
> +#include <mach/common.h>
> +
> +#include <asm/mach/time.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach-types.h>
> +
> +#include "devices-imx31.h"
> +
> +/*!
> + * @file mx31bugbase.c
> + *
> + * @brief This file contains the board-specific initialization routines.
> + *
> + * @ingroup System
> + */
No doxygen-like comments, please.  This comment is quite useless
actually.

> +
> +#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
> +static struct imxuart_platform_data uart_pdata = {
> +	.flags = IMXUART_HAVE_RTSCTS,
> +};
> +
> +static unsigned int uart5_pins[] = {
> +	MX31_PIN_PC_RST__CTS5,
> +	MX31_PIN_PC_VS2__RTS5,
> +	MX31_PIN_PC_BVD2__TXD5,
> +	MX31_PIN_PC_BVD1__RXD5
> +};
> +
> +static inline void mxc_init_imx_uart(void)
> +{
> +	mxc_iomux_setup_multiple_pins(uart5_pins,
> +				ARRAY_SIZE(uart5_pins), "uart-4");
> +	imx31_add_imx_uart4(&uart_pdata);
> +}
> +#else /* !SERIAL_IMX */
> +static inline void mxc_init_imx_uart(void)
> +{
> +}
> +#endif /* !SERIAL_IMX */
We usually register devices independant of the availability of the
drivers.

> +
> +/*!
> + * Board specific initialization.
> + */
> +static void __init mxc_board_init(void)
Please use a different name. mxc_board_init is used much and so makes
ctags and backtraces less valuable.  Something like mx31bug_init would
be fine.

> +{
> +	mxc_init_imx_uart();
> +}
> +
> +
> +static void __init mx31bug_timer_init(void)
> +{
> +	mx31_clocks_init(26000000);
> +}
> +
> +static struct sys_timer mx31bug_timer = {
> +	.init	= mx31bug_timer_init,
> +};
> +
> +/*
> + * The following uses standard kernel macros defined in arch.h in order to
> + * initialize __mach_desc_MX31BUG data structure.
> + */
not usefull.

> +
> +MACHINE_START(BUG, "BugLabs BUGBase")
> +	.boot_params    = PHYS_OFFSET + 0x100,
use MX3_PHYS_OFFSET here please.

> +	.timer          = &mx31bug_timer,
> +	.map_io         = mx31_map_io,
> +	.init_irq       = mx31_init_irq,
> +	.init_machine   = mxc_board_init,
> +MACHINE_END
Note that this patch conflicts with

	http://mid.gmane.org/1297092922-12741-2-git-send-email-u.kleine-koenig at pengutronix.de

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH 1/3] ARM: mx3+mx5: rename  to ${machine}_init
  2011-02-11  8:10 ` Uwe Kleine-König
@ 2011-02-11  9:21   ` Uwe Kleine-König
  2011-02-11  9:23     ` [PATCH 1/3 v2] ARM: mx3+mx5: rename mxc_board_init " Uwe Kleine-König
  2011-02-11  9:21   ` [PATCH 2/3] ARM: mx3: remove some useless comments Uwe Kleine-König
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-11  9:21 UTC (permalink / raw)
  To: linux-arm-kernel

mxc_board_init is too generic to be useful.  Additionally change some
mxc_timer to ${machine}_timer, too.

Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 arch/arm/mach-mx3/mach-cpuimx35.c      |    4 ++--
 arch/arm/mach-mx3/mach-kzm_arm11_01.c  |    6 +-----
 arch/arm/mach-mx3/mach-mx31_3ds.c      |    7 ++-----
 arch/arm/mach-mx3/mach-mx31ads.c       |    7 ++-----
 arch/arm/mach-mx3/mach-mx31lite.c      |    4 ++--
 arch/arm/mach-mx3/mach-mx31moboard.c   |    4 ++--
 arch/arm/mach-mx3/mach-mx35_3ds.c      |    4 ++--
 arch/arm/mach-mx3/mach-pcm037.c        |    4 ++--
 arch/arm/mach-mx3/mach-pcm043.c        |    4 ++--
 arch/arm/mach-mx3/mach-qong.c          |    4 ++--
 arch/arm/mach-mx5/board-mx51_3ds.c     |   10 +++++-----
 arch/arm/mach-mx5/board-mx51_babbage.c |   10 +++++-----
 arch/arm/mach-mx5/board-mx51_efikamx.c |   10 +++++-----
 13 files changed, 34 insertions(+), 44 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 3eedf0f..7364db1 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -146,7 +146,7 @@ __setup("otg_mode=", eukrea_cpuimx35_otg_mode);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init eukrea_cpuimx35_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads,
 			ARRAY_SIZE(eukrea_cpuimx35_pads));
@@ -189,5 +189,5 @@ MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35")
 	.init_ext3_fs = imx35_init_early,
 	.init_irq = mx35_init_irq,
 	.timer = &eukrea_cpuimx35_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = eukrea_cpuimx35_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
index 52b8dd7..d3cc739 100644
--- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
@@ -266,13 +266,9 @@ static void __init kzm_timer_init(void)
 }
 
 static struct sys_timer kzm_timer = {
-	.init   = kzm_timer_init,
+	.init = kzm_timer_init,
 };
 
-/*
- * The following uses standard kernel macros define in arch.h in order to
- * initialize __mach_desc_KZM_ARM11_01 data structure.
- */
 MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
 	.boot_params = MX3x_PHYS_OFFSET + 0x100,
 	.map_io = kzm_map_io,
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 3d0ded9..1360fe4 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -320,10 +320,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
-/*!
- * Board specific initialization.
- */
-static void __init mxc_board_init(void)
+static void __init mx31_3ds_init(void)
 {
 	mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins),
 				      "mx31_3ds");
@@ -378,5 +375,5 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &mx31_3ds_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx31_3ds_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c
index 787bdc4..cb80b96 100644
--- a/arch/arm/mach-mx3/mach-mx31ads.c
+++ b/arch/arm/mach-mx3/mach-mx31ads.c
@@ -524,10 +524,7 @@ static void __init mx31ads_init_irq(void)
 	mx31ads_init_expio();
 }
 
-/*!
- * Board specific initialization.
- */
-static void __init mxc_board_init(void)
+static void __init mx31ads_init(void)
 {
 	mxc_init_extuart();
 	mxc_init_imx_uart();
@@ -555,5 +552,5 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
 	.init_early = imx31_init_early,
 	.init_irq = mx31ads_init_irq,
 	.timer = &mx31ads_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx31ads_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c
index 01e24b5..64a1c1e 100644
--- a/arch/arm/mach-mx3/mach-mx31lite.c
+++ b/arch/arm/mach-mx3/mach-mx31lite.c
@@ -227,7 +227,7 @@ void __init mx31lite_map_io(void)
 static int mx31lite_baseboard;
 core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444);
 
-static void __init mxc_board_init(void)
+static void __init mx31lite_init(void)
 {
 	int ret;
 
@@ -286,5 +286,5 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &mx31lite_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx31lite_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index fd988a0..e77b081 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -503,7 +503,7 @@ core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init mx31moboard_init(void)
 {
 	mxc_iomux_setup_multiple_pins(moboard_pins, ARRAY_SIZE(moboard_pins),
 		"moboard");
@@ -569,5 +569,5 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &mx31moboard_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx31moboard_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
index c5115dc..0665111 100644
--- a/arch/arm/mach-mx3/mach-mx35_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -156,7 +156,7 @@ __setup("otg_mode=", mx35_3ds_otg_mode);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init mx35_3ds_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads));
 
@@ -198,5 +198,5 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
 	.init_early = imx35_init_early,
 	.init_irq = mx35_init_irq,
 	.timer = &mx35pdk_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx35_3ds_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c
index 7d444f7..b4f9ace 100644
--- a/arch/arm/mach-mx3/mach-pcm037.c
+++ b/arch/arm/mach-mx3/mach-pcm037.c
@@ -568,7 +568,7 @@ __setup("otg_mode=", pcm037_otg_mode);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init pcm037_init(void)
 {
 	int ret;
 
@@ -680,5 +680,5 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &pcm037_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = pcm037_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c
index b03e19d..912841c 100644
--- a/arch/arm/mach-mx3/mach-pcm043.c
+++ b/arch/arm/mach-mx3/mach-pcm043.c
@@ -341,7 +341,7 @@ __setup("otg_mode=", pcm043_otg_mode);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init pcm043_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads));
 
@@ -408,5 +408,5 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
 	.init_early = imx35_init_early,
 	.init_irq = mx35_init_irq,
 	.timer = &pcm043_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = pcm043_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-qong.c b/arch/arm/mach-mx3/mach-qong.c
index 064f2db..0028163 100644
--- a/arch/arm/mach-mx3/mach-qong.c
+++ b/arch/arm/mach-mx3/mach-qong.c
@@ -247,7 +247,7 @@ static void __init qong_init_fpga(void)
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init qong_init(void)
 {
 	mxc_init_imx_uart();
 	qong_init_nor_mtd();
@@ -275,5 +275,5 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &qong_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = qong_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index 0168470..63dfbea 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -133,7 +133,7 @@ static struct spi_board_info mx51_3ds_spi_nor_device[] = {
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init mx51_3ds_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
 					ARRAY_SIZE(mx51_3ds_pads));
@@ -160,8 +160,8 @@ static void __init mx51_3ds_timer_init(void)
 	mx51_clocks_init(32768, 24000000, 22579200, 0);
 }
 
-static struct sys_timer mxc_timer = {
-	.init	= mx51_3ds_timer_init,
+static struct sys_timer mx51_3ds_timer = {
+	.init = mx51_3ds_timer_init,
 };
 
 MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
@@ -170,6 +170,6 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
 	.map_io = mx51_map_io,
 	.init_early = imx51_init_early,
 	.init_irq = mx51_init_irq,
-	.timer = &mxc_timer,
-	.init_machine = mxc_board_init,
+	.timer = &mx51_3ds_timer,
+	.init_machine = mx51_3ds_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index 2bd9c9e..ab725e0 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -336,7 +336,7 @@ static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = {
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init mx51_babbage_init(void)
 {
 	iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
 	iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 |
@@ -390,8 +390,8 @@ static void __init mx51_babbage_timer_init(void)
 	mx51_clocks_init(32768, 24000000, 22579200, 0);
 }
 
-static struct sys_timer mxc_timer = {
-	.init	= mx51_babbage_timer_init,
+static struct sys_timer mx51_babbage_timer = {
+	.init = mx51_babbage_timer_init,
 };
 
 MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
@@ -400,6 +400,6 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
 	.map_io = mx51_map_io,
 	.init_early = imx51_init_early,
 	.init_irq = mx51_init_irq,
-	.timer = &mxc_timer,
-	.init_machine = mxc_board_init,
+	.timer = &mx51_babbage_timer,
+	.init_machine = mx51_babbage_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
index 2aac4c5..6b35c7d 100644
--- a/arch/arm/mach-mx5/board-mx51_efikamx.c
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -301,7 +301,7 @@ void mx51_efikamx_reset(void)
 		gpio_direction_output(EFIKAMX_RESET, 0);
 }
 
-static void __init mxc_board_init(void)
+static void __init mx51_efikamx_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
 					ARRAY_SIZE(mx51efikamx_pads));
@@ -339,8 +339,8 @@ static void __init mx51_efikamx_timer_init(void)
 	mx51_clocks_init(32768, 24000000, 22579200, 24576000);
 }
 
-static struct sys_timer mxc_timer = {
-	.init	= mx51_efikamx_timer_init,
+static struct sys_timer mx51_efikamx_timer = {
+	.init = mx51_efikamx_timer_init,
 };
 
 MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
@@ -349,6 +349,6 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
 	.map_io = mx51_map_io,
 	.init_early = imx51_init_early,
 	.init_irq = mx51_init_irq,
-	.timer = &mxc_timer,
-	.init_machine =  mxc_board_init,
+	.timer = &mx51_efikamx_timer,
+	.init_machine = mx51_efikamx_init,
 MACHINE_END
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 2/3] ARM: mx3: remove some useless comments
  2011-02-11  8:10 ` Uwe Kleine-König
  2011-02-11  9:21   ` [PATCH 1/3] ARM: mx3+mx5: rename to ${machine}_init Uwe Kleine-König
@ 2011-02-11  9:21   ` Uwe Kleine-König
  2011-02-11  9:21   ` [PATCH 3/3] ARM: mx3/mx31ads: fix comments of irq callbacks Uwe Kleine-König
  2011-02-11 21:06   ` [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
  3 siblings, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-11  9:21 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 arch/arm/mach-mx3/mach-mx31_3ds.c |    8 --------
 arch/arm/mach-mx3/mach-mx31ads.c  |   14 +-------------
 arch/arm/mach-mx3/mach-qong.c     |    9 ---------
 arch/arm/mach-mx3/mm.c            |    9 ---------
 4 files changed, 1 insertions(+), 39 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 1360fe4..817a275 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -42,10 +42,6 @@
 /* CPLD IRQ line for external uart, external ethernet etc */
 #define EXPIO_PARENT_INT	IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
 
-/*
- * This file contains the board-specific initialization routines.
- */
-
 static int mx31_3ds_pins[] = {
 	/* UART1 */
 	MX31_PIN_CTS1__CTS1,
@@ -364,10 +360,6 @@ static struct sys_timer mx31_3ds_timer = {
 	.init	= mx31_3ds_timer_init,
 };
 
-/*
- * The following uses standard kernel macros defined in arch.h in order to
- * initialize __mach_desc_MX31_3DS data structure.
- */
 MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
 	/* Maintainer: Freescale Semiconductor, Inc. */
 	.boot_params = MX3x_PHYS_OFFSET + 0x100,
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c
index cb80b96..14e7671 100644
--- a/arch/arm/mach-mx3/mach-mx31ads.c
+++ b/arch/arm/mach-mx3/mach-mx31ads.c
@@ -69,9 +69,6 @@
 #define EXPIO_INT_XUART_INTB	(MXC_EXP_IO_BASE + 11)
 
 #define MXC_MAX_EXP_IO_LINES	16
-/*
- * This file contains the board-specific initialization routines.
- */
 
 /*
  * The serial port definition structure.
@@ -497,9 +494,7 @@ static void mxc_init_audio(void)
 	mxc_iomux_setup_multiple_pins(ssi_pins, ARRAY_SIZE(ssi_pins), "ssi");
 }
 
-/*!
- * This structure defines static mappings for the i.MX31ADS board.
- */
+/* static mappings */
 static struct map_desc mx31ads_io_desc[] __initdata = {
 	{
 		.virtual	= MX31_CS4_BASE_ADDR_VIRT,
@@ -509,9 +504,6 @@ static struct map_desc mx31ads_io_desc[] __initdata = {
 	},
 };
 
-/*!
- * Set up static virtual mappings.
- */
 static void __init mx31ads_map_io(void)
 {
 	mx31_map_io();
@@ -541,10 +533,6 @@ static struct sys_timer mx31ads_timer = {
 	.init	= mx31ads_timer_init,
 };
 
-/*
- * The following uses standard kernel macros defined in arch.h in order to
- * initialize __mach_desc_MX31ADS data structure.
- */
 MACHINE_START(MX31ADS, "Freescale MX31ADS")
 	/* Maintainer: Freescale Semiconductor, Inc. */
 	.boot_params = MX3x_PHYS_OFFSET + 0x100,
diff --git a/arch/arm/mach-mx3/mach-qong.c b/arch/arm/mach-mx3/mach-qong.c
index 0028163..17f758b 100644
--- a/arch/arm/mach-mx3/mach-qong.c
+++ b/arch/arm/mach-mx3/mach-qong.c
@@ -54,10 +54,6 @@
 
 #define QONG_FPGA_IRQ		IOMUX_TO_IRQ(MX31_PIN_DTR_DCE1)
 
-/*
- * This file contains the board-specific initialization routines.
- */
-
 static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
@@ -263,11 +259,6 @@ static struct sys_timer qong_timer = {
 	.init	= qong_timer_init,
 };
 
-/*
- * The following uses standard kernel macros defined in arch.h in order to
- * initialize __mach_desc_QONG data structure.
- */
-
 MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
 	/* Maintainer: DENX Software Engineering GmbH */
 	.boot_params = MX3x_PHYS_OFFSET + 0x100,
diff --git a/arch/arm/mach-mx3/mm.c b/arch/arm/mach-mx3/mm.c
index 3387319..eefd4cf 100644
--- a/arch/arm/mach-mx3/mm.c
+++ b/arch/arm/mach-mx3/mm.c
@@ -28,14 +28,6 @@
 #include <mach/hardware.h>
 #include <mach/iomux-v3.h>
 
-/*!
- * @file mm.c
- *
- * @brief This file creates static virtual to physical mappings, common to all MX3 boards.
- *
- * @ingroup Memory
- */
-
 #ifdef CONFIG_SOC_IMX31
 static struct map_desc mx31_io_desc[] __initdata = {
 	imx_map_entry(MX31, X_MEMC, MT_DEVICE),
@@ -135,4 +127,3 @@ static int mxc_init_l2x0(void)
 
 arch_initcall(mxc_init_l2x0);
 #endif
-
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 3/3] ARM: mx3/mx31ads: fix comments of irq callbacks
  2011-02-11  8:10 ` Uwe Kleine-König
  2011-02-11  9:21   ` [PATCH 1/3] ARM: mx3+mx5: rename to ${machine}_init Uwe Kleine-König
  2011-02-11  9:21   ` [PATCH 2/3] ARM: mx3: remove some useless comments Uwe Kleine-König
@ 2011-02-11  9:21   ` Uwe Kleine-König
  2011-02-11 21:06   ` [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
  3 siblings, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-11  9:21 UTC (permalink / raw)
  To: linux-arm-kernel

The arguments to these callbacks were changed in

	e981a30 (ARM: mx3: irq_data conversion.)

but the comments were not adapted.

Cc: Lennert Buytenhek <buytenh@secretlab.ca>
Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 arch/arm/mach-mx3/mach-mx31ads.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c
index 14e7671..4e4b780 100644
--- a/arch/arm/mach-mx3/mach-mx31ads.c
+++ b/arch/arm/mach-mx3/mach-mx31ads.c
@@ -144,7 +144,7 @@ static void mx31ads_expio_irq_handler(u32 irq, struct irq_desc *desc)
 
 /*
  * Disable an expio pin's interrupt by setting the bit in the imr.
- * @param irq           an expio virtual irq number
+ * @param d	an expio virtual irq description
  */
 static void expio_mask_irq(struct irq_data *d)
 {
@@ -156,7 +156,7 @@ static void expio_mask_irq(struct irq_data *d)
 
 /*
  * Acknowledge an expanded io pin's interrupt by clearing the bit in the isr.
- * @param irq           an expanded io virtual irq number
+ * @param d	an expio virtual irq description
  */
 static void expio_ack_irq(struct irq_data *d)
 {
@@ -167,7 +167,7 @@ static void expio_ack_irq(struct irq_data *d)
 
 /*
  * Enable a expio pin's interrupt by clearing the bit in the imr.
- * @param irq           a expio virtual irq number
+ * @param d	an expio virtual irq description
  */
 static void expio_unmask_irq(struct irq_data *d)
 {
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 1/3 v2] ARM: mx3+mx5: rename mxc_board_init to ${machine}_init
  2011-02-11  9:21   ` [PATCH 1/3] ARM: mx3+mx5: rename to ${machine}_init Uwe Kleine-König
@ 2011-02-11  9:23     ` Uwe Kleine-König
  0 siblings, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-11  9:23 UTC (permalink / raw)
  To: linux-arm-kernel

mxc_board_init is too generic to be useful.  Additionally change some
mxc_timer to ${machine}_timer, too.

Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
Hello,

sorry, the first version had a word missing in the Subject.

Uwe

 arch/arm/mach-mx3/mach-cpuimx35.c      |    4 ++--
 arch/arm/mach-mx3/mach-kzm_arm11_01.c  |    6 +-----
 arch/arm/mach-mx3/mach-mx31_3ds.c      |    7 ++-----
 arch/arm/mach-mx3/mach-mx31ads.c       |    7 ++-----
 arch/arm/mach-mx3/mach-mx31lite.c      |    4 ++--
 arch/arm/mach-mx3/mach-mx31moboard.c   |    4 ++--
 arch/arm/mach-mx3/mach-mx35_3ds.c      |    4 ++--
 arch/arm/mach-mx3/mach-pcm037.c        |    4 ++--
 arch/arm/mach-mx3/mach-pcm043.c        |    4 ++--
 arch/arm/mach-mx3/mach-qong.c          |    4 ++--
 arch/arm/mach-mx5/board-mx51_3ds.c     |   10 +++++-----
 arch/arm/mach-mx5/board-mx51_babbage.c |   10 +++++-----
 arch/arm/mach-mx5/board-mx51_efikamx.c |   10 +++++-----
 13 files changed, 34 insertions(+), 44 deletions(-)

diff --git a/arch/arm/mach-mx3/mach-cpuimx35.c b/arch/arm/mach-mx3/mach-cpuimx35.c
index 3eedf0f..7364db1 100644
--- a/arch/arm/mach-mx3/mach-cpuimx35.c
+++ b/arch/arm/mach-mx3/mach-cpuimx35.c
@@ -146,7 +146,7 @@ __setup("otg_mode=", eukrea_cpuimx35_otg_mode);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init eukrea_cpuimx35_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads,
 			ARRAY_SIZE(eukrea_cpuimx35_pads));
@@ -189,5 +189,5 @@ MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35")
 	.init_ext3_fs = imx35_init_early,
 	.init_irq = mx35_init_irq,
 	.timer = &eukrea_cpuimx35_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = eukrea_cpuimx35_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
index 52b8dd7..d3cc739 100644
--- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
@@ -266,13 +266,9 @@ static void __init kzm_timer_init(void)
 }
 
 static struct sys_timer kzm_timer = {
-	.init   = kzm_timer_init,
+	.init = kzm_timer_init,
 };
 
-/*
- * The following uses standard kernel macros define in arch.h in order to
- * initialize __mach_desc_KZM_ARM11_01 data structure.
- */
 MACHINE_START(KZM_ARM11_01, "Kyoto Microcomputer Co., Ltd. KZM-ARM11-01")
 	.boot_params = MX3x_PHYS_OFFSET + 0x100,
 	.map_io = kzm_map_io,
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 3d0ded9..1360fe4 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -320,10 +320,7 @@ static const struct imxuart_platform_data uart_pdata __initconst = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
 
-/*!
- * Board specific initialization.
- */
-static void __init mxc_board_init(void)
+static void __init mx31_3ds_init(void)
 {
 	mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins),
 				      "mx31_3ds");
@@ -378,5 +375,5 @@ MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &mx31_3ds_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx31_3ds_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx31ads.c b/arch/arm/mach-mx3/mach-mx31ads.c
index 787bdc4..cb80b96 100644
--- a/arch/arm/mach-mx3/mach-mx31ads.c
+++ b/arch/arm/mach-mx3/mach-mx31ads.c
@@ -524,10 +524,7 @@ static void __init mx31ads_init_irq(void)
 	mx31ads_init_expio();
 }
 
-/*!
- * Board specific initialization.
- */
-static void __init mxc_board_init(void)
+static void __init mx31ads_init(void)
 {
 	mxc_init_extuart();
 	mxc_init_imx_uart();
@@ -555,5 +552,5 @@ MACHINE_START(MX31ADS, "Freescale MX31ADS")
 	.init_early = imx31_init_early,
 	.init_irq = mx31ads_init_irq,
 	.timer = &mx31ads_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx31ads_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx31lite.c b/arch/arm/mach-mx3/mach-mx31lite.c
index 01e24b5..64a1c1e 100644
--- a/arch/arm/mach-mx3/mach-mx31lite.c
+++ b/arch/arm/mach-mx3/mach-mx31lite.c
@@ -227,7 +227,7 @@ void __init mx31lite_map_io(void)
 static int mx31lite_baseboard;
 core_param(mx31lite_baseboard, mx31lite_baseboard, int, 0444);
 
-static void __init mxc_board_init(void)
+static void __init mx31lite_init(void)
 {
 	int ret;
 
@@ -286,5 +286,5 @@ MACHINE_START(MX31LITE, "LogicPD i.MX31 SOM")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &mx31lite_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx31lite_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index fd988a0..e77b081 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -503,7 +503,7 @@ core_param(mx31moboard_baseboard, mx31moboard_baseboard, int, 0444);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init mx31moboard_init(void)
 {
 	mxc_iomux_setup_multiple_pins(moboard_pins, ARRAY_SIZE(moboard_pins),
 		"moboard");
@@ -569,5 +569,5 @@ MACHINE_START(MX31MOBOARD, "EPFL Mobots mx31moboard")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &mx31moboard_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx31moboard_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-mx35_3ds.c b/arch/arm/mach-mx3/mach-mx35_3ds.c
index c5115dc..0665111 100644
--- a/arch/arm/mach-mx3/mach-mx35_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx35_3ds.c
@@ -156,7 +156,7 @@ __setup("otg_mode=", mx35_3ds_otg_mode);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init mx35_3ds_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(mx35pdk_pads, ARRAY_SIZE(mx35pdk_pads));
 
@@ -198,5 +198,5 @@ MACHINE_START(MX35_3DS, "Freescale MX35PDK")
 	.init_early = imx35_init_early,
 	.init_irq = mx35_init_irq,
 	.timer = &mx35pdk_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = mx35_3ds_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-pcm037.c b/arch/arm/mach-mx3/mach-pcm037.c
index 7d444f7..b4f9ace 100644
--- a/arch/arm/mach-mx3/mach-pcm037.c
+++ b/arch/arm/mach-mx3/mach-pcm037.c
@@ -568,7 +568,7 @@ __setup("otg_mode=", pcm037_otg_mode);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init pcm037_init(void)
 {
 	int ret;
 
@@ -680,5 +680,5 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &pcm037_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = pcm037_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-pcm043.c b/arch/arm/mach-mx3/mach-pcm043.c
index b03e19d..912841c 100644
--- a/arch/arm/mach-mx3/mach-pcm043.c
+++ b/arch/arm/mach-mx3/mach-pcm043.c
@@ -341,7 +341,7 @@ __setup("otg_mode=", pcm043_otg_mode);
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init pcm043_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads));
 
@@ -408,5 +408,5 @@ MACHINE_START(PCM043, "Phytec Phycore pcm043")
 	.init_early = imx35_init_early,
 	.init_irq = mx35_init_irq,
 	.timer = &pcm043_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = pcm043_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx3/mach-qong.c b/arch/arm/mach-mx3/mach-qong.c
index 064f2db..0028163 100644
--- a/arch/arm/mach-mx3/mach-qong.c
+++ b/arch/arm/mach-mx3/mach-qong.c
@@ -247,7 +247,7 @@ static void __init qong_init_fpga(void)
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init qong_init(void)
 {
 	mxc_init_imx_uart();
 	qong_init_nor_mtd();
@@ -275,5 +275,5 @@ MACHINE_START(QONG, "Dave/DENX QongEVB-LITE")
 	.init_early = imx31_init_early,
 	.init_irq = mx31_init_irq,
 	.timer = &qong_timer,
-	.init_machine = mxc_board_init,
+	.init_machine = qong_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index 0168470..63dfbea 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -133,7 +133,7 @@ static struct spi_board_info mx51_3ds_spi_nor_device[] = {
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init mx51_3ds_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(mx51_3ds_pads,
 					ARRAY_SIZE(mx51_3ds_pads));
@@ -160,8 +160,8 @@ static void __init mx51_3ds_timer_init(void)
 	mx51_clocks_init(32768, 24000000, 22579200, 0);
 }
 
-static struct sys_timer mxc_timer = {
-	.init	= mx51_3ds_timer_init,
+static struct sys_timer mx51_3ds_timer = {
+	.init = mx51_3ds_timer_init,
 };
 
 MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
@@ -170,6 +170,6 @@ MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
 	.map_io = mx51_map_io,
 	.init_early = imx51_init_early,
 	.init_irq = mx51_init_irq,
-	.timer = &mxc_timer,
-	.init_machine = mxc_board_init,
+	.timer = &mx51_3ds_timer,
+	.init_machine = mx51_3ds_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_babbage.c b/arch/arm/mach-mx5/board-mx51_babbage.c
index 2bd9c9e..ab725e0 100644
--- a/arch/arm/mach-mx5/board-mx51_babbage.c
+++ b/arch/arm/mach-mx5/board-mx51_babbage.c
@@ -336,7 +336,7 @@ static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = {
 /*
  * Board specific initialization.
  */
-static void __init mxc_board_init(void)
+static void __init mx51_babbage_init(void)
 {
 	iomux_v3_cfg_t usbh1stp = MX51_PAD_USBH1_STP__USBH1_STP;
 	iomux_v3_cfg_t power_key = _MX51_PAD_EIM_A27__GPIO2_21 |
@@ -390,8 +390,8 @@ static void __init mx51_babbage_timer_init(void)
 	mx51_clocks_init(32768, 24000000, 22579200, 0);
 }
 
-static struct sys_timer mxc_timer = {
-	.init	= mx51_babbage_timer_init,
+static struct sys_timer mx51_babbage_timer = {
+	.init = mx51_babbage_timer_init,
 };
 
 MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
@@ -400,6 +400,6 @@ MACHINE_START(MX51_BABBAGE, "Freescale MX51 Babbage Board")
 	.map_io = mx51_map_io,
 	.init_early = imx51_init_early,
 	.init_irq = mx51_init_irq,
-	.timer = &mxc_timer,
-	.init_machine = mxc_board_init,
+	.timer = &mx51_babbage_timer,
+	.init_machine = mx51_babbage_init,
 MACHINE_END
diff --git a/arch/arm/mach-mx5/board-mx51_efikamx.c b/arch/arm/mach-mx5/board-mx51_efikamx.c
index 2aac4c5..6b35c7d 100644
--- a/arch/arm/mach-mx5/board-mx51_efikamx.c
+++ b/arch/arm/mach-mx5/board-mx51_efikamx.c
@@ -301,7 +301,7 @@ void mx51_efikamx_reset(void)
 		gpio_direction_output(EFIKAMX_RESET, 0);
 }
 
-static void __init mxc_board_init(void)
+static void __init mx51_efikamx_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(mx51efikamx_pads,
 					ARRAY_SIZE(mx51efikamx_pads));
@@ -339,8 +339,8 @@ static void __init mx51_efikamx_timer_init(void)
 	mx51_clocks_init(32768, 24000000, 22579200, 24576000);
 }
 
-static struct sys_timer mxc_timer = {
-	.init	= mx51_efikamx_timer_init,
+static struct sys_timer mx51_efikamx_timer = {
+	.init = mx51_efikamx_timer_init,
 };
 
 MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
@@ -349,6 +349,6 @@ MACHINE_START(MX51_EFIKAMX, "Genesi EfikaMX nettop")
 	.map_io = mx51_map_io,
 	.init_early = imx51_init_early,
 	.init_irq = mx51_init_irq,
-	.timer = &mxc_timer,
-	.init_machine =  mxc_board_init,
+	.timer = &mx51_efikamx_timer,
+	.init_machine = mx51_efikamx_init,
 MACHINE_END
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11  8:10 ` Uwe Kleine-König
                     ` (2 preceding siblings ...)
  2011-02-11  9:21   ` [PATCH 3/3] ARM: mx3/mx31ads: fix comments of irq callbacks Uwe Kleine-König
@ 2011-02-11 21:06   ` Denis 'GNUtoo' Carikli
  2011-02-11 21:09     ` Denis 'GNUtoo' Carikli
                       ` (3 more replies)
  3 siblings, 4 replies; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-11 21:06 UTC (permalink / raw)
  To: linux-arm-kernel

This work was based on bug-linux-2.6.30.patch that can be found
  in buglabs's svn here:
  svn://bugcamp.net/bug/branches/izzy/experimental

Note that the hardware schematics and documentations can be obtained
  here: http://www.bugcommunity.com/wiki/index.php/BUGbase

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
 arch/arm/mach-mx3/Kconfig                   |    9 +++
 arch/arm/mach-mx3/Makefile                  |    1 +
 arch/arm/mach-mx3/mach-mx31bugbase.c        |   75 +++++++++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/uncompress.h |    4 ++
 4 files changed, 89 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-mx3/mach-mx31bugbase.c

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index de80d98..4f57f13 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -199,6 +199,15 @@ config MACH_KZM_ARM11_01
 	  Include support for KZM-ARM11-01. This includes specific
 	  configurations for the board and its peripherals.
 
+config MACH_BUG
+	bool "Support Buglabs BUGBase platform"
+	select SOC_IMX31
+	select IMX_HAVE_PLATFORM_IMX_UART
+	default y
+	help
+	  Include support for BUGBase 1.3 platform. This includes specific
+	  configurations for the board and its peripherals.
+
 config MACH_EUKREA_CPUIMX35
 	bool "Support Eukrea CPUIMX35 Platform"
 	select SOC_IMX35
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
index bc7294f..98e5eb3 100644
--- a/arch/arm/mach-mx3/Makefile
+++ b/arch/arm/mach-mx3/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
 obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
 obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
 obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
+obj-$(CONFIG_MACH_BUG)          += mach-mx31bugbase.o
 obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
 obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
 obj-$(CONFIG_MACH_VPR200)	+= mach-vpr200.o
diff --git a/arch/arm/mach-mx3/mach-mx31bugbase.c b/arch/arm/mach-mx3/mach-mx31bugbase.c
new file mode 100644
index 0000000..1d8ca1c
--- /dev/null
+++ b/arch/arm/mach-mx3/mach-mx31bugbase.c
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ * Copyright (C) 2002 Shane Nay (shane at minirl.com)
+ * Copyright 2005-2007 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <mach/iomux-mx3.h>
+#include <mach/imx-uart.h>
+#include <mach/hardware.h>
+#include <mach/common.h>
+
+#include <asm/mach/time.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include "devices-imx31.h"
+
+static struct imxuart_platform_data uart_pdata = {
+	.flags = IMXUART_HAVE_RTSCTS,
+};
+
+static unsigned int uart5_pins[] = {
+	MX31_PIN_PC_RST__CTS5,
+	MX31_PIN_PC_VS2__RTS5,
+	MX31_PIN_PC_BVD2__TXD5,
+	MX31_PIN_PC_BVD1__RXD5,
+};
+
+static inline void mx31bug_init_imx_uart(void)
+{
+	mxc_iomux_setup_multiple_pins(uart5_pins,
+				ARRAY_SIZE(uart5_pins), "uart-4");
+	imx31_add_imx_uart4(&uart_pdata);
+}
+
+/*!
+ * Board specific initialization.
+ */
+static void __init mx31bug_board_init(void)
+{
+	mx31bug_init_imx_uart();
+}
+
+
+static void __init mx31bug_timer_init(void)
+{
+	mx31_clocks_init(26000000);
+}
+
+static struct sys_timer mx31bug_timer = {
+	.init	= mx31bug_timer_init,
+};
+
+MACHINE_START(BUG, "BugLabs BUGBase")
+	.boot_params = MX3x_PHYS_OFFSET + 0x100,
+	.map_io = mx31_map_io,
+        .init_early = imx31_init_early,
+	.init_irq = mx31_init_irq,
+        .timer = &mx31bug_timer,
+	.init_machine = mx31bug_board_init,
+MACHINE_END
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index e634d6c..b45f534 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -62,6 +62,7 @@ static inline void flush(void)
 #define MX2X_UART1_BASE_ADDR	0x1000a000
 #define MX3X_UART1_BASE_ADDR	0x43F90000
 #define MX3X_UART2_BASE_ADDR	0x43F94000
+#define MX3X_UART5_BASE_ADDR	0x43FB4000
 #define MX51_UART1_BASE_ADDR	0x73fbc000
 #define MX50_UART1_BASE_ADDR	0x53fbc000
 #define MX53_UART1_BASE_ADDR	0x53fbc000
@@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
 	case MACH_TYPE_MAGX_ZN5:
 		uart_base = MX3X_UART2_BASE_ADDR;
 		break;
+	case MACH_TYPE_BUG:
+		uart_base = MX3X_UART5_BASE_ADDR;
+		break;
 	case MACH_TYPE_MX51_BABBAGE:
 	case MACH_TYPE_EUKREA_CPUIMX51SD:
 	case MACH_TYPE_MX51_3DS:
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:06   ` [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
@ 2011-02-11 21:09     ` Denis 'GNUtoo' Carikli
  2011-02-11 21:13     ` Denis 'GNUtoo' Carikli
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-11 21:09 UTC (permalink / raw)
  To: linux-arm-kernel

Sorry, the --subject-prefix="[PATCH V2]" was ignored

Denis.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:06   ` [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
  2011-02-11 21:09     ` Denis 'GNUtoo' Carikli
@ 2011-02-11 21:13     ` Denis 'GNUtoo' Carikli
  2011-02-11 21:39       ` Uwe Kleine-König
  2011-02-11 21:30     ` Marc Kleine-Budde
  2011-02-11 21:33     ` Uwe Kleine-König
  3 siblings, 1 reply; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-11 21:13 UTC (permalink / raw)
  To: linux-arm-kernel

> diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
> index e634d6c..b45f534 100644
> --- a/arch/arm/plat-mxc/include/mach/uncompress.h
> +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
> @@ -62,6 +62,7 @@ static inline void flush(void)
>  #define MX2X_UART1_BASE_ADDR	0x1000a000
>  #define MX3X_UART1_BASE_ADDR	0x43F90000
>  #define MX3X_UART2_BASE_ADDR	0x43F94000
> +#define MX3X_UART5_BASE_ADDR	0x43FB4000
>  #define MX51_UART1_BASE_ADDR	0x73fbc000
>  #define MX50_UART1_BASE_ADDR	0x53fbc000
>  #define MX53_UART1_BASE_ADDR	0x53fbc000
> @@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
>  	case MACH_TYPE_MAGX_ZN5:
>  		uart_base = MX3X_UART2_BASE_ADDR;
>  		break;
> +	case MACH_TYPE_BUG:
> +		uart_base = MX3X_UART5_BASE_ADDR;
> +		break;
>  	case MACH_TYPE_MX51_BABBAGE:
>  	case MACH_TYPE_EUKREA_CPUIMX51SD:
>  	case MACH_TYPE_MX51_3DS:
That seem not to crash, but I wonder if it's really useful:
Basically I see u-boot loading the kernel, then I have
> Uncompressing Linux... 
Then I wait some seconds
Then I see that line beeing complretted with:
> done, booting the kernel.
Then the rest of the messages are displayed very fast,
along with initramfs loading messages and I finally get a shell.

Denis.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:06   ` [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
  2011-02-11 21:09     ` Denis 'GNUtoo' Carikli
  2011-02-11 21:13     ` Denis 'GNUtoo' Carikli
@ 2011-02-11 21:30     ` Marc Kleine-Budde
  2011-02-12 20:15       ` Denis 'GNUtoo' Carikli
  2011-02-11 21:33     ` Uwe Kleine-König
  3 siblings, 1 reply; 26+ messages in thread
From: Marc Kleine-Budde @ 2011-02-11 21:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 02/11/2011 10:06 PM, Denis 'GNUtoo' Carikli wrote:
> This work was based on bug-linux-2.6.30.patch that can be found
>   in buglabs's svn here:
>   svn://bugcamp.net/bug/branches/izzy/experimental
> 
> Note that the hardware schematics and documentations can be obtained
>   here: http://www.bugcommunity.com/wiki/index.php/BUGbase
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
> ---
>  arch/arm/mach-mx3/Kconfig                   |    9 +++
>  arch/arm/mach-mx3/Makefile                  |    1 +
>  arch/arm/mach-mx3/mach-mx31bugbase.c        |   75 +++++++++++++++++++++++++++
>  arch/arm/plat-mxc/include/mach/uncompress.h |    4 ++
>  4 files changed, 89 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-mx3/mach-mx31bugbase.c
> 
> diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
> index de80d98..4f57f13 100644
> --- a/arch/arm/mach-mx3/Kconfig
> +++ b/arch/arm/mach-mx3/Kconfig
> @@ -199,6 +199,15 @@ config MACH_KZM_ARM11_01
>  	  Include support for KZM-ARM11-01. This includes specific
>  	  configurations for the board and its peripherals.
>  
> +config MACH_BUG
> +	bool "Support Buglabs BUGBase platform"
> +	select SOC_IMX31
> +	select IMX_HAVE_PLATFORM_IMX_UART
> +	default y
> +	help
> +	  Include support for BUGBase 1.3 platform. This includes specific
> +	  configurations for the board and its peripherals.
> +
>  config MACH_EUKREA_CPUIMX35
>  	bool "Support Eukrea CPUIMX35 Platform"
>  	select SOC_IMX35
> diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
> index bc7294f..98e5eb3 100644
> --- a/arch/arm/mach-mx3/Makefile
> +++ b/arch/arm/mach-mx3/Makefile
> @@ -20,6 +20,7 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
>  obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
>  obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
>  obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
> +obj-$(CONFIG_MACH_BUG)          += mach-mx31bugbase.o
>  obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
>  obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
>  obj-$(CONFIG_MACH_VPR200)	+= mach-vpr200.o
> diff --git a/arch/arm/mach-mx3/mach-mx31bugbase.c b/arch/arm/mach-mx3/mach-mx31bugbase.c
> new file mode 100644
> index 0000000..1d8ca1c
> --- /dev/null
> +++ b/arch/arm/mach-mx3/mach-mx31bugbase.c
> @@ -0,0 +1,75 @@
> +/*
> + * Copyright (C) 2000 Deep Blue Solutions Ltd
> + * Copyright (C) 2002 Shane Nay (shane at minirl.com)
> + * Copyright 2005-2007 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +
> +#include <mach/iomux-mx3.h>
> +#include <mach/imx-uart.h>
> +#include <mach/hardware.h>
> +#include <mach/common.h>
> +
> +#include <asm/mach/time.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach-types.h>
> +
> +#include "devices-imx31.h"
> +
> +static struct imxuart_platform_data uart_pdata = {
> +	.flags = IMXUART_HAVE_RTSCTS,
> +};
> +
> +static unsigned int uart5_pins[] = {
> +	MX31_PIN_PC_RST__CTS5,
> +	MX31_PIN_PC_VS2__RTS5,
> +	MX31_PIN_PC_BVD2__TXD5,
> +	MX31_PIN_PC_BVD1__RXD5,
> +};
> +
> +static inline void mx31bug_init_imx_uart(void)
> +{
> +	mxc_iomux_setup_multiple_pins(uart5_pins,
> +				ARRAY_SIZE(uart5_pins), "uart-4");
> +	imx31_add_imx_uart4(&uart_pdata);
> +}
> +
> +/*!
> + * Board specific initialization.
> + */
> +static void __init mx31bug_board_init(void)
> +{
> +	mx31bug_init_imx_uart();
> +}
> +
> +
> +static void __init mx31bug_timer_init(void)
> +{
> +	mx31_clocks_init(26000000);
> +}
> +
> +static struct sys_timer mx31bug_timer = {
> +	.init	= mx31bug_timer_init,
> +};
> +
> +MACHINE_START(BUG, "BugLabs BUGBase")
> +	.boot_params = MX3x_PHYS_OFFSET + 0x100,
> +	.map_io = mx31_map_io,
> +        .init_early = imx31_init_early,
here slipped some spaces in
> +	.init_irq = mx31_init_irq,
> +        .timer = &mx31bug_timer,

dito
> +	.init_machine = mx31bug_board_init,
> +MACHINE_END
> diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
> index e634d6c..b45f534 100644
> --- a/arch/arm/plat-mxc/include/mach/uncompress.h
> +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
> @@ -62,6 +62,7 @@ static inline void flush(void)
>  #define MX2X_UART1_BASE_ADDR	0x1000a000
>  #define MX3X_UART1_BASE_ADDR	0x43F90000
>  #define MX3X_UART2_BASE_ADDR	0x43F94000
> +#define MX3X_UART5_BASE_ADDR	0x43FB4000
>  #define MX51_UART1_BASE_ADDR	0x73fbc000
>  #define MX50_UART1_BASE_ADDR	0x53fbc000
>  #define MX53_UART1_BASE_ADDR	0x53fbc000
> @@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
>  	case MACH_TYPE_MAGX_ZN5:
>  		uart_base = MX3X_UART2_BASE_ADDR;
>  		break;
> +	case MACH_TYPE_BUG:
> +		uart_base = MX3X_UART5_BASE_ADDR;
> +		break;
>  	case MACH_TYPE_MX51_BABBAGE:
>  	case MACH_TYPE_EUKREA_CPUIMX51SD:
>  	case MACH_TYPE_MX51_3DS:

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110211/d522a02e/attachment.sig>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:06   ` [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
                       ` (2 preceding siblings ...)
  2011-02-11 21:30     ` Marc Kleine-Budde
@ 2011-02-11 21:33     ` Uwe Kleine-König
  2011-02-12 21:16       ` [PATCHv3] " Denis 'GNUtoo' Carikli
  3 siblings, 1 reply; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-11 21:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 11, 2011 at 10:06:28PM +0100, Denis 'GNUtoo' Carikli wrote:
> This work was based on bug-linux-2.6.30.patch that can be found
>   in buglabs's svn here:
>   svn://bugcamp.net/bug/branches/izzy/experimental
> 
> Note that the hardware schematics and documentations can be obtained
>   here: http://www.bugcommunity.com/wiki/index.php/BUGbase
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
> ---
>  arch/arm/mach-mx3/Kconfig                   |    9 +++
>  arch/arm/mach-mx3/Makefile                  |    1 +
>  arch/arm/mach-mx3/mach-mx31bugbase.c        |   75 +++++++++++++++++++++++++++
>  arch/arm/plat-mxc/include/mach/uncompress.h |    4 ++
>  4 files changed, 89 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-mx3/mach-mx31bugbase.c
> 
> diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
> index de80d98..4f57f13 100644
> --- a/arch/arm/mach-mx3/Kconfig
> +++ b/arch/arm/mach-mx3/Kconfig
> @@ -199,6 +199,15 @@ config MACH_KZM_ARM11_01
>  	  Include support for KZM-ARM11-01. This includes specific
>  	  configurations for the board and its peripherals.
>  
> +config MACH_BUG
> +	bool "Support Buglabs BUGBase platform"
> +	select SOC_IMX31
> +	select IMX_HAVE_PLATFORM_IMX_UART
> +	default y
> +	help
> +	  Include support for BUGBase 1.3 platform. This includes specific
> +	  configurations for the board and its peripherals.
> +
>  config MACH_EUKREA_CPUIMX35
>  	bool "Support Eukrea CPUIMX35 Platform"
>  	select SOC_IMX35
> diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
> index bc7294f..98e5eb3 100644
> --- a/arch/arm/mach-mx3/Makefile
> +++ b/arch/arm/mach-mx3/Makefile
> @@ -20,6 +20,7 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
>  obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
>  obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
>  obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
> +obj-$(CONFIG_MACH_BUG)          += mach-mx31bugbase.o
I'd like to have the file name matching the MACH variable.  That is
mach-bug.c

>  obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
>  obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
>  obj-$(CONFIG_MACH_VPR200)	+= mach-vpr200.o
> diff --git a/arch/arm/mach-mx3/mach-mx31bugbase.c b/arch/arm/mach-mx3/mach-mx31bugbase.c
> new file mode 100644
> index 0000000..1d8ca1c
> --- /dev/null
> +++ b/arch/arm/mach-mx3/mach-mx31bugbase.c
> @@ -0,0 +1,75 @@
> +/*
> + * Copyright (C) 2000 Deep Blue Solutions Ltd
> + * Copyright (C) 2002 Shane Nay (shane at minirl.com)
> + * Copyright 2005-2007 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +#include <linux/platform_device.h>
> +
> +#include <mach/iomux-mx3.h>
> +#include <mach/imx-uart.h>
> +#include <mach/hardware.h>
> +#include <mach/common.h>
> +
> +#include <asm/mach/time.h>
> +#include <asm/mach/arch.h>
> +#include <asm/mach-types.h>
> +
> +#include "devices-imx31.h"
> +
> +static struct imxuart_platform_data uart_pdata = {
> +	.flags = IMXUART_HAVE_RTSCTS,
> +};
can be const and __initconst and lacks a prefix

> +
> +static unsigned int uart5_pins[] = {
> +	MX31_PIN_PC_RST__CTS5,
> +	MX31_PIN_PC_VS2__RTS5,
> +	MX31_PIN_PC_BVD2__TXD5,
> +	MX31_PIN_PC_BVD1__RXD5,
> +};
can be const and __initconst and lacks a prefix, but see below.

> +
> +static inline void mx31bug_init_imx_uart(void)
> +{
> +	mxc_iomux_setup_multiple_pins(uart5_pins,
> +				ARRAY_SIZE(uart5_pins), "uart-4");
> +	imx31_add_imx_uart4(&uart_pdata);
> +}
can be __init. I'd prefer a prefix of bug, not mx31bug, because that
matches the machine id.

> +
> +/*!
no doxygen style comments in the kernel please

> + * Board specific initialization.
> + */
> +static void __init mx31bug_board_init(void)
> +{
> +	mx31bug_init_imx_uart();
I assume your machine doesn't only have an uart. If so, I'd suggest to
rename uart5_pins (which lacks a prefix btw) to mx31bug_pins and put the
mxc_iomux_setup_multiple_pins into mx31bug_board_init.  Then
mx31bug_init_imx_uart only has imx31_add_imx_uart4 which then can better
go directly into mx31bug_board_init, too.

> +}
> +
> +
You can remove one of these two empty lines.

> +static void __init mx31bug_timer_init(void)
> +{
> +	mx31_clocks_init(26000000);
> +}
> +
> +static struct sys_timer mx31bug_timer = {
> +	.init	= mx31bug_timer_init,
> +};
> +
> +MACHINE_START(BUG, "BugLabs BUGBase")
> +	.boot_params = MX3x_PHYS_OFFSET + 0x100,
BTW, if you have a decent bootloader, you don't need this line.

> +	.map_io = mx31_map_io,
> +        .init_early = imx31_init_early,
> +	.init_irq = mx31_init_irq,
> +        .timer = &mx31bug_timer,
> +	.init_machine = mx31bug_board_init,
please use tabs consistently for indention.  And if you use a single
space before the = here (which is totally ok, even prefered by me), then
do the same in mx31bug_timer, please.

> +MACHINE_END
> diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
> index e634d6c..b45f534 100644
> --- a/arch/arm/plat-mxc/include/mach/uncompress.h
> +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
> @@ -62,6 +62,7 @@ static inline void flush(void)
>  #define MX2X_UART1_BASE_ADDR	0x1000a000
>  #define MX3X_UART1_BASE_ADDR	0x43F90000
>  #define MX3X_UART2_BASE_ADDR	0x43F94000
> +#define MX3X_UART5_BASE_ADDR	0x43FB4000
>  #define MX51_UART1_BASE_ADDR	0x73fbc000
>  #define MX50_UART1_BASE_ADDR	0x53fbc000
>  #define MX53_UART1_BASE_ADDR	0x53fbc000
> @@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
>  	case MACH_TYPE_MAGX_ZN5:
>  		uart_base = MX3X_UART2_BASE_ADDR;
>  		break;
> +	case MACH_TYPE_BUG:
> +		uart_base = MX3X_UART5_BASE_ADDR;
> +		break;
>  	case MACH_TYPE_MX51_BABBAGE:
>  	case MACH_TYPE_EUKREA_CPUIMX51SD:
>  	case MACH_TYPE_MX51_3DS:
> -- 
Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:13     ` Denis 'GNUtoo' Carikli
@ 2011-02-11 21:39       ` Uwe Kleine-König
  2011-02-11 23:06         ` Denis 'GNUtoo' Carikli
  0 siblings, 1 reply; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-11 21:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 11, 2011 at 10:13:36PM +0100, Denis 'GNUtoo' Carikli wrote:
> > diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
> > index e634d6c..b45f534 100644
> > --- a/arch/arm/plat-mxc/include/mach/uncompress.h
> > +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
> > @@ -62,6 +62,7 @@ static inline void flush(void)
> >  #define MX2X_UART1_BASE_ADDR	0x1000a000
> >  #define MX3X_UART1_BASE_ADDR	0x43F90000
> >  #define MX3X_UART2_BASE_ADDR	0x43F94000
> > +#define MX3X_UART5_BASE_ADDR	0x43FB4000
> >  #define MX51_UART1_BASE_ADDR	0x73fbc000
> >  #define MX50_UART1_BASE_ADDR	0x53fbc000
> >  #define MX53_UART1_BASE_ADDR	0x53fbc000
> > @@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
> >  	case MACH_TYPE_MAGX_ZN5:
> >  		uart_base = MX3X_UART2_BASE_ADDR;
> >  		break;
> > +	case MACH_TYPE_BUG:
> > +		uart_base = MX3X_UART5_BASE_ADDR;
> > +		break;
> >  	case MACH_TYPE_MX51_BABBAGE:
> >  	case MACH_TYPE_EUKREA_CPUIMX51SD:
> >  	case MACH_TYPE_MX51_3DS:
> That seem not to crash, but I wonder if it's really useful:
> Basically I see u-boot loading the kernel, then I have
> > Uncompressing Linux... 
> Then I wait some seconds
> Then I see that line beeing complretted with:
> > done, booting the kernel.
> Then the rest of the messages are displayed very fast,
> along with initramfs loading messages and I finally get a shell.
That means you'd prefer no output?  Some time ago we even got some more
dots during decompression, I'd like to get these back.

The only downside of these outputs I can imagine is to save the time it
takes to get them out of the serial. But if you really care, you might
want to evaluate the possibility to let U-Boot uncompress your kernel.
(Depending on some parameters of your hardware this might or might not
be faster for you.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:39       ` Uwe Kleine-König
@ 2011-02-11 23:06         ` Denis 'GNUtoo' Carikli
  2011-02-13 21:12           ` Uwe Kleine-König
  0 siblings, 1 reply; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-11 23:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 2011-02-11 at 22:39 +0100, Uwe Kleine-K?nig wrote:
> On Fri, Feb 11, 2011 at 10:13:36PM +0100, Denis 'GNUtoo' Carikli wrote:
> > > diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
> > > index e634d6c..b45f534 100644
> > > --- a/arch/arm/plat-mxc/include/mach/uncompress.h
> > > +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
> > > @@ -62,6 +62,7 @@ static inline void flush(void)
> > >  #define MX2X_UART1_BASE_ADDR	0x1000a000
> > >  #define MX3X_UART1_BASE_ADDR	0x43F90000
> > >  #define MX3X_UART2_BASE_ADDR	0x43F94000
> > > +#define MX3X_UART5_BASE_ADDR	0x43FB4000
> > >  #define MX51_UART1_BASE_ADDR	0x73fbc000
> > >  #define MX50_UART1_BASE_ADDR	0x53fbc000
> > >  #define MX53_UART1_BASE_ADDR	0x53fbc000
> > > @@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
> > >  	case MACH_TYPE_MAGX_ZN5:
> > >  		uart_base = MX3X_UART2_BASE_ADDR;
> > >  		break;
> > > +	case MACH_TYPE_BUG:
> > > +		uart_base = MX3X_UART5_BASE_ADDR;
> > > +		break;
> > >  	case MACH_TYPE_MX51_BABBAGE:
> > >  	case MACH_TYPE_EUKREA_CPUIMX51SD:
> > >  	case MACH_TYPE_MX51_3DS:
> > That seem not to crash, but I wonder if it's really useful:
> > Basically I see u-boot loading the kernel, then I have
> > > Uncompressing Linux... 
> > Then I wait some seconds
> > Then I see that line beeing complretted with:
> > > done, booting the kernel.
> > Then the rest of the messages are displayed very fast,
> > along with initramfs loading messages and I finally get a shell.
> That means you'd prefer no output? 
I should have misunderstood something, but I believed that that
uncompress.h was for early printk.
And so I expected printk to be printed on serial console immediately,
not waiting for the serial port to be initialized again(as it is already
initialized by the u-boot bootloader).

Denis.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:30     ` Marc Kleine-Budde
@ 2011-02-12 20:15       ` Denis 'GNUtoo' Carikli
  0 siblings, 0 replies; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-12 20:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 2011-02-11 at 22:30 +0100, Marc Kleine-Budde wrote:
> here slipped some spaces in
> > +     .init_irq = mx31_init_irq,
> > +        .timer = &mx31bug_timer,
> 
> dito 
Sorry, I looked carefully after such errors at first,
before sending the first patch,
but then I forgot to look after it when fixing what the comments pointed
out.

I'll fix it in the new patch I'll resend, I'll try to find how to make
git-send-email send a v3 too(last time I failed, because I looked for
some command that did it on some wiki that was not very up to date)

Denis.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCHv3] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:33     ` Uwe Kleine-König
@ 2011-02-12 21:16       ` Denis 'GNUtoo' Carikli
  2011-02-13 21:18         ` Uwe Kleine-König
  0 siblings, 1 reply; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-12 21:16 UTC (permalink / raw)
  To: linux-arm-kernel

This work was based on bug-linux-2.6.30.patch that can be found
  in buglabs's svn here:
  svn://bugcamp.net/bug/branches/izzy/experimental

Note that the hardware schematics and documentations can be obtained
  here: http://www.bugcommunity.com/wiki/index.php/BUGbase

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
 arch/arm/mach-mx3/Kconfig                   |    9 ++++
 arch/arm/mach-mx3/Makefile                  |    1 +
 arch/arm/mach-mx3/mach-bug.c                |   66 +++++++++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/uncompress.h |    4 ++
 4 files changed, 80 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-mx3/mach-bug.c

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index de80d98..4f57f13 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -199,6 +199,15 @@ config MACH_KZM_ARM11_01
 	  Include support for KZM-ARM11-01. This includes specific
 	  configurations for the board and its peripherals.
 
+config MACH_BUG
+	bool "Support Buglabs BUGBase platform"
+	select SOC_IMX31
+	select IMX_HAVE_PLATFORM_IMX_UART
+	default y
+	help
+	  Include support for BUGBase 1.3 platform. This includes specific
+	  configurations for the board and its peripherals.
+
 config MACH_EUKREA_CPUIMX35
 	bool "Support Eukrea CPUIMX35 Platform"
 	select SOC_IMX35
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
index bc7294f..37d968b 100644
--- a/arch/arm/mach-mx3/Makefile
+++ b/arch/arm/mach-mx3/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
 obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
 obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
 obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
+obj-$(CONFIG_MACH_BUG)		+= mach-bug.o
 obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
 obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
 obj-$(CONFIG_MACH_VPR200)	+= mach-vpr200.o
diff --git a/arch/arm/mach-mx3/mach-bug.c b/arch/arm/mach-mx3/mach-bug.c
new file mode 100644
index 0000000..d974173
--- /dev/null
+++ b/arch/arm/mach-mx3/mach-bug.c
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ * Copyright (C) 2002 Shane Nay (shane at minirl.com)
+ * Copyright 2005-2007 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <mach/iomux-mx3.h>
+#include <mach/imx-uart.h>
+#include <mach/hardware.h>
+#include <mach/common.h>
+
+#include <asm/mach/time.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include "devices-imx31.h"
+
+static const struct imxuart_platform_data uart_pdata __initconst = {
+	.flags = IMXUART_HAVE_RTSCTS,
+};
+
+static const unsigned int bug_pins[] __initconst = {
+	MX31_PIN_PC_RST__CTS5,
+	MX31_PIN_PC_VS2__RTS5,
+	MX31_PIN_PC_BVD2__TXD5,
+	MX31_PIN_PC_BVD1__RXD5,
+};
+
+static void __init bug_board_init(void)
+{
+	mxc_iomux_setup_multiple_pins(bug_pins,
+				      ARRAY_SIZE(bug_pins), "uart-4");
+	imx31_add_imx_uart4(&uart_pdata);
+
+}
+
+static void __init bug_timer_init(void)
+{
+	mx31_clocks_init(26000000);
+}
+
+static struct sys_timer bug_timer = {
+	.init	= bug_timer_init,
+};
+
+MACHINE_START(BUG, "BugLabs BUGBase")
+	.map_io = mx31_map_io,
+	.init_early = imx31_init_early,
+	.init_irq = mx31_init_irq,
+	.timer = &bug_timer,
+	.init_machine = bug_board_init,
+MACHINE_END
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index e634d6c..b45f534 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -62,6 +62,7 @@ static inline void flush(void)
 #define MX2X_UART1_BASE_ADDR	0x1000a000
 #define MX3X_UART1_BASE_ADDR	0x43F90000
 #define MX3X_UART2_BASE_ADDR	0x43F94000
+#define MX3X_UART5_BASE_ADDR	0x43FB4000
 #define MX51_UART1_BASE_ADDR	0x73fbc000
 #define MX50_UART1_BASE_ADDR	0x53fbc000
 #define MX53_UART1_BASE_ADDR	0x53fbc000
@@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
 	case MACH_TYPE_MAGX_ZN5:
 		uart_base = MX3X_UART2_BASE_ADDR;
 		break;
+	case MACH_TYPE_BUG:
+		uart_base = MX3X_UART5_BASE_ADDR;
+		break;
 	case MACH_TYPE_MX51_BABBAGE:
 	case MACH_TYPE_EUKREA_CPUIMX51SD:
 	case MACH_TYPE_MX51_3DS:
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 23:06         ` Denis 'GNUtoo' Carikli
@ 2011-02-13 21:12           ` Uwe Kleine-König
  0 siblings, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-13 21:12 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Denis,

On Sat, Feb 12, 2011 at 12:06:56AM +0100, Denis 'GNUtoo' Carikli wrote:
> On Fri, 2011-02-11 at 22:39 +0100, Uwe Kleine-K?nig wrote:
> > On Fri, Feb 11, 2011 at 10:13:36PM +0100, Denis 'GNUtoo' Carikli wrote:
> > > > diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
> > > > index e634d6c..b45f534 100644
> > > > --- a/arch/arm/plat-mxc/include/mach/uncompress.h
> > > > +++ b/arch/arm/plat-mxc/include/mach/uncompress.h
> > > > @@ -62,6 +62,7 @@ static inline void flush(void)
> > > >  #define MX2X_UART1_BASE_ADDR	0x1000a000
> > > >  #define MX3X_UART1_BASE_ADDR	0x43F90000
> > > >  #define MX3X_UART2_BASE_ADDR	0x43F94000
> > > > +#define MX3X_UART5_BASE_ADDR	0x43FB4000
> > > >  #define MX51_UART1_BASE_ADDR	0x73fbc000
> > > >  #define MX50_UART1_BASE_ADDR	0x53fbc000
> > > >  #define MX53_UART1_BASE_ADDR	0x53fbc000
> > > > @@ -102,6 +103,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
> > > >  	case MACH_TYPE_MAGX_ZN5:
> > > >  		uart_base = MX3X_UART2_BASE_ADDR;
> > > >  		break;
> > > > +	case MACH_TYPE_BUG:
> > > > +		uart_base = MX3X_UART5_BASE_ADDR;
> > > > +		break;
> > > >  	case MACH_TYPE_MX51_BABBAGE:
> > > >  	case MACH_TYPE_EUKREA_CPUIMX51SD:
> > > >  	case MACH_TYPE_MX51_3DS:
> > > That seem not to crash, but I wonder if it's really useful:
> > > Basically I see u-boot loading the kernel, then I have
> > > > Uncompressing Linux... 
> > > Then I wait some seconds
> > > Then I see that line beeing complretted with:
> > > > done, booting the kernel.
> > > Then the rest of the messages are displayed very fast,
> > > along with initramfs loading messages and I finally get a shell.
> > That means you'd prefer no output? 
> I should have misunderstood something, but I believed that that
> uncompress.h was for early printk.
> And so I expected printk to be printed on serial console immediately,
> not waiting for the serial port to be initialized again(as it is already
> initialized by the u-boot bootloader).
There is nothing reinitialized, in fact the code in
arch/arm/plat-mxc/include/mach/uncompress.h assumes the UART is already
initialized by the boot loader.  The only difference this hunk above
results in is that the messages "Uncompressing Linux..." and "done,
booting the kernel." are printed on your UART.  And if you skip them you
still have that some seconds pause, and you only save the time the
characters need to pass your UART.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCHv3] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-12 21:16       ` [PATCHv3] " Denis 'GNUtoo' Carikli
@ 2011-02-13 21:18         ` Uwe Kleine-König
  2011-02-14  1:12           ` Denis 'GNUtoo' Carikli
                             ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-13 21:18 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Denis,

On Sat, Feb 12, 2011 at 10:16:59PM +0100, Denis 'GNUtoo' Carikli wrote:
> This work was based on bug-linux-2.6.30.patch that can be found
>   in buglabs's svn here:
>   svn://bugcamp.net/bug/branches/izzy/experimental
> 
> Note that the hardware schematics and documentations can be obtained
>   here: http://www.bugcommunity.com/wiki/index.php/BUGbase
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
The patch looks good to me now.  If you want to make me still more
happy, there are still two minor things to optimize:

 - don't reference the history of the patch in the commit log.  This is
   quite useless once the commit made it into Linus' tree.  (The info
   might still be interesting, but then put it after the tripple dash
   below.  Then it won't make it into git.)
 - there is a trailing empty line in bug_board_init()

Maybe Sascha can fix this up when taking the patch?  (Assuming the
others are happy now, too of course.)

And I wonder there is no copyright statement by you in
arch/arm/mach-mx3/mach-bug.c, maybe because you consider your changes
too minor to be relevant?  (INAL and I don't know who to value your
contribution.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCHv3] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-13 21:18         ` Uwe Kleine-König
@ 2011-02-14  1:12           ` Denis 'GNUtoo' Carikli
  2011-02-17 15:23           ` Denis 'GNUtoo' Carikli
  2011-02-18 21:22           ` [PATCH] " Denis 'GNUtoo' Carikli
  2 siblings, 0 replies; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-14  1:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 13 Feb 2011 22:18:55 +0100
Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de> wrote:

> Maybe Sascha can fix this up when taking the patch?  (Assuming the
> others are happy now, too of course.)
That would be great, because I'll be travelling tommorow and won't be
able to modify the patch soon.
> 
> And I wonder there is no copyright statement by you in
> arch/arm/mach-mx3/mach-bug.c, maybe because you consider your changes
> too minor to be relevant?  (INAL and I don't know who to value your
> contribution.)
yes,that's what I tought...I'd be happy to have my name in the
copyrights,however I'm not sure the contribution is relevant
enough...still it was quite some work for
me (rebasing,debugging,upstrem ajustements).

There was a thread about that with the nexus one support from Daniel
Walker in the msm mailing list...I don't have it off hand because I'm
on a mobile device.

Thanks a lot for the review!!!

Denis

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCHv3] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-13 21:18         ` Uwe Kleine-König
  2011-02-14  1:12           ` Denis 'GNUtoo' Carikli
@ 2011-02-17 15:23           ` Denis 'GNUtoo' Carikli
  2011-02-17 22:53             ` Uwe Kleine-König
  2011-02-18  5:47             ` [bug-dev] " Ken Gilmer
  2011-02-18 21:22           ` [PATCH] " Denis 'GNUtoo' Carikli
  2 siblings, 2 replies; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-17 15:23 UTC (permalink / raw)
  To: linux-arm-kernel

> And I wonder there is no copyright statement by you in
> arch/arm/mach-mx3/mach-bug.c, maybe because you consider your changes
> too minor to be relevant?  (INAL and I don't know who to value your
> contribution.)
Here is the thread:
http://thread.gmane.org/gmane.linux.ports.arm.msm/122

What should I do? can I add my own name too?

Denis.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCHv3] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-17 15:23           ` Denis 'GNUtoo' Carikli
@ 2011-02-17 22:53             ` Uwe Kleine-König
  2011-02-18  5:47             ` [bug-dev] " Ken Gilmer
  1 sibling, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-17 22:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 17, 2011 at 04:23:41PM +0100, Denis 'GNUtoo' Carikli wrote:
> > And I wonder there is no copyright statement by you in
> > arch/arm/mach-mx3/mach-bug.c, maybe because you consider your changes
> > too minor to be relevant?  (INAL and I don't know who to value your
> > contribution.)
> Here is the thread:
> http://thread.gmane.org/gmane.linux.ports.arm.msm/122
read that, too.
> 
> What should I do? can I add my own name too?
I don't care much.  These machine files are more or less trivial, and as
I said, INAL.  But I would be surprised if you would be kicked in a
similar way for adding a copyright to "your" machine file.  I think its
is quite usual to add one's own copyright.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [bug-dev] [PATCHv3] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-17 15:23           ` Denis 'GNUtoo' Carikli
  2011-02-17 22:53             ` Uwe Kleine-König
@ 2011-02-18  5:47             ` Ken Gilmer
  1 sibling, 0 replies; 26+ messages in thread
From: Ken Gilmer @ 2011-02-18  5:47 UTC (permalink / raw)
  To: linux-arm-kernel

No problems for that on our end Denis.

thx
ken

2011/2/17 Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>

> > And I wonder there is no copyright statement by you in
> > arch/arm/mach-mx3/mach-bug.c, maybe because you consider your changes
> > too minor to be relevant?  (INAL and I don't know who to value your
> > contribution.)
> Here is the thread:
> http://thread.gmane.org/gmane.linux.ports.arm.msm/122
>
> What should I do? can I add my own name too?
>
> Denis.
>
>
> _______________________________________________
> bug-dev mailing list
> bug-dev at lists.buglabs.net
> http://lists.buglabs.net/cgi-bin/mailman/listinfo/bug-dev
>



-- 
thx
ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110217/91e473a2/attachment-0001.html>

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-13 21:18         ` Uwe Kleine-König
  2011-02-14  1:12           ` Denis 'GNUtoo' Carikli
  2011-02-17 15:23           ` Denis 'GNUtoo' Carikli
@ 2011-02-18 21:22           ` Denis 'GNUtoo' Carikli
  2011-02-18 21:38             ` Uwe Kleine-König
  2 siblings, 1 reply; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-02-18 21:22 UTC (permalink / raw)
  To: linux-arm-kernel

Note that the hardware schematics and documentations can be obtained
  here: http://www.bugcommunity.com/wiki/index.php/BUGbase

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
 arch/arm/mach-mx3/Kconfig                   |    9 ++++
 arch/arm/mach-mx3/Makefile                  |    1 +
 arch/arm/mach-mx3/mach-bug.c                |   66 +++++++++++++++++++++++++++
 arch/arm/plat-mxc/include/mach/uncompress.h |    4 ++
 4 files changed, 80 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-mx3/mach-bug.c

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 5000ac1..3daf1fe 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -160,6 +160,15 @@ config MACH_KZM_ARM11_01
 	  Include support for KZM-ARM11-01. This includes specific
 	  configurations for the board and its peripherals.
 
+config MACH_BUG
+	bool "Support Buglabs BUGBase platform"
+	select SOC_IMX31
+	select IMX_HAVE_PLATFORM_IMX_UART
+	default y
+	help
+	  Include support for BUGBase 1.3 platform. This includes specific
+	  configurations for the board and its peripherals.
+
 config MACH_EUKREA_CPUIMX35
 	bool "Support Eukrea CPUIMX35 Platform"
 	select ARCH_MX35
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
index 8a182d0..95a45e8 100644
--- a/arch/arm/mach-mx3/Makefile
+++ b/arch/arm/mach-mx3/Makefile
@@ -23,5 +23,6 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
 obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
 obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
 obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
+obj-$(CONFIG_MACH_BUG)		+= mach-bug.o
 obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
 obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
diff --git a/arch/arm/mach-mx3/mach-bug.c b/arch/arm/mach-mx3/mach-bug.c
new file mode 100644
index 0000000..d137d70
--- /dev/null
+++ b/arch/arm/mach-mx3/mach-bug.c
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2000 Deep Blue Solutions Ltd
+ * Copyright (C) 2002 Shane Nay (shane at minirl.com)
+ * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2011 Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
+ *
+ * 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.
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <mach/iomux-mx3.h>
+#include <mach/imx-uart.h>
+#include <mach/hardware.h>
+#include <mach/common.h>
+
+#include <asm/mach/time.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include "devices-imx31.h"
+
+static const struct imxuart_platform_data uart_pdata __initconst = {
+	.flags = IMXUART_HAVE_RTSCTS,
+};
+
+static const unsigned int bug_pins[] __initconst = {
+	MX31_PIN_PC_RST__CTS5,
+	MX31_PIN_PC_VS2__RTS5,
+	MX31_PIN_PC_BVD2__TXD5,
+	MX31_PIN_PC_BVD1__RXD5,
+};
+
+static void __init bug_board_init(void)
+{
+	mxc_iomux_setup_multiple_pins(bug_pins,
+				      ARRAY_SIZE(bug_pins), "uart-4");
+	imx31_add_imx_uart4(&uart_pdata);
+}
+
+static void __init bug_timer_init(void)
+{
+	mx31_clocks_init(26000000);
+}
+
+static struct sys_timer bug_timer = {
+	.init = bug_timer_init,
+};
+
+MACHINE_START(BUG, "BugLabs BUGBase")
+	.map_io = mx31_map_io,
+	.init_early = imx31_init_early,
+	.init_irq = mx31_init_irq,
+	.timer = &bug_timer,
+	.init_machine = bug_board_init,
+MACHINE_END
diff --git a/arch/arm/plat-mxc/include/mach/uncompress.h b/arch/arm/plat-mxc/include/mach/uncompress.h
index 9dd9c20..c3b155c 100644
--- a/arch/arm/plat-mxc/include/mach/uncompress.h
+++ b/arch/arm/plat-mxc/include/mach/uncompress.h
@@ -62,6 +62,7 @@ static inline void flush(void)
 #define MX2X_UART1_BASE_ADDR	0x1000a000
 #define MX3X_UART1_BASE_ADDR	0x43F90000
 #define MX3X_UART2_BASE_ADDR	0x43F94000
+#define MX3X_UART5_BASE_ADDR	0x43FB4000
 #define MX51_UART1_BASE_ADDR	0x73fbc000
 
 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
@@ -98,6 +99,9 @@ static __inline__ void __arch_decomp_setup(unsigned long arch_id)
 	case MACH_TYPE_MAGX_ZN5:
 		uart_base = MX3X_UART2_BASE_ADDR;
 		break;
+	case MACH_TYPE_BUG:
+		uart_base = MX3X_UART5_BASE_ADDR;
+		break;
 	case MACH_TYPE_MX51_BABBAGE:
 	case MACH_TYPE_EUKREA_CPUIMX51SD:
 		uart_base = MX51_UART1_BASE_ADDR;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-18 21:22           ` [PATCH] " Denis 'GNUtoo' Carikli
@ 2011-02-18 21:38             ` Uwe Kleine-König
  0 siblings, 0 replies; 26+ messages in thread
From: Uwe Kleine-König @ 2011-02-18 21:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Feb 18, 2011 at 10:22:23PM +0100, Denis 'GNUtoo' Carikli wrote:
> Note that the hardware schematics and documentations can be obtained
>   here: http://www.bugcommunity.com/wiki/index.php/BUGbase
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
> ---
As you didn't provide these and before someone else does the same, here
come the changes compared to v3:

 - moved "config MACH_BUG" further to the top of
   arch/arm/mach-mx3/Kconfig
 - add a copyright statement in arch/arm/mach-mx3/mach-bug.c
 - removed an empty line
 - s/\t=/ =/ in the initializer of bug_timer

I don't know why you moved config MACH_BUG, but I don't care much.

Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
@ 2011-01-22 20:42 Denis 'GNUtoo' Carikli
  0 siblings, 0 replies; 26+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2011-01-22 20:42 UTC (permalink / raw)
  To: linux-arm-kernel

This work was based on bug-linux-2.6.30.patch that can be found
  in buglabs's svn here:
  svn://bugcamp.net/bug/branches/izzy/experimental

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
 arch/arm/mach-mx3/Kconfig            |    9 +++
 arch/arm/mach-mx3/Makefile           |    1 +
 arch/arm/mach-mx3/mach-mx31bugbase.c |   98 ++++++++++++++++++++++++++++++++++
 3 files changed, 108 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-mx3/mach-mx31bugbase.c

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 0717f88..f36b3ef 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -199,6 +199,15 @@ config MACH_KZM_ARM11_01
 	  Include support for KZM-ARM11-01. This includes specific
 	  configurations for the board and its peripherals.
 
+config MACH_BUG
+	bool "Support Buglabs BUGBase platform"
+	select SOC_IMX31
+	select IMX_HAVE_PLATFORM_IMX_UART
+	default y
+	help
+	  Include support for BUGBase 1.3 platform. This includes specific
+	  configurations for the board and its peripherals.
+
 config MACH_EUKREA_CPUIMX35
 	bool "Support Eukrea CPUIMX35 Platform"
 	select SOC_IMX35
diff --git a/arch/arm/mach-mx3/Makefile b/arch/arm/mach-mx3/Makefile
index 8db1329..8a74dcf 100644
--- a/arch/arm/mach-mx3/Makefile
+++ b/arch/arm/mach-mx3/Makefile
@@ -20,5 +20,6 @@ obj-$(CONFIG_MACH_PCM043)	+= mach-pcm043.o
 obj-$(CONFIG_MACH_ARMADILLO5X0) += mach-armadillo5x0.o
 obj-$(CONFIG_MACH_MX35_3DS)	+= mach-mx35_3ds.o
 obj-$(CONFIG_MACH_KZM_ARM11_01)	+= mach-kzm_arm11_01.o
+obj-$(CONFIG_MACH_BUG)          += mach-mx31bugbase.o
 obj-$(CONFIG_MACH_EUKREA_CPUIMX35)	+= mach-cpuimx35.o
 obj-$(CONFIG_MACH_EUKREA_MBIMXSD35_BASEBOARD)	+= eukrea_mbimxsd-baseboard.o
diff --git a/arch/arm/mach-mx3/mach-mx31bugbase.c b/arch/arm/mach-mx3/mach-mx31bugbase.c
new file mode 100644
index 0000000..a839bf0
--- /dev/null
+++ b/arch/arm/mach-mx3/mach-mx31bugbase.c
@@ -0,0 +1,98 @@
+/*
+ *  Copyright (C) 2000 Deep Blue Solutions Ltd
+ *  Copyright (C) 2002 Shane Nay (shane at minirl.com)
+ *  Copyright 2005-2007 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <mach/iomux-mx3.h>
+#include <mach/imx-uart.h>
+#include <mach/hardware.h>
+#include <mach/common.h>
+
+#include <asm/mach/time.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
+
+#include "devices-imx31.h"
+
+/*!
+ * @file mx31bugbase.c
+ *
+ * @brief This file contains the board-specific initialization routines.
+ *
+ * @ingroup System
+ */
+
+#if defined(CONFIG_SERIAL_IMX) || defined(CONFIG_SERIAL_IMX_MODULE)
+static struct imxuart_platform_data uart_pdata = {
+	.flags = IMXUART_HAVE_RTSCTS,
+};
+
+static unsigned int uart5_pins[] = {
+	MX31_PIN_PC_RST__CTS5,
+	MX31_PIN_PC_VS2__RTS5,
+	MX31_PIN_PC_BVD2__TXD5,
+	MX31_PIN_PC_BVD1__RXD5
+};
+
+static inline void mxc_init_imx_uart(void)
+{
+	mxc_iomux_setup_multiple_pins(uart5_pins,
+				ARRAY_SIZE(uart5_pins), "uart-4");
+	imx31_add_imx_uart4(&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_init_imx_uart();
+}
+
+
+static void __init mx31bug_timer_init(void)
+{
+	mx31_clocks_init(26000000);
+}
+
+static struct sys_timer mx31bug_timer = {
+	.init	= mx31bug_timer_init,
+};
+
+/*
+ * The following uses standard kernel macros defined in arch.h in order to
+ * initialize __mach_desc_MX31BUG data structure.
+ */
+
+MACHINE_START(BUG, "BugLabs BUGBase")
+	/* Maintainer: Denis 'GNUtoo' Carikli */
+	.boot_params    = PHYS_OFFSET + 0x100,
+	.timer          = &mx31bug_timer,
+	.map_io         = mx31_map_io,
+	.init_irq       = mx31_init_irq,
+	.init_machine   = mxc_board_init,
+MACHINE_END
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2011-02-18 21:38 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 21:15 [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
2011-02-10 21:41 ` Marc Kleine-Budde
2011-02-11  2:42 ` Fabio Estevam
2011-02-11  8:10 ` Uwe Kleine-König
2011-02-11  9:21   ` [PATCH 1/3] ARM: mx3+mx5: rename to ${machine}_init Uwe Kleine-König
2011-02-11  9:23     ` [PATCH 1/3 v2] ARM: mx3+mx5: rename mxc_board_init " Uwe Kleine-König
2011-02-11  9:21   ` [PATCH 2/3] ARM: mx3: remove some useless comments Uwe Kleine-König
2011-02-11  9:21   ` [PATCH 3/3] ARM: mx3/mx31ads: fix comments of irq callbacks Uwe Kleine-König
2011-02-11 21:06   ` [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
2011-02-11 21:09     ` Denis 'GNUtoo' Carikli
2011-02-11 21:13     ` Denis 'GNUtoo' Carikli
2011-02-11 21:39       ` Uwe Kleine-König
2011-02-11 23:06         ` Denis 'GNUtoo' Carikli
2011-02-13 21:12           ` Uwe Kleine-König
2011-02-11 21:30     ` Marc Kleine-Budde
2011-02-12 20:15       ` Denis 'GNUtoo' Carikli
2011-02-11 21:33     ` Uwe Kleine-König
2011-02-12 21:16       ` [PATCHv3] " Denis 'GNUtoo' Carikli
2011-02-13 21:18         ` Uwe Kleine-König
2011-02-14  1:12           ` Denis 'GNUtoo' Carikli
2011-02-17 15:23           ` Denis 'GNUtoo' Carikli
2011-02-17 22:53             ` Uwe Kleine-König
2011-02-18  5:47             ` [bug-dev] " Ken Gilmer
2011-02-18 21:22           ` [PATCH] " Denis 'GNUtoo' Carikli
2011-02-18 21:38             ` Uwe Kleine-König
  -- strict thread matches above, loose matches on Subject: below --
2011-01-22 20:42 Denis 'GNUtoo' Carikli

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.