Skip to contentSkip to conversation

MX5: Update to autogenerated asm-offsets.h

PATCH New Stefano Babic 2 participants 5 messages Jul 7, 2011 – Sep 5, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 MX5: Update to autogenerated asm-offsets.h

On i.MX5, the asm-offsets.h file is not yet generated as it should be.

CC Matthias Weisser <[email protected]>

---

Changes in V2:
The patch is based on Matthias Weisser's patch for the MX35 that sets the rules into rules.mk

 arch/arm/cpu/armv7/mx5/Makefile             |    2 +
 arch/arm/cpu/armv7/mx5/asm-offsets.c        |   76 +++++++++++++++++++++++++++
 arch/arm/include/asm/arch-mx5/asm-offsets.h |   55 -------------------
 arch/arm/include/asm/arch-mx5/imx-regs.h    |   18 ++++++
 4 files changed, 96 insertions(+), 55 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/mx5/asm-offsets.c
 delete mode 100644 arch/arm/include/asm/arch-mx5/asm-offsets.h
arch/arm/cpu/armv7/mx5/Makefile +2 -0
index e8be9c9..6e13cc3 100644
@@ -45,4 +45,6 @@ include $(SRCTREE)/rules.mk
 
 sinclude $(obj).depend
 
+lowlevel_init.o : $(TOPDIR)/include/asm/arch/asm-offsets.h
+
 #########################################################################
arch/arm/cpu/armv7/mx5/asm-offsets.c new file +76 -0

76 lines not on this page · raw message

arch/arm/include/asm/arch-mx5/asm-offsets.h deleted +0 -55

55 lines not on this page · raw message

arch/arm/include/asm/arch-mx5/imx-regs.h +18 -0
index 9589a62..e83ca29 100644
@@ -317,9 +317,27 @@ struct clkctl {
 	u32	ccgr4;
 	u32	ccgr5;
 	u32	ccgr6;
+#if defined(CONFIG_MX53)
+	u32	ccgr7;
+#endif
 	u32	cmeor;
 };
 
+/* DPLL registers */
+struct dpll {
+	u32	dp_ctl;
+	u32	dp_config;
+	u32	dp_op;
+	u32	dp_mfd;
+	u32	dp_mfn;
+	u32	dp_mfn_minus;
+	u32	dp_mfn_plus;
+	u32	dp_hfs_op;
+	u32	dp_hfs_mfd;
+	u32	dp_hfs_mfn;
+	u32	dp_mfn_togc;
+	u32	dp_destat;
+};
 /* WEIM registers */
 struct weim {
 	u32	cs0gcr1;
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 MX27: Update to autogenerated asm-offsets.h

On i.MX27, the asm-offsets.h file is not yet generated as it should be.

CC Matthias Weisser <[email protected]>

---
Changes in V2:
The patch is based on Matthias Weisser's patch for the MX35 that sets the rules into rules.mk

 arch/arm/cpu/arm926ejs/mx27/Makefile         |    2 +
 arch/arm/cpu/arm926ejs/mx27/asm-offsets.c    |   45 ++++++++++++++++++++++++++
 arch/arm/include/asm/arch-mx27/asm-offsets.h |   16 ---------
 3 files changed, 47 insertions(+), 16 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/mx27/asm-offsets.c
 delete mode 100644 arch/arm/include/asm/arch-mx27/asm-offsets.h
arch/arm/cpu/arm926ejs/mx27/Makefile +2 -0
index 0e112b3..7ac1a21 100644
@@ -34,6 +34,8 @@ all:	$(obj).depend $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
+$(OBJS) : $(TOPDIR)/include/asm/arch/asm-offsets.h
+
 #########################################################################
 
 # defines $(obj).depend target
arch/arm/cpu/arm926ejs/mx27/asm-offsets.c new file +45 -0

45 lines not on this page · raw message

arch/arm/include/asm/arch-mx27/asm-offsets.h deleted +0 -16
deleted file mode 100644
index 497afe5..0000000
@@ -1,16 +0,0 @@
-#define AIPI1_PSR0	0x10000000
-#define AIPI1_PSR1	0x10000004
-#define AIPI2_PSR0	0x10020000
-#define AIPI2_PSR1	0x10020004
-#define CSCR		0x10027000
-#define MPCTL0		0x10027004
-#define SPCTL0		0x1002700c
-#define PCDR0		0x10027018
-#define PCDR1		0x1002701c
-#define PCCR0		0x10027020
-#define PCCR1		0x10027024
-#define ESDCTL0_ROF	0x00
-#define ESDCFG0_ROF	0x04
-#define ESDCTL1_ROF	0x08
-#define ESDCFG1_ROF	0x0C
-#define ESDMISC_ROF	0x10
Signature · 1 line
1.7.1
#2 lore raw

PATCH 2/2 MX27: Update to autogenerated asm-offsets.h

Dear Stefano Babic,

Quoted 4 lines · In message <[email protected]> you wrote:

On i.MX27, the asm-offsets.h file is not yet generated as it should be.

CC Matthias Weisser <[email protected]>

This commit breaks out-of-tree building of all i.MX27 boards:

MAKEALL_LOGDIR=/work/wd/tmp-arm-LOG \
BUILD_DIR=/work/wd/tmp-arm \
./MAKEALL imx27lite
Configuring for imx27lite board...
make[1]: *** No rule to make target /home/wd/git/u-boot/work/include/autoconf.mk.dep', needed by /home/wd/git/u-boot/work/include/asm/arch/asm-offsets.h'. Stop.
make: *** [/work/wd/tmp-arm/arch/arm/cpu/arm926ejs/mx27/libmx27.o] Error 2
make: *** Waiting for unfinished jobs....
arm-linux-size: '/work/wd/tmp-arm/u-boot': No such file

Can you please have a look?

Thanks.

Wolfgang Denk

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-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Alles Gescheite ist schon gedacht worden, man mu? nur versuchen,
es noch einmal zu denken.          -- Goethe, Maximen und Reflexionen
#3 lore raw

PATCH 2/2 MX27: Update to autogenerated asm-offsets.h

Quoted 10 lines · Wolfgang Denk

Dear Stefano Babic,

Quoted 4 lines · In message <[email protected]> you wrote:

On i.MX27, the asm-offsets.h file is not yet generated as it should be.

CC Matthias Weisser <[email protected]>

This commit breaks out-of-tree building of all i.MX27 boards:

It was not exactly this one, but yes, out-of-tree building was broken adding the asm-offsets.h.

I sent a patch to fix this issue:

http://patchwork.ozlabs.org/patch/112374/

commit 0edf8b5b2fa0d210ebc4d6da0fd1aceeb7e44e47 breaks building on a different directory with the O= parameter. The patch will fix this issue, generating always asm-offsets.h before the other targets.

CC Matthias Weisser <[email protected]>
CC Wolfgang Denk <[email protected]>

This Patch should be reviewed. I have tested it with all architectures (V2 of my patch broke PowerPc boards !), and I am quite sure it works - not sure the solution I proposed is the best.

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
=====================================================================
#4 lore raw

PATCH 2/2 MX27: Update to autogenerated asm-offsets.h

Dear Stefano Babic,

Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 2 lines

This commit breaks out-of-tree building of all i.MX27 boards:

It was not exactly this one, but yes, out-of-tree building was broken adding the asm-offsets.h.

Well, that's what git bisect says...

Quoted 3 lines

I sent a patch to fix this issue:

http://patchwork.ozlabs.org/patch/112374/

Will check.

Best regards,

Wolfgang Denk

Signature · 4 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
God made machine language; all the rest is the work of man.