Compare commits

...

153 Commits

Author SHA1 Message Date
Wolfgang Denk
180a90abda Release v1.3.3
Update CHANGELOG for release.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-19 12:47:11 +02:00
Wolfgang Denk
a734c06bf7 Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx 2008-05-19 09:42:38 +02:00
Stefan Roese
16bedc661d ppc4xx: Canyonlands: Disable PCIe0/SATA in dev-tree depending on selection
When SATA is selected (via jumper J6) we need to disable the first PCIe
node in the device tree, so that Linux doesn't initialize it. Otherwise
the Linux SATA driver will fail to detect the devices.

The same goes the other way around too. So if PCIe is selected we need
to disable the SATA node in the device tree.

This is because PCIe port 0 and SATA on 460EX share the same pins
(multiplexed) and we have to configure in U-Boot which peripheral is
enabled.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-19 07:14:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD
3cc27b426a i386: Fix multiple definitions of __show_boot_progress
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-19 00:59:20 +02:00
Jean-Christophe PLAGNIOL-VILLARD
311f344693 sc530_spunk: add missing SOBJS entry
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-19 00:57:39 +02:00
Jean-Christophe PLAGNIOL-VILLARD
a559317143 sc520_spunk: Fix flash
flash.c:593: warning: dereferencing type-punned pointer will break strict-aliasing rules
flash.c:398: error: label at end of compound statement

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-19 00:56:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD
91f221317a drivers/pcmcia: add missing i82365
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-19 00:40:08 +02:00
Jean-Christophe PLAGNIOL-VILLARD
dd22394413 i386/bootm: remove unused var
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-19 00:37:26 +02:00
Jean-Christophe PLAGNIOL-VILLARD
a9da341df1 example/gitignore: update with all generated examples
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-19 00:29:35 +02:00
Wolfgang Denk
a38dc3ea86 TQM8272: fix out-of-tree building
...and add to MAKEALL script

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-15 00:42:45 +02:00
Wolfgang Denk
4f805c1e3a environment: fix bug introduced by commit a8409f4f1a
env_get_char is not a function, but a pointer to one.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-14 23:36:10 +02:00
Wolfgang Denk
35fca4c44d Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx 2008-05-14 14:05:49 +02:00
Wolfgang Denk
cda2a4a996 Fix config files for out-of-tree building
Several board/<...>/config.mk files include dynamically built (by
the Makefile) config files but used the wrong file name of
	$(TOPDIR)/board/$(BOARDDIR)/config.tmp
instead if the correct
	$(OBJTREE)/board/$(BOARDDIR)/config.tmp

The bug is nasty because the build result is correct for the (normal)
in-tree builds, and because 'sinclude' is used no errors get raised
even for out-of-tree build tests. But out-of-tree builds use an
incomplete and thus usually incorrect configuration...

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-14 14:02:14 +02:00
Stefan Roese
2dd7082e06 ppc4xx: Fix bogus Canyonlands config.mk
This patch fixes the canyonlands config.mk file to enable correct
out-of-tree builds. Thanks to Wolfgang Denk for spotting this.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-14 13:40:03 +02:00
Stefan Roese
fdd1247a66 ppc4xx: Individual handling of ddr2_fixed.c for canyonlands_nand build
Canyonlands has a file ddr2_fixed.c which needs special treatment when
building in separate directory. It has to be linked to build directory
otherwise it is not seen.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-14 12:26:16 +02:00
Wolfgang Denk
a8409f4f1a environment: cleanup prototype declarations of env functions.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-14 12:22:49 +02:00
Wolfgang Denk
cf39b07948 linkstation_HGLAN: Fix out of tree building.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-14 12:21:48 +02:00
Stefan Roese
085551c05c ppc4xx: Individual handling of ddr2_fixed.c for canyonlands_nand build
Canyonlands has a file ddr2_fixed.c which needs special treatment when
building in separate directory. It has to be linked to build directory
otherwise it is not seen.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-14 10:32:32 +02:00
Wolfgang Denk
1510b82d50 Makefile: fix "error: version_autogenerated.h: No such file or directory"
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-13 23:15:52 +02:00
Stefan Roese
70fab1908f ppc4xx: Add 405EX(r) revision C PVR definitions and detection code
Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-13 20:22:01 +02:00
Wolfgang Denk
65dcfa7920 Revert "pci: Add CONFIG_PCI_SKIP_HOST_BRIDGE config option"
This reverts commit 55774b512f
which broke many PowerPC boards.
2008-05-12 01:11:21 +02:00
Wolfgang Denk
5ddd67efa5 Merge branch 'master' of /home/wd/git/u-boot/custodians 2008-05-12 01:02:40 +02:00
Wolfgang Denk
ee0cfa7080 Revert "Avoid initrd and logbuffer area overlaps"
This reverts commit 1b5605ca57
which breaks building on all PPC boards that don't use a log buffer.
2008-05-12 00:56:28 +02:00
Nick Spence
02b9b22446 Fix offset calculation for multi-type legacy images.
Calculation of tail was incorrect when size % 4 == 0.

New code removes the conditional and does the same thing but with arithmetic

Signed-off-by: Nick Spence <nick.spence@freescale.com>
2008-05-12 00:44:24 +02:00
Wolfgang Denk
c9dca3c3f3 Revert "Change env_get_char from a global function ptr to a function."
This reverts commit c0559be371
which is known to break booting from dataflash and NAND.
2008-05-12 00:40:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD
20e5ed1374 API: remove duplicate syscall check
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-12 00:23:58 +02:00
Markus Klotzbücher
79dd171268 ppc4xx: Kilauea: Add CONFIG_BOOTP_SUBNETMASK to Kilauea board config
When using dhcp/bootp the "netmask" environment variable is not set
because CONFIG_BOOTP_SUBNETMASK is not defined. But usually this is
desireable, so the following patch adds this this option to the board
config.

Signed-off-by: Markus Klotzbuecher <mk@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-10 10:37:37 +02:00
Stefan Roese
869d14b4cc ppc4xx: Update Makalu defconfig to use device-tree booting as default
This patch reworks the default environment on Makalu. Now "net_nfs" for
example uses the device-tree style booting formerly know as "net_nfs_fdt".
Also the addresses in RAM were changed because of the new image booting
support, which check for image overwriting. So the addresses needed to
get adjusted.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-10 10:30:36 +02:00
Becky Bruce
f3612a7b19 PPC: fix map_physmem build warning
map_physmem currently generates a warning when CONFIG_PHYS_64BIT is
enabled.  This quiets the warning.

Signed-off-by: Becky Bruce <Becky.Bruce@freescale.com>
2008-05-10 01:00:37 +02:00
Becky Bruce
36f32675f4 Update pci code to use phys_addr_t
Physical addrs need to be represented by phys_addr_t, not
unsigned long.  Otherwise, systems that use CONFIG_PHYS_64BIT
are going to fail mightily.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
2008-05-10 00:59:57 +02:00
Nick Spence
91a616741f Support legacy multi-type images without FDT section.
This patch enables legacy multi-type images containing only a Linux kernel
and root file system to be loaded, maintaining compatibility with previous
versions of u-boot.

This is required when using old image files such as a Linux 2.4 kernel /
filesystem.

Signed-off-by: Nick Spence <nick.spence@freescale.com>
Acked-by: Bartlomiej Sieka <tur@semihalf.com>
2008-05-10 00:38:55 +02:00
Wolfgang Denk
881031d973 Update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-10 00:38:02 +02:00
Wolfgang Denk
e5e9d6c9c0 post/cpu/ppc4xx/Makefile: line length cleanup
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-10 00:36:09 +02:00
Wolfgang Denk
cfd60441d8 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc83xx 2008-05-10 00:34:05 +02:00
Stelian Pop
cce9cfdabc Fix @ -> <at> substitution
When applying the AT91CAP9 patches upstream, something transformed
the '@' character into the ' <at> ' sequence.

The patch below restores the original form in all the places where
it has been modified (the AT91CAP9 files, the AT91SAM9260 files which
were copied from AT91CAP9, and a couple of other files where the
' <at> ' sequence was present).

Signed-off-by: Stelian Pop <stelian@popies.net>
2008-05-10 00:30:22 +02:00
Stelian Pop
9606b3c81b Update origin and copyright information in arch-at91sam9 header files
When doing the AT91CAP9/AT91SAM9 port, a number of header files were
copied from the Linux kernel sources. This patch explicitly specifies
this origin for all the copied headers, and for those missing copyright
information, adds it.

Additionaly, the header file 'at91sam926x_mc.h' has been superceeded
in the latest kernel sources by 'at91sam9_smc.h'.

The copyright information has been confirmed by the AT91 Linux kernel
maintainer, Andrew Victor <avictor.za@gmail.com>.

Signed-off-by: Stelian Pop <stelian@popies.net>
2008-05-10 00:28:51 +02:00
Stelian Pop
ceb6b4fbe1 Add copyright information in Atmel boards partition.c
When Ulf did the dataflash.c cleanup, he didn't add his copyright on
the new created files. This patch fixes the problem.

Signed-off-by: Stelian Pop <stelian@popies.net>
2008-05-10 00:24:02 +02:00
Guennadi Liakhovetski
2ab02fd456 mx31ads: fix 32kHz clock handling
According to schematics and to RedBoot sources, the MX31ADS uses a 32768Hz
oscillator as a SKIL source. Fix previously wrongly assumed 32000Hz value.
Also fix a typo when verifying a jumper configuration. While at it, make
two needlessly global functions static.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
2008-05-10 00:21:43 +02:00
Wolfgang Denk
f3f3175746 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx 2008-05-10 00:18:22 +02:00
Marian Balakowicz
1b5605ca57 Avoid initrd and logbuffer area overlaps
Add logbuffer to reserved LMB areas to prevent initrd allocation
from overlaping with it.

Make sure to use correct logbuffer base address.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-05-10 00:16:13 +02:00
Marian Balakowicz
c59518e159 ppc: Cleanup get_effective_memsize() use
Removed duplicated effective memory size calculation code.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-05-10 00:14:33 +02:00
Marian Balakowicz
273c37d843 Fix build errors when CONFIG_LOGBUFFER and CONFIG_FIT are enabled
Recent modifcations to LOGBUFFER handling code were incorrecly
introduced to fit_check_kernel() routine during
"Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing",
commit 27f33e9f45.

This patch cleans up this merge issue.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-05-10 00:11:25 +02:00
Grant Erickson
bc11756daf Propagate Error Status to the Shell on fw_printenv Errors
Changed implementation such that fw_printenv returns failure status
when one or more specified variables do not exist or when incorrect
command syntax is used.

This aids scripting fw_printenv such that the script can key of the
return status rather than relying on standard error "scraping".

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-09 23:40:40 +02:00
Grant Erickson
f3b6d528e4 Fix Compilation Errors with 'tools/env/fw_printenv'
In the current top-of-tree, 1.3.3.-rc2, the optional tool
'tools/env/fw_printenv' fails to compile for two reasons:

1) The header watchdog.h cannot be found.
2) The header zlib.h is picked up from the tool chain rather than the
   project causing a prototype conflict for crc32.

This patch addresses both of these issues.

Platforms Tested On:
- AMCC "Kilauea"

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
2008-05-09 23:04:41 +02:00
Wolfgang Denk
7ea8325b41 Merge branch 'master' of git://www.denx.de/git/u-boot-mips 2008-05-09 22:19:29 +02:00
Wolfgang Denk
4604f552a9 Merge branch 'master' of /home/wd/git/u-boot/master/ 2008-05-09 22:19:16 +02:00
Wolfgang Denk
356cd17cc2 Merge branch 'master' of /home/wd/git/u-boot/master/ 2008-05-09 22:18:58 +02:00
James Yang
597f6c26a1 Fix readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating
When CONFIG_CMDLINE_EDITING is enabled, readline_into_buffer() doesn't
work before relocating to RAM because command history is written into
a global array that is not writable before relocation.  This patch
defers to the no-editing and no-history code in readline_into_buffer()
if it is called before relocation.

Signed-off-by: James Yang <James.Yang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-05-09 22:18:15 +02:00
Detlev Zundel
726c0f1e5f cosmetic: Adjust coding style for switch statements to be consistent
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-05-09 21:26:38 +02:00
Detlev Zundel
574b319512 Fix disk type output in disk/part.c
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-05-09 21:26:34 +02:00
Vlad Lungu
045b4d2d71 Mail address change, documentation modified
Signed-off-by: Vlad Lungu <vlad.lungu@windrvier.com>
2008-05-09 21:13:26 +02:00
Michal Simek
4d49b28038 microblaze: Repare intc handling
Signed-off-by: Michal Simek <monstr@monstr.eu>
2008-05-09 21:11:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD
878b3b1e19 include/gitignore: update to all architectures
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-09 20:59:21 +02:00
Marcel Ziswiler
1df368aed3 ide: Remove spurious second include of io.h
Removed the second include, with all the #ifdef around as suggested by Wolfgang.

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2008-05-09 20:55:57 +02:00
Adrian Filipi
8fbc985bda Fix some typos
This patch fixes three typos.
The first is a repetition of CONFIG_CMD_BSP.
The second makes the #endif comment match its #if.
The third is a spelling error.

Signed-off-by: Adrian Filipi <adrian.filipi@eurotech.com>
2008-05-09 20:53:52 +02:00
Grant Erickson
e419e12d04 Recognize 'powerpc' As an Alias for IH_ARCH_PPC
Add support for the recognition of 'powerpc' as an alias for the PowerPC
architecture type since Linux is already trending in that direction,
preferring 'powerpc' to 'ppc'.

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
2008-05-09 20:48:16 +02:00
Wheatley Travis
f5a2425919 7450 and 86xx L2 cache invalidate bug corrections
The 7610 and related parts have an L2IP bit in the L2CR that is
monitored to signal when the L2 cache invalidate is complete whereas the
7450 and related parts utilize L2I for this purpose. However, the
current code does not account for this difference. Additionally the 86xx
L2 cache invalidate code used an "andi" instruction where an "andis"
instruction should have been used.

This patch addresses both of these bugs.

Signed-off-by: Travis Wheatley <travis.wheatley@freescale.com>
Acked-By: Jon Loeliger <jdl@freescale.com>
2008-05-09 20:46:48 +02:00
Wolfgang Denk
4d31cdc45d Avoid infinite loop "Generating include/autoconf.mk"
Fix a bogus circular dependency that caused an infinite loop of
"Generating include/autoconf.mk" again and again.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-09 10:16:13 +02:00
Stefan Roese
ef2642625c ppc4xx: Kilauea: Fix incorrect FPGA FIFO address
Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-08 11:10:46 +02:00
Stefan Roese
a00eccfebc ppc4xx: Add fdt support to all remaining AMCC PPC4xx eval boards
This patch adds fdt (flattened device tree) support to all remaining AMCC
eval boards. Most newer boards already support device tree. With this patch,
all AMCC boards now enable device tree passing from U-Boot to Linux
arch/powerpc kernels.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-08 11:05:15 +02:00
Stefan Roese
cb5d88b961 ppc4xx: Add weak default ft_board_setup() routine
This patch adds a default ft_board_setup() routine to the 4xx fdt code.
This routine is defined as weak and can be overwritten by a board specific
one if needed.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-08 11:01:09 +02:00
Stefan Roese
d1c1ba85c7 ppc4xx: acadia: Add fdt support and fix section overlap problem
This patch adds fdt (flattened device tree) support to the AMCC
Acadia eval board. This increases the image size and it doesn't
fit anymore into 256kByte. Since we didn't want to remove features
from the configuration, we decided to increase the U-Boot image size
(add one flash sector).

Also changed the default environment definition to make it
independent of such changes.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-08 10:48:58 +02:00
Ira Snyder
4adb3023de ppc4xx: Add device tree support to AMCC Yosemite
Add support for booting with a device tree blob. This is needed to boot
ARCH=powerpc kernels. Also add support for setting the eth0 mac address
via the ethaddr variable.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-08 07:06:05 +02:00
Dave Mitchell
b9bbefce1a ppc4xx: Fix typos in 460GT/EX FBDV array
Corrected two typos in the 460GT/EX FBDV array.

Signed-off-by: Dave Mitchell <dmitchell@amcc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-08 07:01:41 +02:00
Andy Fleming
66f5fa9263 85xx: Limit CPU2 workaround to parts that have the errata
Signed-off-by: Ebony Zhu <ebony.zhu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2008-05-07 16:54:31 -05:00
Lee Nipper
a5fe514e8a mpc83xx: system performance settings for MPC8349EMDS.
These same settings are used on MPC8349ITX, and
improve performance on MPC8349EMDS.

Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-05-06 13:22:25 -05:00
Shinya Kuribayashi
49387dba91 [MIPS] cpu/mips/cache.S: Fix build warning
Some old GNU assemblers, such as v2.14 (ELDK 3.1.1), v2.16 (ELDK 4.1.0),
warns illegal global symbol references by bal (and jal also) instruction.
This does not happen with the latest binutils v2.18.

Here's an example on gth2_config:

mips_4KC-gcc  -D__ASSEMBLY__ -g  -Os   -D__KERNEL__ -DTEXT_BASE=0x90000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isy
stem /opt/eldk311/usr/bin/../lib/gcc-lib/mips-linux/3.3.3/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4k
c -EB -c -o cache.o cache.S
cache.S: Assembler messages:
cache.S:243: Warning: Pretending global symbol used as branch target is local.
cache.S:250: Warning: Pretending global symbol used as branch target is local.

In principle, gas might be sensitive to global symbol references in PIC
code because they should be processed through GOT (global offset table).
But if `bal' instruction is used, it results in PC-based offset jump.
This is the cause of this warning.

In practice, we know it doesn't matter whether PC-based reference or GOT-
based. As for this case, both will work before/after relocation. But let's
fix the code.

This patch explicitly sets up a target address, then jump there.
Here's an example of disassembled code with/without this patch.

 90000668:       1485ffef        bne     a0,a1,90000628 <mips_cache_reset+0x20>
 9000066c:       ac80fffc        sw      zero,-4(a0)
 90000670:       01402821        move    a1,t2
-90000674:       0411ffba        bal     90000560 <mips_init_icache>
-90000678:       01803021        move    a2,t4
-9000067c:       01602821        move    a1,t3
-90000680:       0411ffcc        bal     900005b4 <mips_init_dcache>
-90000684:       01a03021        move    a2,t5
-90000688:       03000008        jr      t8
-9000068c:       00000000        nop
+90000674:       01803021        move    a2,t4
+90000678:       8f8f83ec        lw      t7,-31764(gp)
+9000067c:       01e0f809        jalr    t7
+90000680:       00000000        nop
+90000684:       01602821        move    a1,t3
+90000688:       01a03021        move    a2,t5
+9000068c:       8f8f81e0        lw      t7,-32288(gp)
+90000690:       01e0f809        jalr    t7
+90000694:       00000000        nop
+90000698:       03000008        jr      t8
+9000069c:       00000000        nop

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-05-06 13:22:52 +09:00
Wolfgang Denk
908261f3fd Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master 2008-05-05 13:25:04 +02:00
Vlad Lungu
0f8c62a14b Allow building mips versions with ELDK 3.1.1
.gpword works only with local symbols on certain binutils versions

Signed-off-by: Vlad Lungu <vlad.lungu@windrvier.com>
2008-05-05 13:24:12 +02:00
Wolfgang Denk
12a67a9e51 MAKEALL: add inka4x0 board
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-05 12:52:36 +02:00
Wolfgang Denk
b83dcc13ae kb9202 board: fix build problem.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-04 21:34:23 +02:00
Wolfgang Denk
6adf61dc4c Prepare for v1.3.3-rc3
Update ChNAGELOG, minor white space cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-04 12:10:33 +02:00
Wolfgang Denk
fb98f94fcb Merge branch 'master' of /home/wd/git/u-boot/master/ 2008-05-04 01:03:30 +02:00
Wolfgang Denk
7c0773fde6 drivers/net/tsec.c: Fix typo.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-04 00:35:15 +02:00
Mike Frysinger
aa737945e6 version_autogenerated.h: use printf rather than echo -n
Some systems are dumb and do not implement the -n flag to echo (like OS X).
Convert the Makefile to use printf as this should work everywhere.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-04 00:28:37 +02:00
Mike Frysinger
4acc2a108a fix building when saveenv is disabled in some setups
If you enable environment in the flash, but disable the embedded
option, and you disable the saveenv command, then the #if nested
logic will trigger a compile failure:
env_flash.c: In function 'env_relocate_spec':
env_flash.c:399: error: 'flash_addr' undeclared (first use in this function)
The fix is to add CMD_SAVEENV ifdef protection like everywhere else.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-05-04 00:22:45 +02:00
Jeremy McNicoll
ccf1ad535a SBC8548: fix address mask to allow 64M flash
Fix incorrect mask to enable all 64MB of onboard flash.
Previously U-Boot incorrectly mapped only 8MB of flash, this
patch correctly maps all the available flash.

Signed-off-by: Jeremy McNicoll <jeremy.mcnicoll@windriver.com>
2008-05-04 00:18:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD
3648085c46 qemu_mips: add README
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-04 00:18:15 +02:00
Wolfgang Denk
4a89b766bf Merge branch 'master' of git://www.denx.de/git/u-boot-mips 2008-05-04 00:02:29 +02:00
Marcel Ziswiler
6fdd002689 Fix misspelled comment
Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2008-05-04 00:01:08 +02:00
Mike Frysinger
fa956fde60 mkimage: make mmap() checks consistent
The mmap() related code is full of inconsistent casts/constants when
it comes to error checking, and may break when building on some
systems (like ones that do not implicitly define the caddr_t type).
Let's just avoid the whole mess by writing the code nice and clean in
the first place.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-05-03 23:33:43 +02:00
Marcel Ziswiler
8e90cd0447 Fix defined but not used build warning
- warning: 'srom' defined but not used

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2008-05-03 23:32:17 +02:00
Marcel Ziswiler
b71190f325 Fix implicit declaration build warnings
- warning: implicit declaration of function ‘serial_initialize’

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2008-05-03 23:30:21 +02:00
Andre Schwarz
9acde129cc TSEC: add config options for VSC8601 RGMII PHY
The Vitesse VSC8601 RGMII PHY has internal delay for both Rx
and Tx clock lines. They are configured using 2 bits in extended
register 0x17.
Therefore CFG_VSC8601_SKEW_TX and CFG_VSC8601_SKEW_RX have
been introduced with valid values 0-3 giving 0.0, 1.4,1.7 and 2.0ns delay.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Acked-by: Andy Fleming <afleming@freescale.com>
Acked-by: Ben Warren <biggerbadderben@gmail.com>
--

 drivers/net/tsec.c |    6 ++++++
 drivers/net/tsec.h |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)
2008-05-03 23:27:04 +02:00
Wolfgang Denk
bd98ee60df Revert "ColdFire: Get information from the correct GCC"
This reverts commit b7166e05a5
(replaced by commit c4e5f52a58).
2008-05-03 23:07:15 +02:00
Wolfgang Denk
c4e5f52a58 config.mk: use correct (cross) compiler
Some config.mk files reference $(CC) to test for specific tool chain
features, so make sure $(CC) gets set before including any such
config files.

This patch replaces commit b7166e05a5 ("ColdFire: Get information from
the correct GCC").

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-03 23:06:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD
27c38689d0 pxa: fix previous definition on cpu init
start.S:183:1: warning: "ICMR" redefined
In file included from start.S:33:
include/asm/arch/pxa-regs.h:935:1: warning: this is the location of the previous definition
start.S:187:1: warning: "RCSR" redefined
...

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-03 20:56:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD
6d12e697de pxa: fix pcmcia operation on 'i' may be undefined
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-03 20:53:12 +02:00
Kumar Gala
4d77f5102d MPC8610HPCD: Drop -O2 from the build flags
Make the flags use -Os like all other boards

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-05-03 20:49:10 +02:00
Wolfgang Denk
56bb37e4b9 Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx 2008-05-03 20:46:40 +02:00
Stefan Roese
0072b78be2 RTC: Fix month offset by one problem in M41T62 RTC driver
This patch fixes a problem with the month being read and written
incorrectly (offset by one). This only gets visible by also using
the Linux driver (rtc-m41t80).

Tested on AMCC Canyonlands.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-05-03 20:44:54 +02:00
Shinya Kuribayashi
141ba1cad8 [MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker
Current trick to pick up GNU assembler minor version uses a dot(.) as a
delimiter, and take the second field to obtain minor version number. But
as can be expected, this doesn't work with a version string which has
dots more than needs.

Here's an example:

$ mips-linux-gnu-as --version | grep 'GNU assembler'
GNU assembler (Sourcery G++ Lite 4.2-129) 2.18.50.20080215
$ mips-linux-gnu-as --version | grep 'GNU assembler' | cut -d. -f2
2-129) 2
$

This patch restricts the version format to 2.XX.XX... This will work
in most cases.

$ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+'
2.18.50.20080215
$ mips-linux-gnu-as --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2
18
$

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-05-03 13:51:44 +09:00
Shinya Kuribayashi
ea638951ac [MIPS] cpu/mips/cache.S: Add dcache_enable
Recent bootelf command fixes (017e9b7925,
"allow ports to override bootelf behavior") requires ports to have this
function.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-03 13:51:28 +09:00
Wolfgang Denk
50f93d30da Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master 2008-05-01 21:39:34 +02:00
Wolfgang Denk
d2c6fbec43 onenand: rename 16 bit memory copy into memcpy_16() to avoid conflicts
Onenand needs a version of memcpy() which performs 16 bit accesses
only; make sure the name does not conflict with the standard
function.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-01 21:30:16 +02:00
Wolfgang Denk
fed4de0135 Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master 2008-04-30 23:04:51 +02:00
Jean-Christophe PLAGNIOL-VILLARD
12bc4e9425 cmd_nand: fix warning: str2long ncompatible pointer type
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-30 22:58:47 +02:00
Timur Tabi
1b9ed2574a Fix calculation of I2C clock for some 86xx chips
Some 86xx chips use CCB as the base clock for the I2C, and others used CCB/2.
There is no pattern that can be used to determine which chips use which
frequency, so the only way to determine is to look up the actual SOC
designation and use the right value for that SOC.

Signed-off-by: Timur Tabi <timur@freescale.com>
2008-04-30 22:52:35 +02:00
TsiChung Liew
f32f7fe7bd ColdFire: Fix ethernet hang issue for mcf547x_8x
The ethernet hang is caused by receiving buffer in DRAM is not
yet ready due to access cycles require longer time in DRAM.
Relocate DMA buffer descriptors from DRAM to internal SRAM.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-04-30 22:38:49 +02:00
TsiChung Liew
886d90176f ColdFire: Fix compilation issue caused by new changes in fsl_i2c.c
Signed-off-by: Luigi Comio Mantellini <luigi.mantellini@idf-hit.com>
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-04-30 22:37:36 +02:00
TsiChung Liew
b7166e05a5 ColdFire: Get information from the correct GCC
Signed-off-by: Kurt Mahan <kmahan@freescale.com>
Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2008-04-30 22:35:13 +02:00
dirk.behme@googlemail.com
378e7ec95d Fix warning in env_nand.c if compiled for DaVinci Schmoogie
Fix warnings

nv_nand.c: In function 'saveenv':
env_nand.c:200: warning: passing argument 3 of 'nand_write' from incompatible pointer type
env_nand.c: In function 'env_relocate_spec':
env_nand.c:275: warning: passing argument 3 of 'nand_read' from incompatible pointer type

if compiled for davinci_schmoogie_config.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Ack by: Sergey Kubushyn <ksi@koi8.net>
2008-04-30 22:34:42 +02:00
Anatolij Gustschin
33a4a70d48 Fix warnings while compiling net/net.c for MPC8610HPCD board
MPC8610HPCD board adds -O2 gcc option to PLATFORM_CPPFLAGS
causing overriding default -Os option. New gcc (ver. 4.2.2)
produces warnings while compiling net/net.c file with -O2
option. The patch is an attempt to fix this.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-04-30 22:32:07 +02:00
Sascha Laue
58b575e575 lwmon5: fix offset error in sysmon0 POST
Signed-off-by: Sascha Laue <sascha.laue@liebherr.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-30 22:25:15 +02:00
Sascha Laue
e7419b243a lwmon5: fix manual merge error in POST
Signed-off-by: Sascha Laue <sascha.laue@liebherr.com>
2008-04-30 21:54:32 +02:00
Wolfgang Denk
42ffcec3f9 cmd_nand.c: fix another 'incompatible pointer type' warning.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-30 17:46:26 +02:00
Wolfgang Denk
de109d9097 Makefile: fix parallel builds
This problem shows up with parallel builds only; it results in
somewhat cryptic error messages like

	$ JOBS=-j6 MAKEALL netstar
	Configuring for netstar board...
	arm-linux-ld: cannot find -lgeneric
	make[1]: *** [eeprom.srec] Error 1

A few boards (like netstar and voiceblue) need some libraries for
building; however, the board Makefile does not contain any such
dependencies which may cause problems with parallel builds. Adding
such dependencies is difficult as we would also have to provide build
rules, which already exist in the respective library Makefiles.

To solve this, we make sure that all libraries get built before the
board code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-30 17:25:07 +02:00
Stefan Roese
4f27098e5b ppc4xx: Adapt Canyonlands fixed DDR2 setup to new DIMM module
This patch changes the Canyonlands/Glacier fixed DDR2 controller setup
used for NAND booting to match the values needed for the new 512MB
DIMM modules shipped with the productions boards:

Crucial: CT6464AC667.8FB

Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-30 14:51:36 +02:00
Stefan Roese
ea9202a659 ppc4xx: Fix problem with DIMMs with 8 banks in 44x_spd_ddr2.c
This patch fixes a problem with DIMMs that have 8 banks. Now the
MCIF0_MBxCF register will be setup correctly for this setup too.

This was noticed with the 512MB DIMM on Canyonlands/Glacier.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-30 14:50:04 +02:00
Wolfgang Denk
7661729935 Prepare v1.3.3-rc2, again.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-29 23:41:06 +02:00
Wolfgang Denk
ca9351280f Merge branch 'master' of git://www.denx.de/git/u-boot-net 2008-04-29 23:39:42 +02:00
Wolfgang Denk
b7fcc4c139 Prepare v1.3.3-rc2
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-29 23:35:24 +02:00
Wolfgang Denk
f7b16a0a4d common/env_nand.c: fix one more incompatible pointer type issue
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-29 23:32:20 +02:00
Wolfgang Denk
ea6f66894f post/board/lwmon5/sysmon.c: fix manual merge error.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-29 21:33:08 +02:00
Kumar Gala
70a0f81412 85xx: Add -mno-spe to e500/85xx builds
Newer gcc's might be configured to enable autovectorization by default.
If we happen to build with one of those compilers we will get SPE
instructions in random code.

-mno-spe disables the compiler for automatically generating SPE
instructions without our knowledge.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-29 20:08:43 +02:00
Wolfgang Denk
8466647684 Merge branch 'master' of git://www.denx.de/git/u-boot-ppc4xx 2008-04-29 20:06:42 +02:00
Wolfgang Denk
3a427fd2ec Merge branch 'master' of git://www.denx.de/git/u-boot-mpc85xx 2008-04-29 20:04:56 +02:00
Kumar Gala
8ea08e5be6 Update .gitignore for zlib.h
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-29 20:02:51 +02:00
Kumar Gala
45239cf415 85xx/86xx: Rename ext_refrec to timing_cfg_3 to match docs
All the 85xx and 86xx UM describe the register as timing_cfg_3
not as ext_refrec.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-29 11:44:29 -05:00
Kumar Gala
ef7d30b143 85xx/86xx: Rename DDR init address and init extended address register
Rename init_addr and init_ext_addr to match the docs between
85xx and 86xx.  Both now use 'init_addr' and 'init_ext_addr'.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-29 11:42:05 -05:00
Kumar Gala
cf6cc01427 85xx: Additional fixes and cleanup of MP code
* adjust __spin_table alignment to match ePAPR v0.94 spec
* loop over all cpus when determing who is up.  This fixes an issue if
  the "boot cpu" isn't core0.  The "boot cpu" will already be in the
  cpu_up_mask so there is no harm
* Added some protection in the code to ensure proper behavior.  These
  changes are explicitly needed but don't hurt:
  - Added eieio to ensure the "hot word" of the table is written after
    all other table updates have occurred.
  - Added isync to ensure we don't prefetch loading of table entries
    until we a released

These issues we raised by Dave Liu.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-29 09:42:19 -05:00
Wolfgang Denk
fd2d2d1025 Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master 2008-04-29 16:11:33 +02:00
Yuri Tikhonov
b2d527a8b9 lwmon5: minor clean-up to include/configs/lwmon5.h
LWMON5 DSPIC POST uses the watch-dog scratch register. So, make
the CFG_DSPIC_TEST_ADDR definition more readable.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-04-29 16:10:38 +02:00
Stefan Roese
f4c4d21a88 ppc4xx: Fix CFG_MONITOR_LEN on Katmai failsave this time
Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-29 16:08:05 +02:00
Wolfgang Denk
0e715a7a3f Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master 2008-04-29 14:52:18 +02:00
Yuri Tikhonov
138105efe1 ppc flush_cache: add watch-dog triggering into the loops.
Some boards (e.g. lwmon5) need rather a frequent watch-dog
kicking. Since the time it takes for the flush_cache() function
to complete its job depends on the size of data being flushed, one
may encounter watch-dog resets on such boards when, for example,
download big files over ethernet.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-04-29 14:48:50 +02:00
Stefan Roese
cab99d6f32 ppc4xx: Fix compilation warning in denali_spd_ddr2.c
Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-29 14:44:54 +02:00
Stefan Roese
4ec9d78fe5 ppc4xx: Fix Katmai CFG_MONITOR_LEN
Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-29 14:12:07 +02:00
Stefan Roese
85ad184b3b ppc4xx: Complete remove bogus dflush()
Since the current dflush() implementation is know to have some problems
(as seem on lwmon5 ECC init) this patch removes it completely and replaces
it by using clean_dcache_range().

Tested on Katmai with ECC DIMM.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-29 13:57:07 +02:00
Stefan Roese
135846d6ec ppc4xx: Change ECC initialization on lwmon5 to use clean_dcache_range()
As it seems the "old" ECC initialization routine by using dflush() didn't
write all lines in the dcache back to memory on lwmon5. This could lead
to ECC error upon Linux booting. This patch changes the program_ecc()
routine to now use clean_dcache_range() instead of dflush().
clean_dcache_range() uses dcbst which is exactly what we want in this
case.

Since dflush() is known is cause problems, this routine will be
removed completely and replaced by clean_dcache_range() with an
additional patch.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-29 13:36:51 +02:00
Wolfgang Denk
e037a4c272 Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master 2008-04-29 13:15:20 +02:00
Yuri Tikhonov
18ec19e4aa POST: fix Makefiles for mpc8xx, lwmon, and netta POSTs.
Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-04-29 13:13:22 +02:00
Markus Brunner
eea5a743a2 ppc4xx: Fixup ebc clock in FDT for 405GP/EP
On ppc405EP and ppc405GP (at least) the ebc is directly attached to the plb
and not to the opb. This patch will try to fixup /plb/ebc if /plb/opb/ebc
doesn't exist.

Signed-off-by: Markus Brunner <super.firetwister@gmail.com>
2008-04-29 07:37:54 +02:00
Jean-Christophe PLAGNIOL-VILLARD
2ef7503a59 NE2000: Fix regresssion introduced by e710185aae on non AX88796
Move non-inlied functions into specific drivers file
Set get_prom as weak

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Vlad Lungu <vlad@comsys.ro>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-04-28 22:26:36 -07:00
Guennadi Liakhovetski
40cb90ee2b net: make ARP timeout configurable
Currently the timeout waiting for an ARP reply is hard set to 5 seconds.
On i.MX31ADS due to a hardware "strangeness" up to four first IP packets
to the boards get lost, which typically are ARP replies. By configuring
the timeout to a lower value we significantly improve the first network
transfer time on this board. The timeout is specified in milliseconds,
later internally it is converted to deciseconds, because it has to be
converted to hardware ticks, and CFG_HZ ranges from 900 to 27000000 on
different boards.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-04-28 22:23:21 -07:00
Guennadi Liakhovetski
13e0b8f7ca minor cs8900 driver clean up
Remove a redundant register definition, clean up some coding style
violations.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-04-28 22:22:34 -07:00
Wolfgang Denk
707fa917cc jffs2_1pass.c: fix incompatible pointer type warning
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28 22:01:04 +02:00
Sascha Laue
6aee00f5e6 lwmon5: update dsPIC POST spezification
The specification for the lwmon5 board dsPIC POST got changed.
Also add defines for the temperatures  and voltages.

Signed-off-by: Sascha Laue <sascha.laue@liebherr.com>
2008-04-28 21:31:41 +02:00
Sascha Laue
3e4615ab7f Fix watchdog POST for lwmon5
If the hardware watchdog detects a voltage error, the watchdog sets
GPIO62 to low. The watchdog POST has to detect this low level.

Signed-off-by: Sascha Laue <leglas0@legpc180.leg.liebherr.i>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28 21:15:46 +02:00
Guennadi Liakhovetski
dd5748bcd6 rtl8169: fix compiler warnings
Fix multiple compiler warnings related to argument type mismatch.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2008-04-28 20:42:55 +02:00
Guennadi Liakhovetski
413bf58626 IDE: fix compiler warnings
The IDE driver can use 32-bit addresses in LBA mode, in which case it
spits multiple warnings during compilation. Fix them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2008-04-28 20:42:51 +02:00
Guennadi Liakhovetski
db9084de28 LinkStation: fix compiler warning, add a maintainer
out_8 wants a pointer to an unsigned as the first argument. Add a
maintainer for Linkstation boards.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
2008-04-28 20:42:46 +02:00
Wolfgang Denk
c71abba3cb cmd_nand.c: fix "differ in signedness" problem
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28 14:55:12 +02:00
Wolfgang Denk
f2c288a353 pcnet.c: fix a merge issue
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28 12:48:47 +02:00
Wolfgang Denk
4ca79f477e NAND: fix some strict-aliasing compiler warnings
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28 12:08:18 +02:00
Wolfgang Denk
ff8a7aa24a Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master 2008-04-28 12:07:34 +02:00
Stefan Roese
5cd0130ecc ppc4xx: Fix compile warning of hcu4 board
Signed-off-by: Stefan Roese <sr@denx.de>
2008-04-28 12:07:15 +02:00
Wolfgang Denk
624ce3428a Merge branch 'master' of git+ssh://10.10.0.7/home/wd/git/u-boot/master 2008-04-28 11:34:34 +02:00
Wolfgang Denk
5379cd15dd MPC8323ERDB: fix implicit declaration of function 'mac_read_from_eeprom'
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28 11:31:23 +02:00
Guennadi Liakhovetski
7602ed50a2 mx31ads: fix loadaddr environment variable define
Arithmetic expressions do not get evaluated under stringification. Remove
default network configuration, add DHCP command support. Thanks to Felix
Radensky for reporting.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
2008-04-28 11:10:26 +02:00
Wolfgang Denk
144eec777a katmai: fix section overlap problem
Since we didn't want to remove features from the configuration, we
decided to increase the U-Boot image size (add one flash sector).

Also changed the default environment definition to make it
independent of such changes.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2008-04-28 11:10:12 +02:00
Wolfgang Denk
941d696d25 katmai: fix section overlap problem
Since we didn't want to remove features from the configuration, we
decided to increase the U-Boot image size (add one flash sector).

Also changed the default environment definition to make it
independent of such changes.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
2008-04-28 11:00:14 +02:00
Kumar Gala
03c6cd39f9 post: Fix building with O=
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-28 00:55:04 +02:00
196 changed files with 2845 additions and 1004 deletions

1551
CHANGELOG

File diff suppressed because it is too large Load Diff

View File

@@ -408,6 +408,10 @@ John Zhan <zhanz@sinovee.com>
svm_sc8xx MPC8xx
Guennadi Liakhovetski <g.liakhovetski@gmx.de>
linkstation MPC8241
-------------------------------------------------------------------------
Unknown / orphaned boards:
@@ -603,7 +607,7 @@ Thomas Lange <thomas@corelatus.se>
dbau1x00 MIPS32 Au1000
gth2 MIPS32 Au1000
Vlad Lungu <vlad@comsys.ro>
Vlad Lungu <vlad.lungu@windriver.com>
qemu_mips MIPS32
#########################################################################

View File

@@ -42,6 +42,7 @@ LIST_5xxx=" \
fo300 \
icecube_5100 \
icecube_5200 \
inka4x0 \
lite5200b \
mcc200 \
mecp5200 \
@@ -305,6 +306,7 @@ LIST_8260=" \
TQM8260_AC \
TQM8260_AD \
TQM8260_AE \
TQM8272 \
ZPC1900 \
"

View File

@@ -24,7 +24,7 @@
VERSION = 1
PATCHLEVEL = 3
SUBLEVEL = 3
EXTRAVERSION = -rc1
EXTRAVERSION =
U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
VERSION_FILE = $(obj)include/version_autogenerated.h
@@ -201,7 +201,6 @@ OBJS := $(addprefix $(obj),$(OBJS))
LIBS = lib_generic/libgeneric.a
LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \
"board/$(VENDOR)/common/lib$(VENDOR).a"; fi)
LIBS += board/$(BOARDDIR)/lib$(BOARD).a
LIBS += cpu/$(CPU)/lib$(CPU).a
ifdef SOC
LIBS += cpu/$(CPU)/$(SOC)/lib$(SOC).a
@@ -248,6 +247,9 @@ LIBS += post/libpost.a
LIBS := $(addprefix $(obj),$(LIBS))
.PHONY : $(LIBS) $(VERSION_FILE)
LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).a
LIBBOARD := $(addprefix $(obj),$(LIBBOARD))
# Add GCC lib
PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
@@ -270,7 +272,7 @@ U_BOOT_ONENAND = $(obj)u-boot-onenand.bin
endif
__OBJS := $(subst $(obj),,$(OBJS))
__LIBS := $(subst $(obj),,$(LIBS))
__LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
#########################################################################
#########################################################################
@@ -313,8 +315,9 @@ $(obj)u-boot.sha1: $(obj)u-boot.bin
$(obj)u-boot.dis: $(obj)u-boot
$(OBJDUMP) -d $< > $@
$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBS) $(LDSCRIPT)
UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) |sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
$(obj)u-boot: depend $(SUBDIRS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT)
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
@@ -325,6 +328,9 @@ $(OBJS): depend $(obj)include/autoconf.mk
$(LIBS): depend $(obj)include/autoconf.mk
$(MAKE) -C $(dir $(subst $(obj),,$@))
$(LIBBOARD): depend $(LIBS) $(obj)include/autoconf.mk
$(MAKE) -C $(dir $(subst $(obj),,$@))
$(SUBDIRS): depend $(obj)include/autoconf.mk
$(MAKE) -C $@ all
@@ -346,11 +352,9 @@ $(U_BOOT_ONENAND): $(ONENAND_IPL) $(obj)u-boot.bin $(obj)include/autoconf.mk
cat $(obj)onenand_ipl/onenand-ipl-4k.bin $(obj)u-boot.bin > $(obj)u-boot-flexonenand.bin
$(VERSION_FILE):
@( echo -n "#define U_BOOT_VERSION \"U-Boot " ; \
echo -n "$(U_BOOT_VERSION)" ; \
echo -n $(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion \
$(TOPDIR)) ; \
echo "\"" ) > $@.tmp
@( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' "$(U_BOOT_VERSION)" \
'$(shell $(CONFIG_SHELL) $(TOPDIR)/tools/setlocalversion $(TOPDIR))' \
) > $@.tmp
@cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@
gdbtools:
@@ -420,13 +424,19 @@ $(obj)System.map: $(obj)u-boot
# This target actually generates 2 files; autoconf.mk and autoconf.mk.dep.
# the dep file is only include in this top level makefile to determine when
# to regenerate the autoconf.mk file.
$(obj)include/autoconf.mk: $(obj)include/config.h $(VERSION_FILE)
@$(XECHO) Generating include/autoconf.mk ; \
$(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h
@$(XECHO) Generating $@ ; \
set -e ; \
: Generate the dependancies ; \
$(CC) -x c -M $(HOST_CFLAGS) $(CPPFLAGS) -MQ $@ include/common.h > $@.dep ; \
$(CC) -x c -DDO_DEPS_ONLY -M $(HOST_CFLAGS) $(CPPFLAGS) \
-MQ $(obj)include/autoconf.mk include/common.h > $@
$(obj)include/autoconf.mk: $(obj)include/config.h
@$(XECHO) Generating $@ ; \
set -e ; \
: Extract the config macros ; \
$(CPP) $(CFLAGS) -dM include/common.h | sed -n -f tools/scripts/define2mk.sed > $@
$(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \
sed -n -f tools/scripts/define2mk.sed > $@
sinclude $(obj)include/autoconf.mk.dep

5
README
View File

@@ -623,7 +623,6 @@ The following options need to be configured:
CONFIG_CMD_SPI * SPI serial bus support
CONFIG_CMD_USB * USB support
CONFIG_CMD_VFD * VFD support (TRAB)
CONFIG_CMD_BSP * Board SPecific functions
CONFIG_CMD_CDP * Cisco Discover Protocol support
CONFIG_CMD_FSL * Microblaze FSL support
@@ -1561,6 +1560,10 @@ The following options need to be configured:
before giving up the operation. If not defined, a
default value of 5 is used.
CONFIG_ARP_TIMEOUT
Timeout waiting for an ARP reply in milliseconds.
- Command Interpreter:
CONFIG_AUTO_COMPLETE

View File

@@ -30,6 +30,7 @@
#include <command.h>
#include <common.h>
#include <malloc.h>
#include <environment.h>
#include <linux/types.h>
#include <api_public.h>
@@ -40,7 +41,6 @@
/* U-Boot routines needed */
extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
extern uchar *env_get_addr(int);
/*****************************************************************************
*
@@ -582,7 +582,7 @@ int syscall(int call, int *retval, ...)
va_list ap;
int rv;
if (call < 0 || call >= calls_no || calls_table[call] == NULL) {
if (call < 0 || call >= calls_no) {
debugf("invalid call #%d\n", call);
return 0;
}

View File

@@ -22,7 +22,7 @@
# MA 02111-1307 USA
#
sinclude $(TOPDIR)/board/$(BOARDDIR)/textbase.mk
sinclude $(OBJTREE)/board/$(BOARDDIR)/textbase.mk
ifndef TEXT_BASE
TEXT_BASE = 0xFE000000
endif

View File

@@ -28,7 +28,7 @@
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
TEXT_BASE = 0xFFFC0000
TEXT_BASE = 0xFFF80000
endif
ifeq ($(debug),1)

View File

@@ -476,8 +476,37 @@ void ft_board_setup(void *blob, bd_t *bd)
val[3] = gd->bd->bi_flashsize;
rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
val, sizeof(val), 1);
if (rc)
if (rc) {
printf("Unable to update property NOR mapping, err=%s\n",
fdt_strerror(rc));
}
if (gd->board_type == BOARD_CANYONLANDS_SATA) {
/*
* When SATA is selected we need to disable the first PCIe
* node in the device tree, so that Linux doesn't initialize
* it.
*/
rc = fdt_find_and_setprop(blob, "/plb/pciex@d00000000", "status",
"disabled", sizeof("disabled"), 1);
if (rc) {
printf("Unable to update property status in PCIe node, err=%s\n",
fdt_strerror(rc));
}
}
if (gd->board_type == BOARD_CANYONLANDS_PCIE) {
/*
* When PCIe is selected we need to disable the SATA
* node in the device tree, so that Linux doesn't initialize
* it.
*/
rc = fdt_find_and_setprop(blob, "/plb/sata@bffd1000", "status",
"disabled", sizeof("disabled"), 1);
if (rc) {
printf("Unable to update property status in PCIe node, err=%s\n",
fdt_strerror(rc));
}
}
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@@ -24,20 +24,12 @@
# AMCC 460EX/460GT Evaluation Board (Canyonlands) board
#
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
TEXT_BASE = 0xFFFA0000
endif
ifeq ($(CONFIG_NAND_U_BOOT),y)
LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
endif
ifeq ($(CONFIG_PCIBOOT_U_BOOT),y)
LDSCRIPT = $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
endif
PLATFORM_CPPFLAGS += -DCONFIG_440=1
ifeq ($(debug),1)

View File

@@ -25,7 +25,7 @@
# AMCC 440SPe Evaluation (Katmai) board
#
TEXT_BASE = 0xfffc0000
TEXT_BASE = 0xFFFA0000
PLATFORM_CPPFLAGS += -DCONFIG_440=1

View File

@@ -230,14 +230,22 @@ int misc_init_r(void)
return 0;
}
int board_emac_count(void)
static int is_405exr(void)
{
u32 pvr = get_pvr();
if (pvr & 0x00000004)
return 0; /* bit 2 set -> 405EX */
return 1; /* bit 2 cleared -> 405EXr */
}
int board_emac_count(void)
{
/*
* 405EXr only has one EMAC interface, 405EX has two
*/
if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA))
if (is_405exr())
return 1;
else
return 2;
@@ -245,12 +253,10 @@ int board_emac_count(void)
static int board_pcie_count(void)
{
u32 pvr = get_pvr();
/*
* 405EXr only has one EMAC interface, 405EX has two
*/
if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA))
if (is_405exr())
return 1;
else
return 2;
@@ -259,9 +265,8 @@ static int board_pcie_count(void)
int checkboard (void)
{
char *s = getenv("serial#");
u32 pvr = get_pvr();
if ((pvr == PVR_405EXR1_RA) || (pvr == PVR_405EXR2_RA))
if (is_405exr())
printf("Board: Haleakala - AMCC PPC405EXr Evaluation Board");
else
printf("Board: Kilauea - AMCC PPC405EX Evaluation Board");

View File

@@ -26,6 +26,8 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <spd_sdram.h>
#include <libfdt.h>
#include <fdt_support.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -554,3 +556,24 @@ void board_reset(void)
/* give reset to BCSR */
*(unsigned char *)(CFG_BCSR_BASE | 0x06) = 0x09;
}
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
void ft_board_setup(void *blob, bd_t *bd)
{
u32 val[4];
int rc;
ft_cpu_setup(blob, bd);
/* Fixup NOR mapping */
val[0] = 0; /* chip select number */
val[1] = 0; /* always 0 */
val[2] = gd->bd->bi_flashstart;
val[3] = gd->bd->bi_flashsize;
rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
val, sizeof(val), 1);
if (rc)
printf("Unable to update property NOR mapping, err=%s\n",
fdt_strerror(rc));
}
#endif /* defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) */

View File

@@ -1,6 +1,6 @@
#
# (C) Copyright 2003-2008
# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
@@ -25,7 +25,7 @@
#include <common.h>
#include <asm/arch/at91cap9.h>
#include <asm/arch/at91cap9_matrix.h>
#include <asm/arch/at91sam926x_mc.h>
#include <asm/arch/at91sam9_smc.h>
#include <asm/arch/at91_pmc.h>
#include <asm/arch/at91_rstc.h>
#include <asm/arch/gpio.h>

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas

View File

@@ -1,4 +1,6 @@
/*
* (C) Copyright 2008
* Ulf Samuelsson <ulf@atmel.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2002
* Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de>
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
*
* See file CREDITS for list of people who contributed to this
* project.

View File

@@ -1,4 +1,6 @@
/*
* (C) Copyright 2008
* Ulf Samuelsson <ulf@atmel.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
#
# (C) Copyright 2003-2008
# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
@@ -25,7 +25,7 @@
#include <common.h>
#include <asm/arch/at91sam9260.h>
#include <asm/arch/at91sam9260_matrix.h>
#include <asm/arch/at91sam926x_mc.h>
#include <asm/arch/at91sam9_smc.h>
#include <asm/arch/at91_pmc.h>
#include <asm/arch/at91_rstc.h>
#include <asm/arch/gpio.h>

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* (C) Copyright 2006 ATMEL Rousset, Lacressonniere Nicolas

View File

@@ -1,4 +1,6 @@
/*
* (C) Copyright 2008
* Ulf Samuelsson <ulf@atmel.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2002
* Gary Jennejohn, DENX Software Engineering, <gj <at> denx.de>
* Gary Jennejohn, DENX Software Engineering, <gj@denx.de>
*
* See file CREDITS for list of people who contributed to this
* project.

View File

@@ -32,7 +32,7 @@
# 0x00100000 boot from RAM (for testing only)
#
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
## Standard: boot high

View File

@@ -59,6 +59,7 @@ int checkboard (void)
uint pci_slot = get_pci_slot ();
uint cpu_board_rev = get_cpu_board_revision ();
uint svr;
printf ("Board: CDS Version 0x%02x, PCI Slot %d\n",
get_board_version (), pci_slot);
@@ -71,12 +72,16 @@ int checkboard (void)
*/
local_bus_init ();
svr = get_svr();
/*
* Fix CPU2 errata: A core hang possible while executing a
* msync instruction and a snoopable transaction from an I/O
* master tagged to make quick forward progress is present.
* Fixed in Silicon Rev.2.1
*/
ecm->eebpcr |= (1 << 16);
if (!(SVR_MAJ(svr) >= 2 && SVR_MIN(svr) >= 1))
ecm->eebpcr |= (1 << 16);
/*
* Hack TSEC 3 and 4 IO voltages.

View File

@@ -22,4 +22,4 @@
TEXT_BASE = 0xfff00000
PLATFORM_CPPFLAGS += -DCONFIG_MPC86xx=1
PLATFORM_CPPFLAGS += -DCONFIG_MPC8610=1 -maltivec -mabi=altivec -msoft-float -O2
PLATFORM_CPPFLAGS += -DCONFIG_MPC8610=1 -maltivec -mabi=altivec -msoft-float

View File

@@ -192,7 +192,7 @@ long int fixed_sdram(void)
ddr->cs0_bnds = 0x0000001f;
ddr->cs0_config = 0x80010202;
ddr->ext_refrec = 0x00000000;
ddr->timing_cfg_3 = 0x00000000;
ddr->timing_cfg_0 = 0x00260802;
ddr->timing_cfg_1 = 0x3935d322;
ddr->timing_cfg_2 = 0x14904cc8;

View File

@@ -130,7 +130,7 @@ fixed_sdram(void)
ddr->cs0_bnds = CFG_DDR_CS0_BNDS;
ddr->cs0_config = CFG_DDR_CS0_CONFIG;
ddr->ext_refrec = CFG_DDR_EXT_REFRESH;
ddr->timing_cfg_3 = CFG_DDR_TIMING_3;
ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
ddr->timing_cfg_2 = CFG_DDR_TIMING_2;

View File

@@ -23,18 +23,21 @@
include $(TOPDIR)/config.mk
LIB = lib$(BOARD).a
LIB = $(obj)lib$(BOARD).a
OBJS = $(BOARD).o ide.o hwctl.o avr.o
$(LIB): .depend $(OBJS) $(SOBJS)
$(AR) crv $@ $(OBJS) $(SOBJS)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(OBJS))
$(LIB): $(obj).depend $(OBJS)
$(AR) crv $@ $(OBJS)
#########################################################################
.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude .depend
sinclude $(obj).depend
#########################################################################

View File

@@ -35,7 +35,7 @@
# 0x07F00000 boot from RAM
#
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
# For flash image - all models

View File

@@ -27,7 +27,7 @@
/*--------------------------------------------------------------*/
static inline void miconCntl_SendUart(unsigned char dat)
{
out_8((char *)AVR_PORT, dat);
out_8((unsigned char *)AVR_PORT, dat);
mdelay(1);
}

View File

@@ -34,6 +34,7 @@
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/io.h>
#include <asm/cache.h>
#include <ppc440.h>
#include <watchdog.h>
@@ -59,7 +60,6 @@
extern int denali_wait_for_dlllock(void);
extern void denali_core_search_data_eye(void);
extern void dcbz_area(u32 start_address, u32 num_bytes);
extern void dflush(void);
static u32 is_ecc_enabled(void)
{
@@ -106,6 +106,7 @@ static void program_ecc(u32 start_address,
{
u32 val;
u32 current_addr = start_address;
u32 size;
int bytes_remaining;
sync();
@@ -123,12 +124,18 @@ static void program_ecc(u32 start_address,
* watchdog.
*/
while (bytes_remaining > 0) {
dcbz_area(current_addr, min((64 << 20), bytes_remaining));
size = min((64 << 20), bytes_remaining);
/* Write zero's to SDRAM */
dcbz_area(current_addr, size);
/* Write modified dcache lines back to memory */
clean_dcache_range(current_addr, current_addr + size);
current_addr += 64 << 20;
bytes_remaining -= 64 << 20;
WATCHDOG_RESET();
}
dflush();
sync();
wait_ddr_idle();

View File

@@ -29,7 +29,7 @@
# 0xFFF00000 boot high (standard configuration)
#
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
ifndef TEXT_BASE
TEXT_BASE = 0xFFF00000

View File

@@ -220,7 +220,7 @@ lowlevel_init:
mov r1, #CS4_BASE
ldrh r1, [r1, #0x2]
/* Is 27MHz switch set? */
ands r1, r1, #0x16
ands r1, r1, #0x10
/* 532-133-66.5 */
ldr r0, =CCM_BASE

View File

@@ -34,11 +34,11 @@
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/mmu.h>
#include <asm/cache.h>
#include <ppc440.h>
void hcu_led_set(u32 value);
void dcbz_area(u32 start_address, u32 num_bytes);
void dflush(void);
#define DDR_DCR_BASE 0x10
#define ddrcfga (DDR_DCR_BASE+0x0) /* DDR configuration address reg */
@@ -185,14 +185,14 @@ static void program_ecc(unsigned long start_address, unsigned long num_bytes)
#endif
sync();
eieio();
puts(str);
/* ECC bit set method for cached memory */
/* Fast method, no noticeable delay */
dcbz_area(start_address, num_bytes);
dflush();
/* Write modified dcache lines back to memory */
clean_dcache_range(start_address, start_address + num_bytes);
blank_string(strlen(str));
/* Clear error status */

View File

@@ -1,4 +1,4 @@
By Vlad Lungu vlad@comsys.ro 2007-Oct-01
By Vlad Lungu vlad.lungu@windriver.com 2007-Oct-01
----------------------------------------
Qemu is a full system emulator. See
@@ -9,3 +9,7 @@ Limitations & comments
Supports the "-m mips" configuration of qemu: serial,NE2000,IDE.
Support is big endian only for now (or at least this is what I tested).
Derived from au1x00 with a lot of things cut out.
Supports emulated flash (patch Jean-Christophe PLAGNIOL-VILLARD) with
recent qemu versions. When using emulated flash, launch with
-pflash <filename> and erase mips_bios.bin.

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007
* Vlad Lungu vlad@comsys.ro
* Vlad Lungu vlad.lungu@windriver.com
*
* See file CREDITS for list of people who contributed to this
* project.

View File

@@ -299,7 +299,7 @@ long int fixed_sdram (void)
ddr->cs1_config = 0x80010101;
ddr->cs2_config = 0x00000000;
ddr->cs3_config = 0x00000000;
ddr->ext_refrec = 0x00000000;
ddr->timing_cfg_3 = 0x00000000;
ddr->timing_cfg_0 = 0x00220802;
ddr->timing_cfg_1 = 0x38377322;
ddr->timing_cfg_2 = 0x0fa044C7;

View File

@@ -135,7 +135,7 @@ long int fixed_sdram (void)
ddr->cs1_config = CFG_DDR_CS1_CONFIG;
ddr->cs2_config = CFG_DDR_CS2_CONFIG;
ddr->cs3_config = CFG_DDR_CS3_CONFIG;
ddr->ext_refrec = CFG_DDR_EXT_REFRESH;
ddr->timing_cfg_3 = CFG_DDR_TIMING_3;
ddr->timing_cfg_0 = CFG_DDR_TIMING_0;
ddr->timing_cfg_1 = CFG_DDR_TIMING_1;
ddr->timing_cfg_2 = CFG_DDR_TIMING_2;
@@ -166,7 +166,7 @@ long int fixed_sdram (void)
ddr->cs1_config = CFG_DDR2_CS1_CONFIG;
ddr->cs2_config = CFG_DDR2_CS2_CONFIG;
ddr->cs3_config = CFG_DDR2_CS3_CONFIG;
ddr->ext_refrec = CFG_DDR2_EXT_REFRESH;
ddr->timing_cfg_3 = CFG_DDR2_EXT_REFRESH;
ddr->timing_cfg_0 = CFG_DDR2_TIMING_0;
ddr->timing_cfg_1 = CFG_DDR2_TIMING_1;
ddr->timing_cfg_2 = CFG_DDR2_TIMING_2;

View File

@@ -76,8 +76,8 @@ done: movb $0x88, %al
jmp *%ebp /* return to caller */
.globl __show_boot_progress
__show_boot_progress:
.globl show_boot_progress
show_boot_progress:
out %al, $0x80
xchg %al, %ah
movw $0x680, %dx

View File

@@ -36,7 +36,7 @@ OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS) $(SOBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS) $(SOBJS)
clean:
rm -f $(SOBJS) $(OBJS)

View File

@@ -33,7 +33,6 @@
#define PROBE_BUFFER_SIZE 1024
static unsigned char buffer[PROBE_BUFFER_SIZE];
#define SC520_MAX_FLASH_BANKS 1
#define SC520_FLASH_BANK0_BASE 0x38000000 /* BOOTCS */
#define SC520_FLASH_BANKSIZE 0x8000000
@@ -62,7 +61,6 @@ flash_info_t flash_info[SC520_MAX_FLASH_BANKS];
/*-----------------------------------------------------------------------
*/
static u32 _probe_flash(u32 addr, u32 bw, int il)
{
u32 result=0;
@@ -180,7 +178,6 @@ static u32 _probe_flash(u32 addr, u32 bw, int il)
break;
}
return result;
}
@@ -215,11 +212,9 @@ static int identify_flash(unsigned address, int width)
enable_interrupts();
}
vendor = res >> 16;
device = res & 0xffff;
return res;
}
@@ -385,7 +380,6 @@ void flash_print_info(flash_info_t *info)
break;
}
printf(" Size: %ld MB in %d Sectors\n",
info->size >> 20, info->sector_count);
@@ -399,13 +393,13 @@ void flash_print_info(flash_info_t *info)
}
printf ("\n");
done:
done:
return;
}
/*-----------------------------------------------------------------------
*/
static u32 _amd_erase_flash(u32 addr, u32 sector)
{
unsigned elapsed;
@@ -467,7 +461,6 @@ static u32 _intel_erase_flash(u32 addr, u32 sector)
*(volatile u16*)(addr + sector) = 0x0020; /* erase setup */
*(volatile u16*)(addr + sector) = 0x00D0; /* erase confirm */
/* Wait at least 80us - let's wait 1 ms */
__udelay(1000);
@@ -486,7 +479,6 @@ static u32 _intel_erase_flash(u32 addr, u32 sector)
return 0;
}
extern int _intel_erase_flash_end;
asm ("_intel_erase_flash_end:\n"
".long 0\n");
@@ -548,7 +540,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
printf ("\n");
}
/* Start erase on unprotected sectors */
for (sect = s_first; sect<=s_last; sect++) {
@@ -566,7 +557,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
enable_interrupts();
}
if (res) {
printf("Erase timed out, sector %d\n", sect);
return res;
@@ -576,7 +566,6 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
}
}
return 0;
}
@@ -586,11 +575,11 @@ int flash_erase(flash_info_t *info, int s_first, int s_last)
* 1 - write timeout
* 2 - Flash not erased
*/
static int _amd_write_word(unsigned start, unsigned dest, unsigned data)
static int _amd_write_word(unsigned start, unsigned dest, u16 data)
{
volatile u16 *addr2 = (u16*)start;
volatile u16 *dest2 = (u16*)dest;
volatile u16 *data2 = (u16*)&data;
volatile u16 *addr2 = (volatile u16*)start;
volatile u16 *dest2 = (volatile u16*)dest;
volatile u16 *data2 = (volatile u16*)&data;
int i;
unsigned elapsed;
@@ -601,7 +590,6 @@ static int _amd_write_word(unsigned start, unsigned dest, unsigned data)
for (i = 0; i < 2; i++) {
addr2[0x5555] = 0x00AA;
addr2[0x2aaa] = 0x0055;
addr2[0x5555] = 0x00A0;
@@ -630,7 +618,6 @@ extern int _amd_write_word_end;
asm ("_amd_write_word_end:\n"
".long 0\n");
static int _intel_write_word(unsigned start, unsigned dest, unsigned data)
{
int i;
@@ -663,14 +650,12 @@ static int _intel_write_word(unsigned start, unsigned dest, unsigned data)
return 0;
}
extern int _intel_write_word_end;
asm ("_intel_write_word_end:\n"
".long 0\n");
/*-----------------------------------------------------------------------
* Copy memory to flash, returns:
* 0 - OK
@@ -715,10 +700,8 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
return 3;
}
wp = (addr & ~3); /* get lower word aligned address */
/*
* handle unaligned start bytes
*/
@@ -805,5 +788,4 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
}
return rc;
}

View File

@@ -73,8 +73,8 @@ done: movl $0xfffefc32,%edx
jmp *%ebp /* return to caller */
.globl __show_boot_progress
__show_boot_progress:
.globl show_boot_progress
show_boot_progress:
movl $0xfffefc32,%edx
xorw $0xffff, %ax
movw %ax,(%edx)

View File

@@ -1,5 +1,5 @@
#
# (C) Copyright 2001
# (C) Copyright 2001-2008
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
@@ -22,19 +22,26 @@
#
include $(TOPDIR)/config.mk
ifneq ($(OBJTREE),$(SRCTREE))
$(shell mkdir -p $(obj)../tqm8xx/)
endif
LIB = lib$(BOARD).a
LIB = $(obj)lib$(BOARD).a
OBJS = $(BOARD).o ../tqm8xx/load_sernum_ethaddr.o
COBJS = $(BOARD).o ../tqm8xx/load_sernum_ethaddr.o
$(LIB): .depend $(OBJS)
$(AR) crv $@ $(OBJS)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS))
SOBJS := $(addprefix $(obj),$(SOBJS))
$(LIB): $(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
#########################################################################
.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
$(CC) -M $(CFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
# defines $(obj).depend target
include $(SRCTREE)/rules.mk
sinclude .depend
sinclude $(obj).depend
#########################################################################

View File

@@ -24,7 +24,6 @@
#include <common.h>
#include <command.h>
static unsigned char srom[128];
extern u16 read_srom_word(int);
extern void write_srom_word(int offset, u16 val);

View File

@@ -25,7 +25,7 @@
# MarelV38B board
#
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.tmp
sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp
TEXT_BASE = 0xFF000000

View File

@@ -433,17 +433,6 @@ static int fit_check_kernel (const void *fit, int os_noffset, int verify)
}
show_boot_progress (105);
#ifdef CONFIG_LOGBUFFER
#ifndef CONFIG_ALT_LB_ADDR
kbd=gd->bd;
/* Prevent initrd from overwriting logbuffer */
if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD))
initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD;
debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN);
#else
debug ("## Logbuffer at 0x%08lX ", CONFIG_ALT_LB_ADDR);
#endif
#endif
if (!fit_image_check_target_arch (fit, os_noffset)) {
puts ("Unsupported Architecture\n");
show_boot_progress (-105);

View File

@@ -52,10 +52,6 @@
# include <status_led.h>
#endif
#ifndef __PPC__
#include <asm/io.h>
#endif
#ifdef CONFIG_IDE_8xx_DIRECT
DECLARE_GLOBAL_DATA_PTR;
#endif
@@ -1264,7 +1260,7 @@ ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
#ifdef CONFIG_LBA48
unsigned char lba48 = 0;
if (blknr & 0x0000fffff0000000) {
if (blknr & 0x0000fffff0000000ULL) {
/* more than 28 bits used, use 48bit mode */
lba48 = 1;
}
@@ -1318,8 +1314,13 @@ ulong ide_read (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
/* write high bits */
ide_outb (device, ATA_SECT_CNT, 0);
ide_outb (device, ATA_LBA_LOW, (blknr >> 24) & 0xFF);
#ifdef CFG_64BIT_LBA
ide_outb (device, ATA_LBA_MID, (blknr >> 32) & 0xFF);
ide_outb (device, ATA_LBA_HIGH, (blknr >> 40) & 0xFF);
#else
ide_outb (device, ATA_LBA_MID, 0);
ide_outb (device, ATA_LBA_HIGH, 0);
#endif
}
#endif
ide_outb (device, ATA_SECT_CNT, 1);
@@ -1383,7 +1384,7 @@ ulong ide_write (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
#ifdef CONFIG_LBA48
unsigned char lba48 = 0;
if (blknr & 0x0000fffff0000000) {
if (blknr & 0x0000fffff0000000ULL) {
/* more than 28 bits used, use 48bit mode */
lba48 = 1;
}
@@ -1408,8 +1409,13 @@ ulong ide_write (int device, lbaint_t blknr, ulong blkcnt, void *buffer)
/* write high bits */
ide_outb (device, ATA_SECT_CNT, 0);
ide_outb (device, ATA_LBA_LOW, (blknr >> 24) & 0xFF);
#ifdef CFG_64BIT_LBA
ide_outb (device, ATA_LBA_MID, (blknr >> 32) & 0xFF);
ide_outb (device, ATA_LBA_HIGH, (blknr >> 40) & 0xFF);
#else
ide_outb (device, ATA_LBA_MID, 0);
ide_outb (device, ATA_LBA_HIGH, 0);
#endif
}
#endif
ide_outb (device, ATA_SECT_CNT, 1);

View File

@@ -93,7 +93,7 @@ static inline int str2long(char *p, ulong *num)
}
static int
arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size)
{
int idx = nand_curr_device;
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
@@ -110,7 +110,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
}
*off = part->offset;
if (argc >= 2) {
if (!(str2long(argv[1], size))) {
if (!(str2long(argv[1], (ulong *)size))) {
printf("'%s' is not a number\n", argv[1]);
return -1;
}
@@ -136,7 +136,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, ulong *size)
}
if (argc >= 2) {
if (!(str2long(argv[1], size))) {
if (!(str2long(argv[1], (ulong *)size))) {
printf("'%s' is not a number\n", argv[1]);
return -1;
}
@@ -158,7 +158,8 @@ out:
int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
{
int i, dev, ret;
ulong addr, off, size;
ulong addr, off;
size_t size;
char *cmd, *s;
nand_info_t *nand;
#ifdef CFG_NAND_QUIET
@@ -350,10 +351,10 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
} else if (s != NULL && !strcmp(s, ".oob")) {
/* read out-of-band data */
if (read)
ret = nand->read_oob(nand, off, size, (size_t *) &size,
ret = nand->read_oob(nand, off, size, &size,
(u_char *) addr);
else
ret = nand->write_oob(nand, off, size, (size_t *) &size,
ret = nand->write_oob(nand, off, size, &size,
(u_char *) addr);
} else {
if (read)
@@ -481,7 +482,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand,
{
int r;
char *ep, *s;
ulong cnt;
size_t cnt;
image_header_t *hdr;
int jffs2 = 0;
#if defined(CONFIG_FIT)
@@ -839,23 +840,24 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
if (strncmp (argv[1], "read", 4) == 0 ||
strncmp (argv[1], "write", 5) == 0) {
ulong addr = simple_strtoul (argv[2], NULL, 16);
ulong off = simple_strtoul (argv[3], NULL, 16);
ulong size = simple_strtoul (argv[4], NULL, 16);
int cmd = (strncmp (argv[1], "read", 4) == 0) ?
NANDRW_READ : NANDRW_WRITE;
int ret, total;
ulong addr = simple_strtoul (argv[2], NULL, 16);
off_t off = simple_strtoul (argv[3], NULL, 16);
size_t size = simple_strtoul (argv[4], NULL, 16);
int cmd = (strncmp (argv[1], "read", 4) == 0) ?
NANDRW_READ : NANDRW_WRITE;
size_t total;
int ret;
char *cmdtail = strchr (argv[1], '.');
if (cmdtail && !strncmp (cmdtail, ".oob", 2)) {
/* read out-of-band data */
if (cmd & NANDRW_READ) {
ret = nand_read_oob (nand_dev_desc + curr_device,
off, size, (size_t *) & total,
off, size, &total,
(u_char *) addr);
} else {
ret = nand_write_oob (nand_dev_desc + curr_device,
off, size, (size_t *) & total,
off, size, &total,
(u_char *) addr);
}
return ret;
@@ -891,7 +893,7 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
ret = nand_legacy_rw (nand_dev_desc + curr_device,
cmd, off, size,
(size_t *) & total,
&total,
(u_char *) addr);
printf (" %d bytes %s: %s\n", total,

View File

@@ -68,16 +68,6 @@ DECLARE_GLOBAL_DATA_PTR;
/************************************************************************
************************************************************************/
/* Function that returns a pointer to a value from the environment */
/* (Only memory version supported / needed). */
extern uchar *env_get_addr(int);
/* Function that updates CRC of the enironment */
extern void env_crc_update (void);
/************************************************************************
************************************************************************/
/*
* Table with supported baudrates (defined in config_xyz.h)
*/

View File

@@ -50,6 +50,7 @@ extern void env_relocate_spec (void);
extern uchar env_get_char_spec(int);
static uchar env_get_char_init (int index);
uchar (*env_get_char)(int) = env_get_char_init;
/************************************************************************
* Default settings to be used when no valid environment is found
@@ -181,19 +182,6 @@ uchar env_get_char_memory (int index)
}
#endif
uchar env_get_char (int index)
{
uchar c;
/* if relocated to RAM */
if (gd->flags & GD_FLG_RELOC)
c = env_get_char_memory(index);
else
c = env_get_char_init(index);
return (c);
}
uchar *env_get_addr (int index)
{
if (gd->env_valid) {
@@ -227,6 +215,11 @@ void env_relocate (void)
DEBUGF ("%s[%d] malloced ENV at %p\n", __FUNCTION__,__LINE__,env_ptr);
#endif
/*
* After relocation to RAM, we can always use the "memory" functions
*/
env_get_char = env_get_char_memory;
if (gd->env_valid == 0) {
#if defined(CONFIG_GTH) || defined(CFG_ENV_IS_NOWHERE) /* Environment not changable */
puts ("Using default environment\n\n");

View File

@@ -38,9 +38,6 @@ env_t *env_ptr = NULL;
char * env_name_spec = "EEPROM";
extern uchar env_get_char_memory (int index);
uchar env_get_char_spec (int index)
{
uchar c;

View File

@@ -378,7 +378,9 @@ void env_relocate_spec (void)
puts ("*** Warning - some problems detected "
"reading environment; recovered successfully\n\n");
#endif /* CFG_ENV_ADDR_REDUND */
#ifdef CMD_SAVEENV
memcpy (env_ptr, (void*)flash_addr, CFG_ENV_SIZE);
#endif
#endif /* ! ENV_IS_EMBEDDED || CFG_ENV_ADDR_REDUND */
}

View File

@@ -102,7 +102,7 @@ uchar env_get_char_spec (int index)
int env_init(void)
{
#if defined(ENV_IS_EMBEDDED)
ulong total;
size_t total;
int crc1_ok = 0, crc2_ok = 0;
env_t *tmp_env1, *tmp_env2;
@@ -154,7 +154,7 @@ int env_init(void)
#ifdef CFG_ENV_OFFSET_REDUND
int saveenv(void)
{
ulong total;
size_t total;
int ret = 0;
env_ptr->flags++;
@@ -188,7 +188,7 @@ int saveenv(void)
#else /* ! CFG_ENV_OFFSET_REDUND */
int saveenv(void)
{
ulong total;
size_t total;
int ret = 0;
puts ("Erasing Nand...");
@@ -211,7 +211,7 @@ int saveenv(void)
void env_relocate_spec (void)
{
#if !defined(ENV_IS_EMBEDDED)
ulong total;
size_t total;
int crc1_ok = 0, crc2_ok = 0;
env_t *tmp_env1, *tmp_env2;
@@ -268,7 +268,7 @@ void env_relocate_spec (void)
void env_relocate_spec (void)
{
#if !defined(ENV_IS_EMBEDDED)
ulong total;
size_t total;
int ret;
total = CFG_ENV_SIZE;

View File

@@ -63,8 +63,6 @@ char * env_name_spec = "NVRAM";
extern uchar default_environment[];
extern int default_environment_size;
extern uchar env_get_char_memory (int index);
#ifdef CONFIG_AMIGAONEG3SE
uchar env_get_char_spec (int index)
{

View File

@@ -396,7 +396,6 @@ void *ft_get_prop(void *bphp, const char *propname, int *szp)
/********************************************************************/
void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end)
{
u32 *p;

View File

@@ -23,7 +23,6 @@
* MA 02111-1307 USA
*/
#ifndef USE_HOSTCC
#include <common.h>
#include <watchdog.h>
@@ -36,10 +35,6 @@
#include <dataflash.h>
#endif
#ifdef CONFIG_LOGBUFFER
#include <logbuff.h>
#endif
#if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE)
#include <rtc.h>
#endif
@@ -93,6 +88,7 @@ static table_entry_t uimage_arch[] = {
{ IH_ARCH_MIPS64, "mips64", "MIPS 64 Bit", },
{ IH_ARCH_NIOS, "nios", "NIOS", },
{ IH_ARCH_NIOS2, "nios2", "NIOS II", },
{ IH_ARCH_PPC, "powerpc", "PowerPC", },
{ IH_ARCH_PPC, "ppc", "PowerPC", },
{ IH_ARCH_S390, "s390", "IBM S390", },
{ IH_ARCH_SH, "sh", "SuperH", },
@@ -241,7 +237,7 @@ void image_multi_getimg (image_header_t *hdr, ulong idx,
{
int i;
uint32_t *size;
ulong offset, tail, count, img_data;
ulong offset, count, img_data;
/* get number of component */
count = image_multi_count (hdr);
@@ -257,19 +253,15 @@ void image_multi_getimg (image_header_t *hdr, ulong idx,
if (idx < count) {
*len = uimage_to_cpu (size[idx]);
offset = 0;
tail = 0;
/* go over all indices preceding requested component idx */
for (i = 0; i < idx; i++) {
/* add up i-th component size */
offset += uimage_to_cpu (size[i]);
/* add up alignment for i-th component */
tail += (4 - uimage_to_cpu (size[i]) % 4);
/* add up i-th component size, rounding up to 4 bytes */
offset += (uimage_to_cpu (size[i]) + 3) & ~3 ;
}
/* calculate idx-th component data address */
*data = img_data + offset + tail;
*data = img_data + offset;
} else {
*len = 0;
*data = 0;

View File

@@ -40,7 +40,7 @@
#include <post.h>
#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST)
#if defined(CONFIG_SILENT_CONSOLE) || defined(CONFIG_POST) || defined(CONFIG_CMDLINE_EDITING)
DECLARE_GLOBAL_DATA_PTR;
#endif
@@ -67,11 +67,9 @@ static int abortboot(int);
char console_buffer[CFG_CBSIZE]; /* console I/O buffer */
#ifndef CONFIG_CMDLINE_EDITING
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen);
static char erase_seq[] = "\b \b"; /* erase sequence */
static char tab_seq[] = " "; /* used to expand TABs */
#endif /* CONFIG_CMDLINE_EDITING */
#ifdef CONFIG_BOOT_RETRY_TIME
static uint64_t endtime = 0; /* must be set, default is instant timeout */
@@ -947,11 +945,26 @@ int readline_into_buffer (const char *const prompt, char * buffer)
initted = 1;
}
puts (prompt);
rc = cread_line(prompt, p, &len);
return rc < 0 ? rc : len;
#else
/*
* History uses a global array which is not
* writable until after relocation to RAM.
* Revert to non-history version if still
* running from flash.
*/
if (gd->flags & GD_FLG_RELOC) {
if (!initted) {
hist_init();
initted = 1;
}
puts (prompt);
rc = cread_line(prompt, p, &len);
return rc < 0 ? rc : len;
} else {
#endif /* CONFIG_CMDLINE_EDITING */
char * p_buf = p;
int n = 0; /* buffer index */
int plen = 0; /* prompt length */
@@ -1047,12 +1060,13 @@ int readline_into_buffer (const char *const prompt, char * buffer)
}
}
}
#endif /* CONFIG_CMDLINE_EDITING */
#ifdef CONFIG_CMDLINE_EDITING
}
#endif
}
/****************************************************************************/
#ifndef CONFIG_CMDLINE_EDITING
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen)
{
char *s;
@@ -1082,7 +1096,6 @@ static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen)
(*np)--;
return (p);
}
#endif /* CONFIG_CMDLINE_EDITING */
/****************************************************************************/

View File

@@ -69,27 +69,6 @@ PLATFORM_CPPFLAGS+= -D__ARM__
endif
endif
# Load generated board configuration
sinclude $(OBJTREE)/include/autoconf.mk
ifdef ARCH
sinclude $(TOPDIR)/$(ARCH)_config.mk # include architecture dependend rules
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
BOARDDIR = $(BOARD)
endif
ifdef BOARD
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
endif
#########################################################################
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
@@ -127,6 +106,31 @@ OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
RANLIB = $(CROSS_COMPILE)RANLIB
#########################################################################
# Load generated board configuration
sinclude $(OBJTREE)/include/autoconf.mk
ifdef ARCH
sinclude $(TOPDIR)/$(ARCH)_config.mk # include architecture dependend rules
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
BOARDDIR = $(BOARD)
endif
ifdef BOARD
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
endif
#########################################################################
ifneq (,$(findstring s,$(MAKEFLAGS)))
ARFLAGS = cr
else

View File

@@ -329,14 +329,28 @@ _GLOBAL(dcache_status)
blr
/*
* Invalidate L2 cache using L2I and polling L2IP
* Invalidate L2 cache using L2I and polling L2IP or L2I
*/
_GLOBAL(l2cache_invalidate)
sync
mfspr r3, l2cr
oris r3, r3, L2CR_L2I@h
sync
mtspr l2cr, r3
sync
mfspr r3, PVR
sync
rlwinm r3, r3, 16,16,31
cmpli 0,r3,0x8000 /* 7451, 7441 */
beq 0,inv_7450
cmpli 0,r3,0x8001 /* 7455, 7445 */
beq 0,inv_7450
cmpli 0,r3,0x8002 /* 7457, 7447 */
beq 0,inv_7450
cmpli 0,r3,0x8003 /* 7447A */
beq 0,inv_7450
cmpli 0,r3,0x8004 /* 7448 */
beq 0,inv_7450
invl2:
mfspr r3, l2cr
andi. r3, r3, L2CR_L2IP
@@ -348,6 +362,11 @@ invl2:
mtspr l2cr, r3
sync
blr
inv_7450:
mfspr r3, l2cr
andis. r3, r3, L2CR_L2I@h
bne inv_7450
blr
/*
* Enable L2 cache

View File

@@ -39,7 +39,7 @@ static u32 mx31_decode_pll(u32 reg, u32 infreq)
(mfd * pd)) << 10;
}
u32 mx31_get_mpl_dpdgck_clk(void)
static u32 mx31_get_mpl_dpdgck_clk(void)
{
u32 infreq;
@@ -51,7 +51,7 @@ u32 mx31_get_mpl_dpdgck_clk(void)
return mx31_decode_pll(__REG(CCM_MPCTL), infreq);
}
u32 mx31_get_mcu_main_clk(void)
static u32 mx31_get_mcu_main_clk(void)
{
/* For now we assume mpl_dpdgck_clk == mcu_main_clk
* which should be correct for most boards

View File

@@ -69,4 +69,4 @@ int usb_cpu_init_fail (void)
}
# endif /* defined(CONFIG_S3C2400) || defined(CONFIG_S3C2410) */
#endif /* defined(CONFIG_USB_OHCI) && defined(CFG_USB_OHCI_CPU_INIT) */
#endif /* defined(CONFIG_USB_OHCI_NEW) && defined(CFG_USB_OHCI_CPU_INIT) */

View File

@@ -1,6 +1,6 @@
#
# (C) Copyright 2000-2008
# Wolfgang Denk, DENX Software Engineering, wd <at> denx.de.
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
# See file CREDITS for list of people who contributed to this
# project.

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this

View File

@@ -2,7 +2,7 @@
* AT91CAP9/SAM9 setup stuff
*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2007-2008
* Stelian Pop <stelian.pop <at> leadtechdesign.com>
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this

View File

@@ -1,6 +1,6 @@
/*
* (C) Copyright 2006
* DENX Software Engineering <mk <at> denx.de>
* DENX Software Engineering <mk@denx.de>
*
* See file CREDITS for list of people who contributed to this
* project.

View File

@@ -55,7 +55,7 @@ early_board_init_ret:
/* so we try to indicate progress */
movw $0x01, %ax
movl $.progress0, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress0:
/* size memory */
@@ -74,7 +74,7 @@ mem_init_ret:
/* indicate (lack of) progress */
movw $0x81, %ax
movl $.progress0a, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress0a:
jmp die
mem_ok:
@@ -82,7 +82,7 @@ mem_ok:
/* indicate progress */
movw $0x02, %ax
movl $.progress1, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress1:
/* create a stack after the bss */
@@ -104,7 +104,7 @@ no_stack:
/* indicate (lack of) progress */
movw $0x82, %ax
movl $.progress1a, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress1a:
jmp die
@@ -113,7 +113,7 @@ stack_ok:
/* indicate progress */
movw $0x03, %ax
movl $.progress2, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress2:
/* copy data section to ram, size must be 4-byte aligned */
@@ -136,7 +136,7 @@ data_fail:
/* indicate (lack of) progress */
movw $0x83, %ax
movl $.progress2a, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress2a:
jmp die
@@ -145,7 +145,7 @@ data_ok:
/* indicate progress */
movw $0x04, %ax
movl $.progress3, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress3:
/* clear bss section in ram, size must be 4-byte aligned */
@@ -168,7 +168,7 @@ bss_fail:
/* indicate (lack of) progress */
movw $0x84, %ax
movl $.progress3a, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress3a:
jmp die
@@ -180,7 +180,7 @@ bss_ok:
/* indicate progress */
movw $0x05, %ax
movl $.progress4, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress4:
call start_i386boot /* Enter, U-boot! */
@@ -188,7 +188,7 @@ bss_ok:
/* indicate (lack of) progress */
movw $0x85, %ax
movl $.progress4a, %ebp
jmp __show_boot_progress
jmp show_boot_progress
.progress4a:
die: hlt

View File

@@ -240,14 +240,16 @@ NESTED(mips_cache_reset, 0, ra)
*/
move a1, t2
move a2, t4
bal mips_init_icache
PTR_LA t7, mips_init_icache
jalr t7
/*
* then initialize D-cache.
*/
move a1, t3
move a2, t5
bal mips_init_dcache
PTR_LA t7, mips_init_dcache
jalr t7
jr RA
END(mips_cache_reset)
@@ -285,6 +287,22 @@ LEAF(dcache_disable)
jr ra
END(dcache_disable)
/*******************************************************************************
*
* dcache_enable - enable cache
*
* RETURNS: N/A
*
*/
LEAF(dcache_enable)
mfc0 t0, CP0_CONFIG
ori t0, CONF_CM_CMASK
xori t0, CONF_CM_CMASK
ori t0, CONF_CM_CACHABLE_NONCOHERENT
mtc0 t0, CP0_CONFIG
jr ra
END(dcache_enable)
#ifdef CFG_INIT_RAM_LOCK_MIPS
/*******************************************************************************
*

View File

@@ -20,7 +20,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA
#
v=$(shell $(AS) --version |grep "GNU assembler" |cut -d. -f2)
v=$(shell $(AS) --version | grep 'GNU assembler' | egrep -o '2\.[0-9\.]+' | cut -d. -f2)
MIPSFLAGS:=$(shell \
if [ "$v" -lt "14" ]; then \
echo "-mcpu=4kc"; \

View File

@@ -345,7 +345,8 @@ relocate_code:
jr t0
nop
.gpword _GLOBAL_OFFSET_TABLE_ /* _GLOBAL_OFFSET_TABLE_ - _gp */
.word _gp
.word _GLOBAL_OFFSET_TABLE_
.word uboot_end_data
.word uboot_end
.word num_got_entries
@@ -358,8 +359,10 @@ in_ram:
* generated by GNU ld. Skip these reserved entries from relocation.
*/
lw t3, -4(t0) /* t3 <-- num_got_entries */
lw t4, -16(t0) /* t4 <-- (_GLOBAL_OFFSET_TABLE_ - _gp) */
add t4, t4, gp /* t4 now holds _GLOBAL_OFFSET_TABLE_ */
lw t4, -16(t0) /* t4 <-- _GLOBAL_OFFSET_TABLE_ */
lw t5, -20(t0) /* t5 <-- _gp */
sub t4, t5 /* compute offset*/
add t4, t4, gp /* t4 now holds relocated _GLOBAL_OFFSET_TABLE_ */
addi t4, t4, 8 /* Skipping first two entries. */
li t2, 2
1:

View File

@@ -25,3 +25,4 @@ PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi
PLATFORM_CPPFLAGS += -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 \
-Wa,-me500 -msoft-float -mno-string
PLATFORM_CPPFLAGS +=$(call cc-option,-mno-spe)

View File

@@ -103,6 +103,10 @@ int cpu_release(int nr, int argc, char *argv[])
}
table[BOOT_ENTRY_ADDR_UPPER] = (u32)(boot_addr >> 32);
/* ensure all table updates complete before final address write */
eieio();
table[BOOT_ENTRY_ADDR_LOWER] = (u32)(boot_addr & 0xffffffff);
return 0;
@@ -153,7 +157,7 @@ static void pq3_mp_up(unsigned long bootpg)
/* wait for everyone */
while (timeout) {
int i;
for (i = 1; i < CONFIG_NR_CPUS; i++) {
for (i = 0; i < CONFIG_NR_CPUS; i++) {
if (table[i * NUM_BOOT_ENTRY + BOOT_ENTRY_ADDR_LOWER])
cpu_up_mask |= (1 << i);
};

View File

@@ -114,6 +114,7 @@ __secondary_start_page:
lwz r4,ENTRY_ADDR_LOWER(r10)
andi. r11,r4,1
bne 2b
isync
/* get the upper bits of the addr */
lwz r11,ENTRY_ADDR_UPPER(r10)
@@ -169,7 +170,7 @@ __secondary_start_page:
mtspr SPRN_SRR1,r13
rfi
.align 3
.align L1_CACHE_SHIFT
.globl __spin_table
__spin_table:
.space CONFIG_NR_CPUS*ENTRY_SIZE

View File

@@ -610,8 +610,8 @@ spd_sdram(void)
/*
* Sneak in some Extended Refresh Recovery.
*/
ddr->ext_refrec = (trfc_high << 16);
debug("DDR: ext_refrec = 0x%08x\n", ddr->ext_refrec);
ddr->timing_cfg_3 = (trfc_high << 16);
debug("DDR: timing_cfg_3 = 0x%08x\n", ddr->timing_cfg_3);
ddr->timing_cfg_1 =
(0

View File

@@ -338,7 +338,7 @@ _GLOBAL(l2cache_invalidate)
invl2:
mfspr r3, l2cr
andi. r3, r3, L2CR_L2I@h
andis. r3, r3, L2CR_L2I@h
bne invl2
blr

View File

@@ -644,8 +644,8 @@ spd_init(unsigned char i2c_address, unsigned int ddr_num,
/*
* Sneak in some Extended Refresh Recovery.
*/
ddr->ext_refrec = (trfc_high << 16);
debug("DDR: ext_refrec = 0x%08x\n", ddr->ext_refrec);
ddr->timing_cfg_3 = (trfc_high << 16);
debug("DDR: timing_cfg_3 = 0x%08x\n", ddr->timing_cfg_3);
ddr->timing_cfg_1 =
(0

View File

@@ -105,8 +105,20 @@ int get_clocks(void)
get_sys_info(&sys_info);
gd->cpu_clk = sys_info.freqProcessor;
gd->bus_clk = sys_info.freqSystemBus;
/*
* The base clock for I2C depends on the actual SOC. Unfortunately,
* there is no pattern that can be used to determine the frequency, so
* the only choice is to look up the actual SOC number and use the value
* for that SOC. This information is taken from application note
* AN2919.
*/
#ifdef CONFIG_MPC8610
gd->i2c1_clk = sys_info.freqSystemBus;
gd->i2c2_clk = sys_info.freqSystemBus;
#else
gd->i2c1_clk = sys_info.freqSystemBus / 2;
#endif
gd->i2c2_clk = gd->i2c1_clk;
if (gd->cpu_clk != 0)
return 0;

View File

@@ -1,7 +1,10 @@
/*
* cpu/ppc4xx/44x_spd_ddr2.c
* This SPD SDRAM detection code supports AMCC PPC44x cpu's with a
* DDR2 controller (non Denali Core). Those are 440SP/SPe.
* DDR2 controller (non Denali Core). Those currently are:
*
* 405: 405EX
* 440/460: 440SP/440SPe/460EX/460GT
*
* (C) Copyright 2007-2008
* Stefan Roese, DENX Software Engineering, sr@denx.de.
@@ -40,6 +43,7 @@
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/cache.h>
#if defined(CONFIG_SPD_EEPROM) && \
(defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
@@ -237,7 +241,6 @@ static void DQS_calibration_process(void);
static void ppc440sp_sdram_register_dump(void);
int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
void dcbz_area(u32 start_address, u32 num_bytes);
void dflush(void);
static u32 mfdcr_any(u32 dcr)
{
@@ -2078,7 +2081,7 @@ static void program_bxcf(unsigned long *dimm_populated,
if (num_banks == 4)
ind = 0;
else
ind = 5;
ind = 5 << 8;
switch (num_col_addr) {
case 0x08:
mode |= (SDRAM_BXCF_M_AM_0 + ind);
@@ -2355,7 +2358,8 @@ static void program_ecc_addr(unsigned long start_address,
} else {
/* ECC bit set method for cached memory */
dcbz_area(start_address, num_bytes);
dflush();
/* Write modified dcache lines back to memory */
clean_dcache_range(start_address, start_address + num_bytes);
}
blank_string(strlen(str));

View File

@@ -346,6 +346,26 @@ int checkcpu (void)
strcpy(addstr, "No Security support");
break;
case PVR_405EX1_RC:
puts("EX Rev. C");
strcpy(addstr, "Security support");
break;
case PVR_405EX2_RC:
puts("EX Rev. C");
strcpy(addstr, "No Security support");
break;
case PVR_405EXR1_RC:
puts("EXr Rev. C");
strcpy(addstr, "Security support");
break;
case PVR_405EXR2_RC:
puts("EXr Rev. C");
strcpy(addstr, "No Security support");
break;
#if defined(CONFIG_440)
case PVR_440GP_RB:
puts("GP Rev. B");

View File

@@ -45,6 +45,7 @@
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/mmu.h>
#include <asm/cache.h>
#if defined(CONFIG_SPD_EEPROM) && \
(defined(CONFIG_440EPX) || defined(CONFIG_440GRX))
@@ -92,7 +93,6 @@
extern int denali_wait_for_dlllock(void);
extern void denali_core_search_data_eye(void);
extern void dcbz_area(u32 start_address, u32 num_bytes);
extern void dflush(void);
/*
* Board-specific Platform code can reimplement spd_ddr_init_hang () if needed
@@ -1201,7 +1201,8 @@ long int initdram(int board_type)
#else
#error Please define CFG_MEM_TOP_HIDE (see README) in your board config file
#endif
dflush();
/* Write modified dcache lines back to memory */
clean_dcache_range(CFG_SDRAM_BASE, CFG_SDRAM_BASE + dram_size - CFG_MEM_TOP_HIDE);
debug("Completed\n");
sync();
remove_tlb(CFG_SDRAM_BASE, dram_size);

View File

@@ -1,5 +1,5 @@
/*
* (C) Copyright 2007
* (C) Copyright 2007-2008
* Stefan Roese, DENX Software Engineering, sr@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -27,7 +27,7 @@
#include <asm/cache.h>
#include <ppc4xx.h>
#if defined(CONFIG_OF_LIBFDT)
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
#include <libfdt.h>
#include <libfdt_env.h>
#include <fdt_support.h>
@@ -35,6 +35,26 @@
DECLARE_GLOBAL_DATA_PTR;
void __ft_board_setup(void *blob, bd_t *bd)
{
u32 val[4];
int rc;
ft_cpu_setup(blob, bd);
/* Fixup NOR mapping */
val[0] = 0; /* chip select number */
val[1] = 0; /* always 0 */
val[2] = gd->bd->bi_flashstart;
val[3] = gd->bd->bi_flashsize;
rc = fdt_find_and_setprop(blob, "/plb/opb/ebc", "ranges",
val, sizeof(val), 1);
if (rc)
printf("Unable to update property NOR mapping, err=%s\n",
fdt_strerror(rc));
}
void ft_board_setup(void *blob, bd_t *bd) __attribute__((weak, alias("__ft_board_setup")));
/*
* Fixup all PCIe nodes by setting the device_type property
* to "pci-endpoint" instead is "pci" for endpoint ports.
@@ -83,8 +103,14 @@ void ft_cpu_setup(void *blob, bd_t *bd)
bd->bi_intfreq, 1);
do_fixup_by_path_u32(blob, "/plb", "clock-frequency", sys_info.freqPLB, 1);
do_fixup_by_path_u32(blob, "/plb/opb", "clock-frequency", sys_info.freqOPB, 1);
do_fixup_by_path_u32(blob, "/plb/opb/ebc", "clock-frequency",
sys_info.freqEBC, 1);
if (fdt_path_offset(blob, "/plb/opb/ebc") >= 0)
do_fixup_by_path_u32(blob, "/plb/opb/ebc", "clock-frequency",
sys_info.freqEBC, 1);
else
do_fixup_by_path_u32(blob, "/plb/ebc", "clock-frequency",
sys_info.freqEBC, 1);
fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
/*
@@ -103,4 +129,4 @@ void ft_cpu_setup(void *blob, bd_t *bd)
*/
fdt_pcie_setup(blob);
}
#endif /* CONFIG_OF_LIBFDT */
#endif /* CONFIG_OF_LIBFDT && CONFIG_OF_BOARD_SETUP */

View File

@@ -238,7 +238,7 @@ static u8 pll_fbdv_multi_bits[] = {
/* values for: 101 - 200 */
0x78, 0xf1, 0x62, 0xc5, 0x0a, 0x94, 0x28, 0xd0, 0x21, 0xc3,
0x06, 0x8c, 0x18, 0xb0, 0x60, 0xc1, 0x02, 0x84, 0x08, 0x90,
0x20, 0xc0, 0x01, 0x83, 0x77, 0xff, 0x1f, 0xbf, 0x7f, 0xfe,
0x20, 0xc0, 0x01, 0x83, 0x07, 0x8f, 0x1f, 0xbf, 0x7f, 0xfe,
0x7d, 0xfa, 0x75, 0xea, 0x55, 0xaa, 0x54, 0xa9, 0x53, 0xa6,
0x4c, 0x99, 0x33, 0xe7, 0x4e, 0x9d, 0x3b, 0xf7, 0x6e, 0xdd,
0x3a, 0xf4, 0x69, 0xd2, 0x25, 0xcb, 0x16, 0xac, 0x58, 0xb1,

View File

@@ -1675,35 +1675,6 @@ trap_reloc:
sync
blr
function_epilog(dcbz_area)
/*----------------------------------------------------------------------------+
| dflush. Assume 32K at vector address is cachable.
+----------------------------------------------------------------------------*/
function_prolog(dflush)
mfmsr r9
rlwinm r8,r9,0,15,13
rlwinm r8,r8,0,17,15
mtmsr r8
mfspr r8,dvlim
addi r3,r0,0x0000
mtspr dvlim,r3
mfspr r3,ivpr
addi r4,r0,1024
mtctr r4
..dflush_loop:
lwz r6,0x0(r3)
addi r3,r3,32
bdnz ..dflush_loop
addi r3,r3,-32
mtctr r4
..ag: dcbf r0,r3
addi r3,r3,-32
bdnz ..ag
mtspr dvlim,r8
sync
mtmsr r9
blr
function_epilog(dflush)
#endif /* CONFIG_440 */
#endif /* CONFIG_NAND_SPL */

View File

@@ -166,17 +166,13 @@ _start_armboot: .word start_armboot
/* */
/****************************************************************************/
/* mk@tbd: Fix this! */
#if defined(CONFIG_PXA250) || defined(CONFIG_CPU_MONAHANS)
#undef RCSR
#undef ICMR
#undef OSMR3
#undef OSCR
#undef OWER
#undef OIER
#endif /* CONFIG_PXA250 || CONFIG_CPU_MONAHANS */
#ifdef CONFIG_PXA250
#undef RCSR
#undef CCCR
#endif /* CONFIG_PXA250 */
/* Interrupt-Controller base address */
IC_BASE: .word 0x40d00000

View File

@@ -109,44 +109,45 @@ void dev_print (block_dev_desc_t *dev_desc)
lbaint_t lba512;
#endif
if (dev_desc->type==DEV_TYPE_UNKNOWN) {
puts ("not available\n");
return;
}
if (dev_desc->if_type==IF_TYPE_SCSI) {
printf ("(%d:%d) ", dev_desc->target,dev_desc->lun);
}
if (dev_desc->if_type==IF_TYPE_IDE) {
printf ("Model: %s Firm: %s Ser#: %s\n",
dev_desc->vendor,
dev_desc->revision,
dev_desc->product);
}
if (dev_desc->if_type==IF_TYPE_SATA) {
printf ("Model: %s Firm: %s Ser#: %s\n",
dev_desc->vendor,
dev_desc->revision,
dev_desc->product);
} else {
printf ("Vendor: %s Prod.: %s Rev: %s\n",
switch (dev_desc->type) {
case IF_TYPE_SCSI:
printf ("(%d:%d) Vendor: %s Prod.: %s Rev: %s\n",
dev_desc->target,dev_desc->lun,
dev_desc->vendor,
dev_desc->product,
dev_desc->revision);
break;
case IF_TYPE_IDE:
case IF_TYPE_SATA:
printf ("Model: %s Firm: %s Ser#: %s\n",
dev_desc->vendor,
dev_desc->revision,
dev_desc->product);
break;
case DEV_TYPE_UNKNOWN:
default:
puts ("not available\n");
return;
}
puts (" Type: ");
if (dev_desc->removable)
puts ("Removable ");
switch (dev_desc->type & 0x1F) {
case DEV_TYPE_HARDDISK: puts ("Hard Disk");
break;
case DEV_TYPE_CDROM: puts ("CD ROM");
break;
case DEV_TYPE_OPDISK: puts ("Optical Device");
break;
case DEV_TYPE_TAPE: puts ("Tape");
break;
default: printf ("# %02X #", dev_desc->type & 0x1F);
break;
case DEV_TYPE_HARDDISK:
puts ("Hard Disk");
break;
case DEV_TYPE_CDROM:
puts ("CD ROM");
break;
case DEV_TYPE_OPDISK:
puts ("Optical Device");
break;
case DEV_TYPE_TAPE:
puts ("Tape");
break;
default:
printf ("# %02X #", dev_desc->type & 0x1F);
break;
}
puts ("\n");
if ((dev_desc->lba * dev_desc->blksz)>0L) {
@@ -281,20 +282,27 @@ static void print_part_header (const char *type, block_dev_desc_t * dev_desc)
{
puts ("\nPartition Map for ");
switch (dev_desc->if_type) {
case IF_TYPE_IDE: puts ("IDE");
break;
case IF_TYPE_SATA: puts ("SATA");
break;
case IF_TYPE_SCSI: puts ("SCSI");
break;
case IF_TYPE_ATAPI: puts ("ATAPI");
break;
case IF_TYPE_USB: puts ("USB");
break;
case IF_TYPE_DOC: puts ("DOC");
break;
default: puts ("UNKNOWN");
break;
case IF_TYPE_IDE:
puts ("IDE");
break;
case IF_TYPE_SATA:
puts ("SATA");
break;
case IF_TYPE_SCSI:
puts ("SCSI");
break;
case IF_TYPE_ATAPI:
puts ("ATAPI");
break;
case IF_TYPE_USB:
puts ("USB");
break;
case IF_TYPE_DOC:
puts ("DOC");
break;
default:
puts ("UNKNOWN");
break;
}
printf (" device %d -- Partition Type: %s\n\n",
dev_desc->dev, type);

View File

@@ -9,7 +9,7 @@ The PPC440EP(x)/GR(x) cpu's can boot directly from NAND FLASH,
completely without NOR FLASH. This can be done by using the NAND
boot feature of the 440 NAND flash controller (NDFC).
Here a short desciption of the different boot stages:
Here a short description of the different boot stages:
a) IPL (Initial Program Loader, integrated inside CPU)
------------------------------------------------------

18
doc/README.qemu_mips Normal file
View File

@@ -0,0 +1,18 @@
Notes for the Qemu MIPS port
Example usage:
# ln -s u-boot.bin mips_bios.bin
start it:
qemu-system-mips -L . /dev/null -nographic
or
if you use a qemu version after commit 4224
create image:
# dd of=flash bs=1k count=4k if=/dev/zero
# dd of=flash bs=1k conv=notrunc if=u-boot.bin
start it:
# qemu-system-mips -pflash flash -monitor null -nographic

View File

@@ -21,7 +21,7 @@
#include <asm/errno.h>
/* It should access 16-bit instead of 8-bit */
static inline void *memcpy(void *dst, const void *src, unsigned int len)
static inline void *memcpy_16(void *dst, const void *src, unsigned int len)
{
void *ret = dst;
short *d = dst;
@@ -358,7 +358,7 @@ static int onenand_read_bufferram(struct mtd_info *mtd, int area,
bufferram = this->base + area;
bufferram += onenand_bufferram_offset(mtd, area);
memcpy(buffer, bufferram + offset, count);
memcpy_16(buffer, bufferram + offset, count);
return 0;
}
@@ -385,7 +385,7 @@ static int onenand_sync_read_bufferram(struct mtd_info *mtd, int area,
this->mmcontrol(mtd, ONENAND_SYS_CFG1_SYNC_READ);
memcpy(buffer, bufferram + offset, count);
memcpy_16(buffer, bufferram + offset, count);
this->mmcontrol(mtd, 0);
@@ -412,7 +412,7 @@ static int onenand_write_bufferram(struct mtd_info *mtd, int area,
bufferram = this->base + area;
bufferram += onenand_bufferram_offset(mtd, area);
memcpy(bufferram + offset, buffer, count);
memcpy_16(bufferram + offset, buffer, count);
return 0;
}

View File

@@ -42,7 +42,10 @@ COBJS-y += lan91c96.o
COBJS-y += macb.o
COBJS-y += mcffec.o
COBJS-y += natsemi.o
COBJS-$(CONFIG_DRIVER_NE2000) += ne2000.o
ifeq ($(CONFIG_DRIVER_NE2000),y)
COBJS-y += ne2000.o
COBJS-$(CONFIG_DRIVER_AX88796L) += ax88796.o
endif
COBJS-y += netarm_eth.o
COBJS-y += netconsole.o
COBJS-y += ns7520_eth.o

156
drivers/net/ax88796.c Normal file
View File

@@ -0,0 +1,156 @@
/*
* (c) 2007 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
*
* 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 <common.h>
#include "ax88796.h"
/*
* Set 1 bit data
*/
static void ax88796_bitset(u32 bit)
{
/* DATA1 */
if( bit )
EEDI_HIGH;
else
EEDI_LOW;
EECLK_LOW;
udelay(1000);
EECLK_HIGH;
udelay(1000);
EEDI_LOW;
}
/*
* Get 1 bit data
*/
static u8 ax88796_bitget(void)
{
u8 bit;
EECLK_LOW;
udelay(1000);
/* DATA */
bit = EEDO;
EECLK_HIGH;
udelay(1000);
return bit;
}
/*
* Send COMMAND to EEPROM
*/
static void ax88796_eep_cmd(u8 cmd)
{
ax88796_bitset(BIT_DUMMY);
switch(cmd){
case MAC_EEP_READ:
ax88796_bitset(1);
ax88796_bitset(1);
ax88796_bitset(0);
break;
case MAC_EEP_WRITE:
ax88796_bitset(1);
ax88796_bitset(0);
ax88796_bitset(1);
break;
case MAC_EEP_ERACE:
ax88796_bitset(1);
ax88796_bitset(1);
ax88796_bitset(1);
break;
case MAC_EEP_EWEN:
ax88796_bitset(1);
ax88796_bitset(0);
ax88796_bitset(0);
break;
case MAC_EEP_EWDS:
ax88796_bitset(1);
ax88796_bitset(0);
ax88796_bitset(0);
break;
default:
break;
}
}
static void ax88796_eep_setaddr(u16 addr)
{
int i ;
for( i = 7 ; i >= 0 ; i-- )
ax88796_bitset(addr & (1 << i));
}
/*
* Get data from EEPROM
*/
static u16 ax88796_eep_getdata(void)
{
ushort data = 0;
int i;
ax88796_bitget(); /* DUMMY */
for( i = 0 ; i < 16 ; i++ ){
data <<= 1;
data |= ax88796_bitget();
}
return data;
}
static void ax88796_mac_read(u8 *buff)
{
int i ;
u16 data;
u16 addr = 0;
for( i = 0 ; i < 3; i++ )
{
EECS_HIGH;
EEDI_LOW;
udelay(1000);
/* READ COMMAND */
ax88796_eep_cmd(MAC_EEP_READ);
/* ADDRESS */
ax88796_eep_setaddr(addr++);
/* GET DATA */
data = ax88796_eep_getdata();
*buff++ = (uchar)(data & 0xff);
*buff++ = (uchar)((data >> 8) & 0xff);
EECLK_LOW;
EEDI_LOW;
EECS_LOW;
}
}
int get_prom(u8* mac_addr)
{
u8 prom[32];
int i;
ax88796_mac_read(prom);
for (i = 0; i < 6; i++){
mac_addr[i] = prom[i];
}
return 1;
}

View File

@@ -78,140 +78,4 @@
#define DP_OUT_DATA(_b_, _d_) *( (vu_short *) ((_b_)+ISA_OFFSET)) = (_d_)
#endif
/*
* Set 1 bit data
*/
static void ax88796_bitset(u32 bit)
{
/* DATA1 */
if( bit )
EEDI_HIGH;
else
EEDI_LOW;
EECLK_LOW;
udelay(1000);
EECLK_HIGH;
udelay(1000);
EEDI_LOW;
}
/*
* Get 1 bit data
*/
static u8 ax88796_bitget(void)
{
u8 bit;
EECLK_LOW;
udelay(1000);
/* DATA */
bit = EEDO;
EECLK_HIGH;
udelay(1000);
return bit;
}
/*
* Send COMMAND to EEPROM
*/
static void ax88796_eep_cmd(u8 cmd)
{
ax88796_bitset(BIT_DUMMY);
switch(cmd){
case MAC_EEP_READ:
ax88796_bitset(1);
ax88796_bitset(1);
ax88796_bitset(0);
break;
case MAC_EEP_WRITE:
ax88796_bitset(1);
ax88796_bitset(0);
ax88796_bitset(1);
break;
case MAC_EEP_ERACE:
ax88796_bitset(1);
ax88796_bitset(1);
ax88796_bitset(1);
break;
case MAC_EEP_EWEN:
ax88796_bitset(1);
ax88796_bitset(0);
ax88796_bitset(0);
break;
case MAC_EEP_EWDS:
ax88796_bitset(1);
ax88796_bitset(0);
ax88796_bitset(0);
break;
default:
break;
}
}
static void ax88796_eep_setaddr(u16 addr)
{
int i ;
for( i = 7 ; i >= 0 ; i-- )
ax88796_bitset(addr & (1 << i));
}
/*
* Get data from EEPROM
*/
static u16 ax88796_eep_getdata(void)
{
ushort data = 0;
int i;
ax88796_bitget(); /* DUMMY */
for( i = 0 ; i < 16 ; i++ ){
data <<= 1;
data |= ax88796_bitget();
}
return data;
}
static void ax88796_mac_read(u8 *buff)
{
int i ;
u16 data, addr = 0;
for( i = 0 ; i < 3; i++ )
{
EECS_HIGH;
EEDI_LOW;
udelay(1000);
/* READ COMMAND */
ax88796_eep_cmd(MAC_EEP_READ);
/* ADDRESS */
ax88796_eep_setaddr(addr++);
/* GET DATA */
data = ax88796_eep_getdata();
*buff++ = (uchar)(data & 0xff);
*buff++ = (uchar)((data >> 8) & 0xff);
EECLK_LOW;
EEDI_LOW;
EECS_LOW;
}
}
int get_prom(u8* mac_addr)
{
u8 prom[32];
int i;
ax88796_mac_read(prom);
for (i = 0; i < 6; i++){
mac_addr[i] = prom[i];
}
return 1;
}
#endif /* __DRIVERS_AX88796L_H__ */

View File

@@ -65,14 +65,14 @@ static unsigned short get_reg_init_bus (int regno)
c = CS8900_BUS16_0;
CS8900_PPTR = regno;
return (unsigned short) CS8900_PDATA;
return CS8900_PDATA;
}
#endif
static unsigned short get_reg (int regno)
{
CS8900_PPTR = regno;
return (unsigned short) CS8900_PDATA;
return CS8900_PDATA;
}
@@ -131,7 +131,7 @@ void cs8900_get_enetaddr (uchar * addr)
if (get_reg_init_bus (PP_ChipID) != 0x630e)
return;
eth_reset ();
if ((get_reg (PP_SelfST) & (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) ==
if ((get_reg (PP_SelfSTAT) & (PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) ==
(PP_SelfSTAT_EEPROM | PP_SelfSTAT_EEPROM_OK)) {
/* Load the MAC from EEPROM */
@@ -168,7 +168,6 @@ void cs8900_get_enetaddr (uchar * addr)
debug ("### Set environment from HW MAC addr = \"%s\"\n", ethaddr);
setenv ("ethaddr", ethaddr);
}
}
}
@@ -183,7 +182,6 @@ void eth_halt (void)
int eth_init (bd_t * bd)
{
/* verify chip id */
if (get_reg_init_bus (PP_ChipID) != 0x630e) {
printf ("CS8900 Ethernet chip not found?!\n");
@@ -201,7 +199,7 @@ int eth_init (bd_t * bd)
}
/* Get a data block via Ethernet */
extern int eth_rx (void)
int eth_rx (void)
{
int i;
unsigned short rxlen;
@@ -233,7 +231,7 @@ extern int eth_rx (void)
}
/* Send a data block via Ethernet. */
extern int eth_send (volatile void *packet, int length)
int eth_send (volatile void *packet, int length)
{
volatile unsigned short *addr;
int tmo;
@@ -281,7 +279,8 @@ retry:
static void cs8900_e2prom_ready(void)
{
while(get_reg(PP_SelfST) & SI_BUSY);
while (get_reg(PP_SelfSTAT) & SI_BUSY)
;
}
/***********************************************************/

View File

@@ -243,7 +243,6 @@
/* EEPROM Kram */
#define SI_BUSY 0x0100
#define PP_SelfST 0x0136 /* Self State register */
#define PP_EECMD 0x0040 /* NVR Interface Command register */
#define PP_EEData 0x0042 /* NVR Interface Data Register */
#define EEPROM_WRITE_EN 0x00F0

View File

@@ -95,7 +95,11 @@ struct fec_info_dma fec_info[] = {
0, /* duplex and speed */
0, /* phy name */
0, /* phy name init */
#ifdef CFG_DMA_USE_INTSRAM
DBUF_LENGTH, /* RX BD */
#else
0, /* RX BD */
#endif
0, /* TX BD */
0, /* rx Index */
0, /* tx Index */
@@ -164,7 +168,8 @@ static void dbg_fec_regs(struct eth_device *dev)
}
#endif
static void set_fec_duplex_speed(volatile fecdma_t * fecp, bd_t * bd, int dup_spd)
static void set_fec_duplex_speed(volatile fecdma_t * fecp, bd_t * bd,
int dup_spd)
{
if ((dup_spd >> 16) == FULL) {
/* Set maximum frame length */
@@ -513,6 +518,9 @@ int mcdmafec_initialize(bd_t * bis)
{
struct eth_device *dev;
int i;
#ifdef CFG_DMA_USE_INTSRAM
u32 tmp = CFG_INTSRAM + 0x2000;
#endif
for (i = 0; i < sizeof(fec_info) / sizeof(fec_info[0]); i++) {
@@ -533,6 +541,17 @@ int mcdmafec_initialize(bd_t * bis)
dev->recv = fec_recv;
/* setup Receive and Transmit buffer descriptor */
#ifdef CFG_DMA_USE_INTSRAM
fec_info[i].rxbd = (int)fec_info[i].rxbd + tmp;
tmp = fec_info[i].rxbd;
fec_info[i].txbd =
(int)fec_info[i].txbd + tmp + (PKTBUFSRX * sizeof(cbd_t));
tmp = fec_info[i].txbd;
fec_info[i].txbuf =
(int)fec_info[i].txbuf + tmp +
(CFG_TX_ETH_BUFFER * sizeof(cbd_t));
tmp = fec_info[i].txbuf;
#else
fec_info[i].rxbd =
(cbd_t *) memalign(CFG_CACHELINE_SIZE,
(PKTBUFSRX * sizeof(cbd_t)));
@@ -541,6 +560,7 @@ int mcdmafec_initialize(bd_t * bis)
(CFG_TX_ETH_BUFFER * sizeof(cbd_t)));
fec_info[i].txbuf =
(char *)memalign(CFG_CACHELINE_SIZE, DBUF_LENGTH);
#endif
#ifdef ET_DEBUG
printf("rxbd %x txbd %x\n",

View File

@@ -126,6 +126,9 @@ dp83902a_init(void)
{
dp83902a_priv_data_t *dp = &nic;
u8* base;
#if defined(NE2000_BASIC_INIT)
int i;
#endif
DEBUG_FUNCTION();
@@ -755,8 +758,6 @@ static hw_info_t hw_info[] = {
#define NR_INFO (sizeof(hw_info)/sizeof(hw_info_t))
static hw_info_t default_info = { 0, 0, 0, 0, 0 };
u8 dev_addr[6];
#define PCNET_CMD 0x00
@@ -764,6 +765,93 @@ u8 dev_addr[6];
#define PCNET_RESET 0x1f /* Issue a read to reset, a write to clear. */
#define PCNET_MISC 0x18 /* For IBM CCAE and Socket EA cards */
static void pcnet_reset_8390(void)
{
int i, r;
PRINTK("nic base is %lx\n", nic_base);
n2k_outb(E8390_NODMA + E8390_PAGE0+E8390_STOP, E8390_CMD);
PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE1+E8390_STOP, E8390_CMD);
PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
PRINTK("cmd (at %lx) is %x\n", nic_base + E8390_CMD, n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
n2k_outb(n2k_inb(PCNET_RESET), PCNET_RESET);
for (i = 0; i < 100; i++) {
if ((r = (n2k_inb(EN0_ISR) & ENISR_RESET)) != 0)
break;
PRINTK("got %x in reset\n", r);
udelay(100);
}
n2k_outb(ENISR_RESET, EN0_ISR); /* Ack intr. */
if (i == 100)
printf("pcnet_reset_8390() did not complete.\n");
} /* pcnet_reset_8390 */
int get_prom(u8* mac_addr) __attribute__ ((weak, alias ("__get_prom")));
int __get_prom(u8* mac_addr)
{
u8 prom[32];
int i, j;
struct {
u_char value, offset;
} program_seq[] = {
{E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD}, /* Select page 0*/
{0x48, EN0_DCFG}, /* Set byte-wide (0x48) access. */
{0x00, EN0_RCNTLO}, /* Clear the count regs. */
{0x00, EN0_RCNTHI},
{0x00, EN0_IMR}, /* Mask completion irq. */
{0xFF, EN0_ISR},
{E8390_RXOFF, EN0_RXCR}, /* 0x20 Set to monitor */
{E8390_TXOFF, EN0_TXCR}, /* 0x02 and loopback mode. */
{32, EN0_RCNTLO},
{0x00, EN0_RCNTHI},
{0x00, EN0_RSARLO}, /* DMA starting at 0x0000. */
{0x00, EN0_RSARHI},
{E8390_RREAD+E8390_START, E8390_CMD},
};
PRINTK ("trying to get MAC via prom reading\n");
pcnet_reset_8390 ();
mdelay (10);
for (i = 0; i < sizeof (program_seq) / sizeof (program_seq[0]); i++)
n2k_outb (program_seq[i].value, program_seq[i].offset);
PRINTK ("PROM:");
for (i = 0; i < 32; i++) {
prom[i] = n2k_inb (PCNET_DATAPORT);
PRINTK (" %02x", prom[i]);
}
PRINTK ("\n");
for (i = 0; i < NR_INFO; i++) {
if ((prom[0] == hw_info[i].a0) &&
(prom[2] == hw_info[i].a1) &&
(prom[4] == hw_info[i].a2)) {
PRINTK ("matched board %d\n", i);
break;
}
}
if ((i < NR_INFO) || ((prom[28] == 0x57) && (prom[30] == 0x57))) {
PRINTK ("on exit i is %d/%ld\n", i, NR_INFO);
PRINTK ("MAC address is ");
for (j = 0; j < 6; j++) {
mac_addr[j] = prom[j << 1];
PRINTK ("%02x:", mac_addr[i]);
}
PRINTK ("\n");
return (i < NR_INFO) ? i : 0;
}
return 0;
}
u32 nic_base;
/* U-boot specific routines */
@@ -790,7 +878,7 @@ void uboot_push_tx_done(int key, int val) {
}
int eth_init(bd_t *bd) {
static hw_info_t * r;
int r;
char ethaddr[20];
PRINTK("### eth_init\n");

View File

@@ -81,6 +81,7 @@ are GPL, so this is, of course, GPL.
#define DP_DATA 0x10
#define START_PG 0x50 /* First page of TX buffer */
#define START_PG2 0x48
#define STOP_PG 0x80 /* Last page +1 of RX ring */
#define RX_START 0x50
@@ -90,90 +91,4 @@ are GPL, so this is, of course, GPL.
#define DP_OUT(_b_, _o_, _d_) *( (vu_char *) ((_b_)+(_o_))) = (_d_)
#define DP_IN_DATA(_b_, _d_) (_d_) = *( (vu_char *) ((_b_)))
#define DP_OUT_DATA(_b_, _d_) *( (vu_char *) ((_b_))) = (_d_)
static void pcnet_reset_8390(void)
{
int i, r;
PRINTK("nic base is %lx\n", nic_base);
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE1+E8390_STOP, E8390_CMD);
PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
PRINTK("cmd (at %lx) is %x\n", nic_base+ E8390_CMD, n2k_inb(E8390_CMD));
n2k_outb(E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD);
n2k_outb(n2k_inb(PCNET_RESET), PCNET_RESET);
for (i = 0; i < 100; i++) {
if ((r = (n2k_inb(EN0_ISR) & ENISR_RESET)) != 0)
break;
PRINTK("got %x in reset\n", r);
udelay(100);
}
n2k_outb(ENISR_RESET, EN0_ISR); /* Ack intr. */
if (i == 100)
printf("pcnet_reset_8390() did not complete.\n");
} /* pcnet_reset_8390 */
int get_prom(u8* mac_addr)
{
u8 prom[32];
int i, j;
struct {
u_char value, offset;
} program_seq[] = {
{E8390_NODMA+E8390_PAGE0+E8390_STOP, E8390_CMD}, /* Select page 0*/
{0x48, EN0_DCFG}, /* Set byte-wide (0x48) access. */
{0x00, EN0_RCNTLO}, /* Clear the count regs. */
{0x00, EN0_RCNTHI},
{0x00, EN0_IMR}, /* Mask completion irq. */
{0xFF, EN0_ISR},
{E8390_RXOFF, EN0_RXCR}, /* 0x20 Set to monitor */
{E8390_TXOFF, EN0_TXCR}, /* 0x02 and loopback mode. */
{32, EN0_RCNTLO},
{0x00, EN0_RCNTHI},
{0x00, EN0_RSARLO}, /* DMA starting at 0x0000. */
{0x00, EN0_RSARHI},
{E8390_RREAD+E8390_START, E8390_CMD},
};
PRINTK ("trying to get MAC via prom reading\n");
pcnet_reset_8390 ();
mdelay (10);
for (i = 0; i < sizeof (program_seq) / sizeof (program_seq[0]); i++)
n2k_outb (program_seq[i].value, program_seq[i].offset);
PRINTK ("PROM:");
for (i = 0; i < 32; i++) {
prom[i] = n2k_inb (PCNET_DATAPORT);
PRINTK (" %02x", prom[i]);
}
PRINTK ("\n");
for (i = 0; i < NR_INFO; i++) {
if ((prom[0] == hw_info[i].a0) &&
(prom[2] == hw_info[i].a1) &&
(prom[4] == hw_info[i].a2)) {
PRINTK ("matched board %d\n", i);
break;
}
}
if ((i < NR_INFO) || ((prom[28] == 0x57) && (prom[30] == 0x57))) {
PRINTK ("on exit i is %d/%ld\n", i, NR_INFO);
PRINTK ("MAC address is ");
for (j = 0; j < 6; j++) {
mac_addr[j] = prom[j << 1];
PRINTK ("%02x:", mac_addr[i]);
}
PRINTK ("\n");
return (i < NR_INFO) ? i : 0;
}
return NULL;
}
#endif /* __DRIVERS_NE2000_H__ */

Some files were not shown because too many files have changed in this diff Show More