summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-10-09 22:21:29 +0000
committerwdenk <wdenk>2004-10-09 22:21:29 +0000
commit1d9f410500f32b04b18b176386e77afacda7acfb (patch)
treec381f275ad04efac5da30ec72c14016b09437135
parent3e01d75ff25b3668191beb86ab32cb2d1fb7f73b (diff)
downloadu-boot-imx-1d9f410500f32b04b18b176386e77afacda7acfb.zip
u-boot-imx-1d9f410500f32b04b18b176386e77afacda7acfb.tar.gz
u-boot-imx-1d9f410500f32b04b18b176386e77afacda7acfb.tar.bz2
Patch by Steven Scholz, 16 Aug 2004:
- Introducing the concept of SoCs "./cpu/$(CPU)/$(SOC)" - creating subdirs for SoCs ./cpu/arm920t/imx and ./cpu/arm920t/s3c24x0 - moving SoC specific code out of cpu/arm920t/ into cpu/arm920t/$(SOC)/ - moving drivers/s3c24x0_i2c.c and drivers/serial_imx.c out of drivers/ into cpu/arm920t/$(SOC)/
-rw-r--r--CHANGELOG7
-rw-r--r--Makefile19
-rw-r--r--README2
-rw-r--r--config.mk3
-rw-r--r--cpu/arm920t/Makefile6
-rw-r--r--cpu/arm920t/imx/Makefile42
-rw-r--r--cpu/arm920t/imx/generic.c (renamed from cpu/arm920t/imx_generic.c)0
-rw-r--r--cpu/arm920t/imx/interrupts.c (renamed from cpu/arm920t/imx_interrupts.c)0
-rw-r--r--cpu/arm920t/imx/serial.c (renamed from drivers/serial_imx.c)0
-rw-r--r--cpu/arm920t/imx/speed.c (renamed from cpu/arm920t/imx_speed.c)0
-rw-r--r--cpu/arm920t/s3c24x0/Makefile43
-rw-r--r--cpu/arm920t/s3c24x0/i2c.c (renamed from drivers/s3c24x0_i2c.c)0
-rw-r--r--cpu/arm920t/s3c24x0/interrupts.c (renamed from cpu/arm920t/s3c24x0_interrupts.c)0
-rw-r--r--cpu/arm920t/s3c24x0/serial.c (renamed from cpu/arm920t/s3c24x0_serial.c)0
-rw-r--r--cpu/arm920t/s3c24x0/speed.c (renamed from cpu/arm920t/s3c24x0_speed.c)0
-rw-r--r--cpu/arm920t/s3c24x0/usb_ohci.c (renamed from cpu/arm920t/usb_ohci.c)0
-rw-r--r--cpu/arm920t/s3c24x0/usb_ohci.h (renamed from cpu/arm920t/usb_ohci.h)0
-rw-r--r--doc/README.ARM-SoC31
-rw-r--r--drivers/Makefile4
-rw-r--r--mkconfig14
20 files changed, 150 insertions, 21 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 82b473f..702a1c7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,13 @@
Changes since U-Boot 1.1.1:
======================================================================
+* Patch by Steven Scholz, 16 Aug 2004:
+ - Introducing the concept of SoCs "./cpu/$(CPU)/$(SOC)"
+ - creating subdirs for SoCs ./cpu/arm920t/imx and ./cpu/arm920t/s3c24x0
+ - moving SoC specific code out of cpu/arm920t/ into cpu/arm920t/$(SOC)/
+ - moving drivers/s3c24x0_i2c.c and drivers/serial_imx.c out of drivers/
+ into cpu/arm920t/$(SOC)/
+
* Patches by Sean Chang, 09 Aug 2004:
- Added support for both 8 and 16 bit mode access to System ACE CF
through MPU.
diff --git a/Makefile b/Makefile
index 461fd82..8c3ff7e 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ export TOPDIR
ifeq (include/config.mk,$(wildcard include/config.mk))
# load ARCH, BOARD, and CPU configuration
include include/config.mk
-export ARCH CPU BOARD VENDOR
+export ARCH CPU BOARD VENDOR SOC
# load other configuration
include $(TOPDIR)/config.mk
@@ -101,6 +101,9 @@ endif
LIBS = lib_generic/libgeneric.a
LIBS += board/$(BOARDDIR)/lib$(BOARD).a
LIBS += cpu/$(CPU)/lib$(CPU).a
+ifdef SOC
+LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
+endif
LIBS += lib_$(ARCH)/lib$(ARCH).a
LIBS += fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a \
fs/reiserfs/libreiserfs.a
@@ -1175,10 +1178,10 @@ lpd7a404_config: unconfig
@./mkconfig $(@:_config=) arm lh7a40x lpd7a40x
mx1ads_config : unconfig
- @./mkconfig $(@:_config=) arm arm920t mx1ads
+ @./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx
mx1fs2_config : unconfig
- @./mkconfig $(@:_config=) arm arm920t mx1fs2
+ @./mkconfig $(@:_config=) arm arm920t mx1fs2 NULL imx
omap1510inn_config : unconfig
@./mkconfig $(@:_config=) arm arm925t omap1510inn
@@ -1219,13 +1222,13 @@ omap730p2_cs3boot_config : unconfig
@./mkconfig -a $(call xtract_omap730p2,$@) arm arm926ejs omap730p2
scb9328_config : unconfig
- @./mkconfig $(@:_config=) arm arm920t scb9328
+ @./mkconfig $(@:_config=) arm arm920t scb9328 NULL imx
smdk2400_config : unconfig
- @./mkconfig $(@:_config=) arm arm920t smdk2400
+ @./mkconfig $(@:_config=) arm arm920t smdk2400 NULL s3c24x0
smdk2410_config : unconfig
- @./mkconfig $(@:_config=) arm arm920t smdk2410
+ @./mkconfig $(@:_config=) arm arm920t smdk2410 NULL s3c24x0
SX1_config : unconfig
@./mkconfig $(@:_config=) arm arm925t sx1
@@ -1253,10 +1256,10 @@ trab_old_config: unconfig
echo "... with 8 MB Flash, 16 MB RAM" ; \
echo "TEXT_BASE = 0x0CF40000" >board/trab/config.tmp ; \
}
- @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab
+ @./mkconfig -a $(call xtract_trab,$@) arm arm920t trab NULL s3c24x0
VCMA9_config : unconfig
- @./mkconfig $(@:_config=) arm arm920t vcma9 mpl
+ @./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0
versatile_config : unconfig
@./mkconfig $(@:_config=) arm arm926ejs versatile
diff --git a/README b/README
index 4485b51..43539a9 100644
--- a/README
+++ b/README
@@ -125,6 +125,8 @@ Directory Hierarchy:
- 74xx_7xx Files specific to Motorola MPC74xx and 7xx CPUs
- arm720t Files specific to ARM 720 CPUs
- arm920t Files specific to ARM 920 CPUs
+ - imx Files specific to Motorola MC9328 i.MX CPUs
+ - s3c24x0 Files specific to Samsung S3C24X0 CPUs
- arm925t Files specific to ARM 925 CPUs
- arm926ejs Files specific to ARM 926 CPUs
- at91rm9200 Files specific to Atmel AT91RM9200 CPUs
diff --git a/config.mk b/config.mk
index 2182391..75bbac5 100644
--- a/config.mk
+++ b/config.mk
@@ -59,6 +59,9 @@ endif
ifdef CPU
sinclude $(TOPDIR)/cpu/$(CPU)/config.mk # include CPU specific rules
endif
+ifdef SOC
+sinclude $(TOPDIR)/cpu/$(CPU)/$(SOC)/config.mk # include SoC specific rules
+endif
ifdef VENDOR
BOARDDIR = $(VENDOR)/$(BOARD)
else
diff --git a/cpu/arm920t/Makefile b/cpu/arm920t/Makefile
index 68a33d6..8f256e9 100644
--- a/cpu/arm920t/Makefile
+++ b/cpu/arm920t/Makefile
@@ -26,11 +26,7 @@ include $(TOPDIR)/config.mk
LIB = lib$(CPU).a
START = start.o
-OBJS = cpu.o \
- imx_generic.o imx_interrupts.o imx_speed.o \
- interrupts.o \
- s3c24x0_interrupts.o s3c24x0_serial.o s3c24x0_speed.o \
- usb_ohci.o
+OBJS = cpu.o interrupts.o
all: .depend $(START) $(LIB)
diff --git a/cpu/arm920t/imx/Makefile b/cpu/arm920t/imx/Makefile
new file mode 100644
index 0000000..8865f82
--- /dev/null
+++ b/cpu/arm920t/imx/Makefile
@@ -0,0 +1,42 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# 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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = lib$(SOC).a
+
+OBJS = generic.o interrupts.o serial.o speed.o
+
+all: .depend $(LIB)
+
+$(LIB): $(OBJS)
+ $(AR) crv $@ $(OBJS)
+
+#########################################################################
+
+.depend: Makefile $(OBJS:.o=.c)
+ $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
+
+sinclude .depend
+
+#########################################################################
diff --git a/cpu/arm920t/imx_generic.c b/cpu/arm920t/imx/generic.c
index aa7c8c1..aa7c8c1 100644
--- a/cpu/arm920t/imx_generic.c
+++ b/cpu/arm920t/imx/generic.c
diff --git a/cpu/arm920t/imx_interrupts.c b/cpu/arm920t/imx/interrupts.c
index 12ae2fa..12ae2fa 100644
--- a/cpu/arm920t/imx_interrupts.c
+++ b/cpu/arm920t/imx/interrupts.c
diff --git a/drivers/serial_imx.c b/cpu/arm920t/imx/serial.c
index 9dbaa56..9dbaa56 100644
--- a/drivers/serial_imx.c
+++ b/cpu/arm920t/imx/serial.c
diff --git a/cpu/arm920t/imx_speed.c b/cpu/arm920t/imx/speed.c
index 1e29698..1e29698 100644
--- a/cpu/arm920t/imx_speed.c
+++ b/cpu/arm920t/imx/speed.c
diff --git a/cpu/arm920t/s3c24x0/Makefile b/cpu/arm920t/s3c24x0/Makefile
new file mode 100644
index 0000000..af9e4ef
--- /dev/null
+++ b/cpu/arm920t/s3c24x0/Makefile
@@ -0,0 +1,43 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+#
+# 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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB = lib$(SOC).a
+
+OBJS = i2c.o interrupts.o serial.o speed.o \
+ usb_ohci.o
+
+all: .depend $(LIB)
+
+$(LIB): $(OBJS)
+ $(AR) crv $@ $(OBJS)
+
+#########################################################################
+
+.depend: Makefile $(OBJS:.o=.c)
+ $(CC) -M $(CFLAGS) $(OBJS:.o=.c) > $@
+
+sinclude .depend
+
+#########################################################################
diff --git a/drivers/s3c24x0_i2c.c b/cpu/arm920t/s3c24x0/i2c.c
index ef56cd1..ef56cd1 100644
--- a/drivers/s3c24x0_i2c.c
+++ b/cpu/arm920t/s3c24x0/i2c.c
diff --git a/cpu/arm920t/s3c24x0_interrupts.c b/cpu/arm920t/s3c24x0/interrupts.c
index 92298b0..92298b0 100644
--- a/cpu/arm920t/s3c24x0_interrupts.c
+++ b/cpu/arm920t/s3c24x0/interrupts.c
diff --git a/cpu/arm920t/s3c24x0_serial.c b/cpu/arm920t/s3c24x0/serial.c
index 8327443..8327443 100644
--- a/cpu/arm920t/s3c24x0_serial.c
+++ b/cpu/arm920t/s3c24x0/serial.c
diff --git a/cpu/arm920t/s3c24x0_speed.c b/cpu/arm920t/s3c24x0/speed.c
index e0dca62..e0dca62 100644
--- a/cpu/arm920t/s3c24x0_speed.c
+++ b/cpu/arm920t/s3c24x0/speed.c
diff --git a/cpu/arm920t/usb_ohci.c b/cpu/arm920t/s3c24x0/usb_ohci.c
index 6f4a9f7..6f4a9f7 100644
--- a/cpu/arm920t/usb_ohci.c
+++ b/cpu/arm920t/s3c24x0/usb_ohci.c
diff --git a/cpu/arm920t/usb_ohci.h b/cpu/arm920t/s3c24x0/usb_ohci.h
index fab0e65..fab0e65 100644
--- a/cpu/arm920t/usb_ohci.h
+++ b/cpu/arm920t/s3c24x0/usb_ohci.h
diff --git a/doc/README.ARM-SoC b/doc/README.ARM-SoC
new file mode 100644
index 0000000..0f2677f
--- /dev/null
+++ b/doc/README.ARM-SoC
@@ -0,0 +1,31 @@
+[By Steven Scholz <steven.scholz@imc-berlin.de>, 16 Aug 2004]
+
+Since the cpu/ directory gets clobbered with peripheral driver code I
+started cleaning up cpu/arm920t.
+
+I introduced the concept of Soc (system on a chip) into the ./cpu
+directory. That means that code that is cpu (i.e. core) specific
+resides in
+
+ cpu/$(CPU)/
+
+and code that is specific to some SoC (i.e. vendor specific
+peripherals around the core) is moved into
+
+ cpu/$(CPU)/$(SOC)/
+
+Thus a library/archive "cpu/$(CPU)/$(SOC)/lib$(SOC).a" will be build
+and linked. Examples will be
+
+ cpu/arm920t/imx/
+ cpu/arm920t/s3c24x0
+
+One can select an SoC by passing the name of it to ./mkconfig just
+like
+
+ @./mkconfig $(@:_config=) arm arm920t vcma9 mpl s3c24x0
+
+If there's no VENDOR field (like "mpl" in the above line) one has to
+pass NULL instead:
+
+ @./mkconfig $(@:_config=) arm arm920t mx1ads NULL imx
diff --git a/drivers/Makefile b/drivers/Makefile
index 5f22158..8b73d66 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -38,9 +38,9 @@ OBJS = 3c589.o 5701rls.o ali512x.o \
pcnet.o plb2800_eth.o \
ps2ser.o ps2mult.o pc_keyb.o \
rtl8019.o rtl8139.o rtl8169.o \
- s3c24x0_i2c.o s3c4510b_eth.o s3c4510b_uart.o \
+ s3c4510b_eth.o s3c4510b_uart.o \
sed13806.o sed156x.o \
- serial.o serial_imx.o serial_max3100.o \
+ serial.o serial_max3100.o \
serial_pl010.o serial_pl011.o serial_xuartlite.o \
sl811_usb.o smc91111.o smiLynxEM.o status_led.o sym53c8xx.o \
ti_pci1410a.o tigon3.o \
diff --git a/mkconfig b/mkconfig
index 106bd89..266addd 100644
--- a/mkconfig
+++ b/mkconfig
@@ -3,7 +3,7 @@
# Script to create header files and links to configure
# U-Boot for a specific board.
#
-# Parameters: Target Architecture CPU Board
+# Parameters: Target Architecture CPU Board [VENDOR] [SOC]
#
# (C) 2002 DENX Software Engineering, Wolfgang Denk <wd@denx.de>
#
@@ -19,7 +19,7 @@ while [ $# -gt 0 ] ; do
done
[ $# -lt 4 ] && exit 1
-[ $# -gt 5 ] && exit 1
+[ $# -gt 6 ] && exit 1
echo "Configuring for $1 board..."
@@ -41,11 +41,13 @@ fi
#
# Create include file for Make
#
-echo "ARCH = $2" > config.mk
-echo "CPU = $3" >> config.mk
-echo "BOARD = $4" >> config.mk
+echo "ARCH = $2" > config.mk
+echo "CPU = $3" >> config.mk
+echo "BOARD = $4" >> config.mk
-[ "$5" ] && echo "VENDOR = $5" >> config.mk
+[ "$5" ] && [ "$5" != "NULL" ] && echo "VENDOR = $5" >> config.mk
+
+[ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk
#
# Create board specific header file