Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Is Spread Spectrum Clock Generator for AM335x supported?

I want to use a low EMI clock generator to reduce noise in my system.  Does the AM335x series support this type of clock, the datasheet does not indicate that it does or does not, please advise.  Thanks!

  • All AM335x DPLL modules support spread spectrum clocking.

    These are SSC registers described in the TRM.

    CM_SSC_DELTAMSTEP_DPLL_*

    CM_SSC_MODFREQDIV_DPLL_*

  • I have a medical device customer that is asking about the AM335x SSC support.  I’ve read through the TRM but do not have enough experience with SSC to understand what is being conveyed, or what the actual capabilities are just by looking at the register definitions.  It looks like MPU, DDR, DISP (LCD?), CORE, and PER domains are supported.

    Does the PRCM generate SSC clocks for each domain, based on the SSC registers for each domain? 

    Can the main clock be fed with an SSC source?

    Am I missing anything in a typical EMI constrained use case?

    Thank you!

  • The following section will be added to the TRM to describe SSC:

    Spread Spectrum Clocking (SSC)
    The module supports spread spectrum clocking (SSC) on its output clocks. SSC is used to spread the spectral peaking of the clock to reduce any electromagnetic interference (EMI) that may be caused due to the clock’s fundamental or any of its harmonics. When SSC is enabled the clock’s spectrum is spread by the amount of frequency spread, and the attenuation is given by the ratio of the frequency spread (Δf) and the modulation frequency (fm), i.e., [{10*log10(Df/fm)}-10] dB.
    SSC is performed by changing the feedback divider (M) in a triangular pattern. Implying, the frequency of the output clock would vary in a triangular pattern. The frequency of this pattern would be modulation frequency (fm). The peak (ΔM) or the amplitude of the triangular pattern as a percent of M would be equal to the percent of the output frequency spread (Δf); that is, ΔM/M= Δf / fc.
    Next mark with Finp the frequency of the clock signal at the input of the DPLL. Because it is divided to N+1 before entering the phase detector, so the internal reference frequency is Fref = Finp / (N + 1).
    Assume the central frequency fc to be equal to the DPLL output frequency Fout, or fc= Fout = (Finp / (N + 1)) * (M / M2).
    Since this is in band modulation for the DPLL, the modulation frequency is required to be within the DPLL's loop bandwidth (lowest BW of Fref / 70). A higher modulation frequency would result in lesser spreading in the output clock.
    SSC can be enabled/disabled using bit CM_CLKMODE_DPLL_xxx.DPLL_SSC_EN (where xxx can be any one of the following DPLLs: MPU, DDR, DISP, CORE, PER). An acknowledge signal CM_CLKMODE_DPLL_xxx.DPLL SSC_ACK notifies the exact start and end of SSC. When SSC_EN is de-asserted, SSC is disabled only after completion of one full cycle of the triangular pattern given by the modulation frequency. This is done in order to maintain the average frequency.
    Modulation frequency (fm) can be programmed as a ratio of Fref / 4; that is, the value that needs to be programmed ModFreqDivider = Fref / (4*fm). The ModFreqDivider is split into Mantissa and 2^Exponent (ModFreqDivider = ModFreqDividerMantissa * 2^ModFreqDividerExponent). The mantissa is controlled by 7-bit signal ModFreqDividerMantissa through CM_SSC_MODFREQDIV_DPLL_xxx.MODFREQDEV_MANTISSA bit field. The exponent is controlled by 3bit signal ModFreqDividerExponent through the CM_SSC_MODFREQDIV_DPLL_xxx.MODFREQDEV_EXPONENT bit field.

    NOTE: Although the same value of ModFreqDivider can be obtained by different combinations of mantissa and exponent values, it is recommended to get the target ModFreqDivider by programming maximum mantissa and a minimum exponent.
    To define the Frequency spread (Δf), ΔM must be controlled as explained previously. To define ΔM, the step size of M for each Fref during the triangular pattern must be programmed; that is,
    ΔM = (2^ModFreqDividerExponent) * ModFreqDividerMantissa * DeltaMStep IF ModFreqDividerExponent <= 3ΔM = 8 * ModFreqDividerMantissa * DeltaMStep IF ModFreqDividerExponent > 3
    DeltaMStep is split into integer part and fractional part. Integer part is controlled by 2-bit signal DeltaMStepInteger through the CM_SSC_DELTAMSTEP_DPLL_xxx.DELTAMSTEP_INTEGER bit field. Fractional part is controlled by 18-bit signal DeltaMStepFraction through the CM_SSC_DELTAMSTEP_DPLL_xxx.DELTAMSTEP_FRACTION bit field.
    The frequency spread achieved has an overshoot of 20 percent or an inaccuracy of +20 percent.
    If the CM_CLKMODE_DPLL.DPLL_SSC_DOWNSPREADis set to 1, the frequency spread on lower side is twice the programmed value. The frequency spread on higher side is 0 (except for the overshoot as described previously).

    There is restriction of range of M values. The restriction is M-ΔM should be >= 20. Also, M+ΔM should be <= 2045. In case the downspread feature is enabled, M-2*ΔM should be >= 20 and M <= 2045.

    Regards,

    James

  • Please can you give me an example on how to activate the Spread Spectrum Clock in linux?

    It is mentioned in AM335x_TRM that "SSC can be enabled/disabled using bit CM_CLKMODE_DPLL_xxx.DPLL_SSC_EN", but I have no clue how to do that on my  linux board.

    Thanks.

    G.

  • See attached source code. Use it in the board file of the linux kernel.

    regards

    Wolfgang

  • Hi guys

    I'm trying to do spread spectrum on AM335x and I got this source code and tried to compile it. I am running TI Arago Kernel 3.12 from SDK7 and tried to compile it against that, but no matter what method I use I keep getting so many errors.

    I tried to compile it as an independent source (used Linaro Cross GCC and G++) couldn't get it to work, as it failed with errors regarding definitions of "HZ" and "RCU":

    In file included from ../include/linux/smp.h:12:0,

                     from ../include/linux/irq.h:12,
                     from ../arch/arm/mach-omap2/common.h:29,
                     from ../arch/arm/mach-omap2/cm33xx.h:20,
                     from dither.c:3:
    ../include/linux/cpumask.h:149:37: error: "and" may not appear in macro parameter list
    In file included from ../include/linux/srcu.h:33:0,
                     from ../include/linux/notifier.h:15,
                     from ../include/linux/memory_hotplug.h:6,
                     from ../include/linux/mmzone.h:797,
                     from ../include/linux/gfp.h:4,
                     from ../include/linux/irq.h:17,
                     from ../arch/arm/mach-omap2/common.h:29,
                     from ../arch/arm/mach-omap2/cm33xx.h:20,
                     from dither.c:3:
    ../include/linux/rcupdate.h:278:2: error: #error "Unknown RCU implementation specified to kernel configuration"
    In file included from ../include/linux/ktime.h:25:0,
                     from ../include/linux/timer.h:5,
                     from ../include/linux/workqueue.h:8,
                     from ../include/linux/srcu.h:34,
                     from ../include/linux/notifier.h:15,
                     from ../include/linux/memory_hotplug.h:6,
                     from ../include/linux/mmzone.h:797,
                     from ../include/linux/gfp.h:4,
                     from ../include/linux/irq.h:17,
                     from ../arch/arm/mach-omap2/common.h:29,
                     from ../arch/arm/mach-omap2/cm33xx.h:20,
                     from dither.c:3:
    ../include/linux/jiffies.h:39:3: error: #error Invalid value of HZ.
    ../include/linux/jiffies.h:60:39: error: division by zero in #if
    In file included from ../arch/arm/mach-omap2/common.h:31:0,
                     from ../arch/arm/mach-omap2/cm33xx.h:20,
                     from dither.c:3:
    ../include/linux/i2c.h:450:15: error: missing binary operator before token "("
    ../include/linux/i2c.h:547:15: error: missing binary operator before token "("
    In file included from ../include/linux/i2c/twl.h:29:0,
                     from ../arch/arm/mach-omap2/common.h:32,
                     from ../arch/arm/mach-omap2/cm33xx.h:20,
                     from dither.c:3:
    ../include/linux/phy/phy.h:119:15: error: missing binary operator before token "("
    In file included from ../include/uapi/linux/posix_types.h:4:0,
                     from ../include/uapi/linux/types.h:13,
                     from ../include/linux/types.h:5,
                     from ../include/linux/smp.h:10,
                     from ../include/linux/irq.h:12,
                     from ../arch/arm/mach-omap2/common.h:29,
                     from ../arch/arm/mach-omap2/cm33xx.h:20,
                     from dither.c:3:
    ../include/linux/stddef.h:11:2: error: expected identifier before ‘false’
    ../include/linux/stddef.h:11:2: error: expected ‘}’ before ‘false’
    ../include/linux/stddef.h:11:2: error: expected unqualified-id before ‘false’
    ../include/linux/stddef.h:13:1: error: expected declaration before ‘}’ token
    I tried to build it as a kernel module with a simple Makefile:
    obj-m += dither.o
    EXTRA_CFLAGS := -I$(PWD)/../arch/arm/mach-omap2
    all:
            make -C ../ $(EXTRA_CFLAGS) M=$(PWD) modules
    clean:
            make -C ../ M=$(PWD) clean
    I renamed the file to dither.c for convenience.
    Now I'm getting a whole lot of errors like
    make[1]: Entering directory `3.12'
      CC [M]  3.12/dither/dither.o
    In file included from 3.12/arch/x86/include/asm/bitops.h:520:0,
                     from include/linux/bitops.h:22,
                     from include/linux/kernel.h:10,
                     from include/linux/cpumask.h:9,
                     from include/linux/smp.h:12,
                     from include/linux/irq.h:12,
                     from 3.12/dither/../arch/arm/mach-omap2/common.h:29,
                     from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20,
                     from 3.12/dither/dither.c:3:
    3.12/arch/x86/include/asm/arch_hweight.h: In function ‘__arch_hweight64’:
    3.12/arch/x86/include/asm/arch_hweight.h:53:7: error: expected ‘:’ or ‘)’ before ‘POPCNT64’
    In file included from 3.12/arch/x86/include/asm/thread_info.h:22:0,
                     from include/linux/thread_info.h:54,
                     from include/linux/preempt.h:9,
                     from include/linux/spinlock.h:50,
                     from include/linux/irq.h:15,
                     from 3.12/dither/../arch/arm/mach-omap2/common.h:29,
                     from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20,
                     from 3.12/dither/dither.c:3:
    3.12/arch/x86/include/asm/processor.h: At top level:
    3.12/arch/x86/include/asm/processor.h:131:30: error: ‘CONFIG_X86_L1_CACHE_SHIFT’ undeclared here (not in a function)
    3.12/arch/x86/include/asm/processor.h:131:1: error: requested alignment is not a constant
    3.12/arch/x86/include/asm/processor.h:164:0: warning: "cache_line_size" redefined [enabled by default]
    include/linux/cache.h:64:0: note: this is the location of the previous definition
    3.12/arch/x86/include/asm/processor.h:253:1: error: requested alignment is not a constant
    3.12/arch/x86/include/asm/processor.h:284:1: error: requested alignment is not a constant
    In file included from 3.12/arch/x86/include/asm/atomic.h:274:0,
                     from include/linux/atomic.h:4,
                     from 3.12/arch/x86/include/asm/thread_info.h:23,
                     from include/linux/thread_info.h:54,
                     from include/linux/preempt.h:9,
                     from include/linux/spinlock.h:50,
                     from include/linux/irq.h:15,
                     from 3.12/dither/../arch/arm/mach-omap2/common.h:29,
                     from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20,
                     from 3.12/dither/dither.c:3:
    3.12/arch/x86/include/asm/atomic64_64.h:19:1: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h: In function ‘atomic64_read’:
    3.12/arch/x86/include/asm/atomic64_64.h:21:32: error: request for member ‘counter’ in something not a structure or union
    3.12/arch/x86/include/asm/atomic64_64.h: At top level:
    3.12/arch/x86/include/asm/atomic64_64.h:31:33: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:43:41: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:57:41: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:73:49: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:89:33: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:102:33: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:117:41: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:135:41: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:154:49: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:171:48: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:176:48: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:184:37: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:189:34: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:203:39: error: unknown type name ‘atomic64_t’
    3.12/arch/x86/include/asm/atomic64_64.h:227:45: error: unknown type name ‘atomic64_t’
    In file included from include/linux/atomic.h:129:0,
                     from 3.12/arch/x86/include/asm/thread_info.h:23,
                     from include/linux/thread_info.h:54,
                     from include/linux/preempt.h:9,
                     from include/linux/spinlock.h:50,
                     from include/linux/irq.h:15,
                     from 3.12/dither/../arch/arm/mach-omap2/common.h:29,
                     from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20,
                     from 3.12/dither/dither.c:3:
    include/asm-generic/atomic64.h:21:18: error: conflicting types for ‘atomic64_read’
    3.12/arch/x86/include/asm/atomic64_64.h:19:20: note: previous definition of ‘atomic64_read’ was here
    include/asm-generic/atomic64.h:34:0: warning: "atomic64_inc_return" redefined [enabled by default]
    3.12/arch/x86/include/asm/atomic64_64.h:181:0: note: this is the location of the previous definition
    include/asm-generic/atomic64.h:38:0: warning: "atomic64_dec_return" redefined [enabled by default]
    3.12/arch/x86/include/asm/atomic64_64.h:182:0: note: this is the location of the previous definition
    include/asm-generic/atomic64.h:40:0: warning: "atomic64_inc_not_zero" redefined [enabled by default]
    3.12/arch/x86/include/asm/atomic64_64.h:218:0: note: this is the location of the previous definition
    In file included from 3.12/arch/x86/include/asm/pgtable.h:878:0,
                     from include/linux/mm.h:50,
                     from 3.12/arch/x86/include/asm/pci.h:4,
                     from include/linux/pci.h:1487,
                     from 3.12/arch/x86/include/asm/prom.h:19,
                     from include/linux/of.h:139,
                     from include/linux/i2c.h:33,
                     from 3.12/dither/../arch/arm/mach-omap2/common.h:31,
                     from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20,
                     from 3.12/dither/dither.c:3:
    include/asm-generic/pgtable.h:397:19: error: redefinition of ‘pte_soft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:298:19: note: previous definition of ‘pte_soft_dirty’ was here
    include/asm-generic/pgtable.h:402:19: error: redefinition of ‘pmd_soft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:303:19: note: previous definition of ‘pmd_soft_dirty’ was here
    include/asm-generic/pgtable.h:407:21: error: redefinition of ‘pte_mksoft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:308:21: note: previous definition of ‘pte_mksoft_dirty’ was here
    include/asm-generic/pgtable.h:412:21: error: redefinition of ‘pmd_mksoft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:313:21: note: previous definition of ‘pmd_mksoft_dirty’ was here
    include/asm-generic/pgtable.h:417:21: error: redefinition of ‘pte_swp_mksoft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:860:21: note: previous definition of ‘pte_swp_mksoft_dirty’ was here
    include/asm-generic/pgtable.h:422:19: error: redefinition of ‘pte_swp_soft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:866:19: note: previous definition of ‘pte_swp_soft_dirty’ was here
    include/asm-generic/pgtable.h:427:21: error: redefinition of ‘pte_swp_clear_soft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:872:21: note: previous definition of ‘pte_swp_clear_soft_dirty’ was here
    include/asm-generic/pgtable.h:432:21: error: redefinition of ‘pte_file_clear_soft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:318:21: note: previous definition of ‘pte_file_clear_soft_dirty’ was here
    include/asm-generic/pgtable.h:437:21: error: redefinition of ‘pte_file_mksoft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:323:21: note: previous definition of ‘pte_file_mksoft_dirty’ was here
    include/asm-generic/pgtable.h:442:19: error: redefinition of ‘pte_file_soft_dirty’
    3.12/arch/x86/include/asm/pgtable.h:328:19: note: previous definition of ‘pte_file_soft_dirty’ was here
    In file included from include/linux/fs.h:8:0,
                     from include/linux/input.h:23,
                     from include/linux/input/matrix_keypad.h:5,
                     from include/linux/i2c/twl.h:30,
                     from 3.12/dither/../arch/arm/mach-omap2/common.h:32,
                     from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20,
                     from 3.12/dither/dither.c:3:
    include/linux/dcache.h:161:1: error: requested alignment is not a constant
    In file included from include/linux/input.h:23:0,
                     from include/linux/input/matrix_keypad.h:5,
                     from include/linux/i2c/twl.h:30,
                     from 3.12/dither/../arch/arm/mach-omap2/common.h:32,
                     from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20,
                     from 3.12/dither/dither.c:3:
    include/linux/fs.h:1588:1: error: requested alignment is not a constant
    In file included from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20:0,
                     from 3.12/dither/dither.c:3:
    3.12/dither/../arch/arm/mach-omap2/common.h:36:26: fatal error: asm/proc-fns.h: No such file or directory
    compilation terminated.
    make[2]: *** [3.12/dither/dither.o] Error 1
    make[1]: *** [_module_3.12/dither] Error 2
    make[1]: Leaving directory `3.12'
    make: *** [all] Error 2
    Can anybody help me figure out how to get this thing compiled please? I'm using Ubuntu 12.04 and I can build the kernel no problem, all tools are installed properly. 
  • You have to configure and build the kernel before you can build a module against the kernel.

    Look at your make output: it seems that the kernel tries to build a x86 module.

  • I already have built the kernel:

    make -C . -j4 ARCH=arm CROSS_COMPILE=$CC zImage

    Should I make modules too first?

    I have a perfectly good zImage sitting in arch/arm/boot.

  • I made some progress today...However I'm still getting this error:

    make -C ./ ARCH=arm CROSS_COMPILE=${CC}

    make[1]: Entering directory `3.12'
      CC [M]  3.12/dither/dither.o
    In file included from include/linux/time.h:6:0,
                     from include/linux/ktime.h:24,
                     from include/linux/timer.h:5,
                     from include/linux/workqueue.h:8,
                     from include/linux/srcu.h:34,
                     from include/linux/notifier.h:15,
                     from include/linux/memory_hotplug.h:6,
                     from include/linux/mmzone.h:797,
                     from include/linux/gfp.h:4,
                     from include/linux/irq.h:17,
                     from 3.12/dither/../arch/arm/mach-omap2/common.h:29,
                     from 3.12/dither/../arch/arm/mach-omap2/cm33xx.h:20,
                     from 3.12/dither/dither.c:3:
    include/linux/math64.h: In function ‘div_u64_rem’:
    include/linux/math64.h:66:15: error: ‘__LINUX_ARM_ARCH__’ undeclared (first use in this function)
    include/linux/math64.h:66:15: note: each undeclared identifier is reported only once for each function it appears in
    make[2]: *** [3.12/dither/dither.o] Error 1
    make[1]: *** [_module_3.12/dither] Error 2
    make[1]: Leaving directory `3.12'
    Makefile is:
    obj-m += dither.o
    EXTRA_CFLAGS := -I$(PWD)/../arch/arm/mach-omap2
    ccflags-y  += $(EXTRA_CFLAGS)
    KBUILD_CFLAGS := $(call cc-disable-warning, unused-but-set-variable)
    KBUILD_CFLAGS += -w
    all:
            make -C ../ $(EXTRA_CFLAGS) M=$(PWD) modules
    clean:
            make -C ../ M=$(PWD) clean
  • maybe this info helps:
    I tried putting the file and the makefile in:
    1- 3.12/dither/
    2- 3.12/arch/arm/mach-omap2/

    Same result.
    Is the Makefile correct?
    What am I missing?
  • I made another change but still no success:

    I moved the dither.c to arch/arm/mach-omap2/ and modified the Makefile there and added 

    obj-m  += dither.o

    and did make ARCH=.... modules but I keep getting the following errors:

      CC [M]  net/bluetooth/hci_sock.o
      CC [M]  drivers/misc/bmp085-i2c.o
      CC [M]  drivers/misc/tsl2550.o
      CC [M]  arch/arm/mach-omap2/dither.o
      CC [M]  drivers/misc/lis3lv02d/lis3lv02d.o
      CC [M]  net/bluetooth/hci_sysfs.o
      CC [M]  net/bluetooth/l2cap_core.o
      CC [M]  net/bluetooth/l2cap_sock.o
      CC [M]  drivers/media/usb/gspca/gspca.o
      CC [M]  drivers/media/v4l2-core/videobuf2-vmalloc.o
    arch/arm/mach-omap2/dither.c: In function ‘spread_spectrum_setup’:
    arch/arm/mach-omap2/dither.c:76:5: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
    arch/arm/mach-omap2/dither.c:76:16: warning: assignment makes pointer from integer without a cast [enabled by default]
    arch/arm/mach-omap2/dither.c:83:5: error: implicit declaration of function ‘readl’ [-Werror=implicit-function-declaration]
    arch/arm/mach-omap2/dither.c:89:5: error: implicit declaration of function ‘clk_get’ [-Werror=implicit-function-declaration]
    arch/arm/mach-omap2/dither.c:89:11: warning: assignment makes pointer from integer without a cast [enabled by default]
    arch/arm/mach-omap2/dither.c:90:5: error: implicit declaration of function ‘clk_get_rate’ [-Werror=implicit-function-declaration]
    arch/arm/mach-omap2/dither.c:124:5: error: implicit declaration of function ‘writel’ [-Werror=implicit-function-declaration]
    arch/arm/mach-omap2/dither.c:132:5: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
      CC [M]  drivers/input/touchscreen/pixcir_i2c_ts.o
    arch/arm/mach-omap2/dither.c: At top level:
    arch/arm/mach-omap2/dither.c:135:13: warning: ‘make_spread_spectrum’ defined but not used [-Wunused-function]
    cc1: some warnings being treated as errors
    make[1]: *** [arch/arm/mach-omap2/dither.o] Error 1
    make: *** [arch/arm/mach-omap2] Error 2
    make: *** Waiting for unfinished jobs....
      CC [M]  sound/usb/endpoint.o
      CC [M]  sound/usb/format.o
      CC [M]  net/bridge/br_forward.o
      CC [M]  drivers/misc/lis3lv02d/lis3lv02d_i2c.o

    But if I add the suppression line to the Makefile:
    KBUILD_CFLAGS := $(call cc-disable-warning, unused-but-set-variable)
    I start getting the same error as above:
    3.12 $ make -C . -j48 ARCH=arm CROSS_COMPILE=${CC} modules
    make: Entering directory `3.12'
      CHK     include/config/kernel.release
      CHK     include/generated/uapi/linux/version.h
      CHK     include/generated/utsrelease.h
    make[1]: `include/generated/mach-types.h' is up to date.
      CALL    scripts/checksyscalls.sh
      CC [M]  arch/arm/mach-omap2/dither.o
    In file included from include/linux/time.h:6:0,
                     from include/linux/ktime.h:24,
                     from include/linux/timer.h:5,
                     from include/linux/workqueue.h:8,
                     from include/linux/srcu.h:34,
                     from include/linux/notifier.h:15,
                     from include/linux/memory_hotplug.h:6,
                     from include/linux/mmzone.h:797,
                     from include/linux/gfp.h:4,
                     from include/linux/irq.h:17,
                     from arch/arm/mach-omap2/common.h:29,
                     from arch/arm/mach-omap2/cm33xx.h:20,
                     from arch/arm/mach-omap2/dither.c:3:
    include/linux/math64.h: In function ‘div_u64_rem’:
    include/linux/math64.h:66:15: error: ‘__LINUX_ARM_ARCH__’ undeclared (first use in this function)
    include/linux/math64.h:66:15: note: each undeclared identifier is reported only once for each function it appears in
    arch/arm/mach-omap2/dither.c: In function ‘spread_spectrum_setup’:
    arch/arm/mach-omap2/dither.c:76:16: warning: assignment makes pointer from integer without a cast [enabled by default]
    arch/arm/mach-omap2/dither.c:89:11: warning: assignment makes pointer from integer without a cast [enabled by default]
    make[1]: *** [arch/arm/mach-omap2/dither.o] Error 1
    make: *** [arch/arm/mach-omap2] Error 2

    I'm at a dead end...any help anyone?

  • The "implicit declaration" errors are because of missing include files. Remind that the sourcecode you get was meant to be included in the board file. The board file typically has include files to define ioremap, readl etc...
    Just add the missing include files to your module sourcecode.

    "‘make_spread_spectrum’ defined but not used " comes from the fact that you have missed to include a call to make_spread_spectrum() from the init function of your module.

    You should read http://lwn.net/Kernel/LDD3/

    regards
    Wolfgang
  • Dear wolfgang,

    Even I am trying to integrate the same in ti sdk 8 source code, Could you please let me know when & where ie., in which file (if it is in board file , am referring to am335x this board file: linux-3.14.26-g2489c02\arch\arm\mach-omap2\board-generic.c) could you please let me know where this make_spread_spectrum() function needs to be called in this file???

    Kindly do the needful as early as possible,

    Many Thanks in advance
  • I would like to provide some information on Spread Spectrum Clocking (SSC).

    Additional timing margins are required when enabling Spread Spectrum Clocking (SSC). This prevents SSC from being enabled on any of the PLLs that source clocks to peripheral interfaces. We have determined SSC can be enabled on the MPU and Display PLL's since they only source clocks to dedicated circuits and interfaces that do not require low jitter clocks. The other PLLs will effect peripheral timing, so SSC should not be enabled on any PLLs other than MPU and Display.

    You will need to configure the PLL to operate at a lower center frequency than maximum frequencies defined in the data sheet when SSC is enabled on the MPU and Display PLLs since SSC will spread the clock either side of the center frequency and the upper limit of the spread must not exceed the respective maximum frequency defined in the data sheet.

    EMI is a system level design consideration and one of the things that can aggravate EMI is a non-optimized system design. If EMI is an issue, it may need to be resolved with proper PCB layout, PCB to PCB connector selection/signal-pin assignments, off-board connector selection and cable design. For example, signals propagating through connectors need to have a ground reference that does not create a large loop area for current to flow through such that it radiates like an antenna.

    I cannot answer any questions related to implementing SSC in the various operating systems since I’m not a software support person. I just wanted to warn you that implementing SSC has some limitations and may not be easy to integrate with some of the complex power saving features currently implemented in the various operating systems.

    Regards,
    Paul