Skip to contentSkip to conversation

arm, omap3: Add support for TechNexion modules

PATCH New Tapani Utriainen 3 participants 3 messages Nov 21, 2011 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 arm, omap3: Add support for TechNexion modules

Add support for TechNexion TAO3530 SoM

---
 arch/arm/include/asm/mach-types.h  |    1 
 board/technexion/tao3530/Makefile  |   43 ++++
 board/technexion/tao3530/tao3530.c |  207 ++++++++++++++++++++
 board/technexion/tao3530/tao3530.h |  382 +++++++++++++++++++++++++++++++++++++
 boards.cfg                         |    1 
 include/configs/tao3530.h          |  362 +++++++++++++++++++++++++++++++++++
 6 files changed, 996 insertions(+)
arch/arm/include/asm/mach-types.h +1 -0
index 685b46f..d900d94 100644
@@ -472,6 +472,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_EUKREA_CPUIMX35SD    2821
 #define MACH_TYPE_EUKREA_CPUIMX51SD    2822
 #define MACH_TYPE_EUKREA_CPUIMX51      2823
+#define MACH_TYPE_OMAP3_TAO3530        2836
 #define MACH_TYPE_SMDKC210             2838
 #define MACH_TYPE_OMAP3_BRAILLO        2839
 #define MACH_TYPE_SPYPLUG              2840
board/technexion/tao3530/Makefile new file +43 -0

43 lines not on this page · raw message

board/technexion/tao3530/tao3530.c new file +207 -0

207 lines not on this page · raw message

board/technexion/tao3530/tao3530.h new file +382 -0

382 lines not on this page · raw message

boards.cfg +1 -0
index 343e82f..6143671 100644
@@ -189,6 +189,7 @@ omap3_zoom1                  arm         armv7       zoom1               logicpd
 omap3_zoom2                  arm         armv7       zoom2               logicpd        omap3
 omap3_mvblx                  arm         armv7       mvblx               matrix_vision  omap3
 tam3517                      arm         armv7       tam3517             technexion     omap3
+tao3530                      arm         armv7       tao3530             technexion     omap3
 omap3_beagle                 arm         armv7       beagle              ti             omap3
 omap3_evm                    arm         armv7       evm                 ti             omap3
 omap3_evm_quick_mmc          arm         armv7       evm                 ti             omap3
include/configs/tao3530.h new file +362 -0

362 lines not on this page · raw message

--
1.7.6

#1 lore raw

PATCH 3/4 arm, omap3: Add support for TechNexion modules

Dear Tapani Utriainen,

Quoted 2 lines · In message <20111121164800.23d1025f@myhost> you wrote:

Add support for TechNexion TAO3530 SoM

Same comments as for previous module.

Also again: please chose a beter Subject: line.

...

board/technexion/tao3530/tao3530.c line 136

Quoted 10 lines
board/technexion/tao3530/tao3530.c new file +10 -0
+	/* Set memory size environment variable, depending on revision */
+	switch (tao3530_revision()) {
+	case 0x2:  /* Rev C1 -- 256MB */
+		 setenv("mem_size", "mem=256M");
+		 break;
+	default:
+		 printf("Warning: Unknown TAO3530 rev, setting mem=128M\n");
+	case 0x3: /* Rev A2/B2 -- 128MB */
+		 setenv("mem_size", "mem=128M"); break;
+		 break;

Please don't hard-wire memory sizes. Use get_ram_size() to auto-detect the actual size on the module.

...

board/technexion/tao3530/tao3530.c line 192

Quoted 4 lines
board/technexion/tao3530/tao3530.c new file +4 -0
+	/* Make GPIO 142 as output pin */
+	writel(readl(&gpio5_base->oe) & ~(GPIO14), &gpio5_base->oe);
+
+	/* Now send a pulse on the GPIO pin */

Please add comments why actions like these are needed / what they are good for.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
HANDLE WITH EXTREME CARE:  This Product Contains  Minute Electrically
Charged  Particles  Moving  at  Velocities  in Excess of Five Hundred
Million Miles Per Hour.
#2 lore raw

PATCH 3/4 arm, omap3: Add support for TechNexion modules

In reply to Tapani Utriainen
Quoted 6 lines · Tapani Utriainen

Add support for TechNexion TAO3530 SoM

---

Hi Tapani,

Quoted 8 lines
 arch/arm/include/asm/mach-types.h  |    1 
 board/technexion/tao3530/Makefile  |   43 ++++
 board/technexion/tao3530/tao3530.c |  207 ++++++++++++++++++++
 board/technexion/tao3530/tao3530.h |  382 +++++++++++++++++++++++++++++++++++++
 boards.cfg                         |    1 
 include/configs/tao3530.h          |  362 +++++++++++++++++++++++++++++++++++
 6 files changed, 996 insertions(+)

Most my comments from TAM3517 are still valid for this module. I post here only new comments ;-)

I think you have already got the comment, but you should better explain in the commit message what the patch does. This patch is different from the TAM3517 patch, but both share the same commit message.

board/technexion/tao3530/Makefile line 5

Quoted 11 lines
board/technexion/tao3530/Makefile new file +5 -0
new file mode 100644
index 0000000..59c7d4f
@@ -0,0 +1,43 @@
+#
+# 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.

Author, Copyright ?

board/technexion/tao3530/tao3530.c line 4

Quoted 10 lines
board/technexion/tao3530/tao3530.c new file +4 -0
new file mode 100644
index 0000000..b8a4ac8
@@ -0,0 +1,207 @@
+/*
+ * Maintainer :
+ *      Tapani Utriainen <[email protected]>
+ *

The correct and used way is to set author and copyright in the header file, and put the maintainer name in the MAINTAINER file.

Quoted 8 lines
board/technexion/tao3530/tao3530.c new file +8 -0
+/*
+ * Routine: misc_init_r
+ * Description: Configure board specific parts
+ */
+int misc_init_r(void)
+{
+	struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
+	struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;

board/technexion/tao3530/tao3530.c line 114

Quoted 10 lines
board/technexion/tao3530/tao3530.c new file +10 -0
+
+	twl4030_power_init();
+	twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);
+
+
+	/* Configure GPIOs to output */
+	/* GPIO23 */
+	writel(~(GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe);
+	writel(~(GPIO31 | GPIO30 | GPIO22 | GPIO21 |
+		 GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);

You have already used the GPIO framework - why do you write directly the registers ?

This should be fixed globally.

Quoted 6 lines
board/technexion/tao3530/tao3530.c new file +6 -0
+
+	/* Set GPIOs */
+	writel(GPIO10 | GPIO8 | GPIO2 | GPIO1,
+		&gpio6_base->setdataout);
+	writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
+		GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);

board/technexion/tao3530/tao3530.c line 130

Quoted 10 lines
board/technexion/tao3530/tao3530.c new file +10 -0
+
+#if defined(CONFIG_CMD_NET)
+	setup_net_chip();
+#endif
+	dieid_num_r();
+
+	/* Set memory size environment variable, depending on revision */
+	switch (tao3530_revision()) {
+	case 0x2:  /* Rev C1 -- 256MB */
+		 setenv("mem_size", "mem=256M");

mmmhh...memory is computed with get_ram_size(), not on the revision number.

best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================