9
0
Fork 0
Commit Graph

14849 Commits

Author SHA1 Message Date
Lucas Stach b06ecabed9 ARM: i.MX: iim: fix potential out of bounds array access
The check is off-by-one.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:44:46 +02:00
Lucas Stach 435ec2679e commands: menu: check return pointer properly
The called functions return error codes encoded in the pointer,
so the NULL check will never be true.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:44:32 +02:00
Lucas Stach 6974c69d06 compiler: avoid redefining symbols when running with checker
Avoid redefining __user and __kernel if running with a checker
enabled.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:44:11 +02:00
Lucas Stach 5455354846 clk: fix misleading indenting
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:36:49 +02:00
Lucas Stach aab6861314 imx-bbu-nand-fcb: avoid double free of dbbt_entries
The error path properly frees them already.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:36:31 +02:00
Lucas Stach ff06cdf26d imx-bbu-nand-fcb: don't drop error return code
bit_to_flip might be negative if any uncorrectable bitflips
occured. Use int instead of unsigned type in order to properly
propagate the error.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:36:31 +02:00
Lucas Stach 81a54afd22 USB: gadget: composite: avoid possible NULL ptr dereference
Check if g is valid before trying to dereference it.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:35:53 +02:00
Antony Pavlov ad30a80ddb MIPS: csrc-r4k: get cp0 counter rate from devicetree
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:29:54 +02:00
Antony Pavlov adce981d24 of: base: import of_get_cpu_node() from linux-v4.7-rc2
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:29:54 +02:00
Ronald Zachariah 3dc604d636 fs: ext4: fix symlink read function
From U-Boot commit:

| commit 37f23885e4905ff500a8524328aa3084ac11cdb4
| Author: Ronald Zachariah <rozachar@cisco.com>
| Date:   Thu Apr 28 07:08:34 2016 +0200
|
|     fs: ext4: fix symlink read function
|
|     The function ext4fs_read_symlink was unable to handle a symlink
|     which had target name of exactly 60 characters.
|
|     Signed-off-by: Ronald Zachariah <rozachar@cisco.com>
|     Signed-off-by: Stefan Roese <sr@denx.de>
|     Reviewed-by: Stephen Warren <swarren@nvidia.com>
|     Cc: Tom Rini <trini@konsulko.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:18:28 +02:00
Enrico Jorns 90326eba5a vsprintf: fix handling of strp arg in asprintf
strp argument was ignored but should be forwarded to vasprintf() call in
order to make this funktion work as expected.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-07 09:16:41 +02:00
Sascha Hauer 8c8b38efbb ARM: i.MX: karo-tx6: Add support for the 512MiB i.MX6s variant
This adds support for the TX6S-8x35 board variant.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 16:27:20 +02:00
Sascha Hauer ecc8f4e63a dts: update to v4.7-rc4
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 16:26:11 +02:00
Sascha Hauer 56442fa7b8 dts: update to v4.7-rc3
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 16:26:05 +02:00
Raphael Poggi b7d0c04c86 Documentation: add aarch64-qemu-virt board doc.
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:50 +02:00
Raphael Poggi 940511012a uimage: add define for ARM64 architecture
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:50 +02:00
Raphael Poggi 10bf671754 arm: include: swab: use rigth assembly for armv8
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:50 +02:00
Raphael Poggi ac04e93326 arm: boards: add mach-qemu and virt64 board
Introduce mach-qemu and add qemu virt64 board which emulates arm64 board.

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 7cc98fbb61 arm: cpu: add basic arm64 mmu support
This commit adds basic mmu support, ie:
        - DMA cache handling is not supported
        - Remapping memory region also

The current mmu setting is:
        - 4KB granularity
        - 3 level lookup (skipping L0)
        - 33 bits per VA

This is based on coreboot and u-boot mmu configuration.

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi ada79ea079 arm: cpu: disable code portion in armv8 case
Enclosed by #if directive OMAP specific code
and mmu_disable (ARMv8 code will implemented it somewhere else).

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 9159f08ae7 arm: cpu: cpuinfo: add armv8 support
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi c606a266b7 arm: include: system_info: add armv8 identification
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 9ff1fbde76 arm: include: bitops: arm64 use generic __fls
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi a5501914e6 arm: include: system: add arm64 helper functions
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:49 +02:00
Raphael Poggi 928cc6f4ee arm: cpu: add arm64 specific code
This patch adds arm64 specific codes, which are:
	- exception support
	- cache support
	- rework Makefile to support arm64

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:48 +02:00
Raphael Poggi e1287b1a8b arm: rework lib directory to support arm64
This commit create a common directory, lib/,
for arm and arm64 common code.

It also create lib32/ and lib64/ for 32bit
and 64bit code respectively.

Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:23:48 +02:00
Sascha Hauer 04f3cde151 usb: ehci: honour timeout value
usb_control_msg() and usb_bulk_msg() have a timeout parameter. Honour
this in the ehci driver instead of using a default timeout.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 11:15:39 +02:00
Raphael Poggi 375170a3c9 arm: Makefile: rework makefile to handle armv8
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 10:21:16 +02:00
Raphael Poggi 053957b306 arm64: add armv8 Kconfig entries
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 10:21:16 +02:00
Sascha Hauer 699b4f8025 Introduce non volatile device variables
Non volatile device variables are used to make device parameters
persistent. They are like normal non volatile variables, but set
the values of the device parameters with the corresponding name.
Every nv variable beginning with nv.dev is a non volatile device
variable. They have the form nv.dev.<devname>.<paramname> and act
on the parameter <paramname> of the device named <devname>.

The non volatile device variables are designated for example for
video modes, ethernet device ip addresses or mtd partitioning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 10:09:29 +02:00
Sascha Hauer b17973f8ba nvvar: Simplify by using dev_set_param()
The combination of get_param_by_name()/param->set() can be replaced
by using dev_set_param()

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 10:07:32 +02:00
Sascha Hauer e91c234603 nvvar: Simplify by using nv_set()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-06 10:07:32 +02:00
Sascha Hauer e9edf7f61b ARM: bootm: Fix compiler warning
fixes:
arch/arm/lib/bootm.c:92:137: warning: comparison of distinct pointer
types lacks a cast

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 21:29:38 +02:00
Alexander Shiyan e5c6340f42 net: smc911x: Add parsing devicetree options
This patch adds parsing basic devicetree options for the smc911x driver:
reg-io-width, reg-shift and smsc,force-(in/ex)ternal-phy, which makes
driver usable for most DTS-based boards.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:41 +02:00
张忠山 257abdaa36 Do not rm the path from pbl-y target
Whan add some obj in a subdir to lwl-y or pbl-y, like this:

     lwl-y += subdir/test.o other.o

the make process failed:

     make[2]: *** No rule to make target
'arch/arm/boards/boardname/test.o', \
         needed by 'arch/arm/boards/boardname/built-in-pbl.o'.  Stop.

Note, there are not the part "subdir" in the path of the test.o.

this patch fix this

Signed-off-by: 张忠山 <zzs213@126.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:41 +02:00
Sascha Hauer 992794d0d4 eeprom: at24: Use xasprintf for small allocation
The code for error checking shouldn't be bigger than the allocated
string.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:40 +02:00
Sascha Hauer 3b393a43af net: dm9k: Fix buswidth setting for platform data probe
priv->buswidth expects IORESOURCE_MEM_* macros which are not
identical to the integer byte bus width, so calling
dm9000_setup_buswidth() for the platform_data case is wrong.

fixes: d818f02 net: dm9k: add device tree support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported by: 张忠山 <zzs213@126.com>
2016-07-05 09:02:40 +02:00
Alexander Shiyan 341aca3762 Add more files to .gitignore
This patch adds more generated files to ignore list.
...
shc@shc /home/git/barebox-github $ git status
На ветке imx51
Неотслеживаемые файлы:
  (используйте «git add <файл>…», чтобы добавить в то, что будет включено в коммит)

        common/barebox_default_env
        common/barebox_default_env.h
        include/asm
        scripts/basic/docproc

ничего не добавлено в коммит, но есть неотслеживаемые файлы (используйте "git add", чтобы отслеживать их)

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:40 +02:00
Uwe Kleine-König c4fa1cb0f6 mtd: nand: simplify nand_block_checkbad
if (A) {
		if (!B)
			return C;
		return D;
	}

	return C;

can be simplified to:

	if (A && B)
		return D;

	return C;

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:40 +02:00
Alexander Shiyan 2049dbb6fe crypto: crc32: Optimize dynamic CRC table generation
In barebox we have an option for dynamic formation of the CRC32
table (DYNAMIC_CRC_TABLE), but the source code declares a static
array which is simply filled with data, the resulting code becomes
even more than without DYNAMIC_CRC_TABLE option, due to the BSS usage.
CONFIG_DYNAMIC_CRC_TABLE=n
   text    data     bss     dec     hex filename
   1884       0       0    1884     75c crc32.o
CONFIG_DYNAMIC_CRC_TABLE=y
   text    data     bss     dec     hex filename
   1066       4    1024    2094     82e crc32.o

This patch provides dynamic buffer allocation for the CRC table,
which saves about 1 Kbyte, as it should be.
CONFIG_DYNAMIC_CRC_TABLE=y
   text    data     bss     dec     hex filename
   1062       0       4    1066     42a crc32.o

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:40 +02:00
Alexander Shiyan c672fda23a input: Compile keymap only if necessary
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-05 09:02:37 +02:00
Alexander Kurz 3f9c7ea2d8 ARM i.MX31 iomux: remove duplicates with alternate name
Three iomux were accessinble with two distinct names, typo?
Remove the unused duplicates.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 11:48:03 +02:00
Alexander Kurz 492ce4431d ARM i.MX31 iomux: remove obvious duplicates
No need to define some of the iomux twice, remove the duplicates.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 11:48:03 +02:00
Alexander Kurz ca07b91eff imx35-regs: add and use common CGR element shifters
Add some missing Clock Gate Register element shifters which were implemented
as magic numbers in the arm/boards directory. Use the new shifters for
inproved code readability.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 11:47:58 +02:00
Stefan Müller-Klieser 6a218d456c ARM: bootm: recalculate decompression space
According to the kernel documentation it is recommended to place the
compressed image between 32 MiB and 128 MiB. The DTB and initrd should
be placed above 128 MiB. We will follow the recommendation as long as we
have enough RAM. If this is not the case, we fall back to the scheme.
This change is required because of the ARM default kernel config changes
regarding RODATA layout, which lead to an increased compression factor
of the kernel image.
This should be regarded as an intermediate solution until there is a
mechanism for the kernel image to report the decompressed layout
requirements to the bootloader.

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 11:31:05 +02:00
Alexander Kurz 59a2582df5 eukrea-cpuimx35: Fix wrong clock gating for ESDHC1
With commit 962d8b89d2 ("imx35-regs: add defines for USB and SD") the
shifter argument for the iMX35 ESDHC1 CGR instance has been erroneously
assigned to CGR1 instead of CGR0. Fix this for the eukrea-cpuimx35 board.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 09:32:56 +02:00
Alexander Kurz 2a760a7c1e ARM i.MX: de-duplicate PLL initializer macros
Macros for three PLL setups got cloned in different board specific subdirs.
Re-unify those macros into a common place and avoid checkpatch 80-char
warnings when creating a new board subdir.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 09:31:41 +02:00
Alexander Kurz 7e97af8858 ARM: i.MX: central SOC type definition
Move the definition of iMX CPU types to an individual file to allow
on-purpose inclusion. Eliminate magic number CPU type encoding in the
scripts/imx subdir using the new include file.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 09:30:56 +02:00
Alexander Kurz c8608f0772 scripts: imx-image: super_root_key command depends on header_version 1
The Super Root Key pointer exclusively exists in flash header version 1
which is used for i.MX25, i.MX35 and i.MX51 SOC as described in freescales
AN4547 document. Simplify the code a little bit.

Signed-off-by: Alexander Kurz <akurz@blala.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-07-04 09:30:56 +02:00
Alexander Shiyan 22247f0976 ARM: i.MX clk-pllv1: Do not use a negative value for the unsigned variable
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-06-30 08:45:59 +02:00