1. 13 3月, 2018 23 次提交
  2. 12 2月, 2018 17 次提交
    • J
      clk: meson: add axg misc bit to the mpll driver · 6c00e7b7
      Jerome Brunet 提交于
      On axg, the rate of the mpll is stuck as if sdm value was 4 and could not
      change (expect for mpll2 strangely). Looking at the vendor kernel, it
      turns out a new magic bit from the undocumented HHI_PLL_TOP_MISC register
      is required.
      
      Setting this bit solves the problem and the mpll rates are back to normal
      
      Fixes: 78b4af31 ("clk: meson-axg: add clock controller drivers")
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      6c00e7b7
    • Y
      clk: meson: axg: fix the od shift of the sys_pll · 2fa9b361
      Yixun Lan 提交于
      According to the datasheet, the od shift of sys_pll is actually 16.
      
      Fixes: 78b4af31 ('clk: meson-axg: add clock controller drivers')
      Signed-off-by: NYixun Lan <yixun.lan@amlogic.com>
      [fixed commit message]
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      2fa9b361
    • J
      clk: meson: axg: add the fractional part of the fixed_pll · 6b71acec
      Jerome Brunet 提交于
      The fixed_pll also has a fractional part. On axg s400 board, without
      this parameter, the calculated rate is off by ~8Mhz (0,4%). The fixed_pll
      being the root of the peripheral clock tree, this error is propagated to
      the rest of the clocks
      
      Adding the definition of the parameter fixes the problem
      
      Fixes: 78b4af31 ("clk: meson-axg: add clock controller drivers")
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      6b71acec
    • J
      clk: meson: gxbb: add the fractional part of the fixed_pll · 07f45e2e
      Jerome Brunet 提交于
      The fixed_pll of gxbb and gxl also has a fractional parameter. This has
      not been a problem so far because the fractional part is actually set
      to 0 on these platforms, so the rate remains correct when it is ignored.
      Still, it is better represent the pll the way it is, so add the frac
      parameter now
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      07f45e2e
    • J
      clk: meson: fix rate calculation of plls with a fractional part · 3c4fe763
      Jerome Brunet 提交于
      The rate of the parent should not be multiplied by 2 when the pll has a
      fractional part. This is making the rate calculation of the gxl_hdmi_pll
      wrong (and others as well). This multiplication is specific
      to the hdmi_pll of gxbb and is most likely due to a multiplier sitting
      in front of this particular pll.
      
      Add a fixed factor clock in front on the gxbb pll and remove this constant
      from the calculation to fix the problem
      
      Fixes: 4a472951 ("clk: meson: fractional pll support")
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      3c4fe763
    • J
      clk: meson: add the gxl hdmi pll · 69d92293
      Jerome Brunet 提交于
      The hdmi pll used in the gxl family is actually different from the gxbb
      one. The register layout is completely different, which explain why the
      hdmi pll rate has always been rubbish on the gxl family.
      
      Adding the correct register field is the first part of the fix to get a
      correct rate out the hdmi pll
      
      Fixes: 0d48fc55 ("clk: meson-gxbb: Add GXL/GXM GP0 Variant")
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      69d92293
    • J
      clk: meson: add od3 to the pll driver · 7d3142e5
      Jerome Brunet 提交于
      Some meson plls, such as the hdmi pll, are using a 3rd od parameter,
      which is yet another "power of 2" post divider. Add it to fix the
      calculation of the hdmi_pll rate
      
      Fixes: 738f66d3 ("clk: gxbb: add AmLogic GXBB clk controller driver")
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      7d3142e5
    • J
      clk: meson: use the frac parameter width instead of a constant · 4c5f67b7
      Jerome Brunet 提交于
      Use the fractional part width in the calculation instead of 12, which
      happens to be the witdh right now. This is safer in case the field width
      ever change in the future
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      4c5f67b7
    • J
      clk: meson: remove unnecessary rounding in the pll clock · 94aa8a41
      Jerome Brunet 提交于
      The pll driver performs the rate calculation in Mhz, which adds an
      unnecessary rounding down to the Mhz of the rate. Use 64bits long
      integers to perform this calculation safely on meson8b and perform the
      calculation in Hz instead
      
      Fixes: 7a29a869 ("clk: meson: Add support for Meson clock controller")
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      94aa8a41
    • J
      clk: meson: remove useless pll rate params tables · 4ed98e95
      Jerome Brunet 提交于
      Read-only plls don't need param table to recalculate the rate.
      Providing them with a param table is just a waste of memory.
      
      Remove the useless tables from sys_pll on gxbb and axg.
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      4ed98e95
    • J
      clk: meson: check pll rate param table before using it · 840e1a73
      Jerome Brunet 提交于
      Make sure the rate param table is available before using it.
      Some read-only plls don't provide it, which is ok since the
      table is not used by read-only clocks. R/W clocks are supposed
      to provide it, but it does not hurt check it.
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      840e1a73
    • L
      Linux 4.16-rc1 · 7928b2cb
      Linus Torvalds 提交于
      7928b2cb
    • A
      unify {de,}mangle_poll(), get rid of kernel-side POLL... · 7a163b21
      Al Viro 提交于
      except, again, POLLFREE and POLL_BUSY_LOOP.
      
      With this, we finally get to the promised end result:
      
       - POLL{IN,OUT,...} are plain integers and *not* in __poll_t, so any
         stray instances of ->poll() still using those will be caught by
         sparse.
      
       - eventpoll.c and select.c warning-free wrt __poll_t
      
       - no more kernel-side definitions of POLL... - userland ones are
         visible through the entire kernel (and used pretty much only for
         mangle/demangle)
      
       - same behavior as after the first series (i.e. sparc et.al. epoll(2)
         working correctly).
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7a163b21
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
    • L
      Merge branch 'work.poll2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · ee5daa13
      Linus Torvalds 提交于
      Pull more poll annotation updates from Al Viro:
       "This is preparation to solving the problems you've mentioned in the
        original poll series.
      
        After this series, the kernel is ready for running
      
            for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
                  L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
                  for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
            done
      
        as a for bulk search-and-replace.
      
        After that, the kernel is ready to apply the patch to unify
        {de,}mangle_poll(), and then get rid of kernel-side POLL... uses
        entirely, and we should be all done with that stuff.
      
        Basically, that's what you suggested wrt KPOLL..., except that we can
        use EPOLL... instead - they already are arch-independent (and equal to
        what is currently kernel-side POLL...).
      
        After the preparations (in this series) switch to returning EPOLL...
        from ->poll() instances is completely mechanical and kernel-side
        POLL... can go away. The last step (killing kernel-side POLL... and
        unifying {de,}mangle_poll() has to be done after the
        search-and-replace job, since we need userland-side POLL... for
        unified {de,}mangle_poll(), thus the cherry-pick at the last step.
      
        After that we will have:
      
         - POLL{IN,OUT,...} *not* in __poll_t, so any stray instances of
           ->poll() still using those will be caught by sparse.
      
         - eventpoll.c and select.c warning-free wrt __poll_t
      
         - no more kernel-side definitions of POLL... - userland ones are
           visible through the entire kernel (and used pretty much only for
           mangle/demangle)
      
         - same behavior as after the first series (i.e. sparc et.al. epoll(2)
           working correctly)"
      
      * 'work.poll2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        annotate ep_scan_ready_list()
        ep_send_events_proc(): return result via esed->res
        preparation to switching ->poll() to returning EPOLL...
        add EPOLLNVAL, annotate EPOLL... and event_poll->event
        use linux/poll.h instead of asm/poll.h
        xen: fix poll misannotation
        smc: missing poll annotations
      ee5daa13
    • L
      Merge tag 'xtensa-20180211' of git://github.com/jcmvbkbc/linux-xtensa · 3fc928dc
      Linus Torvalds 提交于
      Pull xtense fix from Max Filippov:
       "Build fix for xtensa architecture with KASAN enabled"
      
      * tag 'xtensa-20180211' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: fix build with KASAN
      3fc928dc
    • L
      Merge tag 'nios2-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 · 60d7a21a
      Linus Torvalds 提交于
      Pull nios2 update from Ley Foon Tan:
      
       - clean up old Kconfig options from defconfig
      
       - remove leading 0x and 0s from bindings notation in dts files
      
      * tag 'nios2-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
        nios2: defconfig: Cleanup from old Kconfig options
        nios2: dts: Remove leading 0x and 0s from bindings notation
      60d7a21a