summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | net: emaclite: Let core to handle received packetMichal Simek2016-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Pass pointer to core to handle packet. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | | net: emaclite: Rename start and stop functionsMichal Simek2016-01-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Rename start and stop functions to align with DM functions names. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | | net: emaclite: Move driver to DMMichal Simek2016-01-271-68/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move driver to DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: emaclite: Use indirect access in emaclite_recvMichal Simek2016-01-271-52/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When IP is configured with pong buffers, IP is receiving packets to ping and then to pong buffer and than ping again. The original logic in the driver remains there that when ping buffer is free, pong buffer is checked too and return if both are free. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | | net: emaclite: Use indirect reg access in sendMichal Simek2016-01-271-30/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original logic in the driver was exchanging buffers which are used for sending packet and tx_ping and tx_pong buffers were exchanged all the time to ensure that IP has enough time to send the packet out. Based on this "feature" send function was using nextbuffertouse variable to save which buffer should be used. Before this algorithm was called driver checked that there is free buffer available. This checking remains in the driver but driver tries to use tx_ping first if available. If not, tx_pong buffer is used instead. To reach this code the original condition is met that at least one of the buffer should be available. Testing doesn't show any performance drop when this patch is applied. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: emaclite: Remove XEL_TSR_XMIT_ACTIVE_MASK flagMichal Simek2016-01-271-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag is not documented anywhere in the latest documentation that's why this patch removes it. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: emaclite: Fix logic around available TX buffersMichal Simek2016-01-271-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify logic how to find out if there is free TX buffer. Both buffers are checked all the time that's why logic around order can be removed. Also add check when only one buffer is available. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: emaclite: Use indirect register access for TX resetMichal Simek2016-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move to use indirect register access when timeout expires for resetting TX buffers. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: emaclite: Use indirect register access for rx_ping/pongMichal Simek2016-01-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Do initialization via indirect register access. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | | net: emaclite: Use indirect register access for tx_ping/pongMichal Simek2016-01-271-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do initialization via indirect register access. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: emaclite: Convert MDIO to use register offsetMichal Simek2016-01-271-36/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use u-boot coding style how to setup and access MDIO bus. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: emaclite: Add MDIO support to driverMichal Simek2016-01-271-0/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add MDIO support before move to DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: emaclite: Remove ancient OF probe functionMichal Simek2016-01-271-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare for DM move. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: Add axi emac to KconfigMichal Simek2016-01-272-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add dependency on PHYLIB and MII which is required. Clean PHYLIB dependency from the driver too. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: axi_emac: Rename start, stop, write_hwaddr functionsMichal Simek2016-01-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename few functions to fit to the new name convention used by DM. Suggested-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | | net: axi_emac: Split recv from free_pktMichal Simek2016-01-271-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Call net_process_received_packet() by core. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: axi_emac: Enable access to MDIO in probeMichal Simek2016-01-271-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Detect phy when driver probes. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: axi_emac: Move driver to DMMichal Simek2016-01-271-68/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move driver to DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: axi_emac: Pass private structure where possibleMichal Simek2016-01-271-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | Use axidma_priv instead of ethdevice in preparation of the DM move. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | | net: axi_emac: Pass private structure to phyread/phywriteMichal Simek2016-01-271-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare for move to DM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: axi_emac: Put iobase to private structureMichal Simek2016-01-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Saving iobase directly to private structure helps with moving to DM. There is an option to load iobase from pdata but it is additional load. Pointer to private structure is available all the time. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: axi_emac: Pass directly pointer to register spaceMichal Simek2016-01-271-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify mdio_wait function by passing regs directly. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: axi_emac: Show phy address instead of register contentMichal Simek2016-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix debug message. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | net: axi_emac: Fix parentheses around operand !Michal Simek2016-01-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix these compilation warning by proper grouping: In function 'axi_dma_init': drivers/net/xilinx_axi_emac.c:391:7: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] if (!(in_be32(&priv->dmatx->control) | ^ In function 'axiemac_send': drivers/net/xilinx_axi_emac.c:501:21: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses] while (timeout && (!in_be32(&priv->dmatx->status) & Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | | | serial: uartlite: Add uartlite to KconfigMichal Simek2016-01-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move config option out of board file. - Remove uartlite address from config file Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* | | | serial: uartlite: Add support for debug consoleMichal Simek2016-01-272-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for debug console. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* | | | serial: uartlite: Move driver to DMMichal Simek2016-01-271-111/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable SPL DM too. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
* | | | mailaddr: Update mail addressRicardo Ribalda Delgado2016-01-271-1/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old mail address will stop working soon. Update it all the files Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
* | | Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2016-01-266-79/+158
|\ \ \
| * | | mvtwsi: Fix breakage introduced by "Fix mvtwsi not working on sun6i and ↵Hans de Goede2016-01-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | newer sunxi SoCs" "Fix mvtwsi not working on sun6i and newer sunxi SoCs" includes the following: @@ -189,7 +200,8 @@ static int twsi_start(struct i2c_adapter *adap, int expected_status) /* globally set TWSIEN in case it was not */ twsi_control_flags |= MVTWSI_CONTROL_TWSIEN; /* assert START */ - writel(twsi_control_flags | MVTWSI_CONTROL_START, &twsi->control); + twsi_control_flags |= MVTWSI_CONTROL_START | MVTWSI_CONTROL_CLEAR_IFLG; + writel(twsi_control_flags, &twsi->control); /* wait for controller to process START */ return twsi_wait(adap, expected_status); } The modification of twsi_control_flags done here was introduced while merging to fix a line > 80 chars, but twsi_control_flags is a global variable and should not be modified like this here, this commit fixes this, restoring mvtwsi functionality. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | | sunxi: power: axp818: Enable support for ALDOsChen-Yu Tsai2016-01-262-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, AXP818 ALDO support was partially added to Kconfig, but never enabled in the board file, nor properly set or configured in Kconfig. The boards continue to work because the AXP818 is designed to pair with the A83T/H8, and the default voltages match the reference design's requirements. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | | power: axp818: Add support for DLDO and ELDO regulatorsChen-Yu Tsai2016-01-262-6/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AXP818 provides an array of LDOs to provide power to various peripherals. None of these regulators are critical. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | | power: axp: merge separate DLDO functions into 1Chen-Yu Tsai2016-01-261-68/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of one function for each DLDO regulator, make 1 function that takes an extra "index". Since the control bits for the DLDO regulators are contiguous, this makes the function very simple. This removes a lot of duplicate code. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
| * | | sunxi: Implement poweroff support for axp221 pmicHans de Goede2016-01-262-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds poweroff support for axp221 pmic. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
| * | | sunxi: Implement poweroff support for axp209 pmicMichael van Slingerland2016-01-262-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds poweroff support for axp209 pmic. Signed-off-by: Michael van Slingerland <michael@deviousops.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
| * | | sunxi: Implement poweroff support for axp152 pmicHans de Goede2016-01-262-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds poweroff support for axp152 pmic. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2016-01-263-1/+549
|\ \ \ \
| * | | | video: add CONFIG_I2C_EDID and disable CONFIG_DISPLAY by defaultAnatolij Gustschin2016-01-261-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enabling CONFIG_DISPLAY breaks building for some architectures (microblaze-generic), so we disable CONFIG_DISPLAY in Kconfig by default and enable this option in defconfigs. CONFIG_DISPLAY depends on CONFIG_I2C_EDID, so add and enable it in defconfigs, too. Signed-off-by: Anatolij Gustschin <agust@denx.de> Reported-by: Bin Meng <bmeng.cn@gmail.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Anatolij Gustschin <agust@denx.de>
| * | | | video: Add support for Armada XP LCD controllerStefan Roese2016-01-233-0/+540
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds basic support for the LCD controller of the Marvell Armada XP SoC. An AXP based custom board port will be added later, to use this driver to display a splash screen via the bmp command later. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> [agust: rebased] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2016-01-258-100/+3291
|\ \ \ \ | |_|/ / |/| | |
| * | | usb: add clock support for generic EHCIMasahiro Yamada2016-01-251-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver is designed in a generic manner, so clocks should be handled genericly as well. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * | | usb: eth: add Realtek RTL8152B/RTL8153 DRIVERTed Chen2016-01-235-0/+3075
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds driver support for the Realtek RTL8152B/RTL8153 USB network adapters. Signed-off-by: Ted Chen <tedchen at realtek.com> [swarren, fixed a few compiler warnings] [swarren, with permission, converted license header to SPDX] [swarren, removed printf() spew during probe()] Signed-off-by: Stephen Warren <swarren at nvidia.com>
| * | | usb: dwc2: Do not mix data toggle for IN and OUT endpoints, check boundsStefan Brüns2016-01-231-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB protocol allows for 16 IN and 16 OUT endpoints (USB 2.0 Spec, 8.3.2.2 Endpoint Field). A function may have an EP 1 for both IN and OUT, so these two should be kept separate. As EPs are either BULK or INTERRUPT (or ISO), it is fine to have one array per direction for all transfer types (also see e236519b7365ef75c5da6a5623f0b03d9c00cfae). USB device address is 7 bits, so a bus may have more than 16 devices. Check the device number, as the DWC2 driver only supports BULK/ISO for the first 16 devices. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
| * | | usb: dwc2: Add SPLIT INTERRUPT transaction supportStefan Brüns2016-01-232-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CSPLITs for INTERRUPT transactions have to be scheduled in each microframe following the SSPLIT. INTERRUPT transfers are executed in the next even/ odd microframe depending on the HCCHAR_ODDFRM flag. As there are no handshakes for INTERRUPT SSPLITs the SSPLIT may have failed (transport error) without the error being detected by the host driver. If the last CSPLIT is not received within 4 microframes after the SSPLIT there was a transaction error and the complete transaction has to be restarted. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
| * | | usb: dwc2: Implement SPLIT transaction supportStefan Brüns2016-01-231-15/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In contrast to non-SPLIT transfers each transaction has to be submitted as an individual chunk. The transaction state machine proceeds from SSPLIT to CSPLIT if the ACK flag is set. CSPLIT has to be repeated while NYET is set. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
| * | | usb: dwc2: add helper function for setting SPLIT HC registersStefan Brüns2016-01-231-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The split register setting is used for both SSPLIT and CSPLIT transactions, the bit for CSPLIT has to be set seperately. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
| * | | usb: dwc2: split transfer core from outer loopStefan Brüns2016-01-231-48/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the movement of data between CPU and Host Controller from the status handling and tracking of transfer progress. This will also simplify adding of SPLIT transaction support. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
| * | | usb: dwc2: Simplify wait_for_chhltd(), remove ignore_ackStefan Brüns2016-01-231-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A transfer is completed if the XFERCOMP flag is set, irrespective of the ACK flag. BULK OUT transfers to some HS devices complete without having the ACK flag set, which signal the devices has responded with an NYET to the transfer (PING protocol). The new behaviour matches the Linux kernel minus any PING protocol. Also see 5966defabdcc (usb: dwc2: fix bulk transfers) Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
| * | | usb: dwc2: Fix out-of-bounds access, fix chunk sizeStefan Brüns2016-01-231-15/+15
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two errors in transfer len calculation, move loop invariant code out of loop. If xfer_len is equal to CONFIG_DWC2_MAX_TRANSFER_SIZE (or slightly smaller), the xfer_len will be to large, e.g.: xfer_len = MAX_TRANSFER_SIZE = 65535 max packet size = 512 => num_packets = 128 => IN xfer_len = 65536 For OUT transactions larger than (65536 - mps) bytes, the xfer_len determination is quite awkward, it is only correct due to: - max_packet_size for control/bulk/interrupt is required to be power-of-two. - (CONFIG_DWC2_MAX_TRANSFER_SIZE + 1) % max-packet-size is zero for all allowed (2^3 ... 2^9) packet sizes As the max xfer len is loop invariant, it can be moved out of the loop. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
* | | Merge branch 'master' of git://git.denx.de/u-boot-imxTom Rini2016-01-252-3/+3
|\ \ \
OpenPOWER on IntegriCloud