* [PATCH 3/3] clk: mmp: try to use closer one when do round rate
From: Chao Xie @ 2014-01-23 2:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390445262-27486-1-git-send-email-chao.xie@marvell.com>
From: Chao Xie <chao.xie@marvell.com>
The orignal code will use the bigger rate between
"previous rate" and "current rate" when caculate the
rate.
In fact, hardware cares about the closest one.
So choose the closer rate between "previous rate" and
"current rate".
Signed-off-by: Chao Xie <chao.xie@marvell.com>
---
drivers/clk/mmp/clk-frac.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/mmp/clk-frac.c b/drivers/clk/mmp/clk-frac.c
index 5863a37..23a56f5 100644
--- a/drivers/clk/mmp/clk-frac.c
+++ b/drivers/clk/mmp/clk-frac.c
@@ -45,10 +45,14 @@ static long clk_factor_round_rate(struct clk_hw *hw, unsigned long drate,
if (rate > drate)
break;
}
- if ((i == 0) || (i == factor->ftbl_cnt))
+ if ((i == 0) || (i == factor->ftbl_cnt)) {
return rate;
- else
- return prev_rate;
+ } else {
+ if ((drate - prev_rate) > (rate - drate))
+ return rate;
+ else
+ return prev_rate;
+ }
}
static unsigned long clk_factor_recalc_rate(struct clk_hw *hw,
--
1.8.3.2
^ permalink raw reply related
* Internal error: Oops: 17 [#1] ARM
From: walimis @ 2014-01-23 3:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACUGKYPXficVuqDgy6_Tnh9b-VOXDNK=+nqb6U5O6NpcZOGGpQ@mail.gmail.com>
On Wed, Jan 22, 2014 at 08:23:36AM -0800, John Tobias wrote:
>Hello all,
>
>I am using 3.13-rc1 kernel on iMX6SL processor. My filesystem is in
>eMMC running SDR50.
>Is anyone here encountered these problem and if there's any existing
>patch that I can get?.
hi,
Do you use gcc 4.8.1? If so, maybe you should look at following link
to see whether it's a similar issue.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
Liming Wang
>
>Regards,
>
>john
>
>[ 1552.394899] Unable to handle kernel NULL pointer dereference at
>virtual address 00000037
>[ 1552.403034] pgd = beef4000
>[ 1552.405855] [00000037] *pgd=bef60831, *pte=00000000, *ppte=00000000
>[ 1552.412245] Internal error: Oops: 17 [#1] ARM
>[ 1552.416627] Modules linked in: bt8xxx(O) sd8xxx(O) mlan(O)
>[ 1552.422249] CPU: 0 PID: 232 Comm: commsd Tainted: G O 3.13.0-rc1 #7
>[ 1552.429409] task: bfbc7500 ti: bec96000 task.ti: bec96000
>[ 1552.434844] PC is at lookup_fast+0x5c/0x318
>[ 1552.439067] LR is at mark_held_locks+0x78/0x13c
>[ 1552.443622] pc : [<80101184>] lr : [<80056e48>] psr: a00f0013
>[ 1552.443622] sp : bec97d88 ip : 00666e6f fp : bec97ddc
>[ 1552.455124] r10: 00000000 r9 : bec97e08 r8 : 80102d94
>[ 1552.460370] r7 : bec97e60 r6 : bf133ac8 r5 : bec97e60 r4 : bec97e00
>[ 1552.466918] r3 : bee4f01d r2 : 00000000 r1 : ffffffff r0 : ffffffff
>[ 1552.473471] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
>[ 1552.480629] Control: 10c53c7d Table: beef4059 DAC: 00000015
>[ 1552.486397] Process commsd (pid: 232, stack limit = 0xbec96238)
>[ 1552.492341] Stack: (0xbec97d88 to 0xbec98000)
>[ 1552.496728] 7d80: 80102b94 80057108 bfb95310
>bf133ac8 bf15f4e8 bfb95310
>[ 1552.504936] 7da0: c08bb14d ffffffff bee4f015 00000008 bfbc7500
>bec97e08 00000000 00000041
>[ 1552.513142] 7dc0: bec97e60 bec96020 bec96000 00000000 bec97e3c
>bec97de0 80102d94 80101134
>[ 1552.521347] 7de0: bec97df8 00000000 800d982c bec96018 00000010
>bec97e00 00000000 bec97e08
>[ 1552.529553] 7e00: 8026e25c 800d97e8 bee4f000 00000ff0 80d4e3a4
>00000001 bee4f000 bec97e60
>[ 1552.537758] 7e20: ffffff9c ffffff9c bec96000 00000000 bec97e5c
>bec97e40 801033bc 80102c70
>[ 1552.545964] 7e40: bee4f000 00000001 bec97e60 bec97f00 bec97ee4
>bec97e60 80105dc0 80103398
>[ 1552.554170] 7e60: bfb95310 bf133ac8 c08bb14d 0000000b bee4f015
>8005992c bfb95310 bf133398
>[ 1552.562375] 7e80: bf15f4e8 00000041 00000002 0000008a 00000000
>00000000 600f0013 bec96000
>[ 1552.570581] 7ea0: ffffffea bf8c1840 807b4430 80115444 801156e4
>8011563c 00000008 00000000
>[ 1552.578786] 7ec0: bec97f04 733fe4e0 00000001 ffffff9c 757e3810
>bec97f40 bec97efc bec97ee8
>[ 1552.586991] 7ee0: 80105e0c 80105d68 00000000 bc950fe0 bec97f2c
>bec97f00 800faf64 80105df4
>[ 1552.595196] 7f00: 801156e4 80115420 bec97f54 733fe4e0 733ff8f0
>733fe61c 000000c3 8000f504
>[ 1552.603402] 7f20: bec97f3c bec97f30 800fafe0 800faf1c bec97fa4
>bec97f40 800fb71c 800fafc4
>[ 1552.611608] 7f40: 8000f310 bfbc7500 733fe550 8000f458 733fe61c
>000000c3 bec97f84 bec97f68
>[ 1552.619813] 7f60: 80056f28 800a0270 733fe550 733ff8f0 733fe61c
>000000c3 bec97f94 bec97f88
>[ 1552.628019] 7f80: 80057110 80056f18 00000000 bec97f98 8000f458
>733fe550 00000000 bec97fa8
>[ 1552.636226] 7fa0: 8000f280 800fb704 733fe550 733ff8f0 757e3810
>733fe4e0 733fe550 00000003
>[ 1552.644431] 7fc0: 733fe550 733ff8f0 733fe61c 000000c3 00000000
>00000002 733fe92c 00000200
>[ 1552.652636] 7fe0: 000000c3 733fe4d8 7579b7e5 7572e276 200f0030
>757e3810 bfffd821 bfffdc21
>[ 1552.660828] Backtrace:
>[ 1552.663343] [<80101128>] (lookup_fast+0x0/0x318) from [<80102d94>]
>(path_lookupat+0x130/0x728)
>[ 1552.671994] [<80102c64>] (path_lookupat+0x0/0x728) from
>[<801033bc>] (filename_lookup.isra.40+0x30/0x70)
>[ 1552.681515] [<8010338c>] (filename_lookup.isra.40+0x0/0x70) from
>[<80105dc0>] (user_path_at_empty+0x64/0x8c)
>[ 1552.691361] r7:bec97f00 r6:bec97e60 r5:00000001 r4:bee4f000
>[ 1552.697163] [<80105d5c>] (user_path_at_empty+0x0/0x8c) from
>[<80105e0c>] (user_path_at+0x24/0x2c)
>[ 1552.706053] r8:bec97f40 r7:757e3810 r6:ffffff9c r5:00000001 r4:733fe4e0
>[ 1552.712927] [<80105de8>] (user_path_at+0x0/0x2c) from [<800faf64>]
>(vfs_fstatat+0x54/0xa8)
>[ 1552.721232] [<800faf10>] (vfs_fstatat+0x0/0xa8) from [<800fafe0>]
>(vfs_stat+0x28/0x2c)
>[ 1552.729167] r8:8000f504 r7:000000c3 r6:733fe61c r5:733ff8f0 r4:733fe4e0
>[ 1552.736031] [<800fafb8>] (vfs_stat+0x0/0x2c) from [<800fb71c>]
>(SyS_stat64+0x24/0x40)
>[ 1552.743902] [<800fb6f8>] (SyS_stat64+0x0/0x40) from [<8000f280>]
>(ret_fast_syscall+0x0/0x48)
>[ 1552.752359] r4:733fe550
>[ 1552.754946] Code: eb00352d e3500000 e50b0038 0a000080 (e5903038)
>[ 1552.761270] ---[ end trace 02679086a39365e8 ]---
>[ 1552.765968] Kernel panic - not syncing: Fatal exception
>
>_______________________________________________
>linux-arm-kernel mailing list
>linux-arm-kernel at lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Internal error: Oops: 17 [#1] ARM
From: John Tobias @ 2014-01-23 3:25 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOMZO5BhZspH3FfDh+3z0xBpgxWEHK1Fa5KOYsN5og2VfGktXQ@mail.gmail.com>
Hi Fabio,
Attached are the two patch files that I applied in the 3.13 released
so that the kernel will detect my eMMC in DDR50.
(let me correct my previous email, I was mentioning SDR50 but it
should be DDR50).
eMMC info:
clock: 52000000 Hz
actual clock: 49500000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 3 (8 bits)
timing spec: 1 (mmc high-speed)
signal voltage: 0 (3.30 V)
I reboot my device often and it shows during the reboot.
Regards,
john
On Wed, Jan 22, 2014 at 6:28 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Wed, Jan 22, 2014 at 9:49 PM, John Tobias <john.tobias.ph@gmail.com> wrote:
>> Hello all,
>>
>> Just to confirm that the error I posted previously exist in 3.13
>> released. Just be noted that some patches related to eMMC/sdhci has
>> been applied in order to boot the 3.13 on my board.
>> Addition to that, I was getting additional errors (please see below):
>> - It happened during the reboot.
>>
>> Cc'ng Dong Aisheng.
>
> What are the steps to reproduce this? Which SoC are you using?
>
> Regards,
>
> Fabio Estevam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdhci-esdhc-imx.patch
Type: application/octet-stream
Size: 2464 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140122/15d70bc1/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdhci.patch
Type: application/octet-stream
Size: 2522 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140122/15d70bc1/attachment-0001.obj>
^ permalink raw reply
* Internal error: Oops: 17 [#1] ARM
From: John Tobias @ 2014-01-23 3:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140123030103.GC18520@pek-lwang0-d1>
Hi Liming,
Yes, I am using 4.8.1. I switched back to 4.7.3 and will test it again
if I can re-produce it.
Regards,
john
On Wed, Jan 22, 2014 at 7:01 PM, walimis <walimisdev@gmail.com> wrote:
> On Wed, Jan 22, 2014 at 08:23:36AM -0800, John Tobias wrote:
>>Hello all,
>>
>>I am using 3.13-rc1 kernel on iMX6SL processor. My filesystem is in
>>eMMC running SDR50.
>>Is anyone here encountered these problem and if there's any existing
>>patch that I can get?.
> hi,
>
> Do you use gcc 4.8.1? If so, maybe you should look at following link
> to see whether it's a similar issue.
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
>
> Liming Wang
>
>>
>>Regards,
>>
>>john
>>
>>[ 1552.394899] Unable to handle kernel NULL pointer dereference at
>>virtual address 00000037
>>[ 1552.403034] pgd = beef4000
>>[ 1552.405855] [00000037] *pgd=bef60831, *pte=00000000, *ppte=00000000
>>[ 1552.412245] Internal error: Oops: 17 [#1] ARM
>>[ 1552.416627] Modules linked in: bt8xxx(O) sd8xxx(O) mlan(O)
>>[ 1552.422249] CPU: 0 PID: 232 Comm: commsd Tainted: G O 3.13.0-rc1 #7
>>[ 1552.429409] task: bfbc7500 ti: bec96000 task.ti: bec96000
>>[ 1552.434844] PC is at lookup_fast+0x5c/0x318
>>[ 1552.439067] LR is at mark_held_locks+0x78/0x13c
>>[ 1552.443622] pc : [<80101184>] lr : [<80056e48>] psr: a00f0013
>>[ 1552.443622] sp : bec97d88 ip : 00666e6f fp : bec97ddc
>>[ 1552.455124] r10: 00000000 r9 : bec97e08 r8 : 80102d94
>>[ 1552.460370] r7 : bec97e60 r6 : bf133ac8 r5 : bec97e60 r4 : bec97e00
>>[ 1552.466918] r3 : bee4f01d r2 : 00000000 r1 : ffffffff r0 : ffffffff
>>[ 1552.473471] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
>>[ 1552.480629] Control: 10c53c7d Table: beef4059 DAC: 00000015
>>[ 1552.486397] Process commsd (pid: 232, stack limit = 0xbec96238)
>>[ 1552.492341] Stack: (0xbec97d88 to 0xbec98000)
>>[ 1552.496728] 7d80: 80102b94 80057108 bfb95310
>>bf133ac8 bf15f4e8 bfb95310
>>[ 1552.504936] 7da0: c08bb14d ffffffff bee4f015 00000008 bfbc7500
>>bec97e08 00000000 00000041
>>[ 1552.513142] 7dc0: bec97e60 bec96020 bec96000 00000000 bec97e3c
>>bec97de0 80102d94 80101134
>>[ 1552.521347] 7de0: bec97df8 00000000 800d982c bec96018 00000010
>>bec97e00 00000000 bec97e08
>>[ 1552.529553] 7e00: 8026e25c 800d97e8 bee4f000 00000ff0 80d4e3a4
>>00000001 bee4f000 bec97e60
>>[ 1552.537758] 7e20: ffffff9c ffffff9c bec96000 00000000 bec97e5c
>>bec97e40 801033bc 80102c70
>>[ 1552.545964] 7e40: bee4f000 00000001 bec97e60 bec97f00 bec97ee4
>>bec97e60 80105dc0 80103398
>>[ 1552.554170] 7e60: bfb95310 bf133ac8 c08bb14d 0000000b bee4f015
>>8005992c bfb95310 bf133398
>>[ 1552.562375] 7e80: bf15f4e8 00000041 00000002 0000008a 00000000
>>00000000 600f0013 bec96000
>>[ 1552.570581] 7ea0: ffffffea bf8c1840 807b4430 80115444 801156e4
>>8011563c 00000008 00000000
>>[ 1552.578786] 7ec0: bec97f04 733fe4e0 00000001 ffffff9c 757e3810
>>bec97f40 bec97efc bec97ee8
>>[ 1552.586991] 7ee0: 80105e0c 80105d68 00000000 bc950fe0 bec97f2c
>>bec97f00 800faf64 80105df4
>>[ 1552.595196] 7f00: 801156e4 80115420 bec97f54 733fe4e0 733ff8f0
>>733fe61c 000000c3 8000f504
>>[ 1552.603402] 7f20: bec97f3c bec97f30 800fafe0 800faf1c bec97fa4
>>bec97f40 800fb71c 800fafc4
>>[ 1552.611608] 7f40: 8000f310 bfbc7500 733fe550 8000f458 733fe61c
>>000000c3 bec97f84 bec97f68
>>[ 1552.619813] 7f60: 80056f28 800a0270 733fe550 733ff8f0 733fe61c
>>000000c3 bec97f94 bec97f88
>>[ 1552.628019] 7f80: 80057110 80056f18 00000000 bec97f98 8000f458
>>733fe550 00000000 bec97fa8
>>[ 1552.636226] 7fa0: 8000f280 800fb704 733fe550 733ff8f0 757e3810
>>733fe4e0 733fe550 00000003
>>[ 1552.644431] 7fc0: 733fe550 733ff8f0 733fe61c 000000c3 00000000
>>00000002 733fe92c 00000200
>>[ 1552.652636] 7fe0: 000000c3 733fe4d8 7579b7e5 7572e276 200f0030
>>757e3810 bfffd821 bfffdc21
>>[ 1552.660828] Backtrace:
>>[ 1552.663343] [<80101128>] (lookup_fast+0x0/0x318) from [<80102d94>]
>>(path_lookupat+0x130/0x728)
>>[ 1552.671994] [<80102c64>] (path_lookupat+0x0/0x728) from
>>[<801033bc>] (filename_lookup.isra.40+0x30/0x70)
>>[ 1552.681515] [<8010338c>] (filename_lookup.isra.40+0x0/0x70) from
>>[<80105dc0>] (user_path_at_empty+0x64/0x8c)
>>[ 1552.691361] r7:bec97f00 r6:bec97e60 r5:00000001 r4:bee4f000
>>[ 1552.697163] [<80105d5c>] (user_path_at_empty+0x0/0x8c) from
>>[<80105e0c>] (user_path_at+0x24/0x2c)
>>[ 1552.706053] r8:bec97f40 r7:757e3810 r6:ffffff9c r5:00000001 r4:733fe4e0
>>[ 1552.712927] [<80105de8>] (user_path_at+0x0/0x2c) from [<800faf64>]
>>(vfs_fstatat+0x54/0xa8)
>>[ 1552.721232] [<800faf10>] (vfs_fstatat+0x0/0xa8) from [<800fafe0>]
>>(vfs_stat+0x28/0x2c)
>>[ 1552.729167] r8:8000f504 r7:000000c3 r6:733fe61c r5:733ff8f0 r4:733fe4e0
>>[ 1552.736031] [<800fafb8>] (vfs_stat+0x0/0x2c) from [<800fb71c>]
>>(SyS_stat64+0x24/0x40)
>>[ 1552.743902] [<800fb6f8>] (SyS_stat64+0x0/0x40) from [<8000f280>]
>>(ret_fast_syscall+0x0/0x48)
>>[ 1552.752359] r4:733fe550
>>[ 1552.754946] Code: eb00352d e3500000 e50b0038 0a000080 (e5903038)
>>[ 1552.761270] ---[ end trace 02679086a39365e8 ]---
>>[ 1552.765968] Kernel panic - not syncing: Fatal exception
>>
>>_______________________________________________
>>linux-arm-kernel mailing list
>>linux-arm-kernel at lists.infradead.org
>>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Internal error: Oops: 17 [#1] ARM
From: walimis @ 2014-01-23 3:46 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACUGKYO-k0isyOvYtRMDQoSD+QrrifzLmpMZVG9tN_cfOX5Dcw@mail.gmail.com>
On Wed, Jan 22, 2014 at 07:28:55PM -0800, John Tobias wrote:
>Hi Liming,
>
>Yes, I am using 4.8.1. I switched back to 4.7.3 and will test it again
>if I can re-produce it.
Hi,
Or you can use the latest linaro 4.8.x toolchain, which has been applied that patch:
http://releases.linaro.org/13.12/components/toolchain/binaries/
Please select this one to try:
gcc-linaro-arm-linux-gnueabihf-4.8-2013.12_linux.tar.bz2
Liming Wang
>
>Regards,
>
>john
>
>On Wed, Jan 22, 2014 at 7:01 PM, walimis <walimisdev@gmail.com> wrote:
>> On Wed, Jan 22, 2014 at 08:23:36AM -0800, John Tobias wrote:
>>>Hello all,
>>>
>>>I am using 3.13-rc1 kernel on iMX6SL processor. My filesystem is in
>>>eMMC running SDR50.
>>>Is anyone here encountered these problem and if there's any existing
>>>patch that I can get?.
>> hi,
>>
>> Do you use gcc 4.8.1? If so, maybe you should look at following link
>> to see whether it's a similar issue.
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
>>
>> Liming Wang
>>
>>>
>>>Regards,
>>>
>>>john
>>>
>>>[ 1552.394899] Unable to handle kernel NULL pointer dereference at
>>>virtual address 00000037
>>>[ 1552.403034] pgd = beef4000
>>>[ 1552.405855] [00000037] *pgd=bef60831, *pte=00000000, *ppte=00000000
>>>[ 1552.412245] Internal error: Oops: 17 [#1] ARM
>>>[ 1552.416627] Modules linked in: bt8xxx(O) sd8xxx(O) mlan(O)
>>>[ 1552.422249] CPU: 0 PID: 232 Comm: commsd Tainted: G O 3.13.0-rc1 #7
>>>[ 1552.429409] task: bfbc7500 ti: bec96000 task.ti: bec96000
>>>[ 1552.434844] PC is at lookup_fast+0x5c/0x318
>>>[ 1552.439067] LR is at mark_held_locks+0x78/0x13c
>>>[ 1552.443622] pc : [<80101184>] lr : [<80056e48>] psr: a00f0013
>>>[ 1552.443622] sp : bec97d88 ip : 00666e6f fp : bec97ddc
>>>[ 1552.455124] r10: 00000000 r9 : bec97e08 r8 : 80102d94
>>>[ 1552.460370] r7 : bec97e60 r6 : bf133ac8 r5 : bec97e60 r4 : bec97e00
>>>[ 1552.466918] r3 : bee4f01d r2 : 00000000 r1 : ffffffff r0 : ffffffff
>>>[ 1552.473471] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
>>>[ 1552.480629] Control: 10c53c7d Table: beef4059 DAC: 00000015
>>>[ 1552.486397] Process commsd (pid: 232, stack limit = 0xbec96238)
>>>[ 1552.492341] Stack: (0xbec97d88 to 0xbec98000)
>>>[ 1552.496728] 7d80: 80102b94 80057108 bfb95310
>>>bf133ac8 bf15f4e8 bfb95310
>>>[ 1552.504936] 7da0: c08bb14d ffffffff bee4f015 00000008 bfbc7500
>>>bec97e08 00000000 00000041
>>>[ 1552.513142] 7dc0: bec97e60 bec96020 bec96000 00000000 bec97e3c
>>>bec97de0 80102d94 80101134
>>>[ 1552.521347] 7de0: bec97df8 00000000 800d982c bec96018 00000010
>>>bec97e00 00000000 bec97e08
>>>[ 1552.529553] 7e00: 8026e25c 800d97e8 bee4f000 00000ff0 80d4e3a4
>>>00000001 bee4f000 bec97e60
>>>[ 1552.537758] 7e20: ffffff9c ffffff9c bec96000 00000000 bec97e5c
>>>bec97e40 801033bc 80102c70
>>>[ 1552.545964] 7e40: bee4f000 00000001 bec97e60 bec97f00 bec97ee4
>>>bec97e60 80105dc0 80103398
>>>[ 1552.554170] 7e60: bfb95310 bf133ac8 c08bb14d 0000000b bee4f015
>>>8005992c bfb95310 bf133398
>>>[ 1552.562375] 7e80: bf15f4e8 00000041 00000002 0000008a 00000000
>>>00000000 600f0013 bec96000
>>>[ 1552.570581] 7ea0: ffffffea bf8c1840 807b4430 80115444 801156e4
>>>8011563c 00000008 00000000
>>>[ 1552.578786] 7ec0: bec97f04 733fe4e0 00000001 ffffff9c 757e3810
>>>bec97f40 bec97efc bec97ee8
>>>[ 1552.586991] 7ee0: 80105e0c 80105d68 00000000 bc950fe0 bec97f2c
>>>bec97f00 800faf64 80105df4
>>>[ 1552.595196] 7f00: 801156e4 80115420 bec97f54 733fe4e0 733ff8f0
>>>733fe61c 000000c3 8000f504
>>>[ 1552.603402] 7f20: bec97f3c bec97f30 800fafe0 800faf1c bec97fa4
>>>bec97f40 800fb71c 800fafc4
>>>[ 1552.611608] 7f40: 8000f310 bfbc7500 733fe550 8000f458 733fe61c
>>>000000c3 bec97f84 bec97f68
>>>[ 1552.619813] 7f60: 80056f28 800a0270 733fe550 733ff8f0 733fe61c
>>>000000c3 bec97f94 bec97f88
>>>[ 1552.628019] 7f80: 80057110 80056f18 00000000 bec97f98 8000f458
>>>733fe550 00000000 bec97fa8
>>>[ 1552.636226] 7fa0: 8000f280 800fb704 733fe550 733ff8f0 757e3810
>>>733fe4e0 733fe550 00000003
>>>[ 1552.644431] 7fc0: 733fe550 733ff8f0 733fe61c 000000c3 00000000
>>>00000002 733fe92c 00000200
>>>[ 1552.652636] 7fe0: 000000c3 733fe4d8 7579b7e5 7572e276 200f0030
>>>757e3810 bfffd821 bfffdc21
>>>[ 1552.660828] Backtrace:
>>>[ 1552.663343] [<80101128>] (lookup_fast+0x0/0x318) from [<80102d94>]
>>>(path_lookupat+0x130/0x728)
>>>[ 1552.671994] [<80102c64>] (path_lookupat+0x0/0x728) from
>>>[<801033bc>] (filename_lookup.isra.40+0x30/0x70)
>>>[ 1552.681515] [<8010338c>] (filename_lookup.isra.40+0x0/0x70) from
>>>[<80105dc0>] (user_path_at_empty+0x64/0x8c)
>>>[ 1552.691361] r7:bec97f00 r6:bec97e60 r5:00000001 r4:bee4f000
>>>[ 1552.697163] [<80105d5c>] (user_path_at_empty+0x0/0x8c) from
>>>[<80105e0c>] (user_path_at+0x24/0x2c)
>>>[ 1552.706053] r8:bec97f40 r7:757e3810 r6:ffffff9c r5:00000001 r4:733fe4e0
>>>[ 1552.712927] [<80105de8>] (user_path_at+0x0/0x2c) from [<800faf64>]
>>>(vfs_fstatat+0x54/0xa8)
>>>[ 1552.721232] [<800faf10>] (vfs_fstatat+0x0/0xa8) from [<800fafe0>]
>>>(vfs_stat+0x28/0x2c)
>>>[ 1552.729167] r8:8000f504 r7:000000c3 r6:733fe61c r5:733ff8f0 r4:733fe4e0
>>>[ 1552.736031] [<800fafb8>] (vfs_stat+0x0/0x2c) from [<800fb71c>]
>>>(SyS_stat64+0x24/0x40)
>>>[ 1552.743902] [<800fb6f8>] (SyS_stat64+0x0/0x40) from [<8000f280>]
>>>(ret_fast_syscall+0x0/0x48)
>>>[ 1552.752359] r4:733fe550
>>>[ 1552.754946] Code: eb00352d e3500000 e50b0038 0a000080 (e5903038)
>>>[ 1552.761270] ---[ end trace 02679086a39365e8 ]---
>>>[ 1552.765968] Kernel panic - not syncing: Fatal exception
>>>
>>>_______________________________________________
>>>linux-arm-kernel mailing list
>>>linux-arm-kernel at lists.infradead.org
>>>http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Internal error: Oops: 17 [#1] ARM
From: John Tobias @ 2014-01-23 4:13 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140123034644.GD18520@pek-lwang0-d1>
Thanks!
I will try it tomorrow.
Regards,
John
Sent from my iPhone
> On Jan 22, 2014, at 7:46 PM, walimis <walimisdev@gmail.com> wrote:
>
>> On Wed, Jan 22, 2014 at 07:28:55PM -0800, John Tobias wrote:
>> Hi Liming,
>>
>> Yes, I am using 4.8.1. I switched back to 4.7.3 and will test it again
>> if I can re-produce it.
>
> Hi,
>
> Or you can use the latest linaro 4.8.x toolchain, which has been applied that patch:
>
> http://releases.linaro.org/13.12/components/toolchain/binaries/
>
> Please select this one to try:
>
> gcc-linaro-arm-linux-gnueabihf-4.8-2013.12_linux.tar.bz2
>
> Liming Wang
>>
>> Regards,
>>
>> john
>>
>>> On Wed, Jan 22, 2014 at 7:01 PM, walimis <walimisdev@gmail.com> wrote:
>>>> On Wed, Jan 22, 2014 at 08:23:36AM -0800, John Tobias wrote:
>>>> Hello all,
>>>>
>>>> I am using 3.13-rc1 kernel on iMX6SL processor. My filesystem is in
>>>> eMMC running SDR50.
>>>> Is anyone here encountered these problem and if there's any existing
>>>> patch that I can get?.
>>> hi,
>>>
>>> Do you use gcc 4.8.1? If so, maybe you should look at following link
>>> to see whether it's a similar issue.
>>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
>>>
>>> Liming Wang
>>>
>>>>
>>>> Regards,
>>>>
>>>> john
>>>>
>>>> [ 1552.394899] Unable to handle kernel NULL pointer dereference at
>>>> virtual address 00000037
>>>> [ 1552.403034] pgd = beef4000
>>>> [ 1552.405855] [00000037] *pgd=bef60831, *pte=00000000, *ppte=00000000
>>>> [ 1552.412245] Internal error: Oops: 17 [#1] ARM
>>>> [ 1552.416627] Modules linked in: bt8xxx(O) sd8xxx(O) mlan(O)
>>>> [ 1552.422249] CPU: 0 PID: 232 Comm: commsd Tainted: G O 3.13.0-rc1 #7
>>>> [ 1552.429409] task: bfbc7500 ti: bec96000 task.ti: bec96000
>>>> [ 1552.434844] PC is at lookup_fast+0x5c/0x318
>>>> [ 1552.439067] LR is at mark_held_locks+0x78/0x13c
>>>> [ 1552.443622] pc : [<80101184>] lr : [<80056e48>] psr: a00f0013
>>>> [ 1552.443622] sp : bec97d88 ip : 00666e6f fp : bec97ddc
>>>> [ 1552.455124] r10: 00000000 r9 : bec97e08 r8 : 80102d94
>>>> [ 1552.460370] r7 : bec97e60 r6 : bf133ac8 r5 : bec97e60 r4 : bec97e00
>>>> [ 1552.466918] r3 : bee4f01d r2 : 00000000 r1 : ffffffff r0 : ffffffff
>>>> [ 1552.473471] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
>>>> [ 1552.480629] Control: 10c53c7d Table: beef4059 DAC: 00000015
>>>> [ 1552.486397] Process commsd (pid: 232, stack limit = 0xbec96238)
>>>> [ 1552.492341] Stack: (0xbec97d88 to 0xbec98000)
>>>> [ 1552.496728] 7d80: 80102b94 80057108 bfb95310
>>>> bf133ac8 bf15f4e8 bfb95310
>>>> [ 1552.504936] 7da0: c08bb14d ffffffff bee4f015 00000008 bfbc7500
>>>> bec97e08 00000000 00000041
>>>> [ 1552.513142] 7dc0: bec97e60 bec96020 bec96000 00000000 bec97e3c
>>>> bec97de0 80102d94 80101134
>>>> [ 1552.521347] 7de0: bec97df8 00000000 800d982c bec96018 00000010
>>>> bec97e00 00000000 bec97e08
>>>> [ 1552.529553] 7e00: 8026e25c 800d97e8 bee4f000 00000ff0 80d4e3a4
>>>> 00000001 bee4f000 bec97e60
>>>> [ 1552.537758] 7e20: ffffff9c ffffff9c bec96000 00000000 bec97e5c
>>>> bec97e40 801033bc 80102c70
>>>> [ 1552.545964] 7e40: bee4f000 00000001 bec97e60 bec97f00 bec97ee4
>>>> bec97e60 80105dc0 80103398
>>>> [ 1552.554170] 7e60: bfb95310 bf133ac8 c08bb14d 0000000b bee4f015
>>>> 8005992c bfb95310 bf133398
>>>> [ 1552.562375] 7e80: bf15f4e8 00000041 00000002 0000008a 00000000
>>>> 00000000 600f0013 bec96000
>>>> [ 1552.570581] 7ea0: ffffffea bf8c1840 807b4430 80115444 801156e4
>>>> 8011563c 00000008 00000000
>>>> [ 1552.578786] 7ec0: bec97f04 733fe4e0 00000001 ffffff9c 757e3810
>>>> bec97f40 bec97efc bec97ee8
>>>> [ 1552.586991] 7ee0: 80105e0c 80105d68 00000000 bc950fe0 bec97f2c
>>>> bec97f00 800faf64 80105df4
>>>> [ 1552.595196] 7f00: 801156e4 80115420 bec97f54 733fe4e0 733ff8f0
>>>> 733fe61c 000000c3 8000f504
>>>> [ 1552.603402] 7f20: bec97f3c bec97f30 800fafe0 800faf1c bec97fa4
>>>> bec97f40 800fb71c 800fafc4
>>>> [ 1552.611608] 7f40: 8000f310 bfbc7500 733fe550 8000f458 733fe61c
>>>> 000000c3 bec97f84 bec97f68
>>>> [ 1552.619813] 7f60: 80056f28 800a0270 733fe550 733ff8f0 733fe61c
>>>> 000000c3 bec97f94 bec97f88
>>>> [ 1552.628019] 7f80: 80057110 80056f18 00000000 bec97f98 8000f458
>>>> 733fe550 00000000 bec97fa8
>>>> [ 1552.636226] 7fa0: 8000f280 800fb704 733fe550 733ff8f0 757e3810
>>>> 733fe4e0 733fe550 00000003
>>>> [ 1552.644431] 7fc0: 733fe550 733ff8f0 733fe61c 000000c3 00000000
>>>> 00000002 733fe92c 00000200
>>>> [ 1552.652636] 7fe0: 000000c3 733fe4d8 7579b7e5 7572e276 200f0030
>>>> 757e3810 bfffd821 bfffdc21
>>>> [ 1552.660828] Backtrace:
>>>> [ 1552.663343] [<80101128>] (lookup_fast+0x0/0x318) from [<80102d94>]
>>>> (path_lookupat+0x130/0x728)
>>>> [ 1552.671994] [<80102c64>] (path_lookupat+0x0/0x728) from
>>>> [<801033bc>] (filename_lookup.isra.40+0x30/0x70)
>>>> [ 1552.681515] [<8010338c>] (filename_lookup.isra.40+0x0/0x70) from
>>>> [<80105dc0>] (user_path_at_empty+0x64/0x8c)
>>>> [ 1552.691361] r7:bec97f00 r6:bec97e60 r5:00000001 r4:bee4f000
>>>> [ 1552.697163] [<80105d5c>] (user_path_at_empty+0x0/0x8c) from
>>>> [<80105e0c>] (user_path_at+0x24/0x2c)
>>>> [ 1552.706053] r8:bec97f40 r7:757e3810 r6:ffffff9c r5:00000001 r4:733fe4e0
>>>> [ 1552.712927] [<80105de8>] (user_path_at+0x0/0x2c) from [<800faf64>]
>>>> (vfs_fstatat+0x54/0xa8)
>>>> [ 1552.721232] [<800faf10>] (vfs_fstatat+0x0/0xa8) from [<800fafe0>]
>>>> (vfs_stat+0x28/0x2c)
>>>> [ 1552.729167] r8:8000f504 r7:000000c3 r6:733fe61c r5:733ff8f0 r4:733fe4e0
>>>> [ 1552.736031] [<800fafb8>] (vfs_stat+0x0/0x2c) from [<800fb71c>]
>>>> (SyS_stat64+0x24/0x40)
>>>> [ 1552.743902] [<800fb6f8>] (SyS_stat64+0x0/0x40) from [<8000f280>]
>>>> (ret_fast_syscall+0x0/0x48)
>>>> [ 1552.752359] r4:733fe550
>>>> [ 1552.754946] Code: eb00352d e3500000 e50b0038 0a000080 (e5903038)
>>>> [ 1552.761270] ---[ end trace 02679086a39365e8 ]---
>>>> [ 1552.765968] Kernel panic - not syncing: Fatal exception
>>>>
>>>> _______________________________________________
>>>> linux-arm-kernel mailing list
>>>> linux-arm-kernel at lists.infradead.org
>>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH 1/6] arm64: Add macros to manage processor debug state
From: Vijay Kilari @ 2014-01-23 4:46 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140122173117.GJ14108@mudshark.cambridge.arm.com>
On Wed, Jan 22, 2014 at 11:01 PM, Will Deacon <will.deacon@arm.com> wrote:
> Hello,
>
> On Wed, Jan 22, 2014 at 02:42:48PM +0000, vijay.kilari at gmail.com wrote:
>> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
>>
>> Add macros to enable and disable to manage PSTATE.D
>> for debugging. The macros local_dbg_save and local_dbg_restore
>> are moved to irqflags.h file
>>
>> KGDB boot tests fail because of PSTATE.D is masked.
>> unmask it for debugging support
>>
>> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
>> ---
>> arch/arm64/include/asm/debug-monitors.h | 18 ++----------------
>> arch/arm64/include/asm/irqflags.h | 22 ++++++++++++++++++++++
>> arch/arm64/kernel/debug-monitors.c | 3 ++-
>> 3 files changed, 26 insertions(+), 17 deletions(-)
>>
>> diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
>> index 6231479..bc48880 100644
>> --- a/arch/arm64/include/asm/debug-monitors.h
>> +++ b/arch/arm64/include/asm/debug-monitors.h
>> @@ -43,22 +43,8 @@ enum debug_el {
>> #ifndef __ASSEMBLY__
>> struct task_struct;
>>
>> -#define local_dbg_save(flags) \
>> - do { \
>> - typecheck(unsigned long, flags); \
>> - asm volatile( \
>> - "mrs %0, daif // local_dbg_save\n" \
>> - "msr daifset, #8" \
>> - : "=r" (flags) : : "memory"); \
>> - } while (0)
>> -
>> -#define local_dbg_restore(flags) \
>> - do { \
>> - typecheck(unsigned long, flags); \
>> - asm volatile( \
>> - "msr daif, %0 // local_dbg_restore\n" \
>> - : : "r" (flags) : "memory"); \
>> - } while (0)
>> +#define local_dbg_enable() asm("msr daifclr, #8" : : : "memory")
>> +#define local_dbg_disable() asm("msr daifset, #8" : : : "memory")
>
> Any reason not to move these to irqflags.h too?
Can me moved to irqflags.h file
>
>> #define DBG_ARCH_ID_RESERVED 0 /* In case of ptrace ABI updates. */
>>
>> diff --git a/arch/arm64/include/asm/irqflags.h b/arch/arm64/include/asm/irqflags.h
>> index b2fcfbc..f163b11 100644
>> --- a/arch/arm64/include/asm/irqflags.h
>> +++ b/arch/arm64/include/asm/irqflags.h
>> @@ -90,5 +90,27 @@ static inline int arch_irqs_disabled_flags(unsigned long flags)
>> return flags & PSR_I_BIT;
>> }
>>
>> +/*
>> + * save and restore debug state
>> + */
>> +static inline unsigned long local_dbg_save(void)
>> +{
>> + unsigned long flags;
>> + asm volatile(
>> + "mrs %0, daif // local_dbg_save"
>> + "msr daifset, #8"
>> + : "=r" (flags) : : "memory");
>> + return flags;
>> +}
>> +
>> +static inline void local_dbg_restore(unsigned long flags)
>> +{
>> + asm volatile(
>> + "msr daif, %0 // local_dbg_restore"
>> + :
>> + : "r" (flags)
>> + : "memory");
>> +}
>> +
>> #endif
>> #endif
>> diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
>> index 23586bd..774ad04 100644
>> --- a/arch/arm64/kernel/debug-monitors.c
>> +++ b/arch/arm64/kernel/debug-monitors.c
>> @@ -51,7 +51,7 @@ u8 debug_monitors_arch(void)
>> static void mdscr_write(u32 mdscr)
>> {
>> unsigned long flags;
>> - local_dbg_save(flags);
>> + flags = local_dbg_save();
>
> Why are you changing the API? This is now pointlessly different to irqs.
To be in line with arch_local_irq_save & arch_local_save_flags in irqflags.h,
I moved this macros into functions and accordingly changed the caller.
I could not find any code using this local_dbg_{save, restore} except
from debug-monitors.c file
If required, I can think of renaming local_dbg_{save,restore} as
local_dbg_{save,restore}_flags
>
> Will
^ permalink raw reply
* [PATCH] [media] s5p-mfc: Add Horizontal and Vertical search range for Video Macro Blocks
From: swaminathan @ 2014-01-23 5:19 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1388400186-22045-1-git-send-email-amit.grover@samsung.com>
Hi All,
Is there any review Comments for the patch "[PATCH] [media] s5p-mfc: Add
Horizontal and Vertical search range for Video Macro Blocks"
posted on 30-Dec-2013 ?
Regards,
Swaminathan
--------------------------------------------------
From: "Amit Grover" <amit.grover@samsung.com>
Sent: Monday, December 30, 2013 4:13 PM
To: <m.chehab@samsung.com>; <linux-media@vger.kernel.org>;
<linux-doc@vger.kernel.org>; <linux-kernel@vger.kernel.org>;
<linux-arm-kernel@lists.infradead.org>; <linux-samsung-soc@vger.kernel.org>;
<rob@landley.net>; <kyungmin.park@samsung.com>; <k.debski@samsung.com>;
<jtp.park@samsung.com>
Cc: <hans.verkuil@cisco.com>; <andrew.smirnov@gmail.com>;
<s.nawrocki@samsung.com>; <arun.kk@samsung.com>; <anatol.pomozov@gmail.com>;
<jmccrohan@gmail.com>; <austin.lobo@samsung.com>; "Swami Nathan"
<swaminath.p@samsung.com>
Subject: [PATCH] [media] s5p-mfc: Add Horizontal and Vertical search range
for Video Macro Blocks
> This patch adds Controls to set Horizontal and Vertical search range
> for Motion Estimation block for Samsung MFC video Encoders.
>
> Signed-off-by: Swami Nathan <swaminath.p@samsung.com>
> Signed-off-by: Amit Grover <amit.grover@samsung.com>
> ---
> Documentation/DocBook/media/v4l/controls.xml | 14 +++++++++++++
> drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 2 ++
> drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 24
> +++++++++++++++++++++++
> drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 8 ++------
> drivers/media/v4l2-core/v4l2-ctrls.c | 14 +++++++++++++
> include/uapi/linux/v4l2-controls.h | 2 ++
> 6 files changed, 58 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/DocBook/media/v4l/controls.xml
> b/Documentation/DocBook/media/v4l/controls.xml
> index 7a3b49b..70a0f6f 100644
> --- a/Documentation/DocBook/media/v4l/controls.xml
> +++ b/Documentation/DocBook/media/v4l/controls.xml
> @@ -2258,6 +2258,20 @@ Applicable to the MPEG1, MPEG2, MPEG4
> encoders.</entry>
> VBV buffer control.</entry>
> </row>
>
> + <row><entry></entry></row>
> + <row id="v4l2-mpeg-video-horz-search-range">
> + <entry
> spanname="id"><constant>V4L2_CID_MPEG_VIDEO_HORZ_SEARCH_RANGE</constant> </entry>
> + <entry>integer</entry>
> + </row><row><entry spanname="descr">Sets the Horizontal search
> range for Video Macro blocks.</entry>
> + </row>
> +
> + <row><entry></entry></row>
> + <row id="v4l2-mpeg-video-vert-search-range">
> + <entry
> spanname="id"><constant>V4L2_CID_MPEG_VIDEO_VERT_SEARCH_RANGE</constant> </entry>
> + <entry>integer</entry>
> + </row><row><entry spanname="descr">Sets the Vertical search range
> for Video Macro blocks.</entry>
> + </row>
> +
> <row><entry></entry></row>
> <row>
> <entry
> spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE</constant> </entry>
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> index 6920b54..f2c13c3 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_common.h
> @@ -430,6 +430,8 @@ struct s5p_mfc_vp8_enc_params {
> struct s5p_mfc_enc_params {
> u16 width;
> u16 height;
> + u32 horz_range;
> + u32 vert_range;
>
> u16 gop_size;
> enum v4l2_mpeg_video_multi_slice_mode slice_mode;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> index 4ff3b6c..a02e7b8 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c
> @@ -208,6 +208,24 @@ static struct mfc_control controls[] = {
> .default_value = 0,
> },
> {
> + .id = V4L2_CID_MPEG_VIDEO_HORZ_SEARCH_RANGE,
> + .type = V4L2_CTRL_TYPE_INTEGER,
> + .name = "horizontal search range of video macro block",
> + .minimum = 16,
> + .maximum = 128,
> + .step = 16,
> + .default_value = 32,
> + },
> + {
> + .id = V4L2_CID_MPEG_VIDEO_VERT_SEARCH_RANGE,
> + .type = V4L2_CTRL_TYPE_INTEGER,
> + .name = "vertical search range of video macro block",
> + .minimum = 16,
> + .maximum = 128,
> + .step = 16,
> + .default_value = 32,
> + },
> + {
> .id = V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE,
> .type = V4L2_CTRL_TYPE_INTEGER,
> .minimum = 0,
> @@ -1377,6 +1395,12 @@ static int s5p_mfc_enc_s_ctrl(struct v4l2_ctrl
> *ctrl)
> case V4L2_CID_MPEG_VIDEO_VBV_SIZE:
> p->vbv_size = ctrl->val;
> break;
> + case V4L2_CID_MPEG_VIDEO_HORZ_SEARCH_RANGE:
> + p->horz_range = ctrl->val;
> + break;
> + case V4L2_CID_MPEG_VIDEO_VERT_SEARCH_RANGE:
> + p->vert_range = ctrl->val;
> + break;
> case V4L2_CID_MPEG_VIDEO_H264_CPB_SIZE:
> p->codec.h264.cpb_size = ctrl->val;
> break;
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
> b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
> index 461358c..47e1807 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c
> @@ -727,14 +727,10 @@ static int s5p_mfc_set_enc_params(struct s5p_mfc_ctx
> *ctx)
> WRITEL(reg, S5P_FIMV_E_RC_CONFIG_V6);
>
> /* setting for MV range [16, 256] */
> - reg = 0;
> - reg &= ~(0x3FFF);
> - reg = 256;
> + reg = (p->horz_range & 0x3fff); /* conditional check in app */
> WRITEL(reg, S5P_FIMV_E_MV_HOR_RANGE_V6);
>
> - reg = 0;
> - reg &= ~(0x3FFF);
> - reg = 256;
> + reg = (p->vert_range & 0x3fff); /* conditional check in app */
> WRITEL(reg, S5P_FIMV_E_MV_VER_RANGE_V6);
>
> WRITEL(0x0, S5P_FIMV_E_FRAME_INSERTION_V6);
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c
> b/drivers/media/v4l2-core/v4l2-ctrls.c
> index fb46790..7cf23d5 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> @@ -735,6 +735,8 @@ const char *v4l2_ctrl_get_name(u32 id)
> case V4L2_CID_MPEG_VIDEO_DEC_PTS: return "Video Decoder PTS";
> case V4L2_CID_MPEG_VIDEO_DEC_FRAME: return "Video Decoder Frame Count";
> case V4L2_CID_MPEG_VIDEO_VBV_DELAY: return "Initial Delay for VBV
> Control";
> + case V4L2_CID_MPEG_VIDEO_HORZ_SEARCH_RANGE: return "hor search range of
> video MB";
> + case V4L2_CID_MPEG_VIDEO_VERT_SEARCH_RANGE: return "vert search range of
> video MB";
> case V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER: return "Repeat Sequence
> Header";
>
> /* VPX controls */
> @@ -905,6 +907,18 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum
> v4l2_ctrl_type *type,
> *min = 0;
> *max = *step = 1;
> break;
> + case V4L2_CID_MPEG_VIDEO_HORZ_SEARCH_RANGE:
> + *type = V4L2_CTRL_TYPE_INTEGER;
> + *min = 16;
> + *max = 128;
> + *step = 16;
> + break;
> + case V4L2_CID_MPEG_VIDEO_VERT_SEARCH_RANGE:
> + *type = V4L2_CTRL_TYPE_INTEGER;
> + *min = 16;
> + *max = 128;
> + *step = 16;
> + break;
> case V4L2_CID_PAN_RESET:
> case V4L2_CID_TILT_RESET:
> case V4L2_CID_FLASH_STROBE:
> diff --git a/include/uapi/linux/v4l2-controls.h
> b/include/uapi/linux/v4l2-controls.h
> index 1666aab..bcce536 100644
> --- a/include/uapi/linux/v4l2-controls.h
> +++ b/include/uapi/linux/v4l2-controls.h
> @@ -372,6 +372,8 @@ enum v4l2_mpeg_video_multi_slice_mode {
> #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224)
> #define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225)
> #define V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER (V4L2_CID_MPEG_BASE+226)
> +#define V4L2_CID_MPEG_VIDEO_HORZ_SEARCH_RANGE (V4L2_CID_MPEG_BASE+227)
> +#define V4L2_CID_MPEG_VIDEO_VERT_SEARCH_RANGE (V4L2_CID_MPEG_BASE+228)
>
> #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300)
> #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301)
> --
> 1.7.9.5
>
^ permalink raw reply
* Kconfig errors
From: Prabhakar Lad @ 2014-01-23 5:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140122122653.GA15937@n2100.arm.linux.org.uk>
On Wed, Jan 22, 2014 at 5:56 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Wed, Jan 22, 2014 at 05:54:29PM +0530, Prabhakar Lad wrote:
>> Hi Russell,
>>
>> On Fri, Jan 17, 2014 at 1:07 PM, Prabhakar Lad
>> <prabhakar.csengg@gmail.com> wrote:
>> > Hi,
>> >
>> > On Linux-next branch I see following errors for davinci_all_defconfig
>> > & da8xx_omapl_defconfig configs,
>> >
>> > arch/arm/Kconfig:1966:error: recursive dependency detected!
>> > arch/arm/Kconfig:1966: symbol ZBOOT_ROM depends on AUTO_ZRELADDR
>> > arch/arm/Kconfig:2154: symbol AUTO_ZRELADDR is selected by ZBOOT_ROM
>> > #
>> > # configuration written to .config
>> > #
>> >
>> I am seeing this errors on linux-next, with your recent patch,
>> "[PATCH] Fix select-induced Kconfig warning for ZBOOT_ROM"
>> and strangely I see that AUTO_ZRELADDR doesnt select ZBOOT_ROM
>> but still an error.
>>
>> Note: For the davinci configs CONFIG_AUTO_ZRELADDR is not set and
>> CONFIG_ZBOOT_ROM_TEXT=0x0, CONFIG_ZBOOT_ROM_BSS=0x0
>
> I've killed off the "select AUTO_ZRELADDR if !ZBOOT_ROM" in the IMX
> Kconfig now, so when linux-next picks up my tree, that should be gone.
>
Thanks that helps.
Regards,
--Prabhakar Lad
^ permalink raw reply
* [PATCH] [media] s5p-mfc: Add Horizontal and Vertical search range for Video Macro Blocks
From: Prabhakar Lad @ 2014-01-23 5:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <DA6097ED98694425932A6AF93513371A@sisodomain.com>
Hi Swaminathan,
On Thu, Jan 23, 2014 at 10:49 AM, swaminathan <swaminath.p@samsung.com> wrote:
> Hi All,
> Is there any review Comments for the patch "[PATCH] [media] s5p-mfc: Add
> Horizontal and Vertical search range for Video Macro Blocks"
> posted on 30-Dec-2013 ?
>
>
Just a side note, please don?t top post and always reply as plain text.
[Snip]
> Subject: [PATCH] [media] s5p-mfc: Add Horizontal and Vertical search range
> for Video Macro Blocks
>
>
>> This patch adds Controls to set Horizontal and Vertical search range
>> for Motion Estimation block for Samsung MFC video Encoders.
>>
>> Signed-off-by: Swami Nathan <swaminath.p@samsung.com>
>> Signed-off-by: Amit Grover <amit.grover@samsung.com>
>> ---
>> Documentation/DocBook/media/v4l/controls.xml | 14 +++++++++++++
>> drivers/media/platform/s5p-mfc/s5p_mfc_common.h | 2 ++
>> drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 24
>> +++++++++++++++++++++++
>> drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c | 8 ++------
>> drivers/media/v4l2-core/v4l2-ctrls.c | 14 +++++++++++++
>> include/uapi/linux/v4l2-controls.h | 2 ++
>> 6 files changed, 58 insertions(+), 6 deletions(-)
>>
This patch from the outset looks OK, but you need to split up
into two, first adding a v4l control and second one using it up in the driver.
Regards,
--Prabhakar Lad
^ permalink raw reply
* [PATCH] arm: vt8500: Fix gpio mux setup in vt8500_init()
From: Tony Prisk @ 2014-01-23 6:28 UTC (permalink / raw)
To: linux-arm-kernel
With the switch to a pinctrl driver, and the dropping of the gpio driver,
the code in vt8500_init now always fails, and drops back to LEGACY mode.
Update the gpio mux init code, and removing the #ifdef's and the LEGACY
mode fallback.
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
arch/arm/mach-vt8500/vt8500.c | 91 ++++++++++++++---------------------------
1 file changed, 30 insertions(+), 61 deletions(-)
diff --git a/arch/arm/mach-vt8500/vt8500.c b/arch/arm/mach-vt8500/vt8500.c
index 4a73464..fe5243e 100644
--- a/arch/arm/mach-vt8500/vt8500.c
+++ b/arch/arm/mach-vt8500/vt8500.c
@@ -32,9 +32,6 @@
#include <linux/of_irq.h>
#include <linux/of_platform.h>
-#define LEGACY_GPIO_BASE 0xD8110000
-#define LEGACY_PMC_BASE 0xD8130000
-
/* Registers in GPIO Controller */
#define VT8500_GPIO_MUX_REG 0x200
@@ -75,89 +72,61 @@ static void vt8500_power_off(void)
void __init vt8500_init(void)
{
struct device_node *np;
-#if defined(CONFIG_FB_VT8500) || defined(CONFIG_FB_WM8505)
struct device_node *fb;
- void __iomem *gpio_base;
-#endif
+ void __iomem *base;
-#ifdef CONFIG_FB_VT8500
fb = of_find_compatible_node(NULL, NULL, "via,vt8500-fb");
if (fb) {
- np = of_find_compatible_node(NULL, NULL, "via,vt8500-gpio");
- if (np) {
- gpio_base = of_iomap(np, 0);
-
- if (!gpio_base)
- pr_err("%s: of_iomap(gpio_mux) failed\n",
- __func__);
+ np = of_find_compatible_node(NULL, NULL, "via,vt8500-pinctrl");
+ if (!np) {
+ pr_err("pinctrl node required for framebuffer\n");
+ BUG();
+ }
- of_node_put(np);
+ base = of_iomap(np, 0);
+ if (base) {
+ writel(readl(base + VT8500_GPIO_MUX_REG) | 1,
+ base + VT8500_GPIO_MUX_REG);
+ iounmap(base);
} else {
- gpio_base = ioremap(LEGACY_GPIO_BASE, 0x1000);
- if (!gpio_base)
- pr_err("%s: ioremap(legacy_gpio_mux) failed\n",
- __func__);
+ pr_err("%s: of_iomap(gpio_mux) failed\n", __func__);
}
- if (gpio_base) {
- writel(readl(gpio_base + VT8500_GPIO_MUX_REG) | 1,
- gpio_base + VT8500_GPIO_MUX_REG);
- iounmap(gpio_base);
- } else
- pr_err("%s: Could not remap GPIO mux\n", __func__);
+ of_node_put(np);
of_node_put(fb);
}
-#endif
-#ifdef CONFIG_FB_WM8505
fb = of_find_compatible_node(NULL, NULL, "wm,wm8505-fb");
if (fb) {
- np = of_find_compatible_node(NULL, NULL, "wm,wm8505-gpio");
- if (!np)
- np = of_find_compatible_node(NULL, NULL,
- "wm,wm8650-gpio");
- if (np) {
- gpio_base = of_iomap(np, 0);
-
- if (!gpio_base)
- pr_err("%s: of_iomap(gpio_mux) failed\n",
- __func__);
-
- of_node_put(np);
+ np = of_find_compatible_node(NULL, NULL, "wm,prizm-pinctrl");
+ if (!np) {
+ pr_err("pinctrl node required for framebuffer\n");
+ BUG();
+ }
+
+ base = of_iomap(np, 0);
+ if (base) {
+ writel(readl(base + VT8500_GPIO_MUX_REG) |
+ 0x80000000, base + VT8500_GPIO_MUX_REG);
+ iounmap(base);
} else {
- gpio_base = ioremap(LEGACY_GPIO_BASE, 0x1000);
- if (!gpio_base)
- pr_err("%s: ioremap(legacy_gpio_mux) failed\n",
- __func__);
+ pr_err("%s: of_iomap(gpio_mux) failed\n", __func__);
}
- if (gpio_base) {
- writel(readl(gpio_base + VT8500_GPIO_MUX_REG) |
- 0x80000000, gpio_base + VT8500_GPIO_MUX_REG);
- iounmap(gpio_base);
- } else
- pr_err("%s: Could not remap GPIO mux\n", __func__);
+ of_node_put(np);
of_node_put(fb);
}
-#endif
np = of_find_compatible_node(NULL, NULL, "via,vt8500-pmc");
if (np) {
pmc_base = of_iomap(np, 0);
-
- if (!pmc_base)
- pr_err("%s:of_iomap(pmc) failed\n", __func__);
+ if (pmc_base)
+ pm_power_off = &vt8500_power_off;
+ else
+ pr_err("%s: of_iomap(pmc) failed\n", __func__);
of_node_put(np);
- } else {
- pmc_base = ioremap(LEGACY_PMC_BASE, 0x1000);
- if (!pmc_base)
- pr_err("%s:ioremap(power_off) failed\n", __func__);
}
- if (pmc_base)
- pm_power_off = &vt8500_power_off;
- else
- pr_err("%s: PMC Hibernation register could not be remapped, not enabling power off!\n", __func__);
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
--
1.7.9.5
^ permalink raw reply related
* [PATCH] serial: vt8500: Add missing binding document for arch-vt8500 serial driver.
From: Tony Prisk @ 2014-01-23 6:30 UTC (permalink / raw)
To: linux-arm-kernel
The binding document for the vt8500/wm8xxx SoC UART driver is missing.
This patch adds the binding document.
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
.../devicetree/bindings/serial/vt8500-uart.txt | 26 ++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 Documentation/devicetree/bindings/serial/vt8500-uart.txt
diff --git a/Documentation/devicetree/bindings/serial/vt8500-uart.txt b/Documentation/devicetree/bindings/serial/vt8500-uart.txt
new file mode 100644
index 0000000..795c393
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/vt8500-uart.txt
@@ -0,0 +1,26 @@
+* VIA VT8500 and WonderMedia WM8xxx UART Controller
+
+Required properties:
+- compatible: should be "via,vt8500-uart"
+
+- reg: base physical address of the controller and length of memory mapped
+ region.
+
+- interrupts: hardware interrupt number
+
+- clocks: shall be the input parent clock phandle for the clock. This should
+ be the 24Mhz reference clock.
+
+Aliases may be defined to ensure the correct ordering of the uarts.
+
+Example:
+ aliases {
+ serial0 = &uart0;
+ };
+
+ uart0: serial at d8200000 {
+ compatible = "via,vt8500-uart";
+ reg = <0xd8200000 0x1040>;
+ interrupts = <32>;
+ clocks = <&clkuart0>;
+ };
--
1.7.9.5
^ permalink raw reply related
* [PATCH] vt8500: pinctrl: Change devicetree data parsing
From: Tony Prisk @ 2014-01-23 6:31 UTC (permalink / raw)
To: linux-arm-kernel
Due to an assumption in the VT8500 pinctrl driver, the value passed
from devicetree for 'wm,pull' was not explicitly translated before
being passed to pinconf.
With changes to 'enum pin_config_param', PIN_CONFIG_BIAS_PULL_(UP/DOWN)
no longer map 1-to-1 with the expected values in devicetree.
This patch adds a small translation between the devicetree values (0..2)
and the enum pin_config_param equivalent values.
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
drivers/pinctrl/vt8500/pinctrl-wmt.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c
index 39aec08..fa4fdbd 100644
--- a/drivers/pinctrl/vt8500/pinctrl-wmt.c
+++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c
@@ -276,6 +276,17 @@ static int wmt_pctl_dt_node_to_map_pull(struct wmt_pinctrl_data *data,
if (!configs)
return -ENOMEM;
+ switch (pull) {
+ case 0:
+ pull = PIN_CONFIG_BIAS_DISABLE;
+ break;
+ case 1:
+ pull = PIN_CONFIG_BIAS_PULL_DOWN;
+ break;
+ case 2:
+ pull = PIN_CONFIG_BIAS_PULL_UP;
+ break;
+ }
configs[0] = pull;
map->type = PIN_MAP_TYPE_CONFIGS_PIN;
--
1.7.9.5
^ permalink raw reply related
* [PATCH] MAINTAINERS: vt8500: Update maintained files for arch/vt8500
From: Tony Prisk @ 2014-01-23 6:43 UTC (permalink / raw)
To: linux-arm-kernel
Removed maintainership of the ehci-platform.c and uhci-platform.c
drivers. These drivers are not solely used by arch-vt8500 anymore,
and are captured under Alan Stern's 'USB EHCI DRIVER' and
'USB UHCI DRIVER' wildcards.
Add maintainership for the VT8500's clock, irq and pinctrl drivers
which were added/migrated quite some time ago.
Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
MAINTAINERS | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 6a6e4ac..ac26897 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1341,14 +1341,15 @@ M: Tony Prisk <linux@prisktech.co.nz>
L: linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/mach-vt8500/
+F: drivers/clk/clk-vt8500.c
F: drivers/clocksource/vt8500_timer.c
F: drivers/i2c/busses/i2c-wmt.c
+F: drivers/irqchip/irq-vt8500.c
F: drivers/mmc/host/wmt-sdmmc.c
+F: drivers/pinctrl/vt8500/
F: drivers/pwm/pwm-vt8500.c
F: drivers/rtc/rtc-vt8500.c
F: drivers/tty/serial/vt8500_serial.c
-F: drivers/usb/host/ehci-platform.c
-F: drivers/usb/host/uhci-platform.c
F: drivers/video/vt8500lcdfb.*
F: drivers/video/wm8505fb*
F: drivers/video/wmt_ge_rops.*
--
1.7.9.5
^ permalink raw reply related
* [PATCH 1/2] clocksource: Remove outdated comments
From: Yijing Wang @ 2014-01-23 7:12 UTC (permalink / raw)
To: linux-arm-kernel
clocksource_register() and __clocksource_register_scale()
always return 0, so the comment is just pointless, it's
outdated, remove it.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
kernel/time/clocksource.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index ba3e502..9951575 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -779,8 +779,6 @@ EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale);
* @scale: Scale factor multiplied against freq to get clocksource hz
* @freq: clocksource frequency (cycles per second) divided by scale
*
- * Returns -EBUSY if registration fails, zero otherwise.
- *
* This *SHOULD NOT* be called directly! Please use the
* clocksource_register_hz() or clocksource_register_khz helper functions.
*/
@@ -805,7 +803,6 @@ EXPORT_SYMBOL_GPL(__clocksource_register_scale);
* clocksource_register - Used to install new clocksources
* @cs: clocksource to be registered
*
- * Returns -EBUSY if registration fails, zero otherwise.
*/
int clocksource_register(struct clocksource *cs)
{
--
1.7.1
^ permalink raw reply related
* [PATCH 2/2] clocksource: Make clocksource register functions void
From: Yijing Wang @ 2014-01-23 7:12 UTC (permalink / raw)
To: linux-arm-kernel
Currently, clocksource_register() and __clocksource_register_scale()
functions always return 0, it's pointless, make functions void.
And remove the dead code that check the clocksource_register_hz()
return value.
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
arch/arm/mach-davinci/time.c | 5 ++---
arch/arm/mach-msm/timer.c | 4 +---
arch/arm/mach-omap2/timer.c | 8 +++-----
arch/avr32/kernel/time.c | 4 +---
arch/blackfin/kernel/time-ts.c | 6 ++----
arch/microblaze/kernel/timer.c | 3 +--
arch/mips/jz4740/time.c | 6 +-----
arch/mips/loongson/common/cs5536/cs5536_mfgpt.c | 3 ++-
arch/openrisc/kernel/time.c | 3 +--
arch/powerpc/kernel/time.c | 6 +-----
arch/um/kernel/time.c | 6 +-----
arch/x86/platform/uv/uv_time.c | 14 ++++++--------
drivers/clocksource/acpi_pm.c | 3 ++-
drivers/clocksource/cadence_ttc_timer.c | 6 +-----
drivers/clocksource/exynos_mct.c | 4 +---
drivers/clocksource/i8253.c | 3 ++-
drivers/clocksource/mmio.c | 3 ++-
drivers/clocksource/samsung_pwm_timer.c | 5 +----
drivers/clocksource/scx200_hrt.c | 3 ++-
drivers/clocksource/tcb_clksrc.c | 8 +-------
drivers/clocksource/timer-marco.c | 2 +-
drivers/clocksource/timer-prima2.c | 2 +-
drivers/clocksource/vt8500_timer.c | 4 +---
include/linux/clocksource.h | 8 ++++----
kernel/time/clocksource.c | 6 ++----
kernel/time/jiffies.c | 3 ++-
26 files changed, 45 insertions(+), 83 deletions(-)
diff --git a/arch/arm/mach-davinci/time.c b/arch/arm/mach-davinci/time.c
index 56c6eb5..9536f85 100644
--- a/arch/arm/mach-davinci/time.c
+++ b/arch/arm/mach-davinci/time.c
@@ -387,9 +387,8 @@ void __init davinci_timer_init(void)
/* setup clocksource */
clocksource_davinci.name = id_to_name[clocksource_id];
- if (clocksource_register_hz(&clocksource_davinci,
- davinci_clock_tick_rate))
- printk(err, clocksource_davinci.name);
+ clocksource_register_hz(&clocksource_davinci,
+ davinci_clock_tick_rate);
setup_sched_clock(davinci_read_sched_clock, 32,
davinci_clock_tick_rate);
diff --git a/arch/arm/mach-msm/timer.c b/arch/arm/mach-msm/timer.c
index 1e9c338..c96e034 100644
--- a/arch/arm/mach-msm/timer.c
+++ b/arch/arm/mach-msm/timer.c
@@ -226,9 +226,7 @@ static void __init msm_timer_init(u32 dgt_hz, int sched_bits, int irq,
err:
writel_relaxed(TIMER_ENABLE_EN, source_base + TIMER_ENABLE);
- res = clocksource_register_hz(cs, dgt_hz);
- if (res)
- pr_err("clocksource_register failed\n");
+ clocksource_register_hz(cs, dgt_hz);
setup_sched_clock(msm_sched_clock_read, sched_bits, dgt_hz);
}
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 3ca81e0..beaf7c7 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -473,11 +473,9 @@ static void __init omap2_gptimer_clocksource_init(int gptimer_id,
OMAP_TIMER_NONPOSTED);
setup_sched_clock(dmtimer_read_sched_clock, 32, clksrc.rate);
- if (clocksource_register_hz(&clocksource_gpt, clksrc.rate))
- pr_err("Could not register clocksource %s\n",
- clocksource_gpt.name);
- else
- pr_info("OMAP clocksource: %s at %lu Hz\n",
+ clocksource_register_hz(&clocksource_gpt, clksrc.rate);
+
+ pr_info("OMAP clocksource: %s at %lu Hz\n",
clocksource_gpt.name, clksrc.rate);
}
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index d0f771b..51b4a66 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -134,9 +134,7 @@ void __init time_init(void)
/* figure rate for counter */
counter_hz = clk_get_rate(boot_cpu_data.clk);
- ret = clocksource_register_hz(&counter, counter_hz);
- if (ret)
- pr_debug("timer: could not register clocksource: %d\n", ret);
+ clocksource_register_hz(&counter, counter_hz);
/* setup COMPARE clockevent */
comparator.mult = div_sc(counter_hz, NSEC_PER_SEC, comparator.shift);
diff --git a/arch/blackfin/kernel/time-ts.c b/arch/blackfin/kernel/time-ts.c
index cb0a484..df3bb08 100644
--- a/arch/blackfin/kernel/time-ts.c
+++ b/arch/blackfin/kernel/time-ts.c
@@ -51,8 +51,7 @@ static inline unsigned long long bfin_cs_cycles_sched_clock(void)
static int __init bfin_cs_cycles_init(void)
{
- if (clocksource_register_hz(&bfin_cs_cycles, get_cclk()))
- panic("failed to register clocksource");
+ clocksource_register_hz(&bfin_cs_cycles, get_cclk());
return 0;
}
@@ -103,8 +102,7 @@ static int __init bfin_cs_gptimer0_init(void)
{
setup_gptimer0();
- if (clocksource_register_hz(&bfin_cs_gptimer0, get_sclk()))
- panic("failed to register clocksource");
+ clocksource_register_hz(&bfin_cs_gptimer0, get_sclk());
return 0;
}
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index 3e39b10..6a2417e 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -208,8 +208,7 @@ static struct clocksource clocksource_microblaze = {
static int __init xilinx_clocksource_init(void)
{
- if (clocksource_register_hz(&clocksource_microblaze, timer_clock_freq))
- panic("failed to register clocksource");
+ clocksource_register_hz(&clocksource_microblaze, timer_clock_freq);
/* stop timer1 */
out_be32(timer_baseaddr + TCSR1,
diff --git a/arch/mips/jz4740/time.c b/arch/mips/jz4740/time.c
index 5e430ce..041cdff 100644
--- a/arch/mips/jz4740/time.c
+++ b/arch/mips/jz4740/time.c
@@ -105,7 +105,6 @@ static struct irqaction timer_irqaction = {
void __init plat_time_init(void)
{
- int ret;
uint32_t clk_rate;
uint16_t ctrl;
@@ -121,10 +120,7 @@ void __init plat_time_init(void)
clockevents_register_device(&jz4740_clockevent);
- ret = clocksource_register_hz(&jz4740_clocksource, clk_rate);
-
- if (ret)
- printk(KERN_ERR "Failed to register clocksource: %d\n", ret);
+ clocksource_register_hz(&jz4740_clocksource, clk_rate);
setup_irq(JZ4740_IRQ_TCU0, &timer_irqaction);
diff --git a/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c b/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
index c639b9d..9fa6d99 100644
--- a/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
+++ b/arch/mips/loongson/common/cs5536/cs5536_mfgpt.c
@@ -208,7 +208,8 @@ int __init init_mfgpt_clocksource(void)
if (num_possible_cpus() > 1) /* MFGPT does not scale! */
return 0;
- return clocksource_register_hz(&clocksource_mfgpt, MFGPT_TICK_RATE);
+ clocksource_register_hz(&clocksource_mfgpt, MFGPT_TICK_RATE);
+ return 0;
}
arch_initcall(init_mfgpt_clocksource);
diff --git a/arch/openrisc/kernel/time.c b/arch/openrisc/kernel/time.c
index 7c52e94..3f789aa 100644
--- a/arch/openrisc/kernel/time.c
+++ b/arch/openrisc/kernel/time.c
@@ -156,8 +156,7 @@ static struct clocksource openrisc_timer = {
static int __init openrisc_timer_init(void)
{
- if (clocksource_register_hz(&openrisc_timer, cpuinfo.clock_frequency))
- panic("failed to register clocksource");
+ clocksource_register_hz(&openrisc_timer, cpuinfo.clock_frequency);
/* Enable the incrementer: 'continuous' mode with interrupt disabled */
mtspr(SPR_TTMR, SPR_TTMR_CR);
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index b3b1441..27c0627 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -788,11 +788,7 @@ static void __init clocksource_init(void)
else
clock = &clocksource_timebase;
- if (clocksource_register_hz(clock, tb_ticks_per_sec)) {
- printk(KERN_ERR "clocksource: %s is already registered\n",
- clock->name);
- return;
- }
+ clocksource_register_hz(clock, tb_ticks_per_sec);
printk(KERN_INFO "clocksource: %s mult[%x] shift[%d] registered\n",
clock->name, clock->mult, clock->shift);
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index 117568d..2034b58 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -92,11 +92,7 @@ static void __init setup_itimer(void)
clockevent_delta2ns(60 * HZ, &itimer_clockevent);
itimer_clockevent.min_delta_ns =
clockevent_delta2ns(1, &itimer_clockevent);
- err = clocksource_register_hz(&itimer_clocksource, USEC_PER_SEC);
- if (err) {
- printk(KERN_ERR "clocksource_register_hz returned %d\n", err);
- return;
- }
+ clocksource_register_hz(&itimer_clocksource, USEC_PER_SEC);
clockevents_register_device(&itimer_clockevent);
}
diff --git a/arch/x86/platform/uv/uv_time.c b/arch/x86/platform/uv/uv_time.c
index 5c86786..b963774 100644
--- a/arch/x86/platform/uv/uv_time.c
+++ b/arch/x86/platform/uv/uv_time.c
@@ -379,15 +379,13 @@ static __init int uv_rtc_setup_clock(void)
if (!is_uv_system())
return -ENODEV;
- rc = clocksource_register_hz(&clocksource_uv, sn_rtc_cycles_per_second);
- if (rc)
- printk(KERN_INFO "UV RTC clocksource failed rc %d\n", rc);
- else
- printk(KERN_INFO "UV RTC clocksource registered freq %lu MHz\n",
- sn_rtc_cycles_per_second/(unsigned long)1E6);
+ clocksource_register_hz(&clocksource_uv, sn_rtc_cycles_per_second);
+
+ pr_info("UV RTC clocksource registered freq %lu MHz\n",
+ sn_rtc_cycles_per_second/(unsigned long)1E6);
- if (rc || !uv_rtc_evt_enable || x86_platform_ipi_callback)
- return rc;
+ if (!uv_rtc_evt_enable || x86_platform_ipi_callback)
+ return 0;
/* Setup and register clockevents */
rc = uv_rtc_allocate_timers();
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index 6eab889..ab1dc63 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -218,8 +218,9 @@ static int __init init_acpi_pm_clocksource(void)
return -ENODEV;
}
- return clocksource_register_hz(&clocksource_acpi_pm,
+ clocksource_register_hz(&clocksource_acpi_pm,
PMTMR_TICKS_PER_SEC);
+ return 0;
}
/* We use fs_initcall because we want the PCI fixups to have run
diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c
index 63f176d..b9b56ed 100644
--- a/drivers/clocksource/cadence_ttc_timer.c
+++ b/drivers/clocksource/cadence_ttc_timer.c
@@ -301,11 +301,7 @@ static void __init ttc_setup_clocksource(struct clk *clk, void __iomem *base)
__raw_writel(CNT_CNTRL_RESET,
ttccs->ttc.base_addr + TTC_CNT_CNTRL_OFFSET);
- err = clocksource_register_hz(&ttccs->cs, ttccs->ttc.freq / PRESCALE);
- if (WARN_ON(err)) {
- kfree(ttccs);
- return;
- }
+ clocksource_register_hz(&ttccs->cs, ttccs->ttc.freq / PRESCALE);
ttc_sched_clock_val_reg = base + TTC_COUNT_VAL_OFFSET;
sched_clock_register(ttc_sched_clock_read, 16, ttccs->ttc.freq / PRESCALE);
diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
index 62b0de6..98649c7 100644
--- a/drivers/clocksource/exynos_mct.c
+++ b/drivers/clocksource/exynos_mct.c
@@ -193,9 +193,7 @@ struct clocksource mct_frc = {
static void __init exynos4_clocksource_init(void)
{
exynos4_mct_frc_start(0, 0);
-
- if (clocksource_register_hz(&mct_frc, clk_rate))
- panic("%s: can't register clocksource\n", mct_frc.name);
+ clocksource_register_hz(&mct_frc, clk_rate);
}
static void exynos4_mct_comp0_stop(void)
diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c
index 14ee3ef..9c45f0a 100644
--- a/drivers/clocksource/i8253.c
+++ b/drivers/clocksource/i8253.c
@@ -95,7 +95,8 @@ static struct clocksource i8253_cs = {
int __init clocksource_i8253_init(void)
{
- return clocksource_register_hz(&i8253_cs, PIT_TICK_RATE);
+ clocksource_register_hz(&i8253_cs, PIT_TICK_RATE);
+ return 0;
}
#endif
diff --git a/drivers/clocksource/mmio.c b/drivers/clocksource/mmio.c
index c0e2512..6e0b530 100644
--- a/drivers/clocksource/mmio.c
+++ b/drivers/clocksource/mmio.c
@@ -69,5 +69,6 @@ int __init clocksource_mmio_init(void __iomem *base, const char *name,
cs->clksrc.mask = CLOCKSOURCE_MASK(bits);
cs->clksrc.flags = CLOCK_SOURCE_IS_CONTINUOUS;
- return clocksource_register_hz(&cs->clksrc, hz);
+ clocksource_register_hz(&cs->clksrc, hz);
+ return 0;
}
diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c
index 5645cfc..c59292f 100644
--- a/drivers/clocksource/samsung_pwm_timer.c
+++ b/drivers/clocksource/samsung_pwm_timer.c
@@ -340,7 +340,6 @@ static void __init samsung_clocksource_init(void)
{
unsigned long pclk;
unsigned long clock_rate;
- int ret;
pclk = clk_get_rate(pwm.timerclk);
@@ -361,9 +360,7 @@ static void __init samsung_clocksource_init(void)
pwm.variant.bits, clock_rate);
samsung_clocksource.mask = CLOCKSOURCE_MASK(pwm.variant.bits);
- ret = clocksource_register_hz(&samsung_clocksource, clock_rate);
- if (ret)
- panic("samsung_clocksource_timer: can't register clocksource\n");
+ clocksource_register_hz(&samsung_clocksource, clock_rate);
}
static void __init samsung_timer_resources(void)
diff --git a/drivers/clocksource/scx200_hrt.c b/drivers/clocksource/scx200_hrt.c
index 64f9e82..57bdc04 100644
--- a/drivers/clocksource/scx200_hrt.c
+++ b/drivers/clocksource/scx200_hrt.c
@@ -83,7 +83,8 @@ static int __init init_hrt_clocksource(void)
pr_info("enabling scx200 high-res timer (%s MHz +%d ppm)\n", mhz27 ? "27":"1", ppm);
- return clocksource_register_hz(&cs_hrt, freq);
+ clocksource_register_hz(&cs_hrt, freq);
+ return 0;
}
module_init(init_hrt_clocksource);
diff --git a/drivers/clocksource/tcb_clksrc.c b/drivers/clocksource/tcb_clksrc.c
index 00fdd11..805245d 100644
--- a/drivers/clocksource/tcb_clksrc.c
+++ b/drivers/clocksource/tcb_clksrc.c
@@ -340,9 +340,7 @@ static int __init tcb_clksrc_init(void)
}
/* and away we go! */
- ret = clocksource_register_hz(&clksrc, divided_rate);
- if (ret)
- goto err_disable_t1;
+ clocksource_register_hz(&clksrc, divided_rate);
/* channel 2: periodic and oneshot timer support */
ret = setup_clkevents(tc, clk32k_divisor_idx);
@@ -354,10 +352,6 @@ static int __init tcb_clksrc_init(void)
err_unregister_clksrc:
clocksource_unregister(&clksrc);
-err_disable_t1:
- if (!tc->tcb_config || tc->tcb_config->counter_width != 32)
- clk_disable_unprepare(tc->clk[1]);
-
err_disable_t0:
clk_disable_unprepare(t0_clk);
diff --git a/drivers/clocksource/timer-marco.c b/drivers/clocksource/timer-marco.c
index 09a17d9..ae78ce0 100644
--- a/drivers/clocksource/timer-marco.c
+++ b/drivers/clocksource/timer-marco.c
@@ -283,7 +283,7 @@ static void __init sirfsoc_marco_timer_init(void)
/* Clear all interrupts */
writel_relaxed(0xFFFF, sirfsoc_timer_base + SIRFSOC_TIMER_INTR_STATUS);
- BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE));
+ clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE);
sirfsoc_clockevent_init();
}
diff --git a/drivers/clocksource/timer-prima2.c b/drivers/clocksource/timer-prima2.c
index 8a492d3..c9cc307 100644
--- a/drivers/clocksource/timer-prima2.c
+++ b/drivers/clocksource/timer-prima2.c
@@ -204,7 +204,7 @@ static void __init sirfsoc_prima2_timer_init(struct device_node *np)
writel_relaxed(0, sirfsoc_timer_base + SIRFSOC_TIMER_COUNTER_HI);
writel_relaxed(BIT(0), sirfsoc_timer_base + SIRFSOC_TIMER_STATUS);
- BUG_ON(clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE));
+ clocksource_register_hz(&sirfsoc_clocksource, CLOCK_TICK_RATE);
sched_clock_register(sirfsoc_read_sched_clock, 64, CLOCK_TICK_RATE);
diff --git a/drivers/clocksource/vt8500_timer.c b/drivers/clocksource/vt8500_timer.c
index 1098ed3..13f5fa4 100644
--- a/drivers/clocksource/vt8500_timer.c
+++ b/drivers/clocksource/vt8500_timer.c
@@ -150,9 +150,7 @@ static void __init vt8500_timer_init(struct device_node *np)
writel(0xf, regbase + TIMER_STATUS_VAL);
writel(~0, regbase + TIMER_MATCH_VAL);
- if (clocksource_register_hz(&clocksource, VT8500_TIMER_HZ))
- pr_err("%s: vt8500_timer_init: clocksource_register failed for %s\n",
- __func__, clocksource.name);
+ clocksource_register_hz(&clocksource, VT8500_TIMER_HZ);
clockevent.cpumask = cpumask_of(0);
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 67301a4..5a17c5e 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -282,7 +282,7 @@ static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift)
}
-extern int clocksource_register(struct clocksource*);
+extern void clocksource_register(struct clocksource *);
extern int clocksource_unregister(struct clocksource*);
extern void clocksource_touch_watchdog(void);
extern struct clocksource* clocksource_get_next(void);
@@ -301,17 +301,17 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
* Don't call __clocksource_register_scale directly, use
* clocksource_register_hz/khz
*/
-extern int
+extern void
__clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq);
extern void
__clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq);
-static inline int clocksource_register_hz(struct clocksource *cs, u32 hz)
+static inline void clocksource_register_hz(struct clocksource *cs, u32 hz)
{
return __clocksource_register_scale(cs, 1, hz);
}
-static inline int clocksource_register_khz(struct clocksource *cs, u32 khz)
+static inline void clocksource_register_khz(struct clocksource *cs, u32 khz)
{
return __clocksource_register_scale(cs, 1000, khz);
}
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 9951575..686ff72 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -782,7 +782,7 @@ EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale);
* This *SHOULD NOT* be called directly! Please use the
* clocksource_register_hz() or clocksource_register_khz helper functions.
*/
-int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
+void __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
{
/* Initialize mult/shift and max_idle_ns */
@@ -794,7 +794,6 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
clocksource_enqueue_watchdog(cs);
clocksource_select();
mutex_unlock(&clocksource_mutex);
- return 0;
}
EXPORT_SYMBOL_GPL(__clocksource_register_scale);
@@ -804,7 +803,7 @@ EXPORT_SYMBOL_GPL(__clocksource_register_scale);
* @cs: clocksource to be registered
*
*/
-int clocksource_register(struct clocksource *cs)
+void clocksource_register(struct clocksource *cs)
{
/* calculate max adjustment for given mult/shift */
cs->maxadj = clocksource_max_adjustment(cs);
@@ -820,7 +819,6 @@ int clocksource_register(struct clocksource *cs)
clocksource_enqueue_watchdog(cs);
clocksource_select();
mutex_unlock(&clocksource_mutex);
- return 0;
}
EXPORT_SYMBOL(clocksource_register);
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 7a925ba..ae4c534 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -88,7 +88,8 @@ EXPORT_SYMBOL(jiffies);
static int __init init_jiffies_clocksource(void)
{
- return clocksource_register(&clocksource_jiffies);
+ clocksource_register(&clocksource_jiffies);
+ return 0;
}
core_initcall(init_jiffies_clocksource);
--
1.7.1
^ permalink raw reply related
* [PATCH v2 1/4] pinctrl: st: Add Interrupt support.
From: Linus Walleij @ 2014-01-23 7:22 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389886613-31945-1-git-send-email-srinivas.kandagatla@st.com>
On Thu, Jan 16, 2014 at 4:36 PM, <srinivas.kandagatla@st.com> wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> This patch add interrupt support to the pincontroller driver.
>
> ST Pincontroller GPIO bank can have one of the two possible types of
> interrupt-wirings.
>
> First type is via irqmux, single interrupt is used by multiple gpio
> banks. This reduces number of overall interrupts numbers required. All
> these banks belong to a single pincontroller.
> _________
> | |----> [gpio-bank (n) ]
> | |----> [gpio-bank (n + 1)]
> [irqN]-- | irq-mux |----> [gpio-bank (n + 2)]
> | |----> [gpio-bank (... )]
> |_________|----> [gpio-bank (n + 7)]
>
> Second type has a dedicated interrupt per gpio bank.
>
> [irqN]----> [gpio-bank (n)]
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
I've applied this patch so that it won't just sit idle.
Besides you've done a real good job on it Srinivas.
It'll be for v3.15 though and I'm still waiting to see if
the device tree people say something about it.
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH v2 2/4] pinctrl: st: Add software edge trigger interrupt support.
From: Linus Walleij @ 2014-01-23 7:29 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389886651-31990-1-git-send-email-srinivas.kandagatla@st.com>
On Thu, Jan 16, 2014 at 4:37 PM, <srinivas.kandagatla@st.com> wrote:
> ST pin controller does not have hardware support for detecting edge
> triggered interrupts, It only has level triggering support.
> This patch attempts to fake up edge triggers from hw level trigger
> support in software.
(...)
> +/*
> + * Edge triggers are not supported at hardware level, it is supported by
> + * software by exploiting the level trigger support in hardware.
> + * Software uses a virtual register (EDGE_CONF) for edge trigger configuration
> + * of each gpio pin in a GPIO bank.
(...)
> +/*
> + * As edge triggers are not supported at hardware level, it is supported by
> + * software by exploiting the level trigger support in hardware.
(...)
All this is quite hard to understand. Maybe it's just because
it's hard overall. Edge triggers are not supported by hardware
so we use the hardware edge trigger support?
That is a bit oxymoronic...
> + * Steps for detection raising edge interrupt in software.
> + *
> + * Step 1: CONFIGURE pin to detect level LOW interrupts.
> + *
> + * Step 2: DETECT level LOW interrupt and in irqmux/gpio bank interrupt handler,
> + * if the value of pin is low, then CONFIGURE pin for level HIGH interrupt.
> + * IGNORE calling the actual interrupt handler for the pin at this stage.
> + *
> + * Step 3: DETECT level HIGH interrupt and in irqmux/gpio-bank interrupt handler
> + * if the value of pin is HIGH, CONFIGURE pin for level LOW interrupt and then
> + * DISPATCH the interrupt to the interrupt handler of the pin.
But I do understand this, that's VERY clever and may be something
that can be exploited on other hardware as well some day.
So patch applied.
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH v2 3/4] ARM:STi: STiH416: Add interrupt support for pin controller
From: Linus Walleij @ 2014-01-23 7:30 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389886657-32035-1-git-send-email-srinivas.kandagatla@st.com>
On Thu, Jan 16, 2014 at 4:37 PM, <srinivas.kandagatla@st.com> wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> This patch adds interrupt support for STiH416 pin controllers.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Please merge this through the ARM SoC tree with the rest of
your device tree stuff.
Yours,
Linus Walleij
^ permalink raw reply
* [PATCH v2 4/4] ARM:STi: STiH415: Add interrupt support for pin controller
From: Linus Walleij @ 2014-01-23 7:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1389886665-32076-1-git-send-email-srinivas.kandagatla@st.com>
On Thu, Jan 16, 2014 at 4:37 PM, <srinivas.kandagatla@st.com> wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> This patch adds interrupt support for STiH415 pin controllers.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Merge this through ARM SoC.
> + reg = <0xfe61f080 0x4>;
> + reg-names = "irqmux";
Aha so that is how it looks when you handle the separate
mux reg, well I can't think of anything better and this works
fine for me.
The alternative would be to have a syscon thing using regmap
such as drivers/mfd/syscon.c but I really cannot decide
between these two design patterns for odd registers.
Yours,
Linus Walleij
^ permalink raw reply
* [PATCHv2 2/2] pwm: imx: support polarity inversion
From: Lothar Waßmann @ 2014-01-23 7:37 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20140116160356.GY16215@pengutronix.de>
Hi,
Sascha Hauer wrote:
> On Thu, Jan 16, 2014 at 09:06:25AM +0100, Lothar Wa?mann wrote:
> > The i.MX PWM controller supports inverting the polarity of the PWM
> > output. Make this feature available in the pxm-imx driver.
> >
> > Signed-off-by: Lothar Wa?mann <LW@KARO-electronics.de>
> > ---
> > Documentation/devicetree/bindings/pwm/imx-pwm.txt | 5 +-
> > drivers/pwm/pwm-imx.c | 42 +++++++++++++++++++++
> > 2 files changed, 45 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/pwm/imx-pwm.txt b/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> > index b50d7a6d..d0b04b5 100644
> > --- a/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> > +++ b/Documentation/devicetree/bindings/pwm/imx-pwm.txt
> > @@ -3,8 +3,9 @@ Freescale i.MX PWM controller
> > Required properties:
> > - compatible: should be "fsl,<soc>-pwm"
> > - reg: physical base address and length of the controller's registers
> > -- #pwm-cells: should be 2. See pwm.txt in this directory for a description of
> > - the cells format.
> > +- #pwm-cells: may be 2 for backwards compatibility or 3 to support
> > + switching the output polarity. See pwm.txt in this directory for a
> > + description of the cells format.
> > - interrupts: The interrupt for the pwm controller
> >
> > Example:
> > diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
> > index 3b00a82..05461bb 100644
> > --- a/drivers/pwm/pwm-imx.c
> > +++ b/drivers/pwm/pwm-imx.c
> > @@ -36,6 +36,7 @@
> > #define MX3_PWMCR_DOZEEN (1 << 24)
> > #define MX3_PWMCR_WAITEN (1 << 23)
> > #define MX3_PWMCR_DBGEN (1 << 22)
> > +#define MX3_PWMCR_POUTC (1 << 18)
> > #define MX3_PWMCR_CLKSRC_IPG_HIGH (2 << 16)
> > #define MX3_PWMCR_CLKSRC_IPG (1 << 16)
> > #define MX3_PWMCR_EN (1 << 0)
> > @@ -138,6 +139,9 @@ static int imx_pwm_config_v2(struct pwm_chip *chip,
> > if (test_bit(PWMF_ENABLED, &pwm->flags))
> > cr |= MX3_PWMCR_EN;
> >
> > + if (pwm->polarity == PWM_POLARITY_INVERSED)
> > + cr |= MX3_PWMCR_POUTC;
> > +
> > writel(cr, imx->mmio_base + MX3_PWMCR);
> >
> > return 0;
> > @@ -155,6 +159,11 @@ static void imx_pwm_set_enable_v2(struct pwm_chip *chip, bool enable)
> > else
> > val &= ~MX3_PWMCR_EN;
> >
> > + if (chip->pwms[0].polarity == PWM_POLARITY_INVERSED)
> > + val |= MX3_PWMCR_POUTC;
> > + else
> > + val &= ~MX3_PWMCR_POUTC;
> > +
> > writel(val, imx->mmio_base + MX3_PWMCR);
> > }
> >
> > @@ -198,6 +207,17 @@ static void imx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
> > clk_disable_unprepare(imx->clk_per);
> > }
> >
> > +static int imx_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm,
> > + enum pwm_polarity polarity)
> > +{
> > + struct imx_chip *imx = to_imx_chip(chip);
> > +
> > + dev_dbg(imx->chip.dev, "%s: polarity set to %s\n", __func__,
> > + polarity == PWM_POLARITY_INVERSED ? "inverted" : "normal");
> > +
> > + return 0;
> > +}
> > +
> > static struct pwm_ops imx_pwm_ops = {
> > .enable = imx_pwm_enable,
> > .disable = imx_pwm_disable,
> > @@ -209,6 +229,7 @@ struct imx_pwm_data {
> > int (*config)(struct pwm_chip *chip,
> > struct pwm_device *pwm, int duty_ns, int period_ns);
> > void (*set_enable)(struct pwm_chip *chip, bool enable);
> > + unsigned output_polarity:1;
> > };
> >
> > static struct imx_pwm_data imx_pwm_data_v1 = {
> > @@ -219,6 +240,7 @@ static struct imx_pwm_data imx_pwm_data_v1 = {
> > static struct imx_pwm_data imx_pwm_data_v2 = {
> > .config = imx_pwm_config_v2,
> > .set_enable = imx_pwm_set_enable_v2,
> > + .output_polarity = 1,
> > };
> >
> > static const struct of_device_id imx_pwm_dt_ids[] = {
> > @@ -271,6 +293,26 @@ static int imx_pwm_probe(struct platform_device *pdev)
> > return PTR_ERR(imx->mmio_base);
> >
> > data = of_id->data;
> > + if (data->output_polarity) {
> > + const struct device_node *np = pdev->dev.of_node;
> > + u32 num_cells;
> > +
> > + dev_dbg(&pdev->dev, "PWM supports output inversion\n");
> > + ret = of_property_read_u32(np, "#pwm-cells", &num_cells);
> > + if (ret < 0) {
> > + dev_err(&pdev->dev, "missing property '#pwm-cells'\n");
> > + return ret;
> > + }
> > + if (num_cells == 3) {
> > + imx_pwm_ops.set_polarity = imx_pwm_set_polarity;
> > + imx->chip.of_xlate = of_pwm_xlate_with_flags;
> > + } else if (num_cells != 2) {
> > + dev_err(&pdev->dev, "'#pwm-cells' must be <2> or <3>\n");
> > + return -EINVAL;
> > + }
> > + imx->chip.of_pwm_n_cells = num_cells;
> > + }
>
> Can't this be done in the PWM core? Right now the PWM core checks for
> of_pwm_n_cells before calling ->of_xlate. IMO this check should be done
> in the of_xlate hook. Then of_pwm_simple_xlate and
> of_pwm_xlate_with_flags can be merged into something like:
>
This wouldn't buy much without a material change to of_pwm_get().
The function of_parse_phandle_with_args() called by of_pwm_get()
requires the number of args in the pwms property be greater or equal to
the #pwm-cells property in the pwm node. Thus, the interesting case of
having #pwm-cells = <3> without changing the existing users is
prohibited by of_parse_phandle_with_args().
of_pwm_get() would have to be changed to something like below to allow
this:
struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id)
{
struct pwm_device *pwm = NULL;
struct of_phandle_args args;
struct pwm_chip *pc;
int index = 0;
int err;
struct property *prop;
u32 num_cells;
int i;
const __be32 *list;
if (con_id) {
index = of_property_match_string(np, "pwm-names", con_id);
if (index < 0)
return ERR_PTR(index);
}
args.np = of_parse_phandle(np, "pwms", index);
if (!args.np) {
pr_err("%s(): property 'pwms' not found in '%s'\n",
__func__, np->full_name);
return ERR_PTR(-ENOENT);
}
err = of_property_read_u32(args.np, "#pwm-cells", &num_cells);
if (err) {
pr_err("%s(): could not read property '#pwm-cells' in '%s': %d\n",
__func__, args.np->full_name, err);
return ERR_PTR(err);
}
prop = of_find_property(np, "pwms", NULL);
if (WARN_ON(!prop))
return ERR_PTR(-EINVAL);
args.args_count = prop->length / sizeof(u32) - 1;
list = prop->value;
for (i = 0; i < args.args_count; i++)
args.args[i] = be32_to_cpup(++list);
pc = of_node_to_pwmchip(args.np);
if (IS_ERR(pc)) {
pr_err("%s(): PWM chip not found\n", __func__);
pwm = ERR_CAST(pc);
goto put;
}
[...]
Lothar Wa?mann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstra?e 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Gesch?ftsf?hrer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info@karo-electronics.de
___________________________________________________________
^ permalink raw reply
* [PATCH 3/5] ARM: firmware: enable Trusted Foundations by default
From: Alexandre Courbot @ 2014-01-23 7:38 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52E02D40.3090803@wwwdotorg.org>
On Thu, Jan 23, 2014 at 5:42 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 01/21/2014 03:10 AM, Alexandre Courbot wrote:
>> As discussed previously (https://lkml.org/lkml/2013/11/26/289), enable
>> Trusted Foundation support by default since it already depends on a
>> supporting architecture being selected.
>>
>> Doing so allows us to remove it from tegra_defconfig.
>
>> arch/arm/configs/tegra_defconfig | 1 -
>> arch/arm/firmware/Kconfig | 1 +
>
> Can we split out the defconfig and code changes into separate patches?
> They need to go through seperate branches, possibly even separate repos.
>
> The defconfig change might not even be necessary; at some point I'll
> just rebuild it via "make tegra_defconfig; make savedefconfig" on top of
> some linux-next that includes the Kconfig change, and it'll happen
> automatically. Still, I guess there's no harm explicitly sending the patch.
If we can do without the defconfig change then I will just omit it in
the next version - I don't like sending too many oneliners. :P
^ permalink raw reply
* [PATCH 4/5] ARM: trusted_foundations: implement do_idle()
From: Alexandre Courbot @ 2014-01-23 7:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52E02D8C.7090309@wwwdotorg.org>
On Thu, Jan 23, 2014 at 5:43 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 01/21/2014 03:10 AM, Alexandre Courbot wrote:
>> Support the do_idle() firmware call, which is necessary to properly
>> support cpuidle.
>
>> diff --git a/arch/arm/firmware/trusted_foundations.c b/arch/arm/firmware/trusted_foundations.c
>
>> +#define TF_CPU_PM 0xfffffffc
>> +#define TF_CPU_PM_LP0 0xffffffe3
>> +#define TF_CPU_PM_LP1 0xffffffe6
>> +#define TF_CPU_PM_LP1_NO_MC_CLK 0xffffffe5
>> +#define TF_CPU_PM_LP2 0xffffffe4
>> +#define TF_CPU_PM_LP2_NOFLUSH_L2 0xffffffe7
>
> Hmm. This must be Tegra-specific, not generic to any TF client, since
> aren't the names of the suspend states (LP0, LP1, LP2) entirely specific
> to Tegra?
The names are negligence on my part, actually. I arbitrarily named
them that way without thinking this was Tegra-only denomination. The
downstream kernel does not even use these, they hardcode the values
directly. Will fix that, thanks for spotting it.
^ permalink raw reply
* [PATCH 5/5] ARM: tegra: cpuidle: use firmware call for power down
From: Alexandre Courbot @ 2014-01-23 7:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <52E02DCC.1000404@wwwdotorg.org>
On Thu, Jan 23, 2014 at 5:45 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 01/21/2014 03:10 AM, Alexandre Courbot wrote:
>> Invoke the do_idle() firmware call before suspending a CPU so that the
>> underlying firmware (if any) can take necessary action.
>
>> diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c
>
>> @@ -45,6 +46,8 @@ static int tegra114_idle_power_down(struct cpuidle_device *dev,
>>
>> clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
>>
>> + call_firmware_op(do_idle);
>> +
>> cpu_suspend(0, tegra30_sleep_cpu_secondary_finish);
>>
>> clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
>
> Don't you need to have the kernel also *not* do something when entering
> idle; doesn't the FW op replace some of the register writes that the
> kernel would otherwise be doing?
It seems like the operation is actually to inform the firmware that we
are going to suspend the CPU. Downstream kernel also uses it that way.
But you are right in that we should expect do_idle() to actually
perform the suspend operation. Maybe a prepare_idle() operation should
be added to the firmware interface for this purpose?
^ permalink raw reply
* [PATCH] pinctrl: at91: use locked variant of irq_set_handler
From: Linus Walleij @ 2014-01-23 7:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1390319718-12285-1-git-send-email-nicolas.ferre@atmel.com>
On Tue, Jan 21, 2014 at 4:55 PM, Nicolas Ferre <nicolas.ferre@atmel.com> wrote:
> When setting the gpio irq type, use the __irq_set_handler_locked()
> variant instead of the irq_set_handler() to prevent false
> spinlock recursion warning.
>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: stable <stable@vger.kernel.org> # v3.12
Patch applied for fixes.
Yours,
Linus Walleij
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox