summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinyu Chen <b03824@freescale.com>2011-12-30 15:45:51 +0800
committerXinyu Chen <b03824@freescale.com>2011-12-30 15:45:51 +0800
commit614017f46b445ef1cb38f36750261e21073b4e4f (patch)
tree7815ff490495c1e77fdd919865cc86b24f663a45
parenteb61942e81da1be65bc0c0c27f991f70054fe6ac (diff)
parent8abc99e4745fe1861f9510811bb4470f689b5b41 (diff)
Merge remote branch 'fsl-linux-sdk/imx_2.6.38' into imx_2.6.38_android
-rw-r--r--arch/arm/mach-mx6/headsmp.S3
-rw-r--r--arch/arm/mach-mx6/mx6q_suspend.S13
-rw-r--r--drivers/media/video/mxc/capture/ov5640.c157
-rw-r--r--drivers/rtc/rtc-snvs.c80
-rw-r--r--drivers/video/mxc_hdmi.c16
5 files changed, 201 insertions, 68 deletions
diff --git a/arch/arm/mach-mx6/headsmp.S b/arch/arm/mach-mx6/headsmp.S
index 3adc6e8a14dd..d9fca6a575a5 100644
--- a/arch/arm/mach-mx6/headsmp.S
+++ b/arch/arm/mach-mx6/headsmp.S
@@ -115,6 +115,9 @@ ENTRY(mx6_secondary_startup)
offset is passed from GPR parameter, currently we store
it at r8, future code change should avoid using r8.
*****************************************************************************/
+ /* Invalidate L1 I-cache first */
+ mov r1, #0x0
+ mcr p15, 0, r1, c7, c5, 0 @ Invalidate I-Cache
/* count the offset value and store it in r8 */
ldr r3, =mx6_secondary_startup
mrc p15, 0, r0, c0, c0, 5
diff --git a/arch/arm/mach-mx6/mx6q_suspend.S b/arch/arm/mach-mx6/mx6q_suspend.S
index bbda5aa36768..29d5a76e86ce 100644
--- a/arch/arm/mach-mx6/mx6q_suspend.S
+++ b/arch/arm/mach-mx6/mx6q_suspend.S
@@ -460,17 +460,10 @@ when SOC exit stop mode, arm core restart from here, currently
are running with MMU off.
****************************************************************/
resume:
+ /* Invalidate L1 I-cache first */
+ mov r1, #0x0
+ mcr p15, 0, r1, c7, c5, 0 @ Invalidate I-Cache
ldr r0, =SRC_BASE_ADDR
- /* Due to the L2 cache errata(TKT065875)
- , need to wait at least 170ns, each IO read
- takes about 76ns, but the actual wait time
- to make system more stable is about 380ns */
- ldr r1, [r0]
- ldr r1, [r0, #0x4]
- ldr r1, [r0, #0x8]
- ldr r1, [r0, #0xc]
- ldr r1, [r0, #0x10]
- mov r1, #0x0
str r1, [r0, #SRC_GPR1_OFFSET] /* clear SRC_GPR1 */
ldr r0, [r0, #SRC_GPR2_OFFSET]
diff --git a/drivers/media/video/mxc/capture/ov5640.c b/drivers/media/video/mxc/capture/ov5640.c
index 6ed73ca85645..64ee178f2e58 100644
--- a/drivers/media/video/mxc/capture/ov5640.c
+++ b/drivers/media/video/mxc/capture/ov5640.c
@@ -103,36 +103,39 @@ struct sensor {
static struct reg_value ov5640_setting_15fps_QSXGA_2592_1944[] = {
{0x3103, 0x11, 0, 0}, {0x3008, 0x82, 0, 0}, {0x3008, 0x42, 0, 0},
{0x3103, 0x03, 0, 0}, {0x3017, 0xff, 0, 0}, {0x3018, 0xff, 0, 0},
- {0x3034, 0x1a, 0, 0}, {0x3035, 0x21, 0, 0}, {0x3036, 0x69, 0, 0},
- {0x3037, 0x13, 0, 0}, {0x3108, 0x01, 0, 0}, {0x3630, 0x2e, 0, 0},
- {0x3632, 0xe2, 0, 0}, {0x3633, 0x23, 0, 0}, {0x3621, 0xe0, 0, 0},
- {0x3704, 0xa0, 0, 0}, {0x3703, 0x5a, 0, 0}, {0x3715, 0x78, 0, 0},
- {0x3717, 0x01, 0, 0}, {0x370b, 0x60, 0, 0}, {0x3705, 0x1a, 0, 0},
- {0x3905, 0x02, 0, 0}, {0x3906, 0x10, 0, 0}, {0x3901, 0x0a, 0, 0},
- {0x3731, 0x12, 0, 0}, {0x3600, 0x08, 0, 0}, {0x3601, 0x33, 0, 0},
- {0x302d, 0x60, 0, 0}, {0x3620, 0x52, 0, 0}, {0x371b, 0x20, 0, 0},
- {0x471c, 0x50, 0, 0}, {0x3a18, 0x00, 0, 0}, {0x3a19, 0xf8, 0, 0},
- {0x3635, 0x1c, 0, 0}, {0x3634, 0x40, 0, 0}, {0x3622, 0x01, 0, 0},
+ {0x3034, 0x1a, 0, 0}, {0x3035, 0x11, 0, 0}, {0x3036, 0x46, 0, 0},
+ {0x3037, 0x13, 0, 0}, {0x3108, 0x01, 0, 0}, {0x3630, 0x36, 0, 0},
+ {0x3631, 0x0e, 0, 0}, {0x3632, 0xe2, 0, 0}, {0x3633, 0x12, 0, 0},
+ {0x3621, 0xe0, 0, 0}, {0x3704, 0xa0, 0, 0}, {0x3703, 0x5a, 0, 0},
+ {0x3715, 0x78, 0, 0}, {0x3717, 0x01, 0, 0}, {0x370b, 0x60, 0, 0},
+ {0x3705, 0x1a, 0, 0}, {0x3905, 0x02, 0, 0}, {0x3906, 0x10, 0, 0},
+ {0x3901, 0x0a, 0, 0}, {0x3731, 0x12, 0, 0}, {0x3600, 0x08, 0, 0},
+ {0x3601, 0x33, 0, 0}, {0x302d, 0x60, 0, 0}, {0x3620, 0x52, 0, 0},
+ {0x371b, 0x20, 0, 0}, {0x471c, 0x50, 0, 0}, {0x3a13, 0x43, 0, 0},
+ {0x3a18, 0x00, 0, 0}, {0x3a19, 0xf8, 0, 0}, {0x3635, 0x13, 0, 0},
+ {0x3636, 0x03, 0, 0}, {0x3634, 0x40, 0, 0}, {0x3622, 0x01, 0, 0},
{0x3c01, 0x34, 0, 0}, {0x3c04, 0x28, 0, 0}, {0x3c05, 0x98, 0, 0},
- {0x3c06, 0x00, 0, 0}, {0x3c07, 0x07, 0, 0}, {0x3c08, 0x00, 0, 0},
+ {0x3c06, 0x00, 0, 0}, {0x3c07, 0x08, 0, 0}, {0x3c08, 0x00, 0, 0},
{0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
- {0x3820, 0x40, 0, 0}, {0x3821, 0x06, 0, 0}, {0x3814, 0x11, 0, 0},
- {0x3815, 0x11, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
- {0x3802, 0x00, 0, 0}, {0x3803, 0x00, 0, 0}, {0x3804, 0x0a, 0, 0},
- {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9f, 0, 0},
- {0x3808, 0x0a, 0, 0}, {0x3809, 0x20, 0, 0}, {0x380a, 0x07, 0, 0},
- {0x380b, 0x98, 0, 0}, {0x380c, 0x0b, 0, 0}, {0x380d, 0x1c, 0, 0},
- {0x380e, 0x07, 0, 0}, {0x380f, 0xb0, 0, 0}, {0x3810, 0x00, 0, 0},
- {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x04, 0, 0},
- {0x3618, 0x04, 0, 0}, {0x3612, 0x2b, 0, 0}, {0x3708, 0x21, 0, 0},
- {0x3709, 0x12, 0, 0}, {0x370c, 0x00, 0, 0}, {0x3a02, 0x07, 0, 0},
- {0x3a03, 0xb0, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
- {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x06, 0, 0},
- {0x3a0d, 0x08, 0, 0}, {0x3a14, 0x07, 0, 0}, {0x3a15, 0xb0, 0, 0},
- {0x4001, 0x02, 0, 0}, {0x4004, 0x06, 0, 0}, {0x3000, 0x00, 0, 0},
+ {0x3820, 0x41, 0, 0}, {0x3821, 0x07, 0, 0}, {0x3814, 0x31, 0, 0},
+ {0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
+ {0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
+ {0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
+ {0x3808, 0x02, 0, 0}, {0x3809, 0x80, 0, 0}, {0x380a, 0x01, 0, 0},
+ {0x380b, 0xe0, 0, 0}, {0x380c, 0x07, 0, 0}, {0x380d, 0x68, 0, 0},
+ {0x380e, 0x03, 0, 0}, {0x380f, 0xd8, 0, 0}, {0x3810, 0x00, 0, 0},
+ {0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
+ {0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
+ {0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
+ {0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
+ {0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
+ {0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
+ {0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0}, {0x3000, 0x00, 0, 0},
{0x3002, 0x1c, 0, 0}, {0x3004, 0xff, 0, 0}, {0x3006, 0xc3, 0, 0},
{0x300e, 0x58, 0, 0}, {0x302e, 0x00, 0, 0}, {0x4300, 0x30, 0, 0},
- {0x501f, 0x00, 0, 0}, {0x5000, 0xa7, 0, 0}, {0x5001, 0x83, 0, 0},
+ {0x501f, 0x00, 0, 0}, {0x4713, 0x03, 0, 0}, {0x4407, 0x04, 0, 0},
+ {0x440e, 0x00, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
+ {0x3824, 0x02, 0, 0}, {0x5000, 0xa7, 0, 0}, {0x5001, 0xa3, 0, 0},
{0x5180, 0xff, 0, 0}, {0x5181, 0xf2, 0, 0}, {0x5182, 0x00, 0, 0},
{0x5183, 0x14, 0, 0}, {0x5184, 0x25, 0, 0}, {0x5185, 0x24, 0, 0},
{0x5186, 0x09, 0, 0}, {0x5187, 0x09, 0, 0}, {0x5188, 0x09, 0, 0},
@@ -143,8 +146,8 @@ static struct reg_value ov5640_setting_15fps_QSXGA_2592_1944[] = {
{0x5195, 0xf0, 0, 0}, {0x5196, 0x03, 0, 0}, {0x5197, 0x01, 0, 0},
{0x5198, 0x04, 0, 0}, {0x5199, 0x12, 0, 0}, {0x519a, 0x04, 0, 0},
{0x519b, 0x00, 0, 0}, {0x519c, 0x06, 0, 0}, {0x519d, 0x82, 0, 0},
- {0x519e, 0x38, 0, 0}, {0x5381, 0x1c, 0, 0}, {0x5382, 0x5a, 0, 0},
- {0x5383, 0x06, 0, 0}, {0x5384, 0x0a, 0, 0}, {0x5385, 0x7e, 0, 0},
+ {0x519e, 0x38, 0, 0}, {0x5381, 0x1e, 0, 0}, {0x5382, 0x5b, 0, 0},
+ {0x5383, 0x08, 0, 0}, {0x5384, 0x0a, 0, 0}, {0x5385, 0x7e, 0, 0},
{0x5386, 0x88, 0, 0}, {0x5387, 0x7c, 0, 0}, {0x5388, 0x6c, 0, 0},
{0x5389, 0x10, 0, 0}, {0x538a, 0x01, 0, 0}, {0x538b, 0x98, 0, 0},
{0x5300, 0x08, 0, 0}, {0x5301, 0x30, 0, 0}, {0x5302, 0x10, 0, 0},
@@ -159,30 +162,84 @@ static struct reg_value ov5640_setting_15fps_QSXGA_2592_1944[] = {
{0x548f, 0xea, 0, 0}, {0x5490, 0x1d, 0, 0}, {0x5580, 0x02, 0, 0},
{0x5583, 0x40, 0, 0}, {0x5584, 0x10, 0, 0}, {0x5589, 0x10, 0, 0},
{0x558a, 0x00, 0, 0}, {0x558b, 0xf8, 0, 0}, {0x5800, 0x23, 0, 0},
- {0x5801, 0x15, 0, 0}, {0x5802, 0x10, 0, 0}, {0x5803, 0x10, 0, 0},
- {0x5804, 0x15, 0, 0}, {0x5805, 0x23, 0, 0}, {0x5806, 0x0c, 0, 0},
+ {0x5801, 0x14, 0, 0}, {0x5802, 0x0f, 0, 0}, {0x5803, 0x0f, 0, 0},
+ {0x5804, 0x12, 0, 0}, {0x5805, 0x26, 0, 0}, {0x5806, 0x0c, 0, 0},
{0x5807, 0x08, 0, 0}, {0x5808, 0x05, 0, 0}, {0x5809, 0x05, 0, 0},
- {0x580a, 0x08, 0, 0}, {0x580b, 0x0c, 0, 0}, {0x580c, 0x07, 0, 0},
+ {0x580a, 0x08, 0, 0}, {0x580b, 0x0d, 0, 0}, {0x580c, 0x08, 0, 0},
{0x580d, 0x03, 0, 0}, {0x580e, 0x00, 0, 0}, {0x580f, 0x00, 0, 0},
- {0x5810, 0x03, 0, 0}, {0x5811, 0x07, 0, 0}, {0x5812, 0x07, 0, 0},
- {0x5813, 0x03, 0, 0}, {0x5814, 0x00, 0, 0}, {0x5815, 0x00, 0, 0},
- {0x5816, 0x03, 0, 0}, {0x5817, 0x07, 0, 0}, {0x5818, 0x0b, 0, 0},
- {0x5819, 0x08, 0, 0}, {0x581a, 0x05, 0, 0}, {0x581b, 0x05, 0, 0},
- {0x581c, 0x07, 0, 0}, {0x581d, 0x0b, 0, 0}, {0x581e, 0x2a, 0, 0},
- {0x581f, 0x16, 0, 0}, {0x5820, 0x11, 0, 0}, {0x5821, 0x11, 0, 0},
- {0x5822, 0x15, 0, 0}, {0x5823, 0x29, 0, 0}, {0x5824, 0xbf, 0, 0},
- {0x5825, 0xaf, 0, 0}, {0x5826, 0x9f, 0, 0}, {0x5827, 0xaf, 0, 0},
- {0x5828, 0xdf, 0, 0}, {0x5829, 0x6f, 0, 0}, {0x582a, 0x8e, 0, 0},
- {0x582b, 0xab, 0, 0}, {0x582c, 0x9e, 0, 0}, {0x582d, 0x7f, 0, 0},
- {0x582e, 0x4f, 0, 0}, {0x582f, 0x89, 0, 0}, {0x5830, 0x86, 0, 0},
- {0x5831, 0x98, 0, 0}, {0x5832, 0x6f, 0, 0}, {0x5833, 0x4f, 0, 0},
- {0x5834, 0x6e, 0, 0}, {0x5835, 0x7b, 0, 0}, {0x5836, 0x7e, 0, 0},
- {0x5837, 0x6f, 0, 0}, {0x5838, 0xde, 0, 0}, {0x5839, 0xbf, 0, 0},
- {0x583a, 0x9f, 0, 0}, {0x583b, 0xbf, 0, 0}, {0x583c, 0xec, 0, 0},
- {0x5025, 0x00, 0, 0}, {0x3a0f, 0x30, 0, 0}, {0x3a10, 0x28, 0, 0},
- {0x3a1b, 0x30, 0, 0}, {0x3a1e, 0x26, 0, 0}, {0x3a11, 0x60, 0, 0},
- {0x3a1f, 0x14, 0, 0}, {0x3008, 0x02, 0, 0}, {0x3035, 0x11, 0, 0},
- {0x3036, 0x46, 0, 0},
+ {0x5810, 0x03, 0, 0}, {0x5811, 0x09, 0, 0}, {0x5812, 0x07, 0, 0},
+ {0x5813, 0x03, 0, 0}, {0x5814, 0x00, 0, 0}, {0x5815, 0x01, 0, 0},
+ {0x5816, 0x03, 0, 0}, {0x5817, 0x08, 0, 0}, {0x5818, 0x0d, 0, 0},
+ {0x5819, 0x08, 0, 0}, {0x581a, 0x05, 0, 0}, {0x581b, 0x06, 0, 0},
+ {0x581c, 0x08, 0, 0}, {0x581d, 0x0e, 0, 0}, {0x581e, 0x29, 0, 0},
+ {0x581f, 0x17, 0, 0}, {0x5820, 0x11, 0, 0}, {0x5821, 0x11, 0, 0},
+ {0x5822, 0x15, 0, 0}, {0x5823, 0x28, 0, 0}, {0x5824, 0x46, 0, 0},
+ {0x5825, 0x26, 0, 0}, {0x5826, 0x08, 0, 0}, {0x5827, 0x26, 0, 0},
+ {0x5828, 0x64, 0, 0}, {0x5829, 0x26, 0, 0}, {0x582a, 0x24, 0, 0},
+ {0x582b, 0x22, 0, 0}, {0x582c, 0x24, 0, 0}, {0x582d, 0x24, 0, 0},
+ {0x582e, 0x06, 0, 0}, {0x582f, 0x22, 0, 0}, {0x5830, 0x40, 0, 0},
+ {0x5831, 0x42, 0, 0}, {0x5832, 0x24, 0, 0}, {0x5833, 0x26, 0, 0},
+ {0x5834, 0x24, 0, 0}, {0x5835, 0x22, 0, 0}, {0x5836, 0x22, 0, 0},
+ {0x5837, 0x26, 0, 0}, {0x5838, 0x44, 0, 0}, {0x5839, 0x24, 0, 0},
+ {0x583a, 0x26, 0, 0}, {0x583b, 0x28, 0, 0}, {0x583c, 0x42, 0, 0},
+ {0x583d, 0xce, 0, 0}, {0x5025, 0x00, 0, 0}, {0x3a0f, 0x30, 0, 0},
+ {0x3a10, 0x28, 0, 0}, {0x3a1b, 0x30, 0, 0}, {0x3a1e, 0x26, 0, 0},
+ {0x3a11, 0x60, 0, 0}, {0x3a1f, 0x14, 0, 0}, {0x3008, 0x02, 0, 0},
+ {0x3035, 0x21, 0, 0}, {0x3c01, 0xb4, 0, 0}, {0x3c00, 0x04, 0, 0},
+ {0x3a19, 0x7c, 0, 0}, {0x5800, 0x2c, 0, 0}, {0x5801, 0x17, 0, 0},
+ {0x5802, 0x11, 0, 0}, {0x5803, 0x11, 0, 0}, {0x5804, 0x15, 0, 0},
+ {0x5805, 0x29, 0, 0}, {0x5806, 0x08, 0, 0}, {0x5807, 0x06, 0, 0},
+ {0x5808, 0x04, 0, 0}, {0x5809, 0x04, 0, 0}, {0x580a, 0x05, 0, 0},
+ {0x580b, 0x07, 0, 0}, {0x580c, 0x06, 0, 0}, {0x580d, 0x03, 0, 0},
+ {0x580e, 0x01, 0, 0}, {0x580f, 0x01, 0, 0}, {0x5810, 0x03, 0, 0},
+ {0x5811, 0x06, 0, 0}, {0x5812, 0x06, 0, 0}, {0x5813, 0x02, 0, 0},
+ {0x5814, 0x01, 0, 0}, {0x5815, 0x01, 0, 0}, {0x5816, 0x04, 0, 0},
+ {0x5817, 0x07, 0, 0}, {0x5818, 0x06, 0, 0}, {0x5819, 0x07, 0, 0},
+ {0x581a, 0x06, 0, 0}, {0x581b, 0x06, 0, 0}, {0x581c, 0x06, 0, 0},
+ {0x581d, 0x0e, 0, 0}, {0x581e, 0x31, 0, 0}, {0x581f, 0x12, 0, 0},
+ {0x5820, 0x11, 0, 0}, {0x5821, 0x11, 0, 0}, {0x5822, 0x11, 0, 0},
+ {0x5823, 0x2f, 0, 0}, {0x5824, 0x12, 0, 0}, {0x5825, 0x25, 0, 0},
+ {0x5826, 0x39, 0, 0}, {0x5827, 0x29, 0, 0}, {0x5828, 0x27, 0, 0},
+ {0x5829, 0x39, 0, 0}, {0x582a, 0x26, 0, 0}, {0x582b, 0x33, 0, 0},
+ {0x582c, 0x24, 0, 0}, {0x582d, 0x39, 0, 0}, {0x582e, 0x28, 0, 0},
+ {0x582f, 0x21, 0, 0}, {0x5830, 0x40, 0, 0}, {0x5831, 0x21, 0, 0},
+ {0x5832, 0x17, 0, 0}, {0x5833, 0x17, 0, 0}, {0x5834, 0x15, 0, 0},
+ {0x5835, 0x11, 0, 0}, {0x5836, 0x24, 0, 0}, {0x5837, 0x27, 0, 0},
+ {0x5838, 0x26, 0, 0}, {0x5839, 0x26, 0, 0}, {0x583a, 0x26, 0, 0},
+ {0x583b, 0x28, 0, 0}, {0x583c, 0x14, 0, 0}, {0x583d, 0xee, 0, 0},
+ {0x4005, 0x1a, 0, 0}, {0x5381, 0x26, 0, 0}, {0x5382, 0x50, 0, 0},
+ {0x5383, 0x0c, 0, 0}, {0x5384, 0x09, 0, 0}, {0x5385, 0x74, 0, 0},
+ {0x5386, 0x7d, 0, 0}, {0x5387, 0x7e, 0, 0}, {0x5388, 0x75, 0, 0},
+ {0x5389, 0x09, 0, 0}, {0x538b, 0x98, 0, 0}, {0x538a, 0x01, 0, 0},
+ {0x5580, 0x02, 0, 0}, {0x5588, 0x01, 0, 0}, {0x5583, 0x40, 0, 0},
+ {0x5584, 0x10, 0, 0}, {0x5589, 0x0f, 0, 0}, {0x558a, 0x00, 0, 0},
+ {0x558b, 0x3f, 0, 0}, {0x5308, 0x25, 0, 0}, {0x5304, 0x08, 0, 0},
+ {0x5305, 0x30, 0, 0}, {0x5306, 0x10, 0, 0}, {0x5307, 0x20, 0, 0},
+ {0x5180, 0xff, 0, 0}, {0x5181, 0xf2, 0, 0}, {0x5182, 0x11, 0, 0},
+ {0x5183, 0x14, 0, 0}, {0x5184, 0x25, 0, 0}, {0x5185, 0x24, 0, 0},
+ {0x5186, 0x10, 0, 0}, {0x5187, 0x12, 0, 0}, {0x5188, 0x10, 0, 0},
+ {0x5189, 0x80, 0, 0}, {0x518a, 0x54, 0, 0}, {0x518b, 0xb8, 0, 0},
+ {0x518c, 0xb2, 0, 0}, {0x518d, 0x42, 0, 0}, {0x518e, 0x3a, 0, 0},
+ {0x518f, 0x56, 0, 0}, {0x5190, 0x46, 0, 0}, {0x5191, 0xf0, 0, 0},
+ {0x5192, 0x0f, 0, 0}, {0x5193, 0x70, 0, 0}, {0x5194, 0xf0, 0, 0},
+ {0x5195, 0xf0, 0, 0}, {0x5196, 0x03, 0, 0}, {0x5197, 0x01, 0, 0},
+ {0x5198, 0x06, 0, 0}, {0x5199, 0x62, 0, 0}, {0x519a, 0x04, 0, 0},
+ {0x519b, 0x00, 0, 0}, {0x519c, 0x04, 0, 0}, {0x519d, 0xe7, 0, 0},
+ {0x519e, 0x38, 0, 0}, {0x3820, 0x40, 0, 0}, {0x3821, 0x06, 0, 0},
+ {0x3814, 0x11, 0, 0}, {0x3815, 0x11, 0, 0}, {0x3803, 0x00, 0, 0},
+ {0x3807, 0x9f, 0, 0}, {0x3808, 0x0a, 0, 0}, {0x3809, 0x20, 0, 0},
+ {0x380a, 0x07, 0, 0}, {0x380b, 0x98, 0, 0}, {0x380c, 0x0b, 0, 0},
+ {0x380d, 0x1c, 0, 0}, {0x380e, 0x07, 0, 0}, {0x380f, 0xb0, 0, 0},
+ {0x3813, 0x04, 0, 0}, {0x3618, 0x04, 0, 0}, {0x3612, 0x4b, 0, 0},
+ {0x3708, 0x21, 0, 0}, {0x3709, 0x12, 0, 0}, {0x370c, 0x00, 0, 0},
+ {0x3a02, 0x07, 0, 0}, {0x3a03, 0xb0, 0, 0}, {0x3a0e, 0x06, 0, 0},
+ {0x3a0d, 0x08, 0, 0}, {0x3a14, 0x07, 0, 0}, {0x3a15, 0xb0, 0, 0},
+ {0x4004, 0x06, 0, 0}, {0x5000, 0x07, 0, 0}, {0x5181, 0x52, 0, 0},
+ {0x5182, 0x00, 0, 0}, {0x5197, 0x01, 0, 0}, {0x519e, 0x38, 0, 0},
+ {0x3035, 0x21, 0, 0}, {0x5000, 0x27, 0, 0}, {0x5001, 0x83, 0, 0},
+ {0x3035, 0x71, 0, 0}, {0x4713, 0x02, 0, 0}, {0x3036, 0x69, 0, 0},
+ {0x4407, 0x0c, 0, 0}, {0x460b, 0x37, 0, 0}, {0x460c, 0x20, 0, 0},
+ {0x3824, 0x01, 0, 0}, {0x4005, 0x1A, 0, 0},
};
static struct reg_value ov5640_setting_30fps_VGA_640_480[] = {
diff --git a/drivers/rtc/rtc-snvs.c b/drivers/rtc/rtc-snvs.c
index dfd784936b28..8000dc3325b0 100644
--- a/drivers/rtc/rtc-snvs.c
+++ b/drivers/rtc/rtc-snvs.c
@@ -78,6 +78,10 @@
#define SSM_ST_NON_SECURE 0xB
#define CNTR_TO_SECS_SH 15 /* Converts 47-bit counter to 32-bit seconds */
+#define RTC_READ_TIME_47BIT _IOR('p', 0x20, unsigned long long)
+/* blocks until LPSCMR is set, returns difference */
+#define RTC_WAIT_TIME_SET _IOR('p', 0x21, int64_t)
+
struct rtc_drv_data {
struct rtc_device *rtc;
void __iomem *ioaddr;
@@ -89,6 +93,8 @@ struct rtc_drv_data {
static unsigned long rtc_status;
static DEFINE_SPINLOCK(rtc_lock);
+DECLARE_COMPLETION(snvs_completion);
+static int64_t time_diff;
/*!
* LP counter register reads should always use this function.
@@ -294,11 +300,16 @@ static int snvs_rtc_set_time(struct device *dev, struct rtc_time *tm)
unsigned long time;
int ret;
u32 lp_cr;
+ u64 old_time_47bit, new_time_47bit;
ret = rtc_tm_to_time(tm, &time);
if (ret != 0)
return ret;
+ old_time_47bit = (((u64) (__raw_readl(ioaddr + SNVS_LPSRTCMR) &
+ ((0x1 << CNTR_TO_SECS_SH) - 1)) << 32) |
+ ((u64) __raw_readl(ioaddr + SNVS_LPSRTCLR)));
+
/* Disable RTC first */
lp_cr = __raw_readl(ioaddr + SNVS_LPCR) & ~SNVS_LPCR_SRTC_ENV;
__raw_writel(lp_cr, ioaddr + SNVS_LPCR);
@@ -314,6 +325,22 @@ static int snvs_rtc_set_time(struct device *dev, struct rtc_time *tm)
while (!(__raw_readl(ioaddr + SNVS_LPCR) & SNVS_LPCR_SRTC_ENV))
;
+ rtc_write_sync_lp(ioaddr);
+
+ new_time_47bit = (((u64) (__raw_readl(ioaddr + SNVS_LPSRTCMR) &
+ ((0x1 << CNTR_TO_SECS_SH) - 1)) << 32) |
+ ((u64) __raw_readl(ioaddr + SNVS_LPSRTCLR)));
+
+ time_diff = new_time_47bit - old_time_47bit;
+
+ /* signal all waiting threads that time changed */
+ complete_all(&snvs_completion);
+
+ /* allow signalled threads to handle the time change notification */
+ schedule();
+
+ /* reinitialize completion variable */
+ INIT_COMPLETION(snvs_completion);
return 0;
}
@@ -447,6 +474,58 @@ static int snvs_rtc_alarm_irq_enable(struct device *dev, unsigned int enable)
}
/*!
+ * This function is used to support some ioctl calls directly.
+ * Other ioctl calls are supported indirectly through the
+ * arm/common/rtctime.c file.
+ *
+ * @param cmd ioctl command as defined in include/linux/rtc.h
+ * @param arg value for the ioctl command
+ *
+ * @return 0 if successful or negative value otherwise.
+ */
+static int snvs_rtc_ioctl(struct device *dev, unsigned int cmd,
+ unsigned long arg)
+{
+ struct rtc_drv_data *pdata = dev_get_drvdata(dev);
+ void __iomem *ioaddr = pdata->ioaddr;
+ u64 time_47bit;
+ int retVal;
+
+ switch (cmd) {
+ case RTC_READ_TIME_47BIT:
+ time_47bit = (((u64) (__raw_readl(ioaddr + SNVS_LPSRTCMR) &
+ ((0x1 << CNTR_TO_SECS_SH) - 1)) << 32) |
+ ((u64) __raw_readl(ioaddr + SNVS_LPSRTCLR)));
+
+ if (arg && copy_to_user((u64 *) arg, &time_47bit, sizeof(u64)))
+ return -EFAULT;
+
+ return 0;
+
+ /* This IOCTL to be used by processes to be notified of time changes */
+ case RTC_WAIT_TIME_SET:
+ /* don't block without releasing mutex first */
+ mutex_unlock(&pdata->rtc->ops_lock);
+
+ /* sleep until awakened by SRTC driver when LPSCMR is changed */
+ wait_for_completion(&snvs_completion);
+
+ /* relock mutex because rtc_dev_ioctl will unlock again */
+ retVal = mutex_lock_interruptible(&pdata->rtc->ops_lock);
+
+ /* copy the new time difference = new time - previous time
+ * to the user param. The difference is a signed value */
+ if (arg && copy_to_user((int64_t *) arg, &time_diff,
+ sizeof(int64_t)))
+ return -EFAULT;
+
+ return retVal;
+
+ }
+
+ return -ENOIOCTLCMD;
+}
+/*!
* The RTC driver structure
*/
static struct rtc_class_ops snvs_rtc_ops = {
@@ -457,6 +536,7 @@ static struct rtc_class_ops snvs_rtc_ops = {
.read_alarm = snvs_rtc_read_alarm,
.set_alarm = snvs_rtc_set_alarm,
.proc = snvs_rtc_proc,
+ .ioctl = snvs_rtc_ioctl,
.alarm_irq_enable = snvs_rtc_alarm_irq_enable,
};
diff --git a/drivers/video/mxc_hdmi.c b/drivers/video/mxc_hdmi.c
index 46d93efb631e..e73ec4508ca7 100644
--- a/drivers/video/mxc_hdmi.c
+++ b/drivers/video/mxc_hdmi.c
@@ -826,7 +826,7 @@ static void mxc_hdmi_phy_sel_interface_control(u8 enable)
static int hdmi_phy_configure(struct mxc_hdmi *hdmi, unsigned char pRep,
unsigned char cRes, int cscOn)
{
- u8 val, clkdis;
+ u8 val;
dev_dbg(&hdmi->pdev->dev, "%s\n", __func__);
@@ -839,6 +839,7 @@ static int hdmi_phy_configure(struct mxc_hdmi *hdmi, unsigned char pRep,
else if (cRes != 8 && cRes != 12)
return false;
+ /* Enable csc path */
if (cscOn)
val = HDMI_MC_FLOWCTRL_FEED_THROUGH_OFF_CSC_IN_PATH;
else
@@ -846,13 +847,6 @@ static int hdmi_phy_configure(struct mxc_hdmi *hdmi, unsigned char pRep,
hdmi_writeb(val, HDMI_MC_FLOWCTRL);
- /* Enable csc path */
- if (cscOn) {
- clkdis = hdmi_readb(HDMI_MC_CLKDIS);
- clkdis &= ~HDMI_MC_CLKDIS_CSCCLK_DISABLE;
- hdmi_writeb(clkdis, HDMI_MC_CLKDIS);
- }
-
/* gen2 tx power off */
mxc_hdmi_phy_gen2_txpwron(0);
@@ -1438,6 +1432,12 @@ static void mxc_hdmi_enable_video_path(struct mxc_hdmi *hdmi)
clkdis &= ~HDMI_MC_CLKDIS_TMDSCLK_DISABLE;
hdmi_writeb(clkdis, HDMI_MC_CLKDIS);
+
+ /* Enable csc path */
+ if (isColorSpaceConversion(hdmi)) {
+ clkdis &= ~HDMI_MC_CLKDIS_CSCCLK_DISABLE;
+ hdmi_writeb(clkdis, HDMI_MC_CLKDIS);
+ }
}
static void hdmi_enable_audio_clk(struct mxc_hdmi *hdmi)