9
0
Fork 0
Commit Graph

12822 Commits

Author SHA1 Message Date
Marc Kleine-Budde 55396feb25 state: state_uint32_create: use %u to print unsigned variable
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: next, commit:2ce086b8beee
2015-05-17 20:43:39 +02:00
Uwe Kleine-König 25d8af0f01 of: add a function to remove an of_fixup
This function is needed when a device that already registered a fixup in
the probe routine fails later to probe completely. Without unregistering
the fixup the function might later be called with invalid data.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Forwarded: id:1431771149-27265-1-git-send-email-u.kleine-koenig@pengutronix.de
2015-05-17 20:42:55 +02:00
Marc Kleine-Budde d9ada004ea include: add includes includes to make fdt.h, of.h and state.h self contained
Otherwise compilation may fail with:

include/fdt.h:11:15: error: unknown type name 'uint64_t'
 static inline uint64_t fdt64_to_cpu(uint64_t x)

include/of.h:22:19: error: field 'list' has incomplete type
  struct list_head list;

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied-Upstream: v2015.06.0, commit:9e69a04222ee88c51bd5ca4f802b5fa5ad42b0f8
2015-05-13 11:12:54 +02:00
Sebastian Hesselbarth 532059b525 base: Introduce deferred probing
As expected, we would need deferred probing sooner or later. This is
a first approach to allow devices to return -EPROBE_DEFER and get
sorted into a list of deferred devices that will be re-probed later.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Origin: v2015.06.0, commit:ab3da15bc14cc5297b2da27eb3dcd8d70dac41df
2015-05-13 11:12:14 +02:00
Sascha Hauer 3bc7f48a44 Release v2015.05.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-06 08:51:30 +02:00
Sascha Hauer c05380f61e net: phy: Do not double remove phy device
This fixes: 80264a8 driver: Call bus->remove instead of driver->remove

On mvebu it happens that:

Upon device shutdown, when iterating through the active device list,
the phy0 device is removed before mdio-mvebu. Then, when the mdio bus
device is removed, the phy0 device is removed again, here:

mdio_bus_remove(on mdio-mvebu)
  mvebu_mdio_remove
    mdiobus_unregister
      unregister_device
        mdio_bus_remove(on phy0)

Fix this by setting the mdio busses phy_map[phy->addr] to NULL when
unregistering the phy device, so that mdiobus_unregister no longer
finds a valid phy_device when iterating over the busses device list.

Reported-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
2015-05-05 13:53:15 +02:00
Lucas Stach cbc2492621 PCI: fill in bus primary field
This was erroneously left uninitialzed as nothing was using it.
The i.MX6 PCI driver needs this to be filled properly to decide
if a config space access is allowed for a specific devfn.

This fixes PCI enumeration on the Gateworks GW54xx board.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-01 08:37:19 +02:00
Lucas Stach 2a8bc957a7 PCI: register and active bridge device before proceeding to scan
The bridge device needs to be registered and activated before
the scanning can proceed, as the bridge is the parent for other
devices.

This fixes a NULL ptr derefernce when scanning PCI hierarchies
with bridges behind bridges.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-01 08:37:19 +02:00
Antony Pavlov 92207cde49 net: e1000: add HAS_DMA dependency
The e1000 driver uses the dma coherent functions
and thus can only be build for architectures implementing them.

Here is mips malta build error log:

  drivers/built-in.o: In function `e1000_transmit':
  drivers/net/e1000.c:(.text.e1000_transmit+0x80): undefined reference to
  `dma_sync_single_for_device'
  drivers/built-in.o: In function `e1000_poll':
  drivers/net/e1000.c:(.text.e1000_poll+0x60): undefined reference to
  `dma_sync_single_for_cpu'

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 20:03:48 +02:00
Sascha Hauer 10e6930323 mtd: partition: Fix OF partition fixup
To get the number of address cells and size cells we have to use
the newly created partition node, not the parent device node. The
parent device node returns the address/size cells of the controller
node, not the partition node.

On an am335x machine this fixes the device tree passed to Linux.
The situation there is:
	...
	gpmc@50000000 {
		...
		#address-cells = <0x2>;
		#size-cells = <0x1>;
		ranges = <0x0 0x0 0x8000000 0x10000000>;
		...
		nand@0,0 {
			reg = <0x0 0x0 0x0>;
			#address-cells = <0x1>;
			#size-cells = <0x1>;
			...
			partition@7 {
				label = "system";
				reg = <0x220000 0x7de0000>;
			};
		};
	};

and without this patch barebox passes three bytes for
partition@7's reg property instead of only two which naturally
confuses Linux and yields to the system partition to start at 0
with a size of 0x220000.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2015-04-28 09:09:46 +02:00
Lucas Stach dbe6023074 ARM: highbank: select OFTREE
The board code uses quite a few OF functions and it doesn't seem
reasonable to run this board without DT support.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-20 13:19:51 +02:00
Sebastian Hesselbarth 11045f866d USB: xHCI: Sync non-coherent DMA buffers
When working with non-coherent transfer buffers, we have to sync
device and cpu for outgoing and incoming buffers. Fix the driver where
non-coherent buffers are used in device context.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-15 14:05:42 +02:00
Sascha Hauer ee0035e5cc Merge branch 'for-next/state' 2015-04-13 12:57:14 +02:00
Sascha Hauer a76a6bc8fd Merge branch 'for-next/pxa' 2015-04-13 12:57:13 +02:00
Sascha Hauer 9c4cf7d3b6 Merge branch 'for-next/pci' 2015-04-13 12:57:13 +02:00
Sascha Hauer c41b60fe6a Merge branch 'for-next/net' 2015-04-13 12:57:13 +02:00
Sascha Hauer 9f13039b55 Merge branch 'for-next/misc' 2015-04-13 12:57:13 +02:00
Sascha Hauer 1ef7837c37 Merge branch 'for-next/imx' 2015-04-13 12:57:13 +02:00
Sascha Hauer 3506a2331d Merge branch 'for-next/dts' 2015-04-13 12:57:13 +02:00
Sascha Hauer 4e1ac4a872 Merge branch 'for-next/driver' 2015-04-13 12:57:12 +02:00
Sascha Hauer 909dbe5334 Merge branch 'for-next/crypto' 2015-04-13 12:57:12 +02:00
Sascha Hauer 881d2e4ac6 Merge branch 'for-next/at91' 2015-04-13 12:57:12 +02:00
Sascha Hauer e894f9e85b .mailmap: Fix Juergens name
It's Juergen Borleis now, not Beisert.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 11:32:34 +02:00
Sascha Hauer f698ac0aa1 dts: update to v4.0-rc6
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 10:37:58 +02:00
Sascha Hauer 1c1bf62c58 dts: update to v4.0-rc4
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 10:37:39 +02:00
Sascha Hauer 38504401da dts: update to v4.0-rc3
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 10:37:32 +02:00
Sascha Hauer 67310b17f5 dts: update to v4.0-rc2
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 10:37:22 +02:00
Sascha Hauer 026f30ccc2 Release v2015.04.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 10:27:02 +02:00
Antony Pavlov d2dea77829 make PBL_CONSOLE depend on PBL_IMAGE
PBL_CONSOLE option is used only for building PBL. See this output:

    barebox$ git grep PBL_CONSOLE
    arch/arm/configs/tx28stk5_defconfig:CONFIG_PBL_CONSOLE=y
    common/Kconfig:config PBL_CONSOLE
    common/Makefile:pbl-$(CONFIG_PBL_CONSOLE)       += memory_display.o
    include/printk.h:       (defined(__PBL__) && defined(CONFIG_PBL_CONSOLE))
    include/stdio.h:        (defined(__PBL__) && defined(CONFIG_PBL_CONSOLE))
    lib/Makefile:pbl-$(CONFIG_PBL_CONSOLE) += vsprintf.o
    pbl/Makefile:pbl-$(CONFIG_PBL_CONSOLE) += console.o

PBL_CONSOLE looks confusing in PBL-less configuration
so it's better to enable it only if PBL is enabled.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 10:17:22 +02:00
Robert Jarzmik 5bd7c689a0 ARM: pxa: add mainstone board support
Add support for the Intel XScale PXA270 development system platform.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 09:25:03 +02:00
Robert Jarzmik 1e72d3c622 net: smc1111: add a quirk for pxa pxa27x platforms
As hinted in the linux kernel driver, pxa platforms such as mainstone,
stargate and idp have a broken design, where half-word writes not
aligned to a word address are not working.

This patch is a taking back the half-word write accessor for this
specific case from the linux kernel.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 09:24:00 +02:00
Robert Jarzmik 6393f1345a net: smc1111: fix platform data initializations
The configuration and control setup introduced in commit "extend the
driver for 91c94 and 91c96 support" suffers from a typo defect, which
makes the commit broken.

The typo happens to be in barebox tree, while it's not in the tested
patches I had, and there was a mismatch in my former submission, which
is fixed by this patch.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 09:17:40 +02:00
Robert Schwebel 3fe92e8bad Documentation: rename powerpc manual to .rst
Fixes:
Documentation/boards/powerpc.rst:6: WARNING: toctree glob pattern u'boards/powerpc/*' didn't match any documents

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 09:01:28 +02:00
Robert Schwebel 93ddba0fb4 Documentation: fix am335x title
Fixes:
Documentation/boards/am335x.rst:51: WARNING: Title underline too short.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 09:01:27 +02:00
Sebastian Hesselbarth a60d04c247 net: mvneta: Fix transmit errors due to dirty txdesc
Marvell Neta's transmit descriptor (txdesc) is allocated by dma_alloc_coherent()
but not zeroed before calling mvneta_send the first time. This can cause spurious
transmit errors due to improperly set bits in txdesc's cmd_sts field.

Fix initial transmit errors by always writing whole cmd_sts field instead of ORing
the bits.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 08:42:30 +02:00
Markus Pargmann 4cc0a3d9c5 wdog: imx-wd: Disable watchdog powerdown counter
Disable the watchdog powerdown counter at start. Otherwise this may
trigger a reset or poweroff over the WDOG_B line to a PMIC. This counter
is set to 16 seconds after poweron.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 08:35:54 +02:00
Markus Pargmann 564a6092ba wdog: imx-wd: Introduce ops struct for imx21/imx1
Replace the set_timeout function in the device platform data by an ops
struct which stores a set_timeout and init function.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-13 08:35:54 +02:00
Lucas Stach da440ab859 pci: make sure to activate devices on the root bus
Commit b8a1bb1dd2 (pci: defer device registration until after bridge setup)
changed the activation order of devices, so that bridges above the devices could
be configured properly before activating the devices below. This commit failed
to acknowledge that there may be devices located directly on the root bus without
any bridge in between and so those devices would never get enabled.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2015-04-13 08:34:28 +02:00
Marc Kleine-Budde 7cb4778e7f imx-image: pad generated image to 4k
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 15:45:26 +02:00
Marc Kleine-Budde 4a50ffc746 imx-image: main: make use of round_up instead of open coding it
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 15:45:26 +02:00
Marc Kleine-Budde 5e5ced6073 imx-image: mx35: increase load image size, due to dobule header
Since commit:

    690e392027 imx-image: handle i.MX35 special case

the IVT+DCD header is placed both at 0x0 and 0x1000, this patch reflects this
change and increases the load image size accordingly.

Cc: Eric Bénard <eric@eukrea.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 15:45:26 +02:00
Marc Kleine-Budde 8acb4e65ce imx-image: introduce HEADER_LEN and replace several 0x1000 and 4096
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 15:45:26 +02:00
Marc Kleine-Budde 15034f8fa8 imx-image: replace 0x400 by FLASH_HEADER_OFFSET
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 15:45:26 +02:00
Marc Kleine-Budde 01e879bcdf imx-image: add_header_v2(): replace hardcoded 0x400 by offset parameter
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 15:45:26 +02:00
Mirko Damiani e44c9b04c4 net: ping: return an error exit code when connection fails
ping command does not always returns 1 as exit code when connection to
host fails. In particular it returns the exit code of the previous run.
This patch fixes this issue.

Signed-off-by: Mirko Damiani <mirko@develer.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 08:03:08 +02:00
Sascha Hauer 712da9305d net: Add Intel e1000 driver
This adds the Intel e1000 driver from U-Boot. The driver looks in parts
quite similar to the kernel driver, I don't know whether one is derived
from the other or if they both just have the same origin.

Many coding style related issues are fixed, the code is simplified in
several places. All features of the original driver should still be there,
only fiber support is disabled since it's quite unlikely that this is
used in barebox.

The driver has been tested with the i.MX6 PCIe driver and a I210 e1000
device (0x8086:0x1533)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 08:03:08 +02:00
Marc Kleine-Budde 134f24615b commands: dmesg: fi format security warning
commands/dmesg.c: In function ‘do_dmesg’:
commands/dmesg.c:71:3: warning: format not a string literal and no format arguments [-Wformat-security]

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 08:01:53 +02:00
Marc Kleine-Budde f61275fb78 images: mxs: remove not used PREP_ definitions
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-03 07:56:33 +02:00
Teresa Gámez 394d4acb8d mtd: nand_omap_gpmc: Fix ecc check for bch8 romcode
The bch8 romcode was only checked and corrected for the
first 512 bytes of a 2048 byte page. Set interation counter
and eccsizes correct for the different bch types.

Tested OMAP_ECC_BCH8_CODE_HW and OMAP_ECC_BCH8_CODE_HW_ROMCODE.

Reported-by: Gabor Janak <g.janak@agilion.de>
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-30 19:27:21 +02:00
Teresa Gámez 4ef5f8cf34 mtd: nand_omap_gpmc: Remove unused code
The ecc layout structs are not used anywhere.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-03-30 19:27:21 +02:00