9
0
Fork 0
Commit Graph

11717 Commits

Author SHA1 Message Date
Antony Pavlov b549a26fc3 watchdog: add minimal jz4740 driver
Also move reset_cpu() for jz4755 SoC from platform code
into the new driver code.

At the moment mach-xburst lacks clk support so jz4740 watchdog
driver looks like a template. We can improve jz4740 watchdog
driver later after adding clk support.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 07:35:51 +02:00
Renaud Barbier 70e769a685 ppc: DA923RC: 16-bit Product Data EEPROM read access
Change Product Data validity checking to ensure that support can
be provided for 8-bit and 16-bit EEPROM devices.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 07:34:46 +02:00
Teresa Gámez db32b112ba ARM: am335x Phytec phyCORE: Enable ethernet
With an update of the am33xx.dtsi (commit 9313920df6) the mdio and mac
nodes are not enabled on default any more. Enable them explicit
in the board dts now.

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 14:40:11 +02:00
Matteo Fortini 4ab73e20e6 sama5d3x: HSMC NAND initialize TIMINGS and import values from U-Boot
The configuration for NAND has been aligned with values
from U-Boot and completed with TIMINGS initialization

Signed-off-by: Matteo Fortini <matteo.fortini@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 14:40:11 +02:00
Matteo Fortini 322f0ef9ef sama5d3x: fix HSMC MODE register offset and add TIMINGS register
As stated in section 29.19.35 of SAMA5D3 Series Datasheet,
MODE register has offset 0x10 and at offset 0x0C there is
a TIMINGS register.

Signed-off-by: Matteo Fortini <matteo.fortini@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 14:40:11 +02:00
Antony Pavlov c36d1431b2 led: triggers: fix "no previous prototype for 'trigger_init'" warning
Here is compiler's message:

    drivers/led/led-triggers.c:148:5: warning: no previous prototype for 'trigger_init' [-Wmissing-prototypes]
    int trigger_init(void)
        ^

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 08:03:01 +02:00
Antony Pavlov 2c16fa4080 commands: trigger: check trigger disable return code too
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 08:03:01 +02:00
Antony Pavlov e66190f4f7 led: triggers: fix crash on disabling "default-on" trigger
Here is a sample crash log on Ritmix RZX-50:

    barebox:/ trigger
    0: panic
    1: heartbeat
    2: net rx
    3: net tx
    4: net
    5: default on (led 0)
    barebox:/ trigger -d 5
    ...
    Ooops, TLB miss on store!

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 08:03:01 +02:00
Antony Pavlov 45efb46dbb MIPS: ritmix-rzx50_defconfig: enable LED-related stuff
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 08:03:01 +02:00
Antony Pavlov e928554412 MIPS: dts: rzx50.dts: add LCD backlight
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 08:03:01 +02:00
Antony Pavlov f66e9dd041 i2c: busses/Makefile: fix indentation
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:54:03 +02:00
Antony Pavlov 8e6468e4b2 i2c: add Marvell 64xxx driver
This driver is also used for Allwinner SoCs I2C controllers.

Ported from linux-3.15.

The most notable barebox driver version changes:

  * drop platform device stuff;
  * drop "allwinner,sun*" stuff;
  * drop message offloading support;
  * add reg-io-width devicetree parameter to use driver
    with byte-oriented controller versions.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
On Armada XP:
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:53:20 +02:00
Ezequiel Garcia 6e71e070da net: phy: Add minimal support for QSGMII PHY
Based on Linux's support by Thomas Petazzoni:

    commit b9d12085f2f531fdea67f0361564e0812696227c
    Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Date:   Tue Apr 15 15:50:19 2014 +0200
    net: phy: add minimal support for QSGMII PHY

    This commit adds the necessary definitions for the PHY layer to
    recognize "qsgmii" as a valid PHY interface. A QSMII interface, as
    defined at
    http://en.wikipedia.org/wiki/Media_Independent_Interface#Quad_Serial_Gigabit_Media_Independent_Interface,
    is "is a method of combining four SGMII lines into a 5Gbit/s
    interface. QSGMII, like SGMII, uses LVDS signalling for the TX and RX
    data and a single LVDS clock signal. QSGMII uses significantly fewer
    signal lines than four SGMII busses."

    This type of MAC <-> PHY connection might require special handling on
    the MAC driver side, so it should be possible to express this type of
    MAC <-> PHY connection, for example in the Device Tree.

    Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Cc: devicetree@vger.kernel.org
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:37:12 +02:00
Ezequiel Garcia f81c936cc8 net: phy: mdio-mvebu: Make the clock property required
This property is wrongly documented as 'optional', although all the
ethernet units need a clock to be enabled in order to access the MDIO
interface. For that reason, this commit makes the property a required
one and fails to probe the device, when a clock is not properly provided.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:37:12 +02:00
Ezequiel Garcia 889105eee0 net: phy: Add fallbacks for the obsoletes phy DT properties
In addition to the standard 'phy-handle' devicetree property, the binding
specifies two properties, which are considered obsolete: 'phy' and 'phy-device'.
This commit adds support for them in of_mdio_find_phy().

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:37:12 +02:00
Antony Pavlov ed98f1522d Add a simple rtc framework
This patch adds a simple rtc framework
for reading and setting board's RTC time.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:30:51 +02:00
Antony Pavlov 6d3fc76b77 lib: import 'bcd' from linux-3.15
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:30:51 +02:00
Sebastian Hesselbarth 5a9ba98f21 pci: mvebu: Add PCIe driver
This adds a PCI driver for the controllers found on Marvell MVEBU SoCs.
Besides the functional driver itself, it also adds SoC specific PHY
setup required for PCIe. Currently, only Armada 370 is fully supported.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:29:24 +02:00
Sebastian Hesselbarth 846da3d7df of: pci: import of_pci_get_devfn()
Marvell MVEBU PCIe driver requires of_pcie_get_devfn(), import it from
Linux.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:29:22 +02:00
Sebastian Hesselbarth 916ca9472f pci: set auto-incremented bus number
When using more than one PCI bus, we have to assign unique numbers
to each bus. Use an auto-incremented bus index and assign it to
each registered bus. Also, allow the PCI host controller to update
internal registers by calling set_busno with assigned bus number.

While at it, add pci_controller struct to set_busno callback,
add a back reference to pci_controller to pci_bus, and clean up
unused left-overs from Linux import.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:29:17 +02:00
Sebastian Hesselbarth e5a91ee544 pci: ensure device does ignore BAR mangling
Disable access to PCI devices I/O and memory regions while
mangling BAR registers.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:29:12 +02:00
Sebastian Hesselbarth 166a6ba955 pci: register device after BAR setup
As soon as pci_register_device is called, a potential driver
will access its registers. This requires BARs to be set up
properly, so move pci_register_device after BAR setup.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:28:55 +02:00
Sebastian Hesselbarth b7ffe9ad0e pci: pci_scan_bus: respect 64b BARs
In PCI 64-bit BARs span two 32-bit BARs, therefore if BAR type
indicates a 64-bit BAR we have to skip the next BAR register.
While at it, also set proper IORESOURCE flags for I/O and
32b MEM.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:27:16 +02:00
Sebastian Hesselbarth 7587a04434 ARM: mvebu: armada-370-xp: disable MBUS error propagation
Accessing MBUS windows not backed-up by e.g. PCIe devices will
hang the SoC. Disable MBUS error propagation back to CPU allows
to read 0xffffffff instead of hanging the SoC.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:27:16 +02:00
Sebastian Hesselbarth 722e90e32a bus: mvebu: fix resource size handling
A resource_size is defined as res->end - res->start + 1. Marvell
MBUS driver gets some ranges from DT as start and size but mis-calculates
end of range. This fixes 4 occurences of those mistakes.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-31 07:26:34 +02:00
Sascha Hauer 2fd4f0fbe9 images: get rid of remaining imximage-y
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-30 16:58:12 +02:00
Antony Pavlov 0e2111deb3 ARM: DIGIC: add Canon PowerShot A1100 IS support
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 15:08:29 +02:00
Antony Pavlov 1f789df993 gpio: add driver for Canon DIGIC
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 15:08:29 +02:00
Antony Pavlov fd00d693cc serial: add driver for Canon DIGIC UART
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 15:08:29 +02:00
Antony Pavlov bbd477644d clocksource: add driver for Canon DIGIC timer
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 15:07:35 +02:00
Antony Pavlov f1fb740ed6 ARM: add very initial support for Canon DIGIC chips
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 15:07:35 +02:00
Antony Pavlov 420ca0be02 ARM: add ARM946E-S CPU type
ARM946E-S is used in the DIGIC family SoCs.

ARM946E-S core supports ARMv5TE and has Cache & MPU.
Linux kernel uses ARMv4 MPU cache routines for ARM946E-S core.
E.g. see linux.git/boot/compressed/head.S:

    .word   0x41009400              @ ARM94x
    .word   0xff00ff00
    W(b)    __armv4_mpu_cache_on
    W(b)    __armv4_mpu_cache_off
    W(b)    __armv4_mpu_cache_flush

So select CPU_32v4T for ARM946E-S despite of ARMv5TE support.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 15:07:34 +02:00
Sascha Hauer 9f0942c873 dts: update to v3.16-rc6
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 14:37:06 +02:00
Bo Shen 8a0fe27d4f ARM: at91: clock: fix the pllb checking
On at91sam9n12 soc, it has pllb, while on sama5d3 soc,
it doesn't has pllb.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 14:36:10 +02:00
Antony Pavlov 03a2269509 led: try to get LED's label from the 'label' property
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 14:31:30 +02:00
Bo Shen 366f64ff1b mci: core: the sd1.0 card can work in 4 bits mode
The sd 1.0 card can work in 4 bits mode also.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 14:30:59 +02:00
Sascha Hauer ada160a34a readline: reimplement history functions
This reimplements the history functions in readline.

- Use regular lists instead of homegrown list implementation
- Allocate history strings dynamically instead of copying strings
  to fixed buffers without checking the size
- saves us an initcall
- slightly smaller
- no longer add duplicates to the history
- when moving past the last history entry print an empty line

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 13:51:00 +02:00
Markus Pargmann ccdf13af24 include/bbu: Add missing include errno.h
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 08:22:31 +02:00
Markus Pargmann e69dca92f8 mfd: mc34704: Add DT support
Add a compatible to this driver so it can be added through devicetree.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-29 08:22:05 +02:00
Antony Pavlov d7aebd9ce6 Makefile: clean barebox.zynq
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:58:51 +02:00
Antony Pavlov 0acd345c02 treewide: drop Doxygen stuff
Doxygen documentation is removed in the commit

  commit 98360be0fe
  Author: Sascha Hauer <s.hauer@pengutronix.de>
  Date:   Tue Jun 17 10:27:03 2014 +0200

      Documentation: remove doxygen documentation

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:56:15 +02:00
Antony Pavlov 92466472c2 usb: ehci: use linux-way ehci_readl and ehci_writel
Also drop nowhere defined CONFIG_EHCI_DESC_BIG_ENDIAN.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:35:01 +02:00
Sebastian Hesselbarth b8d2d4923f USB: host: add xHCI PCI driver
This adds a driver for PCI-attached xHCI controllers.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:31:18 +02:00
Sebastian Hesselbarth 237bad9cc7 USB: host: add xHCI HCD, Hub, and platform driver
This adds support for xHCI USB 3.0 host controllers found on various
SoCs and PCI devices. Currently, the driver only supports the virtual
USB 2.0 ports of the host controller, so if you plan to use USB 3.0
devices, put a USB 2.0 cable in between.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:31:18 +02:00
Sebastian Hesselbarth 7df5350362 include: import {lower,upper}_32_bits helpers
This imports {lower,upper}_32_bits defines to allow to get upper
and lower 32b part of a 64b number.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:31:18 +02:00
Sebastian Hesselbarth 343ccff163 USB: EHCI: use min3 from Linux
EHCI HCD has a private version of min3() determining the smallest
number out of 3. We already have min()/max() imported from Linux,
also get min3()/max3() and use it instead of EHCI's private one.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:31:18 +02:00
Sebastian Hesselbarth 418add62c1 USB: improve error paths and tear-down
USB core isn't too strict about allocation/deallocation and
add/remove sequences of usb devices. Especially, error paths
and device tear-down are kind of broken and cause hangs on
failing usb device detect.

This patch improves the situation by introducing a
usb_free_device() that tears down allocated resources by
usb_alloc_new_device(). usb_remove_device() now only deals
with resources that have been added by usb_new_device().
Also, error handling is fixed or improved to ensure that no
devices are unregistered that have not been previously
registered.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:31:18 +02:00
Sebastian Hesselbarth 8938752dd8 USB: Count detected USB devices independent of dev_index
Adding a usb device increases dev_index every time a new device is
allocated. Removing a usb device does not decrease again, of course.
As we print the number of detected usb devices after each usb bus
scan based on dev_index, we cannot trust dev_index here. Keep track
of the correct number of (currently) detected usb devices by
introducing an independent dev_count that gets increased on detect
and decreased on remove.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:31:18 +02:00
Sebastian Hesselbarth 422cd55ca8 USB: Fix stale usb devices in usb_device_list
New usb devices are added to a list of usb devices, but when removing
the corresponding usb_device it was not removed from that list. Fix it
by deleting it properly from the usb_device_list.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:31:17 +02:00
Renaud Barbier d840f17ec6 ppc: minimal Freescale P1010RDB board support
This is a limited board support for the Freescale P1010RDB.
The board boots from NOR and output the prompt to the serial port
at 115200 bauds. All 3 Ethernet ports are supported by the gianfar
driver. I2C devices are accessible on both bus and the memory is
initialised by the 85xx DDR driver.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-28 07:26:27 +02:00