RE: [PATCH] Add OMAP4 Panda Support

2010-07-06 Thread Anders, David
Tony,

> -Original Message-
> From: Tony Lindgren [mailto:t...@atomide.com]
> Sent: Monday, July 05, 2010 6:52 AM
> To: Anders, David
> Cc: Gadiyar, Anand; linux-omap@vger.kernel.org
> Subject: Re: [PATCH] Add OMAP4 Panda Support
> 
> * Anders, David  [100628 20:41]:
> >
> > Tony,
> > If there are no objections, can we get someone to signoff on this so we
> can get it in the window?
> 
> I've added default y to Kconfig for Panda and queued this patch.
> Updated patch below.
> 
> Tony

Thanks a bunch, I really appreciate it!

Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda Support

2010-07-05 Thread Tony Lindgren
* Anders, David  [100628 20:41]:
> 
> Tony,
> If there are no objections, can we get someone to signoff on this so we can 
> get it in the window?

I've added default y to Kconfig for Panda and queued this patch.
Updated patch below.

Tony
>From 73c95f0240b27e3b413c32b8e5b323e86ea5bff0 Mon Sep 17 00:00:00 2001
From: David Anders 
Date: Thu, 24 Jun 2010 19:33:09 +
Subject: [PATCH] Add OMAP4 Panda Support

Add initial support for the OMAP4 based Panda Board.

Signed-off-by: David Anders 
[t...@atomide.com: selected board by default in Kconfig]
Signed-off-by: Tony Lindgren 

diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 84fecd0..b48bacf 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -238,6 +238,11 @@ config MACH_OMAP_4430SDP
 	default y
 	depends on ARCH_OMAP4
 
+config MACH_OMAP4_PANDA
+	bool "OMAP4 Panda Board"
+	default y
+	depends on ARCH_OMAP4
+
 config OMAP3_EMU
 	bool "OMAP3 debugging peripherals"
 	depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 0f2f508..33dedee 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -142,6 +142,8 @@ obj-$(CONFIG_MACH_OMAP3_TOUCHBOOK)	+= board-omap3touchbook.o \
 	   hsmmc.o
 obj-$(CONFIG_MACH_OMAP_4430SDP)		+= board-4430sdp.o \
 	   hsmmc.o
+obj-$(CONFIG_MACH_OMAP4_PANDA)		+= board-omap4panda.o \
+	   hsmmc.o
 
 obj-$(CONFIG_MACH_OMAP3517EVM)		+= board-am3517evm.o
 
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
new file mode 100644
index 000..ed08226
--- /dev/null
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -0,0 +1,305 @@
+/*
+ * Board support file for OMAP4430 based PandaBoard.
+ *
+ * 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 
+#include 
+#include 
+#include 
+#include "hsmmc.h"
+
+
+static void __init omap4_panda_init_irq(void)
+{
+	omap2_init_common_hw(NULL, NULL);
+	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 struct omap2_hsmmc_info mmc[] = {
+	{
+		.mmc		= 1,
+		.wires		= 8,
+		.gpio_wp	= -EINVAL,
+	},
+	{}	/* Terminator */
+};
+
+static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
+	{
+		.supply = "vmmc",
+		.dev_name = "mmci-omap-hs.0",
+	},
+	{
+		.supply = "vmmc",
+		.dev_name = "mmci-omap-hs.1",
+	},
+};
+
+static int omap4_twl6030_hsmmc_late_init(struct device *dev)
+{
+	int ret = 0;
+	struct platform_device *pdev = container_of(dev,
+struct platform_device, dev);
+	struct omap_mmc_platform_data *pdata = dev->platform_data;
+
+	/* Setting MMC1 Card detect Irq */
+	if (pdev->id == 0)
+		pdata->slots[0].card_detect_irq = TWL6030_IRQ_BASE +
+		MMCDETECT_INTR_OFFSET;
+	return ret;
+}
+
+static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev)
+{
+	struct omap_mmc_platform_data *pdata = dev->platform_data;
+
+	pdata->init =	omap4_twl6030_hsmmc_late_init;
+}
+
+static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
+{
+	struct omap2_hsmmc_info *c;
+
+	omap2_hsmmc_init(controllers);
+	for (c = controllers; c->mmc; c++)
+		omap4_twl6030_hsmmc_set_late_init(c->dev);
+
+	return 0;
+}
+
+static struct regulator_init_data omap4_panda_vaux1 = {
+	.constraints = {
+		.min_uV			= 100,
+		.max_uV			= 300,
+		.apply_uV		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+	| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask	 = REGULATOR_CHANGE_VOLTAGE
+	| REGULATOR_CHANGE_MODE
+	| REGULATOR_CHANGE_STATUS,
+	},
+};
+
+static struct regulator_init_data omap4_panda_vaux2 = {
+	.constraints = {
+		.min_uV			= 120,
+		.max_uV			= 280,
+		.apply_uV		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+	| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask	 = REGULATOR_CHANGE_VOLTAGE
+	| REGULATOR_CHANGE_MODE
+	| REGULATOR_CHANGE_STATUS,
+	},
+};
+
+static struct regulator_init_data omap4_panda_vaux3 = {
+	.constraints = {
+		.min_uV			= 100,
+		.max_uV			= 300,
+		.apply_uV		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+	| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask	 = REGULATOR_CHANGE_VOLTAGE
+	| REGULATOR_CHANGE_MODE
+	| REGULATOR_CHANGE_STATUS,
+	},
+};
+
+/* VMMC1 for MMC1 card */
+static struct regulator_init_data omap4_panda_vmmc = {
+	.constraints = {
+		.min_uV			= 120,

RE: [PATCH] Add OMAP4 Panda Support

2010-06-28 Thread Anders, David
> -Original Message-
> From: Gadiyar, Anand
> Sent: Thursday, June 24, 2010 8:29 PM
> To: Anders, David; linux-omap@vger.kernel.org
> Cc: t...@atomide.com
> Subject: RE: [PATCH] Add OMAP4 Panda Support
> 
> > +static void __init omap4_panda_init(void)
> > +{
> > +   int status;
> > +
> > +   omap4_panda_i2c_init();
> > +   omap_serial_init();
> > +   omap4_twl6030_hsmmc_init(mmc);
> > +   /* OMAP4 Panda uses internal transceiver so register nop transceiver
> */
> > +   usb_nop_xceiv_register();
> > +   /* FIXME: allow multi-omap to boot until musb is updated for omap4
> */
> > +   if (!cpu_is_omap44xx())
> > +   usb_musb_init(&musb_board_data);
> > +}
> 
> Dave,
> 
> I think this should be resolved by now - the OMAP4 MUSB support went
> through linux-usb for .35-rc1. So it should be safe to call
> usb_musb_init() unconditionally.
> 
> (Not actually tested by me yet. I'll try and do this tomorrow).
> 
> 
> - Anand

Anand,

I've done a few tests and still have a few errors with unconditional calls to 
musb_init. I'd like for core support to go ahead and move forward with the 
patch as is. I did a quick check and didn't see any patches submitted to change 
these lines in the 4430sdp, and for now, I would like to mirror as much as 
possible the functionality in the machine files for the panda and 4430sdp.

Tony,
If there are no objections, can we get someone to signoff on this so we can get 
it in the window?

Thanks
Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] Add OMAP4 Panda Support

2010-06-24 Thread Gadiyar, Anand
> +static void __init omap4_panda_init(void)
> +{
> + int status;
> +
> + omap4_panda_i2c_init();
> + omap_serial_init();
> + omap4_twl6030_hsmmc_init(mmc);
> + /* OMAP4 Panda uses internal transceiver so register nop transceiver */
> + usb_nop_xceiv_register();
> + /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
> + if (!cpu_is_omap44xx())
> + usb_musb_init(&musb_board_data);
> +}

Dave,

I think this should be resolved by now - the OMAP4 MUSB support went
through linux-usb for .35-rc1. So it should be safe to call
usb_musb_init() unconditionally.

(Not actually tested by me yet. I'll try and do this tomorrow).


- Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Kevin Hilman
"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:khil...@deeprootsystems.com]
>> > Sent: Friday, June 18, 2010 9:32 AM
>> > To: Anders, David
>> > Cc: linux-omap@vger.kernel.org; t...@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 000..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

RE: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Anders, David
> -Original Message-
> From: Kevin Hilman [mailto:khil...@deeprootsystems.com]
> Sent: Friday, June 18, 2010 10:14 AM
> To: Anders, David
> Cc: linux-omap@vger.kernel.org; t...@atomide.com
> Subject: Re: [PATCH] Add OMAP4 Panda support
> 
> [please don't top-post: http://elinux.org/Netiquette]
> 
> "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?

I agree that Blaze and SDP are similar enough not to have separate files. 

> 
> 
> > -Original Message-
> > From: Kevin Hilman [mailto:khil...@deeprootsystems.com]
> > Sent: Friday, June 18, 2010 9:32 AM
> > To: Anders, David
> > Cc: linux-omap@vger.kernel.org; t...@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 000..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 
> 

RE: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Gadiyar, Anand
> IIUC, Panda was built to be compatible with the SDP/Blaze, right?
> 
> If so, is there any reason we can't support both boards from the same
> board file?
> 
> Just add the above MACHINE_START.._END section to board-4430sdp.c to handle
> the both machine IDs, but all the functions could be common.
> 

Nope, the Blaze was built to be compatible with the SDP.

The Panda is the beagleboard-like OMAP4 board.

- Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Kevin Hilman
[please don't top-post: http://elinux.org/Netiquette]

"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


> -Original Message-
> From: Kevin Hilman [mailto:khil...@deeprootsystems.com] 
> Sent: Friday, June 18, 2010 9:32 AM
> To: Anders, David
> Cc: linux-omap@vger.kernel.org; t...@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 000..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
>> +   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 */
>
> SDP?
>
>> +   usb_nop_xceiv_register();
>> +   /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
>> +   if (!cpu_is_omap44xx())
>> +   

RE: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Anders, David
Kevin,

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.

Dave
 



-Original Message-
From: Kevin Hilman [mailto:khil...@deeprootsystems.com] 
Sent: Friday, June 18, 2010 9:32 AM
To: Anders, David
Cc: linux-omap@vger.kernel.org; t...@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 000..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
> +   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 */

SDP?

> +   usb_nop_xceiv_register();
> +   /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
> +   if (!cpu_is_omap44xx())
> +   usb_musb_init(&musb_board_data);
> +
> +}
> +
> +static void __init omap4_panda_map_io(void)
> +{
> +   omap2_set_globals_443x();
> +   omap44xx_map_common_io();
> +}
> +
> +MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
> +   /* Maintainer: David Anders - Texas Instruments Inc */
> +   .phys_io= 0x4800,
> +   .io_pg_offst= ((0xfa00) >> 18) & 0xfffc,
> +   .boot_params= 0x8100,
> +   .map_io = omap4_panda_map_io,
> +   .init_irq   = omap4_panda_init_irq,
> +   .init_machine   = omap4_panda_init,
> +   .timer  = &omap_timer,
> +MACHINE_END


IIUC, Panda was built to be compatible with the SDP/Blaze, right?

If so, is there any reason we can't support both boards from the same
board file?

Just add the above MACHINE_START.._END section to board-4430sdp.c to handle
the both machine IDs, but all the functions could be common.

Kevin


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Kevin Hilman
"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 000..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
> +   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 */

SDP?

> +   usb_nop_xceiv_register();
> +   /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
> +   if (!cpu_is_omap44xx())
> +   usb_musb_init(&musb_board_data);
> +
> +}
> +
> +static void __init omap4_panda_map_io(void)
> +{
> +   omap2_set_globals_443x();
> +   omap44xx_map_common_io();
> +}
> +
> +MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
> +   /* Maintainer: David Anders - Texas Instruments Inc */
> +   .phys_io= 0x4800,
> +   .io_pg_offst= ((0xfa00) >> 18) & 0xfffc,
> +   .boot_params= 0x8100,
> +   .map_io = omap4_panda_map_io,
> +   .init_irq   = omap4_panda_init_irq,
> +   .init_machine   = omap4_panda_init,
> +   .timer  = &omap_timer,
> +MACHINE_END


IIUC, Panda was built to be compatible with the SDP/Blaze, right?

If so, is there any reason we can't support both boards from the same
board file?

Just add the above MACHINE_START.._END section to board-4430sdp.c to handle
the both machine IDs, but all the functions could be common.

Kevin


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Felipe Balbi

On Fri, Jun 18, 2010 at 11:56:02AM +0200, ext Elvis Dowson wrote:
When adding support for OMAP4 Panda, and adding the necessary bits to 
omap3_defconfig, will it be possible to ensure that all OMAP3 devices 
also work the same, e.g. Gumstix Overo?


it should be possible. Ideally all omap2/3/4 boards should boot just 
fine with omap3_defconfig.



What about specifics to make Android work in the defconfigs?


I really don't think community should care about Android/MeeGo/Ubuntu 
etc.


--
balbi

DefectiveByDesign.org
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Elvis Dowson
Hi Felipe,

On Jun 18, 2010, at 10:58 AM, Felipe Balbi wrote:

> should we drop the defconfig, though ? and just add the necessary bits to 
> omap3_defconfig ?

When adding support for OMAP4 Panda, and adding the necessary bits to 
omap3_defconfig, will it be possible to ensure that all OMAP3 devices also work 
the same, e.g. Gumstix Overo? 

What about specifics to make Android work in the defconfigs?

Best regards,

Elvis Dowson

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Tony Lindgren
* Felipe Balbi  [100618 09:55]:
> On Tue, May 18, 2010 at 05:36:36AM +0200, ext Tony Lindgren wrote:
> >Cool, good to see this posted early.
> >
> >However, looks like this can wait until the next merge window
> >though as it was posted so late.
> 
> should we drop the defconfig, though ? and just add the necessary
> bits to omap3_defconfig ?

Yeah no more defconfig patches until the situation clears on the
ARM defconfigs.

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda support

2010-06-18 Thread Felipe Balbi

On Tue, May 18, 2010 at 05:36:36AM +0200, ext Tony Lindgren wrote:

Cool, good to see this posted early.

However, looks like this can wait until the next merge window
though as it was posted so late.


should we drop the defconfig, though ? and just add the necessary bits 
to omap3_defconfig ?


--
balbi

DefectiveByDesign.org
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Add OMAP4 Panda support

2010-05-17 Thread Tony Lindgren
* Anders, David  [100517 13:13]:
> Add initial support for the OMAP4430 based Panda board.
> 
> Signed-off-by: David Anders 



> +
> +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
> +   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 */
> +   usb_nop_xceiv_register();
> +   /* FIXME: allow multi-omap to boot until musb is updated for omap4 */
> +   if (!cpu_is_omap44xx())
> +   usb_musb_init(&musb_board_data);
> +
> +}
> +
> +static void __init omap4_panda_map_io(void)
> +{
> +   omap2_set_globals_443x();
> +   omap44xx_map_common_io();
> +}
> +
> +MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
> +   /* Maintainer: David Anders - Texas Instruments Inc */
> +   .phys_io= 0x4800,
> +   .io_pg_offst= ((0xfa00) >> 18) & 0xfffc,
> +   .boot_params= 0x8100,
> +   .map_io = omap4_panda_map_io,
> +   .init_irq   = omap4_panda_init_irq,
> +   .init_machine   = omap4_panda_init,
> +   .timer  = &omap_timer,
> +MACHINE_END

Cool, good to see this posted early.

However, looks like this can wait until the next merge window
though as it was posted so late.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html