9
0
Fork 0
Commit Graph

12863 Commits

Author SHA1 Message Date
Sascha Hauer e8b94fdfb6 loadb: Use console_set_baudrate
No Need to do this manually

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:14 +02:00
Sascha Hauer 7cf221db7c loadb: use console_get_baudrate
No need to fiddle with device parameters anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:14 +02:00
Sascha Hauer 230c22252a loadxy: use console_set_baudrate
No need to do this manually

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:14 +02:00
Sascha Hauer 3894344053 loadx: ignore -c option
And always create the file if necessary. No need to have an extra flag for
this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:14 +02:00
Sascha Hauer d2a53a56b9 loadxy: use console_get_baudrate
No need to fiddle with device parameters anymore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:14 +02:00
Sascha Hauer c6fe3cd6be loadxy: Use console_get_by_name
Use console_get_by_name rather than iterating over the console list in the
loadxy code. The code in loadxy.c used to test whether a console is active
before using it. This check is dropped along the way since there's no reason
to not being able to use a disabled console for loadxy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:14 +02:00
Sascha Hauer d9fbe905a6 usb: gadget: serial: Use console_set_active to activate console
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:13 +02:00
Sascha Hauer 3310d58a60 console: When switching baudrate print console name
Since there may be multiple consoles print the name of the console
whose baudrate shall be switched.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:13 +02:00
Sascha Hauer e53e7218ad console: Add console_get_by_name
Commands like loadx/loady wish to find a console device by its name. Add
a function for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:13 +02:00
Sascha Hauer 56b2fe72e8 console: Add functions to get/set baudrate
So C code can call a function rather than fiddling with device parameters.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 09:22:13 +02:00
Sascha Hauer 4cfc09da38 console: Add functions to get/set active state of console
Currently code needs to fiddle with the active parameter of a console
device directly to enable/disable consoles. Add console_set_active()
to set the status and console_get_active() to get the current status.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-09 08:12:33 +02:00
Sascha Hauer d47e89a45d Release v2015.06.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-08 20:23:02 +02:00
Lucas Stach 291c7e9676 ARM: imx6: hipercam: set default hostname in boardfile
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-03 10:06:28 +02:00
Lucas Stach 47f46a00ef ARM: imx6: correct Hipercam ECSPI1 pinmux
Correct the pinmux configuration for the chip-select GPIOs. This fixes
detection of the first SPI NOR-flash after barebox itself got loaded from
there.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-06-03 10:05:52 +02:00
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