9
0
Fork 0
Commit Graph

12949 Commits

Author SHA1 Message Date
Robert Schwebel 92b7939211 i2c: omap: fix i2c bus number output
When probing from devicetree, the output for several i2c host
controllers prints out a bus number of -1:

i2c-omap 44e0b000.i2c: bus -1 rev0.11 at 400 kHz
i2c-omap 4802a000.i2c: bus -1 rev0.11 at 400 kHz
i2c-omap 4819c000.i2c: bus -1 rev0.11 at 400 kHz

The call to i2c_add_numbered_adapter() in probe finds out the next free
bus number, so we move the output to a location where the number is
already determined.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-03 09:56:07 +02:00
Jan Luebbe 9bf7d3b281 gpio-davinci: gpio get should return 0 or 1
Returning other values causes problems for client code which wants to
perform calculations with the returned value.

Signed-off-by: Jan Luebbe <jluebbe@debian.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-01 14:07:29 +02:00
Sascha Hauer 6792d94a4b md: use memmap when possible
This adds the missing pieces for:

d8a6e1c ARM/mem: handle data aborts gracefully for md

When possible use memmap and directly and dereference the input pointer
directly in memory_display() so that the data abort occurs where we expect
it and not in the md command. With this d8a6e1c can work as expected.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-28 12:26:33 +02:00
Sascha Hauer f13f1c269e Merge branch 'pu/am335x' 2015-05-28 08:27:02 +02:00
Sascha Hauer e8f4eacedd Documentation: blspec: Document blspec over NFS
We support booting blspec entries found on NFS servers, add documentation
for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 16:10:50 +02:00
Sascha Hauer d428f96ac6 Documentation: blspec: Fix typo
The device index is missing in the example, add it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 16:10:46 +02:00
Marc Kleine-Budde 82d21cf155 commands/Kconfig: fix typo in CMD_BOOTM_OFTREE help
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 09:19:31 +02:00
Marc Kleine-Budde 01fdbb9652 bootm: add magicvar description for global.bootm.oftree
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-26 09:19:30 +02:00
Wadim Egorov 6984e82c84 ARM: am33xx: Fix SCRM compatible string to match new DT compatible string
Commit 461f8cfc7e renamed the SCRM compatible
string in am33xx.dtsi and breaks all am335x based boards.

Rename the SCRM compatible string.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-15 07:09:11 +02:00
Sascha Hauer 97afd89b43 ARM: i.MX5: Add missing CONFIG_ prefix in test
The variable name misses a CONFIG_ prefix to work as expected.

Fixes: 05a1e4b ARM: i.MX5: Do not register fixed clocks twice

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-07 09:48:51 +02:00
Sascha Hauer 4de5f732c0 Merge branch 'for-next/of-device-id' 2015-05-06 21:36:13 +02:00
Sascha Hauer 67e4e8c056 Merge branch 'for-next/mvebu' 2015-05-06 21:36:13 +02:00
Sascha Hauer 3975737a7d Merge branch 'for-next/misc' 2015-05-06 21:36:13 +02:00
Sascha Hauer 10fb785308 Merge branch 'for-next/mips' 2015-05-06 21:36:13 +02:00
Sascha Hauer 4a854c9f49 Merge branch 'for-next/imx' 2015-05-06 21:36:12 +02:00
Sascha Hauer 15e906affd Merge branch 'for-next/dts' 2015-05-06 21:36:12 +02:00
Sascha Hauer 389218585a Merge branch 'for-next/defer' 2015-05-06 21:36:12 +02:00
Sascha Hauer 461f8cfc7e dts: update to v4.1-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-06 08:56:43 +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
Antony Pavlov f76ef11a4a Documentation: mips: fix tplink-mr3020 instruction
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-05 13:41:40 +02:00
Antony Pavlov 16886bfd01 MIPS: tplink-mr3020: enable nmon
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-05 13:41:40 +02:00
Antony Pavlov cd855dd7c3 MIPS: mach-ath79: debug_ll.h: add assembler routines
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-05 13:41:40 +02:00
Antony Pavlov 9035f20098 MIPS: debug_ll_ns16550.h: drop _ns16550 suffix
This commit makes it possible to have unified debug_ll_*
assembler routines for differrent UART program model.
E.g. we can use debug_ll_putc() routine in common
code without knowledge on exact UART model: ns16550
or ar933x.

Also rename *_check_char -> *_tstc.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-05 13:41:40 +02:00
Oleksij Rempel 660d4ef13e MIPS: tplink-mr3020: enable PBL and compression
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-05 13:41:40 +02:00
Sascha Hauer 6d4afd96fc setenv: Be more informative when device parameter setting fails
When setting a device parameter fails not only the error code
is of interest, but also what the parameter name is, what the
device name is and whether a device was found for this name.
Add this information to the error message.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-04 09:27:35 +02:00
Steffen Trumtrar 10bb13e7fd usb: increase USB_CNTL_TIMEOUT to match linux
USB requests should be processed within a timeframe of 5s.
The linux kernel also uses this timeout value for the control packets.

For the musb the increase in timeout helps successfully probing USB devices
(at least on one test hardware), but on the other hand doesn't slow down the
system, if there are no devices, i.e. the timeout never hits. That means,
that the USB core correctly aborts instead of timing out.
Why and how the 100ms was chosen in the first place, can not be deduced from
the git history, just that it seems to work fine for most boards.

Change USB_CNTL_TIMEOUT to 5000ms and replace all occurences of
	`USB_CNTL_TIMEOUT * x`
with just
	`USB_CNTL_TIMEOUT`,
as the timeout is now large enough without it.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-04 09:23:08 +02:00
Sascha Hauer 15422e3435 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>
2015-05-04 08:16:30 +02:00
Marc Kleine-Budde 6da925f87c mtd: of_mtd_fixup(): fix given DT not the default one
We have to start searching for the mtd node starting in the given root node not
the defaukt (= barebox internal) one. This means the internal DT is always
fixed up. This leads to booting not fixed up DT when using external DTs.

This patch fixes the problem.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-01 08:40:44 +02:00
Markus Pargmann d098f2cf6f net: fec: Fix RGMII-ID
RGMII-ID just defines transmitter internal delays. Otherwise it is the
same as RGMII. As the differences only influence the behaviour of the
phy, the fec driver should handle it the same way as RGMII.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-01 08:38:42 +02:00
Lucas Stach f6842f2e8b PCI: imx6: simplify config access code
The PCI core fills in the primary bus number, so there is no
need to walk up the PCI hierarchy in the driver manually.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-05-01 08:37:40 +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 377d261708 of: use 'const void *' for struct of_device_id.data
Since 2011 barebox' of_device_id struct uses unsigned long type for data field:

    struct of_device_id {
            char *compatible;
            unsigned long data;
    };

Almost always struct of_device_id.data field are used as pointer
and need 'unsigned long' casting.

E.g. see 'git grep -A 4 of_device_id drivers/' output:

    drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = {
    drivers/ata/sata-imx.c- {
    drivers/ata/sata-imx.c-         .compatible = "fsl,imx6q-ahci",
    drivers/ata/sata-imx.c-         .data = (unsigned long)&data_imx6,
    drivers/ata/sata-imx.c- }, {

Here is of_device_id struct in linux kernel v4.0:

    struct of_device_id {
            char name[32];
            char type[32];
            char compatible[128];
            const void *data;
    };

Changing of_device_id.data type to 'const void *data' will increase
barebox' linux kernel compatibility and decrease number of 'unsigned
long' casts.

Part of the patch was done using the 'coccinelle' tool with the
following semantic patch:

    @rule1@
    identifier dev;
    identifier type;
    identifier func;
    @@
    func(...) {
    <...
    - dev_get_drvdata(dev, (unsigned long *)&type)
    + dev_get_drvdata(dev, (const void **)&type)
    ...>
    }
    @rule2@
    identifier dev;
    identifier type;
    identifier func;
    identifier data;
    @@
    func(...) {
    <...
    - dev_get_drvdata(dev, (unsigned long *)&type->data)
    + dev_get_drvdata(dev, (const void **)&type->data)
    ...>
    }

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-30 08:12:57 +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 0706fd366f net: cpsw: unregister device on remove callback
The CPSW uses DMA, so we should quiesce the device before leaving
barebox. This patch unregisters the CPSW properly on the device
remove callback. To do this we have to fix the error path in
cpsw_slave_setup, since this function can fail and we need a
known slave status in the remove function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 12:59:44 +02:00
Sascha Hauer acd1d67ea2 eth: halt active ethernet device on unregister
When an active ethernet device is unregistered it should
be halted to quiesce the device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 12:41:45 +02:00
Sascha Hauer efe0fa9e92 net: phy: Add missing phy_unregister_device
The counterpart of phy_register_device is missing. Add it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 12:40:49 +02:00
Sascha Hauer e8388cbb37 usb: musb: set controller->priv pointer
This is used by the detect callback but never initialized.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 11:46:57 +02:00
Sascha Hauer 15e121ada5 usb: musb: dsps: Do not use priv pointer
Use container_of instead of dev->priv pointer. dev->priv is
used by the musb core layer (which maybe should not be the
case, but using container_of is good anyway).

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 11:43:06 +02:00
Antony Pavlov 9496896fbf checkpatch: add DT compatible string documentation checks
This adds a simple check that any compatible strings in DeviceTree dts
files are present in Documentation/devicetree/bindings and
in dts/Bindings/.

Vendor prefixes are also checked for existing in vendor-prefixes.txt.

This code is based on linux v4.0-rc6 checkpatch.pl dt-checking code by
Rob Herring & Florian Vaussard:

    Rob Herring (2):
        checkpatch: add DT compatible string documentation checks
        checkpatch: fix wildcard DT compatible string checking

    Florian Vaussard (3):
        checkpatch: fix spurious vendor compatible warnings
        checkpatch: check compatible strings in .c and .h too
        checkpatch: improve the compatible vendor match

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Florian Vaussard <florian.vaussard@epfl.ch>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 10:33:17 +02:00
Sascha Hauer 6345d37ae5 dts: update to v4.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 10:30:42 +02:00
Sascha Hauer 13ca5ced11 dts: update to v4.0-rc7
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 10:30:32 +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
Antony Pavlov 36c8344e0d linux/amba/bus.h: drop unusable amba_{g,s}et_drvdata macros
amba_{g,s}et_drvdata macros from linux kernel use
dev_{g,s}et_drvdata functions.

But in linux dev_get_drvdata() takes only one argument
while in barebox dev_get_drvdata() takes two arguments.
There is no dev_set_drvdata() in barebox at all.

So amba_{g,s}et_drvdata macros from linux are
unusable for barebox.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 08:55:19 +02:00
Mayur Nande f25c987459 net: usb: asix: Add D-link DUB-E100 H/W Ver C1 support
Hello!

This patch adds support for USB ethernet adapter D-Link DUB-E100 H/W Rev C1. I tested this on
Beagleboneblack Rev A6A and our custom h/w based on i.mx6 Phytec phycore module. More
information about the adapter is here:
http://us.dlink.com/products/connect/high-speed-usb-2-0-fast-ethernet-adapter/

Signed-off-by: Mayur Nande <mayur.nande@medel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-28 08:54:34 +02:00
Sebastian Hesselbarth 094d25ea9d ARM: Add Lenovo ix4 and related drivers to mvebu_defconfig
Update mvebu_defconfig to cover recently introduced Lenovo ix4 and
its related drivers.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:35 +02:00
Sebastian Hesselbarth ee2668a8b0 ARM: mvebu: armada-xp: Add Lenovo Iomega ix4-300d
This adds support for Marvell Armada XP based 4-bay NAS Lenovo
Iomega ix4-300d.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:35 +02:00
Sebastian Hesselbarth 63da1d3bea ARM: mvebu: armada-xp: Sort boards and images alphabetically
Before adding new Armada XP based boards becomes messier than necessary,
sort Armada XP based board Kconfig and image Makefile alphabetically.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:35 +02:00
Sebastian Hesselbarth 70aa026c8b ARM: mvebu: armada-xp: Use MBUS_ERR_PROP_EN define
With proper defines for ARMADA_370_XP_FABRIC_CTRL and MBUS_ERR_PROP_EN
make use of it.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-04-27 08:09:35 +02:00