Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple timers from system clock #16958

Merged
merged 33 commits into from
Jul 24, 2019

Commits on Jul 18, 2019

  1. drivers: i2c_bitbang: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC

    On some SoCs the frequency of the system clock is obtained at run time
    as the exact configuration of the hardware is not known at compile time.
    On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
    directly introduces timing errors.
    
    This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call to
    inline function sys_clock_hw_cycles_per_sec() which always returns
    correct frequency of the system clock.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    c175847 View commit details
    Browse the repository at this point in the history
  2. drivers: pwm_qmsi: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC

    On some SoCs the frequency of the system clock is obtained at run time
    as the exact configuration of the hardware is not known at compile time.
    On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
    directly introduces timing errors.
    
    This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call
    to inline function sys_clock_hw_cycles_per_sec() which always returns
    correct frequency of the system clock.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    060b4cb View commit details
    Browse the repository at this point in the history
  3. drivers: timer: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC

    On some SoCs the frequency of the system clock is obtained at run time
    as the exact configuration of the hardware is not known at compile time.
    On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
    directly introduces timing errors.
    
    This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call
    to inline function sys_clock_hw_cycles_per_sec() which always returns
    correct frequency of the system clock.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    ab48cfc View commit details
    Browse the repository at this point in the history
  4. debug: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC

    On some SoCs the frequency of the system clock is obtained at run time
    as the exact configuration of the hardware is not known at compile time.
    On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
    directly introduces timing errors.
    
    This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call
    to inline function sys_clock_hw_cycles_per_sec() which always returns
    correct frequency of the system clock.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    4484bd1 View commit details
    Browse the repository at this point in the history
  5. logging: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC

    On some SoCs the frequency of the system clock is obtained at run time
    as the exact configuration of the hardware is not known at compile time.
    On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
    directly introduces timing errors.
    
    This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call
    to inline function sys_clock_hw_cycles_per_sec() which always returns
    correct frequency of the system clock.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    ffa9369 View commit details
    Browse the repository at this point in the history
  6. tests: benchmarks: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC

    On some SoCs the frequency of the system clock is obtained at run time
    as the exact configuration of the hardware is not known at compile time.
    On such platforms using CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC define
    directly introduces timing errors.
    
    This commit replaces CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC by the call
    to inline function sys_clock_hw_cycles_per_sec() which always returns
    correct frequency of the system clock.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    4bbc37b View commit details
    Browse the repository at this point in the history
  7. drivers: i2c_cc32xx: Get clock frequency from DTS

    The i2c_cc32xx driver used system clock frequency
    as a base for I2C clock frequency calculation.
    This commit corrects that by obtaining the needed value from DTS.
    
    Please note, that for I2C devices the clock-frequency property
    specifies SCK frequency, instead of frequency of the clock driving
    peripheral. To solve that problem, a new property was added.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    94f0762 View commit details
    Browse the repository at this point in the history
  8. soc: snps_arc_iot: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    55a832a View commit details
    Browse the repository at this point in the history
  9. soc: sam3x: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    d6d0037 View commit details
    Browse the repository at this point in the history
  10. soc: sam4s: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    3a72781 View commit details
    Browse the repository at this point in the history
  11. soc: samd2x: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    caa08fb View commit details
    Browse the repository at this point in the history
  12. soc: samr21: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    c81013e View commit details
    Browse the repository at this point in the history
  13. soc: same70: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    02a7d41 View commit details
    Browse the repository at this point in the history
  14. soc: k6x: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    e953624 View commit details
    Browse the repository at this point in the history
  15. soc: kl2x: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    d7e3316 View commit details
    Browse the repository at this point in the history
  16. soc: kwx: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    28a2444 View commit details
    Browse the repository at this point in the history
  17. soc: lpc54xxx: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    c28c44b View commit details
    Browse the repository at this point in the history
  18. arch: xtensa: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    59812b0 View commit details
    Browse the repository at this point in the history
  19. soc: msp432p4xx: Get CPU clock frequency from DTS

    The SoC initialization code used system clock frequency
    as a CPU clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    788e4e8 View commit details
    Browse the repository at this point in the history
  20. soc: nxp_rt: Get system clock frequency from DTS

    The SoC initialization code used timer clock frequency
    as a system clock frequency. This commit corrects that by
    obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    bb7b545 View commit details
    Browse the repository at this point in the history
  21. drivers: beetle_clock_control: Get CPU clock frequency from DTS

    The clock control initialization code used system clock
    frequency as a CPU clock frequency. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    c8c9cf3 View commit details
    Browse the repository at this point in the history
  22. logging: log_backend_swo: Get clock frequency from DTS

    The log_backend_swo used system clock frequency
    as a base for SWO clock calculation. This commit
    corrects that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    75d1fc7 View commit details
    Browse the repository at this point in the history
  23. drivers: spi_dw: Get clock frequency from DTS

    The spi_dw driver used system clock frequency
    as a base for SPI bus frequency calculation.
    This commit corrects that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    2b2800d View commit details
    Browse the repository at this point in the history
  24. drivers: uart_cmsdk_apb: Get clock frequency from DTS

    The uart_cmsdk_apb driver used system clock frequency
    as a base for baudrate calculation. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    9000a51 View commit details
    Browse the repository at this point in the history
  25. drivers: uart_pl011: Get clock frequency from DTS

    The uart_pl011 driver used system clock frequency
    as a base for baudrate calculation. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    0e25db3 View commit details
    Browse the repository at this point in the history
  26. drivers: uart_cc32xx: Get clock frequency from DTS

    The uart_cc32xx driver used system clock frequency
    as a base for baudrate calculation. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    3098758 View commit details
    Browse the repository at this point in the history
  27. drivers: uart_msp432p4xx: Get clock frequency from DTS

    The uart_msp432p4xx driver used system clock frequency
    as a base for baudrate calculation. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    8219a3a View commit details
    Browse the repository at this point in the history
  28. drivers: uart_qmsi: Get clock frequency from DTS

    The uart_qmsi driver used system clock frequency
    as a base for baudrate calculation. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    7ae312a View commit details
    Browse the repository at this point in the history
  29. drivers: uart_stellaris: Get clock frequency from DTS

    The uart_stellaris driver used system clock frequency
    as a base for baudrate calculation. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    1ef851b View commit details
    Browse the repository at this point in the history
  30. drivers: uart_cc13xx_cc26xx: Get clock frequency from DTS

    The uart_cc13xx_cc26xx driver used system clock frequency
    as a base for baudrate calculation. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    d5db8cf View commit details
    Browse the repository at this point in the history
  31. drivers: wdog_cmsdk_apb: Get clock frequency from DTS

    The wdog_cmsdk_apb driver used system clock frequency
    as a base for timeout calculation. This commit corrects
    that by obtaining the needed value from DTS.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    bccdf56 View commit details
    Browse the repository at this point in the history
  32. drivers: adc_stm32: Get clock frequency from DTS

    The adc_stm32 driver used system timer frequency as a base for
    busy-wait delay calculation. This commit corrects that by obtaining
    the needed value from SystemCoreClock variable.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    efebd07 View commit details
    Browse the repository at this point in the history
  33. debug: tracing: Fix compilation error

    This commit adds the kernel.h include in order to provide
    sys_clock_hw_cycles_per_sec() declaration.
    
    Signed-off-by: Piotr Zięcik <[email protected]>
    pizi-nordic committed Jul 18, 2019
    Configuration menu
    Copy the full SHA
    7850fb5 View commit details
    Browse the repository at this point in the history