]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoENGR00214319: CAAM: Remove CAAM configs from mx6s defconfig
Terry Lv [Wed, 20 Jun 2012 02:24:50 +0000 (10:24 +0800)]
ENGR00214319: CAAM: Remove CAAM configs from mx6s defconfig

As MX6SL has replaced CAAM with DCP+RNGB, CAAM configs need to be
removed from mx6s defconfig.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00213726: CAAM: Amend crypto API configuration for caam operation
Terry Lv [Fri, 15 Jun 2012 04:38:11 +0000 (12:38 +0800)]
ENGR00213726: CAAM: Amend crypto API configuration for caam operation

Previous configuration suppressed a number of crypto API features that
caused misleading results when using the CAAM driver through the tcrypt.
Enabling the API tests eliminated this.

Also, added in other common ciphers and modes that, if lacking, would
cause confusion with tcrypt behavior.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00214199 [MX6]Need to lower ipg_perclk to 6M before init GPT
Anson Huang [Tue, 19 Jun 2012 10:23:10 +0000 (18:23 +0800)]
ENGR00214199 [MX6]Need to lower ipg_perclk to 6M before init GPT

As Arik TO1.0 GPT use ipg_perclk as clock source, we need to
lower it to 6M before init GPT, or the clock source freq will
be wrong if we lower the ipg_perclk after GPT time already init.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00213903 [MX6]Improve periph parent change flow
Anson Huang [Mon, 18 Jun 2012 02:58:22 +0000 (10:58 +0800)]
ENGR00213903 [MX6]Improve periph parent change flow

When bus freq is changed, we need to update periph
clk's parent, better to use clk_set_parent API instead
of changing the parent directly.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00213722:MX6 SABRESD battery:add voltage offset sysfs
Rong Dian [Fri, 15 Jun 2012 04:33:58 +0000 (12:33 +0800)]
ENGR00213722:MX6 SABRESD battery:add voltage offset sysfs

interface and modify driver

1.add battery sample voltage offset sysfs interface.
2.add usb charger powersupply from max8903 UOK.
3.modify battery max coulomb data to 99% in charger full stage and
  modify battery max coulomb data to 100% in discharger stage,because
  hardware cannot support battery internal resistance and coulomb
  calculation.Battery voltage and coulomb may increase a bit in charger
  stage,so keep max coulomb data 99% in charger full stage.

Signed-off-by: Rong Dian <b38775@freescale.com>
11 years agoENGR00213997: Fix Section Mismatch warning
Robby Cai [Mon, 18 Jun 2012 11:46:41 +0000 (19:46 +0800)]
ENGR00213997: Fix Section Mismatch warning

Fix:
WARNING: vmlinux.o(.data+0x8c28): Section mismatch in reference from the
variable mx6_gpmi_nand_platform_data to the function
.init.text:gpmi_nand_platform_init()
The variable mx6_gpmi_nand_platform_data references
the function __init gpmi_nand_platform_init()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00213751: imx6sl: Add ELAN touchscreen support on EINK-DC3 board
Robby Cai [Mon, 18 Jun 2012 05:14:08 +0000 (13:14 +0800)]
ENGR00213751: imx6sl: Add ELAN touchscreen support on EINK-DC3 board

Add ELAN capacitive TS support on EINK-DC3 stacked on MX6SL_ARM2 board
- configure the iomux setting (need 4.7K Ohm pull up on 'touch_int_b')
- configure the i2c slave addr
- configure the GPIO setting for ELAN ce/int/rst
- update the defconfig

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00213749: imx6sl: Add keypad support on EINK-DC3 board
Robby Cai [Tue, 12 Jun 2012 10:24:54 +0000 (18:24 +0800)]
ENGR00213749: imx6sl: Add keypad support on EINK-DC3 board

Add the support for keypad on EINK-DC3 board which is stacked on ARM2 board.
- configure the iomux setting
- add dummy kpp clock to fool imx_keypad driver
- add platform device for keypad
- add key mapping (4x4 array) used on EINK-DC3
- update the defconfig for keypad driver

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00212318 ASRC:update to in/out width config
Chen Liangjun [Mon, 11 Jun 2012 07:08:18 +0000 (15:08 +0800)]
ENGR00212318 ASRC:update to in/out width config

The origin ASRC driver did not support input and output wordwidth
config but an total wordwidth config instead. And the input wordwith
and output wordwidth are all fixed to 24 bit.

In this path, we do things below:

1 Update to use input wordwidth and output wordwidth config seperately
 instead of an total wordwidth config.
2 Set corresponding DMA(input/output) buswidth according ASRC's input
and output wordwidth config.
3 Support 16/24 bit input wordwidth and 24 bit output wordwidth.

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00213684 MX6DL: emmc: mx6dl needs more iomux strength to emmc.
Zhang Jiejing [Thu, 14 Jun 2012 14:20:03 +0000 (22:20 +0800)]
ENGR00213684 MX6DL: emmc: mx6dl needs more iomux strength to emmc.

this patch add more iomux strength to mx6dl's emmc.

otherwise, -110 error when access emmc will occures.
current test show this patch can improve on this issue.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
11 years agoENGR00212720 [MX6]Adjust CPU 672M setpoint voltage
Anson Huang [Thu, 14 Jun 2012 10:07:30 +0000 (18:07 +0800)]
ENGR00212720 [MX6]Adjust CPU 672M setpoint voltage

Previous voltage for 672M is 1.05V, normal test is OK,
but if CPU is busy in background and do the CPUFreq change
as well, always fail the stress test at 672M setpoint, after
increase it to 1.1V, stress test is OK.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00213514 HDMI: adjust hotplugin sequency
Sandor Yu [Thu, 14 Jun 2012 02:05:47 +0000 (10:05 +0800)]
ENGR00213514 HDMI: adjust hotplugin sequency

Not update FB var if video mode same as last HDMI cable plugout.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00162848 ov5642: Fix QVGA take photo very dark
Yuxi Sun [Fri, 15 Jun 2012 03:30:09 +0000 (11:30 +0800)]
ENGR00162848 ov5642: Fix QVGA take photo very dark

Using small setting when switch from VGA to QVGA to take picture

Signed-off-by: Yuxi Sun <b36102@freescale.com>
11 years agoENGR00213616 wm8962: set default volume for playback and record
Gary Zhang [Thu, 14 Jun 2012 09:46:24 +0000 (17:46 +0800)]
ENGR00213616 wm8962: set default volume for playback and record

set default volume for playback and record

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00213158-4 IPU: remove in_interrupt() check in _ipu_get/_ipu_put
Wayne Zou [Tue, 12 Jun 2012 07:02:42 +0000 (15:02 +0800)]
ENGR00213158-4 IPU: remove in_interrupt() check in _ipu_get/_ipu_put

Remove in_interrupt() check in _ipu_get/_ipu_put, since clk_enable and
clk_disable should not happen in interrupt context.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00213158-3 FB: Clean up fb interrupt handler
Wayne Zou [Tue, 12 Jun 2012 06:52:21 +0000 (14:52 +0800)]
ENGR00213158-3 FB: Clean up fb interrupt handler

Clean up the fb driver for maintainability:
1. Use completion instead of semaphore API interface.
2. Use IPU oneshot interrupt mode and remove ipu_disable_irq()
   function call in interrupt handler.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00213158-2 IPU: Add IPU oneshot interrupt mode
Wayne Zou [Tue, 12 Jun 2012 06:45:52 +0000 (14:45 +0800)]
ENGR00213158-2 IPU: Add IPU oneshot interrupt mode

Add IPU oneshot interrupt mode: IPU_IRQF_ONESHOT.
Interrupt is not reenabled after irq handler finished.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00213158-1 IPU: Add IPU oneshot interrupt mode
Wayne Zou [Tue, 12 Jun 2012 06:37:40 +0000 (14:37 +0800)]
ENGR00213158-1 IPU: Add IPU oneshot interrupt mode

Add IPU oneshot interrupt mode: IPU_IRQF_ONESHOT.
Interrupt is not reenabled after irq handler finished.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00161873 ov5642: Fix actual VGA 15fps can reach 30fps
Yuxi Sun [Wed, 13 Jun 2012 09:59:50 +0000 (17:59 +0800)]
ENGR00161873 ov5642: Fix actual VGA 15fps can reach 30fps

Delete VGA_2_VGA workflow and using 15fps VGA setting when set
this mode.

Add XGA@15fps, XGA@30fps setting.

Signed-off-by: Yuxi Sun <b36102@freescale.com>
11 years agoENGR00213170-2 [MX6SL] Enable GPU driver
Larry Li [Tue, 12 Jun 2012 09:11:45 +0000 (17:11 +0800)]
ENGR00213170-2 [MX6SL] Enable GPU driver

Use allocated GPU resource to enable GPU.
Memroy address on imx6sl board starts from 0x80000000
and GC320 can access [baseAddress, baseAddress + 2G) only without MMU.
So to make GC320 work, baseAddres must be set to 0x80000000, and all
address sent to GC320 must be a offset to baseAddress. GC355 doesn't
need this baseAddress, that means it needs a real physcial adress,
rather than the offset to baseAddress.
Original code always change phsysical address to 'offset' before use it,
no matter it is used by GC355 or GC320, so only one of them can work.
Solution is to move address adjustion to arch specific part. So each
core can get what it wants.

Signed-off-by: Larry Li <b20787@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00213170-1 [MX6SL] Add resource needed by GPU
Larry Li [Tue, 12 Jun 2012 09:08:17 +0000 (17:08 +0800)]
ENGR00213170-1 [MX6SL] Add resource needed by GPU

Prepare resourec such as memory, interrupt, clock, regester address
needed by GPU.

Signed-off-by: Larry Li <b20787@freescale.com>
11 years agoENGR00213518 V4L2 output: stop at last frame when video playback on DP-BG
Wayne Zou [Tue, 12 Jun 2012 05:50:09 +0000 (13:50 +0800)]
ENGR00213518 V4L2 output: stop at last frame when video playback on DP-BG

Stop at last frame when video playback on IPU DP-BG channel

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00212581 V4L2 output: Re-organize tiled format output driver
Wayne Zou [Tue, 5 Jun 2012 05:58:34 +0000 (13:58 +0800)]
ENGR00212581 V4L2 output: Re-organize tiled format output driver

Re-organize v4l2 output driver for tiled format as tiled_bypass_pp mode

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00180919 [MX6]Update clock tree if BUS freq is changed
Anson Huang [Wed, 13 Jun 2012 12:20:01 +0000 (20:20 +0800)]
ENGR00180919 [MX6]Update clock tree if BUS freq is changed

As DDR freq change is by modifying CCM register directly,
we need to update the clock tree as well, or the clock
tree will be broken. Also, we need to make sure the clock
rate counting is right.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00213336 sabresd pfuze: support 1.2G by param which pass by u-boot
Robin Gong [Wed, 13 Jun 2012 06:44:00 +0000 (14:44 +0800)]
ENGR00213336 sabresd pfuze: support 1.2G by param which pass by u-boot

There is no fuse data for distinguish 1.2G or 1G, kernel need support passed
param from u-boot that can know 1.2G or 1G. If 1.2G, will configure VDDSOC_IN
&VDDARM_IN to 1.425V by pfuze  and VDDSOC&VDDPU to 1.25V by internal ldo

Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00163374 ESAI: ESAI driver does not support mono playback
Lionel Xu [Wed, 13 Jun 2012 06:00:07 +0000 (14:00 +0800)]
ENGR00163374 ESAI: ESAI driver does not support mono playback

To remove mono playback support for ESAI.

Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
11 years agoENGR00180937 IPU: Change IPU error message to IPU warning
Sandor Yu [Wed, 13 Jun 2012 11:18:43 +0000 (19:18 +0800)]
ENGR00180937 IPU: Change IPU error message to IPU warning

IPU driver will print unexpect interrupt state in ipu_irq_handler function,
It is for IPU debug and state check, not a IPU error.
So change print function from dev_error to dev_warn.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00171743 ov5640_mipi Add XGA mode support
Yuxi Sun [Wed, 13 Jun 2012 08:47:11 +0000 (16:47 +0800)]
ENGR00171743 ov5640_mipi Add XGA mode support

Add XGA@15fps and XGA@30fps setting

Signed-off-by: Yuxi Sun <b36102@freescale.com>
11 years agoENGR00213148 ov5642: Add 720p@15fps mode
Yuxi Sun [Tue, 12 Jun 2012 05:48:19 +0000 (13:48 +0800)]
ENGR00213148 ov5642: Add 720p@15fps mode

Add 1280X720 15fps setting

Signed-off-by: Yuxi Sun <b36102@freescale.com>
11 years agoENGR00212838 FB display lose xoffset/yoffset after HDMI plugout/in
Sandor Yu [Wed, 13 Jun 2012 02:39:55 +0000 (10:39 +0800)]
ENGR00212838 FB display lose xoffset/yoffset after HDMI plugout/in

Save overlay offset before DP disable and restore it after DP enable.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00213179 Mx6x,Fix HDMI build warining
Sandor Yu [Tue, 12 Jun 2012 10:21:27 +0000 (18:21 +0800)]
ENGR00213179 Mx6x,Fix HDMI build warining

Fix HDMI build warining

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00180930 [MX6]Fix low bus mode bug when there is no CPUFreq change
Anson Huang [Tue, 12 Jun 2012 10:50:42 +0000 (18:50 +0800)]
ENGR00180930 [MX6]Fix low bus mode bug when there is no CPUFreq change

If the CPUFreq change is done before enabling low bus freq driver,
the bus freq will be staying at high freq until there is new request
of entering low bus freq. So we need to put the bus freq into low
point if all the conditions are met when we enable bus freq.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR000212647 MX6 - Fix IPU and AXI default clock frequency
Ranjani Vaidyanathan [Thu, 7 Jun 2012 05:16:06 +0000 (00:16 -0500)]
ENGR000212647 MX6 - Fix IPU and AXI default clock frequency

The max freq for IPU and AXI clocks is 264MHz. Hence source
IPU from mmdc_ch0 clock on MX6 to get maximum frequency.
And source AXI from periph_clk on for max freq.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00212992 usb: fix potential bug with fast plug in/out with usb charger
Peter Chen [Mon, 11 Jun 2012 06:31:20 +0000 (14:31 +0800)]
ENGR00212992 usb: fix potential bug with fast plug in/out with usb charger

- Move imx_usb_vbus_disconnect to work queue, and wait or cancel
charger detect worker when vbus is disconnected if charger detect
worker still hasn't finished.
- Move pull down dp from imx_usb_vbus_disconnect to udc vbus
disconnect interrupt handler, the reason is udc->gadget.speed should
to be updated at that ISR.
- Select POWER_SUPPLY if USB_GADGET_ARC is configured to fix the build
error for manufacture tools firmware's build.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00212232-02 USB:fix otg can not work without phy power if VBUS removed
make shi [Mon, 4 Jun 2012 08:28:33 +0000 (16:28 +0800)]
ENGR00212232-02 USB:fix otg can not work without phy power if VBUS removed

- There is no VBUS supply or not supply for USBPHY power 3p0,the USB mouse
  enumeration fail during the board booting with a USB mouse connected to
  otg port.During system booting ,some error message appear like below :
  "usb 1-1: device not accepting address 5, error -71
  hub 1-0:1.0: unable to enumerate USB device on port 1"
  The otg phy power is needed during normal USB transmitting ,the otg phy
  power should be on  before calling the usb_add_hcd. So should make sure
  usb_add_hcd is called after otg_set_host is called in usb_hcd_fsl_probe().
- Before switch the otg mode form Host mode to Device mode,we must call
  dr_discharge_line() to make sure no abnormal usb wakeup interrupt happen.
- Some user case ,the BM_USBPHY_CTRL_ENHOSTDISCONDETECT bit is cleared by
  mistake. For example,the otg port connect a extern USB hub and a USB device
  connected to the USB hub.Unplug the USB device,the Hub will enter auto suspend
  mode,then plug in the device, hub will auto resume by the device plug in ,the
  BM_USBPHY_CTRL_ENHOSTDISCONDETECT bit is cleared by mistake.So the function
  platform_set_disconnect_det() should be called after usb_disconnect.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00212232-01 USB:fix otg can not work without phy power if VBUS removed
make shi [Mon, 4 Jun 2012 08:24:01 +0000 (16:24 +0800)]
ENGR00212232-01 USB:fix otg can not work without phy power if VBUS removed

According to ticket TKT094250 :There is no VBUS supply or not supply for USB
PHY power 3p0,USB dp/dm is floating when there is no connection in device mode:
S/W can run the following flow to ensure the internal DP/DM linestate does not
change. These should be done before set SUSP/PHCD bit after detecting the VBUS
change from high to low.
clear HW_USBPHY_DEBUG_CLKGATE
loopback_utmi_dig_tst1 = 1
loopback_utmi_dig_tst0 = 0
loopback_tsti_tx_en = 1
loopback_tsti_tx_hiz = 0
loopback_tsti_tx_hs_mode = 0;

After detecting the VBUS or ID change (connected to a host or device), SW do:
set HW_USBPHY_DEBUG_CLKGATE back to 1
clear the loopback_XXXX signals above back to 0

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00212818: mx6sl: Add SPI NOR flash support
Robby Cai [Fri, 8 Jun 2012 06:48:15 +0000 (14:48 +0800)]
ENGR00212818: mx6sl: Add SPI NOR flash support

only set board-specific data and re-use the existing SPI-NOR
flash driver.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00212322-4 mx6: Add usb charger support at defconfig
Peter Chen [Thu, 7 Jun 2012 05:20:10 +0000 (13:20 +0800)]
ENGR00212322-4 mx6: Add usb charger support at defconfig

Add usb charger support for i.mx6

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00212322-3 usb: add one platform data entry to store anatop base address
Peter Chen [Tue, 5 Jun 2012 03:23:14 +0000 (11:23 +0800)]
ENGR00212322-3 usb: add one platform data entry to store anatop base address

It is used to usb charger detect, the charger detection process need
to access anatop register.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00212322-2 usb: store anatop base address at udc's platform data
Peter Chen [Tue, 5 Jun 2012 03:20:10 +0000 (11:20 +0800)]
ENGR00212322-2 usb: store anatop base address at udc's platform data

Store anatop base address at udc's platform data for i.mx6x

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00212322-1: usb: add usb charger support for i.mx6x
Peter Chen [Tue, 5 Jun 2012 03:08:29 +0000 (11:08 +0800)]
ENGR00212322-1: usb: add usb charger support for i.mx6x

- USB charger function is embedded in usb device driver, and only for i.mx6x
- SDP and DCP charger are tested
- Need to enable usb device function (insmod one gadget driver)
to use usb charger detect function
- The power supply interface for usb charger is:
/sys/class/power_supply/imx_usb_charger/
Some useful entries for power supply interface:
- present: whether usb charger is present or not
- type: usb charger type
- current_max: the max charger current for this charger
- online: whether vbus is on or not

Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 years agoENGR00178617 MX6x HDMI hotplug,video discontinuously after do a hotplug
Sandor Yu [Fri, 8 Jun 2012 05:37:17 +0000 (13:37 +0800)]
ENGR00178617 MX6x HDMI hotplug,video discontinuously after do a hotplug

The issue only in play video on DP FG, no such issue on DP BG.
HDMI drvier will call fb_set_var to config framebuffer after HDMI cable plugin.
In Frame buffer driver, the DP FG and BG register as different fb.
The function fb_set_var only update one fb.
As IPU DP module, if DP BG is re-enabled, the FG should reconfig again.
So after HDMI plugin, only BG fb is update, FG fb will work incorrect,
no end of frame interrupt trigger, and print
"mxc_sdc_fb mxc_sdc_fb.0: timeout when waiting for flip irq"
to display.

Change code in function fb_set_var, FG fb will reconfig with DP BG fb.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00212805 [MX6SL]Add thermal driver device.
Anson Huang [Fri, 8 Jun 2012 06:20:36 +0000 (14:20 +0800)]
ENGR00212805 [MX6SL]Add thermal driver device.

Add thermal driver device to support thermal driver interface,
but as this driver is dependent on OCOTP driver and need a
calibrated part, so the temp read from the thermal sysfs
interface maybe inaccurate on those uncalibrated parts.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00212685: MAX8903: fix battery charger driver status bug.
Rong Dian [Thu, 7 Jun 2012 09:36:04 +0000 (17:36 +0800)]
ENGR00212685: MAX8903: fix battery charger driver status bug.

Fix battery charger status bug when battery is in the charge full state.

Signed-off-by: Rong Dian <b38775@freescale.com>
11 years agoENGR00212529 MX6x show video to fb0 when bootup, the color space incorrect.
Sandor Yu [Wed, 6 Jun 2012 08:39:35 +0000 (16:39 +0800)]
ENGR00212529 MX6x show video to fb0 when bootup, the color space incorrect.

DP CSC setting not update because incorrect DP sync flow SRM Mode.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00180390 ESAI: add amixer ASRC p2p API(ALSALIB)
Chen Liangjun [Tue, 5 Jun 2012 08:47:26 +0000 (16:47 +0800)]
ENGR00180390 ESAI: add amixer ASRC p2p API(ALSALIB)

If we want to use ESAI call ASRC, we need to know the input sample
rate as well as the output sample rate. however, cause of ALSA-LIB,
the input sample rate pass down to ALSA-DRIVER is not accurate. For
example, if the ALSA-DRIVER only support 48KHz playback and we want
to play an 16KHz audio file, the sample rate params the ALSA DRIVER
see is 48KHz but not 16KHz. So, the ALSA-DRIVER do not know the
original sample rate, and thus unable to config ASRC properly.

In this patch, we add an amixer control interface for alsa lib plugin to
config the input sample rate before playback. If no plugin, user
can call the amixer control interface to manually use ASRC for rate
convert.

For example, if we need to playback an 24bit_24K audio wav file without
call the plug. The sound card is 0.
1 Get the ASRC capability: amixer sget "ASRC"
1 Set the input samplerate: amixer sset "ASRC" "24KHz"
2 Play; aplay -Dhw:0 audio_24k24S-S24_LE.wav

Signed-off-by: Chen Liangjun <b36089@freescale.com>
11 years agoENGR00212542 SPDIF: move clock operation
Gary Zhang [Wed, 6 Jun 2012 08:22:26 +0000 (16:22 +0800)]
ENGR00212542 SPDIF: move clock operation

Now clock operation occurs in mxc_spdif_trigger(), and
because clock operation is forbidden to exist in interrupt
context, move disabling clock operation to mxc_spdif_shutdown()

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00212489-1 viv_GPU: add reserved memory account handler.
Zhang Jiejing [Wed, 6 Jun 2012 02:07:21 +0000 (10:07 +0800)]
ENGR00212489-1 viv_GPU: add reserved memory account handler.

the original low memory killer only take care of system memory accounting,
but for so large shared memory occupy by GPU, and each process memory
killer account become unfair, very large 3D game will not killed firstly
if it going to background.

Add this account to let real large memory user get killed if going to background
eg, the "angry bird Space" will acquire 68,215,360 GPU memory for 1-6 toll-gate.

The test show it can quicker recovery from memory shortage situation,
since it's very like to be killed after add so much GPU memory for such 3D game.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
11 years agoENGR00212534 GPU : fix a type
Huang Shijie [Wed, 6 Jun 2012 07:46:07 +0000 (15:46 +0800)]
ENGR00212534 GPU : fix a type

fix a type: It should be "#if", not "#ifdef".

Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00212523 [MX6]Need to enable gpt serial clock for Arik TO1.0
Anson Huang [Wed, 6 Jun 2012 06:48:42 +0000 (14:48 +0800)]
ENGR00212523 [MX6]Need to enable gpt serial clock for Arik TO1.0

Need to make sure gpt serial clock enabled on Arik TO1.0.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00212512: Fix caam build error when being built as module
Terry Lv [Wed, 6 Jun 2012 05:14:46 +0000 (13:14 +0800)]
ENGR00212512: Fix caam build error when being built as module

Fix caam build error when being built as module.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00212490 [SMP]Fix build error of calibrate when no define SMP
Anson Huang [Wed, 6 Jun 2012 01:36:09 +0000 (09:36 +0800)]
ENGR00212490 [SMP]Fix build error of calibrate when no define SMP

Fix build error, only under SMP enviroment, we use per_cpu cpu_data
to decide to redo calibrate delay or skip.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00212492 GPU: fix a macro error
Huang Shijie [Tue, 5 Jun 2012 09:26:35 +0000 (17:26 +0800)]
ENGR00212492 GPU: fix a macro error

The default .config defines the GPU as a module:
  "CONFIG_MXC_GPU_VIV=m"

In this case, we actually can not find the CONFIG_MXC_GPU_VIV.
We should find CONFIG_MXC_GPU_VIV_MODULE instead.

Signed-off-by: Huang Shijie <b32955@freescale.com>
11 years agoENGR00211670- CPUFREQ-Set CPU to maximum frequency before entering STOP mode
Ranjani Vaidyanathan [Tue, 29 May 2012 23:45:43 +0000 (18:45 -0500)]
ENGR00211670- CPUFREQ-Set CPU to maximum frequency before entering STOP mode

Ensure that the CPUFREQ driver sets the CPU to its maximum
frequency when it is suspended.
Also change the WAIT macro in clock.c to use GPT counter
for the delay instead of getnsdayoftime(). As the kernel
timekeeping driver is suspended before CPUFREQ and this
causes a dump during suspend.

Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
11 years agoENGR00212348: Change caam to be built as module
Terry Lv [Tue, 5 Jun 2012 05:28:26 +0000 (13:28 +0800)]
ENGR00212348: Change caam to be built as module

Currently caam is not selected by default.
For test requirement, we need to set it to be built as module.

Signed-off-by: Terry Lv <r65388@freescale.com>
11 years agoENGR00211169-2 [SMP]Need to update loops_per_jiffy when cpufreq is changed
Anson Huang [Mon, 4 Jun 2012 12:51:57 +0000 (20:51 +0800)]
ENGR00211169-2 [SMP]Need to update loops_per_jiffy when cpufreq is changed

Need to update loops_per_jiffy when cpufreq is changed, our platform
only change the loops_per_jiffy of per_cpu cpu_data, we need to update
it to global loops_per_jiffy which is used for udelay, this is for pure
cpu freq change.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00211169-1 [SMP]Need to update loops_per_jiffy when cpufreq is changed
Anson Huang [Mon, 4 Jun 2012 12:50:53 +0000 (20:50 +0800)]
ENGR00211169-1 [SMP]Need to update loops_per_jiffy when cpufreq is changed

Need to update loops_per_jiffy when cpufreq is changed, our platform
only change the loops_per_jiffy of per_cpu cpu_data, we need to update
it to global loops_per_jiffy which is used for udelay.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoinit: skip calibration delay if previously done
Sameer Nanda [Tue, 26 Jul 2011 00:13:29 +0000 (17:13 -0700)]
init: skip calibration delay if previously done

For each CPU, do the calibration delay only once.  For subsequent calls,
use the cached per-CPU value of loops_per_jiffy.

This saves about 200ms of resume time on dual core Intel Atom N5xx based
systems.  This helps bring down the kernel resume time on such systems
from about 500ms to about 300ms.

[akpm@linux-foundation.org: make cpu_loops_per_jiffy static]
[akpm@linux-foundation.org: clean up message text]
[akpm@linux-foundation.org: fix things up after upstream rmk changes]
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Cc: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoENGR00211844 MX6x HDMI display can't show video to after suspend/resume
Sandor Yu [Fri, 1 Jun 2012 10:14:12 +0000 (18:14 +0800)]
ENGR00211844 MX6x HDMI display can't show video to after suspend/resume

Added hdmi clock gating/ungating when devide suspend/resume

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00211329-2 add mutex for otg wake up enable
Tony LIU [Fri, 1 Jun 2012 09:56:48 +0000 (17:56 +0800)]
ENGR00211329-2 add mutex for otg wake up enable

- For the system dump issue of usb unhandled irq,
  the root cause is the shared resource being lack of protection
  add mutex to protect the shared access.

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agoENGR00211329-1 Fix system dump of unhandled usb irq
Tony LIU [Fri, 1 Jun 2012 09:55:17 +0000 (17:55 +0800)]
ENGR00211329-1 Fix system dump of unhandled usb irq

Revert "ENGR00211686 mx6 usb: system crash after suspend/resume"

This reverts commit eb0fdddfc19ec5597f5973499765a5a8f5e75749.

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agoENGR00211300: warning of 'mmc: unknown controller version' on boot.
Ryan QIAN [Tue, 29 May 2012 00:22:36 +0000 (08:22 +0800)]
ENGR00211300: warning of 'mmc: unknown controller version' on boot.

Since SVN 0x11 defined in FSL host controller is mapping to SD host
specification 3.0, it needs to remap the value while reading
SDHCI_HOST_CTRL_VER.

Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00210677: [MX60_ARM2]SDIO-WIFI: can not work.
Ryan QIAN [Mon, 28 May 2012 07:00:46 +0000 (15:00 +0800)]
ENGR00210677: [MX60_ARM2]SDIO-WIFI: can not work.

enhance drive strength of sd pad ctrl to 40ohm otherwise it
will report error while trying to communicate with atheros
wifi.

error message looks like:
 - "mmc2: error -84 whilst initialising SDIO card"

Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00211165 [mx6sl]: warnning of 'no vmmc regulator' on sys boots
Ryan QIAN [Mon, 28 May 2012 06:58:00 +0000 (14:58 +0800)]
ENGR00211165 [mx6sl]: warnning of 'no vmmc regulator' on sys boots

1. no vmmc regulator device was registered.
2. move initialization of usdhc into mx6_arm2_init.

Signed-off-by: Ryan QIAN <b32804@freescale.com>
11 years agoENGR00211764 IPUv3 fb: support pan display with fb_set_var
Liu Ying [Wed, 30 May 2012 08:14:06 +0000 (16:14 +0800)]
ENGR00211764 IPUv3 fb: support pan display with fb_set_var

Users may call FBIOPUT_VSCREENINFO ioctrl to do pan display.
This ioctrl relies on fb_set_var() to do the job. fb_set_var()
calls custom fb_set_par() method and then calls custom
fb_pan_display() method. The current implementation of ipuv3fb
reinitializes IPU display controller every time the custom
fb_set_par() method is called, which makes the display flash
if fb_set_var() is called to do panning frequently. The custom
fb_pan_display() method checks if the current xoffset and
yoffset are different from previous ones before doing actual
panning, which prevents the panning from happening within the
fb_set_var() context. This patch checks new var info to decide
whether we really need to reinitialize IPU display controller.
We ignore xoffset and yoffset update because it doesn't require
to reinitialize the controller. Users may specify activate field
of var info with FB_ACTIVATE_NOW and FB_ACTIVATE_FORCE to
reinialize the controller by force. Meanwhile, this patch removes
the check in custom fb_pan_display() method mentioned before to
have the panning work within fb_set_var() context. It doesn't
hurt to do panning again if there is no update for xoffset and
yoffset.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00210686 USB:fix unplug&plug device during suspend without wakeup enabled
make shi [Thu, 31 May 2012 02:24:10 +0000 (10:24 +0800)]
ENGR00210686 USB:fix unplug&plug device during suspend without wakeup enabled

For High speed device ,we need clear BM_USBPHY_CTRL_ENHOSTDISCONDETECT
after suspend.For Low and full speed device, we should power on and power
off the USB port to make sure USB internal state machine work well.

Add a config to enable/disable this code,the code is enabled by default.

Signed-off-by: make shi <b15407@freescale.com>
11 years agoENGR00211838 MX6 HDMI packet overflow workaround from Synopsys
Sandor Yu [Thu, 31 May 2012 02:34:13 +0000 (10:34 +0800)]
ENGR00211838 MX6 HDMI packet overflow workaround from Synopsys

Update HDMI packet overflow workaround for Rigel and Airk.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00211679 - SPDC : fix mode4 fresh issue.
Fugang Duan [Mon, 28 May 2012 09:44:29 +0000 (17:44 +0800)]
ENGR00211679 - SPDC : fix mode4 fresh issue.

- Modify lut to fix DC VCOM fading and mode4 close
  over push issue.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00211678 - SPDC : update Sipix AUO panel firmware
Fugang Duan [Wed, 30 May 2012 03:26:28 +0000 (11:26 +0800)]
ENGR00211678 - SPDC : update Sipix AUO panel firmware

- The original waveform mode4 refresh action is not
  expected, and the waveform file resolve the issue.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00211686 mx6 usb: system crash after suspend/resume
Tony LIU [Wed, 30 May 2012 05:56:38 +0000 (13:56 +0800)]
ENGR00211686 mx6 usb: system crash after suspend/resume

- the pre-condition of this issue is:
  1. usb gadget must be probed before usb host
  2. usb otg must be in host mode

- the root cause of this issue is
  because of the issue of week 2p5, a vbus change interrupt will
  be issued when system enter into DSM, which will cause system
  exit DSM, so we have a walk aroud to disable usb vbus change
  interrupt when system enter into DSM.

  But this walk around just provent the interrupt generating, the
  vbus change status is still on. When usb gadget is probed, the
  vbus change interrupt will be enabled by its resume interface by
  mistake, and then continuous interrupt will be generated because
  usb otg is in host mode, it can't clear the vbus change status.

  The system have a protect mechanism that when one IRQ's handler
  return IRQ_NONE more than 99000 times, it will through a exception
  to inform such situation. That's the reason why system crash.

Signed-off-by: Tony LIU <junjie.liu@freescale.com>
11 years agoENGR00210918-3 elcdif_fb: change update hardware par method.
Zhang Jiejing [Mon, 28 May 2012 11:35:46 +0000 (19:35 +0800)]
ENGR00210918-3 elcdif_fb: change update hardware par method.

update the screen var info compare method, it should:
- should update the hardware parameter when  FB_ACTIVATE_FORCE
- use bool as return type.
- return true if the new and old var are same.

Signed-off-by Zhang Jiejing <jiejing.zhang@freescale.com>

11 years agoENGR00178461-02 HDMI1080p: hotplug cause kernel panic. 10%
Sandor Yu [Tue, 29 May 2012 08:54:13 +0000 (16:54 +0800)]
ENGR00178461-02 HDMI1080p: hotplug cause kernel panic. 10%

It is a warning cause by  HDMI driver irq enable count mismatch.
The purpose of maintain HDMI irq count is to disable hdmi_iahb_clk
when HDMI cable plugout.
But hdmi_iahb_clk parent ahb clock is always enabled when system run,
so hdmi_iabh_clk power consumption is very low.
The function clk_get_usecount introduce by irq count maintain
is not safety in SMP.

Remove HDMI irq count in HDMI driver, keep hdmi_iahb_clk always run.
and disable hdmi_iahb_clk and hdmi_isfr_clk when FB Blank.

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00178461-01 HDMI1080p: hotplug cause kernel panic. 10%
Sandor Yu [Tue, 29 May 2012 08:54:13 +0000 (16:54 +0800)]
ENGR00178461-01 HDMI1080p: hotplug cause kernel panic. 10%

Add HDMI register define in HDMI register head file

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00211372 V4L2 output: Fix software bug when set_crop/set_ctrl after set_fmt
Wayne Zou [Wed, 23 May 2012 06:41:46 +0000 (14:41 +0800)]
ENGR00211372 V4L2 output: Fix software bug when set_crop/set_ctrl after set_fmt

When set_crop/set_ctrl after set_fmt, the display may be crashed due to
input crop parameters may be wrong, especially for tiled NV12 format.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00211368:dual camera: fix csi 1 camera has wrong image issue
Wu Guoxing [Tue, 29 May 2012 07:22:25 +0000 (15:22 +0800)]
ENGR00211368:dual camera: fix csi 1 camera has wrong image issue

set the correct csi interface

Signed-off-by: Wu Guoxing <b39297@freescale.com>
11 years agoENGR00210559-3 Integrate gpu openGL2.1 and DRM
Allen Xu [Mon, 28 May 2012 07:31:54 +0000 (15:31 +0800)]
ENGR00210559-3 Integrate gpu openGL2.1 and DRM

remove i830 from Makefile to avoid build issue.

Signed-off-by: Allen Xu <allen.xu@freescale.com>
11 years agoENGR00211133 IPUv3 fb:Check boot opt to decide if disp fb'll be present
Liu Ying [Fri, 25 May 2012 09:50:19 +0000 (17:50 +0800)]
ENGR00211133 IPUv3 fb:Check boot opt to decide if disp fb'll be present

This patch checks video boot option to decide whether we'll register
certain display framebuffer devices. The user may add video=mxcfbx:off
to kernel bootup command line to disable a display framebuffer
register. The 'x' means that the display number presented in kernel.
Defaultly, all display framebuffers will be registered if the user
doesn't specify related 'off' option in kernel bootup command line.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00210871-2 IPU: Remove clk_get_usecount and only use clk_enable/clk_disable
Wayne Zou [Fri, 25 May 2012 05:54:52 +0000 (13:54 +0800)]
ENGR00210871-2 IPU: Remove clk_get_usecount and only use clk_enable/clk_disable

Remove clk_get_usecount API and
only use clk_enable/clk_disable APIs for IPU driver.
If ipu internal clock is not accurate, use external DI clock.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00210871-1 IPU: clean up ipu suspend/resume codes and remove mutex lock
Wayne Zou [Fri, 25 May 2012 05:50:57 +0000 (13:50 +0800)]
ENGR00210871-1 IPU: clean up ipu suspend/resume codes and remove mutex lock

Clean up IPU suspend/resume codes.
Remove clock API mutex lock and only use clk_enable/clk_disable
APIs for IPU driver.

Signed-off-by: Wayne Zou <b36644@freescale.com>
11 years agoENGR00210915 fb: mxc_elcdfb: fix screen flash when use fb_set_var
Zhang Jiejing [Fri, 25 May 2012 09:03:02 +0000 (17:03 +0800)]
ENGR00210915 fb: mxc_elcdfb: fix screen flash when use fb_set_var

fb_set_var() is used by android default display,
we found the screen will flash using android default
display support, found the root case was we init the
hardware (blank and unblank) the screen.

because fb_set_var() will call fb_set_par() every time,
we needs check only set the hardware register when needed,
then the android default image without any modify can works.

Also a build warnning fix.

Signed-off-by: Zhang Jiejing <jiejing.zhang@freescale.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
11 years agoENGR00182098 MX6DL 480P packet overflow interrupt can't been clean
Sandor Yu [Thu, 24 May 2012 11:12:02 +0000 (19:12 +0800)]
ENGR00182098 MX6DL 480P packet overflow interrupt can't been clean

Fix it with not SW reset TMDS when clean overflow interrupt on Mx6DL

Signed-off-by: Sandor Yu <R01008@freescale.com>
11 years agoENGR00211132 ESAI: fix build warning
Gary Zhang [Mon, 28 May 2012 02:27:46 +0000 (10:27 +0800)]
ENGR00211132 ESAI: fix build warning

imx-pcm.h should not include imx-ssi.h, or else DRV_NAME is
redefined

Signed-off-by: Gary Zhang <b13634@freescale.com>
11 years agoENGR00211129 - SPDC : modify waveform update modes.
Fugang Duan [Mon, 28 May 2012 02:58:19 +0000 (10:58 +0800)]
ENGR00211129 - SPDC : modify waveform update modes.

- Because mode_4 only use for handwriting mode, and
  mode_3 use for power off mode, modify the waveform
  mode for update requests.
- Use mode_2 for DU and A2, mode_1 for GU:
  mode_A2 = mode_2, mode_du = mode_2;
  mode_gu = mode_1;

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00211142 mx6q : set VDDCORE 1.05V at 672Mhz cpu point
Robin Gong [Mon, 28 May 2012 03:19:27 +0000 (11:19 +0800)]
ENGR00211142 mx6q : set VDDCORE 1.05V at 672Mhz cpu point

As SOC team suggestion, we should change VDDCORE from 1.1V to 1.05V at 672Mhz

Signed-off-by: Robin Gong <B38343@freescale.com>
11 years agoENGR00210547 [MX6]Enable I cache and branch prediction early
Anson Huang [Fri, 25 May 2012 08:36:56 +0000 (16:36 +0800)]
ENGR00210547 [MX6]Enable I cache and branch prediction early

1. When resume, we can enable I cache and branch prediction
early to speed up the resume process;
2. L2 cache still need clean before suspend to make suspend/resume
modifiedre stable, add it back until we find the root cause.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoENGR00210559-2 Integrate gpu openGL2.1 and DRM
Allen Xu [Thu, 24 May 2012 02:42:51 +0000 (10:42 +0800)]
ENGR00210559-2 Integrate gpu openGL2.1 and DRM

Add vivante drm modules code and select it in default config. Integrate
these code from vivante.

Signed-off-by: Allen Xu <allen.xu@freescale.com>
11 years agoENGR00210559-1 Integrate gpu openGL2.1 and DRM
Allen Xu [Thu, 24 May 2012 02:28:24 +0000 (10:28 +0800)]
ENGR00210559-1 Integrate gpu openGL2.1 and DRM

Add vivante drm modules code and select it in default config. Integrate
these code from vivante.

Signed-off-by: Allen Xu <allen.xu@freescale.com>
Acked-by: Lily Zhang
11 years agoENGR00210850 mx6: boot failure with local timer and wait mode enabled
Xinyu Chen [Fri, 25 May 2012 03:39:15 +0000 (11:39 +0800)]
ENGR00210850 mx6: boot failure with local timer and wait mode enabled

Previous patch only check the condition that GPT broadcast
event is ready or not before doing clock event switch.
It's not enough, as the clock switch from local timer to GPT
broadcast must be happen after GPT broadcast clock event setup
and current cpu's clock device switch to local timer clock event.
Otherwise, we will have chance that cpu exit the wait mode and
switch back clock event without local timer event setup correctly.

Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
11 years agoENGR00210075-5 - SPDC: Add waveform file for AUO paper panel
Fugang Duan [Sat, 19 May 2012 07:46:21 +0000 (15:46 +0800)]
ENGR00210075-5 - SPDC: Add waveform file for AUO paper panel

- Add waveform firmware file for AUO paper panel

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00210075-4 SPDC: Export some APIs for unit test case.
Fugang Duan [Tue, 22 May 2012 08:03:56 +0000 (16:03 +0800)]
ENGR00210075-4 SPDC: Export some APIs for unit test case.

- Export some APIs for unit test driver use.

Signed-off-by: Fugang Duan <B38611@freescale.com>
11 years agoENGR00210661: imx6sl: add watchdog support
Robby Cai [Thu, 24 May 2012 09:19:04 +0000 (17:19 +0800)]
ENGR00210661: imx6sl: add watchdog support

Register watchdog platform device and re-use watchdog driver.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00210694 MX6 SABRESD:Enable IRQ for max11801
Rong Dian [Thu, 24 May 2012 08:05:31 +0000 (16:05 +0800)]
ENGR00210694 MX6 SABRESD:Enable IRQ for max11801

If miss to configure IRQ for max11801, the max11801 driver fails to
probe and returns error,sabresd battery driver also fails to sample
voltage by max11801 ADC.

Signed-off-by: Rong Dian <b38775@freescale.com>
11 years agoENGR00210550: imx6sl: add viim support
Robby Cai [Wed, 23 May 2012 08:58:27 +0000 (16:58 +0800)]
ENGR00210550: imx6sl: add viim support

registered viim platform divice.

Signed-off-by: Robby Cai <R63905@freescale.com>
11 years agoENGR00180495 [mx6]Fix suspend/resume issue caused by hotplug
Anson Huang [Wed, 23 May 2012 07:13:03 +0000 (15:13 +0800)]
ENGR00180495 [mx6]Fix suspend/resume issue caused by hotplug

When we kill a secondary cpu, we need to wait for it
die, then kill it from hardware setting. And to avoid
the cache unalign issue, we use hardware register to
send flag to inform main cpu to kill secondary cpu.

Signed-off-by: Anson Huang <b20788@freescale.com>
11 years agoARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus
Linus Walleij [Tue, 10 Apr 2012 11:37:42 +0000 (12:37 +0100)]
ARM: 7359/2: smp_twd: Only wait for reprogramming on active cpus

During booting of cpu1, there is a short window where cpu1
is online, but not active where cpu1 is occupied by waiting
to become active. If cpu0 then decides to schedule something
on cpu1 and wait for it to complete, before cpu0 has set
cpu1 active, we have a deadlock.

Typically it's this CPU frequency transition that happens at
this time, so let's just not wait for it to happen, it will
happen whenever the CPU eventually comes online instead.

Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@kernel.org
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7406/1: hotplug: copy the affinity mask when forcefully migrating IRQs
Will Deacon [Fri, 27 Apr 2012 11:56:24 +0000 (12:56 +0100)]
ARM: 7406/1: hotplug: copy the affinity mask when forcefully migrating IRQs

When a CPU is hotplugged off, we migrate any IRQs currently affine to it
away and onto another online CPU by calling the irq_set_affinity
function of the relevant interrupt controller chip. This function
returns either IRQ_SET_MASK_OK or IRQ_SET_MASK_OK_NOCOPY, to indicate
whether irq_data.affinity was updated.

If we are forcefully migrating an interrupt (because the affinity mask
no longer identifies any online CPUs) then we should update the IRQ
affinity mask to reflect the new CPU set. Failure to do so can
potentially leave /proc/irq/n/smp_affinity identifying only offline
CPUs, which may confuse userspace IRQ balancing daemons.

This patch updates migrate_one_irq to copy the affinity mask when
the interrupt chip returns IRQ_SET_MASK_OK after forcefully changing the
affinity of an interrupt.

Cc: stable@vger.kernel.org
Reported-by: Leif Lindholm <leif.lindholm@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: 7317/1: irq: avoid NULL check in for_each_irq_desc loop
Will Deacon [Fri, 3 Feb 2012 13:50:07 +0000 (14:50 +0100)]
ARM: 7317/1: irq: avoid NULL check in for_each_irq_desc loop

ARM unconditionally selects CONFIG_GENERIC_HARDIRQS, so the definition
of for_each_irq_desc will check that the desc is non-NULL anyway.

This patch removes a redundant check from the IRQ migration code.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: CPU hotplug: ensure we migrate all IRQs off a downed CPU
Russell King [Thu, 21 Jul 2011 14:14:21 +0000 (15:14 +0100)]
ARM: CPU hotplug: ensure we migrate all IRQs off a downed CPU

Our selection of interrupts to consider for IRQ migration is sub-
standard.  We were potentially including per-CPU interrupts in our
migration strategy, but omitting chained interrupts.  This caused
some interrupts to remain on a downed CPU.

We were also trying to migrate interrupts which were not migratable,
resulting in an OOPS.

Instead, iterate over all interrupts, skipping per-CPU interrupts
or interrupts whose affinity does not include the downed CPU, and
attempt to set the affinity for every one else if their chip
implements irq_set_affinity().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: CPU hotplug: pass in proper affinity mask on IRQ migration
Russell King [Thu, 21 Jul 2011 14:07:56 +0000 (15:07 +0100)]
ARM: CPU hotplug: pass in proper affinity mask on IRQ migration

Now that the GIC takes care of selecting a target interrupt from the
affinity mask, we don't need all this complexity in the core code
anymore.  Just detect when we need to break affinity.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
11 years agoARM: CPU hotplug: fix abuse of irqdesc->node
Russell King [Thu, 21 Jul 2011 13:51:13 +0000 (14:51 +0100)]
ARM: CPU hotplug: fix abuse of irqdesc->node

irqdesc's node member is supposed to mark the numa node number for the
interrupt.  Our use of it is non-standard.  Remove this, replacing the
functionality with a test of the affinity mask.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>