Commit graph

13505 commits

Author SHA1 Message Date
Sascha Hauer
2a34749fca state: write names in enum32 variables to oftree again
Commit 179b75a (state: fixup: only export default value during
fixup if set) accidently removed writing the enum32 value names
to the device tree. Add it back again

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
2015-09-29 09:07:40 +02:00
Eric Bénard
46c14545cf eukrea-cpuimx25: update defconfig
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:27 +02:00
Eric Bénard
d7f19aad72 eukrea-cpuimx25: enable dfu sequence conditionaly
this can be useful on the evaluation board but we don't want
the sequence to launch on custom board when there is not the
switch button on gpio 82

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:27 +02:00
Florian Vallee
a266d5940c eukrea-cpuimx25: setup usb through chipidea-imx driver
OTG and HOST port are tested with a mass storage device.

Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:26 +02:00
Eric Bénard
4f04790758 imx25: register usb-misc by default
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:26 +02:00
Eric Bénard
39b0eb3b84 chipidea-imx: allow phymode configuration in pdata
it's currently only handled through DT and for i.MX25 OTG port (at least),
we need to configure portsc to get host mode working but it actually fails
as ci->phymode is 0 which is USBPHY_INTERFACE_MODE_UNKNOWN

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:25 +02:00
Florian Vallee
6b3bf88b7c eukrea-cpuimx25: fix boot
we need to disable second SD chip select properly else the SDRAM size
detection will detect it but there is no memory connected so the boot
will fail

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Florian Vallee <fvallee@eukrea.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:47:25 +02:00
Jan Remmet
0c2971a41c ubiformat: remove dead code
divisor isn't used.

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:40:42 +02:00
Vicente Bergas
08f991ab21 archosg9: add display
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:34:57 +02:00
Vicente Bergas
0b7bfa5253 archosg9: Use defaultenv-2-menu
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:34:57 +02:00
Vicente Bergas
1fe4abeaf5 archosg9: re-generate defconfigs with "make savedefconfig"
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-29 08:34:56 +02:00
Peter Mamonov
aa2bb00eff ata: intf_platform_ide: add OF bindings
Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-24 19:33:27 +02:00
Daniel Schultz
319d5c1ffc commands: Add MMC ext. CSD register tool
This tools can read/write to the extended CSD register of MMC devices.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-24 19:33:27 +02:00
Sascha Hauer
b62aea5611 of_fix_tree: do not fail when fixup fails
When a device tree fixup fails it is worth printing a warning, but
we should not fail booting.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-24 08:00:39 +02:00
Sascha Hauer
4a79ca7d62 of_fix_tree: warn instead of fail when a fixup fails
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 17:14:46 +02:00
Sascha Hauer
7e44c8495a introduce strerrorp
putting an error pointer into strerror can be a bit confusing since
strerror takes a positive error code but PTR_ERR returns a negative
number, so we have to do strerror(-PTR_ERR(errp)). Some places got
this wrong already, so introduce a strerrorp function which directly
takes an error pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 17:12:44 +02:00
Sascha Hauer
9d54b6f6b6 clock: remove duplicate xdelay declarations
ndelay is declared in include/clock.h, udelay in include/common.h and
mdelay in include/common.h and include/clock.h. Move them all to
include/clock.h and remove duplicates.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 15:13:11 +02:00
Enrico Jorns
16a6d8a674 mtd denali: pass col argument to READID operation
A read id operation followed by 0x00 reads the device ID while
a read id operation followed by 0x20 reads the possible ONFI identifier.

As the READID function did not propagate the second id parameter but had
a hard-coded call for 0x90 0x00, reading the ONFI identifier was not
possible and thus chips werde not detected (tested with
MT29F8G08ABABAWP)

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:35:37 +02:00
Enrico Jorns
aca725cc86 mtd nand_denali: Add denali nand driver
The driver is based on the denali driver from the linux kernel

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:35:37 +02:00
Enrico Jorns
61720f7bd4 mtd nand: added 'bits_per_cell' property
This one is available in the kernel and used by the denali driver

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:33:23 +02:00
Markus Pargmann
d27cddcc3a usb: chipidea: Add udc unregister for device removal
The host may assume that the usb device is still up and running after
booting if we do not deregister the udc here. I observed issues when the
linux kernel was using a usb gadget directly where the complete USB Hub
got disconnected through this.

This patch adds a proper USB disconnect for gadget devices.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:31:33 +02:00
Antony Pavlov
43399aa5db MIPS: tplink-mr3020_defconfig: enable gpio & leds
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00
Antony Pavlov
f25a09ded6 MIPS: dts: tplink-mr3020.dts: enable gpio & leds
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00
Antony Pavlov
57ce131be9 MIPS: dts: tplink-mr3020.dts: move aliases up
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00
Antony Pavlov
de8a86401a MIPS: dts: ar9331.dtsi: add gpio
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00
Antony Pavlov
15cc058c06 gpio: add ath79-gpio driver for Atheros MIPS SoCs
This driver is based on linux-4.2 driver.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00
Antony Pavlov
e40e6e479c MIPS: ath79: use gpiolib
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:28:03 +02:00
Antony Pavlov
495f0034b7 MIPS: refactor SBL start.S code
This commit removes code duplication by using
MIPS PBL macros in the SBL start.S file.

One of the side effects of this patch is that
the only <asm/pbl_macros.h> header file is depends
on the <generated/utsrelease.h> header file.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-23 10:26:37 +02:00
Antony Pavlov
35a0f20255 MIPS: PBL: Add missing pieces for xz compressed PBL image
Also ignore piggy.shipped binary (CONFIG_IMAGE_COMPRESSION_NONE=y).

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:21:50 +02:00
Antony Pavlov
072a4af454 MIPS: mach-ath79: make ar71xx_regs.h assembler-tolerant
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:21:49 +02:00
Stefan Christ
c7f759239d images: ignore *.imx-sram-img
Add pattern to gitignore to hide files:

    start_imx6_cm_fx6.imx-sram-img
    start_imx6_utilite.imx-sram-img

Signed-off-by: Stefan Christ <s.christ@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:19:37 +02:00
Enrico Scholz
29986f9ff4 ARM: MMU: fixed calculation of number of PTEs
barebox uses 4KiB pages so that number of PTEs is 'size >> 12', not
'size >> 10'.

Thie 'size >> 10' limit is not an immediate problem because it allocates
too much PTEs only which are not used.  But it can overflow an integer
multiplication ('i * PAGE_SIZE') which causes undefined behaviour with
gcc5.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:11:35 +02:00
Enrico Scholz
485ef5279e ARM: MMU: fixed dma_flush_range() call
dma_flush_range() expects an address as second argument, not a size.

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:11:20 +02:00
Uwe Kleine-König
36152c5aa5 video: imx: assert that image buffer doesn't cross a 4 MiB boundary
The reference manual (for the i.MX25 in my case) states:

	This field must start at a location that enables a complete
	picture to be stored in a 4 Mbyte memory boundary (A [21:0]). A
	[31:22] has a fixed value for a picture’s image.

Check this condition for user-supplied framebuffer values and enforce it
for driver-allocated buffers.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-21 08:08:09 +02:00
Sascha Hauer
e79fa9b5f0 i2c: fsl: Add bus recovery support
Useful for recovering busses. This needs additional device tree properties
describing the sda/scl gpios. The corresponding linux patch with the binding
description is currently under review.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-17 10:05:07 +02:00
Antony Pavlov
4d90f44e6e usb: storage: fix warning: no previous prototype for 'usb_stor_Bulk_clear_endpt_stall'
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-14 08:29:20 +02:00
Antony Pavlov
c7b1012923 logo: Kconfig: make BAREBOX_LOGO_* depend on BAREBOX_LOGO
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-14 08:29:20 +02:00
Lucas Stach
342891feed passwd: avoid NULL ptr usage
Fixes
common/password.c: In function 'check_passwd':
common/password.c:292:4: warning: reading through null pointer (argument 3)
    pr_err("No such digest: %s\n", PASSWD_SUM);

if no algo is enabled in which case PASSWD_SUM is defined to NULL.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-14 07:59:11 +02:00
Lucas Stach
15c41beb5b ARM: add implementation for dma_alloc_writecombine for !CONFIG_MMU
This fixes build failures in builds without MMU support by providing
a fallback implementation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-14 07:59:11 +02:00
Peter Mamonov
fe02d7e6c8 usb: ehci-hcd: use is_timeout_non_interruptible()
Use is_timeout_non_interruptible() intead of is_timeout()
to avoid re-entering ehci-hcd functions from pollers,
registered by usb drivers.

Signed-off-by: Peter Mamonov <pmamonov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-10 09:16:42 +02:00
Antony Pavlov
d3b39aeffd endian: sync {big,little}_endian.h with linux-4.2
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-10 09:13:24 +02:00
Daniel Schultz
afba8f9223 ARM: dts: Include strip file to Phytec am335x MLOs
This patch disables the clocks in the Phytec am335x MLOs and reduce the MLO
size by 9kb.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-09 08:59:51 +02:00
Daniel Schultz
62ab2e6e1e ARM: dts: Add include to strip am33xx clocks
Include this file to disable all clocks.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-09 08:59:46 +02:00
Daniel Schultz
758630aefc ARM: am335x: Register eMMC MLO handler
Register the eMMC MLO handler to the barebox_update command.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-09 08:59:38 +02:00
Daniel Schultz
b9672eb87d ARM: am33xx: Add barebox_update eMMC option
With this patch the barebox_update command will be extended by the possibility
to flash the MLO to eMMC devices.

The MLO will be flashed to the following addresses:
0x00000
0x20000
0x40000
0x60000

Because the first 512 Bytes of the MLO are reserved for the CHSETTINGS header
and this only use ~80 Bytes, there is space for the partition table in the
header.

The command will overwrite the bootstrap code area and will hold the
partition table and the Boot signature.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-09 08:59:28 +02:00
Lucas Stach
b654946ebc net: e1000: correct function signature of set_ethaddr
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-09 08:44:52 +02:00
Sascha Hauer
bf62a6e2d8 of_fix_tree: Print error message
When a of_fixup handler fails add a meaningful error message so
that the user gets a clue what might have gone wrong.

Suggested-by: Enrico Joerns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-08 15:48:44 +02:00
Masahiro Yamada
2548c100bb console: use int rather than uint in printf() and friends
These functions and vsprintf() return int type.
No reason to use uint type.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-07 07:24:32 +02:00
Daniel Schultz
572e8cdfa3 drivers: mci: Add mci_get_device_by_name function
Get a 'struct mci' by search after the device name.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-04 08:59:42 +02:00
Daniel Schultz
1f76dfce39 include: mci: Add new ext. CSD field defines
Added missing defines for the extended CSD register until standard 5.1.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-09-04 08:21:44 +02:00