9
0
Fork 0
Commit Graph

9093 Commits

Author SHA1 Message Date
Sascha Hauer fa49b39bb4 pbl: Fix typo in make causing pbl files to be rebuilt
We had pbl_cc__o_c instead of pbl_cc_o_c. This caused all pbl object
files to be rebuilt everytime due to missing .cmd file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-25 15:11:08 +02:00
Sascha Hauer 2827883911 ARM: invalidate data caches during early init
Some SoCs come up with invalid entries in the data cache. This can
lead to memory corruption when we enable them later, so invalidate
the caches early.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Lucas Stach <l.stach@pengutronix.de>
2013-05-23 09:29:52 +02:00
Enrico Scholz 465950ee64 ARM v7: added v7_mmu_cache_invalidate()
At least the iMX6 boot rom seems to jump into barebox with a non
invalidated d-cache which causes data corruption when
v7_mmu_cache_flush() executed by arm_early_mmu_cache_flush() overrides
stack or other valid data.

That's why the cache must be invalided for this processors explicitly
(e.g. in barebox_arm_reset_vector()).  Operation differs from flush only
in one instruction so that patch modifies the existing
v7_mmu_cache_flush() function slightly by adding an optional argument.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 09:29:47 +02:00
Enrico Scholz 9dac54b56a ARM v7: v7_mmu_cache_flush(): do not restore r0-r3 (minor optimization)
Registers 'r0' till 'r3' are scratch registers and do not need to be
restored.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 09:29:41 +02:00
Lucas Stach 431d8a247d arm: properly init alignment trap bit
On ARMv7 the intention is to disable the alignment trap to be able to
use hardware assisted unaligned load/stores. Fix the init to do the
right thing.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 09:29:36 +02:00
Steffen Trumtrar e1a843d668 defaultenv-2: Fix settings entry
There is no "settings-entries-edit" command. This results in a recursive call
to the settings menu. Use the missing "boot-entries-edit" command instead.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 09:26:09 +02:00
Nicolas Pitre 4586f9626b ARM: fix the memset fix
From Kernel commit 418df63a ARM: 7670/1: fix the memset fix

| Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by
| recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
| with the memset return value.  However the memset itself became broken
| by that patch for misaligned pointers.
|
| This fixes the above by branching over the entry code from the
| misaligned fixup code to avoid reloading the original pointer.
|
| Also, because the function entry alignment is wrong in the Thumb mode
| compilation, that fixup code is moved to the end.
|
| While at it, the entry instructions are slightly reworked to help dual
| issue pipelines.
|
| Signed-off-by: Nicolas Pitre <nico@linaro.org>
| Tested-by: Alexander Holler <holler@ahsoftware.de>
| Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-23 08:27:57 +02:00
Sascha Hauer 2683e56174 fdt: Fix dt memreserve entry
The fdt reserve map needs address/size values, not address/end values
like accidently done for generating the reserve entry for the dt.

Reported-by: Jürgen Beisert <j.beisert@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-21 21:39:31 +02:00
Enrico Scholz 19bc427e44 ARM v7: fix mmu-off operation
Although conclusions in 50d1b2de8e "ARM
v7: Fix register corruption in v7_mmu_cache_off" are correct, the
implemented fix is not complete because the following failure can
happen:

1. d-cache contains the cache line around 'sp'

2. v7_mmu_cache_off() disables cache

3. early v7_mmu_cache_flush() pushes 'lr' on uncached stack

4. v7_mmu_cache_flush() flushes d-cache and can override stack written
   by step 3.

5. v7_mmu_cache_flush() pops 'lr' out of cache and jumps to it which
   might be random data now.

Patch avoids step 3 which is easy because 'lr' is never modified by the
function.  By using the 'r12' scratch register instead of 'r10', the
whole initial 'push' can be avoided.

Patch moves also the 'DMB' operation so that it is executed after data
has been pushed on stack.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 10:23:42 +02:00
Eric Bénard ae6f751117 nand_base: sync flash detection functions with linux 3.9's code
this fix the problems introduced when detecting non ONFI flashes in
commit 4c2bdc8728
"nand_base: detect more ONFI flash"

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 07:42:54 +02:00
Sascha Hauer 8fae46a207 Merge branch 'pu/dhcp' 2013-05-17 07:41:49 +02:00
Alexander Shiyan b9ac45694f ARM: ccmx51: Another fix SDRAM size detection
For CCMX51-boards now we do not use ESDCTL, but actual command for
adding memory is missing. This patch fix this issue.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-15 09:24:28 +02:00
Sascha Hauer 66691793b0 net: dhcp: Fix tftp servername handling
When the dhcp code discovered the tftp-server-name option it immediately
tries to resolve the name. This can't succeed since the we are somewhere
in the dhcp processing and the nameserver may not even be known.

Fix this by resolving the name when dhcp is completed. While at it, do
this in a way that net_set_serverip is only called when resolv() returns
something useful. Otherwise we may end up overwriting a previously
configured serverip which came from the bootp bp_siaddr field.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-14 11:51:24 +02:00
Sascha Hauer 37b0cce64d net: dhcp: Fix return value on ctrl-c
the dhcp command will return with 0 when ctrl-c is pressed. Fix this to
-EINTR instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-14 11:50:18 +02:00
Antony Pavlov 2924294da1 gpio: fix typos
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-12 12:30:34 +02:00
Antony Pavlov 6b4231dfd3 ARM: remove unused clkdev.h
See also:

  commit eb84709192
  Author: Sascha Hauer <s.hauer@pengutronix.de>
  Date:   Mon Mar 25 15:18:38 2013 +0100

      clk: remove unused __clk_[get|put]

      This is some unused code resulting from copying stuff from
      the kernel. Remove it.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-12 12:30:19 +02:00
Juergen Beisert baf0d5d9c4 MXS: fix SoC detecting
The missing 'break' statement lets look an i.MX23 like an i.MX28.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 23:24:50 +02:00
Juergen Beisert 6a5e4f0c89 MCI/MXS: fix signed/unsigned mismatch
Using the MXS MCI driver with an eight bit capable eMMC results into the
'devinfo' message the interface uses '0' bits for data transfer:

 barebox:/ devinfo mxs_mci0
 resources:
 num   : 0
 start : 0x80034000
 size  : 0x00002000
 driver: mxs_mci
 bus: platform

  Interface
   Min. bus clock: 1476 Hz
   Max. bus clock: 48000000 Hz
   Current bus clock: 24000000 Hz
   Bus width: 0 bit

The eight bit interface width is stored internally as value '2'. And a two bit
'2' ends up into 0xfffffffe when used as an array index. Using an unsigned
field instead fixes this issue:

 barebox:/ devinfo mxs_mci0
 resources:
 num   : 0
 start : 0x80034000
 size  : 0x00002000
 driver: mxs_mci
 bus: platform

  Interface
   Min. bus clock: 1476 Hz
   Max. bus clock: 48000000 Hz
   Current bus clock: 24000000 Hz
   Bus width: 8 bit

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 23:24:50 +02:00
Sascha Hauer a7ae099b36 ARM: i.MX: ccxmx51: detect SDRAM size by board id
This partly reverts:

commit 697e02b74f
Author: Alexander Shiyan <shc_work@mail.ru>
Date:   Tue Jan 22 15:08:31 2013 +0400

    ARM: ccmx51: Remove SDRAM size settings

    This patch removes SDRAM memory size setting from board due
    to auto detect last one by ESDCTL.

    Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

The board originally configured the SDRAM controller for the
maximum size and detected the usable SDRAM size by reading the
board id. This became broken after switching to automatic SDRAM
size detection by reading back ESDCTL values.

This patch brings back the old behaviour.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 08:24:43 +02:00
Sascha Hauer ef0299f172 ARM: i.MX: Allow disabling SDRAM autodetection
Some boards setup more memory than they actually have. The real memory
size can then be detected later for example by reading a board id.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 08:24:43 +02:00
Alexandre Belloni 8fd1f24bff sama5d3xek: correct rootfs nand partition
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 08:22:24 +02:00
Jean-Christophe PLAGNIOL-VILLARD 259591dd13 qt1070: drop non used buf
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 07:16:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD ce86baace1 commands/mem.c: drop non used DEVMEM
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-08 07:16:40 +02:00
Andreas Pretzsch 73c6c6da8a ARM i.MX31 pcm037: fix erroneous IOMUX GPR setup in pcm037_usb_init()
In commit ad09b59f8b "ARM i.MX31: give
register base addresses a proper MX31_ prefix", the IOMUX GPR setup
to enable USBH2 was replaced with an incorrect source register.
Instead of reading the GPR register, USBOTG HWHOST is used as rmw source,
which contains 0x10020001.
Beside the intended GPR[11] setup ("Enable USBH2 signals on AudioPort 3 and
AudioPort6"), this erroneously also sets
	GPR[28] enable USBOTG loopback
	GPR[17] override DSR_DCE1 with USBOTG_DATA4
	GPR[0]  select FIR DMA requests instead of UART2 DMA

Beside breaking UART2, it probably also broke some UART1 and USB OTG setups.
Fix this and replace the address with the appropriate defines.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-07 08:36:21 +02:00
Andreas Pretzsch 3c4c5eefab ARM i.MX31: cleanup MX31_ prefix: fix leftover IOMUXC_BASE defines
The prefix/cleanup series
	ad09b59f8b
	a8c6359667
	4c53af062b
missed a few unprefixed IOMUXC_BASE define users. Fix these.

Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-07 08:36:21 +02:00
Sascha Hauer 740f01feb7 Merge branch 'for-next/tegra' 2013-05-06 09:30:53 +02:00
Sascha Hauer e9a39d79b9 Merge branch 'for-next/remove-config-h' 2013-05-06 09:30:53 +02:00
Sascha Hauer c19efab886 Merge branch 'for-next/param'
Conflicts:
	drivers/mci/mci-core.c
2013-05-06 09:30:50 +02:00
Sascha Hauer da1ada40d2 Merge branch 'for-next/omap' 2013-05-06 09:30:41 +02:00
Sascha Hauer 579b794b5d Merge branch 'for-next/of'
Conflicts:
	arch/arm/mach-imx/Makefile
2013-05-06 09:30:37 +02:00
Sascha Hauer 646a0d058d Merge branch 'for-next/mxs' 2013-05-06 09:30:28 +02:00
Sascha Hauer 18ffa4da98 Merge branch 'for-next/mtd' 2013-05-06 09:30:28 +02:00
Sascha Hauer c8af035b41 Merge branch 'for-next/misc' 2013-05-06 09:30:28 +02:00
Sascha Hauer 3cdd18632e Merge branch 'for-next/memory-commands' 2013-05-06 09:30:28 +02:00
Sascha Hauer a20caf6c57 Merge branch 'for-next/mci' 2013-05-06 09:30:27 +02:00
Sascha Hauer bb1bd4d582 Merge branch 'for-next/imx' 2013-05-06 09:30:27 +02:00
Sascha Hauer e0efc0a9ee Merge branch 'for-next/gpio' 2013-05-06 09:30:27 +02:00
Sascha Hauer bce0260322 Merge branch 'for-next/atmel' 2013-05-06 09:30:27 +02:00
Sascha Hauer 5fdb9c0829 Release v2013.05.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-06 09:28:07 +02:00
Alexander Shiyan b48610f324 ARM: ccmx51js: Add support for USB Host1
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-06 09:25:05 +02:00
Thomas Petazzoni 9e809ef431 scripts: allow lines longer than 80 cols with printf() in checkpatch
The checkpatch.pl script is also used to validate user-space code in
the scripts/ directory, so it should allow printf() lines to be longer
than 80 columns.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-06 09:20:29 +02:00
Antony Pavlov f0f890a60f clkdev: fix typo
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-06 09:19:41 +02:00
Alexander Shiyan f8e869c16f ARM: pcm038: Add definition for FEC reset
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-04 11:07:44 +02:00
Alexander Shiyan e72bdf32d0 ARM: pcm038: Add definition for SPI chipselect 0
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-04 11:07:44 +02:00
Alexander Shiyan f2ce9ee5f3 ARM: pcm038: Add descriptions for pin-groups
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-04 11:07:44 +02:00
Sascha Hauer 88a012b9e1 Don't honor initrd load address
U-Boot doesn't honor the load address specified in an initrd. Barebox
shouldn't be more strict here. This unbreaks booting an uInitrd
generated by Debian's flash-kernel that uses 0 as entry address where
there is nothing on the i.MX53 that was used.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-04 11:06:30 +02:00
Uwe Kleine-König ce9163ae34 bootm: Simplify initrd address handling
data.initrd_address = UIMAGE_SOME_ADDRESS;
	...
	if (-L was given to bootm)
		data.initrd_address = address_provided_to_-L;
	...
	if (initrd is provided as uInitrd && data.initrd_address == UIMAGE_SOME_ADDRESS)
		data.initrd_address = load_address_from_uInitrd;
	...
	if (data.initrd_address == UIMAGE_SOME_ADDRESS)
		data.initrd_address = UIMAGE_INVALID_ADDRESS;

can be simplified to:

	data.initrd_address = UIMAGE_INVALID_ADDRESS;
	...
	if (-L was given to bootm)
		data.initrd_address = address_provided_to_-L;
	...
	if (initrd is provided as uInitrd && data.initrd_address == UIMAGE_INVALID_ADDRESS)
		data.initrd_address = load_address_from_uInitrd;
	...

The only change introduced by this simplification is for cases where the
user passes -L UIMAGE_SOME_ADDRESS or -L UIMAGE_INVALID_ADDRESS to
bootm. (-L UIMAGE_SOME_ADDRESS is now used literally instead of ignored
before. -L UIMAGE_INVALID_ADDRESS used to skip getting the
initrd-address from the uInitrd, now the uInitrd address is honored.)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-04 11:06:30 +02:00
Alexander Shiyan 7c15fd1b09 NAND: imx: Fix memory leak
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-30 09:35:55 +02:00
Alexander Shiyan 32d531574f MCI: imx: Fix possible null pointer dereference
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-30 09:35:55 +02:00
Alexander Shiyan ef3e752fa1 MCI: atmel: Fix possible null pointer dereference
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-30 09:35:55 +02:00