From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH] Add OMAP4 Panda support Date: Fri, 18 Jun 2010 09:06:32 -0700 Message-ID: <87wrtw8gvr.fsf@deeprootsystems.com> References: <7B4574D56E4ADF438756313E9A172A8799C0D3C6@dlee01.ent.ti.com> <87y6ecbedt.fsf@deeprootsystems.com> <7B4574D56E4ADF438756313E9A172A879A6933C2@dlee01.ent.ti.com> <87sk4k9xw2.fsf@deeprootsystems.com> <7B4574D56E4ADF438756313E9A172A879A6934A8@dlee01.ent.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pv0-f174.google.com ([74.125.83.174]:34240 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753696Ab0FRQGh (ORCPT ); Fri, 18 Jun 2010 12:06:37 -0400 Received: by pvg6 with SMTP id 6so516012pvg.19 for ; Fri, 18 Jun 2010 09:06:36 -0700 (PDT) In-Reply-To: <7B4574D56E4ADF438756313E9A172A879A6934A8@dlee01.ent.ti.com> (David Anders's message of "Fri\, 18 Jun 2010 10\:56\:20 -0500") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "Anders, David" Cc: "linux-omap@vger.kernel.org" , "tony@atomide.com" "Anders, David" writes: >> >> > The panda isn't 100% compatible with the blaze/sdp. There are/will >> > be some significant differences. I understand the goal to make the >> > "multi-boot" images and to reduce the amount of duplicated code in >> > the kernel, however we can learn a little about this situation from >> > the BeagleBoard. Due to it being a development board, many people >> > who are new to embedded development will be purchasing the Panda and >> > they generally need a clearly defined place to start. Blaze and SDP >> > are officially support TI products and their machine files can be >> > easily groomed and maintained. Having a clearly defined individual >> > machine file and defconfig will make things a lot easier for >> > starting development on the Panda. >> > >> > IMHO, I think it is a giant mistake not to have individual machine >> > files and defconfigs for the panda. This doesn't preclude making >> > sure that they files work properly with multi-boot images. >> >> In my view, all this helps argue the case for having shared code >> instead of the copy-paste duplicating. >> >> I am not opposed to having a separate board file for Panda. What I am >> opposed to is having a separate board file if it's mostly identical to >> another board. >> >> If Panda and Blaze are mostly the same, they should share the same >> board code and use their separate board files to express their >> differences. See how this was done for Zoom2 and Zoom3 which have a >> shared set of peripherals and also a shared debug board. >> >> When customers go to build their designs based on Panda, they can >> still start from the Panda board file and start hacking away. These >> custom boards will then also use the shared common code instead of >> duplicating. >> >> Kevin > > Panda will have different Ethernet, different video outputs, > different usb host controller configurations, and a number of > different pin muxes. Is there a quantitative way of deciding if > there are enough similarities/differences between boards for having > combined/individual machine files? Not really more of a feeling. But these feel like important enough differences to merit a separate board file. I was under the impression that there was a lot more in common. So, I'm OK with the separate board file, please fix up the minor comments below... > I agree that Blaze and SDP are similar enough not to have separate files. > >> >> >> > -----Original Message----- >> > From: Kevin Hilman [mailto:khilman@deeprootsystems.com] >> > Sent: Friday, June 18, 2010 9:32 AM >> > To: Anders, David >> > Cc: linux-omap@vger.kernel.org; tony@atomide.com >> > Subject: Re: [PATCH] Add OMAP4 Panda support >> > >> > "Anders, David" writes: >> > >> >> Add initial support for the OMAP4430 based Panda board. >> >> >> >> Signed-off-by: David Anders >> >> --- >> >> arch/arm/configs/omap4_panda_defconfig | 1094 >> ++++++++++++++++++++++++++++++++ >> >> arch/arm/mach-omap2/Kconfig | 4 + >> >> arch/arm/mach-omap2/Makefile | 1 + >> >> arch/arm/mach-omap2/board-omap4panda.c | 80 +++ >> >> 4 files changed, 1179 insertions(+), 0 deletions(-) >> >> create mode 100644 arch/arm/configs/omap4_panda_defconfig >> >> create mode 100644 arch/arm/mach-omap2/board-omap4panda.c >> > >> > [...] >> > >> >> diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach- >> omap2/board-omap4panda.c >> >> new file mode 100644 >> >> index 0000000..95faec0 >> >> --- /dev/null >> >> +++ b/arch/arm/mach-omap2/board-omap4panda.c >> >> @@ -0,0 +1,80 @@ >> >> +/* >> >> + * Board support file for OMAP4430 based Panda. >> >> + * >> >> + * Copyright (C) 2010 Texas Instruments >> >> + * >> >> + * Author: David Anders >> >> + * >> >> + * Based on mach-omap2/board-4430sdp.c >> >> + * >> >> + * Author: Santosh Shilimkar >> >> + * >> >> + * Based on mach-omap2/board-3430sdp.c >> >> + * >> >> + * This program is free software; you can redistribute it and/or >> modify >> >> + * it under the terms of the GNU General Public License version 2 as >> >> + * published by the Free Software Foundation. >> >> + */ >> >> + >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> + >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> + >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> +#include >> >> + >> >> +static void __init omap4_panda_init_irq(void) >> >> +{ >> >> + omap2_init_common_hw(NULL, NULL); >> >> +#ifdef CONFIG_OMAP_32K_TIMER >> >> + omap2_gp_clockevent_set_gptimer(1); >> >> +#endif This part is not needed (here or in board-4430sdp.c) as the default timer is already 1. >> >> + gic_init_irq(); >> >> + omap_gpio_init(); >> >> +} >> >> + >> >> +static struct omap_musb_board_data musb_board_data = { >> >> + .interface_type = MUSB_INTERFACE_UTMI, >> >> + .mode = MUSB_PERIPHERAL, >> >> + .power = 100, >> >> +}; >> >> + >> >> +static void __init omap4_panda_init(void) >> >> +{ >> >> + omap_serial_init(); >> >> + /* OMAP4 SDP uses internal transceiver so register nop >> transceiver */ >> > s/SDP/Panda/ Please change (or remove) this comment which was just copied from the SDP code. Kevin