Commit Graph

1178 Commits

Author SHA1 Message Date
Lawrence R. Johnson
5ab884b254 ppc4xx: Add functionality to GPIO support
This patch makes two additions to GPIO support:

First, it adds function gpio_read_in_bit() to read the a bit from the
GPIO Input Register (GPIOx_IR) in the same way that function
gpio_read_out_bit() reads a bit from the GPIO Output Register
(GPIOx_OR).

Second, it modifies function gpio_set_chip_configuration() to provide
an additional option for configuring the GPIO from the
"CFG_4xx_GPIO_TABLE".

According to the 440EPx User's Manual, when an alternate output is used,
the three-state control is configured in one of two ways, depending on
the particular output.  The first option is to select the corresponding
alternate three-state control in the GPIOx_TRSH/L registers.  The second
option is to select the GPIO Three-State Control Register (GPIOx_TCR) in
the GPIOx_TRSH/L registers, and set the corresponding bit in the
GPIOx_TCR register to enable the output.  For example, the Manual
specifies configuring the GPIO00 Alternate 1 Signal (PreAddr07) to use
the alternate three-state control (first option), and specifies
configuring the GPIO32 Alternate 1 Signal (USB2OM0) with the output
enabled in the GPIOx_TCR register (second option).

Currently, gpio_set_chip_configuration() configures all alternate signal
outputs to use the first option.  This patch allow the second option to
be selected by setting the "out_val" element in the table entry to
"GPIO_OUT_1".  The first option is used when the "out_val" element is
set to "GPIO_OUT_0".  Because "out_val" is not currently used when an
alternate signal is selected, and because all current GPIO tables set
"out_val" to "GPIO_OUT_0" for all alternate signals, this patch should
not change any existing configurations.

Signed-off-by: Larry Johnson <lrj@acm.org>
2008-01-04 11:38:45 +01:00
Jon Loeliger
2c3536425d Merge commit 'wd/master' 2008-01-03 09:46:55 -06:00
Stefan Roese
c05569066d ppc4xx: Enable 405EP PCI arbiter per default on all boards
In an attmemt to clean up the 4xx start.S file, I removed the enabling
of the internal 405EP PCI arbiter. This is needed for multiple other
405EP platforms, like most of the esd 405EP. Now the internal PCI
arbiter is enabled again per default as it has been before.

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2007-12-28 16:39:15 +01:00
Stefan Roese
bec9264616 ppc4xx: Fix bug in cpu_init.c (405EP instead of 450EP)
Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2007-12-28 16:39:11 +01:00
Stefan Roese
bb701283a8 Merge branch 'master' of /home/stefan/git/u-boot/u-boot into for-1.3.2-ver2 2007-12-27 19:37:26 +01:00
Larry Johnson
8eb52d5d98 Add denali_data_eye.o and denali_spd_ddr2.o to PPC4xx Makefile
Signed-off-by: Larry Johnson <lrj@acm.org>
2007-12-27 19:35:36 +01:00
Larry Johnson
aba19604d8 Add 440EPx DDR2 SPD DIMM support
This patch adds SPD DDR2 support for the 440EPx ("Denali") SDRAM
controller.  It should also work on the 440GRx.  It is based on the DDR2
SPD code for the 440EP/440EPx, but makes no provision for DDR1 support.

This code has been tested on prototype Korat boards with three Kingston
DIMMS: 512 MiB ECC (one rank), 512 MiB non-ECC (one rank) and 1 GiB ECC
(two ranks).  The Korat board has a single DIMM socket, but support has
been provided (though not tested) for boards with two DIMM sockets.

Signed-off-by: Larry Johnson <lrj@acm.org>
2007-12-27 19:35:36 +01:00
Larry Johnson
8a24a69630 Copy 440EPx/GRx SDRAM data-eye search to common directory
This patch creates a non-board-specific file for performing the SDRAM
data-eye search.  It also adds ECC error checking to the test of valid
data on readback when ECC is enabled.

Signed-off-by: Larry Johnson <lrj@acm.org>
2007-12-27 19:35:36 +01:00
Larry Johnson
c348578bf6 Add Ethernet 1000BASE-X support for PPC4xx
This patch adds a new switch: "CONFIG_PHY_DYNAMIC_ANEG".  When this symbol
is defined, the PHY will advertise it's capabilities for autonegotiation
based on the capabilities shown in the PHY's status registers, including
1000BASE-X.  When "CONFIG_PHY_DYNAMIC_ANEG" is not defined, the PHY will
advertise hard-coded capabilities, as before.

Signed-off-by: Larry Johnson <lrj@acm.org>
2007-12-27 19:35:36 +01:00
Stefan Roese
328a340392 ppc4xx: fdt: Cleanup setup of cpu node setup
Now the cpu node setup ("timebase-frequency" and "clock-frequency") is
without using the absolute path to the cpu node. This makes it possible
to use this U-Boot version with both versions of cpu-node naming
"cpu@0" and the former "PowerPC,440EPx@0".

Signed-off-by: Stefan Roese <sr@denx.de>
2007-12-27 19:35:34 +01:00
Anatolij Gustschin
42ed33ffe1 Fix ppc4xx clear_bss() code
ppc4xx clear_bss() fails if BSS segment size is not
divisible by 4 without remainder. This patch provides
fix for this problem.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2007-12-27 19:35:34 +01:00
Niklaus Giger
85dc2a7f82 PPC4xx: Minimal changes to add vxWorks support
Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
2007-12-27 19:35:34 +01:00
Matthias Fuchs
ba79fde58a ppc4xx: fix flush + invalidate_dcache_range arguments
flush + invalidate_dcache_range() expect the start and stop+1 address.
So the stop address is the first address behind (!) the range.

Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2007-12-27 19:35:33 +01:00
Stefan Roese
871e6ce188 ppc4xx: fdt: use fdt_fixup_ethernet()
By using aliases in the dts file, the ethernet node fixup is
much easier with the recently added functions.

Please note that the dts file needs the aliases for this to work.

Signed-off-by: Stefan Roese <sr@denx.de>
2007-12-27 19:35:33 +01:00
Stefan Roese
136288847e ppc4xx: Bring 4xx fdt support up-to-date
This patch update the 4xx fdt support. It enabled fdt booting
on the AMCC Kilauea and Sequoia for now. More can follow later
quite easily.

Signed-off-by: Stefan Roese <sr@denx.de>
2007-12-27 19:35:32 +01:00
Wolfgang Denk
0dcfe3a225 Merge branch 'master' of /home/wd/git/u-boot/custodians 2007-12-27 02:01:15 +01:00
Jens Gehrlein
22d1a56cbf TQM885D: Exchanged SDRAM timing by a more relaxed timing.
CAS-Latency=2, Write Recovery Time tWR=2
The max. supported bus frequency is 66 MHz. Therefore, changed
threshold to switch from 1:1 mode to 2:1 from 80 MHz to 66 MHz.

Signed-off-by: Martin Krause <martin.krause@tqs.de>
2007-12-27 01:59:50 +01:00
Wolfgang Denk
61fb15c516 Fix coding style issues; update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-12-27 01:52:50 +01:00
Wolfgang Denk
6e1bbe6e3e Merge branch 'master' of /home/wd/git/u-boot/custodians 2007-12-27 01:13:05 +01:00
Wolfgang Denk
81b38be863 Merge branch 'master' of git://www.denx.de/git/u-boot-sh
Conflicts:

	MAINTAINERS

Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-12-27 01:12:56 +01:00
Wolfgang Denk
58bbc77eb0 Merge branch 'master' of /home/wd/git/u-boot/custodians 2007-12-27 00:46:17 +01:00
Wolfgang Denk
f77ac3d657 Merge branch 'master' of git://www.denx.de/git/u-boot-avr32 2007-12-27 00:46:08 +01:00
Haavard Skinnemoen
9570bcd87f AVR32: Fix wrong pin setup for USART3
As reported by Gerhard Berghofer:

in "gpio_enable_usart3" the correct pins for USART 3 are PB17 and PB18
instead of PB18 and PB19.

which is obviously correct. There's currently no code that uses
USART3, but custom boards may run into problems.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-12-17 10:35:02 +01:00
Haavard Skinnemoen
5fee84a794 AVR32: Make some AT32AP700x peripherals optional
Add a chip-features file providing definitions of the form

AT32AP700x_CHIP_HAS_<peripheral>

to indicate the availability of the given peripheral on the currently
selected chip.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-12-17 10:34:12 +01:00
Haavard Skinnemoen
36f28f8a96 AVR32: Rename at32ap7000 -> at32ap700x
The SoC-specific code for all the AT32AP700x CPUs is practically
identical; the only difference is that some chips have less features
than others. By doing this rename, we can add support for the AP7000
derivatives simply by making some features conditional.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-12-17 10:34:12 +01:00
Haavard Skinnemoen
4d5fa99c73 atmel_mci: Show SR when block read fails
Show controller status as well as card status when an error occurs
during block read.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
2007-12-17 10:34:11 +01:00
Kumar Gala
d435793229 Handle Asynchronous DDR clock on 85xx
The MPC8572 introduces the concept of an asynchronous DDR clock with
regards to the platform clock.

Introduce get_ddr_freq() to report the DDR freq regardless of sync/async
mode.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala
04db400892 Stop using immap_t on 85xx
In the future the offsets to various blocks may not be in same location.
Move to using CFG_MPC85xx_*_ADDR as the base of the registers
instead of getting it via &immap.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala
2714223f8e Remove CONFIG_OF_FLAT_TREE related code from mpc85xx since we now use libfdt
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:20 -06:00
Kumar Gala
aafeefbdb8 Stop using immap_t for cpm offset on 85xx
In the future the offsets to various blocks may not be in same location.
Move to using CFG_MPC85xx_CPM_ADDR as the base of the CPM registers
instead of getting it via &immap->im_cpm.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:19 -06:00
Kumar Gala
f59b55a5b8 Stop using immap_t for guts offset on 85xx
In the future the offsets to various blocks may not be in same location.
Move to using CFG_MPC85xx_GUTS_ADDR as the base of the guts registers
instead of getting it via &immap->im_gur.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:19 -06:00
Kumar Gala
f852ce72f1 Add libfdt based ft_cpu_setup for mpc85xx
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-11 22:34:19 -06:00
Stefan Roese
3b9abdc448 ppc4xx: Correct GPIO offset in gpio_config()
Thanks to Gary Jennejohn for pointing this out.

Signed-off-by: Stefan Roese <sr@denx.de>
2007-12-11 13:38:19 +01:00
Stefan Roese
9caeaadf50 Merge commit 'u-boot/master' into for-1.3.1
Conflicts:

	drivers/rtc/Makefile
2007-12-11 11:34:54 +01:00
Kumar Gala
246d4ae6bc Convert boards that set memory node to use fdt_fixup_memory()
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-12-07 20:51:25 -05:00
Jon Loeliger
f743931f9b Merge commit 'wd/master' 2007-12-06 11:27:32 -06:00
Nobuhiro Iwamatsu
521dcd30b9 Merge git://www.denx.de/git/u-boot
Conflicts:

	drivers/Makefile
2007-12-07 01:20:16 +09:00
Nobuhiro Iwamatsu
7fc792895b Merge git://www.denx.de/git/u-boot
Conflicts:

	drivers/Makefile
2007-11-29 00:56:37 +09:00
Kumar Gala
8d04f02f62 Update libfdt from device tree compiler (dtc)
Update libfdt to commit 8eaf5e358366017aa2e846c5038d1aa19958314e from
the device tree compiler (dtc) project.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21 14:04:05 -06:00
Kumar Gala
e93becf80d Move do_fixup* for libfdt into common code
Moved the generic fixup handling code out of cpu/mpc5xxx and cpu/mpc8260
into common/fdt_support.c and renamed:

do_fixup()	-> do_fixup_by_path()
do_fixup_u32() 	-> do_fixup_by_path_u32()

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-11-21 14:01:49 -06:00
Jon Loeliger
890e9413c0 Merge commit 'remotes/wd/master' 2007-11-20 14:34:57 -06:00
Jean-Christophe PLAGNIOL-VILLARD
6bf4c686af s3c24x0: Fix usb_ohci.c missing in Makefile
and usb_ohci.c warning differ in signedness

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2007-11-18 21:50:07 +01:00
Wolfgang Denk
8412d814ce Fix compiler warnings for ARM systems.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-11-18 17:11:09 +01:00
Wolfgang Denk
409ecdc0bb Fix compiler warnings for PPC systems. Update CHANGELOG.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2007-11-18 16:36:27 +01:00
Stefan Roese
653811a3c2 ppc4xx: Correct 405EX PCIe UTL register mapping
Map 4k mem space for UTL registers for each port.

Signed-off-by: Stefan Roese <sr@denx.de>
2007-11-18 14:44:44 +01:00
Shinya Kuribayashi
7e1d884b7c [MIPS] cpu/mips/config.mk: Fix GNU assembler minor version picker
Current trick to pick up GNU assembler minor version does not work with the
latest binutils (2007-03-01 or later) due to ${PKGVERSION} now default to
"(GNU Binutils) ".

  $ sde-as --version |grep "GNU assembler"
  GNU assembler 2.15.94 mipssde-6.02.02-20050602
  $ sde-as --version |grep "GNU assembler" |awk '{print $3}'
  2.15.94
  $ sde-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}'
  15
  $
  
  $ mips-linux-as --version |grep "GNU assembler"
  GNU assembler (GNU Binutils) 2.18
  $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}'
  (GNU
  $ mips-linux-as --version |grep "GNU assembler" |awk '{print $3}' |awk -F. '{print $2}'
  (no output)
  $

As a result of above, you'll see many noises with such binutils:

  make -C cpu/mips/
  /bin/sh: line 0: [: : integer expression expected
  /bin/sh: line 0: [: : integer expression expected
  make[1]: Entering directory `/home/skuribay/devel/u-boot.git/cpu/mips'
  mips-linux-gcc  -D__ASSEMBLY__ -g  -Os   -D__KERNEL__ -DTEXT_BASE=0xB0000000  -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o incaip_wdt.o incaip_wdt.S
  /bin/sh: line 0: [: : integer expression expected
  mips-linux-gcc  -D__ASSEMBLY__ -g  -Os   -D__KERNEL__ -DTEXT_BASE=0xB0000000  -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -c -o cache.o cache.S
  /bin/sh: line 0: [: : integer expression expected
  mips-linux-gcc -g  -Os   -D__KERNEL__ -DTEXT_BASE=0xB0000000  -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nostdinc -isystem /home/skuribay/devel/buildroot/build_mips/staging_dir/usr/bin/../lib/gcc/mips-linux-uclibc/4.2.1/include -pipe  -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -pipe -msoft-float -march=4kc -mtune=4kc -EB -Wall -Wstrict-prototypes -c -o asc_serial.o asc_serial.c
  /bin/sh: line 0: [: : integer expression expected

This patch simplifies the trick and makes it work with both versions of gas.
I also replace an expensive `awk (or gawk)' with `cut'.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2007-11-17 20:05:26 +09:00
Shinya Kuribayashi
16664f7285 [MIPS] Remove useless instructions for initializing $gp.
Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2007-11-17 20:05:26 +09:00
Shinya Kuribayashi
03c031d566 [MIPS] MIPS 4K core: Coding style cleanups
No logical changes.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2007-11-17 20:05:26 +09:00
Shinya Kuribayashi
4fbd0741b2 [MIPS] au1x00_eth.c: Fixed a warning on pb1000 build.
au1x00_eth.c: In function 'au1x00_miiphy_write':
au1x00_eth.c:139: warning: 'return' with no value, in function returning non-void

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2007-11-17 18:54:16 +09:00
Shinya Kuribayashi
f013204597 [MIPS] au1x00_eth.c: Fix au1x00_miiphy_{read,write} build error
au1x00_eth.c: In function 'au1x00_enet_initialize':
au1x00_eth.c:246: error: 'au1x00_miiphy_read' undeclared (first use in this function)
au1x00_eth.c:246: error: (Each undeclared identifier is reported only once
au1x00_eth.c:246: error: for each function it appears in.)
au1x00_eth.c:246: error: 'au1x00_miiphy_write' undeclared (first use in this function)
au1x00_eth.c: In function 'au1x00_miiphy_write':
au1x00_eth.c:298: warning: 'return' with no value, in function returning non-void
make[1]: *** [au1x00_eth.o] Error 1

Fixed by moving these two functions forward.

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2007-11-17 18:54:16 +09:00