Skip to contentSkip to conversation

Makefile & x86 - Move to generic include/asm/arch/asm-offsets.h

PATCH New Graeme Russ 4 participants 7 messages Aug 28, 2011 – Oct 21, 2011

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

cover Makefile & x86 - Move to generic include/asm/arch/asm-offsets.h

This series creates build rules to create (and clean) include/asm/arch/asm-offsets.h from an asm-offsets.c file located in the SoC directory. In particular, the new rules will skip creating the asm-offsets.h file if the SoC does not have an asm-offsets.c file

Big Fat Note: I have not tested this on ARM which needs to be looked at closely as the SoC files are one level deeper than where sc520 sits under x86

Graeme Russ (3):
Makefile: Add generic build rules for include/asm/arch/asm-offsets.h
x86: Rename include/asm/ic to include/asm/arch-sc520
sc520: Create arch asm-offsets

 Makefile                                |   22 ++-
 arch/x86/cpu/Makefile                   |    3 +
 arch/x86/cpu/sc520/Makefile             |    2 +
 arch/x86/cpu/sc520/asm-offsets.c        |   45 ++++
 arch/x86/cpu/sc520/sc520.c              |    2 +-
 arch/x86/cpu/sc520/sc520_car.S          |    5 +-
 arch/x86/cpu/sc520/sc520_pci.c          |    4 +-
 arch/x86/cpu/sc520/sc520_reset.c        |    2 +-
 arch/x86/cpu/sc520/sc520_sdram.c        |    2 +-
 arch/x86/cpu/sc520/sc520_ssi.c          |    4 +-
 arch/x86/cpu/sc520/sc520_timer.c        |    2 +-
 arch/x86/cpu/start.S                    |    3 +-
 arch/x86/include/asm/arch-sc520/pci.h   |   79 ++++++
 arch/x86/include/asm/arch-sc520/sc520.h |  372 +++++++++++++++++++++++++++++
 arch/x86/include/asm/arch-sc520/ssi.h   |   34 +++
 arch/x86/include/asm/global_data.h      |   19 --
 arch/x86/include/asm/ic/pci.h           |   79 ------
 arch/x86/include/asm/ic/sc520.h         |  398 -------------------------------
 arch/x86/include/asm/ic/ssi.h           |   34 ---
 arch/x86/lib/zimage.c                   |    1 -
 board/eNET/eNET.c                       |    2 +-
 board/eNET/eNET_pci.c                   |    2 +-
 board/eNET/eNET_start16.S               |    9 +-
 23 files changed, 574 insertions(+), 551 deletions(-)
 create mode 100644 arch/x86/cpu/sc520/asm-offsets.c
 create mode 100644 arch/x86/include/asm/arch-sc520/pci.h
 create mode 100644 arch/x86/include/asm/arch-sc520/sc520.h
 create mode 100644 arch/x86/include/asm/arch-sc520/ssi.h
 delete mode 100644 arch/x86/include/asm/ic/pci.h
 delete mode 100644 arch/x86/include/asm/ic/sc520.h
 delete mode 100644 arch/x86/include/asm/ic/ssi.h

--
1.7.5.2.317.g391b14

#1 lore raw

PATCH 1/3 Makefile: Add generic build rules for include/asm/arch/asm-offsets.h

Add three features to the top-level makefile:
- Add include/asm/arch/asm-offsets.h as a dependency of the 'depend' target to eliminate 'file does not exist' errors during dependency building
- Skip generation of include/asm/arch/asm-offsets.h if the source file ($(CPUDIR)/$(SOC)/asm-offsets.c) does not exist
- Add removal of arch specific asm-offsets.s and asm-offsets.h files to the 'clean' target

---
Big Fat Note: I have not tested this on ARM which needs to be looked at closely as the SoC files are one level deeper than where sc520 sits under x86

 Makefile |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)
Makefile +22 -2
index 03d80b7..049b169 100644
@@ -464,7 +464,8 @@ updater:
 # parallel sub-makes creating .depend files simultaneously.
 depend dep:	$(TIMESTAMP_FILE) $(VERSION_FILE) \
 		$(obj)include/autoconf.mk \
-		$(obj)include/generated/generic-asm-offsets.h
+		$(obj)include/generated/generic-asm-offsets.h \
+		$(obj)include/asm/arch/asm-offsets.h
 		for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \
 			$(MAKE) -C $$dir _depend ; done
 
@@ -527,6 +528,23 @@ $(obj)lib/asm-offsets.s:	$(obj)include/autoconf.mk.dep \
 		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
 		-o $@ $(src)lib/asm-offsets.c -c -S
 
+$(obj)include/asm/arch/asm-offsets.h:	$(TOPDIR)/include/autoconf.mk.dep \
+	$(if $(wildcard $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c), \
+	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s,)
+	@echo Generating $@
+	$(if $(wildcard $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c), \
+	tools/scripts/make-asm-offsets $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s $@ \
+	, at echo $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c does not exist - skipping)
+
+$(TOPDIR)$(CPUDIR)/$(SOC)/asm-offsets.s:	$(TOPDIR)/include/autoconf.mk.dep \
+	$(if $(wildcard $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c), \
+	$(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c,)
+	$(if $(wildcard $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c), \
+	$(CC) -DDO_DEPS_ONLY \
+		$(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \
+		-o $@ $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S \
+	, at echo $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.c does not exist - skipping)
+
 #########################################################################
 else	# !config.mk
 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \
@@ -1019,7 +1037,9 @@ clean:
 	       $(obj)board/armltd/{integratorap,integratorcp}/u-boot.lds  \
 	       $(obj)u-boot.lds						  \
 	       $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs]	  \
-	       $(obj)arch/blackfin/cpu/init.{lds,elf}
+	       $(obj)arch/blackfin/cpu/init.{lds,elf}			  \
+	       $(TOPDIR)/$(CPUDIR)/$(SOC)/asm-offsets.s			  \
+	       $(TOPDIR)/include/asm/arch/asm-offsets.h
 	@rm -f $(obj)include/bmp_logo.h
 	@rm -f $(obj)lib/asm-offsets.s
 	@rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map}

--
1.7.5.2.317.g391b14

#2 lore raw

PATCH 1/3 Makefile: Add generic build rules for include/asm/arch/asm-offsets.h

Dear Albert,

Quoted 10 lines · In message <[email protected]> Graeme…

Add three features to the top-level makefile:
- Add include/asm/arch/asm-offsets.h as a dependency of the 'depend' target to eliminate 'file does not exist' errors during dependency building
- Skip generation of include/asm/arch/asm-offsets.h if the source file ($(CPUDIR)/$(SOC)/asm-offsets.c) does not exist
- Add removal of arch specific asm-offsets.s and asm-offsets.h files to the 'clean' target

Quoted 8 lines

---
Big Fat Note: I have not tested this on ARM which needs to be looked at closely as the SoC files are one level deeper than where sc520 sits under x86

 Makefile |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

Would you please ACK or NAK this patch?

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
"Am besten betrachten Sie Fehlermeldungen als eine  Art  Psycho-Test,
mit  dem  herausgefunden  werden soll, wie belastbar Sie sind."
 - Dr. R. Wonneberger, Kompaktf?hrer LaTeX, Kap. 1.6: Fehlermeldungen
#3 lore raw

PATCH 1/3 Makefile: Add generic build rules for include/asm/arch/asm-offsets.h

In reply to Graeme Russ

Hi Greame,

Le 28/08/2011 15:03, Graeme Russ a ?crit :

Quoted 10 lines

Add three features to the top-level makefile:
- Add include/asm/arch/asm-offsets.h as a dependency of the 'depend' target to eliminate 'file does not exist' errors during dependency building
- Skip generation of include/asm/arch/asm-offsets.h if the source file

    ($(CPUDIR)/$(SOC)/asm-offsets.c) does not exist

- Add removal of arch specific asm-offsets.s and asm-offsets.h files to the 'clean' target

Quoted 8 lines

---
Big Fat Note: I have not tested this on ARM which needs to be looked at closely as the SoC files are one level deeper than where sc520 sits under x86

  Makefile |   24 ++++++++++++++++++++++--
  1 files changed, 22 insertions(+), 2 deletions(-)

This does not apply cleanly any more. Can you rebase?

Amicalement,

Signature · 1 line
Albert.
#4 lore raw

PATCH 2/3 x86: Rename include/asm/ic to include/asm/arch-sc520

In reply to Graeme Russ

Also include some trivial related cleanups

---
 arch/x86/cpu/sc520/sc520.c              |    2 +-
 arch/x86/cpu/sc520/sc520_car.S          |    2 +-
 arch/x86/cpu/sc520/sc520_pci.c          |    4 +-
 arch/x86/cpu/sc520/sc520_reset.c        |    2 +-
 arch/x86/cpu/sc520/sc520_sdram.c        |    2 +-
 arch/x86/cpu/sc520/sc520_ssi.c          |    4 +-
 arch/x86/cpu/sc520/sc520_timer.c        |    2 +-
 arch/x86/include/asm/arch-sc520/pci.h   |   79 ++++++
 arch/x86/include/asm/arch-sc520/sc520.h |  398 +++++++++++++++++++++++++++++++
 arch/x86/include/asm/arch-sc520/ssi.h   |   34 +++
 arch/x86/include/asm/ic/pci.h           |   79 ------
 arch/x86/include/asm/ic/sc520.h         |  398 -------------------------------
 arch/x86/include/asm/ic/ssi.h           |   34 ---
 arch/x86/lib/zimage.c                   |    1 -
 board/eNET/eNET.c                       |    2 +-
 board/eNET/eNET_pci.c                   |    2 +-
 board/eNET/eNET_start16.S               |    4 +-
 17 files changed, 523 insertions(+), 526 deletions(-)
 create mode 100644 arch/x86/include/asm/arch-sc520/pci.h
 create mode 100644 arch/x86/include/asm/arch-sc520/sc520.h
 create mode 100644 arch/x86/include/asm/arch-sc520/ssi.h
 delete mode 100644 arch/x86/include/asm/ic/pci.h
 delete mode 100644 arch/x86/include/asm/ic/sc520.h
 delete mode 100644 arch/x86/include/asm/ic/ssi.h
arch/x86/cpu/sc520/sc520.c +1 -1
index e37c403..4892c01 100644
@@ -27,7 +27,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/processor-flags.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/sc520.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
arch/x86/cpu/sc520/sc520_car.S +1 -1
index a33f94f..7cac4d1 100644
@@ -23,7 +23,7 @@
 
 #include <config.h>
 #include <asm/processor-flags.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/sc520.h>
 
 .section .text
 
arch/x86/cpu/sc520/sc520_pci.c +2 -2
index 32d4802..e26793a 100644
@@ -28,8 +28,8 @@
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/pci.h>
-#include <asm/ic/pci.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/pci.h>
+#include <asm/arch/sc520.h>
 
 static struct {
 	u8 priority;
arch/x86/cpu/sc520/sc520_reset.c +1 -1
index 18890c3..137af97 100644
@@ -26,7 +26,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/sc520.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
arch/x86/cpu/sc520/sc520_sdram.c +1 -1
index f3623f5..57e4e7d 100644
@@ -24,7 +24,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/processor-flags.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/sc520.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
arch/x86/cpu/sc520/sc520_ssi.c +2 -2
index 47aa80b..3a6a858 100644
@@ -23,8 +23,8 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/ic/ssi.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/ssi.h>
+#include <asm/arch/sc520.h>
 
 int ssi_set_interface(int freq, int lsb_first, int inv_clock, int inv_phase)
 {
arch/x86/cpu/sc520/sc520_timer.c +1 -1
index 5cccda1..05bc9c1 100644
@@ -27,7 +27,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/interrupt.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/sc520.h>
 
 void sc520_timer_isr(void)
 {
arch/x86/include/asm/arch-sc520/pci.h new file +79 -0

79 lines not on this page · raw message

arch/x86/include/asm/arch-sc520/sc520.h new file +398 -0

398 lines not on this page · raw message

arch/x86/include/asm/arch-sc520/ssi.h new file +34 -0
new file mode 100644
index 0000000..bd48eab
@@ -0,0 +1,34 @@
+/*
+ * (C) Copyright 2008
+ * Graeme Russ <[email protected]>.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef _ASM_IC_SSI_H_
+#define _ASM_IC_SSI_H_ 1
+
+int ssi_set_interface(int, int, int, int);
+void ssi_chip_select(int);
+u8 ssi_txrx_byte(u8);
+void ssi_tx_byte(u8);
+u8 ssi_rx_byte(void);
+
+
+#endif
arch/x86/include/asm/ic/pci.h deleted +0 -79

79 lines not on this page · raw message

arch/x86/include/asm/ic/sc520.h deleted +0 -398

398 lines not on this page · raw message

arch/x86/include/asm/ic/ssi.h deleted +0 -34
deleted file mode 100644
index bd48eab..0000000
@@ -1,34 +0,0 @@
-/*
- * (C) Copyright 2008
- * Graeme Russ <[email protected]>.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#ifndef _ASM_IC_SSI_H_
-#define _ASM_IC_SSI_H_ 1
-
-int ssi_set_interface(int, int, int, int);
-void ssi_chip_select(int);
-u8 ssi_txrx_byte(u8);
-void ssi_tx_byte(u8);
-u8 ssi_rx_byte(void);
-
-
-#endif
arch/x86/lib/zimage.c +0 -1
index 6682e0d..d2dd6fd 100644
@@ -35,7 +35,6 @@
 #include <asm/realmode.h>
 #include <asm/byteorder.h>
 #include <asm/bootparam.h>
-#include <asm/ic/sc520.h>
 
 /*
  * Memory lay-out:
board/eNET/eNET.c +1 -1
index 2a5636c..c4ed820 100644
@@ -23,7 +23,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/ic/sc520.h>
+#include <asm/arch/sc520.h>
 #include <net.h>
 #include <netdev.h>
 
board/eNET/eNET_pci.c +1 -1
index d97387e..29d13d2 100644
@@ -27,7 +27,7 @@
 #include <common.h>
 #include <pci.h>
 #include <asm/pci.h>
-#include <asm/ic/pci.h>
+#include <asm/arch/pci.h>
 
 static void pci_enet_fixup_irq(struct pci_controller *hose, pci_dev_t dev)
 {
board/eNET/eNET_start16.S +1 -3
index 77e5519..4241f6e 100644
@@ -27,11 +27,9 @@
  * that is used by U-boot to its final destination.
  */
 
-/* #include <asm/ic/sc520_defs.h> */
-
 #include "config.h"
 #include "hardware.h"
-#include <asm/ic/sc520.h>
+#include <asm/arch/sc520.h>
 
 .text
 .section .start16, "ax"
Signature · 1 line
1.7.5.2.317.g391b14
#5 lore raw

PATCH 3/3 sc520: Create arch asm-offsets

In reply to Graeme Russ
---
 arch/x86/cpu/Makefile                   |    3 ++
 arch/x86/cpu/sc520/Makefile             |    2 +
 arch/x86/cpu/sc520/asm-offsets.c        |   45 +++++++++++++++++++++++++++++++
 arch/x86/cpu/sc520/sc520_car.S          |    3 +-
 arch/x86/cpu/start.S                    |    3 +-
 arch/x86/include/asm/arch-sc520/sc520.h |   26 ------------------
 arch/x86/include/asm/global_data.h      |   19 -------------
 board/eNET/eNET_start16.S               |    5 ++-
 8 files changed, 57 insertions(+), 49 deletions(-)
 create mode 100644 arch/x86/cpu/sc520/asm-offsets.c
arch/x86/cpu/Makefile +3 -0
index 7f1fc18..f88aa5f 100644
@@ -40,6 +40,9 @@ all:	$(obj).depend $(START) $(LIB)
 $(LIB):	$(OBJS)
 	$(call cmd_link_o_target, $(OBJS))
 
+$(OBJS) \
+$(START): $(TOPDIR)/include/asm/arch/asm-offsets.h
+
 #########################################################################
 
 # defines $(obj).depend target
arch/x86/cpu/sc520/Makefile +2 -0
index f462264..e1ef98d 100644
@@ -48,6 +48,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/x86/cpu/sc520/asm-offsets.c new file +45 -0

45 lines not on this page · raw message

arch/x86/cpu/sc520/sc520_car.S +2 -1
index 7cac4d1..c66df58 100644
@@ -24,6 +24,7 @@
 #include <config.h>
 #include <asm/processor-flags.h>
 #include <asm/arch/sc520.h>
+#include <asm/arch/asm-offsets.h>
 
 .section .text
 
@@ -55,7 +56,7 @@ car_init:
 
 	/* Configure Cache-As-RAM PAR */
 	movl	$CONFIG_SYS_SC520_CAR_PAR, %eax
-	movl	$SC520_PAR2, %edi
+	movl	$(SC520_MMCR_BASE + GENERATED_SC520_PAR2), %edi
 	movl	%eax, (%edi)
 
 	/* Trash the cache then turn it on */
arch/x86/cpu/start.S +2 -1
index 306fb49..4a34e37 100644
@@ -30,6 +30,7 @@
 #include <version.h>
 #include <asm/global_data.h>
 #include <asm/processor-flags.h>
+#include <asm/arch/asm-offsets.h>
 
 .section .text
 .code32
@@ -114,7 +115,7 @@ relocate_code:
 
 	/* Setup call address of in-RAM copy of board_init_r() */
 	movl	$board_init_r, %ebp
-	addl	(GD_RELOC_OFF * 4)(%edx), %ebp
+	addl	(GENERATED_GD_RELOC_OFF)(%edx), %ebp
 
 	/* Setup parameters to board_init_r() */
 	movl	%edx, %eax
arch/x86/include/asm/arch-sc520/sc520.h +0 -26
index 5ac9bb8..9dc29d3 100644
@@ -259,32 +259,6 @@ extern sc520_mmcr_t *sc520_mmcr;
 /* Memory Mapped Control Registers (MMCR) Base Address */
 #define SC520_MMCR_BASE		0xfffef000
 
-/* MMCR Addresses (required for assembler code) */
-#define SC520_DRCCTL		(SC520_MMCR_BASE + 0x010)
-#define SC520_DRCTMCTL		(SC520_MMCR_BASE + 0x012)
-#define SC520_DRCCFG		(SC520_MMCR_BASE + 0x014)
-#define SC520_DRCBENDADR	(SC520_MMCR_BASE + 0x018)
-#define SC520_ECCCTL		(SC520_MMCR_BASE + 0x020)
-#define SC520_DBCTL		(SC520_MMCR_BASE + 0x040)
-#define SC520_ECCINT		(SC520_MMCR_BASE + 0xd18)
-
-#define SC520_PAR0		(SC520_MMCR_BASE + 0x088)
-#define SC520_PAR1		(SC520_PAR0 + (0x04 * 1))
-#define SC520_PAR2		(SC520_PAR0 + (0x04 * 2))
-#define SC520_PAR3		(SC520_PAR0 + (0x04 * 3))
-#define SC520_PAR4		(SC520_PAR0 + (0x04 * 4))
-#define SC520_PAR5		(SC520_PAR0 + (0x04 * 5))
-#define SC520_PAR6		(SC520_PAR0 + (0x04 * 6))
-#define SC520_PAR7		(SC520_PAR0 + (0x04 * 7))
-#define SC520_PAR8		(SC520_PAR0 + (0x04 * 8))
-#define SC520_PAR9		(SC520_PAR0 + (0x04 * 9))
-#define SC520_PAR10		(SC520_PAR0 + (0x04 * 10))
-#define SC520_PAR11		(SC520_PAR0 + (0x04 * 11))
-#define SC520_PAR12		(SC520_PAR0 + (0x04 * 12))
-#define SC520_PAR13		(SC520_PAR0 + (0x04 * 13))
-#define SC520_PAR14		(SC520_PAR0 + (0x04 * 14))
-#define SC520_PAR15		(SC520_PAR0 + (0x04 * 15))
-
 /*
  * PARs for maximum allowable 256MB of SDRAM @ 0x00000000
  * Two PARs are required due to maximum PAR size of 128MB
arch/x86/include/asm/global_data.h +0 -19
index f8a16d6..f977dbe 100644
@@ -58,25 +58,6 @@ extern gd_t *gd;
 
 #endif
 
-/* Word Offsets into Global Data - MUST match struct gd_t */
-#define GD_BD		0
-#define GD_FLAGS	1
-#define GD_BAUDRATE	2
-#define GD_HAVE_CONSOLE	3
-#define GD_RELOC_OFF	4
-#define GD_LOAD_OFF	5
-#define GD_ENV_ADDR	6
-#define GD_ENV_VALID	7
-#define GD_CPU_CLK	8
-#define GD_BUS_CLK	9
-#define GD_RELOC_ADDR	10
-#define GD_START_ADDR_SP	11
-#define GD_RAM_SIZE	12
-#define GD_RESET_STATUS	13
-#define GD_JT		14
-
-#define GD_SIZE		15
-
 /*
  * Global Data Flags
  */
board/eNET/eNET_start16.S +3 -2
index 4241f6e..f94b3b6 100644
@@ -30,6 +30,7 @@
 #include "config.h"
 #include "hardware.h"
 #include <asm/arch/sc520.h>
+#include <asm/arch/asm-offsets.h>
 
 .text
 .section .start16, "ax"
@@ -46,12 +47,12 @@ board_init16:
 	movw	%ax, %ds
 
 	/* Map PAR for Boot Flash (BOOTCS, 512kB @ 0x380000000) */
-	movl    $(SC520_PAR14 - SC520_MMCR_BASE), %edi
+	movl    $GENERATED_SC520_PAR14, %edi
 	movl	$CONFIG_SYS_SC520_BOOTCS_PAR, %eax
 	movl	%eax, (%di)
 
 	/* Map PAR for LED, Hex Switches (GPCS6, 20 Bytes @ 0x1000) */
-	movl    $(SC520_PAR15 - SC520_MMCR_BASE), %edi
+	movl    $GENERATED_SC520_PAR15, %edi
 	movl	$CONFIG_SYS_SC520_LLIO_PAR, %eax
 	movl	%eax, (%di)
 
Signature · 1 line
1.7.5.2.317.g391b14
#6 lore raw

cover Makefile & x86 - Move to generic include/asm/arch/asm-offsets.h

In reply to Graeme Russ
Quoted 4 lines · On Sunday, August 28, 2011 09:03:10 Graeme Russ wrote:

This series creates build rules to create (and clean) include/asm/arch/asm-offsets.h from an asm-offsets.c file located in the SoC directory. In particular, the new rules will skip creating the asm-offsets.h file if the SoC does not have an asm-offsets.c file

i think you're colliding with Stefano Babic's recent work:
[PATCH] Makefile : fix generation of cpu related asm-offsets.h
probably want to sync ;)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110830/e2ec830d/attachment.pgp