9
0
Fork 0
Commit Graph

8740 Commits

Author SHA1 Message Date
Alexander Shiyan b8f69b8e11 w1: Fix compiler warning
This patch fixes following warning:
drivers/w1/w1.c: In function 'w1_found':
drivers/w1/w1.c:471: warning: integer constant is too large for 'long' type

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 09:04:26 +01:00
Alexander Shiyan 1ca6ccbfda mtd: nand: Fix compiler warning
This patch fixes following warning:
drivers/mtd/nand/nand_write.c: In function 'nand_do_write_ops':
drivers/mtd/nand/nand_write.c:272: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 09:04:26 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8be08d9cf2 defaultenv-2: add boot sequence
This allows to boot a sequence of boot entries until one succeeds.

boot sources can be passed in $global.boot.default, which is now treated
as a list. Also a list of boot entries can be specified as arguments
to the boot script. The entries can be:

- a plain filename from /env/boot/
- a full path to an arbitrary file
- a directory containing boot entries

With this this command:

boot net nand-ubi /env/boot.d

would first use the /env/boot/net entry, if this fails the /env/boot/nand-ubi
entry and if this also fails the files from /env/boot.d/ (which could also
be links to boot scripts)

To make the above the default, global.boot.default would be specified as:

global.boot.default="net nand-ubi /env/boot.d"

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-05 11:51:35 +01:00
Sascha Hauer 94e71b843f libubi: Use global mtd_all_ff function
We introduced a global function for this, so use it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 10:54:46 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2ecdea32dd switch more boards to lwl-y
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 09:23:45 +01:00
Sascha Hauer 13b4e37c1c Merge branch 'for-next/vexpress' 2013-03-04 09:21:54 +01:00
Sascha Hauer 678832e17a Merge branch 'for-next/usb' 2013-03-04 09:21:54 +01:00
Sascha Hauer ea0f831cd0 Merge branch 'for-next/mxs' 2013-03-04 09:21:54 +01:00
Sascha Hauer 62ee96bd3b Merge branch 'for-next/mtd'
Conflicts:
	arch/arm/configs/eukrea_cpuimx27_defconfig
	drivers/mtd/core.c
2013-03-04 09:21:49 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Sascha Hauer 908bc8ce45 Merge branch 'for-next/imx' 2013-03-04 09:21:37 +01:00
Sascha Hauer 831d83e922 Merge branch 'for-next/highbank' 2013-03-04 09:21:37 +01:00
Sascha Hauer c6813a5fb1 Merge branch 'for-next/gpt' 2013-03-04 09:21:37 +01:00
Sascha Hauer 1eb77960b8 Merge branch 'for-next/dt' 2013-03-04 09:21:37 +01:00
Sascha Hauer 3d9c751312 Merge branch 'for-next/console' 2013-03-04 09:21:36 +01:00
Sascha Hauer b7314e47a5 Merge branch 'for-next/clps711x' 2013-03-04 09:21:36 +01:00
Sascha Hauer 40d8780de5 Merge branch 'for-next/at91' 2013-03-04 09:21:36 +01:00
Sascha Hauer 3451e2c44f Merge branch 'for-next/arm-l2x0' 2013-03-04 09:21:36 +01:00
Sascha Hauer 4c246afad3 Merge branch 'for-next/ahci' 2013-03-04 09:21:36 +01:00
Sascha Hauer 0e1c864e8a Release v2013.03.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-04 09:19:47 +01:00
Sascha Hauer 10473b33d7 mtd: always write page when oob is given
Since recently we check for the page being written for not being
empty and do not actually write it when it is. This fails for a
freshly created flash bad block table when all blocks are good.
In this case the bbt code will try to write an empty page, but
with the BBT marker in OOB. This page never gets written, so the
BBT code will not find a bad block table during next start up and
writes it again. Fix this by checking if we want to write OOB data,
if we do, then write the page, even if the data is empty.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:29:28 +01:00
Antony Pavlov 14743045fb usb: fix build for big-endian platform
The problem was introduced in

    commit 51885a7d73
    Author: Sascha Hauer <s.hauer@pengutronix.de>
    Date:   Thu Jun 28 09:56:23 2012 +0200

    Change byte order detection mechanism to kernel style

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:27:53 +01:00
Marc Kleine-Budde 439eefcfe4 driver/serial: add driver for the mxs application uart
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:27:14 +01:00
Marc Kleine-Budde 0150bf0ba1 driver/serial: Kconfig: explicitly state that existing mxs driver is for the debug uart
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:27:14 +01:00
Maxime Ripard 3d61f0865b ARM: cfa10036: Remove the boot partition and boot from ext
Support for ext filesystems has been introduced recently. We can now
boot directly from our rootfs, loading the kernel and device tree
images from /boot.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 16:22:06 +01:00
Jean-Christophe PLAGNIOL-VILLARD 07ca814239 highbank: add of fixup
depending on the power domain register we need to disable sata or mmc
and update the cpu informations

take from Calxeda U-Boot git

Register the original dtb to /dev/firmware-dtb and the fixed dtb to /dev/dtb

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 14:08:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD e503b299ef highbank: move register value to include/mach
so the board can use it

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 14:08:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6ae2455e80 of: add do_fixup_by_compatible with u32 and string version
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 14:08:44 +01:00
Sascha Hauer ca9a1827dc net: dhcp: fix typo
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-28 13:06:49 +01:00
Maxime Ripard 4f105dd774 log2: Fix declaration of __roundup_pow_of_two
The roundup_pow_of_two function is making use of __roundup_pow_of_two
when the call to __builtin_constant_p fails, which is not implemented in
barebox.

Copied the code from Linux log2.h header.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:59:34 +01:00
Maxime Ripard 2cc328ec2d cfa10036: Update the environment
Since we added a new partition in the board, the partitions number of
the boot and rootfs partition have changed as well.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:58:14 +01:00
Maxime Ripard c981b83356 cfa-10036: Use the second MMC partition to store the environment
Since the only storage medium on the cfa-10036 is the MMC card, we need
to have a registered environment partition on it if we want to be able
to modify at runtime.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:58:14 +01:00
Sascha Hauer a9f50d96e5 ARM i.MX pcm043: Use imx_bootsource() to detect bootsource
Also, print out where our environment comes from.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:57:08 +01:00
Sascha Hauer 74421f2f47 ARM i.MX pcm043: Switch to new environment
- switch to new environment
- make barebox partitions 512K big
- update defconfig for new env:
  - enable menu support
  - miitool support
  - clk commands
  - oftree support
  - let/dirname/readlink commands
  - enable external nand boot support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-27 08:57:04 +01:00
Sascha Hauer 3880243675 Merge branch 'pu/imx-fixes' 2013-02-27 08:44:38 +01:00
Alexander Shiyan 4a963a2513 ARM: i.MX: Replace numbers with predefined constants in several places
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 15:08:36 +01:00
Jean-Christophe PLAGNIOL-VILLARD 91786b5bc8 serial/Makefile: drop out of date comments
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 15:05:22 +01:00
Fabio Porcedda 8e418dcc63 menu: fix remove superfluous newline: change puts() -> printf("%s", )
Fix previous commit:
638f91b "fix compiler warnings: use puts() instead of printf()".

Because puts() function add a newline, use instead printf("%s", ).

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 15:04:23 +01:00
Christian Kapeller dd3b4f782f bareboxenv: Return proper exit code on failure.
In case environment loading/saving failed, the calling program
should be informed about that by returning a non zero exit code.

Signed-off-by: Christian Kapeller <christian.kapeller@cmotion.eu>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 15:01:54 +01:00
Jean-Christophe PLAGNIOL-VILLARD dc62dd48d8 smc911111: fix send and recv return value
on error send error code and 0 on success

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +01:00
Sascha Hauer 6ad2bdb8e1 hush: implement $*
To get all arguments a script is called with.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +01:00
Fabio Porcedda 4cb9d4fa0e ARM at91 telit-evk-pro3: move config-board out of /env/init
This is to complete the work of two recent commits:
- defenv2: move config-board out of /env/init
- defenv2: comment setting default values in /env/config

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +01:00
Fabio Porcedda 88b9369518 defenv2: comment setting default values in /env/config
There is no need to set again default values in /env/config
because they are already set in /env/bin/init,
that allows /env/config-board to change those default values
without being overwritten by /env/config.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +01:00
Sascha Hauer 457c038f83 ARM i.MX35: Let MAX clk be in run-mode-on
The reset value for the MAX clk gate is 0b10, that is it is turned
on in CPU run mode and off in stop mode. Configure it that way during
startup.

The 0b11 value previously in this field causes some nasty behaviour in
the Linux kernel:

- The i.MX35 has two bits per clock gate which are decoded as follows:
  0b00 -> clock off
  0b01 -> clock is on in run mode, off in wait/doze
  0b10 -> clock is on in run/wait mode, off in doze
  0b11 -> clock is always on

The MAX clock is needed by the SoC, yet unused in the Kernel, so the
common clock framework will disable it during late init time. It will
only disable clocks though which it detects as being on. This detection
is made depending on the lower bit of the gate. So with the value of
0b11 the clock framework will detect the clock as turned on, yet unused,
hence it will turn it off and the system locks up.
With the value of 0b10 instead, the clock framework will detect the
clock as being disabled and will not try to turn it off, so the
system works.

The real bug is in the Linux clock framework. However, the value 0f 0b10
seems to be a sane default value, so restore it. This lets Linux work
again and gives time to fix the bug in Linux.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:00:30 +01:00
Sascha Hauer 94466be718 ARM i.MX: Fix booting from NOR when external nand boot is enabled
We cannot jump to SDRAM unconditionally in imx*_barebox_boot_nand_external.
When we really boot from NOR flash the binary is not yet copied to SDRAM.
Instead, let the return value of imx_barebox_boot_nand_external() indicate
whether we really boot from NAND and only jump to SDRAM in this case.
Otherwise just continue to the normal SoC specific entry.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:00:25 +01:00
Vicente Bergas 8c82b1b202 OMAP4 USB BOOT: remove double line endings
From previous patch that replaced printf with puts:
 puts adds it's own line ending, so do not append it manually

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 09:18:03 +01:00
Alexander Shiyan d2e68e2d65 ARM: pcm038: Using "get_ram_size" for determine SRAM size
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Alexander Shiyan 5f19b73344 ARM: i.MX27: Use DEVICE_ID_SINGLE for IIM, CCM and ESDCTL
Only one of IIM, CCM or ESDCTL device is allowed, so use DEVICE_ID_SINGLE
for these devices.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Alexander Shiyan cb8ee706af ARM: pcm970: Replace #ifdef with IS_ENABLED()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00
Alexander Shiyan 97dfd44a57 ARM: pcm970: Fix bug with CompactFlash
Patch adds missing MX27_PCMCIA_CTL_BASE_ADDR offset for "readl" operator.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 08:57:40 +01:00