]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoENGR00274009 ARM: imx: gpt clk on i.mx6sl can NOT source from OSC
Anson Huang [Tue, 6 Aug 2013 19:19:21 +0000 (15:19 -0400)]
ENGR00274009 ARM: imx: gpt clk on i.mx6sl can NOT source from OSC

There is no OSC clock source option for gpt on i.mx6sl, it
can only source from perclk, and perclk can be from OSC.

As perclk is clock source of many low speed devices, set
it to be from OSC, this can avoid freq varying when bus
clk(ipg) is scaled.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00273867-2 ARM: imx: Enable cpuidle driver by default
Anson Huang [Mon, 5 Aug 2013 21:18:07 +0000 (17:18 -0400)]
ENGR00273867-2 ARM: imx: Enable cpuidle driver by default

Enable cpuidle driver by default.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00273867-1 ARM: imx: Enable cpuidle for i.mx6q and i.mx6dl
Anson Huang [Mon, 5 Aug 2013 21:02:26 +0000 (17:02 -0400)]
ENGR00273867-1 ARM: imx: Enable cpuidle for i.mx6q and i.mx6dl

Enable cpuidle for i.mx6q and i.mx6dl, two cpuidle levels
supported:

1. Simple WFI;
2. WAIT mode enabled;

Currently only i.mx6q > TO1.1 and i.mx6dl > TO1.0 support this
feature, as they have WAIT mode available.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00273838-10 ASoC: WM8962: Set default Volume for playback/capture
Nicolin Chen [Mon, 5 Aug 2013 09:34:23 +0000 (17:34 +0800)]
ENGR00273838-10 ASoC: WM8962: Set default Volume for playback/capture

Set default volume for playback(Headphone, Speaker) and Capture(ADC, input).
This would let playback have a normal volume after system boot up.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-9 ASoC: WM8962: Remove 64KHz sample rate support
Nicolin Chen [Mon, 5 Aug 2013 09:26:45 +0000 (17:26 +0800)]
ENGR00273838-9 ASoC: WM8962: Remove 64KHz sample rate support

64KHz is not in the auto samplerate list of WM8962. When playing a 64KHz
wave file, 'Unsupported rate 64000Hz' will be prompted.

Thus remove to let alsa-lib handle it.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-8 ASoC: WM8962: Let codec driver enable/disable its MCLK
Nicolin Chen [Mon, 5 Aug 2013 08:26:16 +0000 (16:26 +0800)]
ENGR00273838-8 ASoC: WM8962: Let codec driver enable/disable its MCLK

WM8962 needs its MCLK when powerup -- wm8962_resume(). Thus it's better
to control the MCLK in codec driver. Thus remove the clock enable in
machine dirver accordingly.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-7 ASoC: fsl: Use hw_params() and hw_free() to set FLL
Nicolin Chen [Mon, 5 Aug 2013 07:34:05 +0000 (15:34 +0800)]
ENGR00273838-7 ASoC: fsl: Use hw_params() and hw_free() to set FLL

We followed community way by using set_bias() to set FLL of WM8962.
But this can't meet our requirement: aplay -Dhw: 16khz.wav 24khz.wav.
Thus use hw_params() and hw_free() instead.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-6 arm: dtsi: imx6qdl: Remove fifo-depth for ssi
Nicolin Chen [Mon, 5 Aug 2013 06:50:50 +0000 (14:50 +0800)]
ENGR00273838-6 arm: dtsi: imx6qdl: Remove fifo-depth for ssi

Remove fifo-depth for ssi and let the driver use the default value 8.

Doing this modification is because 15 fifo-depth, an odd number, is
not working perfectly with ssi dual-fifo mode by setting sdma water
mark to 13 (result from 15 - 2).

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-5 ASoC: fsl: Add clock control for ssi
Nicolin Chen [Mon, 5 Aug 2013 07:07:21 +0000 (15:07 +0800)]
ENGR00273838-5 ASoC: fsl: Add clock control for ssi

Enable core clock when startup and disable it when shutdown to save power.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-4 ASoC: fsl: Enable dual-fifo mode as default
Nicolin Chen [Mon, 5 Aug 2013 06:47:59 +0000 (14:47 +0800)]
ENGR00273838-4 ASoC: fsl: Enable dual-fifo mode as default

Enable dual-fifo to reduce underrun and channel-swap issue.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-3 ASoC: fsl: Disable interrupts when no substream running
Nicolin Chen [Mon, 5 Aug 2013 06:34:59 +0000 (14:34 +0800)]
ENGR00273838-3 ASoC: fsl: Disable interrupts when no substream running

Disable interrupts when no substream running

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-2 ASoC: fsl: Enable and disable Tx/Rx DMA symmetrically
Nicolin Chen [Mon, 5 Aug 2013 06:19:15 +0000 (14:19 +0800)]
ENGR00273838-2 ASoC: fsl: Enable and disable Tx/Rx DMA symmetrically

Enable DMA when TRIGGER_START, and disable it when TRIGGER_STOP,
otherwise the hardware dma request would not be clearred even if
SSI is disabled.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273838-1 ASoC: fsl: Add debug interface for ssi
Nicolin Chen [Fri, 2 Aug 2013 09:58:05 +0000 (17:58 +0800)]
ENGR00273838-1 ASoC: fsl: Add debug interface for ssi

Add debug interface for ssi to dump its register values.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agonet/fec: Don't let ndo_start_xmit return NETDEV_TX_BUSY without link
Uwe Kleine-König [Tue, 30 Jul 2013 09:29:40 +0000 (11:29 +0200)]
net/fec: Don't let ndo_start_xmit return NETDEV_TX_BUSY without link

Don't test for having link and let hardware deal with this situation.

Without this patch I see a machine running an -rt patched Linux being
stuck in sch_direct_xmit when it looses link while there is still a
packet to be sent. In this case the fec_enet_start_xmit routine returned
NETDEV_TX_BUSY which makes the network stack reschedule the packet and
so sch_direct_xmit calls fec_enet_start_xmit again.
I failed to reproduce a complete hang without -rt, but I think the
problem exists there, too.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec: workaround stop tx during errata ERR006358
Frank Li [Thu, 25 Jul 2013 06:05:53 +0000 (14:05 +0800)]
net: fec: workaround stop tx during errata ERR006358

If the ready bit in the transmit buffer descriptor (TxBD[R])
is previously detected as not set during a prior frame transmission,
then the ENET_TDAR[TDAR] bit is cleared at a later time, even if
additional TxBDs were added to the ring and the ENET_TDAR[TDAR]
bit is set. This results in frames not being transmitted until
there is a 0-to-1 transition on ENET_TDAR[TDAR].

Workarounds:
code can use the transmit frame interrupt flag (ENET_EIR[TXF])
as a method to detect whether the ENET has completed transmission
and the ENET_TDAR[TDAR] has been cleared. If ENET_TDAR[TDAR] is
detected as cleared when packets are queued and waiting for transmit,
then a write to the TDAR bit will restart TxBD processing.

This case main happen when loading is light. A ethernet package may
not send out utile next package put into tx queue.

How to test:
while [ true ]
do
ping <IP> -s 10000 -w 4
ping <IP> -s 6000 -w 2
ping <IP> -s 4000 -w 2
ping <IP> -s 10000 -w 2
done

You will see below result in overnight test.

6008 bytes from 10.192.242.116: seq=1 ttl=128 time=0.722 ms
4008 bytes from 10.192.242.116: seq=0 ttl=128 time=1001.008 ms
4008 bytes from 10.192.242.116: seq=1 ttl=128 time=1.010 ms
10008 bytes from 10.192.242.116: seq=0 ttl=128 time=0.896 ms

After apply this patch, >1000ms delay disappear.

Signed-off-by: Frank Li <Frank.Li@freescale.com>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Add MODULE_ALIAS
Fabio Estevam [Sat, 20 Jul 2013 19:20:36 +0000 (16:20 -0300)]
fec: Add MODULE_ALIAS

Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec: Add VLAN receive HW support.
Jim Baxter [Tue, 2 Jul 2013 21:52:56 +0000 (22:52 +0100)]
net: fec: Add VLAN receive HW support.

This enables the driver to take advantage of the FEC VLAN
indicator to improve performance.

Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec: Fix RMON registers on imx6
Jim Baxter [Mon, 1 Jul 2013 13:57:54 +0000 (14:57 +0100)]
net: fec: Fix RMON registers on imx6

commit 38ae92d "fec: Add support for reading
RMON registers" causes the imx6Q to crash.

This fixes it by only enabling the RMON registers, the
registers are already cleared by the MAC being reset.

Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec: Fix Transmitted bytes counter
Jim Baxter [Thu, 27 Jun 2013 18:25:08 +0000 (19:25 +0100)]
net: fec: Fix Transmitted bytes counter

The tx_bytes field was not being updated so the
network card statistics showed 0.0B transmitted.

Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec: Fix multicast list setup in fec_restart().
Christoph Müllner [Thu, 27 Jun 2013 19:18:23 +0000 (21:18 +0200)]
net: fec: Fix multicast list setup in fec_restart().

Setup the multicast list of the net_device instead of
clearing it blindly. This restores the multicast groups
in case of a link down/up event or when resuming from
suspend.

Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Add support for reading RMON registers
Chris Healy [Wed, 26 Jun 2013 06:18:52 +0000 (23:18 -0700)]
fec: Add support for reading RMON registers

Add ethtool operation to read RMON registers.

Tested against net-next on i.MX28.

v2: make conditional on #ifndef CONFIG_M5272

Signed-off-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Add support to restart autonegotiate
Chris Healy [Mon, 17 Jun 2013 14:25:06 +0000 (07:25 -0700)]
fec: Add support to restart autonegotiate

Add ethtool operation to restart autonegotiation via the PHY.

Tested on i.MX28EVK.

Signed-off-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: fec: Convert to use devm_ioremap_resource
Tushar Behera [Mon, 10 Jun 2013 11:35:05 +0000 (17:05 +0530)]
net: fec: Convert to use devm_ioremap_resource

Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: netdev@vger.kernel.org
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Only pass pdev in fec_ptp_init()
Fabio Estevam [Fri, 7 Jun 2013 10:48:00 +0000 (10:48 +0000)]
fec: Only pass pdev in fec_ptp_init()

Passing pdev in fec_ptp_init() is enough, since we can get ndev locally.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ethernet: remove unnecessary platform_set_drvdata()
Jingoo Han [Mon, 27 May 2013 19:01:12 +0000 (19:01 +0000)]
net: ethernet: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Roland Stigge <stigge@antcom.de>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Handle the regulator in suspend/resume
Fabio Estevam [Mon, 27 May 2013 03:48:33 +0000 (03:48 +0000)]
fec: Handle the regulator in suspend/resume

In order to save power, let's disable the regulator in the suspend function and
enable it in resume.

Tested on a mx28evk board.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Remove irqs first
Fabio Estevam [Mon, 27 May 2013 03:48:32 +0000 (03:48 +0000)]
fec: Remove irqs first

During probe the clocks are enabled prior than the acquiring the interrupts.

In the remove function we need to do the opposite: first remove the interrupts
and then disable the clocks.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Disable the PHY regulator on error and removal
Fabio Estevam [Mon, 27 May 2013 03:48:31 +0000 (03:48 +0000)]
fec: Disable the PHY regulator on error and removal

In the case of error during probe, disable the PHY regulator.

Do the same in fec_drv_remove().

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Invert the order of error path sequence
Fabio Estevam [Mon, 27 May 2013 03:48:30 +0000 (03:48 +0000)]
fec: Invert the order of error path sequence

Currently when fec_enet_init fails it jumps to 'failed_init' error path, which
will attemp to free the interrupts.

This is wrong because at this point the interrupts have not even been acquired.

Swap failed_init/failed_irq to fix the error path.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Place the phy regulator in the private structure
Fabio Estevam [Mon, 27 May 2013 03:48:29 +0000 (03:48 +0000)]
fec: Place the phy regulator in the private structure

Instead of using a local reg_phy structure, let's put it inside the private
structure, so that we are able to have access to the regulator structure even
when we are outside fec_probe().

This is in preparation for controlling the FEC PHY regulator in the suspend and
resume functions.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Use DIV_ROUND_UP macro
Fabio Estevam [Tue, 21 May 2013 05:44:26 +0000 (05:44 +0000)]
fec: Use DIV_ROUND_UP macro

Use the standard DIV_ROUND_UP macro in order to provide better readability.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofec: Let device core handle pinctrl
Fabio Estevam [Mon, 20 May 2013 03:06:17 +0000 (03:06 +0000)]
fec: Let device core handle pinctrl

Since commit ab78029 (drivers/pinctrl: grab default handles from device core)
we can rely on device core for handling pinctrl, so remove
devm_pinctrl_get_select_default() from the driver.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoregulator: pfuze100: Fix off-by-one for max_register setting
Axel Lin [Thu, 1 Aug 2013 11:59:56 +0000 (19:59 +0800)]
regulator: pfuze100: Fix off-by-one for max_register setting

max_register should be register count - 1.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator: pfuze100: Simplify pfuze100_set_ramp_delay implementation
Axel Lin [Tue, 30 Jul 2013 14:47:44 +0000 (22:47 +0800)]
regulator: pfuze100: Simplify pfuze100_set_ramp_delay implementation

Simplify the equation to calculate ramp_delay.
Below equations are equivalent:
  ramp_delay = 25000 / (2 * ramp_delay);
  ramp_delay = 50000 / (4 * ramp_delay);
  ramp_delay = 25000 / (2 * ramp_delay);
  ramp_delay = 12500 / ramp_delay;
So we don't need to read BIT6 of rdev->desc->vsel_reg for applying different
equations.

Also use rdev->desc->vsel_reg instead of run-time calculate register address.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator: pfuze100: Fix n_voltages setting for SW2~SW4 with high bit set
Axel Lin [Tue, 30 Jul 2013 02:46:28 +0000 (10:46 +0800)]
regulator: pfuze100: Fix n_voltages setting for SW2~SW4 with high bit set

Current code adjust min_uV and uV_step but missed adjusting the n_voltages
setting.

When BIT6 is clear:
        n_voltages = (1975000 - 400000) / 25000 + 1 = 64
When BIT6 is set:
        n_voltages = (3300000 - 800000) / 50000 + 1 = 51

The n_voltages needs update because when BIT6 is set 0x73 ~ 0x7f are reserved.
When using regulator_list_voltage_linear, the n_voltages does matter here
because wrong n_voltages setting make the equation return wrong result.
e.g. if selector is 63, regulator_list_voltage_linear returns
     800000 + (50000 * 63) = 4000000
     It should return -EINVAL if the selector is in the range of 51 ~ 63.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator: pfuze100: Use regulator_map_voltage_ascend
Axel Lin [Mon, 29 Jul 2013 07:38:58 +0000 (15:38 +0800)]
regulator: pfuze100: Use regulator_map_voltage_ascend

All table based voltage list have ascendant order.
Use regulator_map_voltage_ascend for them.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator: pfuze100: Fix module alias prefix
Axel Lin [Mon, 29 Jul 2013 04:19:29 +0000 (12:19 +0800)]
regulator: pfuze100: Fix module alias prefix

i2c drivers use "i2c:" prefix for module alias.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator: pfuze100: Use i2c_[set|get]_clientdata
Axel Lin [Mon, 29 Jul 2013 04:09:12 +0000 (12:09 +0800)]
regulator: pfuze100: Use i2c_[set|get]_clientdata

Since this is a i2c driver, use i2c_[set|get]_clientdata instead of
dev_[set|get]_drvdata.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator: pfuze100: REGULATOR_PFUZE100 needs to select REGMAP_I2C
Axel Lin [Mon, 29 Jul 2013 04:08:01 +0000 (12:08 +0800)]
regulator: pfuze100: REGULATOR_PFUZE100 needs to select REGMAP_I2C

This fixes below build errors:

  CC [M]  drivers/regulator/pfuze100-regulator.o
drivers/regulator/pfuze100-regulator.c:342:21: error: variable 'pfuze_regmap_config' has initializer but incomplete type
drivers/regulator/pfuze100-regulator.c:343:2: error: unknown field 'reg_bits' specified in initializer
drivers/regulator/pfuze100-regulator.c:343:2: warning: excess elements in struct initializer [enabled by default]
drivers/regulator/pfuze100-regulator.c:343:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default]
drivers/regulator/pfuze100-regulator.c:344:2: error: unknown field 'val_bits' specified in initializer
drivers/regulator/pfuze100-regulator.c:344:2: warning: excess elements in struct initializer [enabled by default]
drivers/regulator/pfuze100-regulator.c:344:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default]
drivers/regulator/pfuze100-regulator.c:345:2: error: unknown field 'max_register' specified in initializer
drivers/regulator/pfuze100-regulator.c:345:2: warning: excess elements in struct initializer [enabled by default]
drivers/regulator/pfuze100-regulator.c:345:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default]
drivers/regulator/pfuze100-regulator.c:346:2: error: unknown field 'cache_type' specified in initializer
drivers/regulator/pfuze100-regulator.c:346:2: warning: excess elements in struct initializer [enabled by default]
drivers/regulator/pfuze100-regulator.c:346:2: warning: (near initialization for 'pfuze_regmap_config') [enabled by default]
drivers/regulator/pfuze100-regulator.c: In function 'pfuze100_regulator_probe':
drivers/regulator/pfuze100-regulator.c:370:2: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
drivers/regulator/pfuze100-regulator.c:370:21: warning: assignment makes pointer from integer without a cast [enabled by default]
cc1: some warnings being treated as errors
make[2]: *** [drivers/regulator/pfuze100-regulator.o] Error 1
make[1]: *** [drivers/regulator] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator: pfuze100: add MODULE_LICENSE() in pfuze100 driver
Robin Gong [Mon, 29 Jul 2013 03:40:11 +0000 (11:40 +0800)]
regulator: pfuze100: add MODULE_LICENSE() in pfuze100 driver

Fix building error on x86_64 and i386:
WARNING: modpost: missing MODULE_LICENSE() in
drivers/regulator/pfuze100-regulator.o

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator:pfuze100: fix build warning and correct the binding doc
Robin Gong [Fri, 26 Jul 2013 02:27:18 +0000 (10:27 +0800)]
regulator:pfuze100: fix build warning and correct the binding doc

fix building warning and correct the binding doc

Signed-off-by: Robin Gong <b38343@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoregulator: pfuze100: add pfuze100 regulator driver
Robin Gong [Thu, 25 Jul 2013 03:33:18 +0000 (11:33 +0800)]
regulator: pfuze100: add pfuze100 regulator driver

Add pfuze100 regulator driver.

Signed-off-by: Robin Gong <b38343@freescale.com>
Tested-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoENGR00273848-03 MX6 HDMI: Add HDMI setting in dts
Sandor Yu [Mon, 5 Aug 2013 08:18:07 +0000 (16:18 +0800)]
ENGR00273848-03 MX6 HDMI: Add HDMI setting in dts

Add HDMI core and video driver dts
for MX6Q/DL SabreSD board.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00273848-02 iMX6Q/DL HDMI: Enable HDMI function
Sandor Yu [Mon, 5 Aug 2013 08:12:53 +0000 (16:12 +0800)]
ENGR00273848-02 iMX6Q/DL HDMI: Enable HDMI function

Add MX6Q/DL HDMI core and video driver source code.
Add MXC edid data read and parse source code.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00273848-01 iMX6Q clock: Add imx_clk_mux2 function
Sandor Yu [Fri, 2 Aug 2013 04:24:41 +0000 (12:24 +0800)]
ENGR00273848-01 iMX6Q clock: Add imx_clk_mux2 function

Add new imx_clk_mux2 function with flag
CLK_SET_RATE_PARENT for IPU DI clock.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoASoC: wm8962: Do not call configure_bclk() inside wm8962_set_dai_sysclk()
Fabio Estevam [Fri, 19 Jul 2013 13:22:21 +0000 (10:22 -0300)]
ASoC: wm8962: Do not call configure_bclk() inside wm8962_set_dai_sysclk()

Currently after playing any audio file, we get the following error message:

$ aplay clarinet.wav
Playing WAVE 'clarinet.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
$ wm8962 0-001a: Unsupported sysclk ratio 544

This error message appears about 5 seconds after the audio playback has
finished.

Quoting Mark Brown [1]:

"The issue here is triggered by the machine
switching from the FLL to direct MCLK usage where the MCLK isn't
generating a useful ratio.

I suspect we should just kill the configure_bclk() in set_sysclk(), that
one isn't safe as we can't reconfigure a live SYSCLK and it's probably
the one that generates your warnings."

Confirmed that the "Unsupported sysclk ratio" error message comes from
wm8962_set_dai_sysclk(), so get rid of wm8962_configure_bclk() inside this
function.

[1] http://mailman.alsa-project.org/pipermail/alsa-devel/2013-July/064241.html

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoASoC: fsl: imx-wm8962: Fix error path
Fabio Estevam [Thu, 18 Jul 2013 18:07:48 +0000 (15:07 -0300)]
ASoC: fsl: imx-wm8962: Fix error path

If the 'failed to find codec platform device' error path is executed, it should
jump to 'fail' label instead of returning an error immediately.

'fail' label will then free the ssi_np and codec_np previously acquired nodes.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoASoC: fsl: fsl_ssi: Add MODULE_ALIAS
Fabio Estevam [Sat, 20 Jul 2013 19:16:01 +0000 (16:16 -0300)]
ASoC: fsl: fsl_ssi: Add MODULE_ALIAS

Add MODULE_ALIAS, so that auto module loading can work.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Timur Tavi <timur@tabi.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoENGR00273512-2 ARM: imx: Change GPT clock source to OSC
Anson Huang [Mon, 5 Aug 2013 15:42:00 +0000 (11:42 -0400)]
ENGR00273512-2 ARM: imx: Change GPT clock source to OSC

GPT clock is system clock source, need to avoid freq varying,
as system bus clock(ipg) may be changed, for i.mx6 series SOCs,
all of them except i.mx6q TO1.0 support sourcing GPT clk from
OSC directly, so switch gpt clock to OSC if the SOCs support
this feature, as OSC freq is constant.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00273512-1 ARM: imx: Add i.mx6sl cpu type check
Anson Huang [Mon, 5 Aug 2013 15:40:21 +0000 (11:40 -0400)]
ENGR00273512-1 ARM: imx: Add i.mx6sl cpu type check

Add i.mx6sl cpu type check and i.mx6 series SOC check.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoASoC: spdif: Add S20_3LE and S24_LE support for dummy codec drivers
Nicolin Chen [Wed, 31 Jul 2013 12:07:05 +0000 (20:07 +0800)]
ASoC: spdif: Add S20_3LE and S24_LE support for dummy codec drivers

Generally, S/PDIF supports 20bit and optional 24bit samples. Thus add these
two formats for the dummy codec drivers.

If one S/PDIF controller has its own limitation, its CPU DAI driver should
set the supported format by its own circumstance, since the soc-pcm driver
will use the intersection of cpu_dai's formats and codec_dai's formats.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoASoC: spdif_transceiver: Change driver filename to spdif_transmitter.c.
Marek Belisko [Thu, 25 Apr 2013 13:13:12 +0000 (15:13 +0200)]
ASoC: spdif_transceiver: Change driver filename to spdif_transmitter.c.

Transceiver usually means receiver + transmitter. This codec can do only
transmit. Update driver accordingly.

Signed-off-by: Marek Belisko <marek.belisko@streamunlimited.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
11 years agoENGR00273500 IPUv3 dev: use wait_event_interruptible for ipu task
Liu Ying [Thu, 1 Aug 2013 08:32:11 +0000 (16:32 +0800)]
ENGR00273500 IPUv3 dev: use wait_event_interruptible for ipu task

The ipu task thread checks outstanding tasks to be done on waiting
event uninterruptibly on the function find_task()'s return value.
However, sleeping on waiting event uninterruptibly contributes to
system load average value. This patch changes wait_event() to
wait_event_interruptible() to avoid the load average value inflation.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit ec9479ffc757eaefa9b8d4942c37e3634e15599c)

11 years agoARM: imx_v6_v7_defconfig: enable WEIM driver
Huang Shijie [Mon, 5 Aug 2013 02:36:06 +0000 (10:36 +0800)]
ARM: imx_v6_v7_defconfig: enable WEIM driver

enable the weim driver.
Since the NOR is connected to the WEIM for imx6q{dl}-sabreauto,
we also enable the MTD_PHYSMAP_OF module.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: dts: imx6qdl-sabresd: enable the SPI NOR
Huang Shijie [Fri, 21 Jun 2013 02:19:11 +0000 (10:19 +0800)]
ARM: dts: imx6qdl-sabresd: enable the SPI NOR

enable the spi nor for imx6q{dl}-sabresd boards.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: dts: add SPI/NOR for mx6q{dl}-sabreauto boards
Huang Shijie [Thu, 9 May 2013 03:29:03 +0000 (11:29 +0800)]
ARM: dts: add SPI/NOR for mx6q{dl}-sabreauto boards

Since the SPI/NOR has pin conflict with the WEIM NOR,
we disable the spi/nor by default.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agousb: chipidea: fix the build error with randconfig
Peter Chen [Mon, 29 Jul 2013 10:09:57 +0000 (13:09 +0300)]
usb: chipidea: fix the build error with randconfig

Using below  configs, the compile will have error:
ERROR: "ehci_init_driver" undefined!

.config:
CONFIG_USB_CHIPIDEA=m
CONFIG_USB_CHIPIDEA_HOST=y
CONFIG_USB_CHIPIDEA_DEBUG=y

The reason is chipidea host uses symbol from ehci, but ehci
is not compiled. Let the chipidea host depend on
ehci even it is built as module.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: fix build error without CONFIG_USB_PHY
Peter Chen [Mon, 24 Jun 2013 01:25:59 +0000 (09:25 +0800)]
usb: fix build error without CONFIG_USB_PHY

on i386:

drivers/built-in.o: In function `ci_hdrc_probe':
core.c:(.text+0x20446b): undefined reference to `of_usb_get_phy_mode'

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agochipidea: ci_hdrc_imx: Remove unused variable 'res'
Fabio Estevam [Thu, 25 Jul 2013 03:55:28 +0000 (00:55 -0300)]
chipidea: ci_hdrc_imx: Remove unused variable 'res'

'res' is not used anywhere, so let's get rid of it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
11 years agousb: chipidea: ci_hdrc_imx: access phy via private data
Fabio Estevam [Tue, 25 Jun 2013 09:58:05 +0000 (12:58 +0300)]
usb: chipidea: ci_hdrc_imx: access phy via private data

commit ea1418b5f1a (usb: chipidea: i.MX: use devm_usb_get_phy_by_phandle to get
phy) causes the USB host to miss the disconnect/connect events.

In order to reproduce this problem:

- Insert a USB thumb into the USB host port (connection is detected)
- Remove it (no disconnect event will be reported)
- Insert the USB thumb again (connection is not detected)

Fix this problem by accessing the usb_phy structure using the private data
instead of accessing a local structure.

Tested on a mx28evk board.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: drop "13xxx" infix
Alexander Shishkin [Mon, 24 Jun 2013 11:46:36 +0000 (14:46 +0300)]
usb: chipidea: drop "13xxx" infix

"ci13xxx" is bad for at least the following reasons:
  * people often mistype it
  * it doesn't add any informational value to the names it's used in
  * it needlessly attracts mail filters

This patch replaces it with "ci_hdrc", "ci_udc" or "ci_hw", depending
on the situation. Modules with ci13xxx prefix are also renamed accordingly
and aliases are added for compatibility. Otherwise, no functional changes.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousbmisc_imx: allow autoloading on according to dt ids
Arnaud Patard (Rtp) [Thu, 20 Jun 2013 21:33:25 +0000 (23:33 +0200)]
usbmisc_imx: allow autoloading on according to dt ids

Allow udev to autoload the module when booting with device-tree

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: get rid of camelcase names
Alexander Shishkin [Thu, 13 Jun 2013 15:00:03 +0000 (18:00 +0300)]
usb: chipidea: get rid of camelcase names

Since someone has added camelcase detection to checkpatch.pl, chipidea
udc patches have been very noisy. To make everybody's life easier, this
patch changes camelcase names into something more appropriate to the
coding style. No functional changes.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: move to pcim_* functions
Andy Shevchenko [Thu, 13 Jun 2013 15:00:02 +0000 (18:00 +0300)]
usb: chipidea: move to pcim_* functions

This patch makes error path cleaner and probe function tidier.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: remove superfluous pci_set_drvdata(pci, NULL)
Andy Shevchenko [Thu, 13 Jun 2013 15:00:01 +0000 (18:00 +0300)]
usb: chipidea: remove superfluous pci_set_drvdata(pci, NULL)

As drvdata is cleared to NULL at probe failure or at removal by the driver
core, we don't have to call pci_set_drvdata(pci, NULL) any longer in each
driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: i.MX: use devm_usb_get_phy_by_phandle to get phy
Sascha Hauer [Thu, 13 Jun 2013 15:00:00 +0000 (18:00 +0300)]
usb: chipidea: i.MX: use devm_usb_get_phy_by_phandle to get phy

This patch converts the driver to use devm_usb_get_phy_by_phandle
which makes the code smaller and a bit simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: usbmisc: use module_platform_driver
Philipp Zabel [Thu, 13 Jun 2013 14:59:59 +0000 (17:59 +0300)]
usb: chipidea: usbmisc: use module_platform_driver

This patch converts the driver to use the module_platform_driver
macro which makes the code smaller and a bit simpler.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: ci13xxx-imx: move static pdata into probe function
Michael Grzeschik [Thu, 13 Jun 2013 14:59:58 +0000 (17:59 +0300)]
usb: chipidea: ci13xxx-imx: move static pdata into probe function

The pdata structure gets copied anyway inside ci13xxx_add_device
by platform_device_add. We don't need to have it static.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: add devicetree helpers for determining dr_mode and phy_type
Michael Grzeschik [Thu, 13 Jun 2013 14:59:55 +0000 (17:59 +0300)]
usb: add devicetree helpers for determining dr_mode and phy_type

This adds two little devicetree helper functions for determining the
dr_mode (host, peripheral, otg) and phy_type (utmi, ulpi,...) from
the devicetree.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: introduce dual role mode pdata flags
Sascha Hauer [Thu, 13 Jun 2013 14:59:57 +0000 (17:59 +0300)]
usb: chipidea: introduce dual role mode pdata flags

Even if a chipidea core is otg capable the board may not be. This allows
to explicitly set the core to host/peripheral mode. Without these flags
the driver falls back to the old behaviour.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: add PTW, PTS and STS handling
Michael Grzeschik [Thu, 13 Jun 2013 14:59:56 +0000 (17:59 +0300)]
usb: chipidea: add PTW, PTS and STS handling

This patch makes it possible to configure the PTW, PTS and STS bits
inside the portsc register for host and device mode before the driver
starts and the phy can be addressed as hardware implementation is
designed.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: udc: add multiple td support to hardware_{en,de}queue
Michael Grzeschik [Thu, 13 Jun 2013 14:59:54 +0000 (17:59 +0300)]
usb: chipidea: udc: add multiple td support to hardware_{en,de}queue

This patch removes the restriction of having a limited amount of only
four active tds on one endpoint. We use the linked list implementation
to manage all tds which get added and removed by hardware_{en,de}queue.

The removal of this restriction adds the driver to run into a hardware
errata. It's possible that the hardware will still address an transfer
descriptor that already got cleaned up. To solve this the patch also
postpone the cleanup of processed tds by one.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: udc: manage dynamic amount of tds with a linked list
Michael Grzeschik [Thu, 13 Jun 2013 14:59:53 +0000 (17:59 +0300)]
usb: chipidea: udc: manage dynamic amount of tds with a linked list

Instead of having a limited number of usable tds in the udc we use a
linked list to support dynamic amount of needed tds for all special
gadget types. This improves throughput.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: improve kconfig
Peter Chen [Thu, 13 Jun 2013 14:59:52 +0000 (17:59 +0300)]
usb: chipidea: improve kconfig

Randy Dunlap <rdunlap@infradead.org> reported this problem
on i386:

> drivers/built-in.o: In function `ci_hdrc_host_init':
> (.text+0x2ce75c): undefined reference to `ehci_init_driver'
>
> When USB_EHCI_HCD=m and USB_CHIPIDEA=y.

In fact, this problem is existed on all platforms which are using
chipidea driver. The root cause of this problem is the chipidea host
uses symbol exported from ehci-hcd, but chipidea core
does not depends on USB_EHCI_HCD. So, chipidea driver
will not be compiled as module if USB_EHCI_HCD=m.

It is very hard to give a perfect solution since chipidea core
depends on USB || USB_GADGET, and chipdiea host depends on
both USB_EHCI_HCD and USB_CHIPIDEA, the same problem exists for
gadget.

To fix this problem, we had to have below assumptions:

- If USB_EHCI_HCD=y && USB_GADGET=y, USB_CHIPIDEA can be 'y'.

- If USB_EHCI_HCD=m && USB_GADGET=y, USB_CHIPIDEA=m
or USB_CHIPIDEA_HOST can't be seen if USB_CHIPIDEA=y.
It will cause compile error due to no glue layer for ehci:

> error: #error "missing bus glue for ehci-hcd"

So, we had to compile USB_CHIPIDEA=m if USB_EHCI_HCD=m,
current ehci hcd core guarantee it.

- If USB_EHCI_HCD=y && USB_GADGET=m, USB_CHIPIDEA=m
or USB_CHIPIDEA_UDC can't be seen if USB_CHIPIDEA=y.
Of cos, the gadget will out of working at this situation,
so the user had to compile USB_CHIPIDEA=m.

- USB_EHCI_HCD=m && USB_GADGET=m, we can't see
USB_CHIPIDEA_HOST and USB_CHIPIDEA_UDC unless
USB_CHIPIDEA=m.

The reason why it has above assumptions:
- If both ehci core and gadget core build as module,
the chipidea has to build as module.
- If one of ehci core or gadget core is built in, another
is built as module, we can only enable the function which
is built in, or enable both roles as modules (USB_CHIPIDEA=m),
since chipidea core driver takes care of both host and device roles.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: ci13xxx_imx: remove 'phy_np'
Fabio Estevam [Thu, 13 Jun 2013 14:59:51 +0000 (17:59 +0300)]
usb: chipidea: ci13xxx_imx: remove 'phy_np'

There is no need to keep a local 'phy_np' as we can directly use the private
structure in data->phy_np.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: ci13xxx_imx: check if 'data->phy_np' is not NULL
Fabio Estevam [Thu, 13 Jun 2013 14:59:50 +0000 (17:59 +0300)]
usb: chipidea: ci13xxx_imx: check if 'data->phy_np' is not NULL

Similarly as it is done in ci13xxx_imx_remove(), only calls of_node_put if
data->phy_np is not NULL.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: ci13xxx_imx: remove reg_vbus
Fabio Estevam [Thu, 13 Jun 2013 14:59:49 +0000 (17:59 +0300)]
usb: chipidea: ci13xxx_imx: remove reg_vbus

There is no need to keep a 'reg_vbus' indirection, so get rid of it.

The motivation for doing this change is that in the case of error, the current
code only sets the local reg_vbus to NULL instead of updating the private
structure 'data->reg_vbus'.

Updating only the local reg_vbus is wrong, since we currently check for
data->reg_vbus in the ci13xxx_imx_remove() function.

In order to avoid such issue, just use 'data->reg_vbus' directly.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: ci13xxx_imx: fix error path
Fabio Estevam [Thu, 13 Jun 2013 14:59:48 +0000 (17:59 +0300)]
usb: chipidea: ci13xxx_imx: fix error path

If usbmisc_ops->post() fails it should point the error path to release all
previously acquired resources, so adjust it to call ci13xxx_remove_device().

While at it, remove the unnecessary 'plat_ci' indirection, as we can directly
use the private structure.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: udc: configure iso endpoints
Michael Grzeschik [Thu, 13 Jun 2013 14:59:47 +0000 (17:59 +0300)]
usb: chipidea: udc: configure iso endpoints

This patch adds iso endpoint support to the device controller.
It makes use of the multiplication bits in the maxpacket field
of the endpoint and calculates the multiplier bits for each
transfer description on every request.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reviewed-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: usbmisc_imx: Staticize usbmisc_imx_drv_init/exit
Fabio Estevam [Thu, 13 Jun 2013 14:59:46 +0000 (17:59 +0300)]
usb: chipidea: usbmisc_imx: Staticize usbmisc_imx_drv_init/exit

Fix the following sparse warnings:

drivers/usb/chipidea/usbmisc_imx.c:246:5: warning: symbol 'usbmisc_imx_drv_init' was not declared. Should it be static?
drivers/usb/chipidea/usbmisc_imx.c:252:6: warning: symbol 'usbmisc_imx_drv_exit' was not declared. Should it be static?

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: ci13xxx_imx: let device core handle pinctrl
Fabio Estevam [Thu, 13 Jun 2013 14:59:45 +0000 (17:59 +0300)]
usb: chipidea: ci13xxx_imx: let device core handle pinctrl

Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for handling pinctrl.

So remove devm_pinctrl_get_select_default() from the driver.

Cc: <linux-usb@vger.kernel.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agousb: chipidea: depend on CONFIG_OF instead of CONFIG_OF_DEVICE
Rob Herring [Fri, 19 Apr 2013 22:32:15 +0000 (17:32 -0500)]
usb: chipidea: depend on CONFIG_OF instead of CONFIG_OF_DEVICE

CONFIG_OF_DEVICE is going away, so use CONFIG_OF instead. It does not
appear that CONFIG_OF_DEVICE was the correct dependency either.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
11 years agoENGR00273344-2 thermal: imx: make thermal trip temp changeable
Anson Huang [Fri, 2 Aug 2013 17:29:17 +0000 (13:29 -0400)]
ENGR00273344-2 thermal: imx: make thermal trip temp changeable

Make all thermal trips' temp changeable:

1. Different users may have different definitions about the
trip temp;
2. For testing purpose, if we want to test cooling device's
function, it is easy to change trip temp to cheat the cooling
device to active, otherwise, need to test it using heating box
which is very inconvenient.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00273344-1 thermal: imx: Update formula for thermal sensor
Anson Huang [Wed, 31 Jul 2013 23:29:29 +0000 (19:29 -0400)]
ENGR00273344-1 thermal: imx: Update formula for thermal sensor

Thermal sensor used to need two calibration data which are
in Fuse to get a slope for converting thermal sensor's raw
data to real temperature in degree C.
Now we use an universal formula to get real temp
from internal thermal sensor raw data:
Slope = 0.4297157 - (0.0015976 * 25C fuse);

Using universal formula can reduce the effort of chip
calibration, so update the formula.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00269945 ARM: imx: Enable PU power
Anson Huang [Fri, 2 Aug 2013 19:53:57 +0000 (15:53 -0400)]
ENGR00269945 ARM: imx: Enable PU power

PU is turned off in uboot, so we need to turn it on here
to avoid kernel hang during GPU init.
PU power enable need to follow the flows:

1. Enable xPU's clk;
2. Enable PU power rail and wait for PU power stable;
3. Enable PU power gate in GPC;

Otherwise, some chips' PU may not work.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoARM: dts: imx6qdl-sabreauto: enable the WEIM NOR
Huang Shijie [Tue, 28 May 2013 06:20:12 +0000 (14:20 +0800)]
ARM: dts: imx6qdl-sabreauto: enable the WEIM NOR

Enable the WEIM NOR for imx6q{dl}-sabreauto boards.

For the pin conflict with SPI NOR, its status is set to "disabled".

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoARM: dts: imx6qdl: add more information for WEIM
Huang Shijie [Tue, 28 May 2013 06:20:09 +0000 (14:20 +0800)]
ARM: dts: imx6qdl: add more information for WEIM

Add the clock and compatible information for the weim.
Also adds the weim label.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agodrivers: bus: add a new driver for WEIM
Huang Shijie [Tue, 28 May 2013 06:20:07 +0000 (14:20 +0800)]
drivers: bus: add a new driver for WEIM

The WEIM(Wireless External Interface Module) works like a bus.
You can attach many different devices on it, such as NOR, onenand.

In the case of i.MX6q-sabreauto, the NOR is connected to WEIM.

This patch also adds the devicetree binding document.
The driver only works when the devicetree is enabled.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
11 years agoASoC: fsl: Disable SSI in trigger() if RE/TE are both cleared
Nicolin Chen [Wed, 10 Jul 2013 10:43:54 +0000 (18:43 +0800)]
ASoC: fsl: Disable SSI in trigger() if RE/TE are both cleared

The code enabled SSIEN when triggered by SNDRV_PCM_TRIGGER_START,
so move the disable code to SNDRV_PCM_TRIGGER_STOP for symmetric.

This also allows us to use the SSI driver more flexible so that
it can support some use cases like "aplay S16_LE.wav S24_LE.wav"
which would call the driver in sequence like:
 startup()->hw_params(S16_LE)->trigger(START)->tirgger(STOP)->
 hw_params(S24_LE)->trigger(START)->tirgger(STOP)->shutdown()

If we disable SSIEN in shutdown(), the second hw_params() would
bypass the sample bits setting while using symmetric_rate.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
11 years agoENGR00273673-3 dma: imx-sdma: Add event pending trigger interface
Nicolin Chen [Fri, 19 Apr 2013 09:18:53 +0000 (17:18 +0800)]
ENGR00273673-3 dma: imx-sdma: Add event pending trigger interface

Add interface to allow other modules, like ASRC for example,
to trigger a dma request manually.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273673-2 dma: imx-sdma: Add dual-fifo script for ssi
Nicolin Chen [Fri, 2 Aug 2013 09:18:55 +0000 (17:18 +0800)]
ENGR00273673-2 dma: imx-sdma: Add dual-fifo script for ssi

To support SSI dual-fifo mode, we need to add dual-fifo script for sdma.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoENGR00273673-1 dma: imx-sdma: Fix wrong total script number
Nicolin Chen [Fri, 2 Aug 2013 09:12:11 +0000 (17:12 +0800)]
ENGR00273673-1 dma: imx-sdma: Fix wrong total script number

The total number should be 35. Thus fix it.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
11 years agoserial: imx: add DMA support for imx6q
Huang Shijie [Mon, 8 Jul 2013 09:14:18 +0000 (17:14 +0800)]
serial: imx: add DMA support for imx6q

We only enable the DMA support when the following are meet:

  [1] The uart port supports the hardware flow control(CTS/RTS).
      (Some uart port does not support the CTS/RTS.)

  [2] The application enables the CTS/RTS.

  [3] The Soc is imx6q.
      For the sdma's firmware limit, we do not support the DMA except
      the imx6q platform.

  [4] The uart is not used as a console.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers/tty/serial: don't use devm_pinctrl_get_select_default() in probe
Wolfram Sang [Wed, 10 Jul 2013 15:57:46 +0000 (16:57 +0100)]
drivers/tty/serial: don't use devm_pinctrl_get_select_default() in probe

Since commit ab78029 (drivers/pinctrl: grab default handles from device core),
we can rely on device core for setting the default pins. Compile tested only.

Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13)
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoserial/imx: fix custom-baudrate handling
Hubert Feurstein [Thu, 18 Jul 2013 16:52:49 +0000 (18:52 +0200)]
serial/imx: fix custom-baudrate handling

It was not possible to set custom-baudrates like 62500.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoserial: imx: distinguish the imx6q uart from the others
Huang Shijie [Mon, 8 Jul 2013 09:14:17 +0000 (17:14 +0800)]
serial: imx: distinguish the imx6q uart from the others

We will add the DMA support for the imx uart. For the firmware's limit,
only the imx6 serial chips (including the imx6q, imx6dl, imx6sl) can
support the DMA.

This patch adds the necessary macro and helper to distinguish the
imx6q uart from the other imx uart. Other chips can use the "fsl,imx6q-uart"
to enable the DMA support.

This patch also replaces the check "is_imx21_uart()" with "!is_imx1_uart()".

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: imx: remove the uart_console() check
Huang Shijie [Fri, 28 Jun 2013 05:39:42 +0000 (13:39 +0800)]
serial: imx: remove the uart_console() check

The uart_console() check makes the clocks(clk_per and clk_ipg) opened
even when we close the console uart.

This patch enable/disable the clocks in imx_console_write(),
so we can keep the clocks closed when the console uart is closed.

Also remove the clock enable/disable oprations in the probe, we do not
need them any more.

Signed-off-by: Huang Shijie <b32955@freescale.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoserial: remove unnecessary platform_set_drvdata()
Jingoo Han [Tue, 25 Jun 2013 01:08:49 +0000 (10:08 +0900)]
serial: remove unnecessary platform_set_drvdata()

The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Barry Song <baohua.song@csr.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoserial: imx: Fix serial clock unbalance
Fabio Estevam [Sun, 9 Jun 2013 18:17:18 +0000 (15:17 -0300)]
serial: imx: Fix serial clock unbalance

Since commit 0c375501 (serial: imx: enable the clocks for console), the
imx_startup() function calls clk_prepare_enable conditionally, so we
need to call clk_disable_unprepare inside imx_shutdown() under the same
condition to avoid unbalanced clock calls.

This avoids the following warning:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 70 at drivers/clk/clk.c:780 __clk_disable+0x68/0x84()
Modules linked in:
CPU: 0 PID: 70 Comm: mountall Not tainted 3.10.0-rc4-next-20130607+ #435
Backtrace:
[<800116a4>] (dump_backtrace+0x0/0x10c) from [<80011844>] (show_stack+0x18/0x1c)
 r6:8069f4e8 r5:0000030c r4:00000000 r3:00000000
[<8001182c>] (show_stack+0x0/0x1c) from [<8053bce0>] (dump_stack+0x78/0x94)
[<8053bc68>] (dump_stack+0x0/0x94) from [<80023df8>] (warn_slowpath_common+0x6c/0x8c)
 r4:00000000 r3:00000000
[<80023d8c>] (warn_slowpath_common+0x0/0x8c) from [<80023e3c>] (warn_slowpath_null+0x24/0x2c)
 r8:bf2ed008 r7:bfaa9810 r6:000f0013 r5:bf824b80 r4:bf824b80
[<80023e18>] (warn_slowpath_null+0x0/0x2c) from [<8041af84>] (__clk_disable+0x68/0x84)
[<8041af1c>] (__clk_disable+0x0/0x84) from [<8041b098>] (clk_disable+0x20/0x2c)
 r4:600f0013 r3:00000001
[<8041b078>] (clk_disable+0x0/0x2c) from [<802c93e8>] (imx_shutdown+0xbc/0xec)
 r5:bf824b80 r4:bfaa9810
[<802c932c>] (imx_shutdown+0x0/0xec) from [<802c63a0>] (uart_port_shutdown+0x34/0x40)
 r5:bf86f860 r4:bfaa9810
[<802c636c>] (uart_port_shutdown+0x0/0x40) from [<802c68c0>] (uart_shutdown+0x98/0xc4)
 r4:bf86f800 r3:00000000
[<802c6828>] (uart_shutdown+0x0/0xc4) from [<802c7514>] (uart_close+0x5c/0x198)
 r7:bfaa9810 r6:bf274400 r5:bf86f86c r4:bf86f800
[<802c74b8>] (uart_close+0x0/0x198) from [<802ac648>] (tty_release+0xf8/0x500)
[<802ac550>] (tty_release+0x0/0x500) from [<800c5a30>] (__fput+0x9c/0x208)
[<800c5994>] (__fput+0x0/0x208) from [<800c5bac>] (____fput+0x10/0x14)
[<800c5b9c>] (____fput+0x0/0x14) from [<80040234>] (task_work_run+0xb4/0xec)
[<80040180>] (task_work_run+0x0/0xec) from [<80029238>] (do_exit+0x2b0/0x920)
 r8:8000e144 r7:000000f8 r6:bf306300 r5:00000000 r4:bfac1180
[<80028f88>] (do_exit+0x0/0x920) from [<80029a4c>] (do_group_exit+0x50/0xd4)
 r7:000000f8
[<800299fc>] (do_group_exit+0x0/0xd4) from [<80029ae8>] (__wake_up_parent+0x0/0x28)
 r7:000000f8 r6:00000001 r5:0006f7ae r4:0006f79a
[<80029ad0>] (SyS_exit_group+0x0/0x18) from [<8000dfc0>] (ret_fast_syscall+0x0/0x30)
---[ end trace 16d080eb7efea4e9 ]---

Reported-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoserial: imx: enable the clocks for console
Huang Shijie [Sun, 9 Jun 2013 02:01:19 +0000 (10:01 +0800)]
serial: imx: enable the clocks for console

The console's clocks are disabled after the uart driver is probed.
It makes that we can see less log from the console now
(though we still can get all the log by the `dmesg`).

So enable the clocks for console, and we can see all the log again.

This patch also disables the sport->clk_per when we fail to enable
the sport->clk_ipg;

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>