]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
9 years agoMLK-9644 imx6:dtb: reserve 16KB for IRAM TLB
Peng Fan [Fri, 26 Sep 2014 09:15:14 +0000 (17:15 +0800)]
MLK-9644 imx6:dtb: reserve 16KB for IRAM TLB

Reserve 16KB for IRAM TLB. Except mx6sx, all others use 0x900000 as
the IRAM TLB base addr. To mx6sx, 0x8f8000 is used for IRAM TLB base
addr. Actually, 16KB is reserved for IRAM TLB, but only upper 8KB
is used for kernel TLB, the lower 8KB is used for pm_info and OCRAM
code.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ping Bai <Ping.Bai@freescale.com>
9 years agousb: chipidea: Fix oops when removing the ci_hdrc module
Torsten Fleischer [Fri, 3 Oct 2014 09:01:20 +0000 (11:01 +0200)]
usb: chipidea: Fix oops when removing the ci_hdrc module

The call of 'kfree(ci->hw_bank.regmap)' in ci_hdrc_remove() sometimes causes
a kernel oops when removing the ci_hdrc module.

Since there is no separate memory allocated for the ci->hw_bank.regmap array,
there is no need to free it.

Signed-off-by: Torsten Fleischer <to-fleischer@t-online.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
9 years agoMLK-9662 [V4L2 Capture] Revert patch to re-add support for _G_CHIP_IDENT
Oliver Brown [Tue, 30 Sep 2014 14:12:46 +0000 (09:12 -0500)]
MLK-9662 [V4L2 Capture] Revert patch to re-add support for _G_CHIP_IDENT

This reverts commit b71c99801e18eb172ae34851daf25044a3bf644a.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoMLK-9661-3 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y
Oliver Brown [Mon, 6 Oct 2014 17:30:17 +0000 (12:30 -0500)]
MLK-9661-3 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y

Adding MXC V4L2 capture to kernel confguraiton.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoMLK-9661-2 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y
Oliver Brown [Tue, 7 Oct 2014 04:33:47 +0000 (23:33 -0500)]
MLK-9661-2 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y

Adding local version of V4L2 internal device to MXC V4L capture.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoMLK-9661-1 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y
Oliver Brown [Tue, 30 Sep 2014 13:44:34 +0000 (08:44 -0500)]
MLK-9661-1 [V4L2 Capture] Porting MXC V4L2 Capture from 3.10.y

Initial port of the mxc V4L2 capture driver. Baseline copied from
imx_3.10.y branch:

commit ffd138854ba04970457ddfbb03c3945df94112ac
Author: Sandor Yu <R01008@freescale.com>
Date:   Mon Aug 11 19:05:11 2014 +0800
e-n-g-r 00322859 CSI: some frames crrouption issue

Removed whitespace and line length warnings from review-commits.

Signed-off-by: Oliver Brown <oliver.brown@freescale.com>
9 years agoENGR00288196 ARM: dts: fix epdc and csi conflict on imx6sl evk
Robby Cai [Fri, 15 Nov 2013 09:21:16 +0000 (17:21 +0800)]
ENGR00288196 ARM: dts: fix epdc and csi conflict on imx6sl evk

There is pinmux conflict for EPDC and I2C3 on imx6sl soc.
While on imx6sl evk board, the camera is attached on I2C3 bus, so the
EPDC function and CSI function can not be used at same time.
This patch removes the conflict in imx6sl-evk.dts file for EPDC function
and adds a new dts file for CSI function.

Signed-off-by: Robby Cai <R63905@freescale.com>
(cherry picked from commit eb6ffc9b8104c84a7a26295e9be89b8cce82a6a1)

9 years agoENGR00275034-2 ARM: dts: add csi and v4l2 capture support on imx6sl-evk
Robby Cai [Thu, 5 Sep 2013 14:50:39 +0000 (22:50 +0800)]
ENGR00275034-2 ARM: dts: add csi and v4l2 capture support on imx6sl-evk

Add CSI module and v4l2 capture support on imx6sl-evk board

Note: CSI has pin conflict with EPDC on imx6sl-evk board.
To use CSI, we can use 'fdt' command in U-Boot to disable EPDC:

fdt addr ${fdt_addr}
fdt set /soc/aips-bus@02000000/epdc@020f4000 status disable

Signed-off-by: Robby Cai <R63905@freescale.com>
9 years agofec: Fix fec_enet_alloc_buffers() error path
Fabio Estevam [Sat, 4 Oct 2014 16:40:01 +0000 (13:40 -0300)]
fec: Fix fec_enet_alloc_buffers() error path

When fec_enet_alloc_buffers() fails we should better undo the previous actions,
which consists of: disabling the FEC clocks and putting the FEC pins into
inactive state.

The error path for fec_enet_mii_probe() is kept unchanged.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: fix build error at m68k platform
Frank Li [Fri, 3 Oct 2014 21:29:14 +0000 (14:29 -0700)]
net: fec: fix build error at m68k platform

reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout 1b7bde6d659d30f171259cc2dfba8e5dab34e735

  make.cross ARCH=m68k m5275evb_defconfig
  make.cross ARCH=m68k

All error/warnings:

   drivers/net/ethernet/freescale/fec_main.c: In function 'fec_enet_rx_queue':
>> drivers/net/ethernet/freescale/fec_main.c:1470:3: error: implicit declaration of function 'prefetch' [-Werror=implicit-function-declaration]
      prefetch(skb->data - NET_IP_ALIGN);
      ^
   cc1: some warnings being treated as errors

missed included prefetch.h

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Add generic options for tunables
Govindarajulu Varadarajan [Tue, 2 Sep 2014 21:47:20 +0000 (03:17 +0530)]
ethtool: Add generic options for tunables

This patch adds new ethtool cmd, ETHTOOL_GTUNABLE & ETHTOOL_STUNABLE for getting
tunable values from driver.

Add get_tunable and set_tunable to ethtool_ops. Driver implements these
functions for getting/setting tunable value.

Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Improve explanation of the two arrays following struct ethtool_rxfh
Ben Hutchings [Thu, 15 May 2014 00:07:16 +0000 (01:07 +0100)]
ethtool: Improve explanation of the two arrays following struct ethtool_rxfh

The use of two variable-length arrays is unusual so deserves a bit
more explanation.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
9 years agoethtool: Name the 'no change' value for setting RSS hash key but not indir table
Ben Hutchings [Thu, 15 May 2014 00:41:23 +0000 (01:41 +0100)]
ethtool: Name the 'no change' value for setting RSS hash key but not indir table

We usually allocate special values of u32 fields starting from the top
down, so also change the value to 0xffffffff.  As these operations
haven't been included in a stable release yet, it's not too late to
change.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
9 years agoethtool: Support for configurable RSS hash key
Venkata Duvvuru [Mon, 21 Apr 2014 10:07:59 +0000 (15:37 +0530)]
ethtool: Support for configurable RSS hash key

This ethtool patch primarily copies the ioctl command data structures
from/to the User space and invokes the driver hook.

Signed-off-by: Venkat Duvvuru <VenkatKumar.Duvvuru@Emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Fix unwanted section breaks in kernel-doc
Ben Hutchings [Wed, 12 Feb 2014 22:15:09 +0000 (22:15 +0000)]
ethtool: Fix unwanted section breaks in kernel-doc

A colon almost unavoidably starts a new section.  The script should be
changed to provide a way to avoid this, but for now reword the
comments to avoid using colons.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Move kernel-doc comment next to struct ethtool_dump definition
Ben Hutchings [Wed, 12 Feb 2014 22:14:59 +0000 (22:14 +0000)]
ethtool: Move kernel-doc comment next to struct ethtool_dump definition

The kernel-doc script does not tolerate the macro definition in between.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_perm_addr
Ben Hutchings [Wed, 12 Feb 2014 22:14:48 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_perm_addr

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_stats
Ben Hutchings [Wed, 12 Feb 2014 22:14:43 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_stats

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_test
Ben Hutchings [Wed, 12 Feb 2014 22:14:38 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_test

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of string set types
Ben Hutchings [Wed, 12 Feb 2014 22:14:33 +0000 (22:14 +0000)]
ethtool: Expand documentation of string set types

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Update documentation of struct ethtool_pauseparam
Ben Hutchings [Wed, 12 Feb 2014 22:14:28 +0000 (22:14 +0000)]
ethtool: Update documentation of struct ethtool_pauseparam

Convert the inline comments to kernel-doc format.

Explicitly specify that non-zero autoneg is an error if link
autonegotiation is disabled.

Specify that pause capabilities should be advertised dependent on link
autonegotiation, not the autoneg flag here.  There is no way to
opt-out of pause frame autonegotiation, and this improves behaviour
when the link partner is configured to follow pause frame
autonegotiation and our interface is not.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_ringparam
Ben Hutchings [Wed, 12 Feb 2014 22:14:23 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_ringparam

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_eeprom
Ben Hutchings [Wed, 12 Feb 2014 22:14:17 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_eeprom

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_regs
Ben Hutchings [Wed, 12 Feb 2014 22:14:13 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_regs

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_wol
Ben Hutchings [Wed, 12 Feb 2014 22:14:07 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_wol

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_drvinfo
Ben Hutchings [Wed, 12 Feb 2014 22:14:03 +0000 (22:14 +0000)]
ethtool: Expand documentation of struct ethtool_drvinfo

Replace the inline comments (and some others below) with a full
explanation of the semantics, in kernel-doc format.  Specify which
strings may be empty.  Document the relationship with other commands.

Replace the 'deprecation' of some fields with a proper explanation of
the conversion to generalised string sets, as userland programs may
not be able to assume that ETHTOOL_GSSET_INFO is available.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoethtool: Expand documentation of struct ethtool_cmd
Ben Hutchings [Wed, 12 Feb 2014 22:13:57 +0000 (22:13 +0000)]
ethtool: Expand documentation of struct ethtool_cmd

struct ethtool_cmd has very limited documentation; it contains
several obscure or obsolete fields and several with non-obvious
interpretation.

Replace the inline comments (and some others below) with a full
explanation of the semantics as well as I understand them, in
kernel-doc format.  Formally deprecate some fields that seem to be of
historical use only.

Extend the comment about 32/64-bit compatibility to cover all
ethtool structures.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoENGR00323026 iMX6SX:MCC Disable ADC1 and ADC2 in MCC DTS
Ye.Li [Thu, 17 Jul 2014 03:50:30 +0000 (11:50 +0800)]
ENGR00323026 iMX6SX:MCC Disable ADC1 and ADC2 in MCC DTS

M4 has occupied the ADC1 and ADC2 in RDC, must disable them in DTS
to avoid kernel boot panic.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 0588a0133d649ebdab32d7072c64a051845191f7)

9 years agoMLK-9148 arm: create standalone dts for a9 when m4 is running
Richard Zhu [Tue, 22 Apr 2014 06:49:48 +0000 (14:49 +0800)]
MLK-9148 arm: create standalone dts for a9 when m4 is running

Create standalone dts for a9 when m4 is running, since there
are some conflictions in the following modules
* i2c3
* flexcan1&2
* uart2

Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit c156cd72ffa85459b7a0da1912404ec934d87cc1)

9 years agonet: fec: implement rx_copybreak to improve rx performance
Nimrod Andy [Tue, 30 Sep 2014 01:28:05 +0000 (09:28 +0800)]
net: fec: implement rx_copybreak to improve rx performance

- Copy short frames and keep the buffers mapped, re-allocate skb instead of
  memory copy for long frames.
- Add support for setting/getting rx_copybreak using generic ethtool tunable

Changes V3:
* As Eric Dumazet's suggestion that removing the copybreak module parameter
  and only keep the ethtool API support for rx_copybreak.

Changes V2:
* Implements rx_copybreak
* Rx_copybreak provides module parameter to change this value
* Add tunable_ops support for rx_copybreak

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agoMLK-9645: dts: imx6q/dl-sabresd: add MIPI DSI support
Robby Cai [Mon, 29 Sep 2014 06:32:08 +0000 (14:32 +0800)]
MLK-9645: dts: imx6q/dl-sabresd: add MIPI DSI support

Add mipi dsi support on imx6q/dl sabresd board

Signed-off-by: Robby Cai <r63905@freescale.com>
9 years agoMLK-9651 arm: dts: imx6: add i.mx6sx 17x17 and 19x19 arm2 board support
Anson Huang [Tue, 30 Sep 2014 04:21:39 +0000 (12:21 +0800)]
MLK-9651 arm: dts: imx6: add i.mx6sx 17x17 and 19x19 arm2 board support

Add i.MX6SX 17x17 and 19x19 ARM2 board support.

Signed-off-by: Anson Huang <b20788@freescale.com>
9 years agousb: core: return -ENOTSUPP for all targeted hosts
Peter Chen [Mon, 29 Sep 2014 02:09:31 +0000 (10:09 +0800)]
usb: core: return -ENOTSUPP for all targeted hosts

The current code only returns -ENOTSUPP for OTG host, but in fact,
embedded host also needs to returns -ENOTSUPP if the peripheral
is not at TPL.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: using devm_request_irq to instead of request_irq
Peter Chen [Mon, 29 Sep 2014 01:30:10 +0000 (09:30 +0800)]
usb: chipidea: using devm_request_irq to instead of request_irq

Using devm_request_irq to instead of request_irq.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
9 years agoof: add vendor prefix for Chipidea
Peter Chen [Mon, 22 Sep 2014 00:14:18 +0000 (08:14 +0800)]
of: add vendor prefix for Chipidea

Adds chipidea to the list of DT vendor prefixes.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: enhance kernel-doc format
Peter Chen [Mon, 22 Sep 2014 00:14:17 +0000 (08:14 +0800)]
usb: chipidea: enhance kernel-doc format

Some kernel-doc style comment are not satisfied for format, fix them.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: otg initialization is only needed when the gadget is supported
Peter Chen [Mon, 22 Sep 2014 00:14:16 +0000 (08:14 +0800)]
usb: chipidea: otg initialization is only needed when the gadget is supported

We have only needed to enable otg initialization when both of
below conditions are satisfied:

- The controller is otg capable
- The gadget function is enabled

If the controller is otg capable, but is host-only configuration, we do
not need to access register otgsc and do any otg operations (eg, create
otg workqueue).

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add TPL support for targeted hosts
Peter Chen [Tue, 19 Aug 2014 01:51:56 +0000 (09:51 +0800)]
usb: chipidea: add TPL support for targeted hosts

For OTG and Embedded hosts, they may need TPL (Targeted Peripheral List)
for usb certification and other vender specific requirements, the
platform can tell chipidea core driver if it supports tpl through DT
or platform data.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: common: add API to get if the platform supports TPL
Peter Chen [Tue, 19 Aug 2014 01:51:55 +0000 (09:51 +0800)]
usb: common: add API to get if the platform supports TPL

The TPL (Targeted Peripheral List) is used for targeted hosts
(non-PC hosts), and it can be used at USB OTG & EH certification
and some specific products which need white list.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: core: Kconfig: TPL should apply for both OTG and EH
Peter Chen [Tue, 19 Aug 2014 01:51:54 +0000 (09:51 +0800)]
usb: core: Kconfig: TPL should apply for both OTG and EH

Update configuration for USB_OTG_WHITELIST, any targeted hosts
(non PC-hosts) can have TPL (Targered Peripheral List).

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: core: TPL should apply for both OTG and EH
Peter Chen [Tue, 19 Aug 2014 01:51:53 +0000 (09:51 +0800)]
usb: core: TPL should apply for both OTG and EH

According to On-The-Go and Embedded Host Supplement to the USB Revision
2.0 Specification, the targeted hosts (non-PC hosts) include both
embedded hosts and otg, and each targeted host product defines the
set of supported peripherals on a TPL (Targeted Peripheral List). So,
TPL should apply for both OTG and embedded host, and the otg support is
not a must for embedded host.

The TPL support feature will only be effect when CONFIG_USB_OTG_WHITELIST
has been chosen and hcd->tpl_support flag is set, it can avoid the enumeration
fails problem for the user who chooses CONFIG_USB_OTG_WHITELIST wrongly.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: hcd: add TPL support flag
Peter Chen [Tue, 19 Aug 2014 01:51:52 +0000 (09:51 +0800)]
usb: hcd: add TPL support flag

The targeted hosts (non-PC hosts) need to have TPL (Targeted Peripheral List)
for USB OTG & EH certification and other vendor specific requirements.

The platform who needs TPL feature should set this flag at usb host
controller driver.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Conflicts:

include/linux/usb/hcd.h

9 years agodoc: dt-binding: ci-hdrc-imx: add TPL support
Peter Chen [Tue, 19 Aug 2014 01:51:57 +0000 (09:51 +0800)]
doc: dt-binding: ci-hdrc-imx: add TPL support

TPL (Targeted Peripheral List) is needed for targets host
(OTG and Embedded Hosts) for usb certification and other
vendor specific requirements.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: ci_hdrc_imx doc: fsl,usbphy is required
Markus Pargmann [Tue, 22 Jul 2014 02:09:44 +0000 (10:09 +0800)]
usb: ci_hdrc_imx doc: fsl,usbphy is required

fsl,usbphy is no optional property. This patch moves it to the list of
required properties.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agochipidea: usbmisc_imx: Add USB support for VF610 SoCs
Stefan Agner [Mon, 22 Sep 2014 00:14:15 +0000 (08:14 +0800)]
chipidea: usbmisc_imx: Add USB support for VF610 SoCs

This adds Vybrid VF610 SoC support. The IP is very similar to i.MX6,
however, the non-core registers are spread in two different register
areas. Hence we support multiple instances of the USB misc driver
and add the driver instance to the imx_usbmisc_data structure.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: debug: fix sparse non static symbol warnings
Wei Yongjun [Tue, 22 Jul 2014 02:09:45 +0000 (10:09 +0800)]
usb: chipidea: debug: fix sparse non static symbol warnings

Fixes the following sparse warnings:

drivers/usb/chipidea/debug.c:211:5: warning:
 symbol 'ci_otg_show' was not declared. Should it be static?
drivers/usb/chipidea/debug.c:334:5: warning:
 symbol 'ci_registers_show' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: ci_hdrc_imx: Return -EINVAL for missing USB PHY
Markus Pargmann [Tue, 22 Jul 2014 02:09:43 +0000 (10:09 +0800)]
usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY

-ENODEV is interpreted by the generic driver probing function as a
non-matching driver. This leads to a missing probe failure message.

Also a missing USB PHY is more of an invalid configuration of the usb
driver because it is necessary.

This patch returns -EINVAL if devm_usb_get_phy_by_phandle() returned -ENODEV.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: msm: Initialize offset of the capability registers
Ivan T. Ivanov [Sun, 4 May 2014 01:24:42 +0000 (09:24 +0800)]
usb: chipidea: msm: Initialize offset of the capability registers

Since commit 62bb84e (usb: gadget: ci13xxx: convert to platform device)
start address of the capability registers is not passed correctly to
udc_probe(). Fix this.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: msm: Add device tree support
Ivan T. Ivanov [Sun, 4 May 2014 01:24:41 +0000 (09:24 +0800)]
usb: chipidea: msm: Add device tree support

Allows controller to be specified via device tree.
Pass PHY phandle specified in DT to core driver.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agochipidea: usbmisc_imx: Allow USB OTG to work on mx51
Fabio Estevam [Sun, 4 May 2014 01:24:39 +0000 (09:24 +0800)]
chipidea: usbmisc_imx: Allow USB OTG to work on mx51

The field PLLDIVVALUE of register PHY_CTRL_1 selects the reference clock source
for the PHY:
00 = sysclock uses 19.2 MHz
01 = sysclock uses 24 MHz
10 = sysclock uses 26 MHz
11 = sysclock uses 27 MHz

The reset value for this field is 10 according to the reference manual, and
even though this reset value works for mx53, it does not work for mx51.

So instead of relying on the reset value for the PLLDIVVALUE field, explicitly
set it to 01 so that a 24MHz clock can be selected for the PHY and allowing both
mx51 and mx53 to have USB OTG port functional.

Succesfully tested 'g_ether' on a imx51-babbage and on a imx53-qsb boards.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: common: rename phy-fsm-usb.c to usb-otg-fsm.c
Peter Chen [Tue, 29 Apr 2014 00:35:59 +0000 (08:35 +0800)]
usb: common: rename phy-fsm-usb.c to usb-otg-fsm.c

Since usb otg fsm implementation is not related to usb phy.
We move it from usb/phy/ to usb/common/, and rename it to
reflect its real meaning.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: move usb/usb-common.c to usb/common/usb-common.c
Peter Chen [Tue, 29 Apr 2014 00:35:58 +0000 (08:35 +0800)]
usb: move usb/usb-common.c to usb/common/usb-common.c

Since we will have more usb-common things, and it will let
usb-common.c be larger and larger, we create a folder named usb/common
for all usb common things.

Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: update gadget states according to ch9
Peter Chen [Sun, 4 May 2014 01:24:44 +0000 (09:24 +0800)]
usb: chipidea: udc: update gadget states according to ch9

Update device states according to ch9 in USB 2.0 specification

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDoc: usb: chipidea: need to build both kernel Image and modules
Peter Chen [Sun, 4 May 2014 01:24:43 +0000 (09:24 +0800)]
Doc: usb: chipidea: need to build both kernel Image and modules

When tried to enable OTG FSM, we need to rebuild both kernel Image
and modules, since there are some codes at gadget modules which are
controlled by related configurations.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: using one inline function to cover queue work operations
Peter Chen [Fri, 23 May 2014 00:12:49 +0000 (08:12 +0800)]
usb: chipidea: using one inline function to cover queue work operations

The otg queue work include operations: one is disable interrupt,
another one is call kernel queue work API. Many codes do this
operation, using one inline function to instead of them.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: delete useless code
Peter Chen [Fri, 23 May 2014 00:12:48 +0000 (08:12 +0800)]
usb: chipidea: udc: delete useless code

Delete useless code

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: update TODO list
Peter Chen [Fri, 23 May 2014 00:12:47 +0000 (08:12 +0800)]
usb: chipidea: update TODO list

Update TODO list

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: gadget: configfs: fix typo
Peter Chen [Sun, 4 May 2014 23:39:34 +0000 (07:39 +0800)]
usb: gadget: configfs: fix typo

%s/atleast/at least

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: udc-core: set gadget state as not attached after unloading module
Peter Chen [Tue, 29 Apr 2014 05:26:29 +0000 (13:26 +0800)]
usb: udc-core: set gadget state as not attached after unloading module

Set gadget state as "not attached" after unloading gadget module, or
its state will be unchanged after we unload gadget module.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: gadget: set gadget state as configured
Peter Chen [Tue, 29 Apr 2014 05:26:28 +0000 (13:26 +0800)]
usb: gadget: set gadget state as configured

Set gadget device state as configurated after set configuration
has finished.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup
Li Jun [Tue, 15 Jul 2014 14:07:40 +0000 (22:07 +0800)]
usb: gadget: composite: dequeue cdev->req before free it in composite_dev_cleanup

This patch try to dequeue the cdev->req to guarantee the request is not queued
before free it.

Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agoDocumentation: usb: add chipidea.txt for how to demo usb OTG HNP and SRP
Li Jun [Wed, 23 Apr 2014 07:56:54 +0000 (15:56 +0800)]
Documentation: usb: add chipidea.txt for how to demo usb OTG HNP and SRP

This patch adds a file chipidea.txt for how to demo chipidea usb OTG HNP and SRP
functions via sysfs input files, any other possible information should be
documented for chipidea usb driver in future can be added into this file.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoDocumentation: ABI: usb: sysfs Description for chipidea USB OTG HNP and SRP
Li Jun [Wed, 23 Apr 2014 07:56:53 +0000 (15:56 +0800)]
Documentation: ABI: usb: sysfs Description for chipidea USB OTG HNP and SRP

This patch adds sysfs interface description for chipidea USB OTG HNP and SRP.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: debug: add debug file for OTG variables
Li Jun [Wed, 23 Apr 2014 07:56:52 +0000 (15:56 +0800)]
usb: chipidea: debug: add debug file for OTG variables

This patch adds a debug file for OTG vairables show.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add sys inputs for OTG fsm input
Li Jun [Wed, 23 Apr 2014 07:56:51 +0000 (15:56 +0800)]
usb: chipidea: add sys inputs for OTG fsm input

This patch adds sys input to control and show OTG fsm inputs by application,
user can do host and preipheral role switch by change these inputs.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: OTG HNP and SRP fsm implementation
Li Jun [Wed, 23 Apr 2014 07:56:50 +0000 (15:56 +0800)]
usb: chipidea: OTG HNP and SRP fsm implementation

USB OTG interrupt handling and fsm transitions according to USB OTG
and EH 2.0.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: OTG fsm timers initialization
Li Jun [Wed, 23 Apr 2014 07:56:49 +0000 (15:56 +0800)]
usb: chipidea: OTG fsm timers initialization

This patch adds OTG fsm timers initialization, which use controller's 1ms
interrupt as timeout counter, also adds some local timers which are not
in otg_fsm_timer list.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add OTG fsm operation functions implementation
Li Jun [Wed, 23 Apr 2014 07:56:48 +0000 (15:56 +0800)]
usb: chipidea: add OTG fsm operation functions implementation

Add OTG HNP and SRP operation functions implementation:
- charge vbus
- drive vbus
- connection signaling
- drive sof
- start data pulse
- add fsm timer
- delete fsm timer
- start host
- start gadget

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: driver update for OTG HNP
Li Jun [Wed, 23 Apr 2014 07:56:47 +0000 (15:56 +0800)]
usb: chipidea: udc: driver update for OTG HNP

Add b_hnp_enable request handling and enable gadget->is_otg

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: refine isr_tr_complete_handler
Peter Chen [Tue, 11 Mar 2014 05:47:37 +0000 (13:47 +0800)]
usb: chipidea: udc: refine isr_tr_complete_handler

Matthieu CASTET and Michael Grzeschik mentioned isr_tr_complete_handler
is a bit messy at below:
http://marc.info/?l=linux-usb&m=139047775001152&w=2

This commit creates a new function isr_setup_packet_handler to handle
setup packet, it makes isr_tr_complete_handler easy to read.

This is no functional change at this commit, tested with g_mass_storage
and g_ether.

Cc: Michael Grzeschik <mgr@pengutronix.de>
Cc: Matthieu CASTET <matthieu.castet@parrot.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: host: init otg port number
Li Jun [Wed, 23 Apr 2014 07:56:46 +0000 (15:56 +0800)]
usb: chipidea: host: init otg port number

Init otg_port number of otg capable host to be 1 at host start.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: host: vbus control change for OTG HNP
Li Jun [Wed, 23 Apr 2014 07:56:45 +0000 (15:56 +0800)]
usb: chipidea: host: vbus control change for OTG HNP

Leave vbus on/off hanlded by OTG fsm if in OTG mode.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: usb OTG fsm initialization.
Li Jun [Wed, 23 Apr 2014 07:56:44 +0000 (15:56 +0800)]
usb: chipidea: usb OTG fsm initialization.

This patch adds OTG fsm related initialization when do otg init,
add a seperate file for OTG fsm related utilities.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: phy: otg-fsm: export symbol of otg_statemachine
Li Jun [Wed, 23 Apr 2014 07:56:43 +0000 (15:56 +0800)]
usb: phy: otg-fsm: export symbol of otg_statemachine

This patch exports symbol of otg_statemachine for kernel module
can use it.

Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: phy: fsm: update OTG HNP state transition
Li Jun [Thu, 13 Mar 2014 07:22:50 +0000 (15:22 +0800)]
usb: phy: fsm: update OTG HNP state transition

According to:"On-The-Go and Embedded Host Supplement to the USB Revision 2.0
Specification July 27, 2012 Revision 2.0 version 1.1a"

- add a_wait_vrise to a_wait_vfall
- update condition from a_wait_vrise to a_wait_bcon

Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: phy: fsm: update OTG HNP state transition conditions according to OTG and EH...
Li Jun [Wed, 26 Feb 2014 23:38:19 +0000 (07:38 +0800)]
usb: phy: fsm: update OTG HNP state transition conditions according to OTG and EH 2.0 spec.

According to:"On-The-Go and Embedded Host Supplement to the USB Revision 2.0
Specification July 27, 2012 Revision 2.0 version 1.1a"
- From a_host to a_wait_bcon if !b_conn
- Add transition from a_host to a_wait_vfall if id state is high or a_bus_drop
- From a_wait_vfall to a_idle if a_wait_vfall_tmout

Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: chipidea: core: Add missing module owner field
Alexander Shiyan [Wed, 23 Apr 2014 07:56:42 +0000 (15:56 +0800)]
usb: chipidea: core: Add missing module owner field

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add proper delay for waiting correct PHY status
Peter Chen [Wed, 23 Apr 2014 07:56:41 +0000 (15:56 +0800)]
usb: chipidea: add proper delay for waiting correct PHY status

After the PHY has powered and initialized, it needs some delay
for controller to reflect PHY's status. Some status and values
for id, vbus, dp/dm are only stable after this delay. The current
code tries to clear id/vbus status without enough delay, it
causes the status are not cleared properly.

This patch add 2ms delay after phy has initialized, and clear the
unexpected status after that.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Tested-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: debug: add debug file for controller registers dump
Li Jun [Wed, 23 Apr 2014 07:56:40 +0000 (15:56 +0800)]
usb: chipidea: debug: add debug file for controller registers dump

This patch adds below registers dump for debug:
- USBINTR
- USBSTS
- USBMODE
- USBCMD
- PORTSC
- OTGSC

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: export interrupt enable and status register read functions
Li Jun [Wed, 23 Apr 2014 07:56:39 +0000 (15:56 +0800)]
usb: chipidea: export interrupt enable and status register read functions

This patch moves usb interrupt enable and status register read functions
from udc driver to core driver to use them in all ci drivers.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: operate on otgsc register in a general way
Li Jun [Wed, 23 Apr 2014 07:56:38 +0000 (15:56 +0800)]
usb: chipidea: operate on otgsc register in a general way

Use a more general way to read and write otgsc register.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: coordinate usb phy initialization for different phy type
Peter Chen [Wed, 23 Apr 2014 07:56:37 +0000 (15:56 +0800)]
usb: chipidea: coordinate usb phy initialization for different phy type

For internal PHY (like UTMI), the phy clock may from internal pll,
it is on/off on the fly, the access PORTSC.PTS will hang without
phy clock. So, the usb_phy_init which will open phy clock needs to
be called before hw_phymode_configure.
See: http://marc.info/?l=linux-arm-kernel&m=139350618732108&w=2

For external PHY (like ulpi), it needs to configure portsc.pts before
visit viewport, or the viewport can't be visited. so phy_phymode_configure
needs to be called before usb_phy_init.
See: cd0b42c2a6d2a74244f0053f8960f5dad5842278

It may not the best solution, but it can work for all situations.

Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Cc: shc_work@mail.ru
Cc: denis@eukrea.com
Cc: festevam@gmail.com
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: usbmisc: Add USB support for i.MX25/i.MX35 CPUs
Denis Carikli [Wed, 23 Apr 2014 07:56:36 +0000 (15:56 +0800)]
usb: chipidea: usbmisc: Add USB support for i.MX25/i.MX35 CPUs

This adds the i.MX25 and the i.MX35 support in the
ChipIdea usbmisc driver.

The i.MX25 and i.MX35 usb controllers are similar enough to be
able to use the same code.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Denis Carikli <denis@eukrea.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: add support for USB OTG controller on LSI Zevio SoCs
Daniel Tang [Tue, 11 Mar 2014 05:47:39 +0000 (13:47 +0800)]
usb: chipidea: add support for USB OTG controller on LSI Zevio SoCs

The USB controller in TI-NSPIRE calculators (LSI Zevio SoC) are based off either
Freescale's USB OTG controller or the USB controller found in the IMX233, both
of which are Chipidea compatible.

This patch adds a device tree binding for the controller.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Daniel Tang <dt.tangr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: imx: Use dev_name() for ci_hdrc name to distinguish USBs
Alexander Shiyan [Tue, 11 Mar 2014 05:47:38 +0000 (13:47 +0800)]
usb: chipidea: imx: Use dev_name() for ci_hdrc name to distinguish USBs

Use dev_name() for ci_hdrc name to distinguish USBs

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: Propagate the real error code on platform_get_irq() failure
Fabio Estevam [Wed, 19 Feb 2014 05:41:44 +0000 (13:41 +0800)]
usb: chipidea: Propagate the real error code on platform_get_irq() failure

No need to return a 'fake' return value on platform_get_irq() failure.

Just return the error code itself instead.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: udc: add maximum-speed = full-speed option
Michael Grzeschik [Wed, 19 Feb 2014 05:41:43 +0000 (13:41 +0800)]
usb: chipidea: udc: add maximum-speed = full-speed option

This patch makes it possible to set the chipidea udc into full-speed only mode.
It is set by the oftree property "maximum-speed = full-speed".

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agousb: chipidea: use dev_get_platdata()
Jingoo Han [Wed, 19 Feb 2014 05:41:42 +0000 (13:41 +0800)]
usb: chipidea: use dev_get_platdata()

Use the wrapper function for retrieving the platform data instead
of accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoENGR00333323 ARM: dts: imx6sx: add complete pinmux setting for uart DCE/DTE
Fugang Duan [Fri, 26 Sep 2014 05:23:42 +0000 (13:23 +0800)]
ENGR00333323 ARM: dts: imx6sx: add complete pinmux setting for uart DCE/DTE

Add complete pad pinmux setting for imx6sx uart DCE/DTE mode.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Acked-by: Jason Liu
9 years agonet: fec: free resource after phy probe failed
Nimrod Andy [Tue, 23 Sep 2014 07:40:58 +0000 (15:40 +0800)]
net: fec: free resource after phy probe failed

Free memory and disable all related clocks when there has no phy
connection or phy probe failed.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: align rx data buffer size for dma map/unmap
Nimrod Andy [Tue, 23 Sep 2014 07:40:57 +0000 (15:40 +0800)]
net: fec: align rx data buffer size for dma map/unmap

Align allocated rx data buffer size for dma map/unmap, otherwise
kernel print warning when enable DMA_API_DEBUG.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: remove the ERR006358 workaround for imx6sx enet
Nimrod Andy [Tue, 23 Sep 2014 07:40:56 +0000 (15:40 +0800)]
net: fec: remove the ERR006358 workaround for imx6sx enet

Remove the ERR006358 workaround for imx6sx enet since the hw issue
was fixed on the SOC.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: Add Ftype to BD to distiguish three tx queues for AVB
Nimrod Andy [Tue, 23 Sep 2014 07:40:55 +0000 (15:40 +0800)]
net: fec: Add Ftype to BD to distiguish three tx queues for AVB

The current driver loss Ftype field init for BD, which cause tx
queue #1 and #2 cannot work well.

Add Ftype field to BD to distiguish three queues for AVB:
0 -> Best Effort
1 -> ClassA
2 -> ClassB

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: fix build error at m68k platform
Frank Li [Tue, 16 Sep 2014 18:34:18 +0000 (02:34 +0800)]
net: fec: fix build error at m68k platform

reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout 4d494cdc92b3b9a0f5fb9e1560810fa27d5a0489
  make.cross ARCH=m68k  m5272c3_defconfig
  make.cross ARCH=m68k

drivers/net/ethernet/freescale/fec.h:262:0: warning: "FEC_R_DES_START" redefined
 #define FEC_R_DES_START(X) ((X == 1) ? FEC_R_DES_START_1 : \
 ^
drivers/net/ethernet/freescale/fec.h:158:0: note: this is the location of the previous definition
 #define FEC_R_DES_START  0x3d0 /* Receive descriptor ring */
 ^
drivers/net/ethernet/freescale/fec.h:265:0: warning: "FEC_X_DES_START" redefined
 #define FEC_X_DES_START(X) ((X == 1) ? FEC_X_DES_START_1 : \

...

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: ethernet: freescale: fec_main.c: Cleaning up missing null-terminate in conjuncti...
Rickard Strandqvist [Sun, 14 Sep 2014 17:32:42 +0000 (19:32 +0200)]
net: ethernet: freescale: fec_main.c: Cleaning up missing null-terminate in conjunction with strncpy

Replacing strncpy with strlcpy to avoid strings that lacks null terminate.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agonet: fec: use container_of to resolve bufdesc_ex from bufdesc
Fabian Frederick [Sat, 13 Sep 2014 20:38:26 +0000 (22:38 +0200)]
net: fec: use container_of to resolve bufdesc_ex from bufdesc

Use container_of instead of casting first structure member.

ARM cross-compiled but untested.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agofec: Remove fec_enet_select_queue()
Fabio Estevam [Mon, 22 Sep 2014 20:55:29 +0000 (17:55 -0300)]
fec: Remove fec_enet_select_queue()

Sparse complains about fec_enet_select_queue() not being static.

Feedback from David Miller [1] was to remove this function instead of making it
static:

"Please just delete this function.

It's overriding code which does exactly the same thing.

Actually, more precisely, this code is duplicating code in a way that
bypasses many core facilitites of the networking.  For example, this
override means that socket based flow steering, XPS, etc. are all
not happening on these devices.

Without ->ndo_select_queue(), the flow dissector does __netdev_pick_tx
which is exactly what you want to happen."

[1] http://www.spinics.net/lists/netdev/msg297653.html

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
9 years agodoc: dt: mxs-phy: add compatible string for imx6sx-usbphy
Peter Chen [Tue, 26 Aug 2014 02:55:18 +0000 (10:55 +0800)]
doc: dt: mxs-phy: add compatible string for imx6sx-usbphy

Add compatible string for imx6sx-usbphy.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Conflicts:

Documentation/devicetree/bindings/usb/mxs-phy.txt

9 years agousb: phy: mxs: add imx6sx support
Peter Chen [Tue, 26 Aug 2014 02:55:17 +0000 (10:55 +0800)]
usb: phy: mxs: add imx6sx support

Add imx6sx support

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agousb: phy: mxs: Add VF610 USB PHY support
Stefan Agner [Mon, 28 Jul 2014 14:57:29 +0000 (16:57 +0200)]
usb: phy: mxs: Add VF610 USB PHY support

This adds support for the USB PHY in Vybrid VF610. We assume that
the disconnection without VBUS is also needed for Vybrid.

Tests showed, without MXS_PHY_NEED_IP_FIX, enumeration of devices
behind a USB Hub fails with errors:

[  215.163507] usb usb1-port1: cannot reset (err = -32)
[  215.170498] usb usb1-port1: cannot reset (err = -32)
[  215.185120] usb usb1-port1: cannot reset (err = -32)
[  215.191345] usb usb1-port1: cannot reset (err = -32)
[  215.202487] usb usb1-port1: cannot reset (err = -32)
[  215.207718] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[  215.219317] usb usb1-port1: unable to enumerate USB device

Hence we also enable the MXS_PHY_NEED_IP_FIX flag.

Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Felipe Balbi <balbi@ti.com>