Anson Huang [Mon, 14 Nov 2011 12:31:30 +0000 (20:31 +0800)]
ENGR00162115 [WDOG]Should suspend timer in LPM
We should set the WDOG timer to suspend in low
power mode, or when system suspend, wdog will continue
to run, and reset the system. This WCR_WDZST is a write
once-only register.
Dong Aisheng [Mon, 14 Nov 2011 09:31:42 +0000 (17:31 +0800)]
ENGR00162093 mx6q: use gpio_set_value_cansleep for sleepable gpios
This can fix the following issue:
root@freescale ~$ ./ip link set can1 up type can bitrate 125000
flexcan imx6q-flexcan.1: writing ctrl=0x0e312005
------------[ cut here ]------------
WARNING: at drivers/gpio/gpiolib.c:1593 __gpio_set_value+0x64/0x74()
Modules linked in:
[<8005499c>] (unwind_backtrace+0x0/0x108) from [<804db0e8>] (dump_stack+0x20/0x24)
[<804db0e8>] (dump_stack+0x20/0x24) from [<80079ac0>] (warn_slowpath_common+0x5c/0x74)
[<80079ac0>] (warn_slowpath_common+0x5c/0x74) from [<80079b04>] (warn_slowpath_null+0x2c/0x34)
[<80079b04>] (warn_slowpath_null+0x2c/0x34) from [<80297d50>] (__gpio_set_value+0x64/0x74)
[<80297d50>] (__gpio_set_value+0x64/0x74) from [<80064630>] (mx6q_flexcan1_switch+0x50/0x54)
[<80064630>] (mx6q_flexcan1_switch+0x50/0x54) from [<80324bf0>] (flexcan_chip_start+0x2dc/0x378)
[<80324bf0>] (flexcan_chip_start+0x2dc/0x378) from [<80324d0c>] (flexcan_open+0x80/0xe8)
[<80324d0c>] (flexcan_open+0x80/0xe8) from [<8041b7a8>] (__dev_open+0xac/0xf8)
[<8041b7a8>] (__dev_open+0xac/0xf8) from [<80418848>] (__dev_change_flags+0x90/0x148)
[<80418848>] (__dev_change_flags+0x90/0x148) from [<8041b6c4>] (dev_change_flags+0x20/0x58)
[<8041b6c4>] (dev_change_flags+0x20/0x58) from [<804292d8>] (do_setlink+0x1a0/0x7b4)
[<804292d8>] (do_setlink+0x1a0/0x7b4) from [<8042a734>] (rtnl_newlink+0x438/0x488)
[<8042a734>] (rtnl_newlink+0x438/0x488) from [<8042a2d4>] (rtnetlink_rcv_msg+0x200/0x228)
[<8042a2d4>] (rtnetlink_rcv_msg+0x200/0x228) from [<80434e88>] (netlink_rcv_skb+0xcc/0xe8)
[<80434e88>] (netlink_rcv_skb+0xcc/0xe8) from [<8042a0cc>] (rtnetlink_rcv+0x2c/0x34)
[<8042a0cc>] (rtnetlink_rcv+0x2c/0x34) from [<80434aac>] (netlink_unicast+0x2c0/0x328)
[<80434aac>] (netlink_unicast+0x2c0/0x328) from [<804354a0>] (netlink_sendmsg+0x22c/0x350)
[<804354a0>] (netlink_sendmsg+0x22c/0x350) from [<80406e24>] (sock_sendmsg+0xa4/0xc4)
[<80406e24>] (sock_sendmsg+0xa4/0xc4) from [<804073a4>] (sys_sendmsg+0x140/0x270)
[<804073a4>] (sys_sendmsg+0x140/0x270) from [<8004dc40>] (ret_fast_syscall+0x0/0x30)
---[ end trace 4612d184c78ddab8 ]---
Anson Huang [Fri, 11 Nov 2011 10:45:15 +0000 (18:45 +0800)]
ENGR00162010-2 [Thermal]Add calibration to thermal
1. Read calibration from fuse to adjust formula
for thermal driver;
2. For the parts that didn't contain valid
calibration data, cooling device will be disabled;
Will Deacon [Tue, 15 Feb 2011 13:31:37 +0000 (14:31 +0100)]
ARM: 6674/1: LPAE: use long long format when printing physical addresses and ptes
[Frank Li]Fix mx6 boot failure issue during cherry-pick
For the Kernel to support 2 level and 3 level page tables, physical
addresses (and also page table entries) need to be 32 or 64-bits depending
upon the configuration.
This patch uses the %08llx conversion specifier for physical addresses
and page table entries, ensuring that they are cast to (long long) so
that common code can be used regardless of the datatype widths.
Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Jason Chen [Mon, 14 Nov 2011 02:34:49 +0000 (10:34 +0800)]
ENGR00161948 mxc v4l2 output: fix case of input crop with xoffset
run test like:
/unit_tests//mxc_v4l2_output.out -iw 1280 -ih 720 -cr 1024 700 40 0 -ow 1024
-oh 700 /unit_tests/720p.yuv
Under IPU IC bypass mode, the output color is not correct.
And sometimes come out tearing issue.
Fix them by modify fb driver adding xpanstep support and set vb->state to DONE
after it finish show.
When previous videobuf finish show and next videobuf ready to show, set
VIDEOBUF_DONE state to avoid tearing issue, which make sure showing buffer will
not be dequeue to write new data. It also bring side-effect that the last buffer
can not be dequeue correctly, app need take care about it.
- Added V3P3 regulator definitions to board file
- Added V3P3 GPIO defines and setup in board files
- Changed V220 panel timings to match settings used for certification
Signed-off-by: Danny Nold <dannynold@freescale.com>
Peter Chen [Thu, 10 Nov 2011 02:45:23 +0000 (10:45 +0800)]
ENGR00161848 mx5x: usb: fix build error
Fix the build error for mx5x
arch/arm/plat-mxc/usb_common.c: In function 'fsl_usb_host_init':
arch/arm/plat-mxc/usb_common.c:526:
error: 'UCTRL_OVER_CUR_POL' undeclared (first use in this function)
arch/arm/plat-mxc/usb_common.c:526: error:
(Each undeclared identifier is reported only once
arch/arm/plat-mxc/usb_common.c:526:
error: for each function it appears in.)
arch/arm/plat-mxc/usb_common.c:529:
error: 'UCTRL_OVER_CUR_DIS' undeclared (first use in this function)
arch/arm/plat-mxc/usb_common.c: In function 'usbotg_init':
arch/arm/plat-mxc/usb_common.c:840:
error: 'UCTRL_OVER_CUR_POL' undeclared (first use in this function)
arch/arm/plat-mxc/usb_common.c:843:
error: 'UCTRL_OVER_CUR_DIS' undeclared (first use in this function)
make[1]: *** [arch/arm/plat-mxc/usb_common.o] Error 1
make: *** [arch/arm/plat-mxc] Error 2
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Fugang Duan [Tue, 8 Nov 2011 07:54:47 +0000 (15:54 +0800)]
ENGR00161617 - [MX6] : FEC get MAC address from OCOTP.
- FEC get the default MAC address from OCOTP.
- If the MAC address is all zero, get the random address.
- But, if add para "fec_mac=xx:xx:xx:xx:xx:xx" in uboot,
FEC will get the last MAC address from uboot para.
Richard Zhao [Wed, 9 Nov 2011 07:01:45 +0000 (15:01 +0800)]
ENGR00161764 mx6q: disable gc355 temporally
Reasons:
- gc355 suspend failed. which cause the whole system suspend failed.
- gc355 cause reserved memory must be ioremap, consume too much vmalloc space.
- gc355 can not work in 4.6.2 gpu driver.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Tony Lin [Tue, 8 Nov 2011 08:46:14 +0000 (16:46 +0800)]
ENGR00161631 [ASRC]fix build error
if kernel hacking -> Big Kernel Lock is deselected, ASRC will build fail as:
drivers/mxc/asrc/mxc_asrc.c: In function 'asrc_input_dma_callback':
drivers/mxc/asrc/mxc_asrc.c:873: error: 'TASK_INTERRUPTIBLE'
undeclared (first use in this function)
drivers/mxc/asrc/mxc_asrc.c:873: error: (Each undeclared identifier
is reported only once
drivers/mxc/asrc/mxc_asrc.c:873: error: for each function it appears in.)
drivers/mxc/asrc/mxc_asrc.c: In function 'asrc_output_dma_callback':
drivers/mxc/asrc/mxc_asrc.c:915: error: 'TASK_INTERRUPTIBLE' undeclared
(first use in this function)
drivers/mxc/asrc/mxc_asrc.c: In function 'asrc_ioctl':
drivers/mxc/asrc/mxc_asrc.c:1259: error: 'TASK_INTERRUPTIBLE' undeclared
(first use in this function)
drivers/mxc/asrc/mxc_asrc.c:1259: error: implicit declaration of function
'signal_pending'
drivers/mxc/asrc/mxc_asrc.c:1259: error: implicit declaration of function
'schedule_timeout'
CC fs/ext4/symlink.o
drivers/mxc/asrc/mxc_asrc.c: In function 'mxc_asrc_close':
drivers/mxc/asrc/mxc_asrc.c:1554: error: 'TASK_INTERRUPTIBLE' undeclared
(first use in this function)
make[3]: *** [drivers/mxc/asrc/mxc_asrc.o] Error 1
Jason Chen [Tue, 8 Nov 2011 06:07:14 +0000 (14:07 +0800)]
ENGR00161607 mxc v4l2 output: return real phys offset after mmap
vpu unit test failed because it need phys offset of each buffer allocated by
v4l2 output driver.
videobuf dma contig method only allocate real dma buffer when user call mmap.
Fix this issue by adding code to querybuf ioctl, return real phys after
buffer mmaped.
When WAIT mode is not enabled, execute cpu_do_idle() code.
Currently WAIT mode requires the code to be run from IRAM with caches disabled.
No L2 cache access should be done for a specified period after the system exits
WAIT mode. This delay and running code from IRAM adversely affects the
SDHC performance.
Hardware team is looking into the extended delay that is required.
Till its root caused, default should be to execute cpu_do_idle() and
disable entry into WAIT mode.
Jason Chen [Fri, 4 Nov 2011 08:42:40 +0000 (16:42 +0800)]
ENGR00160878-2 mxc v4l2 output: new mxc v4l2 output driver based on videobuf
This new v4l2 output driver is based on videobuf, using dma contig alloc method.
It creates video dev node for each display framebuffer begin from /dev/video16
by default.
If need post-processing, this driver will do it by ipu pp driver which support:
- resizing
- CSC
- rotate
- deinterlacing
If no need post-processing, the IPU IC will be bypassed as old driver, the
buf will be set to fb buffer directly by crack fb smem_start.
The user should do setting before streamon like below:
1. set output crop
2. set ctrl like rotate/vflip/hflip/deinterlacing motion
3. set fmt
4. reqbuf
The new features compare to old driver:
- support multi-instance
- support user point buffer
- runtime suspend/resume
For suspend/resume, still has chance to meet issue on mx6q, will fix later.
Jason Chen [Thu, 27 Oct 2011 02:31:51 +0000 (10:31 +0800)]
ENGR00160878-1 mxc v4l2 output: new mxc v4l2 output driver based on videobuf
This new v4l2 output driver is based on videobuf, using dma contig alloc method.
It creates video dev node for each display framebuffer begin from /dev/video16
by default.
If need post-processing, this driver will do it by ipu pp driver which support:
- resizing
- CSC
- rotate
- deinterlacing
If no need post-processing, the IPU IC will be bypassed as old driver, the
buf will be set to fb buffer directly by crack fb smem_start.
The user should do setting before streamon like below:
1. set output crop
2. set ctrl like rotate/vflip/hflip/deinterlacing motion
3. set fmt
4. reqbuf
The new features compare to old driver:
- support multi-instance
- support user point buffer
- runtime suspend/resume
For suspend/resume, still has chance to meet issue on mx6q, will fix later.
Peter Chen [Thu, 3 Nov 2011 05:57:25 +0000 (13:57 +0800)]
ENGR00161314-1 mx6q usb-host: add hsic support
MSL part
Add HSIC support for Host2 and Host3, for HSIC mode, there
is not usb phy needed, the usb device is always at the board
- Validation hardware: iMX6Q Validation Port Card and Re-worked
Rev X3 board, for hardware rework detail, contact Ken Sun (b03826)
- Validation device: HSIC interface SMSC HUB(USB4640) and Host 3.
Host 2 is coding finishes, but not verified due to hardware limitation.
- Pin Conflict with Ethernet, order to use HSIC, the user need
disable ethernet function at both u-boot and linux kernel.
For u-boot: please undefine CONFIG_MXC_FEC at your board config file
For kernel: please define CONFIG_USB_EHCI_ARC_HSIC, the entry is:
Device Drivers---> USB support---> Support HSIC Host controller
for Freescale SoC
- Suspend/resume and wakeup are not supported due to IC issues,
these IC issues will be fixed at TO1.1 for i.mx6, software will
add these support after receiving TO1.1 chip.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Sammy He [Wed, 2 Nov 2011 14:26:18 +0000 (22:26 +0800)]
ENGR00161215-2 vpu: Add ioctls for querying and setting bitwork memory
Add VPU_IOC_QUERY_BITWORK_MEM and VPU_IOC_SET_BITWORK_MEM ioctls
implementation for registerring bitwork memory allocated from user
space to vpu driver.
Sammy He [Wed, 2 Nov 2011 14:25:16 +0000 (22:25 +0800)]
ENGR00161215-1 arch/arm: Add two new IOCTLs in mxc_vpu.h
Add IOCTL VPU_IOC_QUERY_BITWORK_MEM and VPU_IOC_SET_BITWORK_MEM
for vpu driver.
The two ioctls can be used when user allocates working buffer
from user space, for exmaple, allocating it from pmem interface
on android, then register it to vpu driver.
Dong Aisheng [Wed, 2 Nov 2011 11:12:52 +0000 (19:12 +0800)]
ENGR00161256-1 flexcan: convert driver to use platform ids
Using platform ids to handle differences between different SoCs.
The default rx fifo global mask register, newly introduced in mx6q,
is 0xffffffff and the reset value in Message buffers(can be reused as the
memory of rx fifo filter table) is none zero, it will wrongly cause the
can to be unable to recevie packets due to filter.
We need to clear it to make sure to receive all packets.
Anson Huang [Thu, 3 Nov 2011 07:51:35 +0000 (15:51 +0800)]
ENGR00161321 [MX6 ARM2]Disable Warm reset
Current warm reset is not working with MMDC_CH1 bypass
bit set, now we disable warm reset to workaround it for
the coming release. Then, wdog reset will be cold reset.
Terry Lv [Wed, 2 Nov 2011 09:14:39 +0000 (17:14 +0800)]
ENGR00161234-1: Enable ocotp clock for mx6q
Add clock enable code to driver.
OCOTP driver missed code to enable clock in driver.
Thus if ocotp clock is not enabled in clock.c, ocotp will not work.
Previously, only one static struct for ops existed for all
platform DMA drivers to share. Half of the ops are shared
functions which don't have stubs in the ALSA core. The
other half are initialized to point directly to ops in the
platform driver. This creates problems where each time
soc_new_pcm is called, the new platform driver's ops would
overwrite a subset of the ops.
Signed-off-by: Alan Tull <alan.tull@freescale.com>
Fugang Duan [Wed, 2 Nov 2011 04:26:49 +0000 (12:26 +0800)]
ENGR00161207 - FEC: Add IEEE 1588 driver for imx6
- Support time stamp sync with networking master timer.
- Support ipg 40MHz clock, and precision is about 20ns.
- Don't support ipg 66MHz clock.
- Test flow:
1. Enable CONFIG_FEC_1588 in imx6_defconfig file.
2. Select pll3 for ipg clk 40M in uboot plugin code.
I. set reg 0x20c8028 value to 0x10000;
II.set reg 0x20c8024 value to 0x3040;
III. set reg 0x20c4014[25] to 0x1
IV. set reg 0x20c4014[12:10] to 0x5
3. Rebuid uboot and setup the ethernet environment.
4. Run the 1588 stack ptp_main in master and slave.
Anish Trivedi [Fri, 28 Oct 2011 18:07:00 +0000 (13:07 -0500)]
ENGR00161005-1 MX6Q Kernel Rename sabreauto to arm2 board
Machine layer patch.
Sabreauto is an inaccurate name for the Armadillo2 board that
this code is actually meant for. So, renamed "sabreauto" board file,
configs, and code to "arm2". Created a new machine id for
ARM2 board.