| /OK3568_Linux_fs/kernel/arch/powerpc/boot/ |
| H A D | pq2.c | 1 // SPDX-License-Identifier: GPL-2.0-only 12 #include "fsl-soc.h" 21 3, 2, 2, 2, 4, 4, 5, 9, 6, 11, 8, 10, 3, 12, 7, -1, 22 6, 5, 13, 2, 14, 4, 15, 9, 0, 11, 8, 10, 16, 12, 7, -1 25 /* Get various clocks from crystal frequency. 26 * Returns zero on failure and non-zero on success. 29 u32 *timebase, u32 *brgfreq) in pq2_get_clocks() argument 55 if (timebase) in pq2_get_clocks() 56 *timebase = busclk / 4; in pq2_get_clocks() 75 void pq2_set_clocks(u32 sysfreq, u32 corefreq, u32 timebase, u32 brgfreq) in pq2_set_clocks() argument [all …]
|
| H A D | treeboot-akebono.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 * Copyright 2002-2005 MontaVista Software Inc. 77 /* Fixup the SD timeout frequency */ in ibm_akebono_fixups() 80 /* Disable SD high-speed mode (which seems to be broken) */ in ibm_akebono_fixups() 88 setprop(emac, "local-mac-address", in ibm_akebono_fixups() 98 const u32 *timebase; in platform_init() local 102 userdata[USERDATA_LEN - 1] = '\0'; in platform_init() 104 for (i = 0; i < userdata_len - 15; i++) { in platform_init() 105 if (strncmp(&userdata[i], "local-mac-addr=", 15) == 0) { in platform_init() 106 if (i > 0 && userdata[i - 1] != ' ') { in platform_init() [all …]
|
| H A D | simpleboot.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * The simple platform -- for booting when firmware doesn't supply a device 28 const u32 *na, *ns, *reg, *timebase; in platform_init() local 36 /* Find the #address-cells and #size-cells properties */ in platform_init() 40 na = fdt_getprop(_dtb_start, node, "#address-cells", &size); in platform_init() 42 fatal("Cannot find #address-cells property"); in platform_init() 43 ns = fdt_getprop(_dtb_start, node, "#size-cells", &size); in platform_init() 45 fatal("Cannot find #size-cells property"); in platform_init() 48 node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type", in platform_init() 68 /* finally, setup the timebase */ in platform_init() [all …]
|
| H A D | treeboot-currituck.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Copyright 2002-2005 MontaVista Software Inc. 67 if (getprop(devp, "dma-ranges", dma_ranges, sizeof(dma_ranges)) < 0) { in ibm_currituck_fixups() 68 printf("%s: Failed to get dma-ranges\r\n", __func__); in ibm_currituck_fixups() 75 setprop(devp, "dma-ranges", dma_ranges, sizeof(dma_ranges)); in ibm_currituck_fixups() 85 const u32 *timebase; in platform_init() local 92 avail_ram = end_of_ram - (unsigned long)_end; in platform_init() 103 node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type", in platform_init() 107 timebase = fdt_getprop(_dtb_start, node, "timebase-frequency", &size); in platform_init() 108 if (timebase && (size == 4)) in platform_init() [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/watchdog/ |
| H A D | of-xilinx-wdt.txt | 1 Xilinx AXI/PLB soft-core watchdog Device Tree Bindings 2 --------------------------------------------------------- 5 - compatible : Should be "xlnx,xps-timebase-wdt-1.00.a" or 6 "xlnx,xps-timebase-wdt-1.01.a". 7 - reg : Physical base address and size 10 - clocks : Input clock specifier. Refer to common clock 12 - clock-frequency : Frequency of clock in Hz 13 - xlnx,wdt-enable-once : 0 - Watchdog can be restarted 14 1 - Watchdog can be enabled just once 15 - xlnx,wdt-interval : Watchdog timeout interval in 2^<val> clock cycles, [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/boot/dts/ |
| H A D | iss4xx-mpic.dts | 15 /dts-v1/; 20 #address-cells = <2>; 21 #size-cells = <1>; 22 model = "ibm,iss-4xx"; 23 compatible = "ibm,iss-4xx"; 24 dcr-parent = <&{/cpus/cpu@0}>; 31 #address-cells = <1>; 32 #size-cells = <0>; 38 clock-frequency = <100000000>; // 100Mhz :-) 39 timebase-frequency = <100000000>; [all …]
|
| H A D | ps3.dts | 1 // SPDX-License-Identifier: GPL-2.0-only 9 /dts-v1/; 14 #size-cells = <2>; 15 #address-cells = <2>; 33 * dtc expects a clock-frequency and timebase-frequency entries, so 38 * threads is with an ibm,ppc-interrupt-server#s entry. We'll put one 43 #size-cells = <0>; 44 #address-cells = <1>; 49 ibm,ppc-interrupt-server#s = <0x0 0x1>; 50 clock-frequency = <0>; [all …]
|
| H A D | sbc8548-pre.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-or-later 13 #address-cells = <1>; 14 #size-cells = <1>; 26 #address-cells = <1>; 27 #size-cells = <0>; 32 d-cache-line-size = <0x20>; // 32 bytes 33 i-cache-line-size = <0x20>; // 32 bytes 34 d-cache-size = <0x8000>; // L1, 32K 35 i-cache-size = <0x8000>; // L1, 32K 36 timebase-frequency = <0>; // From uboot [all …]
|
| H A D | currituck.dts | 11 /dts-v1/; 16 #address-cells = <2>; 17 #size-cells = <2>; 20 dcr-parent = <&{/cpus/cpu@0}>; 27 #address-cells = <1>; 28 #size-cells = <0>; 34 clock-frequency = <1600000000>; // 1.6 GHz 35 timebase-frequency = <100000000>; // 100Mhz 36 i-cache-line-size = <32>; 37 d-cache-line-size = <32>; [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/kernel/ |
| H A D | time.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * Converted for 64-bit by Mike Corrigan (mikejc@us.ibm.com) 11 * to make clock more stable (2.4.0-test5). The only thing 20 * - improve precision and reproducibility of timebase frequency 22 * - for astronomical applications: add a new function to get 26 * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 49 #include <linux/posix-timers.h> 72 #include <asm/asm-prototypes.h> 81 .name = "timebase", 145 * Factor for converting from cputime_t (timebase ticks) to [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/platforms/8xx/ |
| H A D | m8xx_setup.c | 1 // SPDX-License-Identifier: GPL-2.0 42 /* per-board overridable init_internal_rtc() function. */ 49 clrbits16(&sys_tmr->sit_rtcsc, (RTCSC_SIE | RTCSC_ALE)); in init_internal_rtc() 52 setbits16(&sys_tmr->sit_rtcsc, (RTCSC_RTF | RTCSC_RTE)); in init_internal_rtc() 62 /* The cpu node should have timebase and clock frequency properties */ in get_freq() 78 /* The decrementer counts at the system (internal) clock frequency divided by 94 out_be32(&clk_r1->cark_sccrk, ~KAPWR_KEY); in mpc8xx_calibrate_decr() 95 out_be32(&clk_r1->cark_sccrk, KAPWR_KEY); in mpc8xx_calibrate_decr() 100 setbits32(&clk_r2->car_sccr, 0x02000000); in mpc8xx_calibrate_decr() 103 /* Processor frequency is MHz. in mpc8xx_calibrate_decr() [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/boot/dts/fsl/ |
| H A D | mpc8641si-pre.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2016 Elettra-Sincrotrone Trieste S.C.p.A. 8 /dts-v1/; 11 #address-cells = <1>; 12 #size-cells = <1>; 13 interrupt-parent = <&mpic>; 27 #address-cells = <1>; 28 #size-cells = <0>; 33 d-cache-line-size = <32>; 34 i-cache-line-size = <32>; [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/riscv/ |
| H A D | cpus.yaml | 1 # SPDX-License-Identifier: (GPL-2.0 OR MIT) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: RISC-V bindings for 'cpus' DT nodes 10 - Paul Walmsley <paul.walmsley@sifive.com> 11 - Palmer Dabbelt <palmer@sifive.com> 14 This document uses some terminology common to the RISC-V community 18 mandated by the RISC-V ISA: a PC and some registers. This 28 - items: 29 - enum: [all …]
|
| /OK3568_Linux_fs/kernel/drivers/pwm/ |
| H A D | pwm-img.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (c) 2014-2015, Imagination Technologies 7 * Based on drivers/pwm/pwm-tegra.c, Copyright (c) 2010, NVIDIA Corporation 43 * PWM period is specified with a timebase register, 45 * specified in step periods, in the [0, $timebase] range. 46 * In other words, the timebase imposes the duty cycle 47 * resolution. Therefore, let's constraint the timebase to 49 * Imposing a minimum timebase, will impose a maximum PWM frequency. 83 writel(val, chip->base + reg); in img_pwm_writel() 89 return readl(chip->base + reg); in img_pwm_readl() [all …]
|
| /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/timer/ |
| H A D | sifive,clint.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Palmer Dabbelt <palmer@dabbelt.com> 11 - Anup Patel <anup.patel@wdc.com> 14 SiFive (and other RISC-V) SOCs include an implementation of the SiFive 15 Core Local Interruptor (CLINT) for M-mode timer and M-mode inter-processor 16 interrupts. It directly connects to the timer and inter-processor interrupt 17 lines of various HARTs (or CPUs) so RISC-V per-HART (or per-CPU) local 19 The clock frequency of CLINT is specified via "timebase-frequency" DT [all …]
|
| /OK3568_Linux_fs/kernel/arch/riscv/kernel/ |
| H A D | time.c | 1 // SPDX-License-Identifier: GPL-2.0-only 22 if (!cpu || of_property_read_u32(cpu, "timebase-frequency", &prop)) in time_init() 23 panic(KERN_WARNING "RISC-V system with no 'timebase-frequency' in DTS\n"); in time_init() 36 cs->vdso_clock_mode = VDSO_CLOCKMODE_ARCHTIMER; in clocksource_arch_init() 38 cs->vdso_clock_mode = VDSO_CLOCKMODE_NONE; in clocksource_arch_init()
|
| /OK3568_Linux_fs/u-boot/arch/microblaze/cpu/ |
| H A D | timer.c | 6 * SPDX-License-Identifier: GPL-2.0+ 22 return timestamp - base; in get_timer() 23 return timestamp++ - base; in get_timer() 32 while ((get_timer(0) - i) < (usec / 1000)) in __udelay() 41 tmr->control = tmr->control | TIMER_INTERRUPT; in timer_isr() 46 int irq = -1; in timer_init() 49 const void *blob = gd->fdt_blob; in timer_init() 56 "xlnx,xps-timer-1.00.a"); in timer_init() 57 if (node != -1) { in timer_init() 60 return -1; in timer_init() [all …]
|
| /OK3568_Linux_fs/u-boot/arch/m68k/lib/ |
| H A D | time.c | 7 * SPDX-License-Identifier: GPL-2.0+ 44 usec = usec - tmp; in __udelay() 46 /* Set up TIMER 3 as timebase clock */ in __udelay() 47 timerp->tmr = DTIM_DTMR_RST_RST; in __udelay() 48 timerp->tcn = 0; in __udelay() 50 timerp->tmr = in __udelay() 54 start = now = timerp->tcn; in __udelay() 56 now = timerp->tcn; in __udelay() 66 timerp->ter = (DTIM_DTER_CAP | DTIM_DTER_REF); in dtimer_interrupt() 84 timerp->tcn = 0; in timer_init() [all …]
|
| /OK3568_Linux_fs/kernel/arch/microblaze/kernel/cpu/ |
| H A D | cpuinfo.c | 2 * Copyright (C) 2007-2009 Michal Simek <monstr@monstr.eu> 3 * Copyright (C) 2007-2009 PetaLogix 120 " - USERSPACE CAN LOCK THIS KERNEL!\n", __func__); in setup_cpuinfo() 132 /* take timebase-frequency from DTS */ in setup_cpuinfo_clk() 133 cpuinfo.cpu_clock_freq = fcpu(cpu, "timebase-frequency"); in setup_cpuinfo_clk() 139 pr_err("ERROR: CPU clock frequency not setup\n"); in setup_cpuinfo_clk()
|
| /OK3568_Linux_fs/u-boot/arch/arm/cpu/sa1100/ |
| H A D | timer.c | 3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com> 7 * Sysgo Real-Time Solutions, GmbH <www.elinos.com> 10 * SPDX-License-Identifier: GPL-2.0+ 14 #include <SA-1100.h> 50 diff = endtime - now; in udelay_masked() 55 * This function is derived from PowerPC code (read timebase as long long). 64 * This function is derived from PowerPC code (timebase clock frequency).
|
| /OK3568_Linux_fs/u-boot/arch/powerpc/cpu/mpc8xx/ |
| H A D | fdt.c | 6 * SPDX-License-Identifier: GPL-2.0+ 18 "timebase-frequency", get_tbclk(), 1); in ft_cpu_setup() 20 "bus-frequency", bd->bi_busfreq, 1); in ft_cpu_setup() 22 "clock-frequency", bd->bi_intfreq, 1); in ft_cpu_setup() 23 do_fixup_by_compat_u32(blob, "fsl,pq1-soc", "clock-frequency", in ft_cpu_setup() 24 bd->bi_intfreq, 1); in ft_cpu_setup() 25 do_fixup_by_compat_u32(blob, "fsl,cpm-brg", "clock-frequency", in ft_cpu_setup() 26 gd->arch.brg_clk, 1); in ft_cpu_setup() 28 fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); in ft_cpu_setup()
|
| /OK3568_Linux_fs/u-boot/arch/powerpc/cpu/mpc86xx/ |
| H A D | fdt.c | 4 * SPDX-License-Identifier: GPL-2.0 25 "timebase-frequency", bd->bi_busfreq / 4, 1); in ft_cpu_setup() 27 "bus-frequency", bd->bi_busfreq, 1); in ft_cpu_setup() 29 "clock-frequency", bd->bi_intfreq, 1); in ft_cpu_setup() 31 "bus-frequency", bd->bi_busfreq, 1); in ft_cpu_setup() 33 fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize); in ft_cpu_setup() 37 "clock-frequency", CONFIG_SYS_NS16550_CLK, 1); in ft_cpu_setup()
|
| /OK3568_Linux_fs/kernel/arch/powerpc/kvm/ |
| H A D | emulate.c | 1 // SPDX-License-Identifier: GPL-2.0-only 22 #include <asm/ppc-opcode.h> 31 pr_debug("mtDEC: %lx\n", vcpu->arch.dec); in kvmppc_emulate_dec() 32 hrtimer_try_to_cancel(&vcpu->arch.dec_timer); in kvmppc_emulate_dec() 41 if (vcpu->arch.dec == 0) in kvmppc_emulate_dec() 46 * The decrementer ticks at the same rate as the timebase, so in kvmppc_emulate_dec() 51 dec_time = vcpu->arch.dec; in kvmppc_emulate_dec() 53 * Guest timebase ticks at the same frequency as host timebase. in kvmppc_emulate_dec() 54 * So use the host timebase calculations for decrementer emulation. in kvmppc_emulate_dec() 58 hrtimer_start(&vcpu->arch.dec_timer, in kvmppc_emulate_dec() [all …]
|
| /OK3568_Linux_fs/u-boot/arch/arm/cpu/arm920t/imx/ |
| H A D | timer.c | 3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com> 7 * Sysgo Real-Time Solutions, GmbH <www.elinos.com> 13 * SPDX-License-Identifier: GPL-2.0+ 19 #include <asm/arch/imx-regs.h> 42 return get_timer_masked() - base; in get_timer() 57 diff = endtime - now; in udelay_masked() 67 * This function is derived from PowerPC code (read timebase as long long). 76 * This function is derived from PowerPC code (timebase clock frequency). 89 /* Disable watchdog and set Time-Out field to 0 */ in reset_cpu()
|
| /OK3568_Linux_fs/u-boot/arch/arm/mach-stm32/stm32f7/ |
| H A D | timer.c | 5 * SPDX-License-Identifier: GPL-2.0+ 14 #define READ_TIMER() (readl(&gpt1_regs_ptr->cnt) & GPT_FREE_RUNNING) 19 #define timestamp gd->arch.tbl 20 #define lastdec gd->arch.lastinc 27 writel(readl(&gpt1_regs_ptr->cr1) & ~GPT_CR1_CEN, &gpt1_regs_ptr->cr1); in timer_init() 29 writel((CONFIG_SYS_CLK_FREQ/CONFIG_SYS_HZ_CLOCK) - 1, in timer_init() 30 &gpt1_regs_ptr->psc); in timer_init() 32 /* Configure timer for auto-reload */ in timer_init() 33 writel(readl(&gpt1_regs_ptr->cr1) | GPT_MODE_AUTO_RELOAD, in timer_init() 34 &gpt1_regs_ptr->cr1); in timer_init() [all …]
|