9
0
Fork 0
Commit Graph

5957 Commits

Author SHA1 Message Date
Franck Jullien 2aad209b78 mci: Add MCI over SPI support
This patch adds MMC over SPI support to mci-core.c and
mci_spi.c driver.

This driver is useful when SOC doesn't have built-in MCI
component. Tested with nios, 2Go SD-CARD and FAT file system.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 12:38:29 +01:00
Franck Jullien 52ef4af579 crypto: Add crc7 function
This function in used by the MCI over SPI driver.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-25 12:37:25 +01:00
Franck Jullien 739f9105cc nios2: Include asm/unaligned.h
drivers/ata/disk_drive.c needs it....

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-24 10:36:17 +01:00
Jan Weitzel 6df16cb90d readkey: force return from while true
If read_key is feeded by STRG + KEY_LEFT you run into the while(1)
loop and corrupt memory through esc array.
Force return if index gets too high.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:14:28 +01:00
Hubert Feurstein 7bb009c744 commands/cp: add verbose mode which displays progress bar
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:13:05 +01:00
Jean-Christophe PLAGNIOL-VILLARD a59471d133 sandbox: move ELFCLASS detection to asm/elf.h
now we can detect the host build from gcc macro
and cross compile the sandbox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:09:26 +01:00
Sascha Hauer 41ee1923e6 Merge branch 'pu/imx53-nand-warning' 2011-11-22 21:09:01 +01:00
Sascha Hauer cf0599f933 Merge branch 'pu/unlzo' 2011-11-22 21:08:45 +01:00
Jean-Christophe PLAGNIOL-VILLARD 03d4554577 password: remove not used variable 'second'
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-22 21:04:32 +01:00
Sascha Hauer 82c6ac9e07 Merge branch 'sent/assorted-fixes' 2011-11-17 22:59:47 +01:00
Sascha Hauer 2c0e3bb53a ARM i.MX53: silence compiler warning in nand.c
nand.c issues a warning when imx_nand_set_layout is
empty. We don't need this function on i.MX53, so
silence the warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-17 22:38:04 +01:00
Sascha Hauer 689d9762bb fix unlzo support
unlzo support is broken for files > 256k (more than one block)
since commit a3463cc128
(lib/decompress_unlzo: use fill and full to read and write data)
This patch updates unlzo support to the latest version of the kernel
plus a small buffer free fix.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-17 22:31:56 +01:00
Franck Jullien 186d926c23 fs/fat: Initialize local variable finfo
fat_stat in fs/fat.c declares finfo but doesn't initialize it.
When get_fileinfo is called, fno->lfname and fno->lfsize are
tested but haven't been zeroed...This can lead to a wrong
behavior.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-17 16:59:29 +01:00
Juergen Beisert 77e8188269 Mini2440: Everything's now present to provide USB host feature
The S3C2440 CPU comes with an internal OHCI the generic part of
Barebox already supports. Just add the missing part.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-17 16:52:06 +01:00
Sascha Hauer 1533f6b7b3 fix fprintf prototype and return value
The puts functions now properly return the number of characters
written. With this we can also fix fprintf.
Also, remove never reached return in fputs.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 16:19:48 +01:00
Sascha Hauer e3920f1c2f Merge branch 'pu/mci/multiblock-write' into next 2011-11-11 16:18:34 +01:00
Sascha Hauer 115320526c ARM i.MX53: enable l2 cache
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 14:57:18 +01:00
Sascha Hauer 50a62491c5 mci: remove unnecessary loops
We used to loop around the sectors in mci_sd_write/mci_sd_read.
Now that we have multi block read and write this is not necessary
anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:58:24 +01:00
Sascha Hauer a2ca100344 mci: implement multi block write
This speeds up writes to MMC/SD cards significantly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:58:18 +01:00
Lucas De Marchi e57f57a3d0 x86: fix symbol size calculation
The size is being calculated after changing to another section, which
gives error with gcc 4.6:

  AS      arch/x86/lib/traveler.o
/tmp/ccP0z8xx.s: Assembler messages:
/tmp/ccP0z8xx.s: Error: .size expression for real_to_prot does not evaluate to a constant
/tmp/ccP0z8xx.s: Error: .size expression for prot_to_real does not evaluate to a constant
make[1]: *** [arch/x86/lib/traveler.o] Error 1

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:28:35 +01:00
Lucas De Marchi 8d6d5d43dd x86: fix build error because of missing header
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:28:35 +01:00
Lucas De Marchi bf25fb065a Add setupmbr to gitignore
Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:28:35 +01:00
Sascha Hauer 8fe1e8fd41 console: fix return values of puts functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:20:21 +01:00
Franck Jullien 84b222987e mount: Fix the printing of device name
Mount without argument always print a "none" as device name mounted
because entry->parent_device is always NULL.

The problem is the mount function in fs/fs.c. parent_device is
initialized to NULL and never updated. With this patch,
parent_device is set with the mounted device name.

Moreover, the mount function has been modified to print the device
name plus device id using the dev_name function.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:13:34 +01:00
Franck Jullien 21d6ca2092 ata: Add dev ref to blockdevice during probe
Add missing reference to dev when register the blockdevice.
This prevent the creation of a cdev with a NULL reference to dev in
blockdevice_register.

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:13:20 +01:00
Sanjeev Premi b2e9356130 omap: Unify run_shell() in xload configuration
Currently, there are multiple definitions of run_shell()
for each board that can be build in "xload" configuration.
Now there is only one function used by all boards.

The functions defined in xload.c are used only when "xload"
configuration used; but it gets compiled unconditionally.
This has been fixed as well.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 12:07:14 +01:00
Fabio Estevam a8a50ffba1 ARM: mx53-loco: Remove duplicate call to loco_fec_reset()
Remove duplicate call to loco_fec_reset().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-11 10:27:11 +01:00
Hubert Feurstein 8ee4b29f84 at91: add config option for ohci driver
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-10 09:09:24 +01:00
Sascha Hauer d79d5ae88b Merge branch 'next' 2011-11-09 13:09:23 +01:00
Sascha Hauer 78202b7722 Release v2011.11.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-09 12:56:10 +01:00
Sascha Hauer 90fee398bc export: do not fail on already exported variable
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-09 11:51:54 +01:00
Sascha Hauer ad011ff877 mkdir command: do not fail with -p and directory already exists
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-09 11:51:49 +01:00
Sascha Hauer 6756cd2cb2 fs: read: do not call read op when count is 0
Some ops do not handle read with count = 0 correctly. They do
not have to if this is catched in the upper layer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-09 11:23:16 +01:00
Sascha Hauer d471e8549e Merge branch 'pu-mx53-l2' into next 2011-11-09 11:13:00 +01:00
Sascha Hauer 03f18f3115 mtd nand omap: use NAND_OWN_BUFFERS option
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 13:17:44 +01:00
Sascha Hauer 624a44a618 mtd nand omap: add read function for the OMAP4 romcode ecc mode
The OMAP4 romcode expects some unusual ecc layout which we could
write but not read. This patch adds a function which uses the
manual mode to read a page written with this ecc layout.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 13:17:08 +01:00
Sascha Hauer ecbc8a32ce mtd nand omap: factor out an internal __omap_calculate_ecc function
We can't use the ECC_RESULTx_0 register set for manual mode which
we'll need in the next patch. So factor out an internal function
which makes the register set to use configurable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 11:13:11 +01:00
Sascha Hauer 01bedb6772 mtd nand omap: make debugging output more useful
- add missing '\n' at line ends
- fix wrong argument type warnings
- remove too noisy debug in omap_hwcontrol
- add function names to debug printfs
- add 0x prefixes to hex values

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 11:13:11 +01:00
Sascha Hauer 5b959a3e85 mtd nand omap: use register defines for ecc registers
We need this register bits later in another function, so
use register bit defines now.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 11:13:11 +01:00
Sascha Hauer 02fa86e9bc mtd nand omap: fail on bch decode failure
The driver used to print an error when bch decoing failed, but
did not actually throw an error. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 11:13:10 +01:00
Sascha Hauer 4cb1b120bf mtd nand omap: call ecc calculate function outside omap_correct_bch
Move omap_calculate_ecc outside omap_correct_bch. When implementing
the romcode bch read page we have to call omap_calculate_ecc with
different arguments than in the standard case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 11:11:34 +01:00
Sascha Hauer af01926739 mtd nand omap: factor out hamming correct function
To be consistent also factor out the hamming correct function
and also safe an indention level.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 11:08:07 +01:00
Sascha Hauer 1b79fee4f3 mtd nand omap: factor out bch correct function
We need the bch correct algorithm in the next patches, so
factor out a seperate function for this and also safe an
indention level.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 11:06:53 +01:00
Sascha Hauer 4a0a5df356 mtd nand omap: use blocknum calculation to where it's used
Just some refactoring to make the next patches better readable.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-08 11:05:43 +01:00
Sascha Hauer 988d795ca5 ARM pcm043: Use external bootmode
The pcm043 uses external bootmode, update the defconfig
accordingly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-02 15:37:20 +01:00
Sascha Hauer 7c5f706f49 ARM i.MX53: enable l2 cache
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-02 15:36:19 +01:00
Antony Pavlov 1487daabf9 usb: ehci-hcd.c: fix 'value computed is not used' warning
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-26 13:53:13 +02:00
Sascha Hauer 6b8503baab Merge branch 'master' into next 2011-10-23 13:38:39 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9a5898e524 sandbox: simplify linker script
let the linker to provide the basic linker script

just insert the commands and initcalls before the .rodata section

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-23 13:36:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD 15f876576a sandbox: remove duplicate barebox.lds.S
today we have the same linker script in board and lib
and only the board linker script is used

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-23 13:36:22 +02:00