]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agoENGR00275246-01: ARM: dts: add fec phy reset for imx6sl evk board
Fugang Duan [Wed, 14 Aug 2013 08:08:29 +0000 (16:08 +0800)]
ENGR00275246-01: ARM: dts: add fec phy reset for imx6sl evk board

Add fec phy reset for imx6sl evk board.
Add iomux gpr device node, which used for fec to clear gpr1[14],
gpr1[18-17] bit to select the fec clock sourcr from internal anatop PLL.

Signed-off-by: Fugang Duan <B38611@freescale.com>
10 years agoENGR00274585-9 ASoC: change error message to debug message
Shengjiu Wang [Fri, 9 Aug 2013 06:45:51 +0000 (14:45 +0800)]
ENGR00274585-9 ASoC: change error message to debug message

This error message is not actual error, which is a warning. When using
FE/BE, if there is widget which is used by playback and capture route, then
this message will be printed.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274585-8 arm: defconfig: imx_v6_v7: enable cs42888
Shengjiu Wang [Fri, 9 Aug 2013 06:44:40 +0000 (14:44 +0800)]
ENGR00274585-8 arm: defconfig: imx_v6_v7: enable cs42888

build-in cs42888 by default.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274585-7 dtsi: add device tree for asrc p2p and esai.
Shengjiu Wang [Fri, 9 Aug 2013 06:43:05 +0000 (14:43 +0800)]
ENGR00274585-7 dtsi: add device tree for asrc p2p and esai.

add devicetree for asrc p2p and esai.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274585-6 ASoC: fsl: update format and buffer size in the pcm dma
Shengjiu Wang [Mon, 12 Aug 2013 06:17:13 +0000 (14:17 +0800)]
ENGR00274585-6 ASoC: fsl: update format and buffer size in the pcm dma

1. add 24bit format support.
2. enlarge the buffer size for ESAI.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274585-5 ASoC: fsl: add cs42888 machine driver.
Shengjiu Wang [Mon, 12 Aug 2013 06:16:32 +0000 (14:16 +0800)]
ENGR00274585-5 ASoC: fsl: add cs42888 machine driver.

add cs42888 machine driver.
add bindings document of cs42888 machine.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274585-4 ASoC: fsl: add esai driver
Shengjiu Wang [Mon, 12 Aug 2013 06:12:36 +0000 (14:12 +0800)]
ENGR00274585-4 ASoC: fsl: add esai driver

add esai driver.
add bindings documentation of esai

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274585-3 ASoC: fsl: add asrc p2p driver.
Shengjiu Wang [Mon, 12 Aug 2013 06:08:08 +0000 (14:08 +0800)]
ENGR00274585-3 ASoC: fsl: add asrc p2p driver.

add asrc p2p driver.
add bindings document of asrc p2p.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274585-2 ASoC: codec: add codec driver cs42888
Shengjiu Wang [Fri, 9 Aug 2013 06:31:41 +0000 (14:31 +0800)]
ENGR00274585-2 ASoC: codec: add codec driver cs42888

Add codec driver cs42888.
Add bindings document for cs42888 audio codec.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274585-1 dma: imx-sdma: update sdma to support p2p
Shengjiu Wang [Fri, 9 Aug 2013 06:41:11 +0000 (14:41 +0800)]
ENGR00274585-1 dma: imx-sdma: update sdma to support p2p

For the sake of support asrc p2p, the sdma driver need to be updated.

1. Add another dma_request, p2p need two dma_request.
2. There are some cases which need to change the config after the
dma_request_channel. add dma_request config in dmaengine_slave_config().
3. add dma_request0 and dma_request1 in dma_slave_config for runtime config
in dmaengine_slave_config.

Signed-off-by: Shengjiu Wang <b02247@freescale.com>
10 years agoENGR00274412-3 ARM: imx_v6_v7_defconfig: enable ePxP driver
Robby Cai [Tue, 13 Aug 2013 09:33:16 +0000 (17:33 +0800)]
ENGR00274412-3 ARM: imx_v6_v7_defconfig: enable ePxP driver

Enable ePxP DMAENGINE driver by default.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00274412-2 ARM: dts: enable ePxP for imx6dl_sd and imx6sl_evk
Robby Cai [Mon, 12 Aug 2013 07:07:18 +0000 (15:07 +0800)]
ENGR00274412-2 ARM: dts: enable ePxP for imx6dl_sd and imx6sl_evk

Enable ePxP in DTS for imx6 duallite sabresd and imx6 sololite evk board.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00274412-1 dma: pxp: Port ePxP driver to 3.10
Robby Cai [Thu, 8 Aug 2013 03:23:54 +0000 (11:23 +0800)]
ENGR00274412-1 dma: pxp: Port ePxP driver to 3.10

It's ported from v3.5.7, which contains ePxP DMAENGINE driver and
a client driver named pxp_device. This patch also includes the changes:
- use uapi header file
- remove VM_RESERVED since it's deprecated, and drop redundant VM_IO flag
  since it's automatically set in remap_pfn_range()
- use <linux/platform_data/dma-imx.h> instead of <mach/dma.h>
- use devm_kzalloc() instead in pxp_probe()
- use macro __KERNEL__ in pxp_dma uapi header to avoid definition conflict

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00274059-02 ARM: Add new dts for imx6q/imx6dl SabreSD hdcp
Sandor Yu [Tue, 13 Aug 2013 08:55:20 +0000 (16:55 +0800)]
ENGR00274059-02 ARM: Add new dts for imx6q/imx6dl SabreSD hdcp

hdcp ddc pins conflict with i2c2,
add new dts file for imx6q and imx6dl SabreSD board,
enable hdcp and disable i2c2 in these dts files.
Remove hdmi pins property from mx6qdl-sabresd.dtsi.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274059-01 MX6 HDMI: Add fsl,hdcp property
Sandor Yu [Tue, 13 Aug 2013 08:48:32 +0000 (16:48 +0800)]
ENGR00274059-01 MX6 HDMI: Add fsl,hdcp property

- Initialize hdmi driver to support hdcp according dts property fsl,hdcp.
- Remove unused code.
- Add fsl,hdcp property description in mxc_hdmi_video.txt

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274226-03 HDMI DTS: Add prefix "fsl" to mxc specific dts properties.
Sandor Yu [Wed, 7 Aug 2013 11:26:55 +0000 (19:26 +0800)]
ENGR00274226-03 HDMI DTS: Add prefix "fsl" to mxc specific dts properties.

Add prefix "fsl" to mxc specific dts properties.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274226-02 MX6 HDMI: Add prefix "fsl" to mxc specific dts properties.
Sandor Yu [Wed, 7 Aug 2013 11:18:11 +0000 (19:18 +0800)]
ENGR00274226-02 MX6 HDMI: Add prefix "fsl" to mxc specific dts properties.

- Add prefix "fsl" to mxc specific dts properties.
- imx_hdmi_type will been referenced by app move it to mxc_hdmi.h.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274226-01 MX6 HDMI: document for mxc specific properties.
Sandor Yu [Wed, 7 Aug 2013 11:12:28 +0000 (19:12 +0800)]
ENGR00274226-01 MX6 HDMI: document for mxc specific properties.

Add hdmi core and video dts properties description document.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274055 MX6 HDMI: Enable HDMI video in defconfig
Sandor Yu [Tue, 6 Aug 2013 11:20:38 +0000 (19:20 +0800)]
ENGR00274055 MX6 HDMI: Enable HDMI video in defconfig

Enable i.MX6 HDMI video in defconfig

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274031 MX6: Move HDMI core menu into multifunction device drivers
Sandor Yu [Tue, 6 Aug 2013 09:14:27 +0000 (17:14 +0800)]
ENGR00274031 MX6: Move HDMI core menu into multifunction device drivers

Move MX6 HDMI core driver menu into Multifunction device drivers menu

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274026 MX6 Clock: Replace imx_clk_mux2 function with imx_clk_mux_flags
Sandor Yu [Tue, 6 Aug 2013 09:04:22 +0000 (17:04 +0800)]
ENGR00274026 MX6 Clock: Replace imx_clk_mux2 function with imx_clk_mux_flags

The function of imx_clk_mux2 is cover by imx_clk_mux_flags.
Remove imx_clk_mux2 and replace with imx_clk_mux_flags function.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274473-6 ARM: dts: imx6qdl: pass clocks and regulator to gpc
Anson Huang [Thu, 8 Aug 2013 22:24:38 +0000 (18:24 -0400)]
ENGR00274473-6 ARM: dts: imx6qdl: pass clocks and regulator to gpc

Now that gpc module is a platform driver, pass related
clocks and regulator from dts.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274473-5 ARM: imx: Support PU regulator on/off dynamically
Anson Huang [Thu, 8 Aug 2013 21:20:39 +0000 (17:20 -0400)]
ENGR00274473-5 ARM: imx: Support PU regulator on/off dynamically

1. Change GPC to platform driver to support regulator nofication
in order to implement dynamical PU regulator on/off;

2. Remove previous enabling PU regulator during kernel boot up,
PU modules will handle it.

3. Support dynamical PU regulator on/off according to regulator
notification.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274473-4 mxc: gpu-viv: support regulator on/off
Anson Huang [Thu, 8 Aug 2013 21:19:08 +0000 (17:19 -0400)]
ENGR00274473-4 mxc: gpu-viv: support regulator on/off

Support PU regulator dynamical on/off on kernel v3.10.

Acked-by: Jason Liu
Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274473-3 ARM: dts: imx6qdl: remove PU LDO always-on attribute
Anson Huang [Thu, 8 Aug 2013 21:15:19 +0000 (17:15 -0400)]
ENGR00274473-3 ARM: dts: imx6qdl: remove PU LDO always-on attribute

PU regulator can be turned off when there is no PU module
running, so remove always-on attribute.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274473-2 regulator: anatop: implement more callback
Anson Huang [Thu, 8 Aug 2013 21:12:06 +0000 (17:12 -0400)]
ENGR00274473-2 regulator: anatop: implement more callback

Need to support anatop PU regulator on/off dynamically,
so we need to add enable/disable/is_enabled/enable_time
for anatop regulator.

Only PU regulator in anatop can support dynamical on/off,
so this implement is only for PU regulator, other regulators
are always on.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274473-1 regulator: add more notifier events
Anson Huang [Thu, 8 Aug 2013 21:05:38 +0000 (17:05 -0400)]
ENGR00274473-1 regulator: add more notifier events

Some hardware modules need strict flows according
to regulator's enable/disable, such as for i.MX6
SOC's PU regulator, there is another power gate
in GPC module, it needs to disable PU modules' clock
before PU regulator is disabled and need to enable
clock right after PU regulator is enabled, then it
can do GPC's power gate operation.

So we need to add REGULATOR_EVENT_PRE_DISABLE and
REGULATOR_EVENT_ENABLE for regulator's notifier events.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoARM: dts: imx6q: add quirky select input for USB_OTG_ID
Shawn Guo [Thu, 1 Aug 2013 04:22:04 +0000 (12:22 +0800)]
ARM: dts: imx6q: add quirky select input for USB_OTG_ID

For some reason, the select input of pin function USB_OTG_ID is not
implemented via a regular select input register but using the bit
USB_OTG_ID_ SEL (shift 13) of IOMUXC_GPR1 register (offset 0x4).

As per the workaround for such quirk implemented in pinctrl driver,
we need to compose the input_val cell as below.

31     23      15      7        0
| 0xff | shift | width | select |

Thus, we have 0xff0d0100 for MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID and
0xff0d0101 for MX6QDL_PAD_GPIO_1__USB_OTG_ID in input_val cell.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
10 years agopinctrl: imx: work around select input quirk
Shawn Guo [Sun, 4 Aug 2013 13:39:23 +0000 (21:39 +0800)]
pinctrl: imx: work around select input quirk

The select input for some pin may not be implemented using the regular
select input register but the general purpose register.  A real example
is that imx6q designers found the select input for USB OTG ID pin is
missing at the very late stage, and can not add a new select input
register but have to use a general purpose register bit to implement it.

The patch adds a workaround for such select input quirk by interpreting
the input_val cell of pin function ID in a different way, so that all
the info that needed for setting up select input bits in general purpose
register could be decoded from there.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoENGR00269945: ARM: imx6: report soc info via soc device
Shawn Guo [Tue, 13 Aug 2013 08:59:28 +0000 (16:59 +0800)]
ENGR00269945: ARM: imx6: report soc info via soc device

The patch enables soc bus infrastructure and adds a function
imx_soc_device_init() to report soc info via soc device interface for
imx6qdl and imx6sl.  With the support, user space can get soc related
info by looking at sysfs like below.

  $ cat /sys/devices/soc0/machine
  Freescale i.MX6 Quad SABRE Smart Device Board
  $ cat /sys/devices/soc0/family
  Freescale i.MX
  $ cat /sys/devices/soc0/soc_id
  i.MX6Q
  $ cat /sys/devices/soc0/revision
  1.2

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoENGR00269945: ARM: imx: use imx_init_revision_from_anatop() on imx6sl
Shawn Guo [Tue, 13 Aug 2013 08:54:05 +0000 (16:54 +0800)]
ENGR00269945: ARM: imx: use imx_init_revision_from_anatop() on imx6sl

Add imx6sl support into imx_init_revision_from_anatop(), so that it can
be used to initialize cpu type and revision on imx6sl.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoENGR00269945: ARM: imx6qdl: add a common function to initialize revision from anatop
Shawn Guo [Tue, 13 Aug 2013 06:59:43 +0000 (14:59 +0800)]
ENGR00269945: ARM: imx6qdl: add a common function to initialize revision from anatop

The patch creates a common function imx_init_revision_from_anatop() by
merging imx6q_init_revision() and imx_anatop_get_digprog(), so that any
SoC that encodes revision info in anatop can use it to initialize
revision.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoENGR00269945: ARM: imx6qdl: use common soc revision helpers
Shawn Guo [Tue, 13 Aug 2013 06:10:29 +0000 (14:10 +0800)]
ENGR00269945: ARM: imx6qdl: use common soc revision helpers

It calls imx_set_soc_revision() to set up soc revision in
imx6q_init_revision(), and replaces all the occurrences imx6q_revision()
and imx6dl_revision() with common helper imx_get_soc_revision().

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoENGR00269945: ARM: imx: add soc revision helper functions
Shawn Guo [Tue, 13 Aug 2013 05:54:02 +0000 (13:54 +0800)]
ENGR00269945: ARM: imx: add soc revision helper functions

Similar to what we do for cpu type, the patch adds helper functions
imx_set_soc_revision() and imx_get_soc_revision() to maintain
imx_soc_revision in cpu.c.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoENGR00274386-2 ASoC: imx-wm8962: Set MCLK source clock to 0Hz in hw_free()
Nicolin Chen [Tue, 13 Aug 2013 03:37:54 +0000 (11:37 +0800)]
ENGR00274386-2 ASoC: imx-wm8962: Set MCLK source clock to 0Hz in hw_free()

When DAPM closed WM8962 after playback, its driver would prompt
'wm8962 0-001a: Unsupported sysclk ratio 500' due to the invalid
divisor calculated by WM8962 codec driver.

To fix it, we can work around by setting its MCLK source to 0Hz,
so the codec driver would never get an invalid divisor any more.
Since hw_params() would re-set the MCLK source, no need to worry
about any side-effect.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
10 years agoENGR00274386-1 ASoC: imx-wm8962: Fix 192KHz playback slow issue
Nicolin Chen [Thu, 8 Aug 2013 03:26:46 +0000 (11:26 +0800)]
ENGR00274386-1 ASoC: imx-wm8962: Fix 192KHz playback slow issue

We are using auto sample rate feature of WM8962, whereas it doesn't
support those sample rates bigger than 96KHz, 192Khz for example,
so 384 * samplerate would be too big for it to handle. When playing
192KHz 24bit wav file, the playback would be slower than normal.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <b42378@freescale.com>
10 years agoENGR00274761-3 Upgrade VPU driver for Linux 3.10 kernel
Hongzhang Yang [Mon, 12 Aug 2013 07:38:07 +0000 (15:38 +0800)]
ENGR00274761-3 Upgrade VPU driver for Linux 3.10 kernel

Modify mxc_vpu.c to adapt to kernel 3.10 change
- Remove all references to header files in mach folder
- Include linux/clk.h instead of mach/clock.h
- Call device_reset instead of imx_src_reset_vpu
- Dummy PU and PM api callings before they are ready
- Dummy cpu_is_mx5? api callings
- Remove VM_RESERVED flags
- Call gen_pool instead of iram_alloc

Modify mxc_vpu.h
- Change CONFIG_ARCH_MX6 to CONFIG_SOC_IMX6Q

Modify Kconfig:
- Change ARCH_MX? to SOC_IMX?, remove ARCH_MX3/ARCH_MX37
  because for MX3 series only SOC_IMX31 and SOC_IMX35 are
  defined in Linux 3.10, and these chips don't have VPU.
  Need to add SOC_IMX37 to VPU Kconfig if MX37 could be
  supported later.

Add VPU to config and build path
- mxc/Kconfig
- mxc/Makefile

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
10 years agoENGR00274761-2 Upgrade VPU driver for Linux 3.10 kernel
Hongzhang Yang [Mon, 12 Aug 2013 07:23:41 +0000 (15:23 +0800)]
ENGR00274761-2 Upgrade VPU driver for Linux 3.10 kernel

Add VPU node in dtsi
- Add VPU node (common part) in imx6qdl.dtsi. It was defined
  in imx6.dtsi in Linux 3.5.7.
- Add "iram" property for gen_pool api callings
- Add "resets" property for device_reset api calling
- Add VPU node (soc specific part) in imx6q.dtsi and imx6dl.dtsi

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
10 years agoENGR00274761-1 Upgrade VPU driver for Linux 3.10 kernel
Hongzhang Yang [Mon, 12 Aug 2013 07:14:23 +0000 (15:14 +0800)]
ENGR00274761-1 Upgrade VPU driver for Linux 3.10 kernel

Pick files from origin/imx_3.5.7 commit 135bf02a0727ea5ce96
- mxc_vpu.h is picked from arch/arm/plat-mxc/include/mach/
  and put to include/linux/
- drivers/mxc/vpu/Kconfig
- drivers/mxc/vpu/Makefile
- drivers/mxc/vpu/mxc_vpu.c

Signed-off-by: Hongzhang Yang <Hongzhang.Yang@freescale.com>
10 years agoENGR00274768-2 ARM: imx: Use irq #32 for cpuidle instead of irq #125
Anson Huang [Mon, 12 Aug 2013 21:17:57 +0000 (17:17 -0400)]
ENGR00274768-2 ARM: imx: Use irq #32 for cpuidle instead of irq #125

IRQ #125's status is not constant on different boards, IRQ #32 is
IOMUXC's interrupt which can be triggered manually at anytime, use
this irq instead of #125 to generate interrupt for avoiding CCM enter
low power mode by mistake.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274768-1 ARM: imx6q: update gint bit definitions of IOMUXC_GPR1
Anson Huang [Mon, 12 Aug 2013 21:13:52 +0000 (17:13 -0400)]
ENGR00274768-1 ARM: imx6q: update gint bit definitions of IOMUXC_GPR1

Need to use IOMUXC_GPR1_GINT bit for cpuidle driver, so update this
bit's definitions.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00269945: ARM: imx6sl: initialize use count of IPG clock
Shawn Guo [Tue, 13 Aug 2013 01:16:52 +0000 (09:16 +0800)]
ENGR00269945: ARM: imx6sl: initialize use count of IPG clock

We're running into a system hang during imx6sl boot.  It's been tracked
down to SDMA driver function sdma_init().  System hangs immediately
after the clk_disable() is called in sdma_init().

It turns out that the issue is caused by IPG bus clock which is the
parent of sdma clock is turned off accidentally due to the incorrect
initial use count.  IPG clock is initial on and should be always on
when system operates.  But the use count of the clock is zero initially.
So when the last child clock gets disabled, the use count of IPG clock
reaches zero, and thus clock framework will turn off IPG clock (and
possibly parent clocks along the way), and causes the system hang.

Let's initialize the use count of IPG clock by calling
clk_prepare_enable() on it to match the on state of the clock, so that
the clock will not be turned off accidentally.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoENGR00269945: ARM: dts: imx6sl reuses imx6q sdma firmware
Shawn Guo [Tue, 13 Aug 2013 00:55:02 +0000 (08:55 +0800)]
ENGR00269945: ARM: dts: imx6sl reuses imx6q sdma firmware

There is no imx6sl specific sdma firmware.  Instead, imx6sl reuses
imx6q sdma firmware.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
10 years agoENGR00274821 ARM: Add i.MX6 FB properties to dts for SabreAuto board
Sandor Yu [Mon, 12 Aug 2013 10:51:52 +0000 (18:51 +0800)]
ENGR00274821 ARM: Add i.MX6 FB properties to dts for SabreAuto board

- Add Framebuffer and ldb properties to dts for i.MX6Q and
i.MX6DL SabreAuto board.
- Add PWM3 and backlight properties to dts for i.MX6Q and
i.Mx6DL SabreAuto board.
- fix i2c2 indent in dts.

Signed-off-by: Sandor Yu <R01008@freescale.com>
10 years agoENGR00274470 egalax: imx_v6_v7_defconfig: enable egalax touchscreen support
Luwei [Mon, 12 Aug 2013 07:25:47 +0000 (15:25 +0800)]
ENGR00274470 egalax: imx_v6_v7_defconfig: enable egalax touchscreen support

Enable egalax touchscreen support in imx_v6_v7_defconfig.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00274247: touch: add egalax touch driver support on i.MX6Q/DL AUTO/SD
Luwei [Thu, 8 Aug 2013 08:35:24 +0000 (16:35 +0800)]
ENGR00274247: touch: add egalax touch driver support on i.MX6Q/DL AUTO/SD

Copy the egalax touch screen driver from linux3.5.7.Make some
modification.Remove the __devinit __devexit __devexit_p out
of the file, because 3.10 does not support.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00274749 ARM: imx6q: Improve lvds cabc gpio request logic
Liu Ying [Mon, 12 Aug 2013 04:57:25 +0000 (12:57 +0800)]
ENGR00274749 ARM: imx6q: Improve lvds cabc gpio request logic

This patch removes the unnecessary gpio_set_value() and
gpio_free() function calls after request the gpios with
gpio_requestion_one() successfully. Also, this patch adds
a warning message if the request fails.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00264465-3 arm: imx6qdl:Disable Hannstar LVDS panel CABC
Liu Ying [Tue, 28 May 2013 05:49:06 +0000 (13:49 +0800)]
ENGR00264465-3 arm: imx6qdl:Disable Hannstar LVDS panel CABC

Hannstar LVDS panel CABC function turns backlight density
automatically according to display content. This may introduce
annoying unstable backlight when display content changes.
So, this patch disables the CABC function if a platform's of
device tree provides controlling gpios in lvds_cabc_ctrl node.

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

10 years agoENGR00264465-2 arm: dts: imx6qdl-sabresd:Add lvds_cabc_ctrl node
Liu Ying [Tue, 28 May 2013 05:45:18 +0000 (13:45 +0800)]
ENGR00264465-2 arm: dts: imx6qdl-sabresd:Add lvds_cabc_ctrl node

This patch adds lvds_cabc_ctrl node in imx6qdl-sabresd.dtsi file.
This node contains two gpio entries for the Hannstar LVDS panel
CABC control function on LVDS0 and LVDS1 interfaces.

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

10 years agoENGR00264465-1 arm: dts: imx6qdl-sabresd:Add LVDS CABC pinmux
Liu Ying [Tue, 28 May 2013 05:38:20 +0000 (13:38 +0800)]
ENGR00264465-1 arm: dts: imx6qdl-sabresd:Add LVDS CABC pinmux

This patch adds pinmux entries for LVDS0 and LVDS1 to control the
Hannstar LVDS panel CABC function. Pin NANDF_CS2 and pin NANDF_CS3
are configured to be gpio so that they can control the CABC function.

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

10 years agoENGR00274056-4 mxc: gpu-viv: add gpu freq throttle
Anson Huang [Thu, 8 Aug 2013 18:11:30 +0000 (14:11 -0400)]
ENGR00274056-4 mxc: gpu-viv: add gpu freq throttle

add gpu freq throttle to protect SOC, when temperature
is too high, lower gpu freq to 4/64, and gpu freq will
restore when SOC cool down.

Acked-by: Jason Liu
Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274056-3 thermal: imx: binding device cooling to thermal
Anson Huang [Thu, 8 Aug 2013 17:57:23 +0000 (13:57 -0400)]
ENGR00274056-3 thermal: imx: binding device cooling to thermal

1. imx thermal depends on device cooling config, as only cpu
cooling is not enough for cooling down SOC;

2. binding device cooling to imx thermal driver.

3. add temperature buffer for passive trip, which means when
temperature cross passive trip, cooling devices will be triggered,
but only when temperature drop to more than the number we defined(10 C)
lower than passive trip, cooling devices will be canceled. this
is to avoid triggering/canceling cooling device back and forth when
temperature is around passive trip.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274056-2 ARM: imx: add device cooling by default
Anson Huang [Thu, 8 Aug 2013 17:40:09 +0000 (13:40 -0400)]
ENGR00274056-2 ARM: imx: add device cooling by default

Enable device cooling by default.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274056-1 thermal: add device cooling for thermal driver
Anson Huang [Thu, 8 Aug 2013 17:20:40 +0000 (13:20 -0400)]
ENGR00274056-1 thermal: add device cooling for thermal driver

cpu cooling is not enough when temperature is
too hot, as some devices may contribute a lot of heat
to SOC, such as GPU, so we need to add device cooling
as well, when system is too hot, devices can also take
their actions to lower SOC temperature.

when temperature cross the passive trip, device cooling
driver will send out notification, those devices who
register this devfreq_cooling notification will take
actions to lower SOC temperature.

Signed-off-by: Anson Huang <b20788@freescale.com>
10 years agoENGR00274286-4 arm: imx_v6_v7_defconfig: Enable asrc by default
Nicolin Chen [Wed, 7 Aug 2013 10:06:47 +0000 (18:06 +0800)]
ENGR00274286-4 arm: imx_v6_v7_defconfig: Enable asrc by default

Build-in ASRC.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
10 years agoENGR00274286-3 arm: dts: imx6qdl: Add asrc support
Nicolin Chen [Wed, 7 Aug 2013 08:28:55 +0000 (16:28 +0800)]
ENGR00274286-3 arm: dts: imx6qdl: Add asrc support

Complete required DT bindings.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
10 years agoENGR00274286-2 mxc: asrc: Add asrc m2m driver
Nicolin Chen [Wed, 7 Aug 2013 08:28:35 +0000 (16:28 +0800)]
ENGR00274286-2 mxc: asrc: Add asrc m2m driver

Add ASRC M2M driver.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
10 years agoENGR00274286-1 dma: imx-sdma: Use correct sdma script for asrc
Nicolin Chen [Wed, 7 Aug 2013 08:27:43 +0000 (16:27 +0800)]
ENGR00274286-1 dma: imx-sdma: Use correct sdma script for asrc

Use correct sdma script for ASRC.

Signed-off-by: Nicolin Chen <b42378@freescale.com>
10 years agoENGR00274215: dts: imx6: add egalax support on i.MX6Q/DL AUTO/SD
Luwei [Thu, 8 Aug 2013 03:07:10 +0000 (11:07 +0800)]
ENGR00274215: dts: imx6: add egalax support on i.MX6Q/DL AUTO/SD

Add egalax touchscreen devicetree support on i.MX6Q/DL sabre-auto/sd platform.

Signed-off-by: Luwei Zhou <b45643@freescale.com>
10 years agoENGR00273425 ARM: imx: enable suspend code for imx6q/dl
Robin Gong [Mon, 5 Aug 2013 09:40:02 +0000 (17:40 +0800)]
ENGR00273425 ARM: imx: enable suspend code for imx6q/dl

Enable DSM code for imx6, the code porting form kernel 3.5.7.So with the patch,
we can suspend imx6q, imx6dl from iram to decrease power number of DDR IO:
save ~15mA@1.5V on imx6qsabresd, but need more ~30us in suspend and resume back.

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00273974-3 ARM: imx_v6_v7_defconfig: enable mxc vout driver
Liu Ying [Mon, 5 Aug 2013 07:48:24 +0000 (15:48 +0800)]
ENGR00273974-3 ARM: imx_v6_v7_defconfig: enable mxc vout driver

Enable the mxc v4l2 output driver.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00273974-2 ARM: dts: imx6qdl-sabresd: enable mxc vout
Liu Ying [Mon, 5 Aug 2013 07:48:11 +0000 (15:48 +0800)]
ENGR00273974-2 ARM: dts: imx6qdl-sabresd: enable mxc vout

Enable the mxc vout for imx6q{dl}-sabresd boards.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00273974-1 media: port mxc vout driver from 3.5.7 to 3.10
Liu Ying [Mon, 5 Aug 2013 07:47:22 +0000 (15:47 +0800)]
ENGR00273974-1 media: port mxc vout driver from 3.5.7 to 3.10

This is porting mxc vout driver from imx_3.5.7 kernel to
imx_3.10 kernel.

* Put the driver in drivers/media/platform/ directory instead
  of drivers/media/video/ directory, since the later one is
  renamed to the former one in 3.10 kernel.
* Change the ipu-v3.h header file from <mach/ipu-v3.h> to
  <linux/ipu-v3.h>.
* Change the mxc_vidioc_s_crop() function's implementation since
  the definition of the vidioc_s_crop() function is modified to
  make the last argument be constant.
* Set vfl_dir to be VFL_DIR_TX since the ioctrl validity checks
  are improved in 3.10 kernel.
* Remove 'defaut y' setting for VIDEO_MXC_OUTPUT and
  VIDEO_MXC_IPU_OUTPUT Kconfigs. They may be configured by kernel
  default configure or by user.
* Make VIDEO_MXC_OUTPUT Kconfig depend on FB_MXC Kconfig since
  we need framebuffers to be rendered.
* Make VIDEO_MXC_IPU_OUTPUT Kconfig be tristate.
* Split <linux/mxc_v4l2.h> header file up into include/linux/
  and include/uapi/linux/ directories so that the userspace may
  include the mxc_v4l2.h header file.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00273854 mxcfb: header file split up
Liu Ying [Mon, 5 Aug 2013 07:41:46 +0000 (15:41 +0800)]
ENGR00273854 mxcfb: header file split up

This patch splits mxcfb header file up to
include/linux/ directory and include/uapi/linux/
directory so that the userspace may include
the mxcfb header file. This patch also fixes some
annotations and macros about the header file's
naming.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00273852 ipu: header file split up
Liu Ying [Mon, 5 Aug 2013 07:33:49 +0000 (15:33 +0800)]
ENGR00273852 ipu: header file split up

This patch splits ipu header file up to
include/linux/ directory and include/uapi/linux/
directory so that the userspace may include
the ipu header file. This patch also fixes some
annotations and macros about the header file's
naming.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
10 years agoENGR00273972-2 ARM:dts:imx6qdl-sabresd:Add pfuze100 support on Sabresd board
Robin Gong [Tue, 6 Aug 2013 04:31:15 +0000 (12:31 +0800)]
ENGR00273972-2 ARM:dts:imx6qdl-sabresd:Add pfuze100 support on Sabresd board

Add pfuze100 regulator device node in imx6qdl-sabresd.dtsi.

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00273972-1 ARM:imx:enable pfuze100 regulator driver support
Robin Gong [Tue, 6 Aug 2013 04:28:16 +0000 (12:28 +0800)]
ENGR00273972-1 ARM:imx:enable pfuze100 regulator driver support

Enable pufze100 regulator driver built in imx_v6_v7_defconfig

Signed-off-by: Robin Gong <b38343@freescale.com>
10 years agoENGR00274035 UAPI: split the header file linux/pxp_dma.h
Robby Cai [Wed, 31 Jul 2013 02:31:17 +0000 (10:31 +0800)]
ENGR00274035 UAPI: split the header file linux/pxp_dma.h

Move the user-space part in include/linux/pxp_dma.h into
include/uapi/linux/pxp_dma.h due to the UAPI introduced.

Signed-off-by: Robby Cai <R63905@freescale.com>
10 years agoENGR00263553 fb: Change type uint to unsigned int in struct mxcfb_update_data
Robby Cai [Wed, 10 Jul 2013 12:46:47 +0000 (20:46 +0800)]
ENGR00263553 fb: Change type uint to unsigned int in struct mxcfb_update_data

uint is not quite standard type, changed to unsigned int to avoid
to include specific header file. This is requested from mm team.

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

10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>