All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
@ 2011-01-22 20:42 Denis 'GNUtoo' Carikli
  0 siblings, 0 replies; 16+ 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] 16+ 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; 16+ 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] 16+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-13 21:18 [PATCHv3] " Uwe Kleine-König
@ 2011-02-18 21:22 ` Denis 'GNUtoo' Carikli
  2011-02-18 21:38   ` Uwe Kleine-König
  0 siblings, 1 reply; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ 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; 16+ 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] 16+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:06   ` Denis 'GNUtoo' Carikli
                       ` (2 preceding siblings ...)
  2011-02-11 21:30     ` Marc Kleine-Budde
@ 2011-02-11 21:33     ` Uwe Kleine-König
  3 siblings, 0 replies; 16+ 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] 16+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:06   ` 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; 16+ 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] 16+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:06   ` 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; 16+ 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] 16+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11 21:06   ` 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; 16+ 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] 16+ messages in thread

* [PATCH] mx31: add support for the bugbase 1.3 from buglabs
  2011-02-11  8:10 ` Uwe Kleine-König
@ 2011-02-11 21:06   ` Denis 'GNUtoo' Carikli
  2011-02-11 21:09     ` Denis 'GNUtoo' Carikli
                       ` (3 more replies)
  0 siblings, 4 replies; 16+ 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] 16+ messages in thread

* [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
  2011-02-11  2:42 ` Fabio Estevam
@ 2011-02-11  8:10 ` Uwe Kleine-König
  2011-02-11 21:06   ` Denis 'GNUtoo' Carikli
  2 siblings, 1 reply; 16+ 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] 16+ messages in thread

* [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
@ 2011-02-11  2:42 ` Fabio Estevam
  2011-02-11  8:10 ` Uwe Kleine-König
  2 siblings, 0 replies; 16+ 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] 16+ messages in thread

* [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
  2011-02-11  2:42 ` Fabio Estevam
  2011-02-11  8:10 ` Uwe Kleine-König
  2 siblings, 0 replies; 16+ 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] 16+ messages in thread

* [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; 16+ 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] 16+ messages in thread

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

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22 20:42 [PATCH] mx31: add support for the bugbase 1.3 from buglabs Denis 'GNUtoo' Carikli
2011-02-10 21:15 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 21:06   ` 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-13 21:18 [PATCHv3] " Uwe Kleine-König
2011-02-18 21:22 ` [PATCH] " Denis 'GNUtoo' Carikli
2011-02-18 21:38   ` Uwe Kleine-König

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.