public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: AM3517/05: Add craneboard support
@ 2010-10-25 14:45 srinath
  2010-10-28  6:52 ` Nishanth Menon
  0 siblings, 1 reply; 2+ messages in thread
From: srinath @ 2010-10-25 14:45 UTC (permalink / raw)
  To: linux-omap; +Cc: jdk, tony, khilman, nm, nagendra, umeshk, Srinath

From: Srinath <srinath@mistralsolutions.com>

This patch adds basic board file. Detailed support will follow in
subsequent patches.

      [1] http://www.ti.com/sitara
      [2] http://www.mistralsolutions.com/products/craneboard.php

This patch has been created against omap-next branch.

Signed-off-by: Srinath <srinath@mistralsolutions.com>
---
 arch/arm/configs/omap2plus_defconfig         |    1 +
 arch/arm/mach-omap2/Kconfig                  |    5 ++
 arch/arm/mach-omap2/Makefile                 |    2 +
 arch/arm/mach-omap2/board-am3517crane.c      |   70 ++++++++++++++++++++++++++
 arch/arm/plat-omap/include/plat/uncompress.h |    1 +
 5 files changed, 79 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/board-am3517crane.c

diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index ccedde1..8c93f86 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -40,6 +40,7 @@ CONFIG_MACH_OMAP_LDP=y
 CONFIG_MACH_OVERO=y
 CONFIG_MACH_OMAP3EVM=y
 CONFIG_MACH_OMAP3517EVM=y
+CONFIG_MACH_CRANEBOARD=y
 CONFIG_MACH_OMAP3_PANDORA=y
 CONFIG_MACH_OMAP3_TOUCHBOOK=y
 CONFIG_MACH_OMAP_3430SDP=y
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index ab784bf..3688515 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -174,6 +174,11 @@ config MACH_OMAP3517EVM
 	default y
 	select OMAP_PACKAGE_CBB
 
+config MACH_CRANEBOARD
+	bool "AM3517/05 CRANE board"
+	depends on ARCH_OMAP3
+	select OMAP_PACKAGE_CBB
+
 config MACH_OMAP3_PANDORA
 	bool "OMAP3 Pandora"
 	depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 7352412..f885037 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -170,6 +170,8 @@ obj-$(CONFIG_MACH_OMAP4_PANDA)		+= board-omap4panda.o \
 
 obj-$(CONFIG_MACH_OMAP3517EVM)		+= board-am3517evm.o
 
+obj-$(CONFIG_MACH_CRANEBOARD)		+= board-am3517crane.o
+
 obj-$(CONFIG_MACH_SBC3530)		+= board-omap3stalker.o \
 					   hsmmc.o
 # Platform specific device init code
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
new file mode 100644
index 0000000..f98b89a
--- /dev/null
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -0,0 +1,70 @@
+/*
+ * Support for AM3517/05 Craneboard
+ * http://www.mistralsolutions.com/products/craneboard.php
+ *
+ * Copyright (C) 2010 Mistral Solutions Pvt Ltd. <www.mistralsolutions.com>
+ * Author: R.Srinath <srinath@mistralsolutions.com>
+ *
+ * Based on mach-omap2/board-am3517evm.c
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind,
+ * whether express or implied; 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/gpio.h>
+#include <linux/platform_device.h>
+
+#include <mach/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+
+#include <plat/board.h>
+#include <plat/common.h>
+
+#include "mux.h"
+
+/* Board initialization */
+static struct omap_board_config_kernel am3517_crane_config[] __initdata = {
+};
+
+#ifdef CONFIG_OMAP_MUX
+static struct omap_board_mux board_mux[] __initdata = {
+	{ .reg_offset = OMAP_MUX_TERMINATOR },
+};
+#else
+#define board_mux	NULL
+#endif
+
+static void __init am3517_crane_init_irq(void)
+{
+	omap_board_config = am3517_crane_config;
+	omap_board_config_size = ARRAY_SIZE(am3517_crane_config);
+
+	omap2_init_common_hw(NULL, NULL);
+	omap_init_irq();
+	omap_gpio_init();
+}
+
+static void __init am3517_crane_init(void)
+{
+	omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+	omap_serial_init();
+}
+
+MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
+	.boot_params	= 0x80000100,
+	.map_io		= omap3_map_io,
+	.reserve        = omap_reserve,
+	.init_irq	= am3517_crane_init_irq,
+	.init_machine	= am3517_crane_init,
+	.timer		= &omap_timer,
+MACHINE_END
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h
index 9036e37..229fbf2 100644
--- a/arch/arm/plat-omap/include/plat/uncompress.h
+++ b/arch/arm/plat-omap/include/plat/uncompress.h
@@ -145,6 +145,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id)
 		/* omap3 based boards using UART3 */
 		DEBUG_LL_OMAP3(3, cm_t35);
 		DEBUG_LL_OMAP3(3, cm_t3517);
+		DEBUG_LL_OMAP3(3, craneboard);
 		DEBUG_LL_OMAP3(3, igep0020);
 		DEBUG_LL_OMAP3(3, igep0030);
 		DEBUG_LL_OMAP3(3, nokia_rx51);
-- 
1.7.1.226.g770c5


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

* Re: [PATCH] OMAP: AM3517/05: Add craneboard support
  2010-10-25 14:45 [PATCH] OMAP: AM3517/05: Add craneboard support srinath
@ 2010-10-28  6:52 ` Nishanth Menon
  0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2010-10-28  6:52 UTC (permalink / raw)
  To: srinath@mistralsolutions.com
  Cc: linux-omap@vger.kernel.org, Kridner, Jason, tony@atomide.com,
	khilman@deeprootsystems.com, nagendra@mistralsolutions.com,
	umeshk@mistralsolutions.com

Hi,
Looking much better now, thanks.

Few suggestion, not usually well documented, but a convention nevertheless:

$subject: might be a good idea to do the following for revision of patch
original patch [PATCH] is considered v1
next revision such as this is considered v2 [PATCH v2] is useful for 
people to keep track of the revision of patch under discussion.

when you post with git send-email especially in a follow on patch, add 
--in-reply-to "Original patch subject" - this helps mail readers like 
gmail/thunderbird etc to properly group them up for the receiver. 
Honestly, I forget to do this most of the time, but is a good practice 
to have nonetheless.

srinath@mistralsolutions.com had written, on 10/25/2010 09:45 AM, the 
following:
> From: Srinath <srinath@mistralsolutions.com>
> 
> This patch adds basic board file. Detailed support will follow in
> subsequent patches.
> 
>       [1] http://www.ti.com/sitara
>       [2] http://www.mistralsolutions.com/products/craneboard.php

Look at other board file addition examples - for example:
IGEP - commit ID: 58e111621d402d41cb0cabae7c532d6194b7d943

it gives a brief description of
a) what the board is
b) overall resemblance to other boards
c) idea about the family of silicon involved

when you give a link - we in the linux-omap probably have heard about 
sitara family of processors, but the patch needs to go down to linux-arm 
and lkml - where progressively, the processor is not probably not that 
well heard of :). it might be nice to state OMAP3 family of processors 
to give the reviewer an idea about what is being talked about.

http://omapedia.org/wiki/Releasing_to_Linux_kernel_using_patches_and_emails#Note_on_git_commit_comments
See the point on "Suggestions for Commit messages:"

> 
> This patch has been created against omap-next branch.
This is not something you'd like to see in kernel.org commit message 
right? this is the type of info which could easily fit into diffstat 
section.

> 
> Signed-off-by: Srinath <srinath@mistralsolutions.com>
> ---
this side of the patch is called the diffstat - >from here to the first 
diff does not get into the git history when committed with git am - so 
we can add quiet a few things here

Since this is v2 of the patch series, few suggestions
a) "This patch has been created against omap-next branch" is nice thing 
to do -> keep in mind, with omap-for-linus being merged to kernel.org, 
you may want to base further changes on kernel.org - but if you state 
something to the maintainer, this is the place to do it
b) when you post v2 of a patch, keep in mind you'd like to help a reader 
who might have missed reviewing your previous patch to review this one 
in context to the previous patches as well.. at least the rule I try to 
follow is to have the diffstat of a later series contain details as follows:
v2: change 1
     change 2
     did not do change 3 - reason why..

v1: link of the discussion, I prefer using marc.info as it can give me a 
complete thread easily, for example, I'd post a link like this:
http://marc.info/?t=128801458500004&r=1&w=2

Reason for doing this:
a) having additional reviewers improves your code
b) for an old reviewer, v2 sections tell him/her what has changed and he 
can focus to those changes alone, rest he has already seen
b) for a new reviewer, v1 gives a context of previous discussion, v2 
tells him/her what actions where taken by the author as a result and 
provide comments in reference to that.

Note: this is a bit of a pain as the patch goes through multiple 
iterations, but as far as I saw, it has at least helped my patches at 
times :).

>  arch/arm/configs/omap2plus_defconfig         |    1 +
>  arch/arm/mach-omap2/Kconfig                  |    5 ++
>  arch/arm/mach-omap2/Makefile                 |    2 +
>  arch/arm/mach-omap2/board-am3517crane.c      |   70 ++++++++++++++++++++++++++
>  arch/arm/plat-omap/include/plat/uncompress.h |    1 +
>  5 files changed, 79 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-omap2/board-am3517crane.c
> 
> diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
> index ccedde1..8c93f86 100644
> --- a/arch/arm/configs/omap2plus_defconfig
> +++ b/arch/arm/configs/omap2plus_defconfig
> @@ -40,6 +40,7 @@ CONFIG_MACH_OMAP_LDP=y
>  CONFIG_MACH_OVERO=y
>  CONFIG_MACH_OMAP3EVM=y
>  CONFIG_MACH_OMAP3517EVM=y
> +CONFIG_MACH_CRANEBOARD=y
>  CONFIG_MACH_OMAP3_PANDORA=y
>  CONFIG_MACH_OMAP3_TOUCHBOOK=y
>  CONFIG_MACH_OMAP_3430SDP=y

I suggest you drop this change -> leave it to Tony when he creates his 
usual defconfig cleanups :)

look at commit ids:
58e111621d402d41cb0cabae7c532d6194b7d943 - IGEP board
b075f58b2c0f377b4bfbe11b817e003393bcb489 - PandaBoard
for examples how the board introductions have been done recently.

[...]
rest looks ok to me.

-- 
Regards,
Nishanth Menon

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

end of thread, other threads:[~2010-10-28  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-25 14:45 [PATCH] OMAP: AM3517/05: Add craneboard support srinath
2010-10-28  6:52 ` Nishanth Menon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox