9
0
Fork 0
Commit Graph

7699 Commits

Author SHA1 Message Date
Jean-Christophe PLAGNIOL-VILLARD cf1670486b clock: introduce non interruptible timeout
is_timeout call poller_call if the timeout is >= 100us

but on 1-wire bus we need to wait 500us and not more than 930us
for the bus reset. So if the poller_call is caller we can not guarantee it.

So for this introduce is_non_interruptible_timeout than we only wait.

Use it for ndelay too.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-29 22:31:18 +01:00
Sascha Hauer 72703410fe misc JTAG: include fixes
common.h should come first, other include files implicitely depend
on it. Also, remove unused fs.h and remove commented line.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 09:08:51 +02:00
Sascha Hauer 0fd1611291 ARM omap spi image: print error to stderr
Since the utility outputs the image on stdout we have to print the
error messages to stderr in order to see them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:16 +02:00
Sascha Hauer 3bd35b8993 ARM omap spi image: relax size constrains
The omap spi utility requires the image size to be a multiple of four
bytes. This seems unnecessary, we can just pad with a few bytes to
get the required alignment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:11 +02:00
Sascha Hauer 5b620bce2e pbl: provide hang() function for the pbl
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:07 +02:00
Sascha Hauer 5b0fc19196 of gpio: Build gpio helper only when gpiolib is selected
Otherwise the functions needed by the helper won't be available.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:01 +02:00
Sascha Hauer 0b15ebf165 mtd nand i.MX: fix compilation for unsupported SoC
Add a default case when all if(nfc_is_*) else if()
return false to prevent a compiler warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:56 +02:00
Sascha Hauer f2513cb8b1 mtd mxs nand: select NAND_BBT
The driver won't compile without it, so select it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:48 +02:00
Sascha Hauer 7cbd1011a0 misc JTAG: Let Jtag driver depend on GENERIC_GPIO
It uses the gpio functions, so let it depend on GENERIC_GPIO.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:42 +02:00
Sascha Hauer 001404fce8 mfd stmpe: Add missing semicolons at end of EXPORT_SYMBOL
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:35 +02:00
Sascha Hauer 72b62560c0 ARM Samsung: Let Nand boot depend on ARCH_S3C24xx
It is only available on this SoC.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:24 +02:00
Sascha Hauer 89d6164660 ARM omap: pbl fixes
Omap3 pbl build may need omap3_clock.c. Also, do not use add_generic_device
in pbl

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:56:12 +02:00
Sascha Hauer 5696a16f10 ARM Samsung: fix pbl build for tiny210 board
The Tiny210 needs lowlevel.o and memory setup in the pbl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:55:54 +02:00
Sascha Hauer 2a93d234e1 ARM: let THUMB2 select EABI
THUMB2 mode needs EABI to build, so select it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:55:49 +02:00
Sascha Hauer bb05186004 mtd: fix mtdraw_write/mtdraw_erase arguments
For the !CONFIG_MTD_WRITE case they still have ulong as offset
argument.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:55:43 +02:00
Sascha Hauer f849039dd2 wd: Provide default value for watchdog timeout
Otherwise barebox can't be built if the user did not specify a value.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:54:44 +02:00
Sascha Hauer a1e5e57759 pbl: Add missing FORCE
Otherwise the pbl files do not get rebuilt when the CFLAGS change.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:54:33 +02:00
Wolfram Sang c9a0beb195 mtd: ubi: fix typos in comment of build.c
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-25 17:43:11 +02:00
Sascha Hauer 8f29343d9d defenv-2: set username to 'none'
The current 'sha' setting, though admittedly very convenient for me,
was never intended to be in mainline.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-25 17:42:27 +02:00
Wolfram Sang 6cc8d05446 Makefile: disable CDPATH
CDPATH has sideeffects when generating barebox_default_env.h (printing
the directory name into the header file), causing a build failure.
Disable it for the build.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-25 08:38:03 +02:00
Sascha Hauer 975d6a0130 fs tftp: Fix possible fifo overflow
In tftp_read we send a request for a new packet without checking if we
have enough space in the FIFO. This can lead to a FIFO overflow and a
corrupt file. Add a check for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2012-10-24 09:57:51 +02:00
Sascha Hauer d2606de353 fs tftp: Only request a block once
tftp_send is called often. Each time, when in STATE_RDATA, a packet
is requested from the tftp server, even if we requested the same packet
already.
Stop this by tracking which packet we requested.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-24 09:57:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD 5e46365808 pm9g45: fix config and defconfig
- add dhcp vendor_id
 - enable glob support (needed by nand)
 - enable pbl
 - enable MMU
 - enable bootm oftree support
 - enable loadb
 - enable nfs
 - use zImage by default

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-23 09:07:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD 271439fe49 pm9g45: fix nand partition in c code
enable bbt too

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-23 09:07:58 +02:00
Wolfram Sang aafca5fbd0 mtd: ubi: cdev: fix build warning for 64-bit
Got this when compiling sandbox on a 64-bit system:

drivers/mtd/ubi/cdev.c: In function ‘ubi_volume_cdev_read’:
drivers/mtd/ubi/cdev.c:26:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Wformat]

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-23 09:06:19 +02:00
Alexander Aring 346b16ba0a devfs-core: add writesize in mtd partition ioctl
Add writesize in mtd partition MEMGETINFO ioctl.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-23 08:25:31 +02:00
Sascha Hauer a6f852d401 Merge branch 'pu/compiler-warnings' 2012-10-21 10:57:54 +02:00
Teresa Gámez f1ea7465b2 ARM OMAP: Enable gpio output
Enable output instead of disabling it.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-21 10:39:43 +02:00
Sascha Hauer c0aabaff3b net gianfar: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 22:17:57 +02:00
Sascha Hauer b733572fa4 sandbox: only test for sdl libs when sdl is enabled
Otherwise we get the following warning when sdl is not installed
on the compile host:

Package sdl was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl' found

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 22:17:48 +02:00
Sascha Hauer 141d32f00f mips: remove unused variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-17 22:17:44 +02:00
Jean-Christophe PLAGNIOL-VILLARD 4400350871 at91sam9x5ek: fix bootstrap size to 256KiB
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-17 15:05:52 +08:00
Jean-Christophe PLAGNIOL-VILLARD c49364cc37 sam9x5ek: drop uart2 as it's not always present
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-17 12:20:13 +08:00
Jean-Christophe PLAGNIOL-VILLARD 673a696cf7 at91sam9x5: udpate default ARCH_TEXT to 0x26f00000
On sam9x5 series the bootstrap load the bootloader at 0x26f00000.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-17 12:20:13 +08:00
Sascha Hauer f99ea5c9d8 ARM samsung S5P: Enable board support
This was once disabled because we had no board support. This has
changed, so enable the S5P board support in the config so that
the friendlyarm_tiny210_defconfig actually builds for the correct
machine.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:47:01 +02:00
Sascha Hauer c65edd657d ARM a9m2440: Fix lowlevel init
board_init_lowlevel is no longer called from generic code, so we can't
just return from in. Instead we have to jump to board_init_lowlevel_return
manually. For the a9m2440 board one case was missed to convert. This
is broken since:

| commit faf7b7af6e
| Author: Jan Luebbe <jlu@pengutronix.de>
| Date:   Mon Sep 24 10:18:34 2012 +0200
|
|     ARM: give boards control of the reset entry point
|
|     On some SoCs (for example AM35xx), the ROM bootloader passes useful
|     information in r0 when jumping to barebox.
|
|     To avoid overwriting this in the generic reset code, we introduce
|     common_reset as a C function and as an assembler macro. This is then
|     called form the reset entry point (either in common or in board code).
|
|     This patch is based on code by Sascha Hauer <s.hauer@pengutronix.de>.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 19:46:56 +02:00
Jean-Christophe PLAGNIOL-VILLARD 840d4858d0 designware: fix 100mps phy support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-15 08:54:14 +02:00
Carlo Caione 7423f13ff7 cosmetic: extra new line in automount usage command
Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 20:20:17 +02:00
Alexander Aring 461e7d7aef mtd-core: add writesize in MEMGETINFO ioctl
Add writesize in MEMGETINFO ioctl.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 14:30:50 +02:00
Alexander Aring 8ce5311b20 documentation: add sandbox malloc argument
Add malloc argument in doxygen comment.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 14:29:50 +02:00
Alexander Aring 9322d469a5 sandbox: fix malloc argument string
Fix malloc argument string.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 14:29:18 +02:00
Alexander Aring ade31926f4 sandbox: move add_image for env in second getopt
Function add_image needs a allocated malloc space.
This is only available in the second getopt loop.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-13 14:29:18 +02:00
Sascha Hauer 501ca464e2 platform driver: Drop check for resource conflicts
The check is wrong since it would have to check whether the
new iomem region overlaps with an existing region. Checking
for the base address only is not enough.
Currently this is not possible because every device conflicts
with the top iomem region which covers the whole address space.

This at least fixes the regression that devices whose memory region
begins at 0x0 can no longer be succesfully registered.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-13 14:19:35 +02:00
Sascha Hauer 68e3e14a64 defaultenv: dependencies fixes
When a build with a compressed default environment is done and then
environment compression is disabled, barebox_default_env.h is not
regenerated because its dependency (now barebox_default_env) is still
up to date. This results in a corrupt default environment.

This patch fixes this by adding a cmd_env_h and changing barebox_default_env.h
to FORCE. As a side effect barebox_default_env.h is no longer generated in
include/generated/ but in common/ as we have to add barebox_default_env.h to
$(targets) (extra-y).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 18:40:02 +02:00
Sascha Hauer ca2520ed55 Makefile: Add missing force for barebox-flash-image
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 18:39:25 +02:00
Franck Jullien cbe3457dd8 common/paritions.c: force little endian reads
When reading values from a DOS disk, we need to force a little endian
reading.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:07:23 +02:00
Jan Luebbe 0502e3db73 defaultenv-2: boot: add missing space in error message
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:03:56 +02:00
Jan Luebbe 0b78902b01 parameter: fix memory leak
In __dev_add_param, the name string is allocated using strdup.
Free it when removing the parameter.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:01:27 +02:00
Alexander Shiyan f9df22b002 Add more generated files to .gitignore
This patch adds at least one more generated file to .gitignore list:

shc@shc /home/git/bb_clps3 $ git status
# On branch my
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       barebox-flash-image

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 11:34:15 +02:00
Sascha Hauer cec48e77b8 ARM i.MX25: Enable all needed clocks during startup
This enables the following clocks on i.MX25:

PER: esdhc1, esdhc2, i2c, nfc, owire, pwm, uart
AHB: emi, esdhc1, esdhc2, fec, lcdc, usbotg
IPG: cspi1, cspi2, cspi3, esdhc1, esdhc2, fec, gpt1, gpt2, gpt3, gpt4,
iim, LCDC_EN, pwm1, pwm2, pwm3, pwm4, spba, tsc, uart1, uart2, uart3,
uart4, uart5

These are hopefully all the clocks we need for barebox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-10 09:47:38 +02:00