Commit Graph

15259 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther b76546b5b8 sysmobts: Increase FPGA turn-a-round time to help NAND
For the Toshiba NAND chip if both NAND (read) and FPGA CS the
time to switch might not be enough. Wait longer as discussed
by email.
2016-06-28 08:55:55 +02:00
Holger Hans Peter Freyther 32c1294d62 sysmobtsv1/sysmobtsv2: Do not re-configure the AEMIF NAND timings
We select CONFIG_SOC_DM644X but we don't want A1CR to be changed.
Our UBL sets the A1CR depending on the actual flash chip and the
u-boot should not replicate it!

Found by Harald and me while debugging a RAUC issue with the barebox
bootloader.
2016-06-12 21:36:37 +02:00
Holger Hans Peter Freyther ab8a84d9ac sysmobts: Toggle nWP on RevG and later as well 2016-06-06 14:24:55 +02:00
Holger Hans Peter Freyther f6453a3911 Add compiler-gcc5 and hope this code compiles and works with gcc5
Taken the header out of the current u-boot code and I will see
if it compiles and at some point we need to test the resulting
binary for it.
2015-11-21 21:36:14 +00:00
Holger Hans Peter Freyther 7149751228 sysmobts-v2: ubi part appears to write as well
The ubi part command will write for the same reason. Move the
command line to the front.

(untested)
2015-02-06 12:32:18 +01:00
Holger Hans Peter Freyther 6653c39fc5 sysmobts: Add a huge sleep to wait for the pin to be driven
Add some margin and wait for the pin to get high and such. I
can't easily measure if we sleep at all or if it is really 100ms
but it can't hurt and we don't optimize for boot times yet.
2015-02-05 20:25:33 +01:00
Holger Hans Peter Freyther fdc11fd6ca sysmobts: ubifsmount might already write to the nand...
Remove the write protect a lot earlier as ubifsmount might already
try to grow the freshly flashed UBIFS and allocate UBIs for it.
2015-02-05 20:20:13 +01:00
Holger Hans Peter Freyther ca2f91dbcb sysmobts-v2: Allow to remove the WP of the NAND flash
Starting from revision F we need to set nWP before writing to
flash. Create a new NAND command that can be used for that and
use it for fwup, booting and recovery mode. We assume that the
payload runs a RW filesystem so we set the GPIO before booting
the system.

Conflicts:
	board/davinci/sysmobts_v2/sysmobts_v2.c
	include/configs/davinci_sysmobts_v2.h
	include/nand.h
2015-02-05 20:06:49 +01:00
Holger Hans Peter Freyther 910946bf6a sysmobts-v2: UBL is setting the right A1CR values right now
Remove the code to set the A1CR values. UBL is now doing it for all
the flash chips supported by the sysmobts.
2014-07-11 09:39:56 +02:00
Holger Hans Peter Freyther a031c0833b sysmobts-v2: Change the rootfs partitioning for bigger u-boot
We are flashing multiple copies of the UBL and U-Boot to be more
tolerant for too many bit flips in the early messages.
2014-05-19 19:21:50 +02:00
Holger Hans Peter Freyther 40d74c99ac recovery: Make it possible to force the recovery
For factory flashing it is the easiest if we can force the
recovery process. Parse the "force" from a potential second
argument and then skip the timeout.
2013-06-01 18:45:18 +02:00
Holger Hans Peter Freyther f289f5ed90 sysmobts-v2: Increase the malloc length to 10MB for ubifs recovery
Sometimes the ubifs can not be recovered and this is due not being
able to allocate enough memory. Increase the RAM size to something
that is hopefully 10MB of RAM.
2013-05-10 18:06:17 +02:00
Holger Hans Peter Freyther 6633b83bf5 sysmobts_v2: Add RevisionD for the sysmoBTSv2 hardware
The only ARM/kernel visible change is the change of the EEPROM. U-Boot
sadly does not support to select EEPROM with different page sizes and
address length. This is why we need to patch the common epprom code.

Introduce a new command to allow dynamic configuration of the EEPROM,
move the eeprom parameters into variables and change the code. This sadly
copies the SPI_X code as well. The address creation could be moved to
a different variable.

This code has been tested on RevC and RevD hardware and an IP address
could be obtained in both cases.
2012-12-18 14:46:28 +01:00
Jan Luebbe 2308cfbef2 u-boot: use a separate data partition
Signed-off-by: Jan Luebbe <jluebbe@debian.org>
2012-09-15 19:13:34 +02:00
Holger Hans Peter Freyther 5ee9b97601 sysmobts-v2: Introduce a recovery command to reflash the system image
When pressing the reset button on boot the system will enter the
recovery mode, this is done by setting a preboot command. Inside the
preboot command we will sleep and then check if the button is still
pressed, then tftp will be used to download the image and flash it. If
something fails after the DHCP state the network console will be
enabled.
2012-07-16 19:41:33 +02:00
Holger Hans Peter Freyther b637d39d5c sysmobts-v2: Enable the LED code with the GPIO LED driver.
LED0 is the "RF Active"/Yellow LED on the sysmobts-v2. We are not
using the 'yellow' LED alias as one needs to provide two functions
that call __led_set on led_yellow_on and led_yellow_off. Initialize
the GPIO direction in the board routine as the status_led code will
not be used.
2012-07-13 14:36:37 +02:00
Holger Hans Peter Freyther a5331887e8 led: The gpio_led.c expects that state is from the enum..
u-boot is not consistent if state should 0|1 or of the enum, the
GPIO driver expects this to be one of the enum values so update
the caller.
2012-07-13 14:36:36 +02:00
Holger Hans Peter Freyther c4c9c7baf1 gpio: Build the da8xx_gpio code for the davinci644x device
The differences include the number of GPIOs and that one is
not required to set the pinmux on request.
2012-07-13 14:10:31 +02:00
Holger Hans Peter Freyther e77802c0b8 boot: Enable the option to interrupt the boot with phrase
The serial console might be connected to other equipment,
do not let it interrupt the auto-boot.
2012-06-13 09:28:14 +02:00
Harald Welte 9987f6df9b try to increase the malloc size for ubifs recovery 2012-05-13 20:57:30 +02:00
Holger Hans Peter Freyther 89f30639d8 sysmobts_v2: Add support for the sysmocom bts version two. 2012-05-13 20:56:56 +02:00
Holger Hans Peter Freyther b6a204b3f7 sysmobts_v1: Add support for the sysmocom bts version one. 2012-04-25 17:32:47 +02:00
Wolfgang Denk cba9a894fd Prepare v2011.12
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-12-23 20:25:35 +01:00
Horst Kronstorfer 49fbf4371e doc/mkimage.1: Fix -D/-f options formatting
Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
2011-12-23 20:11:46 +01:00
Wolfgang Denk 7ddd4475a8 post/lib_powerpc/multi.c: fix stack overflow error
The code and comment disagreed: the comment claimed that r6...r31
were copied, and consequently the arrays for "src" and "dst" were
declared with 26 entries, but the actual code ("lmw r5,0(r3)" and
"stmw r5,0(r4)") copied _27_ words (r5 through r31), which resulted
in false "POST cpu Error at multi test" messages.

Fix the comment and the array sizes.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>
2011-12-23 20:08:10 +01:00
Wolfgang Denk 38081ff7a4 post/lib_powerpc/multi.c: code cleanup
Clean up and document the code:

- get rid of unneeded code block
- add comment which code is generated

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
2011-12-23 20:07:41 +01:00
Wolfgang Denk a63aec54a4 post/lib_powerpc/multi.c: make checkpatch clean
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Stefan Roese <sr@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Andy Fleming <afleming@gmail.com>
Acked-by: Anatolij Gustschin <agust@denx.de>
2011-12-23 20:06:28 +01:00
Wolfgang Denk 139e1875d3 PPC: fix "Warning: FOO uses hard float, BAR uses soft float".
It appears that with recent versions of GCC the explicit
"-mhard-float" command line option takes precedence over the
``asm(".gnu_attribute 4, 2");'' in the source file, so this no longer
helps to avoid the warnings we get when linking code that uses FP
instructions with other code that was built using soft-float.

We can remove the ".gnu_attribute" (which appears to carry no other
information, at least so far) from the object files, but we also have
to make sure we don't pull in the __gcc_qsub() and __gcc_qmul()
functions from the standard libgcc, as these would again "infect" our
linking.  We copy this code from:
	gcc-4.2.2/gcc/config/rs6000/darwin-ldouble.c
This old version was chosen because it was still available under a
compatible license (GCC v2+).   The file was stripped down to the
needed parts, and reformatted so it passes checkpatch with only one
warning (do not add new typedefs).

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Stefan Roese <sr@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Kim Phillips <kim.phillips@freescale.com>
Tested-by: Stefan Roese <sr@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>
2011-12-23 20:03:55 +01:00
Horst Kronstorfer af44f4b2a5 Print program basename instead of whole path in usage()
Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
2011-12-22 09:09:18 +01:00
Thierry Reding 67c2cb1e69 tegra2: Fix out-of-tree build for Ventana.
Since Ventana is derived from Seaboard and requires seaboard.c to build,
make sure board/nvidia/seaboard is created in the build tree.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Wolfgang Denk <wd@denx.de>
2011-12-22 08:36:09 +01:00
Wolfgang Denk be662e9a6b Prepare v2011.12-rc3
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-12-21 20:39:46 +01:00
Tom Warren e2132c29d8 arm: Tegra: fix undefined instruction hang immediately after reset
commit 0d479b53 (Aneesh V) added code for OMAP4 that doesn't
execute on Tegra, due to the AVP (ARM7TDI) not having a CP15.
Result was an undefined instruction hang just after reset.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Cc: Albert Aribaud <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Acked-by: Aneesh V <aneesh@ti.com>
2011-12-21 20:36:22 +01:00
Horst Kronstorfer 7aecfdd0f8 doc/mkimage.1: Fix some typos
Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-12-21 20:27:18 +01:00
Holger Brunck d26982cbb6 km/common: add toolchain variable
Add a variable "toolchain" and configure the rootpath
for the nfsargs with this variable.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Wolfgang Denk <wd@denx.de>
2011-12-20 23:43:45 +01:00
Lauri Hintsala 37d0e77777 Makefile: fix distclean and *_config rules to be less noise
Signed-off-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
2011-12-20 23:37:20 +01:00
Anatolij Gustschin c3e17d5c9e board/eltec/elppc/misc.c: Fix GCC 4.6 build warning
Fix:
misc.c: In function 'misc_init_r':
misc.c:119:3: warning: dereferencing type-punned pointer
will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-12-20 23:21:38 +01:00
Anatolij Gustschin 40867a2fe1 drivers/net/e1000.c: Fix GCC 4.6 build warnings
Fix:
e1000.c: In function 'e1000_read_mac_addr':
e1000.c:1149:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules [-Wstrict-aliasing]

e1000.c:1149:2: warning: dereferencing type-punned pointer
will break strict-aliasing rules [-Wstrict-aliasing]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Acked-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
2011-12-20 23:21:03 +01:00
Anatolij Gustschin 821315fe2f board/esd/cpci750/mv_eth.c: Fix GCC 4.6 build warnings
Fix:
mv_eth.c: In function 'mv64360_eth_real_open':
mv_eth.c:425:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_stop':
mv_eth.c:643:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_xmit':
mv_eth.c:719:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_receive':
mv_eth.c:804:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_get_stats':
mv_eth.c:903:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_update_stat':
mv_eth.c:931:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
mv_eth.c:930:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64360_eth_print_stat':
mv_eth.c:1012:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2069:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd.eu>
2011-12-20 23:20:27 +01:00
Anatolij Gustschin ea2d915974 usb: s3c_udc_otg: fix GCC 4.6 build warnings
Fix:
In file included from s3c_udc_otg.c:216:0:
s3c_udc_otg_xfer_dma.c: In function 'complete_tx':
s3c_udc_otg_xfer_dma.c:280:33: warning: variable 'is_short' set but not used
s3c_udc_otg_xfer_dma.c:280:6: warning: variable 'ep_tsr' set but not used
s3c_udc_otg_xfer_dma.c: In function 's3c_udc_irq':
s3c_udc_otg_xfer_dma.c:469:16: warning: variable 'flags' set but not used
s3c_udc_otg_xfer_dma.c:468:18: warning: variable 'gintmsk' set but not used
s3c_udc_otg_xfer_dma.c: In function 's3c_queue':
s3c_udc_otg_xfer_dma.c:582:14: warning: variable 'gintsts' set but not used
s3c_udc_otg_xfer_dma.c:581:16: warning: variable 'flags' set but not used
s3c_udc_otg_xfer_dma.c: In function 's3c_ep0_read':
s3c_udc_otg_xfer_dma.c:778:6: warning: variable 'ret' set but not used
s3c_udc_otg_xfer_dma.c: In function 's3c_udc_set_halt':
s3c_udc_otg_xfer_dma.c:1020:16: warning: variable 'flags' set but not used
s3c_udc_otg_xfer_dma.c: In function 's3c_ep0_setup':
s3c_udc_otg_xfer_dma.c:1258:13: warning: initialization from incompatible
pointer type [enabled by default]
s3c_udc_otg_xfer_dma.c:1239:16: warning: variable 'is_in' set but not used
s3c_udc_otg_xfer_dma.c:1239:9: warning: variable 'bytes' set but not used
s3c_udc_otg.c: In function 'usb_gadget_register_driver':
s3c_udc_otg.c:292:16: warning: variable 'flags' set but not used
s3c_udc_otg.c: In function 'usb_gadget_unregister_driver':
s3c_udc_otg.c:338:16: warning: variable 'flags' set but not used
s3c_udc_otg.c: In function 's3c_ep_enable':
s3c_udc_otg.c:582:16: warning: variable 'flags' set but not used
s3c_udc_otg.c: In function 's3c_ep_disable':
s3c_udc_otg.c:646:16: warning: variable 'flags' set but not used
s3c_udc_otg.c: In function 's3c_dequeue':
s3c_udc_otg.c:704:16: warning: variable 'flags' set but not used

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Remy Bohmer <linux@bohmer.net>
2011-12-20 23:20:01 +01:00
Anatolij Gustschin e03492c875 board/samsung/universal_c210/universal.c: Fix build warning
Fix:
universal.c: In function 's5pc210_phy_control':
universal.c:273:7: warning: 'ret' may be used uninitialized
in this function [-Wuninitialized]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
2011-12-20 23:19:18 +01:00
Anatolij Gustschin 8506eb8d6a FAT: fix some issues in FAT write support code
Writing a file to the FAT partition didn't work while a
test using a CF card. The test was done on mpc5200 based
board (powerpc). There is a number of problems in FAT
write code:

Compiler warning:
fat_write.c: In function 'file_fat_write':
fat_write.c:326: warning: 'counter' may be used uninitialized
in this function
fat_write.c:326: note: 'counter' was declared here

'l_filename' string is not terminated, so a file name
with garbage at the end is used as a file name as shown
by debug code.

Return value of set_contents() is not checked properly
so actually a file won't be written at all (as checked
using 'fatls' after a write attempt with 'fatwrite'
command).

do_fat_write() doesn't return the number of written bytes
if no error happened. However the return value of this
function is used to show the number of written bytes
in do_fat_fswrite().

The patch adds some debug code and fixes above mentioned
problems and also fixes a typo in error output.

NOTE: after a successful write to the FAT partition (under
U-Boot) the partition was checked under Linux using fsck.
The partition needed fixing FATs:
-bash-3.2# fsck -a /dev/sda1
fsck 1.39 (29-May-2006)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
FATs differ but appear to be intact. Using first FAT.
Performing changes.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Donggeun Kim <dg77.kim@samsung.com>
Cc: Aaron Williams <Aaron.Williams@cavium.com>
Acked-by: Donggeun Kim <dg77.kim@samsung.com>
2011-12-20 23:18:43 +01:00
Wolfgang Denk e27334212c Merge branch 'master' of /home/wd/git/u-boot/custodians
* 'master' of /home/wd/git/u-boot/custodians:
  common/cmd_pxe.c: Fix GCC 4.6 build warnings
  AVR32: fix timer_init() function
2011-12-20 23:14:37 +01:00
Wolfgang Denk c89fd4f0a2 Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging
* 'agust@denx.de' of git://git.denx.de/u-boot-staging:
  common/cmd_pxe.c: Fix GCC 4.6 build warnings
  AVR32: fix timer_init() function
2011-12-20 23:14:32 +01:00
Anatolij Gustschin deb7282f9f drivers/net/e1000_spi.c: Fix build warnings
Fix:
e1000_spi.c: In function 'spi_free_slave':
e1000_spi.c:115: warning: unused variable 'hw'
e1000_spi.c: In function 'do_e1000_spi':
e1000_spi.c:472: warning: 'checksum' may be used uninitialized in this function
e1000_spi.c:472: note: 'checksum' was declared here

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Acked-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
2011-12-20 23:13:49 +01:00
Simon Glass 38bd80b485 net: Fix arguments in tftpput command
The switch to strict_strtoul() was not done correctly - this fixes
the compile error when CONFIG_CMD_TFTPPUT is active.

There appears to very little use of strict_strtoul() in commands, so
it might be easier to switch to simple_strtoul(). If not, we should
decide the best way to use strict_strtoul(). For now I have added a
friendly message which will of course increase code size.

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-12-20 23:12:32 +01:00
Sven Schnelle bf0b631343 AVR32: fix timer_init() function
timer_init() now returns an int (the error code) instead of void.
This makes compilation fail with:

interrupts.c:111: error: conflicting types for 'timer_init'
/home/svens/u-boot/u-boot/include/common.h:246: error: previous
declaration of 'timer_init' was here
make[1]: *** [interrupts.o] Error 1

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-12-20 23:10:04 +01:00
Heiko Schocher 43d4a5e687 common/cmd_pxe.c: Fix GCC 4.6 build warnings
Fix:
cmd_pxe.c: In function 'parse_pxefile_top':
cmd_pxe.c:941:5: warning: 'err' may be used uninitialized in this
  function [-Wuninitialized]
cmd_pxe.c:921:6: note: 'err' was declared here

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Jason Hobbs <jason.hobbs@calxeda.com>
Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
2011-12-20 22:28:51 +01:00
Sven Schnelle c0e6723ee4 AVR32: fix timer_init() function
timer_init() now returns an int (the error code) instead of void.
This makes compilation fail with:

interrupts.c:111: error: conflicting types for 'timer_init'
/home/svens/u-boot/u-boot/include/common.h:246: error: previous
declaration of 'timer_init' was here
make[1]: *** [interrupts.o] Error 1

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-12-20 22:28:51 +01:00
Marek Vasut e570fe8ef2 PXA: Kill last remnants of set_GPIO_mode function
GPIO configuration shall never be done inside a driver, never.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
2011-12-19 17:52:44 +01:00
Anatolij Gustschin 159dad650c ARM: tny_a9260: re-add MACH_TYPE_TNY_A9G20 and MACH_TYPE_TNY_A9260
MACH_TYPE_TNY_A9G20 and MACH_TYPE_TNY_A9260 were removed
from mach-types.h. Add them to the board config file.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
2011-12-19 17:52:44 +01:00