Skip to contentSkip to conversation

compulab: adjustments before porting more boards

PATCH New Igor Grinberg 2 participants 9 messages Sep 16, 2013 – Nov 4, 2013

lore
Share & tools
lore
#0 lore raw

cover compulab: adjustments before porting more boards

Two more adjustments before porting more Compulab boards to mainline U-Boot. Move the eeprom code which can be used (and is suitable) by multiple Compulab boards to a common location.
Move the display initialization code which can be used by multiple Compulab OMAP based boards.

Igor Grinberg (2):
cm-t35: move the eeprom code to common place
cm-t35: move the display code to common place

 board/compulab/cm_t35/Makefile                     |  3 --
 board/compulab/cm_t35/cm_t35.c                     |  7 ++-
 board/compulab/common/Makefile                     | 36 +++++++++++++++
 board/compulab/{cm_t35 => common}/eeprom.c         | 51 ++++++++++++----------
 board/compulab/{cm_t35 => common}/eeprom.h         |  8 ++--
 .../{cm_t35/display.c => common/omap3_display.c}   |  0
 6 files changed, 70 insertions(+), 35 deletions(-)
 create mode 100644 board/compulab/common/Makefile
 rename board/compulab/{cm_t35 => common}/eeprom.c (60%)
 rename board/compulab/{cm_t35 => common}/eeprom.h (62%)
 rename board/compulab/{cm_t35/display.c => common/omap3_display.c} (100%)
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 1/2 cm-t35: move the eeprom code to common place

Compulab boards use the same eeprom code, so move the eeprom related code to live under board/compulab/common directory.
Also make several adjustments to eeprom functions namespace, so it will be generic for compulab boards.

---
 board/compulab/cm_t35/Makefile             |  1 -
 board/compulab/cm_t35/cm_t35.c             |  7 ++--
 board/compulab/common/Makefile             | 35 ++++++++++++++++++++
 board/compulab/{cm_t35 => common}/eeprom.c | 51 ++++++++++++++++--------------
 board/compulab/{cm_t35 => common}/eeprom.h |  8 ++---
 5 files changed, 69 insertions(+), 33 deletions(-)
 create mode 100644 board/compulab/common/Makefile
 rename board/compulab/{cm_t35 => common}/eeprom.c (60%)
 rename board/compulab/{cm_t35 => common}/eeprom.h (62%)
board/compulab/cm_t35/Makefile +0 -1
index 6d07947..8b922b3 100644
@@ -11,7 +11,6 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o
 COBJS-$(CONFIG_LCD) += display.o
 
 COBJS	:= cm_t35.o leds.o $(COBJS-y)
board/compulab/cm_t35/cm_t35.c +3 -4
index 3caa5be..a6d4aba 100644
@@ -33,7 +33,7 @@
 #include <asm/ehci-omap.h>
 #include <asm/gpio.h>
 
-#include "eeprom.h"
+#include "../common/eeprom.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -160,7 +160,7 @@ static u32 cm_t3x_rev;
 u32 get_board_rev(void)
 {
 	if (!cm_t3x_rev)
-		cm_t3x_rev = cm_t3x_eeprom_get_board_rev();
+		cm_t3x_rev = cl_eeprom_get_board_rev();
 
 	return cm_t3x_rev;
 };
@@ -509,7 +509,7 @@ static int handle_mac_address(void)
 	if (rc)
 		return 0;
 
-	rc = cm_t3x_eeprom_read_mac_addr(enetaddr);
+	rc = cl_eeprom_read_mac_addr(enetaddr);
 	if (rc)
 		return rc;
 
@@ -598,5 +598,4 @@ int ehci_hcd_stop(void)
 {
 	return omap_ehci_hcd_stop();
 }
-
 #endif /* CONFIG_USB_EHCI_OMAP */
board/compulab/common/Makefile new file +35 -0
new file mode 100644
index 0000000..ec2e510
@@ -0,0 +1,35 @@
+#
+# (C) Copyright 2011 - 2013 CompuLab, Ltd. <www.compulab.co.il>
+#
+# Author: Igor Grinberg <[email protected]>
+#
+# SPDX-License-Identifier:	GPL-2.0+
+#
+
+include $(TOPDIR)/config.mk
+
+ifneq ($(OBJTREE),$(SRCTREE))
+$(shell mkdir -p $(obj)board/$(VENDOR)/common)
+endif
+
+LIB	= $(obj)lib$(VENDOR).o
+
+COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o
+
+COBJS	:= $(COBJS-y)
+SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS	:= $(addprefix $(obj),$(COBJS))
+SOBJS	:= $(addprefix $(obj),$(SOBJS))
+
+all:	$(LIB)
+
+$(LIB):	$(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#########################################################################
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/compulab/common/eeprom.c renamed from board/compulab/cm_t35/eeprom.c +27 -24

114 lines not on this page · raw message

board/compulab/common/eeprom.h renamed from board/compulab/cm_t35/eeprom.h +4 -4
similarity index 62%
rename from board/compulab/cm_t35/eeprom.h
rename to board/compulab/common/eeprom.h
index 02ffbb1..cf8c302 100644
@@ -11,14 +11,14 @@
 #define _EEPROM_
 
 #ifdef CONFIG_DRIVER_OMAP34XX_I2C
-int cm_t3x_eeprom_read_mac_addr(uchar *buf);
-u32 cm_t3x_eeprom_get_board_rev(void);
+int cl_eeprom_read_mac_addr(uchar *buf);
+u32 cl_eeprom_get_board_rev(void);
 #else
-static inline int cm_t3x_eeprom_read_mac_addr(uchar *buf)
+static inline int cl_eeprom_read_mac_addr(uchar *buf)
 {
 	return 1;
 }
-static inline u32 cm_t3x_eeprom_get_board_rev(void)
+static inline u32 cl_eeprom_get_board_rev(void)
 {
 	return 0;
 }
Signature · 1 line
1.8.1.5
#2 lore raw

PATCH 1/2 cm-t35: move the eeprom code to common place

Quoted 7 lines · Igor Grinberg

Compulab boards use the same eeprom code, so move the eeprom related code to live under board/compulab/common directory.
Also make several adjustments to eeprom functions namespace, so it will be generic for compulab boards.

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131104/98da83cc/attachment.pgp>
#3 lore raw

PATCH 2/2 cm-t35: move the display code to common place

In reply to Igor Grinberg

Compulab OMAP3 boards use the same display initialization code. Move the display initialization code to live under board/compulab/common directory.

---
 board/compulab/cm_t35/Makefile                              | 2 --
 board/compulab/common/Makefile                              | 1 +
 board/compulab/{cm_t35/display.c => common/omap3_display.c} | 0
 3 files changed, 1 insertion(+), 2 deletions(-)
 rename board/compulab/{cm_t35/display.c => common/omap3_display.c} (100%)
board/compulab/cm_t35/Makefile +0 -2
index 8b922b3..213423e 100644
@@ -11,8 +11,6 @@ include $(TOPDIR)/config.mk
 
 LIB	= $(obj)lib$(BOARD).o
 
-COBJS-$(CONFIG_LCD) += display.o
-
 COBJS	:= cm_t35.o leds.o $(COBJS-y)
 
 SRCS	:= $(COBJS:.o=.c)
board/compulab/common/Makefile +1 -0
index ec2e510..b399c8f 100644
@@ -15,6 +15,7 @@ endif
 LIB	= $(obj)lib$(VENDOR).o
 
 COBJS-$(CONFIG_DRIVER_OMAP34XX_I2C) += eeprom.o
+COBJS-$(CONFIG_LCD) += omap3_display.o
 
 COBJS	:= $(COBJS-y)
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
board/compulab/common/omap3_display.c renamed from board/compulab/cm_t35/display.c +0 -0
similarity index 100%
rename from board/compulab/cm_t35/display.c
rename to board/compulab/common/omap3_display.c
Signature · 1 line
1.8.1.5
#4 lore raw

PATCH 2/2 cm-t35: move the display code to common place

Quoted 6 lines · Igor Grinberg

Compulab OMAP3 boards use the same display initialization code. Move the display initialization code to live under board/compulab/common directory.

Applied to u-boot-ti/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131104/9e8845fc/attachment.pgp>
#5 lore raw

cover compulab: adjustments before porting more boards

In reply to Igor Grinberg

ping!

Quoted 22 lines · Igor Grinberg

Two more adjustments before porting more Compulab boards to mainline U-Boot. Move the eeprom code which can be used (and is suitable) by multiple Compulab boards to a common location.
Move the display initialization code which can be used by multiple Compulab OMAP based boards.

Igor Grinberg (2):
cm-t35: move the eeprom code to common place
cm-t35: move the display code to common place

 board/compulab/cm_t35/Makefile                     |  3 --
 board/compulab/cm_t35/cm_t35.c                     |  7 ++-
 board/compulab/common/Makefile                     | 36 +++++++++++++++
 board/compulab/{cm_t35 => common}/eeprom.c         | 51 ++++++++++++----------
 board/compulab/{cm_t35 => common}/eeprom.h         |  8 ++--
 .../{cm_t35/display.c => common/omap3_display.c}   |  0
 6 files changed, 70 insertions(+), 35 deletions(-)
 create mode 100644 board/compulab/common/Makefile
 rename board/compulab/{cm_t35 => common}/eeprom.c (60%)
 rename board/compulab/{cm_t35 => common}/eeprom.h (62%)
 rename board/compulab/{cm_t35/display.c => common/omap3_display.c} (100%)
Signature · 2 lines
Regards,
Igor.
#6 lore raw

cover compulab: adjustments before porting more boards

Quoted 24 lines · Igor Grinberg

ping!

Quoted 21 lines · Igor Grinberg

Two more adjustments before porting more Compulab boards to mainline U-Boot. Move the eeprom code which can be used (and is suitable) by multiple Compulab boards to a common location.
Move the display initialization code which can be used by multiple Compulab OMAP based boards.

Igor Grinberg (2):
cm-t35: move the eeprom code to common place
cm-t35: move the display code to common place

 board/compulab/cm_t35/Makefile                     |  3 --
 board/compulab/cm_t35/cm_t35.c                     |  7 ++-
 board/compulab/common/Makefile                     | 36 +++++++++++++++
 board/compulab/{cm_t35 => common}/eeprom.c         | 51 ++++++++++++----------
 board/compulab/{cm_t35 => common}/eeprom.h         |  8 ++--
 .../{cm_t35/display.c => common/omap3_display.c}   |  0
 6 files changed, 70 insertions(+), 35 deletions(-)
 create mode 100644 board/compulab/common/Makefile
 rename board/compulab/{cm_t35 => common}/eeprom.c (60%)
 rename board/compulab/{cm_t35 => common}/eeprom.h (62%)
 rename board/compulab/{cm_t35/display.c => common/omap3_display.c} (100%)

Generally fine, but posted after the merge window so I hadn't picked it up for u-boot-ti yet, thanks.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131002/902558d2/attachment.pgp>
#7 lore raw

cover compulab: adjustments before porting more boards

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tom,

Quoted 27 lines · Tom Rini
Quoted 24 lines · Igor Grinberg

ping!

Quoted 21 lines · Igor Grinberg

Two more adjustments before porting more Compulab boards to mainline U-Boot. Move the eeprom code which can be used (and is suitable) by multiple Compulab boards to a common location.
Move the display initialization code which can be used by multiple Compulab OMAP based boards.

Igor Grinberg (2):
cm-t35: move the eeprom code to common place
cm-t35: move the display code to common place

 board/compulab/cm_t35/Makefile                     |  3 --
 board/compulab/cm_t35/cm_t35.c                     |  7 ++-
 board/compulab/common/Makefile                     | 36 +++++++++++++++
 board/compulab/{cm_t35 => common}/eeprom.c         | 51 ++++++++++++----------
 board/compulab/{cm_t35 => common}/eeprom.h         |  8 ++--
 .../{cm_t35/display.c => common/omap3_display.c}   |  0
 6 files changed, 70 insertions(+), 35 deletions(-)
 create mode 100644 board/compulab/common/Makefile
 rename board/compulab/{cm_t35 => common}/eeprom.c (60%)
 rename board/compulab/{cm_t35 => common}/eeprom.h (62%)
 rename board/compulab/{cm_t35/display.c => common/omap3_display.c} (100%)
Quoted 2 lines

Generally fine, but posted after the merge window so I hadn't picked it up for u-boot-ti yet, thanks.

No problem, I was actually aiming for v2014.01
(or which ever the next release will be).

I just have more stuff in the queue that depends on the above and like it to be applied before sending out the next series.

10x!

- --
Regards,
Igor.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJSTCd2AAoJEBDE8YO64EfaIZEP/j/GwAo79meDOujygMAgRzwW 8bOspDANVO/FcO0OifyD3q06aCFYqsMfcH07ebzlRO6tfmpY3WSiTNTgs68Jwepu TvsCBL7wps8lH4R6DoCZjpjaZV6khjyZinSfO+E/MV5Zgb9FhS/gyKwJ4rXEIoLT k9tK3QtGdQHNtWSd0ZMzF711hhZgkUBUx2MsPwDoZsGjYyqBaW9O2dz8IoSf/wSh jvrVl/tntyoIQIG7r8kIZ9XCoBiBnj/mSwkugp7yXCecJdzh1azUo43oLl4uS7em CWkZuLDJkB6WGiLoju2DYymIQ2ira6VdHZCLb7DbOvZ7Ja6Uz394zIOLxnqobvCl l3n2KR7w1HOGBo7lBhC8QPMCeNEQ2skIvamp3lcuPmfucx6cGDJWRZQulX/X7JcS ktYNLSB927E71x2c6kEBHEDb/E/EyI0/Xr4dBhQTou3A5psUayfkB7uXpObuooHt XD3SjpMDGf7HNok6MkFxuZdIPgr1UNkrlEf/qZWoHJKuMOEhVbrTjPK8ZbkQ2Ozi DaT5SqgNghd+nCZ477T1Vg/XzzwNc05tpc8r5dY7YCrKf5WKrTpHJuC62Xc216yA Rr+9ifYecsnDE0R/tfVojBu8hlBskWuyV13EblkvWON/tXqODRqY3dsMQlV4/2x5 TRjoIgkB5cV17iot7CWT
=c83T
-----END PGP SIGNATURE-----

#8 lore raw

cover compulab: adjustments before porting more boards

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Tom,

Quoted 33 lines · Igor Grinberg

Hi Tom,

Quoted 27 lines · Tom Rini
Quoted 24 lines · Igor Grinberg

ping!

Quoted 21 lines · Igor Grinberg

Two more adjustments before porting more Compulab boards to mainline U-Boot. Move the eeprom code which can be used (and is suitable) by multiple Compulab boards to a common location.
Move the display initialization code which can be used by multiple Compulab OMAP based boards.

Igor Grinberg (2):
cm-t35: move the eeprom code to common place
cm-t35: move the display code to common place

 board/compulab/cm_t35/Makefile                     |  3 --
 board/compulab/cm_t35/cm_t35.c                     |  7 ++-
 board/compulab/common/Makefile                     | 36 +++++++++++++++
 board/compulab/{cm_t35 => common}/eeprom.c         | 51 ++++++++++++----------
 board/compulab/{cm_t35 => common}/eeprom.h         |  8 ++--
 .../{cm_t35/display.c => common/omap3_display.c}   |  0
 6 files changed, 70 insertions(+), 35 deletions(-)
 create mode 100644 board/compulab/common/Makefile
 rename board/compulab/{cm_t35 => common}/eeprom.c (60%)
 rename board/compulab/{cm_t35 => common}/eeprom.h (62%)
 rename board/compulab/{cm_t35/display.c => common/omap3_display.c} (100%)
Quoted 2 lines

Generally fine, but posted after the merge window so I hadn't picked it up for u-boot-ti yet, thanks.

Quoted 7 lines

No problem, I was actually aiming for v2014.01
(or which ever the next release will be).

I just have more stuff in the queue that depends on the above and like it to be applied before sending out the next series.

10x!

Where is that TI hat of yours?
It's just about time!

- --
Regards,
Igor.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJSbL9aAAoJEBDE8YO64EfayBIQAI5cAVvD+cOT2KAO6HgkowUl wQlpAt79C2AMXeFZX9zld9sg3CQhBfvwkyKhhvSMTTl0CYEFUGUZBrt+QEdL5qBo 0zUlM2YcYlICxp5Qsd+/ihLAlqXEgc0jMj4qwT+JEPXwnpj3MrL/WOpr7rGbZfPs NzFyq64bE95bIk3Qm5l3+QKLSVFwSvyiY9HsyIXQF+ETM/mzXTRGnEdWcehJDGT8 djGiMXSq0TU4r7AaE2ooZoyff75xhDt2qjPl5hNqa82icVmZXyvKOJium/ROmS5H IcQCqPn6xJHjQNrA1vQt2FK6wJGfOC4EBFAVVRLafGUROVxjLzZ8Xf2dNAsiFUJg dc43wvM01s3OxOOMa4tPJPwi4b/BUootXZKXMf037WMpwrxW+PZT5Ca0Z/F03q3m RjuMFGpEJB8YqB+0+B8z4VqEhNUIPrg2McOX25+TmB1bB2Hl5RJXRXOUu16GJBpm r23/3VIiXQj/j6VgVIbUzvVR/t+oR/QUaJuAf8r8DUeXNZbYcx7uremOjE0YjdJG px4fgjj4FNCcdHS80iGCsfii7N9VFMfvP92trJFTap199UlJtnFs+NYRO9NLyMu9 QuyMkQc79EK3vN0BK9CZOpXEugODZYqbyLDbKM2/DJBDZBwyb4KCnNUZQJBZfogz Tv6M0PTxGW47nIoo8RA5
=O+My
-----END PGP SIGNATURE-----