01 Jul, 2016

1 commit


03 Mar, 2016

1 commit


30 Jan, 2016

4 commits

  • The definition of s2mps11_name is meant to resolve the name of a
    given clock. Remove it because the clocks have the same name we
    can get it directly from the s2mps11_clks_init structure.

    While in the probe function the s2mps11_clks is used only to
    iterate through the s2mps11_clks. The naming itself brings
    confusion and the readability does not improve much.

    Signed-off-by: Andi Shyti
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Stephen Boyd

    Andi Shyti
     
  • The clk_table and clk_data are declared static. The clk_table
    contains the three clock data structures belonging to the s2mps11
    driver. In the probe function it gets stored into clk_data.

    Remove clk_table and refer directly to clk_data.

    clk_data, itself, is also declared static. Declare locally it
    and allocate it inside the probe function, as it is not used
    anywhere else.

    Signed-off-by: Andi Shyti
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Stephen Boyd

    Andi Shyti
     
  • The driver allocates three structures, s2mpsxx_clk_init, for
    three different clock types (s2mps11, s2mps13 and s2mps14). They
    are quite similar but they differ only by the name. Only one of
    these structures is used, while the others lie unused in the
    memory.

    The clock's name, though, is not such a meaningful information
    and by assigning the same name to the initial data we can avoid
    over allocation. The common name chosen will be s2mps11,
    coherently with the device driver name, instead of the clock
    device.

    Therefore, remove the structures associated to s2mps13 and
    s2mps14 and use only the one referred to s2mps11 for all kind of
    clocks.

    Signed-off-by: Andi Shyti
    Suggested-by: Krzysztof Kozlowski
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Stephen Boyd

    Andi Shyti
     
  • The driver already loops once, there is no reason to loop again
    for a different purpose. Merge the second loop into the first.

    Signed-off-by: Andi Shyti
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Stephen Boyd

    Andi Shyti
     

29 Jul, 2015

2 commits

  • This patch cleans up the driver for,

    - Use devm_kcalloc() variant instead of devm_kzalloc() for array
    allocation.
    - clk_prepare()/unprepare(), remove "ret" variable as it is not required
    - use __exit for cleanup function

    As I am referring this driver as a reference for my 88pm800 clk driver,
    applying same changes here as well.

    Signed-off-by: Vaibhav Hiremath
    Tested-by: Anand Moon
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Stephen Boyd

    Vaibhav Hiremath
     
  • The devm_clk_unregister() in .probe error case is not necessary as it will
    be automatically called when probe fails.

    Signed-off-by: Axel Lin
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Stephen Boyd

    Axel Lin
     

06 May, 2015

1 commit


21 Dec, 2014

1 commit

  • Pull clk framework updates from Mike Turquette:
    "This is much later than usual due to several last minute bugs that had
    to be addressed. As usual the majority of changes are new drivers and
    modifications to existing drivers. The core recieved many fixes along
    with the groundwork for several large changes coming in the future
    which will better parition clock providers from clock consumers"

    * tag 'clk-for-linus-3.19' of git://git.linaro.org/people/mike.turquette/linux: (86 commits)
    clk: samsung: Fix Exynos 5420 pinctrl setup and clock disable failure due to domain being gated
    ARM: OMAP3: clock: fix boot breakage in legacy mode
    ARM: OMAP2+: clock: fix DPLL code to use new determine rate APIs
    clk: Really fix deadlock with mmap_sem
    clk: mmp: fix sparse non static symbol warning
    clk: Change clk_ops->determine_rate to return a clk_hw as the best parent
    clk: change clk_debugfs_add_file to take a struct clk_hw
    clk: Don't expose __clk_get_accuracy
    clk: Don't try to use a struct clk* after it could have been freed
    clk: Remove unused function __clk_get_prepare_count
    clk: samsung: Fix double add of syscore ops after driver rebind
    clk: samsung: exynos4: set parent of sclk_hdmiphy to hdmi
    clk: samsung: exynos4415: Fix build with PM_SLEEP disabled
    clk: samsung: remove unnecessary inclusion of header files from clk.h
    clk: samsung: remove unnecessary CONFIG_OF from clk.c
    clk: samsung: Spelling s/bwtween/between/
    clk: rockchip: Add support for the mmc clock phases using the framework
    clk: rockchip: add bindings for the mmc clocks
    clk: rockchip: rk3288 export i2s0_clkout for use in DT
    clk: rockchip: use clock ID for DMC (memory controller) on rk3288
    ...

    Linus Torvalds
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

29 Nov, 2014

1 commit


26 Nov, 2014

1 commit


25 Nov, 2014

1 commit


20 Oct, 2014

1 commit


04 Jul, 2014

1 commit


03 Jul, 2014

1 commit

  • s2mps11 clocks had registered callbacks for prepare ,unprepare and is_enabled.
    During disabling unused clocks the lack of is_prepared caused that unused
    s2mps11 clocks were not unprepared and stayed active.

    Regmap_read is cached so it can be called in is_prepare callback
    to achieve this information. Enabled field was removed from struct s2mps11_clk.

    Signed-off-by: Karol Wrona
    Signed-off-by: Mike Turquette

    Karol Wrona
     

02 Jul, 2014

1 commit

  • After unbinding the driver memory was corrupted by double free of
    clk_lookup structure. This lead to OOPS when re-binding the driver
    again.

    The driver allocated memory for 'clk_lookup' with devm_kzalloc. During
    driver removal this memory was freed twice: once by clkdev_drop() and
    second by devm code.

    Kernel panic log:
    [ 30.839284] Unable to handle kernel paging request at virtual address 5f343173
    [ 30.846476] pgd = dee14000
    [ 30.849165] [5f343173] *pgd=00000000
    [ 30.852703] Internal error: Oops: 805 [#1] PREEMPT SMP ARM
    [ 30.858166] Modules linked in:
    [ 30.861208] CPU: 0 PID: 1 Comm: bash Not tainted 3.16.0-rc2-00239-g94bdf617b07e-dirty #40
    [ 30.869364] task: df478000 ti: df480000 task.ti: df480000
    [ 30.874752] PC is at clkdev_add+0x2c/0x38
    [ 30.878738] LR is at clkdev_add+0x18/0x38
    [ 30.882732] pc : [] lr : [] psr: 60000013
    [ 30.882732] sp : df481e78 ip : 00000001 fp : c0700ed8
    [ 30.894187] r10: 0000000c r9 : 00000000 r8 : c07b0e3c
    [ 30.899396] r7 : 00000002 r6 : df45f9d0 r5 : df421390 r4 : c0700d6c
    [ 30.905906] r3 : 5f343173 r2 : c0700d84 r1 : 60000013 r0 : c0700d6c
    [ 30.912417] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    [ 30.919534] Control: 10c53c7d Table: 5ee1406a DAC: 00000015
    [ 30.925262] Process bash (pid: 1, stack limit = 0xdf480240)
    [ 30.930817] Stack: (0xdf481e78 to 0xdf482000)
    [ 30.935159] 1e60: 00001000 df6de610
    [ 30.943321] 1e80: df7f4558 c0355650 c05ec6ec c0700eb0 df6de600 df7f4510 dec9d69c 00000014
    [ 30.951480] 1ea0: 00167b48 df6de610 c0700e30 c0713518 00000000 c0700e30 dec9d69c 00000006
    [ 30.959639] 1ec0: 00167b48 c02c1b7c c02c1b64 df6de610 c07aff48 c02c0420 c06fb150 c047cc20
    [ 30.967798] 1ee0: df6de610 df6de610 c0700e30 df6de644 c06fb150 0000000c dec9d690 c02bef90
    [ 30.975957] 1f00: dec9c6c0 dece4c00 df481f80 dece4c00 0000000c c02be73c 0000000c c016ca8c
    [ 30.984116] 1f20: c016ca48 00000000 00000000 c016c1f4 00000000 00000000 b6f18000 df481f80
    [ 30.992276] 1f40: df7f66c0 0000000c df480000 df480000 b6f18000 c011094c df47839c 60000013
    [ 31.000435] 1f60: 00000000 00000000 df7f66c0 df7f66c0 0000000c df480000 b6f18000 c0110dd4
    [ 31.008594] 1f80: 00000000 00000000 0000000c b6ec05d8 0000000c b6f18000 00000004 c000f2a8
    [ 31.016753] 1fa0: 00001000 c000f0e0 b6ec05d8 0000000c 00000001 b6f18000 0000000c 00000000
    [ 31.024912] 1fc0: b6ec05d8 0000000c b6f18000 00000004 0000000c 00000001 00000000 00167b48
    [ 31.033071] 1fe0: 00000000 bed83a80 b6e004f0 b6e5122c 60000010 00000001 ffffffff ffffffff
    [ 31.041248] [] (clkdev_add) from [] (s2mps11_clk_probe+0x2b4/0x3b4)
    [ 31.049223] [] (s2mps11_clk_probe) from [] (platform_drv_probe+0x18/0x48)
    [ 31.057728] [] (platform_drv_probe) from [] (driver_probe_device+0x13c/0x384)
    [ 31.066579] [] (driver_probe_device) from [] (bind_store+0x88/0xd8)
    [ 31.074564] [] (bind_store) from [] (drv_attr_store+0x20/0x2c)
    [ 31.082118] [] (drv_attr_store) from [] (sysfs_kf_write+0x44/0x48)
    [ 31.090016] [] (sysfs_kf_write) from [] (kernfs_fop_write+0xc0/0x17c)
    [ 31.098176] [] (kernfs_fop_write) from [] (vfs_write+0xa0/0x1c4)
    [ 31.105899] [] (vfs_write) from [] (SyS_write+0x40/0x8c)
    [ 31.112931] [] (SyS_write) from [] (ret_fast_syscall+0x0/0x3c)
    [ 31.120481] Code: e2842018 e584501c e1a00004 e885000c (e5835000)
    [ 31.126596] ---[ end trace efad45bfa3a61b05 ]---
    [ 31.131181] Kernel panic - not syncing: Fatal exception
    [ 31.136368] CPU1: stopping
    [ 31.139054] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 3.16.0-rc2-00239-g94bdf617b07e-dirty #40
    [ 31.148697] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [ 31.156419] [] (show_stack) from [] (dump_stack+0x80/0xcc)
    [ 31.163622] [] (dump_stack) from [] (handle_IPI+0x130/0x15c)
    [ 31.170998] [] (handle_IPI) from [] (gic_handle_irq+0x60/0x68)
    [ 31.178549] [] (gic_handle_irq) from [] (__irq_svc+0x40/0x70)
    [ 31.186009] Exception stack(0xdf4bdf88 to 0xdf4bdfd0)
    [ 31.191046] df80: ffffffed 00000000 00000000 00000000 df4bc000 c06d042c
    [ 31.199207] dfa0: 00000000 ffffffed c06d03c0 00000000 c070c288 00000000 00000000 df4bdfd0
    [ 31.207363] dfc0: c0010324 c0010328 60000013 ffffffff
    [ 31.212402] [] (__irq_svc) from [] (arch_cpu_idle+0x28/0x30)
    [ 31.219783] [] (arch_cpu_idle) from [] (cpu_startup_entry+0x2c4/0x3f0)
    [ 31.228027] [] (cpu_startup_entry) from [] (0x400086c4)
    [ 31.234968] ---[ end Kernel panic - not syncing: Fatal exception

    Fixes: 7cc560dea415 ("clk: s2mps11: Add support for s2mps11")
    Cc:
    Signed-off-by: Krzysztof Kozlowski
    Reviewed-by: Yadwinder Singh Brar
    Signed-off-by: Mike Turquette

    Krzysztof Kozlowski
     

24 May, 2014

3 commits


25 Mar, 2014

2 commits


19 Mar, 2014

2 commits


16 Dec, 2013

1 commit


09 Aug, 2013

1 commit